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,216 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as f, jsxs as z } from "react/jsx-runtime";
|
|
3
|
+
import { cn as F } from "@asheeui/utils";
|
|
4
|
+
import { useFloating as Le, autoUpdate as Ee, offset as Ie, flip as we, shift as _e, useClick as ze, useDismiss as Fe, useRole as Me, useInteractions as ke } from "@floating-ui/react";
|
|
5
|
+
import { forwardRef as Ke, useId as Ne, useState as M, useMemo as y, useCallback as Oe } from "react";
|
|
6
|
+
import { ChevronDownIcon as Te } from "../../icons/ChevronDownIcon.js";
|
|
7
|
+
import { useAsheeConfig as De } from "../../libs/context.js";
|
|
8
|
+
import { RADIUS_CLASS as je } from "../../shared/radius.js";
|
|
9
|
+
import { resolveVariantClass as Ue } from "../../shared/variant.js";
|
|
10
|
+
import { resolveCascade as r, resolveRadiusKey as k, resolveClassKey as ge } from "../../utils/resolve-token.js";
|
|
11
|
+
import { FieldShell as Be } from "../field/FieldShell.js";
|
|
12
|
+
import { SelectMenu as Pe } from "../select-menu/SelectMenu.js";
|
|
13
|
+
import { FALLBACK_SELECT_CONFIG as t } from "./select-config.js";
|
|
14
|
+
import { SELECT_SIZE_CLASS as Qe, SELECT_STATUS_BORDER_CLASS as Ge } from "./select-styles.js";
|
|
15
|
+
const Ze = Ke(
|
|
16
|
+
({
|
|
17
|
+
options: p = [],
|
|
18
|
+
value: o,
|
|
19
|
+
onChange: v,
|
|
20
|
+
onValueChange: a,
|
|
21
|
+
size: K,
|
|
22
|
+
radius: N,
|
|
23
|
+
variant: O,
|
|
24
|
+
color: T,
|
|
25
|
+
status: D,
|
|
26
|
+
label: j,
|
|
27
|
+
labelAlign: U,
|
|
28
|
+
description: g,
|
|
29
|
+
message: B,
|
|
30
|
+
required: P,
|
|
31
|
+
isLoading: Q,
|
|
32
|
+
disabled: S,
|
|
33
|
+
isSearch: G = !1,
|
|
34
|
+
searchPlaceholder: Z = "Search options...",
|
|
35
|
+
searchInputName: $ = "select-search",
|
|
36
|
+
initialValue: n,
|
|
37
|
+
belowList: q,
|
|
38
|
+
placeholder: x = "Select...",
|
|
39
|
+
buttonColor: R,
|
|
40
|
+
className: H,
|
|
41
|
+
dropdownClassName: J,
|
|
42
|
+
id: W,
|
|
43
|
+
name: h,
|
|
44
|
+
menuVariant: X,
|
|
45
|
+
menuColor: Y,
|
|
46
|
+
menuRadius: C,
|
|
47
|
+
menuSize: V,
|
|
48
|
+
style: ee
|
|
49
|
+
}, i) => {
|
|
50
|
+
var _;
|
|
51
|
+
const d = De(), e = (_ = d.components) == null ? void 0 : _.select, se = Ne(), te = W ?? se, [c, A] = M(!1), [re, L] = M(""), { refs: E, floatingStyles: oe, context: u } = Le({
|
|
52
|
+
open: c,
|
|
53
|
+
onOpenChange: (s) => !S && A(s),
|
|
54
|
+
placement: "bottom-start",
|
|
55
|
+
whileElementsMounted: Ee,
|
|
56
|
+
middleware: [Ie(4), we(), _e({ padding: 8 })]
|
|
57
|
+
}), le = ze(u, { enabled: !S }), ae = Fe(u), ne = Me(u, { role: "listbox" }), { getReferenceProps: ie, getFloatingProps: de } = ke([
|
|
58
|
+
le,
|
|
59
|
+
ae,
|
|
60
|
+
ne
|
|
61
|
+
]), ce = r(
|
|
62
|
+
K,
|
|
63
|
+
e == null ? void 0 : e.size,
|
|
64
|
+
void 0,
|
|
65
|
+
t.size
|
|
66
|
+
), b = r(
|
|
67
|
+
O,
|
|
68
|
+
e == null ? void 0 : e.variant,
|
|
69
|
+
d.defaultVariant,
|
|
70
|
+
t.variant
|
|
71
|
+
), I = r(
|
|
72
|
+
T,
|
|
73
|
+
e == null ? void 0 : e.color,
|
|
74
|
+
d.defaultColor,
|
|
75
|
+
t.color
|
|
76
|
+
), w = k(
|
|
77
|
+
N,
|
|
78
|
+
e == null ? void 0 : e.radius,
|
|
79
|
+
d.defaultRadius,
|
|
80
|
+
t.radius
|
|
81
|
+
), m = D ?? t.status, ue = r(
|
|
82
|
+
U,
|
|
83
|
+
e == null ? void 0 : e.labelAlign,
|
|
84
|
+
void 0,
|
|
85
|
+
t.labelAlign
|
|
86
|
+
), me = r(
|
|
87
|
+
X,
|
|
88
|
+
e == null ? void 0 : e.menuVariant,
|
|
89
|
+
void 0,
|
|
90
|
+
b
|
|
91
|
+
), fe = r(
|
|
92
|
+
Y,
|
|
93
|
+
e == null ? void 0 : e.menuColor,
|
|
94
|
+
void 0,
|
|
95
|
+
I
|
|
96
|
+
), pe = k(
|
|
97
|
+
C,
|
|
98
|
+
e == null ? void 0 : e.menuRadius,
|
|
99
|
+
w,
|
|
100
|
+
t.radius
|
|
101
|
+
), ve = r(
|
|
102
|
+
V,
|
|
103
|
+
e == null ? void 0 : e.menuSize,
|
|
104
|
+
void 0,
|
|
105
|
+
t.menuSize
|
|
106
|
+
), Se = Ue(b, I), be = m !== "default" ? Ge[m] : "", ye = b === "underlined" ? "rounded-none" : ge(
|
|
107
|
+
w,
|
|
108
|
+
je,
|
|
109
|
+
t.radius
|
|
110
|
+
), l = y(
|
|
111
|
+
() => p.find((s) => s.value === o),
|
|
112
|
+
[p, o]
|
|
113
|
+
), xe = Oe(
|
|
114
|
+
(s) => {
|
|
115
|
+
if (a == null || a(s.value), v) {
|
|
116
|
+
const Ae = {
|
|
117
|
+
target: { value: s.value, name: h ?? "" }
|
|
118
|
+
};
|
|
119
|
+
v(Ae);
|
|
120
|
+
}
|
|
121
|
+
A(!1), L("");
|
|
122
|
+
},
|
|
123
|
+
[h, v, a]
|
|
124
|
+
), Re = y(() => l != null && l.label ? l.label : n !== void 0 ? String(n) : x, [l, n, x]), he = y(
|
|
125
|
+
() => o != null ? [o] : [],
|
|
126
|
+
[o]
|
|
127
|
+
);
|
|
128
|
+
return /* @__PURE__ */ f(
|
|
129
|
+
Be,
|
|
130
|
+
{
|
|
131
|
+
id: te,
|
|
132
|
+
label: j,
|
|
133
|
+
labelAlign: ue,
|
|
134
|
+
description: g,
|
|
135
|
+
message: B,
|
|
136
|
+
status: m,
|
|
137
|
+
required: P,
|
|
138
|
+
isLoading: Q,
|
|
139
|
+
children: /* @__PURE__ */ z("div", { className: "w-full relative inline-block", children: [
|
|
140
|
+
/* @__PURE__ */ z(
|
|
141
|
+
"button",
|
|
142
|
+
{
|
|
143
|
+
ref: (s) => {
|
|
144
|
+
E.setReference(s), typeof i == "function" ? i(s) : i && (i.current = s);
|
|
145
|
+
},
|
|
146
|
+
type: "button",
|
|
147
|
+
disabled: S,
|
|
148
|
+
"aria-expanded": c,
|
|
149
|
+
"aria-haspopup": "listbox",
|
|
150
|
+
"aria-invalid": m === "error",
|
|
151
|
+
className: F(
|
|
152
|
+
"w-full flex items-center justify-between font-normal text-left text-foreground transition-colors outline-none select-none cursor-pointer shrink-0",
|
|
153
|
+
"focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
154
|
+
"disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
155
|
+
Qe[ce],
|
|
156
|
+
Se,
|
|
157
|
+
be,
|
|
158
|
+
ye,
|
|
159
|
+
R && `bg-[${R}]`,
|
|
160
|
+
H
|
|
161
|
+
),
|
|
162
|
+
style: ee,
|
|
163
|
+
...ie(),
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ f(
|
|
166
|
+
"span",
|
|
167
|
+
{
|
|
168
|
+
className: l || n ? "text-foreground" : "text-foreground/70",
|
|
169
|
+
children: Re
|
|
170
|
+
}
|
|
171
|
+
),
|
|
172
|
+
/* @__PURE__ */ f(
|
|
173
|
+
Te,
|
|
174
|
+
{
|
|
175
|
+
className: F(
|
|
176
|
+
"ml-2 shrink-0 text-foreground/70 transition-transform duration-200",
|
|
177
|
+
c && "rotate-180"
|
|
178
|
+
)
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
/* @__PURE__ */ f(
|
|
185
|
+
Pe,
|
|
186
|
+
{
|
|
187
|
+
isOpen: c,
|
|
188
|
+
context: u,
|
|
189
|
+
floatingStyles: oe,
|
|
190
|
+
getFloatingProps: de,
|
|
191
|
+
setFloatingRef: E.setFloating,
|
|
192
|
+
options: p,
|
|
193
|
+
selectedValues: he,
|
|
194
|
+
onSelectOption: xe,
|
|
195
|
+
isSearch: G,
|
|
196
|
+
searchPlaceholder: Z,
|
|
197
|
+
searchInputName: $,
|
|
198
|
+
searchQuery: re,
|
|
199
|
+
onSearchChange: L,
|
|
200
|
+
belowList: q,
|
|
201
|
+
dropdownClassName: J,
|
|
202
|
+
variant: me,
|
|
203
|
+
color: fe,
|
|
204
|
+
radius: pe,
|
|
205
|
+
size: ve
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
] })
|
|
209
|
+
}
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
Ze.displayName = "Select";
|
|
214
|
+
export {
|
|
215
|
+
Ze as Select
|
|
216
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/select/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Radius } from '../../shared/radius';
|
|
2
|
+
import { Size } from '../../shared/size';
|
|
3
|
+
import { Color, Variant } from '../../shared/variant';
|
|
4
|
+
import { FieldConfig, FieldSizeKey } from '../field/field-config';
|
|
5
|
+
export type SelectSizeKey = FieldSizeKey;
|
|
6
|
+
export interface SelectOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string | number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface SelectConfig extends Omit<FieldConfig, "size"> {
|
|
13
|
+
size?: SelectSizeKey;
|
|
14
|
+
radius?: Radius;
|
|
15
|
+
menuVariant?: Variant;
|
|
16
|
+
menuColor?: Color;
|
|
17
|
+
menuRadius?: Radius;
|
|
18
|
+
menuSize?: Size;
|
|
19
|
+
}
|
|
20
|
+
export declare const defaultSelectConfig: SelectConfig;
|
|
21
|
+
export declare const FALLBACK_SELECT_CONFIG: Required<SelectConfig>;
|
|
22
|
+
declare module "../../libs/registry" {
|
|
23
|
+
interface ComponentTypeConfigRegistry {
|
|
24
|
+
select: SelectConfig;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=select-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-config.d.ts","sourceRoot":"","sources":["../../../src/components/select/select-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AAEzC,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7D,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,IAAI,CAAC;CACjB;AAED,eAAO,MAAM,mBAAmB,EAAE,YAIjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,YAAY,CAYzD,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,MAAM,EAAE,YAAY,CAAC;KACtB;CACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
import { FALLBACK_FIELD_CONFIG as t } from "../field/field-config.js";
|
|
4
|
+
const l = {
|
|
5
|
+
size: "md",
|
|
6
|
+
labelAlign: "left",
|
|
7
|
+
variant: "bordered"
|
|
8
|
+
}, o = {
|
|
9
|
+
...t,
|
|
10
|
+
size: "md",
|
|
11
|
+
radius: "md",
|
|
12
|
+
variant: "bordered",
|
|
13
|
+
color: "primary",
|
|
14
|
+
status: "default",
|
|
15
|
+
labelAlign: "left",
|
|
16
|
+
menuVariant: "solid",
|
|
17
|
+
menuColor: "default",
|
|
18
|
+
menuRadius: "md",
|
|
19
|
+
menuSize: "lg"
|
|
20
|
+
};
|
|
21
|
+
e("select", l);
|
|
22
|
+
export {
|
|
23
|
+
o as FALLBACK_SELECT_CONFIG,
|
|
24
|
+
l as defaultSelectConfig
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-styles.d.ts","sourceRoot":"","sources":["../../../src/components/select/select-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEvE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAI1D,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAQlE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const s = {
|
|
3
|
+
sm: "h-8 px-2.5 text-xs",
|
|
4
|
+
md: "h-10 px-3 text-sm",
|
|
5
|
+
lg: "h-12 px-4 text-base"
|
|
6
|
+
}, e = {
|
|
7
|
+
default: "",
|
|
8
|
+
error: "border-danger focus-visible:border-danger focus-visible:ring-danger/20",
|
|
9
|
+
warning: "border-warning focus-visible:border-warning focus-visible:ring-warning/20",
|
|
10
|
+
success: "border-success focus-visible:border-success focus-visible:ring-success/20"
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
s as SELECT_SIZE_CLASS,
|
|
14
|
+
e as SELECT_STATUS_BORDER_CLASS
|
|
15
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FloatingContext } from '@floating-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { Radius } from '../../shared/radius';
|
|
4
|
+
import { Size } from '../../shared/size';
|
|
5
|
+
import { Color, Variant } from '../../shared/variant';
|
|
6
|
+
export interface SelectOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string | number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface SelectMenuProps {
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
context: FloatingContext;
|
|
15
|
+
floatingStyles: React.CSSProperties;
|
|
16
|
+
getFloatingProps: (userProps?: Record<string, unknown>) => Record<string, unknown>;
|
|
17
|
+
setFloatingRef: (node: HTMLElement | null) => void;
|
|
18
|
+
options: SelectOption[];
|
|
19
|
+
selectedValues?: (string | number)[];
|
|
20
|
+
onSelectOption: (option: SelectOption) => void;
|
|
21
|
+
isSearch?: boolean;
|
|
22
|
+
searchPlaceholder?: string;
|
|
23
|
+
searchInputName?: string;
|
|
24
|
+
searchQuery?: string;
|
|
25
|
+
onSearchChange?: (query: string) => void;
|
|
26
|
+
belowList?: ReactNode;
|
|
27
|
+
dropdownClassName?: string;
|
|
28
|
+
variant?: Variant;
|
|
29
|
+
color?: Color;
|
|
30
|
+
size?: Size;
|
|
31
|
+
radius?: Radius;
|
|
32
|
+
renderOption?: (option: SelectOption, isSelected: boolean) => ReactNode;
|
|
33
|
+
initialFocus?: number | React.RefObject<HTMLElement>;
|
|
34
|
+
returnFocus?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare const SelectMenu: {
|
|
37
|
+
({ isOpen, context, floatingStyles, getFloatingProps, setFloatingRef, options, selectedValues, onSelectOption, isSearch, searchPlaceholder, searchInputName, searchQuery, onSearchChange, belowList, dropdownClassName, variant, color, size, radius, renderOption, initialFocus, returnFocus, }: SelectMenuProps): import("react").JSX.Element | null;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=SelectMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectMenu.d.ts","sourceRoot":"","sources":["../../../src/components/select-menu/SelectMenu.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,eAAe,EAAwB,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAoB,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAG5E,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAK3D,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,eAAe,CAAC;IACzB,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC;IACpC,gBAAgB,EAAE,CAChB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,cAAc,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAEnD,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACrC,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAE/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,KAAK,SAAS,CAAC;IACxE,YAAY,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACrD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,UAAU;sSAuBpB,eAAe;;CA2GjB,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
3
|
+
import { cn as D } from "@asheeui/utils";
|
|
4
|
+
import { FloatingFocusManager as L } from "@floating-ui/react";
|
|
5
|
+
import { useState as R, useMemo as B } from "react";
|
|
6
|
+
import { CheckIcon as K } from "../../icons/CheckIcon.js";
|
|
7
|
+
import { SearchIcon as O } from "../../icons/SearchIcon.js";
|
|
8
|
+
import { RADIUS_CLASS as U } from "../../shared/radius.js";
|
|
9
|
+
import { resolveClassKey as _ } from "../../utils/resolve-token.js";
|
|
10
|
+
import { Button as q } from "../button/Button.js";
|
|
11
|
+
import { Input as E } from "../input/Input.js";
|
|
12
|
+
const G = ({
|
|
13
|
+
isOpen: u,
|
|
14
|
+
context: f,
|
|
15
|
+
floatingStyles: p,
|
|
16
|
+
getFloatingProps: h,
|
|
17
|
+
setFloatingRef: b,
|
|
18
|
+
options: o = [],
|
|
19
|
+
selectedValues: x = [],
|
|
20
|
+
onSelectOption: g,
|
|
21
|
+
isSearch: n = !0,
|
|
22
|
+
searchPlaceholder: y = "Search...",
|
|
23
|
+
searchInputName: v = "select-menu-search",
|
|
24
|
+
searchQuery: w,
|
|
25
|
+
onSearchChange: s,
|
|
26
|
+
belowList: a,
|
|
27
|
+
dropdownClassName: N,
|
|
28
|
+
variant: C = "ghost",
|
|
29
|
+
color: S = "primary",
|
|
30
|
+
size: I = "sm",
|
|
31
|
+
radius: i,
|
|
32
|
+
renderOption: c,
|
|
33
|
+
initialFocus: k,
|
|
34
|
+
returnFocus: M
|
|
35
|
+
}) => {
|
|
36
|
+
const [Q, j] = R(""), t = w ?? Q, z = (e) => {
|
|
37
|
+
s ? s(e) : j(e);
|
|
38
|
+
}, m = B(() => !n || !t.trim() ? o : o.filter(
|
|
39
|
+
(e) => e.label.toLowerCase().includes(t.toLowerCase())
|
|
40
|
+
), [o, n, t]), F = (e) => x.includes(e), A = _(
|
|
41
|
+
i === "full" ? "xl" : i ?? "md",
|
|
42
|
+
U,
|
|
43
|
+
"md"
|
|
44
|
+
);
|
|
45
|
+
return u ? /* @__PURE__ */ r(
|
|
46
|
+
L,
|
|
47
|
+
{
|
|
48
|
+
context: f,
|
|
49
|
+
modal: !1,
|
|
50
|
+
initialFocus: k,
|
|
51
|
+
returnFocus: M,
|
|
52
|
+
children: /* @__PURE__ */ r(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
ref: b,
|
|
56
|
+
style: { ...p, zIndex: 99999 },
|
|
57
|
+
className: "w-full min-w-55 outline-none",
|
|
58
|
+
...h(),
|
|
59
|
+
children: /* @__PURE__ */ d(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: D(
|
|
63
|
+
"w-full max-h-60 overflow-y-auto shadow-xl bg-background border border-border p-1 flex flex-col gap-0.5 overflow-x-hidden",
|
|
64
|
+
"animate-in fade-in-0 zoom-in-95 slide-in-from-top-1 duration-150 ease-out",
|
|
65
|
+
A,
|
|
66
|
+
N
|
|
67
|
+
),
|
|
68
|
+
children: [
|
|
69
|
+
n && /* @__PURE__ */ r("div", { className: "w-full p-1 mb-1 sticky top-0 z-10 border-b border-border", children: /* @__PURE__ */ r(
|
|
70
|
+
E,
|
|
71
|
+
{
|
|
72
|
+
name: v,
|
|
73
|
+
type: "text",
|
|
74
|
+
value: t,
|
|
75
|
+
onChange: (e) => z(e.target.value),
|
|
76
|
+
startContent: /* @__PURE__ */ r(O, { className: "w-3.5 h-3.5 text-foreground/70" }),
|
|
77
|
+
placeholder: y,
|
|
78
|
+
autoFocus: !0,
|
|
79
|
+
className: "w-full pl-8 h-8 text-xs bg-secondary/30 border-none focus-visible:ring-0"
|
|
80
|
+
}
|
|
81
|
+
) }),
|
|
82
|
+
m.length === 0 ? /* @__PURE__ */ r("div", { className: "px-3 py-4 text-xs text-foreground/70 text-center", children: "No options found" }) : m.map((e) => {
|
|
83
|
+
const l = F(e.value);
|
|
84
|
+
return c ? c(e, l) : /* @__PURE__ */ d(
|
|
85
|
+
q,
|
|
86
|
+
{
|
|
87
|
+
type: "button",
|
|
88
|
+
variant: l ? C : "ghost",
|
|
89
|
+
color: l ? S : "default",
|
|
90
|
+
size: I,
|
|
91
|
+
isDisabled: e.disabled,
|
|
92
|
+
onClick: () => g(e),
|
|
93
|
+
className: "w-full justify-between font-normal text-left transition-colors",
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ r("span", { children: e.label }),
|
|
96
|
+
l && /* @__PURE__ */ r(K, { className: "w-3.5 h-3.5 shrink-0 ml-2" })
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
String(e.value)
|
|
100
|
+
);
|
|
101
|
+
}),
|
|
102
|
+
a && /* @__PURE__ */ r("div", { className: "border-t border-border pt-1 mt-1", children: a })
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
) : null;
|
|
110
|
+
};
|
|
111
|
+
G.displayName = "SelectMenu";
|
|
112
|
+
export {
|
|
113
|
+
G as SelectMenu
|
|
114
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/select-menu/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SelectMenu.js";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { Radius } from '../../shared/radius';
|
|
3
|
+
import { Color, Variant } from '../../shared/variant';
|
|
4
|
+
import { TooltipPlacement } from '../tooltip/tooltip-config';
|
|
5
|
+
import { SidebarItem, SidebarItems, SidebarSizeKey, SidebarVariant } from './sidebar-config';
|
|
6
|
+
export interface SidebarProps<T = string> extends Omit<HTMLAttributes<HTMLElement>, "onSelect" | "title"> {
|
|
7
|
+
/** List of navigation items or sections. */
|
|
8
|
+
items?: SidebarItems<T>;
|
|
9
|
+
/** Key of currently active item. */
|
|
10
|
+
activeKey?: T;
|
|
11
|
+
/** Selection callback fired when an item is clicked. */
|
|
12
|
+
onSelect?: (item: SidebarItem<T>) => void;
|
|
13
|
+
/** Controlled collapsed drawer state. */
|
|
14
|
+
isCollapsed?: boolean;
|
|
15
|
+
/** Callback when collapse state changes. */
|
|
16
|
+
onCollapseChange?: (collapsed: boolean) => void;
|
|
17
|
+
/** Title displayed in the sidebar header when expanded. */
|
|
18
|
+
title?: ReactNode;
|
|
19
|
+
/** Header back button click handler. */
|
|
20
|
+
onBack?: () => void;
|
|
21
|
+
/** Custom back button icon element. */
|
|
22
|
+
backIcon?: ReactNode;
|
|
23
|
+
/** Optional user role string to filter item visibility against item.roles. */
|
|
24
|
+
userRole?: string;
|
|
25
|
+
/** Footer slot element. */
|
|
26
|
+
footer?: ReactNode;
|
|
27
|
+
/** Visual variant style. */
|
|
28
|
+
variant?: SidebarVariant;
|
|
29
|
+
/** Size scale token key. */
|
|
30
|
+
size?: SidebarSizeKey;
|
|
31
|
+
/** Radius scale token for sidebar container. */
|
|
32
|
+
radius?: Radius;
|
|
33
|
+
/** Radius scale token for individual items. */
|
|
34
|
+
itemRadius?: Radius;
|
|
35
|
+
/** Active item variant. */
|
|
36
|
+
itemVariant?: Variant;
|
|
37
|
+
/** Active item color. */
|
|
38
|
+
activeItemColor?: Color;
|
|
39
|
+
/** Header back button variant. */
|
|
40
|
+
backButtonVariant?: Variant;
|
|
41
|
+
/** Header back button color. */
|
|
42
|
+
backButtonColor?: Color;
|
|
43
|
+
/** Collapse toggle button variant. */
|
|
44
|
+
collapseButtonVariant?: Variant;
|
|
45
|
+
/** Collapse toggle button color. */
|
|
46
|
+
collapseButtonColor?: Color;
|
|
47
|
+
showCollapseButton?: boolean;
|
|
48
|
+
collapsible?: boolean;
|
|
49
|
+
defaultCollapsed?: boolean;
|
|
50
|
+
/** Whether to show tooltips on hover when the sidebar is collapsed. */
|
|
51
|
+
showTooltips?: boolean;
|
|
52
|
+
/** Preferred tooltip placement when collapsed. */
|
|
53
|
+
tooltipPlacement?: TooltipPlacement;
|
|
54
|
+
/** Header section class override. */
|
|
55
|
+
headerClassName?: string;
|
|
56
|
+
/** Navigation container class override. */
|
|
57
|
+
bodyClassName?: string;
|
|
58
|
+
/** Individual navigation item class override. */
|
|
59
|
+
itemClassName?: string;
|
|
60
|
+
/** Section label class override. */
|
|
61
|
+
sectionLabelClassName?: string;
|
|
62
|
+
/** Footer class override. */
|
|
63
|
+
footerClassName?: string;
|
|
64
|
+
/** Anchor tag props passthrough (native <a> or custom link). */
|
|
65
|
+
anchorProps?: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "children" | "onClick" | "className">;
|
|
66
|
+
/** Custom link component (e.g., Next.js Link, TanStack Router Link). */
|
|
67
|
+
linkComponent?: ElementType;
|
|
68
|
+
/** Additional props to pass to the custom link component (e.g., { prefetch: true }). */
|
|
69
|
+
linkProps?: Record<string, unknown>;
|
|
70
|
+
}
|
|
71
|
+
export declare function Sidebar<T = string>({ items: itemsProp, activeKey, onSelect, isCollapsed: isCollapsedProp, onCollapseChange, title, onBack, backIcon, userRole, footer, variant: variantProp, size, radius, itemRadius, itemVariant, activeItemColor, backButtonVariant, backButtonColor, collapseButtonVariant, collapseButtonColor, showCollapseButton: showCollapseButtonProp, collapsible: collapsibleProp, defaultCollapsed: defaultCollapsedProp, showTooltips, tooltipPlacement, headerClassName, bodyClassName, itemClassName, sectionLabelClassName, footerClassName, anchorProps, linkComponent, linkProps: linkPropsProp, className, style, ...props }: SidebarProps<T>): import("react").JSX.Element;
|
|
72
|
+
export declare namespace Sidebar {
|
|
73
|
+
var displayName: string;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=Sidebar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/Sidebar.tsx"],"names":[],"mappings":"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"}
|