@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
|
@@ -15,7 +15,7 @@ Values and contrast for every token: **Setup/Theme/BAZE Palette**.
|
|
|
15
15
|
| --- | --- | --- |
|
|
16
16
|
| Raw scale (colour names) | `ink.1–12`, `inkDark.1–12`, `sand.*`, `slate.*`, `coral.*`, `red.base` … | never in components |
|
|
17
17
|
| Semantic step (role names) | `neutral.1–12`, `secondary.1–12` | a specific neutral step no role names |
|
|
18
|
-
| Semantic role | `bg.*`, `layer.*`, `fg.*`, `border.*`, `primary.*`, `secondary.*`, `action.*`, `send.*`, `count.*`, `disabled.*`, `focus.ring`, status, `tooltip.*`, `category.*` | everything else |
|
|
18
|
+
| Semantic role | `bg.*`, `layer.*`, `fg.*`, `border.*`, `primary.*`, `secondary.*`, `action.*`, `send.*`, `count.*`, `control.*`, `mark.starred`, `disabled.*`, `focus.ring`, status, `tooltip.*`, `category.*`, `data.*`, `diverging.*` | everything else |
|
|
19
19
|
|
|
20
20
|
```ts
|
|
21
21
|
createLogicianTheme() // BAZE: { neutral: 'ink', secondary: 'sand' }
|
|
@@ -32,7 +32,7 @@ createLogicianTheme({ neutral: 'slate' }) // cool gray — app code unchanged
|
|
|
32
32
|
| Raised surface (card, menu, popover, input) | `bg.surface` |
|
|
33
33
|
| Body · secondary · caption text | `fg.default` · `fg.muted` · `fg.subtle` |
|
|
34
34
|
| Icon · placeholder | `fg.icon` · `fg.placeholder` |
|
|
35
|
-
| Link | `fg.link` + underline
|
|
35
|
+
| Link | `fg.link` + 1px underline at rest; hover `fg.linkHover` + 2px underline |
|
|
36
36
|
| Divider · card border · input/checkbox border | `border.subtle` · `border.default` · `border.control` |
|
|
37
37
|
| Primary (black) fill · text on it | `primary.main` / `.hover` / `.active` · `fg.onPrimary` |
|
|
38
38
|
| Hover / press wash, selected row | `primary.wash` / `primary.washActive` · `primary.selected` |
|
|
@@ -42,40 +42,139 @@ createLogicianTheme({ neutral: 'slate' }) // cool gray — app code unchanged
|
|
|
42
42
|
| Run button (black + coral icon) · small coral marks | `action.bg` / `.fg` / `.iconOnSolid` · `action.mark` |
|
|
43
43
|
| Send button, Button `accent` | `send.bg` / `.bgHover` / `.bgActive` / `.fg` |
|
|
44
44
|
| Unread count | `count.bg` / `count.fg` |
|
|
45
|
-
|
|
|
45
|
+
| On/off state: Switch on, selected toggle chip · thumb or label on it | `control.on` · `control.onFg` |
|
|
46
|
+
| User-marked item: favourite star, saved template, bookmark (filled) | `mark.starred` (the unmarked outline stays `fg.icon`) |
|
|
47
|
+
| Disabled (no opacity) | `disabled.bg` / `disabled.fg` · fill-less ghost button: `disabled.fgGhost` |
|
|
46
48
|
| Status | `danger` · `success` · `warning` · `info` → `.bg` `.border` `.fg` `.solid` `.onSolid` |
|
|
47
49
|
| Decorative category (tiles, avatars, tags, charts) | `category.{hue}.surface` / `.fg` |
|
|
50
|
+
| Single-measure chart, usage bar, map, heatmap fill | `data.1`–`data.4` (4 = largest) |
|
|
51
|
+
| Chart fill above / below a real baseline (vs plan, vs average) | `diverging.pos.1–3` / `diverging.neg.1–3`, `diverging.mid` at the baseline |
|
|
48
52
|
|
|
49
53
|
Emphasis is weight, not colour: headings use `fg.default`, never `primary.*`.
|
|
50
54
|
Status colours mean status — don't borrow `success`/`warning` for decoration;
|
|
51
55
|
that is what `category.*` is for.
|
|
52
56
|
|
|
57
|
+
## State: on and starred
|
|
58
|
+
|
|
59
|
+
**Binary on/off state uses `control.on`; user-marked items (star/bookmark) use
|
|
60
|
+
`mark.starred`; never `primary`/black/white or a status colour for state.**
|
|
61
|
+
|
|
62
|
+
- **`control.on`** fills a control that is on: the Switch track, a selected
|
|
63
|
+
toggle chip, any on/off control. Whatever is drawn on it (the thumb, the
|
|
64
|
+
chip label) is `control.onFg`. It is green today (#30862D light / #8FC46E
|
|
65
|
+
dark), the value Switch read from `success.solid` before, but it is not a
|
|
66
|
+
status: "on" does not mean "succeeded", and the two may move apart.
|
|
67
|
+
- **`mark.starred`** fills something the user marked to keep: a favourite, a
|
|
68
|
+
saved template, a starred item, a bookmark. The filled icon takes
|
|
69
|
+
`mark.starred`; the unmarked outline stays `fg.icon`, so selected and
|
|
70
|
+
unselected differ in colour as well as in shape.
|
|
71
|
+
- **Why not `primary`.** `primary.main` is the same ink (#252525 light, the
|
|
72
|
+
pale sand in dark) as the outline icon next to it, so a filled star and an
|
|
73
|
+
empty one could only be told apart by shape. A status colour would say
|
|
74
|
+
something about the item that is not true.
|
|
75
|
+
- **Not coral, blue or teal/mint.** Coral is send, run, AI-working and the
|
|
76
|
+
count badge; blue is data and links; teal and mint are not product UI.
|
|
77
|
+
- Checkbox stays `primary.main` when checked.
|
|
78
|
+
|
|
79
|
+
| Token | Light | Dark | High contrast (light / dark) |
|
|
80
|
+
| --- | --- | --- | --- |
|
|
81
|
+
| `control.on` | `#30862D` (4.59:1 on white) | `#8FC46E` (7.22:1 on `bg.surface`) | `#036805` / `#8FC46E` |
|
|
82
|
+
| `control.onFg` | `#FFFFFF` | `#1B1B1B` | same |
|
|
83
|
+
| `mark.starred` | `#B78100` (3.41:1 on white, 3.01:1 on `layer.1`) | `#E4AC44` (`yellow.base`, 7.22:1 on `bg.surface`) | `#976300` (4.51:1 on `layer.1`) / `#E4AC44` |
|
|
84
|
+
|
|
85
|
+
`mark.starred` is the yellow hue (BAZE's gold). `yellow.base` is only 2.04:1
|
|
86
|
+
on white, so light mode darkens it in OKLCH (same hue) until it clears 3:1 on
|
|
87
|
+
every light layer; dark mode uses `yellow.base` itself.
|
|
88
|
+
|
|
53
89
|
## Blue means data and links
|
|
54
90
|
|
|
55
91
|
Blue is the one hue BAZE gives a meaning outside status: **data and links**.
|
|
56
92
|
Use it for both, and for nothing decorative.
|
|
57
93
|
|
|
58
|
-
- **Links** — `fg.link`
|
|
94
|
+
- **Links** — `fg.link` (blue ink, #48607A light / #AFC7E1 dark), in chat
|
|
59
95
|
messages, markdown and app copy alike. Never ink-black or coral for a link.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
96
|
+
**Always underlined, at rest too**: next to body text (#252525) the blue is
|
|
97
|
+
only 2.36:1, under the 3:1 that colour alone would need (WCAG 1.4.1), so the
|
|
98
|
+
underline is what marks it as a link. Hover is `fg.linkHover` — further from
|
|
99
|
+
the canvas than rest, never toward it: #304760 light (9.56:1 on white vs
|
|
100
|
+
6.50:1 at rest), #C5DEF8 dark (10.66:1 vs 8.48:1 on `bg.surface`) — and the
|
|
101
|
+
underline thickens to 2px.
|
|
102
|
+
- **Data visualisation** — usage/share bars, single-measure bar charts, maps,
|
|
103
|
+
heatmaps, progress-by-share: the `data.*` ramp, a **blue monochrome ramp**,
|
|
104
|
+
never a rainbow and never a grey ramp. Steps differ in lightness only (the
|
|
105
|
+
saturated `blue.base` is left out). **The higher number is the larger value**:
|
|
106
|
+
`data.4` is the strongest step in both modes (dark mode flips the lightness,
|
|
107
|
+
so `data.4` is the lightest blue there).
|
|
108
|
+
- **Lines** — a single-measure line chart, and series 1 of a multi-series one,
|
|
109
|
+
stroke in `blue.base` (`#4674A4` / `#6892BD`, ≥ 4.5:1). A 2px line is not a
|
|
110
|
+
filled area: the ramp's darkest step `blue.ink` reads as slate grey at that
|
|
111
|
+
width, so lines take the saturated blue the ramp leaves out.
|
|
112
|
+
|
|
113
|
+
| Token | Light | Dark |
|
|
66
114
|
| --- | --- | --- |
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
72
|
-
Pick each label by measured contrast (≥ 4.5:1), not by step number.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
115
|
+
| `data.4` (largest) | `#48607A` (`blue.ink`) · white label | `#AFC7E1` (`blue.inkDark`) · ink label |
|
|
116
|
+
| `data.3` | `#7492B3` (`dataviz.blueMid`) · ink label | `#7492B3` · ink label |
|
|
117
|
+
| `data.2` | `#AFC7E1` (`blue.inkDark`) · ink label | `#48607A` (`blue.ink`) · white label |
|
|
118
|
+
| `data.1` (smallest) | `#DFEBF9` (`blue.surface`) · ink label | `#232F3D` (`blue.surfaceDark`) · white label |
|
|
119
|
+
|
|
120
|
+
Pick each label by measured contrast (≥ 4.5:1), not by step number. Ink is
|
|
121
|
+
`#252525`, white is `#FFFFFF`, in either mode; `contrast.test.ts` re-measures
|
|
122
|
+
every label in this section, including the diverging table below.
|
|
123
|
+
|
|
124
|
+
A chart that must tell several *categories* apart (multi-series lines) starts
|
|
125
|
+
with the same data blue (`blue.base`) and then cycles `CHART_SERIES_HUES` in
|
|
126
|
+
`LineGraph/seriesColors.ts` (teal, pink, indigo, purple, brown, …), which
|
|
127
|
+
leaves red, yellow and green out so no series reads as a status.
|
|
76
128
|
`info` is also blue; status always comes with an icon and words, so a blue
|
|
77
129
|
chart is never mistaken for an info notice.
|
|
78
130
|
|
|
131
|
+
### Diverging: above and below a baseline
|
|
132
|
+
|
|
133
|
+
When the value has a **real zero or baseline** and both directions mean
|
|
134
|
+
something — actual vs plan, this month vs the average, change since last
|
|
135
|
+
week — use the `diverging.*` ramp. A one-sided value (a count, a share, a
|
|
136
|
+
usage total) keeps `data.*`, even if some bars are small.
|
|
137
|
+
|
|
138
|
+
- **Blue is above the baseline, orange is below** (`diverging.pos.*` /
|
|
139
|
+
`diverging.neg.*`). `3` is the largest distance from the baseline on either
|
|
140
|
+
side, and the two sides share their lightness per step, so the same
|
|
141
|
+
distance looks the same size in both directions.
|
|
142
|
+
- **The baseline itself is `diverging.mid`** (neutral step 3, so it follows
|
|
143
|
+
the neutral scheme). Never white or `bg.canvas`: a "no change" cell must
|
|
144
|
+
still read as a cell.
|
|
145
|
+
- **Never red and green for direction.** Above/below is not good/bad. When a
|
|
146
|
+
direction is good or bad, that is a status: say it with an icon and words,
|
|
147
|
+
as everywhere else.
|
|
148
|
+
- **Orange is for fills only** — bars, cells, areas. Never orange text or
|
|
149
|
+
icons; labels and axis text stay `fg.*`. Lines keep the stroke rules
|
|
150
|
+
above.
|
|
151
|
+
- **The legend names the direction in words** ("above plan" / "below plan"),
|
|
152
|
+
not only with the two colours.
|
|
153
|
+
|
|
154
|
+
| Token | Light | Dark |
|
|
155
|
+
| --- | --- | --- |
|
|
156
|
+
| `diverging.pos.3` (far above) | `#2C5D91` · white label | `#A9C7EB` · ink label |
|
|
157
|
+
| `diverging.pos.2` | `#5890CD` · ink label | `#5890CD` · ink label |
|
|
158
|
+
| `diverging.pos.1` (just above) | `#A9C7EB` · ink label | `#2C5D91` · white label |
|
|
159
|
+
| `diverging.mid` (at the baseline) | `#EDE9E2` (`neutral.3`) · ink label | `#2E2F2F` (`neutral.3`) · white label |
|
|
160
|
+
| `diverging.neg.1` (just below) | `#E4BBA0` · ink label | `#85491A` · white label |
|
|
161
|
+
| `diverging.neg.2` | `#BF7946` · **no in-cell label**; label outside the mark | `#BF7946` · **no in-cell label**; label outside the mark |
|
|
162
|
+
| `diverging.neg.3` (far below) | `#85491A` · white label | `#E4BBA0` · ink label |
|
|
163
|
+
|
|
164
|
+
`diverging.neg.2` clears neither label (ink 4.41:1, white 3.48:1), so values
|
|
165
|
+
for that step go beside or above the bar, not inside it. The `diverging.mid`
|
|
166
|
+
values shown are the `ink` scheme; with `neutral: 'slate'` it is slate step 3.
|
|
167
|
+
|
|
168
|
+
The diverging ramp is a dedicated data-viz ramp (OKLCH chroma ≈ 0.10–0.11 at
|
|
169
|
+
steps 2–3, 0.06 at step 1, the same on both sides): paired with the dusty
|
|
170
|
+
`data.*` blue (≈ 0.05), any warm hue reads as brown. Blue ↔ orange
|
|
171
|
+
also keeps the widest colour-blind separation of the pairs considered; gold
|
|
172
|
+
reads as a warning and purple collapses into blue for deuteranopes.
|
|
173
|
+
|
|
174
|
+
`data.*` and `diverging.*` are fills: under high contrast they keep their
|
|
175
|
+
value (like `bg.track`), and in-cell labels are audited at 4.5:1 in light and
|
|
176
|
+
dark.
|
|
177
|
+
|
|
79
178
|
## Modes
|
|
80
179
|
|
|
81
180
|
Every role flips with the colour mode (`_light` / `_dark`) and has a
|
package/src/theme/claude.md
CHANGED
|
@@ -143,16 +143,24 @@ is the maintainer's view.
|
|
|
143
143
|
|
|
144
144
|
### Layers and files
|
|
145
145
|
|
|
146
|
-
| Layer
|
|
147
|
-
|
|
|
148
|
-
| Raw scales `ink`/`inkDark`, `sand`/`sandDark`, `slate`/`slateDark` (1–12), `coral`, 12 system hues `{base, baseDark, hc, hcDark, surface, ink, surfaceDark, inkDark}`
|
|
149
|
-
| Semantic steps `neutral.1–12`, `secondary.1–12`
|
|
150
|
-
| Roles (`bg.*`, `layer.*`, `fg.*`, `border.*`, `primary.*`, `secondary.*`, `action.*`, `send.*`, `count.*`, `disabled.*`, `focus.ring`, status, `tooltip.*`, `category.*`) | `ROLE_TOKEN_PATHS` + `createSemanticColors()` | The only colours a component reads |
|
|
146
|
+
| Layer | Where | Rule |
|
|
147
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------- |
|
|
148
|
+
| Raw scales `ink`/`inkDark`, `sand`/`sandDark`, `slate`/`slateDark` (1–12), `coral`, 12 system hues `{base, baseDark, hc, hcDark, surface, ink, surfaceDark, inkDark}`, `dataviz` | `palette.generated.ts` → `colors` in `colors.ts` | Components and recipes **never** read them |
|
|
149
|
+
| Semantic steps `neutral.1–12`, `secondary.1–12` | `createSemanticColors()` | Filled by the theme option (`neutral: 'ink' \| 'slate'`, `secondary: 'sand'`) |
|
|
150
|
+
| Roles (`bg.*`, `layer.*`, `fg.*`, `border.*`, `primary.*`, `secondary.*`, `action.*`, `send.*`, `count.*`, `control.*`, `mark.starred`, `disabled.*`, `focus.ring`, status, `tooltip.*`, `category.*`, `data.*`, `diverging.*`) | `ROLE_TOKEN_PATHS` + `createSemanticColors()` | The only colours a component reads |
|
|
151
151
|
|
|
152
152
|
- **Values come from the generator.** `scripts/palette/generate.mjs` ports the
|
|
153
153
|
designer prototype (OKLCH, contrast-targeted steps) and `--check`s it against
|
|
154
154
|
`scripts/palette/reference.json`. Change a value there, regenerate, commit
|
|
155
155
|
`palette.generated.ts`. Never hand-edit the generated file.
|
|
156
|
+
- **Dark mode is a neutral charcoal**, not the prototype's warm dark ramp
|
|
157
|
+
(re-tuned 2026-10-27; light is still the prototype). `inkDark` steps 1–7
|
|
158
|
+
hold chroma ≤ 0.003 and only the text steps keep a trace of warmth
|
|
159
|
+
(≤ 0.008); the canvas is `#171717`; body text is its own anchor
|
|
160
|
+
(`fgDark`, ≈ 14:1; HC dark `fgHcDark`, ≈ 16:1), not cream; dark
|
|
161
|
+
`action.fg` uses the same anchor. HC dark `fg.muted` is the OKLCH midpoint
|
|
162
|
+
of `fg.subtle` and `fg.default`, so the three text levels stay distinct. A warm tint that is invisible in light
|
|
163
|
+
reads as sepia on a dark ground — keep new dark values near-neutral.
|
|
156
164
|
- **High contrast** (`prefers-contrast: more`): a role whose HC value differs
|
|
157
165
|
reads an internal helper `scheme.light.*` / `scheme.dark.*` (`{ base,
|
|
158
166
|
_moreContrast }`) because Chakra cannot nest `_dark` inside `_moreContrast`
|
|
@@ -166,8 +174,9 @@ _moreContrast }`) because Chakra cannot nest `_dark` inside `_moreContrast`
|
|
|
166
174
|
### Adding or changing a token
|
|
167
175
|
|
|
168
176
|
1. Add it to the generator (`buildScheme`) and to `PATHS` in `colors.ts`.
|
|
169
|
-
2. Register its contrast pair(s) in `contrast.test.ts` (`PAIRS`, `SEP
|
|
170
|
-
|
|
177
|
+
2. Register its contrast pair(s) in `contrast.test.ts` (`PAIRS`, `SEP`; a
|
|
178
|
+
data-viz fill goes in `DATA_VIZ_LABELS` (`paletteSwatches.ts`) with its in-cell label), or a reason in
|
|
179
|
+
`NO_PAIR`. The registry test fails until you do; the audit runs
|
|
171
180
|
light / dark / hcLight / hcDark for every neutral scheme.
|
|
172
181
|
3. Add it to `SemanticColorToken` and to SemanticTokens.mdx.
|
|
173
182
|
|
|
@@ -221,6 +230,14 @@ fontSizes: {
|
|
|
221
230
|
|
|
222
231
|
**Base font size:** `14px` (set in `global.ts`)
|
|
223
232
|
|
|
233
|
+
## Control sizes
|
|
234
|
+
|
|
235
|
+
`controlSizes.ts` is the single size scale for every control (Button's values:
|
|
236
|
+
xs `sizes.8` · sm `sizes.9` · md `sizes.10` · lg `sizes.11`, one textStyle per
|
|
237
|
+
size). `recipes/controls.ts` maps Chakra's button / input / textarea / select /
|
|
238
|
+
combobox / tabs / checkbox / radioGroup / switch recipes onto it. See
|
|
239
|
+
`src/components/claude.md` → Control sizes.
|
|
240
|
+
|
|
224
241
|
## Border Radius
|
|
225
242
|
|
|
226
243
|
```tsx
|
|
@@ -246,12 +263,20 @@ follow the scheme and high contrast. Base font size is 14px.
|
|
|
246
263
|
1. Read only role tokens; reach for `neutral.N` only when no role names the job.
|
|
247
264
|
2. Emphasis is weight, not colour — never `primary.*` for text.
|
|
248
265
|
3. Status colours carry status meaning; decoration uses `category.*`.
|
|
266
|
+
State is neither: binary on/off state uses `control.on` (+ `control.onFg`
|
|
267
|
+
for the thumb or label on it); user-marked items (star/bookmark) use
|
|
268
|
+
`mark.starred`; never `primary`/black/white or a status colour for state.
|
|
249
269
|
4. Beige (`secondary.surface*`) is for small surfaces (bubbles, soft
|
|
250
270
|
badges/tags, the modal header band), never rows or panels.
|
|
251
271
|
5. Disabled = `disabled.*`, not opacity. Focus = `focusRing`.
|
|
252
272
|
6. Blue means data and links: links are `fg.link`; data visualisation
|
|
253
|
-
(usage bars, single-measure charts, maps)
|
|
254
|
-
rainbow or grey ramp
|
|
273
|
+
(usage bars, single-measure bar charts, maps) fills with `data.1–4` (4 =
|
|
274
|
+
largest), never a rainbow or grey ramp; line strokes (single-measure, and
|
|
275
|
+
series 1) use `blue.base`. Values against a real baseline (vs plan, vs
|
|
276
|
+
average) fill with `diverging.pos.1–3` (above, blue) / `diverging.neg.1–3`
|
|
277
|
+
(below, orange) and `diverging.mid` at the baseline — never red/green for
|
|
278
|
+
direction, never orange text or icons. Values and labels:
|
|
279
|
+
SemanticTokens.mdx → "Blue means data and links".
|
|
255
280
|
|
|
256
281
|
## Extending the Theme
|
|
257
282
|
|
package/src/theme/colors.ts
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* black), `sand.1–12` / `sandDark.1–12` (beige-brown), `slate.1–12` /
|
|
8
8
|
* `slateDark.1–12` (today's cool gray rebuilt on the same contrast targets),
|
|
9
9
|
* `coral.*`, and the 12 system hues (`red` … `brown`, each
|
|
10
|
-
* `{base, baseDark, hc, hcDark, surface, ink, surfaceDark, inkDark}`)
|
|
10
|
+
* `{base, baseDark, hc, hcDark, surface, ink, surfaceDark, inkDark}`), and
|
|
11
|
+
* `dataviz.*` (the data-visualisation values no hue step covers).
|
|
11
12
|
* The step number is the job (Radix-style): 1–3 backgrounds, 4–6 dividers
|
|
12
13
|
* and borders, 7 control border (3:1), 8 icon/placeholder (4.5:1), 9–11
|
|
13
14
|
* text, 12 maximum contrast.
|
|
@@ -15,8 +16,12 @@
|
|
|
15
16
|
* `createLogicianTheme({ neutral, secondary })` decides which raw scale fills
|
|
16
17
|
* them (default `ink` / `sand`).
|
|
17
18
|
* 3. **Semantic roles** — `bg.*`, `layer.*`, `fg.*`, `border.*`, `primary.*`,
|
|
18
|
-
* `secondary.*`, `action.*`, `send.*`, `count.*`, `
|
|
19
|
-
*
|
|
19
|
+
* `secondary.*`, `action.*`, `send.*`, `count.*`, `control.*` (on/off
|
|
20
|
+
* state), `mark.starred` (user-marked items), `disabled.*`, `focus.ring`,
|
|
21
|
+
* the four status families, `tooltip.*`, `category.{hue}.*` (plus the
|
|
22
|
+
* nameless `category.neutral.*`), the `bg.logo` / `fg.onLogo` tile, and the
|
|
23
|
+
* data-visualisation fills `data.1–4` and `diverging.{pos,neg}.1–3` /
|
|
24
|
+
* `diverging.mid`.
|
|
20
25
|
*
|
|
21
26
|
* Every value comes from `palette.generated.ts` (see
|
|
22
27
|
* `scripts/palette/generate.mjs`), which ports the designer-reviewed prototype
|
|
@@ -36,7 +41,13 @@
|
|
|
36
41
|
* `no-deprecated-tokens` lint rule. They are removed in 6.0.
|
|
37
42
|
*/
|
|
38
43
|
import DEPRECATED from './deprecatedColorTokens.json';
|
|
39
|
-
import {
|
|
44
|
+
import {
|
|
45
|
+
CORAL,
|
|
46
|
+
DATAVIZ,
|
|
47
|
+
RAMPS,
|
|
48
|
+
SCHEMES,
|
|
49
|
+
SYSTEM_HUES,
|
|
50
|
+
} from './palette.generated';
|
|
40
51
|
|
|
41
52
|
/** Raw scale that fills `neutral.1–12` and every neutral role. */
|
|
42
53
|
export type NeutralScale = 'ink' | 'slate';
|
|
@@ -86,17 +97,25 @@ function rampTokens(
|
|
|
86
97
|
return out;
|
|
87
98
|
}
|
|
88
99
|
|
|
100
|
+
/** Brand anchor (generator name) → raw token: `{name}.key` or `{name}Dark.key`. */
|
|
101
|
+
const ANCHOR_TOKENS = [
|
|
102
|
+
['cream', 'light', 'cream'],
|
|
103
|
+
['press', 'light', 'press'],
|
|
104
|
+
['fgDark', 'dark', 'fg'],
|
|
105
|
+
['primaryDark', 'dark', 'primary'],
|
|
106
|
+
['primaryHoverDark', 'dark', 'primaryHover'],
|
|
107
|
+
['pressDark', 'dark', 'press'],
|
|
108
|
+
] as const;
|
|
109
|
+
|
|
89
110
|
function scaleTokens(name: 'ink' | 'sand' | 'slate') {
|
|
90
111
|
const r = RAMPS[name];
|
|
91
|
-
const a = r.anchors as
|
|
92
|
-
Record<'cream' | 'press' | 'primaryDark' | 'pressDark', string>
|
|
93
|
-
>;
|
|
112
|
+
const a = r.anchors as Record<string, string | undefined>;
|
|
94
113
|
const light: Record<string, string> = {};
|
|
95
114
|
const dark: Record<string, string> = { canvas: r.canvasDark };
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
115
|
+
for (const [anchor, mode, key] of ANCHOR_TOKENS) {
|
|
116
|
+
const hex = a[anchor];
|
|
117
|
+
if (hex) (mode === 'light' ? light : dark)[key] = hex;
|
|
118
|
+
}
|
|
100
119
|
return {
|
|
101
120
|
[name]: rampTokens(r.light, light),
|
|
102
121
|
[`${name}Dark`]: rampTokens(r.dark, dark),
|
|
@@ -122,6 +141,9 @@ export const colors = {
|
|
|
122
141
|
),
|
|
123
142
|
])
|
|
124
143
|
),
|
|
144
|
+
dataviz: Object.fromEntries(
|
|
145
|
+
Object.entries(DATAVIZ).map(([k, val]) => [k, v(val)])
|
|
146
|
+
),
|
|
125
147
|
white: v('#FFFFFF'),
|
|
126
148
|
} as Record<string, Record<string, TokenValue> | TokenValue>;
|
|
127
149
|
|
|
@@ -187,8 +209,16 @@ const PATHS: Record<FlatKey, string> = {
|
|
|
187
209
|
'send-fg': 'send.fg',
|
|
188
210
|
'count-bg': 'count.bg',
|
|
189
211
|
'count-fg': 'count.fg',
|
|
212
|
+
// State, not status: a binary control that is on (Switch, selected toggle
|
|
213
|
+
// chip) and the thing on it (thumb, chip label); something the user marked
|
|
214
|
+
// to keep (favourite star, bookmark). Never primary/black/white or a status
|
|
215
|
+
// colour for either.
|
|
216
|
+
'control-on': 'control.on',
|
|
217
|
+
'control-onFg': 'control.onFg',
|
|
218
|
+
'mark-starred': 'mark.starred',
|
|
190
219
|
'disabled-bg': 'disabled.bg',
|
|
191
220
|
'disabled-fg': 'disabled.fg',
|
|
221
|
+
'disabled-fgGhost': 'disabled.fgGhost',
|
|
192
222
|
focus: 'focus.ring',
|
|
193
223
|
'danger-bg': 'danger.bg',
|
|
194
224
|
'danger-border': 'danger.border',
|
|
@@ -214,6 +244,20 @@ const PATHS: Record<FlatKey, string> = {
|
|
|
214
244
|
'info-onSolid': 'info.onSolid',
|
|
215
245
|
'tooltip-bg': 'tooltip.bg',
|
|
216
246
|
'tooltip-fg': 'tooltip.fg',
|
|
247
|
+
// Data visualisation (fills only). Higher number = larger value, in both
|
|
248
|
+
// modes; the dark values flip lightness so the strongest step stays the
|
|
249
|
+
// most prominent on a dark canvas.
|
|
250
|
+
'data-1': 'data.1',
|
|
251
|
+
'data-2': 'data.2',
|
|
252
|
+
'data-3': 'data.3',
|
|
253
|
+
'data-4': 'data.4',
|
|
254
|
+
'diverging-pos-1': 'diverging.pos.1',
|
|
255
|
+
'diverging-pos-2': 'diverging.pos.2',
|
|
256
|
+
'diverging-pos-3': 'diverging.pos.3',
|
|
257
|
+
'diverging-neg-1': 'diverging.neg.1',
|
|
258
|
+
'diverging-neg-2': 'diverging.neg.2',
|
|
259
|
+
'diverging-neg-3': 'diverging.neg.3',
|
|
260
|
+
'diverging-mid': 'diverging.mid',
|
|
217
261
|
};
|
|
218
262
|
|
|
219
263
|
/** Exposed for tests and docs: every role token generated from the scheme table. */
|
|
@@ -237,10 +281,9 @@ function buildRefIndex(neutral: NeutralScale, secondary: SecondaryScale) {
|
|
|
237
281
|
for (const s of STEPS) add(RAMPS[name].dark[s], `${name}Dark.${s}`);
|
|
238
282
|
add(RAMPS[name].canvasDark, `${name}Dark.canvas`);
|
|
239
283
|
const a = RAMPS[name].anchors as Record<string, string>;
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
if (a.pressDark) add(a.pressDark, `${name}Dark.press`);
|
|
284
|
+
for (const [anchor, mode, key] of ANCHOR_TOKENS)
|
|
285
|
+
if (a[anchor])
|
|
286
|
+
add(a[anchor], `${name}${mode === 'dark' ? 'Dark' : ''}.${key}`);
|
|
244
287
|
};
|
|
245
288
|
addScale(neutral);
|
|
246
289
|
addScale(secondary);
|
|
@@ -249,6 +292,7 @@ function buildRefIndex(neutral: NeutralScale, secondary: SecondaryScale) {
|
|
|
249
292
|
for (const hue of SYSTEM_HUE_NAMES)
|
|
250
293
|
for (const [k, hex] of Object.entries(SYSTEM_HUES[hue]))
|
|
251
294
|
add(hex, `${hue}.${k}`);
|
|
295
|
+
for (const [k, hex] of Object.entries(DATAVIZ)) add(hex, `dataviz.${k}`);
|
|
252
296
|
// The brand black/cream anchors exist only on ink; reachable from any scheme.
|
|
253
297
|
if (neutral !== 'ink') addScale('ink');
|
|
254
298
|
return (hex: string) => index.get(hex.toUpperCase()) ?? hex;
|
|
@@ -328,6 +372,11 @@ export function createSemanticColors({
|
|
|
328
372
|
'fg.emphasized': 'fg.default',
|
|
329
373
|
'bg.invalid.subtle': 'danger.bg',
|
|
330
374
|
'bg.highlighted': 'warning.bg',
|
|
375
|
+
// The no-identity pair, shaped like a category pair so a `colorPalette`
|
|
376
|
+
// can point at it (`colorPalette="category.neutral"`, the avatar recipe's
|
|
377
|
+
// default). Not a 13th hue — `hueForName` never returns it.
|
|
378
|
+
'category.neutral.surface': 'bg.muted',
|
|
379
|
+
'category.neutral.fg': 'secondary.fgStrong',
|
|
331
380
|
// Every other name Chakra's own recipes read (menu/combobox `_highlighted`
|
|
332
381
|
// is `bg.emphasized/60`, radiomark borders are `border.emphasized`, the
|
|
333
382
|
// field recipe reads `fg.error` …). 4.x got these for free because its
|
|
@@ -377,6 +426,15 @@ export function createSemanticColors({
|
|
|
377
426
|
} as never);
|
|
378
427
|
}
|
|
379
428
|
|
|
429
|
+
// Logo tile: model, chatbot and brand marks are drawn for a light ground,
|
|
430
|
+
// so the tile stays light in both modes (white, then the warm cream anchor
|
|
431
|
+
// in dark so it does not glare on the dark canvas), and the text on it stays
|
|
432
|
+
// dark in both modes. Avatar `variant="logo"` reads the pair.
|
|
433
|
+
setPath(tree, 'bg.logo', {
|
|
434
|
+
value: { _light: '{colors.white}', _dark: '{colors.ink.cream}' },
|
|
435
|
+
} as never);
|
|
436
|
+
setPath(tree, 'fg.onLogo', { value: `{colors.${neutral}.11}` });
|
|
437
|
+
|
|
380
438
|
// Deprecated 4.x names → 5.0 replacement (removed in 6.0).
|
|
381
439
|
for (const [oldName, newName] of Object.entries(DEPRECATED.aliases))
|
|
382
440
|
setPath(tree, oldName, { value: `{colors.${newName}}` });
|
|
@@ -404,23 +462,28 @@ type StatusFamily = 'danger' | 'success' | 'warning' | 'info';
|
|
|
404
462
|
export type SemanticColorToken =
|
|
405
463
|
| `neutral.${Step}`
|
|
406
464
|
| `secondary.${Step}`
|
|
407
|
-
| `bg.${'canvas' | 'surface' | 'raised' | 'subtle' | 'muted' | 'sunken' | 'track' | 'inverse' | 'panel' | 'highlighted'}`
|
|
465
|
+
| `bg.${'canvas' | 'surface' | 'raised' | 'subtle' | 'muted' | 'sunken' | 'track' | 'inverse' | 'panel' | 'highlighted' | 'logo'}`
|
|
408
466
|
| 'bg.invalid.subtle'
|
|
409
467
|
| `layer.${1 | 2 | 3}`
|
|
410
468
|
| `layer.${1 | 2 | 3}.${'hover' | 'active'}`
|
|
411
|
-
| `fg.${'default' | 'emphasized' | 'muted' | 'subtle' | 'icon' | 'placeholder' | 'onPrimary' | 'link' | 'linkHover' | 'inverse'}`
|
|
469
|
+
| `fg.${'default' | 'emphasized' | 'muted' | 'subtle' | 'icon' | 'placeholder' | 'onPrimary' | 'onLogo' | 'link' | 'linkHover' | 'inverse'}`
|
|
412
470
|
| `border.${'subtle' | 'default' | 'strong' | 'control'}`
|
|
413
471
|
| `primary.${'main' | 'hover' | 'active' | 'wash' | 'washActive' | 'selected'}`
|
|
414
472
|
| `secondary.${'surface' | 'surfaceStrong' | 'border' | 'fg' | 'fgStrong'}`
|
|
415
473
|
| `action.${'mark' | 'iconOnSolid' | 'bg' | 'bgHover' | 'bgActive' | 'fg' | 'border'}`
|
|
416
474
|
| `send.${'bg' | 'bgHover' | 'bgActive' | 'fg'}`
|
|
417
475
|
| `count.${'bg' | 'fg'}`
|
|
418
|
-
| `
|
|
476
|
+
| `control.${'on' | 'onFg'}`
|
|
477
|
+
| 'mark.starred'
|
|
478
|
+
| `disabled.${'bg' | 'fg' | 'fgGhost'}`
|
|
419
479
|
| 'focus.ring'
|
|
420
480
|
| `${StatusFamily}.${'bg' | 'border' | 'fg' | 'solid' | 'onSolid'}`
|
|
421
481
|
| `danger.${'solidHover' | 'solidActive'}`
|
|
422
482
|
| `tooltip.${'bg' | 'fg'}`
|
|
423
|
-
| `category.${Hue}.${'surface' | 'fg'}`
|
|
483
|
+
| `category.${Hue | 'neutral'}.${'surface' | 'fg'}`
|
|
484
|
+
| `data.${1 | 2 | 3 | 4}`
|
|
485
|
+
| `diverging.${'pos' | 'neg'}.${1 | 2 | 3}`
|
|
486
|
+
| 'diverging.mid'
|
|
424
487
|
| DeprecatedSemanticColorToken;
|
|
425
488
|
|
|
426
489
|
/**
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
} from './colors';
|
|
11
11
|
import { system } from './index';
|
|
12
12
|
import { SCHEMES } from './palette.generated';
|
|
13
|
+
import { DATA_VIZ_LABEL_TOKEN, DATA_VIZ_LABELS } from './paletteSwatches';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Contrast audit for the BAZE semantic tokens — the same check as section 3-1
|
|
@@ -46,6 +47,10 @@ const PAIRS: [string, string, Kind][] = [
|
|
|
46
47
|
['action-mark', bg, 'nontext'],
|
|
47
48
|
['primary-main', bg, 'nontext'],
|
|
48
49
|
['danger-fg', bg, 'nontext'],
|
|
50
|
+
// An on Switch track / selected chip against the ground it sits on,
|
|
51
|
+
// and a starred mark (a filled icon) on every layer (WCAG 1.4.11).
|
|
52
|
+
['control-on', bg, 'nontext'],
|
|
53
|
+
['mark-starred', bg, 'nontext'],
|
|
49
54
|
] as [string, string, Kind][]
|
|
50
55
|
),
|
|
51
56
|
['fg-placeholder', 'bg-surface', 'text'],
|
|
@@ -64,6 +69,10 @@ const PAIRS: [string, string, Kind][] = [
|
|
|
64
69
|
['fg-muted', 'bg-subtle', 'text'],
|
|
65
70
|
['fg-icon', 'bg-muted', 'nontext'],
|
|
66
71
|
['fg-icon', 'bg-subtle', 'nontext'],
|
|
72
|
+
// The favourite star sits on a bg.surface circle over thumbnails, and on
|
|
73
|
+
// bg.muted cards.
|
|
74
|
+
['mark-starred', 'bg-surface', 'nontext'],
|
|
75
|
+
['mark-starred', 'bg-muted', 'nontext'],
|
|
67
76
|
['fg-default', 'secondary-surface', 'text'],
|
|
68
77
|
['secondary-fgStrong', 'secondary-surface', 'text'],
|
|
69
78
|
['secondary-fgStrong', 'secondary-surfaceStrong', 'text'],
|
|
@@ -85,6 +94,8 @@ const PAIRS: [string, string, Kind][] = [
|
|
|
85
94
|
['danger-onSolid', 'danger-solid', 'text'],
|
|
86
95
|
['success-fg', 'success-bg', 'text'],
|
|
87
96
|
['success-onSolid', 'success-solid', 'text'],
|
|
97
|
+
// `text`: a selected toggle chip puts its label on control.on.
|
|
98
|
+
['control-onFg', 'control-on', 'text'],
|
|
88
99
|
['warning-fg', 'warning-bg', 'text'],
|
|
89
100
|
['warning-onSolid', 'warning-solid', 'text'],
|
|
90
101
|
['info-fg', 'info-bg', 'text'],
|
|
@@ -129,6 +140,8 @@ const NO_PAIR: Record<string, string> = {
|
|
|
129
140
|
'disabled controls are exempt from WCAG contrast (1.4.3 / 1.4.11)',
|
|
130
141
|
'disabled-fg':
|
|
131
142
|
'disabled controls are exempt from WCAG contrast (1.4.3 / 1.4.11)',
|
|
143
|
+
'disabled-fgGhost':
|
|
144
|
+
'disabled controls are exempt from WCAG contrast (1.4.3 / 1.4.11)',
|
|
132
145
|
'danger-border':
|
|
133
146
|
'decorative edge of a status surface; the fg/icon carries the status',
|
|
134
147
|
'success-border': 'decorative edge of a status surface',
|
|
@@ -137,6 +150,12 @@ const NO_PAIR: Record<string, string> = {
|
|
|
137
150
|
track: 'unfilled track; the filled part (primary-main) carries the value',
|
|
138
151
|
};
|
|
139
152
|
|
|
153
|
+
// Data-viz fills (`data.*`, `diverging.*`) are registered through
|
|
154
|
+
// DATA_VIZ_LABELS (paletteSwatches.ts): each fill with the in-cell label it may
|
|
155
|
+
// carry. Audited at 4.5:1 in light and dark, like the category pairs: the fills
|
|
156
|
+
// keep their value under high contrast (they are fills, like `track`), so an
|
|
157
|
+
// in-cell label is not held to the 7:1 high-contrast text target.
|
|
158
|
+
|
|
140
159
|
// ───────────────────────────── resolver ─────────────────────────────
|
|
141
160
|
|
|
142
161
|
const lum = (h: string) => {
|
|
@@ -253,6 +272,52 @@ describe.each(SCHEME_NAMES)('contrast — %s scheme', (neutral) => {
|
|
|
253
272
|
expect(failures).toEqual([]);
|
|
254
273
|
});
|
|
255
274
|
|
|
275
|
+
it('the nameless avatar pair (category.neutral) reads as text (≥ 4.5:1, all modes)', () => {
|
|
276
|
+
const failures = MODES.flatMap((mode) => {
|
|
277
|
+
const c = ratio(
|
|
278
|
+
resolve('category.neutral.fg', mode),
|
|
279
|
+
resolve('category.neutral.surface', mode)
|
|
280
|
+
);
|
|
281
|
+
return c >= 4.5 ? [] : [`${mode}: ${c.toFixed(2)}`];
|
|
282
|
+
});
|
|
283
|
+
expect(failures).toEqual([]);
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
it('logo tile stays light in both modes and its text reads (≥ 4.5:1)', () => {
|
|
287
|
+
const failures = MODES.flatMap((mode) => {
|
|
288
|
+
const tile = resolve('bg.logo', mode);
|
|
289
|
+
const c = ratio(resolve('fg.onLogo', mode), tile);
|
|
290
|
+
const out = c >= 4.5 ? [] : [`fg.onLogo ${mode}: ${c.toFixed(2)}`];
|
|
291
|
+
// "Light": a logo drawn for white must keep a light ground in dark mode.
|
|
292
|
+
return lum(tile) > 0.7 ? out : [...out, `bg.logo ${mode} is not light`];
|
|
293
|
+
});
|
|
294
|
+
expect(failures).toEqual([]);
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
it('data-viz fills: each in-cell label clears 4.5:1, and "no label" means neither does (light and dark)', () => {
|
|
298
|
+
const failures = Object.entries(DATA_VIZ_LABELS).flatMap(([fill, labels]) =>
|
|
299
|
+
(['light', 'dark'] as const).flatMap((mode) => {
|
|
300
|
+
const bg = flat(fill, mode);
|
|
301
|
+
const label = labels[mode];
|
|
302
|
+
if (label) {
|
|
303
|
+
const c = ratio(resolve(DATA_VIZ_LABEL_TOKEN[label], mode), bg);
|
|
304
|
+
return c >= 4.5
|
|
305
|
+
? []
|
|
306
|
+
: [`${label} on ${fill} ${mode}: ${c.toFixed(2)}`];
|
|
307
|
+
}
|
|
308
|
+
const best = Math.max(
|
|
309
|
+
...Object.values(DATA_VIZ_LABEL_TOKEN).map((t) =>
|
|
310
|
+
ratio(resolve(t, mode), bg)
|
|
311
|
+
)
|
|
312
|
+
);
|
|
313
|
+
return best < 4.5
|
|
314
|
+
? []
|
|
315
|
+
: [`${fill} ${mode} has no label but one clears ${best.toFixed(2)}`];
|
|
316
|
+
})
|
|
317
|
+
);
|
|
318
|
+
expect(failures).toEqual([]);
|
|
319
|
+
});
|
|
320
|
+
|
|
256
321
|
it('every deprecated 4.x name resolves to its replacement in all modes', () => {
|
|
257
322
|
for (const [oldName, newName] of Object.entries(DEPRECATED_COLOR_TOKENS))
|
|
258
323
|
for (const mode of MODES)
|
|
@@ -267,6 +332,7 @@ describe('contrast registry', () => {
|
|
|
267
332
|
...PAIRS.flatMap(([a, b]) => [a, b]),
|
|
268
333
|
...SEP.flatMap(([a, b]) => [a, b]),
|
|
269
334
|
...Object.keys(NO_PAIR),
|
|
335
|
+
...Object.keys(DATA_VIZ_LABELS),
|
|
270
336
|
]);
|
|
271
337
|
|
|
272
338
|
it('every role token has a contrast pair or a NO_PAIR reason', () => {
|
|
@@ -291,6 +357,7 @@ describe('contrast registry', () => {
|
|
|
291
357
|
/^secondary\.\d+$/,
|
|
292
358
|
/^scheme\.(light|dark)\.\w+$/, // internal high-contrast helpers
|
|
293
359
|
/^category\.\w+\.(surface|fg)$/, // audited by the category test
|
|
360
|
+
/^(bg\.logo|fg\.onLogo)$/, // audited by the logo tile test
|
|
294
361
|
// kept 4.x names / Chakra globals that reuse a role value verbatim
|
|
295
362
|
/^(bg|fg|border)$/,
|
|
296
363
|
/^bg\.(panel|raised|inverse|sunken|highlighted|invalid\.subtle)$/,
|