asheeui 0.6.15 → 1.0.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/dist/AsheeUIProvider.d.ts.map +1 -1
- package/dist/AsheeUIProvider.js +29 -24
- package/dist/components/accordion/Accordion.d.ts.map +1 -1
- package/dist/components/accordion/Accordion.js +81 -173
- package/dist/components/accordion/accordion-config.js +12 -13
- package/dist/components/accordion/accordion-styles.js +21 -24
- package/dist/components/alert/Alert.d.ts +88 -0
- package/dist/components/alert/Alert.d.ts.map +1 -0
- package/dist/components/alert/Alert.js +61 -0
- package/dist/components/alert/alert-config.d.ts +56 -0
- package/dist/components/alert/alert-config.d.ts.map +1 -0
- package/dist/components/alert/alert-config.js +14 -0
- package/dist/components/alert/alert-styles.d.ts +32 -0
- package/dist/components/alert/alert-styles.d.ts.map +1 -0
- package/dist/components/alert/alert-styles.js +20 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/alert/index.js +3 -0
- package/dist/components/autocomplete/Autocomplete.d.ts +6 -6
- package/dist/components/autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/Autocomplete.js +114 -136
- package/dist/components/autocomplete/autocomplete-config.d.ts +1 -1
- package/dist/components/autocomplete/autocomplete-config.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete-config.js +7 -12
- package/dist/components/avatar/Avatar.d.ts +87 -0
- package/dist/components/avatar/Avatar.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.js +43 -0
- package/dist/components/avatar/avatar-config.d.ts +48 -0
- package/dist/components/avatar/avatar-config.d.ts.map +1 -0
- package/dist/components/avatar/avatar-config.js +14 -0
- package/dist/components/avatar/avatar-styles.d.ts +21 -0
- package/dist/components/avatar/avatar-styles.d.ts.map +1 -0
- package/dist/components/avatar/avatar-styles.js +13 -0
- package/dist/components/avatar/avatar.helpers.d.ts +19 -0
- package/dist/components/avatar/avatar.helpers.d.ts.map +1 -0
- package/dist/components/avatar/avatar.helpers.js +11 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/index.js +4 -0
- package/dist/components/badge/Badge.d.ts +69 -0
- package/dist/components/badge/Badge.d.ts.map +1 -0
- package/dist/components/badge/Badge.js +39 -0
- package/dist/components/badge/badge-config.d.ts +63 -0
- package/dist/components/badge/badge-config.d.ts.map +1 -0
- package/dist/components/badge/badge-config.js +15 -0
- package/dist/components/badge/badge-styles.d.ts +27 -0
- package/dist/components/badge/badge-styles.d.ts.map +1 -0
- package/dist/components/badge/badge-styles.js +25 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/badge/index.js +3 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +106 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.js +52 -0
- package/dist/components/breadcrumb/breadcrumb-config.d.ts +41 -0
- package/dist/components/breadcrumb/breadcrumb-config.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-config.js +10 -0
- package/dist/components/breadcrumb/breadcrumb-styles.d.ts +28 -0
- package/dist/components/breadcrumb/breadcrumb-styles.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-styles.js +17 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.js +3 -0
- package/dist/components/button/Button.d.ts +29 -1
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +50 -108
- package/dist/components/button/button-config.js +16 -17
- package/dist/components/button/button-styles.js +10 -11
- package/dist/components/{date-picker/DatePicker.d.ts → calendar/Calendar.d.ts} +22 -22
- package/dist/components/calendar/Calendar.d.ts.map +1 -0
- package/dist/components/calendar/Calendar.js +123 -0
- package/dist/components/{date-picker/Calendar.d.ts → calendar/DateGrid.d.ts} +7 -7
- package/dist/components/calendar/DateGrid.d.ts.map +1 -0
- package/dist/components/calendar/DateGrid.js +194 -0
- package/dist/components/calendar/TimeSpinner.d.ts.map +1 -0
- package/dist/components/calendar/TimeSpinner.js +60 -0
- package/dist/components/{date-picker/date-picker-config.d.ts → calendar/calendar-config.d.ts} +17 -17
- package/dist/components/calendar/calendar-config.d.ts.map +1 -0
- package/dist/components/calendar/calendar-config.js +15 -0
- package/dist/components/{date-picker/date-picker-styles.d.ts → calendar/calendar-styles.d.ts} +1 -1
- package/dist/components/calendar/calendar-styles.d.ts.map +1 -0
- package/dist/components/calendar/calendar-styles.js +46 -0
- package/dist/components/{date-picker/date-picker.helpers.d.ts → calendar/calendar.helpers.d.ts} +9 -9
- package/dist/components/calendar/calendar.helpers.d.ts.map +1 -0
- package/dist/components/calendar/calendar.helpers.js +82 -0
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/index.js +6 -0
- package/dist/components/card/Card.d.ts +36 -16
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +115 -205
- package/dist/components/card/card-config.js +24 -21
- package/dist/components/card/card-styles.js +19 -22
- package/dist/components/carousel/Carousel.d.ts.map +1 -1
- package/dist/components/carousel/Carousel.js +125 -248
- package/dist/components/carousel/carousel-config.js +24 -25
- package/dist/components/carousel/carousel-styles.d.ts +1 -20
- package/dist/components/carousel/carousel-styles.d.ts.map +1 -1
- package/dist/components/carousel/carousel-styles.js +14 -16
- package/dist/components/chip/Chip.js +84 -191
- package/dist/components/chip/chip-config.js +13 -14
- package/dist/components/chip/chip-styles.js +22 -26
- package/dist/components/drawer/Drawer.d.ts +33 -11
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.js +70 -131
- package/dist/components/drawer/drawer-config.js +14 -15
- package/dist/components/drawer/drawer-styles.js +38 -42
- package/dist/components/{select/Select.d.ts → dropmenu/Dropmenu.d.ts} +22 -21
- package/dist/components/dropmenu/Dropmenu.d.ts.map +1 -0
- package/dist/components/dropmenu/Dropmenu.js +102 -0
- package/dist/components/{select/select-config.d.ts → dropmenu/dropmenu-config.d.ts} +8 -8
- package/dist/components/dropmenu/dropmenu-config.d.ts.map +1 -0
- package/dist/components/dropmenu/dropmenu-config.js +9 -0
- package/dist/components/{select/select-styles.d.ts → dropmenu/dropmenu-styles.d.ts} +1 -1
- package/dist/components/dropmenu/dropmenu-styles.d.ts.map +1 -0
- package/dist/components/dropmenu/dropmenu-styles.js +6 -0
- package/dist/components/dropmenu/index.d.ts +3 -0
- package/dist/components/dropmenu/index.d.ts.map +1 -0
- package/dist/components/dropmenu/index.js +3 -0
- package/dist/components/field/FieldShell.d.ts +13 -1
- package/dist/components/field/FieldShell.d.ts.map +1 -1
- package/dist/components/field/FieldShell.js +50 -56
- package/dist/components/field/field-config.js +17 -18
- package/dist/components/field/field-styles.js +8 -8
- package/dist/components/form/Form.d.ts +109 -0
- package/dist/components/form/Form.d.ts.map +1 -0
- package/dist/components/form/Form.js +42 -0
- package/dist/components/form/form-config.d.ts +57 -0
- package/dist/components/form/form-config.d.ts.map +1 -0
- package/dist/components/form/form-config.js +12 -0
- package/dist/components/form/form-styles.d.ts +27 -0
- package/dist/components/form/form-styles.d.ts.map +1 -0
- package/dist/components/form/form-styles.js +5 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/form/index.js +3 -0
- package/dist/components/image/Image.d.ts +8 -9
- package/dist/components/image/Image.d.ts.map +1 -1
- package/dist/components/image/Image.js +65 -132
- package/dist/components/image/image-config.js +17 -18
- package/dist/components/image/image-styles.js +14 -15
- package/dist/components/input/Input.js +65 -150
- package/dist/components/input/PasswordInput.js +30 -49
- package/dist/components/input/input-config.js +7 -7
- package/dist/components/input/input-styles.js +9 -10
- package/dist/components/keyboard/KeyboardContext.js +10 -11
- package/dist/components/keyboard/KeyboardProvider.js +100 -181
- package/dist/components/keyboard/OnScreenKeyboard.d.ts.map +1 -1
- package/dist/components/keyboard/OnScreenKeyboard.js +159 -166
- package/dist/components/keyboard/keyboard-config.js +59 -57
- package/dist/components/keyboard/keyboard-styles.js +10 -11
- package/dist/components/keyboard/use-keyboard-field.js +29 -21
- package/dist/components/link/Link.d.ts +12 -10
- package/dist/components/link/Link.d.ts.map +1 -1
- package/dist/components/link/Link.js +47 -137
- package/dist/components/link/link-config.js +14 -15
- package/dist/components/link/link-styles.js +25 -29
- package/dist/components/marquee/Marquee.d.ts.map +1 -1
- package/dist/components/marquee/Marquee.js +58 -144
- package/dist/components/marquee/marquee-config.js +18 -19
- package/dist/components/marquee/marquee-styles.js +13 -15
- package/dist/components/{select-menu/SelectMenu.d.ts → menu/Menu.d.ts} +52 -19
- package/dist/components/menu/Menu.d.ts.map +1 -0
- package/dist/components/menu/Menu.js +161 -0
- package/dist/components/menu/index.d.ts +5 -0
- package/dist/components/menu/index.d.ts.map +1 -0
- package/dist/components/menu/index.js +4 -0
- package/dist/components/{select-menu/select-menu-config.d.ts → menu/menu-config.d.ts} +5 -5
- package/dist/components/menu/menu-config.d.ts.map +1 -0
- package/dist/components/menu/menu-config.js +14 -0
- package/dist/components/menu/menu-navigation.d.ts +38 -0
- package/dist/components/menu/menu-navigation.d.ts.map +1 -0
- package/dist/components/menu/menu-navigation.js +20 -0
- package/dist/components/{select-menu/use-select-floating.d.ts → menu/use-menu-floating.d.ts} +20 -10
- package/dist/components/menu/use-menu-floating.d.ts.map +1 -0
- package/dist/components/menu/use-menu-floating.js +43 -0
- package/dist/components/modal/Modal.d.ts +32 -11
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +74 -137
- package/dist/components/modal/modal-config.js +15 -16
- package/dist/components/modal/modal-styles.js +13 -14
- package/dist/components/multi-select/MultiSelect.d.ts +29 -12
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
- package/dist/components/multi-select/MultiSelect.js +162 -283
- package/dist/components/multi-select/multi-select-config.d.ts +24 -19
- package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
- package/dist/components/multi-select/multi-select-config.js +18 -21
- package/dist/components/multi-select/multi-select-styles.js +17 -20
- package/dist/components/pagination/Pagination.d.ts +91 -0
- package/dist/components/pagination/Pagination.d.ts.map +1 -0
- package/dist/components/pagination/Pagination.js +66 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.d.ts.map +1 -0
- package/dist/components/pagination/index.js +4 -0
- package/dist/components/pagination/pagination-config.d.ts +66 -0
- package/dist/components/pagination/pagination-config.d.ts.map +1 -0
- package/dist/components/pagination/pagination-config.js +19 -0
- package/dist/components/pagination/pagination-styles.d.ts +19 -0
- package/dist/components/pagination/pagination-styles.d.ts.map +1 -0
- package/dist/components/pagination/pagination-styles.js +5 -0
- package/dist/components/pagination/pagination.helpers.d.ts +26 -0
- package/dist/components/pagination/pagination.helpers.d.ts.map +1 -0
- package/dist/components/pagination/pagination.helpers.js +12 -0
- package/dist/components/radio/Radio.d.ts +53 -107
- package/dist/components/radio/Radio.d.ts.map +1 -1
- package/dist/components/radio/Radio.js +56 -79
- package/dist/components/radio/RadioGroup.d.ts +107 -53
- package/dist/components/radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/radio/RadioGroup.js +51 -155
- package/dist/components/radio/index.d.ts +0 -1
- package/dist/components/radio/index.d.ts.map +1 -1
- package/dist/components/radio/radio-config.js +15 -16
- package/dist/components/radio/radio-context.js +6 -6
- package/dist/components/radio/radio-styles.js +55 -60
- package/dist/components/resizable-screen/ResizableScreen.d.ts +4 -4
- package/dist/components/resizable-screen/ResizableScreen.js +87 -177
- package/dist/components/resizable-screen/resizable-screen-config.js +16 -17
- package/dist/components/scrollbar/index.js +1 -0
- package/dist/components/scrollbar/scrollbar-config.js +13 -0
- package/dist/components/sidebar/Sidebar.d.ts +43 -22
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.js +148 -331
- package/dist/components/sidebar/sidebar-config.d.ts +98 -31
- package/dist/components/sidebar/sidebar-config.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar-config.js +47 -33
- package/dist/components/sidebar/sidebar-styles.js +27 -32
- package/dist/components/skeleton/Skeleton.d.ts +65 -0
- package/dist/components/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/Skeleton.js +29 -0
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/index.d.ts.map +1 -0
- package/dist/components/skeleton/index.js +3 -0
- package/dist/components/skeleton/skeleton-config.d.ts +40 -0
- package/dist/components/skeleton/skeleton-config.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton-config.js +13 -0
- package/dist/components/skeleton/skeleton-styles.d.ts +19 -0
- package/dist/components/skeleton/skeleton-styles.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton-styles.js +5 -0
- package/dist/components/spinner/spinner-config.js +12 -13
- package/dist/components/spinner/spinner-styles.js +13 -14
- package/dist/components/spinner/spinner.js +39 -82
- package/dist/components/switch/Switch.d.ts.map +1 -1
- package/dist/components/switch/Switch.js +64 -154
- package/dist/components/switch/switch-config.js +11 -12
- package/dist/components/switch/switch-styles.js +14 -16
- package/dist/components/table/Table.js +64 -186
- package/dist/components/table/table-config.js +17 -18
- package/dist/components/table/table-styles.js +48 -52
- package/dist/components/tabs/Tabs.d.ts +16 -8
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +93 -208
- package/dist/components/tabs/tabs-config.d.ts +42 -20
- package/dist/components/tabs/tabs-config.d.ts.map +1 -1
- package/dist/components/tabs/tabs-config.js +26 -18
- package/dist/components/tabs/tabs-styles.js +15 -17
- package/dist/components/textarea/Textarea.d.ts +10 -10
- package/dist/components/textarea/Textarea.js +52 -138
- package/dist/components/textarea/textarea-config.d.ts +2 -2
- package/dist/components/textarea/textarea-config.js +10 -11
- package/dist/components/textarea/textarea-styles.js +9 -10
- package/dist/components/toast/ToastContext.js +22 -26
- package/dist/components/toast/ToastItem.d.ts.map +1 -1
- package/dist/components/toast/ToastItem.js +83 -144
- package/dist/components/toast/ToastProvider.d.ts.map +1 -1
- package/dist/components/toast/ToastProvider.js +128 -190
- package/dist/components/toast/toast-config.js +23 -24
- package/dist/components/toast/toast-styles.js +50 -55
- package/dist/components/toast/use-pausable-timeout.js +17 -13
- package/dist/components/tooltip/Tooltip.d.ts +5 -0
- package/dist/components/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/Tooltip.js +68 -158
- package/dist/components/tooltip/tooltip-config.d.ts +25 -0
- package/dist/components/tooltip/tooltip-config.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip-config.js +26 -22
- package/dist/components/tooltip/tooltip-styles.js +15 -17
- package/dist/components/typography/Typography.d.ts +60 -0
- package/dist/components/typography/Typography.d.ts.map +1 -0
- package/dist/components/typography/Typography.js +28 -0
- package/dist/components/typography/index.d.ts +3 -0
- package/dist/components/typography/index.d.ts.map +1 -0
- package/dist/components/typography/index.js +3 -0
- package/dist/components/typography/typography-config.d.ts +54 -0
- package/dist/components/typography/typography-config.d.ts.map +1 -0
- package/dist/components/typography/typography-config.js +12 -0
- package/dist/components/typography/typography-styles.d.ts +21 -0
- package/dist/components/typography/typography-styles.d.ts.map +1 -0
- package/dist/components/typography/typography-styles.js +19 -0
- package/dist/config/default-config.d.ts.map +1 -1
- package/dist/config/default-config.js +11 -34
- package/dist/config/index.js +1 -0
- package/dist/config/resolve-color.js +23 -23
- package/dist/config/resolve-config.d.ts.map +1 -1
- package/dist/config/resolve-config.js +14 -12
- package/dist/config/validate-config.d.ts +34 -0
- package/dist/config/validate-config.d.ts.map +1 -0
- package/dist/config/validate-config.js +190 -0
- package/dist/icons/ArrowLeftIcon.js +16 -19
- package/dist/icons/CalendarIcon.js +43 -24
- package/dist/icons/CheckIcon.js +16 -19
- package/dist/icons/ChevronDownIcon.js +15 -21
- package/dist/icons/ChevronLeftIcon.js +16 -19
- package/dist/icons/ChevronRightIcon.js +16 -19
- package/dist/icons/ChevronUpIcon.js +16 -19
- package/dist/icons/ClearIcon.js +26 -22
- package/dist/icons/ClockIcon.js +20 -22
- package/dist/icons/CloseIcon.js +26 -22
- package/dist/icons/ErrorIcon.js +16 -19
- package/dist/icons/ExternalLinkIcon.js +25 -23
- package/dist/icons/EyeIcon.js +20 -22
- package/dist/icons/EyeOffIcon.js +21 -22
- package/dist/icons/InfoIcon.js +16 -19
- package/dist/icons/SearchIcon.js +25 -22
- package/dist/icons/WarningIcon.js +16 -19
- package/dist/index.d.ts +15 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +79 -163
- package/dist/libs/context.js +10 -13
- package/dist/libs/index.js +4 -0
- package/dist/libs/registry.js +10 -12
- package/dist/libs/use-body-scroll-lock.d.ts +21 -0
- package/dist/libs/use-body-scroll-lock.d.ts.map +1 -0
- package/dist/libs/use-body-scroll-lock.js +27 -0
- package/dist/libs/use-dialog-overlay.d.ts +21 -0
- package/dist/libs/use-dialog-overlay.d.ts.map +1 -0
- package/dist/libs/use-dialog-overlay.js +21 -0
- package/dist/libs/use-floating-z-index.d.ts +32 -0
- package/dist/libs/use-floating-z-index.d.ts.map +1 -0
- package/dist/libs/use-floating-z-index.js +16 -0
- package/dist/libs/use-isomorphic-layout-effect.js +5 -5
- package/dist/libs/use-prefers-reduced-motion.d.ts +23 -0
- package/dist/libs/use-prefers-reduced-motion.d.ts.map +1 -0
- package/dist/libs/use-prefers-reduced-motion.js +19 -0
- package/dist/scripts/AsheeThemeScript.js +70 -44
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/radius.d.ts.map +1 -1
- package/dist/shared/radius.js +12 -13
- package/dist/shared/typography.d.ts +81 -0
- package/dist/shared/typography.d.ts.map +1 -0
- package/dist/shared/typography.js +137 -0
- package/dist/shared/variant.js +46 -134
- package/dist/theme/color.js +28 -28
- package/dist/theme/controller.d.ts.map +1 -1
- package/dist/theme/controller.js +65 -178
- package/dist/theme/useTheme.js +13 -44
- package/dist/utils/cn.js +7 -7
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/merge-object.js +13 -14
- package/dist/utils/resolve-token.js +11 -14
- package/dist/utils/stacking.d.ts +76 -0
- package/dist/utils/stacking.d.ts.map +1 -0
- package/dist/utils/stacking.js +34 -0
- package/package.json +22 -14
- package/dist/components/date-picker/Calendar.d.ts.map +0 -1
- package/dist/components/date-picker/Calendar.js +0 -224
- package/dist/components/date-picker/DatePicker.d.ts.map +0 -1
- package/dist/components/date-picker/DatePicker.js +0 -221
- package/dist/components/date-picker/TimeSpinner.d.ts.map +0 -1
- package/dist/components/date-picker/TimeSpinner.js +0 -84
- package/dist/components/date-picker/date-picker-config.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker-config.js +0 -16
- package/dist/components/date-picker/date-picker-styles.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker-styles.js +0 -47
- package/dist/components/date-picker/date-picker.helpers.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker.helpers.js +0 -110
- package/dist/components/date-picker/index.d.ts +0 -3
- package/dist/components/date-picker/index.d.ts.map +0 -1
- package/dist/components/date-picker/index.js +0 -6
- package/dist/components/select/Select.d.ts.map +0 -1
- package/dist/components/select/Select.js +0 -196
- package/dist/components/select/index.d.ts +0 -3
- package/dist/components/select/index.d.ts.map +0 -1
- package/dist/components/select/index.js +0 -3
- package/dist/components/select/select-config.d.ts.map +0 -1
- package/dist/components/select/select-config.js +0 -10
- package/dist/components/select/select-styles.d.ts.map +0 -1
- package/dist/components/select/select-styles.js +0 -6
- package/dist/components/select-menu/SelectMenu.d.ts.map +0 -1
- package/dist/components/select-menu/SelectMenu.js +0 -198
- package/dist/components/select-menu/index.d.ts +0 -4
- package/dist/components/select-menu/index.d.ts.map +0 -1
- package/dist/components/select-menu/index.js +0 -3
- package/dist/components/select-menu/select-menu-config.d.ts.map +0 -1
- package/dist/components/select-menu/select-menu-config.js +0 -14
- package/dist/components/select-menu/use-select-floating.d.ts.map +0 -1
- package/dist/components/select-menu/use-select-floating.js +0 -50
- /package/dist/components/{date-picker → calendar}/TimeSpinner.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsheeUIProvider.d.ts","sourceRoot":"","sources":["../src/AsheeUIProvider.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"AsheeUIProvider.d.ts","sourceRoot":"","sources":["../src/AsheeUIProvider.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAWtD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AA2BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAW,EACX,QAAQ,GACT,EAAE,oBAAoB,+BAiCtB"}
|
package/dist/AsheeUIProvider.js
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import { resolveConfig as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
"use client";
|
|
3
|
+
import { themeController as e } from "./theme/controller.js";
|
|
4
|
+
import { resolveConfig as t } from "./config/resolve-config.js";
|
|
5
|
+
import { assertValidConfig as n } from "./config/validate-config.js";
|
|
6
|
+
import { AsheeConfigContext as r } from "./libs/context.js";
|
|
7
|
+
import { useIsomorphicLayoutEffect as i } from "./libs/use-isomorphic-layout-effect.js";
|
|
8
|
+
import { AsheeThemeScript as a, ensureThemeVarsStyle as o } from "./scripts/AsheeThemeScript.js";
|
|
9
|
+
import { useMemo as s, useSyncExternalStore as c } from "react";
|
|
10
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
|
+
//#region src/AsheeUIProvider.tsx
|
|
12
|
+
var d = () => () => {};
|
|
13
|
+
function f() {
|
|
14
|
+
return c(d, () => !1, () => !0);
|
|
15
|
+
}
|
|
16
|
+
function p({ config: c = {}, children: d }) {
|
|
17
|
+
let p = s(() => (n(c), t(c)), [c]);
|
|
18
|
+
i(() => {
|
|
19
|
+
e.configure({
|
|
20
|
+
defaultTheme: p.defaultTheme ?? "system",
|
|
21
|
+
themes: Object.keys(p.color)
|
|
22
|
+
}), o(p);
|
|
23
|
+
}, [p]);
|
|
24
|
+
let m = f();
|
|
25
|
+
return /* @__PURE__ */ u(r.Provider, {
|
|
26
|
+
value: p,
|
|
27
|
+
children: [m && /* @__PURE__ */ l(a, { config: p }), d]
|
|
28
|
+
});
|
|
23
29
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { p as AsheeUIProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/Accordion.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAUf,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,aAAa,EAInB,MAAM,oBAAoB,CAAC;AAU5B,KAAK,kBAAkB,GAAG,eAAe,GACvC,IAAI,CACF,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,OAAO,GAAG,cAAc,GAAG,UAAU,CACtC,CAAC;AAEJ;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;;;OAMG;IACH,KAAK,EAAE,aAAa,EAAE,CAAC;IAEvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEjC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE1B;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAE1C;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/Accordion.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAUf,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,aAAa,EAInB,MAAM,oBAAoB,CAAC;AAU5B,KAAK,kBAAkB,GAAG,eAAe,GACvC,IAAI,CACF,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,OAAO,GAAG,cAAc,GAAG,UAAU,CACtC,CAAC;AAEJ;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;;;OAMG;IACH,KAAK,EAAE,aAAa,EAAE,CAAC;IAEvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEjC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE1B;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAE1C;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,eAAO,MAAM,SAAS,2GAyOrB,CAAC"}
|
|
@@ -1,174 +1,82 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useAsheeConfig as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"w-full",
|
|
84
|
-
U,
|
|
85
|
-
i !== "ghost" && i !== "flush" && I,
|
|
86
|
-
V
|
|
87
|
-
),
|
|
88
|
-
style: F,
|
|
89
|
-
...k,
|
|
90
|
-
children: g.map((e, N) => {
|
|
91
|
-
const r = e.id || `item-${N}`, l = a.includes(r), c = `${m}-header-${r}`, y = `${m}-content-${r}`;
|
|
92
|
-
return /* @__PURE__ */ u(
|
|
93
|
-
"div",
|
|
94
|
-
{
|
|
95
|
-
className: n(
|
|
96
|
-
"w-full transition-colors box-border",
|
|
97
|
-
q,
|
|
98
|
-
(i === "separated" || i === "ghost") && I,
|
|
99
|
-
$
|
|
100
|
-
),
|
|
101
|
-
children: [
|
|
102
|
-
/* @__PURE__ */ u(
|
|
103
|
-
"button",
|
|
104
|
-
{
|
|
105
|
-
id: c,
|
|
106
|
-
type: "button",
|
|
107
|
-
"aria-expanded": l,
|
|
108
|
-
"aria-controls": y,
|
|
109
|
-
disabled: e.disabled,
|
|
110
|
-
onClick: () => X(r, e.disabled),
|
|
111
|
-
className: n(
|
|
112
|
-
"w-full min-w-full text-left flex items-center justify-between gap-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed select-none box-border",
|
|
113
|
-
J,
|
|
114
|
-
M
|
|
115
|
-
),
|
|
116
|
-
children: [
|
|
117
|
-
/* @__PURE__ */ u("div", { className: "flex items-center gap-3 min-w-0 flex-1", children: [
|
|
118
|
-
e.icon && /* @__PURE__ */ t("span", { className: "shrink-0 text-foreground/70", children: e.icon }),
|
|
119
|
-
/* @__PURE__ */ u("div", { className: "flex flex-col min-w-0", children: [
|
|
120
|
-
/* @__PURE__ */ t("span", { className: "font-semibold truncate", children: e.title }),
|
|
121
|
-
e.subtitle && /* @__PURE__ */ t("span", { className: "text-xs text-foreground/70 truncate", children: e.subtitle })
|
|
122
|
-
] })
|
|
123
|
-
] }),
|
|
124
|
-
/* @__PURE__ */ t(
|
|
125
|
-
"div",
|
|
126
|
-
{
|
|
127
|
-
className: n(
|
|
128
|
-
"text-foreground/70 shrink-0 ml-2 transition-transform duration-200 ease-in-out",
|
|
129
|
-
h ? "transition-none" : "",
|
|
130
|
-
l && "rotate-180"
|
|
131
|
-
),
|
|
132
|
-
children: T || /* @__PURE__ */ t(re, { className: "w-4 h-4" })
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
),
|
|
138
|
-
/* @__PURE__ */ t(
|
|
139
|
-
"section",
|
|
140
|
-
{
|
|
141
|
-
id: y,
|
|
142
|
-
"aria-labelledby": c,
|
|
143
|
-
"data-state": l ? "open" : "closed",
|
|
144
|
-
className: n(
|
|
145
|
-
"w-full grid transition-[grid-template-rows,opacity] duration-250 ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
146
|
-
h ? "transition-none" : "",
|
|
147
|
-
l ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"
|
|
148
|
-
),
|
|
149
|
-
children: /* @__PURE__ */ t("div", { className: "scrollbar-hide overflow-hidden w-full", children: /* @__PURE__ */ t(
|
|
150
|
-
"div",
|
|
151
|
-
{
|
|
152
|
-
className: n(
|
|
153
|
-
"text-foreground/70 leading-relaxed pt-0",
|
|
154
|
-
P,
|
|
155
|
-
j
|
|
156
|
-
),
|
|
157
|
-
children: e.content
|
|
158
|
-
}
|
|
159
|
-
) })
|
|
160
|
-
}
|
|
161
|
-
)
|
|
162
|
-
]
|
|
163
|
-
},
|
|
164
|
-
r
|
|
165
|
-
);
|
|
166
|
-
})
|
|
167
|
-
}
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
);
|
|
171
|
-
le.displayName = "Accordion";
|
|
172
|
-
export {
|
|
173
|
-
le as Accordion
|
|
174
|
-
};
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { RADIUS_CLASS as t } from "../../shared/radius.js";
|
|
5
|
+
import { useAsheeConfig as n } from "../../libs/context.js";
|
|
6
|
+
import { ChevronDownIcon as r } from "../../icons/ChevronDownIcon.js";
|
|
7
|
+
import { resolveCascade as i, resolveClassKey as a, resolveRadiusKey as o } from "../../utils/resolve-token.js";
|
|
8
|
+
import { FALLBACK_ACCORDION_CONFIG as s } from "./accordion-config.js";
|
|
9
|
+
import { ACCORDION_CONTENT_SIZE_CLASS as c, ACCORDION_HEADER_SIZE_CLASS as l, ACCORDION_VARIANT_CONTAINER_CLASS as u, ACCORDION_VARIANT_ITEM_CLASS as d } from "./accordion-styles.js";
|
|
10
|
+
import { forwardRef as f, useCallback as p, useId as m, useState as h } from "react";
|
|
11
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
12
|
+
//#region src/components/accordion/Accordion.tsx
|
|
13
|
+
var v = f(({ items: f = [], variant: v, size: y, radius: b, allowMultiple: x, defaultValue: S, value: C, onValueChange: w, expandIcon: T, disableAnimation: E = !1, itemClassName: D, headerClassName: O, contentClassName: k, className: A, style: j, id: M, ...N }, P) => {
|
|
14
|
+
let F = n(), I = F.components?.accordion, L = m(), R = M ?? L, z = i(y, I?.size, void 0, s.size), B = i(v, I?.variant, F.defaultVariant, s.variant), V = i(x, I?.allowMultiple, void 0, s.allowMultiple), H = o(b, I?.radius, F.defaultRadius, s.radius), U = u[B] ?? u.separated, W = d[B] ?? d.separated, G = a(z, l, s.size), K = a(z, c, s.size), q = a(H, t, s.radius), J = C !== void 0, Y = p((e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], []), [X, Z] = h(() => Y(S)), Q = J ? Y(C) : X, $ = p((e, t) => {
|
|
15
|
+
if (t) return;
|
|
16
|
+
let n;
|
|
17
|
+
n = Q.includes(e) ? Q.filter((t) => t !== e) : V ? [...Q, e] : [e], J || Z(n), w?.(n);
|
|
18
|
+
}, [
|
|
19
|
+
Q,
|
|
20
|
+
J,
|
|
21
|
+
w,
|
|
22
|
+
V
|
|
23
|
+
]);
|
|
24
|
+
return /* @__PURE__ */ g("div", {
|
|
25
|
+
ref: P,
|
|
26
|
+
id: R,
|
|
27
|
+
className: e("w-full", U, B !== "ghost" && B !== "flush" && q, A),
|
|
28
|
+
style: j,
|
|
29
|
+
...N,
|
|
30
|
+
children: f.map((t, n) => {
|
|
31
|
+
let i = t.id || `item-${n}`, a = Q.includes(i), o = `${R}-header-${i}`, s = `${R}-content-${i}`;
|
|
32
|
+
return /* @__PURE__ */ _("div", {
|
|
33
|
+
className: e("w-full transition-colors box-border", W, (B === "separated" || B === "ghost") && q, D),
|
|
34
|
+
children: [/* @__PURE__ */ _("button", {
|
|
35
|
+
id: o,
|
|
36
|
+
type: "button",
|
|
37
|
+
"aria-expanded": a,
|
|
38
|
+
"aria-controls": s,
|
|
39
|
+
disabled: t.disabled,
|
|
40
|
+
onClick: () => $(i, t.disabled),
|
|
41
|
+
className: e("w-full min-w-full text-left flex items-center justify-between gap-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed select-none box-border", G, O),
|
|
42
|
+
children: [/* @__PURE__ */ _("div", {
|
|
43
|
+
className: "flex items-center gap-3 min-w-0 flex-1",
|
|
44
|
+
children: [t.icon && /* @__PURE__ */ g("span", {
|
|
45
|
+
className: "shrink-0 text-foreground/70",
|
|
46
|
+
children: t.icon
|
|
47
|
+
}), /* @__PURE__ */ _("div", {
|
|
48
|
+
className: "flex flex-col min-w-0",
|
|
49
|
+
children: [/* @__PURE__ */ g("span", {
|
|
50
|
+
className: "font-semibold truncate",
|
|
51
|
+
children: t.title
|
|
52
|
+
}), t.subtitle && /* @__PURE__ */ g("span", {
|
|
53
|
+
className: "text-xs text-foreground/70 truncate",
|
|
54
|
+
children: t.subtitle
|
|
55
|
+
})]
|
|
56
|
+
})]
|
|
57
|
+
}), /* @__PURE__ */ g("div", {
|
|
58
|
+
className: e("text-foreground/70 shrink-0 ml-2 transition-transform duration-200 ease-in-out", E ? "transition-none" : "", a && "rotate-180"),
|
|
59
|
+
children: T || /* @__PURE__ */ g(r, { className: "w-4 h-4" })
|
|
60
|
+
})]
|
|
61
|
+
}), /* @__PURE__ */ g("section", {
|
|
62
|
+
id: s,
|
|
63
|
+
"aria-labelledby": o,
|
|
64
|
+
"data-state": a ? "open" : "closed",
|
|
65
|
+
"aria-hidden": !a || void 0,
|
|
66
|
+
inert: !a,
|
|
67
|
+
className: e("w-full grid transition-[grid-template-rows,opacity] duration-250 ease-[cubic-bezier(0.16,1,0.3,1)]", E ? "transition-none" : "", a ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
|
|
68
|
+
children: /* @__PURE__ */ g("div", {
|
|
69
|
+
className: "scrollbar-hide overflow-hidden w-full",
|
|
70
|
+
children: /* @__PURE__ */ g("div", {
|
|
71
|
+
className: e("text-foreground/70 leading-relaxed pt-0", K, k),
|
|
72
|
+
children: t.content
|
|
73
|
+
})
|
|
74
|
+
})
|
|
75
|
+
})]
|
|
76
|
+
}, i);
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
v.displayName = "Accordion";
|
|
81
|
+
//#endregion
|
|
82
|
+
export { v as Accordion };
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
//#region src/components/accordion/accordion-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
size: "md",
|
|
6
|
+
allowMultiple: !1
|
|
6
7
|
};
|
|
7
|
-
e("accordion",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
t as FALLBACK_ACCORDION_CONFIG,
|
|
16
|
-
o as defaultAccordionConfig
|
|
8
|
+
e("accordion", t);
|
|
9
|
+
var n = {
|
|
10
|
+
size: "md",
|
|
11
|
+
variant: "separated",
|
|
12
|
+
radius: "md",
|
|
13
|
+
allowMultiple: !1
|
|
17
14
|
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as FALLBACK_ACCORDION_CONFIG, t as defaultAccordionConfig };
|
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
e as ACCORDION_CONTENT_SIZE_CLASS,
|
|
23
|
-
r as ACCORDION_HEADER_SIZE_CLASS,
|
|
24
|
-
o as ACCORDION_VARIANT_CONTAINER_CLASS,
|
|
25
|
-
s as ACCORDION_VARIANT_ITEM_CLASS
|
|
2
|
+
//#region src/components/accordion/accordion-styles.ts
|
|
3
|
+
var e = {
|
|
4
|
+
sm: "px-3.5 py-2 text-xs",
|
|
5
|
+
md: "px-5 py-3.5 text-sm",
|
|
6
|
+
lg: "px-6 py-4 text-base"
|
|
7
|
+
}, t = {
|
|
8
|
+
sm: "px-3.5 pb-2 text-xs",
|
|
9
|
+
md: "px-5 pb-3.5 text-sm",
|
|
10
|
+
lg: "px-6 pb-4 text-base"
|
|
11
|
+
}, n = {
|
|
12
|
+
bordered: "border border-border divide-y divide-border",
|
|
13
|
+
separated: "space-y-3",
|
|
14
|
+
ghost: "divide-y divide-border border-y border-border",
|
|
15
|
+
flush: "space-y-1"
|
|
16
|
+
}, r = {
|
|
17
|
+
bordered: "bg-secondary transition-colors hover:bg-foreground/10",
|
|
18
|
+
separated: "border border-border bg-secondary transition-colors hover:bg-secondary/30 shadow-xs",
|
|
19
|
+
ghost: "bg-transparent transition-colors hover:bg-secondary/20",
|
|
20
|
+
flush: "bg-transparent hover:bg-secondary/50 transition-colors"
|
|
26
21
|
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { t as ACCORDION_CONTENT_SIZE_CLASS, e as ACCORDION_HEADER_SIZE_CLASS, n as ACCORDION_VARIANT_CONTAINER_CLASS, r as ACCORDION_VARIANT_ITEM_CLASS };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { AlertConfig, AlertType } from './alert-config';
|
|
3
|
+
type BaseAlertProps = AlertConfig & Omit<HTMLAttributes<HTMLDivElement>, "color" | "title" | "content">;
|
|
4
|
+
/**
|
|
5
|
+
* Configuration options for the Alert component.
|
|
6
|
+
*/
|
|
7
|
+
export interface AlertProps extends BaseAlertProps {
|
|
8
|
+
/**
|
|
9
|
+
* Intent of the alert.
|
|
10
|
+
* Selects the colour and the urgency of the announcement.
|
|
11
|
+
*
|
|
12
|
+
* @default "info"
|
|
13
|
+
*/
|
|
14
|
+
type?: AlertType;
|
|
15
|
+
/**
|
|
16
|
+
* Short heading for the message.
|
|
17
|
+
*/
|
|
18
|
+
title?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Message body.
|
|
21
|
+
*/
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Leading content, shown in place of the intent's default icon.
|
|
25
|
+
*/
|
|
26
|
+
icon?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the alert can be dismissed by the consumer.
|
|
29
|
+
* The dismiss control appears only when this is true and `onClose` is given.
|
|
30
|
+
*
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
isClosable?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Called when the dismiss control is used.
|
|
36
|
+
*/
|
|
37
|
+
onClose?: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Name of the dismiss control, for assistive technology.
|
|
40
|
+
*
|
|
41
|
+
* @default "Dismiss alert"
|
|
42
|
+
*/
|
|
43
|
+
closeLabel?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* An inline message or validation summary.
|
|
47
|
+
*
|
|
48
|
+
* Alert presents a message next to the surface it relates to: a form summary,
|
|
49
|
+
* a failed step, or a statement the consumer should not miss. Its colour,
|
|
50
|
+
* variant and radius resolve through the standard AsheeUI cascade: prop,
|
|
51
|
+
* component config, global theme defaults, and the built-in fallback.
|
|
52
|
+
*
|
|
53
|
+
* The intent decides how urgently the message is announced. `error` and
|
|
54
|
+
* `warning` are exposed as an alert, which interrupts assistive technology;
|
|
55
|
+
* `info` and `success` are exposed as a status, which waits for a pause. Pass
|
|
56
|
+
* `role` to override that choice.
|
|
57
|
+
*
|
|
58
|
+
* An alert never moves focus, never takes focus, and never appears above the
|
|
59
|
+
* page: when a message has to interrupt with a modal surface, use `Modal`
|
|
60
|
+
* instead. The dismiss control carries an accessible name and is the only
|
|
61
|
+
* focusable element the component adds.
|
|
62
|
+
*
|
|
63
|
+
* @param props - Alert configuration options and div attributes.
|
|
64
|
+
* @param props.type - Intent. Defaults to "info".
|
|
65
|
+
* @param props.title - Short heading for the message.
|
|
66
|
+
* @param props.children - Message body.
|
|
67
|
+
* @param props.icon - Leading content, in place of the default icon.
|
|
68
|
+
* @param props.isClosable - Whether a dismiss control is shown. Defaults to false.
|
|
69
|
+
* @param props.onClose - Called when the dismiss control is used.
|
|
70
|
+
* @param props.closeLabel - Name of the dismiss control. Defaults to "Dismiss alert".
|
|
71
|
+
* @param props.variant - Visual style variant. Defaults to the configured value.
|
|
72
|
+
* @param props.radius - Corner rounding. Defaults to "md".
|
|
73
|
+
* @param props.role - Announcement role, overriding the intent's default.
|
|
74
|
+
* @param props.className - Extra classes applied last.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```tsx
|
|
78
|
+
* <Alert type="error" title="Payment failed">
|
|
79
|
+
* The card was declined. Check the details and try again.
|
|
80
|
+
* </Alert>
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* @see AlertConfig - The configuration type for component defaults.
|
|
84
|
+
* @see ToastProvider - For messages that appear above the page instead of inline.
|
|
85
|
+
*/
|
|
86
|
+
export declare const Alert: import('react').ForwardRefExoticComponent<AlertProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
87
|
+
export {};
|
|
88
|
+
//# sourceMappingURL=Alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/Alert.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAmBxE,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,SAAS,EAEf,MAAM,gBAAgB,CAAC;AAExB,KAAK,cAAc,GAAG,WAAW,GAC/B,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,KAAK,uGAwFjB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { RADIUS_CLASS as t } from "../../shared/radius.js";
|
|
5
|
+
import { resolveVariantClass as n } from "../../shared/variant.js";
|
|
6
|
+
import { useAsheeConfig as r } from "../../libs/context.js";
|
|
7
|
+
import { resolveCascade as i, resolveClassKey as a } from "../../utils/resolve-token.js";
|
|
8
|
+
import { CheckIcon as o } from "../../icons/CheckIcon.js";
|
|
9
|
+
import { CloseIcon as s } from "../../icons/CloseIcon.js";
|
|
10
|
+
import { ErrorIcon as c } from "../../icons/ErrorIcon.js";
|
|
11
|
+
import { InfoIcon as l } from "../../icons/InfoIcon.js";
|
|
12
|
+
import { WarningIcon as u } from "../../icons/WarningIcon.js";
|
|
13
|
+
import { ALERT_BASE_CLASS as d, ALERT_ICON_CLASS as f, ALERT_TYPE_COLOR as p, ALERT_TYPE_ICON_CLASS as m, ALERT_TYPE_ROLE as h } from "./alert-styles.js";
|
|
14
|
+
import { FALLBACK_ALERT_CONFIG as g } from "./alert-config.js";
|
|
15
|
+
import { forwardRef as _ } from "react";
|
|
16
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
17
|
+
//#region src/components/alert/Alert.tsx
|
|
18
|
+
function b(e) {
|
|
19
|
+
switch (e) {
|
|
20
|
+
case "success": return /* @__PURE__ */ v(o, {});
|
|
21
|
+
case "error": return /* @__PURE__ */ v(c, {});
|
|
22
|
+
case "warning": return /* @__PURE__ */ v(u, {});
|
|
23
|
+
default: return /* @__PURE__ */ v(l, {});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
var x = _(({ type: o, variant: c, radius: l, title: u, children: _, icon: x, isClosable: S = !1, onClose: C, closeLabel: w = "Dismiss alert", role: T, className: E, ...D }, O) => {
|
|
27
|
+
let k = r(), A = k.components?.alert, j = i(o, A?.type, void 0, g.type), M = i(c, A?.variant, k.defaultVariant, g.variant), N = M === "underlined" ? "bordered" : M, P = i(l, A?.radius, k.defaultRadius, g.radius), F = a(P, t, g.radius);
|
|
28
|
+
return /* @__PURE__ */ y("div", {
|
|
29
|
+
ref: O,
|
|
30
|
+
role: T ?? h[j],
|
|
31
|
+
className: e(d, F, n(N, p[j]), E),
|
|
32
|
+
...D,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ v("span", {
|
|
35
|
+
"aria-hidden": "true",
|
|
36
|
+
className: e(f, m[j]),
|
|
37
|
+
children: x ?? b(j)
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ y("div", {
|
|
40
|
+
className: "flex-1 min-w-0 flex flex-col gap-0.5",
|
|
41
|
+
children: [u && /* @__PURE__ */ v("span", {
|
|
42
|
+
className: "font-medium",
|
|
43
|
+
children: u
|
|
44
|
+
}), _ && /* @__PURE__ */ v("div", {
|
|
45
|
+
className: "text-current/80",
|
|
46
|
+
children: _
|
|
47
|
+
})]
|
|
48
|
+
}),
|
|
49
|
+
S && C && /* @__PURE__ */ v("button", {
|
|
50
|
+
type: "button",
|
|
51
|
+
"aria-label": w,
|
|
52
|
+
onClick: C,
|
|
53
|
+
className: "shrink-0 inline-flex items-center justify-center size-6 rounded-sm text-current/70 hover:text-current transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-current",
|
|
54
|
+
children: /* @__PURE__ */ v(s, { className: "size-3.5" })
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
x.displayName = "Alert";
|
|
60
|
+
//#endregion
|
|
61
|
+
export { x as Alert };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Radius, Variant } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* Intent of an alert.
|
|
4
|
+
* Selects the colour an alert is presented in and how urgently it is
|
|
5
|
+
* announced: `error` and `warning` interrupt, `info` and `success` wait for a
|
|
6
|
+
* pause in what assistive technology is reading.
|
|
7
|
+
*/
|
|
8
|
+
export type AlertType = "success" | "error" | "info" | "warning";
|
|
9
|
+
/**
|
|
10
|
+
* Theme configuration options for the Alert component.
|
|
11
|
+
*
|
|
12
|
+
* Set under `components.alert` in the AsheeUI config. Values feed the
|
|
13
|
+
* component-level fallback tier of the theme cascade.
|
|
14
|
+
*/
|
|
15
|
+
export interface AlertConfig {
|
|
16
|
+
/**
|
|
17
|
+
* Intent of the alert.
|
|
18
|
+
* Controls its colour and how urgently its message is announced.
|
|
19
|
+
*
|
|
20
|
+
* @default "info"
|
|
21
|
+
*/
|
|
22
|
+
type?: AlertType;
|
|
23
|
+
/**
|
|
24
|
+
* Visual style variant.
|
|
25
|
+
* Controls the alert's background, border, and text treatment.
|
|
26
|
+
*
|
|
27
|
+
* @default "faded"
|
|
28
|
+
*/
|
|
29
|
+
variant?: Exclude<Variant, "underlined">;
|
|
30
|
+
/**
|
|
31
|
+
* Corner rounding.
|
|
32
|
+
* Controls the border-radius of the alert.
|
|
33
|
+
*
|
|
34
|
+
* @default "md"
|
|
35
|
+
*/
|
|
36
|
+
radius?: Radius;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Default config values registered for the Alert component.
|
|
40
|
+
*
|
|
41
|
+
* `variant` is intentionally absent so it inherits from the global
|
|
42
|
+
* `defaultVariant`.
|
|
43
|
+
*/
|
|
44
|
+
export declare const defaultAlertConfig: AlertConfig;
|
|
45
|
+
/**
|
|
46
|
+
* Hard fallback values used when no config tier provides a value.
|
|
47
|
+
* These values are used when instance props, component config,
|
|
48
|
+
* and global defaults are all undefined.
|
|
49
|
+
*/
|
|
50
|
+
export declare const FALLBACK_ALERT_CONFIG: Required<AlertConfig>;
|
|
51
|
+
declare module "../../libs/registry" {
|
|
52
|
+
interface ComponentTypeConfigRegistry {
|
|
53
|
+
alert: AlertConfig;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=alert-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-config.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAEzC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAGhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAI9C,CAAC;AAEX,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,KAAK,EAAE,WAAW,CAAC;KACpB;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/alert/alert-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
type: "info",
|
|
6
|
+
radius: "md"
|
|
7
|
+
}, n = {
|
|
8
|
+
type: "info",
|
|
9
|
+
variant: "faded",
|
|
10
|
+
radius: "md"
|
|
11
|
+
};
|
|
12
|
+
e("alert", t);
|
|
13
|
+
//#endregion
|
|
14
|
+
export { n as FALLBACK_ALERT_CONFIG, t as defaultAlertConfig };
|