@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetCloseButton.js","sources":["../../../src/components/BottomSheet/BottomSheetCloseButton.tsx"],"sourcesContent":[null],"names":["forwardRef","useTranslate","_jsx","StyledCloseTrigger","IconButton","CloseIcon"],"mappings":";;;;;;;;;;;AASA;;;;;;;AAOG;AACI,MAAM,sBAAsB,GAAGA,gBAAU,CAG9C,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,KAAI;AAC/B,IAAA,MAAM,SAAS,GAAGC,yBAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"BottomSheetCloseButton.js","sources":["../../../src/components/BottomSheet/BottomSheetCloseButton.tsx"],"sourcesContent":[null],"names":["forwardRef","useTranslate","_jsx","StyledCloseTrigger","IconButton","CloseIcon"],"mappings":";;;;;;;;;;;AASA;;;;;;;AAOG;AACI,MAAM,sBAAsB,GAAGA,gBAAU,CAG9C,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,KAAI;AAC/B,IAAA,MAAM,SAAS,GAAGC,yBAAY,EAAE;AAEhC,IAAA,QACEC,cAAA,CAACC,qCAAkB,IAAC,OAAO,EAAA,IAAA,EAAA,QAAA,EACzBD,eAACE,qBAAU,EAAA,EACT,GAAG,EAAE,GAAG,EAAA,YAAA,EACI,SAAS,CAAC,OAAO,CAAW,EACxC,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,OAAO,KACX,IAAI,EAAA,QAAA,EAEP,QAAQ,IAAIF,cAAA,CAACG,eAAS,EAAA,EAAC,OAAO,EAAC,IAAI,wBAAe,EAAA,CACxC,EAAA,CACM;AAEzB,CAAC;AAED,sBAAsB,CAAC,WAAW,GAAG,wBAAwB;;;;"}
|
|
@@ -17,7 +17,7 @@ import { StyledCloseTrigger } from './BottomSheetContext.mjs';
|
|
|
17
17
|
*/
|
|
18
18
|
const BottomSheetCloseButton = forwardRef(({ children, ...rest }, ref) => {
|
|
19
19
|
const translate = useTranslate();
|
|
20
|
-
return (jsx(StyledCloseTrigger, { asChild: true, children: jsx(IconButton, { ref: ref, "aria-label": translate('close'), size: "sm", variant: "ghost",
|
|
20
|
+
return (jsx(StyledCloseTrigger, { asChild: true, children: jsx(IconButton, { ref: ref, "aria-label": translate('close'), size: "sm", variant: "ghost", ...rest, children: children ?? jsx(CloseIcon, { boxSize: "xs", "aria-hidden": true }) }) }));
|
|
21
21
|
});
|
|
22
22
|
BottomSheetCloseButton.displayName = 'BottomSheetCloseButton';
|
|
23
23
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetCloseButton.mjs","sources":["../../../src/components/BottomSheet/BottomSheetCloseButton.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;;;AASA;;;;;;;AAOG;AACI,MAAM,sBAAsB,GAAG,UAAU,CAG9C,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,KAAI;AAC/B,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"BottomSheetCloseButton.mjs","sources":["../../../src/components/BottomSheet/BottomSheetCloseButton.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;;;AASA;;;;;;;AAOG;AACI,MAAM,sBAAsB,GAAG,UAAU,CAG9C,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,KAAI;AAC/B,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;AAEhC,IAAA,QACEA,GAAA,CAAC,kBAAkB,IAAC,OAAO,EAAA,IAAA,EAAA,QAAA,EACzBA,IAAC,UAAU,EAAA,EACT,GAAG,EAAE,GAAG,EAAA,YAAA,EACI,SAAS,CAAC,OAAO,CAAW,EACxC,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,OAAO,KACX,IAAI,EAAA,QAAA,EAEP,QAAQ,IAAIA,GAAA,CAAC,SAAS,EAAA,EAAC,OAAO,EAAC,IAAI,wBAAe,EAAA,CACxC,EAAA,CACM;AAEzB,CAAC;AAED,sBAAsB,CAAC,WAAW,GAAG,wBAAwB;;;;"}
|
|
@@ -16,7 +16,7 @@ catch {
|
|
|
16
16
|
NextLink = null;
|
|
17
17
|
}
|
|
18
18
|
const BreadcrumbLink = React.forwardRef(({ href, children, ...rest }, ref) => {
|
|
19
|
-
return (jsxRuntime.jsx(react.Breadcrumb.Link, { color: "
|
|
19
|
+
return (jsxRuntime.jsx(react.Breadcrumb.Link, { color: "fg.default", _hover: {
|
|
20
20
|
textDecoration: 'underline',
|
|
21
21
|
}, asChild: !!NextLink, href: href, ...focusRing.focusRing, ...rest, ref: ref, children: NextLink ? jsxRuntime.jsx(NextLink, { href: href, children: children }) : children }));
|
|
22
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbLink.js","sources":["../../../../src/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.tsx"],"sourcesContent":[null],"names":["forwardRef","_jsx","Breadcrumb","focusRing"],"mappings":";;;;;;;;AAMA;AACA,IAAI,QAAa;AACjB,IAAI;;AAEF,IAAA,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO;AACzC;AAAE,MAAM;IACN,QAAQ,GAAG,IAAI;AACjB;AAEO,MAAM,cAAc,GAAGA,gBAAU,CACtC,CACE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAuB,EAChD,GAAqC,KACnC;IACF,QACEC,cAAA,CAACC,gBAAU,CAAC,IAAI,EAAA,EACd,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"BreadcrumbLink.js","sources":["../../../../src/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.tsx"],"sourcesContent":[null],"names":["forwardRef","_jsx","Breadcrumb","focusRing"],"mappings":";;;;;;;;AAMA;AACA,IAAI,QAAa;AACjB,IAAI;;AAEF,IAAA,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO;AACzC;AAAE,MAAM;IACN,QAAQ,GAAG,IAAI;AACjB;AAEO,MAAM,cAAc,GAAGA,gBAAU,CACtC,CACE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAuB,EAChD,GAAqC,KACnC;IACF,QACEC,cAAA,CAACC,gBAAU,CAAC,IAAI,EAAA,EACd,KAAK,EAAC,YAAY,EAClB,MAAM,EAAE;AACN,YAAA,cAAc,EAAE,WAAW;AAC5B,SAAA,EACD,OAAO,EAAE,CAAC,CAAC,QAAQ,EACnB,IAAI,EAAE,IAAI,EAAA,GACNC,mBAAS,EAAA,GACT,IAAI,EACR,GAAG,EAAE,GAAG,EAAA,QAAA,EAEP,QAAQ,GAAGF,cAAA,CAAC,QAAQ,EAAA,EAAC,IAAI,EAAE,IAAI,EAAA,QAAA,EAAG,QAAQ,GAAY,GAAG,QAAQ,EAAA,CAClD;AAEtB,CAAC;AAGH,cAAc,CAAC,WAAW,GAAG,gBAAgB;;;;"}
|
|
@@ -14,7 +14,7 @@ catch {
|
|
|
14
14
|
NextLink = null;
|
|
15
15
|
}
|
|
16
16
|
const BreadcrumbLink = forwardRef(({ href, children, ...rest }, ref) => {
|
|
17
|
-
return (jsx(Breadcrumb.Link, { color: "
|
|
17
|
+
return (jsx(Breadcrumb.Link, { color: "fg.default", _hover: {
|
|
18
18
|
textDecoration: 'underline',
|
|
19
19
|
}, asChild: !!NextLink, href: href, ...focusRing, ...rest, ref: ref, children: NextLink ? jsx(NextLink, { href: href, children: children }) : children }));
|
|
20
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbLink.mjs","sources":["../../../../src/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;AAMA;AACA,IAAI,QAAa;AACjB,IAAI;;AAEF,IAAA,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO;AACzC;AAAE,MAAM;IACN,QAAQ,GAAG,IAAI;AACjB;AAEO,MAAM,cAAc,GAAG,UAAU,CACtC,CACE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAuB,EAChD,GAAqC,KACnC;IACF,QACEA,GAAA,CAAC,UAAU,CAAC,IAAI,EAAA,EACd,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"BreadcrumbLink.mjs","sources":["../../../../src/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;AAMA;AACA,IAAI,QAAa;AACjB,IAAI;;AAEF,IAAA,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO;AACzC;AAAE,MAAM;IACN,QAAQ,GAAG,IAAI;AACjB;AAEO,MAAM,cAAc,GAAG,UAAU,CACtC,CACE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAuB,EAChD,GAAqC,KACnC;IACF,QACEA,GAAA,CAAC,UAAU,CAAC,IAAI,EAAA,EACd,KAAK,EAAC,YAAY,EAClB,MAAM,EAAE;AACN,YAAA,cAAc,EAAE,WAAW;AAC5B,SAAA,EACD,OAAO,EAAE,CAAC,CAAC,QAAQ,EACnB,IAAI,EAAE,IAAI,EAAA,GACN,SAAS,EAAA,GACT,IAAI,EACR,GAAG,EAAE,GAAG,EAAA,QAAA,EAEP,QAAQ,GAAGA,GAAA,CAAC,QAAQ,EAAA,EAAC,IAAI,EAAE,IAAI,EAAA,QAAA,EAAG,QAAQ,GAAY,GAAG,QAAQ,EAAA,CAClD;AAEtB,CAAC;AAGH,cAAc,CAAC,WAAW,GAAG,gBAAgB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAA8B,MAAM,gBAAgB,CAAC;AA8J5E,eAAO,MAAM,MAAM,gEAA0C,CAAC"}
|
|
@@ -7,29 +7,40 @@ var react = require('@chakra-ui/react');
|
|
|
7
7
|
var focusRing = require('../../utils/focusRing.js');
|
|
8
8
|
var mergeCss = require('../../utils/mergeCss.js');
|
|
9
9
|
var polymorphic = require('../../types/polymorphic.js');
|
|
10
|
+
var Button_legacy = require('./Button.legacy.js');
|
|
10
11
|
var Button_styles = require('./Button.styles.js');
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
|
-
* Button
|
|
14
|
-
*
|
|
15
|
-
* Combines `colorPalette` (semantic color) with `variant` (visual appearance)
|
|
16
|
-
* for flexible, consistent button styling.
|
|
14
|
+
* Button — one `variant` role per button (5.0 BAZE palette).
|
|
17
15
|
*
|
|
18
16
|
* @example
|
|
19
17
|
* ```tsx
|
|
20
|
-
* <Button
|
|
21
|
-
* <Button
|
|
22
|
-
* <Button
|
|
23
|
-
* <Button
|
|
24
|
-
* <Button
|
|
18
|
+
* <Button variant="primary">저장</Button>
|
|
19
|
+
* <Button variant="secondary">취소</Button>
|
|
20
|
+
* <Button>더 보기</Button> // subtle
|
|
21
|
+
* <Button variant="ghost" isDestructive>삭제</Button>
|
|
22
|
+
* <Button variant="danger">영구 삭제</Button>
|
|
23
|
+
* <Button variant="action"><Sparkles />실행</Button> // coral icon
|
|
24
|
+
* <Button variant="primary" lift>Get started</Button>
|
|
25
25
|
*
|
|
26
26
|
* // `as` carries the element's own props (see Button.types.ts):
|
|
27
27
|
* <Button as="a" href="/docs" target="_blank">문서</Button>
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
const ButtonImpl = React.forwardRef(({
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const ButtonImpl = React.forwardRef(({ variant: variantProp, isDestructive: isDestructiveProp = false, size, lift, children, _hover: hoverProp, _active: activeProp, _disabled: disabledProp, css: cssProp, ...restWithLegacy }, ref) => {
|
|
31
|
+
// 4.x callers (untyped JS, `as any`) can still hand us `colorPalette` and
|
|
32
|
+
// an old variant name. Strip it so it never reaches Chakra's own recipe,
|
|
33
|
+
// and map the pair onto a 5.0 role — see `Button.legacy.ts`.
|
|
34
|
+
const { colorPalette: legacyPalette, ...rest } = restWithLegacy;
|
|
35
|
+
let variant = variantProp ?? 'subtle';
|
|
36
|
+
let isDestructive = isDestructiveProp;
|
|
37
|
+
if (Button_legacy.isLegacyButtonProps('button', legacyPalette, variantProp)) {
|
|
38
|
+
const resolved = Button_legacy.resolveLegacyButtonVariant('button', legacyPalette, variantProp);
|
|
39
|
+
Button_legacy.warnLegacyButtonProps('Button', legacyPalette, variantProp, resolved);
|
|
40
|
+
variant = resolved.variant;
|
|
41
|
+
isDestructive = isDestructive || resolved.isDestructive;
|
|
42
|
+
}
|
|
43
|
+
const base = Button_styles.getButtonStyles(variant, isDestructive);
|
|
33
44
|
// Merged rather than spread after: each variant already owns `_hover` and
|
|
34
45
|
// `_active` for its colours, and replacing either would drop them.
|
|
35
46
|
const styles = lift
|
|
@@ -51,7 +62,12 @@ const ButtonImpl = React.forwardRef(({ colorPalette, variant = 'soft', size, lif
|
|
|
51
62
|
_active: { ...base._active, translate: '0 0', filter: 'none' },
|
|
52
63
|
// `:hover` still matches a disabled button, so the lift has to be
|
|
53
64
|
// switched off here rather than left to pointer-events.
|
|
54
|
-
|
|
65
|
+
// Merged so the variant's fixed disabled colours survive.
|
|
66
|
+
_disabled: {
|
|
67
|
+
...base._disabled,
|
|
68
|
+
translate: '0 0',
|
|
69
|
+
filter: 'none',
|
|
70
|
+
},
|
|
55
71
|
}
|
|
56
72
|
: base;
|
|
57
73
|
/**
|
|
@@ -88,7 +104,10 @@ const ButtonImpl = React.forwardRef(({ colorPalette, variant = 'soft', size, lif
|
|
|
88
104
|
// Two clocks on one element — the press is faster than the colour
|
|
89
105
|
// change — so the shorthand is written out and only the reduced-motion
|
|
90
106
|
// guard comes from the vocabulary.
|
|
91
|
-
transition: Button_styles.buttonTransition, animationStyle: "composite", ref: ref,
|
|
107
|
+
transition: Button_styles.buttonTransition, animationStyle: "composite", ref: ref, "data-variant": variant, "data-destructive": isDestructive || undefined, ...rest,
|
|
108
|
+
// The `action` icon rule lives in `css` (a nested selector cannot be a
|
|
109
|
+
// style prop); merged so a call site's `css` adds to it.
|
|
110
|
+
css: mergeCss.mergeCss(base.css, cssProp), children: children }));
|
|
92
111
|
});
|
|
93
112
|
/**
|
|
94
113
|
* Type-level polymorphism over the same runtime — see `polymorphic` in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":[null],"names":["forwardRef","getButtonStyles","_jsx","ChakraButton","mergeCss","focusRing","buttonTransition","polymorphic"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":[null],"names":["forwardRef","isLegacyButtonProps","resolveLegacyButtonVariant","warnLegacyButtonProps","getButtonStyles","_jsx","ChakraButton","mergeCss","focusRing","buttonTransition","polymorphic"],"mappings":";;;;;;;;;;;;AAeA;;;;;;;;;;;;;;;;AAgBG;AACH,MAAM,UAAU,GAAGA,gBAAU,CAC3B,CACE,EACE,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,iBAAiB,GAAG,KAAK,EACxC,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,YAAY,EACvB,GAAG,EAAE,OAAO,EACZ,GAAG,cAAc,EAClB,EACD,GAAG,KACD;;;;IAIF,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAC5C,cAAoE;AAEtE,IAAA,IAAI,OAAO,GAAkB,WAAW,IAAI,QAAQ;IACpD,IAAI,aAAa,GAAG,iBAAiB;IACrC,IAAIC,iCAAmB,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE;QAC7D,MAAM,QAAQ,GAAGC,wCAA0B,CACzC,QAAQ,EACR,aAAa,EACb,WAAW,CACZ;QACDC,mCAAqB,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,GAAG,UAAU,GAAG,aAAa,EAAE,EACrD,YAAY,CACb,KACGC,mBAAS,EACb,MAAM,EAAC,SAAS;;;AAGhB,QAAA,KAAK,EAAC,GAAG;;;;AAIT,QAAA,UAAU,EAAEC,8BAAgB,EAC5B,cAAc,EAAC,WAAW,EAC1B,GAAG,EAAE,GAAG,kBACM,OAAO,EAAA,kBAAA,EACH,aAAa,IAAI,SAAS,KACxC,IAAI;;;AAGR,QAAA,GAAG,EAAEF,iBAAQ,CAAC,IAAI,CAAC,GAAoC,EAAE,OAAO,CAAC,EAAA,QAAA,EAEhE,QAAQ,EAAA,CACI;AAEnB,CAAC,CACF;AAED;;;;;;AAMG;AACH,UAAU,CAAC,WAAW,GAAG,QAAQ;MAEpB,MAAM,GAAGG,uBAAW,CAAiB,UAAU;;;;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ButtonVariant } from './Button.types';
|
|
2
|
+
/**
|
|
3
|
+
* Runtime back-compat for 4.x `colorPalette × variant` props.
|
|
4
|
+
*
|
|
5
|
+
* 5.0 removed `colorPalette` from the types and renamed the variants, but an
|
|
6
|
+
* untyped (JS) caller or one behind `as any` can still pass the old pair. Rather
|
|
7
|
+
* than render an unstyled button, the pair is mapped with the same table the
|
|
8
|
+
* migration codemod uses, and a development-only warning names the combination
|
|
9
|
+
* once so it gets fixed.
|
|
10
|
+
*/
|
|
11
|
+
type Kind = 'button' | 'icon';
|
|
12
|
+
/** The 5.0 variants shared by Button and IconButton; IconButton has no subtle. */
|
|
13
|
+
type MappedVariant = ButtonVariant;
|
|
14
|
+
export type LegacyResolution = {
|
|
15
|
+
variant: MappedVariant;
|
|
16
|
+
isDestructive: boolean;
|
|
17
|
+
/** True when the old pair has no faithful 5.0 equivalent (warn louder). */
|
|
18
|
+
needsHuman: boolean;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Whether a variant/colorPalette pair is a 4.x one that needs mapping. A new
|
|
22
|
+
* variant with no colorPalette is the normal path and returns false.
|
|
23
|
+
*/
|
|
24
|
+
export declare const isLegacyButtonProps: (kind: Kind, colorPalette: unknown, variant: unknown) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Map an old pair to the 5.0 role.
|
|
27
|
+
*
|
|
28
|
+
* | old colorPalette / variant | Button | IconButton |
|
|
29
|
+
* |--------------------------------------------|---------------------|---------------------|
|
|
30
|
+
* | (none)·primary·neutral / solid | primary | primary |
|
|
31
|
+
* | danger / solid | danger | danger |
|
|
32
|
+
* | secondary·warning·success / solid | primary (needs human)| primary (needs human)|
|
|
33
|
+
* | any non-danger / outline | secondary | secondary |
|
|
34
|
+
* | danger / outline | secondary + destr. | secondary + destr. |
|
|
35
|
+
* | any non-danger / ghost | ghost | ghost |
|
|
36
|
+
* | danger / ghost | ghost + destr. | ghost + destr. |
|
|
37
|
+
* | any non-danger / soft | subtle | ghost |
|
|
38
|
+
* | danger / soft | subtle + destr. | ghost + destr. |
|
|
39
|
+
*
|
|
40
|
+
* A missing variant falls back to the 4.x code default: `soft` for Button,
|
|
41
|
+
* `ghost` for IconButton. A colorPalette next to a 5.0 variant name keeps the
|
|
42
|
+
* variant and only reads `danger` as destructive.
|
|
43
|
+
*/
|
|
44
|
+
export declare const resolveLegacyButtonVariant: (kind: Kind, colorPalette: unknown, variant: unknown) => LegacyResolution;
|
|
45
|
+
/**
|
|
46
|
+
* Warn once per (component, colorPalette, variant) combination, development
|
|
47
|
+
* only. Exported for tests.
|
|
48
|
+
*/
|
|
49
|
+
export declare const warnLegacyButtonProps: (component: string, colorPalette: unknown, variant: unknown, resolved: LegacyResolution) => void;
|
|
50
|
+
/** Test-only: forget which combinations have warned. */
|
|
51
|
+
export declare const __resetLegacyButtonWarnings: () => void;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=Button.legacy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.legacy.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.legacy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;;;;;GAQG;AAEH,KAAK,IAAI,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE9B,kFAAkF;AAClF,KAAK,aAAa,GAAG,aAAa,CAAC;AAEnC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,aAAa,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,2EAA2E;IAC3E,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AA+BF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,IAAI,EACV,cAAc,OAAO,EACrB,SAAS,OAAO,KACf,OAIF,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,0BAA0B,GACrC,MAAM,IAAI,EACV,cAAc,OAAO,EACrB,SAAS,OAAO,KACf,gBAqDF,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,WAAW,MAAM,EACjB,cAAc,OAAO,EACrB,SAAS,OAAO,EAChB,UAAU,gBAAgB,KACzB,IAiBF,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,2BAA2B,QAAO,IAAsB,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var isDev = require('../../utils/isDev.js');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Exhaustive records, not hand-written lists: adding a role to
|
|
8
|
+
* `ButtonVariant` / `IconButtonVariant` is a compile error here until it is
|
|
9
|
+
* listed, so a new 5.0 variant can never be mistaken for a 4.x one.
|
|
10
|
+
*/
|
|
11
|
+
const BUTTON_VARIANT_KEYS = {
|
|
12
|
+
primary: true,
|
|
13
|
+
action: true,
|
|
14
|
+
secondary: true,
|
|
15
|
+
subtle: true,
|
|
16
|
+
ghost: true,
|
|
17
|
+
danger: true,
|
|
18
|
+
};
|
|
19
|
+
const ICON_VARIANT_KEYS = {
|
|
20
|
+
ghost: true,
|
|
21
|
+
secondary: true,
|
|
22
|
+
primary: true,
|
|
23
|
+
danger: true,
|
|
24
|
+
action: true,
|
|
25
|
+
};
|
|
26
|
+
const NEW_BUTTON_VARIANTS = new Set(Object.keys(BUTTON_VARIANT_KEYS));
|
|
27
|
+
const NEW_ICON_VARIANTS = new Set(Object.keys(ICON_VARIANT_KEYS));
|
|
28
|
+
/**
|
|
29
|
+
* Whether a variant/colorPalette pair is a 4.x one that needs mapping. A new
|
|
30
|
+
* variant with no colorPalette is the normal path and returns false.
|
|
31
|
+
*/
|
|
32
|
+
const isLegacyButtonProps = (kind, colorPalette, variant) => {
|
|
33
|
+
const valid = kind === 'icon' ? NEW_ICON_VARIANTS : NEW_BUTTON_VARIANTS;
|
|
34
|
+
if (colorPalette != null)
|
|
35
|
+
return true;
|
|
36
|
+
return variant != null && !valid.has(String(variant));
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Map an old pair to the 5.0 role.
|
|
40
|
+
*
|
|
41
|
+
* | old colorPalette / variant | Button | IconButton |
|
|
42
|
+
* |--------------------------------------------|---------------------|---------------------|
|
|
43
|
+
* | (none)·primary·neutral / solid | primary | primary |
|
|
44
|
+
* | danger / solid | danger | danger |
|
|
45
|
+
* | secondary·warning·success / solid | primary (needs human)| primary (needs human)|
|
|
46
|
+
* | any non-danger / outline | secondary | secondary |
|
|
47
|
+
* | danger / outline | secondary + destr. | secondary + destr. |
|
|
48
|
+
* | any non-danger / ghost | ghost | ghost |
|
|
49
|
+
* | danger / ghost | ghost + destr. | ghost + destr. |
|
|
50
|
+
* | any non-danger / soft | subtle | ghost |
|
|
51
|
+
* | danger / soft | subtle + destr. | ghost + destr. |
|
|
52
|
+
*
|
|
53
|
+
* A missing variant falls back to the 4.x code default: `soft` for Button,
|
|
54
|
+
* `ghost` for IconButton. A colorPalette next to a 5.0 variant name keeps the
|
|
55
|
+
* variant and only reads `danger` as destructive.
|
|
56
|
+
*/
|
|
57
|
+
const resolveLegacyButtonVariant = (kind, colorPalette, variant) => {
|
|
58
|
+
const palette = colorPalette == null ? undefined : String(colorPalette);
|
|
59
|
+
const isDanger = palette === 'danger';
|
|
60
|
+
const v = variant == null ? (kind === 'icon' ? 'ghost' : 'soft') : String(variant);
|
|
61
|
+
const valid = kind === 'icon' ? NEW_ICON_VARIANTS : NEW_BUTTON_VARIANTS;
|
|
62
|
+
// `ghost` is both a 4.x and a 5.0 name; it is handled by the switch below,
|
|
63
|
+
// which gives the same answer.
|
|
64
|
+
if (valid.has(v) && v !== 'ghost') {
|
|
65
|
+
// Already a 5.0 role; a stray colorPalette only contributes "danger".
|
|
66
|
+
const destructiveCapable = v === 'secondary' || v === 'subtle';
|
|
67
|
+
return {
|
|
68
|
+
variant: v,
|
|
69
|
+
isDestructive: isDanger && destructiveCapable,
|
|
70
|
+
needsHuman: false,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
switch (v) {
|
|
74
|
+
case 'solid':
|
|
75
|
+
if (isDanger)
|
|
76
|
+
return { variant: 'danger', isDestructive: false, needsHuman: false };
|
|
77
|
+
return {
|
|
78
|
+
variant: 'primary',
|
|
79
|
+
isDestructive: false,
|
|
80
|
+
needsHuman: palette === 'secondary' ||
|
|
81
|
+
palette === 'warning' ||
|
|
82
|
+
palette === 'success',
|
|
83
|
+
};
|
|
84
|
+
case 'outline':
|
|
85
|
+
return {
|
|
86
|
+
variant: 'secondary',
|
|
87
|
+
isDestructive: isDanger,
|
|
88
|
+
needsHuman: false,
|
|
89
|
+
};
|
|
90
|
+
case 'ghost':
|
|
91
|
+
return { variant: 'ghost', isDestructive: isDanger, needsHuman: false };
|
|
92
|
+
case 'soft':
|
|
93
|
+
return {
|
|
94
|
+
variant: kind === 'icon' ? 'ghost' : 'subtle',
|
|
95
|
+
isDestructive: isDanger,
|
|
96
|
+
needsHuman: false,
|
|
97
|
+
};
|
|
98
|
+
default:
|
|
99
|
+
// Unknown value (e.g. Chakra's `plain`/`surface`): the component default.
|
|
100
|
+
return {
|
|
101
|
+
variant: kind === 'icon' ? 'ghost' : 'subtle',
|
|
102
|
+
isDestructive: isDanger,
|
|
103
|
+
needsHuman: true,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
const warned = new Set();
|
|
108
|
+
/**
|
|
109
|
+
* Warn once per (component, colorPalette, variant) combination, development
|
|
110
|
+
* only. Exported for tests.
|
|
111
|
+
*/
|
|
112
|
+
const warnLegacyButtonProps = (component, colorPalette, variant, resolved) => {
|
|
113
|
+
if (!isDev.isDev())
|
|
114
|
+
return;
|
|
115
|
+
const key = `${component}|${String(colorPalette)}|${String(variant)}`;
|
|
116
|
+
if (warned.has(key))
|
|
117
|
+
return;
|
|
118
|
+
warned.add(key);
|
|
119
|
+
const to = `variant="${resolved.variant}"${resolved.isDestructive ? ' isDestructive' : ''}`;
|
|
120
|
+
console.warn(`[logician-ui] <${component} colorPalette="${String(colorPalette)}" variant="${String(variant)}"> uses the 4.x API, which 5.0 removed. ` +
|
|
121
|
+
`Rendering as ${to}.` +
|
|
122
|
+
(resolved.needsHuman
|
|
123
|
+
? ' This combination has no exact 5.0 equivalent — please choose a variant by hand.'
|
|
124
|
+
: ' Replace the props with that.'));
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
exports.isLegacyButtonProps = isLegacyButtonProps;
|
|
128
|
+
exports.resolveLegacyButtonVariant = resolveLegacyButtonVariant;
|
|
129
|
+
exports.warnLegacyButtonProps = warnLegacyButtonProps;
|
|
130
|
+
//# sourceMappingURL=Button.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.legacy.js","sources":["../../../src/components/Button/Button.legacy.ts"],"sourcesContent":[null],"names":["isDev"],"mappings":";;;;;AA2BA;;;;AAIG;AACH,MAAM,mBAAmB,GAAgC;AACvD,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,MAAM,EAAE,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AAM,MAAM,GAAG,IAAI,GAAG,EAAU;AAEhC;;;AAGG;AACI,MAAM,qBAAqB,GAAG,CACnC,SAAiB,EACjB,YAAqB,EACrB,OAAgB,EAChB,QAA0B,KAClB;IACR,IAAI,CAACA,WAAK,EAAE;QAAE;AACd,IAAA,MAAM,GAAG,GAAG,CAAA,EAAG,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE;AACrE,IAAA,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;QAAE;AACrB,IAAA,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;AACf,IAAA,MAAM,EAAE,GAAG,CAAA,SAAA,EAAY,QAAQ,CAAC,OAAO,IACrC,QAAQ,CAAC,aAAa,GAAG,gBAAgB,GAAG,EAC9C,EAAE;AACF,IAAA,OAAO,CAAC,IAAI,CACV,CAAA,eAAA,EAAkB,SAAS,CAAA,eAAA,EAAkB,MAAM,CACjD,YAAY,CACb,CAAA,WAAA,EAAc,MAAM,CAAC,OAAO,CAAC,CAAA,wCAAA,CAA0C;AACtE,QAAA,CAAA,aAAA,EAAgB,EAAE,CAAA,CAAA,CAAG;SACpB,QAAQ,CAAC;AACR,cAAE;AACF,cAAE,+BAA+B,CAAC,CACvC;AACH;;;;;;"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { isDev } from '../../utils/isDev.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Exhaustive records, not hand-written lists: adding a role to
|
|
6
|
+
* `ButtonVariant` / `IconButtonVariant` is a compile error here until it is
|
|
7
|
+
* listed, so a new 5.0 variant can never be mistaken for a 4.x one.
|
|
8
|
+
*/
|
|
9
|
+
const BUTTON_VARIANT_KEYS = {
|
|
10
|
+
primary: true,
|
|
11
|
+
action: true,
|
|
12
|
+
secondary: true,
|
|
13
|
+
subtle: true,
|
|
14
|
+
ghost: true,
|
|
15
|
+
danger: true,
|
|
16
|
+
};
|
|
17
|
+
const ICON_VARIANT_KEYS = {
|
|
18
|
+
ghost: true,
|
|
19
|
+
secondary: true,
|
|
20
|
+
primary: true,
|
|
21
|
+
danger: true,
|
|
22
|
+
action: true,
|
|
23
|
+
};
|
|
24
|
+
const NEW_BUTTON_VARIANTS = new Set(Object.keys(BUTTON_VARIANT_KEYS));
|
|
25
|
+
const NEW_ICON_VARIANTS = new Set(Object.keys(ICON_VARIANT_KEYS));
|
|
26
|
+
/**
|
|
27
|
+
* Whether a variant/colorPalette pair is a 4.x one that needs mapping. A new
|
|
28
|
+
* variant with no colorPalette is the normal path and returns false.
|
|
29
|
+
*/
|
|
30
|
+
const isLegacyButtonProps = (kind, colorPalette, variant) => {
|
|
31
|
+
const valid = kind === 'icon' ? NEW_ICON_VARIANTS : NEW_BUTTON_VARIANTS;
|
|
32
|
+
if (colorPalette != null)
|
|
33
|
+
return true;
|
|
34
|
+
return variant != null && !valid.has(String(variant));
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Map an old pair to the 5.0 role.
|
|
38
|
+
*
|
|
39
|
+
* | old colorPalette / variant | Button | IconButton |
|
|
40
|
+
* |--------------------------------------------|---------------------|---------------------|
|
|
41
|
+
* | (none)·primary·neutral / solid | primary | primary |
|
|
42
|
+
* | danger / solid | danger | danger |
|
|
43
|
+
* | secondary·warning·success / solid | primary (needs human)| primary (needs human)|
|
|
44
|
+
* | any non-danger / outline | secondary | secondary |
|
|
45
|
+
* | danger / outline | secondary + destr. | secondary + destr. |
|
|
46
|
+
* | any non-danger / ghost | ghost | ghost |
|
|
47
|
+
* | danger / ghost | ghost + destr. | ghost + destr. |
|
|
48
|
+
* | any non-danger / soft | subtle | ghost |
|
|
49
|
+
* | danger / soft | subtle + destr. | ghost + destr. |
|
|
50
|
+
*
|
|
51
|
+
* A missing variant falls back to the 4.x code default: `soft` for Button,
|
|
52
|
+
* `ghost` for IconButton. A colorPalette next to a 5.0 variant name keeps the
|
|
53
|
+
* variant and only reads `danger` as destructive.
|
|
54
|
+
*/
|
|
55
|
+
const resolveLegacyButtonVariant = (kind, colorPalette, variant) => {
|
|
56
|
+
const palette = colorPalette == null ? undefined : String(colorPalette);
|
|
57
|
+
const isDanger = palette === 'danger';
|
|
58
|
+
const v = variant == null ? (kind === 'icon' ? 'ghost' : 'soft') : String(variant);
|
|
59
|
+
const valid = kind === 'icon' ? NEW_ICON_VARIANTS : NEW_BUTTON_VARIANTS;
|
|
60
|
+
// `ghost` is both a 4.x and a 5.0 name; it is handled by the switch below,
|
|
61
|
+
// which gives the same answer.
|
|
62
|
+
if (valid.has(v) && v !== 'ghost') {
|
|
63
|
+
// Already a 5.0 role; a stray colorPalette only contributes "danger".
|
|
64
|
+
const destructiveCapable = v === 'secondary' || v === 'subtle';
|
|
65
|
+
return {
|
|
66
|
+
variant: v,
|
|
67
|
+
isDestructive: isDanger && destructiveCapable,
|
|
68
|
+
needsHuman: false,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
switch (v) {
|
|
72
|
+
case 'solid':
|
|
73
|
+
if (isDanger)
|
|
74
|
+
return { variant: 'danger', isDestructive: false, needsHuman: false };
|
|
75
|
+
return {
|
|
76
|
+
variant: 'primary',
|
|
77
|
+
isDestructive: false,
|
|
78
|
+
needsHuman: palette === 'secondary' ||
|
|
79
|
+
palette === 'warning' ||
|
|
80
|
+
palette === 'success',
|
|
81
|
+
};
|
|
82
|
+
case 'outline':
|
|
83
|
+
return {
|
|
84
|
+
variant: 'secondary',
|
|
85
|
+
isDestructive: isDanger,
|
|
86
|
+
needsHuman: false,
|
|
87
|
+
};
|
|
88
|
+
case 'ghost':
|
|
89
|
+
return { variant: 'ghost', isDestructive: isDanger, needsHuman: false };
|
|
90
|
+
case 'soft':
|
|
91
|
+
return {
|
|
92
|
+
variant: kind === 'icon' ? 'ghost' : 'subtle',
|
|
93
|
+
isDestructive: isDanger,
|
|
94
|
+
needsHuman: false,
|
|
95
|
+
};
|
|
96
|
+
default:
|
|
97
|
+
// Unknown value (e.g. Chakra's `plain`/`surface`): the component default.
|
|
98
|
+
return {
|
|
99
|
+
variant: kind === 'icon' ? 'ghost' : 'subtle',
|
|
100
|
+
isDestructive: isDanger,
|
|
101
|
+
needsHuman: true,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const warned = new Set();
|
|
106
|
+
/**
|
|
107
|
+
* Warn once per (component, colorPalette, variant) combination, development
|
|
108
|
+
* only. Exported for tests.
|
|
109
|
+
*/
|
|
110
|
+
const warnLegacyButtonProps = (component, colorPalette, variant, resolved) => {
|
|
111
|
+
if (!isDev())
|
|
112
|
+
return;
|
|
113
|
+
const key = `${component}|${String(colorPalette)}|${String(variant)}`;
|
|
114
|
+
if (warned.has(key))
|
|
115
|
+
return;
|
|
116
|
+
warned.add(key);
|
|
117
|
+
const to = `variant="${resolved.variant}"${resolved.isDestructive ? ' isDestructive' : ''}`;
|
|
118
|
+
console.warn(`[logician-ui] <${component} colorPalette="${String(colorPalette)}" variant="${String(variant)}"> uses the 4.x API, which 5.0 removed. ` +
|
|
119
|
+
`Rendering as ${to}.` +
|
|
120
|
+
(resolved.needsHuman
|
|
121
|
+
? ' This combination has no exact 5.0 equivalent — please choose a variant by hand.'
|
|
122
|
+
: ' Replace the props with that.'));
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export { isLegacyButtonProps, resolveLegacyButtonVariant, warnLegacyButtonProps };
|
|
126
|
+
//# sourceMappingURL=Button.legacy.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.legacy.mjs","sources":["../../../src/components/Button/Button.legacy.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AA2BA;;;;AAIG;AACH,MAAM,mBAAmB,GAAgC;AACvD,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,MAAM,EAAE,IAAI;AACZ,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,MAAM,EAAE,IAAI;AACZ,IAAA,KAAK,E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AiB,EACjB,YAAqB,EACrB,OAAgB,EAChB,QAA0B,KAClB;IACR,IAAI,CAAC,KAAK,EAAE;QAAE;AACd,IAAA,MAAM,GAAG,GAAG,CAAA,EAAG,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE;AACrE,IAAA,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;QAAE;AACrB,IAAA,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;AACf,IAAA,MAAM,EAAE,GAAG,CAAA,SAAA,EAAY,QAAQ,CAAC,OAAO,IACrC,QAAQ,CAAC,aAAa,GAAG,gBAAgB,GAAG,EAC9C,EAAE;AACF,IAAA,OAAO,CAAC,IAAI,CACV,CAAA,eAAA,EAAkB,SAAS,CAAA,eAAA,EAAkB,MAAM,CACjD,YAAY,CACb,CAAA,WAAA,EAAc,MAAM,CAAC,OAAO,CAAC,CAAA,wCAAA,CAA0C;AACtE,QAAA,CAAA,aAAA,EAAgB,EAAE,CAAA,CAAA,CAAG;SACpB,QAAQ,CAAC;AACR,cAAE;AACF,cAAE,+BAA+B,CAAC,CACvC;AACH;;;;"}
|
|
@@ -5,29 +5,40 @@ import { Button as Button$1 } from '@chakra-ui/react';
|
|
|
5
5
|
import { focusRing } from '../../utils/focusRing.mjs';
|
|
6
6
|
import { mergeCss } from '../../utils/mergeCss.mjs';
|
|
7
7
|
import { polymorphic } from '../../types/polymorphic.mjs';
|
|
8
|
+
import { isLegacyButtonProps, resolveLegacyButtonVariant, warnLegacyButtonProps } from './Button.legacy.mjs';
|
|
8
9
|
import { getButtonStyles, buttonTransition } from './Button.styles.mjs';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
|
-
* Button
|
|
12
|
-
*
|
|
13
|
-
* Combines `colorPalette` (semantic color) with `variant` (visual appearance)
|
|
14
|
-
* for flexible, consistent button styling.
|
|
12
|
+
* Button — one `variant` role per button (5.0 BAZE palette).
|
|
15
13
|
*
|
|
16
14
|
* @example
|
|
17
15
|
* ```tsx
|
|
18
|
-
* <Button
|
|
19
|
-
* <Button
|
|
20
|
-
* <Button
|
|
21
|
-
* <Button
|
|
22
|
-
* <Button
|
|
16
|
+
* <Button variant="primary">저장</Button>
|
|
17
|
+
* <Button variant="secondary">취소</Button>
|
|
18
|
+
* <Button>더 보기</Button> // subtle
|
|
19
|
+
* <Button variant="ghost" isDestructive>삭제</Button>
|
|
20
|
+
* <Button variant="danger">영구 삭제</Button>
|
|
21
|
+
* <Button variant="action"><Sparkles />실행</Button> // coral icon
|
|
22
|
+
* <Button variant="primary" lift>Get started</Button>
|
|
23
23
|
*
|
|
24
24
|
* // `as` carries the element's own props (see Button.types.ts):
|
|
25
25
|
* <Button as="a" href="/docs" target="_blank">문서</Button>
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
const ButtonImpl = forwardRef(({
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const ButtonImpl = forwardRef(({ variant: variantProp, isDestructive: isDestructiveProp = false, size, lift, children, _hover: hoverProp, _active: activeProp, _disabled: disabledProp, css: cssProp, ...restWithLegacy }, ref) => {
|
|
29
|
+
// 4.x callers (untyped JS, `as any`) can still hand us `colorPalette` and
|
|
30
|
+
// an old variant name. Strip it so it never reaches Chakra's own recipe,
|
|
31
|
+
// and map the pair onto a 5.0 role — see `Button.legacy.ts`.
|
|
32
|
+
const { colorPalette: legacyPalette, ...rest } = restWithLegacy;
|
|
33
|
+
let variant = variantProp ?? 'subtle';
|
|
34
|
+
let isDestructive = isDestructiveProp;
|
|
35
|
+
if (isLegacyButtonProps('button', legacyPalette, variantProp)) {
|
|
36
|
+
const resolved = resolveLegacyButtonVariant('button', legacyPalette, variantProp);
|
|
37
|
+
warnLegacyButtonProps('Button', legacyPalette, variantProp, resolved);
|
|
38
|
+
variant = resolved.variant;
|
|
39
|
+
isDestructive = isDestructive || resolved.isDestructive;
|
|
40
|
+
}
|
|
41
|
+
const base = getButtonStyles(variant, isDestructive);
|
|
31
42
|
// Merged rather than spread after: each variant already owns `_hover` and
|
|
32
43
|
// `_active` for its colours, and replacing either would drop them.
|
|
33
44
|
const styles = lift
|
|
@@ -49,7 +60,12 @@ const ButtonImpl = forwardRef(({ colorPalette, variant = 'soft', size, lift, chi
|
|
|
49
60
|
_active: { ...base._active, translate: '0 0', filter: 'none' },
|
|
50
61
|
// `:hover` still matches a disabled button, so the lift has to be
|
|
51
62
|
// switched off here rather than left to pointer-events.
|
|
52
|
-
|
|
63
|
+
// Merged so the variant's fixed disabled colours survive.
|
|
64
|
+
_disabled: {
|
|
65
|
+
...base._disabled,
|
|
66
|
+
translate: '0 0',
|
|
67
|
+
filter: 'none',
|
|
68
|
+
},
|
|
53
69
|
}
|
|
54
70
|
: base;
|
|
55
71
|
/**
|
|
@@ -86,7 +102,10 @@ const ButtonImpl = forwardRef(({ colorPalette, variant = 'soft', size, lift, chi
|
|
|
86
102
|
// Two clocks on one element — the press is faster than the colour
|
|
87
103
|
// change — so the shorthand is written out and only the reduced-motion
|
|
88
104
|
// guard comes from the vocabulary.
|
|
89
|
-
transition: buttonTransition, animationStyle: "composite", ref: ref,
|
|
105
|
+
transition: buttonTransition, animationStyle: "composite", ref: ref, "data-variant": variant, "data-destructive": isDestructive || undefined, ...rest,
|
|
106
|
+
// The `action` icon rule lives in `css` (a nested selector cannot be a
|
|
107
|
+
// style prop); merged so a call site's `css` adds to it.
|
|
108
|
+
css: mergeCss(base.css, cssProp), children: children }));
|
|
90
109
|
});
|
|
91
110
|
/**
|
|
92
111
|
* Type-level polymorphism over the same runtime — see `polymorphic` in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.mjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraButton"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.mjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraButton"],"mappings":";;;;;;;;;;AAeA;;;;;;;;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