-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update docs, folder examples and rollup config
- Loading branch information
1 parent
dc22e9a
commit 58cdc0d
Showing
43 changed files
with
13,915 additions
and
10,457 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,8 @@ | |
}, | ||
"files": [ | ||
"future", | ||
"overlays", | ||
"v2", | ||
"v3", | ||
"dist", | ||
"icons", | ||
"locales", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/components/src/ButtonGroup/_docs/ButtonGroup.stickersheet.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nts/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/ToggleIconButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React, { HTMLAttributes } from "react" | ||
import classnames from "classnames" | ||
import { OverrideClassName } from "~types/OverrideClassName" | ||
|
||
export type ModalProps = { | ||
children?: React.ReactNode | ||
} & OverrideClassName<HTMLAttributes<HTMLDivElement>> | ||
|
||
export const Modal = ({ | ||
children, | ||
classNameOverride, | ||
...restProps | ||
}: ModalProps): JSX.Element => ( | ||
<div className={classnames(classNameOverride)} {...restProps}> | ||
{children} | ||
</div> | ||
) | ||
|
||
Modal.displayName = "Modal" |
27 changes: 27 additions & 0 deletions
27
packages/components/src/__overlays__/Modal/v2/_docs/Modal.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Canvas, Controls, Meta } from "@storybook/blocks" | ||
import { ResourceLinks, Installation } from "~storybook/components" | ||
import * as ModalStories from "./Modal.stories" | ||
|
||
<Meta of={ModalStories} /> | ||
|
||
# Modal | ||
|
||
<ResourceLinks | ||
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Modal" | ||
figma="https://www.figma.com/file/eZKEE5kXbEMY3lx84oz8iN/%E2%9D%A4%EF%B8%8F-UI-Kit%3A-Heart?node-id=1929%3A14167&t=1IXoBrHg5uK6MAJp-1" | ||
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3075604733/Modal" | ||
className="!mb-8" | ||
/> | ||
|
||
<Installation | ||
installCommand="pnpm add @kaizen/components" | ||
importStatement='import { Tooltip } from "@kaizen/components/v2/overlays"' | ||
/> | ||
|
||
|
||
## Overview | ||
|
||
Modals are used as a visual container around secondary content. | ||
|
||
<Canvas of={ModalStories.Playground} /> | ||
<Controls of={ModalStories.Playground} /> |
47 changes: 47 additions & 0 deletions
47
packages/components/src/__overlays__/Modal/v2/_docs/Modal.stickersheet.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React from "react" | ||
import { Meta } from "@storybook/react" | ||
import { Text } from "~components/Text" | ||
import { | ||
StickerSheet, | ||
StickerSheetStory, | ||
} from "~storybook/components/StickerSheet" | ||
import { Modal } from "../" | ||
|
||
export default { | ||
title: "Overlays/Modal/v2", | ||
parameters: { | ||
chromatic: { disable: false }, | ||
controls: { disable: true }, | ||
}, | ||
} satisfies Meta | ||
|
||
const StickerSheetTemplate: StickerSheetStory = { | ||
render: () => ( | ||
<> | ||
<StickerSheet> | ||
<StickerSheet.Header | ||
headings={["Solid Border", "Dashed Border", "None"]} | ||
hasVerticalHeadings | ||
/> | ||
<StickerSheet.Body> | ||
<StickerSheet.Row> | ||
<Modal> | ||
<Text variant="body"> | ||
Bacon ipsum dolor amet andouille buffalo beef boudin kielbasa | ||
drumstick fatback cow tongue ground round chicken. Jowl cow | ||
short ribs, ham tongue turducken spare ribs pig drumstick chuck | ||
meatball. Buffalo turducken pancetta tail salami chicken. | ||
Bresaola venison pastrami beef. | ||
</Text> | ||
</Modal> | ||
</StickerSheet.Row> | ||
</StickerSheet.Body> | ||
</StickerSheet> | ||
</> | ||
), | ||
} | ||
|
||
export const StickerSheetDefault: StickerSheetStory = { | ||
...StickerSheetTemplate, | ||
name: "Sticker Sheet (Default)", | ||
} |
36 changes: 36 additions & 0 deletions
36
packages/components/src/__overlays__/Modal/v2/_docs/Modal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from "react" | ||
import { Meta, StoryObj } from "@storybook/react" | ||
import { Text } from "~components/Text" | ||
import { Modal } from "../" | ||
|
||
const meta = { | ||
title: "Overlays/Modal/v2", | ||
component: Modal, | ||
args: { | ||
children: ( | ||
<Text variant="body"> | ||
Bacon ipsum dolor amet andouille buffalo beef boudin kielbasa drumstick | ||
fatback cow tongue ground round chicken. Jowl cow short ribs, ham tongue | ||
turducken spare ribs pig drumstick chuck meatball. Buffalo turducken | ||
pancetta tail salami chicken. Bresaola venison pastrami beef. | ||
</Text> | ||
), | ||
}, | ||
argTypes: { | ||
children: { control: false }, | ||
}, | ||
} satisfies Meta<typeof Modal> | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof meta> | ||
|
||
export const Playground: Story = { | ||
parameters: { | ||
docs: { | ||
canvas: { | ||
sourceState: "shown", | ||
}, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./Modal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React, { HTMLAttributes } from "react" | ||
import classnames from "classnames" | ||
import { OverrideClassName } from "~types/OverrideClassName" | ||
|
||
export type ModalProps = { | ||
children?: React.ReactNode | ||
} & OverrideClassName<HTMLAttributes<HTMLDivElement>> | ||
|
||
export const Modal = ({ | ||
children, | ||
classNameOverride, | ||
...restProps | ||
}: ModalProps): JSX.Element => ( | ||
<div className={classnames(classNameOverride)} {...restProps} style={{}}> | ||
{children} | ||
</div> | ||
) | ||
|
||
Modal.displayName = "Modal" |
27 changes: 27 additions & 0 deletions
27
packages/components/src/__overlays__/Modal/v3/_docs/Modal.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Canvas, Controls, Meta } from "@storybook/blocks" | ||
import { ResourceLinks, Installation } from "~storybook/components" | ||
import * as ModalStories from "./Modal.stories" | ||
|
||
<Meta of={ModalStories} /> | ||
|
||
# Modal | ||
|
||
<ResourceLinks | ||
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Modal" | ||
figma="https://www.figma.com/file/eZKEE5kXbEMY3lx84oz8iN/%E2%9D%A4%EF%B8%8F-UI-Kit%3A-Heart?node-id=1929%3A14167&t=1IXoBrHg5uK6MAJp-1" | ||
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3075604733/Modal" | ||
className="!mb-8" | ||
/> | ||
|
||
<Installation | ||
installCommand="pnpm add @kaizen/components" | ||
importStatement='import { Tooltip } from "@kaizen/components/v3/overlays"' | ||
/> | ||
|
||
|
||
## Overview | ||
|
||
Modals are used as a visual container around secondary content. | ||
|
||
<Canvas of={ModalStories.Playground} /> | ||
<Controls of={ModalStories.Playground} /> |
47 changes: 47 additions & 0 deletions
47
packages/components/src/__overlays__/Modal/v3/_docs/Modal.stickersheet.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React from "react" | ||
import { Meta } from "@storybook/react" | ||
import { Text } from "~components/Text" | ||
import { | ||
StickerSheet, | ||
StickerSheetStory, | ||
} from "~storybook/components/StickerSheet" | ||
import { Modal } from "../" | ||
|
||
export default { | ||
title: "Overlays/Modal/v3", | ||
parameters: { | ||
chromatic: { disable: false }, | ||
controls: { disable: true }, | ||
}, | ||
} satisfies Meta | ||
|
||
const StickerSheetTemplate: StickerSheetStory = { | ||
render: () => ( | ||
<> | ||
<StickerSheet> | ||
<StickerSheet.Header | ||
headings={["Solid Border", "Dashed Border", "None"]} | ||
hasVerticalHeadings | ||
/> | ||
<StickerSheet.Body> | ||
<StickerSheet.Row> | ||
<Modal> | ||
<Text variant="body"> | ||
Bacon ipsum dolor amet andouille buffalo beef boudin kielbasa | ||
drumstick fatback cow tongue ground round chicken. Jowl cow | ||
short ribs, ham tongue turducken spare ribs pig drumstick chuck | ||
meatball. Buffalo turducken pancetta tail salami chicken. | ||
Bresaola venison pastrami beef. | ||
</Text> | ||
</Modal> | ||
</StickerSheet.Row> | ||
</StickerSheet.Body> | ||
</StickerSheet> | ||
</> | ||
), | ||
} | ||
|
||
export const StickerSheetDefault: StickerSheetStory = { | ||
...StickerSheetTemplate, | ||
name: "Sticker Sheet (Default)", | ||
} |
37 changes: 37 additions & 0 deletions
37
packages/components/src/__overlays__/Modal/v3/_docs/Modal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from "react" | ||
import { Meta, StoryObj } from "@storybook/react" | ||
import { Text } from "~components/Text" | ||
import { Modal } from "~components/__overlays__/v3" | ||
|
||
const meta = { | ||
title: "Overlays/Modal/v3", | ||
component: Modal, | ||
args: { | ||
children: ( | ||
<Text variant="body"> | ||
Bacon ipsum dolor amet andouille buffalo beef boudin kielbasa drumstick | ||
fatback cow tongue ground round chicken. Jowl cow short ribs, ham tongue | ||
turducken spare ribs pig drumstick chuck meatball. Buffalo turducken | ||
pancetta tail salami chicken. Bresaola venison pastrami beef. | ||
</Text> | ||
), | ||
}, | ||
argTypes: { | ||
children: { control: false }, | ||
}, | ||
} satisfies Meta<typeof Modal> | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof meta> | ||
|
||
export const Playground: Story = { | ||
parameters: { | ||
docs: { | ||
canvas: { | ||
sourceState: "shown", | ||
}, | ||
}, | ||
}, | ||
render: () => <Modal></Modal>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./Modal" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.