@techsio/ui-kit 0.3.2 → 0.4.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/README.md +59 -6
- package/dist/.storybook/decorator.d.ts +12 -0
- package/dist/.storybook/decorator.d.ts.map +1 -0
- package/dist/.storybook/main.d.ts +4 -0
- package/dist/.storybook/main.d.ts.map +1 -0
- package/dist/.storybook/preview.d.ts +5 -0
- package/dist/.storybook/preview.d.ts.map +1 -0
- package/dist/.storybook/test-runner.d.ts +12 -0
- package/dist/.storybook/test-runner.d.ts.map +1 -0
- package/dist/atoms/badge.js +37 -19
- package/dist/atoms/button.js +167 -154
- package/dist/atoms/checkbox.js +52 -0
- package/dist/atoms/figma/badge.figma.js +33 -0
- package/dist/atoms/figma/button.figma.js +76 -0
- package/dist/atoms/figma/checkbox.figma.js +35 -0
- package/dist/atoms/figma/icon.figma.js +33 -0
- package/dist/atoms/figma/image.figma.js +21 -0
- package/dist/atoms/figma/input.figma.js +34 -0
- package/dist/atoms/figma/label.figma.js +25 -0
- package/dist/atoms/figma/link-button.figma.js +42 -0
- package/dist/atoms/figma/link.figma.js +15 -0
- package/dist/atoms/figma/numeric-input.figma.js +52 -0
- package/dist/atoms/figma/rating.figma.js +38 -0
- package/dist/atoms/figma/skeleton.figma.js +119 -0
- package/dist/atoms/figma/status-text.figma.js +27 -0
- package/dist/atoms/figma/textarea.figma.js +38 -0
- package/dist/atoms/figma/tooltip.figma.js +47 -0
- package/dist/atoms/icon.js +17 -17
- package/dist/atoms/image.js +22 -4
- package/dist/atoms/input.js +40 -34
- package/dist/atoms/label.js +10 -10
- package/dist/atoms/link-button.js +19 -18
- package/dist/atoms/link.js +6 -4
- package/dist/atoms/numeric-input.js +98 -70
- package/dist/atoms/rating.js +30 -30
- package/dist/atoms/skeleton.js +47 -47
- package/dist/atoms/status-text.js +75 -0
- package/dist/atoms/textarea.js +48 -42
- package/dist/atoms/tooltip.js +17 -17
- package/dist/molecules/accordion.js +58 -60
- package/dist/molecules/breadcrumb.js +206 -124
- package/dist/molecules/carousel.js +139 -87
- package/dist/molecules/color-select.js +56 -56
- package/dist/molecules/combobox.js +131 -104
- package/dist/molecules/dialog.js +97 -97
- package/dist/molecules/figma/accordion.figma.js +41 -0
- package/dist/molecules/figma/breadcrumb.figma.js +31 -0
- package/dist/molecules/figma/carousel.figma.js +34 -0
- package/dist/molecules/figma/combobox.figma.js +38 -0
- package/dist/molecules/figma/dialog.figma.js +24 -0
- package/dist/molecules/figma/form-checkbox.figma.js +41 -0
- package/dist/molecules/figma/form-input.figma.js +38 -0
- package/dist/molecules/figma/form-numeric-input.figma.js +67 -0
- package/dist/molecules/figma/form-textarea.figma.js +38 -0
- package/dist/molecules/figma/menu.figma.js +26 -0
- package/dist/molecules/figma/pagination.figma.js +22 -0
- package/dist/molecules/figma/popover.figma.js +38 -0
- package/dist/molecules/figma/product-card.figma.js +34 -0
- package/dist/molecules/figma/radio-card.figma.js +35 -0
- package/dist/molecules/figma/radio-group.figma.js +45 -0
- package/dist/molecules/figma/search-form.figma.js +24 -0
- package/dist/molecules/figma/select.figma.js +46 -0
- package/dist/molecules/figma/slider.figma.js +30 -0
- package/dist/molecules/figma/steps.figma.js +33 -0
- package/dist/molecules/figma/switch.figma.js +33 -0
- package/dist/molecules/figma/tabs.figma.js +46 -0
- package/dist/molecules/figma/toast.figma.js +34 -0
- package/dist/molecules/figma/tree-view.figma.js +30 -0
- package/dist/molecules/form-checkbox.js +121 -48
- package/dist/molecules/form-input.js +15 -27
- package/dist/molecules/form-numeric-input.js +11 -24
- package/dist/molecules/form-textarea.js +15 -27
- package/dist/molecules/menu.js +69 -67
- package/dist/molecules/pagination.js +112 -76
- package/dist/molecules/phone-input.js +654 -0
- package/dist/molecules/popover.js +221 -96
- package/dist/molecules/product-card.js +38 -37
- package/dist/molecules/radio-card.js +517 -0
- package/dist/molecules/radio-group.js +341 -0
- package/dist/molecules/search-form.js +170 -91
- package/dist/molecules/select.js +369 -141
- package/dist/molecules/slider.js +72 -85
- package/dist/molecules/steps.js +517 -152
- package/dist/molecules/switch.js +37 -43
- package/dist/molecules/tabs.js +63 -61
- package/dist/molecules/toast.js +32 -32
- package/dist/molecules/tree-view.js +89 -83
- package/dist/organisms/footer.js +50 -52
- package/dist/organisms/gallery.js +244 -0
- package/dist/organisms/header.js +60 -58
- package/dist/organisms/table.js +52 -52
- package/dist/src/atoms/badge.d.ts +27 -7
- package/dist/src/atoms/badge.d.ts.map +1 -1
- package/dist/src/atoms/button.d.ts +7 -6
- package/dist/src/atoms/button.d.ts.map +1 -1
- package/dist/src/atoms/checkbox.d.ts +11 -0
- package/dist/src/atoms/checkbox.d.ts.map +1 -0
- package/dist/src/atoms/figma/badge.figma.d.ts +2 -0
- package/dist/src/atoms/figma/badge.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/button.figma.d.ts +2 -0
- package/dist/src/atoms/figma/button.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/checkbox.figma.d.ts +2 -0
- package/dist/src/atoms/figma/checkbox.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/icon.figma.d.ts +2 -0
- package/dist/src/atoms/figma/icon.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/image.figma.d.ts +2 -0
- package/dist/src/atoms/figma/image.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/input.figma.d.ts +2 -0
- package/dist/src/atoms/figma/input.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/label.figma.d.ts +2 -0
- package/dist/src/atoms/figma/label.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/link-button.figma.d.ts +2 -0
- package/dist/src/atoms/figma/link-button.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/link.figma.d.ts +2 -0
- package/dist/src/atoms/figma/link.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/numeric-input.figma.d.ts +2 -0
- package/dist/src/atoms/figma/numeric-input.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/rating.figma.d.ts +2 -0
- package/dist/src/atoms/figma/rating.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/skeleton.figma.d.ts +2 -0
- package/dist/src/atoms/figma/skeleton.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/status-text.figma.d.ts +2 -0
- package/dist/src/atoms/figma/status-text.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/textarea.figma.d.ts +2 -0
- package/dist/src/atoms/figma/textarea.figma.d.ts.map +1 -0
- package/dist/src/atoms/figma/tooltip.figma.d.ts +2 -0
- package/dist/src/atoms/figma/tooltip.figma.d.ts.map +1 -0
- package/dist/src/atoms/icon.d.ts +6 -6
- package/dist/src/atoms/image.d.ts +35 -9
- package/dist/src/atoms/image.d.ts.map +1 -1
- package/dist/src/atoms/input.d.ts +3 -3
- package/dist/src/atoms/input.d.ts.map +1 -1
- package/dist/src/atoms/label.d.ts +2 -2
- package/dist/src/atoms/link-button.d.ts +71 -12
- package/dist/src/atoms/link-button.d.ts.map +1 -1
- package/dist/src/atoms/link.d.ts +5 -5
- package/dist/src/atoms/link.d.ts.map +1 -1
- package/dist/src/atoms/numeric-input.d.ts +23 -22
- package/dist/src/atoms/numeric-input.d.ts.map +1 -1
- package/dist/src/atoms/rating.d.ts +6 -5
- package/dist/src/atoms/rating.d.ts.map +1 -1
- package/dist/src/atoms/skeleton.d.ts +15 -15
- package/dist/src/atoms/skeleton.d.ts.map +1 -1
- package/dist/src/atoms/status-text.d.ts +97 -0
- package/dist/src/atoms/status-text.d.ts.map +1 -0
- package/dist/src/atoms/textarea.d.ts +3 -3
- package/dist/src/atoms/textarea.d.ts.map +1 -1
- package/dist/src/atoms/tooltip.d.ts +3 -3
- package/dist/src/atoms/tooltip.d.ts.map +1 -1
- package/dist/src/molecules/accordion.d.ts +14 -13
- package/dist/src/molecules/accordion.d.ts.map +1 -1
- package/dist/src/molecules/breadcrumb.d.ts +132 -35
- package/dist/src/molecules/breadcrumb.d.ts.map +1 -1
- package/dist/src/molecules/carousel.d.ts +67 -16
- package/dist/src/molecules/carousel.d.ts.map +1 -1
- package/dist/src/molecules/color-select.d.ts +4 -4
- package/dist/src/molecules/combobox.d.ts +36 -9
- package/dist/src/molecules/combobox.d.ts.map +1 -1
- package/dist/src/molecules/dialog.d.ts +3 -3
- package/dist/src/molecules/dialog.d.ts.map +1 -1
- package/dist/src/molecules/figma/accordion.figma.d.ts +2 -0
- package/dist/src/molecules/figma/accordion.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/breadcrumb.figma.d.ts +2 -0
- package/dist/src/molecules/figma/breadcrumb.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/carousel.figma.d.ts +2 -0
- package/dist/src/molecules/figma/carousel.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/combobox.figma.d.ts +2 -0
- package/dist/src/molecules/figma/combobox.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/dialog.figma.d.ts +2 -0
- package/dist/src/molecules/figma/dialog.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/form-checkbox.figma.d.ts +2 -0
- package/dist/src/molecules/figma/form-checkbox.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/form-input.figma.d.ts +2 -0
- package/dist/src/molecules/figma/form-input.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/form-numeric-input.figma.d.ts +2 -0
- package/dist/src/molecules/figma/form-numeric-input.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/form-textarea.figma.d.ts +2 -0
- package/dist/src/molecules/figma/form-textarea.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/menu.figma.d.ts +2 -0
- package/dist/src/molecules/figma/menu.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/pagination.figma.d.ts +2 -0
- package/dist/src/molecules/figma/pagination.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/popover.figma.d.ts +2 -0
- package/dist/src/molecules/figma/popover.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/product-card.figma.d.ts +2 -0
- package/dist/src/molecules/figma/product-card.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/radio-card.figma.d.ts +2 -0
- package/dist/src/molecules/figma/radio-card.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/radio-group.figma.d.ts +2 -0
- package/dist/src/molecules/figma/radio-group.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/search-form.figma.d.ts +2 -0
- package/dist/src/molecules/figma/search-form.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/select.figma.d.ts +2 -0
- package/dist/src/molecules/figma/select.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/slider.figma.d.ts +2 -0
- package/dist/src/molecules/figma/slider.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/steps.figma.d.ts +2 -0
- package/dist/src/molecules/figma/steps.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/switch.figma.d.ts +2 -0
- package/dist/src/molecules/figma/switch.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/tabs.figma.d.ts +2 -0
- package/dist/src/molecules/figma/tabs.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/toast.figma.d.ts +2 -0
- package/dist/src/molecules/figma/toast.figma.d.ts.map +1 -0
- package/dist/src/molecules/figma/tree-view.figma.d.ts +2 -0
- package/dist/src/molecules/figma/tree-view.figma.d.ts.map +1 -0
- package/dist/src/molecules/form-checkbox.d.ts +22 -12
- package/dist/src/molecules/form-checkbox.d.ts.map +1 -1
- package/dist/src/molecules/form-input.d.ts +8 -6
- package/dist/src/molecules/form-input.d.ts.map +1 -1
- package/dist/src/molecules/form-numeric-input.d.ts +6 -6
- package/dist/src/molecules/form-numeric-input.d.ts.map +1 -1
- package/dist/src/molecules/form-textarea.d.ts +8 -6
- package/dist/src/molecules/form-textarea.d.ts.map +1 -1
- package/dist/src/molecules/menu.d.ts +11 -11
- package/dist/src/molecules/menu.d.ts.map +1 -1
- package/dist/src/molecules/pagination.d.ts +37 -9
- package/dist/src/molecules/pagination.d.ts.map +1 -1
- package/dist/src/molecules/phone-input.d.ts +246 -0
- package/dist/src/molecules/phone-input.d.ts.map +1 -0
- package/dist/src/molecules/popover.d.ts +76 -24
- package/dist/src/molecules/popover.d.ts.map +1 -1
- package/dist/src/molecules/product-card.d.ts +11 -10
- package/dist/src/molecules/product-card.d.ts.map +1 -1
- package/dist/src/molecules/radio-card.d.ts +429 -0
- package/dist/src/molecules/radio-card.d.ts.map +1 -0
- package/dist/src/molecules/radio-group.d.ts +245 -0
- package/dist/src/molecules/radio-group.d.ts.map +1 -0
- package/dist/src/molecules/search-form.d.ts +94 -27
- package/dist/src/molecules/search-form.d.ts.map +1 -1
- package/dist/src/molecules/select.d.ts +124 -30
- package/dist/src/molecules/select.d.ts.map +1 -1
- package/dist/src/molecules/slider.d.ts +9 -12
- package/dist/src/molecules/slider.d.ts.map +1 -1
- package/dist/src/molecules/steps.d.ts +236 -64
- package/dist/src/molecules/steps.d.ts.map +1 -1
- package/dist/src/molecules/switch.d.ts +25 -25
- package/dist/src/molecules/switch.d.ts.map +1 -1
- package/dist/src/molecules/tabs.d.ts +10 -10
- package/dist/src/molecules/tabs.d.ts.map +1 -1
- package/dist/src/molecules/toast.d.ts +27 -27
- package/dist/src/molecules/tree-view.d.ts +14 -14
- package/dist/src/molecules/tree-view.d.ts.map +1 -1
- package/dist/src/organisms/footer.d.ts +15 -6
- package/dist/src/organisms/footer.d.ts.map +1 -1
- package/dist/src/organisms/gallery.d.ts +147 -0
- package/dist/src/organisms/gallery.d.ts.map +1 -0
- package/dist/src/organisms/header.d.ts +9 -9
- package/dist/src/organisms/header.d.ts.map +1 -1
- package/dist/src/organisms/table.d.ts +10 -10
- package/dist/src/organisms/table.d.ts.map +1 -1
- package/dist/src/templates/accordion.d.ts +3 -3
- package/dist/src/templates/breadcrumb.d.ts +28 -0
- package/dist/src/templates/breadcrumb.d.ts.map +1 -0
- package/dist/src/templates/carousel.d.ts +4 -4
- package/dist/src/templates/carousel.d.ts.map +1 -1
- package/dist/src/templates/gallery.d.ts +43 -0
- package/dist/src/templates/gallery.d.ts.map +1 -0
- package/dist/src/templates/numeric-input.d.ts +5 -5
- package/dist/src/templates/popover.d.ts +19 -0
- package/dist/src/templates/popover.d.ts.map +1 -0
- package/dist/src/templates/product-card.d.ts +4 -4
- package/dist/src/templates/select.d.ts +22 -0
- package/dist/src/templates/select.d.ts.map +1 -0
- package/dist/src/templates/tabs.d.ts +4 -4
- package/dist/src/types/zag.d.ts +19 -18
- package/dist/src/types/zag.d.ts.map +1 -1
- package/dist/src/utils.d.ts +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/stories/atoms/badge.stories.d.ts +12 -0
- package/dist/stories/atoms/badge.stories.d.ts.map +1 -0
- package/dist/stories/atoms/button.stories.d.ts +12 -0
- package/dist/stories/atoms/button.stories.d.ts.map +1 -0
- package/dist/stories/atoms/checkbox.stories.d.ts +56 -0
- package/dist/stories/atoms/checkbox.stories.d.ts.map +1 -0
- package/dist/stories/atoms/icon.stories.d.ts +11 -0
- package/dist/stories/atoms/icon.stories.d.ts.map +1 -0
- package/dist/stories/atoms/image.stories.d.ts +8 -0
- package/dist/stories/atoms/image.stories.d.ts.map +1 -0
- package/dist/stories/atoms/input.stories.d.ts +8 -0
- package/dist/stories/atoms/input.stories.d.ts.map +1 -0
- package/dist/stories/atoms/numeric-input.stories.d.ts +23 -0
- package/dist/stories/atoms/numeric-input.stories.d.ts.map +1 -0
- package/dist/stories/atoms/rating.stories.d.ts +10 -0
- package/dist/stories/atoms/rating.stories.d.ts.map +1 -0
- package/dist/stories/atoms/skeleton.stories.d.ts +34 -0
- package/dist/stories/atoms/skeleton.stories.d.ts.map +1 -0
- package/dist/stories/atoms/status-text.stories.d.ts +15 -0
- package/dist/stories/atoms/status-text.stories.d.ts.map +1 -0
- package/dist/stories/atoms/textarea.stories.d.ts +12 -0
- package/dist/stories/atoms/textarea.stories.d.ts.map +1 -0
- package/dist/stories/atoms/tooltip.stories.d.ts +28 -0
- package/dist/stories/atoms/tooltip.stories.d.ts.map +1 -0
- package/dist/stories/helpers/icon-options.d.ts +4 -0
- package/dist/stories/helpers/icon-options.d.ts.map +1 -0
- package/dist/stories/molecules/accordion.stories.d.ts +14 -0
- package/dist/stories/molecules/accordion.stories.d.ts.map +1 -0
- package/dist/stories/molecules/breadcrumb.stories.d.ts +14 -0
- package/dist/stories/molecules/breadcrumb.stories.d.ts.map +1 -0
- package/dist/stories/molecules/carousel.stories.d.ts +19 -0
- package/dist/stories/molecules/carousel.stories.d.ts.map +1 -0
- package/dist/stories/molecules/color-select.stories.d.ts +12 -0
- package/dist/stories/molecules/color-select.stories.d.ts.map +1 -0
- package/dist/stories/molecules/combobox.stories.d.ts +11 -0
- package/dist/stories/molecules/combobox.stories.d.ts.map +1 -0
- package/dist/stories/molecules/dialog.stories.d.ts +19 -0
- package/dist/stories/molecules/dialog.stories.d.ts.map +1 -0
- package/dist/stories/molecules/form-checkbox.stories.d.ts +17 -0
- package/dist/stories/molecules/form-checkbox.stories.d.ts.map +1 -0
- package/dist/stories/molecules/form-input.stories.d.ts +12 -0
- package/dist/stories/molecules/form-input.stories.d.ts.map +1 -0
- package/dist/stories/molecules/form-numeric-input.stories.d.ts +17 -0
- package/dist/stories/molecules/form-numeric-input.stories.d.ts.map +1 -0
- package/dist/stories/molecules/form-textarea.stories.d.ts +12 -0
- package/dist/stories/molecules/form-textarea.stories.d.ts.map +1 -0
- package/dist/stories/molecules/menu.stories.d.ts +22 -0
- package/dist/stories/molecules/menu.stories.d.ts.map +1 -0
- package/dist/stories/molecules/pagination.stories.d.ts +13 -0
- package/dist/stories/molecules/pagination.stories.d.ts.map +1 -0
- package/dist/stories/molecules/phone-input.stories.d.ts +19 -0
- package/dist/stories/molecules/phone-input.stories.d.ts.map +1 -0
- package/dist/stories/molecules/popover.stories.d.ts +140 -0
- package/dist/stories/molecules/popover.stories.d.ts.map +1 -0
- package/dist/stories/molecules/product-card.stories.d.ts +41 -0
- package/dist/stories/molecules/product-card.stories.d.ts.map +1 -0
- package/dist/stories/molecules/radio-card.stories.d.ts +13 -0
- package/dist/stories/molecules/radio-card.stories.d.ts.map +1 -0
- package/dist/stories/molecules/radio-group.stories.d.ts +13 -0
- package/dist/stories/molecules/radio-group.stories.d.ts.map +1 -0
- package/dist/stories/molecules/search-form.stories.d.ts +16 -0
- package/dist/stories/molecules/search-form.stories.d.ts.map +1 -0
- package/dist/stories/molecules/select.stories.d.ts +19 -0
- package/dist/stories/molecules/select.stories.d.ts.map +1 -0
- package/dist/stories/molecules/slider.stories.d.ts +19 -0
- package/dist/stories/molecules/slider.stories.d.ts.map +1 -0
- package/dist/stories/molecules/steps.stories.d.ts +19 -0
- package/dist/stories/molecules/steps.stories.d.ts.map +1 -0
- package/dist/stories/molecules/switch.stories.d.ts +13 -0
- package/dist/stories/molecules/switch.stories.d.ts.map +1 -0
- package/dist/stories/molecules/tabs.stories.d.ts +18 -0
- package/dist/stories/molecules/tabs.stories.d.ts.map +1 -0
- package/dist/stories/molecules/toast.stories.d.ts +11 -0
- package/dist/stories/molecules/toast.stories.d.ts.map +1 -0
- package/dist/stories/molecules/tree-view.stories.d.ts +17 -0
- package/dist/stories/molecules/tree-view.stories.d.ts.map +1 -0
- package/dist/stories/organisms/footer.stories.d.ts +12 -0
- package/dist/stories/organisms/footer.stories.d.ts.map +1 -0
- package/dist/stories/organisms/gallery.stories.d.ts +73 -0
- package/dist/stories/organisms/gallery.stories.d.ts.map +1 -0
- package/dist/stories/organisms/header.stories.d.ts +12 -0
- package/dist/stories/organisms/header.stories.d.ts.map +1 -0
- package/dist/stories/organisms/table.stories.d.ts +56 -0
- package/dist/stories/organisms/table.stories.d.ts.map +1 -0
- package/dist/stories/overview/apca-contrast-test.stories.d.ts +8 -0
- package/dist/stories/overview/apca-contrast-test.stories.d.ts.map +1 -0
- package/dist/stories/overview/color-palette.stories.d.ts +8 -0
- package/dist/stories/overview/color-palette.stories.d.ts.map +1 -0
- package/dist/stories/overview/component-comparison.stories.d.ts +6 -0
- package/dist/stories/overview/component-comparison.stories.d.ts.map +1 -0
- package/dist/stories/templates/accordion.stories.d.ts +8 -0
- package/dist/stories/templates/accordion.stories.d.ts.map +1 -0
- package/dist/stories/templates/breadcrumb.stories.d.ts +12 -0
- package/dist/stories/templates/breadcrumb.stories.d.ts.map +1 -0
- package/dist/stories/templates/carousel.stories.d.ts +8 -0
- package/dist/stories/templates/carousel.stories.d.ts.map +1 -0
- package/dist/stories/templates/comprehensive-form.stories.d.ts +26 -0
- package/dist/stories/templates/comprehensive-form.stories.d.ts.map +1 -0
- package/dist/stories/templates/gallery.stories.d.ts +7 -0
- package/dist/stories/templates/gallery.stories.d.ts.map +1 -0
- package/dist/stories/templates/numeric-input.stories.d.ts +8 -0
- package/dist/stories/templates/numeric-input.stories.d.ts.map +1 -0
- package/dist/stories/templates/popover.stories.d.ts +55 -0
- package/dist/stories/templates/popover.stories.d.ts.map +1 -0
- package/dist/stories/templates/product-card.stories.d.ts +10 -0
- package/dist/stories/templates/product-card.stories.d.ts.map +1 -0
- package/dist/stories/templates/select.stories.d.ts +10 -0
- package/dist/stories/templates/select.stories.d.ts.map +1 -0
- package/dist/stories/templates/tabs.stories.d.ts +8 -0
- package/dist/stories/templates/tabs.stories.d.ts.map +1 -0
- package/dist/templates/accordion.js +9 -9
- package/dist/templates/breadcrumb.js +78 -0
- package/dist/templates/carousel.js +13 -15
- package/dist/templates/gallery.js +89 -0
- package/dist/templates/numeric-input.js +4 -4
- package/dist/templates/popover.js +35 -0
- package/dist/templates/product-card.js +10 -10
- package/dist/templates/select.js +43 -0
- package/dist/templates/tabs.js +8 -8
- package/dist/test/visual.spec.d.ts +2 -0
- package/dist/test/visual.spec.d.ts.map +1 -0
- package/dist/utils.js +1 -1
- package/package.json +52 -32
- package/src/tokens/_base.css +3 -3
- package/src/tokens/_layout.css +4 -0
- package/src/tokens/_semantic.css +49 -10
- package/src/tokens/_tokens-base.css +67 -0
- package/src/tokens/_typography.css +36 -6
- package/src/tokens/components/_form-control.css +67 -0
- package/src/tokens/components/atoms/_badge.css +16 -5
- package/src/tokens/components/atoms/_button.css +16 -10
- package/src/tokens/components/atoms/_checkbox.css +52 -0
- package/src/tokens/components/atoms/_icon.css +90 -2
- package/src/tokens/components/atoms/_image.css +5 -0
- package/src/tokens/components/atoms/_input.css +11 -32
- package/src/tokens/components/atoms/_label.css +11 -0
- package/src/tokens/components/atoms/_numeric-input.css +27 -13
- package/src/tokens/components/atoms/_rating.css +2 -2
- package/src/tokens/components/atoms/_status-text.css +32 -0
- package/src/tokens/components/atoms/_textarea.css +15 -17
- package/src/tokens/components/components.css +10 -1
- package/src/tokens/components/molecules/_accordion.css +1 -8
- package/src/tokens/components/molecules/_breadcrumb.css +42 -20
- package/src/tokens/components/molecules/_carousel.css +10 -2
- package/src/tokens/components/molecules/_color-select.css +3 -3
- package/src/tokens/components/molecules/_combobox.css +15 -21
- package/src/tokens/components/molecules/_dialog.css +0 -1
- package/src/tokens/components/molecules/_menu.css +0 -1
- package/src/tokens/components/molecules/_pagination.css +3 -3
- package/src/tokens/components/molecules/_phone-input.css +63 -0
- package/src/tokens/components/molecules/_popover.css +3 -0
- package/src/tokens/components/molecules/_product-card.css +9 -1
- package/src/tokens/components/molecules/_radio-card.css +197 -0
- package/src/tokens/components/molecules/_radio-group.css +150 -0
- package/src/tokens/components/molecules/_search-form.css +7 -3
- package/src/tokens/components/molecules/_select.css +41 -20
- package/src/tokens/components/molecules/_steps.css +115 -34
- package/src/tokens/components/molecules/_toast.css +5 -5
- package/src/tokens/components/molecules/_tree-view.css +5 -6
- package/src/tokens/components/organisms/_footer.css +1 -6
- package/src/tokens/components/organisms/_gallery.css +35 -0
- package/src/tokens/components/organisms/_header.css +8 -0
- package/src/tokens/figma/dark/variables.css +1406 -0
- package/src/tokens/figma/light/variables.css +1406 -0
- package/src/tokens/index.css +1 -65
- package/src/tokens/theme.css +95 -0
- package/src/tokens/tokens-only.css +1 -64
- package/dist/atoms/error-text.js +0 -38
- package/dist/atoms/extra-text.js +0 -27
- package/dist/molecules/checkbox.js +0 -98
- package/dist/src/atoms/error-text.d.ts +0 -29
- package/dist/src/atoms/error-text.d.ts.map +0 -1
- package/dist/src/atoms/extra-text.d.ts +0 -27
- package/dist/src/atoms/extra-text.d.ts.map +0 -1
- package/dist/src/molecules/checkbox.d.ts +0 -19
- package/dist/src/molecules/checkbox.d.ts.map +0 -1
- package/src/tokens/components/molecules/_checkbox.css +0 -34
- package/src/tokens/components/molecules/index.css +0 -2
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { connect, machine } from "@zag-js/radio-group";
|
|
3
|
+
import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
|
|
4
|
+
import { createContext, useContext, useId } from "react";
|
|
5
|
+
import { Label } from "../atoms/label.js";
|
|
6
|
+
import { StatusText } from "../atoms/status-text.js";
|
|
7
|
+
import { tv } from "../utils.js";
|
|
8
|
+
const radioCardVariants = tv({
|
|
9
|
+
slots: {
|
|
10
|
+
root: [
|
|
11
|
+
"flex w-full flex-col"
|
|
12
|
+
],
|
|
13
|
+
item: [
|
|
14
|
+
"relative flex min-w-0 flex-col overflow-hidden",
|
|
15
|
+
"rounded-radio-card-item",
|
|
16
|
+
"border-(length:--border-width-radio-card)",
|
|
17
|
+
"border-radio-card-item-border",
|
|
18
|
+
"bg-radio-card-item-bg",
|
|
19
|
+
"text-radio-card-item-fg",
|
|
20
|
+
"shadow-radio-card-item",
|
|
21
|
+
"transition-colors duration-200 motion-reduce:transition-none",
|
|
22
|
+
"data-hover:bg-radio-card-item-bg-hover",
|
|
23
|
+
"data-hover:border-radio-card-item-border-hover",
|
|
24
|
+
"data-disabled:cursor-not-allowed",
|
|
25
|
+
"data-disabled:bg-radio-card-item-bg-disabled",
|
|
26
|
+
"data-disabled:border-radio-card-item-border-disabled",
|
|
27
|
+
"data-disabled:text-radio-card-item-fg-disabled",
|
|
28
|
+
"data-disabled:data-[state=checked]:bg-radio-card-item-bg-disabled",
|
|
29
|
+
"data-disabled:data-[state=checked]:border-radio-card-item-border-disabled",
|
|
30
|
+
"data-disabled:data-[state=checked]:text-radio-card-item-fg-disabled",
|
|
31
|
+
"data-focus-visible:outline-(style:--default-ring-style)",
|
|
32
|
+
"data-focus-visible:outline-(length:--default-ring-width)",
|
|
33
|
+
"data-focus-visible:outline-radio-card-ring",
|
|
34
|
+
"data-focus-visible:outline-offset-(length:--default-ring-offset)",
|
|
35
|
+
"data-invalid:border-radio-card-item-border-error"
|
|
36
|
+
],
|
|
37
|
+
itemControl: [
|
|
38
|
+
"flex min-w-0 flex-1"
|
|
39
|
+
],
|
|
40
|
+
itemContent: [
|
|
41
|
+
"flex min-w-0 flex-col"
|
|
42
|
+
],
|
|
43
|
+
itemText: [
|
|
44
|
+
"min-w-0",
|
|
45
|
+
"font-radio-card-item",
|
|
46
|
+
"text-radio-card-item-fg",
|
|
47
|
+
"leading-snug",
|
|
48
|
+
"data-disabled:text-radio-card-item-fg-disabled",
|
|
49
|
+
"data-disabled:data-[state=checked]:text-radio-card-item-fg-disabled"
|
|
50
|
+
],
|
|
51
|
+
itemDescription: [
|
|
52
|
+
"min-w-0",
|
|
53
|
+
"text-radio-card-item-description-fg",
|
|
54
|
+
"leading-normal",
|
|
55
|
+
"data-disabled:text-radio-card-item-description-fg-disabled",
|
|
56
|
+
"data-disabled:data-[state=checked]:text-radio-card-item-description-fg-disabled"
|
|
57
|
+
],
|
|
58
|
+
itemIndicator: [
|
|
59
|
+
"inline-grid shrink-0 place-items-center",
|
|
60
|
+
"rounded-radio-card-indicator",
|
|
61
|
+
"border-(length:--border-width-radio-card-indicator)",
|
|
62
|
+
"border-radio-card-item-indicator-border",
|
|
63
|
+
"bg-radio-card-item-indicator-bg",
|
|
64
|
+
"transition-colors duration-200 motion-reduce:transition-none",
|
|
65
|
+
"data-disabled:border-radio-card-item-indicator-border-disabled",
|
|
66
|
+
"data-disabled:bg-radio-card-item-indicator-bg-disabled",
|
|
67
|
+
"data-disabled:data-[state=checked]:border-radio-card-item-indicator-border-disabled",
|
|
68
|
+
"data-disabled:data-[state=checked]:bg-radio-card-item-indicator-bg-disabled"
|
|
69
|
+
],
|
|
70
|
+
itemIndicatorContent: [
|
|
71
|
+
"inline-grid place-items-center",
|
|
72
|
+
"text-radio-card-item-indicator-content-fg",
|
|
73
|
+
"opacity-0 transition-opacity duration-200 motion-reduce:transition-none",
|
|
74
|
+
"data-[state=checked]:opacity-100",
|
|
75
|
+
"data-disabled:data-[state=checked]:text-radio-card-item-indicator-content-fg-disabled"
|
|
76
|
+
],
|
|
77
|
+
itemIndicatorMark: [
|
|
78
|
+
"block leading-none",
|
|
79
|
+
"token-icon-radio-card-checked"
|
|
80
|
+
],
|
|
81
|
+
itemAddon: [
|
|
82
|
+
"border-t-(length:--border-width-radio-card-addon)",
|
|
83
|
+
"border-radio-card-item-addon-border",
|
|
84
|
+
"font-radio-card-item-addon",
|
|
85
|
+
"text-radio-card-item-addon-fg",
|
|
86
|
+
"transition-colors duration-200 motion-reduce:transition-none",
|
|
87
|
+
"data-disabled:border-radio-card-item-addon-border-disabled",
|
|
88
|
+
"data-disabled:bg-radio-card-item-addon-bg-disabled",
|
|
89
|
+
"data-disabled:text-radio-card-item-addon-fg-disabled",
|
|
90
|
+
"data-disabled:data-[state=checked]:border-radio-card-item-addon-border-disabled",
|
|
91
|
+
"data-disabled:data-[state=checked]:bg-radio-card-item-addon-bg-disabled",
|
|
92
|
+
"data-disabled:data-[state=checked]:text-radio-card-item-addon-fg-disabled"
|
|
93
|
+
],
|
|
94
|
+
hiddenInput: "sr-only"
|
|
95
|
+
},
|
|
96
|
+
variants: {
|
|
97
|
+
variant: {
|
|
98
|
+
outline: {
|
|
99
|
+
item: [
|
|
100
|
+
"data-[state=checked]:bg-radio-card-item-bg-outline-checked",
|
|
101
|
+
"data-[state=checked]:border-radio-card-item-border-outline-checked",
|
|
102
|
+
"data-hover:data-[state=checked]:bg-radio-card-item-bg-outline-checked-hover",
|
|
103
|
+
"data-hover:data-[state=checked]:border-radio-card-item-border-outline-checked-hover"
|
|
104
|
+
],
|
|
105
|
+
itemIndicator: [
|
|
106
|
+
"data-[state=checked]:border-radio-card-item-indicator-border-outline-checked"
|
|
107
|
+
],
|
|
108
|
+
itemIndicatorContent: [
|
|
109
|
+
"data-[state=checked]:text-radio-card-item-indicator-content-fg-outline-checked"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
subtle: {
|
|
113
|
+
item: [
|
|
114
|
+
"data-[state=checked]:bg-radio-card-item-bg-subtle-checked",
|
|
115
|
+
"data-[state=checked]:border-radio-card-item-border-subtle-checked",
|
|
116
|
+
"data-hover:data-[state=checked]:bg-radio-card-item-bg-subtle-checked-hover",
|
|
117
|
+
"data-hover:data-[state=checked]:border-radio-card-item-border-subtle-checked-hover"
|
|
118
|
+
],
|
|
119
|
+
itemText: [
|
|
120
|
+
"data-[state=checked]:text-radio-card-item-fg-subtle-checked"
|
|
121
|
+
],
|
|
122
|
+
itemDescription: [
|
|
123
|
+
"data-[state=checked]:text-radio-card-item-description-fg-subtle-checked"
|
|
124
|
+
],
|
|
125
|
+
itemIndicator: [
|
|
126
|
+
"data-[state=checked]:border-radio-card-item-indicator-border-subtle-checked"
|
|
127
|
+
],
|
|
128
|
+
itemIndicatorContent: [
|
|
129
|
+
"data-[state=checked]:text-radio-card-item-indicator-content-fg-subtle-checked"
|
|
130
|
+
],
|
|
131
|
+
itemAddon: [
|
|
132
|
+
"data-[state=checked]:border-radio-card-item-addon-border-subtle-checked",
|
|
133
|
+
"data-[state=checked]:text-radio-card-item-addon-fg-subtle-checked"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
solid: {
|
|
137
|
+
item: [
|
|
138
|
+
"data-[state=checked]:bg-radio-card-item-bg-solid-checked",
|
|
139
|
+
"data-[state=checked]:border-radio-card-item-border-solid-checked",
|
|
140
|
+
"data-hover:data-[state=checked]:bg-radio-card-item-bg-solid-checked-hover",
|
|
141
|
+
"data-hover:data-[state=checked]:border-radio-card-item-border-solid-checked-hover"
|
|
142
|
+
],
|
|
143
|
+
itemText: [
|
|
144
|
+
"data-[state=checked]:text-radio-card-item-fg-solid-checked"
|
|
145
|
+
],
|
|
146
|
+
itemDescription: [
|
|
147
|
+
"data-[state=checked]:text-radio-card-item-description-fg-solid-checked"
|
|
148
|
+
],
|
|
149
|
+
itemIndicator: [
|
|
150
|
+
"data-[state=checked]:border-radio-card-item-indicator-border-solid-checked",
|
|
151
|
+
"data-[state=checked]:bg-radio-card-item-indicator-bg-solid-checked"
|
|
152
|
+
],
|
|
153
|
+
itemIndicatorContent: [
|
|
154
|
+
"data-[state=checked]:text-radio-card-item-indicator-content-fg-solid-checked"
|
|
155
|
+
],
|
|
156
|
+
itemAddon: [
|
|
157
|
+
"data-[state=checked]:border-radio-card-item-addon-border-solid-checked",
|
|
158
|
+
"data-[state=checked]:text-radio-card-item-addon-fg-solid-checked"
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
size: {
|
|
163
|
+
sm: {
|
|
164
|
+
root: "gap-radio-card-root-sm",
|
|
165
|
+
itemControl: [
|
|
166
|
+
"gap-radio-card-item-control-sm",
|
|
167
|
+
"p-radio-card-item-control-sm"
|
|
168
|
+
],
|
|
169
|
+
itemContent: "gap-radio-card-item-content-sm",
|
|
170
|
+
itemText: "text-radio-card-item-sm",
|
|
171
|
+
itemDescription: "text-radio-card-item-description-sm",
|
|
172
|
+
itemIndicator: "size-radio-card-indicator-sm",
|
|
173
|
+
itemIndicatorMark: "size-radio-card-indicator-mark-sm",
|
|
174
|
+
itemAddon: [
|
|
175
|
+
"p-radio-card-item-addon-sm",
|
|
176
|
+
"text-radio-card-item-addon-sm"
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
md: {
|
|
180
|
+
root: "gap-radio-card-root-md",
|
|
181
|
+
itemControl: [
|
|
182
|
+
"gap-radio-card-item-control-md",
|
|
183
|
+
"p-radio-card-item-control-md"
|
|
184
|
+
],
|
|
185
|
+
itemContent: "gap-radio-card-item-content-md",
|
|
186
|
+
itemText: "text-radio-card-item-md",
|
|
187
|
+
itemDescription: "text-radio-card-item-description-md",
|
|
188
|
+
itemIndicator: "size-radio-card-indicator-md",
|
|
189
|
+
itemIndicatorMark: "size-radio-card-indicator-mark-md",
|
|
190
|
+
itemAddon: [
|
|
191
|
+
"p-radio-card-item-addon-md",
|
|
192
|
+
"text-radio-card-item-addon-md"
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
lg: {
|
|
196
|
+
root: "gap-radio-card-root-lg",
|
|
197
|
+
itemControl: [
|
|
198
|
+
"gap-radio-card-item-control-lg",
|
|
199
|
+
"p-radio-card-item-control-lg"
|
|
200
|
+
],
|
|
201
|
+
itemContent: "gap-radio-card-item-content-lg",
|
|
202
|
+
itemText: "text-radio-card-item-lg",
|
|
203
|
+
itemDescription: "text-radio-card-item-description-lg",
|
|
204
|
+
itemIndicator: "size-radio-card-indicator-lg",
|
|
205
|
+
itemIndicatorMark: "size-radio-card-indicator-mark-lg",
|
|
206
|
+
itemAddon: [
|
|
207
|
+
"p-radio-card-item-addon-lg",
|
|
208
|
+
"text-radio-card-item-addon-lg"
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
itemOrientation: {
|
|
213
|
+
horizontal: {
|
|
214
|
+
itemControl: "flex-row",
|
|
215
|
+
itemContent: "flex-1",
|
|
216
|
+
itemText: "flex-1"
|
|
217
|
+
},
|
|
218
|
+
vertical: {
|
|
219
|
+
itemControl: "flex-col"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
align: {
|
|
223
|
+
start: {
|
|
224
|
+
itemControl: "items-start",
|
|
225
|
+
itemContent: "items-start",
|
|
226
|
+
itemText: "text-left",
|
|
227
|
+
itemDescription: "text-left",
|
|
228
|
+
itemAddon: "text-left"
|
|
229
|
+
},
|
|
230
|
+
center: {
|
|
231
|
+
itemControl: "items-center",
|
|
232
|
+
itemContent: "items-center",
|
|
233
|
+
itemText: "text-center",
|
|
234
|
+
itemDescription: "text-center",
|
|
235
|
+
itemAddon: "text-center"
|
|
236
|
+
},
|
|
237
|
+
end: {
|
|
238
|
+
itemControl: "items-end",
|
|
239
|
+
itemContent: "items-end",
|
|
240
|
+
itemText: "text-right",
|
|
241
|
+
itemDescription: "text-right",
|
|
242
|
+
itemAddon: "text-right"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
justify: {
|
|
246
|
+
start: {
|
|
247
|
+
itemControl: "justify-start"
|
|
248
|
+
},
|
|
249
|
+
center: {
|
|
250
|
+
itemControl: "justify-center"
|
|
251
|
+
},
|
|
252
|
+
end: {
|
|
253
|
+
itemControl: "justify-end"
|
|
254
|
+
},
|
|
255
|
+
between: {
|
|
256
|
+
itemControl: "justify-between"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
defaultVariants: {
|
|
261
|
+
variant: "outline",
|
|
262
|
+
size: "md",
|
|
263
|
+
itemOrientation: "horizontal",
|
|
264
|
+
align: "start",
|
|
265
|
+
justify: "between"
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
const RadioCardContext = /*#__PURE__*/ createContext(null);
|
|
269
|
+
function useRadioCardContext() {
|
|
270
|
+
const context = useContext(RadioCardContext);
|
|
271
|
+
if (!context) throw new Error("RadioCard components must be used within RadioCard");
|
|
272
|
+
return context;
|
|
273
|
+
}
|
|
274
|
+
const RadioCardItemContext = /*#__PURE__*/ createContext(null);
|
|
275
|
+
function useRadioCardItemContext() {
|
|
276
|
+
const context = useContext(RadioCardItemContext);
|
|
277
|
+
if (!context) throw new Error("RadioCard item components must be used within RadioCard.Item");
|
|
278
|
+
return context;
|
|
279
|
+
}
|
|
280
|
+
function RadioCard({ "aria-describedby": ariaDescribedByProp, id: providedId, disabled = false, required = false, orientation = "horizontal", itemOrientation = "horizontal", align = "start", justify = "between", validateStatus = "default", onValueChange, variant = "outline", size = "md", children, className, ref, ...machineProps }) {
|
|
281
|
+
const generatedId = useId();
|
|
282
|
+
const id = providedId || generatedId;
|
|
283
|
+
const invalid = "error" === validateStatus;
|
|
284
|
+
const service = useMachine(machine, {
|
|
285
|
+
...machineProps,
|
|
286
|
+
id,
|
|
287
|
+
disabled,
|
|
288
|
+
required,
|
|
289
|
+
orientation,
|
|
290
|
+
invalid,
|
|
291
|
+
onValueChange: ({ value: nextValue })=>{
|
|
292
|
+
onValueChange?.(nextValue);
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
const api = connect(service, normalizeProps);
|
|
296
|
+
const styles = radioCardVariants({
|
|
297
|
+
size,
|
|
298
|
+
variant,
|
|
299
|
+
itemOrientation,
|
|
300
|
+
align,
|
|
301
|
+
justify
|
|
302
|
+
});
|
|
303
|
+
const rootProps = mergeProps({
|
|
304
|
+
"aria-describedby": ariaDescribedByProp
|
|
305
|
+
}, api.getRootProps());
|
|
306
|
+
return /*#__PURE__*/ jsx(RadioCardContext.Provider, {
|
|
307
|
+
value: {
|
|
308
|
+
api,
|
|
309
|
+
variant,
|
|
310
|
+
size,
|
|
311
|
+
itemOrientation,
|
|
312
|
+
align,
|
|
313
|
+
justify,
|
|
314
|
+
disabled,
|
|
315
|
+
required,
|
|
316
|
+
validateStatus
|
|
317
|
+
},
|
|
318
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
319
|
+
className: styles.root({
|
|
320
|
+
className
|
|
321
|
+
}),
|
|
322
|
+
ref: ref,
|
|
323
|
+
...rootProps,
|
|
324
|
+
children: children
|
|
325
|
+
})
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
RadioCard.Label = function({ children, disabled, required, size: sizeProp, ...props }) {
|
|
329
|
+
const { api, size, disabled: groupDisabled, required: groupRequired } = useRadioCardContext();
|
|
330
|
+
const labelProps = mergeProps(props, api.getLabelProps());
|
|
331
|
+
return /*#__PURE__*/ jsx(Label, {
|
|
332
|
+
disabled: disabled ?? groupDisabled,
|
|
333
|
+
required: required ?? groupRequired,
|
|
334
|
+
size: sizeProp ?? size,
|
|
335
|
+
...labelProps,
|
|
336
|
+
children: children
|
|
337
|
+
});
|
|
338
|
+
};
|
|
339
|
+
RadioCard.Item = function({ value, disabled, invalid, children, className, ref, ...props }) {
|
|
340
|
+
const { api, size, variant } = useRadioCardContext();
|
|
341
|
+
const styles = radioCardVariants({
|
|
342
|
+
size,
|
|
343
|
+
variant
|
|
344
|
+
});
|
|
345
|
+
const itemProps = {
|
|
346
|
+
value,
|
|
347
|
+
disabled,
|
|
348
|
+
invalid
|
|
349
|
+
};
|
|
350
|
+
const mergedItemProps = mergeProps(props, api.getItemProps(itemProps));
|
|
351
|
+
return /*#__PURE__*/ jsx(RadioCardItemContext.Provider, {
|
|
352
|
+
value: {
|
|
353
|
+
itemProps
|
|
354
|
+
},
|
|
355
|
+
children: /*#__PURE__*/ jsx("label", {
|
|
356
|
+
className: styles.item({
|
|
357
|
+
className
|
|
358
|
+
}),
|
|
359
|
+
ref: ref,
|
|
360
|
+
...mergedItemProps,
|
|
361
|
+
children: children
|
|
362
|
+
})
|
|
363
|
+
});
|
|
364
|
+
};
|
|
365
|
+
RadioCard.ItemHiddenInput = function({ className, ref, ...props }) {
|
|
366
|
+
const { api, size, variant } = useRadioCardContext();
|
|
367
|
+
const { itemProps } = useRadioCardItemContext();
|
|
368
|
+
const styles = radioCardVariants({
|
|
369
|
+
size,
|
|
370
|
+
variant
|
|
371
|
+
});
|
|
372
|
+
const hiddenInputProps = mergeProps(props, api.getItemHiddenInputProps(itemProps));
|
|
373
|
+
return /*#__PURE__*/ jsx("input", {
|
|
374
|
+
className: styles.hiddenInput({
|
|
375
|
+
className
|
|
376
|
+
}),
|
|
377
|
+
ref: ref,
|
|
378
|
+
...hiddenInputProps
|
|
379
|
+
});
|
|
380
|
+
};
|
|
381
|
+
RadioCard.ItemControl = function({ children, className, ref, ...props }) {
|
|
382
|
+
const { api, size, variant, itemOrientation, align, justify } = useRadioCardContext();
|
|
383
|
+
const { itemProps } = useRadioCardItemContext();
|
|
384
|
+
const styles = radioCardVariants({
|
|
385
|
+
size,
|
|
386
|
+
variant,
|
|
387
|
+
itemOrientation,
|
|
388
|
+
align,
|
|
389
|
+
justify
|
|
390
|
+
});
|
|
391
|
+
const itemControlProps = mergeProps(props, api.getItemControlProps(itemProps));
|
|
392
|
+
return /*#__PURE__*/ jsx("div", {
|
|
393
|
+
className: styles.itemControl({
|
|
394
|
+
className
|
|
395
|
+
}),
|
|
396
|
+
ref: ref,
|
|
397
|
+
...itemControlProps,
|
|
398
|
+
children: children
|
|
399
|
+
});
|
|
400
|
+
};
|
|
401
|
+
RadioCard.ItemContent = function({ children, className, ref, ...props }) {
|
|
402
|
+
const { size, variant, itemOrientation, align } = useRadioCardContext();
|
|
403
|
+
const styles = radioCardVariants({
|
|
404
|
+
size,
|
|
405
|
+
variant,
|
|
406
|
+
itemOrientation,
|
|
407
|
+
align
|
|
408
|
+
});
|
|
409
|
+
return /*#__PURE__*/ jsx("div", {
|
|
410
|
+
className: styles.itemContent({
|
|
411
|
+
className
|
|
412
|
+
}),
|
|
413
|
+
ref: ref,
|
|
414
|
+
...props,
|
|
415
|
+
children: children
|
|
416
|
+
});
|
|
417
|
+
};
|
|
418
|
+
RadioCard.ItemText = function({ children, className, ref, ...props }) {
|
|
419
|
+
const { api, size, variant, itemOrientation, align } = useRadioCardContext();
|
|
420
|
+
const { itemProps } = useRadioCardItemContext();
|
|
421
|
+
const styles = radioCardVariants({
|
|
422
|
+
size,
|
|
423
|
+
variant,
|
|
424
|
+
itemOrientation,
|
|
425
|
+
align
|
|
426
|
+
});
|
|
427
|
+
const itemTextProps = mergeProps(props, api.getItemTextProps(itemProps));
|
|
428
|
+
return /*#__PURE__*/ jsx("span", {
|
|
429
|
+
className: styles.itemText({
|
|
430
|
+
className
|
|
431
|
+
}),
|
|
432
|
+
ref: ref,
|
|
433
|
+
...itemTextProps,
|
|
434
|
+
children: children
|
|
435
|
+
});
|
|
436
|
+
};
|
|
437
|
+
RadioCard.ItemDescription = function({ children, className, ref, ...props }) {
|
|
438
|
+
const { api, size, variant, align } = useRadioCardContext();
|
|
439
|
+
const { itemProps } = useRadioCardItemContext();
|
|
440
|
+
const styles = radioCardVariants({
|
|
441
|
+
size,
|
|
442
|
+
variant,
|
|
443
|
+
align
|
|
444
|
+
});
|
|
445
|
+
const itemState = api.getItemState(itemProps);
|
|
446
|
+
return /*#__PURE__*/ jsx("div", {
|
|
447
|
+
className: styles.itemDescription({
|
|
448
|
+
className
|
|
449
|
+
}),
|
|
450
|
+
"data-disabled": itemState.disabled || void 0,
|
|
451
|
+
"data-state": itemState.checked ? "checked" : "unchecked",
|
|
452
|
+
ref: ref,
|
|
453
|
+
...props,
|
|
454
|
+
children: children
|
|
455
|
+
});
|
|
456
|
+
};
|
|
457
|
+
RadioCard.ItemIndicator = function({ className, ref, ...props }) {
|
|
458
|
+
const { api, size, variant } = useRadioCardContext();
|
|
459
|
+
const { itemProps } = useRadioCardItemContext();
|
|
460
|
+
const styles = radioCardVariants({
|
|
461
|
+
size,
|
|
462
|
+
variant
|
|
463
|
+
});
|
|
464
|
+
const itemState = api.getItemState(itemProps);
|
|
465
|
+
return /*#__PURE__*/ jsx("span", {
|
|
466
|
+
"aria-hidden": "true",
|
|
467
|
+
className: styles.itemIndicator(),
|
|
468
|
+
"data-disabled": itemState.disabled || void 0,
|
|
469
|
+
"data-state": itemState.checked ? "checked" : "unchecked",
|
|
470
|
+
ref: ref,
|
|
471
|
+
...props,
|
|
472
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
473
|
+
className: styles.itemIndicatorContent(),
|
|
474
|
+
"data-disabled": itemState.disabled || void 0,
|
|
475
|
+
"data-state": itemState.checked ? "checked" : "unchecked",
|
|
476
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
477
|
+
className: styles.itemIndicatorMark({
|
|
478
|
+
className
|
|
479
|
+
})
|
|
480
|
+
})
|
|
481
|
+
})
|
|
482
|
+
});
|
|
483
|
+
};
|
|
484
|
+
RadioCard.ItemAddon = function({ children, className, ref, ...props }) {
|
|
485
|
+
const { api, size, variant, align } = useRadioCardContext();
|
|
486
|
+
const { itemProps } = useRadioCardItemContext();
|
|
487
|
+
const styles = radioCardVariants({
|
|
488
|
+
size,
|
|
489
|
+
variant,
|
|
490
|
+
align
|
|
491
|
+
});
|
|
492
|
+
const itemState = api.getItemState(itemProps);
|
|
493
|
+
return /*#__PURE__*/ jsx("div", {
|
|
494
|
+
className: styles.itemAddon({
|
|
495
|
+
className
|
|
496
|
+
}),
|
|
497
|
+
"data-disabled": itemState.disabled || void 0,
|
|
498
|
+
"data-state": itemState.checked ? "checked" : "unchecked",
|
|
499
|
+
ref: ref,
|
|
500
|
+
...props,
|
|
501
|
+
children: children
|
|
502
|
+
});
|
|
503
|
+
};
|
|
504
|
+
RadioCard.StatusText = function({ status, size: sizeProp, showIcon, children, ...props }) {
|
|
505
|
+
const { size, validateStatus } = useRadioCardContext();
|
|
506
|
+
const effectiveSize = sizeProp ?? size;
|
|
507
|
+
const effectiveStatus = status ?? validateStatus;
|
|
508
|
+
return /*#__PURE__*/ jsx(StatusText, {
|
|
509
|
+
showIcon: showIcon ?? "default" !== effectiveStatus,
|
|
510
|
+
size: effectiveSize,
|
|
511
|
+
status: effectiveStatus,
|
|
512
|
+
...props,
|
|
513
|
+
children: children
|
|
514
|
+
});
|
|
515
|
+
};
|
|
516
|
+
RadioCard.displayName = "RadioCard";
|
|
517
|
+
export { RadioCard, radioCardVariants, useRadioCardContext };
|