@mindlogic-ai/logician-ui 4.0.0 → 5.0.0-alpha.1
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 +234 -0
- package/codemods/5.0/card-gradient.js +72 -0
- package/codemods/5.0/codemods.test.ts +441 -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 +131 -0
- package/dist/components/Button/Button.legacy.js.map +1 -0
- package/dist/components/Button/Button.legacy.mjs +127 -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 +142 -378
- package/dist/components/Button/Button.styles.js.map +1 -1
- package/dist/components/Button/Button.styles.mjs +141 -379
- package/dist/components/Button/Button.styles.mjs.map +1 -1
- package/dist/components/Button/Button.types.d.ts +45 -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 +181 -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 +140 -346
- package/src/components/Button/Button.styles.ts +158 -392
- package/src/components/Button/Button.tsx +49 -17
- package/src/components/Button/Button.types.ts +53 -37
- package/src/components/Button/Button.variants.test.tsx +158 -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 +344 -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
|
@@ -5,6 +5,7 @@ import { useTranslate } from '@/hooks/useTranslate';
|
|
|
5
5
|
import { FaRegCopy } from '../Icon';
|
|
6
6
|
import { IconButton } from '../IconButton';
|
|
7
7
|
import { Tooltip } from '../Tooltip';
|
|
8
|
+
import { CODE_CHROME } from './CodeTabs.styles';
|
|
8
9
|
|
|
9
10
|
export interface CopyButtonProps {
|
|
10
11
|
onCopy: (code: string) => void;
|
|
@@ -47,14 +48,15 @@ export const CopyButton = ({ onCopy, code }: CopyButtonProps) => {
|
|
|
47
48
|
aria-label="Copy"
|
|
48
49
|
borderRadius="full"
|
|
49
50
|
size="sm"
|
|
50
|
-
colorPalette="neutral"
|
|
51
51
|
variant="ghost"
|
|
52
|
-
color=
|
|
52
|
+
color={CODE_CHROME.fgMuted}
|
|
53
53
|
_hover={{
|
|
54
|
-
bgColor:
|
|
54
|
+
bgColor: CODE_CHROME.bgHover,
|
|
55
|
+
color: CODE_CHROME.fg,
|
|
55
56
|
}}
|
|
56
57
|
_active={{
|
|
57
|
-
bgColor:
|
|
58
|
+
bgColor: CODE_CHROME.bgActive,
|
|
59
|
+
color: CODE_CHROME.fg,
|
|
58
60
|
}}
|
|
59
61
|
onClick={handleCopyClick}
|
|
60
62
|
>
|
|
@@ -4,39 +4,7 @@ import { Box } from '@chakra-ui/react';
|
|
|
4
4
|
import { MOTION_DURATION_MS } from '../../theme/motion';
|
|
5
5
|
import { confettiPiece } from './Confetti.styles';
|
|
6
6
|
import { ConfettiProps } from './Confetti.types';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Literal hex, and the one place in this library that is deliberately off the
|
|
10
|
-
* palette.
|
|
11
|
-
*
|
|
12
|
-
* The first version reached for `primary.main` / `success.main` /
|
|
13
|
-
* `warning.main` / `danger.main`, which was wrong twice over. **Semantically**,
|
|
14
|
-
* those colours mean things: raining the error red and the warning amber over
|
|
15
|
-
* "payment complete" says something the screen does not. Confetti is the one
|
|
16
|
-
* element on a page with nothing to communicate, so a colour that communicates
|
|
17
|
-
* is the wrong kind of colour.
|
|
18
|
-
*
|
|
19
|
-
* **And optically**, the palette is built for interface legibility — text and
|
|
20
|
-
* controls on a light surface — so it sits dark and desaturated: average
|
|
21
|
-
* lightness 47%, nothing above 80% saturation, and three of the five in the
|
|
22
|
-
* blue range. Fifty pieces of that read as a chart legend falling. These six
|
|
23
|
-
* average 56% lightness, four of them are fully saturated, and they span the
|
|
24
|
-
* whole wheel (9°–330°), which is what makes a burst read as a burst.
|
|
25
|
-
*
|
|
26
|
-
* The cost, stated rather than hidden: these do not follow a re-theme, and they
|
|
27
|
-
* do not adapt to dark mode — a bright hex on a dark surface is brighter still.
|
|
28
|
-
* That is acceptable for a burst that lasts two seconds and carries no
|
|
29
|
-
* information, and it is why `colors` is a prop: an app that needs its own
|
|
30
|
-
* festival palette passes one.
|
|
31
|
-
*/
|
|
32
|
-
const DEFAULT_COLORS = [
|
|
33
|
-
'#FFD700', // gold
|
|
34
|
-
'#FF69B4', // hot pink
|
|
35
|
-
'#00CED1', // turquoise
|
|
36
|
-
'#FF6347', // tomato
|
|
37
|
-
'#9370DB', // medium purple
|
|
38
|
-
'#32CD32', // lime
|
|
39
|
-
];
|
|
7
|
+
import { DEFAULT_CONFETTI_COLORS } from './confettiColors';
|
|
40
8
|
|
|
41
9
|
/**
|
|
42
10
|
* A seeded generator, so one burst is stable across re-renders.
|
|
@@ -81,15 +49,12 @@ const scatter = (seed: number) => {
|
|
|
81
49
|
* nothing, and doing it in CSS keeps the decision on the same media query as
|
|
82
50
|
* every other preset instead of on a hook that has to guess before hydration.
|
|
83
51
|
*
|
|
84
|
-
* **The default colours are
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* fifty pieces of it read as a chart legend falling. The cost is real and
|
|
91
|
-
* stated: these do not follow a re-theme and do not adapt to dark mode. `colors`
|
|
92
|
-
* is a prop for an app that needs its own.
|
|
52
|
+
* **The default colours are decorative only** (`confettiColors.ts`): coral,
|
|
53
|
+
* beige and the system hues that mean nothing — red, yellow, green and blue are
|
|
54
|
+
* left out because they are the danger, warning, success and info colours, and
|
|
55
|
+
* raining error red over "payment complete" says something the screen does not.
|
|
56
|
+
* They are light-mode hex and do not flip for dark mode. `colors` is a prop for
|
|
57
|
+
* an app that needs its own.
|
|
93
58
|
*
|
|
94
59
|
* **Takes no children — it is an overlay, not a wrapper.** It renders absolutely
|
|
95
60
|
* against the nearest positioned ancestor, which is therefore the stage: give
|
|
@@ -104,7 +69,7 @@ export const Confetti = forwardRef(
|
|
|
104
69
|
(
|
|
105
70
|
{
|
|
106
71
|
pieceCount = 50,
|
|
107
|
-
colors =
|
|
72
|
+
colors = DEFAULT_CONFETTI_COLORS,
|
|
108
73
|
seed = 1,
|
|
109
74
|
...rest
|
|
110
75
|
}: ConfettiProps,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import { SCHEMES, SYSTEM_HUES } from '../../theme/palette.generated';
|
|
4
|
+
import { DEFAULT_CONFETTI_COLORS } from './confettiColors';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Status colours mean things; a celebratory burst carries no information, so
|
|
8
|
+
* its defaults must not borrow them (same rule as LineGraph/seriesColors).
|
|
9
|
+
*/
|
|
10
|
+
const STATUS_ROLES = [
|
|
11
|
+
'danger-solid',
|
|
12
|
+
'success-solid',
|
|
13
|
+
'warning-solid',
|
|
14
|
+
'info-solid',
|
|
15
|
+
];
|
|
16
|
+
const STATUS_HUES = ['red', 'yellow', 'green', 'blue'] as const;
|
|
17
|
+
|
|
18
|
+
const upper = (hex: string) => hex.toUpperCase();
|
|
19
|
+
const defaults = new Set(DEFAULT_CONFETTI_COLORS.map(upper));
|
|
20
|
+
|
|
21
|
+
describe('Confetti default colours', () => {
|
|
22
|
+
it('contain no status solid from any scheme or mode', () => {
|
|
23
|
+
const hits = Object.entries(SCHEMES).flatMap(([scheme, modes]) =>
|
|
24
|
+
Object.entries(modes as Record<string, Record<string, string>>).flatMap(
|
|
25
|
+
([mode, table]) =>
|
|
26
|
+
STATUS_ROLES.filter(
|
|
27
|
+
(role) => table[role] && defaults.has(upper(table[role]))
|
|
28
|
+
).map((role) => `${scheme}.${mode}.${role} = ${table[role]}`)
|
|
29
|
+
)
|
|
30
|
+
);
|
|
31
|
+
expect(hits).toEqual([]);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('contain no red, yellow, green or blue system hue value', () => {
|
|
35
|
+
const hits = STATUS_HUES.flatMap((hue) =>
|
|
36
|
+
Object.entries(SYSTEM_HUES[hue])
|
|
37
|
+
.filter(([, hex]) => defaults.has(upper(hex)))
|
|
38
|
+
.map(([variant, hex]) => `${hue}.${variant} = ${hex}`)
|
|
39
|
+
);
|
|
40
|
+
expect(hits).toEqual([]);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('still spans the decorative hues', () => {
|
|
44
|
+
expect(defaults.has(upper(SYSTEM_HUES.purple.base))).toBe(true);
|
|
45
|
+
expect(DEFAULT_CONFETTI_COLORS.length).toBeGreaterThanOrEqual(8);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { SystemHue } from '../../theme/colors';
|
|
2
|
+
import { CORAL, RAMPS, SYSTEM_HUES } from '../../theme/palette.generated';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Hues that carry meaning elsewhere in the system and so never colour a piece
|
|
6
|
+
* by default: red, yellow and green are the danger, warning and success
|
|
7
|
+
* solids, and blue is info and links. The same rule as the chart series
|
|
8
|
+
* defaults (`LineGraph/seriesColors.ts`) — a red piece in a "payment complete"
|
|
9
|
+
* burst says something the screen does not.
|
|
10
|
+
*/
|
|
11
|
+
export const CONFETTI_EXCLUDED_HUES = [
|
|
12
|
+
'red',
|
|
13
|
+
'yellow',
|
|
14
|
+
'green',
|
|
15
|
+
'blue',
|
|
16
|
+
] as const;
|
|
17
|
+
|
|
18
|
+
const DECORATIVE_HUES = (Object.keys(SYSTEM_HUES) as SystemHue[]).filter(
|
|
19
|
+
(hue) => !(CONFETTI_EXCLUDED_HUES as readonly string[]).includes(hue)
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Default piece colours: the house coral (`CORAL.base`, the send/accent coral —
|
|
24
|
+
* not a status colour), the house beige (`RAMPS.sand.light['8']`, the raw step
|
|
25
|
+
* behind `secondary.fg`), and the light-mode base of every system hue that
|
|
26
|
+
* carries no status meaning (brown, orange, mint, teal, cyan, indigo, purple,
|
|
27
|
+
* pink …).
|
|
28
|
+
*
|
|
29
|
+
* Raw hex rather than tokens is a choice, not a constraint. Each piece is a
|
|
30
|
+
* `<Box bg={…}>`, so a token string would resolve just as well; hex keeps the
|
|
31
|
+
* default in the same shape as the `colors` prop (any CSS colour string), and
|
|
32
|
+
* keeps the burst the same in both modes. The cost, stated rather than hidden:
|
|
33
|
+
* these are the LIGHT-mode values and do not follow dark mode — acceptable for
|
|
34
|
+
* a two-second burst that carries no information. `colors` is a prop for an
|
|
35
|
+
* app that needs its own (tokens included).
|
|
36
|
+
*/
|
|
37
|
+
export const DEFAULT_CONFETTI_COLORS: string[] = [
|
|
38
|
+
CORAL.base,
|
|
39
|
+
RAMPS.sand.light['8'],
|
|
40
|
+
...DECORATIVE_HUES.map((hue) => SYSTEM_HUES[hue].base),
|
|
41
|
+
];
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { Flex, HStack, Text } from '@chakra-ui/react';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import { BellIcon } from '../Icon';
|
|
5
|
+
import { IconButton } from '../IconButton';
|
|
6
|
+
import { CountBadge } from '.';
|
|
7
|
+
|
|
8
|
+
const meta = {
|
|
9
|
+
title: 'Components/CountBadge',
|
|
10
|
+
component: CountBadge,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
args: {
|
|
13
|
+
count: 5,
|
|
14
|
+
},
|
|
15
|
+
argTypes: {
|
|
16
|
+
count: { control: 'number' },
|
|
17
|
+
max: { control: 'number' },
|
|
18
|
+
dot: { control: 'boolean' },
|
|
19
|
+
showZero: { control: 'boolean' },
|
|
20
|
+
label: { control: 'text' },
|
|
21
|
+
size: { control: 'radio', options: ['sm', 'md', 'lg'] },
|
|
22
|
+
},
|
|
23
|
+
} satisfies Meta<typeof CountBadge>;
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
|
|
29
|
+
export const Basic: Story = {};
|
|
30
|
+
|
|
31
|
+
/** Above `max` (default 99) the badge reads `99+`. */
|
|
32
|
+
export const Capped: Story = {
|
|
33
|
+
args: { count: 120, label: '읽지 않은 알림 120개' },
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** Count 0 renders nothing unless `showZero`. */
|
|
37
|
+
export const Zero: Story = {
|
|
38
|
+
render: () => (
|
|
39
|
+
<HStack gap={4}>
|
|
40
|
+
<Text textStyle="subtext">count=0 →</Text>
|
|
41
|
+
<CountBadge count={0} />
|
|
42
|
+
<Text textStyle="subtext">showZero →</Text>
|
|
43
|
+
<CountBadge count={0} showZero />
|
|
44
|
+
</HStack>
|
|
45
|
+
),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** Dot mode: no number. `aria-hidden` unless a `label` is given. */
|
|
49
|
+
export const Dot: Story = {
|
|
50
|
+
render: () => (
|
|
51
|
+
<HStack gap={4}>
|
|
52
|
+
<CountBadge dot size="sm" />
|
|
53
|
+
<CountBadge dot />
|
|
54
|
+
<CountBadge dot size="lg" label="새 소식" />
|
|
55
|
+
</HStack>
|
|
56
|
+
),
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const Sizes: Story = {
|
|
60
|
+
render: () => (
|
|
61
|
+
<Flex gap={4} align="center">
|
|
62
|
+
{(['sm', 'md', 'lg'] as const).map((size) => (
|
|
63
|
+
<HStack key={size} gap={2}>
|
|
64
|
+
<CountBadge size={size} count={3} />
|
|
65
|
+
<CountBadge size={size} count={42} />
|
|
66
|
+
<CountBadge size={size} count={1000} />
|
|
67
|
+
</HStack>
|
|
68
|
+
))}
|
|
69
|
+
</Flex>
|
|
70
|
+
),
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/** Next to a label, as in a nav item. */
|
|
74
|
+
export const InContext: Story = {
|
|
75
|
+
render: () => (
|
|
76
|
+
<HStack gap={2}>
|
|
77
|
+
<Text>받은 편지함</Text>
|
|
78
|
+
<CountBadge count={12} label="읽지 않은 메시지 12개" />
|
|
79
|
+
</HStack>
|
|
80
|
+
),
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* On an icon-only button the count belongs in the BUTTON's `aria-label`:
|
|
85
|
+
* that label replaces the button's whole subtree as its accessible name, so a
|
|
86
|
+
* `label` on the badge would never be announced. The badge stays unlabelled
|
|
87
|
+
* and is only the visible number.
|
|
88
|
+
*/
|
|
89
|
+
export const OnIconButton: Story = {
|
|
90
|
+
render: () => {
|
|
91
|
+
const unread = 5;
|
|
92
|
+
return (
|
|
93
|
+
<IconButton
|
|
94
|
+
aria-label={`알림, 읽지 않음 ${unread}개`}
|
|
95
|
+
variant="ghost"
|
|
96
|
+
position="relative"
|
|
97
|
+
>
|
|
98
|
+
<BellIcon />
|
|
99
|
+
<CountBadge
|
|
100
|
+
count={unread}
|
|
101
|
+
size="sm"
|
|
102
|
+
position="absolute"
|
|
103
|
+
top="-2px"
|
|
104
|
+
right="-2px"
|
|
105
|
+
/>
|
|
106
|
+
</IconButton>
|
|
107
|
+
);
|
|
108
|
+
},
|
|
109
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { BoxProps } from '@chakra-ui/react';
|
|
2
|
+
|
|
3
|
+
import type { CountBadgeSize } from './CountBadge.types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Shared look: the `count.*` pair (coral-red fill, white number), a pill whose
|
|
7
|
+
* min-width equals its height so a single digit is a circle, and tabular
|
|
8
|
+
* figures so the width does not jitter as the number changes.
|
|
9
|
+
*/
|
|
10
|
+
export const countBadgeBaseStyles: BoxProps = {
|
|
11
|
+
display: 'inline-flex',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
flexShrink: 0,
|
|
15
|
+
bgColor: 'count.bg',
|
|
16
|
+
color: 'count.fg',
|
|
17
|
+
borderRadius: 'full',
|
|
18
|
+
fontWeight: 'bold',
|
|
19
|
+
lineHeight: '1',
|
|
20
|
+
whiteSpace: 'nowrap',
|
|
21
|
+
fontVariantNumeric: 'tabular-nums',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const countBadgeSizeStyles: Record<CountBadgeSize, BoxProps> = {
|
|
25
|
+
sm: { h: '16px', minW: '16px', px: '4px', fontSize: '10px' },
|
|
26
|
+
md: { h: '18px', minW: '18px', px: '5px', fontSize: '11px' },
|
|
27
|
+
lg: { h: '22px', minW: '22px', px: '6px', fontSize: '12px' },
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const countBadgeDotSizes: Record<CountBadgeSize, string> = {
|
|
31
|
+
sm: '6px',
|
|
32
|
+
md: '8px',
|
|
33
|
+
lg: '10px',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** `120, 99 → "99+"`; negative / non-finite → `"0"`. */
|
|
37
|
+
export const formatCount = (count: number, max: number): string => {
|
|
38
|
+
const safe = Number.isFinite(count) && count > 0 ? Math.floor(count) : 0;
|
|
39
|
+
return safe > max ? `${max}+` : String(safe);
|
|
40
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { CountBadge } from './CountBadge';
|
|
7
|
+
|
|
8
|
+
const wrap = (ui: React.ReactNode) =>
|
|
9
|
+
render(<ChakraProvider value={system}>{ui}</ChakraProvider>);
|
|
10
|
+
|
|
11
|
+
describe('CountBadge', () => {
|
|
12
|
+
it('renders the count as text', () => {
|
|
13
|
+
wrap(<CountBadge count={5} data-testid="b" />);
|
|
14
|
+
expect(screen.getByTestId('b').textContent).toBe('5');
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('caps above max (default 99) as "99+"', () => {
|
|
18
|
+
wrap(<CountBadge count={120} data-testid="b" />);
|
|
19
|
+
expect(screen.getByTestId('b').textContent).toBe('99+');
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('honours a custom max', () => {
|
|
23
|
+
wrap(<CountBadge count={12} max={9} data-testid="b" />);
|
|
24
|
+
expect(screen.getByTestId('b').textContent).toBe('9+');
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('renders nothing for 0 unless showZero', () => {
|
|
28
|
+
const { container } = wrap(<CountBadge count={0} />);
|
|
29
|
+
expect(container.querySelector('[data-count-badge]')).toBeNull();
|
|
30
|
+
|
|
31
|
+
wrap(<CountBadge count={0} showZero data-testid="z" />);
|
|
32
|
+
expect(screen.getByTestId('z').textContent).toBe('0');
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('reads the label instead of the bare number', () => {
|
|
36
|
+
wrap(<CountBadge count={120} label="읽지 않은 알림 120개" />);
|
|
37
|
+
expect(screen.getByText('읽지 않은 알림 120개')).toBeTruthy();
|
|
38
|
+
expect(screen.getByText('99+').getAttribute('aria-hidden')).toBe('true');
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('dot mode renders a hidden dot with no number', () => {
|
|
42
|
+
wrap(<CountBadge dot count={3} data-testid="d" />);
|
|
43
|
+
const dot = screen.getByTestId('d');
|
|
44
|
+
expect(dot.textContent).toBe('');
|
|
45
|
+
expect(dot.getAttribute('aria-hidden')).toBe('true');
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('dot mode with a label is a named image', () => {
|
|
49
|
+
wrap(<CountBadge dot label="새 소식" />);
|
|
50
|
+
expect(screen.getByRole('img', { name: '새 소식' })).toBeTruthy();
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it('dot mode hides at count 0', () => {
|
|
54
|
+
const { container } = wrap(<CountBadge dot count={0} />);
|
|
55
|
+
expect(container.querySelector('[data-count-badge]')).toBeNull();
|
|
56
|
+
});
|
|
57
|
+
});
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { ForwardedRef, forwardRef } from 'react';
|
|
2
|
+
import { Box } from '@chakra-ui/react';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
countBadgeBaseStyles,
|
|
6
|
+
countBadgeDotSizes,
|
|
7
|
+
countBadgeSizeStyles,
|
|
8
|
+
formatCount,
|
|
9
|
+
} from './CountBadge.styles';
|
|
10
|
+
import { CountBadgeProps } from './CountBadge.types';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* CountBadge — an unread / notification count (moved into the design system
|
|
14
|
+
* from FactChat's `UnreadCountBadge`).
|
|
15
|
+
*
|
|
16
|
+
* - Numeric: `count` as text, capped at `max` (default 99 → `"99+"`). Renders
|
|
17
|
+
* nothing for 0 unless `showZero`.
|
|
18
|
+
* - Dot (`dot`): a small circle with no number. `aria-hidden` unless it is
|
|
19
|
+
* given a `label` — then it is an `img` with that name.
|
|
20
|
+
*
|
|
21
|
+
* Give it a `label` whenever the number alone would not make sense out of
|
|
22
|
+
* context and the badge sits in readable content — next to a nav item's
|
|
23
|
+
* text, in a list row.
|
|
24
|
+
*
|
|
25
|
+
* NOT on an icon-only button: the button's `aria-label` replaces its whole
|
|
26
|
+
* subtree as the accessible name, so the badge's hidden label is never
|
|
27
|
+
* announced. Put the count in the button's `aria-label` instead and leave
|
|
28
|
+
* the badge unlabelled (it is then only the visible number):
|
|
29
|
+
*
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <IconButton aria-label={`알림, 읽지 않음 ${n}개`} variant="ghost">
|
|
32
|
+
* <BellIcon />
|
|
33
|
+
* <CountBadge count={n} position="absolute" top={0} right={0} />
|
|
34
|
+
* </IconButton>
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <CountBadge count={5} />
|
|
40
|
+
* <CountBadge count={120} label="읽지 않은 알림 120개" /> // shows 99+
|
|
41
|
+
* <CountBadge dot label="새 소식" />
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export const CountBadge = forwardRef(
|
|
45
|
+
(
|
|
46
|
+
{
|
|
47
|
+
count,
|
|
48
|
+
max = 99,
|
|
49
|
+
dot = false,
|
|
50
|
+
showZero = false,
|
|
51
|
+
label,
|
|
52
|
+
size = 'md',
|
|
53
|
+
'aria-label': ariaLabel,
|
|
54
|
+
...rest
|
|
55
|
+
}: CountBadgeProps,
|
|
56
|
+
ref?: ForwardedRef<HTMLSpanElement>
|
|
57
|
+
) => {
|
|
58
|
+
const name = label ?? ariaLabel;
|
|
59
|
+
const isEmpty = (count ?? 0) <= 0;
|
|
60
|
+
|
|
61
|
+
if (dot) {
|
|
62
|
+
if (count !== undefined && isEmpty && !showZero) return null;
|
|
63
|
+
const dotSize = countBadgeDotSizes[size];
|
|
64
|
+
return (
|
|
65
|
+
<Box
|
|
66
|
+
as="span"
|
|
67
|
+
display="inline-block"
|
|
68
|
+
flexShrink={0}
|
|
69
|
+
boxSize={dotSize}
|
|
70
|
+
borderRadius="full"
|
|
71
|
+
bgColor="count.bg"
|
|
72
|
+
{...(name
|
|
73
|
+
? { role: 'img', 'aria-label': name }
|
|
74
|
+
: { 'aria-hidden': true })}
|
|
75
|
+
data-count-badge="dot"
|
|
76
|
+
{...rest}
|
|
77
|
+
ref={ref}
|
|
78
|
+
/>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (isEmpty && !showZero) return null;
|
|
83
|
+
|
|
84
|
+
const text = formatCount(count ?? 0, max);
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<Box
|
|
88
|
+
as="span"
|
|
89
|
+
{...countBadgeBaseStyles}
|
|
90
|
+
{...countBadgeSizeStyles[size]}
|
|
91
|
+
data-count-badge="count"
|
|
92
|
+
{...rest}
|
|
93
|
+
ref={ref}
|
|
94
|
+
>
|
|
95
|
+
{name ? (
|
|
96
|
+
<>
|
|
97
|
+
<Box as="span" aria-hidden>
|
|
98
|
+
{text}
|
|
99
|
+
</Box>
|
|
100
|
+
<Box as="span" srOnly>
|
|
101
|
+
{name}
|
|
102
|
+
</Box>
|
|
103
|
+
</>
|
|
104
|
+
) : (
|
|
105
|
+
text
|
|
106
|
+
)}
|
|
107
|
+
</Box>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
CountBadge.displayName = 'CountBadge';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { BoxProps } from '@chakra-ui/react';
|
|
2
|
+
|
|
3
|
+
export type CountBadgeSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
|
|
5
|
+
export type CountBadgeProps = Omit<BoxProps, 'children'> & {
|
|
6
|
+
/**
|
|
7
|
+
* The number to show. In numeric mode a count of 0 (or less, or missing)
|
|
8
|
+
* renders nothing unless `showZero`. In dot mode a count is optional — pass
|
|
9
|
+
* one to hide the dot when it reaches 0.
|
|
10
|
+
*/
|
|
11
|
+
count?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Largest number shown as-is; anything above renders as `"{max}+"`.
|
|
14
|
+
* @default 99
|
|
15
|
+
*/
|
|
16
|
+
max?: number;
|
|
17
|
+
/** Dot mode: a small circle with no number ("something new"). */
|
|
18
|
+
dot?: boolean;
|
|
19
|
+
/** Render `0` (numeric) / the dot (dot mode) even when `count` is 0. */
|
|
20
|
+
showZero?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Accessible name. In numeric mode it is read INSTEAD of the bare number
|
|
23
|
+
* (e.g. "읽지 않은 알림 120개" rather than "99+"); in dot mode it is what
|
|
24
|
+
* makes the dot visible to assistive tech at all — without it the dot is
|
|
25
|
+
* `aria-hidden`. `aria-label` is accepted as an alias.
|
|
26
|
+
*
|
|
27
|
+
* Inside an element that has its own `aria-label` (an icon-only button) it
|
|
28
|
+
* is never announced — that `aria-label` replaces the subtree. Put the
|
|
29
|
+
* count in the button's `aria-label` there instead.
|
|
30
|
+
*/
|
|
31
|
+
label?: string;
|
|
32
|
+
/** @default 'md' */
|
|
33
|
+
size?: CountBadgeSize;
|
|
34
|
+
};
|
|
@@ -44,7 +44,7 @@ export const RangeDatePicker = ({
|
|
|
44
44
|
...propsConfigs?.triggerBtnProps,
|
|
45
45
|
},
|
|
46
46
|
inputProps: {
|
|
47
|
-
color: '
|
|
47
|
+
color: 'fg.default',
|
|
48
48
|
...propsConfigs?.inputProps,
|
|
49
49
|
},
|
|
50
50
|
popoverCompProps: {
|
|
@@ -80,7 +80,7 @@ export const RangeDatePicker = ({
|
|
|
80
80
|
px: 6,
|
|
81
81
|
py: 4,
|
|
82
82
|
borderWidth: '1px',
|
|
83
|
-
borderColor: '
|
|
83
|
+
borderColor: 'border.default',
|
|
84
84
|
borderRadius: 16,
|
|
85
85
|
bg: 'bg.surface',
|
|
86
86
|
...propsConfigs?.calendarPanelProps?.contentProps,
|
|
@@ -110,17 +110,18 @@ export const RangeDatePicker = ({
|
|
|
110
110
|
color: 'fg.default',
|
|
111
111
|
fontWeight: 'regular',
|
|
112
112
|
_hover: {
|
|
113
|
-
background: 'primary.
|
|
113
|
+
background: 'primary.wash',
|
|
114
114
|
...propsConfigs?.dayOfMonthBtnProps?.defaultBtnProps?._hover,
|
|
115
115
|
},
|
|
116
116
|
...propsConfigs?.dayOfMonthBtnProps?.defaultBtnProps,
|
|
117
117
|
},
|
|
118
118
|
todayBtnProps: {
|
|
119
119
|
fontWeight: 'semibold',
|
|
120
|
+
boxShadow: 'inset 0 0 0 1px var(--chakra-colors-border-strong)',
|
|
120
121
|
...propsConfigs?.dayOfMonthBtnProps?.todayBtnProps,
|
|
121
122
|
},
|
|
122
123
|
selectedBtnProps: {
|
|
123
|
-
color: '
|
|
124
|
+
color: 'fg.onPrimary',
|
|
124
125
|
background: 'primary.main',
|
|
125
126
|
fontWeight: 'semibold',
|
|
126
127
|
position: 'relative',
|
|
@@ -129,8 +130,8 @@ export const RangeDatePicker = ({
|
|
|
129
130
|
...propsConfigs?.dayOfMonthBtnProps?.selectedBtnProps,
|
|
130
131
|
},
|
|
131
132
|
isInRangeBtnProps: {
|
|
132
|
-
color: '
|
|
133
|
-
background: 'primary.
|
|
133
|
+
color: 'fg.default',
|
|
134
|
+
background: 'primary.selected',
|
|
134
135
|
borderRadius: 'none',
|
|
135
136
|
css: {
|
|
136
137
|
// pressed="true" 직전의 pressed="false" 요소에 borderRight
|
|
@@ -161,8 +162,7 @@ export const RangeDatePicker = ({
|
|
|
161
162
|
<Popover.Trigger asChild>
|
|
162
163
|
<Button
|
|
163
164
|
pl={2}
|
|
164
|
-
|
|
165
|
-
variant="outline"
|
|
165
|
+
variant="secondary"
|
|
166
166
|
{...(propsConfigs?.triggerBtnProps as ButtonProps)}
|
|
167
167
|
>
|
|
168
168
|
<MdOutlineCalendarToday
|