@mindlogic-ai/logician-ui 4.0.0 → 5.0.0-alpha.0
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 +155 -0
- package/USAGE.md +1 -1
- package/codemods/5.0/README.md +244 -0
- package/codemods/5.0/__testfixtures__/badge-variants.input.tsx +20 -0
- package/codemods/5.0/__testfixtures__/badge-variants.output.tsx +21 -0
- package/codemods/5.0/__testfixtures__/button-variants.input.tsx +124 -0
- package/codemods/5.0/__testfixtures__/button-variants.output.tsx +116 -0
- package/codemods/5.0/__testfixtures__/card-gradient.input.tsx +12 -0
- package/codemods/5.0/__testfixtures__/card-gradient.output.tsx +16 -0
- package/codemods/5.0/__testfixtures__/index.input.tsx +43 -0
- package/codemods/5.0/__testfixtures__/index.output.tsx +53 -0
- package/codemods/5.0/__testfixtures__/tag-chip-conflict.input.tsx +10 -0
- package/codemods/5.0/__testfixtures__/tag-chip-conflict.output.tsx +12 -0
- package/codemods/5.0/__testfixtures__/tag-chip-merge.input.tsx +42 -0
- package/codemods/5.0/__testfixtures__/tag-chip-merge.output.tsx +44 -0
- package/codemods/5.0/__testfixtures__/tag-chip.input.tsx +67 -0
- package/codemods/5.0/__testfixtures__/tag-chip.output.tsx +99 -0
- package/codemods/5.0/__testfixtures__/token-renames.input.tsx +88 -0
- package/codemods/5.0/__testfixtures__/token-renames.output.tsx +88 -0
- package/codemods/5.0/badge-variants.js +91 -0
- package/codemods/5.0/button-variants.js +233 -0
- package/codemods/5.0/card-gradient.js +72 -0
- package/codemods/5.0/codemods.test.ts +440 -0
- package/codemods/5.0/index.js +220 -0
- package/codemods/5.0/lib/shared.js +273 -0
- package/codemods/5.0/tag-chip.js +436 -0
- package/codemods/5.0/token-renames.js +231 -0
- package/codemods/vitest.config.ts +22 -0
- package/dist/components/Avatar/Avatar.d.ts +37 -0
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.js +31 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/Avatar.mjs +30 -3
- package/dist/components/Avatar/Avatar.mjs.map +1 -1
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Avatar/index.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.js +10 -6
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge/Badge.mjs +11 -7
- package/dist/components/Badge/Badge.mjs.map +1 -1
- package/dist/components/Badge/Badge.styles.d.ts +17 -3
- package/dist/components/Badge/Badge.styles.d.ts.map +1 -1
- package/dist/components/Badge/Badge.styles.js +51 -45
- package/dist/components/Badge/Badge.styles.js.map +1 -1
- package/dist/components/Badge/Badge.styles.mjs +50 -46
- package/dist/components/Badge/Badge.styles.mjs.map +1 -1
- package/dist/components/Badge/Badge.types.d.ts +16 -12
- package/dist/components/Badge/Badge.types.d.ts.map +1 -1
- package/dist/components/Badge/index.d.ts +2 -2
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Banner/Banner.styles.d.ts +7 -3
- package/dist/components/Banner/Banner.styles.d.ts.map +1 -1
- package/dist/components/Banner/Banner.styles.js +43 -27
- package/dist/components/Banner/Banner.styles.js.map +1 -1
- package/dist/components/Banner/Banner.styles.mjs +44 -28
- package/dist/components/Banner/Banner.styles.mjs.map +1 -1
- package/dist/components/Banner/Banner.types.d.ts +1 -1
- package/dist/components/Banner/Banner.types.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetCloseButton.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetCloseButton.js +1 -1
- package/dist/components/BottomSheet/BottomSheetCloseButton.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetCloseButton.mjs +1 -1
- package/dist/components/BottomSheet/BottomSheetCloseButton.mjs.map +1 -1
- package/dist/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.js +1 -1
- package/dist/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.js.map +1 -1
- package/dist/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.mjs +1 -1
- package/dist/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.mjs.map +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +33 -14
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.legacy.d.ts +53 -0
- package/dist/components/Button/Button.legacy.d.ts.map +1 -0
- package/dist/components/Button/Button.legacy.js +130 -0
- package/dist/components/Button/Button.legacy.js.map +1 -0
- package/dist/components/Button/Button.legacy.mjs +126 -0
- package/dist/components/Button/Button.legacy.mjs.map +1 -0
- package/dist/components/Button/Button.mjs +33 -14
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Button/Button.styles.d.ts +38 -26
- package/dist/components/Button/Button.styles.d.ts.map +1 -1
- package/dist/components/Button/Button.styles.js +126 -380
- package/dist/components/Button/Button.styles.js.map +1 -1
- package/dist/components/Button/Button.styles.mjs +125 -381
- package/dist/components/Button/Button.styles.mjs.map +1 -1
- package/dist/components/Button/Button.types.d.ts +43 -37
- package/dist/components/Button/Button.types.d.ts.map +1 -1
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.js +1 -7
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/Card.mjs +1 -7
- package/dist/components/Card/Card.mjs.map +1 -1
- package/dist/components/Card/Card.styles.d.ts +1 -12
- package/dist/components/Card/Card.styles.d.ts.map +1 -1
- package/dist/components/Card/Card.styles.js +6 -13
- package/dist/components/Card/Card.styles.js.map +1 -1
- package/dist/components/Card/Card.styles.mjs +6 -13
- package/dist/components/Card/Card.styles.mjs.map +1 -1
- package/dist/components/Card/Card.types.d.ts +1 -5
- package/dist/components/Card/Card.types.d.ts.map +1 -1
- package/dist/components/Checkbox/CheckboxControl.d.ts.map +1 -1
- package/dist/components/Checkbox/CheckboxControl.js +14 -8
- package/dist/components/Checkbox/CheckboxControl.js.map +1 -1
- package/dist/components/Checkbox/CheckboxControl.mjs +14 -8
- package/dist/components/Checkbox/CheckboxControl.mjs.map +1 -1
- package/dist/components/Chip/Chip.d.ts +5 -1
- package/dist/components/Chip/Chip.d.ts.map +1 -1
- package/dist/components/Chip/Chip.js +24 -18
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Chip/Chip.mjs +24 -18
- package/dist/components/Chip/Chip.mjs.map +1 -1
- package/dist/components/Chip/Chip.types.d.ts +38 -23
- package/dist/components/Chip/Chip.types.d.ts.map +1 -1
- package/dist/components/Chip/index.d.ts +0 -1
- package/dist/components/Chip/index.d.ts.map +1 -1
- package/dist/components/Code/Code.d.ts.map +1 -1
- package/dist/components/Code/Code.js +2 -2
- package/dist/components/Code/Code.js.map +1 -1
- package/dist/components/Code/Code.mjs +2 -2
- package/dist/components/Code/Code.mjs.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.d.ts.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.js +16 -2
- package/dist/components/CodeTabs/CodeTabs.js.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.mjs +16 -2
- package/dist/components/CodeTabs/CodeTabs.mjs.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.styles.d.ts +27 -0
- package/dist/components/CodeTabs/CodeTabs.styles.d.ts.map +1 -0
- package/dist/components/CodeTabs/CodeTabs.styles.js +32 -0
- package/dist/components/CodeTabs/CodeTabs.styles.js.map +1 -0
- package/dist/components/CodeTabs/CodeTabs.styles.mjs +30 -0
- package/dist/components/CodeTabs/CodeTabs.styles.mjs.map +1 -0
- package/dist/components/CodeTabs/CopyButton.d.ts.map +1 -1
- package/dist/components/CodeTabs/CopyButton.js +6 -3
- package/dist/components/CodeTabs/CopyButton.js.map +1 -1
- package/dist/components/CodeTabs/CopyButton.mjs +6 -3
- package/dist/components/CodeTabs/CopyButton.mjs.map +1 -1
- package/dist/components/Confetti/Confetti.d.ts +6 -9
- package/dist/components/Confetti/Confetti.d.ts.map +1 -1
- package/dist/components/Confetti/Confetti.js +8 -42
- package/dist/components/Confetti/Confetti.js.map +1 -1
- package/dist/components/Confetti/Confetti.mjs +8 -42
- package/dist/components/Confetti/Confetti.mjs.map +1 -1
- package/dist/components/Confetti/confettiColors.d.ts +25 -0
- package/dist/components/Confetti/confettiColors.d.ts.map +1 -0
- package/dist/components/Confetti/confettiColors.js +43 -0
- package/dist/components/Confetti/confettiColors.js.map +1 -0
- package/dist/components/Confetti/confettiColors.mjs +40 -0
- package/dist/components/Confetti/confettiColors.mjs.map +1 -0
- package/dist/components/CopyableCode/CopyableCode.d.ts.map +1 -1
- package/dist/components/CopyableCode/CopyableCode.js +2 -1
- package/dist/components/CopyableCode/CopyableCode.js.map +1 -1
- package/dist/components/CopyableCode/CopyableCode.mjs +2 -1
- package/dist/components/CopyableCode/CopyableCode.mjs.map +1 -1
- package/dist/components/CountBadge/CountBadge.d.ts +41 -0
- package/dist/components/CountBadge/CountBadge.d.ts.map +1 -0
- package/dist/components/CountBadge/CountBadge.js +60 -0
- package/dist/components/CountBadge/CountBadge.js.map +1 -0
- package/dist/components/CountBadge/CountBadge.mjs +58 -0
- package/dist/components/CountBadge/CountBadge.mjs.map +1 -0
- package/dist/components/CountBadge/CountBadge.styles.d.ts +13 -0
- package/dist/components/CountBadge/CountBadge.styles.d.ts.map +1 -0
- package/dist/components/CountBadge/CountBadge.styles.js +42 -0
- package/dist/components/CountBadge/CountBadge.styles.js.map +1 -0
- package/dist/components/CountBadge/CountBadge.styles.mjs +37 -0
- package/dist/components/CountBadge/CountBadge.styles.mjs.map +1 -0
- package/dist/components/CountBadge/CountBadge.types.d.ts +33 -0
- package/dist/components/CountBadge/CountBadge.types.d.ts.map +1 -0
- package/dist/components/CountBadge/index.d.ts +3 -0
- package/dist/components/CountBadge/index.d.ts.map +1 -0
- package/dist/components/DatePicker/RangeDatePicker.js +9 -7
- package/dist/components/DatePicker/RangeDatePicker.js.map +1 -1
- package/dist/components/DatePicker/RangeDatePicker.mjs +9 -7
- package/dist/components/DatePicker/RangeDatePicker.mjs.map +1 -1
- package/dist/components/DatePicker/SingleDatePicker.js +6 -4
- package/dist/components/DatePicker/SingleDatePicker.js.map +1 -1
- package/dist/components/DatePicker/SingleDatePicker.mjs +6 -4
- package/dist/components/DatePicker/SingleDatePicker.mjs.map +1 -1
- package/dist/components/ErrorFallback/ErrorFallback.d.ts.map +1 -1
- package/dist/components/ErrorFallback/ErrorFallback.js +5 -4
- package/dist/components/ErrorFallback/ErrorFallback.js.map +1 -1
- package/dist/components/ErrorFallback/ErrorFallback.mjs +5 -4
- package/dist/components/ErrorFallback/ErrorFallback.mjs.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/FileItem/FileItem.d.ts.map +1 -1
- package/dist/components/FileItem/FileItem.js +2 -2
- package/dist/components/FileItem/FileItem.js.map +1 -1
- package/dist/components/FileItem/FileItem.mjs +2 -2
- package/dist/components/FileItem/FileItem.mjs.map +1 -1
- package/dist/components/Form/FieldError/FieldError.d.ts +1 -1
- package/dist/components/Form/FieldError/FieldError.js +2 -2
- package/dist/components/Form/FieldError/FieldError.js.map +1 -1
- package/dist/components/Form/FieldError/FieldError.mjs +2 -2
- package/dist/components/Form/FieldError/FieldError.mjs.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.js +19 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.js.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.mjs +19 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.mjs.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/FormLabel/FormLabel.js +1 -1
- package/dist/components/FormLabel/FormLabel.js.map +1 -1
- package/dist/components/FormLabel/FormLabel.mjs +1 -1
- package/dist/components/FormLabel/FormLabel.mjs.map +1 -1
- package/dist/components/Icon/_utils/createIcon.d.ts +2 -2
- package/dist/components/Icon/_utils/createIcon.js +2 -2
- package/dist/components/Icon/_utils/createIcon.mjs +2 -2
- package/dist/components/Icon/_utils/createIconGroup.d.ts +1 -1
- package/dist/components/Icon/_utils/createIconGroup.js +1 -1
- package/dist/components/Icon/_utils/createIconGroup.mjs +1 -1
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.js +20 -10
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/IconButton/IconButton.mjs +20 -10
- package/dist/components/IconButton/IconButton.mjs.map +1 -1
- package/dist/components/IconButton/IconButton.styles.d.ts +24 -8
- package/dist/components/IconButton/IconButton.styles.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.styles.js +77 -11
- package/dist/components/IconButton/IconButton.styles.js.map +1 -1
- package/dist/components/IconButton/IconButton.styles.mjs +77 -13
- package/dist/components/IconButton/IconButton.styles.mjs.map +1 -1
- package/dist/components/IconButton/IconButton.types.d.ts +25 -20
- package/dist/components/IconButton/IconButton.types.d.ts.map +1 -1
- package/dist/components/IconButton/index.d.ts +1 -1
- package/dist/components/IconButton/index.d.ts.map +1 -1
- package/dist/components/InlineCode/InlineCode.js +6 -6
- package/dist/components/InlineCode/InlineCode.js.map +1 -1
- package/dist/components/InlineCode/InlineCode.mjs +6 -6
- package/dist/components/InlineCode/InlineCode.mjs.map +1 -1
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.js +12 -10
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/Input.mjs +12 -10
- 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 +28 -8
- package/dist/components/LineGraph/LineGraph.js.map +1 -1
- package/dist/components/LineGraph/LineGraph.mjs +28 -8
- package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
- package/dist/components/LineGraph/seriesColors.d.ts +22 -0
- package/dist/components/LineGraph/seriesColors.d.ts.map +1 -0
- package/dist/components/LineGraph/seriesColors.js +26 -0
- package/dist/components/LineGraph/seriesColors.js.map +1 -0
- package/dist/components/LineGraph/seriesColors.mjs +23 -0
- package/dist/components/LineGraph/seriesColors.mjs.map +1 -0
- package/dist/components/Loaders/LoaderStatus.d.ts +21 -0
- package/dist/components/Loaders/LoaderStatus.d.ts.map +1 -0
- package/dist/components/Loaders/LoaderStatus.js +29 -0
- package/dist/components/Loaders/LoaderStatus.js.map +1 -0
- package/dist/components/Loaders/LoaderStatus.mjs +27 -0
- package/dist/components/Loaders/LoaderStatus.mjs.map +1 -0
- package/dist/components/Loaders/Loaders.styles.d.ts +21 -0
- package/dist/components/Loaders/Loaders.styles.d.ts.map +1 -0
- package/dist/components/Loaders/Loaders.styles.js +33 -0
- package/dist/components/Loaders/Loaders.styles.js.map +1 -0
- package/dist/components/Loaders/Loaders.styles.mjs +29 -0
- package/dist/components/Loaders/Loaders.styles.mjs.map +1 -0
- package/dist/components/Loaders/Loaders.translations.json.js +19 -0
- package/dist/components/Loaders/Loaders.translations.json.js.map +1 -0
- package/dist/components/Loaders/Loaders.translations.json.mjs +14 -0
- package/dist/components/Loaders/Loaders.translations.json.mjs.map +1 -0
- package/dist/components/Loaders/PageLoader.d.ts +10 -2
- package/dist/components/Loaders/PageLoader.d.ts.map +1 -1
- package/dist/components/Loaders/PageLoader.js +6 -3
- package/dist/components/Loaders/PageLoader.js.map +1 -1
- package/dist/components/Loaders/PageLoader.mjs +7 -4
- package/dist/components/Loaders/PageLoader.mjs.map +1 -1
- package/dist/components/Loaders/SectionLoader.d.ts +2 -4
- package/dist/components/Loaders/SectionLoader.d.ts.map +1 -1
- package/dist/components/Loaders/SectionLoader.js +5 -2
- package/dist/components/Loaders/SectionLoader.js.map +1 -1
- package/dist/components/Loaders/SectionLoader.mjs +6 -3
- package/dist/components/Loaders/SectionLoader.mjs.map +1 -1
- package/dist/components/Loaders/ThinkingDots.d.ts +10 -0
- package/dist/components/Loaders/ThinkingDots.d.ts.map +1 -0
- package/dist/components/Loaders/ThinkingDots.js +20 -0
- package/dist/components/Loaders/ThinkingDots.js.map +1 -0
- package/dist/components/Loaders/ThinkingDots.mjs +18 -0
- package/dist/components/Loaders/ThinkingDots.mjs.map +1 -0
- package/dist/components/Loaders/index.d.ts +2 -1
- package/dist/components/Loaders/index.d.ts.map +1 -1
- package/dist/components/LogicianProvider/LogicianProvider.d.ts +12 -0
- package/dist/components/LogicianProvider/LogicianProvider.d.ts.map +1 -1
- package/dist/components/LogicianProvider/LogicianProvider.js +15 -5
- package/dist/components/LogicianProvider/LogicianProvider.js.map +1 -1
- package/dist/components/LogicianProvider/LogicianProvider.mjs +16 -6
- package/dist/components/LogicianProvider/LogicianProvider.mjs.map +1 -1
- package/dist/components/Menu/MenuItem.d.ts.map +1 -1
- package/dist/components/Menu/MenuItem.js +10 -6
- package/dist/components/Menu/MenuItem.js.map +1 -1
- package/dist/components/Menu/MenuItem.mjs +10 -6
- package/dist/components/Menu/MenuItem.mjs.map +1 -1
- package/dist/components/Menu/MenuList.js +1 -1
- package/dist/components/Menu/MenuList.js.map +1 -1
- package/dist/components/Menu/MenuList.mjs +1 -1
- package/dist/components/Menu/MenuList.mjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/Modal.mjs +2 -2
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Modal/Modal.types.d.ts +12 -0
- package/dist/components/Modal/Modal.types.d.ts.map +1 -1
- package/dist/components/Modal/ModalContext.d.ts +2 -0
- package/dist/components/Modal/ModalContext.d.ts.map +1 -1
- package/dist/components/Modal/ModalContext.js +1 -0
- package/dist/components/Modal/ModalContext.js.map +1 -1
- package/dist/components/Modal/ModalContext.mjs +1 -0
- package/dist/components/Modal/ModalContext.mjs.map +1 -1
- package/dist/components/Modal/ModalHeader.d.ts +20 -1
- package/dist/components/Modal/ModalHeader.d.ts.map +1 -1
- package/dist/components/Modal/ModalHeader.js +46 -2
- package/dist/components/Modal/ModalHeader.js.map +1 -1
- package/dist/components/Modal/ModalHeader.mjs +47 -3
- package/dist/components/Modal/ModalHeader.mjs.map +1 -1
- package/dist/components/Modal/index.d.ts +2 -2
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/MonthPicker/MonthButton/MonthButton.d.ts.map +1 -1
- package/dist/components/MonthPicker/MonthButton/MonthButton.js +10 -9
- package/dist/components/MonthPicker/MonthButton/MonthButton.js.map +1 -1
- package/dist/components/MonthPicker/MonthButton/MonthButton.mjs +10 -9
- package/dist/components/MonthPicker/MonthButton/MonthButton.mjs.map +1 -1
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/Pagination.mjs +1 -1
- package/dist/components/Pagination/Pagination.mjs.map +1 -1
- package/dist/components/PinInput/PinInput.d.ts.map +1 -1
- package/dist/components/PinInput/PinInput.js +5 -1
- package/dist/components/PinInput/PinInput.js.map +1 -1
- package/dist/components/PinInput/PinInput.mjs +5 -1
- package/dist/components/PinInput/PinInput.mjs.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.mjs +1 -1
- package/dist/components/RadialProgress/RadialProgress.d.ts.map +1 -1
- package/dist/components/RadialProgress/RadialProgress.js +4 -7
- package/dist/components/RadialProgress/RadialProgress.js.map +1 -1
- package/dist/components/RadialProgress/RadialProgress.mjs +4 -7
- package/dist/components/RadialProgress/RadialProgress.mjs.map +1 -1
- package/dist/components/RadialProgress/RadialProgress.types.d.ts +1 -1
- package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
- package/dist/components/Radio/RadioControl.d.ts.map +1 -1
- package/dist/components/Radio/RadioControl.js +26 -5
- package/dist/components/Radio/RadioControl.js.map +1 -1
- package/dist/components/Radio/RadioControl.mjs +26 -5
- package/dist/components/Radio/RadioControl.mjs.map +1 -1
- package/dist/components/Radio/RadioGroup.js +1 -1
- package/dist/components/Radio/RadioGroup.js.map +1 -1
- package/dist/components/Radio/RadioGroup.mjs +1 -1
- package/dist/components/Radio/RadioGroup.mjs.map +1 -1
- package/dist/components/SeeMoreButton/SeeMoreButton.d.ts.map +1 -1
- package/dist/components/SeeMoreButton/SeeMoreButton.js +8 -3
- package/dist/components/SeeMoreButton/SeeMoreButton.js.map +1 -1
- package/dist/components/SeeMoreButton/SeeMoreButton.mjs +8 -3
- package/dist/components/SeeMoreButton/SeeMoreButton.mjs.map +1 -1
- package/dist/components/SeeMoreButton/SeeMoreButton.styles.d.ts +20 -10
- package/dist/components/SeeMoreButton/SeeMoreButton.styles.d.ts.map +1 -1
- package/dist/components/SeeMoreButton/SeeMoreButton.styles.js +13 -5
- package/dist/components/SeeMoreButton/SeeMoreButton.styles.js.map +1 -1
- package/dist/components/SeeMoreButton/SeeMoreButton.styles.mjs +13 -5
- package/dist/components/SeeMoreButton/SeeMoreButton.styles.mjs.map +1 -1
- package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +6 -2
- package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
- package/dist/components/Select/Select.styles.d.ts +13 -12
- package/dist/components/Select/Select.styles.d.ts.map +1 -1
- package/dist/components/Select/Select.styles.js +20 -14
- package/dist/components/Select/Select.styles.js.map +1 -1
- package/dist/components/Select/Select.styles.mjs +20 -14
- package/dist/components/Select/Select.styles.mjs.map +1 -1
- package/dist/components/Slider/SliderThumb/SliderThumb.js +1 -1
- package/dist/components/Slider/SliderThumb/SliderThumb.js.map +1 -1
- package/dist/components/Slider/SliderThumb/SliderThumb.mjs +1 -1
- package/dist/components/Slider/SliderThumb/SliderThumb.mjs.map +1 -1
- package/dist/components/Slider/SliderThumbs/SliderThumbs.js +1 -1
- package/dist/components/Slider/SliderThumbs/SliderThumbs.js.map +1 -1
- package/dist/components/Slider/SliderThumbs/SliderThumbs.mjs +1 -1
- package/dist/components/Slider/SliderThumbs/SliderThumbs.mjs.map +1 -1
- package/dist/components/Switch/SwitchControl.d.ts.map +1 -1
- package/dist/components/Switch/SwitchControl.js +8 -2
- package/dist/components/Switch/SwitchControl.js.map +1 -1
- package/dist/components/Switch/SwitchControl.mjs +8 -2
- package/dist/components/Switch/SwitchControl.mjs.map +1 -1
- package/dist/components/Table/Table.types.d.ts +1 -1
- package/dist/components/Tabs/Tab/Tab.d.ts.map +1 -1
- package/dist/components/Tabs/Tab/Tab.js +1 -1
- package/dist/components/Tabs/Tab/Tab.js.map +1 -1
- package/dist/components/Tabs/Tab/Tab.mjs +1 -1
- package/dist/components/Tabs/Tab/Tab.mjs.map +1 -1
- package/dist/components/Tabs/Tab/Tab.styles.d.ts +10 -12
- package/dist/components/Tabs/Tab/Tab.styles.d.ts.map +1 -1
- package/dist/components/Tabs/Tab/Tab.styles.js +8 -10
- package/dist/components/Tabs/Tab/Tab.styles.js.map +1 -1
- package/dist/components/Tabs/Tab/Tab.styles.mjs +8 -10
- package/dist/components/Tabs/Tab/Tab.styles.mjs.map +1 -1
- package/dist/components/Tag/Tag.d.ts.map +1 -1
- package/dist/components/Tag/Tag.js +41 -14
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Tag/Tag.mjs +43 -16
- package/dist/components/Tag/Tag.mjs.map +1 -1
- package/dist/components/Tag/Tag.styles.d.ts +55 -17
- package/dist/components/Tag/Tag.styles.d.ts.map +1 -1
- package/dist/components/Tag/Tag.styles.js +148 -128
- package/dist/components/Tag/Tag.styles.js.map +1 -1
- package/dist/components/Tag/Tag.styles.mjs +145 -126
- package/dist/components/Tag/Tag.styles.mjs.map +1 -1
- package/dist/components/Tag/Tag.types.d.ts +50 -29
- package/dist/components/Tag/Tag.types.d.ts.map +1 -1
- package/dist/components/Tag/TagCloseButton/TagCloseButton.d.ts +5 -0
- package/dist/components/Tag/TagCloseButton/TagCloseButton.d.ts.map +1 -1
- package/dist/components/Tag/TagCloseButton/TagCloseButton.js +7 -1
- package/dist/components/Tag/TagCloseButton/TagCloseButton.js.map +1 -1
- package/dist/components/Tag/TagCloseButton/TagCloseButton.mjs +7 -1
- package/dist/components/Tag/TagCloseButton/TagCloseButton.mjs.map +1 -1
- package/dist/components/Tag/index.d.ts +3 -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 +12 -10
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/Textarea.mjs +12 -10
- package/dist/components/Textarea/Textarea.mjs.map +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Toast/Toast.mjs +1 -1
- package/dist/components/Toast/Toast.styles.d.ts +5 -3
- package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
- package/dist/components/Toast/Toast.styles.js +54 -35
- package/dist/components/Toast/Toast.styles.js.map +1 -1
- package/dist/components/Toast/Toast.styles.mjs +54 -35
- package/dist/components/Toast/Toast.styles.mjs.map +1 -1
- package/dist/components/Toast/Toast.types.d.ts +8 -1
- package/dist/components/Toast/Toast.types.d.ts.map +1 -1
- package/dist/components/Toast/ToastIcon/ToastIcon.d.ts.map +1 -1
- package/dist/components/Toast/ToastIcon/ToastIcon.js +6 -4
- package/dist/components/Toast/ToastIcon/ToastIcon.js.map +1 -1
- package/dist/components/Toast/ToastIcon/ToastIcon.mjs +6 -4
- package/dist/components/Toast/ToastIcon/ToastIcon.mjs.map +1 -1
- package/dist/components/Toast/Toaster.d.ts.map +1 -1
- package/dist/components/Toast/Toaster.js +12 -1
- package/dist/components/Toast/Toaster.js.map +1 -1
- package/dist/components/Toast/Toaster.mjs +12 -1
- package/dist/components/Toast/Toaster.mjs.map +1 -1
- package/dist/components/Toast/useToast.d.ts +2 -2
- package/dist/components/Toast/useToast.d.ts.map +1 -1
- package/dist/components/Toast/useToast.js +42 -8
- package/dist/components/Toast/useToast.js.map +1 -1
- package/dist/components/Toast/useToast.mjs +43 -9
- package/dist/components/Toast/useToast.mjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.mjs +2 -2
- package/dist/components/Tooltip/Tooltip.mjs.map +1 -1
- package/dist/components/Tree/TreeBranchControl.js +1 -1
- package/dist/components/Tree/TreeBranchControl.js.map +1 -1
- package/dist/components/Tree/TreeBranchControl.mjs +1 -1
- package/dist/components/Tree/TreeBranchControl.mjs.map +1 -1
- package/dist/components/Tree/TreeItem.js +1 -1
- package/dist/components/Tree/TreeItem.js.map +1 -1
- package/dist/components/Tree/TreeItem.mjs +1 -1
- package/dist/components/Tree/TreeItem.mjs.map +1 -1
- package/dist/components/Typography/Caption.js +5 -5
- package/dist/components/Typography/Caption.js.map +1 -1
- package/dist/components/Typography/Caption.mjs +5 -5
- package/dist/components/Typography/Caption.mjs.map +1 -1
- package/dist/components/Typography/Link.d.ts +10 -16
- package/dist/components/Typography/Link.d.ts.map +1 -1
- package/dist/components/Typography/Link.js +24 -29
- package/dist/components/Typography/Link.js.map +1 -1
- package/dist/components/Typography/Link.mjs +24 -29
- package/dist/components/Typography/Link.mjs.map +1 -1
- package/dist/components/Typography/Overline.js +2 -2
- package/dist/components/Typography/Overline.js.map +1 -1
- package/dist/components/Typography/Overline.mjs +2 -2
- package/dist/components/Typography/Overline.mjs.map +1 -1
- package/dist/components/Workflow/Workflow.js +1 -1
- package/dist/components/Workflow/Workflow.js.map +1 -1
- package/dist/components/Workflow/Workflow.mjs +1 -1
- package/dist/components/Workflow/Workflow.mjs.map +1 -1
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.d.ts.map +1 -1
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.js +7 -6
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.js.map +1 -1
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.mjs +7 -6
- package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.mjs.map +1 -1
- package/dist/components/Workflow/canvas/Canvas/Canvas.js +8 -8
- package/dist/components/Workflow/canvas/Canvas/Canvas.js.map +1 -1
- package/dist/components/Workflow/canvas/Canvas/Canvas.mjs +8 -8
- package/dist/components/Workflow/canvas/Canvas/Canvas.mjs.map +1 -1
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.d.ts +2 -2
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.d.ts.map +1 -1
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.js +13 -12
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.js.map +1 -1
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.mjs +13 -12
- package/dist/components/Workflow/canvas/Canvas/Canvas.styles.mjs.map +1 -1
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.js +1 -1
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.js.map +1 -1
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.mjs +1 -1
- package/dist/components/Workflow/canvas/Canvas/LabeledEdge.mjs.map +1 -1
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.js +1 -1
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.js.map +1 -1
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.mjs +1 -1
- package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.mjs.map +1 -1
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.d.ts.map +1 -1
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.js +1 -1
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.js.map +1 -1
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.mjs +1 -1
- package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.mjs.map +1 -1
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.js +2 -2
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.js.map +1 -1
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.mjs +2 -2
- package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.mjs.map +1 -1
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.js +5 -4
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.js.map +1 -1
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.mjs +5 -4
- package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.mjs.map +1 -1
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.js +2 -2
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.js.map +1 -1
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.mjs +2 -2
- package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.mjs.map +1 -1
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.js.map +1 -1
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.mjs +1 -1
- package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.mjs.map +1 -1
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.js +1 -1
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.js.map +1 -1
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.mjs +1 -1
- package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.mjs.map +1 -1
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.d.ts +11 -3
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.d.ts.map +1 -1
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.js +29 -13
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.js.map +1 -1
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.mjs +29 -13
- package/dist/components/Workflow/canvas/IconTile/IconTile.styles.mjs.map +1 -1
- package/dist/components/Workflow/canvas/IssueList/IssueList.js +2 -2
- package/dist/components/Workflow/canvas/IssueList/IssueList.js.map +1 -1
- package/dist/components/Workflow/canvas/IssueList/IssueList.mjs +2 -2
- package/dist/components/Workflow/canvas/IssueList/IssueList.mjs.map +1 -1
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.d.ts.map +1 -1
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.js +2 -2
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.js.map +1 -1
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.mjs +2 -2
- package/dist/components/Workflow/canvas/NodePalette/NodePalette.mjs.map +1 -1
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.d.ts.map +1 -1
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.js +1 -1
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.js.map +1 -1
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.mjs +1 -1
- package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.mjs.map +1 -1
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.d.ts.map +1 -1
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.js +42 -32
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.js.map +1 -1
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.mjs +42 -32
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.mjs.map +1 -1
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.d.ts +9 -4
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.d.ts.map +1 -1
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.js +8 -8
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.js.map +1 -1
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.mjs +7 -7
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.mjs.map +1 -1
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.types.d.ts +2 -0
- package/dist/components/Workflow/canvas/NodeShell/NodeShell.types.d.ts.map +1 -1
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.d.ts +5 -4
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.d.ts.map +1 -1
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.js +1 -1
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.js.map +1 -1
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.mjs +1 -1
- package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.mjs.map +1 -1
- package/dist/components/Workflow/canvas/colorVar.d.ts +20 -0
- package/dist/components/Workflow/canvas/colorVar.d.ts.map +1 -0
- package/dist/components/Workflow/canvas/colorVar.js +32 -0
- package/dist/components/Workflow/canvas/colorVar.js.map +1 -0
- package/dist/components/Workflow/canvas/colorVar.mjs +29 -0
- package/dist/components/Workflow/canvas/colorVar.mjs.map +1 -0
- package/dist/components/Workflow/canvas/issueSeverity.d.ts +6 -4
- package/dist/components/Workflow/canvas/issueSeverity.d.ts.map +1 -1
- package/dist/components/Workflow/canvas/issueSeverity.js +6 -4
- package/dist/components/Workflow/canvas/issueSeverity.js.map +1 -1
- package/dist/components/Workflow/canvas/issueSeverity.mjs +6 -4
- package/dist/components/Workflow/canvas/issueSeverity.mjs.map +1 -1
- package/dist/components/Workflow/canvas/workflowLabelProps.d.ts +1 -1
- package/dist/components/Workflow/canvas/workflowLabelProps.js +1 -1
- package/dist/components/Workflow/canvas/workflowLabelProps.mjs +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -8
- package/dist/index.mjs.map +1 -1
- package/dist/theme/colors.d.ts +43 -1139
- package/dist/theme/colors.d.ts.map +1 -1
- package/dist/theme/colors.js +336 -760
- package/dist/theme/colors.js.map +1 -1
- package/dist/theme/colors.mjs +334 -761
- package/dist/theme/colors.mjs.map +1 -1
- package/dist/theme/deprecatedColorTokens.json.js +69 -0
- package/dist/theme/deprecatedColorTokens.json.js.map +1 -0
- package/dist/theme/deprecatedColorTokens.json.mjs +64 -0
- package/dist/theme/deprecatedColorTokens.json.mjs.map +1 -0
- package/dist/theme/global.d.ts +3 -2
- package/dist/theme/global.d.ts.map +1 -1
- package/dist/theme/global.js +12 -18
- package/dist/theme/global.js.map +1 -1
- package/dist/theme/global.mjs +12 -18
- package/dist/theme/global.mjs.map +1 -1
- package/dist/theme/index.d.ts +34 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +143 -81
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +144 -84
- package/dist/theme/index.mjs.map +1 -1
- package/dist/theme/palette.generated.d.ts +887 -0
- package/dist/theme/palette.generated.d.ts.map +1 -0
- package/dist/theme/palette.generated.js +898 -0
- package/dist/theme/palette.generated.js.map +1 -0
- package/dist/theme/palette.generated.mjs +893 -0
- package/dist/theme/palette.generated.mjs.map +1 -0
- package/dist/theme/paletteSwatches.d.ts +22 -0
- package/dist/theme/paletteSwatches.d.ts.map +1 -0
- package/dist/theme/recipes/table.js +2 -2
- package/dist/theme/recipes/table.js.map +1 -1
- package/dist/theme/recipes/table.mjs +2 -2
- package/dist/theme/recipes/table.mjs.map +1 -1
- package/dist/utils/disabledControl.d.ts +27 -0
- package/dist/utils/disabledControl.d.ts.map +1 -0
- package/dist/utils/disabledControl.js +33 -0
- package/dist/utils/disabledControl.js.map +1 -0
- package/dist/utils/disabledControl.mjs +30 -0
- package/dist/utils/disabledControl.mjs.map +1 -0
- package/dist/utils/focusRing.d.ts +7 -1
- package/dist/utils/focusRing.d.ts.map +1 -1
- package/dist/utils/focusRing.js +8 -1
- package/dist/utils/focusRing.js.map +1 -1
- package/dist/utils/focusRing.mjs +8 -2
- package/dist/utils/focusRing.mjs.map +1 -1
- package/dist/utils/isDev.d.ts +22 -0
- package/dist/utils/isDev.d.ts.map +1 -0
- package/dist/utils/isDev.js +34 -0
- package/dist/utils/isDev.js.map +1 -0
- package/dist/utils/isDev.mjs +32 -0
- package/dist/utils/isDev.mjs.map +1 -0
- package/eslint/index.js +28 -0
- package/eslint/rules/no-deprecated-tokens.js +128 -0
- package/eslint/rules/no-deprecated-tokens.test.ts +130 -0
- package/package.json +16 -7
- package/src/components/Accordion/Accordion.stories.tsx +20 -12
- package/src/components/Appear/Appear.stories.tsx +6 -13
- package/src/components/Avatar/Avatar.hue.test.ts +67 -0
- package/src/components/Avatar/Avatar.stories.tsx +79 -23
- package/src/components/Avatar/Avatar.tsx +56 -2
- package/src/components/Avatar/index.tsx +1 -1
- package/src/components/Badge/Badge.stories.tsx +24 -50
- package/src/components/Badge/Badge.styles.ts +56 -50
- package/src/components/Badge/Badge.tsx +11 -7
- package/src/components/Badge/Badge.types.ts +18 -14
- package/src/components/Badge/index.ts +7 -1
- package/src/components/Banner/Banner.stories.tsx +10 -3
- package/src/components/Banner/Banner.styles.ts +43 -27
- package/src/components/Banner/Banner.types.ts +1 -1
- package/src/components/BottomSheet/BottomSheet.stories.tsx +3 -4
- package/src/components/BottomSheet/BottomSheetCloseButton.tsx +0 -1
- package/src/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.tsx +1 -1
- package/src/components/Button/Button.legacy.ts +180 -0
- package/src/components/Button/Button.lift.test.tsx +6 -14
- package/src/components/Button/Button.press.test.tsx +20 -15
- package/src/components/Button/Button.stories.tsx +122 -352
- package/src/components/Button/Button.styles.ts +145 -397
- package/src/components/Button/Button.tsx +49 -17
- package/src/components/Button/Button.types.ts +50 -37
- package/src/components/Button/Button.variants.test.tsx +149 -0
- package/src/components/Button/index.tsx +2 -0
- package/src/components/Card/Card.styles.ts +6 -13
- package/src/components/Card/Card.tsx +1 -6
- package/src/components/Card/Card.types.ts +1 -5
- package/src/components/Checkbox/CheckboxControl.tsx +17 -10
- package/src/components/Chip/Chip.stories.tsx +17 -230
- package/src/components/Chip/Chip.tsx +40 -24
- package/src/components/Chip/Chip.types.ts +38 -26
- package/src/components/Chip/index.ts +0 -6
- package/src/components/Code/Code.tsx +2 -3
- package/src/components/CodeTabs/CodeTabs.contrast.test.tsx +109 -0
- package/src/components/CodeTabs/CodeTabs.styles.ts +26 -0
- package/src/components/CodeTabs/CodeTabs.tsx +16 -4
- package/src/components/CodeTabs/CopyButton.tsx +6 -4
- package/src/components/Confetti/Confetti.stories.tsx +1 -1
- package/src/components/Confetti/Confetti.tsx +8 -43
- package/src/components/Confetti/confettiColors.test.ts +47 -0
- package/src/components/Confetti/confettiColors.ts +41 -0
- package/src/components/Container/Container.stories.tsx +1 -1
- package/src/components/CopyableCode/CopyableCode.tsx +1 -2
- package/src/components/CountBadge/CountBadge.stories.tsx +109 -0
- package/src/components/CountBadge/CountBadge.styles.ts +40 -0
- package/src/components/CountBadge/CountBadge.test.tsx +57 -0
- package/src/components/CountBadge/CountBadge.tsx +112 -0
- package/src/components/CountBadge/CountBadge.types.ts +34 -0
- package/src/components/CountBadge/index.ts +2 -0
- package/src/components/DatePicker/RangeDatePicker.tsx +8 -8
- package/src/components/DatePicker/SingleDatePicker.tsx +5 -5
- package/src/components/ErrorFallback/ErrorFallback.lift.test.tsx +45 -0
- package/src/components/ErrorFallback/ErrorFallback.tsx +16 -31
- package/src/components/ExpandableText/ExpandableText.tsx +1 -1
- package/src/components/FileItem/FileItem.tsx +1 -4
- package/src/components/FlyTo/FlyTo.stories.tsx +6 -1
- package/src/components/Form/FieldError/FieldError.tsx +2 -2
- package/src/components/Form/FormFooter/FormFooter.stories.tsx +4 -4
- package/src/components/Form/FormModalFooter/FormModalFooter.tsx +5 -6
- package/src/components/Form/FormSection/FormSection.stories.tsx +1 -1
- package/src/components/FormIntegration/FormIntegration.stories.tsx +4 -4
- package/src/components/FormLabel/FormLabel.tsx +1 -1
- package/src/components/Icon/ICON_MANAGEMENT.md +7 -7
- package/src/components/Icon/Icon.stories.tsx +220 -116
- package/src/components/Icon/_utils/createIcon.tsx +2 -2
- package/src/components/Icon/_utils/createIconGroup.tsx +1 -1
- package/src/components/IconButton/IconButton.stories.tsx +63 -216
- package/src/components/IconButton/IconButton.styles.ts +104 -27
- package/src/components/IconButton/IconButton.tsx +39 -12
- package/src/components/IconButton/IconButton.types.ts +30 -20
- package/src/components/IconButton/index.tsx +1 -0
- package/src/components/InlineCode/InlineCode.tsx +6 -6
- package/src/components/Input/Input.stories.tsx +10 -10
- package/src/components/Input/Input.tsx +12 -10
- package/src/components/LineGraph/LineGraph.tsx +24 -6
- package/src/components/LineGraph/seriesColors.test.ts +40 -0
- package/src/components/LineGraph/seriesColors.ts +42 -0
- package/src/components/Loaders/LoaderStatus.tsx +25 -0
- package/src/components/Loaders/Loaders.styles.ts +28 -0
- package/src/components/Loaders/Loaders.test.tsx +63 -0
- package/src/components/Loaders/Loaders.translations.json +9 -0
- package/src/components/Loaders/PageLoader.stories.tsx +15 -1
- package/src/components/Loaders/PageLoader.tsx +28 -4
- package/src/components/Loaders/SectionLoader.stories.tsx +10 -3
- package/src/components/Loaders/SectionLoader.tsx +16 -3
- package/src/components/Loaders/ThinkingDots.tsx +27 -0
- package/src/components/Loaders/index.ts +2 -1
- package/src/components/LogicianProvider/LogicianProvider.stories.tsx +28 -43
- package/src/components/LogicianProvider/LogicianProvider.tsx +35 -5
- package/src/components/Masonry/Masonry.stories.tsx +17 -5
- package/src/components/Menu/Menu.stories.tsx +58 -20
- package/src/components/Menu/MenuItem.highlight.test.tsx +72 -0
- package/src/components/Menu/MenuItem.tsx +9 -6
- package/src/components/Menu/MenuList.tsx +1 -1
- package/src/components/Modal/Modal.stories.tsx +76 -25
- package/src/components/Modal/Modal.tsx +5 -1
- package/src/components/Modal/Modal.types.ts +13 -0
- package/src/components/Modal/ModalContext.ts +4 -0
- package/src/components/Modal/ModalHeader.a11y.test.tsx +51 -0
- package/src/components/Modal/ModalHeader.tsx +73 -3
- package/src/components/Modal/index.tsx +2 -2
- package/src/components/MonthPicker/MonthButton/MonthButton.tsx +9 -14
- package/src/components/MonthPicker/MonthPicker.stories.tsx +13 -9
- package/src/components/Pagination/Pagination.stories.tsx +5 -6
- package/src/components/Pagination/Pagination.tsx +0 -2
- package/src/components/PinInput/PinInput.tsx +9 -5
- package/src/components/Popover/Popover.stories.tsx +5 -5
- package/src/components/ProgressBar/ProgressBar.tsx +1 -1
- package/src/components/Pulse/Pulse.stories.tsx +1 -1
- package/src/components/RadialProgress/RadialProgress.tsx +4 -7
- package/src/components/RadialProgress/RadialProgress.types.ts +1 -1
- package/src/components/Radio/Radio.stories.tsx +1 -1
- package/src/components/Radio/RadioControl.indicator.test.tsx +72 -0
- package/src/components/Radio/RadioControl.tsx +34 -6
- package/src/components/Radio/RadioGroup.tsx +1 -1
- package/src/components/Reveal/Reveal.stories.tsx +5 -1
- package/src/components/ScaledContext/ScaledContext.stories.tsx +21 -14
- package/src/components/SeeMoreButton/SeeMoreButton.border.test.tsx +51 -0
- package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +8 -0
- package/src/components/SeeMoreButton/SeeMoreButton.styles.ts +14 -6
- package/src/components/SeeMoreButton/SeeMoreButton.tsx +11 -2
- package/src/components/SeeMoreButton/SeeMoreButton.types.ts +9 -2
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +48 -31
- package/src/components/Select/Combobox.stories.tsx +1 -1
- package/src/components/Select/Comparison.stories.tsx +1 -1
- package/src/components/Select/Select.stories.tsx +22 -22
- package/src/components/Select/Select.styles.ts +20 -14
- package/src/components/Shake/Shake.stories.tsx +10 -12
- package/src/components/Slider/Slider.stories.tsx +43 -9
- package/src/components/Slider/SliderThumb/SliderThumb.tsx +1 -1
- package/src/components/Slider/SliderThumbs/SliderThumbs.tsx +1 -1
- package/src/components/SwapTransition/SwapTransition.stories.tsx +3 -4
- package/src/components/Switch/SwitchControl.tsx +8 -0
- package/src/components/Table/Table.stories.tsx +36 -20
- package/src/components/Table/Table.types.ts +1 -1
- package/src/components/Tabs/Tab/Tab.styles.ts +8 -10
- package/src/components/Tabs/Tab/Tab.tsx +1 -0
- package/src/components/Tabs/Tabs.stories.tsx +38 -26
- package/src/components/Tag/Tag.legacy.test.tsx +179 -0
- package/src/components/Tag/Tag.stories.tsx +107 -148
- package/src/components/Tag/Tag.styles.ts +186 -135
- package/src/components/Tag/Tag.test.tsx +115 -0
- package/src/components/Tag/Tag.tsx +103 -21
- package/src/components/Tag/Tag.types.ts +52 -29
- package/src/components/Tag/TagCloseButton/TagCloseButton.tsx +19 -1
- package/src/components/Tag/index.ts +5 -3
- package/src/components/Textarea/Textarea.stories.tsx +6 -1
- package/src/components/Textarea/Textarea.tsx +13 -11
- package/src/components/Toast/Toast.action.test.tsx +13 -0
- package/src/components/Toast/Toast.stories.tsx +17 -7
- package/src/components/Toast/Toast.styles.ts +54 -35
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/Toast/Toast.types.ts +9 -1
- package/src/components/Toast/Toast.update.test.tsx +124 -0
- package/src/components/Toast/ToastIcon/ToastIcon.tsx +6 -4
- package/src/components/Toast/Toaster.tsx +14 -2
- package/src/components/Toast/useToast.tsx +54 -14
- package/src/components/Tooltip/Tooltip.stories.tsx +12 -12
- package/src/components/Tooltip/Tooltip.tsx +2 -2
- package/src/components/Tree/Tree.GuideElbow.stories.tsx +2 -2
- package/src/components/Tree/TreeBranchControl.tsx +1 -1
- package/src/components/Tree/TreeBranchIndentGuide.test.tsx +2 -2
- package/src/components/Tree/TreeItem.tsx +1 -1
- package/src/components/Typography/Caption.tsx +5 -5
- package/src/components/Typography/Link.tsx +27 -29
- package/src/components/Typography/Overline.tsx +2 -2
- package/src/components/Workflow/README.md +58 -52
- package/src/components/Workflow/Workflow.translations.json +1 -1
- package/src/components/Workflow/Workflow.tsx +1 -1
- package/src/components/Workflow/canvas/Canvas/BranchLabelBadge.tsx +7 -6
- package/src/components/Workflow/canvas/Canvas/Canvas.styles.ts +14 -12
- package/src/components/Workflow/canvas/Canvas/Canvas.tsx +9 -9
- package/src/components/Workflow/canvas/Canvas/LabeledEdge.tsx +2 -2
- package/src/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.tsx +4 -4
- package/src/components/Workflow/canvas/DrawerShell/DrawerHeader.tsx +2 -4
- package/src/components/Workflow/canvas/DrawerShell/DrawerIssues.tsx +2 -2
- package/src/components/Workflow/canvas/DrawerShell/DrawerShell.tsx +6 -6
- package/src/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.tsx +4 -4
- package/src/components/Workflow/canvas/FieldWrapper/FieldWrapper.tsx +2 -2
- package/src/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.tsx +12 -12
- package/src/components/Workflow/canvas/IconTile/IconTile.styles.ts +29 -13
- package/src/components/Workflow/canvas/IssueList/IssueList.tsx +3 -3
- package/src/components/Workflow/canvas/NodePalette/NodePalette.tsx +6 -7
- package/src/components/Workflow/canvas/NodePalette/NodePaletteToggle.tsx +1 -2
- package/src/components/Workflow/canvas/NodeShell/NodeShell.styles.ts +6 -8
- package/src/components/Workflow/canvas/NodeShell/NodeShell.test.tsx +79 -0
- package/src/components/Workflow/canvas/NodeShell/NodeShell.tsx +46 -37
- package/src/components/Workflow/canvas/NodeShell/NodeShell.types.ts +2 -0
- package/src/components/Workflow/canvas/SeverityDot/SeverityDot.tsx +6 -5
- package/src/components/Workflow/canvas/canvasStroke.test.ts +84 -0
- package/src/components/Workflow/canvas/colorVar.ts +26 -0
- package/src/components/Workflow/canvas/issueSeverity.ts +7 -5
- package/src/components/Workflow/canvas/workflowLabelProps.ts +1 -1
- package/src/components/Workflow/stories/Workflow.stories.tsx +4 -5
- package/src/components/a11y.kwcag.test.tsx +64 -83
- package/src/components/claude.md +40 -58
- package/src/components/noRawScales.test.ts +152 -0
- package/src/components/noSandBackground.test.ts +282 -0
- package/src/index.ts +18 -1
- package/src/stories/SizeComparison.stories.tsx +1 -1
- package/src/theme/BazePalette.stories.tsx +202 -0
- package/src/theme/Borders.stories.tsx +9 -9
- package/src/theme/Motion.stories.tsx +19 -19
- package/src/theme/MotionCases.stories.tsx +1 -1
- package/src/theme/Palette.stories.tsx +101 -515
- package/src/theme/SemanticTokens.mdx +61 -242
- package/src/theme/Surfaces.stories.tsx +3 -3
- package/src/theme/chakraTokens.test.ts +115 -0
- package/src/theme/claude.md +111 -502
- package/src/theme/colors.ts +403 -822
- package/src/theme/contrast.test.ts +343 -0
- package/src/theme/cssVarNames.test.ts +36 -0
- package/src/theme/deprecatedColorTokens.json +95 -0
- package/src/theme/global.ts +12 -19
- package/src/theme/index.ts +154 -82
- package/src/theme/palette.generated.ts +893 -0
- package/src/theme/paletteSwatches.test.ts +42 -0
- package/src/theme/paletteSwatches.ts +80 -0
- package/src/theme/recipes/table.ts +2 -2
- package/src/utils/disabledControl.ts +27 -0
- package/src/utils/focusRing.ts +9 -2
- package/src/utils/isDev.test.ts +41 -0
- package/src/utils/isDev.ts +27 -0
- package/dist/components/Chip/Chip.styles.d.ts +0 -20
- package/dist/components/Chip/Chip.styles.d.ts.map +0 -1
- package/dist/components/Chip/Chip.styles.js +0 -143
- package/dist/components/Chip/Chip.styles.js.map +0 -1
- package/dist/components/Chip/Chip.styles.mjs +0 -137
- package/dist/components/Chip/Chip.styles.mjs.map +0 -1
- package/src/components/Chip/Chip.styles.ts +0 -147
package/src/theme/colors.ts
CHANGED
|
@@ -1,855 +1,436 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* BAZE color system — logician-ui 5.0.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* to create visually balanced color relationships. Each color scale follows a consistent
|
|
6
|
-
* lightness progression from 50 (lightest) to 900 (darkest).
|
|
4
|
+
* Three layers, and components only ever read the third:
|
|
7
5
|
*
|
|
8
|
-
*
|
|
6
|
+
* 1. **Raw scales** carry colour names. `ink.1–12` / `inkDark.1–12` (warm
|
|
7
|
+
* black), `sand.1–12` / `sandDark.1–12` (beige-brown), `slate.1–12` /
|
|
8
|
+
* `slateDark.1–12` (today's cool gray rebuilt on the same contrast targets),
|
|
9
|
+
* `coral.*`, and the 12 system hues (`red` … `brown`, each
|
|
10
|
+
* `{base, baseDark, hc, hcDark, surface, ink, surfaceDark, inkDark}`).
|
|
11
|
+
* The step number is the job (Radix-style): 1–3 backgrounds, 4–6 dividers
|
|
12
|
+
* and borders, 7 control border (3:1), 8 icon/placeholder (4.5:1), 9–11
|
|
13
|
+
* text, 12 maximum contrast.
|
|
14
|
+
* 2. **Semantic steps** carry role names: `neutral.1–12` and `secondary.1–12`.
|
|
15
|
+
* `createLogicianTheme({ neutral, secondary })` decides which raw scale fills
|
|
16
|
+
* them (default `ink` / `sand`).
|
|
17
|
+
* 3. **Semantic roles** — `bg.*`, `layer.*`, `fg.*`, `border.*`, `primary.*`,
|
|
18
|
+
* `secondary.*`, `action.*`, `send.*`, `count.*`, `disabled.*`, `focus.ring`,
|
|
19
|
+
* the four status families, `tooltip.*`, `category.{hue}.*`.
|
|
9
20
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* - `violet`: Secondary/accent - creative, distinctive
|
|
15
|
-
* - `gold`: Warning states - caution, attention
|
|
16
|
-
* - `gray`: Neutral tones with cool blue undertone (slate-based)
|
|
21
|
+
* Every value comes from `palette.generated.ts` (see
|
|
22
|
+
* `scripts/palette/generate.mjs`), which ports the designer-reviewed prototype
|
|
23
|
+
* and is pinned to it by `--check`. `contrast.test.ts` re-measures every
|
|
24
|
+
* registered fg/bg pair in light, dark and both high-contrast modes.
|
|
17
25
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* -
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* - `danger`: Error/destructive feedback (rose-based)
|
|
26
|
+
* High contrast follows `prefers-contrast: more`. Chakra cannot express
|
|
27
|
+
* "dark AND more-contrast" as one condition (nesting compiles to an invalid
|
|
28
|
+
* selector), so a token whose high-contrast value differs reads a per-mode
|
|
29
|
+
* helper — `scheme.light.<name>` / `scheme.dark.<name>`, each
|
|
30
|
+
* `{ base, _moreContrast }` — and only flips `_light`/`_dark` itself. Those
|
|
31
|
+
* helpers are internal; never reference them.
|
|
25
32
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* 3. **Consistent Scale**: Each color has 25/50/100/200/300/500/600/700/800/900 steps
|
|
31
|
-
* 4. **Light Mode Optimized**: Designed for light mode with semantic token flexibility
|
|
32
|
-
*
|
|
33
|
-
* @see https://www.w3.org/TR/WCAG21/#contrast-minimum
|
|
34
|
-
* @version 3.0.0
|
|
33
|
+
* The 4.x names (`primary.lightest`, `danger.main`, `slate.800`, …) stay as
|
|
34
|
+
* deprecated aliases of their 5.0 replacement — see
|
|
35
|
+
* `deprecatedColorTokens.json`, `MIGRATION-5.0.md` and the
|
|
36
|
+
* `no-deprecated-tokens` lint rule. They are removed in 6.0.
|
|
35
37
|
*/
|
|
38
|
+
import DEPRECATED from './deprecatedColorTokens.json';
|
|
39
|
+
import { CORAL, RAMPS, SCHEMES, SYSTEM_HUES } from './palette.generated';
|
|
36
40
|
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
* - `primary.*`: Buttons, links, focus states
|
|
42
|
-
* - `secondary.*`: Accent elements, highlights
|
|
43
|
-
* - `success.*`: Success messages, confirmations
|
|
44
|
-
* - `warning.*`: Warning messages, caution states
|
|
45
|
-
* - `danger.*`: Error messages, destructive actions
|
|
46
|
-
*
|
|
47
|
-
* Each category includes:
|
|
48
|
-
* - `lightest`: Lightest backgrounds (ghost states, very subtle fills)
|
|
49
|
-
* - `extralight`: Extra-light backgrounds (badges, subtle fills)
|
|
50
|
-
* - `lighter`: Light backgrounds (toast backgrounds, subtle fills)
|
|
51
|
-
* - `light`: Medium backgrounds (hover states, medium fills)
|
|
52
|
-
* - `main`: Primary color (buttons, text, icons)
|
|
53
|
-
* - `dark`: Dark variant (text on light backgrounds)
|
|
54
|
-
* - `darker`: Darkest variant (high-contrast text)
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```tsx
|
|
58
|
-
* <Button bgColor="primary.main" />
|
|
59
|
-
* <Alert bgColor="danger.lighter" color="danger.dark" />
|
|
60
|
-
* <Badge bgColor="success.lightest" color="success.dark" />
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
// The dark-mode neutral family now lives in `colors.grayDark` (see below) so
|
|
64
|
-
// consumers can retint dark surfaces by overriding a primitive scale — exactly
|
|
65
|
-
// like `blue.*` for the brand ramp — instead of these values being unreachable
|
|
66
|
-
// hex literals. Every dark-mode neutral in the semantic tokens (`slate.*`, and
|
|
67
|
-
// the `_dark` of `bg`/`fg`/`border`) references `{colors.grayDark.N}`.
|
|
41
|
+
/** Raw scale that fills `neutral.1–12` and every neutral role. */
|
|
42
|
+
export type NeutralScale = 'ink' | 'slate';
|
|
43
|
+
/** Raw scale that fills `secondary.1–12` and the secondary roles. */
|
|
44
|
+
export type SecondaryScale = 'sand';
|
|
68
45
|
|
|
69
|
-
export
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
* Light contrast ratios (on white):
|
|
76
|
-
* - main (#1751D0): 5.9:1 ✓ AA
|
|
77
|
-
* - dark (#0D317D): 9.4:1 ✓ AAA
|
|
78
|
-
*
|
|
79
|
-
* `_dark` lightens brand steps ~2 stops so interactive/text tokens keep
|
|
80
|
-
* AA contrast on dark surfaces (bg.canvas → gray.1500). Background tints
|
|
81
|
-
* (lightest/extralight/lighter/light) map to the deep end of the scale so
|
|
82
|
-
* brand-tinted fills read as subtle on dark, not as glare.
|
|
83
|
-
*/
|
|
84
|
-
primary: {
|
|
85
|
-
lightest: {
|
|
86
|
-
value: { base: '{colors.blue.25}', _dark: '{colors.blue.900}' },
|
|
87
|
-
},
|
|
88
|
-
extralight: {
|
|
89
|
-
value: { base: '{colors.blue.50}', _dark: '{colors.blue.800}' },
|
|
90
|
-
},
|
|
91
|
-
lighter: {
|
|
92
|
-
value: { base: '{colors.blue.100}', _dark: '{colors.blue.700}' },
|
|
93
|
-
},
|
|
94
|
-
light: {
|
|
95
|
-
value: { base: '{colors.blue.200}', _dark: '{colors.blue.600}' },
|
|
96
|
-
},
|
|
97
|
-
main: {
|
|
98
|
-
value: { base: '{colors.blue.500}', _dark: '{colors.blue.300}' },
|
|
99
|
-
}, // primary actions
|
|
100
|
-
dark: {
|
|
101
|
-
value: { base: '{colors.blue.700}', _dark: '{colors.blue.200}' },
|
|
102
|
-
}, // emphasis text
|
|
103
|
-
darker: {
|
|
104
|
-
value: { base: '{colors.blue.900}', _dark: '{colors.blue.100}' },
|
|
105
|
-
}, // high-contrast text
|
|
106
|
-
// Solid brand-blue *fills* for surfaces with white text/icons on top
|
|
107
|
-
// (modal headers, hero/banner gradients, brand badges). `primary.main`/
|
|
108
|
-
// `primary.dark` lighten ~2 stops in dark — right for foreground, too
|
|
109
|
-
// light as a fill — so these stay a deep blue in dark instead. `base`
|
|
110
|
-
// repeats the old main/dark values, so light is unchanged. Bare accents
|
|
111
|
-
// (dots, progress bars) keep `primary.main`.
|
|
112
|
-
fill: {
|
|
113
|
-
value: { base: '{colors.blue.500}', _dark: '{colors.blue.700}' },
|
|
114
|
-
},
|
|
115
|
-
fillStrong: {
|
|
116
|
-
value: { base: '{colors.blue.700}', _dark: '{colors.blue.800}' },
|
|
117
|
-
},
|
|
118
|
-
},
|
|
46
|
+
export interface LogicianColorOptions {
|
|
47
|
+
/** @default 'ink' (BAZE warm black). `'slate'` is the cool 4.x temperature. */
|
|
48
|
+
neutral?: NeutralScale;
|
|
49
|
+
/** @default 'sand' (BAZE beige-brown). */
|
|
50
|
+
secondary?: SecondaryScale;
|
|
51
|
+
}
|
|
119
52
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
lighter: {
|
|
136
|
-
value: { base: '{colors.violet.100}', _dark: '{colors.violet.700}' },
|
|
137
|
-
},
|
|
138
|
-
light: {
|
|
139
|
-
value: { base: '{colors.violet.200}', _dark: '{colors.violet.600}' },
|
|
140
|
-
},
|
|
141
|
-
main: {
|
|
142
|
-
// _dark is violet.200 (not .300 like the other brands): violet.300 on
|
|
143
|
-
// the dark canvas is only 4.29:1, just under AA. Solid fills no longer
|
|
144
|
-
// use *.main (they pin to violet.500), so main now only drives
|
|
145
|
-
// text/icon/outline on dark, where the extra lift is pure benefit.
|
|
146
|
-
value: { base: '{colors.violet.500}', _dark: '{colors.violet.200}' },
|
|
147
|
-
},
|
|
148
|
-
dark: {
|
|
149
|
-
value: { base: '{colors.violet.700}', _dark: '{colors.violet.200}' },
|
|
150
|
-
},
|
|
151
|
-
darker: {
|
|
152
|
-
value: { base: '{colors.violet.900}', _dark: '{colors.violet.100}' },
|
|
153
|
-
},
|
|
154
|
-
},
|
|
53
|
+
export const SYSTEM_HUE_NAMES = [
|
|
54
|
+
'red',
|
|
55
|
+
'orange',
|
|
56
|
+
'yellow',
|
|
57
|
+
'green',
|
|
58
|
+
'mint',
|
|
59
|
+
'teal',
|
|
60
|
+
'cyan',
|
|
61
|
+
'blue',
|
|
62
|
+
'indigo',
|
|
63
|
+
'purple',
|
|
64
|
+
'pink',
|
|
65
|
+
'brown',
|
|
66
|
+
] as const;
|
|
67
|
+
export type SystemHue = (typeof SYSTEM_HUE_NAMES)[number];
|
|
155
68
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
* Use for: Error states, destructive actions, validation errors
|
|
159
|
-
*
|
|
160
|
-
* Light contrast ratios (on white):
|
|
161
|
-
* - main (#C1232C): 5.9:1 ✓ AA
|
|
162
|
-
* - dark (#7D0D14): 9.6:1 ✓ AAA
|
|
163
|
-
*/
|
|
164
|
-
danger: {
|
|
165
|
-
lightest: {
|
|
166
|
-
value: { base: '{colors.rose.25}', _dark: '{colors.rose.900}' },
|
|
167
|
-
},
|
|
168
|
-
extralight: {
|
|
169
|
-
value: { base: '{colors.rose.50}', _dark: '{colors.rose.800}' },
|
|
170
|
-
},
|
|
171
|
-
lighter: {
|
|
172
|
-
value: { base: '{colors.rose.100}', _dark: '{colors.rose.700}' },
|
|
173
|
-
},
|
|
174
|
-
light: {
|
|
175
|
-
value: { base: '{colors.rose.200}', _dark: '{colors.rose.600}' },
|
|
176
|
-
},
|
|
177
|
-
main: {
|
|
178
|
-
value: { base: '{colors.rose.500}', _dark: '{colors.rose.300}' },
|
|
179
|
-
},
|
|
180
|
-
dark: {
|
|
181
|
-
value: { base: '{colors.rose.700}', _dark: '{colors.rose.200}' },
|
|
182
|
-
},
|
|
183
|
-
darker: {
|
|
184
|
-
value: { base: '{colors.rose.900}', _dark: '{colors.rose.100}' },
|
|
185
|
-
},
|
|
186
|
-
},
|
|
69
|
+
const STEPS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] as const;
|
|
70
|
+
type Step = (typeof STEPS)[number];
|
|
187
71
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
* Use for: Success messages, confirmations, positive feedback
|
|
191
|
-
*
|
|
192
|
-
* Light contrast ratios (on white):
|
|
193
|
-
* - main (#1AA612): 4.5:1 ✓ AA (large text)
|
|
194
|
-
* - dark (#147D0D): 6.1:1 ✓ AA
|
|
195
|
-
*/
|
|
196
|
-
success: {
|
|
197
|
-
lightest: {
|
|
198
|
-
value: { base: '{colors.green.25}', _dark: '{colors.green.900}' },
|
|
199
|
-
},
|
|
200
|
-
extralight: {
|
|
201
|
-
value: { base: '{colors.green.50}', _dark: '{colors.green.800}' },
|
|
202
|
-
},
|
|
203
|
-
lighter: {
|
|
204
|
-
value: { base: '{colors.green.100}', _dark: '{colors.green.700}' },
|
|
205
|
-
},
|
|
206
|
-
light: {
|
|
207
|
-
value: { base: '{colors.green.200}', _dark: '{colors.green.600}' },
|
|
208
|
-
},
|
|
209
|
-
main: {
|
|
210
|
-
value: { base: '{colors.green.600}', _dark: '{colors.green.300}' },
|
|
211
|
-
},
|
|
212
|
-
dark: {
|
|
213
|
-
value: { base: '{colors.green.700}', _dark: '{colors.green.200}' },
|
|
214
|
-
},
|
|
215
|
-
darker: {
|
|
216
|
-
value: { base: '{colors.green.900}', _dark: '{colors.green.100}' },
|
|
217
|
-
},
|
|
218
|
-
},
|
|
72
|
+
type TokenValue = { value: string };
|
|
73
|
+
type TokenTree = { [key: string]: TokenValue | TokenTree };
|
|
219
74
|
|
|
220
|
-
|
|
221
|
-
* Warning colors (Gold-based)
|
|
222
|
-
* Use for: Warning messages, caution states, attention needed
|
|
223
|
-
*
|
|
224
|
-
* Light contrast ratios (on white):
|
|
225
|
-
* - main (#D0A117): 3.0:1 (use dark on light backgrounds)
|
|
226
|
-
* - dark (#7D610D): 5.8:1 ✓ AA
|
|
227
|
-
*
|
|
228
|
-
* NOTE: gold is the AA risk in both modes — verify per-pair contrast in the
|
|
229
|
-
* Storybook palette before relying on `warning.main` for text.
|
|
230
|
-
*/
|
|
231
|
-
warning: {
|
|
232
|
-
lightest: {
|
|
233
|
-
value: { base: '{colors.gold.25}', _dark: '{colors.gold.900}' },
|
|
234
|
-
},
|
|
235
|
-
extralight: {
|
|
236
|
-
value: { base: '{colors.gold.50}', _dark: '{colors.gold.800}' },
|
|
237
|
-
},
|
|
238
|
-
lighter: {
|
|
239
|
-
value: { base: '{colors.gold.100}', _dark: '{colors.gold.700}' },
|
|
240
|
-
},
|
|
241
|
-
light: {
|
|
242
|
-
value: { base: '{colors.gold.200}', _dark: '{colors.gold.600}' },
|
|
243
|
-
},
|
|
244
|
-
main: {
|
|
245
|
-
value: { base: '{colors.gold.500}', _dark: '{colors.gold.300}' },
|
|
246
|
-
},
|
|
247
|
-
dark: {
|
|
248
|
-
value: { base: '{colors.gold.700}', _dark: '{colors.gold.200}' },
|
|
249
|
-
},
|
|
250
|
-
darker: {
|
|
251
|
-
value: { base: '{colors.gold.900}', _dark: '{colors.gold.100}' },
|
|
252
|
-
},
|
|
253
|
-
},
|
|
75
|
+
const v = (value: string): TokenValue => ({ value });
|
|
254
76
|
|
|
255
|
-
|
|
256
|
-
* `slate.*` — the foundational **mode-aware neutral family**.
|
|
257
|
-
*
|
|
258
|
-
* A first-class neutral palette alongside the raw `gray.*` primitives, but
|
|
259
|
-
* mode-aware: each `slate.N` resolves to `gray.N` in light and to the
|
|
260
|
-
* desaturated counterpart of the *mirrored* step in dark, so a single token
|
|
261
|
-
* carries the same tonal level in both modes (e.g. `slate.300` is a light
|
|
262
|
-
* divider in light and the equivalent dark divider in dark — no `_dark={{…}}`
|
|
263
|
-
* at the call site). It lives under `semanticTokens` only because Chakra
|
|
264
|
-
* requires that for the `_dark` flip; conceptually it is a *foundation*
|
|
265
|
-
* (a tonal scale), not a *role*.
|
|
266
|
-
*
|
|
267
|
-
* When to use which:
|
|
268
|
-
* - Prefer the **role tokens** (`fg`/`bg`/`border`) when one matches the
|
|
269
|
-
* intent — they carry semantics and AA-tuned dark values.
|
|
270
|
-
* - Reach for **`slate.N`** when you need a specific neutral tonal step that
|
|
271
|
-
* no role names (mirroring how you'd otherwise drop to a raw `gray.N`, but
|
|
272
|
-
* keeping the dark flip). `slate` and the role tokens are *distinct* ramps
|
|
273
|
-
* (slate is a mechanical mirror; roles are hand-tuned), so they are not
|
|
274
|
-
* interchangeable in dark mode.
|
|
275
|
-
*
|
|
276
|
-
* `600`/`700` are lifted off the straight mirror (#8E939F/#7C818D) so the
|
|
277
|
-
* secondary/muted text they most often carry clears WCAG AA 4.5:1 on the
|
|
278
|
-
* dark canvas/surface — the straight mirrors measured ~3.0–3.9 there.
|
|
279
|
-
*/
|
|
280
|
-
slate: {
|
|
281
|
-
0: {
|
|
282
|
-
value: { base: '{colors.gray.0}', _dark: '{colors.grayDark.1500}' },
|
|
283
|
-
},
|
|
284
|
-
50: {
|
|
285
|
-
value: { base: '{colors.gray.50}', _dark: '{colors.grayDark.1400}' },
|
|
286
|
-
},
|
|
287
|
-
100: {
|
|
288
|
-
value: { base: '{colors.gray.100}', _dark: '{colors.grayDark.1300}' },
|
|
289
|
-
},
|
|
290
|
-
200: {
|
|
291
|
-
value: { base: '{colors.gray.200}', _dark: '{colors.grayDark.1200}' },
|
|
292
|
-
},
|
|
293
|
-
300: {
|
|
294
|
-
value: { base: '{colors.gray.300}', _dark: '{colors.grayDark.1100}' },
|
|
295
|
-
},
|
|
296
|
-
400: {
|
|
297
|
-
value: { base: '{colors.gray.400}', _dark: '{colors.grayDark.1000}' },
|
|
298
|
-
},
|
|
299
|
-
500: {
|
|
300
|
-
value: { base: '{colors.gray.500}', _dark: '{colors.grayDark.900}' },
|
|
301
|
-
},
|
|
302
|
-
600: {
|
|
303
|
-
value: { base: '{colors.gray.600}', _dark: '{colors.grayDark.fg600}' },
|
|
304
|
-
},
|
|
305
|
-
700: {
|
|
306
|
-
value: { base: '{colors.gray.700}', _dark: '{colors.grayDark.fg700}' },
|
|
307
|
-
},
|
|
308
|
-
800: {
|
|
309
|
-
value: { base: '{colors.gray.800}', _dark: '{colors.grayDark.600}' },
|
|
310
|
-
},
|
|
311
|
-
900: {
|
|
312
|
-
value: { base: '{colors.gray.900}', _dark: '{colors.grayDark.500}' },
|
|
313
|
-
},
|
|
314
|
-
1000: {
|
|
315
|
-
value: { base: '{colors.gray.1000}', _dark: '{colors.grayDark.400}' },
|
|
316
|
-
},
|
|
317
|
-
1100: {
|
|
318
|
-
value: { base: '{colors.gray.1100}', _dark: '{colors.grayDark.300}' },
|
|
319
|
-
},
|
|
320
|
-
1200: {
|
|
321
|
-
value: { base: '{colors.gray.1200}', _dark: '{colors.grayDark.200}' },
|
|
322
|
-
},
|
|
323
|
-
1300: {
|
|
324
|
-
value: { base: '{colors.gray.1300}', _dark: '{colors.grayDark.100}' },
|
|
325
|
-
},
|
|
326
|
-
1400: {
|
|
327
|
-
value: { base: '{colors.gray.1400}', _dark: '{colors.grayDark.50}' },
|
|
328
|
-
},
|
|
329
|
-
1500: {
|
|
330
|
-
value: { base: '{colors.gray.1500}', _dark: '{colors.grayDark.0}' },
|
|
331
|
-
},
|
|
332
|
-
},
|
|
77
|
+
// ───────────────────────────── raw tokens ─────────────────────────────
|
|
333
78
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
* - inverse: high-contrast surface (flips to light in dark mode)
|
|
344
|
-
*/
|
|
345
|
-
bg: {
|
|
346
|
-
// Chakra's own global css paints `html { background: bg }` — the *plain*
|
|
347
|
-
// `bg` token, not `bg.canvas` — so this is the actual page background
|
|
348
|
-
// wherever no component paints over it. `_light` is pure white (Chakra's
|
|
349
|
-
// value, so light is untouched); `_dark` rejoins our neutral floor instead
|
|
350
|
-
// of Chakra's off-palette black.
|
|
351
|
-
DEFAULT: {
|
|
352
|
-
value: { _light: '{colors.white}', _dark: '{colors.grayDark.1500}' },
|
|
353
|
-
},
|
|
354
|
-
canvas: {
|
|
355
|
-
value: { base: '{colors.gray.0}', _dark: '{colors.grayDark.1500}' },
|
|
356
|
-
},
|
|
357
|
-
surface: {
|
|
358
|
-
value: { base: '{colors.white}', _dark: '{colors.grayDark.1400}' },
|
|
359
|
-
},
|
|
360
|
-
// Strongly-raised neutral surface — one level above `surface` (e.g. the
|
|
361
|
-
// selected thumb of a SegmentedControl). In dark this is the *lightest*
|
|
362
|
-
// neutral bg token so a raised element reads as lifted toward the light,
|
|
363
|
-
// not recessed. (The `bg.*` dark ramp is otherwise compressed such that
|
|
364
|
-
// `surface` sits below `subtle`/`muted`; `raised` deliberately tops the
|
|
365
|
-
// scale so "raised" has a token that behaves correctly in dark.)
|
|
366
|
-
// NB: named `raised`, not Chakra's `emphasized` — that default token name
|
|
367
|
-
// cannot be overridden via semanticTokens in this setup (it keeps
|
|
368
|
-
// resolving to Chakra's own gray.200), whereas a fresh name is honoured.
|
|
369
|
-
raised: {
|
|
370
|
-
value: { base: '{colors.white}', _dark: '{colors.grayDark.1100}' },
|
|
371
|
-
},
|
|
372
|
-
// `_light` (not `base`): Chakra's defaults for `bg.subtle`/`bg.muted` are
|
|
373
|
-
// `{ _light: gray.50 }` / `{ _light: gray.100 }`, which outrank `base` in
|
|
374
|
-
// light mode. Our light values happen to match Chakra's today, so `base`
|
|
375
|
-
// rendered correctly by coincidence — pin `_light` so these stay ours if
|
|
376
|
-
// either value ever diverges (as `border.subtle`/`fg.muted`/`fg.subtle`
|
|
377
|
-
// already did). No visible change.
|
|
378
|
-
subtle: {
|
|
379
|
-
value: { _light: '{colors.gray.50}', _dark: '{colors.grayDark.1300}' },
|
|
380
|
-
},
|
|
381
|
-
muted: {
|
|
382
|
-
value: { _light: '{colors.gray.100}', _dark: '{colors.grayDark.1200}' },
|
|
383
|
-
},
|
|
384
|
-
inverse: {
|
|
385
|
-
value: { base: '{colors.gray.1300}', _dark: '{colors.grayDark.50}' },
|
|
386
|
-
},
|
|
387
|
-
// Sunken page wash for list/overview surfaces: a gray floor in light so
|
|
388
|
-
// `bg.surface` cards read as raised above it. In dark the `bg.*` ramp is
|
|
389
|
-
// compressed (`subtle` sits *lighter* than `surface`), which would invert
|
|
390
|
-
// that elevation — so the dark value drops to the canvas floor instead.
|
|
391
|
-
// Component-level fills (hover, chips, inner blocks) keep using `bg.subtle`.
|
|
392
|
-
sunken: {
|
|
393
|
-
value: { base: '{colors.gray.50}', _dark: '{colors.grayDark.1500}' },
|
|
394
|
-
},
|
|
395
|
-
// Recessed control-track surface for "meter"-style components whose
|
|
396
|
-
// unfilled track carries meaning (Switch off-state, Slider rail,
|
|
397
|
-
// SegmentedProgressBar remainder, Spinner track). Unlike `bg.subtle` /
|
|
398
|
-
// `bg.muted` (gray.50 / gray.100), which collapse into the `bg.sunken`
|
|
399
|
-
// page wash in light mode, this sits at gray.300 so the track reads as a
|
|
400
|
-
// filled surface on any background. Dark keeps the `bg.muted` value
|
|
401
|
-
// (grayDark.1200) — already lighter than the dark canvas/surface,
|
|
402
|
-
// so it reads there without change. Use this only for control tracks, not
|
|
403
|
-
// as a general fill (that stays `bg.subtle` / `bg.muted`).
|
|
404
|
-
track: {
|
|
405
|
-
value: { base: '{colors.gray.300}', _dark: '{colors.grayDark.1200}' },
|
|
406
|
-
},
|
|
407
|
-
// Override Chakra's default `bg.panel` (whose `_dark` resolves to Chakra's
|
|
408
|
-
// own gray.950 = #111111, off our slate palette). Light value is white —
|
|
409
|
-
// identical to Chakra's default — so this only realigns dark overlay
|
|
410
|
-
// surfaces (Menu / Modal / Popover / Toast) onto our gray scale. `_light`
|
|
411
|
-
// (not `base`) for the same reason as `bg.subtle`/`bg.muted`: Chakra's
|
|
412
|
-
// default `bg.panel` is `{ _light: white }`, which would outrank `base`.
|
|
413
|
-
panel: {
|
|
414
|
-
value: { _light: '{colors.white}', _dark: '{colors.grayDark.1400}' },
|
|
415
|
-
},
|
|
416
|
-
/**
|
|
417
|
-
* Row/selection state tints. Use these for selected rows,
|
|
418
|
-
* validation-error rows, and transient highlights instead of
|
|
419
|
-
* hand-picking `primary.*`/`danger.*` tints at the call site.
|
|
420
|
-
*
|
|
421
|
-
* Light mirrors `primary.lightest` / `danger.lightest` /
|
|
422
|
-
* `warning.lightest` (this Chakra version doesn't resolve
|
|
423
|
-
* semantic→semantic token references, so the primitive is repeated
|
|
424
|
-
* here — keep it in sync with the brand ramps above).
|
|
425
|
-
*
|
|
426
|
-
* Dark does NOT mirror `*.lightest`. There the "lightest" hue step is the
|
|
427
|
-
* `900` of the ramp, which is darker than `bg.surface` (`grayDark.1400`),
|
|
428
|
-
* so a selected row rendered as a block sunk *below* its neighbours
|
|
429
|
-
* instead of a tint lifted above them. Instead the hue's `200` step (the
|
|
430
|
-
* dark-mode `main`/hover step of each family) is mixed 20% into the row
|
|
431
|
-
* surface. That keeps the tint one step lighter than the surface
|
|
432
|
-
* (~1.4:1, the same separation the old value had, in the right
|
|
433
|
-
* direction), keeps `fg.default` on it above 8:1, and stays
|
|
434
|
-
* tenant-restageable because it reads the ramp rather than a literal.
|
|
435
|
-
* Primitives only inside the mix — see the note above on references.
|
|
436
|
-
*/
|
|
437
|
-
selected: {
|
|
438
|
-
value: {
|
|
439
|
-
base: '{colors.blue.25}',
|
|
440
|
-
_dark:
|
|
441
|
-
'color-mix(in oklab, {colors.blue.200} 20%, {colors.grayDark.1400})',
|
|
442
|
-
},
|
|
443
|
-
},
|
|
444
|
-
invalid: {
|
|
445
|
-
subtle: {
|
|
446
|
-
value: {
|
|
447
|
-
base: '{colors.rose.25}',
|
|
448
|
-
_dark:
|
|
449
|
-
'color-mix(in oklab, {colors.rose.200} 20%, {colors.grayDark.1400})',
|
|
450
|
-
},
|
|
451
|
-
},
|
|
452
|
-
},
|
|
453
|
-
highlighted: {
|
|
454
|
-
value: {
|
|
455
|
-
base: '{colors.gold.25}',
|
|
456
|
-
_dark:
|
|
457
|
-
'color-mix(in oklab, {colors.gold.200} 20%, {colors.grayDark.1400})',
|
|
458
|
-
},
|
|
459
|
-
},
|
|
460
|
-
},
|
|
79
|
+
function rampTokens(
|
|
80
|
+
values: Record<Step, string>,
|
|
81
|
+
extra: Record<string, string>
|
|
82
|
+
) {
|
|
83
|
+
const out: Record<string, TokenValue> = {};
|
|
84
|
+
for (const s of STEPS) out[s] = v(values[s]);
|
|
85
|
+
for (const [k, val] of Object.entries(extra)) out[k] = v(val);
|
|
86
|
+
return out;
|
|
87
|
+
}
|
|
461
88
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
// near-black step that `fg.default` used to be; `default` is now re-pegged
|
|
479
|
-
// to a lighter body weight (see below), so reach for `emphasized` when you
|
|
480
|
-
// specifically want maximum contrast.
|
|
481
|
-
emphasized: {
|
|
482
|
-
value: { base: '{colors.gray.1300}', _dark: '{colors.grayDark.200}' },
|
|
483
|
-
},
|
|
484
|
-
default: {
|
|
485
|
-
// Primary *body* text. Re-pegged from gray.1300 → gray.1000: near-black
|
|
486
|
-
// (gray.1300, ~14:1 on white) is unusually heavy for running copy, and
|
|
487
|
-
// real product usage clustered well below it. gray.1000 (~9:1) is a
|
|
488
|
-
// comfortable AAA body weight; the old near-black step lives on as
|
|
489
|
-
// `fg.emphasized`. _dark drops one step from emphasized for hierarchy.
|
|
490
|
-
value: { base: '{colors.gray.1000}', _dark: '{colors.grayDark.300}' },
|
|
491
|
-
},
|
|
492
|
-
muted: {
|
|
493
|
-
// Secondary text. `_light` (not `base`): Chakra's default `fg.muted` is
|
|
494
|
-
// `{ _light: gray.600 }`, which outranks `base` in light mode — so `base`
|
|
495
|
-
// was shadowed and secondary text rendered gray.600, lighter than our
|
|
496
|
-
// intended gray.900. _dark sits one step below `default` (~9.5:1 on the
|
|
497
|
-
// dark canvas) to keep the default→muted hierarchy gap.
|
|
498
|
-
value: { _light: '{colors.gray.900}', _dark: '{colors.grayDark.400}' },
|
|
499
|
-
},
|
|
500
|
-
subtle: {
|
|
501
|
-
// Tertiary / placeholder / icon text. `_light` (not `base`): Chakra's
|
|
502
|
-
// default `fg.subtle` is `{ _light: gray.400 }`, which outranks `base` in
|
|
503
|
-
// light mode — so `base` was shadowed and this rendered gray.400, much
|
|
504
|
-
// lighter than our intended gray.700. _dark a11y-bumped from the straight
|
|
505
|
-
// mirror (grayDark.600 #8E939F, ~4.06:1 on bg.muted) to #989DA9
|
|
506
|
-
// (~4.6:1) so it clears AA while staying below fg.muted.
|
|
507
|
-
value: {
|
|
508
|
-
_light: '{colors.gray.700}',
|
|
509
|
-
_dark: '{colors.grayDark.fgSubtle}',
|
|
510
|
-
},
|
|
511
|
-
},
|
|
512
|
-
inverse: {
|
|
513
|
-
value: { base: '{colors.gray.0}', _dark: '{colors.grayDark.1400}' },
|
|
514
|
-
},
|
|
515
|
-
},
|
|
89
|
+
function scaleTokens(name: 'ink' | 'sand' | 'slate') {
|
|
90
|
+
const r = RAMPS[name];
|
|
91
|
+
const a = r.anchors as Partial<
|
|
92
|
+
Record<'cream' | 'press' | 'primaryDark' | 'pressDark', string>
|
|
93
|
+
>;
|
|
94
|
+
const light: Record<string, string> = {};
|
|
95
|
+
const dark: Record<string, string> = { canvas: r.canvasDark };
|
|
96
|
+
if (a.cream) light.cream = a.cream;
|
|
97
|
+
if (a.press) light.press = a.press;
|
|
98
|
+
if (a.primaryDark) dark.primary = a.primaryDark;
|
|
99
|
+
if (a.pressDark) dark.press = a.pressDark;
|
|
100
|
+
return {
|
|
101
|
+
[name]: rampTokens(r.light, light),
|
|
102
|
+
[`${name}Dark`]: rampTokens(r.dark, dark),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
516
105
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
106
|
+
/**
|
|
107
|
+
* Raw palette. Components never read these; the semantic layer below does.
|
|
108
|
+
* Override a raw step (e.g. `ink.11`) to retint everything built on it.
|
|
109
|
+
*/
|
|
110
|
+
export const colors = {
|
|
111
|
+
...scaleTokens('ink'),
|
|
112
|
+
...scaleTokens('sand'),
|
|
113
|
+
...scaleTokens('slate'),
|
|
114
|
+
coral: Object.fromEntries(
|
|
115
|
+
Object.entries(CORAL).map(([k, val]) => [k, v(val)])
|
|
116
|
+
),
|
|
117
|
+
...Object.fromEntries(
|
|
118
|
+
SYSTEM_HUE_NAMES.map((hue) => [
|
|
119
|
+
hue,
|
|
120
|
+
Object.fromEntries(
|
|
121
|
+
Object.entries(SYSTEM_HUES[hue]).map(([k, val]) => [k, v(val)])
|
|
122
|
+
),
|
|
123
|
+
])
|
|
124
|
+
),
|
|
125
|
+
white: v('#FFFFFF'),
|
|
126
|
+
} as Record<string, Record<string, TokenValue> | TokenValue>;
|
|
127
|
+
|
|
128
|
+
// ───────────────────────────── semantic tokens ─────────────────────────────
|
|
129
|
+
|
|
130
|
+
type Mode = 'light' | 'dark' | 'hcLight' | 'hcDark';
|
|
131
|
+
type FlatKey = keyof (typeof SCHEMES)['ink']['light'];
|
|
132
|
+
|
|
133
|
+
/** Prototype flat name → Chakra token path. */
|
|
134
|
+
const PATHS: Record<FlatKey, string> = {
|
|
135
|
+
'bg-canvas': 'bg.canvas',
|
|
136
|
+
'bg-subtle': 'bg.subtle',
|
|
137
|
+
'bg-surface': 'bg.surface',
|
|
138
|
+
'bg-muted': 'bg.muted',
|
|
139
|
+
track: 'bg.track',
|
|
140
|
+
'layer-1': 'layer.1.DEFAULT',
|
|
141
|
+
'layer-1-hover': 'layer.1.hover',
|
|
142
|
+
'layer-1-active': 'layer.1.active',
|
|
143
|
+
'layer-2': 'layer.2.DEFAULT',
|
|
144
|
+
'layer-2-hover': 'layer.2.hover',
|
|
145
|
+
'layer-2-active': 'layer.2.active',
|
|
146
|
+
'layer-3': 'layer.3.DEFAULT',
|
|
147
|
+
'layer-3-hover': 'layer.3.hover',
|
|
148
|
+
'layer-3-active': 'layer.3.active',
|
|
149
|
+
'border-subtle': 'border.subtle',
|
|
150
|
+
'border-default': 'border.default',
|
|
151
|
+
'border-strong': 'border.strong',
|
|
152
|
+
'border-control': 'border.control',
|
|
153
|
+
'fg-default': 'fg.default',
|
|
154
|
+
'fg-muted': 'fg.muted',
|
|
155
|
+
'fg-subtle': 'fg.subtle',
|
|
156
|
+
'fg-icon': 'fg.icon',
|
|
157
|
+
'fg-placeholder': 'fg.placeholder',
|
|
158
|
+
'fg-onPrimary': 'fg.onPrimary',
|
|
159
|
+
'fg-link': 'fg.link',
|
|
160
|
+
'fg-linkHover': 'fg.linkHover',
|
|
161
|
+
'primary-main': 'primary.main',
|
|
162
|
+
'primary-hover': 'primary.hover',
|
|
163
|
+
'primary-active': 'primary.active',
|
|
164
|
+
'primary-wash': 'primary.wash',
|
|
165
|
+
'primary-washActive': 'primary.washActive',
|
|
166
|
+
'primary-selected': 'primary.selected',
|
|
167
|
+
// Sand tint (#FBEFE3 / #F4E7DA light — reads peach): tint/accent only — not
|
|
168
|
+
// a component background. Fill with bg.subtle / bg.muted / layer.* /
|
|
169
|
+
// primary.wash|selected instead; `noSandBackground.test.ts` enforces it in
|
|
170
|
+
// src/components. Kept because the 4.x aliases secondary.extralight /
|
|
171
|
+
// secondary.lighter point here.
|
|
172
|
+
'secondary-surface': 'secondary.surface',
|
|
173
|
+
'secondary-surfaceStrong': 'secondary.surfaceStrong',
|
|
174
|
+
'secondary-border': 'secondary.border',
|
|
175
|
+
'secondary-fg': 'secondary.fg',
|
|
176
|
+
'secondary-fgStrong': 'secondary.fgStrong',
|
|
177
|
+
'action-mark': 'action.mark',
|
|
178
|
+
'action-iconOnSolid': 'action.iconOnSolid',
|
|
179
|
+
'action-bg': 'action.bg',
|
|
180
|
+
'action-bgHover': 'action.bgHover',
|
|
181
|
+
'action-bgActive': 'action.bgActive',
|
|
182
|
+
'action-fg': 'action.fg',
|
|
183
|
+
'action-border': 'action.border',
|
|
184
|
+
'send-bg': 'send.bg',
|
|
185
|
+
'send-bgHover': 'send.bgHover',
|
|
186
|
+
'send-bgActive': 'send.bgActive',
|
|
187
|
+
'send-fg': 'send.fg',
|
|
188
|
+
'count-bg': 'count.bg',
|
|
189
|
+
'count-fg': 'count.fg',
|
|
190
|
+
'disabled-bg': 'disabled.bg',
|
|
191
|
+
'disabled-fg': 'disabled.fg',
|
|
192
|
+
focus: 'focus.ring',
|
|
193
|
+
'danger-bg': 'danger.bg',
|
|
194
|
+
'danger-border': 'danger.border',
|
|
195
|
+
'danger-fg': 'danger.fg',
|
|
196
|
+
'danger-solid': 'danger.solid',
|
|
197
|
+
'danger-solidHover': 'danger.solidHover',
|
|
198
|
+
'danger-solidActive': 'danger.solidActive',
|
|
199
|
+
'danger-onSolid': 'danger.onSolid',
|
|
200
|
+
'success-bg': 'success.bg',
|
|
201
|
+
'success-border': 'success.border',
|
|
202
|
+
'success-fg': 'success.fg',
|
|
203
|
+
'success-solid': 'success.solid',
|
|
204
|
+
'success-onSolid': 'success.onSolid',
|
|
205
|
+
'warning-bg': 'warning.bg',
|
|
206
|
+
'warning-border': 'warning.border',
|
|
207
|
+
'warning-fg': 'warning.fg',
|
|
208
|
+
'warning-solid': 'warning.solid',
|
|
209
|
+
'warning-onSolid': 'warning.onSolid',
|
|
210
|
+
'info-bg': 'info.bg',
|
|
211
|
+
'info-border': 'info.border',
|
|
212
|
+
'info-fg': 'info.fg',
|
|
213
|
+
'info-solid': 'info.solid',
|
|
214
|
+
'info-onSolid': 'info.onSolid',
|
|
215
|
+
'tooltip-bg': 'tooltip.bg',
|
|
216
|
+
'tooltip-fg': 'tooltip.fg',
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
/** Exposed for tests and docs: every role token generated from the scheme table. */
|
|
220
|
+
export const ROLE_TOKEN_PATHS = PATHS;
|
|
550
221
|
|
|
551
222
|
/**
|
|
552
|
-
*
|
|
553
|
-
*
|
|
554
|
-
*
|
|
555
|
-
*
|
|
556
|
-
*
|
|
557
|
-
* so a rename here is a visible, reviewable diff.
|
|
558
|
-
*
|
|
559
|
-
* Note: `bg.panel` and the bare `bg`/`fg`/`border` DEFAULT tokens are
|
|
560
|
-
* deliberately omitted — they are internal realignments of Chakra defaults
|
|
561
|
-
* (overlay surfaces and html-level globals), not part of the public migration
|
|
562
|
-
* contract. App code should use `bg.surface`/`bg.canvas`, `fg.default`, etc.
|
|
223
|
+
* Hex → raw token reference, so a role token points at the raw step it was
|
|
224
|
+
* derived from (a tenant overriding `ink.11` retints everything on it). Earlier
|
|
225
|
+
* entries win, so the active neutral/secondary scale is preferred over an
|
|
226
|
+
* identical hex elsewhere. Values with no raw step (status washes, pushed
|
|
227
|
+
* high-contrast lightness) stay literal.
|
|
563
228
|
*/
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
| 'lighter'
|
|
605
|
-
| 'light'
|
|
606
|
-
| 'main'
|
|
607
|
-
| 'dark'
|
|
608
|
-
| 'darker'}`;
|
|
229
|
+
function buildRefIndex(neutral: NeutralScale, secondary: SecondaryScale) {
|
|
230
|
+
const index = new Map<string, string>();
|
|
231
|
+
const add = (hex: string, ref: string) => {
|
|
232
|
+
const key = hex.toUpperCase();
|
|
233
|
+
if (!index.has(key)) index.set(key, `{colors.${ref}}`);
|
|
234
|
+
};
|
|
235
|
+
const addScale = (name: string) => {
|
|
236
|
+
for (const s of STEPS) add(RAMPS[name].light[s], `${name}.${s}`);
|
|
237
|
+
for (const s of STEPS) add(RAMPS[name].dark[s], `${name}Dark.${s}`);
|
|
238
|
+
add(RAMPS[name].canvasDark, `${name}Dark.canvas`);
|
|
239
|
+
const a = RAMPS[name].anchors as Record<string, string>;
|
|
240
|
+
if (a.cream) add(a.cream, `${name}.cream`);
|
|
241
|
+
if (a.press) add(a.press, `${name}.press`);
|
|
242
|
+
if (a.primaryDark) add(a.primaryDark, `${name}Dark.primary`);
|
|
243
|
+
if (a.pressDark) add(a.pressDark, `${name}Dark.press`);
|
|
244
|
+
};
|
|
245
|
+
addScale(neutral);
|
|
246
|
+
addScale(secondary);
|
|
247
|
+
add('#FFFFFF', 'white');
|
|
248
|
+
for (const [k, hex] of Object.entries(CORAL)) add(hex, `coral.${k}`);
|
|
249
|
+
for (const hue of SYSTEM_HUE_NAMES)
|
|
250
|
+
for (const [k, hex] of Object.entries(SYSTEM_HUES[hue]))
|
|
251
|
+
add(hex, `${hue}.${k}`);
|
|
252
|
+
// The brand black/cream anchors exist only on ink; reachable from any scheme.
|
|
253
|
+
if (neutral !== 'ink') addScale('ink');
|
|
254
|
+
return (hex: string) => index.get(hex.toUpperCase()) ?? hex;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function setPath(tree: TokenTree, path: string, token: TokenValue) {
|
|
258
|
+
const parts = path.split('.');
|
|
259
|
+
let node = tree;
|
|
260
|
+
for (const p of parts.slice(0, -1)) {
|
|
261
|
+
node[p] ??= {};
|
|
262
|
+
node = node[p] as TokenTree;
|
|
263
|
+
}
|
|
264
|
+
node[parts[parts.length - 1]] = token as never;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
const camel = (flat: string) =>
|
|
268
|
+
flat.replace(/-([a-z0-9])/g, (_, c: string) => c.toUpperCase());
|
|
609
269
|
|
|
610
270
|
/**
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
* These are the raw color values organized by hue. In most cases,
|
|
614
|
-
* you should use semantic tokens (`primary`, `danger`, etc.) instead
|
|
615
|
-
* of these primitive values directly.
|
|
616
|
-
*
|
|
617
|
-
* ### Scale explanation:
|
|
618
|
-
* - **25**: Lightest backgrounds, ghost states
|
|
619
|
-
* - **50-200**: Light shades for backgrounds, subtle fills
|
|
620
|
-
* - **300**: Medium shade for borders, hover states
|
|
621
|
-
* - **500**: Base color, primary usage
|
|
622
|
-
* - **600-700**: Dark shades for text, emphasis
|
|
623
|
-
* - **800-900**: Darkest shades for high-contrast text
|
|
624
|
-
*
|
|
625
|
-
* ### Gray scale (Slate-based):
|
|
626
|
-
* Extended from 0-1500 for fine-grained control:
|
|
627
|
-
* - **0**: Pure background (near-white with blue tint)
|
|
628
|
-
* - **50-200**: Light backgrounds, subtle borders
|
|
629
|
-
* - **300-500**: Borders, disabled states
|
|
630
|
-
* - **600-800**: Secondary text, icons
|
|
631
|
-
* - **900-1200**: Primary text
|
|
632
|
-
* - **1300-1500**: Darkest backgrounds, high-contrast text
|
|
633
|
-
*
|
|
634
|
-
* @example
|
|
635
|
-
* ```tsx
|
|
636
|
-
* // Prefer semantic tokens
|
|
637
|
-
* <Button bgColor="primary.main" />
|
|
638
|
-
*
|
|
639
|
-
* // Use primitives only when semantic tokens don't apply
|
|
640
|
-
* <Box borderColor="gray.300" />
|
|
641
|
-
* ```
|
|
271
|
+
* Build the semantic colour tokens for one neutral/secondary choice.
|
|
272
|
+
* `createLogicianTheme` calls this; the default export below is BAZE.
|
|
642
273
|
*/
|
|
643
|
-
export
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
300: { value: '#4A79DC' }, // Medium - borders
|
|
654
|
-
500: { value: '#1751D0' }, // Base - primary.main
|
|
655
|
-
600: { value: '#1241A6' }, // Dark - hover on main
|
|
656
|
-
700: { value: '#0D317D' }, // Darker - text
|
|
657
|
-
800: { value: '#092053' }, // Very dark - emphasis
|
|
658
|
-
900: { value: '#04102A' }, // Darkest - high contrast
|
|
659
|
-
},
|
|
274
|
+
export function createSemanticColors({
|
|
275
|
+
neutral = 'ink',
|
|
276
|
+
secondary = 'sand',
|
|
277
|
+
}: LogicianColorOptions = {}) {
|
|
278
|
+
const table = SCHEMES[neutral] as unknown as Record<
|
|
279
|
+
Mode,
|
|
280
|
+
Record<FlatKey, string>
|
|
281
|
+
>;
|
|
282
|
+
const ref = buildRefIndex(neutral, secondary);
|
|
283
|
+
const tree: TokenTree = {};
|
|
660
284
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
},
|
|
285
|
+
// Semantic steps.
|
|
286
|
+
for (const s of STEPS) {
|
|
287
|
+
setPath(tree, `neutral.${s}`, {
|
|
288
|
+
value: {
|
|
289
|
+
_light: `{colors.${neutral}.${s}}`,
|
|
290
|
+
_dark: `{colors.${neutral}Dark.${s}}`,
|
|
291
|
+
},
|
|
292
|
+
} as never);
|
|
293
|
+
setPath(tree, `secondary.${s}`, {
|
|
294
|
+
value: {
|
|
295
|
+
_light: `{colors.${secondary}.${s}}`,
|
|
296
|
+
_dark: `{colors.${secondary}Dark.${s}}`,
|
|
297
|
+
},
|
|
298
|
+
} as never);
|
|
299
|
+
}
|
|
677
300
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
301
|
+
// Role tokens, with per-mode high-contrast helpers where the value differs.
|
|
302
|
+
for (const [flat, path] of Object.entries(PATHS) as [FlatKey, string][]) {
|
|
303
|
+
const perMode = (mode: 'light' | 'dark', hcMode: Mode) => {
|
|
304
|
+
const base = ref(table[mode][flat]);
|
|
305
|
+
const hc = ref(table[hcMode][flat]);
|
|
306
|
+
if (base === hc) return base;
|
|
307
|
+
const helper = `scheme.${mode}.${camel(flat)}`;
|
|
308
|
+
setPath(tree, helper, { value: { base, _moreContrast: hc } } as never);
|
|
309
|
+
return `{colors.${helper}}`;
|
|
310
|
+
};
|
|
311
|
+
setPath(tree, path, {
|
|
312
|
+
value: {
|
|
313
|
+
_light: perMode('light', 'hcLight'),
|
|
314
|
+
_dark: perMode('dark', 'hcDark'),
|
|
315
|
+
},
|
|
316
|
+
} as never);
|
|
317
|
+
}
|
|
694
318
|
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
319
|
+
// Roles that reuse another role's value (kept 4.x names, Chakra globals).
|
|
320
|
+
const sameAs: Record<string, string> = {
|
|
321
|
+
'bg.DEFAULT': 'bg.canvas', // Chakra paints `html { background: bg }`
|
|
322
|
+
'fg.DEFAULT': 'fg.default', // … and `html { color: fg }`
|
|
323
|
+
'border.DEFAULT': 'border.subtle', // Chakra's implicit border colour
|
|
324
|
+
'bg.panel': 'bg.surface', // Chakra overlay surfaces (Menu, Modal, Popover, Toast)
|
|
325
|
+
'bg.raised': 'layer.2', // one level above surface
|
|
326
|
+
'bg.inverse': 'tooltip.bg',
|
|
327
|
+
'fg.inverse': 'tooltip.fg',
|
|
328
|
+
'fg.emphasized': 'fg.default',
|
|
329
|
+
'bg.invalid.subtle': 'danger.bg',
|
|
330
|
+
'bg.highlighted': 'warning.bg',
|
|
331
|
+
// Every other name Chakra's own recipes read (menu/combobox `_highlighted`
|
|
332
|
+
// is `bg.emphasized/60`, radiomark borders are `border.emphasized`, the
|
|
333
|
+
// field recipe reads `fg.error` …). 4.x got these for free because its
|
|
334
|
+
// raw `gray` shared Chakra's keys; 5.0 has no `gray`, so without this
|
|
335
|
+
// they fall through to Chakra's zinc/red palette (1.06:1 menu highlight
|
|
336
|
+
// in dark). `chakraTokens.test.ts` fails if Chakra adds one we miss.
|
|
337
|
+
'bg.emphasized': 'layer.1.active',
|
|
338
|
+
'bg.inverted': 'tooltip.bg',
|
|
339
|
+
'fg.inverted': 'tooltip.fg',
|
|
340
|
+
'border.emphasized': 'border.strong',
|
|
341
|
+
'border.muted': 'border.subtle',
|
|
342
|
+
'border.inverted': 'tooltip.bg',
|
|
343
|
+
'bg.error': 'danger.bg',
|
|
344
|
+
'bg.warning': 'warning.bg',
|
|
345
|
+
'bg.success': 'success.bg',
|
|
346
|
+
'bg.info': 'info.bg',
|
|
347
|
+
'fg.error': 'danger.fg',
|
|
348
|
+
'fg.warning': 'warning.fg',
|
|
349
|
+
'fg.success': 'success.fg',
|
|
350
|
+
'fg.info': 'info.fg',
|
|
351
|
+
'border.error': 'danger.border',
|
|
352
|
+
'border.warning': 'warning.border',
|
|
353
|
+
'border.success': 'success.border',
|
|
354
|
+
'border.info': 'info.border',
|
|
355
|
+
};
|
|
356
|
+
for (const [path, target] of Object.entries(sameAs))
|
|
357
|
+
setPath(tree, path, { value: `{colors.${target}}` });
|
|
358
|
+
// Sunken page wash: neutral.1 in light, the canvas floor in dark (so cards
|
|
359
|
+
// on it still read as raised — the dark ramp is compressed).
|
|
360
|
+
setPath(tree, 'bg.sunken', {
|
|
361
|
+
value: { _light: '{colors.bg.subtle}', _dark: '{colors.bg.canvas}' },
|
|
362
|
+
} as never);
|
|
711
363
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
},
|
|
364
|
+
// Category pairs (decorative — no status meaning).
|
|
365
|
+
for (const hue of SYSTEM_HUE_NAMES) {
|
|
366
|
+
setPath(tree, `category.${hue}.surface`, {
|
|
367
|
+
value: {
|
|
368
|
+
_light: `{colors.${hue}.surface}`,
|
|
369
|
+
_dark: `{colors.${hue}.surfaceDark}`,
|
|
370
|
+
},
|
|
371
|
+
} as never);
|
|
372
|
+
setPath(tree, `category.${hue}.fg`, {
|
|
373
|
+
value: {
|
|
374
|
+
_light: `{colors.${hue}.ink}`,
|
|
375
|
+
_dark: `{colors.${hue}.inkDark}`,
|
|
376
|
+
},
|
|
377
|
+
} as never);
|
|
378
|
+
}
|
|
728
379
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
*
|
|
733
|
-
* Used for: backgrounds, borders, text, disabled states
|
|
734
|
-
*
|
|
735
|
-
* Contrast ratios against gray.0 (#FDFDFF):
|
|
736
|
-
* - gray.700: 4.6:1 ✓ AA (large text)
|
|
737
|
-
* - gray.900: 6.2:1 ✓ AA
|
|
738
|
-
* - gray.1300: 11.2:1 ✓ AAA
|
|
739
|
-
*/
|
|
740
|
-
gray: {
|
|
741
|
-
0: { value: '#FDFDFF' }, // Pure background (near-white with blue tint)
|
|
742
|
-
50: { value: '#F7F9FC' }, // Subtle background
|
|
743
|
-
100: { value: '#F0F3F9' }, // Muted background
|
|
744
|
-
200: { value: '#E2E6F0' }, // Light borders, dividers
|
|
745
|
-
300: { value: '#CDD3E0' }, // Default borders
|
|
746
|
-
400: { value: '#B0B8C9' }, // Disabled borders
|
|
747
|
-
500: { value: '#9AA3B8' }, // Placeholder text, tertiary
|
|
748
|
-
600: { value: '#8690A7' }, // Icons, secondary text
|
|
749
|
-
700: { value: '#737D96' }, // Secondary text
|
|
750
|
-
800: { value: '#616B85' }, // Body text (light)
|
|
751
|
-
900: { value: '#505A74' }, // Body text (medium)
|
|
752
|
-
1000: { value: '#414A63' }, // Body text (strong)
|
|
753
|
-
1100: { value: '#343C52' }, // Headings (light)
|
|
754
|
-
1200: { value: '#2A3142' }, // Headings (medium)
|
|
755
|
-
1300: { value: '#1E2433' }, // Primary text, headings
|
|
756
|
-
1400: { value: '#141924' }, // Dark backgrounds
|
|
757
|
-
1500: { value: '#0B0E17' }, // Darkest background
|
|
758
|
-
},
|
|
380
|
+
// Deprecated 4.x names → 5.0 replacement (removed in 6.0).
|
|
381
|
+
for (const [oldName, newName] of Object.entries(DEPRECATED.aliases))
|
|
382
|
+
setPath(tree, oldName, { value: `{colors.${newName}}` });
|
|
759
383
|
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
* primitive `gray.N` (same hue and lightness, HSL saturation cut by ~50%,
|
|
763
|
-
* e.g. `gray.1300` #1E2433 @ 26% → #23262E @ 13%). The blue-tinted `gray`
|
|
764
|
-
* ramp reads as the right neutral in light mode but turns muddy/
|
|
765
|
-
* over-chromatic as a dark surface, so every dark-mode neutral in the
|
|
766
|
-
* semantic layer (`slate.*`, and the `_dark` of `bg`/`fg`/`border`) resolves
|
|
767
|
-
* to a step of this scale instead of a raw `gray` step. Light mode is
|
|
768
|
-
* untouched — it keeps referencing `{colors.gray.*}` verbatim.
|
|
769
|
-
*
|
|
770
|
-
* Exposed as a primitive scale (rather than the previous inlined hex
|
|
771
|
-
* literals) so a consumer theme — e.g. FactChat's per-tenant
|
|
772
|
-
* `theme_color_overrides` — can rebrand dark mode by overriding these
|
|
773
|
-
* tokens, the same way overriding `blue.*` retints the `primary.*` ramp.
|
|
774
|
-
*
|
|
775
|
-
* The three `fg*` steps are the hand-tuned a11y lifts documented at their
|
|
776
|
-
* consuming tokens (`slate.600`/`slate.700`/`fg.subtle` in dark mode): the
|
|
777
|
-
* straight mirrors measured under WCAG AA 4.5:1 on the dark canvas/surface,
|
|
778
|
-
* so these sit slightly lighter than their scale neighbours.
|
|
779
|
-
*/
|
|
780
|
-
grayDark: {
|
|
781
|
-
0: { value: '#FEFEFF' },
|
|
782
|
-
50: { value: '#F8F9FB' },
|
|
783
|
-
100: { value: '#F2F4F7' },
|
|
784
|
-
200: { value: '#E5E8EC' },
|
|
785
|
-
300: { value: '#D2D5DB' },
|
|
786
|
-
400: { value: '#B6BAC3' },
|
|
787
|
-
500: { value: '#A2A6B1' },
|
|
788
|
-
600: { value: '#8E939F' },
|
|
789
|
-
700: { value: '#7C818D' },
|
|
790
|
-
800: { value: '#6A6F7C' },
|
|
791
|
-
900: { value: '#595E6B' },
|
|
792
|
-
1000: { value: '#4A4E5A' },
|
|
793
|
-
1100: { value: '#3C404B' },
|
|
794
|
-
1200: { value: '#30343C' },
|
|
795
|
-
1300: { value: '#23262E' },
|
|
796
|
-
1400: { value: '#181A20' },
|
|
797
|
-
1500: { value: '#0E1014' },
|
|
798
|
-
// A11y-lifted foreground steps (see scale doc above).
|
|
799
|
-
fg600: { value: '#898E99' },
|
|
800
|
-
fg700: { value: '#8D919D' },
|
|
801
|
-
fgSubtle: { value: '#989DA9' },
|
|
802
|
-
},
|
|
384
|
+
return tree;
|
|
385
|
+
}
|
|
803
386
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
* @deprecated Use `violet` instead
|
|
807
|
-
*/
|
|
808
|
-
purple: {
|
|
809
|
-
50: { value: '#F4E8FB' },
|
|
810
|
-
100: { value: '#DEB9F3' },
|
|
811
|
-
200: { value: '#C17DE8' },
|
|
812
|
-
300: { value: '#A84ADC' },
|
|
813
|
-
500: { value: '#9117D0' },
|
|
814
|
-
600: { value: '#7412A6' },
|
|
815
|
-
700: { value: '#570D7D' },
|
|
816
|
-
800: { value: '#3A0953' },
|
|
817
|
-
900: { value: '#1D042A' },
|
|
818
|
-
},
|
|
387
|
+
/** BAZE semantic tokens (ink + sand). */
|
|
388
|
+
export const semanticTokens = { colors: createSemanticColors() };
|
|
819
389
|
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
*/
|
|
824
|
-
red: {
|
|
825
|
-
50: { value: '#FBE8E9' },
|
|
826
|
-
100: { value: '#F3B9BD' },
|
|
827
|
-
200: { value: '#E87D84' },
|
|
828
|
-
300: { value: '#DC4A53' },
|
|
829
|
-
500: { value: '#C1232C' }, // kept in sync with rose.500 (deprecated alias)
|
|
830
|
-
600: { value: '#9C1C23' }, // kept in sync with rose.600 (deprecated alias)
|
|
831
|
-
700: { value: '#7D0D14' },
|
|
832
|
-
800: { value: '#53090D' },
|
|
833
|
-
900: { value: '#2A0407' },
|
|
834
|
-
},
|
|
390
|
+
/** Deprecated 4.x semantic name → 5.0 replacement. */
|
|
391
|
+
export const DEPRECATED_COLOR_TOKENS: Readonly<Record<string, string>> =
|
|
392
|
+
DEPRECATED.aliases;
|
|
835
393
|
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
* @deprecated Use `gold` instead
|
|
839
|
-
*/
|
|
840
|
-
yellow: {
|
|
841
|
-
50: { value: '#FBF6E8' },
|
|
842
|
-
100: { value: '#F3E4B9' },
|
|
843
|
-
200: { value: '#E8CD7D' },
|
|
844
|
-
300: { value: '#DCB84A' },
|
|
845
|
-
400: { value: '#D0A117' }, // For backwards compat (warning.main used yellow.400)
|
|
846
|
-
500: { value: '#D0A117' },
|
|
847
|
-
600: { value: '#A68112' },
|
|
848
|
-
700: { value: '#7D610D' },
|
|
849
|
-
800: { value: '#534109' },
|
|
850
|
-
900: { value: '#2A2004' },
|
|
851
|
-
},
|
|
394
|
+
type Hue = SystemHue;
|
|
395
|
+
type StatusFamily = 'danger' | 'success' | 'warning' | 'info';
|
|
852
396
|
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
397
|
+
/**
|
|
398
|
+
* Every public semantic colour token, in Chakra dotted-path form.
|
|
399
|
+
*
|
|
400
|
+
* The contract consumed by the factchat codemod and by reviewers; hand-kept
|
|
401
|
+
* beside `PATHS` so a rename is a visible diff. Internal `scheme.*` helpers and
|
|
402
|
+
* the bare `bg`/`fg`/`border` DEFAULTs are deliberately absent.
|
|
403
|
+
*/
|
|
404
|
+
export type SemanticColorToken =
|
|
405
|
+
| `neutral.${Step}`
|
|
406
|
+
| `secondary.${Step}`
|
|
407
|
+
| `bg.${'canvas' | 'surface' | 'raised' | 'subtle' | 'muted' | 'sunken' | 'track' | 'inverse' | 'panel' | 'highlighted'}`
|
|
408
|
+
| 'bg.invalid.subtle'
|
|
409
|
+
| `layer.${1 | 2 | 3}`
|
|
410
|
+
| `layer.${1 | 2 | 3}.${'hover' | 'active'}`
|
|
411
|
+
| `fg.${'default' | 'emphasized' | 'muted' | 'subtle' | 'icon' | 'placeholder' | 'onPrimary' | 'link' | 'linkHover' | 'inverse'}`
|
|
412
|
+
| `border.${'subtle' | 'default' | 'strong' | 'control'}`
|
|
413
|
+
| `primary.${'main' | 'hover' | 'active' | 'wash' | 'washActive' | 'selected'}`
|
|
414
|
+
| `secondary.${'surface' | 'surfaceStrong' | 'border' | 'fg' | 'fgStrong'}`
|
|
415
|
+
| `action.${'mark' | 'iconOnSolid' | 'bg' | 'bgHover' | 'bgActive' | 'fg' | 'border'}`
|
|
416
|
+
| `send.${'bg' | 'bgHover' | 'bgActive' | 'fg'}`
|
|
417
|
+
| `count.${'bg' | 'fg'}`
|
|
418
|
+
| `disabled.${'bg' | 'fg'}`
|
|
419
|
+
| 'focus.ring'
|
|
420
|
+
| `${StatusFamily}.${'bg' | 'border' | 'fg' | 'solid' | 'onSolid'}`
|
|
421
|
+
| `danger.${'solidHover' | 'solidActive'}`
|
|
422
|
+
| `tooltip.${'bg' | 'fg'}`
|
|
423
|
+
| `category.${Hue}.${'surface' | 'fg'}`
|
|
424
|
+
| DeprecatedSemanticColorToken;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* @deprecated 4.x names kept as aliases in 5.0 — see `DEPRECATED_COLOR_TOKENS`
|
|
428
|
+
* for the replacement. Removed in 6.0.
|
|
429
|
+
*/
|
|
430
|
+
export type DeprecatedSemanticColorToken =
|
|
431
|
+
| `primary.${'lightest' | 'extralight' | 'lighter' | 'light' | 'dark' | 'darker' | 'fill' | 'fillStrong'}`
|
|
432
|
+
| `${'secondary' | 'danger' | 'success' | 'warning'}.${'lightest' | 'extralight' | 'lighter' | 'light' | 'main' | 'dark' | 'darker'}`
|
|
433
|
+
| 'warning.fill'
|
|
434
|
+
| 'bg.selected'
|
|
435
|
+
| 'fg.accent'
|
|
436
|
+
| `slate.${0 | 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 | 1100 | 1200 | 1300 | 1400 | 1500}`;
|