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,159 +1,69 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
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
|
-
s.size
|
|
71
|
-
), U = i(
|
|
72
|
-
m,
|
|
73
|
-
ye,
|
|
74
|
-
s.size
|
|
75
|
-
), X = i(
|
|
76
|
-
E,
|
|
77
|
-
Ae,
|
|
78
|
-
s.radius
|
|
79
|
-
), y = [
|
|
80
|
-
J(g),
|
|
81
|
-
Q({ padding: 8 }),
|
|
82
|
-
W({ padding: 8 })
|
|
83
|
-
];
|
|
84
|
-
w && y.push(Z({ element: f }));
|
|
85
|
-
const { refs: p, floatingStyles: Y, context: t } = $({
|
|
86
|
-
open: v && !l,
|
|
87
|
-
onOpenChange: K,
|
|
88
|
-
placement: x,
|
|
89
|
-
whileElementsMounted: ee,
|
|
90
|
-
middleware: y
|
|
91
|
-
}), k = se(t, {
|
|
92
|
-
delay: b,
|
|
93
|
-
enabled: !l
|
|
94
|
-
}), B = oe(t, { enabled: !l }), H = re(t), M = te(t, { role: "tooltip" }), { getReferenceProps: A, getFloatingProps: q } = ae([
|
|
95
|
-
k,
|
|
96
|
-
B,
|
|
97
|
-
H,
|
|
98
|
-
M
|
|
99
|
-
]), C = pe(r) ? ce(
|
|
100
|
-
r,
|
|
101
|
-
A({
|
|
102
|
-
ref: p.setReference,
|
|
103
|
-
...r.props
|
|
104
|
-
})
|
|
105
|
-
) : /* @__PURE__ */ a(
|
|
106
|
-
"span",
|
|
107
|
-
{
|
|
108
|
-
ref: p.setReference,
|
|
109
|
-
...A(),
|
|
110
|
-
className: "inline-flex",
|
|
111
|
-
children: r
|
|
112
|
-
}
|
|
113
|
-
);
|
|
114
|
-
return !u || l ? /* @__PURE__ */ a(S, { children: r }) : /* @__PURE__ */ h(S, { children: [
|
|
115
|
-
C,
|
|
116
|
-
/* @__PURE__ */ a(le, { children: v && /* @__PURE__ */ a(
|
|
117
|
-
"div",
|
|
118
|
-
{
|
|
119
|
-
ref: (c) => {
|
|
120
|
-
p.setFloating(c), typeof n == "function" ? n(c) : n && (n.current = c);
|
|
121
|
-
},
|
|
122
|
-
style: Y,
|
|
123
|
-
className: "z-50 pointer-events-none",
|
|
124
|
-
...q(),
|
|
125
|
-
children: /* @__PURE__ */ h(
|
|
126
|
-
"div",
|
|
127
|
-
{
|
|
128
|
-
className: Oe(
|
|
129
|
-
"font-medium border whitespace-nowrap select-none bg-background shadow-md transition-all duration-150 ease-out animate-in fade-in-0 zoom-in-95",
|
|
130
|
-
G,
|
|
131
|
-
j,
|
|
132
|
-
U,
|
|
133
|
-
X,
|
|
134
|
-
Se(D, V),
|
|
135
|
-
e == null ? void 0 : e.className,
|
|
136
|
-
z
|
|
137
|
-
),
|
|
138
|
-
children: [
|
|
139
|
-
u,
|
|
140
|
-
w && /* @__PURE__ */ a(
|
|
141
|
-
ne,
|
|
142
|
-
{
|
|
143
|
-
ref: f,
|
|
144
|
-
context: t,
|
|
145
|
-
className: "fill-current text-border"
|
|
146
|
-
}
|
|
147
|
-
)
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
)
|
|
151
|
-
}
|
|
152
|
-
) })
|
|
153
|
-
] });
|
|
154
|
-
}
|
|
155
|
-
);
|
|
156
|
-
he.displayName = "Tooltip";
|
|
157
|
-
export {
|
|
158
|
-
he as Tooltip
|
|
159
|
-
};
|
|
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 ee } from "../../shared/variant.js";
|
|
6
|
+
import { useAsheeConfig as n } from "../../libs/context.js";
|
|
7
|
+
import { resolveCascade as r, resolveClassKey as i, resolveRadiusKey as te } from "../../utils/resolve-token.js";
|
|
8
|
+
import { useFloatingZIndex as ne } from "../../libs/use-floating-z-index.js";
|
|
9
|
+
import { FALLBACK_TOOLTIP_CONFIG as a } from "./tooltip-config.js";
|
|
10
|
+
import { TOOLTIP_FONT_CLASS as o, TOOLTIP_PADDING_X_CLASS as s, TOOLTIP_PADDING_Y_CLASS as c } from "./tooltip-styles.js";
|
|
11
|
+
import { cloneElement as l, forwardRef as u, isValidElement as re, useRef as d, useState as f } from "react";
|
|
12
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
13
|
+
import { FloatingArrow as ie, FloatingPortal as ae, arrow as oe, autoUpdate as se, flip as ce, offset as le, shift as g, useDismiss as _, useFloating as v, useFocus as y, useHover as b, useInteractions as x, useRole as S } from "@floating-ui/react";
|
|
14
|
+
//#region src/components/tooltip/Tooltip.tsx
|
|
15
|
+
var C = u(({ content: u, children: C, variant: w, color: T, size: E, placement: D, delay: O, offset: k, radius: A, showArrow: j, portal: M, zIndex: N, isDisabled: P = !1, className: F }, I) => {
|
|
16
|
+
let L = n(), R = L.components?.tooltip, z = d(null), [B, V] = f(!1), H = r(E, R?.size, void 0, a.size), U = r(D, R?.placement, void 0, a.placement), W = r(w, R?.variant, L.defaultVariant, a.variant), ue = r(T, R?.color, L.defaultColor, a.color), de = r(O, R?.delay, void 0, a.delay), fe = r(k, R?.offset, void 0, a.offset), G = r(j, R?.showArrow, void 0, a.showArrow), K = r(M, R?.portal, void 0, a.portal), pe = r(N, R?.zIndex, void 0, a.zIndex), me = te(A, R?.radius, L.defaultRadius, a.radius), he = i(H, s, a.size), ge = i(H, c, a.size), _e = i(H, o, a.size), ve = i(me, t, a.radius), q = [
|
|
17
|
+
le(fe),
|
|
18
|
+
ce({ padding: 8 }),
|
|
19
|
+
g({ padding: 8 })
|
|
20
|
+
];
|
|
21
|
+
G && q.push(oe({ element: z }));
|
|
22
|
+
let { refs: J, floatingStyles: Y, context: X } = v({
|
|
23
|
+
open: B && !P,
|
|
24
|
+
onOpenChange: V,
|
|
25
|
+
placement: U,
|
|
26
|
+
whileElementsMounted: se,
|
|
27
|
+
middleware: q
|
|
28
|
+
}), Z = b(X, {
|
|
29
|
+
delay: de,
|
|
30
|
+
enabled: !P
|
|
31
|
+
}), ye = y(X, { enabled: !P }), be = _(X), xe = S(X, { role: "tooltip" }), { getReferenceProps: Q, getFloatingProps: Se } = x([
|
|
32
|
+
Z,
|
|
33
|
+
ye,
|
|
34
|
+
be,
|
|
35
|
+
xe
|
|
36
|
+
]), Ce = ne(J.reference, B && K, pe), we = re(C) ? l(C, Q({
|
|
37
|
+
ref: J.setReference,
|
|
38
|
+
...C.props
|
|
39
|
+
})) : /* @__PURE__ */ m("span", {
|
|
40
|
+
ref: J.setReference,
|
|
41
|
+
...Q(),
|
|
42
|
+
className: "inline-flex",
|
|
43
|
+
children: C
|
|
44
|
+
});
|
|
45
|
+
if (!u || P) return /* @__PURE__ */ m(p, { children: C });
|
|
46
|
+
let $ = /* @__PURE__ */ m("div", {
|
|
47
|
+
ref: (e) => {
|
|
48
|
+
J.setFloating(e), typeof I == "function" ? I(e) : I && (I.current = e);
|
|
49
|
+
},
|
|
50
|
+
style: K ? {
|
|
51
|
+
...Y,
|
|
52
|
+
zIndex: Ce
|
|
53
|
+
} : Y,
|
|
54
|
+
className: "pointer-events-none",
|
|
55
|
+
...Se(),
|
|
56
|
+
children: /* @__PURE__ */ h("div", {
|
|
57
|
+
className: e("font-medium border whitespace-nowrap select-none bg-background shadow-md transition-all duration-150 ease-out animate-in fade-in-0 zoom-in-95", he, ge, _e, ve, ee(W, ue), R?.className, F),
|
|
58
|
+
children: [u, G && /* @__PURE__ */ m(ie, {
|
|
59
|
+
ref: z,
|
|
60
|
+
context: X,
|
|
61
|
+
className: "fill-current text-border"
|
|
62
|
+
})]
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
return /* @__PURE__ */ h(p, { children: [we, K ? /* @__PURE__ */ m(ae, { children: B && $ }) : B && $] });
|
|
66
|
+
});
|
|
67
|
+
C.displayName = "Tooltip";
|
|
68
|
+
//#endregion
|
|
69
|
+
export { C as Tooltip };
|
|
@@ -72,6 +72,31 @@ export interface TooltipConfig {
|
|
|
72
72
|
* @default false
|
|
73
73
|
*/
|
|
74
74
|
showArrow?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Whether to render the tooltip through Floating UI's `FloatingPortal`.
|
|
77
|
+
* When true, the tooltip is appended to `document.body`, which escapes
|
|
78
|
+
* clipping and stacking contexts but also always paints above app-level
|
|
79
|
+
* overlays such as sticky navbars.
|
|
80
|
+
*
|
|
81
|
+
* When false, the tooltip renders in place next to the trigger and follows
|
|
82
|
+
* the trigger's own stacking context: a tooltip on a sticky navbar appears
|
|
83
|
+
* above the page, while a tooltip on a page element stays underneath the
|
|
84
|
+
* navbar. Enable `portal` for triggers inside scrollable or clipped
|
|
85
|
+
* containers (for example a Modal panel or an overflow-hidden card).
|
|
86
|
+
*
|
|
87
|
+
* @default false
|
|
88
|
+
* @see FloatingPortal - https://floating-ui.com/docs/FloatingPortal
|
|
89
|
+
*/
|
|
90
|
+
portal?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Layer delta added to the trigger's detected stacking-context z-index to
|
|
93
|
+
* resolve the tooltip's final `z-index`. Anchored tooltips stay above their
|
|
94
|
+
* own container (for example a sticky navbar) without outranking unrelated
|
|
95
|
+
* app chrome.
|
|
96
|
+
*
|
|
97
|
+
* @default ASHEE_LAYER.tooltip
|
|
98
|
+
*/
|
|
99
|
+
zIndex?: number;
|
|
75
100
|
/**
|
|
76
101
|
* Extra classes applied to every tooltip instance.
|
|
77
102
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-config.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"tooltip-config.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGjE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GACxB,KAAK,GACL,WAAW,GACX,SAAS,GACT,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,GACV,OAAO,GACP,aAAa,GACb,WAAW,CAAC;AAEhB;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC;AAElC;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAEnD;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAQlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,aAAa,CAYlD,CAAC;AAEX,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,OAAO,EAAE,aAAa,CAAC;KACxB;CACF"}
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { registerComponentDefaults as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
import { ASHEE_LAYER as t } from "../../utils/stacking.js";
|
|
4
|
+
//#region src/components/tooltip/tooltip-config.ts
|
|
5
|
+
var n = {
|
|
6
|
+
size: "md",
|
|
7
|
+
placement: "top",
|
|
8
|
+
delay: 200,
|
|
9
|
+
offset: 8,
|
|
10
|
+
showArrow: !1,
|
|
11
|
+
portal: !1,
|
|
12
|
+
zIndex: t.tooltip
|
|
13
|
+
}, r = {
|
|
14
|
+
size: "md",
|
|
15
|
+
placement: "top",
|
|
16
|
+
variant: "solid",
|
|
17
|
+
color: "secondary",
|
|
18
|
+
delay: 200,
|
|
19
|
+
offset: 8,
|
|
20
|
+
radius: "md",
|
|
21
|
+
showArrow: !1,
|
|
22
|
+
portal: !1,
|
|
23
|
+
zIndex: t.tooltip,
|
|
24
|
+
className: ""
|
|
24
25
|
};
|
|
26
|
+
e("tooltip", n);
|
|
27
|
+
//#endregion
|
|
28
|
+
export { r as FALLBACK_TOOLTIP_CONFIG, n as defaultTooltipConfig };
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
x as TOOLTIP_FONT_CLASS,
|
|
17
|
-
t as TOOLTIP_PADDING_X_CLASS,
|
|
18
|
-
s as TOOLTIP_PADDING_Y_CLASS
|
|
2
|
+
//#region src/components/tooltip/tooltip-styles.ts
|
|
3
|
+
var e = {
|
|
4
|
+
sm: "px-2",
|
|
5
|
+
md: "px-3",
|
|
6
|
+
lg: "px-4"
|
|
7
|
+
}, t = {
|
|
8
|
+
sm: "py-1",
|
|
9
|
+
md: "py-1.5",
|
|
10
|
+
lg: "py-2"
|
|
11
|
+
}, n = {
|
|
12
|
+
sm: "text-xs",
|
|
13
|
+
md: "text-sm",
|
|
14
|
+
lg: "text-base"
|
|
19
15
|
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { n as TOOLTIP_FONT_CLASS, e as TOOLTIP_PADDING_X_CLASS, t as TOOLTIP_PADDING_Y_CLASS };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { TypographyLeading, TypographySize, TypographyTracking, TypographyWeight } from '../../shared';
|
|
3
|
+
import { TypographyConfig } from './typography-config';
|
|
4
|
+
/**
|
|
5
|
+
* Typography props. Combines the component configuration with the shared
|
|
6
|
+
* typography options and standard element attributes.
|
|
7
|
+
*
|
|
8
|
+
* The ARIA `role` attribute is intentionally not part of the inherited
|
|
9
|
+
* attributes: `role` here is the typography role, and letting both exist would
|
|
10
|
+
* make the prop ambiguous. Consumers who need an explicit ARIA role can wrap the
|
|
11
|
+
* component or render a semantic element through `as`.
|
|
12
|
+
*/
|
|
13
|
+
export interface TypographyProps extends TypographyConfig, Omit<HTMLAttributes<HTMLElement>, "color" | "role"> {
|
|
14
|
+
/**
|
|
15
|
+
* Element to render.
|
|
16
|
+
* Defaults to the semantic element implied by the resolved role.
|
|
17
|
+
*/
|
|
18
|
+
as?: ElementType;
|
|
19
|
+
/**
|
|
20
|
+
* Size token override. Replaces the size part of the role's treatment.
|
|
21
|
+
*/
|
|
22
|
+
size?: TypographySize;
|
|
23
|
+
/**
|
|
24
|
+
* Font-weight token override.
|
|
25
|
+
*/
|
|
26
|
+
weight?: TypographyWeight;
|
|
27
|
+
/**
|
|
28
|
+
* Line-height token override.
|
|
29
|
+
*/
|
|
30
|
+
leading?: TypographyLeading;
|
|
31
|
+
/**
|
|
32
|
+
* Letter-spacing token override.
|
|
33
|
+
*/
|
|
34
|
+
tracking?: TypographyTracking;
|
|
35
|
+
/**
|
|
36
|
+
* Content to render.
|
|
37
|
+
*/
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Semantic text rendering.
|
|
42
|
+
*
|
|
43
|
+
* Resolution order follows the standard AsheeUI cascade: instance prop, then
|
|
44
|
+
* `components.typography` configuration, then the framework fallback. A role
|
|
45
|
+
* supplies size, weight, leading and tracking together; any explicit token prop
|
|
46
|
+
* replaces just that part of the treatment.
|
|
47
|
+
*
|
|
48
|
+
* @param props - Typography options and element attributes.
|
|
49
|
+
* @returns The rendered semantic element.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* <Typography role="heading-lg">Dashboard</Typography>
|
|
54
|
+
* <Typography role="body-md" tone="muted" as="h2">A muted paragraph rendered as a heading</Typography>
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @see TYPOGRAPHY_ROLE_TOKEN - The documented role table.
|
|
58
|
+
*/
|
|
59
|
+
export declare const Typography: import('react').ForwardRefExoticComponent<TypographyProps & import('react').RefAttributes<HTMLElement>>;
|
|
60
|
+
//# sourceMappingURL=Typography.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../src/components/typography/Typography.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAKL,KAAK,iBAAiB,EAEtB,KAAK,cAAc,EAEnB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACtB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,qBAAqB,CAAC;AAG7B;;;;;;;;GAQG;AACH,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACrD;;;OAGG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU,yGAuFtB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { TYPOGRAPHY_ALIGN_CLASS as t, TYPOGRAPHY_ROLE_DEFAULT_ELEMENT as n, TYPOGRAPHY_TONE_CLASS as r } from "../../shared/typography.js";
|
|
5
|
+
import { useAsheeConfig as i } from "../../libs/context.js";
|
|
6
|
+
import { resolveCascade as a } from "../../utils/resolve-token.js";
|
|
7
|
+
import { FALLBACK_TYPOGRAPHY_CONFIG as o } from "./typography-config.js";
|
|
8
|
+
import { resolveTypographyRoleClass as s } from "./typography-styles.js";
|
|
9
|
+
import { forwardRef as c } from "react";
|
|
10
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
11
|
+
//#region src/components/typography/Typography.tsx
|
|
12
|
+
var u = c(({ as: c, role: u, tone: d, align: f, truncate: p, size: m, weight: h, leading: g, tracking: _, className: v, children: y, ...b }, x) => {
|
|
13
|
+
let S = i().components?.typography, C = a(u, S?.role, void 0, o.role), w = a(d, S?.tone, void 0, o.tone), T = a(f, S?.align, void 0, void 0), E = a(p, S?.truncate, void 0, o.truncate), D = S?.roles?.[C], O = {
|
|
14
|
+
size: m ?? D?.size,
|
|
15
|
+
weight: h ?? D?.weight,
|
|
16
|
+
leading: g ?? D?.leading,
|
|
17
|
+
tracking: _ ?? D?.tracking
|
|
18
|
+
}, k = O.size !== void 0 || O.weight !== void 0 || O.leading !== void 0 || O.tracking !== void 0 ? s(C, O) : s(C), A = e(k, T ? t[T] : void 0, E && "truncate", r[w], S?.className, v), j = c ?? n[C];
|
|
19
|
+
return /* @__PURE__ */ l(j, {
|
|
20
|
+
ref: x,
|
|
21
|
+
className: A,
|
|
22
|
+
...b,
|
|
23
|
+
children: y
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
u.displayName = "Typography";
|
|
27
|
+
//#endregion
|
|
28
|
+
export { u as Typography };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/typography/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { TypographyAlign, TypographyRole, TypographyRoleTokens, TypographyTone } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration options for the Typography component.
|
|
4
|
+
*
|
|
5
|
+
* Set under `components.typography` in the AsheeUI configuration.
|
|
6
|
+
*/
|
|
7
|
+
export interface TypographyConfig {
|
|
8
|
+
/**
|
|
9
|
+
* Default semantic role.
|
|
10
|
+
* @default "body-md"
|
|
11
|
+
*/
|
|
12
|
+
role?: TypographyRole;
|
|
13
|
+
/**
|
|
14
|
+
* Default colour treatment.
|
|
15
|
+
* @default "default"
|
|
16
|
+
*/
|
|
17
|
+
tone?: TypographyTone;
|
|
18
|
+
/**
|
|
19
|
+
* Default text alignment. Unset means the alignment is inherited.
|
|
20
|
+
*/
|
|
21
|
+
align?: TypographyAlign;
|
|
22
|
+
/**
|
|
23
|
+
* Whether text is truncated to a single line by default.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
truncate?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Per-application role overrides.
|
|
29
|
+
*
|
|
30
|
+
* Each entry retunes the size/style tokens a role resolves to, so a role can
|
|
31
|
+
* keep its semantic meaning while the underlying typography changes. Values
|
|
32
|
+
* still come from the static class maps, so no class is built dynamically.
|
|
33
|
+
*/
|
|
34
|
+
roles?: Partial<Record<TypographyRole, Partial<TypographyRoleTokens>>>;
|
|
35
|
+
/**
|
|
36
|
+
* Extra classes applied to every instance, before the instance `className`.
|
|
37
|
+
*/
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Default configuration registered for the Typography component.
|
|
42
|
+
* Intentionally empty: roles and tones have framework fallbacks.
|
|
43
|
+
*/
|
|
44
|
+
export declare const defaultTypographyConfig: TypographyConfig;
|
|
45
|
+
declare module "../../libs/registry" {
|
|
46
|
+
interface ComponentTypeConfigRegistry {
|
|
47
|
+
typography: TypographyConfig;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Hard fallback values used when no cascade tier provides a value.
|
|
52
|
+
*/
|
|
53
|
+
export declare const FALLBACK_TYPOGRAPHY_CONFIG: Required<Pick<TypographyConfig, "role" | "tone" | "truncate">>;
|
|
54
|
+
//# sourceMappingURL=typography-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography-config.d.ts","sourceRoot":"","sources":["../../../src/components/typography/typography-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,cAAc,EACf,MAAM,cAAc,CAAC;AAEtB;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB;;;OAGG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB;;OAEG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAEvE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAAqB,CAAC;AAE5D,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,UAAU,EAAE,gBAAgB,CAAC;KAC9B;CACF;AAID;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAC/C,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC,CAKrD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/typography/typography-config.ts
|
|
4
|
+
var t = {};
|
|
5
|
+
e("typography", t);
|
|
6
|
+
var n = {
|
|
7
|
+
role: "body-md",
|
|
8
|
+
tone: "default",
|
|
9
|
+
truncate: !1
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as FALLBACK_TYPOGRAPHY_CONFIG, t as defaultTypographyConfig };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TypographyRole, TypographyRoleTokens } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* Compose a role's class string from its size/style tokens.
|
|
4
|
+
*
|
|
5
|
+
* @param tokens - Complete size/style tokens.
|
|
6
|
+
* @returns A space-separated class string of static utilities.
|
|
7
|
+
*/
|
|
8
|
+
export declare function composeTypographyRoleClass(tokens: TypographyRoleTokens): string;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve the class string for a semantic role.
|
|
11
|
+
*
|
|
12
|
+
* With no overrides the role's literal class string is returned directly. When
|
|
13
|
+
* a role has been retuned, the tokens are resolved (overrides on top of the
|
|
14
|
+
* role table) and composed from the static maps.
|
|
15
|
+
*
|
|
16
|
+
* @param role - Semantic role.
|
|
17
|
+
* @param overrides - Partial token overrides for the role.
|
|
18
|
+
* @returns A space-separated class string of static utilities.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveTypographyRoleClass(role: TypographyRole, overrides?: Partial<TypographyRoleTokens>): string;
|
|
21
|
+
//# sourceMappingURL=typography-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography-styles.d.ts","sourceRoot":"","sources":["../../../src/components/typography/typography-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAOL,KAAK,cAAc,EACnB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAGtB;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAO/E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,cAAc,EACpB,SAAS,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACxC,MAAM,CAcR"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../utils/cn.js";
|
|
3
|
+
import { TYPOGRAPHY_LEADING_CLASS as t, TYPOGRAPHY_ROLE_CLASS as n, TYPOGRAPHY_ROLE_TOKEN as r, TYPOGRAPHY_SIZE_CLASS as i, TYPOGRAPHY_TRACKING_CLASS as a, TYPOGRAPHY_WEIGHT_CLASS as o } from "../../shared/typography.js";
|
|
4
|
+
//#region src/components/typography/typography-styles.ts
|
|
5
|
+
function s(n) {
|
|
6
|
+
return e(i[n.size], o[n.weight], t[n.leading], a[n.tracking]);
|
|
7
|
+
}
|
|
8
|
+
function c(e, t) {
|
|
9
|
+
if (!t) return n[e];
|
|
10
|
+
let i = r[e];
|
|
11
|
+
return s({
|
|
12
|
+
size: t.size ?? i.size,
|
|
13
|
+
weight: t.weight ?? i.weight,
|
|
14
|
+
leading: t.leading ?? i.leading,
|
|
15
|
+
tracking: t.tracking ?? i.tracking
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { s as composeTypographyRoleClass, c as resolveTypographyRoleClass };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-config.d.ts","sourceRoot":"","sources":["../../src/config/default-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"default-config.d.ts","sourceRoot":"","sources":["../../src/config/default-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MA0C3B,CAAC"}
|
|
@@ -1,36 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { defaultColorConfig as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
defaultRadius: "md",
|
|
13
|
-
/**
|
|
14
|
-
* Default theme setting following system preference.
|
|
15
|
-
* @default "system"
|
|
16
|
-
*/
|
|
17
|
-
defaultTheme: "system",
|
|
18
|
-
/**
|
|
19
|
-
* Default variant for components.
|
|
20
|
-
* @default "solid"
|
|
21
|
-
*/
|
|
22
|
-
defaultVariant: "solid",
|
|
23
|
-
/**
|
|
24
|
-
* Default color for components.
|
|
25
|
-
* @default "primary"
|
|
26
|
-
*/
|
|
27
|
-
defaultColor: "primary",
|
|
28
|
-
/**
|
|
29
|
-
* Component-specific overrides.
|
|
30
|
-
* @default {}
|
|
31
|
-
*/
|
|
32
|
-
components: {}
|
|
33
|
-
};
|
|
34
|
-
export {
|
|
35
|
-
t as defaultConfig
|
|
2
|
+
import { defaultColorConfig as e } from "../theme/color.js";
|
|
3
|
+
//#region src/config/default-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
color: e,
|
|
6
|
+
defaultRadius: "xs",
|
|
7
|
+
defaultTheme: "system",
|
|
8
|
+
defaultVariant: "faded",
|
|
9
|
+
defaultColor: "primary",
|
|
10
|
+
components: {}
|
|
36
11
|
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as defaultConfig };
|
package/dist/config/index.js
CHANGED