asheeui 0.5.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/LICENSE +21 -0
- package/dist/AsheeUIProvider.d.ts +6 -0
- package/dist/AsheeUIProvider.d.ts.map +1 -0
- package/dist/AsheeUIProvider.js +24 -0
- package/dist/components/accordion/Accordion.d.ts +110 -0
- package/dist/components/accordion/Accordion.d.ts.map +1 -0
- package/dist/components/accordion/Accordion.js +174 -0
- package/dist/components/accordion/accordion-config.d.ts +88 -0
- package/dist/components/accordion/accordion-config.d.ts.map +1 -0
- package/dist/components/accordion/accordion-config.js +17 -0
- package/dist/components/accordion/accordion-styles.d.ts +6 -0
- package/dist/components/accordion/accordion-styles.d.ts.map +1 -0
- package/dist/components/accordion/accordion-styles.js +26 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/index.js +3 -0
- package/dist/components/autocomplete/Autocomplete.d.ts +96 -0
- package/dist/components/autocomplete/Autocomplete.d.ts.map +1 -0
- package/dist/components/autocomplete/Autocomplete.js +143 -0
- package/dist/components/autocomplete/autocomplete-config.d.ts +87 -0
- package/dist/components/autocomplete/autocomplete-config.d.ts.map +1 -0
- package/dist/components/autocomplete/autocomplete-config.js +24 -0
- package/dist/components/autocomplete/index.d.ts +3 -0
- package/dist/components/autocomplete/index.d.ts.map +1 -0
- package/dist/components/autocomplete/index.js +2 -0
- package/dist/components/button/Button.d.ts +105 -0
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/button/Button.js +105 -0
- package/dist/components/button/button-config.d.ts +63 -0
- package/dist/components/button/button-config.d.ts.map +1 -0
- package/dist/components/button/button-config.js +20 -0
- package/dist/components/button/button-styles.d.ts +4 -0
- package/dist/components/button/button-styles.d.ts.map +1 -0
- package/dist/components/button/button-styles.js +14 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +3 -0
- package/dist/components/card/Card.d.ts +141 -0
- package/dist/components/card/Card.d.ts.map +1 -0
- package/dist/components/card/Card.js +212 -0
- package/dist/components/card/card-config.d.ts +96 -0
- package/dist/components/card/card-config.d.ts.map +1 -0
- package/dist/components/card/card-config.js +26 -0
- package/dist/components/card/card-styles.d.ts +7 -0
- package/dist/components/card/card-styles.d.ts.map +1 -0
- package/dist/components/card/card-styles.js +25 -0
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/card/index.js +3 -0
- package/dist/components/carousel/Carousel.d.ts +31 -0
- package/dist/components/carousel/Carousel.d.ts.map +1 -0
- package/dist/components/carousel/Carousel.js +250 -0
- package/dist/components/carousel/carousel-config.d.ts +40 -0
- package/dist/components/carousel/carousel-config.d.ts.map +1 -0
- package/dist/components/carousel/carousel-config.js +27 -0
- package/dist/components/carousel/carousel-styles.d.ts +6 -0
- package/dist/components/carousel/carousel-styles.d.ts.map +1 -0
- package/dist/components/carousel/carousel-styles.js +18 -0
- package/dist/components/carousel/index.d.ts +3 -0
- package/dist/components/carousel/index.d.ts.map +1 -0
- package/dist/components/carousel/index.js +3 -0
- package/dist/components/chip/Chip.d.ts +93 -0
- package/dist/components/chip/Chip.d.ts.map +1 -0
- package/dist/components/chip/Chip.js +193 -0
- package/dist/components/chip/chip-config.d.ts +64 -0
- package/dist/components/chip/chip-config.d.ts.map +1 -0
- package/dist/components/chip/chip-config.js +17 -0
- package/dist/components/chip/chip-styles.d.ts +7 -0
- package/dist/components/chip/chip-styles.d.ts.map +1 -0
- package/dist/components/chip/chip-styles.js +29 -0
- package/dist/components/chip/index.d.ts +3 -0
- package/dist/components/chip/index.d.ts.map +1 -0
- package/dist/components/chip/index.js +3 -0
- package/dist/components/date-picker/DatePicker.d.ts +30 -0
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -0
- package/dist/components/date-picker/DatePicker.js +470 -0
- package/dist/components/date-picker/date-picker-config.d.ts +14 -0
- package/dist/components/date-picker/date-picker-config.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker-config.js +23 -0
- package/dist/components/date-picker/date-picker-styles.d.ts +12 -0
- package/dist/components/date-picker/date-picker-styles.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker-styles.js +58 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/date-picker/index.d.ts.map +1 -0
- package/dist/components/date-picker/index.js +3 -0
- package/dist/components/drawer/Drawer.d.ts +16 -0
- package/dist/components/drawer/Drawer.d.ts.map +1 -0
- package/dist/components/drawer/Drawer.js +132 -0
- package/dist/components/drawer/drawer-config.d.ts +18 -0
- package/dist/components/drawer/drawer-config.d.ts.map +1 -0
- package/dist/components/drawer/drawer-config.js +20 -0
- package/dist/components/drawer/drawer-styles.d.ts +10 -0
- package/dist/components/drawer/drawer-styles.d.ts.map +1 -0
- package/dist/components/drawer/drawer-styles.js +46 -0
- package/dist/components/drawer/index.d.ts +3 -0
- package/dist/components/drawer/index.d.ts.map +1 -0
- package/dist/components/drawer/index.js +3 -0
- package/dist/components/field/FieldShell.d.ts +17 -0
- package/dist/components/field/FieldShell.d.ts.map +1 -0
- package/dist/components/field/FieldShell.js +59 -0
- package/dist/components/field/field-config.d.ts +23 -0
- package/dist/components/field/field-config.d.ts.map +1 -0
- package/dist/components/field/field-config.js +20 -0
- package/dist/components/field/field-styles.d.ts +8 -0
- package/dist/components/field/field-styles.d.ts.map +1 -0
- package/dist/components/field/index.d.ts +3 -0
- package/dist/components/field/index.d.ts.map +1 -0
- package/dist/components/field/index.js +2 -0
- package/dist/components/image/Image.d.ts +88 -0
- package/dist/components/image/Image.d.ts.map +1 -0
- package/dist/components/image/Image.js +134 -0
- package/dist/components/image/image-config.d.ts +67 -0
- package/dist/components/image/image-config.d.ts.map +1 -0
- package/dist/components/image/image-config.js +20 -0
- package/dist/components/image/image-styles.d.ts +4 -0
- package/dist/components/image/image-styles.d.ts.map +1 -0
- package/dist/components/image/image-styles.js +17 -0
- package/dist/components/image/index.d.ts +3 -0
- package/dist/components/image/index.d.ts.map +1 -0
- package/dist/components/image/index.js +3 -0
- package/dist/components/input/Input.d.ts +22 -0
- package/dist/components/input/Input.d.ts.map +1 -0
- package/dist/components/input/Input.js +146 -0
- package/dist/components/input/PasswordInput.d.ts +9 -0
- package/dist/components/input/PasswordInput.d.ts.map +1 -0
- package/dist/components/input/PasswordInput.js +51 -0
- package/dist/components/input/index.d.ts +4 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.js +4 -0
- package/dist/components/input/input-config.d.ts +10 -0
- package/dist/components/input/input-config.d.ts.map +1 -0
- package/dist/components/input/input-config.js +11 -0
- package/dist/components/input/input-styles.d.ts +4 -0
- package/dist/components/input/input-styles.d.ts.map +1 -0
- package/dist/components/input/input-styles.js +15 -0
- package/dist/components/keyboard/OnScreenKeyboard.d.ts +14 -0
- package/dist/components/keyboard/OnScreenKeyboard.d.ts.map +1 -0
- package/dist/components/keyboard/OnScreenKeyboard.js +159 -0
- package/dist/components/keyboard/default-keyboard-config.d.ts +10 -0
- package/dist/components/keyboard/default-keyboard-config.d.ts.map +1 -0
- package/dist/components/keyboard/default-keyboard-config.js +46 -0
- package/dist/components/keyboard/index.d.ts +5 -0
- package/dist/components/keyboard/index.d.ts.map +1 -0
- package/dist/components/keyboard/index.js +4 -0
- package/dist/components/keyboard/keyboard-config.d.ts +18 -0
- package/dist/components/keyboard/keyboard-config.d.ts.map +1 -0
- package/dist/components/keyboard/keyboard-context.d.ts +31 -0
- package/dist/components/keyboard/keyboard-context.d.ts.map +1 -0
- package/dist/components/keyboard/keyboard-context.js +89 -0
- package/dist/components/keyboard/use-keyboard-field.d.ts +8 -0
- package/dist/components/keyboard/use-keyboard-field.d.ts.map +1 -0
- package/dist/components/keyboard/use-keyboard-field.js +23 -0
- package/dist/components/link/Link.d.ts +21 -0
- package/dist/components/link/Link.d.ts.map +1 -0
- package/dist/components/link/Link.js +139 -0
- package/dist/components/link/index.d.ts +3 -0
- package/dist/components/link/index.d.ts.map +1 -0
- package/dist/components/link/index.js +3 -0
- package/dist/components/link/link-config.d.ts +27 -0
- package/dist/components/link/link-config.d.ts.map +1 -0
- package/dist/components/link/link-config.js +18 -0
- package/dist/components/link/link-styles.d.ts +8 -0
- package/dist/components/link/link-styles.d.ts.map +1 -0
- package/dist/components/link/link-styles.js +33 -0
- package/dist/components/marquee/Marquee.d.ts +14 -0
- package/dist/components/marquee/Marquee.d.ts.map +1 -0
- package/dist/components/marquee/Marquee.js +145 -0
- package/dist/components/marquee/index.d.ts +3 -0
- package/dist/components/marquee/index.d.ts.map +1 -0
- package/dist/components/marquee/index.js +3 -0
- package/dist/components/marquee/marquee-config.d.ts +26 -0
- package/dist/components/marquee/marquee-config.d.ts.map +1 -0
- package/dist/components/marquee/marquee-config.js +22 -0
- package/dist/components/marquee/marquee-styles.d.ts +5 -0
- package/dist/components/marquee/marquee-styles.d.ts.map +1 -0
- package/dist/components/marquee/marquee-styles.js +17 -0
- package/dist/components/modal/Modal.d.ts +38 -0
- package/dist/components/modal/Modal.d.ts.map +1 -0
- package/dist/components/modal/Modal.js +152 -0
- package/dist/components/modal/index.d.ts +3 -0
- package/dist/components/modal/index.d.ts.map +1 -0
- package/dist/components/modal/index.js +3 -0
- package/dist/components/modal/modal-config.d.ts +19 -0
- package/dist/components/modal/modal-config.d.ts.map +1 -0
- package/dist/components/modal/modal-config.js +21 -0
- package/dist/components/modal/modal-styles.d.ts +5 -0
- package/dist/components/modal/modal-styles.d.ts.map +1 -0
- package/dist/components/modal/modal-styles.js +23 -0
- package/dist/components/multi-select/MultiSelect.d.ts +45 -0
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -0
- package/dist/components/multi-select/MultiSelect.js +302 -0
- package/dist/components/multi-select/index.d.ts +3 -0
- package/dist/components/multi-select/index.d.ts.map +1 -0
- package/dist/components/multi-select/index.js +3 -0
- package/dist/components/multi-select/multi-select-config.d.ts +31 -0
- package/dist/components/multi-select/multi-select-config.d.ts.map +1 -0
- package/dist/components/multi-select/multi-select-config.js +31 -0
- package/dist/components/multi-select/multi-select-styles.d.ts +6 -0
- package/dist/components/multi-select/multi-select-styles.d.ts.map +1 -0
- package/dist/components/multi-select/multi-select-styles.js +25 -0
- package/dist/components/radio/Radio.d.ts +20 -0
- package/dist/components/radio/Radio.d.ts.map +1 -0
- package/dist/components/radio/Radio.js +156 -0
- package/dist/components/radio/RadioGroup.d.ts +25 -0
- package/dist/components/radio/RadioGroup.d.ts.map +1 -0
- package/dist/components/radio/RadioGroup.js +81 -0
- package/dist/components/radio/index.d.ts +5 -0
- package/dist/components/radio/index.d.ts.map +1 -0
- package/dist/components/radio/index.js +5 -0
- package/dist/components/radio/radio-config.d.ts +27 -0
- package/dist/components/radio/radio-config.d.ts.map +1 -0
- package/dist/components/radio/radio-config.js +19 -0
- package/dist/components/radio/radio-context.d.ts +16 -0
- package/dist/components/radio/radio-context.d.ts.map +1 -0
- package/dist/components/radio/radio-context.js +7 -0
- package/dist/components/radio/radio-styles.d.ts +13 -0
- package/dist/components/radio/radio-styles.d.ts.map +1 -0
- package/dist/components/radio/radio-styles.js +67 -0
- package/dist/components/resizable-screen/ResizableScreen.d.ts +56 -0
- package/dist/components/resizable-screen/ResizableScreen.d.ts.map +1 -0
- package/dist/components/resizable-screen/ResizableScreen.js +165 -0
- package/dist/components/resizable-screen/index.d.ts +3 -0
- package/dist/components/resizable-screen/index.d.ts.map +1 -0
- package/dist/components/resizable-screen/index.js +2 -0
- package/dist/components/resizable-screen/resizable-screen-config.d.ts +17 -0
- package/dist/components/resizable-screen/resizable-screen-config.d.ts.map +1 -0
- package/dist/components/resizable-screen/resizable-screen-config.js +21 -0
- package/dist/components/scrollbar/index.d.ts +2 -0
- package/dist/components/scrollbar/index.d.ts.map +1 -0
- package/dist/components/scrollbar/scrollbar-config.d.ts +35 -0
- package/dist/components/scrollbar/scrollbar-config.d.ts.map +1 -0
- package/dist/components/select/Select.d.ts +40 -0
- package/dist/components/select/Select.d.ts.map +1 -0
- package/dist/components/select/Select.js +216 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/index.js +3 -0
- package/dist/components/select/select-config.d.ts +27 -0
- package/dist/components/select/select-config.d.ts.map +1 -0
- package/dist/components/select/select-config.js +25 -0
- package/dist/components/select/select-styles.d.ts +4 -0
- package/dist/components/select/select-styles.d.ts.map +1 -0
- package/dist/components/select/select-styles.js +15 -0
- package/dist/components/select-menu/SelectMenu.d.ts +40 -0
- package/dist/components/select-menu/SelectMenu.d.ts.map +1 -0
- package/dist/components/select-menu/SelectMenu.js +114 -0
- package/dist/components/select-menu/index.d.ts +1 -0
- package/dist/components/select-menu/index.d.ts.map +1 -0
- package/dist/components/select-menu/index.js +1 -0
- package/dist/components/sidebar/Sidebar.d.ts +75 -0
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -0
- package/dist/components/sidebar/Sidebar.js +355 -0
- package/dist/components/sidebar/index.d.ts +3 -0
- package/dist/components/sidebar/index.d.ts.map +1 -0
- package/dist/components/sidebar/index.js +3 -0
- package/dist/components/sidebar/sidebar-config.d.ts +68 -0
- package/dist/components/sidebar/sidebar-config.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-config.js +38 -0
- package/dist/components/sidebar/sidebar-styles.d.ts +8 -0
- package/dist/components/sidebar/sidebar-styles.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-styles.js +35 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/spinner/index.js +3 -0
- package/dist/components/spinner/spinner-config.d.ts +49 -0
- package/dist/components/spinner/spinner-config.d.ts.map +1 -0
- package/dist/components/spinner/spinner-config.js +16 -0
- package/dist/components/spinner/spinner-styles.d.ts +5 -0
- package/dist/components/spinner/spinner-styles.d.ts.map +1 -0
- package/dist/components/spinner/spinner-styles.js +18 -0
- package/dist/components/spinner/spinner.d.ts +51 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/spinner/spinner.js +83 -0
- package/dist/components/switch/Switch.d.ts +21 -0
- package/dist/components/switch/Switch.d.ts.map +1 -0
- package/dist/components/switch/Switch.js +161 -0
- package/dist/components/switch/index.d.ts +3 -0
- package/dist/components/switch/index.d.ts.map +1 -0
- package/dist/components/switch/index.js +3 -0
- package/dist/components/switch/switch-config.d.ts +17 -0
- package/dist/components/switch/switch-config.d.ts.map +1 -0
- package/dist/components/switch/switch-config.js +20 -0
- package/dist/components/switch/switch-styles.d.ts +6 -0
- package/dist/components/switch/switch-styles.d.ts.map +1 -0
- package/dist/components/switch/switch-styles.js +25 -0
- package/dist/components/table/Table.d.ts +43 -0
- package/dist/components/table/Table.d.ts.map +1 -0
- package/dist/components/table/Table.js +188 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/table/index.js +3 -0
- package/dist/components/table/table-config.d.ts +32 -0
- package/dist/components/table/table-config.d.ts.map +1 -0
- package/dist/components/table/table-config.js +20 -0
- package/dist/components/table/table-styles.d.ts +12 -0
- package/dist/components/table/table-styles.d.ts.map +1 -0
- package/dist/components/table/table-styles.js +61 -0
- package/dist/components/tabs/Tabs.d.ts +64 -0
- package/dist/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.js +209 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/index.js +3 -0
- package/dist/components/tabs/tabs-config.d.ts +38 -0
- package/dist/components/tabs/tabs-config.d.ts.map +1 -0
- package/dist/components/tabs/tabs-config.js +20 -0
- package/dist/components/tabs/tabs-styles.d.ts +5 -0
- package/dist/components/tabs/tabs-styles.d.ts.map +1 -0
- package/dist/components/tabs/tabs-styles.js +19 -0
- package/dist/components/textarea/Textarea.d.ts +21 -0
- package/dist/components/textarea/Textarea.d.ts.map +1 -0
- package/dist/components/textarea/Textarea.js +131 -0
- package/dist/components/textarea/index.d.ts +3 -0
- package/dist/components/textarea/index.d.ts.map +1 -0
- package/dist/components/textarea/index.js +3 -0
- package/dist/components/textarea/textarea-config.d.ts +12 -0
- package/dist/components/textarea/textarea-config.d.ts.map +1 -0
- package/dist/components/textarea/textarea-config.js +23 -0
- package/dist/components/textarea/textarea-styles.d.ts +4 -0
- package/dist/components/textarea/textarea-styles.d.ts.map +1 -0
- package/dist/components/textarea/textarea-styles.js +15 -0
- package/dist/components/toast/ToastItem.d.ts +17 -0
- package/dist/components/toast/ToastItem.d.ts.map +1 -0
- package/dist/components/toast/ToastItem.js +148 -0
- package/dist/components/toast/index.d.ts +4 -0
- package/dist/components/toast/index.d.ts.map +1 -0
- package/dist/components/toast/index.js +5 -0
- package/dist/components/toast/toast-config.d.ts +42 -0
- package/dist/components/toast/toast-config.d.ts.map +1 -0
- package/dist/components/toast/toast-config.js +24 -0
- package/dist/components/toast/toast-context.d.ts +31 -0
- package/dist/components/toast/toast-context.d.ts.map +1 -0
- package/dist/components/toast/toast-context.js +157 -0
- package/dist/components/toast/toast-styles.d.ts +10 -0
- package/dist/components/toast/toast-styles.d.ts.map +1 -0
- package/dist/components/toast/toast-styles.js +50 -0
- package/dist/components/toast/use-pausable-timeout.d.ts +5 -0
- package/dist/components/toast/use-pausable-timeout.d.ts.map +1 -0
- package/dist/components/toast/use-pausable-timeout.js +15 -0
- package/dist/components/tooltip/Tooltip.d.ts +23 -0
- package/dist/components/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/Tooltip.js +159 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/index.js +3 -0
- package/dist/components/tooltip/tooltip-config.d.ts +27 -0
- package/dist/components/tooltip/tooltip-config.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip-config.js +24 -0
- package/dist/components/tooltip/tooltip-styles.d.ts +5 -0
- package/dist/components/tooltip/tooltip-styles.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip-styles.js +19 -0
- package/dist/config/config.d.ts +21 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/default-config.d.ts +3 -0
- package/dist/config/default-config.d.ts.map +1 -0
- package/dist/config/default-config.js +13 -0
- package/dist/config/define-config.d.ts +3 -0
- package/dist/config/define-config.d.ts.map +1 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +3 -0
- package/dist/config/resolve-color.d.ts +3 -0
- package/dist/config/resolve-color.d.ts.map +1 -0
- package/dist/config/resolve-color.js +25 -0
- package/dist/config/resolve-config.d.ts +3 -0
- package/dist/config/resolve-config.d.ts.map +1 -0
- package/dist/config/resolve-config.js +15 -0
- package/dist/icons/ArrowLeftIcon.d.ts +3 -0
- package/dist/icons/ArrowLeftIcon.d.ts.map +1 -0
- package/dist/icons/ArrowLeftIcon.js +21 -0
- package/dist/icons/CalendarIcon.d.ts +3 -0
- package/dist/icons/CalendarIcon.d.ts.map +1 -0
- package/dist/icons/CalendarIcon.js +26 -0
- package/dist/icons/CheckIcon.d.ts +3 -0
- package/dist/icons/CheckIcon.d.ts.map +1 -0
- package/dist/icons/CheckIcon.js +21 -0
- package/dist/icons/ChevronDownIcon.d.ts +3 -0
- package/dist/icons/ChevronDownIcon.d.ts.map +1 -0
- package/dist/icons/ChevronDownIcon.js +24 -0
- package/dist/icons/ChevronLeftIcon.d.ts +3 -0
- package/dist/icons/ChevronLeftIcon.d.ts.map +1 -0
- package/dist/icons/ChevronLeftIcon.js +21 -0
- package/dist/icons/ChevronRightIcon.d.ts +3 -0
- package/dist/icons/ChevronRightIcon.d.ts.map +1 -0
- package/dist/icons/ChevronRightIcon.js +21 -0
- package/dist/icons/ClearIcon.d.ts +3 -0
- package/dist/icons/ClearIcon.d.ts.map +1 -0
- package/dist/icons/ClearIcon.js +24 -0
- package/dist/icons/ClockIcon.d.ts +3 -0
- package/dist/icons/ClockIcon.d.ts.map +1 -0
- package/dist/icons/ClockIcon.js +24 -0
- package/dist/icons/CloseIcon.d.ts +3 -0
- package/dist/icons/CloseIcon.d.ts.map +1 -0
- package/dist/icons/CloseIcon.js +24 -0
- package/dist/icons/ErrorIcon.d.ts +3 -0
- package/dist/icons/ErrorIcon.d.ts.map +1 -0
- package/dist/icons/ErrorIcon.js +21 -0
- package/dist/icons/ExternalLinkIcon.d.ts +3 -0
- package/dist/icons/ExternalLinkIcon.d.ts.map +1 -0
- package/dist/icons/ExternalLinkIcon.js +25 -0
- package/dist/icons/EyeIcon.d.ts +3 -0
- package/dist/icons/EyeIcon.d.ts.map +1 -0
- package/dist/icons/EyeIcon.js +24 -0
- package/dist/icons/EyeOffIcon.d.ts +3 -0
- package/dist/icons/EyeOffIcon.d.ts.map +1 -0
- package/dist/icons/EyeOffIcon.js +24 -0
- package/dist/icons/InfoIcon.d.ts +3 -0
- package/dist/icons/InfoIcon.d.ts.map +1 -0
- package/dist/icons/InfoIcon.js +21 -0
- package/dist/icons/SearchIcon.d.ts +3 -0
- package/dist/icons/SearchIcon.d.ts.map +1 -0
- package/dist/icons/SearchIcon.js +24 -0
- package/dist/icons/WarningIcon.d.ts +3 -0
- package/dist/icons/WarningIcon.d.ts.map +1 -0
- package/dist/icons/WarningIcon.js +21 -0
- package/dist/icons/index.d.ts +11 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/types.d.ts +5 -0
- package/dist/icons/types.d.ts.map +1 -0
- package/dist/index.css +482 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +157 -0
- package/dist/libs/context.d.ts +4 -0
- package/dist/libs/context.d.ts.map +1 -0
- package/dist/libs/context.js +15 -0
- package/dist/libs/index.js +3 -0
- package/dist/libs/registry.d.ts +14 -0
- package/dist/libs/registry.d.ts.map +1 -0
- package/dist/libs/registry.js +15 -0
- package/dist/libs/use-isomorphic-layout-effect.d.ts +3 -0
- package/dist/libs/use-isomorphic-layout-effect.d.ts.map +1 -0
- package/dist/libs/use-isomorphic-layout-effect.js +6 -0
- package/dist/scripts/AsheeThemeScript.js +77 -0
- package/dist/shared/radius.d.ts +5 -0
- package/dist/shared/radius.d.ts.map +1 -0
- package/dist/shared/radius.js +14 -0
- package/dist/shared/size.d.ts +2 -0
- package/dist/shared/size.d.ts.map +1 -0
- package/dist/shared/variant.d.ts +4 -0
- package/dist/shared/variant.d.ts.map +1 -0
- package/dist/shared/variant.js +56 -0
- package/dist/theme/color.d.ts +34 -0
- package/dist/theme/color.d.ts.map +1 -0
- package/dist/theme/color.js +30 -0
- package/dist/theme/controller.d.ts +50 -0
- package/dist/theme/controller.d.ts.map +1 -0
- package/dist/theme/controller.js +97 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/useTheme.d.ts +9 -0
- package/dist/theme/useTheme.d.ts.map +1 -0
- package/dist/theme/useTheme.js +24 -0
- package/dist/utils/resolve-token.d.ts +5 -0
- package/dist/utils/resolve-token.d.ts.map +1 -0
- package/dist/utils/resolve-token.js +19 -0
- package/package.json +68 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component config type registry.
|
|
3
|
+
*
|
|
4
|
+
* Each component config module augments ComponentTypeConfigRegistry with its
|
|
5
|
+
* own keyed entry (see src/components/*-config.ts) and registers its
|
|
6
|
+
* defaults via registerComponentDefaults from src/libs/registry.
|
|
7
|
+
*/
|
|
8
|
+
export interface ComponentTypeConfigRegistry {
|
|
9
|
+
}
|
|
10
|
+
export type ComponentConfigRegistry = ComponentTypeConfigRegistry;
|
|
11
|
+
export declare function registerComponentDefaults<K extends keyof ComponentConfigRegistry>(name: K, config: ComponentConfigRegistry[K]): void;
|
|
12
|
+
export declare function getComponentDefaults<K extends keyof ComponentConfigRegistry>(name: K): ComponentConfigRegistry[K] | undefined;
|
|
13
|
+
export declare function getAllComponentDefaults(): Partial<ComponentConfigRegistry>;
|
|
14
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/libs/registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,MAAM,WAAW,2BAA2B;CAAG;AAE/C,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAIlE,wBAAgB,yBAAyB,CACvC,CAAC,SAAS,MAAM,uBAAuB,EACvC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,QAE5C;AAED,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,uBAAuB,EAC1E,IAAI,EAAE,CAAC,GACN,uBAAuB,CAAC,CAAC,CAAC,GAAG,SAAS,CAIxC;AAED,wBAAgB,uBAAuB,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAM1E"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const n = /* @__PURE__ */ new Map();
|
|
3
|
+
function s(e, t) {
|
|
4
|
+
n.set(e, t);
|
|
5
|
+
}
|
|
6
|
+
function r() {
|
|
7
|
+
const e = {};
|
|
8
|
+
for (const [t, o] of n.entries())
|
|
9
|
+
e[t] = o;
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
r as getAllComponentDefaults,
|
|
14
|
+
s as registerComponentDefaults
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-isomorphic-layout-effect.d.ts","sourceRoot":"","sources":["../../src/libs/use-isomorphic-layout-effect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,eAAe,EAAE,MAAM,OAAO,CAAC;AAEnD,eAAO,MAAM,yBAAyB,wBACuB,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import c from "virtual:ashee-config";
|
|
4
|
+
import { resolveConfig as m } from "../config/resolve-config.js";
|
|
5
|
+
import { THEME_STORAGE_KEY as d } from "../theme/controller.js";
|
|
6
|
+
const h = {
|
|
7
|
+
background: "--ashee-background",
|
|
8
|
+
foreground: "--ashee-foreground",
|
|
9
|
+
primary: "--ashee-primary",
|
|
10
|
+
secondary: "--ashee-secondary",
|
|
11
|
+
border: "--ashee-border",
|
|
12
|
+
danger: "--ashee-danger",
|
|
13
|
+
warning: "--ashee-warning",
|
|
14
|
+
success: "--ashee-success",
|
|
15
|
+
scrollbarThumb: "--ashee-scrollbar-thumb",
|
|
16
|
+
scrollbarTrack: "--ashee-scrollbar-track"
|
|
17
|
+
}, a = "ashee-theme-vars";
|
|
18
|
+
function y(e) {
|
|
19
|
+
return Object.entries(e).map(([t, s]) => {
|
|
20
|
+
const r = Object.entries(s).map(([o, l]) => ` ${h[o]}: ${l};`).join(`
|
|
21
|
+
`);
|
|
22
|
+
return `${t === "light" ? ":root, .theme-light" : `.theme-${t}`} {
|
|
23
|
+
${r}
|
|
24
|
+
}`;
|
|
25
|
+
}).join(`
|
|
26
|
+
|
|
27
|
+
`);
|
|
28
|
+
}
|
|
29
|
+
function v() {
|
|
30
|
+
const e = m(c ?? {}), t = Object.keys(e.color ?? {}), s = e.defaultTheme ?? "system", r = d, n = y(e.color), o = `
|
|
31
|
+
(function() {
|
|
32
|
+
var el = document.documentElement;
|
|
33
|
+
var storageKey = ${JSON.stringify(r)};
|
|
34
|
+
var defaultTheme = ${JSON.stringify(s)};
|
|
35
|
+
var themes = ${JSON.stringify(t)};
|
|
36
|
+
var systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
37
|
+
|
|
38
|
+
var stored = null;
|
|
39
|
+
try {
|
|
40
|
+
stored = window.localStorage.getItem(storageKey);
|
|
41
|
+
} catch (e) {}
|
|
42
|
+
|
|
43
|
+
var selection = stored || defaultTheme;
|
|
44
|
+
var resolved = selection === 'system' ? (systemDark ? 'dark' : 'light') : selection;
|
|
45
|
+
|
|
46
|
+
var prefix = 'theme-';
|
|
47
|
+
for (var i = el.classList.length - 1; i >= 0; i--) {
|
|
48
|
+
if (el.classList[i].startsWith(prefix)) {
|
|
49
|
+
el.classList.remove(el.classList[i]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
el.classList.add(prefix + resolved);
|
|
53
|
+
el.style.colorScheme = resolved;
|
|
54
|
+
|
|
55
|
+
// Synchronously inject style tag before first paint
|
|
56
|
+
var styleEl = document.getElementById(${JSON.stringify(a)});
|
|
57
|
+
if (!styleEl) {
|
|
58
|
+
styleEl = document.createElement('style');
|
|
59
|
+
styleEl.id = ${JSON.stringify(a)};
|
|
60
|
+
styleEl.textContent = ${JSON.stringify(n)};
|
|
61
|
+
document.head.appendChild(styleEl);
|
|
62
|
+
}
|
|
63
|
+
})();
|
|
64
|
+
`;
|
|
65
|
+
return /* @__PURE__ */ i(
|
|
66
|
+
"script",
|
|
67
|
+
{
|
|
68
|
+
id: "ashee-theme-script",
|
|
69
|
+
dangerouslySetInnerHTML: { __html: o },
|
|
70
|
+
suppressHydrationWarning: !0
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
v as AsheeThemeScript,
|
|
76
|
+
a as THEME_VARS_STYLE_ID
|
|
77
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Variant } from './variant';
|
|
2
|
+
export type Radius = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
3
|
+
export declare const RADIUS_CLASS: Record<Radius, string>;
|
|
4
|
+
export declare const UnderlineRadius: (variant: Variant, radius: Radius) => Radius;
|
|
5
|
+
//# sourceMappingURL=radius.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radius.d.ts","sourceRoot":"","sources":["../../src/shared/radius.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAExE,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQ/C,CAAC;AAEF,eAAO,MAAM,eAAe,YAAa,OAAO,UAAU,MAAM,KAAG,MAKlE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const e = {
|
|
3
|
+
none: "rounded-none",
|
|
4
|
+
xs: "rounded-xs",
|
|
5
|
+
sm: "rounded-sm",
|
|
6
|
+
md: "rounded-md",
|
|
7
|
+
lg: "rounded-lg",
|
|
8
|
+
xl: "rounded-xl",
|
|
9
|
+
full: "rounded-full"
|
|
10
|
+
}, r = (n, d) => n === "underlined" ? "none" : d;
|
|
11
|
+
export {
|
|
12
|
+
e as RADIUS_CLASS,
|
|
13
|
+
r as UnderlineRadius
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../src/shared/size.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type Variant = "solid" | "ghost" | "bordered" | "faded" | "underlined";
|
|
2
|
+
export type Color = "none" | "default" | "primary" | "secondary" | "danger" | "warning" | "success";
|
|
3
|
+
export declare function resolveVariantClass(variant: Variant, color: Color): string;
|
|
4
|
+
//# sourceMappingURL=variant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../src/shared/variant.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;AAC9E,MAAM,MAAM,KAAK,GACb,MAAM,GACN,SAAS,GACT,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AA+Dd,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAE1E"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as r } from "@asheeui/utils";
|
|
3
|
+
const s = {
|
|
4
|
+
none: "bg-background text-foreground",
|
|
5
|
+
default: "bg-secondary text-foreground",
|
|
6
|
+
primary: "bg-primary text-secondary",
|
|
7
|
+
secondary: "bg-secondary text-foreground",
|
|
8
|
+
danger: "bg-danger text-secondary",
|
|
9
|
+
warning: "bg-warning text-secondary",
|
|
10
|
+
success: "bg-success text-secondary"
|
|
11
|
+
}, e = {
|
|
12
|
+
none: "bg-transparent text-foreground hover:bg-foreground/10",
|
|
13
|
+
default: "bg-transparent text-foreground hover:bg-foreground/10",
|
|
14
|
+
primary: "bg-transparent text-primary hover:bg-primary/10",
|
|
15
|
+
secondary: "bg-transparent text-foreground hover:bg-secondary/10",
|
|
16
|
+
danger: "bg-transparent text-danger hover:bg-danger/10",
|
|
17
|
+
warning: "bg-transparent text-warning hover:bg-warning/10",
|
|
18
|
+
success: "bg-transparent text-success hover:bg-success/10"
|
|
19
|
+
}, b = {
|
|
20
|
+
none: r(e.primary, "border-2 border-background"),
|
|
21
|
+
default: r(e.primary, "border-2 border-secondary"),
|
|
22
|
+
primary: r(e.primary, "border-2 border-primary"),
|
|
23
|
+
secondary: r(e.secondary, "border-2 border-border"),
|
|
24
|
+
danger: r(e.danger, "border-2 border-danger"),
|
|
25
|
+
warning: r(e.warning, "border-2 border-warning"),
|
|
26
|
+
success: r(e.success, "border-2 border-success")
|
|
27
|
+
}, g = {
|
|
28
|
+
none: "bg-secondary/40 text-foreground border-2 border-transparent",
|
|
29
|
+
default: "bg-secondary/40 text-foreground border-2 border-border",
|
|
30
|
+
primary: "bg-primary/10 text-primary border-2 border-primary/20",
|
|
31
|
+
secondary: "bg-secondary/15 text-foreground border-2 border-secondary/30",
|
|
32
|
+
danger: "bg-danger/10 text-danger border-2 border-danger/20",
|
|
33
|
+
warning: "bg-warning/10 text-warning border-2 border-warning/20",
|
|
34
|
+
success: "bg-success/10 text-success border-2 border-success/20"
|
|
35
|
+
}, n = "border-b-2 border-t-0 border-x-0 rounded-none bg-transparent shadow-none", c = {
|
|
36
|
+
none: r(n, "border-background text-foreground"),
|
|
37
|
+
default: r(n, "border-border text-foreground"),
|
|
38
|
+
primary: r(n, "border-primary text-primary"),
|
|
39
|
+
secondary: r(n, "border-secondary text-secondary"),
|
|
40
|
+
danger: r(n, "border-danger text-danger"),
|
|
41
|
+
warning: r(n, "border-warning text-warning"),
|
|
42
|
+
success: r(n, "border-success text-success")
|
|
43
|
+
}, d = {
|
|
44
|
+
solid: s,
|
|
45
|
+
ghost: e,
|
|
46
|
+
bordered: b,
|
|
47
|
+
faded: g,
|
|
48
|
+
underlined: c
|
|
49
|
+
};
|
|
50
|
+
function i(a, t) {
|
|
51
|
+
var o;
|
|
52
|
+
return ((o = d[a]) == null ? void 0 : o[t]) ?? d.bordered.default;
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
i as resolveVariantClass
|
|
56
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type KnownThemeName = "light" | "dark";
|
|
2
|
+
export interface AsheeColorRegistry {
|
|
3
|
+
light: true;
|
|
4
|
+
dark: true;
|
|
5
|
+
}
|
|
6
|
+
export type ThemeName = keyof AsheeColorRegistry;
|
|
7
|
+
export interface ColorVariant {
|
|
8
|
+
background: string;
|
|
9
|
+
foreground: string;
|
|
10
|
+
primary: string;
|
|
11
|
+
secondary: string;
|
|
12
|
+
border: string;
|
|
13
|
+
danger: string;
|
|
14
|
+
warning: string;
|
|
15
|
+
success: string;
|
|
16
|
+
scrollbarThumb: string;
|
|
17
|
+
scrollbarTrack: string;
|
|
18
|
+
}
|
|
19
|
+
/** Built-in colors map required by the core library */
|
|
20
|
+
export type DefaultColorConfig = Record<KnownThemeName, ColorVariant>;
|
|
21
|
+
/**
|
|
22
|
+
* Full color configuration.
|
|
23
|
+
* Built-in themes are strictly required. Custom augmented themes are optional
|
|
24
|
+
* on default/unmerged configs, but enforced via ExternalColorConfig.
|
|
25
|
+
*/
|
|
26
|
+
export type ColorConfig = Record<KnownThemeName, ColorVariant> & Partial<Record<Exclude<ThemeName, KnownThemeName>, ColorVariant>>;
|
|
27
|
+
export type ExternalColorVariant = Partial<ColorVariant> & {
|
|
28
|
+
extends?: KnownThemeName;
|
|
29
|
+
};
|
|
30
|
+
type CustomThemeName = Exclude<ThemeName, KnownThemeName>;
|
|
31
|
+
export type ExternalColorConfig = Partial<Record<KnownThemeName, Partial<ColorVariant>>> & Record<CustomThemeName, ExternalColorVariant>;
|
|
32
|
+
export declare const defaultColorConfig: DefaultColorConfig;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/theme/color.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,IAAI,CAAC;IACZ,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,GAC5D,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;AAEpE,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG;IACzD,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,KAAK,eAAe,GAAG,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AAC1D,MAAM,MAAM,mBAAmB,GAAG,OAAO,CACvC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,CAC9C,GACC,MAAM,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAC;AAEhD,eAAO,MAAM,kBAAkB,EAAE,kBAyBhC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const r = {
|
|
3
|
+
light: {
|
|
4
|
+
background: "#ffffff",
|
|
5
|
+
foreground: "#000000",
|
|
6
|
+
primary: "#2563eb",
|
|
7
|
+
secondary: "#ffffff",
|
|
8
|
+
border: "#d5d5d5",
|
|
9
|
+
danger: "#dc2626",
|
|
10
|
+
warning: "#d97706",
|
|
11
|
+
success: "#16a34a",
|
|
12
|
+
scrollbarThumb: "#3b82f6",
|
|
13
|
+
scrollbarTrack: "transparent"
|
|
14
|
+
},
|
|
15
|
+
dark: {
|
|
16
|
+
background: "#111111",
|
|
17
|
+
foreground: "#ffffff",
|
|
18
|
+
primary: "#005bc4",
|
|
19
|
+
secondary: "#1a1a1a",
|
|
20
|
+
border: "#2a2a2a",
|
|
21
|
+
danger: "#ef4444",
|
|
22
|
+
warning: "#f59e0b",
|
|
23
|
+
success: "#22c55e",
|
|
24
|
+
scrollbarThumb: "#1e40af",
|
|
25
|
+
scrollbarTrack: "#1f293700"
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
r as defaultColorConfig
|
|
30
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ThemeName } from './color';
|
|
2
|
+
export type ThemeSelection = ThemeName | "system";
|
|
3
|
+
export declare const THEME_STORAGE_KEY = "ashee-theme";
|
|
4
|
+
type Listener = () => void;
|
|
5
|
+
export interface ThemeConfigInput {
|
|
6
|
+
defaultTheme: ThemeSelection;
|
|
7
|
+
themes: readonly string[];
|
|
8
|
+
}
|
|
9
|
+
declare class ThemeController {
|
|
10
|
+
private selection;
|
|
11
|
+
private resolved;
|
|
12
|
+
private defaultTheme;
|
|
13
|
+
private availableThemes;
|
|
14
|
+
private listeners;
|
|
15
|
+
private mediaQuery;
|
|
16
|
+
constructor();
|
|
17
|
+
/**
|
|
18
|
+
* Seeds the controller with the resolved theme config and applies the theme.
|
|
19
|
+
*
|
|
20
|
+
* - Uses `localStorage["ashee-theme"]` when it holds a valid selection.
|
|
21
|
+
* - Falls back to `config.theme.defaultTheme` on first visit.
|
|
22
|
+
* - Clears stale/invalid values from storage.
|
|
23
|
+
* - Never writes to storage (only `setTheme` persists user intent).
|
|
24
|
+
*/
|
|
25
|
+
configure({ defaultTheme, themes }: ThemeConfigInput): void;
|
|
26
|
+
/**
|
|
27
|
+
* Seeds the default theme. Kept for backward compatibility - prefer
|
|
28
|
+
* `configure()`, which also validates the stored selection against the
|
|
29
|
+
* available theme map.
|
|
30
|
+
*/
|
|
31
|
+
setDefault: (theme: ThemeSelection) => void;
|
|
32
|
+
getSelection: () => ThemeSelection;
|
|
33
|
+
getResolvedTheme: () => ThemeName;
|
|
34
|
+
setTheme: (selection: ThemeSelection) => void;
|
|
35
|
+
subscribe: (listener: Listener) => (() => void);
|
|
36
|
+
getAvailableThemes: () => readonly string[];
|
|
37
|
+
/**
|
|
38
|
+
* Cycles to the next theme in sequence (including "system" mode by default).
|
|
39
|
+
* Loops back to the start when reaching the end of the available themes list.
|
|
40
|
+
*/
|
|
41
|
+
toggleTheme: () => void;
|
|
42
|
+
private handleSystemChange;
|
|
43
|
+
private sanitize;
|
|
44
|
+
private isValid;
|
|
45
|
+
private resolve;
|
|
46
|
+
private applySelection;
|
|
47
|
+
}
|
|
48
|
+
export declare const themeController: ThemeController;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/theme/controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,CAAC;AAElD,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAI/C,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAE3B,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,cAAc,CAAC;IAC7B,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AAED,cAAM,eAAe;IACnB,OAAO,CAAC,SAAS,CAA2B;IAC5C,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,eAAe,CAAyB;IAChD,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,UAAU,CAA+B;;IASjD;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,gBAAgB,GAAG,IAAI;IAwC3D;;;;OAIG;IACH,UAAU,UAAW,cAAc,KAAG,IAAI,CAExC;IAEF,YAAY,QAAO,cAAc,CAAmB;IACpD,gBAAgB,QAAO,SAAS,CAAkB;IAElD,QAAQ,cAAe,cAAc,KAAG,IAAI,CAS1C;IAEF,SAAS,aAAc,QAAQ,KAAG,CAAC,MAAM,IAAI,CAAC,CAG5C;IAEF,kBAAkB,QAAO,SAAS,MAAM,EAAE,CAAyB;IAEnE;;;OAGG;IACH,WAAW,QAAO,IAAI,CAWpB;IAEF,OAAO,CAAC,kBAAkB,CAMxB;IAEF,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,cAAc;CA+BvB;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var r = Object.defineProperty;
|
|
3
|
+
var c = (n, e, t) => e in n ? r(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
4
|
+
var s = (n, e, t) => c(n, typeof e != "symbol" ? e + "" : e, t);
|
|
5
|
+
const a = "ashee-theme", d = "(prefers-color-scheme: dark)", h = "theme-";
|
|
6
|
+
class m {
|
|
7
|
+
constructor() {
|
|
8
|
+
s(this, "selection", "light");
|
|
9
|
+
s(this, "resolved", "light");
|
|
10
|
+
s(this, "defaultTheme", "light");
|
|
11
|
+
s(this, "availableThemes", []);
|
|
12
|
+
s(this, "listeners", /* @__PURE__ */ new Set());
|
|
13
|
+
s(this, "mediaQuery", null);
|
|
14
|
+
/**
|
|
15
|
+
* Seeds the default theme. Kept for backward compatibility - prefer
|
|
16
|
+
* `configure()`, which also validates the stored selection against the
|
|
17
|
+
* available theme map.
|
|
18
|
+
*/
|
|
19
|
+
s(this, "setDefault", (e) => {
|
|
20
|
+
this.configure({ defaultTheme: e, themes: this.availableThemes });
|
|
21
|
+
});
|
|
22
|
+
s(this, "getSelection", () => this.selection);
|
|
23
|
+
s(this, "getResolvedTheme", () => this.resolved);
|
|
24
|
+
s(this, "setTheme", (e) => {
|
|
25
|
+
const t = this.sanitize(e);
|
|
26
|
+
this.selection = t, typeof window < "u" && window.localStorage.setItem(a, t), this.applySelection(), this.listeners.forEach((i) => {
|
|
27
|
+
i();
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
s(this, "subscribe", (e) => (this.listeners.add(e), () => this.listeners.delete(e)));
|
|
31
|
+
s(this, "getAvailableThemes", () => this.availableThemes);
|
|
32
|
+
/**
|
|
33
|
+
* Cycles to the next theme in sequence (including "system" mode by default).
|
|
34
|
+
* Loops back to the start when reaching the end of the available themes list.
|
|
35
|
+
*/
|
|
36
|
+
s(this, "toggleTheme", () => {
|
|
37
|
+
const e = Array.from(new Set(this.availableThemes)).filter(
|
|
38
|
+
(l) => l !== "system"
|
|
39
|
+
), t = e.indexOf(this.selection), i = t === -1 ? 0 : (t + 1) % e.length;
|
|
40
|
+
this.setTheme(e[i]);
|
|
41
|
+
});
|
|
42
|
+
s(this, "handleSystemChange", () => {
|
|
43
|
+
this.selection === "system" && (this.applySelection(), this.listeners.forEach((e) => {
|
|
44
|
+
e();
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
typeof window > "u" || (this.mediaQuery = window.matchMedia(d), this.mediaQuery.addEventListener("change", this.handleSystemChange));
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Seeds the controller with the resolved theme config and applies the theme.
|
|
51
|
+
*
|
|
52
|
+
* - Uses `localStorage["ashee-theme"]` when it holds a valid selection.
|
|
53
|
+
* - Falls back to `config.theme.defaultTheme` on first visit.
|
|
54
|
+
* - Clears stale/invalid values from storage.
|
|
55
|
+
* - Never writes to storage (only `setTheme` persists user intent).
|
|
56
|
+
*/
|
|
57
|
+
configure({ defaultTheme: e, themes: t }) {
|
|
58
|
+
if (console.log("[Theme] configure called with:", { defaultTheme: e, themes: t }), this.defaultTheme = e, this.availableThemes = t, typeof window > "u") {
|
|
59
|
+
console.log(
|
|
60
|
+
"[Theme] Running in non-browser environment, skipping localStorage operations."
|
|
61
|
+
);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const i = window.localStorage.getItem(a);
|
|
65
|
+
console.log("[Theme] Retrieved from localStorage:", i);
|
|
66
|
+
const l = i !== null && this.isValid(i);
|
|
67
|
+
console.log("[Theme] Is stored theme valid?", l), l || i !== null && (console.log(
|
|
68
|
+
"[Theme] Invalid stored theme, removing from localStorage."
|
|
69
|
+
), window.localStorage.removeItem(a)), this.selection = l ? i : e, console.log("[Theme] Final selection:", this.selection), this.applySelection(), console.log("[Theme] Applied selection."), this.listeners.forEach((o) => {
|
|
70
|
+
o();
|
|
71
|
+
}), console.log("[Theme] Notified all listeners.");
|
|
72
|
+
}
|
|
73
|
+
sanitize(e) {
|
|
74
|
+
return this.isValid(e) ? e : this.defaultTheme;
|
|
75
|
+
}
|
|
76
|
+
isValid(e) {
|
|
77
|
+
return e === "system" ? !0 : this.availableThemes.length > 0 ? this.availableThemes.includes(e) : !0;
|
|
78
|
+
}
|
|
79
|
+
resolve(e) {
|
|
80
|
+
var t;
|
|
81
|
+
return e !== "system" ? e : (t = this.mediaQuery) != null && t.matches ? "dark" : "light";
|
|
82
|
+
}
|
|
83
|
+
applySelection() {
|
|
84
|
+
const e = this.sanitize(this.selection);
|
|
85
|
+
let t = this.resolve(e);
|
|
86
|
+
if (this.availableThemes.length > 0 && !this.availableThemes.includes(t) && (t = this.availableThemes.includes(this.defaultTheme) ? this.defaultTheme : this.availableThemes[0]), this.resolved = t, typeof document > "u") return;
|
|
87
|
+
const i = document.documentElement, l = `${h}${t}`;
|
|
88
|
+
for (const o of Array.from(i.classList))
|
|
89
|
+
o.startsWith(h) && i.classList.remove(o);
|
|
90
|
+
i.classList.add(l);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const f = new m();
|
|
94
|
+
export {
|
|
95
|
+
a as THEME_STORAGE_KEY,
|
|
96
|
+
f as themeController
|
|
97
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ThemeSelection } from './controller';
|
|
2
|
+
export declare function useTheme(): {
|
|
3
|
+
theme: ThemeSelection;
|
|
4
|
+
resolvedTheme: keyof import('./color').AsheeColorRegistry;
|
|
5
|
+
setTheme: (selection: ThemeSelection) => void;
|
|
6
|
+
toggleTheme: () => void;
|
|
7
|
+
availableThemes: readonly string[];
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/theme/useTheme.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAmB,MAAM,cAAc,CAAC;AAEpE,wBAAgB,QAAQ;;;;;;EAoBvB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useSyncExternalStore as t } from "react";
|
|
3
|
+
import { themeController as e } from "./controller.js";
|
|
4
|
+
function r() {
|
|
5
|
+
const o = t(
|
|
6
|
+
e.subscribe,
|
|
7
|
+
e.getSelection,
|
|
8
|
+
() => "light"
|
|
9
|
+
), l = t(
|
|
10
|
+
e.subscribe,
|
|
11
|
+
e.getResolvedTheme,
|
|
12
|
+
() => "light"
|
|
13
|
+
);
|
|
14
|
+
return {
|
|
15
|
+
theme: o,
|
|
16
|
+
resolvedTheme: l,
|
|
17
|
+
setTheme: e.setTheme,
|
|
18
|
+
toggleTheme: e.toggleTheme,
|
|
19
|
+
availableThemes: e.getAvailableThemes()
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
r as useTheme
|
|
24
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function resolveCascade<T>(instance: T | undefined, section: T | undefined, globalDefault: T | undefined, hardFallback: T): T;
|
|
2
|
+
export declare function resolveAnimate<T>(instance: T | undefined, section: T | undefined, hardFallback: T): T;
|
|
3
|
+
export declare function resolveRadiusKey<TKey>(instanceProp: TKey | undefined, sectionConfig: TKey | undefined, globalDefaultRadius: TKey | undefined, hardFallback?: TKey): TKey;
|
|
4
|
+
export declare function resolveClassKey<TKey extends PropertyKey>(key: TKey, classMap: Record<TKey, string>, fallbackKey: TKey): string;
|
|
5
|
+
//# sourceMappingURL=resolve-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-token.d.ts","sourceRoot":"","sources":["../../src/utils/resolve-token.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,CAAC,EAC9B,QAAQ,EAAE,CAAC,GAAG,SAAS,EACvB,OAAO,EAAE,CAAC,GAAG,SAAS,EACtB,aAAa,EAAE,CAAC,GAAG,SAAS,EAC5B,YAAY,EAAE,CAAC,GACd,CAAC,CAEH;AAED,wBAAgB,cAAc,CAAC,CAAC,EAC9B,QAAQ,EAAE,CAAC,GAAG,SAAS,EACvB,OAAO,EAAE,CAAC,GAAG,SAAS,EACtB,YAAY,EAAE,CAAC,GACd,CAAC,CAEH;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EACnC,YAAY,EAAE,IAAI,GAAG,SAAS,EAC9B,aAAa,EAAE,IAAI,GAAG,SAAS,EAC/B,mBAAmB,EAAE,IAAI,GAAG,SAAS,EACrC,YAAY,GAAE,IAAmB,GAChC,IAAI,CAEN;AAED,wBAAgB,eAAe,CAAC,IAAI,SAAS,WAAW,EACtD,GAAG,EAAE,IAAI,EACT,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,EAC9B,WAAW,EAAE,IAAI,GAChB,MAAM,CAER"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function u(n, e, r, t) {
|
|
3
|
+
return n ?? e ?? r ?? t;
|
|
4
|
+
}
|
|
5
|
+
function o(n, e, r) {
|
|
6
|
+
return n ?? e ?? r;
|
|
7
|
+
}
|
|
8
|
+
function i(n, e, r, t = "md") {
|
|
9
|
+
return n ?? e ?? r ?? t;
|
|
10
|
+
}
|
|
11
|
+
function s(n, e, r) {
|
|
12
|
+
return e[n] ?? e[r] ?? "";
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
o as resolveAnimate,
|
|
16
|
+
u as resolveCascade,
|
|
17
|
+
s as resolveClassKey,
|
|
18
|
+
i as resolveRadiusKey
|
|
19
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "asheeui",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"style": "./src/index.css",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./styles": {
|
|
15
|
+
"style": "./dist/index.css",
|
|
16
|
+
"default": "./dist/index.css"
|
|
17
|
+
},
|
|
18
|
+
"./config": {
|
|
19
|
+
"types": "./dist/config/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./libs": {
|
|
24
|
+
"types": "./dist/libs/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js",
|
|
26
|
+
"default": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./styles.css": "./dist/index.css"
|
|
29
|
+
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"style": "./dist/index.css"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"sideEffects": [
|
|
37
|
+
"*.css"
|
|
38
|
+
],
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@floating-ui/react": "^0.27.20",
|
|
41
|
+
"@asheeui/utils": "0.3.0"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
45
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
46
|
+
"tailwindcss": ">=4.0.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@floating-ui/react": "^0.27.20",
|
|
50
|
+
"@types/node": "^26.1.2",
|
|
51
|
+
"@types/react": "^19.0.0",
|
|
52
|
+
"@types/react-dom": "^19.0.0",
|
|
53
|
+
"@vitejs/plugin-react": "^4.0.0",
|
|
54
|
+
"react": "^19.0.0",
|
|
55
|
+
"react-dom": "^19.0.0",
|
|
56
|
+
"ts-node": "^10.9.2",
|
|
57
|
+
"tsx": "^4.23.12",
|
|
58
|
+
"typescript": "^5.0.0",
|
|
59
|
+
"vite": "^6.0.0",
|
|
60
|
+
"vite-plugin-dts": "^4.0.0"
|
|
61
|
+
},
|
|
62
|
+
"module": "./dist/index.js",
|
|
63
|
+
"license": "MIT",
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build:registry": "tsx src/scripts/build-registry.ts",
|
|
66
|
+
"build": "vite build"
|
|
67
|
+
}
|
|
68
|
+
}
|