@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
|
@@ -1,39 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Flex } from '@chakra-ui/react';
|
|
2
2
|
import { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
|
|
4
|
-
import { Chip
|
|
4
|
+
import { Chip } from '.';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* **Deprecated since 5.0** — `Chip` is a thin alias of `Tag` and is removed in
|
|
8
|
+
* 6.0. These stories only show that unmigrated call sites still render; new
|
|
9
|
+
* code uses `Tag` (`tone`, `selected`, `category`).
|
|
8
10
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* - `variant`: How it looks visually (solid, soft, outline)
|
|
11
|
+
* Mapping: `outline` → neutral · `primary` + `solid` → `selected` ·
|
|
12
|
+
* `danger` / `success` / `warning` → that `tone` · everything else → neutral.
|
|
12
13
|
*/
|
|
13
14
|
const meta = {
|
|
14
|
-
title: 'Components/Chip',
|
|
15
|
+
title: 'Components/Chip (deprecated)',
|
|
15
16
|
component: Chip,
|
|
16
17
|
tags: ['autodocs'],
|
|
17
18
|
args: {
|
|
18
19
|
children: 'Chip',
|
|
19
|
-
colorScheme: 'primary',
|
|
20
|
-
variant: 'soft',
|
|
21
|
-
},
|
|
22
|
-
argTypes: {
|
|
23
|
-
colorScheme: {
|
|
24
|
-
control: 'select',
|
|
25
|
-
options: colorSchemes,
|
|
26
|
-
description: 'The semantic color of the chip',
|
|
27
|
-
},
|
|
28
|
-
variant: {
|
|
29
|
-
control: 'select',
|
|
30
|
-
options: variants,
|
|
31
|
-
description: 'The visual style of the chip',
|
|
32
|
-
},
|
|
33
|
-
children: {
|
|
34
|
-
control: 'text',
|
|
35
|
-
description: 'The content of the chip',
|
|
36
|
-
},
|
|
37
20
|
},
|
|
38
21
|
} satisfies Meta<typeof Chip>;
|
|
39
22
|
|
|
@@ -41,223 +24,27 @@ export default meta;
|
|
|
41
24
|
|
|
42
25
|
type Story = StoryObj<typeof meta>;
|
|
43
26
|
|
|
44
|
-
/**
|
|
45
|
-
* Default chip with primary color and soft variant.
|
|
46
|
-
*/
|
|
47
27
|
export const Default: Story = {};
|
|
48
28
|
|
|
49
|
-
/**
|
|
50
|
-
|
|
51
|
-
*/
|
|
52
|
-
export const Primary: Story = {
|
|
29
|
+
/** 4.x props on the left of each pair render as the 5.0 Tag on the right. */
|
|
30
|
+
export const LegacyMapping: Story = {
|
|
53
31
|
render: () => (
|
|
54
|
-
<Flex gap={3} align="center">
|
|
55
|
-
<Chip colorScheme="primary" variant="solid">
|
|
56
|
-
Solid
|
|
57
|
-
</Chip>
|
|
32
|
+
<Flex gap={3} wrap="wrap" align="center">
|
|
58
33
|
<Chip colorScheme="primary" variant="soft">
|
|
59
|
-
|
|
60
|
-
</Chip>
|
|
61
|
-
<Chip colorScheme="primary" variant="outline">
|
|
62
|
-
Outline
|
|
63
|
-
</Chip>
|
|
64
|
-
</Flex>
|
|
65
|
-
),
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Secondary color chips in different variants.
|
|
70
|
-
*/
|
|
71
|
-
export const Secondary: Story = {
|
|
72
|
-
render: () => (
|
|
73
|
-
<Flex gap={3} align="center">
|
|
74
|
-
<Chip colorScheme="secondary" variant="solid">
|
|
75
|
-
Solid
|
|
76
|
-
</Chip>
|
|
77
|
-
<Chip colorScheme="secondary" variant="soft">
|
|
78
|
-
Soft
|
|
79
|
-
</Chip>
|
|
80
|
-
<Chip colorScheme="secondary" variant="outline">
|
|
81
|
-
Outline
|
|
34
|
+
primary soft → neutral
|
|
82
35
|
</Chip>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Danger color chips for error states.
|
|
89
|
-
*/
|
|
90
|
-
export const Danger: Story = {
|
|
91
|
-
render: () => (
|
|
92
|
-
<Flex gap={3} align="center">
|
|
93
|
-
<Chip colorScheme="danger" variant="solid">
|
|
94
|
-
Error
|
|
36
|
+
<Chip colorScheme="primary" variant="solid">
|
|
37
|
+
primary solid → selected
|
|
95
38
|
</Chip>
|
|
96
39
|
<Chip colorScheme="danger" variant="soft">
|
|
97
|
-
|
|
98
|
-
</Chip>
|
|
99
|
-
<Chip colorScheme="danger" variant="outline">
|
|
100
|
-
Error
|
|
40
|
+
danger → tone danger
|
|
101
41
|
</Chip>
|
|
102
|
-
</Flex>
|
|
103
|
-
),
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Success color chips for completed states.
|
|
108
|
-
*/
|
|
109
|
-
export const Success: Story = {
|
|
110
|
-
render: () => (
|
|
111
|
-
<Flex gap={3} align="center">
|
|
112
42
|
<Chip colorScheme="success" variant="solid">
|
|
113
|
-
|
|
114
|
-
</Chip>
|
|
115
|
-
<Chip colorScheme="success" variant="soft">
|
|
116
|
-
Completed
|
|
117
|
-
</Chip>
|
|
118
|
-
<Chip colorScheme="success" variant="outline">
|
|
119
|
-
Completed
|
|
120
|
-
</Chip>
|
|
121
|
-
</Flex>
|
|
122
|
-
),
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Warning color chips for pending states.
|
|
127
|
-
*/
|
|
128
|
-
export const Warning: Story = {
|
|
129
|
-
render: () => (
|
|
130
|
-
<Flex gap={3} align="center">
|
|
131
|
-
<Chip colorScheme="warning" variant="solid">
|
|
132
|
-
Pending
|
|
133
|
-
</Chip>
|
|
134
|
-
<Chip colorScheme="warning" variant="soft">
|
|
135
|
-
Pending
|
|
43
|
+
success → tone success
|
|
136
44
|
</Chip>
|
|
137
45
|
<Chip colorScheme="warning" variant="outline">
|
|
138
|
-
|
|
139
|
-
</Chip>
|
|
140
|
-
</Flex>
|
|
141
|
-
),
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Neutral color chips for default states.
|
|
146
|
-
*/
|
|
147
|
-
export const Neutral: Story = {
|
|
148
|
-
render: () => (
|
|
149
|
-
<Flex gap={3} align="center">
|
|
150
|
-
<Chip colorScheme="neutral" variant="solid">
|
|
151
|
-
Draft
|
|
152
|
-
</Chip>
|
|
153
|
-
<Chip colorScheme="neutral" variant="soft">
|
|
154
|
-
Draft
|
|
46
|
+
outline → neutral
|
|
155
47
|
</Chip>
|
|
156
|
-
<Chip colorScheme="neutral" variant="outline">
|
|
157
|
-
Draft
|
|
158
|
-
</Chip>
|
|
159
|
-
</Flex>
|
|
160
|
-
),
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Shows all combinations of colorScheme × variant in a matrix layout.
|
|
165
|
-
*/
|
|
166
|
-
export const AllCombinations: Story = {
|
|
167
|
-
render: () => (
|
|
168
|
-
<Box>
|
|
169
|
-
{/* Header row */}
|
|
170
|
-
<Flex mb={4} gap={4} align="center">
|
|
171
|
-
<Box w="100px" />
|
|
172
|
-
{variants.map((variant) => (
|
|
173
|
-
<Box key={variant} w="100px" textAlign="center">
|
|
174
|
-
<Text fontWeight="bold" textStyle="subtext">
|
|
175
|
-
{variant}
|
|
176
|
-
</Text>
|
|
177
|
-
</Box>
|
|
178
|
-
))}
|
|
179
|
-
</Flex>
|
|
180
|
-
|
|
181
|
-
{/* Color scheme rows */}
|
|
182
|
-
{colorSchemes.map((colorScheme) => (
|
|
183
|
-
<Flex key={colorScheme} mb={4} gap={4} align="center">
|
|
184
|
-
<Box w="100px">
|
|
185
|
-
<Text fontWeight="medium" textStyle="subtext">
|
|
186
|
-
{colorScheme}
|
|
187
|
-
</Text>
|
|
188
|
-
</Box>
|
|
189
|
-
{variants.map((variant) => (
|
|
190
|
-
<Box key={`${colorScheme}-${variant}`} w="100px" textAlign="center">
|
|
191
|
-
<Chip colorScheme={colorScheme} variant={variant}>
|
|
192
|
-
Chip
|
|
193
|
-
</Chip>
|
|
194
|
-
</Box>
|
|
195
|
-
))}
|
|
196
|
-
</Flex>
|
|
197
|
-
))}
|
|
198
|
-
</Box>
|
|
199
|
-
),
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Chips in use cases with labels.
|
|
204
|
-
*/
|
|
205
|
-
export const UseCases: Story = {
|
|
206
|
-
render: () => (
|
|
207
|
-
<Flex direction="column" gap={6}>
|
|
208
|
-
<Box>
|
|
209
|
-
<Text mb={2} fontWeight="bold">
|
|
210
|
-
Status indicators:
|
|
211
|
-
</Text>
|
|
212
|
-
<Flex gap={2} wrap="wrap">
|
|
213
|
-
<Chip colorScheme="success" variant="soft">
|
|
214
|
-
Active
|
|
215
|
-
</Chip>
|
|
216
|
-
<Chip colorScheme="warning" variant="soft">
|
|
217
|
-
Pending
|
|
218
|
-
</Chip>
|
|
219
|
-
<Chip colorScheme="danger" variant="soft">
|
|
220
|
-
Inactive
|
|
221
|
-
</Chip>
|
|
222
|
-
<Chip colorScheme="neutral" variant="soft">
|
|
223
|
-
Draft
|
|
224
|
-
</Chip>
|
|
225
|
-
</Flex>
|
|
226
|
-
</Box>
|
|
227
|
-
|
|
228
|
-
<Box>
|
|
229
|
-
<Text mb={2} fontWeight="bold">
|
|
230
|
-
Category tags:
|
|
231
|
-
</Text>
|
|
232
|
-
<Flex gap={2} wrap="wrap">
|
|
233
|
-
<Chip colorScheme="primary" variant="outline">
|
|
234
|
-
React
|
|
235
|
-
</Chip>
|
|
236
|
-
<Chip colorScheme="secondary" variant="outline">
|
|
237
|
-
TypeScript
|
|
238
|
-
</Chip>
|
|
239
|
-
<Chip colorScheme="success" variant="outline">
|
|
240
|
-
Chakra UI
|
|
241
|
-
</Chip>
|
|
242
|
-
</Flex>
|
|
243
|
-
</Box>
|
|
244
|
-
|
|
245
|
-
<Box>
|
|
246
|
-
<Text mb={2} fontWeight="bold">
|
|
247
|
-
Priority levels:
|
|
248
|
-
</Text>
|
|
249
|
-
<Flex gap={2} wrap="wrap">
|
|
250
|
-
<Chip colorScheme="danger" variant="solid">
|
|
251
|
-
High
|
|
252
|
-
</Chip>
|
|
253
|
-
<Chip colorScheme="warning" variant="solid">
|
|
254
|
-
Medium
|
|
255
|
-
</Chip>
|
|
256
|
-
<Chip colorScheme="neutral" variant="solid">
|
|
257
|
-
Low
|
|
258
|
-
</Chip>
|
|
259
|
-
</Flex>
|
|
260
|
-
</Box>
|
|
261
48
|
</Flex>
|
|
262
49
|
),
|
|
263
50
|
};
|
|
@@ -1,38 +1,50 @@
|
|
|
1
1
|
import { ForwardedRef, forwardRef } from 'react';
|
|
2
|
-
import { Badge as ChakraBadge } from '@chakra-ui/react';
|
|
3
|
-
|
|
4
|
-
import { focusRing } from '@/utils/focusRing';
|
|
5
2
|
|
|
6
3
|
import { polymorphic } from '../../types/polymorphic';
|
|
7
|
-
import {
|
|
4
|
+
import { Tag } from '../Tag/Tag';
|
|
8
5
|
import { ChipOwnProps } from './Chip.types';
|
|
9
6
|
|
|
10
7
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
8
|
+
* @deprecated Since 5.0 `Chip` is a thin alias of `Tag` and will be removed in
|
|
9
|
+
* 6.0. Replace `<Chip colorScheme="danger" variant="soft">` with
|
|
10
|
+
* `<Tag tone="danger">`, a "solid" (primary / secondary / neutral) chip with
|
|
11
|
+
* `<Tag as="button" selected>`, and everything else with `<Tag>`. Full table:
|
|
12
|
+
* `mapLegacyTagProps`. Warns once per colorScheme × variant in development.
|
|
16
13
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* <Chip colorScheme="primary" variant="solid">Active</Chip>
|
|
20
|
-
* <Chip colorScheme="danger" variant="soft">Error</Chip>
|
|
21
|
-
* <Chip colorScheme="success" variant="outline">Completed</Chip>
|
|
22
|
-
* ```
|
|
14
|
+
* The alias keeps Chip's pill shape (32px radius, roomier padding) so an
|
|
15
|
+
* unmigrated screen does not shift.
|
|
23
16
|
*/
|
|
24
17
|
const ChipImpl = forwardRef(
|
|
25
18
|
(
|
|
26
|
-
{
|
|
27
|
-
|
|
19
|
+
{
|
|
20
|
+
colorScheme,
|
|
21
|
+
colorPalette,
|
|
22
|
+
variant = 'soft',
|
|
23
|
+
tone,
|
|
24
|
+
selected,
|
|
25
|
+
...rest
|
|
26
|
+
}: ChipOwnProps,
|
|
27
|
+
ref?: ForwardedRef<HTMLDivElement>
|
|
28
28
|
) => {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
// Tag owns the mapping (see `mapLegacyTagProps`) and the once-per-combo
|
|
30
|
+
// dev warning; Chip only supplies its 4.x defaults (primary / soft) and
|
|
31
|
+
// its name. Passing the pair through, rather than a mapped `selected`,
|
|
32
|
+
// keeps a "solid" Chip a selected *look* without turning it into a toggle.
|
|
33
|
+
const legacy = {
|
|
34
|
+
colorPalette: colorScheme ?? colorPalette ?? 'primary',
|
|
35
|
+
variant,
|
|
36
|
+
__legacyComponent: 'Chip',
|
|
37
|
+
} as object;
|
|
31
38
|
return (
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
-
{
|
|
39
|
+
<Tag
|
|
40
|
+
borderRadius="32px"
|
|
41
|
+
px={3}
|
|
42
|
+
py={2}
|
|
43
|
+
fontWeight="medium"
|
|
44
|
+
textTransform="none"
|
|
45
|
+
tone={tone}
|
|
46
|
+
selected={selected}
|
|
47
|
+
{...legacy}
|
|
36
48
|
{...rest}
|
|
37
49
|
ref={ref}
|
|
38
50
|
/>
|
|
@@ -42,5 +54,9 @@ const ChipImpl = forwardRef(
|
|
|
42
54
|
|
|
43
55
|
ChipImpl.displayName = 'Chip';
|
|
44
56
|
|
|
45
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated Use `Tag`. Removed in 6.0.
|
|
59
|
+
*
|
|
60
|
+
* Type-level polymorphism over the same runtime — see `polymorphic`.
|
|
61
|
+
*/
|
|
46
62
|
export const Chip = polymorphic<ChipOwnProps, 'span'>(ChipImpl);
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import type { ElementType } from 'react';
|
|
2
|
-
import { BadgeProps as ChakraBadgeProps } from '@chakra-ui/react';
|
|
3
2
|
|
|
4
3
|
// Relative, NOT `@/types/*` — see `src/types/polymorphic.ts`.
|
|
5
4
|
import type { PolymorphicProps } from '../../types/polymorphic';
|
|
5
|
+
import type { TagOwnProps } from '../Tag/Tag.types';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Chip
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* a controlled set of color options that align with our design system.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* <Chip colorScheme="primary" variant="solid">Primary</Chip>
|
|
15
|
-
* <Chip colorScheme="danger" variant="soft">Error</Chip>
|
|
8
|
+
* 4.x Chip colour schemes, mapped onto Tag at runtime.
|
|
9
|
+
* @deprecated `Chip` is now an alias of `Tag` — use `tone` / `selected` /
|
|
10
|
+
* `category` on `Tag`. Removed in 6.0.
|
|
16
11
|
*/
|
|
17
12
|
export type ChipColorScheme =
|
|
18
13
|
| 'primary'
|
|
@@ -23,34 +18,51 @@ export type ChipColorScheme =
|
|
|
23
18
|
| 'neutral';
|
|
24
19
|
|
|
25
20
|
/**
|
|
26
|
-
* Chip variants
|
|
27
|
-
*
|
|
28
|
-
* - solid: Filled background with contrasting text
|
|
29
|
-
* - soft: Light background tint with darker text
|
|
30
|
-
* - outline: Transparent background with colored border
|
|
21
|
+
* 4.x Chip variants, mapped onto Tag at runtime.
|
|
22
|
+
* @deprecated Use `Tag`. Removed in 6.0.
|
|
31
23
|
*/
|
|
32
24
|
export type ChipVariant = 'solid' | 'soft' | 'outline';
|
|
33
25
|
|
|
34
26
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
27
|
+
* @deprecated `Chip` is an alias of `Tag` since 5.0 — use `TagOwnProps`.
|
|
28
|
+
* Removed in 6.0.
|
|
29
|
+
*
|
|
30
|
+
* `colorScheme` / `variant` / `colorPalette` are still in the type ONLY so
|
|
31
|
+
* unmigrated 4.x call sites keep compiling; they are deprecated aliases,
|
|
32
|
+
* mapped at runtime by `mapLegacyTagProps` (with a once-per-combination dev
|
|
33
|
+
* warning) and removed with Chip in 6.0:
|
|
34
|
+
*
|
|
35
|
+
* - `primary` / `secondary` / `neutral` × `soft` (default) or `outline` → neutral
|
|
36
|
+
* - `primary` / `secondary` / `neutral` × `solid` → `selected` (look only — not
|
|
37
|
+
* a toggle unless `selected` is passed explicitly)
|
|
38
|
+
* - `danger` / `success` / `warning` × `soft` → that `tone`
|
|
39
|
+
* - `danger` / `success` / `warning` × `solid` → that `tone` (no solid fill
|
|
40
|
+
* in 5.0 — warns "choose by hand")
|
|
41
|
+
* - `danger` / `success` / `warning` × `outline` → neutral (warns "choose by hand")
|
|
38
42
|
*
|
|
39
|
-
*
|
|
43
|
+
* New Tag props (`tone`, `selected`, `category`) win when given.
|
|
40
44
|
*/
|
|
41
|
-
export type ChipOwnProps =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
export type ChipOwnProps = TagOwnProps & {
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated 4.x alias, mapped at runtime — use Tag's `tone` / `selected`.
|
|
48
|
+
* Defaults to `primary` (the 4.x Chip default).
|
|
49
|
+
*/
|
|
45
50
|
colorScheme?: ChipColorScheme;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated 4.x alias, mapped at runtime — use Tag's `selected` (for
|
|
53
|
+
* `solid`) or nothing. Defaults to `soft`.
|
|
54
|
+
*/
|
|
46
55
|
variant?: ChipVariant;
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated 4.x alias of `colorScheme` (Chakra's palette prop), mapped
|
|
58
|
+
* at runtime. `colorScheme` wins when both are given.
|
|
59
|
+
*/
|
|
60
|
+
colorPalette?: ChipColorScheme;
|
|
47
61
|
};
|
|
48
62
|
|
|
49
63
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* case that needs this — as a real link it keeps middle-click and
|
|
53
|
-
* open-in-new-tab.
|
|
64
|
+
* @deprecated `Chip` is an alias of `Tag` since 5.0 — use `TagProps`.
|
|
65
|
+
* Removed in 6.0.
|
|
54
66
|
*/
|
|
55
67
|
export type ChipProps<TElement extends ElementType = 'span'> = PolymorphicProps<
|
|
56
68
|
TElement,
|
|
@@ -97,7 +97,7 @@ export const Code = ({
|
|
|
97
97
|
cursor="pointer"
|
|
98
98
|
>
|
|
99
99
|
<ChakraCodeBlock.CopyIndicator
|
|
100
|
-
copied={<FaCheck color="success.
|
|
100
|
+
copied={<FaCheck color="success.fg" boxSize="xs" />}
|
|
101
101
|
/>
|
|
102
102
|
</ChakraCodeBlock.CopyTrigger>
|
|
103
103
|
) : null;
|
|
@@ -157,13 +157,12 @@ export const Code = ({
|
|
|
157
157
|
: String(translate('copy'))
|
|
158
158
|
}
|
|
159
159
|
size="sm"
|
|
160
|
-
colorPalette="neutral"
|
|
161
160
|
variant="ghost"
|
|
162
161
|
color="fg.muted"
|
|
163
162
|
onClick={handleOverlayCopy}
|
|
164
163
|
>
|
|
165
164
|
{isCopied ? (
|
|
166
|
-
<FaCheck color="success.
|
|
165
|
+
<FaCheck color="success.fg" boxSize="xs" />
|
|
167
166
|
) : (
|
|
168
167
|
<FaRegCopy boxSize="xs" />
|
|
169
168
|
)}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ChakraProvider } from '@chakra-ui/react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import { describe, expect, it } from 'vitest';
|
|
4
|
+
|
|
5
|
+
import { system } from '@/theme';
|
|
6
|
+
import { ROLE_TOKEN_PATHS } from '@/theme/colors';
|
|
7
|
+
import { SCHEMES } from '@/theme/palette.generated';
|
|
8
|
+
|
|
9
|
+
import { CodeTabs } from './CodeTabs';
|
|
10
|
+
import { CODE_CHROME } from './CodeTabs.styles';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The tab bar sits on Shiki `github-dark`, which is dark in both app modes, so
|
|
14
|
+
* the chrome has to be too. It read `bg.inverse` (= `tooltip.bg`: near-black in
|
|
15
|
+
* light, light sand in dark) with flipping `fg.muted` labels — ~1.4:1 in light
|
|
16
|
+
* and ~1.1:1 in dark.
|
|
17
|
+
*
|
|
18
|
+
* jsdom cannot resolve a `_dark` conditional into a colour, so the palette is
|
|
19
|
+
* measured from the generated scheme table for the token names the component
|
|
20
|
+
* reads, and a render check pins that the component reads them.
|
|
21
|
+
*/
|
|
22
|
+
type Mode = 'light' | 'dark' | 'hcLight' | 'hcDark';
|
|
23
|
+
const MODES: Mode[] = ['light', 'dark', 'hcLight', 'hcDark'];
|
|
24
|
+
type Scheme = keyof typeof SCHEMES;
|
|
25
|
+
|
|
26
|
+
const BY_PATH = Object.fromEntries(
|
|
27
|
+
Object.entries(ROLE_TOKEN_PATHS).map(([flat, path]) => [path, flat])
|
|
28
|
+
) as Record<string, keyof (typeof SCHEMES)['ink']['light']>;
|
|
29
|
+
|
|
30
|
+
const rgb = (hex: string) =>
|
|
31
|
+
[0, 2, 4].map((i) => parseInt(hex.replace('#', '').slice(i, i + 2), 16));
|
|
32
|
+
|
|
33
|
+
const luminance = ([r, g, b]: number[]) => {
|
|
34
|
+
const [R, G, B] = [r, g, b].map((v) => {
|
|
35
|
+
const c = v / 255;
|
|
36
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
37
|
+
});
|
|
38
|
+
return 0.2126 * R + 0.7152 * G + 0.0722 * B;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const contrast = (a: number[], b: number[]) => {
|
|
42
|
+
const [hi, lo] = [luminance(a), luminance(b)].sort((x, y) => y - x);
|
|
43
|
+
return (hi + 0.05) / (lo + 0.05);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** Token (optionally `token/NN` alpha) → rgb, composited over `under`. */
|
|
47
|
+
const resolve = (
|
|
48
|
+
scheme: Scheme,
|
|
49
|
+
mode: Mode,
|
|
50
|
+
token: string,
|
|
51
|
+
under?: number[]
|
|
52
|
+
) => {
|
|
53
|
+
const [path, alpha] = token.split('/');
|
|
54
|
+
const flat = BY_PATH[path];
|
|
55
|
+
if (!flat) throw new Error(`no scheme entry for ${path}`);
|
|
56
|
+
const value = rgb(SCHEMES[scheme][mode][flat]);
|
|
57
|
+
if (!alpha) return value;
|
|
58
|
+
const t = Number(alpha) / 100;
|
|
59
|
+
return value.map((v, i) => v * t + under![i] * (1 - t));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const WHITE = [255, 255, 255];
|
|
63
|
+
|
|
64
|
+
describe('CodeTabs chrome palette', () => {
|
|
65
|
+
for (const scheme of Object.keys(SCHEMES) as Scheme[]) {
|
|
66
|
+
for (const mode of MODES) {
|
|
67
|
+
it(`${scheme} ${mode}: dark surface, labels ≥ 4.5:1`, () => {
|
|
68
|
+
const bg = resolve(scheme, mode, CODE_CHROME.bg);
|
|
69
|
+
const hover = resolve(scheme, mode, CODE_CHROME.bgHover);
|
|
70
|
+
// Dark in every mode: light text on it, like github-dark's own ground.
|
|
71
|
+
expect(contrast(bg, WHITE)).toBeGreaterThan(7);
|
|
72
|
+
|
|
73
|
+
const fg = resolve(scheme, mode, CODE_CHROME.fg);
|
|
74
|
+
expect(contrast(fg, bg)).toBeGreaterThanOrEqual(4.5);
|
|
75
|
+
expect(contrast(fg, hover)).toBeGreaterThanOrEqual(4.5);
|
|
76
|
+
|
|
77
|
+
const muted = resolve(scheme, mode, CODE_CHROME.fgMuted, bg);
|
|
78
|
+
expect(contrast(muted, bg)).toBeGreaterThanOrEqual(4.5);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
it(`${scheme}: same surface family in light and dark`, () => {
|
|
83
|
+
// Not the same hex (BAZE dark is a warmer ink), but never flipped.
|
|
84
|
+
const light = luminance(resolve(scheme, 'light', CODE_CHROME.bg));
|
|
85
|
+
const dark = luminance(resolve(scheme, 'dark', CODE_CHROME.bg));
|
|
86
|
+
expect(Math.abs(light - dark)).toBeLessThan(0.05);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
describe('CodeTabs reads the chrome tokens', () => {
|
|
92
|
+
it('tab bar and labels use CODE_CHROME', () => {
|
|
93
|
+
render(
|
|
94
|
+
<ChakraProvider value={system}>
|
|
95
|
+
<CodeTabs code={{ js: 'a', py: 'b' }} onCopy={() => {}} />
|
|
96
|
+
</ChakraProvider>
|
|
97
|
+
);
|
|
98
|
+
const selected = screen.getByRole('tab', { name: 'js' });
|
|
99
|
+
const root = selected.closest<HTMLElement>(
|
|
100
|
+
'[data-scope="tabs"][data-part="root"]'
|
|
101
|
+
)!;
|
|
102
|
+
expect(getComputedStyle(root).backgroundColor).toContain(
|
|
103
|
+
'--chakra-colors-action-bg'
|
|
104
|
+
);
|
|
105
|
+
expect(getComputedStyle(selected).color).toContain(
|
|
106
|
+
'--chakra-colors-action-fg'
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CodeTabs chrome (tab bar, copy button) and the code body under it.
|
|
3
|
+
*
|
|
4
|
+
* The code is highlighted with Shiki's `github-dark`, whose token colours are
|
|
5
|
+
* written for a dark ground in BOTH app modes, so the surface must stay dark in
|
|
6
|
+
* both too. `bg.inverse` does not: it is `tooltip.bg`, near-black in light but
|
|
7
|
+
* light sand in dark, and the `fg.muted` text on it flipped as well (~1.4:1 in
|
|
8
|
+
* light, ~1.1:1 in dark).
|
|
9
|
+
*
|
|
10
|
+
* `action.*` is the one role pair that is dark in every mode (BAZE ink:
|
|
11
|
+
* #252525 light / #38332E dark, `action.fg` 12.5–13.2:1 on it, high contrast
|
|
12
|
+
* included), so the chrome reads it. The unselected label is `action.fg` at
|
|
13
|
+
* 70% — ≥ 7.0:1 on `action.bg` and ≥ 5.6:1 on `action.bgHover`, both schemes,
|
|
14
|
+
* all four modes.
|
|
15
|
+
*
|
|
16
|
+
* Borrowed rather than owned: `action.*` is the Run button's role. A dedicated
|
|
17
|
+
* `code.*` role family (bg / fg / fgMuted / bgHover) would be the clean home.
|
|
18
|
+
*/
|
|
19
|
+
export const CODE_CHROME = {
|
|
20
|
+
bg: 'action.bg',
|
|
21
|
+
bgHover: 'action.bgHover',
|
|
22
|
+
bgActive: 'action.bgActive',
|
|
23
|
+
fg: 'action.fg',
|
|
24
|
+
fgMuted: 'action.fg/70',
|
|
25
|
+
divider: 'action.fg/15',
|
|
26
|
+
} as const;
|
|
@@ -4,6 +4,7 @@ import { Box, Flex } from '@chakra-ui/react';
|
|
|
4
4
|
import { Code } from '@/components/Code';
|
|
5
5
|
import { Tab, TabList, Tabs } from '@/components/Tabs';
|
|
6
6
|
|
|
7
|
+
import { CODE_CHROME } from './CodeTabs.styles';
|
|
7
8
|
import { CodeTabsProps } from './CodeTabs.types';
|
|
8
9
|
import { CopyButton } from './CopyButton';
|
|
9
10
|
|
|
@@ -19,13 +20,14 @@ export const CodeTabs = ({ code, onCopy, ...rest }: CodeTabsProps) => {
|
|
|
19
20
|
|
|
20
21
|
return (
|
|
21
22
|
<Tabs
|
|
22
|
-
|
|
23
|
+
// Fixed dark chrome in both modes — see `CODE_CHROME`.
|
|
24
|
+
bgColor={CODE_CHROME.bg}
|
|
23
25
|
borderRadius="md"
|
|
24
26
|
value={selectedValue}
|
|
25
27
|
onValueChange={(details) => setSelectedValue(details.value)}
|
|
26
28
|
{...rest}
|
|
27
29
|
>
|
|
28
|
-
<TabList px={2} alignItems="center">
|
|
30
|
+
<TabList px={2} alignItems="center" borderColor={CODE_CHROME.divider}>
|
|
29
31
|
<Flex w="100%" flex={1}>
|
|
30
32
|
{languages.map((language) => (
|
|
31
33
|
<Tab
|
|
@@ -39,9 +41,11 @@ export const CodeTabs = ({ code, onCopy, ...rest }: CodeTabsProps) => {
|
|
|
39
41
|
textTransform="uppercase"
|
|
40
42
|
fontWeight="bold"
|
|
41
43
|
textStyle="subtext"
|
|
42
|
-
|
|
44
|
+
color={CODE_CHROME.fgMuted}
|
|
45
|
+
_selected={{ color: CODE_CHROME.fg }}
|
|
43
46
|
_hover={{
|
|
44
|
-
bgColor:
|
|
47
|
+
bgColor: CODE_CHROME.bgHover,
|
|
48
|
+
color: CODE_CHROME.fg,
|
|
45
49
|
}}
|
|
46
50
|
>
|
|
47
51
|
{language}
|
|
@@ -60,6 +64,14 @@ export const CodeTabs = ({ code, onCopy, ...rest }: CodeTabsProps) => {
|
|
|
60
64
|
hideHeader
|
|
61
65
|
aria-hidden={!isSelected}
|
|
62
66
|
containerProps={{
|
|
67
|
+
// The body sits on the same fixed-dark surface: Chakra's Shiki
|
|
68
|
+
// adapter strips the `<pre>` that carries github-dark's own
|
|
69
|
+
// background, so the block would otherwise paint `bg`
|
|
70
|
+
// (= `bg.canvas`, white in light mode) under light token colours.
|
|
71
|
+
bg: CODE_CHROME.bg,
|
|
72
|
+
// Before Shiki loads, the text is plain `color`.
|
|
73
|
+
color: CODE_CHROME.fg,
|
|
74
|
+
borderColor: CODE_CHROME.bg,
|
|
63
75
|
borderRadius: 'none',
|
|
64
76
|
borderBottomRadius: 'md',
|
|
65
77
|
gridArea: '1 / 1',
|