@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
|
@@ -2,6 +2,9 @@ import { Box, HStack, Stack, VStack } from '@chakra-ui/react';
|
|
|
2
2
|
import { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
|
|
5
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
6
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
7
|
+
import { Text } from '../Typography';
|
|
5
8
|
import { Radio } from './Radio';
|
|
6
9
|
import { RadioGroup } from './RadioGroup';
|
|
7
10
|
|
|
@@ -261,3 +264,119 @@ export const FormExample: RadioGroupStory = {
|
|
|
261
264
|
);
|
|
262
265
|
},
|
|
263
266
|
};
|
|
267
|
+
|
|
268
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
269
|
+
// Pulled into `Radio.usage.mdx` with <Canvas of={…} />. Hidden (`!dev`); `tags`
|
|
270
|
+
// is written out on each story because the indexer reads CSF statically.
|
|
271
|
+
|
|
272
|
+
const PLANS = [
|
|
273
|
+
{
|
|
274
|
+
value: 'member',
|
|
275
|
+
label: '멤버별 한도',
|
|
276
|
+
hint: '멤버마다 같은 크레딧을 나눠 줍니다.',
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
value: 'group',
|
|
280
|
+
label: '그룹 공용',
|
|
281
|
+
hint: '그룹 안에서 크레딧을 함께 씁니다.',
|
|
282
|
+
},
|
|
283
|
+
{ value: 'none', label: '제한 없음', hint: '조직 전체 한도만 적용합니다.' },
|
|
284
|
+
];
|
|
285
|
+
|
|
286
|
+
export const DoNamedGroup: StoryObj = {
|
|
287
|
+
tags: ['!dev'],
|
|
288
|
+
parameters: { layout: 'padded' },
|
|
289
|
+
name: 'Usage / Do: a named group with a default',
|
|
290
|
+
render: () => (
|
|
291
|
+
<Stack gap={3} maxW="420px">
|
|
292
|
+
<Text id="usage-credit-mode" fontWeight="semibold">
|
|
293
|
+
크레딧 배분 방식
|
|
294
|
+
</Text>
|
|
295
|
+
<RadioGroup defaultValue="member" aria-labelledby="usage-credit-mode">
|
|
296
|
+
<Stack gap={3}>
|
|
297
|
+
{PLANS.map((plan) => (
|
|
298
|
+
<Radio key={plan.value} value={plan.value} alignItems="flex-start">
|
|
299
|
+
<Radio.Control />
|
|
300
|
+
<Radio.Text>
|
|
301
|
+
{plan.label}
|
|
302
|
+
<Text as="span" display="block" color="fg.muted" fontSize="sm">
|
|
303
|
+
{plan.hint}
|
|
304
|
+
</Text>
|
|
305
|
+
</Radio.Text>
|
|
306
|
+
</Radio>
|
|
307
|
+
))}
|
|
308
|
+
</Stack>
|
|
309
|
+
</RadioGroup>
|
|
310
|
+
</Stack>
|
|
311
|
+
),
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
export const DontRadioForMany: StoryObj = {
|
|
315
|
+
tags: ['!dev'],
|
|
316
|
+
parameters: { layout: 'padded' },
|
|
317
|
+
name: "Usage / Don't: a long list of radios",
|
|
318
|
+
render: () => (
|
|
319
|
+
<RadioGroup defaultValue="1" aria-label="시간대">
|
|
320
|
+
<Stack gap={2}>
|
|
321
|
+
{[
|
|
322
|
+
'서울',
|
|
323
|
+
'도쿄',
|
|
324
|
+
'싱가포르',
|
|
325
|
+
'시드니',
|
|
326
|
+
'런던',
|
|
327
|
+
'파리',
|
|
328
|
+
'뉴욕',
|
|
329
|
+
'로스앤젤레스',
|
|
330
|
+
].map((city, i) => (
|
|
331
|
+
<Radio key={city} value={String(i)}>
|
|
332
|
+
<Radio.Control />
|
|
333
|
+
<Radio.Text>{city}</Radio.Text>
|
|
334
|
+
</Radio>
|
|
335
|
+
))}
|
|
336
|
+
</Stack>
|
|
337
|
+
</RadioGroup>
|
|
338
|
+
),
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
export const DontSingleRadio: StoryObj = {
|
|
342
|
+
tags: ['!dev'],
|
|
343
|
+
parameters: { layout: 'padded' },
|
|
344
|
+
name: "Usage / Don't: one radio on its own",
|
|
345
|
+
render: () => (
|
|
346
|
+
<RadioGroup aria-label="약관">
|
|
347
|
+
<Radio value="agree">
|
|
348
|
+
<Radio.Control />
|
|
349
|
+
<Radio.Text>이용약관에 동의합니다</Radio.Text>
|
|
350
|
+
</Radio>
|
|
351
|
+
</RadioGroup>
|
|
352
|
+
),
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
/** Tokens `RadioControl` reads, as written in `RadioControl.tsx`. */
|
|
356
|
+
export const UsageTokens: StoryObj = {
|
|
357
|
+
tags: ['!dev'],
|
|
358
|
+
parameters: { layout: 'padded' },
|
|
359
|
+
name: 'Usage / Tokens',
|
|
360
|
+
render: () => (
|
|
361
|
+
<TokenTable
|
|
362
|
+
rows={[
|
|
363
|
+
{
|
|
364
|
+
token: 'bg.surface',
|
|
365
|
+
use: <T en="Unselected ring fill" ko="선택 전 원 안쪽" />,
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
token: 'border.control',
|
|
369
|
+
use: <T en="Unselected ring (3:1)" ko="선택 전 테두리(3:1)" />,
|
|
370
|
+
},
|
|
371
|
+
{ token: 'primary.main', use: <T en="Selected fill" ko="선택 채움" /> },
|
|
372
|
+
{ token: 'fg.onPrimary', use: <T en="Selected dot" ko="선택 점" /> },
|
|
373
|
+
{ token: 'disabled.bg', use: <T en="Disabled ring" ko="비활성 원" /> },
|
|
374
|
+
{ token: 'disabled.fg', use: <T en="Disabled dot" ko="비활성 점" /> },
|
|
375
|
+
{
|
|
376
|
+
token: 'focus.ring',
|
|
377
|
+
use: <T en="Keyboard focus ring" ko="키보드 초점 링" />,
|
|
378
|
+
},
|
|
379
|
+
]}
|
|
380
|
+
/>
|
|
381
|
+
),
|
|
382
|
+
};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as RadioStories from './Radio.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={RadioStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# Radio
|
|
13
|
+
|
|
14
|
+
A set of options where the user picks exactly one, all visible at once.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- Two to five options that fit on screen, where seeing them side by side helps
|
|
19
|
+
the user choose: a credit allocation mode, a visibility setting.
|
|
20
|
+
- Options that each need a line of explanation under the label.
|
|
21
|
+
|
|
22
|
+
## When not to use
|
|
23
|
+
|
|
24
|
+
- More than about five options, or a list that grows → `SelectField`, or
|
|
25
|
+
`ComboboxField` when the user would search.
|
|
26
|
+
- Any number of choices, or a single yes/no → `Checkbox`. A setting that is on
|
|
27
|
+
or off → `Switch`.
|
|
28
|
+
- Switching between views of the same content → `SegmentedControl` or `Tabs`.
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
</En>
|
|
33
|
+
|
|
34
|
+
<Ko>
|
|
35
|
+
|
|
36
|
+
# Radio
|
|
37
|
+
|
|
38
|
+
선택지를 모두 펼쳐 놓고 그중 하나만 고르게 합니다.
|
|
39
|
+
|
|
40
|
+
## 언제 쓰나요
|
|
41
|
+
|
|
42
|
+
- 화면에 다 들어가는 두세 개에서 다섯 개 정도의 선택지를 나란히 보고 고를 때: 크레딧
|
|
43
|
+
배분 방식, 공개 범위.
|
|
44
|
+
- 선택지마다 라벨 아래 한 줄 설명이 필요할 때.
|
|
45
|
+
|
|
46
|
+
## 언제 쓰지 않나요
|
|
47
|
+
|
|
48
|
+
- 선택지가 다섯 개를 넘거나 늘어날 수 있다면 `SelectField`를, 검색이 편하다면
|
|
49
|
+
`ComboboxField`를 씁니다.
|
|
50
|
+
- 원하는 만큼 고르거나 예/아니요 하나라면 `Checkbox`를, 켜고 끄는 설정은 `Switch`를
|
|
51
|
+
씁니다.
|
|
52
|
+
- 같은 내용의 보기 방식을 바꿀 때는 `SegmentedControl`이나 `Tabs`를 씁니다.
|
|
53
|
+
|
|
54
|
+
## 속성
|
|
55
|
+
|
|
56
|
+
</Ko>
|
|
57
|
+
|
|
58
|
+
<ArgTypes of={RadioStories} include={['value', 'disabled', 'invalid']} />
|
|
59
|
+
|
|
60
|
+
<En>
|
|
61
|
+
|
|
62
|
+
`RadioGroup` holds the value (`value` / `defaultValue`, `onValueChange`,
|
|
63
|
+
`orientation`, `disabled`, `name`) and paints the checked state in
|
|
64
|
+
`primary.main`. Each option is `<Radio value>` with `<Radio.Control />` and
|
|
65
|
+
`<Radio.Text>`.
|
|
66
|
+
|
|
67
|
+
## Do / Don't
|
|
68
|
+
|
|
69
|
+
</En>
|
|
70
|
+
|
|
71
|
+
<Ko>
|
|
72
|
+
|
|
73
|
+
값은 `RadioGroup`이 가집니다(`value`·`defaultValue`, `onValueChange`, `orientation`,
|
|
74
|
+
`disabled`, `name`). 선택된 상태는 `primary.main`으로 칠합니다. 선택지마다
|
|
75
|
+
`<Radio value>` 안에 `<Radio.Control />`과 `<Radio.Text>`를 둡니다.
|
|
76
|
+
|
|
77
|
+
## 이렇게 하세요 / 이렇게 하지 마세요
|
|
78
|
+
|
|
79
|
+
</Ko>
|
|
80
|
+
|
|
81
|
+
<Canvas of={RadioStories.DoNamedGroup} />
|
|
82
|
+
<Verdict
|
|
83
|
+
kind="do"
|
|
84
|
+
en="Name the group with a visible question connected by aria-labelledby, preselect the safest option, and explain each option in a muted line."
|
|
85
|
+
ko="aria-labelledby로 연결한 보이는 질문으로 묶음에 이름을 붙이고, 가장 안전한 선택지를 미리 골라 두며, 선택지마다 흐린 글자로 설명을 붙입니다."
|
|
86
|
+
/>
|
|
87
|
+
|
|
88
|
+
<Canvas of={RadioStories.DontRadioForMany} />
|
|
89
|
+
<Verdict
|
|
90
|
+
kind="dont"
|
|
91
|
+
en="List eight or more radios. The page grows long and the choice is hard to scan; use SelectField."
|
|
92
|
+
ko="라디오를 여덟 개 넘게 늘어놓지 마세요. 화면이 길어지고 훑어보기 어렵습니다. SelectField를 씁니다."
|
|
93
|
+
/>
|
|
94
|
+
|
|
95
|
+
<Canvas of={RadioStories.DontSingleRadio} />
|
|
96
|
+
<Verdict
|
|
97
|
+
kind="dont"
|
|
98
|
+
en="Use a single radio for agreement. Once selected it cannot be cleared; use a Checkbox."
|
|
99
|
+
ko="동의 항목 하나에 라디오를 쓰지 마세요. 한 번 고르면 해제할 수 없습니다. Checkbox를 씁니다."
|
|
100
|
+
/>
|
|
101
|
+
|
|
102
|
+
<En>
|
|
103
|
+
|
|
104
|
+
## Content
|
|
105
|
+
|
|
106
|
+
- The question above the group names what is chosen (크레딧 배분 방식).
|
|
107
|
+
- Options are short, parallel and mutually exclusive. Order them by likelihood
|
|
108
|
+
or by size, not at random.
|
|
109
|
+
- If none of the options may apply, add one that says so (제한 없음) rather than
|
|
110
|
+
leaving the group with no selection.
|
|
111
|
+
|
|
112
|
+
## Accessibility
|
|
113
|
+
|
|
114
|
+
What Radio does for you:
|
|
115
|
+
|
|
116
|
+
- Native radio inputs inside a `radiogroup`. Tab moves into the group onto the
|
|
117
|
+
selected option; the arrow keys move and select (WCAG 2.1.1).
|
|
118
|
+
- Each radio emits a unique id for its control and its indicator (the
|
|
119
|
+
duplicate-id defect in `ACCESSIBILITY.md` §4, KWCAG 5.4.1.1 마크업 오류 방지).
|
|
120
|
+
- Keyboard focus shows a ring on the control (WCAG 2.4.7); the selected state
|
|
121
|
+
is a dot, not colour alone (WCAG 1.4.1).
|
|
122
|
+
|
|
123
|
+
What you still have to do:
|
|
124
|
+
|
|
125
|
+
- **Name the group.** `RadioGroup` does not render a label part, so pass
|
|
126
|
+
`aria-labelledby` pointing at the visible question, or `aria-label` (WCAG
|
|
127
|
+
1.3.1, 4.1.2).
|
|
128
|
+
- Every option needs a `Radio.Text`.
|
|
129
|
+
- Put a group error in words under the group (WCAG 3.3.1).
|
|
130
|
+
|
|
131
|
+
## Tokens
|
|
132
|
+
|
|
133
|
+
</En>
|
|
134
|
+
|
|
135
|
+
<Ko>
|
|
136
|
+
|
|
137
|
+
## 문구
|
|
138
|
+
|
|
139
|
+
- 묶음 위 질문에는 고르는 대상을 씁니다(크레딧 배분 방식).
|
|
140
|
+
- 선택지는 짧고 같은 형식으로 쓰며 서로 겹치지 않게 합니다. 아무렇게나 두지 말고
|
|
141
|
+
가능성이 높은 순이나 크기순으로 둡니다.
|
|
142
|
+
- 어떤 선택지도 해당하지 않을 수 있다면, 아무것도 고르지 않은 채로 두지 말고 그렇다고
|
|
143
|
+
말하는 선택지를 하나 둡니다(제한 없음).
|
|
144
|
+
|
|
145
|
+
## 접근성
|
|
146
|
+
|
|
147
|
+
Radio가 알아서 하는 일
|
|
148
|
+
|
|
149
|
+
- `radiogroup` 안의 네이티브 라디오 입력입니다. Tab을 누르면 묶음 안의 선택된 항목으로
|
|
150
|
+
들어가고, 방향키로 옮기면서 고릅니다(WCAG 2.1.1).
|
|
151
|
+
- 라디오마다 컨트롤과 표시에 서로 다른 id를 씁니다(`ACCESSIBILITY.md` 4절의 중복 id
|
|
152
|
+
결함, KWCAG 5.4.1.1 마크업 오류 방지).
|
|
153
|
+
- 키보드 초점 링이 컨트롤에 보이고(WCAG 2.4.7), 선택 상태는 색이 아니라 점으로
|
|
154
|
+
나타납니다(WCAG 1.4.1).
|
|
155
|
+
|
|
156
|
+
직접 챙겨야 하는 일
|
|
157
|
+
|
|
158
|
+
- **묶음에 이름을 붙입니다.** `RadioGroup`은 라벨 부품을 그리지 않으므로, 보이는
|
|
159
|
+
질문을 가리키는 `aria-labelledby`나 `aria-label`을 넘깁니다(WCAG 1.3.1, 4.1.2).
|
|
160
|
+
- 선택지마다 `Radio.Text`가 있어야 합니다.
|
|
161
|
+
- 묶음 전체의 오류는 묶음 아래에 문구로 보여 줍니다(WCAG 3.3.1).
|
|
162
|
+
|
|
163
|
+
## 토큰
|
|
164
|
+
|
|
165
|
+
</Ko>
|
|
166
|
+
|
|
167
|
+
<Canvas of={RadioStories.UsageTokens} sourceState="none" />
|
|
168
|
+
|
|
169
|
+
<En>
|
|
170
|
+
|
|
171
|
+
## Related
|
|
172
|
+
|
|
173
|
+
- **SelectField** / **ComboboxField**: one value from a long list.
|
|
174
|
+
- **Checkbox**: any number of choices.
|
|
175
|
+
- **SegmentedControl**: switching views.
|
|
176
|
+
|
|
177
|
+
</En>
|
|
178
|
+
|
|
179
|
+
<Ko>
|
|
180
|
+
|
|
181
|
+
## 관련 컴포넌트
|
|
182
|
+
|
|
183
|
+
- **SelectField** / **ComboboxField**: 긴 목록에서 값 하나.
|
|
184
|
+
- **Checkbox**: 원하는 만큼 고르기.
|
|
185
|
+
- **SegmentedControl**: 보기 전환.
|
|
186
|
+
|
|
187
|
+
</Ko>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as RevealStories from './Reveal.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={RevealStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# Reveal
|
|
13
|
+
|
|
14
|
+
Opens a small block out of zero height, so content that arrives underneath
|
|
15
|
+
something the reader is looking at slides the page down instead of making it
|
|
16
|
+
jump.
|
|
17
|
+
|
|
18
|
+
</En>
|
|
19
|
+
|
|
20
|
+
<Ko>
|
|
21
|
+
|
|
22
|
+
# Reveal
|
|
23
|
+
|
|
24
|
+
작은 블록을 높이 0에서 펼쳐 엽니다. 사용자가 보고 있는 요소 아래에 내용이 새로 생길 때
|
|
25
|
+
페이지가 한 번에 튀지 않고 부드럽게 밀려 내려갑니다.
|
|
26
|
+
|
|
27
|
+
</Ko>
|
|
28
|
+
|
|
29
|
+
<Canvas of={RevealStories.Default} />
|
|
30
|
+
|
|
31
|
+
<En>
|
|
32
|
+
|
|
33
|
+
## When to use
|
|
34
|
+
|
|
35
|
+
- A rationale that opens under an answer once it is checked.
|
|
36
|
+
- A reason field or note that opens under a choice, such as the comment box
|
|
37
|
+
under "Reject" in a review dialog. Give each branch its own `key` so
|
|
38
|
+
switching branches opens the new block again.
|
|
39
|
+
- A validation message under a field.
|
|
40
|
+
|
|
41
|
+
## When not to use
|
|
42
|
+
|
|
43
|
+
- The block opens and closes again → `Collapsible` (or `Accordion`), which
|
|
44
|
+
keeps the node mounted and animates both ways. Reveal only opens; the caller
|
|
45
|
+
mounts it when the content should appear.
|
|
46
|
+
- Long lists, tables or anything with its own scroll → render it directly.
|
|
47
|
+
Reveal animates a layout property every frame, which is fine for a short
|
|
48
|
+
block and costly for a big one.
|
|
49
|
+
- The element should appear without pushing anything → `Appear`.
|
|
50
|
+
|
|
51
|
+
## Reduced motion and accessibility
|
|
52
|
+
|
|
53
|
+
- With `prefers-reduced-motion: reduce` the block opens instantly. The content
|
|
54
|
+
is the information; the opening only keeps the page from seeming to break.
|
|
55
|
+
- Reveal does not move focus or announce the new text. A validation message
|
|
56
|
+
should still be tied to its field (`FieldError` inside a `FormControl`, which
|
|
57
|
+
sets `aria-describedby` and `aria-invalid`) and described in words
|
|
58
|
+
(WCAG 3.3.1).
|
|
59
|
+
- Reveal adds two `div`s (the animating grid and the clipping box inside it).
|
|
60
|
+
Do not put it inside a `<button>`, a `<tr>` or an Ark part that needs its
|
|
61
|
+
children directly (ACCESSIBILITY.md §5); animate the inner element instead.
|
|
62
|
+
|
|
63
|
+
## Props
|
|
64
|
+
|
|
65
|
+
Reveal also takes Box props; layout props land on the outer element.
|
|
66
|
+
|
|
67
|
+
</En>
|
|
68
|
+
|
|
69
|
+
<Ko>
|
|
70
|
+
|
|
71
|
+
## 언제 쓰나요
|
|
72
|
+
|
|
73
|
+
- 답을 확인한 뒤 그 답 아래에 해설이 열릴 때.
|
|
74
|
+
- 선택지 아래에 사유 입력란이나 안내가 열릴 때. 예를 들어 검토 창에서 "거절"을 고르면
|
|
75
|
+
아래에 의견란이 열립니다. 갈래마다 `key`를 따로 주면, 다른 갈래로 바꿀 때 새 블록이
|
|
76
|
+
다시 펼쳐집니다.
|
|
77
|
+
- 입력란 아래에 검증 메시지가 나타날 때.
|
|
78
|
+
|
|
79
|
+
## 언제 쓰지 않나요
|
|
80
|
+
|
|
81
|
+
- 열렸다가 다시 닫혀야 한다면 `Collapsible`(또는 `Accordion`)을 씁니다. 노드를
|
|
82
|
+
마운트된 채로 두고 양쪽 방향으로 애니메이션합니다. Reveal은 열기만 하며, 내용이
|
|
83
|
+
나타날 때 호출하는 쪽이 마운트합니다.
|
|
84
|
+
- 긴 목록, 표, 자체 스크롤이 있는 영역이라면 그냥 바로 그립니다. Reveal은 매 프레임
|
|
85
|
+
레이아웃 속성을 바꾸므로 짧은 블록에는 괜찮지만 큰 블록에는 부담이 됩니다.
|
|
86
|
+
- 아무것도 밀어내지 않고 나타나야 한다면 `Appear`를 씁니다.
|
|
87
|
+
|
|
88
|
+
## 동작 줄이기와 접근성
|
|
89
|
+
|
|
90
|
+
- `prefers-reduced-motion: reduce`에서는 바로 열립니다. 정보는 내용에 있고, 펼치는
|
|
91
|
+
동작은 페이지가 깨져 보이지 않게 하려는 장치일 뿐입니다.
|
|
92
|
+
- Reveal은 초점을 옮기거나 새 문구를 읽어 주지 않습니다. 검증 메시지는 여전히
|
|
93
|
+
입력란과 연결하고(`FormControl` 안의 `FieldError`가 `aria-describedby`와
|
|
94
|
+
`aria-invalid`를 연결합니다) 문장으로 설명해야 합니다(WCAG 3.3.1).
|
|
95
|
+
- Reveal은 `div`를 두 개 더합니다(애니메이션되는 그리드와 그 안에서 내용을 자르는
|
|
96
|
+
상자). `<button>`, `<tr>`, 자식을 직접 다루는 Ark 파트 안에는 넣지 않고
|
|
97
|
+
(ACCESSIBILITY.md 5절), 안쪽 요소에 애니메이션을 줍니다.
|
|
98
|
+
|
|
99
|
+
## 속성
|
|
100
|
+
|
|
101
|
+
Box 속성도 받으며, 레이아웃 속성은 바깥 요소에 적용됩니다.
|
|
102
|
+
|
|
103
|
+
</Ko>
|
|
104
|
+
|
|
105
|
+
<ArgTypes of={RevealStories} include={['durationMs']} />
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as ScaledContextStories from './ScaledContext.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={ScaledContextStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# ScaledContext
|
|
13
|
+
|
|
14
|
+
Re-scales a whole subtree from one `fontSize`: type, spacing and component
|
|
15
|
+
sizes grow or shrink together.
|
|
16
|
+
|
|
17
|
+
</En>
|
|
18
|
+
|
|
19
|
+
<Ko>
|
|
20
|
+
|
|
21
|
+
# ScaledContext
|
|
22
|
+
|
|
23
|
+
`fontSize` 하나로 하위 트리 전체의 크기를 바꿉니다. 글자, 간격, 컴포넌트 크기가 함께
|
|
24
|
+
커지거나 작아집니다.
|
|
25
|
+
|
|
26
|
+
</Ko>
|
|
27
|
+
|
|
28
|
+
<Canvas of={ScaledContextStories.ScalingRem} />
|
|
29
|
+
|
|
30
|
+
<En>
|
|
31
|
+
|
|
32
|
+
## When to use
|
|
33
|
+
|
|
34
|
+
- A reading surface that runs at a larger base than the app, such as a chat
|
|
35
|
+
thread at 16px in a 14px app.
|
|
36
|
+
- A dense block inside that surface (a markdown table, a diff, tool output)
|
|
37
|
+
that should drop back to the app's 14px base.
|
|
38
|
+
- A column that should grow at a breakpoint as one unit, for example an
|
|
39
|
+
authentication form at 14px up to `xl` and 16px above it
|
|
40
|
+
(`fontSize={{ base: '14px', xl: '16px' }}`).
|
|
41
|
+
|
|
42
|
+
## When not to use
|
|
43
|
+
|
|
44
|
+
- Changing the size of one piece of text → a `textStyle` or `fontSize` on the
|
|
45
|
+
Typography component.
|
|
46
|
+
- Making a single control bigger or smaller → that component's `size` prop.
|
|
47
|
+
|
|
48
|
+
## Accessibility
|
|
49
|
+
|
|
50
|
+
- Prefer `rem` values. A `rem` scale still follows the reader's browser
|
|
51
|
+
font-size setting; a `px` value fixes the base for that subtree.
|
|
52
|
+
- Scaling down for density must not push text below a readable size or make
|
|
53
|
+
targets hard to hit. Check the smallest text and the control heights in the
|
|
54
|
+
scaled block.
|
|
55
|
+
- ScaledContext renders a `div`. Pass `css={{ display: 'contents' }}` when the
|
|
56
|
+
wrapper must not take part in layout.
|
|
57
|
+
|
|
58
|
+
## Props
|
|
59
|
+
|
|
60
|
+
ScaledContext takes Box props; there are no props of its own. `fontSize` sets
|
|
61
|
+
the scale. Text styles in this theme are already in `em`, so type follows
|
|
62
|
+
`fontSize`; ScaledContext rewrites the `spacing` and `sizes` tokens that are in
|
|
63
|
+
`rem` to `em` on the wrapper, so padding, gaps and control heights follow too.
|
|
64
|
+
Tokens in `px` are left alone. A `style` you pass is merged over the rewritten
|
|
65
|
+
variables. ScaledContexts can be nested; each level scales from its own
|
|
66
|
+
`fontSize`.
|
|
67
|
+
|
|
68
|
+
It reads Chakra's internal token maps. If a future Chakra release renames them,
|
|
69
|
+
scaling stops silently, so check a scaled screen after a Chakra upgrade.
|
|
70
|
+
|
|
71
|
+
</En>
|
|
72
|
+
|
|
73
|
+
<Ko>
|
|
74
|
+
|
|
75
|
+
## 언제 쓰나요
|
|
76
|
+
|
|
77
|
+
- 앱보다 큰 기준 크기로 읽히는 영역. 예를 들어 14px 앱 안에서 16px로 보이는 채팅 대화.
|
|
78
|
+
- 그런 영역 안에서 다시 앱 기준인 14px로 돌아가야 하는 촘촘한 블록(마크다운 표, diff,
|
|
79
|
+
도구 출력).
|
|
80
|
+
- 특정 화면 너비에서 한 덩어리로 커져야 하는 열. 예를 들어 인증 화면의 입력 폼을 `xl`
|
|
81
|
+
전까지는 14px, 그 위로는 16px로 둡니다(`fontSize={{ base: '14px', xl: '16px' }}`).
|
|
82
|
+
|
|
83
|
+
## 언제 쓰지 않나요
|
|
84
|
+
|
|
85
|
+
- 글자 하나의 크기만 바꾼다면 Typography 컴포넌트의 `textStyle`이나 `fontSize`를 씁니다.
|
|
86
|
+
- 컨트롤 하나만 키우거나 줄인다면 그 컴포넌트의 `size` 속성을 씁니다.
|
|
87
|
+
|
|
88
|
+
## 접근성
|
|
89
|
+
|
|
90
|
+
- 가능하면 `rem` 값을 씁니다. `rem`은 사용자가 브라우저에서 정한 글자 크기를 그대로
|
|
91
|
+
따르지만, `px` 값은 그 하위 트리의 기준을 고정합니다.
|
|
92
|
+
- 촘촘하게 줄일 때 글자가 읽기 힘들 만큼 작아지거나 누르기 어려운 크기가 되지 않게
|
|
93
|
+
합니다. 줄인 블록에서 가장 작은 글자와 컨트롤 높이를 확인합니다.
|
|
94
|
+
- ScaledContext는 `div`를 그립니다. 감싸는 요소가 레이아웃에 끼어들면 안 될 때는
|
|
95
|
+
`css={{ display: 'contents' }}`를 넘깁니다.
|
|
96
|
+
|
|
97
|
+
## 속성
|
|
98
|
+
|
|
99
|
+
ScaledContext는 Box 속성을 받으며 자체 속성은 없습니다. 크기는 `fontSize`로 정합니다.
|
|
100
|
+
이 테마의 텍스트 스타일은 이미 `em` 단위라 글자는 `fontSize`를 따릅니다. ScaledContext는
|
|
101
|
+
`rem`으로 된 `spacing`, `sizes` 토큰을 감싸는 요소에서 `em`으로 바꿔 쓰므로, 안쪽 여백,
|
|
102
|
+
간격, 컨트롤 높이도 함께 따라갑니다. `px` 토큰은 그대로 둡니다. 넘긴 `style`은 바꾼
|
|
103
|
+
변수 위에 합쳐집니다. 여러 겹으로 겹쳐 쓸 수 있고, 각 단계는 자기 `fontSize`를 기준으로
|
|
104
|
+
크기를 정합니다.
|
|
105
|
+
|
|
106
|
+
Chakra 내부의 토큰 맵을 읽습니다. 이후 Chakra 버전에서 이 구조의 이름이 바뀌면 아무
|
|
107
|
+
경고 없이 크기 조정이 멈추므로, Chakra를 올린 뒤에는 크기를 조정한 화면을 확인합니다.
|
|
108
|
+
|
|
109
|
+
</Ko>
|
|
110
|
+
|
|
111
|
+
<Canvas of={ScaledContextStories.NestedScaling} />
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Box, Flex, Text } from '@chakra-ui/react';
|
|
1
3
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
4
|
|
|
5
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
6
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
7
|
+
import { Button, buttonVariantStyles } from '../Button';
|
|
8
|
+
import { ChevronRightIcon } from '../Icon';
|
|
3
9
|
import { SeeMoreButton } from './SeeMoreButton';
|
|
4
|
-
import {
|
|
5
|
-
import { useState } from 'react';
|
|
10
|
+
import { seeMoreButtonStyles } from './SeeMoreButton.styles';
|
|
6
11
|
|
|
7
12
|
const meta = {
|
|
8
13
|
title: 'Components/SeeMoreButton',
|
|
@@ -55,3 +60,142 @@ export const Default: Story = {
|
|
|
55
60
|
export const AllShown: Story = {
|
|
56
61
|
args: { currentCount: 10, maxCount: 10, disabled: true },
|
|
57
62
|
};
|
|
63
|
+
|
|
64
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
65
|
+
// Pulled into `SeeMoreButton.usage.mdx` with <Canvas of={…} />. Hidden from
|
|
66
|
+
// the sidebar (`!dev`); `tags` is written out on each story because the
|
|
67
|
+
// indexer reads CSF statically.
|
|
68
|
+
|
|
69
|
+
const REVIEWS = [
|
|
70
|
+
'답변이 빠르고 출처를 같이 보여 줘서 좋아요.',
|
|
71
|
+
'학사 규정 질문에 정확하게 답합니다.',
|
|
72
|
+
'긴 문서도 요약을 잘해요.',
|
|
73
|
+
'가끔 예전 공지를 가져옵니다.',
|
|
74
|
+
'수강 신청 기간에 특히 유용했어요.',
|
|
75
|
+
'영어 질문에도 한국어로 답해 줍니다.',
|
|
76
|
+
'표로 정리해 달라고 하면 표로 줍니다.',
|
|
77
|
+
];
|
|
78
|
+
|
|
79
|
+
const ReviewRow = ({ text }: { text: string }) => (
|
|
80
|
+
<Text
|
|
81
|
+
py={3}
|
|
82
|
+
fontSize="sm"
|
|
83
|
+
color="fg.default"
|
|
84
|
+
borderBottomWidth="1px"
|
|
85
|
+
borderColor="border.subtle"
|
|
86
|
+
_last={{ borderBottomWidth: 0 }}
|
|
87
|
+
>
|
|
88
|
+
{text}
|
|
89
|
+
</Text>
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
/** A review list that grows in place, like FactChat's store reviews. */
|
|
93
|
+
export const DoGrowTheList: Story = {
|
|
94
|
+
tags: ['!dev'],
|
|
95
|
+
parameters: { layout: 'padded' },
|
|
96
|
+
name: 'Usage / Do: grow the list in place, remove the button at the end',
|
|
97
|
+
render: () => {
|
|
98
|
+
const [shown, setShown] = useState(3);
|
|
99
|
+
return (
|
|
100
|
+
<Box maxW="420px">
|
|
101
|
+
{REVIEWS.slice(0, shown).map((text) => (
|
|
102
|
+
<ReviewRow key={text} text={text} />
|
|
103
|
+
))}
|
|
104
|
+
{shown < REVIEWS.length && (
|
|
105
|
+
<SeeMoreButton
|
|
106
|
+
currentCount={shown}
|
|
107
|
+
maxCount={REVIEWS.length}
|
|
108
|
+
onClick={() => setShown((n) => Math.min(n + 3, REVIEWS.length))}
|
|
109
|
+
/>
|
|
110
|
+
)}
|
|
111
|
+
</Box>
|
|
112
|
+
);
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const DontNavigate: Story = {
|
|
117
|
+
tags: ['!dev'],
|
|
118
|
+
parameters: { layout: 'padded' },
|
|
119
|
+
name: "Usage / Don't: SeeMoreButton to open another page",
|
|
120
|
+
render: () => (
|
|
121
|
+
<Box maxW="420px">
|
|
122
|
+
{REVIEWS.slice(0, 3).map((text) => (
|
|
123
|
+
<ReviewRow key={text} text={text} />
|
|
124
|
+
))}
|
|
125
|
+
<SeeMoreButton currentCount={3} maxCount={128} />
|
|
126
|
+
</Box>
|
|
127
|
+
),
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export const DoLinkToFullPage: Story = {
|
|
131
|
+
tags: ['!dev'],
|
|
132
|
+
parameters: { layout: 'padded' },
|
|
133
|
+
name: 'Usage / Do: a link-shaped Button to open the full list',
|
|
134
|
+
render: () => (
|
|
135
|
+
<Box maxW="420px">
|
|
136
|
+
<Flex justify="space-between" align="center" mb={1}>
|
|
137
|
+
<Text fontWeight="bold" color="fg.default">
|
|
138
|
+
리뷰
|
|
139
|
+
</Text>
|
|
140
|
+
<Button as="a" href="#" variant="ghost" size="sm">
|
|
141
|
+
전체 보기
|
|
142
|
+
<ChevronRightIcon />
|
|
143
|
+
</Button>
|
|
144
|
+
</Flex>
|
|
145
|
+
{REVIEWS.slice(0, 3).map((text) => (
|
|
146
|
+
<ReviewRow key={text} text={text} />
|
|
147
|
+
))}
|
|
148
|
+
</Box>
|
|
149
|
+
),
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/** Tokens SeeMoreButton reads: the ghost Button recipe plus its hairline. */
|
|
153
|
+
export const UsageTokens: Story = {
|
|
154
|
+
tags: ['!dev'],
|
|
155
|
+
parameters: { layout: 'padded' },
|
|
156
|
+
name: 'Usage / Tokens',
|
|
157
|
+
render: () => {
|
|
158
|
+
const ghost = buttonVariantStyles.ghost as {
|
|
159
|
+
color?: string;
|
|
160
|
+
_hover?: { bgColor?: string };
|
|
161
|
+
_active?: { bgColor?: string };
|
|
162
|
+
};
|
|
163
|
+
return (
|
|
164
|
+
<TokenTable
|
|
165
|
+
rows={[
|
|
166
|
+
{
|
|
167
|
+
token: seeMoreButtonStyles.borderTopColor,
|
|
168
|
+
use: <T en="top hairline" ko="위쪽 구분선" />,
|
|
169
|
+
},
|
|
170
|
+
...(ghost.color
|
|
171
|
+
? [{ token: ghost.color, use: <T en="label" ko="글자" /> }]
|
|
172
|
+
: []),
|
|
173
|
+
...(ghost._hover?.bgColor
|
|
174
|
+
? [
|
|
175
|
+
{
|
|
176
|
+
token: ghost._hover.bgColor,
|
|
177
|
+
use: <T en="hover fill" ko="마우스 올림 바탕" />,
|
|
178
|
+
},
|
|
179
|
+
]
|
|
180
|
+
: []),
|
|
181
|
+
...(ghost._active?.bgColor
|
|
182
|
+
? [
|
|
183
|
+
{
|
|
184
|
+
token: ghost._active.bgColor,
|
|
185
|
+
use: <T en="pressed fill" ko="누름 바탕" />,
|
|
186
|
+
},
|
|
187
|
+
]
|
|
188
|
+
: []),
|
|
189
|
+
{
|
|
190
|
+
token: 'disabled.fgGhost',
|
|
191
|
+
use: <T en="disabled label" ko="비활성 글자" />,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
token: 'focus.ring',
|
|
195
|
+
use: <T en="keyboard focus ring" ko="키보드 초점 링" />,
|
|
196
|
+
},
|
|
197
|
+
]}
|
|
198
|
+
/>
|
|
199
|
+
);
|
|
200
|
+
},
|
|
201
|
+
};
|