@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,927 @@
|
|
|
1
|
+
import { useId, useState } from 'react';
|
|
2
|
+
import { Box, Flex, Text, VisuallyHidden } from '@chakra-ui/react';
|
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
4
|
+
|
|
5
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
6
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
7
|
+
import { Badge } from '../Badge';
|
|
8
|
+
import { Button } from '../Button';
|
|
9
|
+
import {
|
|
10
|
+
AlertTriangleIcon,
|
|
11
|
+
BookIcon,
|
|
12
|
+
ChatIcon,
|
|
13
|
+
ClockIcon,
|
|
14
|
+
DotsHorizontalIcon,
|
|
15
|
+
FilledChatIcon,
|
|
16
|
+
FileMusicIcon,
|
|
17
|
+
FileVideoIcon,
|
|
18
|
+
HomeIcon,
|
|
19
|
+
LayoutDashboardIcon,
|
|
20
|
+
PhotoIcon,
|
|
21
|
+
PresentationIcon,
|
|
22
|
+
SettingsIcon,
|
|
23
|
+
StarIcon,
|
|
24
|
+
UsersIcon,
|
|
25
|
+
} from '../Icon';
|
|
26
|
+
import { IconButton } from '../IconButton';
|
|
27
|
+
import { Menu } from '../Menu';
|
|
28
|
+
import { Tooltip } from '../Tooltip';
|
|
29
|
+
import { NavList } from './NavList';
|
|
30
|
+
import { NAV_LIST_RAMP } from './NavList.styles';
|
|
31
|
+
|
|
32
|
+
const meta = {
|
|
33
|
+
title: 'Components/NavList',
|
|
34
|
+
component: NavList,
|
|
35
|
+
parameters: { layout: 'padded' },
|
|
36
|
+
argTypes: {
|
|
37
|
+
orientation: {
|
|
38
|
+
control: { type: 'radio' },
|
|
39
|
+
options: ['vertical', 'horizontal'],
|
|
40
|
+
description:
|
|
41
|
+
"`vertical` is a rail; `horizontal` is one row that scrolls sideways. Accepts a per-breakpoint object, e.g. `{ base: 'horizontal', md: 'vertical' }`.",
|
|
42
|
+
table: { defaultValue: { summary: 'vertical' } },
|
|
43
|
+
},
|
|
44
|
+
isCollapsed: {
|
|
45
|
+
control: { type: 'boolean' },
|
|
46
|
+
description:
|
|
47
|
+
'The icon-only rail: 40px rows, label as accessible name and tooltip. Every row needs a `leadingVisual`.',
|
|
48
|
+
table: { defaultValue: { summary: 'false' } },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
} satisfies Meta<typeof NavList>;
|
|
52
|
+
|
|
53
|
+
export default meta;
|
|
54
|
+
|
|
55
|
+
type Story = StoryObj<typeof meta>;
|
|
56
|
+
|
|
57
|
+
/** A rail panel to sit the list on, like the app sidebar. */
|
|
58
|
+
const Rail = ({
|
|
59
|
+
children,
|
|
60
|
+
w = '240px',
|
|
61
|
+
isAnimated = false,
|
|
62
|
+
}: {
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
w?: string;
|
|
65
|
+
/** Animate the width, the way the app's NavigationBarWrapper does. */
|
|
66
|
+
isAnimated?: boolean;
|
|
67
|
+
}) => (
|
|
68
|
+
<Box
|
|
69
|
+
w={w}
|
|
70
|
+
p={2}
|
|
71
|
+
bg="bg.subtle"
|
|
72
|
+
borderRadius="lg"
|
|
73
|
+
{...(isAnimated && {
|
|
74
|
+
animationStyle: 'feedback',
|
|
75
|
+
transitionProperty: 'width',
|
|
76
|
+
overflowX: 'hidden',
|
|
77
|
+
})}
|
|
78
|
+
>
|
|
79
|
+
{children}
|
|
80
|
+
</Box>
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* A row's more-menu with its own tooltip. Menu and Tooltip both make the
|
|
85
|
+
* button their trigger, and each would give it a different id — the menu
|
|
86
|
+
* then cannot find its anchor and opens at the top-left of the page. One
|
|
87
|
+
* shared `ids.trigger` makes them agree (factchat-nextjs does the same in
|
|
88
|
+
* ResearchReportActions).
|
|
89
|
+
*/
|
|
90
|
+
const RowMenu = ({ label }: { label: string }) => {
|
|
91
|
+
const triggerId = useId();
|
|
92
|
+
return (
|
|
93
|
+
<Menu ids={{ trigger: triggerId }}>
|
|
94
|
+
<Tooltip ids={{ trigger: triggerId }} content="더 보기">
|
|
95
|
+
<Menu.Trigger asChild>
|
|
96
|
+
<IconButton aria-label={`${label} 더 보기`} size="xs">
|
|
97
|
+
<DotsHorizontalIcon />
|
|
98
|
+
</IconButton>
|
|
99
|
+
</Menu.Trigger>
|
|
100
|
+
</Tooltip>
|
|
101
|
+
<Menu.List>
|
|
102
|
+
<Menu.Item value="rename">이름 바꾸기</Menu.Item>
|
|
103
|
+
<Menu.Item value="delete">삭제</Menu.Item>
|
|
104
|
+
</Menu.List>
|
|
105
|
+
</Menu>
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** Links with icons. The current page has `aria-current="page"`. */
|
|
110
|
+
export const Basic: Story = {
|
|
111
|
+
render: (args) => (
|
|
112
|
+
<Rail>
|
|
113
|
+
<NavList {...args} aria-label="관리자 메뉴">
|
|
114
|
+
<NavList.Item href="#" leadingVisual={<HomeIcon />} isCurrent>
|
|
115
|
+
홈
|
|
116
|
+
</NavList.Item>
|
|
117
|
+
<NavList.Item href="#" leadingVisual={<UsersIcon />}>
|
|
118
|
+
멤버 관리
|
|
119
|
+
</NavList.Item>
|
|
120
|
+
<NavList.Item href="#" leadingVisual={<LayoutDashboardIcon />}>
|
|
121
|
+
사용량 대시보드
|
|
122
|
+
</NavList.Item>
|
|
123
|
+
<NavList.Item href="#" leadingVisual={<SettingsIcon />}>
|
|
124
|
+
설정
|
|
125
|
+
</NavList.Item>
|
|
126
|
+
</NavList>
|
|
127
|
+
</Rail>
|
|
128
|
+
),
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const FILTERS = [
|
|
132
|
+
{ key: 'all', label: '전체', count: 128 },
|
|
133
|
+
{ key: 'image', label: '이미지', count: 64, icon: <PhotoIcon /> },
|
|
134
|
+
{ key: 'video', label: '영상', count: 21, icon: <FileVideoIcon /> },
|
|
135
|
+
{ key: 'music', label: '음악', count: 9, icon: <FileMusicIcon /> },
|
|
136
|
+
{ key: 'ppt', label: '프레젠테이션', count: 34, icon: <PresentationIcon /> },
|
|
137
|
+
];
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* An in-page filter rail: buttons, not links, so the current filter has
|
|
141
|
+
* `aria-current="true"`. Counts go in `trailingVisual`.
|
|
142
|
+
*/
|
|
143
|
+
export const FilterRailWithCounts: Story = {
|
|
144
|
+
render: (args) => {
|
|
145
|
+
const [current, setCurrent] = useState('all');
|
|
146
|
+
return (
|
|
147
|
+
<Rail>
|
|
148
|
+
<NavList {...args} aria-label="템플릿 종류">
|
|
149
|
+
{FILTERS.map((f) => (
|
|
150
|
+
<NavList.Item
|
|
151
|
+
key={f.key}
|
|
152
|
+
leadingVisual={f.icon}
|
|
153
|
+
trailingVisual={f.count}
|
|
154
|
+
isCurrent={current === f.key}
|
|
155
|
+
onClick={() => setCurrent(f.key)}
|
|
156
|
+
>
|
|
157
|
+
{f.label}
|
|
158
|
+
</NavList.Item>
|
|
159
|
+
))}
|
|
160
|
+
</NavList>
|
|
161
|
+
</Rail>
|
|
162
|
+
);
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/** Groups with overline titles. Each title names its group's list. */
|
|
167
|
+
export const GroupsWithHeadings: Story = {
|
|
168
|
+
render: (args) => {
|
|
169
|
+
const [current, setCurrent] = useState('recent');
|
|
170
|
+
const item = (key: string, label: string, icon?: React.ReactNode) => (
|
|
171
|
+
<NavList.Item
|
|
172
|
+
leadingVisual={icon}
|
|
173
|
+
isCurrent={current === key}
|
|
174
|
+
onClick={() => setCurrent(key)}
|
|
175
|
+
>
|
|
176
|
+
{label}
|
|
177
|
+
</NavList.Item>
|
|
178
|
+
);
|
|
179
|
+
return (
|
|
180
|
+
<Rail w="220px">
|
|
181
|
+
<NavList {...args} aria-label="드라이브 위치">
|
|
182
|
+
{item('recent', '최근 문서함', <ClockIcon />)}
|
|
183
|
+
{item('shared', '공유 문서함', <UsersIcon />)}
|
|
184
|
+
{item('starred', '중요 문서함', <StarIcon />)}
|
|
185
|
+
<NavList.Group title="공유 드라이브">
|
|
186
|
+
{item('marketing', '마케팅팀')}
|
|
187
|
+
{item('sales', '영업팀 — 2026년 하반기 제안서와 계약서 보관함')}
|
|
188
|
+
{item('dev', '개발팀')}
|
|
189
|
+
</NavList.Group>
|
|
190
|
+
</NavList>
|
|
191
|
+
</Rail>
|
|
192
|
+
);
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* `trailingAction`: a separate button beside the row, with its own name.
|
|
198
|
+
* It is a sibling of the link, so Tab reaches the row and then its action.
|
|
199
|
+
*/
|
|
200
|
+
export const TrailingAction: Story = {
|
|
201
|
+
render: (args) => (
|
|
202
|
+
<Rail>
|
|
203
|
+
<NavList {...args} aria-label="최근 대화">
|
|
204
|
+
{[
|
|
205
|
+
'보고서 요약 요청',
|
|
206
|
+
'회의록 정리',
|
|
207
|
+
'2026 하반기 마케팅 캠페인 아이디어',
|
|
208
|
+
].map((title, i) => (
|
|
209
|
+
<NavList.Item
|
|
210
|
+
key={title}
|
|
211
|
+
href="#"
|
|
212
|
+
isCurrent={i === 0}
|
|
213
|
+
trailingAction={
|
|
214
|
+
<IconButton aria-label={`${title} 더 보기`} size="xs">
|
|
215
|
+
<DotsHorizontalIcon />
|
|
216
|
+
</IconButton>
|
|
217
|
+
}
|
|
218
|
+
>
|
|
219
|
+
{title}
|
|
220
|
+
</NavList.Item>
|
|
221
|
+
))}
|
|
222
|
+
</NavList>
|
|
223
|
+
</Rail>
|
|
224
|
+
),
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
/** Disabled rows use the fixed `disabled.fg` ink — never opacity — and are skipped by Tab. */
|
|
228
|
+
export const Disabled: Story = {
|
|
229
|
+
render: (args) => (
|
|
230
|
+
<Rail>
|
|
231
|
+
<NavList {...args} aria-label="설정">
|
|
232
|
+
<NavList.Item href="#" isCurrent leadingVisual={<SettingsIcon />}>
|
|
233
|
+
일반
|
|
234
|
+
</NavList.Item>
|
|
235
|
+
<NavList.Item href="#" isDisabled leadingVisual={<UsersIcon />}>
|
|
236
|
+
SSO (엔터프라이즈 전용)
|
|
237
|
+
</NavList.Item>
|
|
238
|
+
<NavList.Item onClick={() => {}} isDisabled trailingVisual={0}>
|
|
239
|
+
보관된 항목
|
|
240
|
+
</NavList.Item>
|
|
241
|
+
</NavList>
|
|
242
|
+
</Rail>
|
|
243
|
+
),
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
/** One row that scrolls sideways instead of wrapping. */
|
|
247
|
+
export const Horizontal: Story = {
|
|
248
|
+
args: { orientation: 'horizontal' },
|
|
249
|
+
render: (args) => {
|
|
250
|
+
const [current, setCurrent] = useState('all');
|
|
251
|
+
return (
|
|
252
|
+
<Box maxW="360px" p={2} bg="bg.subtle" borderRadius="lg">
|
|
253
|
+
<NavList {...args} aria-label="템플릿 종류">
|
|
254
|
+
{FILTERS.map((f) => (
|
|
255
|
+
<NavList.Item
|
|
256
|
+
key={f.key}
|
|
257
|
+
leadingVisual={f.icon}
|
|
258
|
+
trailingVisual={f.count}
|
|
259
|
+
isCurrent={current === f.key}
|
|
260
|
+
onClick={() => setCurrent(f.key)}
|
|
261
|
+
>
|
|
262
|
+
{f.label}
|
|
263
|
+
</NavList.Item>
|
|
264
|
+
))}
|
|
265
|
+
</NavList>
|
|
266
|
+
</Box>
|
|
267
|
+
);
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* `orientation={{ base: 'horizontal', md: 'vertical' }}`: a rail beside the
|
|
273
|
+
* content from `md` up, a scrolling strip above it below. Resize the canvas.
|
|
274
|
+
*/
|
|
275
|
+
export const Responsive: Story = {
|
|
276
|
+
render: () => {
|
|
277
|
+
const [current, setCurrent] = useState('all');
|
|
278
|
+
return (
|
|
279
|
+
<Flex
|
|
280
|
+
direction={{ base: 'column', md: 'row' }}
|
|
281
|
+
borderWidth="1px"
|
|
282
|
+
borderColor="border.subtle"
|
|
283
|
+
borderRadius="lg"
|
|
284
|
+
overflow="hidden"
|
|
285
|
+
minH="240px"
|
|
286
|
+
>
|
|
287
|
+
<Box
|
|
288
|
+
w={{ base: 'full', md: '200px' }}
|
|
289
|
+
flexShrink={0}
|
|
290
|
+
p={2}
|
|
291
|
+
bg="bg.subtle"
|
|
292
|
+
borderRightWidth={{ base: 0, md: '1px' }}
|
|
293
|
+
borderBottomWidth={{ base: '1px', md: 0 }}
|
|
294
|
+
borderColor="border.subtle"
|
|
295
|
+
>
|
|
296
|
+
<NavList
|
|
297
|
+
aria-label="템플릿 종류"
|
|
298
|
+
orientation={{ base: 'horizontal', md: 'vertical' }}
|
|
299
|
+
>
|
|
300
|
+
{FILTERS.map((f) => (
|
|
301
|
+
<NavList.Item
|
|
302
|
+
key={f.key}
|
|
303
|
+
leadingVisual={f.icon}
|
|
304
|
+
trailingVisual={f.count}
|
|
305
|
+
isCurrent={current === f.key}
|
|
306
|
+
onClick={() => setCurrent(f.key)}
|
|
307
|
+
>
|
|
308
|
+
{f.label}
|
|
309
|
+
</NavList.Item>
|
|
310
|
+
))}
|
|
311
|
+
</NavList>
|
|
312
|
+
</Box>
|
|
313
|
+
<Box p={4} flex={1}>
|
|
314
|
+
<Text color="fg.muted">
|
|
315
|
+
{FILTERS.find((f) => f.key === current)?.label} 템플릿
|
|
316
|
+
</Text>
|
|
317
|
+
</Box>
|
|
318
|
+
</Flex>
|
|
319
|
+
);
|
|
320
|
+
},
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Every state in one rail, for side-by-side review in light and dark: rest,
|
|
325
|
+
* current, a count, a disabled link, a disabled button, and disabled + current.
|
|
326
|
+
* Hover, press and focus are live — point at, press and Tab through it. A
|
|
327
|
+
* press is one step past hover (`border.default`), on the current row too.
|
|
328
|
+
*/
|
|
329
|
+
export const States: Story = {
|
|
330
|
+
render: (args) => (
|
|
331
|
+
<Rail>
|
|
332
|
+
<NavList {...args} aria-label="상태">
|
|
333
|
+
<NavList.Item href="#rest" leadingVisual={<HomeIcon boxSize="sm" />}>
|
|
334
|
+
기본
|
|
335
|
+
</NavList.Item>
|
|
336
|
+
<NavList.Item
|
|
337
|
+
href="#current"
|
|
338
|
+
isCurrent
|
|
339
|
+
leadingVisual={<UsersIcon boxSize="sm" />}
|
|
340
|
+
>
|
|
341
|
+
현재
|
|
342
|
+
</NavList.Item>
|
|
343
|
+
<NavList.Item
|
|
344
|
+
href="#count"
|
|
345
|
+
leadingVisual={<PhotoIcon boxSize="sm" />}
|
|
346
|
+
trailingVisual={64}
|
|
347
|
+
>
|
|
348
|
+
개수
|
|
349
|
+
</NavList.Item>
|
|
350
|
+
<NavList.Item
|
|
351
|
+
href="#disabled"
|
|
352
|
+
isDisabled
|
|
353
|
+
leadingVisual={<SettingsIcon boxSize="sm" />}
|
|
354
|
+
>
|
|
355
|
+
사용 불가 링크
|
|
356
|
+
</NavList.Item>
|
|
357
|
+
<NavList.Item onClick={() => {}} isDisabled trailingVisual={0}>
|
|
358
|
+
사용 불가 버튼
|
|
359
|
+
</NavList.Item>
|
|
360
|
+
<NavList.Item
|
|
361
|
+
href="#disabled-current"
|
|
362
|
+
isDisabled
|
|
363
|
+
isCurrent
|
|
364
|
+
leadingVisual={<StarIcon boxSize="sm" />}
|
|
365
|
+
>
|
|
366
|
+
사용 불가 + 현재
|
|
367
|
+
</NavList.Item>
|
|
368
|
+
</NavList>
|
|
369
|
+
</Rail>
|
|
370
|
+
),
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
const RAIL_ITEMS = [
|
|
374
|
+
{
|
|
375
|
+
key: 'chat',
|
|
376
|
+
label: '새 채팅',
|
|
377
|
+
icon: <ChatIcon boxSize="sm" />,
|
|
378
|
+
activeIcon: <FilledChatIcon boxSize="sm" />,
|
|
379
|
+
},
|
|
380
|
+
{ key: 'members', label: '멤버 관리', icon: <UsersIcon boxSize="sm" /> },
|
|
381
|
+
{
|
|
382
|
+
key: 'usage',
|
|
383
|
+
label: '사용량 대시보드',
|
|
384
|
+
icon: <LayoutDashboardIcon boxSize="sm" />,
|
|
385
|
+
},
|
|
386
|
+
{ key: 'settings', label: '설정', icon: <SettingsIcon boxSize="sm" /> },
|
|
387
|
+
];
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* `isCollapsed`: the icon-only rail. Each row is a 40px square; its label is
|
|
391
|
+
* still the accessible name and shows as a tooltip on hover and keyboard
|
|
392
|
+
* focus. The active-icon swap is the caller's — pick `leadingVisual` by
|
|
393
|
+
* `isCurrent`.
|
|
394
|
+
*/
|
|
395
|
+
export const CollapsedRail: Story = {
|
|
396
|
+
render: () => {
|
|
397
|
+
const [isCollapsed, setIsCollapsed] = useState(true);
|
|
398
|
+
const [current, setCurrent] = useState('chat');
|
|
399
|
+
return (
|
|
400
|
+
<Flex direction="column" gap={3} align="start">
|
|
401
|
+
<Button
|
|
402
|
+
size="sm"
|
|
403
|
+
variant="secondary"
|
|
404
|
+
onClick={() => setIsCollapsed((c) => !c)}
|
|
405
|
+
>
|
|
406
|
+
{isCollapsed ? '펼치기' : '접기'}
|
|
407
|
+
</Button>
|
|
408
|
+
{/* The parent animates the width; NavList fades its labels, counts
|
|
409
|
+
and group titles on the same clock and keeps every icon where it
|
|
410
|
+
is. 3.5em = the 2.5em row square + the rail's 0.5em padding. */}
|
|
411
|
+
<Rail w={isCollapsed ? '3.5em' : '240px'} isAnimated>
|
|
412
|
+
<NavList aria-label="관리자 메뉴" isCollapsed={isCollapsed}>
|
|
413
|
+
{RAIL_ITEMS.map((item) => (
|
|
414
|
+
<NavList.Item
|
|
415
|
+
key={item.key}
|
|
416
|
+
href={`#${item.key}`}
|
|
417
|
+
isCurrent={current === item.key}
|
|
418
|
+
onClick={(e) => {
|
|
419
|
+
e.preventDefault();
|
|
420
|
+
setCurrent(item.key);
|
|
421
|
+
}}
|
|
422
|
+
leadingVisual={
|
|
423
|
+
current === item.key && item.activeIcon
|
|
424
|
+
? item.activeIcon
|
|
425
|
+
: item.icon
|
|
426
|
+
}
|
|
427
|
+
trailingVisual={item.key === 'members' ? 12 : undefined}
|
|
428
|
+
>
|
|
429
|
+
{item.label}
|
|
430
|
+
</NavList.Item>
|
|
431
|
+
))}
|
|
432
|
+
<NavList.Group title="도움말">
|
|
433
|
+
<NavList.Item
|
|
434
|
+
href="https://docs.example.com"
|
|
435
|
+
target="_blank"
|
|
436
|
+
rel="noreferrer"
|
|
437
|
+
leadingVisual={<BookIcon boxSize="sm" />}
|
|
438
|
+
>
|
|
439
|
+
사용 가이드
|
|
440
|
+
</NavList.Item>
|
|
441
|
+
</NavList.Group>
|
|
442
|
+
</NavList>
|
|
443
|
+
</Rail>
|
|
444
|
+
</Flex>
|
|
445
|
+
);
|
|
446
|
+
},
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* `tooltip` adds a description (`aria-describedby`); `target="_blank"` adds
|
|
451
|
+
* "(새 창 열림)" to the link's accessible name. A label the ellipsis cuts off
|
|
452
|
+
* shows itself in full on hover and focus — no prop needed.
|
|
453
|
+
*/
|
|
454
|
+
export const TooltipsAndNewWindow: Story = {
|
|
455
|
+
render: (args) => (
|
|
456
|
+
<Rail w="200px">
|
|
457
|
+
<NavList {...args} aria-label="워크스페이스">
|
|
458
|
+
<NavList.Item
|
|
459
|
+
href="#drive"
|
|
460
|
+
leadingVisual={<UsersIcon boxSize="sm" />}
|
|
461
|
+
tooltip="팀원 모두가 보고 편집할 수 있는 문서"
|
|
462
|
+
>
|
|
463
|
+
공유 드라이브
|
|
464
|
+
</NavList.Item>
|
|
465
|
+
<NavList.Item href="#long" leadingVisual={<ClockIcon boxSize="sm" />}>
|
|
466
|
+
2026년 하반기 마케팅 캠페인 아이디어 회의록
|
|
467
|
+
</NavList.Item>
|
|
468
|
+
<NavList.Item href="#long-en" leadingVisual={<StarIcon boxSize="sm" />}>
|
|
469
|
+
Quarterly business review — enterprise customers
|
|
470
|
+
</NavList.Item>
|
|
471
|
+
<NavList.Item
|
|
472
|
+
href="https://docs.example.com"
|
|
473
|
+
target="_blank"
|
|
474
|
+
rel="noreferrer"
|
|
475
|
+
leadingVisual={<BookIcon boxSize="sm" />}
|
|
476
|
+
>
|
|
477
|
+
사용 가이드
|
|
478
|
+
</NavList.Item>
|
|
479
|
+
<NavList.Item
|
|
480
|
+
href="#sso"
|
|
481
|
+
isDisabled
|
|
482
|
+
tooltip="엔터프라이즈 요금제에서 쓸 수 있습니다"
|
|
483
|
+
leadingVisual={<SettingsIcon boxSize="sm" />}
|
|
484
|
+
>
|
|
485
|
+
SSO
|
|
486
|
+
</NavList.Item>
|
|
487
|
+
</NavList>
|
|
488
|
+
</Rail>
|
|
489
|
+
),
|
|
490
|
+
};
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* `tooltipPlacement="end"`: the description opens beside the row instead of
|
|
494
|
+
* above it. On a row with a `trailingAction` it is placed from the whole row,
|
|
495
|
+
* past the action, not from the link, which stops before the action.
|
|
496
|
+
*/
|
|
497
|
+
export const EndTooltipWithAction: Story = {
|
|
498
|
+
render: (args) => (
|
|
499
|
+
<Rail w="220px">
|
|
500
|
+
<NavList {...args} aria-label="에이전트">
|
|
501
|
+
{[
|
|
502
|
+
['회의록', '회의를 녹음하고 요약을 받아요'],
|
|
503
|
+
['이미지 생성', 'AI로 생성한 이미지를 관리하세요'],
|
|
504
|
+
].map(([title, description]) => (
|
|
505
|
+
<NavList.Item
|
|
506
|
+
key={title}
|
|
507
|
+
href="#"
|
|
508
|
+
tooltip={description}
|
|
509
|
+
tooltipPlacement="end"
|
|
510
|
+
trailingAction={
|
|
511
|
+
<IconButton aria-label={`${title} 더 보기`} size="xs">
|
|
512
|
+
<DotsHorizontalIcon />
|
|
513
|
+
</IconButton>
|
|
514
|
+
}
|
|
515
|
+
>
|
|
516
|
+
{title}
|
|
517
|
+
</NavList.Item>
|
|
518
|
+
))}
|
|
519
|
+
</NavList>
|
|
520
|
+
</Rail>
|
|
521
|
+
),
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Session rows: `trailingActionVisibility="hover"` keeps the more-menu out of
|
|
526
|
+
* the way until the row is hovered or focused, or its menu is open. It stays
|
|
527
|
+
* in the tab order — focusing it reveals it — and is always shown on touch
|
|
528
|
+
* screens. Hovering the action keeps the row lit, because the fill is the
|
|
529
|
+
* row's `<li>`.
|
|
530
|
+
*/
|
|
531
|
+
export const HoverRevealedAction: Story = {
|
|
532
|
+
render: (args) => (
|
|
533
|
+
<Rail>
|
|
534
|
+
<NavList {...args} aria-label="최근 대화">
|
|
535
|
+
{[
|
|
536
|
+
'보고서 요약 요청',
|
|
537
|
+
'회의록 정리',
|
|
538
|
+
'2026 하반기 마케팅 캠페인 아이디어와 예산 배분 초안',
|
|
539
|
+
].map((title, i) => (
|
|
540
|
+
<NavList.Item
|
|
541
|
+
key={title}
|
|
542
|
+
href={`#s${i}`}
|
|
543
|
+
isCurrent={i === 0}
|
|
544
|
+
trailingActionVisibility="hover"
|
|
545
|
+
trailingAction={<RowMenu label={title} />}
|
|
546
|
+
>
|
|
547
|
+
{title}
|
|
548
|
+
</NavList.Item>
|
|
549
|
+
))}
|
|
550
|
+
</NavList>
|
|
551
|
+
</Rail>
|
|
552
|
+
),
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* The two visibilities side by side, on the same long label. `hover` (top)
|
|
557
|
+
* gives the label the whole row at rest and lays the action over its end;
|
|
558
|
+
* the label makes room only while the action shows. `always` (bottom) keeps
|
|
559
|
+
* the action's space. On a touch screen both keep it, with the action shown.
|
|
560
|
+
*/
|
|
561
|
+
export const TrailingActionVisibility: Story = {
|
|
562
|
+
render: (args) => (
|
|
563
|
+
<Rail>
|
|
564
|
+
<NavList {...args} aria-label="최근 대화">
|
|
565
|
+
{(['hover', 'always'] as const).map((visibility) => (
|
|
566
|
+
<NavList.Item
|
|
567
|
+
key={visibility}
|
|
568
|
+
href={`#${visibility}`}
|
|
569
|
+
trailingActionVisibility={visibility}
|
|
570
|
+
trailingAction={
|
|
571
|
+
<RowMenu label={`${visibility} 하반기 캠페인 아이디어`} />
|
|
572
|
+
}
|
|
573
|
+
>
|
|
574
|
+
{`${visibility} · 2026 하반기 마케팅 캠페인 아이디어`}
|
|
575
|
+
</NavList.Item>
|
|
576
|
+
))}
|
|
577
|
+
</NavList>
|
|
578
|
+
</Rail>
|
|
579
|
+
),
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* `isCollapsible` turns a group title into a disclosure button. Persisting the
|
|
584
|
+
* state is the caller's: here `isOpen` / `onOpenChange` write local storage.
|
|
585
|
+
*/
|
|
586
|
+
export const CollapsibleGroups: Story = {
|
|
587
|
+
render: (args) => {
|
|
588
|
+
const KEY = 'navlist-story-open';
|
|
589
|
+
const read = (): Record<string, boolean> => {
|
|
590
|
+
try {
|
|
591
|
+
return JSON.parse(localStorage.getItem(KEY) ?? '{}');
|
|
592
|
+
} catch {
|
|
593
|
+
return {};
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
const [open, setOpen] = useState<Record<string, boolean>>(read);
|
|
597
|
+
const groupProps = (key: string) => ({
|
|
598
|
+
isCollapsible: true,
|
|
599
|
+
isOpen: open[key] ?? true,
|
|
600
|
+
onOpenChange: (next: boolean) => {
|
|
601
|
+
const value = { ...open, [key]: next };
|
|
602
|
+
setOpen(value);
|
|
603
|
+
localStorage.setItem(KEY, JSON.stringify(value));
|
|
604
|
+
},
|
|
605
|
+
});
|
|
606
|
+
return (
|
|
607
|
+
<Rail>
|
|
608
|
+
<NavList {...args} aria-label="관리자 메뉴">
|
|
609
|
+
<NavList.Item
|
|
610
|
+
href="#home"
|
|
611
|
+
isCurrent
|
|
612
|
+
leadingVisual={<HomeIcon boxSize="sm" />}
|
|
613
|
+
>
|
|
614
|
+
홈
|
|
615
|
+
</NavList.Item>
|
|
616
|
+
<NavList.Group title="멤버" {...groupProps('members')}>
|
|
617
|
+
<NavList.Item href="#m1">멤버 목록</NavList.Item>
|
|
618
|
+
<NavList.Item href="#m2">그룹 관리</NavList.Item>
|
|
619
|
+
</NavList.Group>
|
|
620
|
+
<NavList.Group title="결제" {...groupProps('billing')}>
|
|
621
|
+
<NavList.Item href="#b1">요금제</NavList.Item>
|
|
622
|
+
<NavList.Item href="#b2">결제 내역</NavList.Item>
|
|
623
|
+
</NavList.Group>
|
|
624
|
+
</NavList>
|
|
625
|
+
</Rail>
|
|
626
|
+
);
|
|
627
|
+
},
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* `NavList.Skeleton` stands in for a rail whose entries are loading, at the
|
|
632
|
+
* same row metrics. Counts that load later need no skeleton: leave
|
|
633
|
+
* `trailingVisual` unset until they arrive.
|
|
634
|
+
*/
|
|
635
|
+
export const Loading: Story = {
|
|
636
|
+
render: () => {
|
|
637
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
638
|
+
return (
|
|
639
|
+
<Flex direction="column" gap={3} align="start">
|
|
640
|
+
<Button
|
|
641
|
+
size="sm"
|
|
642
|
+
variant="secondary"
|
|
643
|
+
onClick={() => setIsLoading((l) => !l)}
|
|
644
|
+
>
|
|
645
|
+
{isLoading ? '불러오기 완료' : '다시 불러오기'}
|
|
646
|
+
</Button>
|
|
647
|
+
<Rail>
|
|
648
|
+
{isLoading ? (
|
|
649
|
+
<NavList.Skeleton count={5} />
|
|
650
|
+
) : (
|
|
651
|
+
<NavList aria-label="템플릿 종류">
|
|
652
|
+
{FILTERS.map((f) => (
|
|
653
|
+
<NavList.Item
|
|
654
|
+
key={f.key}
|
|
655
|
+
onClick={() => {}}
|
|
656
|
+
leadingVisual={f.icon}
|
|
657
|
+
trailingVisual={f.count}
|
|
658
|
+
isCurrent={f.key === 'all'}
|
|
659
|
+
>
|
|
660
|
+
{f.label}
|
|
661
|
+
</NavList.Item>
|
|
662
|
+
))}
|
|
663
|
+
</NavList>
|
|
664
|
+
)}
|
|
665
|
+
</Rail>
|
|
666
|
+
</Flex>
|
|
667
|
+
);
|
|
668
|
+
},
|
|
669
|
+
};
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* A badge with its own spoken text: the number is `aria-hidden` and a visually
|
|
673
|
+
* hidden phrase says what it counts, so the row reads "커넥터 확인 필요 2개".
|
|
674
|
+
*/
|
|
675
|
+
export const BadgesWithSpokenText: Story = {
|
|
676
|
+
render: (args) => (
|
|
677
|
+
<Rail>
|
|
678
|
+
<NavList {...args} aria-label="스튜디오">
|
|
679
|
+
<NavList.Item
|
|
680
|
+
href="#a"
|
|
681
|
+
isCurrent
|
|
682
|
+
trailingVisual={<Badge size="sm">꺼짐</Badge>}
|
|
683
|
+
>
|
|
684
|
+
메모리
|
|
685
|
+
</NavList.Item>
|
|
686
|
+
<NavList.Item
|
|
687
|
+
href="#b"
|
|
688
|
+
trailingVisual={
|
|
689
|
+
<Badge size="sm" variant="warning">
|
|
690
|
+
<AlertTriangleIcon boxSize="2xs" aria-hidden />
|
|
691
|
+
<span aria-hidden>2</span>
|
|
692
|
+
<VisuallyHidden>확인 필요 2개</VisuallyHidden>
|
|
693
|
+
</Badge>
|
|
694
|
+
}
|
|
695
|
+
>
|
|
696
|
+
커넥터
|
|
697
|
+
</NavList.Item>
|
|
698
|
+
</NavList>
|
|
699
|
+
</Rail>
|
|
700
|
+
),
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
const MANY = Array.from({ length: 60 }, (_, i) => i + 1);
|
|
704
|
+
|
|
705
|
+
/** 60 rows in three groups, inside a scrolling sidebar — Tab to the bottom. */
|
|
706
|
+
export const LongList: Story = {
|
|
707
|
+
render: (args) => (
|
|
708
|
+
<Box
|
|
709
|
+
h="360px"
|
|
710
|
+
overflowY="auto"
|
|
711
|
+
w="260px"
|
|
712
|
+
p={2}
|
|
713
|
+
bg="bg.subtle"
|
|
714
|
+
borderRadius="lg"
|
|
715
|
+
>
|
|
716
|
+
<NavList {...args} aria-label="문서함">
|
|
717
|
+
{[0, 1, 2].map((g) => (
|
|
718
|
+
<NavList.Group
|
|
719
|
+
key={g}
|
|
720
|
+
title={['최근', '공유 드라이브', 'Archive'][g]}
|
|
721
|
+
>
|
|
722
|
+
{MANY.slice(g * 20, g * 20 + 20).map((n) => (
|
|
723
|
+
<NavList.Item
|
|
724
|
+
key={n}
|
|
725
|
+
href={`#doc-${n}`}
|
|
726
|
+
isCurrent={n === 42}
|
|
727
|
+
trailingVisual={n % 7 === 0 ? n : undefined}
|
|
728
|
+
>
|
|
729
|
+
{n % 5 === 0
|
|
730
|
+
? `문서 ${n} — 아주 긴 제목이 말줄임표로 잘리는지 확인하는 항목`
|
|
731
|
+
: n % 3 === 0
|
|
732
|
+
? `Document ${n} with a fairly long English title`
|
|
733
|
+
: `문서 ${n}`}
|
|
734
|
+
</NavList.Item>
|
|
735
|
+
))}
|
|
736
|
+
</NavList.Group>
|
|
737
|
+
))}
|
|
738
|
+
</NavList>
|
|
739
|
+
</Box>
|
|
740
|
+
),
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
const STRIP = [
|
|
744
|
+
'전체',
|
|
745
|
+
'이미지',
|
|
746
|
+
'영상',
|
|
747
|
+
'음악',
|
|
748
|
+
'프레젠테이션',
|
|
749
|
+
'문서',
|
|
750
|
+
'스프레드시트',
|
|
751
|
+
'코드',
|
|
752
|
+
'기타',
|
|
753
|
+
];
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* A strip whose current item starts off-screen: the list scrolls ITSELF
|
|
757
|
+
* sideways to show it (never the page), on mount and whenever it changes.
|
|
758
|
+
*/
|
|
759
|
+
export const HorizontalCurrentOffscreen: Story = {
|
|
760
|
+
render: () => {
|
|
761
|
+
const [current, setCurrent] = useState('기타');
|
|
762
|
+
return (
|
|
763
|
+
<Box maxW="320px" p={2} bg="bg.subtle" borderRadius="lg">
|
|
764
|
+
<NavList aria-label="파일 종류" orientation="horizontal">
|
|
765
|
+
{STRIP.map((label) => (
|
|
766
|
+
<NavList.Item
|
|
767
|
+
key={label}
|
|
768
|
+
onClick={() => setCurrent(label)}
|
|
769
|
+
isCurrent={current === label}
|
|
770
|
+
>
|
|
771
|
+
{label}
|
|
772
|
+
</NavList.Item>
|
|
773
|
+
))}
|
|
774
|
+
</NavList>
|
|
775
|
+
</Box>
|
|
776
|
+
);
|
|
777
|
+
},
|
|
778
|
+
};
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Right-to-left: the count and the trailing action follow the inline end, and
|
|
782
|
+
* a group title its start. Layout reads the inherited direction in CSS, so a
|
|
783
|
+
* server render is right to left on its first paint.
|
|
784
|
+
*/
|
|
785
|
+
export const RightToLeft: Story = {
|
|
786
|
+
render: () => (
|
|
787
|
+
<Box dir="rtl">
|
|
788
|
+
<Rail>
|
|
789
|
+
<NavList aria-label="القائمة">
|
|
790
|
+
<NavList.Item
|
|
791
|
+
href="#1"
|
|
792
|
+
isCurrent
|
|
793
|
+
leadingVisual={<HomeIcon boxSize="sm" />}
|
|
794
|
+
trailingVisual={12}
|
|
795
|
+
>
|
|
796
|
+
الرئيسية
|
|
797
|
+
</NavList.Item>
|
|
798
|
+
<NavList.Item
|
|
799
|
+
href="#2"
|
|
800
|
+
leadingVisual={<UsersIcon boxSize="sm" />}
|
|
801
|
+
trailingAction={
|
|
802
|
+
<IconButton aria-label="المزيد" size="xs">
|
|
803
|
+
<DotsHorizontalIcon />
|
|
804
|
+
</IconButton>
|
|
805
|
+
}
|
|
806
|
+
>
|
|
807
|
+
الأعضاء
|
|
808
|
+
</NavList.Item>
|
|
809
|
+
<NavList.Item
|
|
810
|
+
href="#3"
|
|
811
|
+
leadingVisual={<ChatIcon boxSize="sm" />}
|
|
812
|
+
trailingActionVisibility="hover"
|
|
813
|
+
trailingAction={
|
|
814
|
+
<IconButton aria-label="خيارات المحادثات" size="xs">
|
|
815
|
+
<DotsHorizontalIcon />
|
|
816
|
+
</IconButton>
|
|
817
|
+
}
|
|
818
|
+
>
|
|
819
|
+
المحادثات الأخيرة ومقترحات الحملة التسويقية
|
|
820
|
+
</NavList.Item>
|
|
821
|
+
<NavList.Group title="الإدارة" isCollapsible>
|
|
822
|
+
<NavList.Item
|
|
823
|
+
href="#4"
|
|
824
|
+
leadingVisual={<SettingsIcon boxSize="sm" />}
|
|
825
|
+
>
|
|
826
|
+
الإعدادات
|
|
827
|
+
</NavList.Item>
|
|
828
|
+
</NavList.Group>
|
|
829
|
+
</NavList>
|
|
830
|
+
</Rail>
|
|
831
|
+
</Box>
|
|
832
|
+
),
|
|
833
|
+
};
|
|
834
|
+
|
|
835
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
836
|
+
// Pulled into `NavList.usage.mdx` with <Canvas of={…} />. Hidden from the
|
|
837
|
+
// sidebar (`!dev`).
|
|
838
|
+
|
|
839
|
+
export const DoNamedRailOfPlaces: Story = {
|
|
840
|
+
tags: ['!dev'],
|
|
841
|
+
name: 'Usage / Do: a named rail, one current row',
|
|
842
|
+
render: () => (
|
|
843
|
+
<Rail>
|
|
844
|
+
<NavList aria-label="관리자 메뉴">
|
|
845
|
+
<NavList.Item href="#" leadingVisual={<UsersIcon />} isCurrent>
|
|
846
|
+
멤버 관리
|
|
847
|
+
</NavList.Item>
|
|
848
|
+
<NavList.Item href="#" leadingVisual={<LayoutDashboardIcon />}>
|
|
849
|
+
사용량
|
|
850
|
+
</NavList.Item>
|
|
851
|
+
<NavList.Item href="#" leadingVisual={<SettingsIcon />}>
|
|
852
|
+
설정
|
|
853
|
+
</NavList.Item>
|
|
854
|
+
</NavList>
|
|
855
|
+
</Rail>
|
|
856
|
+
),
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
export const DontActionsInARail: Story = {
|
|
860
|
+
tags: ['!dev'],
|
|
861
|
+
name: "Usage / Don't: commands mixed into the rail",
|
|
862
|
+
render: () => (
|
|
863
|
+
<Rail>
|
|
864
|
+
<NavList aria-label="관리자 메뉴">
|
|
865
|
+
<NavList.Item href="#" isCurrent>
|
|
866
|
+
멤버 관리
|
|
867
|
+
</NavList.Item>
|
|
868
|
+
<NavList.Item onClick={() => {}}>멤버 초대하기</NavList.Item>
|
|
869
|
+
<NavList.Item onClick={() => {}}>CSV 내보내기</NavList.Item>
|
|
870
|
+
</NavList>
|
|
871
|
+
</Rail>
|
|
872
|
+
),
|
|
873
|
+
};
|
|
874
|
+
|
|
875
|
+
/** Tokens a row reads, from `NAV_LIST_RAMP` in `NavList.styles.ts`. */
|
|
876
|
+
export const UsageTokens: Story = {
|
|
877
|
+
tags: ['!dev'],
|
|
878
|
+
name: 'Usage / Tokens',
|
|
879
|
+
render: () => (
|
|
880
|
+
<TokenTable
|
|
881
|
+
rows={[
|
|
882
|
+
{
|
|
883
|
+
token: NAV_LIST_RAMP.label,
|
|
884
|
+
use: <T en="Row · label" ko="항목 · 글자" />,
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
token: NAV_LIST_RAMP.currentLabel,
|
|
888
|
+
use: (
|
|
889
|
+
<T en="Current row · label (bold)" ko="현재 항목 · 글자(굵게)" />
|
|
890
|
+
),
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
token: NAV_LIST_RAMP.currentFill,
|
|
894
|
+
use: (
|
|
895
|
+
<T
|
|
896
|
+
en="Current row and hover · fill"
|
|
897
|
+
ko="현재 항목·마우스 올림 · 배경"
|
|
898
|
+
/>
|
|
899
|
+
),
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
token: NAV_LIST_RAMP.pressedFill,
|
|
903
|
+
use: (
|
|
904
|
+
<T
|
|
905
|
+
en="Pressed row · fill (border.strong under high contrast)"
|
|
906
|
+
ko="누르는 동안 · 배경(고대비에서는 border.strong)"
|
|
907
|
+
/>
|
|
908
|
+
),
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
token: NAV_LIST_RAMP.trailing,
|
|
912
|
+
use: (
|
|
913
|
+
<T en="Trailing count · group title" ko="뒤쪽 개수 · 묶음 제목" />
|
|
914
|
+
),
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
token: 'disabled.fg',
|
|
918
|
+
use: <T en="Disabled row" ko="사용할 수 없는 항목" />,
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
token: 'focus.ring',
|
|
922
|
+
use: <T en="Focus ring (inset)" ko="초점 테두리(안쪽)" />,
|
|
923
|
+
},
|
|
924
|
+
]}
|
|
925
|
+
/>
|
|
926
|
+
),
|
|
927
|
+
};
|