@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
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as CountBadgeStories from './CountBadge.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={CountBadgeStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# CountBadge
|
|
13
|
+
|
|
14
|
+
A small coral-red count of things that are waiting for the reader: unread
|
|
15
|
+
messages, new notifications.
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
- An unread or pending count next to a nav item, a tab or a list row.
|
|
20
|
+
- On an icon-only button, such as the notification bell.
|
|
21
|
+
- `dot` when there is something new but the number does not matter.
|
|
22
|
+
|
|
23
|
+
## When not to use
|
|
24
|
+
|
|
25
|
+
- A total or a quantity (파일 128개, 멤버 42명) → plain text. Coral says "this
|
|
26
|
+
needs you"; a total does not.
|
|
27
|
+
- A status or a label → `Badge`.
|
|
28
|
+
- Something the reader can select or remove → `Tag`.
|
|
29
|
+
|
|
30
|
+
## Variants and what they mean
|
|
31
|
+
|
|
32
|
+
</En>
|
|
33
|
+
|
|
34
|
+
<Ko>
|
|
35
|
+
|
|
36
|
+
# CountBadge
|
|
37
|
+
|
|
38
|
+
읽지 않은 메시지나 새 알림처럼 사용자를 기다리는 항목의 개수를 보여 주는 작은
|
|
39
|
+
코럴 레드 배지입니다.
|
|
40
|
+
|
|
41
|
+
## 언제 쓰나요
|
|
42
|
+
|
|
43
|
+
- 메뉴 항목, 탭, 목록 행 옆에 읽지 않았거나 처리할 항목의 개수를 보여 줄 때.
|
|
44
|
+
- 알림 종 같은 아이콘 버튼 위에 개수를 올릴 때.
|
|
45
|
+
- 새 소식이 있다는 것만 중요하고 개수는 중요하지 않을 때는 `dot`을 씁니다.
|
|
46
|
+
|
|
47
|
+
## 언제 쓰지 않나요
|
|
48
|
+
|
|
49
|
+
- 전체 개수나 수량(파일 128개, 멤버 42명)은 일반 글자로 씁니다. 코럴은 "확인이
|
|
50
|
+
필요함"이라는 뜻인데, 전체 개수에는 그런 뜻이 없습니다.
|
|
51
|
+
- 상태나 라벨은 `Badge`를 씁니다.
|
|
52
|
+
- 사용자가 고르거나 지울 수 있다면 `Tag`를 씁니다.
|
|
53
|
+
|
|
54
|
+
## 변형과 뜻
|
|
55
|
+
|
|
56
|
+
</Ko>
|
|
57
|
+
|
|
58
|
+
<ArgTypes of={CountBadgeStories} include={['count', 'max', 'dot', 'showZero', 'label', 'size']} />
|
|
59
|
+
|
|
60
|
+
<En>
|
|
61
|
+
|
|
62
|
+
| Form | Shows | Notes |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| Number (default) | `count`, capped at `max` (99 → `99+`) | Renders nothing for 0 unless `showZero` |
|
|
65
|
+
| `dot` | A circle with no number | Hidden from assistive tech unless it has a `label`; with a `count` of 0 it disappears |
|
|
66
|
+
|
|
67
|
+
Sizes `sm` / `md` (default) / `lg` are 16 / 18 / 22 px tall. Digits are
|
|
68
|
+
tabular, so the badge does not change width as the number changes.
|
|
69
|
+
|
|
70
|
+
## Do / Don't
|
|
71
|
+
|
|
72
|
+
</En>
|
|
73
|
+
|
|
74
|
+
<Ko>
|
|
75
|
+
|
|
76
|
+
| 형태 | 보이는 것 | 참고 |
|
|
77
|
+
| --- | --- | --- |
|
|
78
|
+
| 숫자(기본) | `count`, `max`에서 잘림(99 → `99+`) | `showZero`가 없으면 0일 때 아무것도 그리지 않음 |
|
|
79
|
+
| `dot` | 숫자 없는 점 | `label`이 없으면 보조 기술에서 숨겨짐. `count`가 0이면 사라짐 |
|
|
80
|
+
|
|
81
|
+
크기 `sm` / `md`(기본) / `lg`의 높이는 16 / 18 / 22px입니다. 숫자 폭이 고정되어 있어
|
|
82
|
+
숫자가 바뀌어도 배지 폭이 흔들리지 않습니다.
|
|
83
|
+
|
|
84
|
+
## 이렇게 하세요 / 이렇게 하지 마세요
|
|
85
|
+
|
|
86
|
+
</Ko>
|
|
87
|
+
|
|
88
|
+
<Canvas of={CountBadgeStories.InContext} />
|
|
89
|
+
<Verdict
|
|
90
|
+
kind="do"
|
|
91
|
+
en="Next to a nav item, give the badge a label that says what it counts. The screen reader hears 읽지 않은 메시지 12개 instead of a bare 12."
|
|
92
|
+
ko="메뉴 항목 옆에서는 무엇의 개수인지 알려 주는 label을 붙입니다. 화면 낭독기는 '12' 대신 '읽지 않은 메시지 12개'라고 읽습니다."
|
|
93
|
+
/>
|
|
94
|
+
|
|
95
|
+
<Canvas of={CountBadgeStories.OnIconButton} />
|
|
96
|
+
<Verdict
|
|
97
|
+
kind="do"
|
|
98
|
+
en="On an icon-only button, put the count in the button's aria-label and leave the badge unlabelled. The button's aria-label replaces everything inside it."
|
|
99
|
+
ko="아이콘 버튼에서는 개수를 버튼의 aria-label에 넣고 배지에는 label을 달지 않습니다. 버튼의 aria-label이 안에 든 내용을 모두 대신합니다."
|
|
100
|
+
/>
|
|
101
|
+
|
|
102
|
+
<Canvas of={CountBadgeStories.DontCountForTotals} />
|
|
103
|
+
<Verdict
|
|
104
|
+
kind="dont"
|
|
105
|
+
en="Use a count badge for totals. Three coral badges in a list read as three things that need attention."
|
|
106
|
+
ko="전체 개수에 CountBadge를 쓰지 마세요. 목록에 코럴 배지가 세 개 있으면 확인할 일이 세 가지 있는 것처럼 읽힙니다."
|
|
107
|
+
/>
|
|
108
|
+
|
|
109
|
+
<Canvas of={CountBadgeStories.DoTotalsAsText} />
|
|
110
|
+
<Verdict
|
|
111
|
+
kind="do"
|
|
112
|
+
en="Write totals as muted text with the unit."
|
|
113
|
+
ko="전체 개수는 단위를 붙여 흐린 글자로 씁니다."
|
|
114
|
+
/>
|
|
115
|
+
|
|
116
|
+
<En>
|
|
117
|
+
|
|
118
|
+
## Content
|
|
119
|
+
|
|
120
|
+
- Numbers only; the unit and meaning go in `label` or the surrounding text.
|
|
121
|
+
- Keep the default `max` of 99 unless the exact number above it matters to the
|
|
122
|
+
reader.
|
|
123
|
+
- Write `label` as a complete phrase with the full number: "읽지 않은 알림
|
|
124
|
+
120개", even when the badge shows `99+`.
|
|
125
|
+
|
|
126
|
+
## Accessibility
|
|
127
|
+
|
|
128
|
+
What CountBadge does for you:
|
|
129
|
+
|
|
130
|
+
- With a `label`, the visible number is hidden from assistive tech and the
|
|
131
|
+
label is read instead, so `99+` is announced as the real count.
|
|
132
|
+
- A `dot` without a `label` is `aria-hidden`; with one it is an `img` with that
|
|
133
|
+
name.
|
|
134
|
+
- It renders as a `<span>`, so it is valid inside a button or link
|
|
135
|
+
(`ACCESSIBILITY.md` §5, KWCAG 5.4.1.1).
|
|
136
|
+
- `count.fg` on `count.bg` passes the contrast audit in both modes
|
|
137
|
+
(WCAG 1.4.3).
|
|
138
|
+
|
|
139
|
+
What you still have to do:
|
|
140
|
+
|
|
141
|
+
- **Give it a `label` when the number alone makes no sense**, in a nav item or a
|
|
142
|
+
list row (WCAG 1.1.1).
|
|
143
|
+
- **On an icon-only button, put the count in the button's `aria-label`**
|
|
144
|
+
(WCAG 4.1.2). A `label` on the badge there is never announced.
|
|
145
|
+
- The badge does not announce changes. If a new count matters while the reader
|
|
146
|
+
is on the page, announce it through a polite live region (`role="status"`)
|
|
147
|
+
as well (WCAG 4.1.3).
|
|
148
|
+
|
|
149
|
+
## Tokens
|
|
150
|
+
|
|
151
|
+
The table is generated from `CountBadge.styles.ts` and the theme.
|
|
152
|
+
|
|
153
|
+
</En>
|
|
154
|
+
|
|
155
|
+
<Ko>
|
|
156
|
+
|
|
157
|
+
## 문구
|
|
158
|
+
|
|
159
|
+
- 숫자만 씁니다. 단위와 뜻은 `label`이나 주변 글자에 담습니다.
|
|
160
|
+
- 99보다 큰 정확한 숫자가 사용자에게 중요하지 않다면 기본 `max` 99를 그대로 둡니다.
|
|
161
|
+
- `label`은 실제 숫자를 넣은 완전한 구절로 씁니다. 배지에 `99+`가 보여도 "읽지 않은
|
|
162
|
+
알림 120개"라고 씁니다.
|
|
163
|
+
|
|
164
|
+
## 접근성
|
|
165
|
+
|
|
166
|
+
CountBadge가 알아서 하는 일
|
|
167
|
+
|
|
168
|
+
- `label`이 있으면 보이는 숫자는 보조 기술에서 숨기고 label을 대신 읽습니다. 그래서
|
|
169
|
+
`99+`가 실제 개수로 읽힙니다.
|
|
170
|
+
- `label`이 없는 `dot`은 `aria-hidden`이고, label이 있으면 그 이름을 가진 `img`가
|
|
171
|
+
됩니다.
|
|
172
|
+
- `<span>`으로 그려지므로 버튼이나 링크 안에 넣어도 됩니다(`ACCESSIBILITY.md` §5,
|
|
173
|
+
KWCAG 5.4.1.1).
|
|
174
|
+
- `count.bg` 위의 `count.fg`는 라이트·다크 모두 대비 감사를 통과합니다(WCAG 1.4.3).
|
|
175
|
+
|
|
176
|
+
직접 챙겨야 하는 일
|
|
177
|
+
|
|
178
|
+
- **숫자만으로 뜻이 통하지 않는다면 `label`을 붙입니다.** 메뉴 항목이나 목록 행 옆이
|
|
179
|
+
그렇습니다(WCAG 1.1.1).
|
|
180
|
+
- **아이콘 버튼에서는 개수를 버튼의 `aria-label`에 넣습니다**(WCAG 4.1.2). 그 자리에서
|
|
181
|
+
배지의 `label`은 읽히지 않습니다.
|
|
182
|
+
- 배지는 숫자가 바뀌어도 알려 주지 않습니다. 사용자가 화면을 보는 동안 새 개수가
|
|
183
|
+
중요하다면, 공손한 라이브 영역(`role="status"`)으로도 알립니다(WCAG 4.1.3).
|
|
184
|
+
|
|
185
|
+
## 토큰
|
|
186
|
+
|
|
187
|
+
아래 표는 `CountBadge.styles.ts`와 테마에서 자동으로 만듭니다.
|
|
188
|
+
|
|
189
|
+
</Ko>
|
|
190
|
+
|
|
191
|
+
<Canvas of={CountBadgeStories.UsageTokens} sourceState="none" />
|
|
192
|
+
|
|
193
|
+
<En>
|
|
194
|
+
|
|
195
|
+
## Related
|
|
196
|
+
|
|
197
|
+
- **Badge**: a status or an attribute.
|
|
198
|
+
- **Tag**: a label the reader can select or remove.
|
|
199
|
+
- **IconButton**: where the bell and its count live.
|
|
200
|
+
- **Foundations/Brand & colour usage**: coral only for send, run, the
|
|
201
|
+
AI-working mark and counts.
|
|
202
|
+
|
|
203
|
+
</En>
|
|
204
|
+
|
|
205
|
+
<Ko>
|
|
206
|
+
|
|
207
|
+
## 관련 컴포넌트
|
|
208
|
+
|
|
209
|
+
- **Badge**: 상태나 속성.
|
|
210
|
+
- **Tag**: 사용자가 고르거나 지울 수 있는 라벨.
|
|
211
|
+
- **IconButton**: 알림 종과 그 개수가 놓이는 곳.
|
|
212
|
+
- **Foundations/Brand & colour usage**: 코럴은 전송, 실행, AI 작업 표시, 개수에만
|
|
213
|
+
씁니다.
|
|
214
|
+
|
|
215
|
+
</Ko>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as CountUpStories from './CountUp.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={CountUpStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# CountUp
|
|
13
|
+
|
|
14
|
+
Counts a number up (or down) to `to`, for a balance that just grew, a total
|
|
15
|
+
that just settled, or a KPI that just loaded.
|
|
16
|
+
|
|
17
|
+
</En>
|
|
18
|
+
|
|
19
|
+
<Ko>
|
|
20
|
+
|
|
21
|
+
# CountUp
|
|
22
|
+
|
|
23
|
+
숫자를 `to`까지 세어 올리거나 내립니다. 방금 늘어난 잔액, 방금 확정된 합계, 방금 불러온
|
|
24
|
+
지표에 씁니다.
|
|
25
|
+
|
|
26
|
+
</Ko>
|
|
27
|
+
|
|
28
|
+
<Canvas of={CountUpStories.Default} />
|
|
29
|
+
|
|
30
|
+
<En>
|
|
31
|
+
|
|
32
|
+
## When to use
|
|
33
|
+
|
|
34
|
+
- Credits added after a purchase, counting from the old balance to the new one.
|
|
35
|
+
- The headline number on a stat card when the dashboard first loads
|
|
36
|
+
(`from={0}`).
|
|
37
|
+
- A score on a result screen, with `delayMs` so it starts after the screen has
|
|
38
|
+
arrived.
|
|
39
|
+
|
|
40
|
+
## When not to use
|
|
41
|
+
|
|
42
|
+
- Numbers in tables, lists or running text that did not just change → plain
|
|
43
|
+
text. A count is a flourish on a number that is already known.
|
|
44
|
+
- Values that update all the time (live usage, a timer) → plain text. Every
|
|
45
|
+
update would start a new count.
|
|
46
|
+
- Only emphasis is needed, not the change itself → `Pulse`.
|
|
47
|
+
|
|
48
|
+
## Reduced motion and accessibility
|
|
49
|
+
|
|
50
|
+
- With `prefers-reduced-motion: reduce` the final value renders immediately,
|
|
51
|
+
and `onEnd` still fires.
|
|
52
|
+
- The text changes on every frame while counting. Do not put CountUp inside an
|
|
53
|
+
`aria-live` region, or a screen reader may read intermediate values. If the
|
|
54
|
+
new value must be announced, announce the final number separately
|
|
55
|
+
(WCAG 4.1.3).
|
|
56
|
+
- It renders a single `<span>` with tabular figures and wraps nothing, so it
|
|
57
|
+
is safe inside a heading, a button or running text.
|
|
58
|
+
- The default `durationMs` is `motion.slower` (700ms). Longer counts make
|
|
59
|
+
people wait for a number the screen already knows.
|
|
60
|
+
|
|
61
|
+
## Props
|
|
62
|
+
|
|
63
|
+
`format` receives every intermediate value; the default rounds and groups
|
|
64
|
+
digits with commas. Later changes to `to` count on from wherever the last count
|
|
65
|
+
landed.
|
|
66
|
+
|
|
67
|
+
</En>
|
|
68
|
+
|
|
69
|
+
<Ko>
|
|
70
|
+
|
|
71
|
+
## 언제 쓰나요
|
|
72
|
+
|
|
73
|
+
- 구매 뒤 추가된 크레딧을, 이전 잔액에서 새 잔액까지 세어 올릴 때.
|
|
74
|
+
- 대시보드를 처음 열 때 통계 카드의 큰 숫자(`from={0}`).
|
|
75
|
+
- 결과 화면의 점수. 화면이 다 들어온 뒤에 세도록 `delayMs`를 줍니다.
|
|
76
|
+
|
|
77
|
+
## 언제 쓰지 않나요
|
|
78
|
+
|
|
79
|
+
- 방금 바뀌지 않은 표, 목록, 본문 속 숫자는 그냥 글자로 씁니다. 세어 올리는 효과는 이미
|
|
80
|
+
알려진 숫자에 더하는 장식입니다.
|
|
81
|
+
- 실시간 사용량이나 타이머처럼 계속 바뀌는 값도 그냥 글자로 씁니다. 바뀔 때마다 새로
|
|
82
|
+
세기 시작합니다.
|
|
83
|
+
- 바뀌는 과정이 아니라 강조만 필요하다면 `Pulse`를 씁니다.
|
|
84
|
+
|
|
85
|
+
## 동작 줄이기와 접근성
|
|
86
|
+
|
|
87
|
+
- `prefers-reduced-motion: reduce`에서는 최종 값이 바로 나타나고, `onEnd`도 그대로
|
|
88
|
+
호출됩니다.
|
|
89
|
+
- 세는 동안 글자가 매 프레임 바뀝니다. CountUp을 `aria-live` 영역 안에 두지 마세요.
|
|
90
|
+
화면 낭독기가 중간 값을 읽을 수 있습니다. 새 값을 알려야 한다면 최종 숫자를 따로
|
|
91
|
+
알립니다(WCAG 4.1.3).
|
|
92
|
+
- 고정 폭 숫자로 된 `<span>` 하나만 그리고 아무것도 감싸지 않으므로, 제목, 버튼, 본문
|
|
93
|
+
안에 넣어도 됩니다.
|
|
94
|
+
- `durationMs` 기본값은 `motion.slower`(700ms)입니다. 이보다 길면 화면이 이미 아는
|
|
95
|
+
숫자를 사용자가 기다리게 됩니다.
|
|
96
|
+
|
|
97
|
+
## 속성
|
|
98
|
+
|
|
99
|
+
`format`은 중간 값마다 호출되며, 기본값은 반올림한 뒤 쉼표로 자릿수를 묶습니다. 나중에
|
|
100
|
+
`to`가 바뀌면 마지막으로 멈춘 값에서 이어서 셉니다.
|
|
101
|
+
|
|
102
|
+
</Ko>
|
|
103
|
+
|
|
104
|
+
<ArgTypes
|
|
105
|
+
of={CountUpStories}
|
|
106
|
+
include={['to', 'from', 'durationMs', 'delayMs', 'format', 'onEnd']}
|
|
107
|
+
/>
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as RangeStories from './RangeDatePicker.stories';
|
|
5
|
+
|
|
6
|
+
<Meta title="Components/DatePicker/Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# SingleDatePicker, RangeDatePicker
|
|
13
|
+
|
|
14
|
+
A button that opens a calendar for picking one date, or a start and end date.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- `RangeDatePicker`: a period to filter by: audit logs, API key usage, group
|
|
19
|
+
usage.
|
|
20
|
+
- `SingleDatePicker`: one day, such as an expiry date or a scheduled send.
|
|
21
|
+
|
|
22
|
+
## When not to use
|
|
23
|
+
|
|
24
|
+
- A whole month or a range of months → `MonthPicker`.
|
|
25
|
+
- A date the user knows by heart and types faster than they click, such as a
|
|
26
|
+
date of birth → `Input` with a clear format.
|
|
27
|
+
- A handful of preset periods (last 7 days, last 30 days) → `SegmentedControl`
|
|
28
|
+
or `SelectField`, optionally next to a range picker for "custom".
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
Both wrap `chakra-dayzed-datepicker`; its props pass through.
|
|
33
|
+
`SingleDatePicker` takes `date` and `onDateChange(date)`; `RangeDatePicker`
|
|
34
|
+
takes `selectedDates` and `onDateChange(dates)`. Month and weekday names and
|
|
35
|
+
the default `configs.dateFormat` follow the provider language. The trigger is
|
|
36
|
+
a secondary `Button` with a calendar icon; style it with
|
|
37
|
+
`propsConfigs.triggerBtnProps`. The calendar is portalled (`usePortal`
|
|
38
|
+
defaults to `true`).
|
|
39
|
+
|
|
40
|
+
## Do / Don't
|
|
41
|
+
|
|
42
|
+
</En>
|
|
43
|
+
|
|
44
|
+
<Ko>
|
|
45
|
+
|
|
46
|
+
# SingleDatePicker, RangeDatePicker
|
|
47
|
+
|
|
48
|
+
버튼을 누르면 달력이 열리고, 날짜 하나나 시작일과 종료일을 고릅니다.
|
|
49
|
+
|
|
50
|
+
## 언제 쓰나요
|
|
51
|
+
|
|
52
|
+
- `RangeDatePicker`: 감사 로그, API 키 사용량, 그룹 사용량처럼 기간으로 거를 때.
|
|
53
|
+
- `SingleDatePicker`: 만료일이나 예약 발송일처럼 하루를 고를 때.
|
|
54
|
+
|
|
55
|
+
## 언제 쓰지 않나요
|
|
56
|
+
|
|
57
|
+
- 한 달이나 여러 달의 범위는 `MonthPicker`를 씁니다.
|
|
58
|
+
- 생년월일처럼 외우고 있어서 누르는 것보다 입력이 빠른 날짜는 형식을 분명히 적은
|
|
59
|
+
`Input`을 씁니다.
|
|
60
|
+
- 최근 7일, 최근 30일 같은 정해진 기간 몇 개는 `SegmentedControl`이나
|
|
61
|
+
`SelectField`를 쓰고, 필요하면 "직접 지정"용으로 기간 선택기를 옆에 둡니다.
|
|
62
|
+
|
|
63
|
+
## 속성
|
|
64
|
+
|
|
65
|
+
둘 다 `chakra-dayzed-datepicker`를 감싸며, 그 속성이 그대로 전달됩니다.
|
|
66
|
+
`SingleDatePicker`는 `date`와 `onDateChange(date)`를, `RangeDatePicker`는
|
|
67
|
+
`selectedDates`와 `onDateChange(dates)`를 받습니다. 월과 요일 이름, 기본
|
|
68
|
+
`configs.dateFormat`은 프로바이더의 언어를 따릅니다. 트리거는 달력 아이콘이 있는
|
|
69
|
+
secondary `Button`이고, 모양은 `propsConfigs.triggerBtnProps`로 바꿉니다. 달력은
|
|
70
|
+
포털로 그려집니다(`usePortal` 기본값 `true`).
|
|
71
|
+
|
|
72
|
+
## 이렇게 하세요 / 이렇게 하지 마세요
|
|
73
|
+
|
|
74
|
+
</Ko>
|
|
75
|
+
|
|
76
|
+
<Canvas of={RangeStories.DoLabelledRange} />
|
|
77
|
+
<Verdict
|
|
78
|
+
kind="do"
|
|
79
|
+
en="Label the filter and start from a sensible default range, so the page shows data before anyone touches the picker."
|
|
80
|
+
ko="필터에 라벨을 붙이고 알맞은 기본 기간으로 시작합니다. 그래야 선택기를 건드리기 전에도 화면에 데이터가 보입니다."
|
|
81
|
+
/>
|
|
82
|
+
|
|
83
|
+
<Canvas of={RangeStories.DontEmptyTrigger} />
|
|
84
|
+
<Verdict
|
|
85
|
+
kind="dont"
|
|
86
|
+
en="Leave the trigger empty with no label. It shows only an icon, and a screen reader hears a button with no name."
|
|
87
|
+
ko="라벨 없이 빈 트리거를 두지 마세요. 아이콘만 보이고, 화면 낭독기에는 이름 없는 버튼으로 들립니다."
|
|
88
|
+
/>
|
|
89
|
+
|
|
90
|
+
<En>
|
|
91
|
+
|
|
92
|
+
## Content
|
|
93
|
+
|
|
94
|
+
- Label the period (조회 기간, 만료일), not the action (날짜 선택).
|
|
95
|
+
- Leave the date format to the default for the language unless the screen
|
|
96
|
+
already uses another one.
|
|
97
|
+
|
|
98
|
+
## Accessibility
|
|
99
|
+
|
|
100
|
+
What the pickers do for you:
|
|
101
|
+
|
|
102
|
+
- The trigger is a real `button`, reachable with Tab, and the selected date
|
|
103
|
+
is its text.
|
|
104
|
+
- The calendar's day buttons and their keyboard behaviour come from
|
|
105
|
+
`chakra-dayzed-datepicker`. Check them with a keyboard on your screen before
|
|
106
|
+
relying on them (WCAG 2.1.1).
|
|
107
|
+
|
|
108
|
+
What you still have to do:
|
|
109
|
+
|
|
110
|
+
- **Name the trigger.** Its accessible name is the date text only, and it is
|
|
111
|
+
empty when nothing is picked. Put it in `FieldRow` with a label, and give
|
|
112
|
+
the button an `aria-label` through `propsConfigs.triggerBtnProps` when it
|
|
113
|
+
can be empty (WCAG 4.1.2; KWCAG 5.3.4.1 레이블 제공).
|
|
114
|
+
- Keep an `Input` route for dates far from today; paging month by month to a
|
|
115
|
+
date years away is slow for everyone.
|
|
116
|
+
|
|
117
|
+
## Tokens
|
|
118
|
+
|
|
119
|
+
The trigger reads the secondary `Button` tokens. The calendar reads:
|
|
120
|
+
|
|
121
|
+
</En>
|
|
122
|
+
|
|
123
|
+
<Ko>
|
|
124
|
+
|
|
125
|
+
## 문구
|
|
126
|
+
|
|
127
|
+
- 동작(날짜 선택)이 아니라 기간의 이름(조회 기간, 만료일)을 라벨로 씁니다.
|
|
128
|
+
- 화면이 이미 다른 형식을 쓰고 있지 않다면 날짜 형식은 언어별 기본값을 그대로 씁니다.
|
|
129
|
+
|
|
130
|
+
## 접근성
|
|
131
|
+
|
|
132
|
+
선택기가 알아서 하는 일
|
|
133
|
+
|
|
134
|
+
- 트리거는 실제 `button`이라 Tab으로 갈 수 있고, 고른 날짜가 버튼의 글자가 됩니다.
|
|
135
|
+
- 달력의 날짜 버튼과 키보드 동작은 `chakra-dayzed-datepicker`가 제공합니다. 화면에
|
|
136
|
+
쓰기 전에 키보드로 직접 확인합니다(WCAG 2.1.1).
|
|
137
|
+
|
|
138
|
+
직접 챙겨야 하는 일
|
|
139
|
+
|
|
140
|
+
- **트리거에 이름을 붙입니다.** 접근 가능한 이름은 날짜 글자뿐이라 아무것도 고르지
|
|
141
|
+
않으면 비어 있습니다. 라벨이 있는 `FieldRow`에 넣고, 비어 있을 수 있다면
|
|
142
|
+
`propsConfigs.triggerBtnProps`로 버튼에 `aria-label`을 줍니다(WCAG 4.1.2, KWCAG
|
|
143
|
+
5.3.4.1 레이블 제공).
|
|
144
|
+
- 오늘과 멀리 떨어진 날짜는 `Input`으로도 넣을 수 있게 합니다. 몇 년 떨어진 날짜까지 한
|
|
145
|
+
달씩 넘기는 것은 누구에게나 느립니다.
|
|
146
|
+
|
|
147
|
+
## 토큰
|
|
148
|
+
|
|
149
|
+
트리거는 secondary `Button`의 토큰을 씁니다. 달력은 아래 토큰을 씁니다.
|
|
150
|
+
|
|
151
|
+
</Ko>
|
|
152
|
+
|
|
153
|
+
<Canvas of={RangeStories.UsageTokens} sourceState="none" />
|
|
154
|
+
|
|
155
|
+
<En>
|
|
156
|
+
|
|
157
|
+
## Related
|
|
158
|
+
|
|
159
|
+
- **MonthPicker**: months and month ranges.
|
|
160
|
+
- **SegmentedControl** / **SelectField**: preset periods.
|
|
161
|
+
- **FieldRow**: the label.
|
|
162
|
+
- Live examples: <code>Components/DatePicker/SingleDatePicker</code> and
|
|
163
|
+
<code>RangeDatePicker</code>.
|
|
164
|
+
|
|
165
|
+
</En>
|
|
166
|
+
|
|
167
|
+
<Ko>
|
|
168
|
+
|
|
169
|
+
## 관련 컴포넌트
|
|
170
|
+
|
|
171
|
+
- **MonthPicker**: 월과 월 범위.
|
|
172
|
+
- **SegmentedControl** / **SelectField**: 정해진 기간.
|
|
173
|
+
- **FieldRow**: 라벨.
|
|
174
|
+
- 실제 예시: <code>Components/DatePicker/SingleDatePicker</code>와
|
|
175
|
+
<code>RangeDatePicker</code>.
|
|
176
|
+
|
|
177
|
+
</Ko>
|
|
@@ -5,6 +5,9 @@ import { useState } from 'react';
|
|
|
5
5
|
import { formatDateByLocale } from '@/utils/formatDateByLocale';
|
|
6
6
|
|
|
7
7
|
import { Text } from '../Typography';
|
|
8
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
9
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
10
|
+
import { FieldRow } from '../Form';
|
|
8
11
|
import { RangeDatePicker } from './RangeDatePicker';
|
|
9
12
|
|
|
10
13
|
const meta = {
|
|
@@ -15,7 +18,7 @@ const meta = {
|
|
|
15
18
|
new Date(),
|
|
16
19
|
new Date(),
|
|
17
20
|
]);
|
|
18
|
-
|
|
21
|
+
|
|
19
22
|
return (
|
|
20
23
|
<>
|
|
21
24
|
<Box mb={2}>
|
|
@@ -31,11 +34,92 @@ const meta = {
|
|
|
31
34
|
</Text>
|
|
32
35
|
</>
|
|
33
36
|
);
|
|
34
|
-
}
|
|
37
|
+
},
|
|
35
38
|
} satisfies Meta<typeof RangeDatePicker>;
|
|
36
39
|
|
|
37
40
|
export default meta;
|
|
38
41
|
|
|
39
42
|
type Story = StoryObj<typeof RangeDatePicker>;
|
|
40
43
|
|
|
41
|
-
export const Basic: Story = {}
|
|
44
|
+
export const Basic: Story = {};
|
|
45
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
46
|
+
// Pulled into `DatePicker.usage.mdx` with <Canvas of={…} />. Hidden (`!dev`).
|
|
47
|
+
|
|
48
|
+
export const DoLabelledRange: Story = {
|
|
49
|
+
tags: ['!dev'],
|
|
50
|
+
parameters: { layout: 'padded' },
|
|
51
|
+
name: 'Usage / Do: a labelled filter with a default range',
|
|
52
|
+
render: () => {
|
|
53
|
+
const [dates, setDates] = useState<Date[]>([
|
|
54
|
+
new Date(2026, 9, 1),
|
|
55
|
+
new Date(2026, 9, 22),
|
|
56
|
+
]);
|
|
57
|
+
return (
|
|
58
|
+
<Box maxW="360px">
|
|
59
|
+
<FieldRow label="조회 기간">
|
|
60
|
+
<RangeDatePicker selectedDates={dates} onDateChange={setDates} />
|
|
61
|
+
</FieldRow>
|
|
62
|
+
</Box>
|
|
63
|
+
);
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const DontEmptyTrigger: Story = {
|
|
68
|
+
tags: ['!dev'],
|
|
69
|
+
parameters: { layout: 'padded' },
|
|
70
|
+
name: "Usage / Don't: an empty trigger with no label",
|
|
71
|
+
render: () => {
|
|
72
|
+
const [dates, setDates] = useState<Date[]>([]);
|
|
73
|
+
return <RangeDatePicker selectedDates={dates} onDateChange={setDates} />;
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/** Tokens the calendar reads, as written in `RangeDatePicker.tsx`. */
|
|
78
|
+
export const UsageTokens: Story = {
|
|
79
|
+
tags: ['!dev'],
|
|
80
|
+
parameters: { layout: 'padded' },
|
|
81
|
+
name: 'Usage / Tokens',
|
|
82
|
+
render: () => (
|
|
83
|
+
<TokenTable
|
|
84
|
+
rows={[
|
|
85
|
+
{
|
|
86
|
+
token: 'primary.main',
|
|
87
|
+
use: (
|
|
88
|
+
<T
|
|
89
|
+
en="Selected day; month arrows"
|
|
90
|
+
ko="선택한 날짜, 월 이동 화살표"
|
|
91
|
+
/>
|
|
92
|
+
),
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
token: 'fg.onPrimary',
|
|
96
|
+
use: <T en="Selected day number" ko="선택한 날짜 숫자" />,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
token: 'primary.selected',
|
|
100
|
+
use: <T en="Days inside the range" ko="기간 안의 날짜" />,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
token: 'primary.wash',
|
|
104
|
+
use: <T en="Day on hover" ko="마우스를 올린 날짜" />,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
token: 'border.strong',
|
|
108
|
+
use: <T en="Today outline" ko="오늘 표시 테두리" />,
|
|
109
|
+
},
|
|
110
|
+
{ token: 'fg.muted', use: <T en="Weekday names" ko="요일 이름" /> },
|
|
111
|
+
{
|
|
112
|
+
token: 'fg.subtle',
|
|
113
|
+
use: (
|
|
114
|
+
<T en="Calendar icon in the trigger" ko="트리거의 달력 아이콘" />
|
|
115
|
+
),
|
|
116
|
+
},
|
|
117
|
+
{ token: 'bg.surface', use: <T en="Calendar panel" ko="달력 패널" /> },
|
|
118
|
+
{
|
|
119
|
+
token: 'border.default',
|
|
120
|
+
use: <T en="Calendar panel border" ko="달력 패널 테두리" />,
|
|
121
|
+
},
|
|
122
|
+
]}
|
|
123
|
+
/>
|
|
124
|
+
),
|
|
125
|
+
};
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
export interface ErrorFallbackProps {
|
|
2
|
+
/** The caught error. Its `message` is shown as is; a translated default when empty. */
|
|
2
3
|
error: Error | null;
|
|
4
|
+
/** ID shown for support; generated (`ERR-…`) when missing. */
|
|
3
5
|
errorId?: string;
|
|
6
|
+
/** ISO time for the copied report only; the card shows the render time. */
|
|
4
7
|
timestamp?: string;
|
|
8
|
+
/** Where it failed, shown and copied; "unknown" (translated) when missing. */
|
|
5
9
|
componentName?: string;
|
|
10
|
+
/** Shown and copied; "anonymous" (translated) when missing. */
|
|
6
11
|
userId?: string;
|
|
12
|
+
/** Called by the "try again" button, e.g. the error boundary's reset. */
|
|
7
13
|
onErrorReset?: () => void;
|
|
8
14
|
}
|
|
9
15
|
|