@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
|
@@ -36,10 +36,17 @@ token for which surface: **Setup/Theme/Using Semantic Tokens**.
|
|
|
36
36
|
type. Coral never fills a wide surface.
|
|
37
37
|
- **Status colours mean status.** `danger`, `warning`, `success` and `info`
|
|
38
38
|
are never decoration or a way to tell groups apart.
|
|
39
|
+
- **State is not status.** A control that is on is `control.on`; something the
|
|
40
|
+
user marked to keep (a star, a bookmark) is `mark.starred`. Never
|
|
41
|
+
`primary`, black, white or a status colour for state.
|
|
39
42
|
- **The twelve system hues are for categories only.** `category.{hue}.*`
|
|
40
43
|
carries no status meaning.
|
|
41
44
|
- **Blue means data and links.** `fg.link` for links; a blue monochrome ramp
|
|
42
|
-
for single-measure charts (see Using Semantic Tokens).
|
|
45
|
+
(`data.1–4`) for single-measure charts (see Using Semantic Tokens).
|
|
46
|
+
- **Above and below a baseline is blue and orange.** Charts against a real
|
|
47
|
+
baseline (vs plan, vs average) use `diverging.*`: blue above, orange below,
|
|
48
|
+
`diverging.mid` at the baseline. Orange fills only, never red/green for
|
|
49
|
+
direction.
|
|
43
50
|
- **No gradients.** A brand band is one solid colour.
|
|
44
51
|
|
|
45
52
|
## Neutrals
|
|
@@ -61,7 +68,8 @@ sand tint (`secondary.surface`) is not a component background; a soft fill is
|
|
|
61
68
|
- The **focus ring** is `focus.ring`: black in light mode, light beige in dark
|
|
62
69
|
mode. It is never coral, because a coral ring reads as an error border.
|
|
63
70
|
- **Disabled** is a fixed grey (`disabled.bg` / `disabled.fg`) with no opacity
|
|
64
|
-
and no hover change.
|
|
71
|
+
and no hover change. Fill-less ghost buttons have no `disabled.bg` to carry
|
|
72
|
+
the state, so their label/icon uses the lighter `disabled.fgGhost`. Beige is already the hover and pressed colour, so a
|
|
65
73
|
beige disabled button would look like one being pressed.
|
|
66
74
|
- Sign-up, payment and upgrade buttons are `Button variant="primary"` (black),
|
|
67
75
|
not coral.
|
|
@@ -85,6 +93,7 @@ borrowing a hue.
|
|
|
85
93
|
| The coral icon on the black run button (`action.iconOnSolid`) | Wide surfaces, light backgrounds, card fills |
|
|
86
94
|
| The AI-working mark, the logo mark, large type (`action.mark`) | Promotion badges |
|
|
87
95
|
| The unread count badge (`count.*`, a deeper coral red) | Warning and error text or borders; switches and checkboxes when on; links |
|
|
96
|
+
| The prize amount on an event screen, as display type (`action.mark`) | Event card headers, modal footer bands, small eyebrow text |
|
|
88
97
|
|
|
89
98
|
- **Points, not surfaces.** Nothing coral is larger than a button, badge or
|
|
90
99
|
icon. Coral and the error red are only a few degrees apart in hue; at light
|
|
@@ -94,6 +103,49 @@ borrowing a hue.
|
|
|
94
103
|
Super Agent diamond are status and identity marks, so they may appear next to
|
|
95
104
|
a run signal.
|
|
96
105
|
|
|
106
|
+
## Campaign and event surfaces
|
|
107
|
+
|
|
108
|
+
First decide whether the screen is product or marketing. A page that needs a
|
|
109
|
+
login, or has controls that change the account, is product. In-app event pages,
|
|
110
|
+
their intro modals and promo banners are product. Marketing is everything
|
|
111
|
+
outside the product that people see logged out: baze.co, SNS posts, print.
|
|
112
|
+
|
|
113
|
+
- **In the product, events follow the coral rule above.** No coral fills and
|
|
114
|
+
no text on coral. Emphasis comes from the illustration; a band behind a card
|
|
115
|
+
header or modal footer is `bg.muted` or `layer.*`, never `secondary.surface`
|
|
116
|
+
or coral.
|
|
117
|
+
- **The prize may be coral.** The reward amount as display type in
|
|
118
|
+
`action.mark` (24px and up, or 19px bold) is the screen's one coral moment.
|
|
119
|
+
Everything around it stays neutral.
|
|
120
|
+
- **Small text is never coral.** Eyebrows and labels use `fg.subtle`. Darkening
|
|
121
|
+
coral until small text passes contrast lands right next to the error text red
|
|
122
|
+
(`danger.fg`).
|
|
123
|
+
- **A thin decorative line counts as a point.** A coral line up to 4px with no
|
|
124
|
+
text or information on it is allowed, like the band under the FactChat promo
|
|
125
|
+
banner.
|
|
126
|
+
- **Event CTAs stay `primary`.** An event screen is a product screen, so
|
|
127
|
+
`Button variant="accent"` stays on marketing heroes (see Button usage), and a
|
|
128
|
+
reward claim is never coral.
|
|
129
|
+
- **A marketing page may have one full-bleed coral band.** Only ink or cream
|
|
130
|
+
content sits on it; elsewhere on that page coral is large type or art only.
|
|
131
|
+
The reference is baze.co/social: the offer section is the band, and
|
|
132
|
+
"80개 이상", "월 5,900원" and "9,000" are the large coral type.
|
|
133
|
+
|
|
134
|
+
## State: on and starred
|
|
135
|
+
|
|
136
|
+
<Canvas of={BrandColour.State} sourceState="none" />
|
|
137
|
+
|
|
138
|
+
- **Binary on/off state uses `control.on`.** The Switch track when on, a
|
|
139
|
+
selected toggle chip, any on/off control; the thumb or label on it is
|
|
140
|
+
`control.onFg`. It is green, but it is not `success`: "on" does not mean
|
|
141
|
+
"succeeded".
|
|
142
|
+
- **User-marked items use `mark.starred`.** Favourites, saved templates,
|
|
143
|
+
starred items, bookmarks: the filled icon is `mark.starred`, the unmarked
|
|
144
|
+
outline stays `fg.icon`. A `primary.main` star is the same ink as the
|
|
145
|
+
outline, so marked and unmarked differ only in shape.
|
|
146
|
+
- **Never `primary`, black, white or a status colour for state.** Coral stays
|
|
147
|
+
with send, run, AI-working and counts; blue with data and links.
|
|
148
|
+
|
|
97
149
|
## Status
|
|
98
150
|
|
|
99
151
|
<Canvas of={BrandColour.Status} sourceState="none" />
|
|
@@ -183,10 +235,16 @@ BAZE의 화면은 따뜻한 무채색입니다. 크림·아이보리 바탕에
|
|
|
183
235
|
넓은 면은 코랄로 칠하지 않습니다.
|
|
184
236
|
- **상태색은 상태를 뜻할 때만 씁니다.** `danger`, `warning`, `success`, `info`를
|
|
185
237
|
장식이나 그룹 구분에 빌려 쓰지 않습니다.
|
|
238
|
+
- **켜짐·표시 상태는 상태색이 아닙니다.** 켜진 컨트롤은 `control.on`, 사용자가 남겨
|
|
239
|
+
두려고 표시한 항목(별표, 북마크)은 `mark.starred`입니다. 이 상태에 `primary`,
|
|
240
|
+
검정, 흰색, 상태색을 쓰지 않습니다.
|
|
186
241
|
- **열두 가지 시스템 색은 카테고리 구분에만 씁니다.** `category.{hue}.*`에는 상태의
|
|
187
242
|
뜻이 없습니다.
|
|
188
243
|
- **파란색은 데이터와 링크를 뜻합니다.** 링크는 `fg.link`, 하나의 값을 보여 주는
|
|
189
|
-
차트는 파란색 단색
|
|
244
|
+
차트는 파란색 단색 단계(`data.1–4`)를 씁니다(Using Semantic Tokens 참고).
|
|
245
|
+
- **기준선 위아래는 파랑과 주황으로 나눕니다.** 계획 대비, 평균 대비처럼 실제 기준선이
|
|
246
|
+
있는 차트는 `diverging.*`를 씁니다. 기준선 위는 파랑, 아래는 주황, 기준선 자리는
|
|
247
|
+
`diverging.mid`입니다. 주황은 면에만 쓰고, 방향을 빨강·초록으로 나타내지 않습니다.
|
|
190
248
|
- **그라데이션은 쓰지 않습니다.** 브랜드 띠는 단색 하나로 칠합니다.
|
|
191
249
|
|
|
192
250
|
## 무채색
|
|
@@ -208,7 +266,8 @@ BAZE의 화면은 따뜻한 무채색입니다. 크림·아이보리 바탕에
|
|
|
208
266
|
- **포커스 링**은 `focus.ring`으로, 라이트에서는 블랙, 다크에서는 밝은 베이지입니다.
|
|
209
267
|
코랄 링은 오류 테두리처럼 보이므로 쓰지 않습니다.
|
|
210
268
|
- **비활성**은 고정된 회색(`disabled.bg` / `disabled.fg`)이며 투명도를 쓰지 않고
|
|
211
|
-
호버해도 바뀌지 않습니다.
|
|
269
|
+
호버해도 바뀌지 않습니다. 바탕이 없는 고스트 버튼은 `disabled.bg`가 없으므로 글자·아이콘에
|
|
270
|
+
더 옅은 `disabled.fgGhost`를 씁니다. 베이지는 이미 호버와 누름의 색이라, 비활성까지 베이지면
|
|
212
271
|
누르는 중인 버튼과 구분되지 않습니다.
|
|
213
272
|
- 가입·결제·업그레이드 버튼은 코랄이 아니라 `Button variant="primary"`(블랙)입니다.
|
|
214
273
|
|
|
@@ -231,6 +290,7 @@ BAZE의 화면은 따뜻한 무채색입니다. 크림·아이보리 바탕에
|
|
|
231
290
|
| 블랙 실행 버튼 위의 코랄 아이콘 (`action.iconOnSolid`) | 넓은 면, 옅은 배경, 카드 바탕 |
|
|
232
291
|
| AI 작업 중 표시, 로고 마크, 큰 글씨 (`action.mark`) | 프로모션 배지 |
|
|
233
292
|
| 읽지 않은 숫자 배지 (`count.*`, 조금 더 진한 코랄 레드) | 경고·오류 문구와 테두리, 켜진 스위치·체크박스, 링크 |
|
|
293
|
+
| 이벤트 화면의 보상 금액 큰 글씨 (`action.mark`) | 이벤트 카드 머리와 모달 하단 띠, 작은 머리말 글자 |
|
|
234
294
|
|
|
235
295
|
- **면이 아니라 점으로 씁니다.** 버튼·배지·아이콘보다 큰 면을 코랄로 칠하지 않습니다.
|
|
236
296
|
코랄과 오류 빨강은 색상 차이가 몇 도밖에 나지 않아 옅게 쓰면 같은 색이 됩니다.
|
|
@@ -239,6 +299,45 @@ BAZE의 화면은 따뜻한 무채색입니다. 크림·아이보리 바탕에
|
|
|
239
299
|
버튼이 사라지고 그 자리에 로딩 표시가 나타납니다. 숫자 배지와 Super Agent 마름모는
|
|
240
300
|
상태와 정체성을 나타내는 표시라 실행 신호와 함께 보여도 됩니다.
|
|
241
301
|
|
|
302
|
+
## 캠페인·이벤트 화면
|
|
303
|
+
|
|
304
|
+
먼저 그 화면이 제품인지 마케팅인지 가립니다. 로그인해야 들어갈 수 있거나 계정을
|
|
305
|
+
바꾸는 조작이 있으면 제품입니다. 앱 안의 이벤트 페이지와 그 안내 모달, 프로모션
|
|
306
|
+
배너도 제품입니다. 마케팅은 제품 밖에서 로그인 없이 보는 화면으로, baze.co, SNS
|
|
307
|
+
게시물, 인쇄물이 여기에 해당합니다.
|
|
308
|
+
|
|
309
|
+
- **제품 안의 이벤트도 위의 코랄 규칙을 따릅니다.** 코랄로 면을 칠하지 않고 코랄
|
|
310
|
+
위에 글자를 올리지 않습니다. 강조는 일러스트로 하고, 카드 머리나 모달 하단의 띠는
|
|
311
|
+
`bg.muted`나 `layer.*`로 칠합니다. `secondary.surface`나 코랄은 쓰지 않습니다.
|
|
312
|
+
- **보상 금액은 코랄로 쓸 수 있습니다.** 보상 금액을 `action.mark` 큰 글씨(24px
|
|
313
|
+
이상, 또는 19px 굵게)로 쓰는 것이 그 화면의 하나뿐인 코랄입니다. 주변은 모두
|
|
314
|
+
무채색으로 둡니다.
|
|
315
|
+
- **작은 글자는 코랄로 쓰지 않습니다.** 작은 머리말이나 라벨은 `fg.subtle`을 씁니다.
|
|
316
|
+
작은 글자가 대비 기준을 넘을 때까지 코랄을 어둡게 하면 오류 문구의 빨강
|
|
317
|
+
(`danger.fg`)과 거의 같아집니다.
|
|
318
|
+
- **얇은 장식선은 점으로 봅니다.** 글자나 정보 없이 장식만 하는 4px 이하의 코랄 선은
|
|
319
|
+
써도 됩니다. FactChat 프로모션 배너 아래의 띠가 그 예입니다.
|
|
320
|
+
- **이벤트의 행동 유도 버튼은 `primary`입니다.** 이벤트 화면도 제품 화면이므로
|
|
321
|
+
`Button variant="accent"`는 마케팅 히어로에만 씁니다(Button 사용법 참고). 보상 받기
|
|
322
|
+
버튼도 코랄로 칠하지 않습니다.
|
|
323
|
+
- **마케팅 페이지에는 화면 폭을 가득 채우는 코랄 띠를 하나 둘 수 있습니다.** 그 위에는
|
|
324
|
+
블랙이나 크림색 내용만 올리고, 페이지의 나머지 부분에서 코랄은 큰 글씨나 그림에만
|
|
325
|
+
씁니다. 기준은 baze.co/social입니다. 혜택 섹션이 그 띠이고, "80개 이상",
|
|
326
|
+
"월 5,900원", "9,000"이 코랄 큰 글씨입니다.
|
|
327
|
+
|
|
328
|
+
## 켜짐과 별표
|
|
329
|
+
|
|
330
|
+
<Canvas of={BrandColour.State} sourceState="none" />
|
|
331
|
+
|
|
332
|
+
- **켜고 끄는 상태는 `control.on`입니다.** 켜진 Switch 트랙, 선택된 토글 칩 같은
|
|
333
|
+
켜짐/꺼짐 컨트롤에 쓰고, 그 위의 손잡이나 글자는 `control.onFg`입니다. 초록색이지만
|
|
334
|
+
`success`가 아닙니다. 켜졌다는 것은 성공했다는 뜻이 아닙니다.
|
|
335
|
+
- **사용자가 표시한 항목은 `mark.starred`입니다.** 즐겨찾기, 저장한 템플릿, 별표,
|
|
336
|
+
북마크의 채운 아이콘에 쓰고, 표시하지 않은 외곽선은 `fg.icon`으로 둡니다.
|
|
337
|
+
`primary.main` 별은 옆의 외곽선과 같은 잉크라 모양으로만 구분됩니다.
|
|
338
|
+
- **상태에 `primary`, 검정, 흰색, 상태색을 쓰지 않습니다.** 코랄은 보내기·실행·AI
|
|
339
|
+
작업 중·숫자 배지에, 파랑은 데이터와 링크에 남깁니다.
|
|
340
|
+
|
|
242
341
|
## 상태
|
|
243
342
|
|
|
244
343
|
<Canvas of={BrandColour.Status} sourceState="none" />
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { Flex, Stack } from '@chakra-ui/react';
|
|
1
|
+
import { Box, Flex, Stack } from '@chakra-ui/react';
|
|
2
2
|
import { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
|
|
4
4
|
import { Badge } from '../components/Badge';
|
|
5
5
|
import { Button } from '../components/Button';
|
|
6
6
|
import { Card } from '../components/Card';
|
|
7
7
|
import { CountBadge } from '../components/CountBadge';
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
SendIcon,
|
|
10
|
+
Sparkles,
|
|
11
|
+
StarFilledIcon,
|
|
12
|
+
StarIcon,
|
|
13
|
+
} from '../components/Icon';
|
|
9
14
|
import { IconButton } from '../components/IconButton';
|
|
10
15
|
import { Tag } from '../components/Tag';
|
|
16
|
+
import { Switch } from '../components/Switch';
|
|
11
17
|
import { Link, Text } from '../components/Typography';
|
|
12
18
|
import { T } from '../guidelines/_components/Lang';
|
|
13
19
|
import { TokenTable } from '../guidelines/_components/TokenTable';
|
|
@@ -144,6 +150,15 @@ export const ButtonStates: Story = {
|
|
|
144
150
|
token: 'disabled.fg',
|
|
145
151
|
use: <T en="Disabled text" ko="비활성 글자" />,
|
|
146
152
|
},
|
|
153
|
+
{
|
|
154
|
+
token: 'disabled.fgGhost',
|
|
155
|
+
use: (
|
|
156
|
+
<T
|
|
157
|
+
en="Disabled text/icon of a fill-less ghost button"
|
|
158
|
+
ko="바탕 없는 고스트 버튼의 비활성 글자·아이콘"
|
|
159
|
+
/>
|
|
160
|
+
),
|
|
161
|
+
},
|
|
147
162
|
]}
|
|
148
163
|
/>
|
|
149
164
|
</Stack>
|
|
@@ -258,6 +273,124 @@ const STATUS = [
|
|
|
258
273
|
{ s: 'info', en: 'This group only', ko: '이 그룹만' },
|
|
259
274
|
] as const;
|
|
260
275
|
|
|
276
|
+
/**
|
|
277
|
+
* A favourite toggle as it sits on a thumbnail: a bg.surface circle over the
|
|
278
|
+
* image, the star inside it. `fill` is the colour of the filled (marked) star;
|
|
279
|
+
* the unmarked outline is always `fg.icon`.
|
|
280
|
+
*/
|
|
281
|
+
const StarPair = ({ fill }: { fill: string }) => (
|
|
282
|
+
<Flex gap={3}>
|
|
283
|
+
{[true, false].map((marked) => (
|
|
284
|
+
<Box
|
|
285
|
+
key={String(marked)}
|
|
286
|
+
position="relative"
|
|
287
|
+
w="96px"
|
|
288
|
+
h="64px"
|
|
289
|
+
borderRadius="md"
|
|
290
|
+
bg="bg.muted"
|
|
291
|
+
borderWidth="1px"
|
|
292
|
+
borderColor="border.subtle"
|
|
293
|
+
>
|
|
294
|
+
<Flex
|
|
295
|
+
position="absolute"
|
|
296
|
+
top={1.5}
|
|
297
|
+
right={1.5}
|
|
298
|
+
w="28px"
|
|
299
|
+
h="28px"
|
|
300
|
+
borderRadius="full"
|
|
301
|
+
bg="bg.surface"
|
|
302
|
+
align="center"
|
|
303
|
+
justify="center"
|
|
304
|
+
aria-label={marked ? '즐겨찾기됨' : '즐겨찾기 안 됨'}
|
|
305
|
+
role="img"
|
|
306
|
+
>
|
|
307
|
+
{marked ? (
|
|
308
|
+
<StarFilledIcon boxSize="sm" color={fill} />
|
|
309
|
+
) : (
|
|
310
|
+
<StarIcon boxSize="sm" color="fg.icon" />
|
|
311
|
+
)}
|
|
312
|
+
</Flex>
|
|
313
|
+
</Box>
|
|
314
|
+
))}
|
|
315
|
+
</Flex>
|
|
316
|
+
);
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* State is neither status nor brand: `control.on` for a control that is on,
|
|
320
|
+
* `mark.starred` for something the user marked to keep. The "Don't" row is
|
|
321
|
+
* the `primary.main` star this replaces: the same ink as the outline beside it.
|
|
322
|
+
*/
|
|
323
|
+
export const State: Story = {
|
|
324
|
+
render: () => (
|
|
325
|
+
<Stack gap={5}>
|
|
326
|
+
<Flex gap={8} wrap="wrap" align="flex-start">
|
|
327
|
+
<Stack gap={2}>
|
|
328
|
+
<Text textStyle="subtext" color="fg.muted">
|
|
329
|
+
<T en="Switch: off · on" ko="Switch: 꺼짐 · 켜짐" />
|
|
330
|
+
</Text>
|
|
331
|
+
<Flex gap={4} align="center">
|
|
332
|
+
<Switch aria-label="꺼진 스위치">
|
|
333
|
+
<Switch.Control />
|
|
334
|
+
</Switch>
|
|
335
|
+
<Switch defaultChecked aria-label="켜진 스위치">
|
|
336
|
+
<Switch.Control />
|
|
337
|
+
</Switch>
|
|
338
|
+
</Flex>
|
|
339
|
+
</Stack>
|
|
340
|
+
<Stack gap={2}>
|
|
341
|
+
<Text textStyle="subtext" color="fg.muted">
|
|
342
|
+
<T
|
|
343
|
+
en="Do: mark.starred · fg.icon outline"
|
|
344
|
+
ko="이렇게: mark.starred · fg.icon 외곽선"
|
|
345
|
+
/>
|
|
346
|
+
</Text>
|
|
347
|
+
<StarPair fill="mark.starred" />
|
|
348
|
+
</Stack>
|
|
349
|
+
<Stack gap={2}>
|
|
350
|
+
<Text textStyle="subtext" color="fg.muted">
|
|
351
|
+
<T
|
|
352
|
+
en="Don't: primary.main · same ink as the outline"
|
|
353
|
+
ko="이렇게 하지 않기: primary.main · 외곽선과 같은 잉크"
|
|
354
|
+
/>
|
|
355
|
+
</Text>
|
|
356
|
+
<StarPair fill="primary.main" />
|
|
357
|
+
</Stack>
|
|
358
|
+
</Flex>
|
|
359
|
+
<TokenTable
|
|
360
|
+
rows={[
|
|
361
|
+
{
|
|
362
|
+
token: 'control.on',
|
|
363
|
+
use: (
|
|
364
|
+
<T
|
|
365
|
+
en="On state: Switch track, selected toggle chip"
|
|
366
|
+
ko="켜짐 상태: Switch 트랙, 선택된 토글 칩"
|
|
367
|
+
/>
|
|
368
|
+
),
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
token: 'control.onFg',
|
|
372
|
+
use: (
|
|
373
|
+
<T
|
|
374
|
+
en="Thumb or label on control.on"
|
|
375
|
+
ko="control.on 위 손잡이·글자"
|
|
376
|
+
/>
|
|
377
|
+
),
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
token: 'mark.starred',
|
|
381
|
+
use: (
|
|
382
|
+
<T
|
|
383
|
+
en="Marked to keep: favourite, saved template, bookmark"
|
|
384
|
+
ko="사용자가 표시한 항목: 즐겨찾기, 저장한 템플릿, 북마크"
|
|
385
|
+
/>
|
|
386
|
+
),
|
|
387
|
+
},
|
|
388
|
+
]}
|
|
389
|
+
/>
|
|
390
|
+
</Stack>
|
|
391
|
+
),
|
|
392
|
+
};
|
|
393
|
+
|
|
261
394
|
export const Status: Story = {
|
|
262
395
|
render: () => (
|
|
263
396
|
<Stack gap={5}>
|
package/src/hooks/useLanguage.ts
CHANGED
|
@@ -8,9 +8,14 @@ export interface LanguageContextValue {
|
|
|
8
8
|
language: SupportedLanguage;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/**
|
|
12
|
+
* The value seen outside any `LogicianProvider`. Exported so `useTranslate`
|
|
13
|
+
* can tell "no provider" (keep Korean) from a provider set to `en`.
|
|
14
|
+
*/
|
|
15
|
+
export const NO_PROVIDER_LANGUAGE: LanguageContextValue = { language: 'en' };
|
|
16
|
+
|
|
17
|
+
export const LanguageContext =
|
|
18
|
+
createContext<LanguageContextValue>(NO_PROVIDER_LANGUAGE);
|
|
14
19
|
|
|
15
20
|
export const useLanguage = () => useContext(LanguageContext);
|
|
16
21
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ChakraProvider } from '@chakra-ui/react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import { beforeAll, describe, expect, it } from 'vitest';
|
|
4
|
+
|
|
5
|
+
import { Button } from '@/components/Button';
|
|
6
|
+
import { LogicianProvider } from '@/components/LogicianProvider';
|
|
7
|
+
import { system } from '@/theme';
|
|
8
|
+
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
// LogicianProvider's color-mode machinery calls it on mount; jsdom has none.
|
|
11
|
+
window.matchMedia = ((query: string) => ({
|
|
12
|
+
matches: false,
|
|
13
|
+
media: query,
|
|
14
|
+
onchange: null,
|
|
15
|
+
addListener: () => {},
|
|
16
|
+
removeListener: () => {},
|
|
17
|
+
addEventListener: () => {},
|
|
18
|
+
removeEventListener: () => {},
|
|
19
|
+
dispatchEvent: () => false,
|
|
20
|
+
})) as unknown as typeof window.matchMedia;
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// Read through Button's 처리 중 default, the string an app sees most.
|
|
24
|
+
describe('useTranslate follows LogicianProvider language', () => {
|
|
25
|
+
it('stays Korean outside a provider', () => {
|
|
26
|
+
render(
|
|
27
|
+
<ChakraProvider value={system}>
|
|
28
|
+
<Button loading>x</Button>
|
|
29
|
+
</ChakraProvider>
|
|
30
|
+
);
|
|
31
|
+
expect(screen.getByRole('button')).toHaveTextContent('처리 중');
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it.each([
|
|
35
|
+
['ko', '처리 중'],
|
|
36
|
+
['en', 'Processing'],
|
|
37
|
+
['ja', '処理中'],
|
|
38
|
+
] as const)('renders %s', (language, text) => {
|
|
39
|
+
render(
|
|
40
|
+
<LogicianProvider language={language} loadFonts={false}>
|
|
41
|
+
<Button loading>x</Button>
|
|
42
|
+
</LogicianProvider>
|
|
43
|
+
);
|
|
44
|
+
expect(screen.getByRole('button')).toHaveTextContent(text);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -3,6 +3,7 @@ import { useCallback } from 'react';
|
|
|
3
3
|
|
|
4
4
|
import defaultTranslations from '../translations/Defaults.translations.json';
|
|
5
5
|
import { formatForMarkdown } from '../utils/formatTextForMarkdown';
|
|
6
|
+
import { NO_PROVIDER_LANGUAGE, useLanguage } from './useLanguage';
|
|
6
7
|
|
|
7
8
|
const DEFAULT_LOCALE = 'ko';
|
|
8
9
|
|
|
@@ -38,12 +39,13 @@ const replaceVariables = (text: string, variables?: { [key: string]: any }) => {
|
|
|
38
39
|
: parts;
|
|
39
40
|
};
|
|
40
41
|
|
|
41
|
-
const getLanguage = () => {
|
|
42
|
-
return 'ko';
|
|
43
|
-
};
|
|
44
|
-
|
|
45
42
|
export const useTranslate = (translations = {}) => {
|
|
46
|
-
|
|
43
|
+
// Follow `LogicianProvider`'s `language`, the same one the date pickers
|
|
44
|
+
// read. Outside a provider there is nothing to follow, so the library keeps
|
|
45
|
+
// its historical Korean.
|
|
46
|
+
const context = useLanguage();
|
|
47
|
+
const userLanguage =
|
|
48
|
+
context === NO_PROVIDER_LANGUAGE ? DEFAULT_LOCALE : context.language;
|
|
47
49
|
return useCallback(
|
|
48
50
|
(key: string, variables?: { [key: string]: any }) => {
|
|
49
51
|
const locale = (userLanguage as string) ?? DEFAULT_LOCALE;
|
package/src/index.ts
CHANGED
|
@@ -66,6 +66,7 @@ export * from './components/MonthPicker';
|
|
|
66
66
|
export * from './components/Popover';
|
|
67
67
|
|
|
68
68
|
// Navigation Components
|
|
69
|
+
export * from './components/NavList';
|
|
69
70
|
export * from './components/Pagination';
|
|
70
71
|
|
|
71
72
|
// Input Variants
|
|
@@ -162,6 +163,18 @@ export {
|
|
|
162
163
|
SYSTEM_HUE_NAMES,
|
|
163
164
|
type SystemHue,
|
|
164
165
|
} from './theme/colors';
|
|
166
|
+
export {
|
|
167
|
+
CONTROL_RADIUS,
|
|
168
|
+
CONTROL_SIZES,
|
|
169
|
+
controlHeightToken,
|
|
170
|
+
controlHeightVar,
|
|
171
|
+
type ControlSize,
|
|
172
|
+
controlSizes,
|
|
173
|
+
type ControlSizeSpec,
|
|
174
|
+
CORE_CONTROL_SIZES,
|
|
175
|
+
type CoreControlSize,
|
|
176
|
+
getControlSize,
|
|
177
|
+
} from './theme/controlSizes';
|
|
165
178
|
export { noZoomOnFocus } from './theme/formControls';
|
|
166
179
|
export {
|
|
167
180
|
animationStyles,
|
|
@@ -178,7 +191,12 @@ export {
|
|
|
178
191
|
} from './theme/motion';
|
|
179
192
|
export { cubicBezier } from './utils/cubicBezier';
|
|
180
193
|
export { disabledControl, disabledText } from './utils/disabledControl';
|
|
181
|
-
export {
|
|
194
|
+
export {
|
|
195
|
+
FOCUS_RING_INSET_SHADOW,
|
|
196
|
+
FOCUS_RING_SHADOW,
|
|
197
|
+
focusRing,
|
|
198
|
+
focusRingInset,
|
|
199
|
+
} from './utils/focusRing';
|
|
182
200
|
export {
|
|
183
201
|
staggerDelayMs,
|
|
184
202
|
type StaggerProps,
|
|
@@ -7,7 +7,19 @@ import {
|
|
|
7
7
|
ROLE_TOKEN_PATHS,
|
|
8
8
|
SYSTEM_HUE_NAMES,
|
|
9
9
|
} from './colors';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
CORAL,
|
|
12
|
+
DATAVIZ,
|
|
13
|
+
RAMPS,
|
|
14
|
+
SCHEMES,
|
|
15
|
+
SYSTEM_HUES,
|
|
16
|
+
} from './palette.generated';
|
|
17
|
+
import {
|
|
18
|
+
DATA_VIZ_LABEL_TOKEN,
|
|
19
|
+
DATA_VIZ_LABELS,
|
|
20
|
+
type DataVizKey,
|
|
21
|
+
resolveColor,
|
|
22
|
+
} from './paletteSwatches';
|
|
11
23
|
|
|
12
24
|
/**
|
|
13
25
|
* logician-ui 5.0 BAZE palette — the three token layers.
|
|
@@ -104,6 +116,12 @@ export const RawScales: Story = {
|
|
|
104
116
|
<Chip key={k} hex={hex} label={k} />
|
|
105
117
|
))}
|
|
106
118
|
</Flex>
|
|
119
|
+
<H4>dataviz</H4>
|
|
120
|
+
<Flex gap={2} wrap="wrap">
|
|
121
|
+
{Object.entries(DATAVIZ).map(([k, hex]) => (
|
|
122
|
+
<Chip key={k} hex={hex} label={k} />
|
|
123
|
+
))}
|
|
124
|
+
</Flex>
|
|
107
125
|
<H4>system hues</H4>
|
|
108
126
|
<Grid templateColumns="120px repeat(8, 1fr)" gap={1} fontSize="11px">
|
|
109
127
|
<span />
|
|
@@ -157,6 +175,98 @@ export const RoleTokens: Story = {
|
|
|
157
175
|
),
|
|
158
176
|
};
|
|
159
177
|
|
|
178
|
+
const DATA_STEPS = (Object.keys(DATA_VIZ_LABELS) as DataVizKey[]).filter((k) =>
|
|
179
|
+
k.startsWith('data-')
|
|
180
|
+
);
|
|
181
|
+
/** Display order: far below → baseline → far above. */
|
|
182
|
+
const DIVERGING_STEPS: DataVizKey[] = [
|
|
183
|
+
'diverging-neg-3',
|
|
184
|
+
'diverging-neg-2',
|
|
185
|
+
'diverging-neg-1',
|
|
186
|
+
'diverging-mid',
|
|
187
|
+
'diverging-pos-1',
|
|
188
|
+
'diverging-pos-2',
|
|
189
|
+
'diverging-pos-3',
|
|
190
|
+
];
|
|
191
|
+
|
|
192
|
+
/** A fill with the in-cell label `DATA_VIZ_LABELS` gives it (or none). */
|
|
193
|
+
const DataCell = ({
|
|
194
|
+
flat,
|
|
195
|
+
hex,
|
|
196
|
+
mode,
|
|
197
|
+
}: {
|
|
198
|
+
flat: DataVizKey;
|
|
199
|
+
hex: string;
|
|
200
|
+
mode: 'light' | 'dark';
|
|
201
|
+
}) => {
|
|
202
|
+
const label = DATA_VIZ_LABELS[flat][mode];
|
|
203
|
+
const labelHex =
|
|
204
|
+
label && resolveColor(`{colors.${DATA_VIZ_LABEL_TOKEN[label]}}`, mode);
|
|
205
|
+
return (
|
|
206
|
+
<Stack gap={1}>
|
|
207
|
+
<Flex
|
|
208
|
+
bg={hex}
|
|
209
|
+
color={labelHex || undefined}
|
|
210
|
+
h="56px"
|
|
211
|
+
align="center"
|
|
212
|
+
justify="center"
|
|
213
|
+
fontSize="13px"
|
|
214
|
+
fontWeight="bold"
|
|
215
|
+
borderRadius="sm"
|
|
216
|
+
>
|
|
217
|
+
{labelHex && '42%'}
|
|
218
|
+
</Flex>
|
|
219
|
+
{/* Plain boxes: the panel paints its own mode, so text inherits its colour. */}
|
|
220
|
+
<Box fontFamily="mono" fontSize="11px">
|
|
221
|
+
{ROLE_TOKEN_PATHS[flat]}
|
|
222
|
+
</Box>
|
|
223
|
+
<Box fontSize="10px">
|
|
224
|
+
{hex} ·{' '}
|
|
225
|
+
{labelHex
|
|
226
|
+
? `${label} label ${ratio(hex, labelHex).toFixed(2)}`
|
|
227
|
+
: 'no in-cell label'}
|
|
228
|
+
</Box>
|
|
229
|
+
</Stack>
|
|
230
|
+
);
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Data-visualisation fills — `data.1–4` (single measure, 4 = largest) and
|
|
235
|
+
* `diverging.*` (blue above the baseline, orange below, `diverging.mid` at it)
|
|
236
|
+
* — in light and dark, each with the in-cell label it can carry.
|
|
237
|
+
*/
|
|
238
|
+
export const DataViz: Story = {
|
|
239
|
+
render: () => (
|
|
240
|
+
<Stack gap={6} maxW="1100px">
|
|
241
|
+
{(['light', 'dark'] as const).map((mode) => {
|
|
242
|
+
const table = SCHEMES.ink[mode] as Record<string, string>;
|
|
243
|
+
return (
|
|
244
|
+
<Stack
|
|
245
|
+
key={mode}
|
|
246
|
+
gap={4}
|
|
247
|
+
p={4}
|
|
248
|
+
borderRadius="md"
|
|
249
|
+
bg={table['bg-canvas']}
|
|
250
|
+
color={table['fg-default']}
|
|
251
|
+
>
|
|
252
|
+
<Box fontWeight="bold">{mode}</Box>
|
|
253
|
+
<Grid templateColumns="repeat(4, 1fr)" gap={2}>
|
|
254
|
+
{DATA_STEPS.map((k) => (
|
|
255
|
+
<DataCell key={k} flat={k} hex={table[k]} mode={mode} />
|
|
256
|
+
))}
|
|
257
|
+
</Grid>
|
|
258
|
+
<Grid templateColumns="repeat(7, 1fr)" gap={2}>
|
|
259
|
+
{DIVERGING_STEPS.map((k) => (
|
|
260
|
+
<DataCell key={k} flat={k} hex={table[k]} mode={mode} />
|
|
261
|
+
))}
|
|
262
|
+
</Grid>
|
|
263
|
+
</Stack>
|
|
264
|
+
);
|
|
265
|
+
})}
|
|
266
|
+
</Stack>
|
|
267
|
+
),
|
|
268
|
+
};
|
|
269
|
+
|
|
160
270
|
/** Live tokens on this page's colour mode — flip the toolbar to check dark. */
|
|
161
271
|
export const Category: Story = {
|
|
162
272
|
render: () => (
|