@mindlogic-ai/logician-ui 5.0.0-alpha.2 → 5.0.0-alpha.21
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/Code/shikiAdapter.d.ts +3 -1
- package/dist/components/Code/shikiAdapter.d.ts.map +1 -1
- package/dist/components/Code/shikiAdapter.js +29 -8
- package/dist/components/Code/shikiAdapter.js.map +1 -1
- package/dist/components/Code/shikiAdapter.mjs +29 -8
- package/dist/components/Code/shikiAdapter.mjs.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.test.tsx +116 -0
- package/src/components/Code/Code.usage.mdx +187 -0
- package/src/components/Code/shikiAdapter.ts +38 -9
- 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
|
@@ -3,8 +3,11 @@ import { Box, Flex, Text, VStack } from '@chakra-ui/react';
|
|
|
3
3
|
import { Meta, StoryObj } from '@storybook/react';
|
|
4
4
|
|
|
5
5
|
import { SYSTEM_HUE_NAMES } from '@/theme/colors';
|
|
6
|
+
import { disabledControl } from '@/utils/disabledControl';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
9
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
10
|
+
import { getTagStyles, Tag, tagTones, tagToneStyles } from '.';
|
|
8
11
|
import { TagCloseButton } from './TagCloseButton';
|
|
9
12
|
|
|
10
13
|
const meta = {
|
|
@@ -17,16 +20,19 @@ const meta = {
|
|
|
17
20
|
tone: {
|
|
18
21
|
control: 'select',
|
|
19
22
|
options: tagTones,
|
|
20
|
-
description:
|
|
23
|
+
description:
|
|
24
|
+
'`neutral` (default): a plain label. `success` / `warning` / `danger` / `info`: only when the tag reports a status every reader shares. Ignored while `selected` or `category` is set.',
|
|
21
25
|
},
|
|
22
26
|
selected: {
|
|
23
27
|
control: 'boolean',
|
|
24
|
-
description:
|
|
28
|
+
description:
|
|
29
|
+
'Filter-chip "on" state (black fill). Passing it, true or false, makes the tag a toggle; with `as="button"` it sets `aria-pressed`.',
|
|
25
30
|
},
|
|
26
31
|
category: {
|
|
27
32
|
control: 'select',
|
|
28
33
|
options: [undefined, ...SYSTEM_HUE_NAMES],
|
|
29
|
-
description:
|
|
34
|
+
description:
|
|
35
|
+
'One of twelve category hues. Classifies only: no status meaning. Wins over `tone`.',
|
|
30
36
|
},
|
|
31
37
|
disabled: { control: 'boolean' },
|
|
32
38
|
},
|
|
@@ -180,3 +186,174 @@ export const UseCases: Story = {
|
|
|
180
186
|
</VStack>
|
|
181
187
|
),
|
|
182
188
|
};
|
|
189
|
+
|
|
190
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
191
|
+
// Pulled into `Tag.usage.mdx` with <Canvas of={…} />. Hidden from the sidebar
|
|
192
|
+
// (`!dev`); `tags` is written on each story because the indexer reads CSF
|
|
193
|
+
// statically.
|
|
194
|
+
|
|
195
|
+
const TOPICS = [
|
|
196
|
+
{ label: '연구', hue: 'blue' },
|
|
197
|
+
{ label: '수업', hue: 'purple' },
|
|
198
|
+
{ label: '행정', hue: 'brown' },
|
|
199
|
+
] as const;
|
|
200
|
+
|
|
201
|
+
export const DoCategoryForTopics: Story = {
|
|
202
|
+
tags: ['!dev'],
|
|
203
|
+
parameters: { layout: 'padded' },
|
|
204
|
+
name: 'Usage / Do: category hues for topics',
|
|
205
|
+
render: () => (
|
|
206
|
+
<Flex gap={2} wrap="wrap">
|
|
207
|
+
{TOPICS.map(({ label, hue }) => (
|
|
208
|
+
<Tag key={label} category={hue} icon="#">
|
|
209
|
+
{label}
|
|
210
|
+
</Tag>
|
|
211
|
+
))}
|
|
212
|
+
</Flex>
|
|
213
|
+
),
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
export const DontToneForTopics: Story = {
|
|
217
|
+
tags: ['!dev'],
|
|
218
|
+
parameters: { layout: 'padded' },
|
|
219
|
+
name: "Usage / Don't: status tones for topics",
|
|
220
|
+
render: () => (
|
|
221
|
+
<Flex gap={2} wrap="wrap">
|
|
222
|
+
<Tag tone="success">연구</Tag>
|
|
223
|
+
<Tag tone="danger">수업</Tag>
|
|
224
|
+
<Tag tone="warning">행정</Tag>
|
|
225
|
+
</Flex>
|
|
226
|
+
),
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
export const DoFilterToggle: Story = {
|
|
230
|
+
tags: ['!dev'],
|
|
231
|
+
parameters: { layout: 'padded' },
|
|
232
|
+
name: 'Usage / Do: filter chips as buttons with `selected`',
|
|
233
|
+
render: function DoFilterToggleStory() {
|
|
234
|
+
const [on, setOn] = useState('전체');
|
|
235
|
+
return (
|
|
236
|
+
<Flex gap={2} wrap="wrap" role="group" aria-label="파일 종류">
|
|
237
|
+
{['전체', '이미지', '문서', '코드'].map((name) => (
|
|
238
|
+
<Tag
|
|
239
|
+
key={name}
|
|
240
|
+
as="button"
|
|
241
|
+
selected={on === name}
|
|
242
|
+
onClick={() => setOn(name)}
|
|
243
|
+
>
|
|
244
|
+
{name}
|
|
245
|
+
</Tag>
|
|
246
|
+
))}
|
|
247
|
+
</Flex>
|
|
248
|
+
);
|
|
249
|
+
},
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
export const DoRemovableWithName: Story = {
|
|
253
|
+
tags: ['!dev'],
|
|
254
|
+
parameters: { layout: 'padded' },
|
|
255
|
+
name: 'Usage / Do: a remove button with its own name',
|
|
256
|
+
render: function DoRemovableStory() {
|
|
257
|
+
const [items, setItems] = useState(['마케팅팀', '영업팀', '개발팀']);
|
|
258
|
+
return (
|
|
259
|
+
<Flex gap={2} wrap="wrap">
|
|
260
|
+
{items.map((item) => (
|
|
261
|
+
<Tag key={item}>
|
|
262
|
+
{item}
|
|
263
|
+
<TagCloseButton
|
|
264
|
+
type="button"
|
|
265
|
+
aria-label={`${item} 삭제`}
|
|
266
|
+
onClick={() => setItems((prev) => prev.filter((i) => i !== item))}
|
|
267
|
+
/>
|
|
268
|
+
</Tag>
|
|
269
|
+
))}
|
|
270
|
+
</Flex>
|
|
271
|
+
);
|
|
272
|
+
},
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
export const DontSelectedForStatus: Story = {
|
|
276
|
+
tags: ['!dev'],
|
|
277
|
+
parameters: { layout: 'padded' },
|
|
278
|
+
name: "Usage / Don't: `selected` to mark a status",
|
|
279
|
+
render: () => (
|
|
280
|
+
<Flex gap={2} wrap="wrap" align="center">
|
|
281
|
+
<Text fontSize="sm">보고서 초안</Text>
|
|
282
|
+
<Tag selected>게시됨</Tag>
|
|
283
|
+
</Flex>
|
|
284
|
+
),
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
/** Tokens each tone and state reads, from `Tag.styles.ts` and the theme. */
|
|
288
|
+
export const UsageTokens: Story = {
|
|
289
|
+
tags: ['!dev'],
|
|
290
|
+
parameters: { layout: 'padded' },
|
|
291
|
+
name: 'Usage / Tokens',
|
|
292
|
+
render: () => {
|
|
293
|
+
const selected = getTagStyles({ selected: true });
|
|
294
|
+
const category = getTagStyles({ category: 'blue' });
|
|
295
|
+
return (
|
|
296
|
+
<TokenTable
|
|
297
|
+
rows={[
|
|
298
|
+
...tagTones.flatMap((tone) => [
|
|
299
|
+
{
|
|
300
|
+
token: tagToneStyles[tone].bgColor,
|
|
301
|
+
use: <T en={`${tone} · background`} ko={`${tone} · 배경`} />,
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
token: tagToneStyles[tone].color,
|
|
305
|
+
use: <T en={`${tone} · text`} ko={`${tone} · 글자`} />,
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
token: tagToneStyles[tone].hoverBorder,
|
|
309
|
+
use: (
|
|
310
|
+
<T
|
|
311
|
+
en={`${tone} · hover border (interactive)`}
|
|
312
|
+
ko={`${tone} · 호버 테두리(누를 수 있을 때)`}
|
|
313
|
+
/>
|
|
314
|
+
),
|
|
315
|
+
},
|
|
316
|
+
]),
|
|
317
|
+
{
|
|
318
|
+
token: selected.bgColor as string,
|
|
319
|
+
use: <T en="selected · background" ko="selected · 배경" />,
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
token: selected.color as string,
|
|
323
|
+
use: <T en="selected · text" ko="selected · 글자" />,
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
token: category.bgColor as string,
|
|
327
|
+
use: (
|
|
328
|
+
<T
|
|
329
|
+
en="category (blue shown) · background"
|
|
330
|
+
ko="category(예: blue) · 배경"
|
|
331
|
+
/>
|
|
332
|
+
),
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
token: 'category.blue.fg',
|
|
336
|
+
use: (
|
|
337
|
+
<T
|
|
338
|
+
en="category (blue shown) · icon mark"
|
|
339
|
+
ko="category(예: blue) · 앞쪽 표시"
|
|
340
|
+
/>
|
|
341
|
+
),
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
token: category.color as string,
|
|
345
|
+
use: <T en="category · text" ko="category · 글자" />,
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
token: disabledControl.bg,
|
|
349
|
+
use: <T en="disabled · background" ko="disabled · 배경" />,
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
token: disabledControl.color,
|
|
353
|
+
use: <T en="disabled · text" ko="disabled · 글자" />,
|
|
354
|
+
},
|
|
355
|
+
]}
|
|
356
|
+
/>
|
|
357
|
+
);
|
|
358
|
+
},
|
|
359
|
+
};
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as TagStories from './Tag.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={TagStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# Tag
|
|
13
|
+
|
|
14
|
+
A compact label that classifies an item, or that the reader can select or
|
|
15
|
+
remove: a topic, a filter, a chosen group.
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
- To classify items into groups with no fixed meaning: topics, file types,
|
|
20
|
+
departments. Use `category`.
|
|
21
|
+
- As a filter chip the reader turns on and off. Render it `as="button"` with
|
|
22
|
+
`selected`.
|
|
23
|
+
- To show a choice the reader made and can take back: a selected group in a
|
|
24
|
+
picker, an active filter. Add `TagCloseButton`.
|
|
25
|
+
|
|
26
|
+
## When not to use
|
|
27
|
+
|
|
28
|
+
- A status or a well-defined system fact (완료, 실패, 이 그룹만) → `Badge`.
|
|
29
|
+
- One choice out of a few, where exactly one is always on → `SegmentedControl`
|
|
30
|
+
or `Tabs`.
|
|
31
|
+
- A count → `CountBadge`.
|
|
32
|
+
- `Chip` is a deprecated alias of Tag; new code uses Tag.
|
|
33
|
+
|
|
34
|
+
## Variants and what they mean
|
|
35
|
+
|
|
36
|
+
</En>
|
|
37
|
+
|
|
38
|
+
<Ko>
|
|
39
|
+
|
|
40
|
+
# Tag
|
|
41
|
+
|
|
42
|
+
항목을 분류하거나, 사용자가 고르거나 지울 수 있는 작은 라벨입니다. 주제, 필터, 선택한
|
|
43
|
+
그룹 같은 곳에 씁니다.
|
|
44
|
+
|
|
45
|
+
## 언제 쓰나요
|
|
46
|
+
|
|
47
|
+
- 정해진 뜻이 없는 묶음으로 항목을 나눌 때: 주제, 파일 종류, 부서. `category`를 씁니다.
|
|
48
|
+
- 사용자가 켜고 끄는 필터 칩으로 쓸 때. `as="button"`으로 그리고 `selected`를 넘깁니다.
|
|
49
|
+
- 사용자가 고른 뒤 다시 뺄 수 있는 선택을 보여 줄 때: 선택기에서 고른 그룹, 적용 중인
|
|
50
|
+
필터. `TagCloseButton`을 붙입니다.
|
|
51
|
+
|
|
52
|
+
## 언제 쓰지 않나요
|
|
53
|
+
|
|
54
|
+
- 상태나 뜻이 명확한 시스템 사실(완료, 실패, 이 그룹만)은 `Badge`를 씁니다.
|
|
55
|
+
- 몇 가지 중 늘 하나만 켜져 있는 선택은 `SegmentedControl`이나 `Tabs`를 씁니다.
|
|
56
|
+
- 개수는 `CountBadge`를 씁니다.
|
|
57
|
+
- `Chip`은 Tag의 지원 중단된 별칭입니다. 새 코드에서는 Tag를 씁니다.
|
|
58
|
+
|
|
59
|
+
## 변형과 뜻
|
|
60
|
+
|
|
61
|
+
</Ko>
|
|
62
|
+
|
|
63
|
+
<ArgTypes of={TagStories} include={['tone', 'selected', 'category', 'icon', 'disabled']} />
|
|
64
|
+
|
|
65
|
+
<En>
|
|
66
|
+
|
|
67
|
+
| Prop | Means | Use for |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| `tone="neutral"` (default) | A plain label | Group names, file extensions, active filters |
|
|
70
|
+
| `category` | A group with no meaning beyond telling items apart | Topics, departments, projects |
|
|
71
|
+
| `selected` | A filter chip that is on (black fill) | Filter bars |
|
|
72
|
+
| `tone="success"` / `warning` / `danger` / `info` | A status every reader shares | Rare on Tag; usually `Badge` is the right component |
|
|
73
|
+
| `disabled` | Cannot be used right now | A filter with no results |
|
|
74
|
+
|
|
75
|
+
When more than one is set, `selected` wins over `category`, and `category`
|
|
76
|
+
wins over `tone`.
|
|
77
|
+
|
|
78
|
+
A tag becomes interactive (pointer, hover border) when it has `onClick`, is a
|
|
79
|
+
toggle (`selected` passed, true or false), or renders as a button or a link.
|
|
80
|
+
With `as="button"` it gets `type="button"`, `aria-pressed` for a toggle, and the
|
|
81
|
+
native `disabled` attribute.
|
|
82
|
+
|
|
83
|
+
## Do / Don't
|
|
84
|
+
|
|
85
|
+
</En>
|
|
86
|
+
|
|
87
|
+
<Ko>
|
|
88
|
+
|
|
89
|
+
| 속성 | 뜻 | 예 |
|
|
90
|
+
| --- | --- | --- |
|
|
91
|
+
| `tone="neutral"` (기본) | 단순한 라벨 | 그룹 이름, 파일 확장자, 적용 중인 필터 |
|
|
92
|
+
| `category` | 항목을 나누는 것 말고는 뜻이 없는 묶음 | 주제, 부서, 프로젝트 |
|
|
93
|
+
| `selected` | 켜져 있는 필터 칩(검은 바탕) | 필터 막대 |
|
|
94
|
+
| `tone="success"` / `warning` / `danger` / `info` | 모든 사용자가 같은 뜻으로 읽는 상태 | Tag에서는 드뭅니다. 대개 `Badge`가 맞습니다 |
|
|
95
|
+
| `disabled` | 지금은 쓸 수 없음 | 결과가 없는 필터 |
|
|
96
|
+
|
|
97
|
+
여러 속성을 함께 주면 `selected`가 `category`보다, `category`가 `tone`보다
|
|
98
|
+
우선합니다.
|
|
99
|
+
|
|
100
|
+
`onClick`이 있거나, 토글이거나(`selected`를 true든 false든 넘긴 경우), 버튼이나
|
|
101
|
+
링크로 그리면 Tag는 누를 수 있는 모양(포인터, 호버 테두리)이 됩니다. `as="button"`으로
|
|
102
|
+
그리면 `type="button"`이 붙고, 토글이면 `aria-pressed`가, 비활성이면 기본
|
|
103
|
+
`disabled` 속성이 붙습니다.
|
|
104
|
+
|
|
105
|
+
## 이렇게 하세요 / 이렇게 하지 마세요
|
|
106
|
+
|
|
107
|
+
</Ko>
|
|
108
|
+
|
|
109
|
+
<Canvas of={TagStories.DoCategoryForTopics} />
|
|
110
|
+
<Verdict
|
|
111
|
+
kind="do"
|
|
112
|
+
en="Use category hues for topics. They tell items apart without implying that one is good and another is bad."
|
|
113
|
+
ko="주제에는 category 색을 씁니다. 항목을 나누면서도 어느 쪽이 좋고 나쁘다는 뜻을 담지 않습니다."
|
|
114
|
+
/>
|
|
115
|
+
|
|
116
|
+
<Canvas of={TagStories.DontToneForTopics} />
|
|
117
|
+
<Verdict
|
|
118
|
+
kind="dont"
|
|
119
|
+
en="Borrow status tones to colour topics. Readers will take 수업 to be an error."
|
|
120
|
+
ko="주제에 색을 입히려고 상태 tone을 빌려 쓰지 마세요. 사용자는 '수업'을 오류로 읽습니다."
|
|
121
|
+
/>
|
|
122
|
+
|
|
123
|
+
<Canvas of={TagStories.DoFilterToggle} />
|
|
124
|
+
<Verdict
|
|
125
|
+
kind="do"
|
|
126
|
+
en='Render filter chips as="button" and pass selected. They are then reachable with Tab, work with Enter and Space, and announce pressed or not pressed.'
|
|
127
|
+
ko='필터 칩은 as="button"으로 그리고 selected를 넘깁니다. 그래야 Tab으로 이동하고 Enter와 Space로 누를 수 있으며, 눌림 여부가 읽힙니다.'
|
|
128
|
+
/>
|
|
129
|
+
|
|
130
|
+
<Canvas of={TagStories.DoRemovableWithName} />
|
|
131
|
+
<Verdict
|
|
132
|
+
kind="do"
|
|
133
|
+
en="Give every remove button its own name, such as '마케팅팀 삭제'. Three buttons all called 'close' are impossible to tell apart."
|
|
134
|
+
ko="삭제 버튼마다 '마케팅팀 삭제'처럼 고유한 이름을 붙입니다. 이름이 모두 '닫기'인 버튼 세 개는 서로 구분할 수 없습니다."
|
|
135
|
+
/>
|
|
136
|
+
|
|
137
|
+
<Canvas of={TagStories.DontSelectedForStatus} />
|
|
138
|
+
<Verdict
|
|
139
|
+
kind="dont"
|
|
140
|
+
en="Use the selected fill to show a status. Black means 'this filter is on'. For 게시됨 use a Badge."
|
|
141
|
+
ko="상태를 보여 주려고 selected 바탕을 쓰지 마세요. 검은 바탕은 '이 필터가 켜져 있음'이라는 뜻입니다. '게시됨'에는 Badge를 씁니다."
|
|
142
|
+
/>
|
|
143
|
+
|
|
144
|
+
<En>
|
|
145
|
+
|
|
146
|
+
## Content
|
|
147
|
+
|
|
148
|
+
- One to three words. No full stop.
|
|
149
|
+
- Nouns, not verbs: 이미지, not 이미지 보기.
|
|
150
|
+
- Sentence case in English. No 「」, quotation marks or brackets around
|
|
151
|
+
Korean labels.
|
|
152
|
+
- For a long name, shorten the label and keep the full name in the remove
|
|
153
|
+
button's `aria-label` or a `Tooltip`.
|
|
154
|
+
|
|
155
|
+
## Accessibility
|
|
156
|
+
|
|
157
|
+
What Tag does for you:
|
|
158
|
+
|
|
159
|
+
- A plain tag is a `<span>`, so it is safe inside a button or link (phrasing
|
|
160
|
+
content, `ACCESSIBILITY.md` §5, KWCAG 5.4.1.1).
|
|
161
|
+
- `as="button"` adds `type="button"`, `aria-pressed` for a toggle, the native
|
|
162
|
+
`disabled` attribute and the house focus ring (WCAG 2.4.7, 4.1.2).
|
|
163
|
+
- A disabled tag that would otherwise be a link or clickable span gets
|
|
164
|
+
`aria-disabled`, leaves the Tab order and ignores clicks.
|
|
165
|
+
- Text on every tone and on `selected` passes the contrast audit in both modes
|
|
166
|
+
(WCAG 1.4.3).
|
|
167
|
+
|
|
168
|
+
What you still have to do:
|
|
169
|
+
|
|
170
|
+
- **Clickable means a button or a link** (WCAG 2.1.1). `onClick` on the default
|
|
171
|
+
`<span>` is not reachable by keyboard. Use `as="button"`, or `as="a"` with
|
|
172
|
+
`href` when it navigates.
|
|
173
|
+
- **Name the remove button.** `TagCloseButton` is an icon-only `<button>` with
|
|
174
|
+
no name and no handler of its own. Pass `aria-label` (for example
|
|
175
|
+
`` `${label} 삭제` ``) and `onClick` (WCAG 4.1.2). Inside a `<form>`, also
|
|
176
|
+
pass `type="button"`, or it submits the form.
|
|
177
|
+
- Group related filter chips under a label (`role="group"` with
|
|
178
|
+
`aria-label`, or a visible heading) so a screen reader knows what they
|
|
179
|
+
filter.
|
|
180
|
+
- Words, not colour alone (WCAG 1.4.1): category hues only tell items apart;
|
|
181
|
+
the label carries the meaning.
|
|
182
|
+
|
|
183
|
+
## Tokens
|
|
184
|
+
|
|
185
|
+
The table is generated from `Tag.styles.ts` and the theme.
|
|
186
|
+
|
|
187
|
+
</En>
|
|
188
|
+
|
|
189
|
+
<Ko>
|
|
190
|
+
|
|
191
|
+
## 문구
|
|
192
|
+
|
|
193
|
+
- 한 단어에서 세 단어까지 씁니다. 마침표를 찍지 않습니다.
|
|
194
|
+
- 동사가 아니라 명사로 씁니다. "이미지 보기"가 아니라 "이미지"라고 씁니다.
|
|
195
|
+
- 영어는 문장형 대소문자를 씁니다. 한국어 라벨에는 「」, 따옴표, 괄호를 두르지
|
|
196
|
+
않습니다.
|
|
197
|
+
- 이름이 길면 라벨은 줄이고, 전체 이름은 삭제 버튼의 `aria-label`이나 `Tooltip`에
|
|
198
|
+
담습니다.
|
|
199
|
+
|
|
200
|
+
## 접근성
|
|
201
|
+
|
|
202
|
+
Tag가 알아서 하는 일
|
|
203
|
+
|
|
204
|
+
- 기본 Tag는 `<span>`이라 버튼이나 링크 안에 넣어도 됩니다(구문 콘텐츠,
|
|
205
|
+
`ACCESSIBILITY.md` §5, KWCAG 5.4.1.1).
|
|
206
|
+
- `as="button"`으로 그리면 `type="button"`, 토글일 때 `aria-pressed`, 기본
|
|
207
|
+
`disabled` 속성, 공통 초점 링이 붙습니다(WCAG 2.4.7, 4.1.2).
|
|
208
|
+
- 링크나 누를 수 있는 span이 비활성이면 `aria-disabled`가 붙고, Tab 순서에서 빠지며,
|
|
209
|
+
클릭을 무시합니다.
|
|
210
|
+
- 모든 tone과 `selected`의 글자 색은 라이트·다크 모두 대비 감사를 통과합니다(WCAG
|
|
211
|
+
1.4.3).
|
|
212
|
+
|
|
213
|
+
직접 챙겨야 하는 일
|
|
214
|
+
|
|
215
|
+
- **누를 수 있다면 버튼이나 링크로 그립니다**(WCAG 2.1.1). 기본 `<span>`에
|
|
216
|
+
`onClick`만 달면 키보드로 닿지 않습니다. `as="button"`을 쓰고, 다른 곳으로
|
|
217
|
+
이동한다면 `href`와 함께 `as="a"`를 씁니다.
|
|
218
|
+
- **삭제 버튼에 이름을 붙입니다.** `TagCloseButton`은 아이콘만 있는 `<button>`이며,
|
|
219
|
+
이름도 동작도 스스로 갖지 않습니다. `aria-label`(예: `` `${label} 삭제` ``)과
|
|
220
|
+
`onClick`을 넘깁니다(WCAG 4.1.2). `<form>` 안에서는 `type="button"`도 넘겨야
|
|
221
|
+
폼이 제출되지 않습니다.
|
|
222
|
+
- 관련된 필터 칩은 라벨로 묶습니다(`aria-label`을 단 `role="group"`, 또는 눈에 보이는
|
|
223
|
+
제목). 그래야 화면 낭독기 사용자가 무엇을 거르는 필터인지 압니다.
|
|
224
|
+
- 색만으로 알리지 않습니다(WCAG 1.4.1). category 색은 항목을 나눌 뿐이고, 뜻은 라벨이
|
|
225
|
+
전합니다.
|
|
226
|
+
|
|
227
|
+
## 토큰
|
|
228
|
+
|
|
229
|
+
아래 표는 `Tag.styles.ts`와 테마에서 자동으로 만듭니다.
|
|
230
|
+
|
|
231
|
+
</Ko>
|
|
232
|
+
|
|
233
|
+
<Canvas of={TagStories.UsageTokens} sourceState="none" />
|
|
234
|
+
|
|
235
|
+
<En>
|
|
236
|
+
|
|
237
|
+
## Related
|
|
238
|
+
|
|
239
|
+
- **Badge**: a status or a well-defined system fact.
|
|
240
|
+
- **CountBadge**: a number.
|
|
241
|
+
- **Chip**: deprecated alias of Tag; see its migration table.
|
|
242
|
+
- **SegmentedControl**: exactly one of a few options.
|
|
243
|
+
- **Foundations/Brand & colour usage**: category hues vs status colours.
|
|
244
|
+
|
|
245
|
+
</En>
|
|
246
|
+
|
|
247
|
+
<Ko>
|
|
248
|
+
|
|
249
|
+
## 관련 컴포넌트
|
|
250
|
+
|
|
251
|
+
- **Badge**: 상태나 뜻이 명확한 시스템 사실.
|
|
252
|
+
- **CountBadge**: 숫자.
|
|
253
|
+
- **Chip**: Tag의 지원 중단된 별칭. 바꾸는 방법은 Chip 페이지의 표를 봅니다.
|
|
254
|
+
- **SegmentedControl**: 몇 가지 중 정확히 하나.
|
|
255
|
+
- **Foundations/Brand & colour usage**: category 색과 상태색의 차이.
|
|
256
|
+
|
|
257
|
+
</Ko>
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
|
|
4
|
+
import { Box } from '@chakra-ui/react';
|
|
5
|
+
|
|
6
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
7
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
8
|
+
import { FieldRow } from '../Form';
|
|
9
|
+
import { Input } from '../Input';
|
|
10
|
+
import { MaxLengthIndicator } from '../MaxLengthIndicator';
|
|
4
11
|
import { Textarea } from '.';
|
|
5
12
|
|
|
6
13
|
const meta = {
|
|
@@ -77,3 +84,109 @@ export const Invalid: Story = {
|
|
|
77
84
|
);
|
|
78
85
|
},
|
|
79
86
|
};
|
|
87
|
+
|
|
88
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
89
|
+
// Pulled into `Textarea.usage.mdx` with <Canvas of={…} />. Hidden (`!dev`).
|
|
90
|
+
|
|
91
|
+
const INSTRUCTIONS =
|
|
92
|
+
'답변은 존댓말로 합니다. 근거가 되는 문서가 있으면 제목을 함께 알려 줍니다.';
|
|
93
|
+
|
|
94
|
+
export const DoInstructionsWithCount: Story = {
|
|
95
|
+
tags: ['!dev'],
|
|
96
|
+
parameters: { layout: 'padded' },
|
|
97
|
+
name: 'Usage / Do: long text with a label and a count',
|
|
98
|
+
render: () => {
|
|
99
|
+
const [value, setValue] = useState(INSTRUCTIONS);
|
|
100
|
+
return (
|
|
101
|
+
<Box maxW="420px">
|
|
102
|
+
<FieldRow
|
|
103
|
+
label="시스템 지시문"
|
|
104
|
+
helperText="챗봇이 모든 대화에서 따르는 규칙입니다."
|
|
105
|
+
endAdornment={
|
|
106
|
+
<MaxLengthIndicator value={value.length} maxLength={500} />
|
|
107
|
+
}
|
|
108
|
+
>
|
|
109
|
+
<Textarea
|
|
110
|
+
rows={4}
|
|
111
|
+
maxLength={500}
|
|
112
|
+
value={value}
|
|
113
|
+
onChange={(e) => setValue(e.target.value)}
|
|
114
|
+
/>
|
|
115
|
+
</FieldRow>
|
|
116
|
+
</Box>
|
|
117
|
+
);
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export const DontSingleValue: Story = {
|
|
122
|
+
tags: ['!dev'],
|
|
123
|
+
parameters: { layout: 'padded' },
|
|
124
|
+
name: "Usage / Don't: a textarea for a one-line value",
|
|
125
|
+
render: () => (
|
|
126
|
+
<Box maxW="420px">
|
|
127
|
+
<FieldRow label="그룹 이름">
|
|
128
|
+
<Textarea rows={4} value="마케팅팀" onChange={() => {}} />
|
|
129
|
+
</FieldRow>
|
|
130
|
+
</Box>
|
|
131
|
+
),
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export const DoSingleValueInInput: Story = {
|
|
135
|
+
tags: ['!dev'],
|
|
136
|
+
parameters: { layout: 'padded' },
|
|
137
|
+
name: 'Usage / Do: an Input for a one-line value',
|
|
138
|
+
render: () => (
|
|
139
|
+
<Box maxW="420px">
|
|
140
|
+
<FieldRow label="그룹 이름">
|
|
141
|
+
<Input value="마케팅팀" onChange={() => {}} />
|
|
142
|
+
</FieldRow>
|
|
143
|
+
</Box>
|
|
144
|
+
),
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/** Tokens Textarea reads, as written in `Textarea.tsx` (same set as Input). */
|
|
148
|
+
export const UsageTokens: Story = {
|
|
149
|
+
tags: ['!dev'],
|
|
150
|
+
parameters: { layout: 'padded' },
|
|
151
|
+
name: 'Usage / Tokens',
|
|
152
|
+
render: () => (
|
|
153
|
+
<TokenTable
|
|
154
|
+
rows={[
|
|
155
|
+
{ token: 'bg.surface', use: <T en="Background" ko="배경" /> },
|
|
156
|
+
{ token: 'fg.default', use: <T en="Text" ko="글자" /> },
|
|
157
|
+
{
|
|
158
|
+
token: 'border.control',
|
|
159
|
+
use: <T en="Border at rest" ko="평소 테두리" />,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
token: 'fg.icon',
|
|
163
|
+
use: <T en="Border on hover" ko="마우스를 올렸을 때 테두리" />,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
token: 'primary.main',
|
|
167
|
+
use: <T en="Border and ring on focus" ko="초점 테두리와 링" />,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
token: 'danger.solid',
|
|
171
|
+
use: <T en="Border when invalid" ko="오류 상태 테두리" />,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
token: 'bg.subtle',
|
|
175
|
+
use: <T en="Read-only background" ko="읽기 전용 배경" />,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
token: 'fg.muted',
|
|
179
|
+
use: <T en="Read-only text" ko="읽기 전용 글자" />,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
token: 'disabled.bg',
|
|
183
|
+
use: <T en="Disabled background" ko="비활성 배경" />,
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
token: 'disabled.fg',
|
|
187
|
+
use: <T en="Disabled text" ko="비활성 글자" />,
|
|
188
|
+
},
|
|
189
|
+
]}
|
|
190
|
+
/>
|
|
191
|
+
),
|
|
192
|
+
};
|
|
@@ -88,6 +88,10 @@ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
|
88
88
|
bg: 'bg.subtle',
|
|
89
89
|
color: 'fg.muted',
|
|
90
90
|
borderColor: 'border.subtle',
|
|
91
|
+
// Nothing can be typed here, so hovering must not promise an edit.
|
|
92
|
+
_hover: {
|
|
93
|
+
borderColor: 'border.subtle',
|
|
94
|
+
},
|
|
91
95
|
}}
|
|
92
96
|
_disabled={{
|
|
93
97
|
...disabledControl,
|