asheeui 0.7.0 → 1.1.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/README.md +61 -166
- package/dist/AsheeUIProvider.d.ts.map +1 -1
- package/dist/AsheeUIProvider.js +22 -15
- package/dist/components/accordion/Accordion.d.ts.map +1 -1
- package/dist/components/accordion/Accordion.js +9 -7
- package/dist/components/alert/Alert.d.ts +88 -0
- package/dist/components/alert/Alert.d.ts.map +1 -0
- package/dist/components/alert/Alert.js +61 -0
- package/dist/components/alert/alert-config.d.ts +56 -0
- package/dist/components/alert/alert-config.d.ts.map +1 -0
- package/dist/components/alert/alert-config.js +14 -0
- package/dist/components/alert/alert-styles.d.ts +32 -0
- package/dist/components/alert/alert-styles.d.ts.map +1 -0
- package/dist/components/alert/alert-styles.js +20 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/alert/index.js +3 -0
- package/dist/components/auth-layout/AuthLayout.d.ts +79 -0
- package/dist/components/auth-layout/AuthLayout.d.ts.map +1 -0
- package/dist/components/auth-layout/AuthLayout.js +54 -0
- package/dist/components/auth-layout/auth-layout-config.d.ts +41 -0
- package/dist/components/auth-layout/auth-layout-config.d.ts.map +1 -0
- package/dist/components/auth-layout/auth-layout-config.js +18 -0
- package/dist/components/auth-layout/auth-layout-styles.d.ts +25 -0
- package/dist/components/auth-layout/auth-layout-styles.d.ts.map +1 -0
- package/dist/components/auth-layout/auth-layout-styles.js +11 -0
- package/dist/components/auth-layout/index.d.ts +3 -0
- package/dist/components/auth-layout/index.d.ts.map +1 -0
- package/dist/components/auth-layout/index.js +3 -0
- package/dist/components/autocomplete/Autocomplete.d.ts +6 -6
- package/dist/components/autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/Autocomplete.js +94 -58
- package/dist/components/autocomplete/autocomplete-config.d.ts +1 -1
- package/dist/components/autocomplete/autocomplete-config.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.d.ts +87 -0
- package/dist/components/avatar/Avatar.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.js +43 -0
- package/dist/components/avatar/avatar-config.d.ts +48 -0
- package/dist/components/avatar/avatar-config.d.ts.map +1 -0
- package/dist/components/avatar/avatar-config.js +14 -0
- package/dist/components/avatar/avatar-styles.d.ts +21 -0
- package/dist/components/avatar/avatar-styles.d.ts.map +1 -0
- package/dist/components/avatar/avatar-styles.js +13 -0
- package/dist/components/avatar/avatar.helpers.d.ts +19 -0
- package/dist/components/avatar/avatar.helpers.d.ts.map +1 -0
- package/dist/components/avatar/avatar.helpers.js +11 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/index.js +4 -0
- package/dist/components/badge/Badge.d.ts +69 -0
- package/dist/components/badge/Badge.d.ts.map +1 -0
- package/dist/components/badge/Badge.js +39 -0
- package/dist/components/badge/badge-config.d.ts +63 -0
- package/dist/components/badge/badge-config.d.ts.map +1 -0
- package/dist/components/badge/badge-config.js +15 -0
- package/dist/components/badge/badge-styles.d.ts +27 -0
- package/dist/components/badge/badge-styles.d.ts.map +1 -0
- package/dist/components/badge/badge-styles.js +25 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/badge/index.js +3 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +106 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.js +52 -0
- package/dist/components/breadcrumb/breadcrumb-config.d.ts +41 -0
- package/dist/components/breadcrumb/breadcrumb-config.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-config.js +10 -0
- package/dist/components/breadcrumb/breadcrumb-styles.d.ts +28 -0
- package/dist/components/breadcrumb/breadcrumb-styles.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-styles.js +17 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.js +3 -0
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +10 -7
- package/dist/components/{date-picker/DatePicker.d.ts → calendar/Calendar.d.ts} +21 -21
- package/dist/components/calendar/Calendar.d.ts.map +1 -0
- package/dist/components/{date-picker/DatePicker.js → calendar/Calendar.js} +12 -12
- package/dist/components/{date-picker/Calendar.d.ts → calendar/DateGrid.d.ts} +7 -7
- package/dist/components/calendar/DateGrid.d.ts.map +1 -0
- package/dist/components/calendar/DateGrid.js +194 -0
- package/dist/components/calendar/TimeSpinner.d.ts.map +1 -0
- package/dist/components/{date-picker → calendar}/TimeSpinner.js +3 -3
- package/dist/components/{date-picker/date-picker-config.d.ts → calendar/calendar-config.d.ts} +17 -17
- package/dist/components/calendar/calendar-config.d.ts.map +1 -0
- package/dist/components/{date-picker/date-picker-config.js → calendar/calendar-config.js} +3 -3
- package/dist/components/{date-picker/date-picker-styles.d.ts → calendar/calendar-styles.d.ts} +1 -1
- package/dist/components/calendar/calendar-styles.d.ts.map +1 -0
- package/dist/components/{date-picker/date-picker-styles.js → calendar/calendar-styles.js} +1 -1
- package/dist/components/{date-picker/date-picker.helpers.d.ts → calendar/calendar.helpers.d.ts} +9 -9
- package/dist/components/calendar/calendar.helpers.d.ts.map +1 -0
- package/dist/components/{date-picker/date-picker.helpers.js → calendar/calendar.helpers.js} +4 -4
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/index.js +6 -0
- package/dist/components/card/Card.d.ts +6 -6
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +8 -8
- package/dist/components/carousel/Carousel.d.ts.map +1 -1
- package/dist/components/carousel/Carousel.js +85 -83
- package/dist/components/carousel/carousel-styles.d.ts +1 -20
- package/dist/components/carousel/carousel-styles.d.ts.map +1 -1
- package/dist/components/chip/Chip.js +5 -5
- package/dist/components/clipboard/Clipboard.d.ts +75 -0
- package/dist/components/clipboard/Clipboard.d.ts.map +1 -0
- package/dist/components/clipboard/Clipboard.js +53 -0
- package/dist/components/clipboard/CopyButton.d.ts +64 -0
- package/dist/components/clipboard/CopyButton.d.ts.map +1 -0
- package/dist/components/clipboard/CopyButton.js +44 -0
- package/dist/components/clipboard/clipboard-config.d.ts +42 -0
- package/dist/components/clipboard/clipboard-config.d.ts.map +1 -0
- package/dist/components/clipboard/clipboard-config.js +23 -0
- package/dist/components/clipboard/clipboard-styles.d.ts +11 -0
- package/dist/components/clipboard/clipboard-styles.d.ts.map +1 -0
- package/dist/components/clipboard/clipboard-styles.js +5 -0
- package/dist/components/clipboard/index.d.ts +4 -0
- package/dist/components/clipboard/index.d.ts.map +1 -0
- package/dist/components/clipboard/index.js +4 -0
- package/dist/components/container/Container.d.ts +51 -0
- package/dist/components/container/Container.d.ts.map +1 -0
- package/dist/components/container/Container.js +21 -0
- package/dist/components/container/container-config.d.ts +61 -0
- package/dist/components/container/container-config.d.ts.map +1 -0
- package/dist/components/container/container-config.js +16 -0
- package/dist/components/container/container-styles.d.ts +18 -0
- package/dist/components/container/container-styles.d.ts.map +1 -0
- package/dist/components/container/container-styles.js +12 -0
- package/dist/components/container/index.d.ts +3 -0
- package/dist/components/container/index.d.ts.map +1 -0
- package/dist/components/container/index.js +3 -0
- package/dist/components/cta/CTA.d.ts +81 -0
- package/dist/components/cta/CTA.d.ts.map +1 -0
- package/dist/components/cta/CTA.js +60 -0
- package/dist/components/cta/cta-config.d.ts +69 -0
- package/dist/components/cta/cta-config.d.ts.map +1 -0
- package/dist/components/cta/cta-config.js +22 -0
- package/dist/components/cta/cta-styles.d.ts +8 -0
- package/dist/components/cta/cta-styles.d.ts.map +1 -0
- package/dist/components/cta/cta-styles.js +9 -0
- package/dist/components/cta/index.d.ts +3 -0
- package/dist/components/cta/index.d.ts.map +1 -0
- package/dist/components/cta/index.js +3 -0
- package/dist/components/drawer/Drawer.d.ts +8 -4
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.js +54 -38
- package/dist/components/{select/Select.d.ts → dropmenu/Dropmenu.d.ts} +21 -21
- package/dist/components/{select/Select.d.ts.map → dropmenu/Dropmenu.d.ts.map} +1 -1
- package/dist/components/dropmenu/Dropmenu.js +102 -0
- package/dist/components/{select/select-config.d.ts → dropmenu/dropmenu-config.d.ts} +8 -8
- package/dist/components/dropmenu/dropmenu-config.d.ts.map +1 -0
- package/dist/components/{select/select-config.js → dropmenu/dropmenu-config.js} +3 -3
- package/dist/components/{select/select-styles.d.ts → dropmenu/dropmenu-styles.d.ts} +1 -1
- package/dist/components/dropmenu/dropmenu-styles.d.ts.map +1 -0
- package/dist/components/{select/select-styles.js → dropmenu/dropmenu-styles.js} +1 -1
- package/dist/components/dropmenu/index.d.ts +3 -0
- package/dist/components/dropmenu/index.d.ts.map +1 -0
- package/dist/components/dropmenu/index.js +3 -0
- package/dist/components/empty-state/EmptyState.d.ts +77 -0
- package/dist/components/empty-state/EmptyState.d.ts.map +1 -0
- package/dist/components/empty-state/EmptyState.js +46 -0
- package/dist/components/empty-state/empty-state-config.d.ts +44 -0
- package/dist/components/empty-state/empty-state-config.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state-config.js +16 -0
- package/dist/components/empty-state/empty-state-styles.d.ts +13 -0
- package/dist/components/empty-state/empty-state-styles.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state-styles.js +18 -0
- package/dist/components/empty-state/index.d.ts +3 -0
- package/dist/components/empty-state/index.d.ts.map +1 -0
- package/dist/components/empty-state/index.js +3 -0
- package/dist/components/feature-grid/FeatureGrid.d.ts +107 -0
- package/dist/components/feature-grid/FeatureGrid.d.ts.map +1 -0
- package/dist/components/feature-grid/FeatureGrid.js +94 -0
- package/dist/components/feature-grid/feature-grid-config.d.ts +80 -0
- package/dist/components/feature-grid/feature-grid-config.d.ts.map +1 -0
- package/dist/components/feature-grid/feature-grid-config.js +28 -0
- package/dist/components/feature-grid/feature-grid-styles.d.ts +11 -0
- package/dist/components/feature-grid/feature-grid-styles.d.ts.map +1 -0
- package/dist/components/feature-grid/feature-grid-styles.js +5 -0
- package/dist/components/feature-grid/index.d.ts +3 -0
- package/dist/components/feature-grid/index.d.ts.map +1 -0
- package/dist/components/feature-grid/index.js +3 -0
- package/dist/components/field/FieldShell.d.ts +13 -1
- package/dist/components/field/FieldShell.d.ts.map +1 -1
- package/dist/components/field/FieldShell.js +16 -15
- package/dist/components/footer/Footer.d.ts +73 -0
- package/dist/components/footer/Footer.d.ts.map +1 -0
- package/dist/components/footer/Footer.js +112 -0
- package/dist/components/footer/footer-config.d.ts +40 -0
- package/dist/components/footer/footer-config.d.ts.map +1 -0
- package/dist/components/footer/footer-config.js +18 -0
- package/dist/components/footer/footer-styles.d.ts +22 -0
- package/dist/components/footer/footer-styles.d.ts.map +1 -0
- package/dist/components/footer/footer-styles.js +9 -0
- package/dist/components/footer/index.d.ts +3 -0
- package/dist/components/footer/index.d.ts.map +1 -0
- package/dist/components/footer/index.js +3 -0
- package/dist/components/form/Form.d.ts +109 -0
- package/dist/components/form/Form.d.ts.map +1 -0
- package/dist/components/form/Form.js +42 -0
- package/dist/components/form/form-config.d.ts +57 -0
- package/dist/components/form/form-config.d.ts.map +1 -0
- package/dist/components/form/form-config.js +12 -0
- package/dist/components/form/form-styles.d.ts +27 -0
- package/dist/components/form/form-styles.d.ts.map +1 -0
- package/dist/components/form/form-styles.js +5 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/form/index.js +3 -0
- package/dist/components/grid/Grid.d.ts +71 -0
- package/dist/components/grid/Grid.d.ts.map +1 -0
- package/dist/components/grid/Grid.js +23 -0
- package/dist/components/grid/grid-config.d.ts +63 -0
- package/dist/components/grid/grid-config.d.ts.map +1 -0
- package/dist/components/grid/grid-config.js +16 -0
- package/dist/components/grid/grid-styles.d.ts +12 -0
- package/dist/components/grid/grid-styles.d.ts.map +1 -0
- package/dist/components/grid/grid-styles.js +31 -0
- package/dist/components/grid/index.d.ts +3 -0
- package/dist/components/grid/index.d.ts.map +1 -0
- package/dist/components/grid/index.js +3 -0
- package/dist/components/hero/Hero.d.ts +90 -0
- package/dist/components/hero/Hero.d.ts.map +1 -0
- package/dist/components/hero/Hero.js +63 -0
- package/dist/components/hero/hero-config.d.ts +71 -0
- package/dist/components/hero/hero-config.d.ts.map +1 -0
- package/dist/components/hero/hero-config.js +22 -0
- package/dist/components/hero/hero-styles.d.ts +19 -0
- package/dist/components/hero/hero-styles.d.ts.map +1 -0
- package/dist/components/hero/hero-styles.js +5 -0
- package/dist/components/hero/index.d.ts +3 -0
- package/dist/components/hero/index.d.ts.map +1 -0
- package/dist/components/hero/index.js +3 -0
- package/dist/components/image/Image.d.ts +4 -5
- package/dist/components/image/Image.d.ts.map +1 -1
- package/dist/components/image/Image.js +5 -5
- package/dist/components/input/Input.js +5 -5
- package/dist/components/link/Link.d.ts +12 -10
- package/dist/components/link/Link.d.ts.map +1 -1
- package/dist/components/link/Link.js +1 -1
- package/dist/components/marquee/Marquee.d.ts.map +1 -1
- package/dist/components/marquee/Marquee.js +36 -33
- package/dist/components/{select-menu/SelectMenu.d.ts → menu/Menu.d.ts} +52 -19
- package/dist/components/menu/Menu.d.ts.map +1 -0
- package/dist/components/menu/Menu.js +161 -0
- package/dist/components/menu/index.d.ts +5 -0
- package/dist/components/menu/index.d.ts.map +1 -0
- package/dist/components/menu/index.js +4 -0
- package/dist/components/{select-menu/select-menu-config.d.ts → menu/menu-config.d.ts} +5 -5
- package/dist/components/menu/menu-config.d.ts.map +1 -0
- package/dist/components/{select-menu/select-menu-config.js → menu/menu-config.js} +2 -2
- package/dist/components/menu/menu-navigation.d.ts +38 -0
- package/dist/components/menu/menu-navigation.d.ts.map +1 -0
- package/dist/components/menu/menu-navigation.js +20 -0
- package/dist/components/{select-menu/use-select-floating.d.ts → menu/use-menu-floating.d.ts} +10 -10
- package/dist/components/menu/use-menu-floating.d.ts.map +1 -0
- package/dist/components/{select-menu/use-select-floating.js → menu/use-menu-floating.js} +2 -2
- package/dist/components/modal/Modal.d.ts +6 -1
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +62 -45
- package/dist/components/multi-select/MultiSelect.d.ts +11 -10
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
- package/dist/components/multi-select/MultiSelect.js +99 -86
- package/dist/components/multi-select/multi-select-config.d.ts +1 -1
- package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
- package/dist/components/navbar/Navbar.d.ts +87 -0
- package/dist/components/navbar/Navbar.d.ts.map +1 -0
- package/dist/components/navbar/Navbar.js +117 -0
- package/dist/components/navbar/index.d.ts +3 -0
- package/dist/components/navbar/index.d.ts.map +1 -0
- package/dist/components/navbar/index.js +3 -0
- package/dist/components/navbar/navbar-config.d.ts +52 -0
- package/dist/components/navbar/navbar-config.d.ts.map +1 -0
- package/dist/components/navbar/navbar-config.js +20 -0
- package/dist/components/navbar/navbar-styles.d.ts +28 -0
- package/dist/components/navbar/navbar-styles.d.ts.map +1 -0
- package/dist/components/navbar/navbar-styles.js +9 -0
- package/dist/components/page/Page.d.ts +166 -0
- package/dist/components/page/Page.d.ts.map +1 -0
- package/dist/components/page/Page.js +90 -0
- package/dist/components/page/index.d.ts +3 -0
- package/dist/components/page/index.d.ts.map +1 -0
- package/dist/components/page/index.js +3 -0
- package/dist/components/page/page-config.d.ts +57 -0
- package/dist/components/page/page-config.d.ts.map +1 -0
- package/dist/components/page/page-config.js +20 -0
- package/dist/components/page/page-styles.d.ts +25 -0
- package/dist/components/page/page-styles.d.ts.map +1 -0
- package/dist/components/page/page-styles.js +5 -0
- package/dist/components/pagination/Pagination.d.ts +91 -0
- package/dist/components/pagination/Pagination.d.ts.map +1 -0
- package/dist/components/pagination/Pagination.js +66 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.d.ts.map +1 -0
- package/dist/components/pagination/index.js +4 -0
- package/dist/components/pagination/pagination-config.d.ts +66 -0
- package/dist/components/pagination/pagination-config.d.ts.map +1 -0
- package/dist/components/pagination/pagination-config.js +19 -0
- package/dist/components/pagination/pagination-styles.d.ts +19 -0
- package/dist/components/pagination/pagination-styles.d.ts.map +1 -0
- package/dist/components/pagination/pagination-styles.js +5 -0
- package/dist/components/pagination/pagination.helpers.d.ts +26 -0
- package/dist/components/pagination/pagination.helpers.d.ts.map +1 -0
- package/dist/components/pagination/pagination.helpers.js +12 -0
- package/dist/components/pin-input/PinInput.d.ts +109 -0
- package/dist/components/pin-input/PinInput.d.ts.map +1 -0
- package/dist/components/pin-input/PinInput.js +124 -0
- package/dist/components/pin-input/index.d.ts +3 -0
- package/dist/components/pin-input/index.d.ts.map +1 -0
- package/dist/components/pin-input/index.js +3 -0
- package/dist/components/pin-input/pin-input-config.d.ts +82 -0
- package/dist/components/pin-input/pin-input-config.d.ts.map +1 -0
- package/dist/components/pin-input/pin-input-config.js +23 -0
- package/dist/components/pin-input/pin-input-styles.d.ts +16 -0
- package/dist/components/pin-input/pin-input-styles.d.ts.map +1 -0
- package/dist/components/pin-input/pin-input-styles.js +9 -0
- package/dist/components/pricing-card/PricingCard.d.ts +87 -0
- package/dist/components/pricing-card/PricingCard.d.ts.map +1 -0
- package/dist/components/pricing-card/PricingCard.js +79 -0
- package/dist/components/pricing-card/index.d.ts +3 -0
- package/dist/components/pricing-card/index.d.ts.map +1 -0
- package/dist/components/pricing-card/index.js +3 -0
- package/dist/components/pricing-card/pricing-card-config.d.ts +35 -0
- package/dist/components/pricing-card/pricing-card-config.d.ts.map +1 -0
- package/dist/components/pricing-card/pricing-card-config.js +16 -0
- package/dist/components/pricing-card/pricing-card-styles.d.ts +21 -0
- package/dist/components/pricing-card/pricing-card-styles.d.ts.map +1 -0
- package/dist/components/pricing-card/pricing-card-styles.js +5 -0
- package/dist/components/radio/Radio.d.ts +53 -107
- package/dist/components/radio/Radio.d.ts.map +1 -1
- package/dist/components/radio/Radio.js +50 -36
- package/dist/components/radio/RadioGroup.d.ts +107 -53
- package/dist/components/radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/radio/RadioGroup.js +43 -49
- package/dist/components/radio/index.d.ts +0 -1
- package/dist/components/radio/index.d.ts.map +1 -1
- package/dist/components/resizable-screen/ResizableScreen.d.ts +4 -4
- package/dist/components/scrollbar/index.js +1 -0
- package/dist/components/scrollbar/scrollbar-config.js +13 -0
- package/dist/components/section/Section.d.ts +56 -0
- package/dist/components/section/Section.d.ts.map +1 -0
- package/dist/components/section/Section.js +27 -0
- package/dist/components/section/index.d.ts +3 -0
- package/dist/components/section/index.d.ts.map +1 -0
- package/dist/components/section/index.js +3 -0
- package/dist/components/section/section-config.d.ts +64 -0
- package/dist/components/section/section-config.d.ts.map +1 -0
- package/dist/components/section/section-config.js +20 -0
- package/dist/components/section/section-styles.d.ts +8 -0
- package/dist/components/section/section-styles.d.ts.map +1 -0
- package/dist/components/section/section-styles.js +9 -0
- package/dist/components/section-kit/ActionGroup.d.ts +47 -0
- package/dist/components/section-kit/ActionGroup.d.ts.map +1 -0
- package/dist/components/section-kit/ActionGroup.js +35 -0
- package/dist/components/section-kit/SectionHeading.d.ts +65 -0
- package/dist/components/section-kit/SectionHeading.d.ts.map +1 -0
- package/dist/components/section-kit/SectionHeading.js +34 -0
- package/dist/components/section-kit/index.d.ts +12 -0
- package/dist/components/section-kit/index.d.ts.map +1 -0
- package/dist/components/section-kit/index.js +2 -0
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.js +92 -90
- package/dist/components/sidebar-layout/SidebarLayout.d.ts +67 -0
- package/dist/components/sidebar-layout/SidebarLayout.d.ts.map +1 -0
- package/dist/components/sidebar-layout/SidebarLayout.js +40 -0
- package/dist/components/sidebar-layout/index.d.ts +3 -0
- package/dist/components/sidebar-layout/index.d.ts.map +1 -0
- package/dist/components/sidebar-layout/index.js +3 -0
- package/dist/components/sidebar-layout/sidebar-layout-config.d.ts +49 -0
- package/dist/components/sidebar-layout/sidebar-layout-config.d.ts.map +1 -0
- package/dist/components/sidebar-layout/sidebar-layout-config.js +16 -0
- package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts +21 -0
- package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts.map +1 -0
- package/dist/components/sidebar-layout/sidebar-layout-styles.js +9 -0
- package/dist/components/skeleton/Skeleton.d.ts +65 -0
- package/dist/components/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/Skeleton.js +29 -0
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/index.d.ts.map +1 -0
- package/dist/components/skeleton/index.js +3 -0
- package/dist/components/skeleton/skeleton-config.d.ts +40 -0
- package/dist/components/skeleton/skeleton-config.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton-config.js +13 -0
- package/dist/components/skeleton/skeleton-styles.d.ts +19 -0
- package/dist/components/skeleton/skeleton-styles.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton-styles.js +5 -0
- package/dist/components/stack/Stack.d.ts +107 -0
- package/dist/components/stack/Stack.d.ts.map +1 -0
- package/dist/components/stack/Stack.js +36 -0
- package/dist/components/stack/index.d.ts +3 -0
- package/dist/components/stack/index.d.ts.map +1 -0
- package/dist/components/stack/index.js +3 -0
- package/dist/components/stack/stack-config.d.ts +68 -0
- package/dist/components/stack/stack-config.d.ts.map +1 -0
- package/dist/components/stack/stack-config.js +20 -0
- package/dist/components/stack/stack-styles.d.ts +10 -0
- package/dist/components/stack/stack-styles.d.ts.map +1 -0
- package/dist/components/stack/stack-styles.js +21 -0
- package/dist/components/switch/Switch.d.ts.map +1 -1
- package/dist/components/switch/Switch.js +7 -5
- package/dist/components/table/Table.js +3 -3
- package/dist/components/tabs/Tabs.js +3 -3
- package/dist/components/testimonials/Testimonials.d.ts +78 -0
- package/dist/components/testimonials/Testimonials.d.ts.map +1 -0
- package/dist/components/testimonials/Testimonials.js +96 -0
- package/dist/components/testimonials/index.d.ts +3 -0
- package/dist/components/testimonials/index.d.ts.map +1 -0
- package/dist/components/testimonials/index.js +3 -0
- package/dist/components/testimonials/testimonials-config.d.ts +44 -0
- package/dist/components/testimonials/testimonials-config.d.ts.map +1 -0
- package/dist/components/testimonials/testimonials-config.js +28 -0
- package/dist/components/testimonials/testimonials-styles.d.ts +11 -0
- package/dist/components/testimonials/testimonials-styles.d.ts.map +1 -0
- package/dist/components/testimonials/testimonials-styles.js +5 -0
- package/dist/components/textarea/Textarea.d.ts +10 -10
- package/dist/components/textarea/Textarea.js +7 -7
- package/dist/components/textarea/textarea-config.d.ts +2 -2
- package/dist/components/toast/ToastItem.d.ts.map +1 -1
- package/dist/components/toast/ToastItem.js +8 -7
- package/dist/components/tooltip/Tooltip.js +5 -5
- package/dist/components/typography/Typography.d.ts +60 -0
- package/dist/components/typography/Typography.d.ts.map +1 -0
- package/dist/components/typography/Typography.js +28 -0
- package/dist/components/typography/index.d.ts +3 -0
- package/dist/components/typography/index.d.ts.map +1 -0
- package/dist/components/typography/index.js +3 -0
- package/dist/components/typography/typography-config.d.ts +54 -0
- package/dist/components/typography/typography-config.d.ts.map +1 -0
- package/dist/components/typography/typography-config.js +12 -0
- package/dist/components/typography/typography-styles.d.ts +21 -0
- package/dist/components/typography/typography-styles.d.ts.map +1 -0
- package/dist/components/typography/typography-styles.js +19 -0
- package/dist/config/default-config.d.ts.map +1 -1
- package/dist/config/default-config.js +2 -2
- package/dist/config/index.js +1 -0
- package/dist/config/validate-config.d.ts +34 -0
- package/dist/config/validate-config.d.ts.map +1 -0
- package/dist/config/validate-config.js +190 -0
- package/dist/icons/CopyIcon.d.ts +3 -0
- package/dist/icons/CopyIcon.d.ts.map +1 -0
- package/dist/icons/CopyIcon.js +24 -0
- package/dist/index.d.ts +33 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +110 -61
- package/dist/libs/index.js +3 -0
- package/dist/libs/use-body-scroll-lock.d.ts +21 -0
- package/dist/libs/use-body-scroll-lock.d.ts.map +1 -0
- package/dist/libs/use-body-scroll-lock.js +27 -0
- package/dist/libs/use-dialog-overlay.d.ts +21 -0
- package/dist/libs/use-dialog-overlay.d.ts.map +1 -0
- package/dist/libs/use-dialog-overlay.js +21 -0
- package/dist/libs/use-prefers-reduced-motion.d.ts +23 -0
- package/dist/libs/use-prefers-reduced-motion.d.ts.map +1 -0
- package/dist/libs/use-prefers-reduced-motion.js +19 -0
- package/dist/puck/adapters.d.ts +41 -0
- package/dist/puck/adapters.d.ts.map +1 -0
- package/dist/puck/adapters.js +30 -0
- package/dist/puck/blocks/content.d.ts +32 -0
- package/dist/puck/blocks/content.d.ts.map +1 -0
- package/dist/puck/blocks/content.js +54 -0
- package/dist/puck/blocks/layout.d.ts +44 -0
- package/dist/puck/blocks/layout.d.ts.map +1 -0
- package/dist/puck/blocks/layout.js +69 -0
- package/dist/puck/blocks/navigation.d.ts +66 -0
- package/dist/puck/blocks/navigation.d.ts.map +1 -0
- package/dist/puck/blocks/navigation.js +122 -0
- package/dist/puck/blocks/sections.d.ts +134 -0
- package/dist/puck/blocks/sections.d.ts.map +1 -0
- package/dist/puck/blocks/sections.js +232 -0
- package/dist/puck/blocks/utility.d.ts +22 -0
- package/dist/puck/blocks/utility.d.ts.map +1 -0
- package/dist/puck/blocks/utility.js +49 -0
- package/dist/puck/config.d.ts +63 -0
- package/dist/puck/config.d.ts.map +1 -0
- package/dist/puck/config.js +79 -0
- package/dist/puck/fields.d.ts +94 -0
- package/dist/puck/fields.d.ts.map +1 -0
- package/dist/puck/fields.js +116 -0
- package/dist/puck/index.d.ts +21 -0
- package/dist/puck/index.d.ts.map +1 -0
- package/dist/puck/index.js +10 -0
- package/dist/scripts/AsheeThemeScript.js +43 -8
- package/dist/shared/action.d.ts +52 -0
- package/dist/shared/action.d.ts.map +1 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/spacing.d.ts +38 -0
- package/dist/shared/spacing.d.ts.map +1 -0
- package/dist/shared/spacing.js +29 -0
- package/dist/shared/typography.d.ts +81 -0
- package/dist/shared/typography.d.ts.map +1 -0
- package/dist/shared/typography.js +137 -0
- package/dist/utils/resolve-token.d.ts +32 -7
- package/dist/utils/resolve-token.d.ts.map +1 -1
- package/dist/utils/resolve-token.js +9 -1
- package/dist/utils/stacking.d.ts +2 -2
- package/dist/utils/stacking.d.ts.map +1 -1
- package/package.json +26 -7
- package/dist/components/date-picker/Calendar.d.ts.map +0 -1
- package/dist/components/date-picker/Calendar.js +0 -143
- package/dist/components/date-picker/DatePicker.d.ts.map +0 -1
- package/dist/components/date-picker/TimeSpinner.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker-config.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker-styles.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker.helpers.d.ts.map +0 -1
- package/dist/components/date-picker/index.d.ts +0 -3
- package/dist/components/date-picker/index.d.ts.map +0 -1
- package/dist/components/date-picker/index.js +0 -6
- package/dist/components/select/Select.js +0 -98
- package/dist/components/select/index.d.ts +0 -3
- package/dist/components/select/index.d.ts.map +0 -1
- package/dist/components/select/index.js +0 -3
- package/dist/components/select/select-config.d.ts.map +0 -1
- package/dist/components/select/select-styles.d.ts.map +0 -1
- package/dist/components/select-menu/SelectMenu.d.ts.map +0 -1
- package/dist/components/select-menu/SelectMenu.js +0 -104
- package/dist/components/select-menu/index.d.ts +0 -4
- package/dist/components/select-menu/index.d.ts.map +0 -1
- package/dist/components/select-menu/index.js +0 -3
- package/dist/components/select-menu/select-menu-config.d.ts.map +0 -1
- package/dist/components/select-menu/use-select-floating.d.ts.map +0 -1
- /package/dist/components/{date-picker → calendar}/TimeSpinner.d.ts +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Color, Size } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* Theme configuration options for the Breadcrumb component.
|
|
4
|
+
*
|
|
5
|
+
* Set under `components.breadcrumb` in the AsheeUI config. Values feed the
|
|
6
|
+
* component-level fallback tier of the theme cascade.
|
|
7
|
+
*/
|
|
8
|
+
export interface BreadcrumbConfig {
|
|
9
|
+
/**
|
|
10
|
+
* Text and spacing scale of the trail.
|
|
11
|
+
*
|
|
12
|
+
* @default "md"
|
|
13
|
+
*/
|
|
14
|
+
size?: Size;
|
|
15
|
+
/**
|
|
16
|
+
* Theme accent colour of the links in the trail.
|
|
17
|
+
* The current location is presented in the foreground colour instead.
|
|
18
|
+
*
|
|
19
|
+
* @default "primary"
|
|
20
|
+
*/
|
|
21
|
+
color?: Color;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Default config values registered for the Breadcrumb component.
|
|
25
|
+
*
|
|
26
|
+
* `color` is intentionally absent so it inherits from the global
|
|
27
|
+
* `defaultColor`.
|
|
28
|
+
*/
|
|
29
|
+
export declare const defaultBreadcrumbConfig: BreadcrumbConfig;
|
|
30
|
+
/**
|
|
31
|
+
* Hard fallback values used when no config tier provides a value.
|
|
32
|
+
* These values are used when instance props, component config,
|
|
33
|
+
* and global defaults are all undefined.
|
|
34
|
+
*/
|
|
35
|
+
export declare const FALLBACK_BREADCRUMB_CONFIG: Required<BreadcrumbConfig>;
|
|
36
|
+
declare module "../../libs/registry" {
|
|
37
|
+
interface ComponentTypeConfigRegistry {
|
|
38
|
+
breadcrumb: BreadcrumbConfig;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=breadcrumb-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb-config.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;;;;OAKG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAErC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,gBAAgB,CAGxD,CAAC;AAEX,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,UAAU,EAAE,gBAAgB,CAAC;KAC9B;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/breadcrumb/breadcrumb-config.ts
|
|
4
|
+
var t = { size: "md" }, n = {
|
|
5
|
+
size: "md",
|
|
6
|
+
color: "primary"
|
|
7
|
+
};
|
|
8
|
+
e("breadcrumb", t);
|
|
9
|
+
//#endregion
|
|
10
|
+
export { n as FALLBACK_BREADCRUMB_CONFIG, t as defaultBreadcrumbConfig };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Size } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* CSS classes for the trail's text size based on size.
|
|
4
|
+
*/
|
|
5
|
+
export declare const BREADCRUMB_FONT_CLASS: Record<Size, string>;
|
|
6
|
+
/**
|
|
7
|
+
* CSS classes for the gap between trail items based on size.
|
|
8
|
+
*/
|
|
9
|
+
export declare const BREADCRUMB_GAP_CLASS: Record<Size, string>;
|
|
10
|
+
/**
|
|
11
|
+
* CSS classes for the separator's icon size based on size.
|
|
12
|
+
*/
|
|
13
|
+
export declare const BREADCRUMB_SEPARATOR_ICON_CLASS: Record<Size, string>;
|
|
14
|
+
/**
|
|
15
|
+
* Base classes for the navigation landmark.
|
|
16
|
+
*/
|
|
17
|
+
export declare const BREADCRUMB_BASE_CLASS = "w-full";
|
|
18
|
+
/**
|
|
19
|
+
* Classes for the ordered list that holds the trail.
|
|
20
|
+
*/
|
|
21
|
+
export declare const BREADCRUMB_LIST_CLASS = "flex items-center flex-wrap list-none p-0 m-0";
|
|
22
|
+
/**
|
|
23
|
+
* Classes for the current location.
|
|
24
|
+
* It is presented in the foreground colour so it reads as the end of the
|
|
25
|
+
* trail rather than as another link.
|
|
26
|
+
*/
|
|
27
|
+
export declare const BREADCRUMB_CURRENT_CLASS = "inline-flex items-center gap-1.5 min-w-0 truncate font-medium text-foreground";
|
|
28
|
+
//# sourceMappingURL=breadcrumb-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb-styles.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAItD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAIrD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAIhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,qBAAqB,kDACe,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,kFAC4C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/breadcrumb/breadcrumb-styles.ts
|
|
3
|
+
var e = {
|
|
4
|
+
sm: "text-xs",
|
|
5
|
+
md: "text-sm",
|
|
6
|
+
lg: "text-base"
|
|
7
|
+
}, t = {
|
|
8
|
+
sm: "gap-1",
|
|
9
|
+
md: "gap-1.5",
|
|
10
|
+
lg: "gap-2"
|
|
11
|
+
}, n = {
|
|
12
|
+
sm: "[&_svg]:size-3",
|
|
13
|
+
md: "[&_svg]:size-3.5",
|
|
14
|
+
lg: "[&_svg]:size-4"
|
|
15
|
+
}, r = "w-full", i = "flex items-center flex-wrap list-none p-0 m-0", a = "inline-flex items-center gap-1.5 min-w-0 truncate font-medium text-foreground";
|
|
16
|
+
//#endregion
|
|
17
|
+
export { r as BREADCRUMB_BASE_CLASS, a as BREADCRUMB_CURRENT_CLASS, e as BREADCRUMB_FONT_CLASS, t as BREADCRUMB_GAP_CLASS, i as BREADCRUMB_LIST_CLASS, n as BREADCRUMB_SEPARATOR_ICON_CLASS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,WAAW,EAGhB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAiBf,OAAO,EAAE,KAAK,YAAY,EAA0B,MAAM,iBAAiB,CAAC;AAK5E;;;GAGG;AACH,KAAK,eAAe,GAAG,YAAY,GACjC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAErC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,WAAW,EAGhB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAiBf,OAAO,EAAE,KAAK,YAAY,EAA0B,MAAM,iBAAiB,CAAC;AAK5E;;;GAGG;AACH,KAAK,eAAe,GAAG,YAAY,GACjC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAErC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH,eAAO,MAAM,MAAM,2GA0IlB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn as e } from "../../utils/cn.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { RADIUS_CLASS as t, UnderlineRadius as n } from "../../shared/radius.js";
|
|
5
|
+
import { resolveVariantClass as r } from "../../shared/variant.js";
|
|
6
|
+
import { useAsheeConfig as i } from "../../libs/context.js";
|
|
7
7
|
import { resolveCascade as a, resolveClassKey as o, resolveRadiusKey as s } from "../../utils/resolve-token.js";
|
|
8
8
|
import { Spinner as c } from "../spinner/spinner.js";
|
|
9
9
|
import { FALLBACK_BUTTON_CONFIG as l } from "./button-config.js";
|
|
@@ -12,13 +12,13 @@ import { forwardRef as f } from "react";
|
|
|
12
12
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/button/Button.tsx
|
|
14
14
|
var h = f((f, h) => {
|
|
15
|
-
let { variant: g, color: _, size: v, radius: y, animate: b, fullWidth: x, isDisabled: S, isLoading: C, icon: w, className: T, children: E, type: D = "button", onClick: O, startContent: k, endContent: A, href: j, link: M, ...N } = f, P =
|
|
15
|
+
let { variant: g, color: _, size: v, radius: y, animate: b, fullWidth: x, isDisabled: S, isLoading: C, icon: w, className: T, children: E, type: D = "button", onClick: O, startContent: k, endContent: A, href: j, link: M, ...N } = f, P = i(), F = P.components?.button, I = a(g, F?.variant, P.defaultVariant, l.variant), L = a(_, F?.color, P.defaultColor, l.color), R = a(v, F?.size, void 0, l.size), z = s(y, F?.radius, P.defaultRadius, l.radius), B = a(b, F?.animate, l.animate, l.animate), V = a(x, F?.fullWidth, void 0, l.fullWidth), H = w ? u[R] : d[R], U = S || C, W = !!(j || M), G = M?.component ?? (W ? "a" : "button"), { onClick: K, ...q } = M?.props ?? {}, J = (e) => {
|
|
16
16
|
if (U) {
|
|
17
17
|
e.preventDefault();
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
O?.(e), K?.(e);
|
|
21
|
-
}, Y = e("inline-flex items-center justify-center font-medium transition-colors select-none shrink-0", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50", "aria-disabled:pointer-events-none aria-disabled:opacity-50", V && "w-full", B && "motion-safe:transition-transform motion-safe:duration-100 motion-safe:active:scale-[0.99]",
|
|
21
|
+
}, Y = e("inline-flex items-center justify-center font-medium transition-colors select-none shrink-0", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50", "aria-disabled:pointer-events-none aria-disabled:opacity-50", V && "w-full", B && "motion-safe:transition-transform motion-safe:duration-100 motion-safe:active:scale-[0.99]", r(I, L), H, o(n(I, z), t, n(I, l.radius)), T);
|
|
22
22
|
return /* @__PURE__ */ m(G, {
|
|
23
23
|
ref: h,
|
|
24
24
|
...W ? { href: j } : {
|
|
@@ -35,10 +35,13 @@ var h = f((f, h) => {
|
|
|
35
35
|
C && /* @__PURE__ */ p(c, { className: R }),
|
|
36
36
|
C && /* @__PURE__ */ p("span", {
|
|
37
37
|
className: "sr-only",
|
|
38
|
-
children: "Loading"
|
|
38
|
+
children: "Loading "
|
|
39
39
|
}),
|
|
40
|
+
C ? /* @__PURE__ */ p("span", {
|
|
41
|
+
className: "sr-only",
|
|
42
|
+
children: E
|
|
43
|
+
}) : E,
|
|
40
44
|
!C && k,
|
|
41
|
-
!C && E,
|
|
42
45
|
!C && A
|
|
43
46
|
]
|
|
44
47
|
});
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { InputProps } from '../input/Input';
|
|
2
|
-
import {
|
|
2
|
+
import { CalendarConfig, CalendarPickerConfig } from './calendar-config';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the picker (calendar popover).
|
|
5
|
-
* Extends
|
|
5
|
+
* Extends CalendarPickerConfig with instance-only props.
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface CalendarPickerProps extends CalendarPickerConfig {
|
|
8
8
|
/**
|
|
9
9
|
* Extra CSS classes for the calendar popover.
|
|
10
10
|
*/
|
|
11
11
|
className?: string;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Base
|
|
15
|
-
* Combines
|
|
14
|
+
* Base Calendar props excluding the picker configuration.
|
|
15
|
+
* Combines CalendarConfig (minus picker) with InputProps (minus value-related props).
|
|
16
16
|
*/
|
|
17
|
-
export type
|
|
17
|
+
export type BaseCalendarProps = Omit<CalendarConfig, "picker"> & Omit<InputProps, "onChange" | "value" | "defaultValue" | "endContent" | "startContent">;
|
|
18
18
|
/**
|
|
19
|
-
* Configuration options for the
|
|
19
|
+
* Configuration options for the Calendar component.
|
|
20
20
|
* Extends InputProps but omits value-related props that are replaced
|
|
21
21
|
* with date-specific equivalents.
|
|
22
22
|
*/
|
|
23
|
-
export interface
|
|
23
|
+
export interface CalendarProps extends BaseCalendarProps {
|
|
24
24
|
/**
|
|
25
25
|
* The currently selected date.
|
|
26
26
|
* Pass null for no selection.
|
|
@@ -35,7 +35,7 @@ export interface DatePickerProps extends BaseDatePickerProps {
|
|
|
35
35
|
* Picker configuration overrides including portal, portalTarget, and className.
|
|
36
36
|
* All picker-related props should be passed through this object.
|
|
37
37
|
*/
|
|
38
|
-
picker?:
|
|
38
|
+
picker?: CalendarPickerProps;
|
|
39
39
|
/**
|
|
40
40
|
* Whether a clear button is shown in the input.
|
|
41
41
|
* When true, a clear button appears when a date is selected.
|
|
@@ -54,7 +54,7 @@ export interface DatePickerProps extends BaseDatePickerProps {
|
|
|
54
54
|
/**
|
|
55
55
|
* A date/time picker component with calendar popover and time selection.
|
|
56
56
|
*
|
|
57
|
-
*
|
|
57
|
+
* Calendar renders an input field with a calendar popover that allows
|
|
58
58
|
* selecting dates and/or times. It supports date, time, and datetime modes,
|
|
59
59
|
* clearable selection, and future date restrictions. The component integrates
|
|
60
60
|
* with Floating UI for popover positioning and follows the standard AsheeUI
|
|
@@ -64,10 +64,10 @@ export interface DatePickerProps extends BaseDatePickerProps {
|
|
|
64
64
|
* render at the document body level. This ensures the popover escapes CSS
|
|
65
65
|
* containment, overflow clipping, and stacking context issues. The portal
|
|
66
66
|
* can be disabled via the `picker.portal` prop or
|
|
67
|
-
* `components.
|
|
67
|
+
* `components.calendar.picker.portal` in the config if the popover needs
|
|
68
68
|
* to stay within a specific parent container.
|
|
69
69
|
*
|
|
70
|
-
* @param props -
|
|
70
|
+
* @param props - Calendar configuration options.
|
|
71
71
|
* @param props.selected - Currently selected date or null.
|
|
72
72
|
* @param props.onChange - Callback fired when the date changes.
|
|
73
73
|
* @param props.mode - Selection mode: "date", "time", or "datetime". Defaults to "date".
|
|
@@ -89,17 +89,17 @@ export interface DatePickerProps extends BaseDatePickerProps {
|
|
|
89
89
|
*
|
|
90
90
|
* @example
|
|
91
91
|
* ```tsx
|
|
92
|
-
* import {
|
|
92
|
+
* import { Calendar } from "asheeui";
|
|
93
93
|
* import { useState } from "react";
|
|
94
94
|
*
|
|
95
95
|
* export function Example() {
|
|
96
96
|
* const [selected, setSelected] = useState<Date | null>(null);
|
|
97
97
|
*
|
|
98
98
|
* return (
|
|
99
|
-
* <
|
|
99
|
+
* <Calendar
|
|
100
100
|
* selected={selected}
|
|
101
101
|
* onChange={setSelected}
|
|
102
|
-
* label="
|
|
102
|
+
* label="Dropmenu Date"
|
|
103
103
|
* isClearable
|
|
104
104
|
* />
|
|
105
105
|
* );
|
|
@@ -109,9 +109,9 @@ export interface DatePickerProps extends BaseDatePickerProps {
|
|
|
109
109
|
* @example
|
|
110
110
|
* ```tsx
|
|
111
111
|
* // With datetime mode and custom picker configuration
|
|
112
|
-
* <
|
|
112
|
+
* <Calendar
|
|
113
113
|
* mode="datetime"
|
|
114
|
-
* label="
|
|
114
|
+
* label="Dropmenu Date and Time"
|
|
115
115
|
* isClearable
|
|
116
116
|
* picker={{
|
|
117
117
|
* className: "custom-calendar",
|
|
@@ -120,9 +120,9 @@ export interface DatePickerProps extends BaseDatePickerProps {
|
|
|
120
120
|
* />
|
|
121
121
|
* ```
|
|
122
122
|
*
|
|
123
|
-
* @see
|
|
123
|
+
* @see CalendarConfig - The configuration type for component defaults.
|
|
124
124
|
* @see Input - The underlying input component.
|
|
125
|
-
* @see
|
|
125
|
+
* @see DateGrid - The calendar popover component.
|
|
126
126
|
*/
|
|
127
|
-
export declare const
|
|
128
|
-
//# sourceMappingURL=
|
|
127
|
+
export declare const Calendar: import('react').ForwardRefExoticComponent<CalendarProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
128
|
+
//# sourceMappingURL=Calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/Calendar.tsx"],"names":[],"mappings":"AA+BA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAQxD,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,oBAAoB,EAE1B,MAAM,mBAAmB,CAAC;AAG3B;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,GAC5D,IAAI,CACF,UAAU,EACV,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,YAAY,GAAG,cAAc,CACtE,CAAC;AAEJ;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD;;;OAGG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAEvC;;;OAGG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAE7B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,eAAO,MAAM,QAAQ,4GA+VpB,CAAC"}
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn as e } from "../../utils/cn.js";
|
|
4
4
|
import { ASHEE_LAYER as t } from "../../utils/stacking.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { RADIUS_CLASS as n } from "../../shared/radius.js";
|
|
6
|
+
import { useAsheeConfig as r } from "../../libs/context.js";
|
|
7
7
|
import { resolveCascade as i, resolveClassKey as a, resolveRadiusKey as o } from "../../utils/resolve-token.js";
|
|
8
8
|
import { Input as s } from "../input/Input.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { FALLBACK_MENU_CONFIG as c } from "../menu/menu-config.js";
|
|
10
|
+
import { useMenuFloating as l } from "../menu/use-menu-floating.js";
|
|
11
11
|
import { CalendarIcon as u } from "../../icons/CalendarIcon.js";
|
|
12
12
|
import { ClearIcon as d } from "../../icons/ClearIcon.js";
|
|
13
13
|
import { ClockIcon as ee } from "../../icons/ClockIcon.js";
|
|
14
|
-
import { formatDisplay as f, getDefaultPlaceholder as p, getNewCursorPosition as m, parseDateString as h } from "./
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { formatDisplay as f, getDefaultPlaceholder as p, getNewCursorPosition as m, parseDateString as h } from "./calendar.helpers.js";
|
|
15
|
+
import { FALLBACK_DATE_PICKER_CONFIG as g } from "./calendar-config.js";
|
|
16
|
+
import { DateGrid as _ } from "./DateGrid.js";
|
|
17
17
|
import { forwardRef as v, useCallback as y, useEffect as b, useId as x, useRef as S, useState as C } from "react";
|
|
18
18
|
import { Fragment as te, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
19
19
|
import { FloatingFocusManager as E, FloatingPortal as D } from "@floating-ui/react";
|
|
20
|
-
//#region src/components/
|
|
20
|
+
//#region src/components/calendar/Calendar.tsx
|
|
21
21
|
var O = v(({ selected: v, onChange: O, mode: k, isClearable: A = !1, disableFuture: j = !1, placeholder: ne, size: M, radius: N, color: P, disabled: F, picker: I, ...L }, R) => {
|
|
22
|
-
let z =
|
|
22
|
+
let z = r(), B = z.components?.calendar, V = x(), H = L.id ?? V, [U, W] = C(!1), [G, K] = C(""), q = S(null), J = i(k, B?.mode, void 0, g.mode), Y = i(I?.portal, B?.picker?.portal, void 0, c.portal), re = i(I?.portalTarget, B?.picker?.portalTarget, void 0, null), X = i(I?.lockScroll, B?.picker?.lockScroll, void 0, !0), ie = i(M, B?.size, void 0, g.size), ae = i(P, B?.color, z.defaultColor, g.color), Z = o(typeof N == "string" ? N : void 0, typeof B?.radius == "string" ? B.radius : void 0, z.defaultRadius, g.radius), oe = a(Z === "full" ? "xl" : Z, n, g.radius), { refs: Q, context: se, floatingStyles: ce, isPositioned: le, getReferenceProps: ue, getFloatingProps: de } = l({
|
|
23
23
|
isOpen: U,
|
|
24
24
|
onOpenChange: W,
|
|
25
25
|
disabled: F,
|
|
@@ -80,7 +80,7 @@ var O = v(({ selected: v, onChange: O, mode: k, isClearable: A = !1, disableFutu
|
|
|
80
80
|
style: { ...ce },
|
|
81
81
|
className: e("outline-none w-max", "transition-none", le ? "animate-in fade-in-0 zoom-in-95 duration-150 ease-out" : "invisible opacity-0 pointer-events-none", I?.className),
|
|
82
82
|
...de(),
|
|
83
|
-
children: /* @__PURE__ */ w(
|
|
83
|
+
children: /* @__PURE__ */ w(_, {
|
|
84
84
|
selected: v,
|
|
85
85
|
mode: J,
|
|
86
86
|
isClearable: A,
|
|
@@ -118,6 +118,6 @@ var O = v(({ selected: v, onChange: O, mode: k, isClearable: A = !1, disableFutu
|
|
|
118
118
|
}) : $)]
|
|
119
119
|
});
|
|
120
120
|
});
|
|
121
|
-
O.displayName = "
|
|
121
|
+
O.displayName = "Calendar";
|
|
122
122
|
//#endregion
|
|
123
|
-
export { O as
|
|
123
|
+
export { O as Calendar };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Color } from '../../shared';
|
|
2
2
|
import { FieldSizeKey } from '../field/field-config';
|
|
3
|
-
import {
|
|
4
|
-
interface
|
|
3
|
+
import { CalendarMode } from './calendar-config';
|
|
4
|
+
interface DateGridProps {
|
|
5
5
|
/**
|
|
6
6
|
* The currently selected date.
|
|
7
7
|
* Used to highlight the selected day and initialize time values.
|
|
@@ -11,7 +11,7 @@ interface CalendarProps {
|
|
|
11
11
|
* Selection mode of the picker.
|
|
12
12
|
* Controls whether the calendar, time spinners, or both are shown.
|
|
13
13
|
*/
|
|
14
|
-
mode:
|
|
14
|
+
mode: CalendarMode;
|
|
15
15
|
/**
|
|
16
16
|
* Whether a clear button is shown in the footer.
|
|
17
17
|
*/
|
|
@@ -50,13 +50,13 @@ interface CalendarProps {
|
|
|
50
50
|
disableFuture?: boolean;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* DateGrid popover component with month navigation and date selection.
|
|
54
54
|
*
|
|
55
|
-
* Memoized so parent-driven renders (the
|
|
55
|
+
* Memoized so parent-driven renders (the Calendar popover's one-time
|
|
56
56
|
* `isPositioned` flip, input typing, open/close) do not rebuild the month
|
|
57
57
|
* grid. Every prop is a primitive or a stable callback, so React.memo can
|
|
58
58
|
* skip those renders.
|
|
59
59
|
*/
|
|
60
|
-
export declare const
|
|
60
|
+
export declare const DateGrid: import('react').MemoExoticComponent<({ selected, mode, isClearable, resolvedSizeKey, resolvedColor, radiusClass, onSelect, onClose, disableFuture, }: DateGridProps) => import("react").JSX.Element>;
|
|
61
61
|
export {};
|
|
62
|
-
//# sourceMappingURL=
|
|
62
|
+
//# sourceMappingURL=DateGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateGrid.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/DateGrid.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAStD,UAAU,aAAa;IACrB;;;OAGG;IACH,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC;;;OAGG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,eAAe,EAAE,YAAY,CAAC;IAC9B;;;OAGG;IACH,aAAa,EAAE,KAAK,CAAC;IACrB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,wJAUlB,aAAa,iCAyYd,CAAC"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../utils/cn.js";
|
|
3
|
+
import { ChevronRightIcon as t } from "../../icons/ChevronRightIcon.js";
|
|
4
|
+
import { DAYS_OF_WEEK as n, MONTHS as r, buildDayCells as ee } from "./calendar.helpers.js";
|
|
5
|
+
import { ChevronLeftIcon as i } from "../../icons/ChevronLeftIcon.js";
|
|
6
|
+
import { CALENDAR_COLOR_CLASSES as a, DATE_PICKER_CELL_SIZE_CLASS as o } from "./calendar-styles.js";
|
|
7
|
+
import { TimeSpinner as s } from "./TimeSpinner.js";
|
|
8
|
+
import { memo as c, useCallback as te, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
9
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
|
+
//#region src/components/calendar/DateGrid.tsx
|
|
11
|
+
var h = c(function({ selected: c, mode: h, isClearable: g, resolvedSizeKey: _, resolvedColor: v, radiusClass: y, onSelect: b, onClose: x, disableFuture: S = !1 }) {
|
|
12
|
+
let C = /* @__PURE__ */ new Date(), [w, T] = f(c?.getFullYear() ?? C.getFullYear()), [E, D] = f(c?.getMonth() ?? C.getMonth()), [O, ne] = f(c?.getHours() ?? 0), [k, A] = f(c?.getMinutes() ?? 0), [j, M] = f(c?.getSeconds() ?? 0), [N, P] = f(() => c ?? C), F = d({}), I = d(!1), L = (e) => `${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`, R = te((e) => {
|
|
13
|
+
P((t) => {
|
|
14
|
+
let n = new Date(t.getFullYear(), t.getMonth(), t.getDate() + e);
|
|
15
|
+
return T(n.getFullYear()), D(n.getMonth()), I.current = !0, n;
|
|
16
|
+
});
|
|
17
|
+
}, []);
|
|
18
|
+
l(() => {
|
|
19
|
+
I.current && (I.current = !1, F.current[L(N)]?.focus());
|
|
20
|
+
});
|
|
21
|
+
function z(e) {
|
|
22
|
+
switch (e.key) {
|
|
23
|
+
case "ArrowLeft":
|
|
24
|
+
e.preventDefault(), R(-1);
|
|
25
|
+
return;
|
|
26
|
+
case "ArrowRight":
|
|
27
|
+
e.preventDefault(), R(1);
|
|
28
|
+
return;
|
|
29
|
+
case "ArrowUp":
|
|
30
|
+
e.preventDefault(), R(-7);
|
|
31
|
+
return;
|
|
32
|
+
case "ArrowDown":
|
|
33
|
+
e.preventDefault(), R(7);
|
|
34
|
+
return;
|
|
35
|
+
case "PageUp":
|
|
36
|
+
e.preventDefault(), R(-30);
|
|
37
|
+
return;
|
|
38
|
+
case "PageDown":
|
|
39
|
+
e.preventDefault(), R(30);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
let B = a[v] ?? a.primary;
|
|
44
|
+
function V(e, t, n) {
|
|
45
|
+
let r = c ?? /* @__PURE__ */ new Date();
|
|
46
|
+
b(new Date(r.getFullYear(), r.getMonth(), r.getDate(), e, t, n, 0));
|
|
47
|
+
}
|
|
48
|
+
function H(e) {
|
|
49
|
+
ne(e), V(e, k, j);
|
|
50
|
+
}
|
|
51
|
+
function U(e) {
|
|
52
|
+
A(e), V(O, e, j);
|
|
53
|
+
}
|
|
54
|
+
function W(e) {
|
|
55
|
+
M(e), V(O, k, e);
|
|
56
|
+
}
|
|
57
|
+
function G(e) {
|
|
58
|
+
b(new Date(w, E, e, O, k, j, 0)), h === "date" && x();
|
|
59
|
+
}
|
|
60
|
+
function K() {
|
|
61
|
+
E === 0 ? (D(11), T((e) => e - 1)) : D((e) => e - 1);
|
|
62
|
+
}
|
|
63
|
+
function re() {
|
|
64
|
+
E === 11 ? (D(0), T((e) => e + 1)) : D((e) => e + 1);
|
|
65
|
+
}
|
|
66
|
+
function q(e) {
|
|
67
|
+
return !!c && c.getFullYear() === w && c.getMonth() === E && c.getDate() === e;
|
|
68
|
+
}
|
|
69
|
+
function J(e) {
|
|
70
|
+
return C.getFullYear() === w && C.getMonth() === E && C.getDate() === e;
|
|
71
|
+
}
|
|
72
|
+
let ie = new Date(C.getFullYear(), C.getMonth(), C.getDate());
|
|
73
|
+
function Y(e) {
|
|
74
|
+
return S ? new Date(w, E, e) > ie : !1;
|
|
75
|
+
}
|
|
76
|
+
let X = !S || w < C.getFullYear() || w === C.getFullYear() && E < C.getMonth(), Z = h === "date" || h === "datetime", ae = h === "time" || h === "datetime", oe = h !== "date" || g && !!c, Q = ee(w, E), $ = u(() => Q.map((e, t) => ({
|
|
77
|
+
key: e === null ? `empty-slot-${t}` : `day-${e}`,
|
|
78
|
+
day: e
|
|
79
|
+
})), [Q]), se = u(() => {
|
|
80
|
+
let e = [];
|
|
81
|
+
for (let t = 0; t < $.length; t += 7) e.push($.slice(t, t + 7));
|
|
82
|
+
return e;
|
|
83
|
+
}, [$]);
|
|
84
|
+
return /* @__PURE__ */ m("div", {
|
|
85
|
+
className: e("bg-background border border-border/70 shadow-xl select-none p-4 w-max", y),
|
|
86
|
+
children: [/* @__PURE__ */ m("div", {
|
|
87
|
+
className: "flex flex-row",
|
|
88
|
+
children: [Z && /* @__PURE__ */ m("div", {
|
|
89
|
+
className: "flex flex-col w-[264px]",
|
|
90
|
+
children: [/* @__PURE__ */ m("div", {
|
|
91
|
+
className: "flex items-center justify-between pb-3 mb-2 border-b border-border/60",
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ p("button", {
|
|
94
|
+
type: "button",
|
|
95
|
+
onClick: K,
|
|
96
|
+
"aria-label": "Previous month",
|
|
97
|
+
className: e("p-1.5 text-foreground/70 transition-all active:scale-95", "hover:text-foreground hover:bg-secondary", y),
|
|
98
|
+
children: /* @__PURE__ */ p(i, {})
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ m("span", {
|
|
101
|
+
className: "font-semibold text-sm text-foreground tracking-wide",
|
|
102
|
+
children: [
|
|
103
|
+
r[E],
|
|
104
|
+
" ",
|
|
105
|
+
w
|
|
106
|
+
]
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ p("button", {
|
|
109
|
+
type: "button",
|
|
110
|
+
onClick: re,
|
|
111
|
+
disabled: !X,
|
|
112
|
+
"aria-label": "Next month",
|
|
113
|
+
className: e("p-1.5 text-foreground/70 transition-all", X ? "hover:text-foreground hover:bg-secondary active:scale-95" : "opacity-30 cursor-not-allowed", y),
|
|
114
|
+
children: /* @__PURE__ */ p(t, {})
|
|
115
|
+
})
|
|
116
|
+
]
|
|
117
|
+
}), /* @__PURE__ */ m("table", {
|
|
118
|
+
role: "grid",
|
|
119
|
+
"aria-label": `${r[E]} ${w}`,
|
|
120
|
+
tabIndex: -1,
|
|
121
|
+
onKeyDown: z,
|
|
122
|
+
className: "w-full table-fixed border-separate border-spacing-1 text-center",
|
|
123
|
+
children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ p("tr", { children: n.map((e) => /* @__PURE__ */ p("th", {
|
|
124
|
+
scope: "col",
|
|
125
|
+
className: "text-[11px] font-bold tracking-wider text-foreground/50 uppercase py-1 mb-1",
|
|
126
|
+
children: e
|
|
127
|
+
}, e)) }) }), /* @__PURE__ */ p("tbody", { children: se.map((t, n) => /* @__PURE__ */ p("tr", { children: t.map(({ key: t, day: n }) => n === null ? /* @__PURE__ */ p("td", {}, t) : /* @__PURE__ */ p("td", {
|
|
128
|
+
role: "gridcell",
|
|
129
|
+
tabIndex: -1,
|
|
130
|
+
"aria-selected": q(n),
|
|
131
|
+
"aria-current": J(n) ? "date" : void 0,
|
|
132
|
+
children: /* @__PURE__ */ p("button", {
|
|
133
|
+
ref: (e) => {
|
|
134
|
+
F.current[L(new Date(w, E, n))] = e;
|
|
135
|
+
},
|
|
136
|
+
type: "button",
|
|
137
|
+
tabIndex: N.getFullYear() === w && N.getMonth() === E && N.getDate() === n ? 0 : -1,
|
|
138
|
+
"aria-label": `${n} ${r[E]} ${w}`,
|
|
139
|
+
onClick: () => G(n),
|
|
140
|
+
disabled: Y(n),
|
|
141
|
+
className: e("w-full flex items-center justify-center font-medium transition-all duration-200", o[_], y, Y(n) ? "opacity-30 cursor-not-allowed text-foreground/50" : "active:scale-90", !Y(n) && !q(n) && !J(n) && B.hover, q(n) && e(B.bg, "font-semibold shadow-sm"), J(n) && !q(n) && e("border", B.border, B.text), !q(n) && !J(n) && "text-foreground"),
|
|
142
|
+
children: n
|
|
143
|
+
})
|
|
144
|
+
}, t)) }, t[0]?.key ?? `week-${n}`)) })]
|
|
145
|
+
})]
|
|
146
|
+
}), ae && /* @__PURE__ */ m("div", {
|
|
147
|
+
className: e("flex items-center justify-center gap-4", Z && "pl-5 ml-4 border-l border-border/60"),
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ p(s, {
|
|
150
|
+
value: O,
|
|
151
|
+
max: 23,
|
|
152
|
+
label: "HH",
|
|
153
|
+
onChange: H,
|
|
154
|
+
resolvedColor: v,
|
|
155
|
+
radiusClass: y
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ p(s, {
|
|
158
|
+
value: k,
|
|
159
|
+
max: 59,
|
|
160
|
+
label: "MM",
|
|
161
|
+
onChange: U,
|
|
162
|
+
resolvedColor: v,
|
|
163
|
+
radiusClass: y
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ p(s, {
|
|
166
|
+
value: j,
|
|
167
|
+
max: 59,
|
|
168
|
+
label: "SS",
|
|
169
|
+
onChange: W,
|
|
170
|
+
resolvedColor: v,
|
|
171
|
+
radiusClass: y
|
|
172
|
+
})
|
|
173
|
+
]
|
|
174
|
+
})]
|
|
175
|
+
}), oe && /* @__PURE__ */ m("div", {
|
|
176
|
+
className: "flex items-center justify-between border-t border-border/60 pt-3 mt-3",
|
|
177
|
+
children: [g && c ? /* @__PURE__ */ p("button", {
|
|
178
|
+
type: "button",
|
|
179
|
+
onClick: () => {
|
|
180
|
+
b(null), x();
|
|
181
|
+
},
|
|
182
|
+
className: "text-xs font-medium text-foreground/50 hover:text-danger transition-colors active:scale-95 px-2 py-1",
|
|
183
|
+
children: "Clear"
|
|
184
|
+
}) : /* @__PURE__ */ p("div", {}), h !== "date" && /* @__PURE__ */ p("button", {
|
|
185
|
+
type: "button",
|
|
186
|
+
onClick: x,
|
|
187
|
+
className: e("ml-auto text-xs font-semibold px-4 py-2 transition-all hover:opacity-90 active:scale-95 shadow-sm", y, B.bg),
|
|
188
|
+
children: "Done"
|
|
189
|
+
})]
|
|
190
|
+
})]
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
//#endregion
|
|
194
|
+
export { h as DateGrid };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeSpinner.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/TimeSpinner.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAO1C,UAAU,gBAAgB;IACxB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B;;;OAGG;IACH,aAAa,EAAE,KAAK,CAAC;IACrB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,GAAG,EACH,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,GACZ,EAAE,gBAAgB,+BAgGlB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../utils/cn.js";
|
|
3
3
|
import { ChevronDownIcon as t } from "../../icons/ChevronDownIcon.js";
|
|
4
|
-
import { pad2 as n } from "./
|
|
5
|
-
import { CALENDAR_COLOR_CLASSES as r } from "./
|
|
4
|
+
import { pad2 as n } from "./calendar.helpers.js";
|
|
5
|
+
import { CALENDAR_COLOR_CLASSES as r } from "./calendar-styles.js";
|
|
6
6
|
import { ChevronUpIcon as i } from "../../icons/ChevronUpIcon.js";
|
|
7
7
|
import { useEffect as a, useState as o } from "react";
|
|
8
8
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
-
//#region src/components/
|
|
9
|
+
//#region src/components/calendar/TimeSpinner.tsx
|
|
10
10
|
function l({ value: l, max: u, label: d, onChange: f, resolvedColor: p, radiusClass: m }) {
|
|
11
11
|
let [h, g] = o(n(l));
|
|
12
12
|
a(() => {
|