@mindlogic-ai/logician-ui 5.0.0-alpha.3 → 5.0.0-alpha.30
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/MIGRATION-5.0.md +40 -1
- package/README.md +1 -0
- package/USAGE.md +20 -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/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/DatePicker/DatePicker.types.d.ts +12 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts.map +1 -0
- package/dist/components/DatePicker/RangeDatePicker.d.ts +2 -1
- package/dist/components/DatePicker/RangeDatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/RangeDatePicker.js +4 -2
- package/dist/components/DatePicker/RangeDatePicker.js.map +1 -1
- package/dist/components/DatePicker/RangeDatePicker.mjs +4 -2
- package/dist/components/DatePicker/RangeDatePicker.mjs.map +1 -1
- package/dist/components/DatePicker/SingleDatePicker.d.ts +2 -1
- package/dist/components/DatePicker/SingleDatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/SingleDatePicker.js +4 -2
- package/dist/components/DatePicker/SingleDatePicker.js.map +1 -1
- package/dist/components/DatePicker/SingleDatePicker.mjs +4 -2
- package/dist/components/DatePicker/SingleDatePicker.mjs.map +1 -1
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
- package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
- package/dist/components/ExpandableText/ExpandableText.d.ts.map +1 -1
- package/dist/components/ExpandableText/ExpandableText.js +1 -1
- package/dist/components/ExpandableText/ExpandableText.js.map +1 -1
- package/dist/components/ExpandableText/ExpandableText.mjs +1 -1
- package/dist/components/ExpandableText/ExpandableText.mjs.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/MonthPicker/MonthPicker.d.ts.map +1 -1
- package/dist/components/MonthPicker/MonthPicker.js +3 -2
- package/dist/components/MonthPicker/MonthPicker.js.map +1 -1
- package/dist/components/MonthPicker/MonthPicker.mjs +3 -2
- package/dist/components/MonthPicker/MonthPicker.mjs.map +1 -1
- package/dist/components/MonthPicker/MonthPicker.types.d.ts +7 -1
- package/dist/components/MonthPicker/MonthPicker.types.d.ts.map +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 +34 -33
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.mjs +35 -34
- package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.styles.d.ts +24 -0
- package/dist/components/SegmentedControl/SegmentedControl.styles.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.styles.js +30 -0
- package/dist/components/SegmentedControl/SegmentedControl.styles.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.styles.mjs +29 -1
- package/dist/components/SegmentedControl/SegmentedControl.styles.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/Switch/SwitchControl.d.ts.map +1 -1
- package/dist/components/Switch/SwitchControl.js +26 -11
- package/dist/components/Switch/SwitchControl.js.map +1 -1
- package/dist/components/Switch/SwitchControl.mjs +27 -12
- package/dist/components/Switch/SwitchControl.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/Tag/Tag.d.ts.map +1 -1
- package/dist/components/Tag/Tag.js +14 -2
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Tag/Tag.mjs +15 -3
- package/dist/components/Tag/Tag.mjs.map +1 -1
- package/dist/components/Tag/Tag.styles.d.ts +20 -2
- package/dist/components/Tag/Tag.styles.d.ts.map +1 -1
- package/dist/components/Tag/Tag.styles.js +81 -0
- package/dist/components/Tag/Tag.styles.js.map +1 -1
- package/dist/components/Tag/Tag.styles.mjs +81 -1
- package/dist/components/Tag/Tag.styles.mjs.map +1 -1
- package/dist/components/Tag/Tag.types.d.ts +15 -2
- package/dist/components/Tag/Tag.types.d.ts.map +1 -1
- package/dist/components/Tag/index.d.ts +2 -2
- package/dist/components/Tag/index.d.ts.map +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.d.ts.map +1 -1
- package/dist/components/Toast/Toast.js +5 -1
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/Toast.mjs +5 -1
- package/dist/components/Toast/Toast.mjs.map +1 -1
- package/dist/components/Toast/Toast.styles.d.ts +13 -2
- package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
- package/dist/components/Toast/Toast.styles.js +19 -7
- package/dist/components/Toast/Toast.styles.js.map +1 -1
- package/dist/components/Toast/Toast.styles.mjs +19 -7
- 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 +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- 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 +63 -19
- package/dist/theme/colors.js.map +1 -1
- package/dist/theme/colors.mjs +64 -20
- package/dist/theme/colors.mjs.map +1 -1
- package/dist/theme/controlSizes.d.ts +91 -0
- package/dist/theme/controlSizes.d.ts.map +1 -0
- package/dist/theme/controlSizes.js +143 -0
- package/dist/theme/controlSizes.js.map +1 -0
- package/dist/theme/controlSizes.mjs +135 -0
- package/dist/theme/controlSizes.mjs.map +1 -0
- 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 +14 -43
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +14 -43
- package/dist/theme/index.mjs.map +1 -1
- package/dist/theme/palette.generated.d.ts +295 -162
- package/dist/theme/palette.generated.d.ts.map +1 -1
- package/dist/theme/palette.generated.js +296 -162
- package/dist/theme/palette.generated.js.map +1 -1
- package/dist/theme/palette.generated.mjs +296 -163
- 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/theme/recipes/controls.d.ts +94 -0
- package/dist/theme/recipes/controls.d.ts.map +1 -0
- package/dist/theme/recipes/controls.js +154 -0
- package/dist/theme/recipes/controls.js.map +1 -0
- package/dist/theme/recipes/controls.mjs +144 -0
- package/dist/theme/recipes/controls.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/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.types.ts +12 -0
- package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
- package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
- package/src/components/DatePicker/RangeDatePicker.tsx +7 -1
- package/src/components/DatePicker/SingleDatePicker.tsx +7 -1
- package/src/components/DatePicker/index.ts +1 -0
- 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.tsx +0 -1
- package/src/components/ExpandableText/ExpandableText.usage.mdx +178 -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.tsx +7 -1
- package/src/components/MonthPicker/MonthPicker.types.ts +8 -1
- 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.styles.ts +38 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +43 -37
- package/src/components/SegmentedControl/SegmentedControl.usage.mdx +216 -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 +139 -6
- package/src/components/Switch/Switch.usage.mdx +200 -0
- package/src/components/Switch/SwitchControl.tsx +32 -15
- 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.styles.ts +117 -2
- package/src/components/Tag/Tag.test.tsx +87 -1
- package/src/components/Tag/Tag.tsx +22 -1
- package/src/components/Tag/Tag.types.ts +16 -2
- package/src/components/Tag/Tag.usage.mdx +257 -0
- package/src/components/Tag/index.ts +2 -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 +19 -7
- package/src/components/Toast/Toast.tsx +8 -1
- 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 +78 -21
- package/src/components/claude.md +24 -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 +103 -4
- package/src/foundations/BrandColour.stories.tsx +135 -2
- 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 +19 -1
- package/src/theme/BazePalette.stories.tsx +111 -1
- package/src/theme/ControlSizes.stories.tsx +586 -0
- package/src/theme/Palette.stories.tsx +2 -2
- package/src/theme/SemanticTokens.mdx +118 -19
- package/src/theme/claude.md +34 -9
- package/src/theme/colors.ts +82 -19
- package/src/theme/contrast.test.ts +67 -0
- package/src/theme/controlSizes.test.ts +153 -0
- package/src/theme/controlSizes.ts +162 -0
- package/src/theme/global.ts +20 -1
- package/src/theme/index.ts +23 -46
- package/src/theme/palette.generated.ts +296 -162
- 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/theme/recipes/controls.ts +171 -0
- package/src/translations/Defaults.translations.json +14 -0
- package/src/utils/disabledControl.ts +8 -1
- package/src/utils/focusRing.ts +23 -0
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
|
+
import { Box, Grid } from '@chakra-ui/react';
|
|
1
3
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
4
|
|
|
5
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
3
6
|
import { LineGraph } from '.';
|
|
7
|
+
import { CHART_SERIES_HUES, seriesColor } from './seriesColors';
|
|
4
8
|
import type { DatumBase } from './LineGraph.types';
|
|
5
9
|
|
|
6
10
|
type TestDataType = {
|
|
@@ -105,3 +109,111 @@ export const CustomColors: Story = {
|
|
|
105
109
|
],
|
|
106
110
|
},
|
|
107
111
|
};
|
|
112
|
+
|
|
113
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
114
|
+
// Pulled into `LineGraph.usage.mdx` with <Canvas of={…} />. Hidden from the
|
|
115
|
+
// sidebar (`!dev`); `tags` is written out on each story because the indexer
|
|
116
|
+
// reads CSF statically.
|
|
117
|
+
|
|
118
|
+
type DailyType = { 질문?: number; 답변실패?: number };
|
|
119
|
+
|
|
120
|
+
const DAILY: Array<{ name: string } & DailyType> = [
|
|
121
|
+
{ name: '10/16', 질문: 120, 답변실패: 9 },
|
|
122
|
+
{ name: '10/17', 질문: 148, 답변실패: 12 },
|
|
123
|
+
{ name: '10/18', 질문: 96, 답변실패: 4 },
|
|
124
|
+
{ name: '10/19', 질문: 60, 답변실패: 3 },
|
|
125
|
+
{ name: '10/20', 질문: 171, 답변실패: 15 },
|
|
126
|
+
{ name: '10/21', 질문: 188, 답변실패: 11 },
|
|
127
|
+
{ name: '10/22', 질문: 164, 답변실패: 8 },
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
export const DoDefaultSeriesColours: Story = {
|
|
131
|
+
tags: ['!dev'],
|
|
132
|
+
parameters: { layout: 'padded' },
|
|
133
|
+
name: 'Usage / Do: default series colours, a trend over time',
|
|
134
|
+
render: () => (
|
|
135
|
+
<LineGraph<DailyType>
|
|
136
|
+
h="280px"
|
|
137
|
+
data={DAILY}
|
|
138
|
+
dataKeys={[
|
|
139
|
+
{ key: '질문', label: '질문 수' },
|
|
140
|
+
{ key: '답변실패', label: '답변하지 못한 질문' },
|
|
141
|
+
]}
|
|
142
|
+
/>
|
|
143
|
+
),
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export const DontStatusColours: Story = {
|
|
147
|
+
tags: ['!dev'],
|
|
148
|
+
parameters: { layout: 'padded' },
|
|
149
|
+
name: "Usage / Don't: status colours for ordinary series",
|
|
150
|
+
render: () => (
|
|
151
|
+
<LineGraph<DailyType>
|
|
152
|
+
h="280px"
|
|
153
|
+
data={DAILY}
|
|
154
|
+
dataKeys={[
|
|
155
|
+
{
|
|
156
|
+
key: '질문',
|
|
157
|
+
label: '질문 수',
|
|
158
|
+
color: 'var(--chakra-colors-success-fg)',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
key: '답변실패',
|
|
162
|
+
label: '답변하지 못한 질문',
|
|
163
|
+
color: 'var(--chakra-colors-danger-fg)',
|
|
164
|
+
},
|
|
165
|
+
]}
|
|
166
|
+
/>
|
|
167
|
+
),
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export const UsageTokens: Story = {
|
|
171
|
+
tags: ['!dev'],
|
|
172
|
+
parameters: { layout: 'padded' },
|
|
173
|
+
name: 'Usage / Tokens',
|
|
174
|
+
render: () => (
|
|
175
|
+
<TokenTable
|
|
176
|
+
rows={[
|
|
177
|
+
{ token: 'primary.main', use: 'series 1' },
|
|
178
|
+
{ token: 'border.default', use: 'grid lines, tooltip border' },
|
|
179
|
+
{ token: 'fg.muted', use: 'axis labels' },
|
|
180
|
+
{ token: 'bg.surface', use: 'tooltip background' },
|
|
181
|
+
{ token: 'fg.default', use: 'tooltip text' },
|
|
182
|
+
]}
|
|
183
|
+
/>
|
|
184
|
+
),
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Default stroke for series 2 onwards, light and dark, computed with the same
|
|
189
|
+
* `seriesColor` the chart calls.
|
|
190
|
+
*/
|
|
191
|
+
export const UsageSeriesOrder: Story = {
|
|
192
|
+
tags: ['!dev'],
|
|
193
|
+
parameters: { layout: 'padded' },
|
|
194
|
+
name: 'Usage / Series order',
|
|
195
|
+
render: () => (
|
|
196
|
+
<Grid templateColumns="auto auto auto" gap={2} fontSize="13px">
|
|
197
|
+
{CHART_SERIES_HUES.map(({ hue }, i) => (
|
|
198
|
+
<Fragment key={hue}>
|
|
199
|
+
<Box fontFamily="mono">
|
|
200
|
+
{i + 2}. {hue}
|
|
201
|
+
</Box>
|
|
202
|
+
{[false, true].map((dark) => {
|
|
203
|
+
const stroke = seriesColor(i + 1, dark);
|
|
204
|
+
return (
|
|
205
|
+
<Box
|
|
206
|
+
key={String(dark)}
|
|
207
|
+
style={{ background: stroke }}
|
|
208
|
+
w="88px"
|
|
209
|
+
h="20px"
|
|
210
|
+
borderRadius="sm"
|
|
211
|
+
title={`${hue} ${dark ? 'dark' : 'light'} ${stroke}`}
|
|
212
|
+
/>
|
|
213
|
+
);
|
|
214
|
+
})}
|
|
215
|
+
</Fragment>
|
|
216
|
+
))}
|
|
217
|
+
</Grid>
|
|
218
|
+
),
|
|
219
|
+
};
|
|
@@ -21,10 +21,9 @@ export const LineGraph = <T extends DatumBase>({
|
|
|
21
21
|
displayLegend = true,
|
|
22
22
|
...rest
|
|
23
23
|
}: LineGraphProps<T>) => {
|
|
24
|
-
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
// directly because no semantic role fits a chart line.
|
|
24
|
+
// Series 1 is the data blue; further series cycle hues with no status
|
|
25
|
+
// meaning (see seriesColors.ts). Strokes read the generated palette directly
|
|
26
|
+
// because no semantic role fits a chart line.
|
|
28
27
|
const { colorMode } = useColorMode();
|
|
29
28
|
const isDark = colorMode === 'dark';
|
|
30
29
|
return (
|
|
@@ -100,7 +99,7 @@ export const LineGraph = <T extends DatumBase>({
|
|
|
100
99
|
type="monotone"
|
|
101
100
|
dataKey={key}
|
|
102
101
|
name={label}
|
|
103
|
-
stroke={color ?? seriesColor(index,
|
|
102
|
+
stroke={color ?? seriesColor(index, isDark)}
|
|
104
103
|
dot={{ r: 0 }}
|
|
105
104
|
/>
|
|
106
105
|
))}
|
|
@@ -2,8 +2,14 @@ import { BoxProps } from '@chakra-ui/react';
|
|
|
2
2
|
import { type DataKey as RechartsDataKey } from 'recharts/types/util/types.d';
|
|
3
3
|
|
|
4
4
|
export interface LineGraphProps<T extends DatumBase> extends BoxProps {
|
|
5
|
+
/** One object per point on the X axis; `name` is the axis label. */
|
|
5
6
|
data: Array<Datum<T>>;
|
|
7
|
+
/** The series to draw, in order. */
|
|
6
8
|
dataKeys: Array<DataKey<T>>;
|
|
9
|
+
/**
|
|
10
|
+
* Show the legend under the chart.
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
7
13
|
displayLegend?: boolean;
|
|
8
14
|
}
|
|
9
15
|
|
|
@@ -31,12 +37,16 @@ export type DataKey<T extends DatumBase> = {
|
|
|
31
37
|
key: RechartsDataKey<keyof T>;
|
|
32
38
|
|
|
33
39
|
/**
|
|
34
|
-
*
|
|
40
|
+
* Series name, shown in the legend and the tooltip.
|
|
35
41
|
*/
|
|
36
42
|
label: string;
|
|
37
43
|
|
|
38
44
|
/**
|
|
39
|
-
*
|
|
45
|
+
* Stroke colour for this series, passed straight to the SVG (recharts does
|
|
46
|
+
* not resolve Chakra tokens — use a CSS variable such as
|
|
47
|
+
* `var(--chakra-colors-category-teal-fg)`). Defaults: series 1 is
|
|
48
|
+
* `primary.main`, the rest cycle meaning-free category hues
|
|
49
|
+
* (`CHART_SERIES_HUES`).
|
|
40
50
|
*/
|
|
41
51
|
color?: string;
|
|
42
52
|
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as LineGraphStories from './LineGraph.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={LineGraphStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# LineGraph
|
|
13
|
+
|
|
14
|
+
A line chart (recharts) for one or more numeric series over an ordered X
|
|
15
|
+
axis, usually time: daily questions, usage by model, feedback over a month.
|
|
16
|
+
It ships the house grid, axes, tooltip and series colours, in both modes.
|
|
17
|
+
|
|
18
|
+
## When to use
|
|
19
|
+
|
|
20
|
+
- A trend over time or another ordered axis, where the shape matters more
|
|
21
|
+
than any single value.
|
|
22
|
+
|
|
23
|
+
## When not to use
|
|
24
|
+
|
|
25
|
+
- Comparing categories with no order (models, groups) → a bar chart or a
|
|
26
|
+
`Table`.
|
|
27
|
+
- One number → a stat with `Text`. A share of a whole → a `ProgressBar` or a
|
|
28
|
+
table of percentages.
|
|
29
|
+
- When the reader needs exact values → a `Table`, with the chart as a
|
|
30
|
+
summary if at all.
|
|
31
|
+
|
|
32
|
+
## Props
|
|
33
|
+
|
|
34
|
+
</En>
|
|
35
|
+
|
|
36
|
+
<Ko>
|
|
37
|
+
|
|
38
|
+
# LineGraph
|
|
39
|
+
|
|
40
|
+
순서가 있는 X축(대개 시간) 위에 숫자 계열 하나 이상을 그리는 꺾은선 그래프(recharts)
|
|
41
|
+
입니다. 일별 질문 수, 모델별 사용량, 한 달 동안의 피드백에 씁니다. 격자, 축, 툴팁,
|
|
42
|
+
계열 색이 두 모드 모두에 맞춰져 있습니다.
|
|
43
|
+
|
|
44
|
+
## 언제 쓰나요
|
|
45
|
+
|
|
46
|
+
- 값 하나하나보다 흐름의 모양이 중요한, 시간이나 순서가 있는 축 위의 추세.
|
|
47
|
+
|
|
48
|
+
## 언제 쓰지 않나요
|
|
49
|
+
|
|
50
|
+
- 순서가 없는 항목(모델, 그룹) 비교에는 막대 그래프나 `Table`을 씁니다.
|
|
51
|
+
- 숫자 하나는 `Text`로 보여 줍니다. 전체 중 비율은 `ProgressBar`나 비율 표를 씁니다.
|
|
52
|
+
- 정확한 값이 필요하다면 `Table`을 쓰고, 그래프는 요약으로만 씁니다.
|
|
53
|
+
|
|
54
|
+
## 속성
|
|
55
|
+
|
|
56
|
+
</Ko>
|
|
57
|
+
|
|
58
|
+
<ArgTypes of={LineGraphStories} include={['data', 'dataKeys', 'displayLegend']} />
|
|
59
|
+
|
|
60
|
+
<En>
|
|
61
|
+
|
|
62
|
+
**Series colours.** Series 1 is the data blue (`blue.base`), the same blue a
|
|
63
|
+
single-measure chart uses. Series 2 onwards cycle eight category hues that
|
|
64
|
+
carry no meaning, alternating cool and warm (teal, pink, indigo, purple,
|
|
65
|
+
brown, …). Red, yellow and green are left out, because they mean danger,
|
|
66
|
+
warning and success. Every default stroke clears 3:1 against the page in both modes.
|
|
67
|
+
|
|
68
|
+
## Do / Don't
|
|
69
|
+
|
|
70
|
+
</En>
|
|
71
|
+
|
|
72
|
+
<Ko>
|
|
73
|
+
|
|
74
|
+
**계열 색.** 첫 계열은 데이터 파랑(`blue.base`)으로, 측정값이 하나인 차트와 같은 색입니다.
|
|
75
|
+
둘째 계열부터는 뜻이 없는 category 색 여덟 가지를 차가운 색과 따뜻한 색이 번갈아 오도록
|
|
76
|
+
돌아가며 씁니다(청록, 분홍, 남색, 보라, 갈색 …). 빨강, 노랑, 초록은 위험, 경고, 성공을
|
|
77
|
+
뜻하므로 빠져 있습니다. 기본 선 색은 두 모드 모두에서 바탕과 3:1 이상입니다.
|
|
78
|
+
|
|
79
|
+
## 이렇게 하세요 / 이렇게 하지 마세요
|
|
80
|
+
|
|
81
|
+
</Ko>
|
|
82
|
+
|
|
83
|
+
<Canvas of={LineGraphStories.DoDefaultSeriesColours} />
|
|
84
|
+
<Verdict
|
|
85
|
+
kind="do"
|
|
86
|
+
en="Keep the default series colours and name each series in words; the legend and the tooltip show the label."
|
|
87
|
+
ko="기본 계열 색을 그대로 쓰고 계열마다 이름을 붙입니다. 범례와 툴팁에 그 이름이 나옵니다."
|
|
88
|
+
/>
|
|
89
|
+
|
|
90
|
+
<Canvas of={LineGraphStories.DontStatusColours} />
|
|
91
|
+
<Verdict
|
|
92
|
+
kind="dont"
|
|
93
|
+
en="Colour ordinary series with success and danger. Readers take the red line as an error even when the numbers are fine."
|
|
94
|
+
ko="일반 계열에 success와 danger 색을 쓰지 마세요. 숫자에 문제가 없어도 읽는 사람은 빨간 선을 오류로 받아들입니다."
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
<En>
|
|
98
|
+
|
|
99
|
+
## Content
|
|
100
|
+
|
|
101
|
+
- Name series in words the reader uses (질문 수), not field names (`uv`).
|
|
102
|
+
- X labels short: 10/22, not 2026-10-22 00:00.
|
|
103
|
+
- Two or three series at most; split into several charts beyond that.
|
|
104
|
+
|
|
105
|
+
## Accessibility
|
|
106
|
+
|
|
107
|
+
What LineGraph does for you:
|
|
108
|
+
|
|
109
|
+
- Axis labels, grid and tooltip read CSS variables, so they follow light and
|
|
110
|
+
dark mode. Default strokes clear 3:1 (WCAG 1.4.11).
|
|
111
|
+
- Series names appear as text in the legend and tooltip.
|
|
112
|
+
|
|
113
|
+
What you still have to do:
|
|
114
|
+
|
|
115
|
+
- **Give the chart a text alternative** (WCAG 1.1.1). The SVG has no name.
|
|
116
|
+
Put a heading and a one-sentence summary next to it (질문 수는 지난주보다
|
|
117
|
+
12% 늘었습니다), and offer the numbers as a table when they matter.
|
|
118
|
+
- **Lines differ only by colour** (no markers, no dash patterns), so with
|
|
119
|
+
three or more series the legend alone can be hard to match (WCAG 1.4.1).
|
|
120
|
+
Keep series few, or label them at the line end.
|
|
121
|
+
- The tooltip appears on pointer hover only; keyboard users cannot reach
|
|
122
|
+
values (WCAG 2.1.1). Another reason to offer the table.
|
|
123
|
+
|
|
124
|
+
## Tokens
|
|
125
|
+
|
|
126
|
+
The chart reads these roles as CSS variables. The default series strokes
|
|
127
|
+
come from the palette, in the order below.
|
|
128
|
+
|
|
129
|
+
</En>
|
|
130
|
+
|
|
131
|
+
<Ko>
|
|
132
|
+
|
|
133
|
+
## 문구
|
|
134
|
+
|
|
135
|
+
- 계열 이름은 필드 이름(`uv`)이 아니라 읽는 사람이 쓰는 말(질문 수)로 씁니다.
|
|
136
|
+
- X축 라벨은 짧게 씁니다. '2026-10-22 00:00'이 아니라 '10/22'로 씁니다.
|
|
137
|
+
- 계열은 많아야 두세 개로 두고, 더 많으면 그래프를 나눕니다.
|
|
138
|
+
|
|
139
|
+
## 접근성
|
|
140
|
+
|
|
141
|
+
LineGraph가 알아서 하는 일
|
|
142
|
+
|
|
143
|
+
- 축 라벨, 격자, 툴팁이 CSS 변수를 읽으므로 라이트·다크 모드를 따릅니다. 기본 선
|
|
144
|
+
색은 3:1 이상입니다(WCAG 1.4.11).
|
|
145
|
+
- 계열 이름이 범례와 툴팁에 글자로 나옵니다.
|
|
146
|
+
|
|
147
|
+
직접 챙겨야 하는 일
|
|
148
|
+
|
|
149
|
+
- **그래프에 글로 된 대체 내용을 붙입니다**(WCAG 1.1.1). SVG에는 이름이 없습니다.
|
|
150
|
+
옆에 제목과 한 문장 요약('질문 수는 지난주보다 12% 늘었습니다')을 두고, 숫자가
|
|
151
|
+
중요하면 표로도 보여 줍니다.
|
|
152
|
+
- **선은 색으로만 구분됩니다**(점 표시나 점선 없음). 계열이 셋 이상이면 범례만으로는
|
|
153
|
+
짝을 맞추기 어렵습니다(WCAG 1.4.1). 계열 수를 줄이거나 선 끝에 이름을 붙입니다.
|
|
154
|
+
- 툴팁은 마우스를 올려야만 나타나서 키보드 사용자는 값을 볼 수 없습니다(WCAG
|
|
155
|
+
2.1.1). 이 점에서도 표를 함께 주는 편이 좋습니다.
|
|
156
|
+
|
|
157
|
+
## 토큰
|
|
158
|
+
|
|
159
|
+
그래프는 아래 역할을 CSS 변수로 읽습니다. 기본 계열 선 색은 팔레트에서 아래 순서대로
|
|
160
|
+
가져옵니다.
|
|
161
|
+
|
|
162
|
+
</Ko>
|
|
163
|
+
|
|
164
|
+
<Canvas of={LineGraphStories.UsageTokens} sourceState="none" />
|
|
165
|
+
|
|
166
|
+
<Canvas of={LineGraphStories.UsageSeriesOrder} sourceState="none" />
|
|
167
|
+
|
|
168
|
+
<En>
|
|
169
|
+
|
|
170
|
+
## Related
|
|
171
|
+
|
|
172
|
+
- **Table**: exact values, and the accessible alternative to a chart.
|
|
173
|
+
- **ProgressBar** / **RadialProgress**: a single share or progress.
|
|
174
|
+
- **Setup/Theme/Using Semantic Tokens**: "Blue means data and links".
|
|
175
|
+
|
|
176
|
+
</En>
|
|
177
|
+
|
|
178
|
+
<Ko>
|
|
179
|
+
|
|
180
|
+
## 관련 컴포넌트
|
|
181
|
+
|
|
182
|
+
- **Table**: 정확한 값, 그리고 그래프의 접근 가능한 대안.
|
|
183
|
+
- **ProgressBar** / **RadialProgress**: 비율이나 진행률 하나.
|
|
184
|
+
- **Setup/Theme/Using Semantic Tokens**: "Blue means data and links".
|
|
185
|
+
|
|
186
|
+
</Ko>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
2
|
|
|
3
|
-
import { SYSTEM_HUES } from '@/theme/palette.generated';
|
|
3
|
+
import { RAMPS, SYSTEM_HUES } from '@/theme/palette.generated';
|
|
4
4
|
|
|
5
5
|
import { CHART_SERIES_HUES, seriesColor } from './seriesColors';
|
|
6
6
|
|
|
@@ -22,18 +22,19 @@ describe('chart series colours', () => {
|
|
|
22
22
|
expect(CHART_SERIES_HUES.filter(({ hue }) => banned.has(hue))).toEqual([]);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
it('series 1 is the
|
|
26
|
-
expect(seriesColor(0,
|
|
27
|
-
expect(seriesColor(
|
|
25
|
+
it('series 1 is the data blue, series 2 is teal', () => {
|
|
26
|
+
expect(seriesColor(0, false)).toBe(SYSTEM_HUES.blue.base);
|
|
27
|
+
expect(seriesColor(0, true)).toBe(SYSTEM_HUES.blue.baseDark);
|
|
28
|
+
expect(seriesColor(1, false)).toBe(SYSTEM_HUES.teal.base);
|
|
28
29
|
});
|
|
29
30
|
|
|
30
31
|
it('every default stroke clears 3:1 against the page in both modes', () => {
|
|
31
|
-
CHART_SERIES_HUES.forEach((_, i) => {
|
|
32
|
+
[undefined, ...CHART_SERIES_HUES].forEach((_, i) => {
|
|
33
|
+
expect(contrast(seriesColor(i, false), '#FFFFFF')).toBeGreaterThanOrEqual(
|
|
34
|
+
3
|
|
35
|
+
);
|
|
32
36
|
expect(
|
|
33
|
-
contrast(seriesColor(i
|
|
34
|
-
).toBeGreaterThanOrEqual(3);
|
|
35
|
-
expect(
|
|
36
|
-
contrast(seriesColor(i + 1, '', true), '#1F1E1D')
|
|
37
|
+
contrast(seriesColor(i, true), RAMPS.ink.canvasDark)
|
|
37
38
|
).toBeGreaterThanOrEqual(3);
|
|
38
39
|
});
|
|
39
40
|
});
|
|
@@ -4,12 +4,16 @@ import { SYSTEM_HUES } from '@/theme/palette.generated';
|
|
|
4
4
|
/**
|
|
5
5
|
* Default stroke order for multi-series charts.
|
|
6
6
|
*
|
|
7
|
-
* Series 1 is the
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* Series 1 is the data blue (`blue.base`): blue means data (SemanticTokens.mdx,
|
|
8
|
+
* "Blue means data and links"), and a single-measure chart draws in the same
|
|
9
|
+
* blue, so adding a second series does not repaint the first. It used to be
|
|
10
|
+
* the ink `primary.main`, which read as body text rather than as data.
|
|
11
|
+
*
|
|
12
|
+
* The rest cycle hues that carry no meaning in the system, alternating cool
|
|
13
|
+
* and warm so neighbouring lines separate. Red, yellow and green are the
|
|
14
|
+
* danger, warning and success colours, so none of them may colour a series by
|
|
15
|
+
* default — a red "UV" line reads as an error. Brown comes late: next to the
|
|
16
|
+
* other dusty warm hues it reads as mud.
|
|
13
17
|
*
|
|
14
18
|
* Every stroke clears 3:1 against the page in both modes. Cyan, mint and
|
|
15
19
|
* orange are too light at their base value in light mode (≈1.9:1), so they
|
|
@@ -21,23 +25,21 @@ type SeriesHue = {
|
|
|
21
25
|
};
|
|
22
26
|
|
|
23
27
|
export const CHART_SERIES_HUES: readonly SeriesHue[] = [
|
|
24
|
-
{ hue: 'brown', light: 'base' },
|
|
25
|
-
{ hue: 'indigo', light: 'base' },
|
|
26
|
-
{ hue: 'pink', light: 'base' },
|
|
27
28
|
{ hue: 'teal', light: 'base' },
|
|
29
|
+
{ hue: 'pink', light: 'base' },
|
|
30
|
+
{ hue: 'indigo', light: 'base' },
|
|
28
31
|
{ hue: 'purple', light: 'base' },
|
|
32
|
+
{ hue: 'brown', light: 'base' },
|
|
29
33
|
{ hue: 'cyan', light: 'hc' },
|
|
30
34
|
{ hue: 'mint', light: 'hc' },
|
|
31
35
|
{ hue: 'orange', light: 'hc' },
|
|
32
36
|
];
|
|
33
37
|
|
|
34
|
-
/** Stroke for series `index` (0-based); index 0 is the
|
|
35
|
-
export const seriesColor = (
|
|
36
|
-
index
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
): string => {
|
|
40
|
-
if (index === 0) return primary;
|
|
38
|
+
/** Stroke for series `index` (0-based); index 0 is the data blue. */
|
|
39
|
+
export const seriesColor = (index: number, isDark: boolean): string => {
|
|
40
|
+
if (index === 0) {
|
|
41
|
+
return isDark ? SYSTEM_HUES.blue.baseDark : SYSTEM_HUES.blue.base;
|
|
42
|
+
}
|
|
41
43
|
const { hue, light } =
|
|
42
44
|
CHART_SERIES_HUES[(index - 1) % CHART_SERIES_HUES.length];
|
|
43
45
|
return isDark ? SYSTEM_HUES[hue].baseDark : SYSTEM_HUES[hue][light];
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { Box } from '@chakra-ui/react';
|
|
3
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
4
|
+
|
|
5
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
6
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
7
|
+
import { Card } from '../Card';
|
|
8
|
+
import { Subtext, Text } from '../Typography';
|
|
9
|
+
import { SectionLoader } from './SectionLoader';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Specimens for `Loaders.usage.mdx`, which covers `PageLoader`,
|
|
13
|
+
* `SectionLoader` and `ThinkingDots` together. Every story here is hidden
|
|
14
|
+
* (`!dev`): the components' own stories stay under Components/PageLoader and
|
|
15
|
+
* Components/SectionLoader.
|
|
16
|
+
*/
|
|
17
|
+
const meta = {
|
|
18
|
+
title: 'Components/Loaders',
|
|
19
|
+
component: SectionLoader,
|
|
20
|
+
args: { isLoading: true },
|
|
21
|
+
} satisfies Meta<typeof SectionLoader>;
|
|
22
|
+
|
|
23
|
+
export default meta;
|
|
24
|
+
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
|
|
27
|
+
/** A card whose body is loading; the card is the positioned parent. */
|
|
28
|
+
const LoadingCard = ({ children }: { children: ReactNode }) => (
|
|
29
|
+
<Card p={4} w="320px">
|
|
30
|
+
<Text fontWeight="bold" mb={2}>
|
|
31
|
+
멤버
|
|
32
|
+
</Text>
|
|
33
|
+
<Box position="relative" h="120px" borderRadius="md" overflow="hidden">
|
|
34
|
+
<Subtext>홍길동, 김철수, 이영희</Subtext>
|
|
35
|
+
{children}
|
|
36
|
+
</Box>
|
|
37
|
+
</Card>
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
export const DoSectionLoaderInParent: Story = {
|
|
41
|
+
tags: ['!dev'],
|
|
42
|
+
parameters: { layout: 'padded' },
|
|
43
|
+
name: 'Usage / Do: SectionLoader inside a positioned parent',
|
|
44
|
+
render: () => (
|
|
45
|
+
<LoadingCard>
|
|
46
|
+
<SectionLoader isLoading label="멤버 목록을 불러오는 중" />
|
|
47
|
+
</LoadingCard>
|
|
48
|
+
),
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const DoThinkingForAI: Story = {
|
|
52
|
+
tags: ['!dev'],
|
|
53
|
+
parameters: { layout: 'padded' },
|
|
54
|
+
name: 'Usage / Do: thinking dots while the AI works',
|
|
55
|
+
render: () => (
|
|
56
|
+
<LoadingCard>
|
|
57
|
+
<SectionLoader
|
|
58
|
+
isLoading
|
|
59
|
+
variant="thinking"
|
|
60
|
+
label="답변을 준비하는 중"
|
|
61
|
+
/>
|
|
62
|
+
</LoadingCard>
|
|
63
|
+
),
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** Tokens the loaders read. */
|
|
67
|
+
export const UsageTokens: Story = {
|
|
68
|
+
tags: ['!dev'],
|
|
69
|
+
parameters: { layout: 'padded' },
|
|
70
|
+
name: 'Usage / Tokens',
|
|
71
|
+
render: () => (
|
|
72
|
+
<TokenTable
|
|
73
|
+
rows={[
|
|
74
|
+
{
|
|
75
|
+
token: 'bg.canvas',
|
|
76
|
+
use: <T en="overlay (PageLoader at 50% opacity)" ko="덮개(PageLoader는 불투명도 50%)" />,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
token: 'primary.main',
|
|
80
|
+
use: <T en="spinner (default variant)" ko="스피너(기본 변형)" />,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
token: 'bg.track',
|
|
84
|
+
use: <T en="spinner track" ko="스피너 트랙" />,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
token: 'action.mark',
|
|
88
|
+
use: <T en="thinking dots" ko="thinking 점" />,
|
|
89
|
+
},
|
|
90
|
+
]}
|
|
91
|
+
/>
|
|
92
|
+
),
|
|
93
|
+
};
|