@cognitiv/components-web 1.0.4 → 1.1.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/README.md +266 -0
- package/dist/components/accordion/accordion.d.ts +30 -0
- package/dist/components/accordion/accordion.js +191 -0
- package/dist/components/accordion/index.d.ts +25 -0
- package/dist/components/accordion/index.js +18 -0
- package/dist/components/accordion/styles.d.ts +53 -0
- package/dist/components/accordion/styles.js +27 -0
- package/dist/components/alert/alert.d.ts +15 -0
- package/dist/components/alert/alert.js +152 -0
- package/dist/components/alert/index.d.ts +21 -0
- package/dist/components/alert/index.js +16 -0
- package/dist/components/alert/styles.d.ts +75 -0
- package/dist/components/alert/styles.js +36 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +65 -0
- package/dist/components/alert-dialog/alert-dialog.js +309 -0
- package/dist/components/alert-dialog/index.d.ts +33 -0
- package/dist/components/alert-dialog/index.js +22 -0
- package/dist/components/alert-dialog/styles.d.ts +174 -0
- package/dist/components/alert-dialog/styles.js +71 -0
- package/dist/components/autocomplete/autocomplete.d.ts +31 -0
- package/dist/components/autocomplete/autocomplete.js +241 -0
- package/dist/components/autocomplete/index.d.ts +25 -0
- package/dist/components/autocomplete/index.js +18 -0
- package/dist/components/autocomplete/styles.d.ts +75 -0
- package/dist/components/autocomplete/styles.js +37 -0
- package/dist/components/avatar/avatar.d.ts +15 -0
- package/dist/components/avatar/avatar.js +93 -0
- package/dist/components/avatar/index.d.ts +17 -0
- package/dist/components/avatar/index.js +14 -0
- package/dist/components/avatar/styles.d.ts +120 -0
- package/dist/components/avatar/styles.js +52 -0
- package/dist/components/badge/badge.d.ts +19 -0
- package/dist/components/badge/badge.js +87 -0
- package/dist/components/badge/index.d.ts +17 -0
- package/dist/components/badge/index.js +14 -0
- package/dist/components/badge/styles.d.ts +177 -0
- package/dist/components/badge/styles.js +73 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +14 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +84 -0
- package/dist/components/breadcrumbs/index.d.ts +15 -0
- package/dist/components/breadcrumbs/index.js +13 -0
- package/dist/components/breadcrumbs/styles.d.ts +45 -0
- package/dist/components/breadcrumbs/styles.js +13 -0
- package/dist/components/button/button.d.ts +10 -0
- package/dist/components/button/button.js +49 -0
- package/dist/components/button/index.d.ts +15 -0
- package/dist/components/button/index.js +13 -0
- package/dist/components/button/styles.d.ts +69 -0
- package/dist/components/button/styles.js +37 -0
- package/dist/components/button-group/button-group.d.ts +26 -0
- package/dist/components/button-group/button-group.js +82 -0
- package/dist/components/button-group/index.d.ts +16 -0
- package/dist/components/button-group/index.js +14 -0
- package/dist/components/button-group/styles.d.ts +57 -0
- package/dist/components/button-group/styles.js +31 -0
- package/dist/components/calendar/calendar.d.ts +71 -0
- package/dist/components/calendar/calendar.js +274 -0
- package/dist/components/calendar/index.d.ts +91 -0
- package/dist/components/calendar/index.js +29 -0
- package/dist/components/calendar/styles.d.ts +78 -0
- package/dist/components/calendar/styles.js +35 -0
- package/dist/components/calendar-year-picker/calendar-year-picker.d.ts +61 -0
- package/dist/components/calendar-year-picker/calendar-year-picker.js +407 -0
- package/dist/components/calendar-year-picker/index.d.ts +43 -0
- package/dist/components/calendar-year-picker/index.js +18 -0
- package/dist/components/calendar-year-picker/styles.d.ts +51 -0
- package/dist/components/calendar-year-picker/styles.js +14 -0
- package/dist/components/calendar-year-picker/year-picker-context.d.ts +28 -0
- package/dist/components/calendar-year-picker/year-picker-context.js +39 -0
- package/dist/components/card/card.d.ts +22 -0
- package/dist/components/card/card.js +141 -0
- package/dist/components/card/index.d.ts +23 -0
- package/dist/components/card/index.js +17 -0
- package/dist/components/card/styles.d.ts +70 -0
- package/dist/components/card/styles.js +34 -0
- package/dist/components/checkbox/checkbox.d.ts +22 -0
- package/dist/components/checkbox/checkbox.js +124 -0
- package/dist/components/checkbox/index.d.ts +19 -0
- package/dist/components/checkbox/index.js +15 -0
- package/dist/components/checkbox/styles.d.ts +45 -0
- package/dist/components/checkbox/styles.js +26 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +14 -0
- package/dist/components/checkbox-group/checkbox-group.js +33 -0
- package/dist/components/checkbox-group/index.d.ts +3 -0
- package/dist/components/checkbox-group/index.js +3 -0
- package/dist/components/checkbox-group/styles.d.ts +18 -0
- package/dist/components/checkbox-group/styles.js +17 -0
- package/dist/components/chip/chip.d.ts +14 -0
- package/dist/components/chip/chip.js +67 -0
- package/dist/components/chip/index.d.ts +15 -0
- package/dist/components/chip/index.js +13 -0
- package/dist/components/chip/styles.d.ts +141 -0
- package/dist/components/chip/styles.js +59 -0
- package/dist/components/close-button/close-button.d.ts +8 -0
- package/dist/components/close-button/close-button.js +33 -0
- package/dist/components/close-button/index.d.ts +13 -0
- package/dist/components/close-button/index.js +12 -0
- package/dist/components/close-button/styles.d.ts +15 -0
- package/dist/components/close-button/styles.js +16 -0
- package/dist/components/color-area/color-area.d.ts +11 -0
- package/dist/components/color-area/color-area.js +70 -0
- package/dist/components/color-area/index.d.ts +15 -0
- package/dist/components/color-area/index.js +13 -0
- package/dist/components/color-area/styles.d.ts +33 -0
- package/dist/components/color-area/styles.js +22 -0
- package/dist/components/color-field/color-field.d.ts +9 -0
- package/dist/components/color-field/color-field.js +29 -0
- package/dist/components/color-field/index.d.ts +22 -0
- package/dist/components/color-field/index.js +18 -0
- package/dist/components/color-field/styles.d.ts +18 -0
- package/dist/components/color-field/styles.js +17 -0
- package/dist/components/color-input-group/color-input-group.d.ts +19 -0
- package/dist/components/color-input-group/color-input-group.js +98 -0
- package/dist/components/color-input-group/index.d.ts +19 -0
- package/dist/components/color-input-group/index.js +15 -0
- package/dist/components/color-input-group/styles.d.ts +63 -0
- package/dist/components/color-input-group/styles.js +33 -0
- package/dist/components/color-picker/color-picker.d.ts +21 -0
- package/dist/components/color-picker/color-picker.js +86 -0
- package/dist/components/color-picker/index.d.ts +17 -0
- package/dist/components/color-picker/index.js +14 -0
- package/dist/components/color-picker/styles.d.ts +39 -0
- package/dist/components/color-picker/styles.js +12 -0
- package/dist/components/color-slider/color-slider.d.ts +50 -0
- package/dist/components/color-slider/color-slider.js +205 -0
- package/dist/components/color-slider/index.d.ts +19 -0
- package/dist/components/color-slider/index.js +15 -0
- package/dist/components/color-slider/styles.d.ts +45 -0
- package/dist/components/color-slider/styles.js +13 -0
- package/dist/components/color-swatch/color-swatch.d.ts +8 -0
- package/dist/components/color-swatch/color-swatch.js +31 -0
- package/dist/components/color-swatch/index.d.ts +13 -0
- package/dist/components/color-swatch/index.js +12 -0
- package/dist/components/color-swatch/styles.d.ts +39 -0
- package/dist/components/color-swatch/styles.js +25 -0
- package/dist/components/color-swatch-picker/color-swatch-picker.d.ts +20 -0
- package/dist/components/color-swatch-picker/color-swatch-picker.js +149 -0
- package/dist/components/color-swatch-picker/index.d.ts +19 -0
- package/dist/components/color-swatch-picker/index.js +15 -0
- package/dist/components/color-swatch-picker/styles.d.ts +120 -0
- package/dist/components/color-swatch-picker/styles.js +53 -0
- package/dist/components/combo-box/combo-box.d.ts +34 -0
- package/dist/components/combo-box/combo-box.js +116 -0
- package/dist/components/combo-box/index.d.ts +20 -0
- package/dist/components/combo-box/index.js +16 -0
- package/dist/components/combo-box/styles.d.ts +42 -0
- package/dist/components/combo-box/styles.js +25 -0
- package/dist/components/date-field/date-field.d.ts +9 -0
- package/dist/components/date-field/date-field.js +29 -0
- package/dist/components/date-field/index.d.ts +26 -0
- package/dist/components/date-field/index.js +20 -0
- package/dist/components/date-field/styles.d.ts +18 -0
- package/dist/components/date-field/styles.js +17 -0
- package/dist/components/date-input-group/date-input-group.d.ts +25 -0
- package/dist/components/date-input-group/date-input-group.js +146 -0
- package/dist/components/date-input-group/index.d.ts +23 -0
- package/dist/components/date-input-group/index.js +17 -0
- package/dist/components/date-input-group/styles.d.ts +69 -0
- package/dist/components/date-input-group/styles.js +35 -0
- package/dist/components/date-picker/date-picker.d.ts +30 -0
- package/dist/components/date-picker/date-picker.js +151 -0
- package/dist/components/date-picker/index.d.ts +31 -0
- package/dist/components/date-picker/index.js +15 -0
- package/dist/components/date-picker/styles.d.ts +45 -0
- package/dist/components/date-picker/styles.js +13 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts +36 -0
- package/dist/components/date-range-picker/date-range-picker.js +173 -0
- package/dist/components/date-range-picker/index.d.ts +36 -0
- package/dist/components/date-range-picker/index.js +16 -0
- package/dist/components/date-range-picker/styles.d.ts +51 -0
- package/dist/components/date-range-picker/styles.js +14 -0
- package/dist/components/description/description.d.ts +9 -0
- package/dist/components/description/description.js +22 -0
- package/dist/components/description/index.d.ts +13 -0
- package/dist/components/description/index.js +12 -0
- package/dist/components/description/styles.d.ts +3 -0
- package/dist/components/description/styles.js +8 -0
- package/dist/components/disclosure/disclosure.d.ts +27 -0
- package/dist/components/disclosure/disclosure.js +157 -0
- package/dist/components/disclosure/index.d.ts +23 -0
- package/dist/components/disclosure/index.js +17 -0
- package/dist/components/disclosure/styles.d.ts +29 -0
- package/dist/components/disclosure/styles.js +20 -0
- package/dist/components/disclosure-group/disclosure-group.d.ts +8 -0
- package/dist/components/disclosure-group/disclosure-group.js +35 -0
- package/dist/components/disclosure-group/index.d.ts +15 -0
- package/dist/components/disclosure-group/index.js +13 -0
- package/dist/components/disclosure-group/styles.d.ts +9 -0
- package/dist/components/disclosure-group/styles.js +12 -0
- package/dist/components/disclosure-group/use-disclosure-group-navigation.d.ts +14 -0
- package/dist/components/disclosure-group/use-disclosure-group-navigation.js +51 -0
- package/dist/components/drawer/drawer.d.ts +84 -0
- package/dist/components/drawer/drawer.js +439 -0
- package/dist/components/drawer/index.d.ts +69 -0
- package/dist/components/drawer/index.js +22 -0
- package/dist/components/drawer/styles.d.ts +126 -0
- package/dist/components/drawer/styles.js +54 -0
- package/dist/components/dropdown/dropdown.d.ts +38 -0
- package/dist/components/dropdown/dropdown.js +156 -0
- package/dist/components/dropdown/index.d.ts +29 -0
- package/dist/components/dropdown/index.js +20 -0
- package/dist/components/dropdown/styles.d.ts +45 -0
- package/dist/components/dropdown/styles.js +13 -0
- package/dist/components/empty-state/empty-state.d.ts +7 -0
- package/dist/components/empty-state/empty-state.js +20 -0
- package/dist/components/empty-state/index.d.ts +13 -0
- package/dist/components/empty-state/index.js +12 -0
- package/dist/components/empty-state/styles.d.ts +3 -0
- package/dist/components/empty-state/styles.js +8 -0
- package/dist/components/error-message/error-message.d.ts +9 -0
- package/dist/components/error-message/error-message.js +22 -0
- package/dist/components/error-message/index.d.ts +13 -0
- package/dist/components/error-message/index.js +12 -0
- package/dist/components/error-message/styles.d.ts +3 -0
- package/dist/components/error-message/styles.js +8 -0
- package/dist/components/field-error/field-error.d.ts +8 -0
- package/dist/components/field-error/field-error.js +21 -0
- package/dist/components/field-error/index.d.ts +13 -0
- package/dist/components/field-error/index.js +12 -0
- package/dist/components/field-error/styles.d.ts +3 -0
- package/dist/components/field-error/styles.js +8 -0
- package/dist/components/fieldset/fieldset.d.ts +16 -0
- package/dist/components/fieldset/fieldset.js +88 -0
- package/dist/components/fieldset/index.d.ts +19 -0
- package/dist/components/fieldset/index.js +15 -0
- package/dist/components/fieldset/styles.d.ts +51 -0
- package/dist/components/fieldset/styles.js +14 -0
- package/dist/components/form/form.d.ts +7 -0
- package/dist/components/form/form.js +13 -0
- package/dist/components/form/index.d.ts +11 -0
- package/dist/components/form/index.js +11 -0
- package/dist/components/header/header.d.ts +7 -0
- package/dist/components/header/header.js +21 -0
- package/dist/components/header/index.d.ts +9 -0
- package/dist/components/header/index.js +10 -0
- package/dist/components/header/styles.d.ts +1 -0
- package/dist/components/header/styles.js +8 -0
- package/dist/components/icons.d.ts +18 -0
- package/dist/components/icons.js +243 -0
- package/dist/components/index.d.ts +84 -0
- package/dist/components/input/index.d.ts +13 -0
- package/dist/components/input/index.js +12 -0
- package/dist/components/input/input.d.ts +8 -0
- package/dist/components/input/input.js +31 -0
- package/dist/components/input/styles.d.ts +30 -0
- package/dist/components/input/styles.js +22 -0
- package/dist/components/input-group/index.d.ts +21 -0
- package/dist/components/input-group/index.js +16 -0
- package/dist/components/input-group/input-group.d.ts +20 -0
- package/dist/components/input-group/input-group.js +129 -0
- package/dist/components/input-group/styles.d.ts +63 -0
- package/dist/components/input-group/styles.js +33 -0
- package/dist/components/input-otp/index.d.ts +22 -0
- package/dist/components/input-otp/index.js +21 -0
- package/dist/components/input-otp/input-otp.d.ts +26 -0
- package/dist/components/input-otp/input-otp.js +139 -0
- package/dist/components/input-otp/styles.d.ts +54 -0
- package/dist/components/input-otp/styles.js +29 -0
- package/dist/components/kbd/index.d.ts +19 -0
- package/dist/components/kbd/index.js +15 -0
- package/dist/components/kbd/kbd.constants.d.ts +3 -0
- package/dist/components/kbd/kbd.constants.js +51 -0
- package/dist/components/kbd/kbd.d.ts +24 -0
- package/dist/components/kbd/kbd.js +76 -0
- package/dist/components/kbd/styles.d.ts +30 -0
- package/dist/components/kbd/styles.js +19 -0
- package/dist/components/label/index.d.ts +13 -0
- package/dist/components/label/index.js +12 -0
- package/dist/components/label/label.d.ts +8 -0
- package/dist/components/label/label.js +27 -0
- package/dist/components/label/styles.d.ts +33 -0
- package/dist/components/label/styles.js +24 -0
- package/dist/components/link/index.d.ts +15 -0
- package/dist/components/link/index.js +13 -0
- package/dist/components/link/link.d.ts +10 -0
- package/dist/components/link/link.js +59 -0
- package/dist/components/link/styles.d.ts +35 -0
- package/dist/components/link/styles.js +13 -0
- package/dist/components/list-box/index.d.ts +23 -0
- package/dist/components/list-box/index.js +18 -0
- package/dist/components/list-box/list-box.d.ts +9 -0
- package/dist/components/list-box/list-box.js +23 -0
- package/dist/components/list-box/styles.d.ts +18 -0
- package/dist/components/list-box/styles.js +17 -0
- package/dist/components/list-box-item/index.d.ts +15 -0
- package/dist/components/list-box-item/index.js +13 -0
- package/dist/components/list-box-item/list-box-item.d.ts +15 -0
- package/dist/components/list-box-item/list-box-item.js +77 -0
- package/dist/components/list-box-item/styles.d.ts +39 -0
- package/dist/components/list-box-item/styles.js +24 -0
- package/dist/components/list-box-section/index.d.ts +10 -0
- package/dist/components/list-box-section/index.js +10 -0
- package/dist/components/list-box-section/list-box-section.d.ts +8 -0
- package/dist/components/list-box-section/list-box-section.js +22 -0
- package/dist/components/list-box-section/styles.d.ts +3 -0
- package/dist/components/list-box-section/styles.js +8 -0
- package/dist/components/menu/index.d.ts +24 -0
- package/dist/components/menu/index.js +18 -0
- package/dist/components/menu/menu.d.ts +9 -0
- package/dist/components/menu/menu.js +20 -0
- package/dist/components/menu/styles.d.ts +3 -0
- package/dist/components/menu/styles.js +8 -0
- package/dist/components/menu-item/index.d.ts +17 -0
- package/dist/components/menu-item/index.js +14 -0
- package/dist/components/menu-item/menu-item.d.ts +20 -0
- package/dist/components/menu-item/menu-item.js +123 -0
- package/dist/components/menu-item/styles.d.ts +42 -0
- package/dist/components/menu-item/styles.js +25 -0
- package/dist/components/menu-section/index.d.ts +10 -0
- package/dist/components/menu-section/index.js +10 -0
- package/dist/components/menu-section/menu-section.d.ts +8 -0
- package/dist/components/menu-section/menu-section.js +22 -0
- package/dist/components/menu-section/styles.d.ts +3 -0
- package/dist/components/menu-section/styles.js +8 -0
- package/dist/components/meter/index.d.ts +34 -0
- package/dist/components/meter/index.js +15 -0
- package/dist/components/meter/meter.d.ts +29 -0
- package/dist/components/meter/meter.js +108 -0
- package/dist/components/meter/styles.d.ts +105 -0
- package/dist/components/meter/styles.js +47 -0
- package/dist/components/modal/index.d.ts +33 -0
- package/dist/components/modal/index.js +22 -0
- package/dist/components/modal/modal.d.ts +53 -0
- package/dist/components/modal/modal.js +288 -0
- package/dist/components/modal/styles.d.ts +168 -0
- package/dist/components/modal/styles.js +69 -0
- package/dist/components/number-field/index.d.ts +21 -0
- package/dist/components/number-field/index.js +16 -0
- package/dist/components/number-field/number-field.d.ts +20 -0
- package/dist/components/number-field/number-field.js +127 -0
- package/dist/components/number-field/styles.d.ts +69 -0
- package/dist/components/number-field/styles.js +35 -0
- package/dist/components/pagination/index.d.ts +64 -0
- package/dist/components/pagination/index.js +21 -0
- package/dist/components/pagination/pagination.d.ts +84 -0
- package/dist/components/pagination/pagination.js +230 -0
- package/dist/components/pagination/styles.d.ts +60 -0
- package/dist/components/pagination/styles.js +31 -0
- package/dist/components/popover/index.d.ts +23 -0
- package/dist/components/popover/index.js +17 -0
- package/dist/components/popover/popover.d.ts +24 -0
- package/dist/components/popover/popover.js +153 -0
- package/dist/components/popover/styles.d.ts +45 -0
- package/dist/components/popover/styles.js +13 -0
- package/dist/components/progress-bar/index.d.ts +34 -0
- package/dist/components/progress-bar/index.js +15 -0
- package/dist/components/progress-bar/progress-bar.d.ts +29 -0
- package/dist/components/progress-bar/progress-bar.js +108 -0
- package/dist/components/progress-bar/styles.d.ts +105 -0
- package/dist/components/progress-bar/styles.js +47 -0
- package/dist/components/progress-circle/index.d.ts +34 -0
- package/dist/components/progress-circle/index.js +15 -0
- package/dist/components/progress-circle/progress-circle.d.ts +29 -0
- package/dist/components/progress-circle/progress-circle.js +126 -0
- package/dist/components/progress-circle/styles.d.ts +105 -0
- package/dist/components/progress-circle/styles.js +47 -0
- package/dist/components/rac/components.d.ts +1 -0
- package/dist/components/rac/index.d.ts +4 -0
- package/dist/components/rac/index.js +2 -0
- package/dist/components/rac/types.d.ts +3 -0
- package/dist/components/rac/utils.d.ts +1 -0
- package/dist/components/radio/index.d.ts +19 -0
- package/dist/components/radio/index.js +15 -0
- package/dist/components/radio/radio.d.ts +21 -0
- package/dist/components/radio/radio.js +97 -0
- package/dist/components/radio/styles.d.ts +45 -0
- package/dist/components/radio/styles.js +13 -0
- package/dist/components/radio-group/index.d.ts +13 -0
- package/dist/components/radio-group/index.js +12 -0
- package/dist/components/radio-group/radio-group.d.ts +8 -0
- package/dist/components/radio-group/radio-group.js +27 -0
- package/dist/components/radio-group/styles.d.ts +18 -0
- package/dist/components/radio-group/styles.js +17 -0
- package/dist/components/range-calendar/index.d.ts +91 -0
- package/dist/components/range-calendar/index.js +29 -0
- package/dist/components/range-calendar/range-calendar.d.ts +71 -0
- package/dist/components/range-calendar/range-calendar.js +289 -0
- package/dist/components/range-calendar/styles.d.ts +78 -0
- package/dist/components/range-calendar/styles.js +35 -0
- package/dist/components/scroll-shadow/index.d.ts +21 -0
- package/dist/components/scroll-shadow/index.js +13 -0
- package/dist/components/scroll-shadow/scroll-shadow.d.ts +32 -0
- package/dist/components/scroll-shadow/scroll-shadow.js +76 -0
- package/dist/components/scroll-shadow/styles.d.ts +69 -0
- package/dist/components/scroll-shadow/styles.js +36 -0
- package/dist/components/scroll-shadow/use-scroll-shadow.d.ts +11 -0
- package/dist/components/scroll-shadow/use-scroll-shadow.js +121 -0
- package/dist/components/search-field/index.d.ts +21 -0
- package/dist/components/search-field/index.js +16 -0
- package/dist/components/search-field/search-field.d.ts +23 -0
- package/dist/components/search-field/search-field.js +127 -0
- package/dist/components/search-field/styles.d.ts +69 -0
- package/dist/components/search-field/styles.js +35 -0
- package/dist/components/select/index.d.ts +21 -0
- package/dist/components/select/index.js +16 -0
- package/dist/components/select/select.d.ts +24 -0
- package/dist/components/select/select.js +140 -0
- package/dist/components/select/styles.d.ts +69 -0
- package/dist/components/select/styles.js +35 -0
- package/dist/components/separator/index.d.ts +13 -0
- package/dist/components/separator/index.js +12 -0
- package/dist/components/separator/separator.d.ts +8 -0
- package/dist/components/separator/separator.js +27 -0
- package/dist/components/separator/styles.d.ts +34 -0
- package/dist/components/separator/styles.js +23 -0
- package/dist/components/skeleton/index.d.ts +13 -0
- package/dist/components/skeleton/index.js +12 -0
- package/dist/components/skeleton/skeleton.d.ts +7 -0
- package/dist/components/skeleton/skeleton.js +25 -0
- package/dist/components/skeleton/styles.d.ts +27 -0
- package/dist/components/skeleton/styles.js +20 -0
- package/dist/components/slider/index.d.ts +23 -0
- package/dist/components/slider/index.js +17 -0
- package/dist/components/slider/slider.d.ts +23 -0
- package/dist/components/slider/slider.js +177 -0
- package/dist/components/slider/styles.d.ts +57 -0
- package/dist/components/slider/styles.js +15 -0
- package/dist/components/spinner/index.d.ts +13 -0
- package/dist/components/spinner/index.js +12 -0
- package/dist/components/spinner/spinner.d.ts +7 -0
- package/dist/components/spinner/spinner.js +88 -0
- package/dist/components/spinner/styles.d.ts +45 -0
- package/dist/components/spinner/styles.js +27 -0
- package/dist/components/surface/index.d.ts +14 -0
- package/dist/components/surface/index.js +13 -0
- package/dist/components/surface/styles.d.ts +24 -0
- package/dist/components/surface/styles.js +19 -0
- package/dist/components/surface/surface.d.ts +12 -0
- package/dist/components/surface/surface.js +34 -0
- package/dist/components/switch/index.d.ts +21 -0
- package/dist/components/switch/index.js +16 -0
- package/dist/components/switch/styles.d.ts +57 -0
- package/dist/components/switch/styles.js +30 -0
- package/dist/components/switch/switch.d.ts +20 -0
- package/dist/components/switch/switch.js +118 -0
- package/dist/components/switch-group/index.d.ts +13 -0
- package/dist/components/switch-group/index.js +12 -0
- package/dist/components/switch-group/styles.d.ts +39 -0
- package/dist/components/switch-group/styles.js +24 -0
- package/dist/components/switch-group/switch-group.d.ts +7 -0
- package/dist/components/switch-group/switch-group.js +25 -0
- package/dist/components/table/index.d.ts +38 -0
- package/dist/components/table/index.js +25 -0
- package/dist/components/table/styles.d.ts +74 -0
- package/dist/components/table/styles.js +37 -0
- package/dist/components/table/table.d.ts +50 -0
- package/dist/components/table/table.js +283 -0
- package/dist/components/tabs/index.d.ts +25 -0
- package/dist/components/tabs/index.js +18 -0
- package/dist/components/tabs/styles.d.ts +50 -0
- package/dist/components/tabs/styles.js +29 -0
- package/dist/components/tabs/tabs.d.ts +37 -0
- package/dist/components/tabs/tabs.js +156 -0
- package/dist/components/tag/index.d.ts +15 -0
- package/dist/components/tag/index.js +13 -0
- package/dist/components/tag/styles.d.ts +72 -0
- package/dist/components/tag/styles.js +36 -0
- package/dist/components/tag/tag.d.ts +14 -0
- package/dist/components/tag/tag.js +85 -0
- package/dist/components/tag-group/index.d.ts +15 -0
- package/dist/components/tag-group/index.js +14 -0
- package/dist/components/tag-group/styles.d.ts +33 -0
- package/dist/components/tag-group/styles.js +11 -0
- package/dist/components/tag-group/tag-group.d.ts +20 -0
- package/dist/components/tag-group/tag-group.js +59 -0
- package/dist/components/text/index.d.ts +13 -0
- package/dist/components/text/index.js +12 -0
- package/dist/components/text/styles.d.ts +48 -0
- package/dist/components/text/styles.js +28 -0
- package/dist/components/text/text.d.ts +8 -0
- package/dist/components/text/text.js +25 -0
- package/dist/components/textarea/index.d.ts +13 -0
- package/dist/components/textarea/index.js +12 -0
- package/dist/components/textarea/styles.d.ts +30 -0
- package/dist/components/textarea/styles.js +22 -0
- package/dist/components/textarea/textarea.d.ts +8 -0
- package/dist/components/textarea/textarea.js +27 -0
- package/dist/components/textfield/index.d.ts +14 -0
- package/dist/components/textfield/index.js +13 -0
- package/dist/components/textfield/styles.d.ts +18 -0
- package/dist/components/textfield/styles.js +17 -0
- package/dist/components/textfield/textfield.d.ts +18 -0
- package/dist/components/textfield/textfield.js +39 -0
- package/dist/components/time-field/index.d.ts +26 -0
- package/dist/components/time-field/index.js +20 -0
- package/dist/components/time-field/styles.d.ts +18 -0
- package/dist/components/time-field/styles.js +17 -0
- package/dist/components/time-field/time-field.d.ts +9 -0
- package/dist/components/time-field/time-field.js +29 -0
- package/dist/components/toast/constants.d.ts +6 -0
- package/dist/components/toast/constants.js +15 -0
- package/dist/components/toast/index.d.ts +75 -0
- package/dist/components/toast/index.js +23 -0
- package/dist/components/toast/styles.d.ts +162 -0
- package/dist/components/toast/styles.js +66 -0
- package/dist/components/toast/toast-queue.d.ts +70 -0
- package/dist/components/toast/toast-queue.js +147 -0
- package/dist/components/toast/toast.d.ts +69 -0
- package/dist/components/toast/toast.js +365 -0
- package/dist/components/toggle-button/index.d.ts +13 -0
- package/dist/components/toggle-button/index.js +12 -0
- package/dist/components/toggle-button/styles.d.ts +42 -0
- package/dist/components/toggle-button/styles.js +27 -0
- package/dist/components/toggle-button/toggle-button.d.ts +8 -0
- package/dist/components/toggle-button/toggle-button.js +36 -0
- package/dist/components/toggle-button-group/index.d.ts +16 -0
- package/dist/components/toggle-button-group/index.js +14 -0
- package/dist/components/toggle-button-group/styles.d.ts +75 -0
- package/dist/components/toggle-button-group/styles.js +38 -0
- package/dist/components/toggle-button-group/toggle-button-group.d.ts +26 -0
- package/dist/components/toggle-button-group/toggle-button-group.js +70 -0
- package/dist/components/toolbar/index.d.ts +19 -0
- package/dist/components/toolbar/index.js +12 -0
- package/dist/components/toolbar/styles.d.ts +28 -0
- package/dist/components/toolbar/styles.js +21 -0
- package/dist/components/toolbar/toolbar.d.ts +11 -0
- package/dist/components/toolbar/toolbar.js +39 -0
- package/dist/components/tooltip/index.d.ts +19 -0
- package/dist/components/tooltip/index.js +15 -0
- package/dist/components/tooltip/styles.d.ts +33 -0
- package/dist/components/tooltip/styles.js +11 -0
- package/dist/components/tooltip/tooltip.d.ts +20 -0
- package/dist/components/tooltip/tooltip.js +106 -0
- package/dist/css/base.css +17 -0
- package/dist/css/components.css +117 -0
- package/dist/css/index.css +22 -0
- package/dist/css/themes/default/index.css +5 -0
- package/dist/css/themes/default/variables.css +162 -0
- package/dist/css/themes/shared/theme.css +191 -0
- package/dist/css/utilities.css +56 -0
- package/dist/css/variants.css +106 -0
- package/dist/hooks/index.d.ts +9 -0
- package/dist/hooks/use-css-variable.d.ts +36 -0
- package/dist/hooks/use-css-variable.js +72 -0
- package/dist/hooks/use-is-hydrated.d.ts +19 -0
- package/dist/hooks/use-is-hydrated.js +28 -0
- package/dist/hooks/use-isomorphic-layout-effect.d.ts +2 -0
- package/dist/hooks/use-isomorphic-layout-effect.js +6 -0
- package/dist/hooks/use-list-data.d.ts +111 -0
- package/dist/hooks/use-list-data.js +296 -0
- package/dist/hooks/use-measured-height.d.ts +4 -0
- package/dist/hooks/use-measured-height.js +47 -0
- package/dist/hooks/use-media-query.d.ts +6 -0
- package/dist/hooks/use-media-query.js +50 -0
- package/dist/hooks/use-mounted.d.ts +1 -0
- package/dist/hooks/use-mounted.js +15 -0
- package/dist/hooks/use-overlay-state.d.ts +52 -0
- package/dist/hooks/use-overlay-state.js +70 -0
- package/dist/hooks/use-safe-layout-effect.d.ts +2 -0
- package/dist/hooks/use-safe-layout-effect.js +6 -0
- package/dist/index.d.ts +3 -3740
- package/dist/index.js +262 -982
- package/dist/styles/components/index.d.ts +83 -0
- package/dist/styles/index.d.ts +3 -0
- package/dist/styles/utils/index.d.ts +7 -0
- package/dist/styles.css +2 -0
- package/dist/utils/assertion.d.ts +9 -0
- package/dist/utils/assertion.js +3 -0
- package/dist/utils/calendar.d.ts +5 -0
- package/dist/utils/calendar.js +19 -0
- package/dist/utils/children.d.ts +9 -0
- package/dist/utils/children.js +17 -0
- package/dist/utils/compose.d.ts +7 -0
- package/dist/utils/compose.js +18 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/logger.d.ts +23 -0
- package/dist/utils/tv.d.ts +3 -0
- package/dist/utils/variants.d.ts +73 -0
- package/package.json +119 -70
- package/dist/component-manifest.json +0 -749
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { SpinnerRoot } from './spinner.js';
|
|
3
|
+
export { spinnerVariants } from './styles.js';
|
|
4
|
+
|
|
5
|
+
/* -------------------------------------------------------------------------------------------------
|
|
6
|
+
* Compound Component
|
|
7
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
8
|
+
const Spinner = Object.assign(SpinnerRoot, {
|
|
9
|
+
Root: SpinnerRoot
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export { Spinner, SpinnerRoot };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SpinnerVariants } from "./styles";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
interface SpinnerRootProps extends Omit<ComponentPropsWithRef<"svg">, "display" | "opacity" | "color">, SpinnerVariants {
|
|
4
|
+
}
|
|
5
|
+
declare const SpinnerRoot: ({ className, color, size, ...props }: SpinnerRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { SpinnerRoot };
|
|
7
|
+
export type { SpinnerRootProps };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import { spinnerVariants } from './styles.js';
|
|
4
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const SpinnerPrimitive = ({
|
|
7
|
+
...props
|
|
8
|
+
}) => {
|
|
9
|
+
const id = useId();
|
|
10
|
+
return /*#__PURE__*/jsxs("svg", {
|
|
11
|
+
"data-slot": "spinner-icon",
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
...props,
|
|
14
|
+
children: [/*#__PURE__*/jsxs("defs", {
|
|
15
|
+
children: [/*#__PURE__*/jsxs("linearGradient", {
|
|
16
|
+
id: `«data-slot-icon-def-1»-${id}`,
|
|
17
|
+
x1: "50%",
|
|
18
|
+
x2: "50%",
|
|
19
|
+
y1: "5.271%",
|
|
20
|
+
y2: "91.793%",
|
|
21
|
+
children: [/*#__PURE__*/jsx("stop", {
|
|
22
|
+
offset: "0%",
|
|
23
|
+
stopColor: "currentColor"
|
|
24
|
+
}), /*#__PURE__*/jsx("stop", {
|
|
25
|
+
offset: "100%",
|
|
26
|
+
stopColor: "currentColor",
|
|
27
|
+
stopOpacity: 0.55
|
|
28
|
+
})]
|
|
29
|
+
}), /*#__PURE__*/jsxs("linearGradient", {
|
|
30
|
+
id: `«data-slot-icon-def-2»-${id}`,
|
|
31
|
+
x1: "50%",
|
|
32
|
+
x2: "50%",
|
|
33
|
+
y1: "15.24%",
|
|
34
|
+
y2: "87.15%",
|
|
35
|
+
children: [/*#__PURE__*/jsx("stop", {
|
|
36
|
+
offset: "0%",
|
|
37
|
+
stopColor: "currentColor",
|
|
38
|
+
stopOpacity: 0
|
|
39
|
+
}), /*#__PURE__*/jsx("stop", {
|
|
40
|
+
offset: "100%",
|
|
41
|
+
stopColor: "currentColor",
|
|
42
|
+
stopOpacity: 0.55
|
|
43
|
+
})]
|
|
44
|
+
})]
|
|
45
|
+
}), /*#__PURE__*/jsxs("g", {
|
|
46
|
+
fill: "none",
|
|
47
|
+
children: [/*#__PURE__*/jsx("path", {
|
|
48
|
+
d: "m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"
|
|
49
|
+
}), /*#__PURE__*/jsx("path", {
|
|
50
|
+
d: "M8.749.021a1.5 1.5 0 0 1 .497 2.958A7.5 7.5 0 0 0 3 10.375a7.5 7.5 0 0 0 7.5 7.5v3c-5.799 0-10.5-4.7-10.5-10.5C0 5.23 3.726.865 8.749.021",
|
|
51
|
+
fill: `url(#«data-slot-icon-def-1»-${id})`,
|
|
52
|
+
transform: "translate(1.5 1.625)"
|
|
53
|
+
}), /*#__PURE__*/jsx("path", {
|
|
54
|
+
d: "M15.392 2.673a1.5 1.5 0 0 1 2.119-.115A10.48 10.48 0 0 1 21 10.375c0 5.8-4.701 10.5-10.5 10.5v-3a7.5 7.5 0 0 0 5.007-13.084a1.5 1.5 0 0 1-.115-2.118",
|
|
55
|
+
fill: `url(#«data-slot-icon-def-2»-${id})`,
|
|
56
|
+
transform: "translate(1.5 1.625)"
|
|
57
|
+
})]
|
|
58
|
+
})]
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/* -------------------------------------------------------------------------------------------------
|
|
63
|
+
* Spinner Root
|
|
64
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
65
|
+
|
|
66
|
+
const SpinnerRoot = ({
|
|
67
|
+
className,
|
|
68
|
+
color,
|
|
69
|
+
size,
|
|
70
|
+
...props
|
|
71
|
+
}) => {
|
|
72
|
+
return /*#__PURE__*/jsx("span", {
|
|
73
|
+
"data-slot": "spinner",
|
|
74
|
+
className: spinnerVariants({
|
|
75
|
+
className,
|
|
76
|
+
color,
|
|
77
|
+
size
|
|
78
|
+
}),
|
|
79
|
+
children: /*#__PURE__*/jsx(SpinnerPrimitive, {
|
|
80
|
+
"aria-hidden": true,
|
|
81
|
+
"aria-label": "Loading",
|
|
82
|
+
role: "presentation",
|
|
83
|
+
...props
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export { SpinnerRoot };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const spinnerVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
color: {
|
|
4
|
+
accent: string;
|
|
5
|
+
current: string;
|
|
6
|
+
danger: string;
|
|
7
|
+
success: string;
|
|
8
|
+
warning: string;
|
|
9
|
+
};
|
|
10
|
+
size: {
|
|
11
|
+
lg: string;
|
|
12
|
+
md: string;
|
|
13
|
+
sm: string;
|
|
14
|
+
xl: string;
|
|
15
|
+
};
|
|
16
|
+
}, undefined, "spinner", {
|
|
17
|
+
color: {
|
|
18
|
+
accent: string;
|
|
19
|
+
current: string;
|
|
20
|
+
danger: string;
|
|
21
|
+
success: string;
|
|
22
|
+
warning: string;
|
|
23
|
+
};
|
|
24
|
+
size: {
|
|
25
|
+
lg: string;
|
|
26
|
+
md: string;
|
|
27
|
+
sm: string;
|
|
28
|
+
xl: string;
|
|
29
|
+
};
|
|
30
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
31
|
+
color: {
|
|
32
|
+
accent: string;
|
|
33
|
+
current: string;
|
|
34
|
+
danger: string;
|
|
35
|
+
success: string;
|
|
36
|
+
warning: string;
|
|
37
|
+
};
|
|
38
|
+
size: {
|
|
39
|
+
lg: string;
|
|
40
|
+
md: string;
|
|
41
|
+
sm: string;
|
|
42
|
+
xl: string;
|
|
43
|
+
};
|
|
44
|
+
}, undefined, "spinner", unknown, unknown, undefined>>;
|
|
45
|
+
export type SpinnerVariants = VariantProps<typeof spinnerVariants>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { tv } from 'tailwind-variants';
|
|
3
|
+
|
|
4
|
+
const spinnerVariants = tv({
|
|
5
|
+
base: "spinner",
|
|
6
|
+
defaultVariants: {
|
|
7
|
+
color: "accent",
|
|
8
|
+
size: "md"
|
|
9
|
+
},
|
|
10
|
+
variants: {
|
|
11
|
+
color: {
|
|
12
|
+
accent: "spinner--accent",
|
|
13
|
+
current: "spinner--current",
|
|
14
|
+
danger: "spinner--danger",
|
|
15
|
+
success: "spinner--success",
|
|
16
|
+
warning: "spinner--warning"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
lg: "spinner--lg",
|
|
20
|
+
md: "spinner--md",
|
|
21
|
+
sm: "spinner--sm",
|
|
22
|
+
xl: "spinner--xl"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export { spinnerVariants };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { SurfaceRoot } from "./surface";
|
|
3
|
+
export declare const Surface: (({ children, className, variant, ...rest }: import("./surface").SurfaceRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Root: ({ children, className, variant, ...rest }: import("./surface").SurfaceRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export type Surface = {
|
|
7
|
+
Props: ComponentProps<typeof SurfaceRoot>;
|
|
8
|
+
RootProps: ComponentProps<typeof SurfaceRoot>;
|
|
9
|
+
};
|
|
10
|
+
export { SurfaceRoot } from "./surface";
|
|
11
|
+
export type { SurfaceRootProps, SurfaceRootProps as SurfaceProps } from "./surface";
|
|
12
|
+
export { SurfaceContext } from "./surface";
|
|
13
|
+
export { surfaceVariants } from "./styles";
|
|
14
|
+
export type { SurfaceVariants } from "./styles";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { SurfaceRoot } from './surface.js';
|
|
3
|
+
export { SurfaceContext } from './surface.js';
|
|
4
|
+
export { surfaceVariants } from './styles.js';
|
|
5
|
+
|
|
6
|
+
/* -------------------------------------------------------------------------------------------------
|
|
7
|
+
* Compound Component
|
|
8
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
9
|
+
const Surface = Object.assign(SurfaceRoot, {
|
|
10
|
+
Root: SurfaceRoot
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export { Surface, SurfaceRoot };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const surfaceVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
variant: {
|
|
4
|
+
default: string;
|
|
5
|
+
secondary: string;
|
|
6
|
+
tertiary: string;
|
|
7
|
+
transparent: string;
|
|
8
|
+
};
|
|
9
|
+
}, undefined, "surface", {
|
|
10
|
+
variant: {
|
|
11
|
+
default: string;
|
|
12
|
+
secondary: string;
|
|
13
|
+
tertiary: string;
|
|
14
|
+
transparent: string;
|
|
15
|
+
};
|
|
16
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
17
|
+
variant: {
|
|
18
|
+
default: string;
|
|
19
|
+
secondary: string;
|
|
20
|
+
tertiary: string;
|
|
21
|
+
transparent: string;
|
|
22
|
+
};
|
|
23
|
+
}, undefined, "surface", unknown, unknown, undefined>>;
|
|
24
|
+
export type SurfaceVariants = VariantProps<typeof surfaceVariants>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { tv } from 'tailwind-variants';
|
|
3
|
+
|
|
4
|
+
const surfaceVariants = tv({
|
|
5
|
+
base: "surface",
|
|
6
|
+
defaultVariants: {
|
|
7
|
+
variant: "default"
|
|
8
|
+
},
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "surface--default",
|
|
12
|
+
secondary: "surface--secondary",
|
|
13
|
+
tertiary: "surface--tertiary",
|
|
14
|
+
transparent: "surface--transparent"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export { surfaceVariants };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SurfaceVariants } from "./styles";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
type SurfaceContext = {
|
|
5
|
+
variant?: SurfaceVariants["variant"];
|
|
6
|
+
};
|
|
7
|
+
declare const SurfaceContext: React.Context<SurfaceContext>;
|
|
8
|
+
interface SurfaceRootProps extends ComponentPropsWithRef<"div">, SurfaceVariants {
|
|
9
|
+
}
|
|
10
|
+
declare const SurfaceRoot: ({ children, className, variant, ...rest }: SurfaceRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { SurfaceRoot, SurfaceContext };
|
|
12
|
+
export type { SurfaceRootProps };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext } from 'react';
|
|
3
|
+
import { surfaceVariants } from './styles.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const SurfaceContext = /*#__PURE__*/createContext({});
|
|
7
|
+
|
|
8
|
+
/* ------------------------------------------------------------------------------------------------
|
|
9
|
+
* Surface Root
|
|
10
|
+
* --------------------------------------------------------------------------------------------- */
|
|
11
|
+
|
|
12
|
+
const SurfaceRoot = ({
|
|
13
|
+
children,
|
|
14
|
+
className,
|
|
15
|
+
variant = "default",
|
|
16
|
+
...rest
|
|
17
|
+
}) => {
|
|
18
|
+
return /*#__PURE__*/jsx(SurfaceContext, {
|
|
19
|
+
value: {
|
|
20
|
+
variant
|
|
21
|
+
},
|
|
22
|
+
children: /*#__PURE__*/jsx("div", {
|
|
23
|
+
className: surfaceVariants({
|
|
24
|
+
className,
|
|
25
|
+
variant
|
|
26
|
+
}),
|
|
27
|
+
"data-slot": "surface",
|
|
28
|
+
...rest,
|
|
29
|
+
children: children
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { SurfaceContext, SurfaceRoot };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { SwitchContent, SwitchControl, SwitchIcon, SwitchRoot, SwitchThumb } from "./switch";
|
|
3
|
+
export declare const Switch: (({ children, className, size, ...props }: import("./switch").SwitchRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Content: ({ children, className, ...props }: import("./switch").SwitchContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Control: ({ children, className, ...props }: import("./switch").SwitchControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Icon: ({ children, className, ...props }: import("./switch").SwitchIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Root: ({ children, className, size, ...props }: import("./switch").SwitchRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Thumb: ({ children, className, ...props }: import("./switch").SwitchThumbProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
export type Switch = {
|
|
11
|
+
Props: ComponentProps<typeof SwitchRoot>;
|
|
12
|
+
RootProps: ComponentProps<typeof SwitchRoot>;
|
|
13
|
+
ContentProps: ComponentProps<typeof SwitchContent>;
|
|
14
|
+
ControlProps: ComponentProps<typeof SwitchControl>;
|
|
15
|
+
ThumbProps: ComponentProps<typeof SwitchThumb>;
|
|
16
|
+
IconProps: ComponentProps<typeof SwitchIcon>;
|
|
17
|
+
};
|
|
18
|
+
export { SwitchRoot, SwitchContent, SwitchControl, SwitchIcon, SwitchThumb };
|
|
19
|
+
export type { SwitchRootProps, SwitchRootProps as SwitchProps, SwitchContentProps, SwitchControlProps, SwitchThumbProps, SwitchIconProps, } from "./switch";
|
|
20
|
+
export { switchVariants } from "./styles";
|
|
21
|
+
export type { SwitchVariants } from "./styles";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { SwitchRoot, SwitchThumb, SwitchIcon, SwitchControl, SwitchContent } from './switch.js';
|
|
3
|
+
export { switchVariants } from './styles.js';
|
|
4
|
+
|
|
5
|
+
/* -------------------------------------------------------------------------------------------------
|
|
6
|
+
* Compound Component
|
|
7
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
8
|
+
const Switch = Object.assign(SwitchRoot, {
|
|
9
|
+
Content: SwitchContent,
|
|
10
|
+
Control: SwitchControl,
|
|
11
|
+
Icon: SwitchIcon,
|
|
12
|
+
Root: SwitchRoot,
|
|
13
|
+
Thumb: SwitchThumb
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export { Switch, SwitchContent, SwitchControl, SwitchIcon, SwitchRoot, SwitchThumb };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const switchVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
size: {
|
|
4
|
+
lg: {
|
|
5
|
+
base: string;
|
|
6
|
+
};
|
|
7
|
+
md: {
|
|
8
|
+
base: string;
|
|
9
|
+
};
|
|
10
|
+
sm: {
|
|
11
|
+
base: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
base: string;
|
|
16
|
+
content: string;
|
|
17
|
+
control: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
thumb: string;
|
|
20
|
+
}, undefined, {
|
|
21
|
+
size: {
|
|
22
|
+
lg: {
|
|
23
|
+
base: string;
|
|
24
|
+
};
|
|
25
|
+
md: {
|
|
26
|
+
base: string;
|
|
27
|
+
};
|
|
28
|
+
sm: {
|
|
29
|
+
base: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}, {
|
|
33
|
+
base: string;
|
|
34
|
+
content: string;
|
|
35
|
+
control: string;
|
|
36
|
+
icon: string;
|
|
37
|
+
thumb: string;
|
|
38
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
39
|
+
size: {
|
|
40
|
+
lg: {
|
|
41
|
+
base: string;
|
|
42
|
+
};
|
|
43
|
+
md: {
|
|
44
|
+
base: string;
|
|
45
|
+
};
|
|
46
|
+
sm: {
|
|
47
|
+
base: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}, {
|
|
51
|
+
base: string;
|
|
52
|
+
content: string;
|
|
53
|
+
control: string;
|
|
54
|
+
icon: string;
|
|
55
|
+
thumb: string;
|
|
56
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
57
|
+
export type SwitchVariants = VariantProps<typeof switchVariants>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { tv } from 'tailwind-variants';
|
|
3
|
+
|
|
4
|
+
const switchVariants = tv({
|
|
5
|
+
defaultVariants: {
|
|
6
|
+
size: "md"
|
|
7
|
+
},
|
|
8
|
+
slots: {
|
|
9
|
+
base: "switch",
|
|
10
|
+
content: "switch__content",
|
|
11
|
+
control: "switch__control",
|
|
12
|
+
icon: "switch__icon",
|
|
13
|
+
thumb: "switch__thumb"
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
size: {
|
|
17
|
+
lg: {
|
|
18
|
+
base: "switch--lg"
|
|
19
|
+
},
|
|
20
|
+
md: {
|
|
21
|
+
base: "switch--md"
|
|
22
|
+
},
|
|
23
|
+
sm: {
|
|
24
|
+
base: "switch--sm"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export { switchVariants };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SwitchVariants } from "./styles";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
import { Switch as SwitchPrimitive } from "react-aria-components";
|
|
4
|
+
interface SwitchRootProps extends ComponentPropsWithRef<typeof SwitchPrimitive>, SwitchVariants {
|
|
5
|
+
}
|
|
6
|
+
declare const SwitchRoot: ({ children, className, size, ...props }: SwitchRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
interface SwitchControlProps extends ComponentPropsWithRef<"span"> {
|
|
8
|
+
}
|
|
9
|
+
declare const SwitchControl: ({ children, className, ...props }: SwitchControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
interface SwitchThumbProps extends ComponentPropsWithRef<"span"> {
|
|
11
|
+
}
|
|
12
|
+
declare const SwitchThumb: ({ children, className, ...props }: SwitchThumbProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
interface SwitchIconProps extends ComponentPropsWithRef<"span"> {
|
|
14
|
+
}
|
|
15
|
+
declare const SwitchIcon: ({ children, className, ...props }: SwitchIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
interface SwitchContentProps extends ComponentPropsWithRef<"div"> {
|
|
17
|
+
}
|
|
18
|
+
declare const SwitchContent: ({ children, className, ...props }: SwitchContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { SwitchRoot, SwitchControl, SwitchThumb, SwitchIcon, SwitchContent };
|
|
20
|
+
export type { SwitchRootProps, SwitchControlProps, SwitchThumbProps, SwitchIconProps, SwitchContentProps, };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React__default, { useContext, createContext } from 'react';
|
|
3
|
+
import { Switch } from 'react-aria-components';
|
|
4
|
+
import { composeTwRenderProps, composeSlotClassName } from '../../utils/compose.js';
|
|
5
|
+
import { switchVariants } from './styles.js';
|
|
6
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
const SwitchContext = /*#__PURE__*/createContext({});
|
|
9
|
+
|
|
10
|
+
/* -------------------------------------------------------------------------------------------------
|
|
11
|
+
* Switch Root
|
|
12
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
13
|
+
|
|
14
|
+
const SwitchRoot = ({
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
size,
|
|
18
|
+
...props
|
|
19
|
+
}) => {
|
|
20
|
+
const slots = React__default.useMemo(() => switchVariants({
|
|
21
|
+
size
|
|
22
|
+
}), [size]);
|
|
23
|
+
return /*#__PURE__*/jsx(SwitchContext, {
|
|
24
|
+
value: {
|
|
25
|
+
slots
|
|
26
|
+
},
|
|
27
|
+
children: /*#__PURE__*/jsx(Switch, {
|
|
28
|
+
"data-slot": "switch",
|
|
29
|
+
...props,
|
|
30
|
+
className: composeTwRenderProps(className, slots.base()),
|
|
31
|
+
children: values => /*#__PURE__*/jsx(Fragment, {
|
|
32
|
+
children: typeof children === "function" ? children(values) : children
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/* -------------------------------------------------------------------------------------------------
|
|
39
|
+
* Switch Control
|
|
40
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
41
|
+
|
|
42
|
+
const SwitchControl = ({
|
|
43
|
+
children,
|
|
44
|
+
className,
|
|
45
|
+
...props
|
|
46
|
+
}) => {
|
|
47
|
+
const {
|
|
48
|
+
slots
|
|
49
|
+
} = useContext(SwitchContext);
|
|
50
|
+
return /*#__PURE__*/jsx("span", {
|
|
51
|
+
className: composeSlotClassName(slots?.control, className),
|
|
52
|
+
"data-slot": "switch-control",
|
|
53
|
+
...props,
|
|
54
|
+
children: children
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/* -------------------------------------------------------------------------------------------------
|
|
59
|
+
* Switch Thumb
|
|
60
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
61
|
+
|
|
62
|
+
const SwitchThumb = ({
|
|
63
|
+
children,
|
|
64
|
+
className,
|
|
65
|
+
...props
|
|
66
|
+
}) => {
|
|
67
|
+
const {
|
|
68
|
+
slots
|
|
69
|
+
} = useContext(SwitchContext);
|
|
70
|
+
return /*#__PURE__*/jsx("span", {
|
|
71
|
+
className: composeSlotClassName(slots?.thumb, className),
|
|
72
|
+
"data-slot": "switch-thumb",
|
|
73
|
+
...props,
|
|
74
|
+
children: children
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/* -------------------------------------------------------------------------------------------------
|
|
79
|
+
* Switch Icon
|
|
80
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
81
|
+
|
|
82
|
+
const SwitchIcon = ({
|
|
83
|
+
children,
|
|
84
|
+
className,
|
|
85
|
+
...props
|
|
86
|
+
}) => {
|
|
87
|
+
const {
|
|
88
|
+
slots
|
|
89
|
+
} = useContext(SwitchContext);
|
|
90
|
+
return /*#__PURE__*/jsx("span", {
|
|
91
|
+
className: composeSlotClassName(slots?.icon, className),
|
|
92
|
+
"data-slot": "switch-icon",
|
|
93
|
+
...props,
|
|
94
|
+
children: children
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/* -------------------------------------------------------------------------------------------------
|
|
99
|
+
* Switch Content
|
|
100
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
101
|
+
|
|
102
|
+
const SwitchContent = ({
|
|
103
|
+
children,
|
|
104
|
+
className,
|
|
105
|
+
...props
|
|
106
|
+
}) => {
|
|
107
|
+
const {
|
|
108
|
+
slots
|
|
109
|
+
} = useContext(SwitchContext);
|
|
110
|
+
return /*#__PURE__*/jsx("div", {
|
|
111
|
+
className: composeSlotClassName(slots?.content, className),
|
|
112
|
+
"data-slot": "switch-content",
|
|
113
|
+
...props,
|
|
114
|
+
children: children
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export { SwitchContent, SwitchControl, SwitchIcon, SwitchRoot, SwitchThumb };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { SwitchGroupRoot } from "./switch-group";
|
|
3
|
+
export declare const SwitchGroup: (({ children, className, orientation, ...props }: import("./switch-group").SwitchGroupRootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
+
Root: ({ children, className, orientation, ...props }: import("./switch-group").SwitchGroupRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export type SwitchGroup = {
|
|
7
|
+
Props: ComponentProps<typeof SwitchGroupRoot>;
|
|
8
|
+
RootProps: ComponentProps<typeof SwitchGroupRoot>;
|
|
9
|
+
};
|
|
10
|
+
export { SwitchGroupRoot };
|
|
11
|
+
export type { SwitchGroupRootProps, SwitchGroupRootProps as SwitchGroupProps, } from "./switch-group";
|
|
12
|
+
export { switchGroupVariants } from "./styles";
|
|
13
|
+
export type { SwitchGroupVariants } from "./styles";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { SwitchGroupRoot } from './switch-group.js';
|
|
3
|
+
export { switchGroupVariants } from './styles.js';
|
|
4
|
+
|
|
5
|
+
/* -------------------------------------------------------------------------------------------------
|
|
6
|
+
* Compound Component
|
|
7
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
8
|
+
const SwitchGroup = Object.assign(SwitchGroupRoot, {
|
|
9
|
+
Root: SwitchGroupRoot
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export { SwitchGroup, SwitchGroupRoot };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const switchGroupVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
orientation: {
|
|
4
|
+
horizontal: {
|
|
5
|
+
base: string;
|
|
6
|
+
};
|
|
7
|
+
vertical: {
|
|
8
|
+
base: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}, {
|
|
12
|
+
base: string;
|
|
13
|
+
items: string;
|
|
14
|
+
}, undefined, {
|
|
15
|
+
orientation: {
|
|
16
|
+
horizontal: {
|
|
17
|
+
base: string;
|
|
18
|
+
};
|
|
19
|
+
vertical: {
|
|
20
|
+
base: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}, {
|
|
24
|
+
base: string;
|
|
25
|
+
items: string;
|
|
26
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
27
|
+
orientation: {
|
|
28
|
+
horizontal: {
|
|
29
|
+
base: string;
|
|
30
|
+
};
|
|
31
|
+
vertical: {
|
|
32
|
+
base: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
base: string;
|
|
37
|
+
items: string;
|
|
38
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
39
|
+
export type SwitchGroupVariants = VariantProps<typeof switchGroupVariants>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { tv } from 'tailwind-variants';
|
|
3
|
+
|
|
4
|
+
const switchGroupVariants = tv({
|
|
5
|
+
defaultVariants: {
|
|
6
|
+
orientation: "vertical"
|
|
7
|
+
},
|
|
8
|
+
slots: {
|
|
9
|
+
base: "switch-group",
|
|
10
|
+
items: "switch-group__items"
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
orientation: {
|
|
14
|
+
horizontal: {
|
|
15
|
+
base: "switch-group--horizontal"
|
|
16
|
+
},
|
|
17
|
+
vertical: {
|
|
18
|
+
base: "switch-group--vertical"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export { switchGroupVariants };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SwitchGroupVariants } from "./styles";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
interface SwitchGroupRootProps extends ComponentPropsWithRef<"div">, SwitchGroupVariants {
|
|
4
|
+
}
|
|
5
|
+
declare const SwitchGroupRoot: ({ children, className, orientation, ...props }: SwitchGroupRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { SwitchGroupRoot };
|
|
7
|
+
export type { SwitchGroupRootProps };
|