@mindlogic-ai/logician-ui 5.0.0-alpha.2 → 5.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/components/Avatar/Avatar.d.ts +68 -11
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.js +41 -5
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/Avatar.mjs +40 -5
- package/dist/components/Avatar/Avatar.mjs.map +1 -1
- package/dist/components/Avatar/index.d.ts +2 -2
- package/dist/components/Avatar/index.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.js +5 -3
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge/Badge.mjs +5 -3
- package/dist/components/Badge/Badge.mjs.map +1 -1
- package/dist/components/Badge/Badge.types.d.ts +7 -5
- package/dist/components/Badge/Badge.types.d.ts.map +1 -1
- package/dist/components/Banner/Banner.types.d.ts +24 -1
- package/dist/components/Banner/Banner.types.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.styles.d.ts +2 -2
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +31 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.mjs +31 -3
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Button/Button.types.d.ts +38 -1
- package/dist/components/Button/Button.types.d.ts.map +1 -1
- package/dist/components/Card/Card.types.d.ts +12 -0
- package/dist/components/Card/Card.types.d.ts.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.styles.d.ts +6 -5
- package/dist/components/CodeTabs/CodeTabs.styles.d.ts.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.styles.js +6 -5
- package/dist/components/CodeTabs/CodeTabs.styles.js.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.styles.mjs +6 -5
- package/dist/components/CodeTabs/CodeTabs.styles.mjs.map +1 -1
- package/dist/components/ColorMode/ColorModeToggle.d.ts +7 -2
- package/dist/components/ColorMode/ColorModeToggle.d.ts.map +1 -1
- package/dist/components/ColorMode/ColorModeToggle.js +8 -3
- package/dist/components/ColorMode/ColorModeToggle.js.map +1 -1
- package/dist/components/ColorMode/ColorModeToggle.mjs +8 -3
- package/dist/components/ColorMode/ColorModeToggle.mjs.map +1 -1
- package/dist/components/Confetti/Confetti.types.d.ts +5 -1
- package/dist/components/Confetti/Confetti.types.d.ts.map +1 -1
- package/dist/components/Confetti/confettiColors.d.ts +5 -5
- package/dist/components/Confetti/confettiColors.js +5 -5
- package/dist/components/Confetti/confettiColors.mjs +5 -5
- package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
- package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.js +2 -2
- package/dist/components/Form/FormModalFooter/FormModalFooter.js.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.mjs +2 -2
- package/dist/components/Form/FormModalFooter/FormModalFooter.mjs.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts +11 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts.map +1 -1
- package/dist/components/Form/FormSection/CollapsibleFormSection.js +1 -0
- package/dist/components/Form/FormSection/CollapsibleFormSection.js.map +1 -1
- package/dist/components/Form/FormSection/CollapsibleFormSection.mjs +1 -0
- package/dist/components/Form/FormSection/CollapsibleFormSection.mjs.map +1 -1
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.js +4 -0
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/Input.mjs +4 -0
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
- package/dist/components/LineGraph/LineGraph.js +4 -5
- package/dist/components/LineGraph/LineGraph.js.map +1 -1
- package/dist/components/LineGraph/LineGraph.mjs +5 -6
- package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
- package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
- package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
- package/dist/components/LineGraph/seriesColors.d.ts +12 -8
- package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
- package/dist/components/LineGraph/seriesColors.js +8 -7
- package/dist/components/LineGraph/seriesColors.js.map +1 -1
- package/dist/components/LineGraph/seriesColors.mjs +8 -7
- package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
- package/dist/components/Masonry/Masonry.types.d.ts +8 -3
- package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
- package/dist/components/Menu/MenuItem.types.d.ts +8 -0
- package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
- package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
- package/dist/components/Modal/ModalCloseButton.js +1 -1
- package/dist/components/Modal/ModalCloseButton.mjs +1 -1
- package/dist/components/NavList/NavList.d.ts +35 -0
- package/dist/components/NavList/NavList.d.ts.map +1 -0
- package/dist/components/NavList/NavList.js +113 -0
- package/dist/components/NavList/NavList.js.map +1 -0
- package/dist/components/NavList/NavList.mjs +111 -0
- package/dist/components/NavList/NavList.mjs.map +1 -0
- package/dist/components/NavList/NavList.styles.d.ts +90 -0
- package/dist/components/NavList/NavList.styles.d.ts.map +1 -0
- package/dist/components/NavList/NavList.styles.js +104 -0
- package/dist/components/NavList/NavList.styles.js.map +1 -0
- package/dist/components/NavList/NavList.styles.mjs +97 -0
- package/dist/components/NavList/NavList.styles.mjs.map +1 -0
- package/dist/components/NavList/NavList.translations.json.js +19 -0
- package/dist/components/NavList/NavList.translations.json.js.map +1 -0
- package/dist/components/NavList/NavList.translations.json.mjs +14 -0
- package/dist/components/NavList/NavList.translations.json.mjs.map +1 -0
- package/dist/components/NavList/NavList.types.d.ts +140 -0
- package/dist/components/NavList/NavList.types.d.ts.map +1 -0
- package/dist/components/NavList/NavListContext.d.ts +30 -0
- package/dist/components/NavList/NavListContext.d.ts.map +1 -0
- package/dist/components/NavList/NavListContext.js +16 -0
- package/dist/components/NavList/NavListContext.js.map +1 -0
- package/dist/components/NavList/NavListContext.mjs +13 -0
- package/dist/components/NavList/NavListContext.mjs.map +1 -0
- package/dist/components/NavList/NavListGroup.d.ts +31 -0
- package/dist/components/NavList/NavListGroup.d.ts.map +1 -0
- package/dist/components/NavList/NavListGroup.js +115 -0
- package/dist/components/NavList/NavListGroup.js.map +1 -0
- package/dist/components/NavList/NavListGroup.mjs +113 -0
- package/dist/components/NavList/NavListGroup.mjs.map +1 -0
- package/dist/components/NavList/NavListItem.d.ts +16 -0
- package/dist/components/NavList/NavListItem.d.ts.map +1 -0
- package/dist/components/NavList/NavListItem.js +284 -0
- package/dist/components/NavList/NavListItem.js.map +1 -0
- package/dist/components/NavList/NavListItem.mjs +282 -0
- package/dist/components/NavList/NavListItem.mjs.map +1 -0
- package/dist/components/NavList/NavListSkeleton.d.ts +17 -0
- package/dist/components/NavList/NavListSkeleton.d.ts.map +1 -0
- package/dist/components/NavList/NavListSkeleton.js +33 -0
- package/dist/components/NavList/NavListSkeleton.js.map +1 -0
- package/dist/components/NavList/NavListSkeleton.mjs +31 -0
- package/dist/components/NavList/NavListSkeleton.mjs.map +1 -0
- package/dist/components/NavList/index.d.ts +7 -0
- package/dist/components/NavList/index.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +11 -10
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +11 -10
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/Pagination.mjs +11 -10
- package/dist/components/Pagination/Pagination.mjs.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
- package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
- package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
- package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
- package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
- package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +6 -7
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.mjs +6 -7
- package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
- package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
- package/dist/components/Select/Combobox.d.ts +1 -1
- package/dist/components/Select/Combobox.d.ts.map +1 -1
- package/dist/components/Select/Combobox.js +9 -2
- package/dist/components/Select/Combobox.js.map +1 -1
- package/dist/components/Select/Combobox.mjs +10 -3
- package/dist/components/Select/Combobox.mjs.map +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +14 -2
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/Select.mjs +15 -3
- package/dist/components/Select/Select.mjs.map +1 -1
- package/dist/components/Select/Select.styles.d.ts +97 -1
- package/dist/components/Select/Select.styles.d.ts.map +1 -1
- package/dist/components/Select/Select.styles.js +83 -0
- package/dist/components/Select/Select.styles.js.map +1 -1
- package/dist/components/Select/Select.styles.mjs +82 -1
- package/dist/components/Select/Select.styles.mjs.map +1 -1
- package/dist/components/Tabs/Tab/Tab.styles.d.ts +1 -1
- package/dist/components/Tabs/Tab/Tab.styles.js +1 -1
- package/dist/components/Tabs/Tab/Tab.styles.mjs +1 -1
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.js +4 -0
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/Textarea.mjs +4 -0
- package/dist/components/Textarea/Textarea.mjs.map +1 -1
- package/dist/components/Toast/Toast.styles.d.ts +6 -2
- package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
- package/dist/components/Toast/Toast.styles.js +18 -10
- package/dist/components/Toast/Toast.styles.js.map +1 -1
- package/dist/components/Toast/Toast.styles.mjs +18 -10
- package/dist/components/Toast/Toast.styles.mjs.map +1 -1
- package/dist/components/Typography/Caption.d.ts.map +1 -1
- package/dist/components/Typography/Caption.js +1 -1
- package/dist/components/Typography/Caption.js.map +1 -1
- package/dist/components/Typography/Caption.mjs +1 -1
- package/dist/components/Typography/Caption.mjs.map +1 -1
- package/dist/components/Typography/H1.d.ts.map +1 -1
- package/dist/components/Typography/H1.js +1 -1
- package/dist/components/Typography/H1.js.map +1 -1
- package/dist/components/Typography/H1.mjs +1 -1
- package/dist/components/Typography/H1.mjs.map +1 -1
- package/dist/components/Typography/H2.d.ts.map +1 -1
- package/dist/components/Typography/H2.js +1 -1
- package/dist/components/Typography/H2.js.map +1 -1
- package/dist/components/Typography/H2.mjs +1 -1
- package/dist/components/Typography/H2.mjs.map +1 -1
- package/dist/components/Typography/H3.d.ts.map +1 -1
- package/dist/components/Typography/H3.js +1 -1
- package/dist/components/Typography/H3.js.map +1 -1
- package/dist/components/Typography/H3.mjs +1 -1
- package/dist/components/Typography/H3.mjs.map +1 -1
- package/dist/components/Typography/H4.d.ts.map +1 -1
- package/dist/components/Typography/H4.js +1 -1
- package/dist/components/Typography/H4.js.map +1 -1
- package/dist/components/Typography/H4.mjs +1 -1
- package/dist/components/Typography/H4.mjs.map +1 -1
- package/dist/components/Typography/H5.d.ts.map +1 -1
- package/dist/components/Typography/H5.js +1 -1
- package/dist/components/Typography/H5.js.map +1 -1
- package/dist/components/Typography/H5.mjs +1 -1
- package/dist/components/Typography/H5.mjs.map +1 -1
- package/dist/components/Typography/Link.d.ts.map +1 -1
- package/dist/components/Typography/Link.js +1 -1
- package/dist/components/Typography/Link.js.map +1 -1
- package/dist/components/Typography/Link.mjs +1 -1
- package/dist/components/Typography/Link.mjs.map +1 -1
- package/dist/components/Typography/Overline.d.ts.map +1 -1
- package/dist/components/Typography/Overline.js +1 -1
- package/dist/components/Typography/Overline.js.map +1 -1
- package/dist/components/Typography/Overline.mjs +1 -1
- package/dist/components/Typography/Overline.mjs.map +1 -1
- package/dist/components/Typography/Subtext.d.ts.map +1 -1
- package/dist/components/Typography/Subtext.js +1 -1
- package/dist/components/Typography/Subtext.js.map +1 -1
- package/dist/components/Typography/Subtext.mjs +1 -1
- package/dist/components/Typography/Subtext.mjs.map +1 -1
- package/dist/components/Typography/Subtitle.d.ts.map +1 -1
- package/dist/components/Typography/Subtitle.js +1 -1
- package/dist/components/Typography/Subtitle.js.map +1 -1
- package/dist/components/Typography/Subtitle.mjs +1 -1
- package/dist/components/Typography/Subtitle.mjs.map +1 -1
- package/dist/components/Typography/Text.d.ts.map +1 -1
- package/dist/components/Typography/Text.js +1 -1
- package/dist/components/Typography/Text.js.map +1 -1
- package/dist/components/Typography/Text.mjs +1 -1
- package/dist/components/Typography/Text.mjs.map +1 -1
- package/dist/hooks/useLanguage.d.ts +5 -0
- package/dist/hooks/useLanguage.d.ts.map +1 -1
- package/dist/hooks/useLanguage.js +7 -3
- package/dist/hooks/useLanguage.js.map +1 -1
- package/dist/hooks/useLanguage.mjs +7 -4
- package/dist/hooks/useLanguage.mjs.map +1 -1
- package/dist/hooks/useTranslate.d.ts.map +1 -1
- package/dist/hooks/useTranslate.js +8 -5
- package/dist/hooks/useTranslate.js.map +1 -1
- package/dist/hooks/useTranslate.mjs +8 -5
- package/dist/hooks/useTranslate.mjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/dist/theme/colors.d.ts +2 -2
- package/dist/theme/colors.d.ts.map +1 -1
- package/dist/theme/colors.js +54 -18
- package/dist/theme/colors.js.map +1 -1
- package/dist/theme/colors.mjs +55 -19
- package/dist/theme/colors.mjs.map +1 -1
- package/dist/theme/global.d.ts.map +1 -1
- package/dist/theme/global.js +19 -1
- package/dist/theme/global.js.map +1 -1
- package/dist/theme/global.mjs +19 -1
- package/dist/theme/global.mjs.map +1 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +2 -0
- package/dist/theme/index.mjs.map +1 -1
- package/dist/theme/palette.generated.d.ts +232 -123
- package/dist/theme/palette.generated.d.ts.map +1 -1
- package/dist/theme/palette.generated.js +233 -123
- package/dist/theme/palette.generated.js.map +1 -1
- package/dist/theme/palette.generated.mjs +233 -124
- package/dist/theme/palette.generated.mjs.map +1 -1
- package/dist/theme/paletteSwatches.d.ts +20 -0
- package/dist/theme/paletteSwatches.d.ts.map +1 -1
- package/dist/theme/recipes/avatar.d.ts +30 -0
- package/dist/theme/recipes/avatar.d.ts.map +1 -0
- package/dist/theme/recipes/avatar.js +96 -0
- package/dist/theme/recipes/avatar.js.map +1 -0
- package/dist/theme/recipes/avatar.mjs +94 -0
- package/dist/theme/recipes/avatar.mjs.map +1 -0
- package/dist/translations/Defaults.translations.json.js +19 -1
- package/dist/translations/Defaults.translations.json.js.map +1 -1
- package/dist/translations/Defaults.translations.json.mjs +18 -2
- package/dist/translations/Defaults.translations.json.mjs.map +1 -1
- package/dist/utils/disabledControl.d.ts +8 -1
- package/dist/utils/disabledControl.d.ts.map +1 -1
- package/dist/utils/disabledControl.js +8 -1
- package/dist/utils/disabledControl.js.map +1 -1
- package/dist/utils/disabledControl.mjs +8 -1
- package/dist/utils/disabledControl.mjs.map +1 -1
- package/dist/utils/focusRing.d.ts +22 -0
- package/dist/utils/focusRing.d.ts.map +1 -1
- package/dist/utils/focusRing.js +22 -0
- package/dist/utils/focusRing.js.map +1 -1
- package/dist/utils/focusRing.mjs +21 -1
- package/dist/utils/focusRing.mjs.map +1 -1
- package/package.json +2 -1
- package/src/components/Accordion/Accordion.stories.tsx +85 -0
- package/src/components/Accordion/Accordion.usage.mdx +200 -0
- package/src/components/Appear/Appear.usage.mdx +107 -0
- package/src/components/Avatar/Avatar.recipe.test.tsx +176 -0
- package/src/components/Avatar/Avatar.stories.tsx +199 -24
- package/src/components/Avatar/Avatar.tsx +118 -21
- package/src/components/Avatar/Avatar.usage.mdx +185 -0
- package/src/components/Avatar/index.tsx +8 -1
- package/src/components/Badge/Badge.stories.tsx +193 -3
- package/src/components/Badge/Badge.tsx +5 -3
- package/src/components/Badge/Badge.types.ts +7 -5
- package/src/components/Badge/Badge.usage.mdx +265 -0
- package/src/components/Banner/Banner.stories.tsx +152 -2
- package/src/components/Banner/Banner.types.ts +30 -1
- package/src/components/Banner/Banner.usage.mdx +233 -0
- package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
- package/src/components/BottomSheet/BottomSheet.test.tsx +2 -1
- package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
- package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
- package/src/components/Button/Button.focusableWhenDisabled.test.tsx +218 -0
- package/src/components/Button/Button.stories.tsx +332 -3
- package/src/components/Button/Button.tsx +46 -3
- package/src/components/Button/Button.types.ts +38 -1
- package/src/components/Button/Button.usage.mdx +358 -0
- package/src/components/Button/Button.variants.test.tsx +13 -1
- package/src/components/Card/Card.stories.tsx +106 -0
- package/src/components/Card/Card.types.ts +12 -0
- package/src/components/Card/Card.usage.mdx +216 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
- package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
- package/src/components/Chip/Chip.usage.mdx +78 -0
- package/src/components/Code/Code.stories.tsx +60 -0
- package/src/components/Code/Code.usage.mdx +187 -0
- package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
- package/src/components/CodeTabs/CodeTabs.styles.ts +6 -5
- package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
- package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
- package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
- package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
- package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
- package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
- package/src/components/Confetti/Confetti.types.ts +5 -1
- package/src/components/Confetti/Confetti.usage.mdx +111 -0
- package/src/components/Confetti/confettiColors.ts +5 -5
- package/src/components/Container/Container.stories.tsx +32 -0
- package/src/components/Container/Container.usage.mdx +130 -0
- package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
- package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
- package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
- package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
- package/src/components/CountUp/CountUp.usage.mdx +107 -0
- package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
- package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
- package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
- package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
- package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
- package/src/components/ExpandableText/ExpandableText.usage.mdx +176 -0
- package/src/components/FileInput/FileInput.stories.tsx +38 -1
- package/src/components/FileInput/FileInput.usage.mdx +178 -0
- package/src/components/FileItem/FileItem.stories.tsx +71 -0
- package/src/components/FileItem/FileItem.usage.mdx +180 -0
- package/src/components/FileList/FileList.stories.tsx +25 -0
- package/src/components/FileList/FileList.usage.mdx +165 -0
- package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
- package/src/components/Form/Form.stories.tsx +149 -0
- package/src/components/Form/Form.usage.mdx +203 -0
- package/src/components/Form/FormModalFooter/FormModalFooter.stories.tsx +1 -1
- package/src/components/Form/FormModalFooter/FormModalFooter.test.tsx +19 -1
- package/src/components/Form/FormModalFooter/FormModalFooter.tsx +2 -0
- package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +11 -1
- package/src/components/FormControl/FormControl.stories.tsx +35 -0
- package/src/components/FormControl/FormControl.usage.mdx +128 -0
- package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
- package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
- package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
- package/src/components/Icon/Icon.stories.tsx +61 -1
- package/src/components/Icon/Icon.usage.mdx +158 -0
- package/src/components/IconButton/IconButton.stories.tsx +213 -5
- package/src/components/IconButton/IconButton.usage.mdx +275 -0
- package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
- package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
- package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
- package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
- package/src/components/Input/Input.stories.tsx +180 -0
- package/src/components/Input/Input.tsx +4 -0
- package/src/components/Input/Input.usage.mdx +278 -0
- package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
- package/src/components/LineGraph/LineGraph.tsx +4 -5
- package/src/components/LineGraph/LineGraph.types.ts +12 -2
- package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
- package/src/components/LineGraph/seriesColors.test.ts +10 -9
- package/src/components/LineGraph/seriesColors.ts +18 -16
- package/src/components/Loaders/Loaders.stories.tsx +93 -0
- package/src/components/Loaders/Loaders.usage.mdx +180 -0
- package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
- package/src/components/Markdown/Markdown.stories.tsx +53 -0
- package/src/components/Markdown/Markdown.usage.mdx +182 -0
- package/src/components/Masonry/Masonry.stories.tsx +63 -1
- package/src/components/Masonry/Masonry.types.ts +8 -3
- package/src/components/Masonry/Masonry.usage.mdx +142 -0
- package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
- package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
- package/src/components/Menu/Menu.stories.tsx +146 -2
- package/src/components/Menu/Menu.usage.mdx +238 -0
- package/src/components/Menu/MenuItem.types.ts +8 -0
- package/src/components/Modal/Modal.stories.tsx +177 -1
- package/src/components/Modal/Modal.usage.mdx +262 -0
- package/src/components/Modal/ModalCloseButton.tsx +1 -1
- package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
- package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
- package/src/components/NavList/NavList.stories.tsx +927 -0
- package/src/components/NavList/NavList.styles.ts +114 -0
- package/src/components/NavList/NavList.test.tsx +1306 -0
- package/src/components/NavList/NavList.translations.json +9 -0
- package/src/components/NavList/NavList.tsx +160 -0
- package/src/components/NavList/NavList.types.ts +155 -0
- package/src/components/NavList/NavList.usage.mdx +545 -0
- package/src/components/NavList/NavListContext.ts +25 -0
- package/src/components/NavList/NavListGroup.tsx +243 -0
- package/src/components/NavList/NavListItem.tsx +543 -0
- package/src/components/NavList/NavListSkeleton.tsx +57 -0
- package/src/components/NavList/index.ts +15 -0
- package/src/components/Pagination/Pagination.stories.tsx +90 -1
- package/src/components/Pagination/Pagination.tsx +11 -10
- package/src/components/Pagination/Pagination.usage.mdx +186 -0
- package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
- package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
- package/src/components/PinInput/PinInput.stories.tsx +91 -0
- package/src/components/PinInput/PinInput.usage.mdx +194 -0
- package/src/components/Popover/Popover.stories.tsx +104 -1
- package/src/components/Popover/Popover.usage.mdx +197 -0
- package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
- package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
- package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
- package/src/components/Pulse/Pulse.usage.mdx +102 -0
- package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
- package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
- package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
- package/src/components/Radio/Radio.stories.tsx +119 -0
- package/src/components/Radio/Radio.usage.mdx +187 -0
- package/src/components/Reveal/Reveal.usage.mdx +105 -0
- package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
- package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
- package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
- package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +6 -7
- package/src/components/SegmentedControl/SegmentedControl.usage.mdx +209 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
- package/src/components/Select/Combobox.tsx +28 -3
- package/src/components/Select/Select.clearTrigger.test.tsx +76 -0
- package/src/components/Select/Select.stories.tsx +290 -1
- package/src/components/Select/Select.styles.ts +89 -0
- package/src/components/Select/Select.tsx +28 -2
- package/src/components/Select/Select.usage.mdx +341 -0
- package/src/components/Shake/Shake.usage.mdx +107 -0
- package/src/components/Slider/Slider.stories.tsx +116 -0
- package/src/components/Slider/Slider.usage.mdx +179 -0
- package/src/components/Spinner/Spinner.stories.tsx +64 -0
- package/src/components/Spinner/Spinner.usage.mdx +136 -0
- package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
- package/src/components/Switch/Switch.stories.tsx +131 -6
- package/src/components/Switch/Switch.usage.mdx +199 -0
- package/src/components/Table/Table.stories.tsx +159 -1
- package/src/components/Table/Table.usage.mdx +235 -0
- package/src/components/Tabs/Tab/Tab.styles.ts +1 -1
- package/src/components/Tabs/Tabs.stories.tsx +86 -0
- package/src/components/Tabs/Tabs.usage.mdx +263 -0
- package/src/components/Tag/Tag.stories.tsx +181 -4
- package/src/components/Tag/Tag.usage.mdx +257 -0
- package/src/components/Textarea/Textarea.stories.tsx +113 -0
- package/src/components/Textarea/Textarea.tsx +4 -0
- package/src/components/Textarea/Textarea.usage.mdx +186 -0
- package/src/components/Toast/Toast.stories.tsx +185 -3
- package/src/components/Toast/Toast.styles.ts +18 -10
- package/src/components/Toast/Toast.usage.mdx +265 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
- package/src/components/Tooltip/Tooltip.usage.mdx +219 -0
- package/src/components/Tree/Tree.stories.tsx +89 -0
- package/src/components/Tree/Tree.usage.mdx +207 -0
- package/src/components/Typography/Caption.tsx +0 -1
- package/src/components/Typography/H1.tsx +0 -1
- package/src/components/Typography/H2.tsx +0 -1
- package/src/components/Typography/H3.tsx +0 -1
- package/src/components/Typography/H4.tsx +0 -1
- package/src/components/Typography/H5.tsx +0 -1
- package/src/components/Typography/Link.tsx +0 -1
- package/src/components/Typography/Overline.tsx +0 -1
- package/src/components/Typography/Subtext.tsx +0 -1
- package/src/components/Typography/Subtitle.tsx +0 -1
- package/src/components/Typography/Text.tsx +0 -1
- package/src/components/Typography/Typography.stories.tsx +117 -0
- package/src/components/Typography/Typography.usage.mdx +257 -0
- package/src/components/Workflow/Workflow.usage.mdx +199 -0
- package/src/components/a11y.kwcag.test.tsx +66 -0
- package/src/components/claude.md +1 -1
- package/src/components/noRawScales.test.ts +5 -1
- package/src/foundations/BrandAssets.mdx +637 -0
- package/src/foundations/BrandAssets.stories.tsx +680 -0
- package/src/foundations/BrandColour.mdx +366 -0
- package/src/foundations/BrandColour.stories.tsx +343 -0
- package/src/guidelines/ComponentPageTemplate.mdx +84 -0
- package/src/guidelines/FeedbackActions.mdx +162 -23
- package/src/guidelines/_components/Lang.tsx +175 -0
- package/src/guidelines/_components/TokenTable.tsx +136 -0
- package/src/hooks/useLanguage.ts +8 -3
- package/src/hooks/useTranslate.test.tsx +46 -0
- package/src/hooks/useTranslate.ts +7 -5
- package/src/index.ts +7 -1
- package/src/theme/BazePalette.stories.tsx +111 -1
- package/src/theme/Palette.stories.tsx +2 -2
- package/src/theme/SemanticTokens.mdx +76 -17
- package/src/theme/claude.md +23 -9
- package/src/theme/colors.ts +71 -18
- package/src/theme/contrast.test.ts +57 -0
- package/src/theme/global.ts +20 -1
- package/src/theme/index.ts +2 -0
- package/src/theme/palette.generated.ts +233 -123
- package/src/theme/paletteSwatches.test.ts +1 -1
- package/src/theme/paletteSwatches.ts +35 -0
- package/src/theme/recipes/avatar.ts +92 -0
- package/src/translations/Defaults.translations.json +14 -0
- package/src/utils/disabledControl.ts +8 -1
- package/src/utils/focusRing.ts +23 -0
|
@@ -9,6 +9,11 @@ import {
|
|
|
9
9
|
SliderThumbs,
|
|
10
10
|
SliderTrack,
|
|
11
11
|
} from '@/components/Slider';
|
|
12
|
+
import { Flex } from '@chakra-ui/react';
|
|
13
|
+
|
|
14
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
15
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
16
|
+
import { Text } from '../Typography';
|
|
12
17
|
|
|
13
18
|
const meta = {
|
|
14
19
|
title: 'Components/Slider',
|
|
@@ -277,3 +282,114 @@ export const Sizes: Story = {
|
|
|
277
282
|
);
|
|
278
283
|
},
|
|
279
284
|
};
|
|
285
|
+
|
|
286
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
287
|
+
// Pulled into `Slider.usage.mdx` with <Canvas of={…} />. Hidden (`!dev`).
|
|
288
|
+
|
|
289
|
+
export const DoValueBeside: Story = {
|
|
290
|
+
tags: ['!dev'],
|
|
291
|
+
parameters: { layout: 'padded' },
|
|
292
|
+
name: 'Usage / Do: a name and the value beside it',
|
|
293
|
+
render: () => {
|
|
294
|
+
const [value, setValue] = useState([70]);
|
|
295
|
+
return (
|
|
296
|
+
<Flex align="center" gap={4} maxW="420px">
|
|
297
|
+
<Text id="usage-volume" fontWeight="semibold" minW="48px">
|
|
298
|
+
음량
|
|
299
|
+
</Text>
|
|
300
|
+
<Slider
|
|
301
|
+
flex={1}
|
|
302
|
+
ariaLabel="음량"
|
|
303
|
+
value={value}
|
|
304
|
+
min={0}
|
|
305
|
+
max={100}
|
|
306
|
+
onValueChange={(d) => setValue(d.value)}
|
|
307
|
+
>
|
|
308
|
+
<SliderTrack>
|
|
309
|
+
<SliderFilledTrack />
|
|
310
|
+
</SliderTrack>
|
|
311
|
+
<SliderThumb />
|
|
312
|
+
</Slider>
|
|
313
|
+
<Text minW="40px" textAlign="end">
|
|
314
|
+
{value[0]}%
|
|
315
|
+
</Text>
|
|
316
|
+
</Flex>
|
|
317
|
+
);
|
|
318
|
+
},
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
export const DontExactNumber: Story = {
|
|
322
|
+
tags: ['!dev'],
|
|
323
|
+
parameters: { layout: 'padded' },
|
|
324
|
+
name: "Usage / Don't: a slider for an exact number",
|
|
325
|
+
render: () => {
|
|
326
|
+
const [value, setValue] = useState([1250]);
|
|
327
|
+
return (
|
|
328
|
+
<Flex align="center" gap={4} maxW="420px">
|
|
329
|
+
<Text fontWeight="semibold">월 한도</Text>
|
|
330
|
+
<Slider
|
|
331
|
+
flex={1}
|
|
332
|
+
ariaLabel="월 한도"
|
|
333
|
+
value={value}
|
|
334
|
+
min={0}
|
|
335
|
+
max={100000}
|
|
336
|
+
onValueChange={(d) => setValue(d.value)}
|
|
337
|
+
>
|
|
338
|
+
<SliderTrack>
|
|
339
|
+
<SliderFilledTrack />
|
|
340
|
+
</SliderTrack>
|
|
341
|
+
<SliderThumb />
|
|
342
|
+
</Slider>
|
|
343
|
+
</Flex>
|
|
344
|
+
);
|
|
345
|
+
},
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
/** Tokens the slider parts read, as written in their `.tsx` files. */
|
|
349
|
+
export const UsageTokens: Story = {
|
|
350
|
+
tags: ['!dev'],
|
|
351
|
+
parameters: { layout: 'padded' },
|
|
352
|
+
name: 'Usage / Tokens',
|
|
353
|
+
render: () => (
|
|
354
|
+
<TokenTable
|
|
355
|
+
rows={[
|
|
356
|
+
{
|
|
357
|
+
token: 'bg.track',
|
|
358
|
+
use: <T en="Empty rail (SliderTrack)" ko="빈 레일(SliderTrack)" />,
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
token: 'primary.main',
|
|
362
|
+
use: (
|
|
363
|
+
<T
|
|
364
|
+
en="Filled rail and thumb border"
|
|
365
|
+
ko="채운 레일과 손잡이 테두리"
|
|
366
|
+
/>
|
|
367
|
+
),
|
|
368
|
+
},
|
|
369
|
+
{ token: 'bg.canvas', use: <T en="Thumb centre" ko="손잡이 가운데" /> },
|
|
370
|
+
{
|
|
371
|
+
token: 'bg.muted',
|
|
372
|
+
use: (
|
|
373
|
+
<T
|
|
374
|
+
en="Disabled thumb and filled rail"
|
|
375
|
+
ko="비활성 손잡이와 채운 레일"
|
|
376
|
+
/>
|
|
377
|
+
),
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
token: 'border.default',
|
|
381
|
+
use: <T en="Disabled thumb border" ko="비활성 손잡이 테두리" />,
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
token: 'focus.ring',
|
|
385
|
+
use: (
|
|
386
|
+
<T
|
|
387
|
+
en="Keyboard focus ring on the thumb"
|
|
388
|
+
ko="손잡이의 키보드 초점 링"
|
|
389
|
+
/>
|
|
390
|
+
),
|
|
391
|
+
},
|
|
392
|
+
]}
|
|
393
|
+
/>
|
|
394
|
+
),
|
|
395
|
+
};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as SliderStories from './Slider.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={SliderStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# Slider
|
|
13
|
+
|
|
14
|
+
A thumb the user drags along a rail to set a value, or two thumbs for a range,
|
|
15
|
+
when the position matters more than the exact number.
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
- Seeking in audio or video, setting a volume.
|
|
20
|
+
- A value the user tunes by feel and sees the effect of right away, with the
|
|
21
|
+
number shown beside it.
|
|
22
|
+
|
|
23
|
+
## When not to use
|
|
24
|
+
|
|
25
|
+
- An exact number (a credit limit, a count) → `Input` with `type="number"`.
|
|
26
|
+
- A choice between a few named levels → `Radio` or `SegmentedControl`.
|
|
27
|
+
- Showing progress the user cannot change → `ProgressBar`.
|
|
28
|
+
|
|
29
|
+
## Props
|
|
30
|
+
|
|
31
|
+
</En>
|
|
32
|
+
|
|
33
|
+
<Ko>
|
|
34
|
+
|
|
35
|
+
# Slider
|
|
36
|
+
|
|
37
|
+
레일 위의 손잡이를 끌어 값을 정합니다. 손잡이 두 개로 범위도 정할 수 있습니다. 정확한
|
|
38
|
+
숫자보다 위치가 중요할 때 씁니다.
|
|
39
|
+
|
|
40
|
+
## 언제 쓰나요
|
|
41
|
+
|
|
42
|
+
- 오디오나 영상의 재생 위치 이동, 음량 조절.
|
|
43
|
+
- 감으로 맞추면서 결과를 바로 확인하는 값. 숫자는 옆에 함께 보여 줍니다.
|
|
44
|
+
|
|
45
|
+
## 언제 쓰지 않나요
|
|
46
|
+
|
|
47
|
+
- 크레딧 한도나 개수처럼 정확한 숫자는 `type="number"`인 `Input`을 씁니다.
|
|
48
|
+
- 이름 붙은 몇 단계 중 하나를 고를 때는 `Radio`나 `SegmentedControl`을 씁니다.
|
|
49
|
+
- 사용자가 바꿀 수 없는 진행 상황은 `ProgressBar`를 씁니다.
|
|
50
|
+
|
|
51
|
+
## 속성
|
|
52
|
+
|
|
53
|
+
</Ko>
|
|
54
|
+
|
|
55
|
+
<ArgTypes
|
|
56
|
+
of={SliderStories}
|
|
57
|
+
include={['value', 'defaultValue', 'onValueChange', 'ariaLabel']}
|
|
58
|
+
/>
|
|
59
|
+
|
|
60
|
+
<En>
|
|
61
|
+
|
|
62
|
+
Values are arrays: `[50]` for one thumb, `[20, 80]` for a range. Compose
|
|
63
|
+
`SliderTrack` > `SliderFilledTrack` and one `SliderThumb` per value (with
|
|
64
|
+
`index`), or `SliderThumbs` to render one per value automatically. Children
|
|
65
|
+
are wrapped in `SliderControl` for you. `min`, `max`, `step`, `disabled` and
|
|
66
|
+
`onValueChangeEnd` come from Chakra's `Slider.Root`.
|
|
67
|
+
|
|
68
|
+
## Do / Don't
|
|
69
|
+
|
|
70
|
+
</En>
|
|
71
|
+
|
|
72
|
+
<Ko>
|
|
73
|
+
|
|
74
|
+
값은 배열입니다. 손잡이 하나는 `[50]`, 범위는 `[20, 80]`입니다. `SliderTrack` 안에
|
|
75
|
+
`SliderFilledTrack`을 두고, 값마다 `SliderThumb`를 하나씩(`index`와 함께) 두거나
|
|
76
|
+
`SliderThumbs`로 값 개수만큼 자동으로 그립니다. 자식은 `SliderControl`로 알아서
|
|
77
|
+
감쌉니다. `min`, `max`, `step`, `disabled`, `onValueChangeEnd`는 Chakra
|
|
78
|
+
`Slider.Root`의 속성입니다.
|
|
79
|
+
|
|
80
|
+
## 이렇게 하세요 / 이렇게 하지 마세요
|
|
81
|
+
|
|
82
|
+
</Ko>
|
|
83
|
+
|
|
84
|
+
<Canvas of={SliderStories.DoValueBeside} />
|
|
85
|
+
<Verdict
|
|
86
|
+
kind="do"
|
|
87
|
+
en="Show the name and the current value beside the slider, and pass the name as ariaLabel."
|
|
88
|
+
ko="슬라이더 옆에 이름과 현재 값을 보여 주고, 이름은 ariaLabel로도 넘깁니다."
|
|
89
|
+
/>
|
|
90
|
+
|
|
91
|
+
<Canvas of={SliderStories.DontExactNumber} />
|
|
92
|
+
<Verdict
|
|
93
|
+
kind="dont"
|
|
94
|
+
en="Ask for an exact number with a slider. One pixel covers dozens of values, and the user cannot see what they chose."
|
|
95
|
+
ko="정확한 숫자를 슬라이더로 받지 마세요. 1픽셀에 수십 개의 값이 걸리고, 무엇을 골랐는지도 보이지 않습니다."
|
|
96
|
+
/>
|
|
97
|
+
|
|
98
|
+
<En>
|
|
99
|
+
|
|
100
|
+
## Content
|
|
101
|
+
|
|
102
|
+
- Show the value with its unit (70%, 1:24) next to the rail, and update it
|
|
103
|
+
while dragging.
|
|
104
|
+
- Label the ends when the meaning is not obvious (느리게 / 빠르게).
|
|
105
|
+
|
|
106
|
+
## Accessibility
|
|
107
|
+
|
|
108
|
+
What Slider does for you:
|
|
109
|
+
|
|
110
|
+
- Each thumb is a `slider` with its value exposed. Arrow keys step, Page Up /
|
|
111
|
+
Page Down jump, Home / End go to the ends (Chakra / Zag) (WCAG 2.1.1).
|
|
112
|
+
- The thumb shows the keyboard focus ring (WCAG 2.4.7). The empty rail is the
|
|
113
|
+
filled `bg.track`, which stays visible on sunken surfaces (WCAG 1.4.11).
|
|
114
|
+
- With `ariaLabel` it renders a visually hidden label part, so the name is in
|
|
115
|
+
the server markup.
|
|
116
|
+
|
|
117
|
+
What you still have to do:
|
|
118
|
+
|
|
119
|
+
- **Pass `ariaLabel`, or compose a visible `Slider.Label`.** Without either
|
|
120
|
+
the thumb has no name: it points at a label part that does not exist
|
|
121
|
+
(`ACCESSIBILITY.md` §1; KWCAG 5.3.4.1 레이블 제공).
|
|
122
|
+
- Dragging is not the only way: keyboard works, but give an `Input` as well
|
|
123
|
+
when people need an exact value (WCAG 2.5.7).
|
|
124
|
+
|
|
125
|
+
## Tokens
|
|
126
|
+
|
|
127
|
+
</En>
|
|
128
|
+
|
|
129
|
+
<Ko>
|
|
130
|
+
|
|
131
|
+
## 문구
|
|
132
|
+
|
|
133
|
+
- 레일 옆에 단위와 함께 값을 보여 주고(70%, 1:24), 끄는 동안 바로 바꿉니다.
|
|
134
|
+
- 양 끝의 뜻이 분명하지 않다면 끝에 라벨을 붙입니다(느리게 / 빠르게).
|
|
135
|
+
|
|
136
|
+
## 접근성
|
|
137
|
+
|
|
138
|
+
Slider가 알아서 하는 일
|
|
139
|
+
|
|
140
|
+
- 손잡이마다 값을 드러내는 `slider`입니다. 방향키로 한 단계씩, Page Up·Page Down으로
|
|
141
|
+
크게, Home·End로 끝까지 옮깁니다(Chakra와 Zag가 제공, WCAG 2.1.1).
|
|
142
|
+
- 손잡이에 키보드 초점 링이 보입니다(WCAG 2.4.7). 빈 레일은 채워진 `bg.track`이라
|
|
143
|
+
움푹한 면 위에서도 보입니다(WCAG 1.4.11).
|
|
144
|
+
- `ariaLabel`을 주면 시각적으로 숨긴 라벨 부품을 그리므로 이름이 서버 마크업 안에
|
|
145
|
+
있습니다.
|
|
146
|
+
|
|
147
|
+
직접 챙겨야 하는 일
|
|
148
|
+
|
|
149
|
+
- **`ariaLabel`을 넘기거나 보이는 `Slider.Label`을 조합합니다.** 둘 다 없으면 손잡이가
|
|
150
|
+
있지도 않은 라벨 부품을 가리켜서 이름이 없습니다(`ACCESSIBILITY.md` 1절, KWCAG
|
|
151
|
+
5.3.4.1 레이블 제공).
|
|
152
|
+
- 끄는 것이 유일한 방법이 되지 않게 합니다. 키보드로도 움직일 수 있지만, 정확한 값이
|
|
153
|
+
필요한 사람을 위해 `Input`도 함께 둡니다(WCAG 2.5.7).
|
|
154
|
+
|
|
155
|
+
## 토큰
|
|
156
|
+
|
|
157
|
+
</Ko>
|
|
158
|
+
|
|
159
|
+
<Canvas of={SliderStories.UsageTokens} sourceState="none" />
|
|
160
|
+
|
|
161
|
+
<En>
|
|
162
|
+
|
|
163
|
+
## Related
|
|
164
|
+
|
|
165
|
+
- **Input**: exact numbers.
|
|
166
|
+
- **ProgressBar**: progress the user cannot change.
|
|
167
|
+
- **SegmentedControl**: a few named levels.
|
|
168
|
+
|
|
169
|
+
</En>
|
|
170
|
+
|
|
171
|
+
<Ko>
|
|
172
|
+
|
|
173
|
+
## 관련 컴포넌트
|
|
174
|
+
|
|
175
|
+
- **Input**: 정확한 숫자.
|
|
176
|
+
- **ProgressBar**: 사용자가 바꿀 수 없는 진행 상황.
|
|
177
|
+
- **SegmentedControl**: 이름 붙은 몇 단계.
|
|
178
|
+
|
|
179
|
+
</Ko>
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { HStack } from '@chakra-ui/react';
|
|
1
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
3
|
|
|
4
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
5
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
6
|
+
import { Button } from '../Button';
|
|
7
|
+
import { Subtext } from '../Typography';
|
|
3
8
|
import { Spinner } from './Spinner';
|
|
4
9
|
|
|
5
10
|
const meta = {
|
|
@@ -14,3 +19,62 @@ type Story = StoryObj<typeof meta>;
|
|
|
14
19
|
export const Default: Story = {
|
|
15
20
|
args: {},
|
|
16
21
|
};
|
|
22
|
+
|
|
23
|
+
export const Sizes: Story = {
|
|
24
|
+
render: () => (
|
|
25
|
+
<HStack gap={4}>
|
|
26
|
+
<Spinner size="xs" />
|
|
27
|
+
<Spinner size="sm" />
|
|
28
|
+
<Spinner size="md" />
|
|
29
|
+
<Spinner size="lg" />
|
|
30
|
+
</HStack>
|
|
31
|
+
),
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
35
|
+
// Pulled into `Spinner.usage.mdx` with <Canvas of={…} />. Hidden from the
|
|
36
|
+
// sidebar (`!dev`).
|
|
37
|
+
|
|
38
|
+
export const DoSpinnerWithStatus: Story = {
|
|
39
|
+
tags: ['!dev'],
|
|
40
|
+
parameters: { layout: 'padded' },
|
|
41
|
+
name: 'Usage / Do: spinner and words in a status',
|
|
42
|
+
render: () => (
|
|
43
|
+
<HStack gap={2} role="status">
|
|
44
|
+
<Spinner size="sm" />
|
|
45
|
+
<Subtext>파일을 불러오는 중</Subtext>
|
|
46
|
+
</HStack>
|
|
47
|
+
),
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const DoButtonLoading: Story = {
|
|
51
|
+
tags: ['!dev'],
|
|
52
|
+
parameters: { layout: 'padded' },
|
|
53
|
+
name: 'Usage / Do: a busy button uses its own loading state',
|
|
54
|
+
render: () => (
|
|
55
|
+
<Button variant="primary" loading loadingText="저장 중">
|
|
56
|
+
저장
|
|
57
|
+
</Button>
|
|
58
|
+
),
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** Tokens the spinner reads, from `Spinner.tsx` and the theme. */
|
|
62
|
+
export const UsageTokens: Story = {
|
|
63
|
+
tags: ['!dev'],
|
|
64
|
+
parameters: { layout: 'padded' },
|
|
65
|
+
name: 'Usage / Tokens',
|
|
66
|
+
render: () => (
|
|
67
|
+
<TokenTable
|
|
68
|
+
rows={[
|
|
69
|
+
{
|
|
70
|
+
token: 'primary.main',
|
|
71
|
+
use: <T en="turning arc (default colour)" ko="도는 호(기본 색)" />,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
token: 'bg.track',
|
|
75
|
+
use: <T en="track ring" ko="트랙 고리" />,
|
|
76
|
+
},
|
|
77
|
+
]}
|
|
78
|
+
/>
|
|
79
|
+
),
|
|
80
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as SpinnerStories from './Spinner.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={SpinnerStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# Spinner
|
|
13
|
+
|
|
14
|
+
A small turning ring that says "still working" when the wait is short and its
|
|
15
|
+
length is unknown.
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
- Inline, next to the words that say what is loading: a list row, a menu, a
|
|
20
|
+
file being read.
|
|
21
|
+
- Inside a custom control that has no loading state of its own.
|
|
22
|
+
|
|
23
|
+
## When not to use
|
|
24
|
+
|
|
25
|
+
- A busy button → the button's `loading` prop (Chakra draws the spinner and
|
|
26
|
+
disables the button).
|
|
27
|
+
- A whole region or page → `SectionLoader` or `PageLoader`, which also
|
|
28
|
+
announce themselves.
|
|
29
|
+
- The AI is working → `ThinkingDots` or the loaders' `thinking` variant.
|
|
30
|
+
- Work with a known length → `ProgressBar`.
|
|
31
|
+
|
|
32
|
+
## How it works
|
|
33
|
+
|
|
34
|
+
- Chakra's `Spinner` with `color="primary.main"` and the `bg.track` ring.
|
|
35
|
+
`size` takes Chakra's `xs` to `xl`; `color` can be overridden with a token.
|
|
36
|
+
- It turns at a constant rate. Under `prefers-reduced-motion` it keeps turning
|
|
37
|
+
at about a third of the speed, because a frozen spinner reads as a hung
|
|
38
|
+
request.
|
|
39
|
+
|
|
40
|
+
## Do
|
|
41
|
+
|
|
42
|
+
</En>
|
|
43
|
+
|
|
44
|
+
<Ko>
|
|
45
|
+
|
|
46
|
+
# Spinner
|
|
47
|
+
|
|
48
|
+
대기가 짧고 얼마나 걸릴지 모를 때 "아직 처리 중"이라고 알려 주는 작은 회전 고리입니다.
|
|
49
|
+
|
|
50
|
+
## 언제 쓰나요
|
|
51
|
+
|
|
52
|
+
- 무엇을 불러오는지 알려 주는 글자 옆에 작게 둘 때: 목록 행, 메뉴, 읽는 중인 파일.
|
|
53
|
+
- 로딩 상태를 따로 갖지 않은 직접 만든 컨트롤 안에 둘 때.
|
|
54
|
+
|
|
55
|
+
## 언제 쓰지 않나요
|
|
56
|
+
|
|
57
|
+
- 작업 중인 버튼은 그 버튼의 `loading` 속성을 씁니다(Chakra가 스피너를 그리고 버튼을
|
|
58
|
+
비활성으로 만듭니다).
|
|
59
|
+
- 영역이나 페이지 전체는 `SectionLoader`나 `PageLoader`를 씁니다. 이 둘은 스스로 상태를
|
|
60
|
+
알립니다.
|
|
61
|
+
- AI가 일하는 동안에는 `ThinkingDots`나 로더의 `thinking` 변형을 씁니다.
|
|
62
|
+
- 길이를 아는 작업은 `ProgressBar`를 씁니다.
|
|
63
|
+
|
|
64
|
+
## 동작 방식
|
|
65
|
+
|
|
66
|
+
- `color="primary.main"`과 `bg.track` 고리를 쓴 Chakra `Spinner`입니다. `size`는
|
|
67
|
+
Chakra의 `xs`부터 `xl`까지 받으며, `color`는 토큰으로 바꿀 수 있습니다.
|
|
68
|
+
- 일정한 속도로 돕니다. `prefers-reduced-motion`에서는 멈추지 않고 약 3분의 1 속도로
|
|
69
|
+
돕니다. 멈춘 스피너는 요청이 멈춘 것처럼 보이기 때문입니다.
|
|
70
|
+
|
|
71
|
+
## 이렇게 하세요
|
|
72
|
+
|
|
73
|
+
</Ko>
|
|
74
|
+
|
|
75
|
+
<Canvas of={SpinnerStories.DoSpinnerWithStatus} />
|
|
76
|
+
<Verdict
|
|
77
|
+
kind="do"
|
|
78
|
+
en='Put the spinner next to words that say what is loading, inside a role="status" element. The spinner itself is a plain span with no name.'
|
|
79
|
+
ko='스피너는 무엇을 불러오는지 알려 주는 글자 옆에 두고, 둘을 role="status" 요소로 감쌉니다. 스피너 자체는 이름 없는 span일 뿐입니다.'
|
|
80
|
+
/>
|
|
81
|
+
|
|
82
|
+
<Canvas of={SpinnerStories.DoButtonLoading} />
|
|
83
|
+
<Verdict
|
|
84
|
+
kind="do"
|
|
85
|
+
en="For a busy button, use the button's loading state instead of placing a Spinner inside it."
|
|
86
|
+
ko="작업 중인 버튼에는 Spinner를 직접 넣지 말고 버튼의 loading 상태를 씁니다."
|
|
87
|
+
/>
|
|
88
|
+
|
|
89
|
+
<En>
|
|
90
|
+
|
|
91
|
+
## Accessibility
|
|
92
|
+
|
|
93
|
+
- **Spinner has no role and no accessible name.** On its own it says nothing
|
|
94
|
+
to a screen reader. Pair it with visible text and wrap both in
|
|
95
|
+
`role="status"` so the change is announced (WCAG 4.1.3, 1.1.1).
|
|
96
|
+
- The `bg.track` ring is there so the spinner stays visible on any background
|
|
97
|
+
(WCAG 1.4.11).
|
|
98
|
+
|
|
99
|
+
## Tokens
|
|
100
|
+
|
|
101
|
+
</En>
|
|
102
|
+
|
|
103
|
+
<Ko>
|
|
104
|
+
|
|
105
|
+
## 접근성
|
|
106
|
+
|
|
107
|
+
- **Spinner에는 역할도 접근 가능한 이름도 없습니다.** 혼자서는 화면 낭독기에 아무것도
|
|
108
|
+
알리지 않습니다. 눈에 보이는 글자와 함께 두고 둘을 `role="status"`로 감싸서 변화가
|
|
109
|
+
읽히게 합니다(WCAG 4.1.3, 1.1.1).
|
|
110
|
+
- `bg.track` 고리 덕분에 어떤 배경 위에서도 스피너가 보입니다(WCAG 1.4.11).
|
|
111
|
+
|
|
112
|
+
## 토큰
|
|
113
|
+
|
|
114
|
+
</Ko>
|
|
115
|
+
|
|
116
|
+
<Canvas of={SpinnerStories.UsageTokens} sourceState="none" />
|
|
117
|
+
|
|
118
|
+
<En>
|
|
119
|
+
|
|
120
|
+
## Related
|
|
121
|
+
|
|
122
|
+
- **Loaders**: `PageLoader`, `SectionLoader`, `ThinkingDots`.
|
|
123
|
+
- **ProgressBar**: work whose length is known.
|
|
124
|
+
- **Button**: `loading`.
|
|
125
|
+
|
|
126
|
+
</En>
|
|
127
|
+
|
|
128
|
+
<Ko>
|
|
129
|
+
|
|
130
|
+
## 관련 컴포넌트
|
|
131
|
+
|
|
132
|
+
- **Loaders**: `PageLoader`, `SectionLoader`, `ThinkingDots`.
|
|
133
|
+
- **ProgressBar**: 길이를 아는 작업.
|
|
134
|
+
- **Button**: `loading`.
|
|
135
|
+
|
|
136
|
+
</Ko>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as SwapTransitionStories from './SwapTransition.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={SwapTransitionStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# SwapTransition
|
|
13
|
+
|
|
14
|
+
Swaps one piece of content for another with a short directional slide, for
|
|
15
|
+
moving between steps of a sequence or between records in the same frame.
|
|
16
|
+
|
|
17
|
+
</En>
|
|
18
|
+
|
|
19
|
+
<Ko>
|
|
20
|
+
|
|
21
|
+
# SwapTransition
|
|
22
|
+
|
|
23
|
+
한 내용을 다른 내용으로 바꿀 때 짧게 옆으로 밀어 넘깁니다. 순서가 있는 단계 사이를
|
|
24
|
+
오가거나, 같은 틀 안에서 다른 항목으로 넘어갈 때 씁니다.
|
|
25
|
+
|
|
26
|
+
</Ko>
|
|
27
|
+
|
|
28
|
+
<Canvas of={SwapTransitionStories.Default} />
|
|
29
|
+
|
|
30
|
+
<En>
|
|
31
|
+
|
|
32
|
+
## When to use
|
|
33
|
+
|
|
34
|
+
- Question 1 → question 2 in a quiz or a multi-step flow, keyed on the step
|
|
35
|
+
index.
|
|
36
|
+
- Moving from an overview screen to the step runner, or between items under
|
|
37
|
+
review, keyed on the record id.
|
|
38
|
+
- Going back: pass a negative `distance` so the content travels the other way.
|
|
39
|
+
|
|
40
|
+
## When not to use
|
|
41
|
+
|
|
42
|
+
- New content is added under existing content rather than replacing it →
|
|
43
|
+
`Reveal`, or `Appear` if nothing is pushed.
|
|
44
|
+
- A value changes in place → `CountUp` or `Pulse`.
|
|
45
|
+
- The key would change on unrelated re-renders → pick a key that identifies the
|
|
46
|
+
content (a step index, a record id), or the content swaps with itself.
|
|
47
|
+
|
|
48
|
+
## Reduced motion and accessibility
|
|
49
|
+
|
|
50
|
+
- With `prefers-reduced-motion: reduce` both halves take no time and nothing
|
|
51
|
+
slides. The outgoing content is hidden at once, and the new content appears
|
|
52
|
+
when the 150ms exit timer ends.
|
|
53
|
+
- While the old content leaves it gets `aria-hidden` and ignores the pointer,
|
|
54
|
+
so it cannot be read or clicked on its way out.
|
|
55
|
+
- SwapTransition does not move focus. After a step change, move focus to the
|
|
56
|
+
new step (its heading, or its first field) yourself, so keyboard and
|
|
57
|
+
screen reader users start in the right place (WCAG 2.4.3).
|
|
58
|
+
- It renders one `div`, and every prop lands on that element, so a wrapper
|
|
59
|
+
told to fill (`display="flex" flex={1} minH={0}`) still fills.
|
|
60
|
+
|
|
61
|
+
## Props
|
|
62
|
+
|
|
63
|
+
</En>
|
|
64
|
+
|
|
65
|
+
<Ko>
|
|
66
|
+
|
|
67
|
+
## 언제 쓰나요
|
|
68
|
+
|
|
69
|
+
- 퀴즈나 여러 단계로 된 흐름에서 1번 문항에서 2번 문항으로 넘어갈 때. 단계 번호를
|
|
70
|
+
key로 씁니다.
|
|
71
|
+
- 개요 화면에서 단계 진행 화면으로, 또는 검토 중인 항목 사이를 오갈 때. 항목 id를
|
|
72
|
+
key로 씁니다.
|
|
73
|
+
- 뒤로 갈 때는 `distance`에 음수를 넘겨 반대 방향으로 움직입니다.
|
|
74
|
+
|
|
75
|
+
## 언제 쓰지 않나요
|
|
76
|
+
|
|
77
|
+
- 새 내용이 기존 내용을 바꾸지 않고 그 아래에 더해진다면 `Reveal`을 씁니다. 아무것도
|
|
78
|
+
밀어내지 않는다면 `Appear`를 씁니다.
|
|
79
|
+
- 값이 제자리에서 바뀐다면 `CountUp`이나 `Pulse`를 씁니다.
|
|
80
|
+
- 상관없는 렌더에서도 key가 바뀐다면, 내용을 식별하는 값(단계 번호, 항목 id)으로 key를
|
|
81
|
+
바꿉니다. 그러지 않으면 같은 내용끼리 서로 바뀌는 애니메이션이 재생됩니다.
|
|
82
|
+
|
|
83
|
+
## 동작 줄이기와 접근성
|
|
84
|
+
|
|
85
|
+
- `prefers-reduced-motion: reduce`에서는 나가고 들어오는 동작 모두 시간이 0이라
|
|
86
|
+
밀리는 움직임이 없습니다. 나가는 내용은 바로 사라지고, 새 내용은 150ms의 퇴장
|
|
87
|
+
타이머가 끝나면 나타납니다.
|
|
88
|
+
- 나가는 동안 이전 내용에는 `aria-hidden`이 붙고 포인터도 받지 않으므로, 사라지는 중에
|
|
89
|
+
읽히거나 눌리지 않습니다.
|
|
90
|
+
- SwapTransition은 초점을 옮기지 않습니다. 단계가 바뀌면 새 단계(제목이나 첫 입력란)로
|
|
91
|
+
직접 초점을 옮겨, 키보드와 화면 낭독기 사용자가 제자리에서 시작하게 합니다(WCAG 2.4.3).
|
|
92
|
+
- `div` 하나만 그리고 모든 속성이 그 요소에 적용됩니다. 그래서 채우도록 지정한 감싸는
|
|
93
|
+
요소(`display="flex" flex={1} minH={0}`)도 그대로 채웁니다.
|
|
94
|
+
|
|
95
|
+
## 속성
|
|
96
|
+
|
|
97
|
+
</Ko>
|
|
98
|
+
|
|
99
|
+
<ArgTypes
|
|
100
|
+
of={SwapTransitionStories}
|
|
101
|
+
include={['transitionKey', 'distance', 'animateInitial']}
|
|
102
|
+
/>
|