@kaizen/components 1.57.2 → 1.58.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/codemod.sh +39 -0
- package/codemods/README.md +31 -0
- package/codemods/__tests__/utils/index.ts +1 -0
- package/codemods/__tests__/utils/parseJsx.ts +11 -0
- package/codemods/migrateBrandMomentMoodToVariant/index.ts +21 -0
- package/codemods/migrateBrandMomentMoodToVariant/transformBrandMomentMoodToVariant.spec.ts +44 -0
- package/codemods/migrateBrandMomentMoodToVariant/transformBrandMomentMoodToVariant.ts +24 -0
- package/codemods/migrateCardVariantToColor/index.ts +15 -0
- package/codemods/migrateCardVariantToColor/transformCardVariantToColor.spec.ts +91 -0
- package/codemods/migrateCardVariantToColor/transformCardVariantToColor.ts +32 -0
- package/codemods/migrateConfirmationModalMoodsToVariant/index.ts +19 -0
- package/codemods/migrateConfirmationModalMoodsToVariant/transformConfirmationModalMoodsToVariant.spec.ts +110 -0
- package/codemods/migrateConfirmationModalMoodsToVariant/transformConfirmationModalMoodsToVariant.ts +59 -0
- package/codemods/migrateEmptyStateIllustrationTypeToVariant/index.ts +21 -0
- package/codemods/migrateEmptyStateIllustrationTypeToVariant/transformEmptyStateIllustrationTypeToVariant.spec.ts +74 -0
- package/codemods/migrateEmptyStateIllustrationTypeToVariant/transformEmptyStateIllustrationTypeToVariant.ts +28 -0
- package/codemods/migrateGlobalNotificationTypeToVariant/index.ts +19 -0
- package/codemods/migrateInformationTileMoodToVariant/index.ts +21 -0
- package/codemods/migrateInformationTileMoodToVariant/transformInformationTileMoodToVariant.spec.ts +84 -0
- package/codemods/migrateInformationTileMoodToVariant/transformInformationTileMoodToVariant.ts +22 -0
- package/codemods/migrateInlineNotificationTypeToVariant/index.ts +19 -0
- package/codemods/migrateMultiActionTileMoodToVariant/index.ts +21 -0
- package/codemods/migrateMultiActionTileMoodToVariant/transformMultiActionTileMoodToVariant.spec.ts +84 -0
- package/codemods/migrateMultiActionTileMoodToVariant/transformMultiActionTileMoodToVariant.ts +22 -0
- package/codemods/migrateNotificationTypeToVariant/index.ts +1 -0
- package/codemods/migrateNotificationTypeToVariant/migrateNotificationTypeToVariant.spec.ts +107 -0
- package/codemods/migrateNotificationTypeToVariant/migrateNotificationTypeToVariant.ts +28 -0
- package/codemods/migrateProgressBarMoodToColor/index.ts +21 -0
- package/codemods/migrateProgressBarMoodToColor/transformProgressBarMoodToColor.spec.ts +54 -0
- package/codemods/migrateProgressBarMoodToColor/transformProgressBarMoodToColor.ts +26 -0
- package/codemods/migrateToastNotificationTypeToVariant/index.ts +19 -0
- package/codemods/migrateWellVariantToColor/index.ts +15 -0
- package/codemods/migrateWellVariantToColor/transformWellVariantToColor.spec.ts +192 -0
- package/codemods/migrateWellVariantToColor/transformWellVariantToColor.ts +75 -0
- package/codemods/removeInputEditModalMood/index.ts +19 -0
- package/codemods/removeInputEditModalMood/removeInputEditModalMood.spec.ts +80 -0
- package/codemods/removeInputEditModalMood/removeInputEditModalMood.ts +40 -0
- package/codemods/updateGuidanceBlockVariantProp/transformGuidanceBlockVariantProp.spec.ts +135 -0
- package/codemods/updateGuidanceBlockVariantProp/transformGuidanceBlockVariantProp.ts +77 -0
- package/codemods/utils/__fixtures__/KaioComponent.tsx +6 -0
- package/codemods/utils/__snapshots__/transformSource.spec.ts.snap +11 -0
- package/codemods/utils/getPropValueText.spec.ts +75 -0
- package/codemods/utils/getPropValueText.ts +21 -0
- package/codemods/utils/getTagName.spec.ts +24 -0
- package/codemods/utils/getTagName.ts +32 -0
- package/codemods/utils/index.ts +7 -0
- package/codemods/utils/migrateStringProp.spec.ts +129 -0
- package/codemods/utils/migrateStringProp.ts +43 -0
- package/codemods/utils/printAst.ts +6 -0
- package/codemods/utils/transformComponentsInDir.ts +42 -0
- package/codemods/utils/transformSource.spec.ts +56 -0
- package/codemods/utils/transformSource.ts +25 -0
- package/codemods/utils/updateJsxElementWithNewProps.spec.ts +67 -0
- package/codemods/utils/updateJsxElementWithNewProps.ts +24 -0
- package/dist/cjs/BrandMoment/BrandMoment.cjs +3 -2
- package/dist/cjs/BrandMoment/BrandMoment.module.scss.cjs +3 -1
- package/dist/cjs/Card/Card.cjs +7 -6
- package/dist/cjs/Card/Card.module.scss.cjs +10 -2
- package/dist/cjs/EmptyState/EmptyState.cjs +14 -6
- package/dist/cjs/EmptyState/EmptyState.module.scss.cjs +3 -0
- package/dist/cjs/ErrorPage/ErrorPage.cjs +1 -1
- package/dist/cjs/Icon/subcomponents/SVG/SVG.cjs +2 -3
- package/dist/cjs/Illustration/subcomponents/VideoPlayer/VideoPlayer.cjs +1 -1
- package/dist/cjs/Modal/ConfirmationModal/ConfirmationModal.cjs +9 -5
- package/dist/cjs/Modal/ConfirmationModal/ConfirmationModal.module.scss.cjs +6 -2
- package/dist/cjs/Notification/ToastNotification/ToastNotification/ToastNotification.cjs +1 -3
- package/dist/cjs/Notification/ToastNotification/ToastNotificationsList/subcomponents/ToastNotificationsMap/ToastNotificationsMap.cjs +1 -3
- package/dist/cjs/Notification/subcomponents/GenericNotification/GenericNotification.cjs +6 -3
- package/dist/cjs/Notification/subcomponents/GenericNotification/GenericNotification.module.scss.cjs +5 -3
- package/dist/cjs/Notification/subcomponents/NotificationIcon/NotificationIcon.cjs +35 -3
- package/dist/cjs/ProgressBar/ProgressBar.cjs +3 -2
- package/dist/cjs/ProgressBar/ProgressBar.module.scss.cjs +8 -4
- package/dist/cjs/Tile/subcomponents/GenericTile/GenericTile.cjs +7 -5
- package/dist/cjs/Tile/subcomponents/GenericTile/GenericTile.module.scss.cjs +8 -6
- package/dist/cjs/Well/Well.cjs +5 -4
- package/dist/cjs/Well/Well.module.scss.cjs +9 -1
- package/dist/cjs/{GuidanceBlock → __containers__/GuidanceBlock/v1}/GuidanceBlock.cjs +6 -6
- package/dist/cjs/__containers__/GuidanceBlock/v1/GuidanceBlock.module.scss.cjs +33 -0
- package/dist/cjs/__containers__/GuidanceBlock/v2/GuidanceBlock.cjs +160 -0
- package/dist/cjs/__containers__/GuidanceBlock/v2/GuidanceBlock.module.scss.cjs +28 -0
- package/dist/cjs/containersV1.cjs +4 -0
- package/dist/cjs/containersV2.cjs +4 -0
- package/dist/cjs/index.cjs +2 -2
- package/dist/esm/BrandMoment/BrandMoment.mjs +3 -2
- package/dist/esm/BrandMoment/BrandMoment.module.scss.mjs +3 -1
- package/dist/esm/Card/Card.mjs +7 -6
- package/dist/esm/Card/Card.module.scss.mjs +10 -2
- package/dist/esm/EmptyState/EmptyState.mjs +15 -7
- package/dist/esm/EmptyState/EmptyState.module.scss.mjs +3 -0
- package/dist/esm/ErrorPage/ErrorPage.mjs +1 -1
- package/dist/esm/Icon/subcomponents/SVG/SVG.mjs +2 -3
- package/dist/esm/Illustration/subcomponents/VideoPlayer/VideoPlayer.mjs +1 -1
- package/dist/esm/Modal/ConfirmationModal/ConfirmationModal.mjs +9 -5
- package/dist/esm/Modal/ConfirmationModal/ConfirmationModal.module.scss.mjs +6 -2
- package/dist/esm/Notification/ToastNotification/ToastNotification/ToastNotification.mjs +1 -3
- package/dist/esm/Notification/ToastNotification/ToastNotificationsList/subcomponents/ToastNotificationsMap/ToastNotificationsMap.mjs +1 -3
- package/dist/esm/Notification/subcomponents/GenericNotification/GenericNotification.mjs +8 -5
- package/dist/esm/Notification/subcomponents/GenericNotification/GenericNotification.module.scss.mjs +5 -3
- package/dist/esm/Notification/subcomponents/NotificationIcon/NotificationIcon.mjs +39 -5
- package/dist/esm/ProgressBar/ProgressBar.mjs +3 -2
- package/dist/esm/ProgressBar/ProgressBar.module.scss.mjs +8 -4
- package/dist/esm/Tile/subcomponents/GenericTile/GenericTile.mjs +7 -5
- package/dist/esm/Tile/subcomponents/GenericTile/GenericTile.module.scss.mjs +8 -6
- package/dist/esm/Well/Well.mjs +5 -4
- package/dist/esm/Well/Well.module.scss.mjs +9 -1
- package/dist/esm/{GuidanceBlock → __containers__/GuidanceBlock/v1}/GuidanceBlock.mjs +6 -6
- package/dist/esm/__containers__/GuidanceBlock/v1/GuidanceBlock.module.scss.mjs +31 -0
- package/dist/esm/__containers__/GuidanceBlock/v2/GuidanceBlock.mjs +153 -0
- package/dist/esm/__containers__/GuidanceBlock/v2/GuidanceBlock.module.scss.mjs +26 -0
- package/dist/esm/containersV1.mjs +1 -0
- package/dist/esm/containersV2.mjs +1 -0
- package/dist/esm/index.mjs +1 -1
- package/dist/styles.css +13 -12
- package/dist/types/BrandMoment/BrandMoment.d.ts +19 -3
- package/dist/types/Card/Card.d.ts +20 -7
- package/dist/types/EmptyState/EmptyState.d.ts +14 -6
- package/dist/types/Icon/subcomponents/SVG/SVG.d.ts +1 -2
- package/dist/types/Modal/ConfirmationModal/ConfirmationModal.d.ts +25 -7
- package/dist/types/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.d.ts +3 -0
- package/dist/types/Modal/InputEditModal/InputEditModal.d.ts +4 -1
- package/dist/types/Notification/GlobalNotification/GlobalNotification.d.ts +3 -3
- package/dist/types/Notification/InlineNotification/InlineNotification.d.ts +3 -3
- package/dist/types/Notification/ToastNotification/ToastNotification/ToastNotification.d.ts +5 -4
- package/dist/types/Notification/ToastNotification/context/ToastNotificationContext.d.ts +4 -3
- package/dist/types/Notification/ToastNotification/types.d.ts +3 -3
- package/dist/types/Notification/subcomponents/GenericNotification/GenericNotification.d.ts +24 -4
- package/dist/types/Notification/subcomponents/NotificationIcon/NotificationIcon.d.ts +11 -4
- package/dist/types/Notification/types.d.ts +2 -1
- package/dist/types/ProgressBar/ProgressBar.d.ts +25 -6
- package/dist/types/Tile/subcomponents/GenericTile/GenericTile.d.ts +10 -3
- package/dist/types/Well/Well.d.ts +6 -2
- package/dist/types/Well/types.d.ts +4 -0
- package/dist/types/{GuidanceBlock → __containers__/GuidanceBlock/v1}/GuidanceBlock.d.ts +4 -4
- package/dist/types/__containers__/GuidanceBlock/v2/GuidanceBlock.d.ts +59 -0
- package/dist/types/__containers__/GuidanceBlock/v2/index.d.ts +1 -0
- package/dist/types/__containers__/v1.d.ts +1 -0
- package/dist/types/__containers__/v2.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +28 -13
- package/src/BrandMoment/BrandMoment.module.scss +20 -9
- package/src/BrandMoment/BrandMoment.tsx +26 -3
- package/src/BrandMoment/_docs/BrandMoment.mdx +13 -13
- package/src/BrandMoment/_docs/BrandMoment.stickersheet.stories.tsx +102 -0
- package/src/BrandMoment/_docs/BrandMoment.stories.tsx +17 -99
- package/src/Card/Card.module.scss +56 -7
- package/src/Card/Card.tsx +35 -11
- package/src/Card/_docs/Card.mdx +6 -3
- package/src/Card/_docs/Card.stickersheet.stories.tsx +44 -39
- package/src/Card/_docs/Card.stories.tsx +23 -23
- package/src/EmptyState/EmptyState.module.scss +32 -14
- package/src/EmptyState/EmptyState.tsx +32 -18
- package/src/EmptyState/_docs/EmptyState.stickersheet.stories.tsx +69 -121
- package/src/EmptyState/_docs/EmptyState.stories.tsx +6 -8
- package/src/ErrorPage/ErrorPage.tsx +1 -1
- package/src/Icon/subcomponents/SVG/SVG.tsx +1 -4
- package/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.tsx +1 -1
- package/src/Modal/ConfirmationModal/ConfirmationModal.module.scss +100 -78
- package/src/Modal/ConfirmationModal/ConfirmationModal.spec.tsx +5 -5
- package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +41 -10
- package/src/Modal/ConfirmationModal/_docs/ConfirmationModal.mdx +3 -3
- package/src/Modal/ConfirmationModal/_docs/ConfirmationModal.stories.tsx +11 -4
- package/src/Modal/ContextModal/_docs/ContextModal.stories.tsx +3 -1
- package/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.tsx +3 -0
- package/src/Modal/InputEditModal/InputEditModal.tsx +4 -1
- package/src/Modal/InputEditModal/_docs/InputEditModal.mdx +0 -13
- package/src/Modal/InputEditModal/_docs/InputEditModal.stories.tsx +9 -10
- package/src/Notification/GlobalNotification/GlobalNotification.tsx +9 -4
- package/src/Notification/GlobalNotification/_docs/GlobalNotification.stickersheet.stories.tsx +68 -58
- package/src/Notification/GlobalNotification/_docs/GlobalNotification.stories.tsx +10 -13
- package/src/Notification/InlineNotification/InlineNotification.tsx +9 -4
- package/src/Notification/InlineNotification/_docs/InlineNotification.stickersheet.stories.tsx +79 -44
- package/src/Notification/InlineNotification/_docs/InlineNotification.stories.tsx +17 -17
- package/src/Notification/ToastNotification/ToastNotification/ToastNotification.tsx +7 -5
- package/src/Notification/ToastNotification/ToastNotificationsList/subcomponents/ToastNotificationsMap/ToastNotificationsMap.tsx +1 -2
- package/src/Notification/ToastNotification/_docs/ToastNotification.stickersheet.stories.tsx +12 -7
- package/src/Notification/ToastNotification/_docs/ToastNotification.stories.tsx +6 -1
- package/src/Notification/ToastNotification/context/ToastNotificationContext.tsx +7 -3
- package/src/Notification/ToastNotification/types.ts +8 -3
- package/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss +42 -5
- package/src/Notification/subcomponents/GenericNotification/GenericNotification.tsx +40 -6
- package/src/Notification/subcomponents/GenericNotification/_mixins.scss +2 -1
- package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.tsx +31 -5
- package/src/Notification/types.ts +9 -2
- package/src/ProgressBar/ProgressBar.module.scss +37 -25
- package/src/ProgressBar/ProgressBar.tsx +30 -5
- package/src/ProgressBar/_docs/ProgressBar.mdx +2 -3
- package/src/ProgressBar/_docs/ProgressBar.stickersheet.stories.tsx +95 -51
- package/src/ProgressBar/_docs/ProgressBar.stories.tsx +56 -25
- package/src/Tile/InformationTile/_docs/InformationTile.mdx +3 -2
- package/src/Tile/InformationTile/_docs/InformationTile.stickersheet.stories.tsx +57 -19
- package/src/Tile/InformationTile/_docs/InformationTile.stories.tsx +19 -7
- package/src/Tile/MultiActionTile/_docs/MultiActionTile.mdx +3 -2
- package/src/Tile/MultiActionTile/_docs/MultiActionTile.stickersheet.stories.tsx +62 -24
- package/src/Tile/MultiActionTile/_docs/MultiActionTile.stories.tsx +19 -7
- package/src/Tile/subcomponents/GenericTile/GenericTile.module.scss +34 -22
- package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +17 -8
- package/src/Tile/subcomponents/GenericTile/_docs/GenericTile.stickersheet.stories.tsx +57 -19
- package/src/Well/Well.module.scss +70 -33
- package/src/Well/Well.tsx +9 -3
- package/src/Well/_docs/Well.mdx +9 -2
- package/src/Well/_docs/Well.stickersheet.stories.tsx +10 -1
- package/src/Well/_docs/Well.stories.tsx +54 -29
- package/src/Well/types.ts +15 -0
- package/src/__actions__/Button/v3/_docs/ApiSpecification.mdx +1 -1
- package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/GuidanceBlock.module.scss +2 -2
- package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/_docs/GuidanceBlock.mdx +2 -2
- package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/_docs/GuidanceBlock.stickersheet.stories.tsx +1 -1
- package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/_docs/GuidanceBlock.stories.tsx +1 -1
- package/src/__containers__/GuidanceBlock/v2/GuidanceBlock.module.scss +356 -0
- package/src/__containers__/GuidanceBlock/v2/GuidanceBlock.spec.tsx +82 -0
- package/src/__containers__/GuidanceBlock/v2/GuidanceBlock.tsx +262 -0
- package/src/__containers__/GuidanceBlock/v2/_docs/GuidanceBlock.mdx +38 -0
- package/src/__containers__/GuidanceBlock/v2/_docs/GuidanceBlock.stickersheet.stories.tsx +118 -0
- package/src/__containers__/GuidanceBlock/v2/_docs/GuidanceBlock.stories.tsx +152 -0
- package/src/__containers__/GuidanceBlock/v2/index.ts +1 -0
- package/src/__containers__/v1.ts +1 -0
- package/src/__containers__/v2.ts +1 -0
- package/src/index.ts +2 -1
- package/v1/containers/package.json +5 -0
- package/v2/containers/package.json +5 -0
- package/dist/cjs/GuidanceBlock/GuidanceBlock.module.scss.cjs +0 -33
- package/dist/esm/GuidanceBlock/GuidanceBlock.module.scss.mjs +0 -31
- package/dist/types/Tile/subcomponents/GenericTile/types.d.ts +0 -2
- package/src/EmptyState/_docs/EmptyState.stories.module.scss +0 -15
- package/src/Notification/ToastNotification/ToastNotification/ToastNotification.spec.tsx +0 -33
- package/src/Tile/subcomponents/GenericTile/types.ts +0 -10
- /package/dist/types/{GuidanceBlock → __containers__/GuidanceBlock/v1}/index.d.ts +0 -0
- /package/dist/types/{GuidanceBlock → __containers__/GuidanceBlock/v1}/types.d.ts +0 -0
- /package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/GuidanceBlock.spec.tsx +0 -0
- /package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/GuidanceBlock.tsx +0 -0
- /package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/index.ts +0 -0
- /package/src/{GuidanceBlock → __containers__/GuidanceBlock/v1}/types.ts +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import { moodsList } from "~components/Tile/subcomponents/GenericTile/types"
|
|
4
3
|
import { InformationTile } from "../index"
|
|
5
4
|
|
|
6
5
|
const meta = {
|
|
@@ -11,6 +10,9 @@ const meta = {
|
|
|
11
10
|
metadata: "Side A",
|
|
12
11
|
footer: <>Example Footer</>,
|
|
13
12
|
},
|
|
13
|
+
argTypes: {
|
|
14
|
+
mood: { control: false },
|
|
15
|
+
},
|
|
14
16
|
} satisfies Meta<typeof InformationTile>
|
|
15
17
|
|
|
16
18
|
export default meta
|
|
@@ -27,14 +29,24 @@ export const Playground: Story = {
|
|
|
27
29
|
},
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
export const
|
|
32
|
+
export const Variants: Story = {
|
|
31
33
|
render: args => (
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
<>
|
|
35
|
+
<InformationTile {...args} variant="default" title="default" />
|
|
36
|
+
<InformationTile
|
|
37
|
+
{...args}
|
|
38
|
+
variant="expert-advice"
|
|
39
|
+
title="expert-advice"
|
|
40
|
+
/>
|
|
41
|
+
</>
|
|
37
42
|
),
|
|
43
|
+
decorators: [
|
|
44
|
+
Story => (
|
|
45
|
+
<div className="flex gap-16 flex-wrap">
|
|
46
|
+
<Story />
|
|
47
|
+
</div>
|
|
48
|
+
),
|
|
49
|
+
],
|
|
38
50
|
}
|
|
39
51
|
|
|
40
52
|
export const Information: Story = {
|
|
@@ -24,8 +24,9 @@ A visually interesting item in a list consisting of a card, visual, title, metad
|
|
|
24
24
|
|
|
25
25
|
## API
|
|
26
26
|
|
|
27
|
-
###
|
|
28
|
-
|
|
27
|
+
### Variants
|
|
28
|
+
|
|
29
|
+
<Canvas of={MultiActionTileStories.Variants} />
|
|
29
30
|
|
|
30
31
|
### Secondary Action
|
|
31
32
|
<Canvas of={MultiActionTileStories.SecondaryAction} />
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta } from "@storybook/react"
|
|
3
|
-
import { moodsList } from "~components/Tile/subcomponents/GenericTile/types"
|
|
4
3
|
import {
|
|
5
4
|
StickerSheet,
|
|
6
5
|
StickerSheetStory,
|
|
7
6
|
} from "~storybook/components/StickerSheet"
|
|
8
|
-
import { MultiActionTile } from "../index"
|
|
7
|
+
import { MultiActionTile, MultiActionTileProps } from "../index"
|
|
9
8
|
|
|
10
9
|
export default {
|
|
11
10
|
title: "Components/Tiles/MultiActionTile",
|
|
@@ -16,31 +15,70 @@ export default {
|
|
|
16
15
|
} satisfies Meta
|
|
17
16
|
|
|
18
17
|
const StickerSheetTemplate: StickerSheetStory = {
|
|
19
|
-
render: () =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
18
|
+
render: () => {
|
|
19
|
+
const defaultProps = {
|
|
20
|
+
title: "Title",
|
|
21
|
+
metadata: "Side A",
|
|
22
|
+
information: "Side B",
|
|
23
|
+
primaryAction: {
|
|
24
|
+
label: "Take Action!",
|
|
25
|
+
},
|
|
26
|
+
secondaryAction: {
|
|
27
|
+
label: "Nevermind",
|
|
28
|
+
},
|
|
29
|
+
} satisfies MultiActionTileProps
|
|
30
|
+
|
|
31
|
+
const variants = ["default", "expert-advice"] satisfies Array<
|
|
32
|
+
MultiActionTileProps["variant"]
|
|
33
|
+
>
|
|
34
|
+
|
|
35
|
+
const moods = [
|
|
36
|
+
"positive",
|
|
37
|
+
"informative",
|
|
38
|
+
"cautionary",
|
|
39
|
+
"assertive",
|
|
40
|
+
"negative",
|
|
41
|
+
"prominent",
|
|
42
|
+
] satisfies Array<MultiActionTileProps["mood"]>
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<>
|
|
46
|
+
<StickerSheet heading="MultiActionTile">
|
|
47
|
+
<StickerSheet.Body>
|
|
48
|
+
{variants.map(variant => (
|
|
49
|
+
<StickerSheet.Row key={variant} rowTitle={variant}>
|
|
50
|
+
<MultiActionTile {...defaultProps} variant={variant} />
|
|
51
|
+
</StickerSheet.Row>
|
|
52
|
+
))}
|
|
53
|
+
</StickerSheet.Body>
|
|
54
|
+
</StickerSheet>
|
|
55
|
+
|
|
56
|
+
<StickerSheet heading="Mood (deprecated)">
|
|
57
|
+
<StickerSheet.Body>
|
|
58
|
+
<>
|
|
59
|
+
<StickerSheet.Row rowTitle="default">
|
|
60
|
+
<MultiActionTile {...defaultProps} />
|
|
61
|
+
</StickerSheet.Row>
|
|
62
|
+
{moods.map(mood => (
|
|
63
|
+
<StickerSheet.Row key={mood} rowTitle={mood}>
|
|
64
|
+
<MultiActionTile {...defaultProps} mood={mood} />
|
|
65
|
+
</StickerSheet.Row>
|
|
66
|
+
))}
|
|
67
|
+
</>
|
|
68
|
+
</StickerSheet.Body>
|
|
69
|
+
</StickerSheet>
|
|
70
|
+
</>
|
|
71
|
+
)
|
|
72
|
+
},
|
|
41
73
|
}
|
|
42
74
|
|
|
43
75
|
export const StickerSheetDefault: StickerSheetStory = {
|
|
44
76
|
...StickerSheetTemplate,
|
|
45
77
|
name: "Sticker Sheet (Default)",
|
|
46
78
|
}
|
|
79
|
+
|
|
80
|
+
export const StickerSheetRTL: StickerSheetStory = {
|
|
81
|
+
...StickerSheetTemplate,
|
|
82
|
+
name: "Sticker Sheet (RTL)",
|
|
83
|
+
parameters: { textDirection: "rtl" },
|
|
84
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import { moodsList } from "~components/Tile/subcomponents/GenericTile/types"
|
|
4
3
|
import { MultiActionTile } from "../index"
|
|
5
4
|
|
|
6
5
|
const meta = {
|
|
@@ -13,6 +12,9 @@ const meta = {
|
|
|
13
12
|
label: "Take Action!",
|
|
14
13
|
},
|
|
15
14
|
},
|
|
15
|
+
argTypes: {
|
|
16
|
+
mood: { control: false },
|
|
17
|
+
},
|
|
16
18
|
} satisfies Meta<typeof MultiActionTile>
|
|
17
19
|
|
|
18
20
|
export default meta
|
|
@@ -29,14 +31,24 @@ export const Playground: Story = {
|
|
|
29
31
|
},
|
|
30
32
|
}
|
|
31
33
|
|
|
32
|
-
export const
|
|
34
|
+
export const Variants: Story = {
|
|
33
35
|
render: args => (
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
<>
|
|
37
|
+
<MultiActionTile {...args} variant="default" title="default" />
|
|
38
|
+
<MultiActionTile
|
|
39
|
+
{...args}
|
|
40
|
+
variant="expert-advice"
|
|
41
|
+
title="expert-advice"
|
|
42
|
+
/>
|
|
43
|
+
</>
|
|
39
44
|
),
|
|
45
|
+
decorators: [
|
|
46
|
+
Story => (
|
|
47
|
+
<div className="flex gap-16 flex-wrap">
|
|
48
|
+
<Story />
|
|
49
|
+
</div>
|
|
50
|
+
),
|
|
51
|
+
],
|
|
40
52
|
}
|
|
41
53
|
|
|
42
54
|
export const Information: Story = {
|
|
@@ -44,9 +44,6 @@ $tilePaddingTop: $spacing-xl;
|
|
|
44
44
|
|
|
45
45
|
.face {
|
|
46
46
|
position: absolute;
|
|
47
|
-
background-color: $color-white;
|
|
48
|
-
border: var(--border-width-1) var(--border-solid-border-style);
|
|
49
|
-
border-radius: 7px;
|
|
50
47
|
box-sizing: border-box;
|
|
51
48
|
display: flex;
|
|
52
49
|
flex-direction: column;
|
|
@@ -54,6 +51,9 @@ $tilePaddingTop: $spacing-xl;
|
|
|
54
51
|
width: 100%;
|
|
55
52
|
height: 100%;
|
|
56
53
|
backface-visibility: hidden;
|
|
54
|
+
border: var(--border-width-1) solid var(--generic-tile-border-color);
|
|
55
|
+
border-radius: var(--border-solid-border-radius);
|
|
56
|
+
background-color: var(--generic-tile-background-color);
|
|
57
57
|
|
|
58
58
|
* {
|
|
59
59
|
backface-visibility: hidden;
|
|
@@ -62,41 +62,53 @@ $tilePaddingTop: $spacing-xl;
|
|
|
62
62
|
|
|
63
63
|
.faceFront {
|
|
64
64
|
justify-content: space-between;
|
|
65
|
-
border-color: var(--color-gray-500);
|
|
66
65
|
padding: $tilePaddingTop $spacing-md $spacing-md;
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
.faceBack {
|
|
69
|
+
--generic-tile-border-color: var(--color-blue-400);
|
|
70
|
+
--generic-tile-background-color: var(--color-blue-100);
|
|
71
|
+
|
|
70
72
|
padding-top: $tilePaddingTop;
|
|
71
73
|
transform: rotateY(180deg);
|
|
72
|
-
border-color: var(--color-blue-400);
|
|
73
|
-
background-color: $color-blue-100;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
/** @deprecated */
|
|
77
|
+
.positive {
|
|
78
|
+
--generic-tile-border-color: var(--color-green-500);
|
|
79
|
+
--generic-tile-background-color: var(--color-green-100);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.informative {
|
|
83
|
+
--generic-tile-border-color: var(--color-blue-400);
|
|
84
|
+
--generic-tile-background-color: var(--color-blue-100);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.cautionary {
|
|
88
|
+
--generic-tile-border-color: var(--color-yellow-700);
|
|
89
|
+
--generic-tile-background-color: var(--color-yellow-100);
|
|
79
90
|
}
|
|
80
91
|
|
|
81
|
-
.
|
|
82
|
-
|
|
83
|
-
|
|
92
|
+
.negative,
|
|
93
|
+
.assertive {
|
|
94
|
+
--generic-tile-border-color: var(--color-red-500);
|
|
95
|
+
--generic-tile-background-color: var(--color-red-100);
|
|
84
96
|
}
|
|
85
97
|
|
|
86
|
-
.
|
|
87
|
-
border-color: var(--color-
|
|
88
|
-
background-color:
|
|
98
|
+
.prominent {
|
|
99
|
+
--generic-tile-border-color: var(--color-purple-400);
|
|
100
|
+
--generic-tile-background-color: var(--color-purple-100);
|
|
89
101
|
}
|
|
90
102
|
|
|
91
|
-
|
|
92
|
-
.
|
|
93
|
-
border-color: var(--color-
|
|
94
|
-
background-color:
|
|
103
|
+
/** end @deprecated */
|
|
104
|
+
.default {
|
|
105
|
+
--generic-tile-border-color: var(--color-gray-500);
|
|
106
|
+
--generic-tile-background-color: var(--color-white);
|
|
95
107
|
}
|
|
96
108
|
|
|
97
|
-
.
|
|
98
|
-
border-color: var(--color-purple-400);
|
|
99
|
-
background-color:
|
|
109
|
+
.expert-advice {
|
|
110
|
+
--generic-tile-border-color: var(--color-purple-400);
|
|
111
|
+
--generic-tile-background-color: var(--color-purple-100);
|
|
100
112
|
}
|
|
101
113
|
|
|
102
114
|
.isFlipped {
|
|
@@ -7,7 +7,6 @@ import { GenericButtonProps } from "~components/__actions__/Button/v1/GenericBut
|
|
|
7
7
|
import { IconButton } from "~components/__actions__/v2"
|
|
8
8
|
import { OverrideClassName } from "~types/OverrideClassName"
|
|
9
9
|
import Action from "./Action"
|
|
10
|
-
import { Moods } from "./types"
|
|
11
10
|
import styles from "./GenericTile.module.scss"
|
|
12
11
|
|
|
13
12
|
export type TileAction = {
|
|
@@ -34,7 +33,21 @@ export type GenericTileProps = {
|
|
|
34
33
|
titleTag?: AllowedHeadingTags
|
|
35
34
|
metadata?: string
|
|
36
35
|
information?: TileInformation | React.ReactNode
|
|
37
|
-
|
|
36
|
+
/** @deprecated Use `variant` instead */
|
|
37
|
+
mood?:
|
|
38
|
+
| "positive"
|
|
39
|
+
| "informative"
|
|
40
|
+
| "cautionary"
|
|
41
|
+
| "assertive"
|
|
42
|
+
| "negative"
|
|
43
|
+
| "prominent"
|
|
44
|
+
/**
|
|
45
|
+
* If you are transitioning from `mood`:
|
|
46
|
+
* - `prominent` should be `expert-advice`
|
|
47
|
+
* - all else should be `default`
|
|
48
|
+
* @default default
|
|
49
|
+
*/
|
|
50
|
+
variant?: "default" | "expert-advice"
|
|
38
51
|
footer: React.ReactNode
|
|
39
52
|
} & OverrideClassName<Omit<HTMLAttributes<HTMLDivElement>, "title">>
|
|
40
53
|
|
|
@@ -45,6 +58,7 @@ export const GenericTile = ({
|
|
|
45
58
|
metadata,
|
|
46
59
|
information,
|
|
47
60
|
mood,
|
|
61
|
+
variant = "default",
|
|
48
62
|
footer,
|
|
49
63
|
classNameOverride,
|
|
50
64
|
...restProps
|
|
@@ -84,12 +98,7 @@ export const GenericTile = ({
|
|
|
84
98
|
className={classnames(
|
|
85
99
|
styles.face,
|
|
86
100
|
styles.faceFront,
|
|
87
|
-
mood
|
|
88
|
-
mood === "informative" && styles.faceMoodInformative,
|
|
89
|
-
mood === "cautionary" && styles.faceMoodCautionary,
|
|
90
|
-
mood === "assertive" && styles.faceMoodAssertive,
|
|
91
|
-
mood === "negative" && styles.faceMoodNegative,
|
|
92
|
-
mood === "prominent" && styles.faceMoodProminent
|
|
101
|
+
mood ? styles[mood] : styles[variant]
|
|
93
102
|
)}
|
|
94
103
|
>
|
|
95
104
|
{information && (
|
|
@@ -4,8 +4,7 @@ import {
|
|
|
4
4
|
StickerSheet,
|
|
5
5
|
StickerSheetStory,
|
|
6
6
|
} from "~storybook/components/StickerSheet"
|
|
7
|
-
import { GenericTile } from "../index"
|
|
8
|
-
import { moodsList } from "../types"
|
|
7
|
+
import { GenericTile, GenericTileProps } from "../index"
|
|
9
8
|
|
|
10
9
|
export default {
|
|
11
10
|
title: "Components/Tiles/GenericTile",
|
|
@@ -16,26 +15,65 @@ export default {
|
|
|
16
15
|
} satisfies Meta
|
|
17
16
|
|
|
18
17
|
const StickerSheetTemplate: StickerSheetStory = {
|
|
19
|
-
render: (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
render: () => {
|
|
19
|
+
const defaultProps = {
|
|
20
|
+
title: "Title",
|
|
21
|
+
metadata: "metadata",
|
|
22
|
+
information: "string",
|
|
23
|
+
footer: <>Footer</>,
|
|
24
|
+
} satisfies GenericTileProps
|
|
25
|
+
|
|
26
|
+
const variants = ["default", "expert-advice"] satisfies Array<
|
|
27
|
+
GenericTileProps["variant"]
|
|
28
|
+
>
|
|
29
|
+
|
|
30
|
+
const moods = [
|
|
31
|
+
"positive",
|
|
32
|
+
"informative",
|
|
33
|
+
"cautionary",
|
|
34
|
+
"assertive",
|
|
35
|
+
"negative",
|
|
36
|
+
"prominent",
|
|
37
|
+
] satisfies Array<GenericTileProps["mood"]>
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<>
|
|
41
|
+
<StickerSheet heading="GenericTile">
|
|
42
|
+
<StickerSheet.Body>
|
|
43
|
+
{variants.map(variant => (
|
|
44
|
+
<StickerSheet.Row key={variant} rowTitle={variant}>
|
|
45
|
+
<GenericTile {...defaultProps} variant={variant} />
|
|
46
|
+
</StickerSheet.Row>
|
|
47
|
+
))}
|
|
48
|
+
</StickerSheet.Body>
|
|
49
|
+
</StickerSheet>
|
|
50
|
+
|
|
51
|
+
<StickerSheet heading="Mood (deprecated)">
|
|
52
|
+
<StickerSheet.Body>
|
|
53
|
+
<>
|
|
54
|
+
<StickerSheet.Row rowTitle="default">
|
|
55
|
+
<GenericTile {...defaultProps} />
|
|
56
|
+
</StickerSheet.Row>
|
|
57
|
+
{moods.map(mood => (
|
|
58
|
+
<StickerSheet.Row key={mood} rowTitle={mood}>
|
|
59
|
+
<GenericTile {...defaultProps} mood={mood} />
|
|
60
|
+
</StickerSheet.Row>
|
|
61
|
+
))}
|
|
62
|
+
</>
|
|
63
|
+
</StickerSheet.Body>
|
|
64
|
+
</StickerSheet>
|
|
65
|
+
</>
|
|
66
|
+
)
|
|
67
|
+
},
|
|
36
68
|
}
|
|
37
69
|
|
|
38
70
|
export const StickerSheetDefault: StickerSheetStory = {
|
|
39
71
|
...StickerSheetTemplate,
|
|
40
72
|
name: "Sticker Sheet (Default)",
|
|
41
73
|
}
|
|
74
|
+
|
|
75
|
+
export const StickerSheetRTL: StickerSheetStory = {
|
|
76
|
+
...StickerSheetTemplate,
|
|
77
|
+
name: "Sticker Sheet (RTL)",
|
|
78
|
+
parameters: { textDirection: "rtl" },
|
|
79
|
+
}
|
|
@@ -1,69 +1,106 @@
|
|
|
1
|
-
@import "~@kaizen/design-tokens/sass/color";
|
|
2
|
-
@import "~@kaizen/design-tokens/sass/border";
|
|
3
|
-
@import "~@kaizen/design-tokens/sass/spacing";
|
|
4
|
-
|
|
5
1
|
.container {
|
|
6
|
-
|
|
7
|
-
border-
|
|
8
|
-
|
|
2
|
+
background-color: var(--background-color);
|
|
3
|
+
border-width: var(--border-width-1);
|
|
4
|
+
border-radius: var(--border-solid-border-radius);
|
|
5
|
+
border-style: var(--border-style);
|
|
6
|
+
margin-bottom: var(--spacing-24);
|
|
7
|
+
color: var(--color-purple-800);
|
|
8
|
+
border-color: var(--border-color);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.noMargin {
|
|
12
12
|
margin: 0;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
.white {
|
|
16
|
+
--background-color: var(--color-white);
|
|
17
|
+
--border-color: var(--color-gray-500);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.gray {
|
|
21
|
+
--background-color: var(--color-gray-200);
|
|
22
|
+
--border-color: var(--color-gray-500);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.blue {
|
|
26
|
+
--background-color: var(--color-blue-100);
|
|
27
|
+
--border-color: var(--color-blue-400);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.yellow {
|
|
31
|
+
--background-color: var(--color-yellow-100);
|
|
32
|
+
--border-color: var(--color-yellow-700);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.orange {
|
|
36
|
+
--background-color: var(--color-orange-100);
|
|
37
|
+
--border-color: var(--color-orange-600);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.red {
|
|
41
|
+
--background-color: var(--color-red-100);
|
|
42
|
+
--border-color: var(--color-red-500);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.green {
|
|
46
|
+
--background-color: var(--color-green-100);
|
|
47
|
+
--border-color: var(--color-green-500);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.purple {
|
|
51
|
+
--background-color: var(--color-purple-100);
|
|
52
|
+
--border-color: var(--color-purple-400);
|
|
19
53
|
}
|
|
20
54
|
|
|
21
55
|
.positive {
|
|
22
|
-
background:
|
|
23
|
-
border-color:
|
|
24
|
-
|
|
56
|
+
--background-color: var(--color-green-100);
|
|
57
|
+
--border-color: var(--color-green-500);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// These are @deprecated but must come after `color` so not everything will default to white
|
|
61
|
+
// This will be @deprecated
|
|
62
|
+
.default {
|
|
63
|
+
--background-color: var(--color-gray-200);
|
|
64
|
+
--border-color: var(--color-gray-500);
|
|
25
65
|
}
|
|
26
66
|
|
|
27
67
|
.negative {
|
|
28
|
-
background:
|
|
29
|
-
border-color:
|
|
30
|
-
color: $color-purple-800;
|
|
68
|
+
--background-color: var(--color-red-100);
|
|
69
|
+
--border-color: var(--color-red-500);
|
|
31
70
|
}
|
|
32
71
|
|
|
33
72
|
.informative {
|
|
34
|
-
background:
|
|
35
|
-
border-color:
|
|
36
|
-
color: $color-purple-800;
|
|
73
|
+
--background-color: var(--color-blue-100);
|
|
74
|
+
--border-color: var(--color-blue-400);
|
|
37
75
|
}
|
|
38
76
|
|
|
39
77
|
.cautionary {
|
|
40
|
-
background:
|
|
41
|
-
border-color:
|
|
42
|
-
color: $color-purple-800;
|
|
78
|
+
--background-color: var(--color-yellow-100);
|
|
79
|
+
--border-color: var(--color-yellow-700);
|
|
43
80
|
}
|
|
44
81
|
|
|
45
82
|
.assertive {
|
|
46
|
-
background:
|
|
47
|
-
border-color:
|
|
48
|
-
color: $color-purple-800;
|
|
83
|
+
--background-color: var(--color-orange-100);
|
|
84
|
+
--border-color: var(--color-orange-600);
|
|
49
85
|
}
|
|
50
86
|
|
|
51
87
|
.prominent {
|
|
52
|
-
background:
|
|
53
|
-
border-color:
|
|
54
|
-
color: $color-purple-800;
|
|
88
|
+
--background-color: var(--color-purple-100);
|
|
89
|
+
--border-color: var(--color-purple-400);
|
|
55
90
|
}
|
|
56
91
|
|
|
92
|
+
// @deprecated end
|
|
93
|
+
|
|
57
94
|
// Border Style Variations
|
|
58
95
|
.solid {
|
|
59
|
-
border-style:
|
|
96
|
+
--border-style: solid;
|
|
60
97
|
}
|
|
61
98
|
|
|
62
99
|
.dashed {
|
|
63
|
-
border-style:
|
|
100
|
+
--border-style: dashed;
|
|
64
101
|
}
|
|
65
102
|
|
|
66
103
|
.none {
|
|
67
|
-
border-color:
|
|
68
|
-
border-style:
|
|
104
|
+
--border-color: transparent;
|
|
105
|
+
--border-style: none;
|
|
69
106
|
}
|
package/src/Well/Well.tsx
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { OverrideClassName } from "~types/OverrideClassName"
|
|
4
|
-
import { WellBorderStyleType, WellVariantType } from "./types"
|
|
4
|
+
import { WellBorderStyleType, WellVariantType, WellColors } from "./types"
|
|
5
5
|
import styles from "./Well.module.scss"
|
|
6
6
|
|
|
7
7
|
export type WellProps = {
|
|
8
8
|
children?: React.ReactNode
|
|
9
|
+
/** @deprecated This will not fallback to `default` variant. `default` can be used but must be explicitly passed to the Well component. It is recommended to use `color` prop and `gray` value if you need a gray background. */
|
|
9
10
|
variant?: WellVariantType
|
|
11
|
+
/** @default `white` */
|
|
12
|
+
color?: WellColors
|
|
13
|
+
/** @default `solid` */
|
|
10
14
|
borderStyle?: WellBorderStyleType
|
|
11
15
|
noMargin?: boolean
|
|
12
16
|
} & OverrideClassName<HTMLAttributes<HTMLDivElement>>
|
|
@@ -17,7 +21,8 @@ export type WellProps = {
|
|
|
17
21
|
*/
|
|
18
22
|
export const Well = ({
|
|
19
23
|
children,
|
|
20
|
-
variant
|
|
24
|
+
variant,
|
|
25
|
+
color = "white",
|
|
21
26
|
borderStyle = "solid",
|
|
22
27
|
noMargin = false,
|
|
23
28
|
classNameOverride,
|
|
@@ -27,7 +32,8 @@ export const Well = ({
|
|
|
27
32
|
className={classnames(
|
|
28
33
|
styles.container,
|
|
29
34
|
styles[borderStyle],
|
|
30
|
-
styles[
|
|
35
|
+
styles[color],
|
|
36
|
+
variant && styles[variant],
|
|
31
37
|
noMargin && styles.noMargin,
|
|
32
38
|
classNameOverride
|
|
33
39
|
)}
|
package/src/Well/_docs/Well.mdx
CHANGED
|
@@ -24,11 +24,18 @@ Wells are used as a visual container around secondary content.
|
|
|
24
24
|
|
|
25
25
|
## API
|
|
26
26
|
|
|
27
|
-
###
|
|
28
|
-
|
|
27
|
+
### Color
|
|
28
|
+
|
|
29
|
+
Formerly controlled by `variant`, `color` sets the background and border color of the `Well`.
|
|
30
|
+
|
|
31
|
+
All `variant`s have a corresponding `color` value, with some minor update to ensure minimum contrast ratios are met.
|
|
32
|
+
|
|
33
|
+
<Canvas of={WellStories.Colors} />
|
|
34
|
+
|
|
29
35
|
|
|
30
36
|
### Border Styles
|
|
31
37
|
<Canvas of={WellStories.BorderStyles} />
|
|
32
38
|
|
|
33
39
|
### No Margin
|
|
34
40
|
<Canvas of={WellStories.NoMargin} />
|
|
41
|
+
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
StickerSheetStory,
|
|
7
7
|
} from "~storybook/components/StickerSheet"
|
|
8
8
|
import { Well, WellProps } from "../index"
|
|
9
|
-
import { borderStyleTypes, variantTypes } from "../types"
|
|
9
|
+
import { borderStyleTypes, wellColors, variantTypes } from "../types"
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
title: "Components/Well",
|
|
@@ -48,6 +48,15 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
48
48
|
</StickerSheet.Row>
|
|
49
49
|
))}
|
|
50
50
|
</StickerSheet.Body>
|
|
51
|
+
<StickerSheet.Body>
|
|
52
|
+
{wellColors.map(color => (
|
|
53
|
+
<StickerSheet.Row key={color} rowTitle={color}>
|
|
54
|
+
{borderStyleTypes.map(border => (
|
|
55
|
+
<WellWrapped key={border} color={color} borderStyle={border} />
|
|
56
|
+
))}
|
|
57
|
+
</StickerSheet.Row>
|
|
58
|
+
))}
|
|
59
|
+
</StickerSheet.Body>
|
|
51
60
|
</StickerSheet>
|
|
52
61
|
<StickerSheet>
|
|
53
62
|
<StickerSheet.Header headings={["Margin", "No Margin"]} />
|