@mindlogic-ai/logician-ui 5.0.0-alpha.2 → 5.0.0-alpha.20
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/README.md +1 -0
- package/dist/components/Avatar/Avatar.d.ts +68 -11
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.js +41 -5
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/Avatar.mjs +40 -5
- package/dist/components/Avatar/Avatar.mjs.map +1 -1
- package/dist/components/Avatar/index.d.ts +2 -2
- package/dist/components/Avatar/index.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.js +5 -3
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge/Badge.mjs +5 -3
- package/dist/components/Badge/Badge.mjs.map +1 -1
- package/dist/components/Badge/Badge.types.d.ts +7 -5
- package/dist/components/Badge/Badge.types.d.ts.map +1 -1
- package/dist/components/Banner/Banner.types.d.ts +24 -1
- package/dist/components/Banner/Banner.types.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.styles.d.ts +2 -2
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +31 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.mjs +31 -3
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Button/Button.types.d.ts +38 -1
- package/dist/components/Button/Button.types.d.ts.map +1 -1
- package/dist/components/Card/Card.types.d.ts +12 -0
- package/dist/components/Card/Card.types.d.ts.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.styles.d.ts +6 -5
- package/dist/components/CodeTabs/CodeTabs.styles.d.ts.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.styles.js +6 -5
- package/dist/components/CodeTabs/CodeTabs.styles.js.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.styles.mjs +6 -5
- package/dist/components/CodeTabs/CodeTabs.styles.mjs.map +1 -1
- package/dist/components/ColorMode/ColorModeToggle.d.ts +7 -2
- package/dist/components/ColorMode/ColorModeToggle.d.ts.map +1 -1
- package/dist/components/ColorMode/ColorModeToggle.js +8 -3
- package/dist/components/ColorMode/ColorModeToggle.js.map +1 -1
- package/dist/components/ColorMode/ColorModeToggle.mjs +8 -3
- package/dist/components/ColorMode/ColorModeToggle.mjs.map +1 -1
- package/dist/components/Confetti/Confetti.types.d.ts +5 -1
- package/dist/components/Confetti/Confetti.types.d.ts.map +1 -1
- package/dist/components/Confetti/confettiColors.d.ts +5 -5
- package/dist/components/Confetti/confettiColors.js +5 -5
- package/dist/components/Confetti/confettiColors.mjs +5 -5
- package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
- package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.js +2 -2
- package/dist/components/Form/FormModalFooter/FormModalFooter.js.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.mjs +2 -2
- package/dist/components/Form/FormModalFooter/FormModalFooter.mjs.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts +11 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts.map +1 -1
- package/dist/components/Form/FormSection/CollapsibleFormSection.js +1 -0
- package/dist/components/Form/FormSection/CollapsibleFormSection.js.map +1 -1
- package/dist/components/Form/FormSection/CollapsibleFormSection.mjs +1 -0
- package/dist/components/Form/FormSection/CollapsibleFormSection.mjs.map +1 -1
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.js +4 -0
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/Input.mjs +4 -0
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
- package/dist/components/LineGraph/LineGraph.js +4 -5
- package/dist/components/LineGraph/LineGraph.js.map +1 -1
- package/dist/components/LineGraph/LineGraph.mjs +5 -6
- package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
- package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
- package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
- package/dist/components/LineGraph/seriesColors.d.ts +12 -8
- package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
- package/dist/components/LineGraph/seriesColors.js +8 -7
- package/dist/components/LineGraph/seriesColors.js.map +1 -1
- package/dist/components/LineGraph/seriesColors.mjs +8 -7
- package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
- package/dist/components/Masonry/Masonry.types.d.ts +8 -3
- package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
- package/dist/components/Menu/MenuItem.types.d.ts +8 -0
- package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
- package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
- package/dist/components/Modal/ModalCloseButton.js +1 -1
- package/dist/components/Modal/ModalCloseButton.mjs +1 -1
- package/dist/components/NavList/NavList.d.ts +35 -0
- package/dist/components/NavList/NavList.d.ts.map +1 -0
- package/dist/components/NavList/NavList.js +113 -0
- package/dist/components/NavList/NavList.js.map +1 -0
- package/dist/components/NavList/NavList.mjs +111 -0
- package/dist/components/NavList/NavList.mjs.map +1 -0
- package/dist/components/NavList/NavList.styles.d.ts +90 -0
- package/dist/components/NavList/NavList.styles.d.ts.map +1 -0
- package/dist/components/NavList/NavList.styles.js +104 -0
- package/dist/components/NavList/NavList.styles.js.map +1 -0
- package/dist/components/NavList/NavList.styles.mjs +97 -0
- package/dist/components/NavList/NavList.styles.mjs.map +1 -0
- package/dist/components/NavList/NavList.translations.json.js +19 -0
- package/dist/components/NavList/NavList.translations.json.js.map +1 -0
- package/dist/components/NavList/NavList.translations.json.mjs +14 -0
- package/dist/components/NavList/NavList.translations.json.mjs.map +1 -0
- package/dist/components/NavList/NavList.types.d.ts +140 -0
- package/dist/components/NavList/NavList.types.d.ts.map +1 -0
- package/dist/components/NavList/NavListContext.d.ts +30 -0
- package/dist/components/NavList/NavListContext.d.ts.map +1 -0
- package/dist/components/NavList/NavListContext.js +16 -0
- package/dist/components/NavList/NavListContext.js.map +1 -0
- package/dist/components/NavList/NavListContext.mjs +13 -0
- package/dist/components/NavList/NavListContext.mjs.map +1 -0
- package/dist/components/NavList/NavListGroup.d.ts +31 -0
- package/dist/components/NavList/NavListGroup.d.ts.map +1 -0
- package/dist/components/NavList/NavListGroup.js +115 -0
- package/dist/components/NavList/NavListGroup.js.map +1 -0
- package/dist/components/NavList/NavListGroup.mjs +113 -0
- package/dist/components/NavList/NavListGroup.mjs.map +1 -0
- package/dist/components/NavList/NavListItem.d.ts +16 -0
- package/dist/components/NavList/NavListItem.d.ts.map +1 -0
- package/dist/components/NavList/NavListItem.js +284 -0
- package/dist/components/NavList/NavListItem.js.map +1 -0
- package/dist/components/NavList/NavListItem.mjs +282 -0
- package/dist/components/NavList/NavListItem.mjs.map +1 -0
- package/dist/components/NavList/NavListSkeleton.d.ts +17 -0
- package/dist/components/NavList/NavListSkeleton.d.ts.map +1 -0
- package/dist/components/NavList/NavListSkeleton.js +33 -0
- package/dist/components/NavList/NavListSkeleton.js.map +1 -0
- package/dist/components/NavList/NavListSkeleton.mjs +31 -0
- package/dist/components/NavList/NavListSkeleton.mjs.map +1 -0
- package/dist/components/NavList/index.d.ts +7 -0
- package/dist/components/NavList/index.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +11 -10
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +11 -10
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/Pagination.mjs +11 -10
- package/dist/components/Pagination/Pagination.mjs.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
- package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
- package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
- package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
- package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
- package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +6 -7
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.mjs +6 -7
- package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
- package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
- package/dist/components/Select/Combobox.d.ts +1 -1
- package/dist/components/Select/Combobox.d.ts.map +1 -1
- package/dist/components/Select/Combobox.js +9 -2
- package/dist/components/Select/Combobox.js.map +1 -1
- package/dist/components/Select/Combobox.mjs +10 -3
- package/dist/components/Select/Combobox.mjs.map +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +14 -2
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/Select.mjs +15 -3
- package/dist/components/Select/Select.mjs.map +1 -1
- package/dist/components/Select/Select.styles.d.ts +97 -1
- package/dist/components/Select/Select.styles.d.ts.map +1 -1
- package/dist/components/Select/Select.styles.js +83 -0
- package/dist/components/Select/Select.styles.js.map +1 -1
- package/dist/components/Select/Select.styles.mjs +82 -1
- package/dist/components/Select/Select.styles.mjs.map +1 -1
- package/dist/components/Tabs/Tab/Tab.styles.d.ts +1 -1
- package/dist/components/Tabs/Tab/Tab.styles.js +1 -1
- package/dist/components/Tabs/Tab/Tab.styles.mjs +1 -1
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.js +4 -0
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/Textarea.mjs +4 -0
- package/dist/components/Textarea/Textarea.mjs.map +1 -1
- package/dist/components/Toast/Toast.styles.d.ts +6 -2
- package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
- package/dist/components/Toast/Toast.styles.js +18 -10
- package/dist/components/Toast/Toast.styles.js.map +1 -1
- package/dist/components/Toast/Toast.styles.mjs +18 -10
- package/dist/components/Toast/Toast.styles.mjs.map +1 -1
- package/dist/components/Typography/Caption.d.ts.map +1 -1
- package/dist/components/Typography/Caption.js +1 -1
- package/dist/components/Typography/Caption.js.map +1 -1
- package/dist/components/Typography/Caption.mjs +1 -1
- package/dist/components/Typography/Caption.mjs.map +1 -1
- package/dist/components/Typography/H1.d.ts.map +1 -1
- package/dist/components/Typography/H1.js +1 -1
- package/dist/components/Typography/H1.js.map +1 -1
- package/dist/components/Typography/H1.mjs +1 -1
- package/dist/components/Typography/H1.mjs.map +1 -1
- package/dist/components/Typography/H2.d.ts.map +1 -1
- package/dist/components/Typography/H2.js +1 -1
- package/dist/components/Typography/H2.js.map +1 -1
- package/dist/components/Typography/H2.mjs +1 -1
- package/dist/components/Typography/H2.mjs.map +1 -1
- package/dist/components/Typography/H3.d.ts.map +1 -1
- package/dist/components/Typography/H3.js +1 -1
- package/dist/components/Typography/H3.js.map +1 -1
- package/dist/components/Typography/H3.mjs +1 -1
- package/dist/components/Typography/H3.mjs.map +1 -1
- package/dist/components/Typography/H4.d.ts.map +1 -1
- package/dist/components/Typography/H4.js +1 -1
- package/dist/components/Typography/H4.js.map +1 -1
- package/dist/components/Typography/H4.mjs +1 -1
- package/dist/components/Typography/H4.mjs.map +1 -1
- package/dist/components/Typography/H5.d.ts.map +1 -1
- package/dist/components/Typography/H5.js +1 -1
- package/dist/components/Typography/H5.js.map +1 -1
- package/dist/components/Typography/H5.mjs +1 -1
- package/dist/components/Typography/H5.mjs.map +1 -1
- package/dist/components/Typography/Link.d.ts.map +1 -1
- package/dist/components/Typography/Link.js +1 -1
- package/dist/components/Typography/Link.js.map +1 -1
- package/dist/components/Typography/Link.mjs +1 -1
- package/dist/components/Typography/Link.mjs.map +1 -1
- package/dist/components/Typography/Overline.d.ts.map +1 -1
- package/dist/components/Typography/Overline.js +1 -1
- package/dist/components/Typography/Overline.js.map +1 -1
- package/dist/components/Typography/Overline.mjs +1 -1
- package/dist/components/Typography/Overline.mjs.map +1 -1
- package/dist/components/Typography/Subtext.d.ts.map +1 -1
- package/dist/components/Typography/Subtext.js +1 -1
- package/dist/components/Typography/Subtext.js.map +1 -1
- package/dist/components/Typography/Subtext.mjs +1 -1
- package/dist/components/Typography/Subtext.mjs.map +1 -1
- package/dist/components/Typography/Subtitle.d.ts.map +1 -1
- package/dist/components/Typography/Subtitle.js +1 -1
- package/dist/components/Typography/Subtitle.js.map +1 -1
- package/dist/components/Typography/Subtitle.mjs +1 -1
- package/dist/components/Typography/Subtitle.mjs.map +1 -1
- package/dist/components/Typography/Text.d.ts.map +1 -1
- package/dist/components/Typography/Text.js +1 -1
- package/dist/components/Typography/Text.js.map +1 -1
- package/dist/components/Typography/Text.mjs +1 -1
- package/dist/components/Typography/Text.mjs.map +1 -1
- package/dist/hooks/useLanguage.d.ts +5 -0
- package/dist/hooks/useLanguage.d.ts.map +1 -1
- package/dist/hooks/useLanguage.js +7 -3
- package/dist/hooks/useLanguage.js.map +1 -1
- package/dist/hooks/useLanguage.mjs +7 -4
- package/dist/hooks/useLanguage.mjs.map +1 -1
- package/dist/hooks/useTranslate.d.ts.map +1 -1
- package/dist/hooks/useTranslate.js +8 -5
- package/dist/hooks/useTranslate.js.map +1 -1
- package/dist/hooks/useTranslate.mjs +8 -5
- package/dist/hooks/useTranslate.mjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/dist/theme/colors.d.ts +2 -2
- package/dist/theme/colors.d.ts.map +1 -1
- package/dist/theme/colors.js +54 -18
- package/dist/theme/colors.js.map +1 -1
- package/dist/theme/colors.mjs +55 -19
- package/dist/theme/colors.mjs.map +1 -1
- package/dist/theme/global.d.ts.map +1 -1
- package/dist/theme/global.js +19 -1
- package/dist/theme/global.js.map +1 -1
- package/dist/theme/global.mjs +19 -1
- package/dist/theme/global.mjs.map +1 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +2 -0
- package/dist/theme/index.mjs.map +1 -1
- package/dist/theme/palette.generated.d.ts +232 -123
- package/dist/theme/palette.generated.d.ts.map +1 -1
- package/dist/theme/palette.generated.js +233 -123
- package/dist/theme/palette.generated.js.map +1 -1
- package/dist/theme/palette.generated.mjs +233 -124
- package/dist/theme/palette.generated.mjs.map +1 -1
- package/dist/theme/paletteSwatches.d.ts +20 -0
- package/dist/theme/paletteSwatches.d.ts.map +1 -1
- package/dist/theme/recipes/avatar.d.ts +30 -0
- package/dist/theme/recipes/avatar.d.ts.map +1 -0
- package/dist/theme/recipes/avatar.js +96 -0
- package/dist/theme/recipes/avatar.js.map +1 -0
- package/dist/theme/recipes/avatar.mjs +94 -0
- package/dist/theme/recipes/avatar.mjs.map +1 -0
- package/dist/translations/Defaults.translations.json.js +19 -1
- package/dist/translations/Defaults.translations.json.js.map +1 -1
- package/dist/translations/Defaults.translations.json.mjs +18 -2
- package/dist/translations/Defaults.translations.json.mjs.map +1 -1
- package/dist/utils/disabledControl.d.ts +8 -1
- package/dist/utils/disabledControl.d.ts.map +1 -1
- package/dist/utils/disabledControl.js +8 -1
- package/dist/utils/disabledControl.js.map +1 -1
- package/dist/utils/disabledControl.mjs +8 -1
- package/dist/utils/disabledControl.mjs.map +1 -1
- package/dist/utils/focusRing.d.ts +22 -0
- package/dist/utils/focusRing.d.ts.map +1 -1
- package/dist/utils/focusRing.js +22 -0
- package/dist/utils/focusRing.js.map +1 -1
- package/dist/utils/focusRing.mjs +21 -1
- package/dist/utils/focusRing.mjs.map +1 -1
- package/package.json +2 -1
- package/src/components/Accordion/Accordion.stories.tsx +85 -0
- package/src/components/Accordion/Accordion.usage.mdx +200 -0
- package/src/components/Appear/Appear.usage.mdx +107 -0
- package/src/components/Avatar/Avatar.recipe.test.tsx +176 -0
- package/src/components/Avatar/Avatar.stories.tsx +199 -24
- package/src/components/Avatar/Avatar.tsx +118 -21
- package/src/components/Avatar/Avatar.usage.mdx +185 -0
- package/src/components/Avatar/index.tsx +8 -1
- package/src/components/Badge/Badge.stories.tsx +193 -3
- package/src/components/Badge/Badge.tsx +5 -3
- package/src/components/Badge/Badge.types.ts +7 -5
- package/src/components/Badge/Badge.usage.mdx +265 -0
- package/src/components/Banner/Banner.stories.tsx +152 -2
- package/src/components/Banner/Banner.types.ts +30 -1
- package/src/components/Banner/Banner.usage.mdx +233 -0
- package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
- package/src/components/BottomSheet/BottomSheet.test.tsx +2 -1
- package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
- package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
- package/src/components/Button/Button.focusableWhenDisabled.test.tsx +218 -0
- package/src/components/Button/Button.stories.tsx +332 -3
- package/src/components/Button/Button.tsx +46 -3
- package/src/components/Button/Button.types.ts +38 -1
- package/src/components/Button/Button.usage.mdx +358 -0
- package/src/components/Button/Button.variants.test.tsx +13 -1
- package/src/components/Card/Card.stories.tsx +106 -0
- package/src/components/Card/Card.types.ts +12 -0
- package/src/components/Card/Card.usage.mdx +216 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
- package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
- package/src/components/Chip/Chip.usage.mdx +78 -0
- package/src/components/Code/Code.stories.tsx +60 -0
- package/src/components/Code/Code.usage.mdx +187 -0
- package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
- package/src/components/CodeTabs/CodeTabs.styles.ts +6 -5
- package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
- package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
- package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
- package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
- package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
- package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
- package/src/components/Confetti/Confetti.types.ts +5 -1
- package/src/components/Confetti/Confetti.usage.mdx +111 -0
- package/src/components/Confetti/confettiColors.ts +5 -5
- package/src/components/Container/Container.stories.tsx +32 -0
- package/src/components/Container/Container.usage.mdx +130 -0
- package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
- package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
- package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
- package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
- package/src/components/CountUp/CountUp.usage.mdx +107 -0
- package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
- package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
- package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
- package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
- package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
- package/src/components/ExpandableText/ExpandableText.usage.mdx +176 -0
- package/src/components/FileInput/FileInput.stories.tsx +38 -1
- package/src/components/FileInput/FileInput.usage.mdx +178 -0
- package/src/components/FileItem/FileItem.stories.tsx +71 -0
- package/src/components/FileItem/FileItem.usage.mdx +180 -0
- package/src/components/FileList/FileList.stories.tsx +25 -0
- package/src/components/FileList/FileList.usage.mdx +165 -0
- package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
- package/src/components/Form/Form.stories.tsx +149 -0
- package/src/components/Form/Form.usage.mdx +203 -0
- package/src/components/Form/FormModalFooter/FormModalFooter.stories.tsx +1 -1
- package/src/components/Form/FormModalFooter/FormModalFooter.test.tsx +19 -1
- package/src/components/Form/FormModalFooter/FormModalFooter.tsx +2 -0
- package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +11 -1
- package/src/components/FormControl/FormControl.stories.tsx +35 -0
- package/src/components/FormControl/FormControl.usage.mdx +128 -0
- package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
- package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
- package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
- package/src/components/Icon/Icon.stories.tsx +61 -1
- package/src/components/Icon/Icon.usage.mdx +158 -0
- package/src/components/IconButton/IconButton.stories.tsx +213 -5
- package/src/components/IconButton/IconButton.usage.mdx +275 -0
- package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
- package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
- package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
- package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
- package/src/components/Input/Input.stories.tsx +180 -0
- package/src/components/Input/Input.tsx +4 -0
- package/src/components/Input/Input.usage.mdx +278 -0
- package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
- package/src/components/LineGraph/LineGraph.tsx +4 -5
- package/src/components/LineGraph/LineGraph.types.ts +12 -2
- package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
- package/src/components/LineGraph/seriesColors.test.ts +10 -9
- package/src/components/LineGraph/seriesColors.ts +18 -16
- package/src/components/Loaders/Loaders.stories.tsx +93 -0
- package/src/components/Loaders/Loaders.usage.mdx +180 -0
- package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
- package/src/components/Markdown/Markdown.stories.tsx +53 -0
- package/src/components/Markdown/Markdown.usage.mdx +182 -0
- package/src/components/Masonry/Masonry.stories.tsx +63 -1
- package/src/components/Masonry/Masonry.types.ts +8 -3
- package/src/components/Masonry/Masonry.usage.mdx +142 -0
- package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
- package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
- package/src/components/Menu/Menu.stories.tsx +146 -2
- package/src/components/Menu/Menu.usage.mdx +238 -0
- package/src/components/Menu/MenuItem.types.ts +8 -0
- package/src/components/Modal/Modal.stories.tsx +177 -1
- package/src/components/Modal/Modal.usage.mdx +262 -0
- package/src/components/Modal/ModalCloseButton.tsx +1 -1
- package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
- package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
- package/src/components/NavList/NavList.stories.tsx +927 -0
- package/src/components/NavList/NavList.styles.ts +114 -0
- package/src/components/NavList/NavList.test.tsx +1306 -0
- package/src/components/NavList/NavList.translations.json +9 -0
- package/src/components/NavList/NavList.tsx +160 -0
- package/src/components/NavList/NavList.types.ts +155 -0
- package/src/components/NavList/NavList.usage.mdx +545 -0
- package/src/components/NavList/NavListContext.ts +25 -0
- package/src/components/NavList/NavListGroup.tsx +243 -0
- package/src/components/NavList/NavListItem.tsx +543 -0
- package/src/components/NavList/NavListSkeleton.tsx +57 -0
- package/src/components/NavList/index.ts +15 -0
- package/src/components/Pagination/Pagination.stories.tsx +90 -1
- package/src/components/Pagination/Pagination.tsx +11 -10
- package/src/components/Pagination/Pagination.usage.mdx +186 -0
- package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
- package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
- package/src/components/PinInput/PinInput.stories.tsx +91 -0
- package/src/components/PinInput/PinInput.usage.mdx +194 -0
- package/src/components/Popover/Popover.stories.tsx +104 -1
- package/src/components/Popover/Popover.usage.mdx +197 -0
- package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
- package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
- package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
- package/src/components/Pulse/Pulse.usage.mdx +102 -0
- package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
- package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
- package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
- package/src/components/Radio/Radio.stories.tsx +119 -0
- package/src/components/Radio/Radio.usage.mdx +187 -0
- package/src/components/Reveal/Reveal.usage.mdx +105 -0
- package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
- package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
- package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
- package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +6 -7
- package/src/components/SegmentedControl/SegmentedControl.usage.mdx +209 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
- package/src/components/Select/Combobox.tsx +28 -3
- package/src/components/Select/Select.clearTrigger.test.tsx +76 -0
- package/src/components/Select/Select.stories.tsx +290 -1
- package/src/components/Select/Select.styles.ts +89 -0
- package/src/components/Select/Select.tsx +28 -2
- package/src/components/Select/Select.usage.mdx +341 -0
- package/src/components/Shake/Shake.usage.mdx +107 -0
- package/src/components/Slider/Slider.stories.tsx +116 -0
- package/src/components/Slider/Slider.usage.mdx +179 -0
- package/src/components/Spinner/Spinner.stories.tsx +64 -0
- package/src/components/Spinner/Spinner.usage.mdx +136 -0
- package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
- package/src/components/Switch/Switch.stories.tsx +131 -6
- package/src/components/Switch/Switch.usage.mdx +199 -0
- package/src/components/Table/Table.stories.tsx +159 -1
- package/src/components/Table/Table.usage.mdx +235 -0
- package/src/components/Tabs/Tab/Tab.styles.ts +1 -1
- package/src/components/Tabs/Tabs.stories.tsx +86 -0
- package/src/components/Tabs/Tabs.usage.mdx +263 -0
- package/src/components/Tag/Tag.stories.tsx +181 -4
- package/src/components/Tag/Tag.usage.mdx +257 -0
- package/src/components/Textarea/Textarea.stories.tsx +113 -0
- package/src/components/Textarea/Textarea.tsx +4 -0
- package/src/components/Textarea/Textarea.usage.mdx +186 -0
- package/src/components/Toast/Toast.stories.tsx +185 -3
- package/src/components/Toast/Toast.styles.ts +18 -10
- package/src/components/Toast/Toast.usage.mdx +265 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
- package/src/components/Tooltip/Tooltip.usage.mdx +219 -0
- package/src/components/Tree/Tree.stories.tsx +89 -0
- package/src/components/Tree/Tree.usage.mdx +207 -0
- package/src/components/Typography/Caption.tsx +0 -1
- package/src/components/Typography/H1.tsx +0 -1
- package/src/components/Typography/H2.tsx +0 -1
- package/src/components/Typography/H3.tsx +0 -1
- package/src/components/Typography/H4.tsx +0 -1
- package/src/components/Typography/H5.tsx +0 -1
- package/src/components/Typography/Link.tsx +0 -1
- package/src/components/Typography/Overline.tsx +0 -1
- package/src/components/Typography/Subtext.tsx +0 -1
- package/src/components/Typography/Subtitle.tsx +0 -1
- package/src/components/Typography/Text.tsx +0 -1
- package/src/components/Typography/Typography.stories.tsx +117 -0
- package/src/components/Typography/Typography.usage.mdx +257 -0
- package/src/components/Workflow/Workflow.usage.mdx +199 -0
- package/src/components/a11y.kwcag.test.tsx +66 -0
- package/src/components/claude.md +1 -1
- package/src/components/noRawScales.test.ts +5 -1
- package/src/foundations/BrandAssets.mdx +637 -0
- package/src/foundations/BrandAssets.stories.tsx +680 -0
- package/src/foundations/BrandColour.mdx +366 -0
- package/src/foundations/BrandColour.stories.tsx +343 -0
- package/src/guidelines/ComponentPageTemplate.mdx +84 -0
- package/src/guidelines/FeedbackActions.mdx +162 -23
- package/src/guidelines/_components/Lang.tsx +175 -0
- package/src/guidelines/_components/TokenTable.tsx +136 -0
- package/src/hooks/useLanguage.ts +8 -3
- package/src/hooks/useTranslate.test.tsx +46 -0
- package/src/hooks/useTranslate.ts +7 -5
- package/src/index.ts +7 -1
- package/src/theme/BazePalette.stories.tsx +111 -1
- package/src/theme/Palette.stories.tsx +2 -2
- package/src/theme/SemanticTokens.mdx +76 -17
- package/src/theme/claude.md +23 -9
- package/src/theme/colors.ts +71 -18
- package/src/theme/contrast.test.ts +57 -0
- package/src/theme/global.ts +20 -1
- package/src/theme/index.ts +2 -0
- package/src/theme/palette.generated.ts +233 -123
- package/src/theme/paletteSwatches.test.ts +1 -1
- package/src/theme/paletteSwatches.ts +35 -0
- package/src/theme/recipes/avatar.ts +92 -0
- package/src/translations/Defaults.translations.json +14 -0
- package/src/utils/disabledControl.ts +8 -1
- package/src/utils/focusRing.ts +23 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as ChipStories from './Chip.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={ChipStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# Chip (deprecated)
|
|
13
|
+
|
|
14
|
+
**Use `Tag`.** Since 5.0 `Chip` is a thin alias of `Tag` and it is removed in
|
|
15
|
+
6.0. It still renders so that unmigrated screens do not break, keeps the 4.x
|
|
16
|
+
pill shape so they do not shift, and warns once per `colorScheme` × `variant`
|
|
17
|
+
pair in development.
|
|
18
|
+
|
|
19
|
+
Everything about when and how to use it is on **Components/Tag/Usage**.
|
|
20
|
+
|
|
21
|
+
## Migrating
|
|
22
|
+
|
|
23
|
+
| 4.x `colorScheme` | 4.x `variant` | Renders as | Write instead |
|
|
24
|
+
| --- | --- | --- | --- |
|
|
25
|
+
| `primary` (default), `secondary`, `neutral` | `soft` (default) or `outline` | neutral | `<Tag>` |
|
|
26
|
+
| `primary`, `secondary`, `neutral` | `solid` | the selected look | `<Tag as="button" selected={…}>` for a filter chip |
|
|
27
|
+
| `danger`, `success`, `warning` | `soft` | that tone | `<Tag tone="…">`, or `Badge` if it is a status |
|
|
28
|
+
| `danger`, `success`, `warning` | `solid` | that tone (5.0 has no solid status fill) | Choose by hand |
|
|
29
|
+
| `danger`, `success`, `warning` | `outline` | neutral | Choose by hand |
|
|
30
|
+
|
|
31
|
+
"Choose by hand" pairs say so in the dev warning. A `solid` Chip gets the
|
|
32
|
+
selected *look* only: it does not become a toggle and has no `aria-pressed`
|
|
33
|
+
unless you pass `selected` yourself.
|
|
34
|
+
|
|
35
|
+
Two things change when you swap `Chip` for `Tag`:
|
|
36
|
+
|
|
37
|
+
- **Shape.** Tag uses the `md` radius and tighter padding. Chip's 32px pill
|
|
38
|
+
exists only for unmigrated screens.
|
|
39
|
+
- **Interactivity.** If the chip was clickable, render the Tag `as="button"`
|
|
40
|
+
so it is keyboard-operable (WCAG 2.1.1).
|
|
41
|
+
|
|
42
|
+
</En>
|
|
43
|
+
|
|
44
|
+
<Ko>
|
|
45
|
+
|
|
46
|
+
# Chip (지원 중단)
|
|
47
|
+
|
|
48
|
+
**`Tag`를 씁니다.** 5.0부터 `Chip`은 `Tag`의 얇은 별칭이며 6.0에서 사라집니다.
|
|
49
|
+
아직 옮기지 않은 화면이 깨지지 않도록 계속 그려지고, 화면이 밀리지 않도록 4.x의
|
|
50
|
+
알약 모양을 유지하며, 개발 환경에서 `colorScheme` × `variant` 조합마다 한 번씩 경고를
|
|
51
|
+
냅니다.
|
|
52
|
+
|
|
53
|
+
언제, 어떻게 쓰는지는 모두 **Components/Tag/Usage**에 있습니다.
|
|
54
|
+
|
|
55
|
+
## 옮기는 방법
|
|
56
|
+
|
|
57
|
+
| 4.x `colorScheme` | 4.x `variant` | 지금 그려지는 모양 | 바꿔 쓸 코드 |
|
|
58
|
+
| --- | --- | --- | --- |
|
|
59
|
+
| `primary`(기본), `secondary`, `neutral` | `soft`(기본) 또는 `outline` | neutral | `<Tag>` |
|
|
60
|
+
| `primary`, `secondary`, `neutral` | `solid` | 선택된 모양 | 필터 칩이라면 `<Tag as="button" selected={…}>` |
|
|
61
|
+
| `danger`, `success`, `warning` | `soft` | 해당 tone | `<Tag tone="…">`, 상태라면 `Badge` |
|
|
62
|
+
| `danger`, `success`, `warning` | `solid` | 해당 tone(5.0에는 진한 상태 바탕이 없음) | 직접 고릅니다 |
|
|
63
|
+
| `danger`, `success`, `warning` | `outline` | neutral | 직접 고릅니다 |
|
|
64
|
+
|
|
65
|
+
"직접 고릅니다"에 해당하는 조합은 개발 경고에도 그렇게 나옵니다. `solid` Chip은
|
|
66
|
+
선택된 *모양*만 얻습니다. `selected`를 직접 넘기지 않는 한 토글이 되지 않고
|
|
67
|
+
`aria-pressed`도 붙지 않습니다.
|
|
68
|
+
|
|
69
|
+
`Chip`을 `Tag`로 바꾸면 두 가지가 달라집니다.
|
|
70
|
+
|
|
71
|
+
- **모양.** Tag는 `md` 모서리와 더 좁은 여백을 씁니다. Chip의 32px 알약 모양은 아직
|
|
72
|
+
옮기지 않은 화면을 위해서만 남아 있습니다.
|
|
73
|
+
- **누를 수 있는지.** 누를 수 있던 칩이라면 Tag를 `as="button"`으로 그려야 키보드로도
|
|
74
|
+
쓸 수 있습니다(WCAG 2.1.1).
|
|
75
|
+
|
|
76
|
+
</Ko>
|
|
77
|
+
|
|
78
|
+
<Canvas of={ChipStories.LegacyMapping} />
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
|
|
3
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
4
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
5
|
+
import { Text } from '../Typography';
|
|
3
6
|
import { Code } from './Code';
|
|
4
7
|
import { BUNDLED_LANGUAGES } from './shikiAdapter';
|
|
5
8
|
|
|
@@ -211,3 +214,60 @@ export const CustomContainer: Story = {
|
|
|
211
214
|
};`,
|
|
212
215
|
},
|
|
213
216
|
};
|
|
217
|
+
|
|
218
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
219
|
+
// Pulled into `Code.usage.mdx` with <Canvas of={…} />. Hidden from the
|
|
220
|
+
// sidebar (`!dev`); `tags` is written out on each story because the indexer
|
|
221
|
+
// reads CSF statically.
|
|
222
|
+
|
|
223
|
+
export const DoLanguageAndCopy: Story = {
|
|
224
|
+
tags: ['!dev'],
|
|
225
|
+
parameters: { layout: 'padded' },
|
|
226
|
+
name: 'Usage / Do: a language and a copy button for a snippet',
|
|
227
|
+
args: {
|
|
228
|
+
language: 'bash',
|
|
229
|
+
onCopy: () => {},
|
|
230
|
+
children: `curl https://api.example.com/v1/chat/completions \\
|
|
231
|
+
-H "Authorization: Bearer $API_KEY" \\
|
|
232
|
+
-d '{"model": "gpt-4o", "messages": [{"role": "user", "content": "안녕"}]}'`,
|
|
233
|
+
},
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
export const DontBlockForIdentifier: Story = {
|
|
237
|
+
tags: ['!dev'],
|
|
238
|
+
parameters: { layout: 'padded' },
|
|
239
|
+
name: "Usage / Don't: a block for one word in a sentence",
|
|
240
|
+
render: () => (
|
|
241
|
+
<>
|
|
242
|
+
<Text mb={2}>요청 본문의 모델 이름 칸에는</Text>
|
|
243
|
+
<Code>model</Code>
|
|
244
|
+
<Text mt={2}>을 넣습니다.</Text>
|
|
245
|
+
</>
|
|
246
|
+
),
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
export const UsageTokens: Story = {
|
|
250
|
+
tags: ['!dev'],
|
|
251
|
+
parameters: { layout: 'padded' },
|
|
252
|
+
name: 'Usage / Tokens',
|
|
253
|
+
render: () => (
|
|
254
|
+
<TokenTable
|
|
255
|
+
rows={[
|
|
256
|
+
{ token: 'border.default', use: <T en="Border" ko="테두리" /> },
|
|
257
|
+
{
|
|
258
|
+
token: 'bg.surface',
|
|
259
|
+
use: <T en="Header background" ko="머리 영역 배경" />,
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
token: 'fg.default',
|
|
263
|
+
use: <T en="Language title" ko="언어 이름" />,
|
|
264
|
+
},
|
|
265
|
+
{ token: 'fg.muted', use: <T en="Copy icon" ko="복사 아이콘" /> },
|
|
266
|
+
{
|
|
267
|
+
token: 'success.fg',
|
|
268
|
+
use: <T en="Copied check" ko="복사 완료 표시" />,
|
|
269
|
+
},
|
|
270
|
+
]}
|
|
271
|
+
/>
|
|
272
|
+
),
|
|
273
|
+
};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as CodeStories from './Code.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={CodeStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# Code
|
|
13
|
+
|
|
14
|
+
A syntax-highlighted block of code (Shiki, `github-dark` token colours) with
|
|
15
|
+
an optional language header and copy button. `Markdown` uses it for fenced
|
|
16
|
+
code blocks.
|
|
17
|
+
|
|
18
|
+
## When to use
|
|
19
|
+
|
|
20
|
+
- A snippet the reader reads or copies: an API request, a config file, raw
|
|
21
|
+
JSON from an audit event.
|
|
22
|
+
- More than one line, or a line too long to sit inside a sentence.
|
|
23
|
+
|
|
24
|
+
## When not to use
|
|
25
|
+
|
|
26
|
+
- A name or value inside a sentence → `InlineCode`.
|
|
27
|
+
- A single line the user only needs to copy (an endpoint, a key) →
|
|
28
|
+
`CopyableCode`.
|
|
29
|
+
- The same example in several languages → `CodeTabs`.
|
|
30
|
+
|
|
31
|
+
## Options
|
|
32
|
+
|
|
33
|
+
| Prop | Means |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `language` | Highlighting language (`js` is read as `javascript`). With a language, the header shows its name. |
|
|
36
|
+
| `onCopy` | Turns the copy button on. The component writes to the clipboard; `onCopy` receives the copied text for side effects. |
|
|
37
|
+
| `hideHeader` | No header. If `onCopy` is set, the copy button floats in the top-right corner with a 복사 / 복사 완료 tooltip. |
|
|
38
|
+
| `showLineNumbers` | Line numbers in the gutter. |
|
|
39
|
+
| `containerProps` | Props for the CodeBlock root (margins, `maxH`, `className`). |
|
|
40
|
+
|
|
41
|
+
Without `language`, there is no header, and without `onCopy`, no copy button.
|
|
42
|
+
|
|
43
|
+
## Do / Don't
|
|
44
|
+
|
|
45
|
+
</En>
|
|
46
|
+
|
|
47
|
+
<Ko>
|
|
48
|
+
|
|
49
|
+
# Code
|
|
50
|
+
|
|
51
|
+
문법 강조(Shiki, `github-dark` 색)가 적용된 코드 블록입니다. 언어 이름이 있는 머리
|
|
52
|
+
영역과 복사 버튼을 켤 수 있습니다. `Markdown`의 코드 블록도 이 컴포넌트로 그립니다.
|
|
53
|
+
|
|
54
|
+
## 언제 쓰나요
|
|
55
|
+
|
|
56
|
+
- 읽거나 복사할 코드 조각: API 요청, 설정 파일, 감사 로그 이벤트의 원본 JSON.
|
|
57
|
+
- 두 줄 이상이거나, 문장 안에 넣기에는 너무 긴 한 줄.
|
|
58
|
+
|
|
59
|
+
## 언제 쓰지 않나요
|
|
60
|
+
|
|
61
|
+
- 문장 안의 이름이나 값은 `InlineCode`를 씁니다.
|
|
62
|
+
- 복사만 하면 되는 한 줄(엔드포인트, 키)은 `CopyableCode`를 씁니다.
|
|
63
|
+
- 같은 예제를 여러 언어로 보여 준다면 `CodeTabs`를 씁니다.
|
|
64
|
+
|
|
65
|
+
## 옵션
|
|
66
|
+
|
|
67
|
+
| 속성 | 뜻 |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| `language` | 강조할 언어(`js`는 `javascript`로 읽음). 언어를 주면 머리 영역에 언어 이름이 나옵니다. |
|
|
70
|
+
| `onCopy` | 복사 버튼을 켭니다. 클립보드에는 컴포넌트가 직접 쓰고, `onCopy`는 복사한 글을 받아 부가 작업에 씁니다. |
|
|
71
|
+
| `hideHeader` | 머리 영역을 숨깁니다. `onCopy`가 있으면 복사 버튼이 오른쪽 위에 떠 있고 '복사' / '복사 완료' 툴팁이 붙습니다. |
|
|
72
|
+
| `showLineNumbers` | 줄 번호를 보여 줍니다. |
|
|
73
|
+
| `containerProps` | CodeBlock 루트에 넘길 속성(여백, `maxH`, `className`). |
|
|
74
|
+
|
|
75
|
+
`language`가 없으면 머리 영역이 없고, `onCopy`가 없으면 복사 버튼도 없습니다.
|
|
76
|
+
|
|
77
|
+
## 이렇게 하세요 / 이렇게 하지 마세요
|
|
78
|
+
|
|
79
|
+
</Ko>
|
|
80
|
+
|
|
81
|
+
<Canvas of={CodeStories.DoLanguageAndCopy} />
|
|
82
|
+
<Verdict
|
|
83
|
+
kind="do"
|
|
84
|
+
en="Set the language and turn on copy for anything the reader will paste into a terminal or file."
|
|
85
|
+
ko="터미널이나 파일에 붙여 넣을 코드에는 언어를 지정하고 복사 버튼을 켭니다."
|
|
86
|
+
/>
|
|
87
|
+
|
|
88
|
+
<Canvas of={CodeStories.DontBlockForIdentifier} />
|
|
89
|
+
<Verdict
|
|
90
|
+
kind="dont"
|
|
91
|
+
en="Break a sentence with a block for one word. Use InlineCode inside the sentence."
|
|
92
|
+
ko="한 단어 때문에 블록으로 문장을 끊지 마세요. 문장 안에 InlineCode를 씁니다."
|
|
93
|
+
/>
|
|
94
|
+
|
|
95
|
+
<En>
|
|
96
|
+
|
|
97
|
+
## Content
|
|
98
|
+
|
|
99
|
+
- Show code that runs as pasted. Mark placeholders clearly (`$API_KEY`,
|
|
100
|
+
`<chatbot_id>`) and never show a real secret.
|
|
101
|
+
- Keep examples short; link to full documentation for the rest.
|
|
102
|
+
- Explain the code in the text around it, not in long comments inside it.
|
|
103
|
+
|
|
104
|
+
## Accessibility
|
|
105
|
+
|
|
106
|
+
What Code does for you:
|
|
107
|
+
|
|
108
|
+
- The code is text, so it can be selected, copied and read by a screen
|
|
109
|
+
reader.
|
|
110
|
+
- The copy buttons are real buttons with names. The floating copy button
|
|
111
|
+
takes its name from the translated 복사 / 복사 완료 and has a focus ring
|
|
112
|
+
(WCAG 4.1.2, 2.4.7).
|
|
113
|
+
|
|
114
|
+
What you still have to do:
|
|
115
|
+
|
|
116
|
+
- The header copy button's name is the fixed English "Copy code". In a
|
|
117
|
+
Korean screen, consider `hideHeader` with `onCopy` (translated name), or
|
|
118
|
+
note it for a follow-up fix.
|
|
119
|
+
- Introduce the block in the text before it, so a screen reader user knows
|
|
120
|
+
what the code is for (WCAG 1.3.1).
|
|
121
|
+
- A long line scrolls sideways inside the block. Keep it readable at 320px
|
|
122
|
+
width by breaking long commands (WCAG 1.4.10).
|
|
123
|
+
|
|
124
|
+
## Tokens
|
|
125
|
+
|
|
126
|
+
Shiki's `github-dark` paints the code itself; these are the tokens the
|
|
127
|
+
component sets around it.
|
|
128
|
+
|
|
129
|
+
</En>
|
|
130
|
+
|
|
131
|
+
<Ko>
|
|
132
|
+
|
|
133
|
+
## 문구
|
|
134
|
+
|
|
135
|
+
- 붙여 넣으면 바로 동작하는 코드를 보여 줍니다. 바꿔 넣을 자리는 `$API_KEY`,
|
|
136
|
+
`<chatbot_id>`처럼 분명히 표시하고, 실제 비밀 값은 보여 주지 않습니다.
|
|
137
|
+
- 예제는 짧게 두고, 나머지는 전체 문서로 연결합니다.
|
|
138
|
+
- 설명은 코드 안의 긴 주석이 아니라 코드 앞뒤의 본문에 씁니다.
|
|
139
|
+
|
|
140
|
+
## 접근성
|
|
141
|
+
|
|
142
|
+
Code가 알아서 하는 일
|
|
143
|
+
|
|
144
|
+
- 코드는 글자이므로 선택하고 복사할 수 있고 화면 낭독기도 읽습니다.
|
|
145
|
+
- 복사 버튼은 이름이 있는 실제 버튼입니다. 떠 있는 복사 버튼은 번역된 '복사' /
|
|
146
|
+
'복사 완료'를 이름으로 쓰고 초점 링이 있습니다(WCAG 4.1.2, 2.4.7).
|
|
147
|
+
|
|
148
|
+
직접 챙겨야 하는 일
|
|
149
|
+
|
|
150
|
+
- 머리 영역의 복사 버튼 이름은 영어 "Copy code"로 고정되어 있습니다. 한국어 화면에서는
|
|
151
|
+
`hideHeader`와 `onCopy`를 함께 써서 번역된 이름을 쓰는 방법을 검토하거나, 후속 수정
|
|
152
|
+
거리로 남깁니다.
|
|
153
|
+
- 블록 앞 본문에서 이 코드가 무엇인지 먼저 알려, 화면 낭독기 사용자도 코드의 쓰임을
|
|
154
|
+
알 수 있게 합니다(WCAG 1.3.1).
|
|
155
|
+
- 긴 줄은 블록 안에서 가로로 스크롤됩니다. 긴 명령은 줄을 나눠 폭 320px에서도 읽을
|
|
156
|
+
수 있게 합니다(WCAG 1.4.10).
|
|
157
|
+
|
|
158
|
+
## 토큰
|
|
159
|
+
|
|
160
|
+
코드 자체의 색은 Shiki의 `github-dark`가 칠합니다. 아래는 컴포넌트가 그 둘레에 쓰는
|
|
161
|
+
토큰입니다.
|
|
162
|
+
|
|
163
|
+
</Ko>
|
|
164
|
+
|
|
165
|
+
<Canvas of={CodeStories.UsageTokens} sourceState="none" />
|
|
166
|
+
|
|
167
|
+
<En>
|
|
168
|
+
|
|
169
|
+
## Related
|
|
170
|
+
|
|
171
|
+
- **InlineCode**: code inside a sentence.
|
|
172
|
+
- **CopyableCode**: one line with a copy button.
|
|
173
|
+
- **CodeTabs**: the same example in several languages.
|
|
174
|
+
- **Markdown**: renders fenced code blocks with Code.
|
|
175
|
+
|
|
176
|
+
</En>
|
|
177
|
+
|
|
178
|
+
<Ko>
|
|
179
|
+
|
|
180
|
+
## 관련 컴포넌트
|
|
181
|
+
|
|
182
|
+
- **InlineCode**: 문장 안의 코드.
|
|
183
|
+
- **CopyableCode**: 복사 버튼이 달린 한 줄.
|
|
184
|
+
- **CodeTabs**: 같은 예제를 여러 언어로.
|
|
185
|
+
- **Markdown**: 코드 블록을 Code로 그립니다.
|
|
186
|
+
|
|
187
|
+
</Ko>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
|
|
3
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
4
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
3
5
|
import { CodeTabs } from './CodeTabs';
|
|
6
|
+
import { CODE_CHROME } from './CodeTabs.styles';
|
|
4
7
|
|
|
5
8
|
const meta = {
|
|
6
9
|
title: 'Components/CodeTabs',
|
|
@@ -50,3 +53,53 @@ export const WithCopyFunction: Story = {
|
|
|
50
53
|
},
|
|
51
54
|
},
|
|
52
55
|
};
|
|
56
|
+
|
|
57
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
58
|
+
// Pulled into `CodeTabs.usage.mdx` with <Canvas of={…} />. Hidden from the
|
|
59
|
+
// sidebar (`!dev`); `tags` is written out on each story because the indexer
|
|
60
|
+
// reads CSF statically.
|
|
61
|
+
|
|
62
|
+
export const DoSameCallPerLanguage: Story = {
|
|
63
|
+
tags: ['!dev'],
|
|
64
|
+
name: 'Usage / Do: one call, one tab per language',
|
|
65
|
+
args: { code: CODE_SAMPLES, onCopy: () => {} },
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const DontStepsAsTabs: Story = {
|
|
69
|
+
tags: ['!dev'],
|
|
70
|
+
name: "Usage / Don't: different steps behind language tabs",
|
|
71
|
+
args: {
|
|
72
|
+
code: {
|
|
73
|
+
bash: 'npm install openai',
|
|
74
|
+
javascript: "const client = new OpenAI({ apiKey: process.env.API_KEY });",
|
|
75
|
+
json: '{ "model": "gpt-4o", "stream": true }',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const CHROME_USE = {
|
|
81
|
+
bg: { en: 'Surface (tab bar and code)', ko: '바탕(탭 막대와 코드)' },
|
|
82
|
+
bgHover: { en: 'Tab and copy hover', ko: '탭과 복사 버튼 호버' },
|
|
83
|
+
bgActive: { en: 'Copy pressed', ko: '복사 버튼 누름' },
|
|
84
|
+
fg: {
|
|
85
|
+
en: 'Selected tab; unselected at 70%, divider at 15%',
|
|
86
|
+
ko: '선택된 탭. 선택 안 된 탭은 70%, 구분선은 15%',
|
|
87
|
+
},
|
|
88
|
+
} as const;
|
|
89
|
+
|
|
90
|
+
/** Read from `CODE_CHROME` in `CodeTabs.styles.ts`; alpha variants folded in. */
|
|
91
|
+
export const UsageTokens: Story = {
|
|
92
|
+
tags: ['!dev'],
|
|
93
|
+
name: 'Usage / Tokens',
|
|
94
|
+
args: { code: CODE_SAMPLES },
|
|
95
|
+
render: () => (
|
|
96
|
+
<TokenTable
|
|
97
|
+
rows={(Object.keys(CHROME_USE) as (keyof typeof CHROME_USE)[]).map(
|
|
98
|
+
(role) => ({
|
|
99
|
+
token: CODE_CHROME[role],
|
|
100
|
+
use: <T {...CHROME_USE[role]} />,
|
|
101
|
+
})
|
|
102
|
+
)}
|
|
103
|
+
/>
|
|
104
|
+
),
|
|
105
|
+
};
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
* The code is highlighted with Shiki's `github-dark`, whose token colours are
|
|
5
5
|
* written for a dark ground in BOTH app modes, so the surface must stay dark in
|
|
6
6
|
* both too. `bg.inverse` does not: it is `tooltip.bg`, near-black in light but
|
|
7
|
-
* light
|
|
7
|
+
* a light warm grey in dark, and the `fg.muted` text on it flipped as well (~1.4:1 in
|
|
8
8
|
* light, ~1.1:1 in dark).
|
|
9
9
|
*
|
|
10
10
|
* `action.*` is the one role pair that is dark in every mode (BAZE ink:
|
|
11
|
-
* #252525 light / #
|
|
11
|
+
* #252525 light / #2E2F2F dark, `action.fg` 10.8–13.4:1 on it, high contrast
|
|
12
12
|
* included), so the chrome reads it. The unselected label is `action.fg` at
|
|
13
|
-
*
|
|
14
|
-
* all four modes.
|
|
13
|
+
* 80% — ≥ 7.4:1 on `action.bg` and ≥ 6.7:1 on `action.bgHover`, both schemes,
|
|
14
|
+
* all four modes. (70% fell to 6.1:1 once dark `action.fg` became the
|
|
15
|
+
* off-white body text instead of pure white.)
|
|
15
16
|
*
|
|
16
17
|
* Borrowed rather than owned: `action.*` is the Run button's role. A dedicated
|
|
17
18
|
* `code.*` role family (bg / fg / fgMuted / bgHover) would be the clean home.
|
|
@@ -21,6 +22,6 @@ export const CODE_CHROME = {
|
|
|
21
22
|
bgHover: 'action.bgHover',
|
|
22
23
|
bgActive: 'action.bgActive',
|
|
23
24
|
fg: 'action.fg',
|
|
24
|
-
fgMuted: 'action.fg/
|
|
25
|
+
fgMuted: 'action.fg/80',
|
|
25
26
|
divider: 'action.fg/15',
|
|
26
27
|
} as const;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as CodeTabsStories from './CodeTabs.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={CodeTabsStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# CodeTabs
|
|
13
|
+
|
|
14
|
+
One example shown in several languages, one tab per language, with an
|
|
15
|
+
optional copy button for the tab that is showing. FactChat uses it for the
|
|
16
|
+
API access snippet in a chatbot's share settings.
|
|
17
|
+
|
|
18
|
+
## When to use
|
|
19
|
+
|
|
20
|
+
- The same call written in two or more languages (cURL, Python,
|
|
21
|
+
JavaScript), where the reader needs only one of them.
|
|
22
|
+
|
|
23
|
+
## When not to use
|
|
24
|
+
|
|
25
|
+
- One snippet → `Code`.
|
|
26
|
+
- Steps the reader needs in order (install, configure, run) → one `Code`
|
|
27
|
+
block per step, in sequence, so none are hidden.
|
|
28
|
+
- Content that is not code → `Tabs`.
|
|
29
|
+
|
|
30
|
+
## Options
|
|
31
|
+
|
|
32
|
+
| Prop | Means |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| `code` | `{ [language]: source }`. The keys are the tab labels and the highlighting language, in the order given. The first is selected. |
|
|
35
|
+
| `onCopy` | Turns the copy button on. The component writes the selected tab's code to the clipboard, then calls `onCopy(code)`. |
|
|
36
|
+
|
|
37
|
+
The chrome is dark in both colour modes, because the `github-dark` token
|
|
38
|
+
colours need a dark ground.
|
|
39
|
+
|
|
40
|
+
## Do / Don't
|
|
41
|
+
|
|
42
|
+
</En>
|
|
43
|
+
|
|
44
|
+
<Ko>
|
|
45
|
+
|
|
46
|
+
# CodeTabs
|
|
47
|
+
|
|
48
|
+
하나의 예제를 여러 언어로 보여 주는 컴포넌트입니다. 언어마다 탭이 하나씩 있고, 보이는
|
|
49
|
+
탭의 코드를 복사하는 버튼을 켤 수 있습니다. FactChat은 챗봇 공유 설정의 API 접근
|
|
50
|
+
예제에 씁니다.
|
|
51
|
+
|
|
52
|
+
## 언제 쓰나요
|
|
53
|
+
|
|
54
|
+
- 같은 호출을 두 가지 이상의 언어(cURL, Python, JavaScript)로 보여 주고, 읽는 사람은
|
|
55
|
+
그중 하나만 필요할 때.
|
|
56
|
+
|
|
57
|
+
## 언제 쓰지 않나요
|
|
58
|
+
|
|
59
|
+
- 코드가 하나라면 `Code`를 씁니다.
|
|
60
|
+
- 순서대로 모두 필요한 단계(설치, 설정, 실행)라면 단계마다 `Code` 블록을 차례로 두어
|
|
61
|
+
숨기는 것이 없게 합니다.
|
|
62
|
+
- 코드가 아닌 내용은 `Tabs`를 씁니다.
|
|
63
|
+
|
|
64
|
+
## 옵션
|
|
65
|
+
|
|
66
|
+
| 속성 | 뜻 |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| `code` | `{ [언어]: 코드 }`. 키가 탭 이름이자 강조 언어이고, 넘긴 순서대로 나옵니다. 첫 탭이 선택됩니다. |
|
|
69
|
+
| `onCopy` | 복사 버튼을 켭니다. 선택된 탭의 코드를 컴포넌트가 클립보드에 쓰고 `onCopy(code)`를 부릅니다. |
|
|
70
|
+
|
|
71
|
+
`github-dark` 색은 어두운 바탕을 전제로 하므로, 두 색 모드 모두에서 어두운 바탕을
|
|
72
|
+
씁니다.
|
|
73
|
+
|
|
74
|
+
## 이렇게 하세요 / 이렇게 하지 마세요
|
|
75
|
+
|
|
76
|
+
</Ko>
|
|
77
|
+
|
|
78
|
+
<Canvas of={CodeTabsStories.DoSameCallPerLanguage} />
|
|
79
|
+
<Verdict
|
|
80
|
+
kind="do"
|
|
81
|
+
en="One call, one tab per language. The reader picks theirs and copies it."
|
|
82
|
+
ko="호출 하나에 언어마다 탭 하나. 읽는 사람이 자기 언어를 골라 복사합니다."
|
|
83
|
+
/>
|
|
84
|
+
|
|
85
|
+
<Canvas of={CodeTabsStories.DontStepsAsTabs} />
|
|
86
|
+
<Verdict
|
|
87
|
+
kind="dont"
|
|
88
|
+
en="Put different steps (install, set up the client, the request body) behind language tabs. The reader needs all three, and the tabs hide two of them."
|
|
89
|
+
ko="서로 다른 단계(설치, 클라이언트 설정, 요청 본문)를 언어 탭 뒤에 나누지 마세요. 세 단계가 모두 필요한데 탭은 둘을 숨깁니다."
|
|
90
|
+
/>
|
|
91
|
+
|
|
92
|
+
<En>
|
|
93
|
+
|
|
94
|
+
## Content
|
|
95
|
+
|
|
96
|
+
- Use a language identifier Shiki knows as the key (`python`,
|
|
97
|
+
`javascript`, `bash`); it is shown in uppercase, and any other key fails to
|
|
98
|
+
highlight.
|
|
99
|
+
- Keep the examples equivalent: same call, same values, same placeholders.
|
|
100
|
+
|
|
101
|
+
## Accessibility
|
|
102
|
+
|
|
103
|
+
What CodeTabs does for you:
|
|
104
|
+
|
|
105
|
+
- The tabs are the house `Tabs`, so the tab pattern (`tablist`, `tab`,
|
|
106
|
+
arrow-key movement) comes with them (WCAG 2.1.1, 4.1.2).
|
|
107
|
+
- Hidden panels are `aria-hidden` and invisible, so only the selected
|
|
108
|
+
language is read.
|
|
109
|
+
- Text on the dark chrome is at least 7:1 (`action.fg` 70% on `action.bg`)
|
|
110
|
+
in every mode (WCAG 1.4.3).
|
|
111
|
+
|
|
112
|
+
What you still have to do:
|
|
113
|
+
|
|
114
|
+
- The copy button's name is the fixed English "Copy"; its tooltip is
|
|
115
|
+
translated. Note it if your screen is Korean-only.
|
|
116
|
+
- Say in the text above what the example does (WCAG 1.3.1).
|
|
117
|
+
|
|
118
|
+
## Tokens
|
|
119
|
+
|
|
120
|
+
Read from `CODE_CHROME` in `CodeTabs.styles.ts`. It borrows the `action.*`
|
|
121
|
+
roles because they are the one pair that stays dark in every mode.
|
|
122
|
+
|
|
123
|
+
</En>
|
|
124
|
+
|
|
125
|
+
<Ko>
|
|
126
|
+
|
|
127
|
+
## 문구
|
|
128
|
+
|
|
129
|
+
- 키에는 Shiki가 아는 언어 식별자(`python`, `javascript`, `bash`)를 씁니다. 화면에는
|
|
130
|
+
대문자로 나오며, 다른 키를 쓰면 강조가 실패합니다.
|
|
131
|
+
- 예제끼리 내용을 맞춥니다. 같은 호출, 같은 값, 같은 바꿔 넣을 자리를 씁니다.
|
|
132
|
+
|
|
133
|
+
## 접근성
|
|
134
|
+
|
|
135
|
+
CodeTabs가 알아서 하는 일
|
|
136
|
+
|
|
137
|
+
- 탭은 이 디자인 시스템의 `Tabs`이므로 탭 패턴(`tablist`, `tab`, 화살표 키 이동)을
|
|
138
|
+
그대로 따릅니다(WCAG 2.1.1, 4.1.2).
|
|
139
|
+
- 숨겨진 패널은 `aria-hidden`이고 보이지 않으므로, 선택된 언어만 읽힙니다.
|
|
140
|
+
- 어두운 바탕 위의 글자는 모든 모드에서 7:1 이상입니다(`action.bg` 위의 `action.fg`
|
|
141
|
+
70%, WCAG 1.4.3).
|
|
142
|
+
|
|
143
|
+
직접 챙겨야 하는 일
|
|
144
|
+
|
|
145
|
+
- 복사 버튼 이름은 영어 "Copy"로 고정되어 있고 툴팁만 번역됩니다. 한국어 전용
|
|
146
|
+
화면이라면 이 점을 기록해 둡니다.
|
|
147
|
+
- 예제가 무엇을 하는지 위 본문에서 알립니다(WCAG 1.3.1).
|
|
148
|
+
|
|
149
|
+
## 토큰
|
|
150
|
+
|
|
151
|
+
`CodeTabs.styles.ts`의 `CODE_CHROME`에서 읽습니다. 모든 모드에서 어두운 유일한 역할
|
|
152
|
+
쌍이라 `action.*`을 빌려 씁니다.
|
|
153
|
+
|
|
154
|
+
</Ko>
|
|
155
|
+
|
|
156
|
+
<Canvas of={CodeTabsStories.UsageTokens} sourceState="none" />
|
|
157
|
+
|
|
158
|
+
<En>
|
|
159
|
+
|
|
160
|
+
## Related
|
|
161
|
+
|
|
162
|
+
- **Code**: a single snippet.
|
|
163
|
+
- **Tabs**: tabs for anything that is not code.
|
|
164
|
+
- **CopyableCode**: one line with a copy button.
|
|
165
|
+
|
|
166
|
+
</En>
|
|
167
|
+
|
|
168
|
+
<Ko>
|
|
169
|
+
|
|
170
|
+
## 관련 컴포넌트
|
|
171
|
+
|
|
172
|
+
- **Code**: 코드 하나.
|
|
173
|
+
- **Tabs**: 코드가 아닌 내용의 탭.
|
|
174
|
+
- **CopyableCode**: 복사 버튼이 달린 한 줄.
|
|
175
|
+
|
|
176
|
+
</Ko>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { Text } from '@chakra-ui/react';
|
|
3
3
|
|
|
4
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
5
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
6
|
+
import { Code } from '../Code';
|
|
4
7
|
import { Collapsible, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger } from '.';
|
|
5
8
|
|
|
6
9
|
const meta = {
|
|
@@ -65,3 +68,58 @@ export const CompoundAPI: Story = {
|
|
|
65
68
|
</Collapsible.Root>
|
|
66
69
|
),
|
|
67
70
|
};
|
|
71
|
+
|
|
72
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
73
|
+
// Pulled into `Collapsible.usage.mdx` with <Canvas of={…} />. Hidden from
|
|
74
|
+
// the sidebar (`!dev`); `tags` is written out on each story because the
|
|
75
|
+
// indexer reads CSF statically.
|
|
76
|
+
|
|
77
|
+
export const DoOptionalDetail: Story = {
|
|
78
|
+
tags: ['!dev'],
|
|
79
|
+
parameters: { layout: 'padded' },
|
|
80
|
+
name: 'Usage / Do: optional detail, closed by default',
|
|
81
|
+
render: (args) => (
|
|
82
|
+
<CollapsibleRoot {...args} maxW="560px">
|
|
83
|
+
<CollapsibleTrigger>원본 데이터 보기</CollapsibleTrigger>
|
|
84
|
+
<CollapsibleContent>
|
|
85
|
+
<Code language="json">{`{ "event": "member.invite", "count": 3 }`}</Code>
|
|
86
|
+
</CollapsibleContent>
|
|
87
|
+
</CollapsibleRoot>
|
|
88
|
+
),
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const DontVagueTrigger: Story = {
|
|
92
|
+
tags: ['!dev'],
|
|
93
|
+
parameters: { layout: 'padded' },
|
|
94
|
+
name: "Usage / Don't: a trigger that does not say what opens",
|
|
95
|
+
render: (args) => (
|
|
96
|
+
<CollapsibleRoot {...args} maxW="560px">
|
|
97
|
+
<CollapsibleTrigger>더 보기</CollapsibleTrigger>
|
|
98
|
+
<CollapsibleContent>
|
|
99
|
+
<Text>초대 메일은 7일 뒤에 만료됩니다.</Text>
|
|
100
|
+
</CollapsibleContent>
|
|
101
|
+
</CollapsibleRoot>
|
|
102
|
+
),
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export const UsageTokens: Story = {
|
|
106
|
+
tags: ['!dev'],
|
|
107
|
+
parameters: { layout: 'padded' },
|
|
108
|
+
name: 'Usage / Tokens',
|
|
109
|
+
render: () => (
|
|
110
|
+
<TokenTable
|
|
111
|
+
rows={[
|
|
112
|
+
{
|
|
113
|
+
token: 'border.subtle',
|
|
114
|
+
use: (
|
|
115
|
+
<T
|
|
116
|
+
en="Root border, trigger bottom border"
|
|
117
|
+
ko="루트 테두리, 트리거 아래 테두리"
|
|
118
|
+
/>
|
|
119
|
+
),
|
|
120
|
+
},
|
|
121
|
+
{ token: 'bg.subtle', use: <T en="Trigger hover" ko="트리거 호버" /> },
|
|
122
|
+
]}
|
|
123
|
+
/>
|
|
124
|
+
),
|
|
125
|
+
};
|