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,64 @@
|
|
|
1
|
+
import { Radius } from '../../shared/radius';
|
|
2
|
+
import { Size } from '../../shared/size';
|
|
3
|
+
import { Color, Variant } from '../../shared/variant';
|
|
4
|
+
/**
|
|
5
|
+
* Visual style of the chip.
|
|
6
|
+
*
|
|
7
|
+
* The `underlined` button variant is excluded because it has no
|
|
8
|
+
* chip-appropriate visual treatment.
|
|
9
|
+
*/
|
|
10
|
+
export type ChipVariant = Exclude<Variant, "underlined">;
|
|
11
|
+
/** Height and font-size scale of the chip. */
|
|
12
|
+
export type ChipSizeKey = Size;
|
|
13
|
+
/** Corner rounding scale of the chip. */
|
|
14
|
+
export type ChipRadiusKey = Radius;
|
|
15
|
+
/**
|
|
16
|
+
* Theme configuration options for the Chip component.
|
|
17
|
+
*
|
|
18
|
+
* Set under `components.chip` in the AsheeUI config. Values feed the
|
|
19
|
+
* component-level fallback tier of the theme cascade.
|
|
20
|
+
*/
|
|
21
|
+
export interface ChipConfig {
|
|
22
|
+
/** Visual style variant.
|
|
23
|
+
*
|
|
24
|
+
* @default "bordered"
|
|
25
|
+
*/
|
|
26
|
+
variant?: ChipVariant;
|
|
27
|
+
/** Theme accent color.
|
|
28
|
+
*
|
|
29
|
+
* @default "primary"
|
|
30
|
+
*/
|
|
31
|
+
color?: Color;
|
|
32
|
+
/** Height and font-size scale.
|
|
33
|
+
*
|
|
34
|
+
* @default "md"
|
|
35
|
+
*/
|
|
36
|
+
size?: ChipSizeKey;
|
|
37
|
+
/** Corner rounding.
|
|
38
|
+
*
|
|
39
|
+
* @default "full"
|
|
40
|
+
*/
|
|
41
|
+
radius?: ChipRadiusKey;
|
|
42
|
+
/** Extra classes applied to every chip instance.
|
|
43
|
+
*
|
|
44
|
+
* @default ""
|
|
45
|
+
*/
|
|
46
|
+
className?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Default config values registered for the Chip component.
|
|
50
|
+
*
|
|
51
|
+
* `variant` and `color` are intentionally absent so they inherit from
|
|
52
|
+
* the global `defaultVariant` / `defaultColor`.
|
|
53
|
+
*/
|
|
54
|
+
export declare const defaultChipConfig: ChipConfig;
|
|
55
|
+
/**
|
|
56
|
+
* Hard fallback values used when no config tier provides a value.
|
|
57
|
+
*/
|
|
58
|
+
export declare const FALLBACK_CHIP_CONFIG: Required<ChipConfig>;
|
|
59
|
+
declare module "../../libs/registry" {
|
|
60
|
+
interface ComponentTypeConfigRegistry {
|
|
61
|
+
chip: ChipConfig;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=chip-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip-config.d.ts","sourceRoot":"","sources":["../../../src/components/chip/chip-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;AAE3D;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;AAEzD,8CAA8C;AAC9C,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC;AAE/B,yCAAyC;AACzC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAG/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,UAAU,CAM5C,CAAC;AAEX,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,IAAI,EAAE,UAAU,CAAC;KAClB;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
const r = {
|
|
4
|
+
size: "md",
|
|
5
|
+
radius: "full"
|
|
6
|
+
}, o = {
|
|
7
|
+
size: "md",
|
|
8
|
+
variant: "bordered",
|
|
9
|
+
color: "primary",
|
|
10
|
+
radius: "full",
|
|
11
|
+
className: ""
|
|
12
|
+
};
|
|
13
|
+
e("chip", r);
|
|
14
|
+
export {
|
|
15
|
+
o as FALLBACK_CHIP_CONFIG,
|
|
16
|
+
r as defaultChipConfig
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Size } from '../../shared/size';
|
|
2
|
+
export declare const CHIP_HEIGHT_CLASS: Record<Size, string>;
|
|
3
|
+
export declare const CHIP_PADDING_CLASS: Record<Size, string>;
|
|
4
|
+
export declare const CHIP_FONT_CLASS: Record<Size, string>;
|
|
5
|
+
export declare const CHIP_GAP_CLASS: Record<Size, string>;
|
|
6
|
+
export declare const CHIP_ICON_SIZE_CLASS: Record<Size, string>;
|
|
7
|
+
//# sourceMappingURL=chip-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip-styles.d.ts","sourceRoot":"","sources":["../../../src/components/chip/chip-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAIlD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAInD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAIhD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAI/C,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAIrD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const s = {
|
|
3
|
+
sm: "h-6",
|
|
4
|
+
md: "h-7",
|
|
5
|
+
lg: "h-8"
|
|
6
|
+
}, t = {
|
|
7
|
+
sm: "px-2",
|
|
8
|
+
md: "px-2.5",
|
|
9
|
+
lg: "px-3"
|
|
10
|
+
}, m = {
|
|
11
|
+
sm: "text-xs",
|
|
12
|
+
md: "text-sm",
|
|
13
|
+
lg: "text-base"
|
|
14
|
+
}, C = {
|
|
15
|
+
sm: "gap-1",
|
|
16
|
+
md: "gap-1.5",
|
|
17
|
+
lg: "gap-2"
|
|
18
|
+
}, S = {
|
|
19
|
+
sm: "w-3 h-3",
|
|
20
|
+
md: "w-3.5 h-3.5",
|
|
21
|
+
lg: "w-4 h-4"
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
m as CHIP_FONT_CLASS,
|
|
25
|
+
C as CHIP_GAP_CLASS,
|
|
26
|
+
s as CHIP_HEIGHT_CLASS,
|
|
27
|
+
S as CHIP_ICON_SIZE_CLASS,
|
|
28
|
+
t as CHIP_PADDING_CLASS
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chip/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { Radius } from '../../shared/radius';
|
|
3
|
+
import { Color, Variant } from '../../shared/variant';
|
|
4
|
+
import { FieldSizeKey, FieldStatus, LabelAlign } from '../field/field-config';
|
|
5
|
+
import { PickerMode } from './date-picker-config';
|
|
6
|
+
export interface DatePickerProps {
|
|
7
|
+
selected?: Date | null;
|
|
8
|
+
onChange?: (date: Date | null) => void;
|
|
9
|
+
mode?: PickerMode;
|
|
10
|
+
size?: FieldSizeKey;
|
|
11
|
+
radius?: Radius;
|
|
12
|
+
variant?: Variant;
|
|
13
|
+
color?: Color;
|
|
14
|
+
status?: FieldStatus;
|
|
15
|
+
label?: string;
|
|
16
|
+
labelAlign?: LabelAlign;
|
|
17
|
+
description?: string;
|
|
18
|
+
message?: string;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
isClearable?: boolean;
|
|
23
|
+
disableFuture?: boolean;
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
className?: string;
|
|
26
|
+
id?: string;
|
|
27
|
+
style?: CSSProperties;
|
|
28
|
+
}
|
|
29
|
+
export declare const DatePicker: import('react').ForwardRefExoticComponent<DatePickerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
30
|
+
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.tsx"],"names":[],"mappings":"AAeA,OAAO,EACL,KAAK,aAAa,EAMnB,MAAM,OAAO,CAAC;AAOf,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EACL,KAAK,KAAK,EAEV,KAAK,OAAO,EACb,MAAM,sBAAsB,CAAC;AAO9B,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,UAAU,EACX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,sBAAsB,CAAC;AAkY9B,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACvC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAID,eAAO,MAAM,UAAU,4GAiPtB,CAAC"}
|
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o, jsxs as p, Fragment as me } from "react/jsx-runtime";
|
|
3
|
+
import { cn as d } from "@asheeui/utils";
|
|
4
|
+
import { useFloating as fe, autoUpdate as pe, offset as he, flip as ge, shift as be, useClick as xe, useDismiss as ve, useRole as ye, useInteractions as we, FloatingFocusManager as Se } from "@floating-ui/react";
|
|
5
|
+
import { forwardRef as De, useId as Ne, useState as _, useCallback as Z, useMemo as Me } from "react";
|
|
6
|
+
import { CalendarIcon as Ae } from "../../icons/CalendarIcon.js";
|
|
7
|
+
import { ChevronLeftIcon as ke } from "../../icons/ChevronLeftIcon.js";
|
|
8
|
+
import { ChevronRightIcon as Ie } from "../../icons/ChevronRightIcon.js";
|
|
9
|
+
import { ClearIcon as Fe } from "../../icons/ClearIcon.js";
|
|
10
|
+
import { ClockIcon as Ce } from "../../icons/ClockIcon.js";
|
|
11
|
+
import { useAsheeConfig as _e } from "../../libs/context.js";
|
|
12
|
+
import { RADIUS_CLASS as ee } from "../../shared/radius.js";
|
|
13
|
+
import { resolveVariantClass as Re } from "../../shared/variant.js";
|
|
14
|
+
import { resolveCascade as j, resolveRadiusKey as Ee, resolveClassKey as te } from "../../utils/resolve-token.js";
|
|
15
|
+
import { FieldShell as $e } from "../field/FieldShell.js";
|
|
16
|
+
import { FALLBACK_DATE_PICKER_CONFIG as v } from "./date-picker-config.js";
|
|
17
|
+
import { DATE_PICKER_SIZE_CLASS as Le, DATE_PICKER_STATUS_BORDER_CLASS as Pe, CALENDAR_COLOR_CLASSES as K, DATE_PICKER_CELL_SIZE_CLASS as Te } from "./date-picker-styles.js";
|
|
18
|
+
const Ye = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], je = [
|
|
19
|
+
"January",
|
|
20
|
+
"February",
|
|
21
|
+
"March",
|
|
22
|
+
"April",
|
|
23
|
+
"May",
|
|
24
|
+
"June",
|
|
25
|
+
"July",
|
|
26
|
+
"August",
|
|
27
|
+
"September",
|
|
28
|
+
"October",
|
|
29
|
+
"November",
|
|
30
|
+
"December"
|
|
31
|
+
];
|
|
32
|
+
function R(e) {
|
|
33
|
+
return String(e).padStart(2, "0");
|
|
34
|
+
}
|
|
35
|
+
function Ke(e, n) {
|
|
36
|
+
const l = R(e.getDate()), m = R(e.getMonth() + 1), a = e.getFullYear(), s = R(e.getHours()), u = R(e.getMinutes());
|
|
37
|
+
switch (n) {
|
|
38
|
+
case "date":
|
|
39
|
+
return `${l}/${m}/${a}`;
|
|
40
|
+
case "time":
|
|
41
|
+
return `${s}:${u}`;
|
|
42
|
+
case "datetime":
|
|
43
|
+
return `${l}/${m}/${a} ${s}:${u}`;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function Oe(e) {
|
|
47
|
+
switch (e) {
|
|
48
|
+
case "date":
|
|
49
|
+
return "Select date...";
|
|
50
|
+
case "time":
|
|
51
|
+
return "Select time...";
|
|
52
|
+
case "datetime":
|
|
53
|
+
return "Select date & time...";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function ze(e, n) {
|
|
57
|
+
const l = new Date(e, n + 1, 0).getDate(), m = new Date(e, n, 1).getDay(), a = [
|
|
58
|
+
...Array(m).fill(null),
|
|
59
|
+
...Array.from({ length: l }, (s, u) => u + 1)
|
|
60
|
+
];
|
|
61
|
+
for (; a.length % 7 !== 0; ) a.push(null);
|
|
62
|
+
return a;
|
|
63
|
+
}
|
|
64
|
+
function oe({
|
|
65
|
+
value: e,
|
|
66
|
+
max: n,
|
|
67
|
+
label: l,
|
|
68
|
+
onChange: m,
|
|
69
|
+
resolvedColor: a,
|
|
70
|
+
radiusClass: s
|
|
71
|
+
}) {
|
|
72
|
+
const u = () => m(e >= n ? 0 : e + 1), y = () => m(e <= 0 ? n : e - 1), w = K[a] ?? K.primary;
|
|
73
|
+
return /* @__PURE__ */ p("div", { className: "flex flex-col items-center gap-0.5", children: [
|
|
74
|
+
/* @__PURE__ */ o("span", { className: "text-[10px] uppercase tracking-widest text-foreground/70 select-none", children: l }),
|
|
75
|
+
/* @__PURE__ */ o(
|
|
76
|
+
"button",
|
|
77
|
+
{
|
|
78
|
+
type: "button",
|
|
79
|
+
className: d(
|
|
80
|
+
"w-10 h-7 flex items-center justify-center text-xs text-foreground/70 transition-colors",
|
|
81
|
+
s,
|
|
82
|
+
w.hover
|
|
83
|
+
),
|
|
84
|
+
onClick: u,
|
|
85
|
+
"aria-label": `Increment ${l}`,
|
|
86
|
+
children: "▲"
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ o(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
className: d(
|
|
93
|
+
"w-10 h-10 flex items-center justify-center text-base font-mono font-bold text-foreground bg-background border border-border select-none",
|
|
94
|
+
s
|
|
95
|
+
),
|
|
96
|
+
children: R(e)
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ o(
|
|
100
|
+
"button",
|
|
101
|
+
{
|
|
102
|
+
type: "button",
|
|
103
|
+
className: d(
|
|
104
|
+
"w-10 h-7 flex items-center justify-center text-xs text-foreground/70 transition-colors",
|
|
105
|
+
s,
|
|
106
|
+
w.hover
|
|
107
|
+
),
|
|
108
|
+
onClick: y,
|
|
109
|
+
"aria-label": `Decrement ${l}`,
|
|
110
|
+
children: "▼"
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
] });
|
|
114
|
+
}
|
|
115
|
+
function He({
|
|
116
|
+
selected: e,
|
|
117
|
+
mode: n,
|
|
118
|
+
isClearable: l,
|
|
119
|
+
resolvedSizeKey: m,
|
|
120
|
+
resolvedColor: a,
|
|
121
|
+
radiusClass: s,
|
|
122
|
+
onSelect: u,
|
|
123
|
+
onClose: y,
|
|
124
|
+
disableFuture: w = !1
|
|
125
|
+
}) {
|
|
126
|
+
const c = /* @__PURE__ */ new Date(), [h, E] = _(
|
|
127
|
+
(e == null ? void 0 : e.getFullYear()) ?? c.getFullYear()
|
|
128
|
+
), [f, D] = _(
|
|
129
|
+
(e == null ? void 0 : e.getMonth()) ?? c.getMonth()
|
|
130
|
+
), [g, $] = _((e == null ? void 0 : e.getHours()) ?? 0), [I, O] = _((e == null ? void 0 : e.getMinutes()) ?? 0), b = K[a] ?? K.primary;
|
|
131
|
+
function L(t, i) {
|
|
132
|
+
const k = e ?? /* @__PURE__ */ new Date();
|
|
133
|
+
u(
|
|
134
|
+
new Date(k.getFullYear(), k.getMonth(), k.getDate(), t, i, 0, 0)
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
function z(t) {
|
|
138
|
+
$(t), L(t, I);
|
|
139
|
+
}
|
|
140
|
+
function N(t) {
|
|
141
|
+
O(t), L(g, t);
|
|
142
|
+
}
|
|
143
|
+
function M(t) {
|
|
144
|
+
u(new Date(h, f, t, g, I, 0, 0)), n === "date" && y();
|
|
145
|
+
}
|
|
146
|
+
function r() {
|
|
147
|
+
f === 0 ? (D(11), E((t) => t - 1)) : D((t) => t - 1);
|
|
148
|
+
}
|
|
149
|
+
function H() {
|
|
150
|
+
f === 11 ? (D(0), E((t) => t + 1)) : D((t) => t + 1);
|
|
151
|
+
}
|
|
152
|
+
function V(t) {
|
|
153
|
+
return !!e && e.getFullYear() === h && e.getMonth() === f && e.getDate() === t;
|
|
154
|
+
}
|
|
155
|
+
function F(t) {
|
|
156
|
+
return c.getFullYear() === h && c.getMonth() === f && c.getDate() === t;
|
|
157
|
+
}
|
|
158
|
+
const P = new Date(
|
|
159
|
+
c.getFullYear(),
|
|
160
|
+
c.getMonth(),
|
|
161
|
+
c.getDate()
|
|
162
|
+
);
|
|
163
|
+
function C(t) {
|
|
164
|
+
return w ? new Date(h, f, t) > P : !1;
|
|
165
|
+
}
|
|
166
|
+
const J = !w || h < c.getFullYear() || h === c.getFullYear() && f < c.getMonth(), A = n === "date" || n === "datetime", U = n === "time" || n === "datetime", B = n !== "date" || l && !!e, T = ze(h, f), G = Me(() => T.map((t, i) => ({
|
|
167
|
+
key: t !== null ? `day-${t}` : `empty-slot-${i}`,
|
|
168
|
+
day: t
|
|
169
|
+
})), [T]);
|
|
170
|
+
return /* @__PURE__ */ p(
|
|
171
|
+
"div",
|
|
172
|
+
{
|
|
173
|
+
className: d(
|
|
174
|
+
"bg-background border border-border shadow-xl select-none p-3 min-w-70",
|
|
175
|
+
s
|
|
176
|
+
),
|
|
177
|
+
children: [
|
|
178
|
+
A && /* @__PURE__ */ p(me, { children: [
|
|
179
|
+
/* @__PURE__ */ p("div", { className: "flex items-center justify-between pb-2 mb-2 border-b border-border", children: [
|
|
180
|
+
/* @__PURE__ */ o(
|
|
181
|
+
"button",
|
|
182
|
+
{
|
|
183
|
+
type: "button",
|
|
184
|
+
onClick: r,
|
|
185
|
+
"aria-label": "Previous month",
|
|
186
|
+
className: d(
|
|
187
|
+
"p-1 text-foreground transition-colors",
|
|
188
|
+
s,
|
|
189
|
+
b.hover
|
|
190
|
+
),
|
|
191
|
+
children: /* @__PURE__ */ o(ke, {})
|
|
192
|
+
}
|
|
193
|
+
),
|
|
194
|
+
/* @__PURE__ */ p("span", { className: "font-medium text-sm text-foreground", children: [
|
|
195
|
+
je[f],
|
|
196
|
+
" ",
|
|
197
|
+
h
|
|
198
|
+
] }),
|
|
199
|
+
/* @__PURE__ */ o(
|
|
200
|
+
"button",
|
|
201
|
+
{
|
|
202
|
+
type: "button",
|
|
203
|
+
onClick: H,
|
|
204
|
+
disabled: !J,
|
|
205
|
+
"aria-label": "Next month",
|
|
206
|
+
className: d(
|
|
207
|
+
"p-1 text-foreground transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
|
|
208
|
+
s,
|
|
209
|
+
b.hover
|
|
210
|
+
),
|
|
211
|
+
children: /* @__PURE__ */ o(Ie, {})
|
|
212
|
+
}
|
|
213
|
+
)
|
|
214
|
+
] }),
|
|
215
|
+
/* @__PURE__ */ p("div", { className: "grid grid-cols-7 gap-1 text-center", children: [
|
|
216
|
+
Ye.map((t) => /* @__PURE__ */ o(
|
|
217
|
+
"div",
|
|
218
|
+
{
|
|
219
|
+
className: "text-xs font-semibold text-foreground/70 py-1",
|
|
220
|
+
children: t
|
|
221
|
+
},
|
|
222
|
+
t
|
|
223
|
+
)),
|
|
224
|
+
G.map(
|
|
225
|
+
({ key: t, day: i }) => i === null ? /* @__PURE__ */ o("div", {}, t) : /* @__PURE__ */ o(
|
|
226
|
+
"button",
|
|
227
|
+
{
|
|
228
|
+
type: "button",
|
|
229
|
+
onClick: () => M(i),
|
|
230
|
+
disabled: C(i),
|
|
231
|
+
className: d(
|
|
232
|
+
"w-full flex items-center justify-center font-medium transition-colors",
|
|
233
|
+
Te[m],
|
|
234
|
+
s,
|
|
235
|
+
C(i) ? "opacity-30 cursor-not-allowed text-foreground/70" : V(i) ? d(b.bg, "font-semibold") : F(i) ? d("border", b.border, b.text) : d("text-foreground", b.hover)
|
|
236
|
+
),
|
|
237
|
+
children: i
|
|
238
|
+
},
|
|
239
|
+
i
|
|
240
|
+
)
|
|
241
|
+
)
|
|
242
|
+
] })
|
|
243
|
+
] }),
|
|
244
|
+
U && /* @__PURE__ */ p("div", { className: "flex items-center justify-center gap-4 py-3 border-t border-border mt-2", children: [
|
|
245
|
+
/* @__PURE__ */ o(
|
|
246
|
+
oe,
|
|
247
|
+
{
|
|
248
|
+
value: g,
|
|
249
|
+
max: 23,
|
|
250
|
+
label: "HH",
|
|
251
|
+
onChange: z,
|
|
252
|
+
resolvedColor: a,
|
|
253
|
+
radiusClass: s
|
|
254
|
+
}
|
|
255
|
+
),
|
|
256
|
+
/* @__PURE__ */ o("span", { className: "text-xl font-bold text-foreground/70 select-none pt-3", children: ":" }),
|
|
257
|
+
/* @__PURE__ */ o(
|
|
258
|
+
oe,
|
|
259
|
+
{
|
|
260
|
+
value: I,
|
|
261
|
+
max: 59,
|
|
262
|
+
label: "MM",
|
|
263
|
+
onChange: N,
|
|
264
|
+
resolvedColor: a,
|
|
265
|
+
radiusClass: s
|
|
266
|
+
}
|
|
267
|
+
)
|
|
268
|
+
] }),
|
|
269
|
+
B && /* @__PURE__ */ p("div", { className: "flex items-center justify-between border-t border-border pt-2 mt-2", children: [
|
|
270
|
+
l && e && /* @__PURE__ */ o(
|
|
271
|
+
"button",
|
|
272
|
+
{
|
|
273
|
+
type: "button",
|
|
274
|
+
onClick: () => {
|
|
275
|
+
u(null), y();
|
|
276
|
+
},
|
|
277
|
+
className: "text-xs text-foreground/70 hover:text-danger transition-colors",
|
|
278
|
+
children: "Clear"
|
|
279
|
+
}
|
|
280
|
+
),
|
|
281
|
+
n !== "date" && /* @__PURE__ */ o(
|
|
282
|
+
"button",
|
|
283
|
+
{
|
|
284
|
+
type: "button",
|
|
285
|
+
onClick: y,
|
|
286
|
+
className: d(
|
|
287
|
+
"ml-auto text-xs font-medium px-3 py-1.5 hover:opacity-90 transition-opacity",
|
|
288
|
+
s,
|
|
289
|
+
b.bg
|
|
290
|
+
),
|
|
291
|
+
children: "Done"
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
] })
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
const Ve = De(
|
|
300
|
+
({
|
|
301
|
+
selected: e,
|
|
302
|
+
onChange: n,
|
|
303
|
+
mode: l,
|
|
304
|
+
size: m,
|
|
305
|
+
radius: a,
|
|
306
|
+
variant: s,
|
|
307
|
+
color: u,
|
|
308
|
+
status: y,
|
|
309
|
+
label: w,
|
|
310
|
+
labelAlign: c,
|
|
311
|
+
description: h,
|
|
312
|
+
message: E,
|
|
313
|
+
required: f,
|
|
314
|
+
isLoading: D,
|
|
315
|
+
disabled: g,
|
|
316
|
+
isClearable: $ = !1,
|
|
317
|
+
disableFuture: I = !1,
|
|
318
|
+
placeholder: O,
|
|
319
|
+
className: b,
|
|
320
|
+
id: L,
|
|
321
|
+
style: z
|
|
322
|
+
}, N) => {
|
|
323
|
+
var X;
|
|
324
|
+
const M = _e(), r = (X = M.components) == null ? void 0 : X.datePicker, H = Ne(), V = L ?? H, [F, P] = _(!1), { refs: C, floatingStyles: J, context: A } = fe({
|
|
325
|
+
open: F,
|
|
326
|
+
onOpenChange: (x) => !g && P(x),
|
|
327
|
+
placement: "bottom-start",
|
|
328
|
+
whileElementsMounted: pe,
|
|
329
|
+
middleware: [he(6), ge(), be({ padding: 8 })]
|
|
330
|
+
}), U = xe(A, { enabled: !g }), B = ve(A), T = ye(A, { role: "dialog" }), { getReferenceProps: G, getFloatingProps: t } = we([
|
|
331
|
+
U,
|
|
332
|
+
B,
|
|
333
|
+
T
|
|
334
|
+
]), i = j(
|
|
335
|
+
m,
|
|
336
|
+
r == null ? void 0 : r.size,
|
|
337
|
+
void 0,
|
|
338
|
+
v.size
|
|
339
|
+
), k = j(
|
|
340
|
+
s,
|
|
341
|
+
r == null ? void 0 : r.variant,
|
|
342
|
+
M.defaultVariant,
|
|
343
|
+
v.variant
|
|
344
|
+
), q = j(
|
|
345
|
+
u,
|
|
346
|
+
r == null ? void 0 : r.color,
|
|
347
|
+
M.defaultColor,
|
|
348
|
+
v.color
|
|
349
|
+
), W = Ee(
|
|
350
|
+
typeof a == "string" ? a : void 0,
|
|
351
|
+
typeof (r == null ? void 0 : r.radius) == "string" ? r.radius : void 0,
|
|
352
|
+
M.defaultRadius,
|
|
353
|
+
v.radius
|
|
354
|
+
), S = y ?? v.status, ne = j(
|
|
355
|
+
c,
|
|
356
|
+
r == null ? void 0 : r.labelAlign,
|
|
357
|
+
void 0,
|
|
358
|
+
v.labelAlign
|
|
359
|
+
), Y = l ?? (r == null ? void 0 : r.mode) ?? v.mode, re = Re(
|
|
360
|
+
k,
|
|
361
|
+
S === "error" ? "danger" : S === "success" ? "success" : S === "warning" ? "warning" : q
|
|
362
|
+
), se = S !== "default" ? Pe[S] : "", ae = k === "underlined" ? "rounded-none" : te(
|
|
363
|
+
W,
|
|
364
|
+
ee,
|
|
365
|
+
v.radius
|
|
366
|
+
), ie = te(
|
|
367
|
+
W === "full" ? "xl" : W,
|
|
368
|
+
ee,
|
|
369
|
+
v.radius
|
|
370
|
+
), le = Z(
|
|
371
|
+
(x) => n == null ? void 0 : n(x),
|
|
372
|
+
[n]
|
|
373
|
+
), ce = Z(() => P(!1), []), ue = Z(
|
|
374
|
+
(x) => {
|
|
375
|
+
x.stopPropagation(), n == null || n(null);
|
|
376
|
+
},
|
|
377
|
+
[n]
|
|
378
|
+
), de = O ?? Oe(Y), Q = e ? Ke(e, Y) : null;
|
|
379
|
+
return /* @__PURE__ */ o(
|
|
380
|
+
$e,
|
|
381
|
+
{
|
|
382
|
+
id: V,
|
|
383
|
+
label: w,
|
|
384
|
+
labelAlign: ne,
|
|
385
|
+
description: h,
|
|
386
|
+
message: E,
|
|
387
|
+
status: S,
|
|
388
|
+
required: f,
|
|
389
|
+
isLoading: D,
|
|
390
|
+
children: /* @__PURE__ */ p("div", { className: "w-full relative inline-block", children: [
|
|
391
|
+
/* @__PURE__ */ p(
|
|
392
|
+
"div",
|
|
393
|
+
{
|
|
394
|
+
ref: (x) => {
|
|
395
|
+
C.setReference(x), typeof N == "function" ? N(x) : N && (N.current = x);
|
|
396
|
+
},
|
|
397
|
+
role: "combobox",
|
|
398
|
+
tabIndex: g ? -1 : 0,
|
|
399
|
+
"aria-expanded": F,
|
|
400
|
+
"aria-haspopup": "dialog",
|
|
401
|
+
"aria-invalid": S === "error",
|
|
402
|
+
"aria-disabled": g,
|
|
403
|
+
className: d(
|
|
404
|
+
"w-full flex items-center justify-between cursor-pointer text-foreground outline-none transition-colors select-none shrink-0",
|
|
405
|
+
"focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
406
|
+
g && "pointer-events-none opacity-50 cursor-not-allowed",
|
|
407
|
+
Le[i],
|
|
408
|
+
re,
|
|
409
|
+
se,
|
|
410
|
+
ae,
|
|
411
|
+
b
|
|
412
|
+
),
|
|
413
|
+
style: z,
|
|
414
|
+
...G(),
|
|
415
|
+
children: [
|
|
416
|
+
/* @__PURE__ */ o(
|
|
417
|
+
"span",
|
|
418
|
+
{
|
|
419
|
+
className: Q ? "text-foreground" : "text-foreground/70",
|
|
420
|
+
children: Q ?? de
|
|
421
|
+
}
|
|
422
|
+
),
|
|
423
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-1.5 ml-2 shrink-0", children: [
|
|
424
|
+
$ && e && !g && /* @__PURE__ */ o(
|
|
425
|
+
"button",
|
|
426
|
+
{
|
|
427
|
+
type: "button",
|
|
428
|
+
onClick: ue,
|
|
429
|
+
"aria-label": "Clear selection",
|
|
430
|
+
className: "p-0.5 rounded text-foreground/70 hover:text-foreground transition-colors",
|
|
431
|
+
children: /* @__PURE__ */ o(Fe, { className: "size-3.5" })
|
|
432
|
+
}
|
|
433
|
+
),
|
|
434
|
+
/* @__PURE__ */ o("span", { className: "text-foreground/70 pointer-events-none", children: Y === "time" ? /* @__PURE__ */ o(Ce, {}) : /* @__PURE__ */ o(Ae, {}) })
|
|
435
|
+
] })
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
),
|
|
439
|
+
F && /* @__PURE__ */ o(Se, { context: A, modal: !1, children: /* @__PURE__ */ o(
|
|
440
|
+
"div",
|
|
441
|
+
{
|
|
442
|
+
ref: C.setFloating,
|
|
443
|
+
style: { ...J, zIndex: 99999 },
|
|
444
|
+
className: "outline-none",
|
|
445
|
+
...t(),
|
|
446
|
+
children: /* @__PURE__ */ o("div", { className: "animate-in fade-in-0 zoom-in-95 duration-150 ease-out", children: /* @__PURE__ */ o(
|
|
447
|
+
He,
|
|
448
|
+
{
|
|
449
|
+
selected: e,
|
|
450
|
+
mode: Y,
|
|
451
|
+
isClearable: $,
|
|
452
|
+
resolvedSizeKey: i,
|
|
453
|
+
onSelect: le,
|
|
454
|
+
onClose: ce,
|
|
455
|
+
disableFuture: I,
|
|
456
|
+
resolvedColor: q,
|
|
457
|
+
radiusClass: ie
|
|
458
|
+
}
|
|
459
|
+
) })
|
|
460
|
+
}
|
|
461
|
+
) })
|
|
462
|
+
] })
|
|
463
|
+
}
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
);
|
|
467
|
+
Ve.displayName = "DatePicker";
|
|
468
|
+
export {
|
|
469
|
+
Ve as DatePicker
|
|
470
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FieldConfig, FieldSizeKey } from '../field/field-config';
|
|
2
|
+
export type PickerMode = "date" | "time" | "datetime";
|
|
3
|
+
export type DatePickerSizeKey = FieldSizeKey;
|
|
4
|
+
export interface DatePickerConfig extends FieldConfig {
|
|
5
|
+
mode?: PickerMode;
|
|
6
|
+
}
|
|
7
|
+
export declare const defaultDatePickerConfig: DatePickerConfig;
|
|
8
|
+
export declare const FALLBACK_DATE_PICKER_CONFIG: Required<DatePickerConfig>;
|
|
9
|
+
declare module "../../libs/registry" {
|
|
10
|
+
interface ComponentTypeConfigRegistry {
|
|
11
|
+
datePicker: DatePickerConfig;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=date-picker-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker-config.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker-config.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AACtD,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAE7C,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,eAAO,MAAM,uBAAuB,EAAE,gBAKrC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,gBAAgB,CASzD,CAAC;AAEX,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,UAAU,EAAE,gBAAgB,CAAC;KAC9B;CACF"}
|