@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
|
@@ -29,14 +29,16 @@ export const pickPrimaryIssue = (issues: Issue[]): Issue | null => {
|
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Semantic color token for an issue severity — shared across issue list UIs.
|
|
32
|
-
* `
|
|
33
|
-
*
|
|
34
|
-
*
|
|
32
|
+
* `role` selects which half of the status family: the default `'fg'` for
|
|
33
|
+
* text, icons and borders (it's tuned to read on both `bg.*` and the plain
|
|
34
|
+
* canvas, which is the 4.x two-tone `main`/`dark` split collapsed into one
|
|
35
|
+
* token), or `'solid'` for an actually-filled shape (a dot, a bar) that
|
|
36
|
+
* needs the stronger fill colour `.onSolid` text is designed to sit on.
|
|
35
37
|
*/
|
|
36
38
|
export const severityColorToken = (
|
|
37
39
|
severity: IssueSeverity,
|
|
38
|
-
|
|
39
|
-
): string => (severity === 'error' ? `danger.${
|
|
40
|
+
role: 'fg' | 'solid' = 'fg'
|
|
41
|
+
): string => (severity === 'error' ? `danger.${role}` : `warning.${role}`);
|
|
40
42
|
|
|
41
43
|
/**
|
|
42
44
|
* Tinted callout styling (bg / border / text) for an issue severity. Reuses the
|
|
@@ -77,7 +77,7 @@ export const CustomSelectionPanel: StoryFn<typeof Workflow> = () => {
|
|
|
77
77
|
>
|
|
78
78
|
<Subtitle>My own panel</Subtitle>
|
|
79
79
|
<Subtext
|
|
80
|
-
color={selection ? undefined : '
|
|
80
|
+
color={selection ? undefined : 'fg.subtle'}
|
|
81
81
|
data-testid="selection-readout"
|
|
82
82
|
>
|
|
83
83
|
{selection
|
|
@@ -124,8 +124,7 @@ function AddAfterButton({ nodeId }: { nodeId: string }) {
|
|
|
124
124
|
<IconButton
|
|
125
125
|
aria-label={`Add after ${source.label}`}
|
|
126
126
|
size="sm"
|
|
127
|
-
variant="
|
|
128
|
-
colorPalette="primary"
|
|
127
|
+
variant="primary"
|
|
129
128
|
borderRadius="full"
|
|
130
129
|
onClick={() => addNode('math.add', { after: nodeId })}
|
|
131
130
|
>
|
|
@@ -149,14 +148,14 @@ function TapPalette() {
|
|
|
149
148
|
bg="bg.surface"
|
|
150
149
|
>
|
|
151
150
|
<Subtitle>Tap to add</Subtitle>
|
|
152
|
-
<Subtext color="
|
|
151
|
+
<Subtext color="fg.subtle" data-testid="add-target">
|
|
153
152
|
{source ? `Connect after ${source.label}` : 'Add at the centre'}
|
|
154
153
|
</Subtext>
|
|
155
154
|
{Object.values(nodeTypes).map((def) => (
|
|
156
155
|
<Button
|
|
157
156
|
key={def.kind}
|
|
158
157
|
size="sm"
|
|
159
|
-
variant="
|
|
158
|
+
variant="secondary"
|
|
160
159
|
onClick={() =>
|
|
161
160
|
addNode(
|
|
162
161
|
def.kind,
|
|
@@ -2,7 +2,7 @@ import { render } from '@testing-library/react';
|
|
|
2
2
|
import axe from 'axe-core';
|
|
3
3
|
import { beforeAll, describe, expect, it } from 'vitest';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { buttonVariantStyles } from '@/components/Button/Button.styles';
|
|
6
6
|
import { FileInput } from '@/components/FileInput';
|
|
7
7
|
import { LogicianProvider } from '@/components/LogicianProvider';
|
|
8
8
|
import { baseMarkdownComponents } from '@/components/Markdown/Markdown';
|
|
@@ -16,7 +16,8 @@ import {
|
|
|
16
16
|
} from '@/components/Slider';
|
|
17
17
|
import { TAB_RAMP } from '@/components/Tabs';
|
|
18
18
|
import { Link, LINK_RAMP, Subtitle } from '@/components/Typography';
|
|
19
|
-
import {
|
|
19
|
+
import { ROLE_TOKEN_PATHS } from '@/theme/colors';
|
|
20
|
+
import { SCHEMES } from '@/theme/palette.generated';
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Regressions for the accessibility defects a KWCAG 2.1 (한국형 웹 콘텐츠 접근성
|
|
@@ -243,7 +244,7 @@ describe('KWCAG 5.1.3.3 텍스트 콘텐츠의 명도 대비', () => {
|
|
|
243
244
|
// dropped anything else — so a per-theme `{ base, _dark }`, which is the
|
|
244
245
|
// documented way to fix a contrast problem, was silently replaced by the
|
|
245
246
|
// default. Accepted by the type, discarded at runtime, no error either way.
|
|
246
|
-
const custom = { base: 'danger.
|
|
247
|
+
const custom = { base: 'danger.solid', _dark: 'danger.fg' };
|
|
247
248
|
const { container } = withProvider(
|
|
248
249
|
<Link href="#" color={custom}>
|
|
249
250
|
링크
|
|
@@ -336,62 +337,31 @@ describe('브랜드 색 대비 — Link · Tab 램프', () => {
|
|
|
336
337
|
return (hi + 0.05) / (lo + 0.05);
|
|
337
338
|
};
|
|
338
339
|
|
|
339
|
-
/** The
|
|
340
|
-
const LIGHT_CANVAS = '
|
|
341
|
-
const DARK_CANVAS = '
|
|
340
|
+
/** The surface each mode's text is read against (`bg.surface`, the raised one). */
|
|
341
|
+
const LIGHT_CANVAS = SCHEMES.ink.light['bg-surface'];
|
|
342
|
+
const DARK_CANVAS = SCHEMES.ink.dark['bg-surface'];
|
|
342
343
|
const AA_BODY_TEXT = 4.5;
|
|
343
344
|
|
|
344
345
|
/**
|
|
345
|
-
* Semantic token →
|
|
346
|
-
*
|
|
347
|
-
*
|
|
346
|
+
* Semantic token → shipped hex, per mode, read from the generated BAZE
|
|
347
|
+
* scheme table (the same values `src/theme/contrast.test.ts` pins the theme
|
|
348
|
+
* to). The ramps hold token NAMES, so this measures what the component reads.
|
|
348
349
|
*/
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
'
|
|
359
|
-
base: colors.blue[900].value,
|
|
360
|
-
_dark: colors.blue[100].value,
|
|
361
|
-
},
|
|
362
|
-
'danger.main': {
|
|
363
|
-
base: colors.rose[500].value,
|
|
364
|
-
_dark: colors.rose[300].value,
|
|
365
|
-
},
|
|
366
|
-
'danger.dark': {
|
|
367
|
-
base: colors.rose[700].value,
|
|
368
|
-
_dark: colors.rose[200].value,
|
|
369
|
-
},
|
|
370
|
-
'danger.darker': {
|
|
371
|
-
base: colors.rose[900].value,
|
|
372
|
-
_dark: colors.rose[100].value,
|
|
373
|
-
},
|
|
374
|
-
// The ink steps. These INVERT rather than shift — that is the whole point,
|
|
375
|
-
// and the reason the neutral button and the selected tab can be one token
|
|
376
|
-
// in both modes instead of a two-arm ramp.
|
|
377
|
-
'fg.emphasized': {
|
|
378
|
-
base: colors.gray[1300].value,
|
|
379
|
-
_dark: colors.grayDark[200].value,
|
|
380
|
-
},
|
|
381
|
-
'bg.inverse': {
|
|
382
|
-
base: colors.gray[1300].value,
|
|
383
|
-
_dark: colors.grayDark[50].value,
|
|
384
|
-
},
|
|
385
|
-
'fg.inverse': {
|
|
386
|
-
base: colors.gray[0].value,
|
|
387
|
-
_dark: colors.grayDark[1400].value,
|
|
388
|
-
},
|
|
350
|
+
const BY_PATH = Object.fromEntries(
|
|
351
|
+
Object.entries(ROLE_TOKEN_PATHS).map(([flat, path]) => [
|
|
352
|
+
path.replace(/\.DEFAULT$/, ''),
|
|
353
|
+
flat as keyof (typeof SCHEMES)['ink']['light'],
|
|
354
|
+
])
|
|
355
|
+
);
|
|
356
|
+
const ALIASES: Record<string, string> = {
|
|
357
|
+
'fg.emphasized': 'fg.default',
|
|
358
|
+
'bg.inverse': 'tooltip.bg',
|
|
359
|
+
'fg.inverse': 'tooltip.fg',
|
|
389
360
|
};
|
|
390
|
-
|
|
391
361
|
const resolve = (token: string, mode: 'base' | '_dark') => {
|
|
392
|
-
const
|
|
393
|
-
if (!
|
|
394
|
-
return
|
|
362
|
+
const flat = BY_PATH[ALIASES[token] ?? token];
|
|
363
|
+
if (!flat) throw new Error(`토큰 ${token} 의 원색이 이 표에 없다`);
|
|
364
|
+
return SCHEMES.ink[mode === 'base' ? 'light' : 'dark'][flat];
|
|
395
365
|
};
|
|
396
366
|
|
|
397
367
|
it.each([
|
|
@@ -404,39 +374,51 @@ describe('브랜드 색 대비 — Link · Tab 램프', () => {
|
|
|
404
374
|
// hardcoded the expected steps passed just fine with the hover pointing at
|
|
405
375
|
// `primary.main` — measuring the right arithmetic about the wrong colour.
|
|
406
376
|
expect(
|
|
407
|
-
contrast(resolve(ramp
|
|
377
|
+
contrast(resolve(ramp, 'base'), LIGHT_CANVAS)
|
|
408
378
|
).toBeGreaterThanOrEqual(AA_BODY_TEXT);
|
|
409
379
|
expect(
|
|
410
|
-
contrast(resolve(ramp
|
|
380
|
+
contrast(resolve(ramp, '_dark'), DARK_CANVAS)
|
|
411
381
|
).toBeGreaterThanOrEqual(AA_BODY_TEXT);
|
|
412
382
|
});
|
|
413
383
|
|
|
414
|
-
it('hover 가 배경 반대쪽으로 간다 —
|
|
415
|
-
// The invariant the defect broke: hovering must make the link stand out
|
|
384
|
+
it('hover 가 배경 반대쪽으로 간다 — 라이트', () => {
|
|
385
|
+
// The invariant the 4.x defect broke: hovering must make the link stand out
|
|
416
386
|
// MORE. "One step darker" is correct on a white page and backwards on a
|
|
417
387
|
// dark one, where darker means toward the background.
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
388
|
+
const resting = contrast(resolve(LINK_RAMP.default, 'base'), LIGHT_CANVAS);
|
|
389
|
+
const hover = contrast(
|
|
390
|
+
resolve(LINK_RAMP.defaultHover, 'base'),
|
|
391
|
+
LIGHT_CANVAS
|
|
392
|
+
);
|
|
393
|
+
expect(hover).toBeGreaterThan(resting);
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
// KNOWN (5.0 open question, needs designer sign-off): the BAZE guide's dark
|
|
397
|
+
// `fg.linkHover` #8BB7E3 is 6.52:1 on bg.surface against the resting link's
|
|
398
|
+
// 7.89:1 — the hover moves TOWARD the background. Both still clear 4.5:1 and
|
|
399
|
+
// the underline thickens 1px → 2px, so the hover cue survives, but this is
|
|
400
|
+
// the exact inversion this file was written to stop. `it.fails` keeps the
|
|
401
|
+
// invariant on record: when the value is fixed this starts passing and fails
|
|
402
|
+
// the suite, so flip it back to `it`.
|
|
403
|
+
it.fails(
|
|
404
|
+
'hover 가 배경 반대쪽으로 간다 — 다크 (BAZE 가이드 값 확인 필요)',
|
|
405
|
+
() => {
|
|
406
|
+
const resting = contrast(
|
|
407
|
+
resolve(LINK_RAMP.default, '_dark'),
|
|
408
|
+
DARK_CANVAS
|
|
409
|
+
);
|
|
423
410
|
const hover = contrast(
|
|
424
|
-
resolve(LINK_RAMP.defaultHover
|
|
425
|
-
|
|
411
|
+
resolve(LINK_RAMP.defaultHover, '_dark'),
|
|
412
|
+
DARK_CANVAS
|
|
426
413
|
);
|
|
427
|
-
expect(
|
|
428
|
-
hover,
|
|
429
|
-
`${mode} 에서 hover 가 resting 보다 흐리다`
|
|
430
|
-
).toBeGreaterThan(resting);
|
|
414
|
+
expect(hover).toBeGreaterThan(resting);
|
|
431
415
|
}
|
|
432
|
-
|
|
416
|
+
);
|
|
433
417
|
|
|
434
418
|
it('선택된 가로 탭의 레이블이 라이트·다크 양쪽에서 4.5:1 을 넘는다', () => {
|
|
435
|
-
// Measured against
|
|
436
|
-
//
|
|
437
|
-
//
|
|
438
|
-
// passed every full-page scan and failed the first time a tab list rendered
|
|
439
|
-
// inside a modal. The stricter of the two surfaces is the one to hold.
|
|
419
|
+
// Measured against the RAISED surface (bg.surface), not the page canvas:
|
|
420
|
+
// in 4.x `primary.main` passed on the page and failed inside a modal, so
|
|
421
|
+
// the stricter of the two surfaces is the one to hold.
|
|
440
422
|
expect(
|
|
441
423
|
contrast(resolve(TAB_RAMP.label, 'base'), LIGHT_CANVAS)
|
|
442
424
|
).toBeGreaterThanOrEqual(AA_BODY_TEXT);
|
|
@@ -460,14 +442,13 @@ describe('브랜드 색 대비 — Link · Tab 램프', () => {
|
|
|
460
442
|
});
|
|
461
443
|
|
|
462
444
|
/**
|
|
463
|
-
* The regression
|
|
464
|
-
* `
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
* "one step darker" does (5.32:1 light, 3.08:1 dark).
|
|
445
|
+
* The 4.x regression: `neutral` + `solid` shipped a white label on
|
|
446
|
+
* `gray.700` (4.12:1 light, 3.15:1 dark). In 5.0 that button is `primary`
|
|
447
|
+
* (black / beige fill), which has to INVERT with the mode — a shift fixes
|
|
448
|
+
* one arm and breaks the other.
|
|
468
449
|
*/
|
|
469
|
-
it('
|
|
470
|
-
const { bgColor, color } =
|
|
450
|
+
it('primary 버튼의 레이블이 라이트·다크 양쪽에서 4.5:1 을 넘는다', () => {
|
|
451
|
+
const { bgColor, color } = buttonVariantStyles.primary;
|
|
471
452
|
|
|
472
453
|
expect(
|
|
473
454
|
contrast(
|
|
@@ -488,9 +469,9 @@ describe('브랜드 색 대비 — Link · Tab 램프', () => {
|
|
|
488
469
|
* space. Ink on charcoal is the failure mode: a FIXED near-black would be
|
|
489
470
|
* ~1.2:1 against a dark canvas, which is why `bg.inverse` inverts.
|
|
490
471
|
*/
|
|
491
|
-
it('
|
|
472
|
+
it('primary 버튼의 면이 양쪽 모드에서 캔버스와 3:1 이상 갈라진다', () => {
|
|
492
473
|
const AA_NON_TEXT = 3;
|
|
493
|
-
const { bgColor } =
|
|
474
|
+
const { bgColor } = buttonVariantStyles.primary;
|
|
494
475
|
|
|
495
476
|
expect(
|
|
496
477
|
contrast(resolve(bgColor as string, 'base'), LIGHT_CANVAS)
|
package/src/components/claude.md
CHANGED
|
@@ -28,12 +28,7 @@ import { ComponentNameProps } from './ComponentName.types';
|
|
|
28
28
|
|
|
29
29
|
export const ComponentName = forwardRef(
|
|
30
30
|
({ variant = 'default', ...rest }: ComponentNameProps, ref) => {
|
|
31
|
-
return
|
|
32
|
-
<ChakraComponentName
|
|
33
|
-
ref={ref}
|
|
34
|
-
{...rest}
|
|
35
|
-
/>
|
|
36
|
-
);
|
|
31
|
+
return <ChakraComponentName ref={ref} {...rest} />;
|
|
37
32
|
}
|
|
38
33
|
);
|
|
39
34
|
|
|
@@ -55,6 +50,7 @@ export type ComponentNameProps = Omit<ChakraComponentNameProps, 'variant'> & {
|
|
|
55
50
|
```
|
|
56
51
|
|
|
57
52
|
**Key patterns:**
|
|
53
|
+
|
|
58
54
|
- Extend Chakra UI component props using `Omit<>` to override specific props
|
|
59
55
|
- Define custom variant types when overriding Chakra's variant system
|
|
60
56
|
- Export all types for external use
|
|
@@ -70,25 +66,22 @@ export const variantStyles: Record<
|
|
|
70
66
|
Partial<ComponentNameProps>
|
|
71
67
|
> = {
|
|
72
68
|
primary: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
bgColor: 'blue.800',
|
|
78
|
-
},
|
|
69
|
+
bg: 'primary.main',
|
|
70
|
+
color: 'fg.onPrimary',
|
|
71
|
+
_hover: { bg: 'primary.hover' },
|
|
72
|
+
_active: { bg: 'primary.active' },
|
|
79
73
|
},
|
|
80
74
|
secondary: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
color: '
|
|
84
|
-
_hover: {
|
|
85
|
-
bgColor: 'gray.50',
|
|
86
|
-
},
|
|
75
|
+
bg: 'bg.surface',
|
|
76
|
+
borderColor: 'border.default',
|
|
77
|
+
color: 'fg.default',
|
|
78
|
+
_hover: { bg: 'primary.wash' },
|
|
87
79
|
},
|
|
88
80
|
};
|
|
89
81
|
```
|
|
90
82
|
|
|
91
83
|
**Best practices:**
|
|
84
|
+
|
|
92
85
|
- Use theme tokens (semantic tokens preferred)
|
|
93
86
|
- Define all interactive states (`_hover`, `_focus`, `_disabled`, `_active`)
|
|
94
87
|
- Keep styles type-safe with `Partial<ComponentNameProps>`
|
|
@@ -103,6 +96,7 @@ export type { ComponentNameProps } from './ComponentName.types';
|
|
|
103
96
|
```
|
|
104
97
|
|
|
105
98
|
Then add to `src/index.ts`:
|
|
99
|
+
|
|
106
100
|
```tsx
|
|
107
101
|
export * from './components/ComponentName';
|
|
108
102
|
```
|
|
@@ -122,6 +116,7 @@ Component.displayName = 'Component';
|
|
|
122
116
|
```
|
|
123
117
|
|
|
124
118
|
**Why:**
|
|
119
|
+
|
|
125
120
|
- Enables ref forwarding for DOM manipulation
|
|
126
121
|
- Required for Chakra UI integration
|
|
127
122
|
- Supports form libraries (React Hook Form, Formik)
|
|
@@ -136,7 +131,10 @@ import { useTheme, useToken } from '@chakra-ui/react';
|
|
|
136
131
|
|
|
137
132
|
const Component = () => {
|
|
138
133
|
const theme = useTheme();
|
|
139
|
-
const primaryColor = useToken(
|
|
134
|
+
const primaryColor = useToken(
|
|
135
|
+
'colors',
|
|
136
|
+
theme.semanticTokens.colors.primary.main
|
|
137
|
+
);
|
|
140
138
|
|
|
141
139
|
// Use semantic tokens when available
|
|
142
140
|
const borderColor = theme.semanticTokens.colors.primary.main;
|
|
@@ -144,49 +142,33 @@ const Component = () => {
|
|
|
144
142
|
```
|
|
145
143
|
|
|
146
144
|
**Semantic tokens to use:**
|
|
147
|
-
|
|
148
|
-
- `
|
|
145
|
+
|
|
146
|
+
- `primary.main` / `primary.wash` / `primary.selected` - primary (BAZE black) fill, hover wash, selected row — see src/theme/SemanticTokens.mdx
|
|
147
|
+
- `danger.{bg,border,fg,solid,onSolid}` (and success/warning/info) - status states. `danger.main` is a deprecated 4.x alias
|
|
149
148
|
- `bg.*` / `fg.*` / `border.*` - Neutral surfaces, text, and borders that **flip with
|
|
150
|
-
color mode**.
|
|
151
|
-
(see `src/theme/claude.md` →
|
|
152
|
-
that must stay fixed across modes.
|
|
149
|
+
color mode**. Components never read raw scales (5.0 has no `gray` scale at all) — use these so components work in dark mode
|
|
150
|
+
(see `src/theme/claude.md` → Color System — BAZE).
|
|
153
151
|
|
|
154
152
|
### Common Style Patterns
|
|
155
153
|
|
|
156
154
|
#### Focus States
|
|
157
|
-
```tsx
|
|
158
|
-
_focus={{
|
|
159
|
-
outline: 'none',
|
|
160
|
-
boxShadow: `rgb(255, 255, 255) 0px 0px 0px 2px, ${primaryMainColor} 0px 0px 0px 4px`,
|
|
161
|
-
}}
|
|
162
|
-
```
|
|
163
155
|
|
|
164
|
-
#### Disabled States
|
|
165
156
|
```tsx
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
cursor: 'not-allowed',
|
|
169
|
-
bg: 'gray.50',
|
|
170
|
-
color: 'gray.1000',
|
|
171
|
-
}}
|
|
157
|
+
import { focusRing } from '@/utils/focusRing';
|
|
158
|
+
_focusVisible = { focusRing }; // inner bg.canvas band + outer focus.ring
|
|
172
159
|
```
|
|
173
160
|
|
|
174
|
-
#### Read-Only States
|
|
161
|
+
#### Disabled / Read-Only States
|
|
162
|
+
|
|
175
163
|
```tsx
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
cursor: 'not-allowed',
|
|
179
|
-
bg: 'gray.50',
|
|
180
|
-
color: 'gray.600',
|
|
181
|
-
borderColor: 'gray.200',
|
|
182
|
-
}}
|
|
164
|
+
import { disabledControl, disabledText } from '@/utils/disabledControl';
|
|
165
|
+
_disabled = { disabledControl }; // fixed disabled.* colours — never opacity
|
|
183
166
|
```
|
|
184
167
|
|
|
185
168
|
#### Hover States
|
|
169
|
+
|
|
186
170
|
```tsx
|
|
187
|
-
_hover={{
|
|
188
|
-
borderColor: 'gray.600',
|
|
189
|
-
}}
|
|
171
|
+
_hover={{ borderColor: 'border.strong' }}
|
|
190
172
|
```
|
|
191
173
|
|
|
192
174
|
## Form Components
|
|
@@ -228,9 +210,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
228
210
|
onCompositionStart={handleCompositionStart}
|
|
229
211
|
onCompositionEnd={handleCompositionEnd}
|
|
230
212
|
onKeyDown={handleKeyDown}
|
|
231
|
-
borderColor="
|
|
232
|
-
focusBorderColor="primary.main"
|
|
233
|
-
errorBorderColor="danger.main"
|
|
213
|
+
borderColor="border.control"
|
|
234
214
|
{...props}
|
|
235
215
|
/>
|
|
236
216
|
);
|
|
@@ -238,6 +218,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
238
218
|
```
|
|
239
219
|
|
|
240
220
|
**Key considerations:**
|
|
221
|
+
|
|
241
222
|
- Handle IME composition for international input
|
|
242
223
|
- Support controlled/uncontrolled modes
|
|
243
224
|
- Include focus, error, and disabled states
|
|
@@ -273,6 +254,7 @@ const createSyntheticEvent = (
|
|
|
273
254
|
### Default Values
|
|
274
255
|
|
|
275
256
|
Provide sensible defaults:
|
|
257
|
+
|
|
276
258
|
```tsx
|
|
277
259
|
const Button = ({ variant = 'secondary', size = 'md', ...rest }) => {
|
|
278
260
|
// secondary is safer default than primary
|
|
@@ -283,11 +265,12 @@ const Button = ({ variant = 'secondary', size = 'md', ...rest }) => {
|
|
|
283
265
|
### Prop Spreading
|
|
284
266
|
|
|
285
267
|
Always spread props at the end:
|
|
268
|
+
|
|
286
269
|
```tsx
|
|
287
270
|
<ChakraComponent
|
|
288
271
|
// Your custom props first
|
|
289
272
|
variant={variant}
|
|
290
|
-
borderColor="
|
|
273
|
+
borderColor="border.control"
|
|
291
274
|
// Then spread remaining props
|
|
292
275
|
{...rest}
|
|
293
276
|
/>
|
|
@@ -296,6 +279,7 @@ Always spread props at the end:
|
|
|
296
279
|
### Custom Props vs Chakra Props
|
|
297
280
|
|
|
298
281
|
Prefer Chakra's built-in props when available:
|
|
282
|
+
|
|
299
283
|
- ✅ Use `isDisabled` instead of `disabled`
|
|
300
284
|
- ✅ Use `isReadOnly` instead of `readonly`
|
|
301
285
|
- ✅ Use `isInvalid` for error states
|
|
@@ -312,12 +296,9 @@ Prefer Chakra's built-in props when available:
|
|
|
312
296
|
- Maintain proper focus management
|
|
313
297
|
|
|
314
298
|
### Example:
|
|
299
|
+
|
|
315
300
|
```tsx
|
|
316
|
-
<Button
|
|
317
|
-
aria-label="Close dialog"
|
|
318
|
-
onClick={onClose}
|
|
319
|
-
tabIndex={0}
|
|
320
|
-
>
|
|
301
|
+
<Button aria-label="Close dialog" onClick={onClose} tabIndex={0}>
|
|
321
302
|
Close
|
|
322
303
|
</Button>
|
|
323
304
|
```
|
|
@@ -337,6 +318,7 @@ import { formatNumber } from '../../utils/formatNumber';
|
|
|
337
318
|
```
|
|
338
319
|
|
|
339
320
|
Available aliases:
|
|
321
|
+
|
|
340
322
|
- `@/components/*`
|
|
341
323
|
- `@/utils/*`
|
|
342
324
|
- `@/hooks/*`
|
|
@@ -352,7 +334,7 @@ See `.storybook/claude.md` for Storybook-specific patterns.
|
|
|
352
334
|
1. **Forgetting forwardRef**: Always use it for components wrapping DOM elements
|
|
353
335
|
2. **Not setting displayName**: Required for React DevTools
|
|
354
336
|
3. **Hardcoded / non-flipping colors**: Use theme tokens instead — and for neutrals use the
|
|
355
|
-
flipping `bg.*`/`fg.*`/`border.*` tokens, not raw `
|
|
337
|
+
flipping `bg.*`/`fg.*`/`border.*` tokens, not raw scales or `white` (which stay stuck in
|
|
356
338
|
light mode under `.dark`)
|
|
357
339
|
4. **Missing focus states**: Required for accessibility
|
|
358
340
|
5. **Props in wrong order**: Custom props before spread
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/* eslint-disable no-deprecated-tokens -- the strings below are fixtures for the pattern under test */
|
|
2
|
+
import { readdirSync, readFileSync } from 'node:fs';
|
|
3
|
+
import { join, relative } from 'node:path';
|
|
4
|
+
import { describe, expect, it } from 'vitest';
|
|
5
|
+
|
|
6
|
+
import { SYSTEM_HUE_NAMES } from '@/theme/colors';
|
|
7
|
+
import { CORAL } from '@/theme/palette.generated';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Components read ROLE tokens (`bg.*`, `fg.*`, `primary.*`, `category.*` …),
|
|
11
|
+
* never a raw scale step. A raw step does not flip with colour mode or follow
|
|
12
|
+
* the `neutral` / `secondary` theme option, and the contrast audit only checks
|
|
13
|
+
* roles — so a raw step in a component is an unaudited colour.
|
|
14
|
+
*
|
|
15
|
+
* `Button.variants.test.tsx` used to check this for Button's style table only;
|
|
16
|
+
* this scans every component source file (stories and tests excluded).
|
|
17
|
+
*
|
|
18
|
+
* Only `<scale>.<step>` token strings are flagged — `'green'` as a hue name, a
|
|
19
|
+
* `category.green.surface` role, or `theme.colors.gray` property access are
|
|
20
|
+
* not.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
const ROOT = join(__dirname);
|
|
24
|
+
const REPO = join(__dirname, '..', '..');
|
|
25
|
+
|
|
26
|
+
/** 4.x primitive scales (numeric steps). */
|
|
27
|
+
const LEGACY_SCALES = [
|
|
28
|
+
'blue',
|
|
29
|
+
'violet',
|
|
30
|
+
'rose',
|
|
31
|
+
'gold',
|
|
32
|
+
'green',
|
|
33
|
+
'gray',
|
|
34
|
+
'grayDark',
|
|
35
|
+
'slate',
|
|
36
|
+
];
|
|
37
|
+
/** 5.0 raw numeric scales. */
|
|
38
|
+
const RAW_SCALES = ['ink', 'inkDark', 'sand', 'sandDark', 'slate', 'slateDark'];
|
|
39
|
+
/** Chakra's alpha scales (numeric steps). */
|
|
40
|
+
const ALPHA_SCALES = ['whiteAlpha', 'blackAlpha'];
|
|
41
|
+
/** Named-step keys of the 12 system hues. */
|
|
42
|
+
const HUE_KEYS = [
|
|
43
|
+
'base',
|
|
44
|
+
'baseDark',
|
|
45
|
+
'hc',
|
|
46
|
+
'hcDark',
|
|
47
|
+
'surface',
|
|
48
|
+
'surfaceDark',
|
|
49
|
+
'ink',
|
|
50
|
+
'inkDark',
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
const numeric = [
|
|
54
|
+
...new Set([...LEGACY_SCALES, ...RAW_SCALES, ...ALPHA_SCALES]),
|
|
55
|
+
];
|
|
56
|
+
const alt = (xs: readonly string[]) => xs.join('|');
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Not preceded by a word char, `.`, `$` or `-` (so `category.blue.surface`,
|
|
60
|
+
* `colors.gray.100` and `--chakra-colors-gray-100` are not hits); not followed
|
|
61
|
+
* by a word char or `.`.
|
|
62
|
+
*/
|
|
63
|
+
const TOKEN = new RegExp(
|
|
64
|
+
`(?<![\\w.$-])(?:` +
|
|
65
|
+
`(?:${alt(numeric)})\\.\\d+` +
|
|
66
|
+
`|coral\\.(?:${alt(Object.keys(CORAL))})` +
|
|
67
|
+
`|(?:${alt(SYSTEM_HUE_NAMES)})\\.(?:${alt(HUE_KEYS)})` +
|
|
68
|
+
`)(?![\\w.])`,
|
|
69
|
+
'g'
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Files allowed to name raw steps, and why. Keep this short and specific:
|
|
74
|
+
* an entry needs a reason a reviewer would accept, not "TODO".
|
|
75
|
+
*/
|
|
76
|
+
const ALLOWED: Record<string, string> = {
|
|
77
|
+
// The sheet's scrim is the same `blackAlpha.500` Chakra's own dialog
|
|
78
|
+
// backdrop recipe uses (Modal inherits it), so a sheet and a modal dim the
|
|
79
|
+
// page identically. A scrim is meant to be mode-invariant; there is no role
|
|
80
|
+
// token for it.
|
|
81
|
+
'src/components/BottomSheet/BottomSheet.styles.ts':
|
|
82
|
+
'mirrors Chakra dialog backdrop (blackAlpha.500)',
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const walk = (dir: string): string[] =>
|
|
86
|
+
readdirSync(dir, { withFileTypes: true }).flatMap((d) => {
|
|
87
|
+
const p = join(dir, d.name);
|
|
88
|
+
if (d.isDirectory()) return walk(p);
|
|
89
|
+
return /\.(ts|tsx)$/.test(d.name) &&
|
|
90
|
+
!/\.(stories|test|spec)\.(ts|tsx)$/.test(d.name) &&
|
|
91
|
+
!d.name.endsWith('.d.ts')
|
|
92
|
+
? [p]
|
|
93
|
+
: [];
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
/** Drop comments, keeping line numbers. */
|
|
97
|
+
const stripComments = (src: string) =>
|
|
98
|
+
src
|
|
99
|
+
.replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, ' '))
|
|
100
|
+
.replace(/(^|[^:'"`\\])\/\/[^\n]*/g, '$1');
|
|
101
|
+
|
|
102
|
+
const findHits = () => {
|
|
103
|
+
const hits: string[] = [];
|
|
104
|
+
for (const file of walk(ROOT)) {
|
|
105
|
+
const rel = relative(REPO, file);
|
|
106
|
+
if (rel in ALLOWED) continue;
|
|
107
|
+
const lines = stripComments(readFileSync(file, 'utf8')).split('\n');
|
|
108
|
+
lines.forEach((line, i) => {
|
|
109
|
+
for (const m of line.matchAll(TOKEN)) {
|
|
110
|
+
hits.push(`${rel}:${i + 1} ${m[0]}`);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return hits;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
describe('components read no raw palette scales', () => {
|
|
118
|
+
it('the pattern flags raw steps and spares roles', () => {
|
|
119
|
+
const flagged = (s: string) => (s.match(TOKEN) ?? []).length > 0;
|
|
120
|
+
for (const raw of [
|
|
121
|
+
"'gray.50'",
|
|
122
|
+
'"blue.500"',
|
|
123
|
+
"'grayDark.200'",
|
|
124
|
+
"'ink.12'",
|
|
125
|
+
"'sandDark.3'",
|
|
126
|
+
"'coral.base'",
|
|
127
|
+
"'red.surface'",
|
|
128
|
+
"'blue.hc'",
|
|
129
|
+
"'blackAlpha.600'",
|
|
130
|
+
'`whiteAlpha.300`',
|
|
131
|
+
]) {
|
|
132
|
+
expect(flagged(raw), raw).toBe(true);
|
|
133
|
+
}
|
|
134
|
+
for (const role of [
|
|
135
|
+
"'category.green.surface'",
|
|
136
|
+
"'green'",
|
|
137
|
+
"'fg.default'",
|
|
138
|
+
'theme.colors.gray.100',
|
|
139
|
+
"'--chakra-colors-gray-100'",
|
|
140
|
+
"'secondary.surface'",
|
|
141
|
+
"'neutral.12'",
|
|
142
|
+
"'secondary.3'",
|
|
143
|
+
"'primary.main'",
|
|
144
|
+
]) {
|
|
145
|
+
expect(flagged(role), role).toBe(false);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
it('no component source names a raw scale step', () => {
|
|
150
|
+
expect(findHits()).toEqual([]);
|
|
151
|
+
});
|
|
152
|
+
});
|