@xerobi/ui 0.0.0-stage → 0.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/CHANGELOG.md +20 -0
- package/LICENSE +21 -0
- package/README.md +164 -2
- package/dist/blocks/data-table/grid/data-grid.d.ts +6 -0
- package/dist/blocks/data-table/grid/data-grid.js +147 -0
- package/dist/blocks/data-table/grid/index.d.ts +2 -0
- package/dist/blocks/data-table/grid/index.js +1 -0
- package/dist/blocks/data-table/grid/types.d.ts +47 -0
- package/dist/blocks/data-table/grid/types.js +1 -0
- package/dist/blocks/data-table/index.d.ts +3 -0
- package/dist/blocks/data-table/index.js +3 -0
- package/dist/blocks/data-table/table/index.d.ts +7 -0
- package/dist/blocks/data-table/table/index.js +7 -0
- package/dist/blocks/data-table/table/table-empty-rows.d.ts +5 -0
- package/dist/blocks/data-table/table/table-empty-rows.js +8 -0
- package/dist/blocks/data-table/table/table-head-custom.d.ts +18 -0
- package/dist/blocks/data-table/table/table-head-custom.js +13 -0
- package/dist/blocks/data-table/table/table-no-data.d.ts +7 -0
- package/dist/blocks/data-table/table/table-no-data.js +8 -0
- package/dist/blocks/data-table/table/table-pagination-custom.d.ts +16 -0
- package/dist/blocks/data-table/table/table-pagination-custom.js +13 -0
- package/dist/blocks/data-table/table/table-selected-action.d.ts +11 -0
- package/dist/blocks/data-table/table/table-selected-action.js +9 -0
- package/dist/blocks/data-table/table/table-skeleton.d.ts +5 -0
- package/dist/blocks/data-table/table/table-skeleton.js +7 -0
- package/dist/blocks/data-table/table/utils.d.ts +1 -0
- package/dist/blocks/data-table/table/utils.js +3 -0
- package/dist/blocks/data-table/tanstack.d.ts +2 -0
- package/dist/blocks/data-table/tanstack.js +1 -0
- package/dist/blocks/filters-result/filters-block.d.ts +7 -0
- package/dist/blocks/filters-result/filters-block.js +8 -0
- package/dist/blocks/filters-result/filters-result.d.ts +16 -0
- package/dist/blocks/filters-result/filters-result.js +10 -0
- package/dist/blocks/filters-result/index.d.ts +2 -0
- package/dist/blocks/filters-result/index.js +2 -0
- package/dist/blocks/form/field-autocomplete.d.ts +18 -0
- package/dist/blocks/form/field-autocomplete.js +27 -0
- package/dist/blocks/form/field-checkbox.d.ts +25 -0
- package/dist/blocks/form/field-checkbox.js +23 -0
- package/dist/blocks/form/field-code.d.ts +8 -0
- package/dist/blocks/form/field-code.js +8 -0
- package/dist/blocks/form/field-controller.d.ts +23 -0
- package/dist/blocks/form/field-controller.js +32 -0
- package/dist/blocks/form/field-country-select.d.ts +5 -0
- package/dist/blocks/form/field-country-select.js +9 -0
- package/dist/blocks/form/field-date-picker.d.ts +14 -0
- package/dist/blocks/form/field-date-picker.js +40 -0
- package/dist/blocks/form/field-editor.d.ts +5 -0
- package/dist/blocks/form/field-editor.js +7 -0
- package/dist/blocks/form/field-number-input.d.ts +5 -0
- package/dist/blocks/form/field-number-input.js +7 -0
- package/dist/blocks/form/field-phone.d.ts +5 -0
- package/dist/blocks/form/field-phone.js +7 -0
- package/dist/blocks/form/field-radio-group.d.ts +12 -0
- package/dist/blocks/form/field-radio-group.js +15 -0
- package/dist/blocks/form/field-rating.d.ts +6 -0
- package/dist/blocks/form/field-rating.js +8 -0
- package/dist/blocks/form/field-select.d.ts +21 -0
- package/dist/blocks/form/field-select.js +24 -0
- package/dist/blocks/form/field-slider.d.ts +6 -0
- package/dist/blocks/form/field-slider.js +8 -0
- package/dist/blocks/form/field-switch.d.ts +25 -0
- package/dist/blocks/form/field-switch.js +23 -0
- package/dist/blocks/form/field-text.d.ts +8 -0
- package/dist/blocks/form/field-text.js +28 -0
- package/dist/blocks/form/field-upload.d.ts +7 -0
- package/dist/blocks/form/field-upload.js +17 -0
- package/dist/blocks/form/fields.d.ts +38 -0
- package/dist/blocks/form/fields.js +39 -0
- package/dist/blocks/form/form-context.d.ts +13 -0
- package/dist/blocks/form/form-context.js +18 -0
- package/dist/blocks/form/form-provider.d.ts +6 -0
- package/dist/blocks/form/form-provider.js +10 -0
- package/dist/blocks/form/help-text.d.ts +6 -0
- package/dist/blocks/form/help-text.js +8 -0
- package/dist/blocks/form/index.d.ts +23 -0
- package/dist/blocks/form/index.js +22 -0
- package/dist/blocks/form/schema-helper.d.ts +38 -0
- package/dist/blocks/form/schema-helper.js +80 -0
- package/dist/blocks/index.d.ts +9 -0
- package/dist/blocks/index.js +9 -0
- package/dist/blocks/mega-menu/classes.d.ts +31 -0
- package/dist/blocks/mega-menu/classes.js +12 -0
- package/dist/blocks/mega-menu/components.d.ts +37 -0
- package/dist/blocks/mega-menu/components.js +78 -0
- package/dist/blocks/mega-menu/horizontal.d.ts +2 -0
- package/dist/blocks/mega-menu/horizontal.js +9 -0
- package/dist/blocks/mega-menu/index.d.ts +5 -0
- package/dist/blocks/mega-menu/index.js +4 -0
- package/dist/blocks/mega-menu/mega-nav-list.d.ts +7 -0
- package/dist/blocks/mega-menu/mega-nav-list.js +25 -0
- package/dist/blocks/mega-menu/mobile.d.ts +16 -0
- package/dist/blocks/mega-menu/mobile.js +27 -0
- package/dist/blocks/mega-menu/types.d.ts +65 -0
- package/dist/blocks/mega-menu/types.js +1 -0
- package/dist/blocks/mega-menu/vertical.d.ts +2 -0
- package/dist/blocks/mega-menu/vertical.js +9 -0
- package/dist/blocks/nav-basic/classes.d.ts +26 -0
- package/dist/blocks/nav-basic/classes.js +7 -0
- package/dist/blocks/nav-basic/desktop.d.ts +2 -0
- package/dist/blocks/nav-basic/desktop.js +26 -0
- package/dist/blocks/nav-basic/index.d.ts +4 -0
- package/dist/blocks/nav-basic/index.js +3 -0
- package/dist/blocks/nav-basic/mobile.d.ts +2 -0
- package/dist/blocks/nav-basic/mobile.js +20 -0
- package/dist/blocks/nav-basic/types.d.ts +14 -0
- package/dist/blocks/nav-basic/types.js +1 -0
- package/dist/blocks/nav-core/elements.d.ts +32 -0
- package/dist/blocks/nav-core/elements.js +37 -0
- package/dist/blocks/nav-core/index.d.ts +6 -0
- package/dist/blocks/nav-core/index.js +6 -0
- package/dist/blocks/nav-core/link.d.ts +12 -0
- package/dist/blocks/nav-core/link.js +16 -0
- package/dist/blocks/nav-core/nav-dropdown.d.ts +19 -0
- package/dist/blocks/nav-core/nav-dropdown.js +9 -0
- package/dist/blocks/nav-core/nav-item.d.ts +13 -0
- package/dist/blocks/nav-core/nav-item.js +36 -0
- package/dist/blocks/nav-core/types.d.ts +38 -0
- package/dist/blocks/nav-core/types.js +1 -0
- package/dist/blocks/nav-core/utils.d.ts +4 -0
- package/dist/blocks/nav-core/utils.js +17 -0
- package/dist/blocks/nav-section/classes.d.ts +27 -0
- package/dist/blocks/nav-section/classes.js +8 -0
- package/dist/blocks/nav-section/horizontal.d.ts +2 -0
- package/dist/blocks/nav-section/horizontal.js +12 -0
- package/dist/blocks/nav-section/hover-list.d.ts +13 -0
- package/dist/blocks/nav-section/hover-list.js +27 -0
- package/dist/blocks/nav-section/index.d.ts +5 -0
- package/dist/blocks/nav-section/index.js +4 -0
- package/dist/blocks/nav-section/mini.d.ts +2 -0
- package/dist/blocks/nav-section/mini.js +12 -0
- package/dist/blocks/nav-section/types.d.ts +20 -0
- package/dist/blocks/nav-section/types.js +1 -0
- package/dist/blocks/nav-section/vertical.d.ts +2 -0
- package/dist/blocks/nav-section/vertical.js +28 -0
- package/dist/blocks/settings/index.d.ts +5 -0
- package/dist/blocks/settings/index.js +4 -0
- package/dist/blocks/settings/settings-button.d.ts +1 -0
- package/dist/blocks/settings/settings-button.js +9 -0
- package/dist/blocks/settings/settings-config.d.ts +5 -0
- package/dist/blocks/settings/settings-config.js +14 -0
- package/dist/blocks/settings/settings-context.d.ts +7 -0
- package/dist/blocks/settings/settings-context.js +51 -0
- package/dist/blocks/settings/settings-drawer.d.ts +2 -0
- package/dist/blocks/settings/settings-drawer.js +61 -0
- package/dist/blocks/settings/types.d.ts +34 -0
- package/dist/blocks/settings/types.js +1 -0
- package/dist/blocks/sidebar/index.d.ts +1 -0
- package/dist/blocks/sidebar/index.js +1 -0
- package/dist/blocks/sidebar/sidebar.d.ts +63 -0
- package/dist/blocks/sidebar/sidebar.js +256 -0
- package/dist/components/accordion/accordion.d.ts +6 -0
- package/dist/components/accordion/accordion.js +18 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/alert/alert.d.ts +10 -0
- package/dist/components/alert/alert.js +33 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +18 -0
- package/dist/components/alert-dialog/alert-dialog.js +42 -0
- package/dist/components/alert-dialog/index.d.ts +1 -0
- package/dist/components/alert-dialog/index.js +1 -0
- package/dist/components/animate/animate-border.d.ts +31 -0
- package/dist/components/animate/animate-border.js +77 -0
- package/dist/components/animate/animate-count-up.d.ts +12 -0
- package/dist/components/animate/animate-count-up.js +33 -0
- package/dist/components/animate/animate-logo.d.ts +10 -0
- package/dist/components/animate/animate-logo.js +20 -0
- package/dist/components/animate/animate-text.d.ts +19 -0
- package/dist/components/animate/animate-text.js +44 -0
- package/dist/components/animate/features.d.ts +2 -0
- package/dist/components/animate/features.js +2 -0
- package/dist/components/animate/index.d.ts +9 -0
- package/dist/components/animate/index.js +9 -0
- package/dist/components/animate/motion-container.d.ts +8 -0
- package/dist/components/animate/motion-container.js +7 -0
- package/dist/components/animate/motion-lazy.d.ts +4 -0
- package/dist/components/animate/motion-lazy.js +7 -0
- package/dist/components/animate/motion-viewport.d.ts +7 -0
- package/dist/components/animate/motion-viewport.js +24 -0
- package/dist/components/animate/scroll-progress/index.d.ts +2 -0
- package/dist/components/animate/scroll-progress/index.js +2 -0
- package/dist/components/animate/scroll-progress/scroll-progress.d.ts +22 -0
- package/dist/components/animate/scroll-progress/scroll-progress.js +37 -0
- package/dist/components/animate/scroll-progress/use-scroll-progress.d.ts +10 -0
- package/dist/components/animate/scroll-progress/use-scroll-progress.js +9 -0
- package/dist/components/animate/variants/actions.d.ts +9 -0
- package/dist/components/animate/variants/actions.js +17 -0
- package/dist/components/animate/variants/background.d.ts +6 -0
- package/dist/components/animate/variants/background.js +110 -0
- package/dist/components/animate/variants/bounce.d.ts +8 -0
- package/dist/components/animate/variants/bounce.js +92 -0
- package/dist/components/animate/variants/container.d.ts +7 -0
- package/dist/components/animate/variants/container.js +16 -0
- package/dist/components/animate/variants/fade.d.ts +9 -0
- package/dist/components/animate/variants/fade.js +77 -0
- package/dist/components/animate/variants/flip.d.ts +9 -0
- package/dist/components/animate/variants/flip.js +28 -0
- package/dist/components/animate/variants/index.d.ts +12 -0
- package/dist/components/animate/variants/index.js +12 -0
- package/dist/components/animate/variants/path.d.ts +2 -0
- package/dist/components/animate/variants/path.js +12 -0
- package/dist/components/animate/variants/rotate.d.ts +9 -0
- package/dist/components/animate/variants/rotate.js +20 -0
- package/dist/components/animate/variants/scale.d.ts +8 -0
- package/dist/components/animate/variants/scale.js +37 -0
- package/dist/components/animate/variants/slide.d.ts +9 -0
- package/dist/components/animate/variants/slide.js +51 -0
- package/dist/components/animate/variants/transition.d.ts +3 -0
- package/dist/components/animate/variants/transition.js +10 -0
- package/dist/components/animate/variants/zoom.d.ts +9 -0
- package/dist/components/animate/variants/zoom.js +120 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +4 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +9 -0
- package/dist/components/aspect-ratio/index.d.ts +1 -0
- package/dist/components/aspect-ratio/index.js +1 -0
- package/dist/components/avatar/avatar.d.ts +11 -0
- package/dist/components/avatar/avatar.js +23 -0
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/avatar/index.js +1 -0
- package/dist/components/badge/badge.d.ts +15 -0
- package/dist/components/badge/badge.js +79 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +10 -0
- package/dist/components/breadcrumb/breadcrumb.js +37 -0
- package/dist/components/breadcrumb/index.d.ts +1 -0
- package/dist/components/breadcrumb/index.js +1 -0
- package/dist/components/button/button.d.ts +20 -0
- package/dist/components/button/button.js +120 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/button-group/button-group.d.ts +10 -0
- package/dist/components/button-group/button-group.js +37 -0
- package/dist/components/button-group/index.d.ts +1 -0
- package/dist/components/button-group/index.js +1 -0
- package/dist/components/calendar/calendar.d.ts +10 -0
- package/dist/components/calendar/calendar.js +76 -0
- package/dist/components/calendar/index.d.ts +1 -0
- package/dist/components/calendar/index.js +1 -0
- package/dist/components/card/card.d.ts +11 -0
- package/dist/components/card/card.js +25 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/carousel/breakpoints.d.ts +7 -0
- package/dist/components/carousel/breakpoints.js +7 -0
- package/dist/components/carousel/carousel.d.ts +2 -0
- package/dist/components/carousel/carousel.js +13 -0
- package/dist/components/carousel/classes.d.ts +31 -0
- package/dist/components/carousel/classes.js +32 -0
- package/dist/components/carousel/components/arrow-button.d.ts +2 -0
- package/dist/components/carousel/components/arrow-button.js +10 -0
- package/dist/components/carousel/components/carousel-arrow-buttons.d.ts +4 -0
- package/dist/components/carousel/components/carousel-arrow-buttons.js +15 -0
- package/dist/components/carousel/components/carousel-dot-buttons.d.ts +2 -0
- package/dist/components/carousel/components/carousel-dot-buttons.js +19 -0
- package/dist/components/carousel/components/carousel-progress-bar.d.ts +2 -0
- package/dist/components/carousel/components/carousel-progress-bar.js +9 -0
- package/dist/components/carousel/components/carousel-slide.d.ts +2 -0
- package/dist/components/carousel/components/carousel-slide.js +16 -0
- package/dist/components/carousel/components/carousel-thumb.d.ts +2 -0
- package/dist/components/carousel/components/carousel-thumb.js +7 -0
- package/dist/components/carousel/components/carousel-thumbs.d.ts +2 -0
- package/dist/components/carousel/components/carousel-thumbs.js +15 -0
- package/dist/components/carousel/components/index.d.ts +7 -0
- package/dist/components/carousel/components/index.js +7 -0
- package/dist/components/carousel/hooks/index.d.ts +7 -0
- package/dist/components/carousel/hooks/index.js +7 -0
- package/dist/components/carousel/hooks/use-carousel-arrows.d.ts +3 -0
- package/dist/components/carousel/hooks/use-carousel-arrows.js +33 -0
- package/dist/components/carousel/hooks/use-carousel-auto-play.d.ts +3 -0
- package/dist/components/carousel/hooks/use-carousel-auto-play.js +31 -0
- package/dist/components/carousel/hooks/use-carousel-auto-scroll.d.ts +3 -0
- package/dist/components/carousel/hooks/use-carousel-auto-scroll.js +31 -0
- package/dist/components/carousel/hooks/use-carousel-dots.d.ts +3 -0
- package/dist/components/carousel/hooks/use-carousel-dots.js +34 -0
- package/dist/components/carousel/hooks/use-carousel-parallax.d.ts +3 -0
- package/dist/components/carousel/hooks/use-carousel-parallax.js +62 -0
- package/dist/components/carousel/hooks/use-carousel-progress.d.ts +3 -0
- package/dist/components/carousel/hooks/use-carousel-progress.js +17 -0
- package/dist/components/carousel/hooks/use-carousel.d.ts +3 -0
- package/dist/components/carousel/hooks/use-carousel.js +56 -0
- package/dist/components/carousel/hooks/use-thumbs.d.ts +3 -0
- package/dist/components/carousel/hooks/use-thumbs.js +35 -0
- package/dist/components/carousel/hooks/use-viewport-width.d.ts +1 -0
- package/dist/components/carousel/hooks/use-viewport-width.js +9 -0
- package/dist/components/carousel/index.d.ts +6 -0
- package/dist/components/carousel/index.js +5 -0
- package/dist/components/carousel/types.d.ts +104 -0
- package/dist/components/carousel/types.js +1 -0
- package/dist/components/carousel/utils.d.ts +5 -0
- package/dist/components/carousel/utils.js +30 -0
- package/dist/components/chart/chart.d.ts +2 -0
- package/dist/components/chart/chart.js +14 -0
- package/dist/components/chart/classes.d.ts +15 -0
- package/dist/components/chart/classes.js +16 -0
- package/dist/components/chart/components/chart-legends.d.ts +16 -0
- package/dist/components/chart/components/chart-legends.js +7 -0
- package/dist/components/chart/components/chart-loading.d.ts +3 -0
- package/dist/components/chart/components/chart-loading.js +9 -0
- package/dist/components/chart/components/chart-select.d.ts +6 -0
- package/dist/components/chart/components/chart-select.js +14 -0
- package/dist/components/chart/components/index.d.ts +3 -0
- package/dist/components/chart/components/index.js +3 -0
- package/dist/components/chart/index.d.ts +5 -0
- package/dist/components/chart/index.js +4 -0
- package/dist/components/chart/types.d.ts +7 -0
- package/dist/components/chart/types.js +1 -0
- package/dist/components/chart/use-chart.d.ts +6 -0
- package/dist/components/chart/use-chart.js +129 -0
- package/dist/components/checkbox/checkbox.d.ts +7 -0
- package/dist/components/checkbox/checkbox.js +18 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/chip/chip.d.ts +23 -0
- package/dist/components/chip/chip.js +74 -0
- package/dist/components/chip/index.d.ts +1 -0
- package/dist/components/chip/index.js +1 -0
- package/dist/components/collapsible/collapsible.d.ts +5 -0
- package/dist/components/collapsible/collapsible.js +13 -0
- package/dist/components/collapsible/index.d.ts +1 -0
- package/dist/components/collapsible/index.js +1 -0
- package/dist/components/color-utils/classes.d.ts +13 -0
- package/dist/components/color-utils/classes.js +14 -0
- package/dist/components/color-utils/color-picker.d.ts +16 -0
- package/dist/components/color-utils/color-picker.js +40 -0
- package/dist/components/color-utils/color-preview.d.ts +12 -0
- package/dist/components/color-utils/color-preview.js +15 -0
- package/dist/components/color-utils/index.d.ts +3 -0
- package/dist/components/color-utils/index.js +3 -0
- package/dist/components/combobox/combobox.d.ts +24 -0
- package/dist/components/combobox/combobox.js +58 -0
- package/dist/components/combobox/index.d.ts +1 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/command/command.d.ts +19 -0
- package/dist/components/command/command.js +35 -0
- package/dist/components/command/index.d.ts +1 -0
- package/dist/components/command/index.js +1 -0
- package/dist/components/context-menu/context-menu.d.ts +29 -0
- package/dist/components/context-menu/context-menu.js +51 -0
- package/dist/components/context-menu/index.d.ts +1 -0
- package/dist/components/context-menu/index.js +1 -0
- package/dist/components/country-select/countries.d.ts +6 -0
- package/dist/components/country-select/countries.js +250 -0
- package/dist/components/country-select/country-select.d.ts +16 -0
- package/dist/components/country-select/country-select.js +37 -0
- package/dist/components/country-select/index.d.ts +3 -0
- package/dist/components/country-select/index.js +2 -0
- package/dist/components/custom-breadcrumbs/back-link.d.ts +7 -0
- package/dist/components/custom-breadcrumbs/back-link.js +12 -0
- package/dist/components/custom-breadcrumbs/breadcrumb-link.d.ts +11 -0
- package/dist/components/custom-breadcrumbs/breadcrumb-link.js +10 -0
- package/dist/components/custom-breadcrumbs/custom-breadcrumbs.d.ts +25 -0
- package/dist/components/custom-breadcrumbs/custom-breadcrumbs.js +13 -0
- package/dist/components/custom-breadcrumbs/index.d.ts +5 -0
- package/dist/components/custom-breadcrumbs/index.js +4 -0
- package/dist/components/custom-breadcrumbs/link.d.ts +4 -0
- package/dist/components/custom-breadcrumbs/link.js +6 -0
- package/dist/components/custom-breadcrumbs/more-links.d.ts +5 -0
- package/dist/components/custom-breadcrumbs/more-links.js +6 -0
- package/dist/components/custom-date-range-picker/custom-date-range-picker.d.ts +16 -0
- package/dist/components/custom-date-range-picker/custom-date-range-picker.js +31 -0
- package/dist/components/custom-date-range-picker/index.d.ts +2 -0
- package/dist/components/custom-date-range-picker/index.js +2 -0
- package/dist/components/custom-date-range-picker/use-date-range-picker.d.ts +18 -0
- package/dist/components/custom-date-range-picker/use-date-range-picker.js +33 -0
- package/dist/components/custom-dialog/confirm-dialog.d.ts +11 -0
- package/dist/components/custom-dialog/confirm-dialog.js +7 -0
- package/dist/components/custom-dialog/index.d.ts +1 -0
- package/dist/components/custom-dialog/index.js +1 -0
- package/dist/components/custom-popover/arrow.d.ts +10 -0
- package/dist/components/custom-popover/arrow.js +52 -0
- package/dist/components/custom-popover/custom-popover.d.ts +10 -0
- package/dist/components/custom-popover/custom-popover.js +25 -0
- package/dist/components/custom-popover/index.d.ts +2 -0
- package/dist/components/custom-popover/index.js +1 -0
- package/dist/components/custom-popover/placement.d.ts +8 -0
- package/dist/components/custom-popover/placement.js +11 -0
- package/dist/components/custom-popover/types.d.ts +20 -0
- package/dist/components/custom-popover/types.js +2 -0
- package/dist/components/custom-tabs/custom-tabs.d.ts +8 -0
- package/dist/components/custom-tabs/custom-tabs.js +11 -0
- package/dist/components/custom-tabs/index.d.ts +1 -0
- package/dist/components/custom-tabs/index.js +1 -0
- package/dist/components/dialog/dialog.d.ts +18 -0
- package/dist/components/dialog/dialog.js +40 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/direction/direction.d.ts +1 -0
- package/dist/components/direction/direction.js +2 -0
- package/dist/components/direction/index.d.ts +1 -0
- package/dist/components/direction/index.js +1 -0
- package/dist/components/drawer/drawer.d.ts +16 -0
- package/dist/components/drawer/drawer.js +75 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +29 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +51 -0
- package/dist/components/dropdown-menu/index.d.ts +1 -0
- package/dist/components/dropdown-menu/index.js +1 -0
- package/dist/components/editor/classes.d.ts +43 -0
- package/dist/components/editor/classes.js +44 -0
- package/dist/components/editor/components/code-highlight-block.d.ts +2 -0
- package/dist/components/editor/components/code-highlight-block.js +7 -0
- package/dist/components/editor/components/heading-block.d.ts +3 -0
- package/dist/components/editor/components/heading-block.js +22 -0
- package/dist/components/editor/components/image-block.d.ts +2 -0
- package/dist/components/editor/components/image-block.js +13 -0
- package/dist/components/editor/components/link-block.d.ts +2 -0
- package/dist/components/editor/components/link-block.js +16 -0
- package/dist/components/editor/components/toolbar-item.d.ts +6 -0
- package/dist/components/editor/components/toolbar-item.js +10 -0
- package/dist/components/editor/components/url-popover.d.ts +7 -0
- package/dist/components/editor/components/url-popover.js +19 -0
- package/dist/components/editor/editor.d.ts +13 -0
- package/dist/components/editor/editor.js +90 -0
- package/dist/components/editor/icons.d.ts +27 -0
- package/dist/components/editor/icons.js +26 -0
- package/dist/components/editor/index.d.ts +3 -0
- package/dist/components/editor/index.js +2 -0
- package/dist/components/editor/toolbar.d.ts +2 -0
- package/dist/components/editor/toolbar.js +20 -0
- package/dist/components/editor/types.d.ts +26 -0
- package/dist/components/editor/types.js +1 -0
- package/dist/components/empty-content/default-image.d.ts +2 -0
- package/dist/components/empty-content/default-image.js +2 -0
- package/dist/components/empty-content/empty-content.d.ts +15 -0
- package/dist/components/empty-content/empty-content.js +7 -0
- package/dist/components/empty-content/index.d.ts +2 -0
- package/dist/components/empty-content/index.js +2 -0
- package/dist/components/file-thumbnail/action-buttons.d.ts +2 -0
- package/dist/components/file-thumbnail/action-buttons.js +10 -0
- package/dist/components/file-thumbnail/classes.d.ts +7 -0
- package/dist/components/file-thumbnail/classes.js +8 -0
- package/dist/components/file-thumbnail/file-thumbnail.d.ts +2 -0
- package/dist/components/file-thumbnail/file-thumbnail.js +22 -0
- package/dist/components/file-thumbnail/icons.d.ts +2 -0
- package/dist/components/file-thumbnail/icons.js +39 -0
- package/dist/components/file-thumbnail/index.d.ts +6 -0
- package/dist/components/file-thumbnail/index.js +5 -0
- package/dist/components/file-thumbnail/types.d.ts +18 -0
- package/dist/components/file-thumbnail/types.js +1 -0
- package/dist/components/file-thumbnail/utils.d.ts +21 -0
- package/dist/components/file-thumbnail/utils.js +50 -0
- package/dist/components/flag-icon/classes.d.ts +4 -0
- package/dist/components/flag-icon/classes.js +5 -0
- package/dist/components/flag-icon/flag-icon.d.ts +8 -0
- package/dist/components/flag-icon/flag-icon.js +12 -0
- package/dist/components/flag-icon/index.d.ts +2 -0
- package/dist/components/flag-icon/index.js +2 -0
- package/dist/components/form-label/form-label.d.ts +3 -0
- package/dist/components/form-label/form-label.js +7 -0
- package/dist/components/form-label/index.d.ts +1 -0
- package/dist/components/form-label/index.js +1 -0
- package/dist/components/hover-card/hover-card.d.ts +5 -0
- package/dist/components/hover-card/hover-card.js +14 -0
- package/dist/components/hover-card/index.d.ts +1 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/image/classes.d.ts +9 -0
- package/dist/components/image/classes.js +8 -0
- package/dist/components/image/image.d.ts +28 -0
- package/dist/components/image/image.js +58 -0
- package/dist/components/image/index.d.ts +2 -0
- package/dist/components/image/index.js +2 -0
- package/dist/components/image/placeholder.d.ts +1 -0
- package/dist/components/image/placeholder.js +1 -0
- package/dist/components/index.d.ts +84 -0
- package/dist/components/index.js +84 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/index.js +1 -0
- package/dist/components/input/input.d.ts +3 -0
- package/dist/components/input/input.js +8 -0
- package/dist/components/input-group/index.d.ts +1 -0
- package/dist/components/input-group/index.js +1 -0
- package/dist/components/input-group/input-group.d.ts +18 -0
- package/dist/components/input-group/input-group.js +57 -0
- package/dist/components/input-otp/index.d.ts +1 -0
- package/dist/components/input-otp/index.js +1 -0
- package/dist/components/input-otp/input-otp.d.ts +11 -0
- package/dist/components/input-otp/input-otp.js +21 -0
- package/dist/components/item/index.d.ts +1 -0
- package/dist/components/item/index.js +1 -0
- package/dist/components/item/item.d.ts +22 -0
- package/dist/components/item/item.js +79 -0
- package/dist/components/kbd/index.d.ts +1 -0
- package/dist/components/kbd/index.js +1 -0
- package/dist/components/kbd/kbd.d.ts +3 -0
- package/dist/components/kbd/kbd.js +10 -0
- package/dist/components/label/classes.d.ts +4 -0
- package/dist/components/label/classes.js +5 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/index.js +2 -0
- package/dist/components/label/label.d.ts +13 -0
- package/dist/components/label/label.js +10 -0
- package/dist/components/lightbox/classes.d.ts +3 -0
- package/dist/components/lightbox/classes.js +4 -0
- package/dist/components/lightbox/index.d.ts +4 -0
- package/dist/components/lightbox/index.js +3 -0
- package/dist/components/lightbox/lightbox.d.ts +2 -0
- package/dist/components/lightbox/lightbox.js +40 -0
- package/dist/components/lightbox/types.d.ts +11 -0
- package/dist/components/lightbox/types.js +1 -0
- package/dist/components/lightbox/use-light-box.d.ts +9 -0
- package/dist/components/lightbox/use-light-box.js +21 -0
- package/dist/components/lightbox/utils.d.ts +3 -0
- package/dist/components/lightbox/utils.js +22 -0
- package/dist/components/loading-screen/index.d.ts +2 -0
- package/dist/components/loading-screen/index.js +2 -0
- package/dist/components/loading-screen/loading-screen.d.ts +6 -0
- package/dist/components/loading-screen/loading-screen.js +8 -0
- package/dist/components/loading-screen/splash-screen.d.ts +7 -0
- package/dist/components/loading-screen/splash-screen.js +9 -0
- package/dist/components/logo/classes.d.ts +3 -0
- package/dist/components/logo/classes.js +4 -0
- package/dist/components/logo/index.d.ts +2 -0
- package/dist/components/logo/index.js +2 -0
- package/dist/components/logo/logo.d.ts +14 -0
- package/dist/components/logo/logo.js +22 -0
- package/dist/components/map/index.d.ts +4 -0
- package/dist/components/map/index.js +4 -0
- package/dist/components/map/map-controls.d.ts +14 -0
- package/dist/components/map/map-controls.js +6 -0
- package/dist/components/map/map-marker.d.ts +2 -0
- package/dist/components/map/map-marker.js +10 -0
- package/dist/components/map/map-popup.d.ts +3 -0
- package/dist/components/map/map-popup.js +6 -0
- package/dist/components/map/map.d.ts +5 -0
- package/dist/components/map/map.js +13 -0
- package/dist/components/markdown/classes.d.ts +10 -0
- package/dist/components/markdown/classes.js +11 -0
- package/dist/components/markdown/html-tags.d.ts +4 -0
- package/dist/components/markdown/html-tags.js +171 -0
- package/dist/components/markdown/html-to-markdown.d.ts +2 -0
- package/dist/components/markdown/html-to-markdown.js +28 -0
- package/dist/components/markdown/index.d.ts +4 -0
- package/dist/components/markdown/index.js +3 -0
- package/dist/components/markdown/markdown.d.ts +2 -0
- package/dist/components/markdown/markdown.js +35 -0
- package/dist/components/markdown/types.d.ts +8 -0
- package/dist/components/markdown/types.js +1 -0
- package/dist/components/menubar/index.d.ts +1 -0
- package/dist/components/menubar/index.js +1 -0
- package/dist/components/menubar/menubar.d.ts +29 -0
- package/dist/components/menubar/menubar.js +56 -0
- package/dist/components/native-select/index.d.ts +1 -0
- package/dist/components/native-select/index.js +1 -0
- package/dist/components/native-select/native-select.d.ts +8 -0
- package/dist/components/native-select/native-select.js +14 -0
- package/dist/components/navigation-menu/index.d.ts +1 -0
- package/dist/components/navigation-menu/index.js +1 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +11 -0
- package/dist/components/navigation-menu/navigation-menu.js +32 -0
- package/dist/components/number-input/index.d.ts +1 -0
- package/dist/components/number-input/index.js +1 -0
- package/dist/components/number-input/number-input.d.ts +29 -0
- package/dist/components/number-input/number-input.js +34 -0
- package/dist/components/organizational-chart/index.d.ts +2 -0
- package/dist/components/organizational-chart/index.js +1 -0
- package/dist/components/organizational-chart/organizational-chart.d.ts +2 -0
- package/dist/components/organizational-chart/organizational-chart.js +21 -0
- package/dist/components/organizational-chart/types.d.ts +15 -0
- package/dist/components/organizational-chart/types.js +1 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/pagination/pagination.d.ts +17 -0
- package/dist/components/pagination/pagination.js +27 -0
- package/dist/components/phone-input/index.d.ts +2 -0
- package/dist/components/phone-input/index.js +1 -0
- package/dist/components/phone-input/list-popover.d.ts +2 -0
- package/dist/components/phone-input/list-popover.js +33 -0
- package/dist/components/phone-input/phone-input.d.ts +2 -0
- package/dist/components/phone-input/phone-input.js +34 -0
- package/dist/components/phone-input/types.d.ts +28 -0
- package/dist/components/phone-input/types.js +1 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover/popover.d.ts +9 -0
- package/dist/components/popover/popover.js +23 -0
- package/dist/components/progress/index.d.ts +1 -0
- package/dist/components/progress/index.js +1 -0
- package/dist/components/progress/progress.d.ts +7 -0
- package/dist/components/progress/progress.js +20 -0
- package/dist/components/progress-bar/index.d.ts +1 -0
- package/dist/components/progress-bar/index.js +1 -0
- package/dist/components/progress-bar/progress-bar.d.ts +20 -0
- package/dist/components/progress-bar/progress-bar.js +51 -0
- package/dist/components/radio-group/index.d.ts +1 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/radio-group/radio-group.d.ts +5 -0
- package/dist/components/radio-group/radio-group.js +12 -0
- package/dist/components/rating/index.d.ts +1 -0
- package/dist/components/rating/index.js +1 -0
- package/dist/components/rating/rating.d.ts +13 -0
- package/dist/components/rating/rating.js +25 -0
- package/dist/components/resizable/index.d.ts +1 -0
- package/dist/components/resizable/index.js +1 -0
- package/dist/components/resizable/resizable.d.ts +7 -0
- package/dist/components/resizable/resizable.js +14 -0
- package/dist/components/ripple/index.d.ts +1 -0
- package/dist/components/ripple/index.js +1 -0
- package/dist/components/ripple/ripple.d.ts +13 -0
- package/dist/components/ripple/ripple.js +113 -0
- package/dist/components/scroll-area/index.d.ts +1 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +5 -0
- package/dist/components/scroll-area/scroll-area.js +11 -0
- package/dist/components/scrollbar/classes.d.ts +3 -0
- package/dist/components/scrollbar/classes.js +4 -0
- package/dist/components/scrollbar/index.d.ts +2 -0
- package/dist/components/scrollbar/index.js +2 -0
- package/dist/components/scrollbar/scrollbar.d.ts +12 -0
- package/dist/components/scrollbar/scrollbar.js +9 -0
- package/dist/components/search-not-found/index.d.ts +1 -0
- package/dist/components/search-not-found/index.js +1 -0
- package/dist/components/search-not-found/search-not-found.d.ts +16 -0
- package/dist/components/search-not-found/search-not-found.js +16 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/select/select.d.ts +15 -0
- package/dist/components/select/select.js +34 -0
- package/dist/components/separator/index.d.ts +1 -0
- package/dist/components/separator/index.js +1 -0
- package/dist/components/separator/separator.d.ts +3 -0
- package/dist/components/separator/separator.js +8 -0
- package/dist/components/sheet/index.d.ts +1 -0
- package/dist/components/sheet/index.js +1 -0
- package/dist/components/sheet/sheet.d.ts +14 -0
- package/dist/components/sheet/sheet.js +37 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/skeleton/skeleton.d.ts +2 -0
- package/dist/components/skeleton/skeleton.js +7 -0
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/slider/index.js +1 -0
- package/dist/components/slider/slider.d.ts +3 -0
- package/dist/components/slider/slider.js +13 -0
- package/dist/components/snackbar/classes.d.ts +18 -0
- package/dist/components/snackbar/classes.js +19 -0
- package/dist/components/snackbar/index.d.ts +3 -0
- package/dist/components/snackbar/index.js +3 -0
- package/dist/components/snackbar/snackbar.d.ts +8 -0
- package/dist/components/snackbar/snackbar.js +39 -0
- package/dist/components/spinner/index.d.ts +1 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/spinner/spinner.d.ts +2 -0
- package/dist/components/spinner/spinner.js +8 -0
- package/dist/components/svg-color/classes.d.ts +3 -0
- package/dist/components/svg-color/classes.js +4 -0
- package/dist/components/svg-color/index.d.ts +2 -0
- package/dist/components/svg-color/index.js +2 -0
- package/dist/components/svg-color/svg-color.d.ts +7 -0
- package/dist/components/svg-color/svg-color.js +12 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/index.js +1 -0
- package/dist/components/switch/switch.d.ts +8 -0
- package/dist/components/switch/switch.js +17 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/table/table.d.ts +10 -0
- package/dist/components/table/table.js +28 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/tabs/index.js +1 -0
- package/dist/components/tabs/tabs.d.ts +10 -0
- package/dist/components/tabs/tabs.js +31 -0
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/textarea/textarea.d.ts +3 -0
- package/dist/components/textarea/textarea.js +7 -0
- package/dist/components/theme-provider/index.d.ts +1 -0
- package/dist/components/theme-provider/index.js +1 -0
- package/dist/components/theme-provider/theme-provider.d.ts +31 -0
- package/dist/components/theme-provider/theme-provider.js +92 -0
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/toggle/index.js +1 -0
- package/dist/components/toggle/toggle.d.ts +8 -0
- package/dist/components/toggle/toggle.js +27 -0
- package/dist/components/toggle-group/index.d.ts +1 -0
- package/dist/components/toggle-group/index.js +1 -0
- package/dist/components/toggle-group/toggle-group.d.ts +11 -0
- package/dist/components/toggle-group/toggle-group.js +24 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/tooltip.d.ts +6 -0
- package/dist/components/tooltip/tooltip.js +17 -0
- package/dist/components/upload/classes.d.ts +8 -0
- package/dist/components/upload/classes.js +9 -0
- package/dist/components/upload/components/placeholder.d.ts +9 -0
- package/dist/components/upload/components/placeholder.js +21 -0
- package/dist/components/upload/components/preview-multi-file.d.ts +2 -0
- package/dist/components/upload/components/preview-multi-file.js +19 -0
- package/dist/components/upload/components/preview-single-file.d.ts +3 -0
- package/dist/components/upload/components/preview-single-file.js +19 -0
- package/dist/components/upload/components/rejection-files.d.ts +6 -0
- package/dist/components/upload/components/rejection-files.js +12 -0
- package/dist/components/upload/components/upload-illustration.d.ts +3 -0
- package/dist/components/upload/components/upload-illustration.js +5 -0
- package/dist/components/upload/index.d.ts +9 -0
- package/dist/components/upload/index.js +8 -0
- package/dist/components/upload/types.d.ts +35 -0
- package/dist/components/upload/types.js +1 -0
- package/dist/components/upload/upload-avatar.d.ts +2 -0
- package/dist/components/upload/upload-avatar.js +32 -0
- package/dist/components/upload/upload-box.d.ts +2 -0
- package/dist/components/upload/upload-box.js +14 -0
- package/dist/components/upload/upload.d.ts +2 -0
- package/dist/components/upload/upload.js +23 -0
- package/dist/components/walktour/index.d.ts +4 -0
- package/dist/components/walktour/index.js +3 -0
- package/dist/components/walktour/types.d.ts +27 -0
- package/dist/components/walktour/types.js +1 -0
- package/dist/components/walktour/use-walktour.d.ts +2 -0
- package/dist/components/walktour/use-walktour.js +11 -0
- package/dist/components/walktour/walktour-tooltip.d.ts +2 -0
- package/dist/components/walktour/walktour-tooltip.js +15 -0
- package/dist/components/walktour/walktour.d.ts +2 -0
- package/dist/components/walktour/walktour.js +30 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/use-boolean.d.ts +9 -0
- package/dist/hooks/use-boolean.js +9 -0
- package/dist/hooks/use-client-rect.d.ts +6 -0
- package/dist/hooks/use-client-rect.js +18 -0
- package/dist/hooks/use-is-client.d.ts +2 -0
- package/dist/hooks/use-is-client.js +7 -0
- package/dist/hooks/use-local-storage.d.ts +10 -0
- package/dist/hooks/use-local-storage.js +39 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-popover-hover.d.ts +25 -0
- package/dist/hooks/use-popover-hover.js +33 -0
- package/dist/hooks/use-popover.d.ts +10 -0
- package/dist/hooks/use-popover.js +9 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +11 -0
- package/dist/lib/brand.d.ts +14 -0
- package/dist/lib/brand.js +31 -0
- package/dist/lib/create-classes.d.ts +1 -0
- package/dist/lib/create-classes.js +4 -0
- package/dist/lib/date.d.ts +10 -0
- package/dist/lib/date.js +32 -0
- package/dist/lib/format.d.ts +2 -0
- package/dist/lib/format.js +10 -0
- package/dist/lib/link.d.ts +5 -0
- package/dist/lib/link.js +5 -0
- package/dist/lib/path.d.ts +6 -0
- package/dist/lib/path.js +24 -0
- package/dist/lib/theme-script.d.ts +11 -0
- package/dist/lib/theme-script.js +8 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.js +1 -0
- package/dist/styles/chart.css +56 -0
- package/dist/styles/components.css +30 -0
- package/dist/styles/editor.css +199 -0
- package/dist/styles/globals.css +184 -0
- package/dist/styles/lightbox.css +42 -0
- package/dist/styles/map.css +62 -0
- package/dist/styles/markdown.css +177 -0
- package/dist/styles/nav.css +513 -0
- package/dist/styles/org-chart.css +82 -0
- package/dist/styles/scrollbar.css +9 -0
- package/dist/styles/settings.css +7 -0
- package/dist/styles/snackbar.css +68 -0
- package/dist/styles/theme.css +52 -0
- package/dist/styles/variants.css +84 -0
- package/docs/compliance-report.md +104 -0
- package/docs/frameworks.md +63 -0
- package/docs/publishing.md +23 -0
- package/docs/theming.md +40 -0
- package/package.json +518 -4
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { FieldCode } from "./field-code.js";
|
|
3
|
+
import { FieldEditor } from "./field-editor.js";
|
|
4
|
+
import { FieldRating } from "./field-rating.js";
|
|
5
|
+
import { FieldSlider } from "./field-slider.js";
|
|
6
|
+
import { FieldText } from "./field-text.js";
|
|
7
|
+
import { FieldRadioGroup } from "./field-radio-group.js";
|
|
8
|
+
import { FieldPhone } from "./field-phone.js";
|
|
9
|
+
import { FieldNumberInput } from "./field-number-input.js";
|
|
10
|
+
import { FieldAutocomplete } from "./field-autocomplete.js";
|
|
11
|
+
import { FieldCountrySelect } from "./field-country-select.js";
|
|
12
|
+
import { FieldSwitch, FieldMultiSwitch } from "./field-switch.js";
|
|
13
|
+
import { FieldSelect, FieldMultiSelect } from "./field-select.js";
|
|
14
|
+
import { FieldCheckbox, FieldMultiCheckbox } from "./field-checkbox.js";
|
|
15
|
+
import { FieldUpload, FieldUploadBox, FieldUploadAvatar } from "./field-upload.js";
|
|
16
|
+
import { FieldDatePicker, FieldDateTimePicker } from "./field-date-picker.js";
|
|
17
|
+
export const Field = {
|
|
18
|
+
Code: FieldCode,
|
|
19
|
+
Editor: FieldEditor,
|
|
20
|
+
Select: FieldSelect,
|
|
21
|
+
Upload: FieldUpload,
|
|
22
|
+
Switch: FieldSwitch,
|
|
23
|
+
Slider: FieldSlider,
|
|
24
|
+
Rating: FieldRating,
|
|
25
|
+
Text: FieldText,
|
|
26
|
+
Phone: FieldPhone,
|
|
27
|
+
Checkbox: FieldCheckbox,
|
|
28
|
+
UploadBox: FieldUploadBox,
|
|
29
|
+
RadioGroup: FieldRadioGroup,
|
|
30
|
+
DatePicker: FieldDatePicker,
|
|
31
|
+
NumberInput: FieldNumberInput,
|
|
32
|
+
MultiSelect: FieldMultiSelect,
|
|
33
|
+
MultiSwitch: FieldMultiSwitch,
|
|
34
|
+
UploadAvatar: FieldUploadAvatar,
|
|
35
|
+
Autocomplete: FieldAutocomplete,
|
|
36
|
+
MultiCheckbox: FieldMultiCheckbox,
|
|
37
|
+
CountrySelect: FieldCountrySelect,
|
|
38
|
+
DateTimePicker: FieldDateTimePicker,
|
|
39
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AnyFormApi } from "@tanstack/react-form";
|
|
2
|
+
type FormContextValue = {
|
|
3
|
+
form: AnyFormApi;
|
|
4
|
+
/** Sets a field value and runs its validators. */
|
|
5
|
+
setValue: (name: string, value: unknown) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function FormProvider({ form, children }: {
|
|
8
|
+
form: AnyFormApi;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
/** The TanStack form of the closest `<Form>`. */
|
|
12
|
+
export declare function useFormContext(): FormContextValue;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext, useMemo } from "react";
|
|
4
|
+
const FormContext = /* @__PURE__ */ createContext(null);
|
|
5
|
+
export function FormProvider({ form, children }) {
|
|
6
|
+
const value = useMemo(() => ({
|
|
7
|
+
form,
|
|
8
|
+
setValue: (name, next) => form.setFieldValue(name, next),
|
|
9
|
+
}), [form]);
|
|
10
|
+
return _jsx(FormContext.Provider, { value: value, children: children });
|
|
11
|
+
}
|
|
12
|
+
/** The TanStack form of the closest `<Form>`. */
|
|
13
|
+
export function useFormContext() {
|
|
14
|
+
const context = useContext(FormContext);
|
|
15
|
+
if (!context)
|
|
16
|
+
throw new Error("Field components must be rendered inside <Form form={form}>");
|
|
17
|
+
return context;
|
|
18
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AnyFormApi } from "@tanstack/react-form";
|
|
2
|
+
export type FormProps = Omit<React.ComponentProps<"form">, "onSubmit"> & {
|
|
3
|
+
/** The object returned by `useForm()`. Its `onSubmit` option receives the values. */
|
|
4
|
+
form: AnyFormApi;
|
|
5
|
+
};
|
|
6
|
+
export declare function Form({ form, children, ...other }: FormProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { FormProvider } from "./form-context.js";
|
|
4
|
+
export function Form({ form, children, ...other }) {
|
|
5
|
+
return (_jsx(FormProvider, { form: form, children: _jsx("form", { noValidate: true, autoComplete: "off", onSubmit: (event) => {
|
|
6
|
+
event.preventDefault();
|
|
7
|
+
event.stopPropagation();
|
|
8
|
+
void form.handleSubmit();
|
|
9
|
+
}, ...other, children: children }) }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type HelperTextProps = React.ComponentProps<"p"> & {
|
|
2
|
+
errorMessage?: string;
|
|
3
|
+
disableGutters?: boolean;
|
|
4
|
+
helperText?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare function HelperText({ helperText, errorMessage, disableGutters, className, ...other }: HelperTextProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
export function HelperText({ helperText, errorMessage, disableGutters, className, ...other }) {
|
|
5
|
+
if (!errorMessage && !helperText)
|
|
6
|
+
return null;
|
|
7
|
+
return (_jsx("p", { role: errorMessage ? "alert" : undefined, className: cn("text-caption mt-2", !disableGutters && "mx-3.5", errorMessage ? "text-error" : "text-text-secondary", className), ...other, children: errorMessage || helperText }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from "./fields.js";
|
|
2
|
+
export * from "./form-provider.js";
|
|
3
|
+
export * from "./form-context.js";
|
|
4
|
+
export * from "./field-controller.js";
|
|
5
|
+
export * from "./schema-helper.js";
|
|
6
|
+
export * from "./help-text.js";
|
|
7
|
+
export * from "./field-code.js";
|
|
8
|
+
export * from "./field-upload.js";
|
|
9
|
+
export * from "./field-select.js";
|
|
10
|
+
export * from "./field-rating.js";
|
|
11
|
+
export * from "./field-switch.js";
|
|
12
|
+
export * from "./field-slider.js";
|
|
13
|
+
export * from "./field-checkbox.js";
|
|
14
|
+
export * from "./field-text.js";
|
|
15
|
+
export * from "./field-date-picker.js";
|
|
16
|
+
export * from "./field-radio-group.js";
|
|
17
|
+
export * from "./field-phone.js";
|
|
18
|
+
export * from "./field-number-input.js";
|
|
19
|
+
export * from "./field-autocomplete.js";
|
|
20
|
+
export * from "./field-country-select.js";
|
|
21
|
+
export * from "./field-editor.js";
|
|
22
|
+
export { useForm, useStore, formOptions, revalidateLogic } from "@tanstack/react-form";
|
|
23
|
+
export type { AnyFormApi } from "@tanstack/react-form";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from "./fields.js";
|
|
2
|
+
export * from "./form-provider.js";
|
|
3
|
+
export * from "./form-context.js";
|
|
4
|
+
export * from "./field-controller.js";
|
|
5
|
+
export * from "./schema-helper.js";
|
|
6
|
+
export * from "./help-text.js";
|
|
7
|
+
export * from "./field-code.js";
|
|
8
|
+
export * from "./field-upload.js";
|
|
9
|
+
export * from "./field-select.js";
|
|
10
|
+
export * from "./field-rating.js";
|
|
11
|
+
export * from "./field-switch.js";
|
|
12
|
+
export * from "./field-slider.js";
|
|
13
|
+
export * from "./field-checkbox.js";
|
|
14
|
+
export * from "./field-text.js";
|
|
15
|
+
export * from "./field-date-picker.js";
|
|
16
|
+
export * from "./field-radio-group.js";
|
|
17
|
+
export * from "./field-phone.js";
|
|
18
|
+
export * from "./field-number-input.js";
|
|
19
|
+
export * from "./field-autocomplete.js";
|
|
20
|
+
export * from "./field-country-select.js";
|
|
21
|
+
export * from "./field-editor.js";
|
|
22
|
+
export { useForm, useStore, formOptions, revalidateLogic } from "@tanstack/react-form";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ZodTypeAny } from "zod";
|
|
2
|
+
import { z as zod } from "zod";
|
|
3
|
+
type MessageMapProps = {
|
|
4
|
+
required?: string;
|
|
5
|
+
invalid_type?: string;
|
|
6
|
+
};
|
|
7
|
+
/** Reusable zod schemas for the `Field.*` components. */
|
|
8
|
+
export declare const schemaHelper: {
|
|
9
|
+
phoneNumber: (props?: {
|
|
10
|
+
message?: MessageMapProps;
|
|
11
|
+
isValid?: (text: string) => boolean;
|
|
12
|
+
}) => zod.ZodString;
|
|
13
|
+
date: (props?: {
|
|
14
|
+
message?: MessageMapProps;
|
|
15
|
+
}) => zod.ZodPipe<zod.ZodNullable<zod.ZodCoercedDate<unknown>>, zod.ZodTransform<string | null, Date | null>>;
|
|
16
|
+
editor: (props?: {
|
|
17
|
+
message: string;
|
|
18
|
+
}) => zod.ZodString;
|
|
19
|
+
nullableInput: <T extends ZodTypeAny>(schema: T, options?: {
|
|
20
|
+
message?: string;
|
|
21
|
+
}) => zod.ZodPipe<zod.ZodNullable<T>, zod.ZodTransform<Awaited<zod.core.output<T>> | null, zod.core.output<T> | null>>;
|
|
22
|
+
boolean: (props?: {
|
|
23
|
+
message: string;
|
|
24
|
+
}) => zod.ZodCoercedBoolean<unknown>;
|
|
25
|
+
sliderRange: (props: {
|
|
26
|
+
message?: string;
|
|
27
|
+
min: number;
|
|
28
|
+
max: number;
|
|
29
|
+
}) => zod.ZodArray<zod.ZodNumber>;
|
|
30
|
+
file: (props?: {
|
|
31
|
+
message: string;
|
|
32
|
+
}) => zod.ZodPipe<zod.ZodCustom<string | File | null, string | File | null>, zod.ZodTransform<string | File | null, string | File | null>>;
|
|
33
|
+
files: (props?: {
|
|
34
|
+
message: string;
|
|
35
|
+
minFiles?: number;
|
|
36
|
+
}) => zod.ZodPipe<zod.ZodArray<zod.ZodCustom<string | File, string | File>>, zod.ZodTransform<(string | File)[], (string | File)[]>>;
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { z as zod } from "zod";
|
|
2
|
+
import { formatISO, isValid } from "date-fns";
|
|
3
|
+
/** Reusable zod schemas for the `Field.*` components. */
|
|
4
|
+
export const schemaHelper = {
|
|
5
|
+
phoneNumber: (props) => zod
|
|
6
|
+
.string({
|
|
7
|
+
error: (issue) => issue.input === undefined
|
|
8
|
+
? (props?.message?.required ?? "Phone number is required!")
|
|
9
|
+
: (props?.message?.invalid_type ?? "Invalid phone number!"),
|
|
10
|
+
})
|
|
11
|
+
.min(1, { message: props?.message?.required ?? "Phone number is required!" })
|
|
12
|
+
.refine((data) => props?.isValid?.(data), {
|
|
13
|
+
message: props?.message?.invalid_type ?? "Invalid phone number!",
|
|
14
|
+
}),
|
|
15
|
+
date: (props) => zod.coerce
|
|
16
|
+
.date()
|
|
17
|
+
.nullable()
|
|
18
|
+
.transform((value, ctx) => {
|
|
19
|
+
if (!value) {
|
|
20
|
+
ctx.addIssue({
|
|
21
|
+
code: "custom",
|
|
22
|
+
message: props?.message?.required ?? "Date is required!",
|
|
23
|
+
});
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
if (!isValid(value)) {
|
|
27
|
+
ctx.addIssue({
|
|
28
|
+
code: "custom",
|
|
29
|
+
message: props?.message?.invalid_type ?? "Invalid date!",
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return isValid(value) ? formatISO(value) : null;
|
|
33
|
+
}),
|
|
34
|
+
editor: (props) => zod.string().min(8, { message: props?.message ?? "Content is required!" }),
|
|
35
|
+
nullableInput: (schema, options) => schema.nullable().transform((val, ctx) => {
|
|
36
|
+
if (val === null || val === undefined) {
|
|
37
|
+
ctx.addIssue({
|
|
38
|
+
code: "custom",
|
|
39
|
+
message: options?.message ?? "Field can not be null!",
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return val;
|
|
43
|
+
}),
|
|
44
|
+
boolean: (props) => zod.coerce.boolean().refine((val) => val === true, {
|
|
45
|
+
message: props?.message ?? "Field is required!",
|
|
46
|
+
}),
|
|
47
|
+
sliderRange: (props) => zod
|
|
48
|
+
.number()
|
|
49
|
+
.array()
|
|
50
|
+
.refine((data) => data[0] >= props.min && data[1] <= props.max, {
|
|
51
|
+
message: props.message ?? `Range must be between ${props.min} and ${props.max}`,
|
|
52
|
+
}),
|
|
53
|
+
file: (props) => zod.custom().transform((data, ctx) => {
|
|
54
|
+
const hasFile = data instanceof File || (typeof data === "string" && !!data.length);
|
|
55
|
+
if (!hasFile) {
|
|
56
|
+
ctx.addIssue({
|
|
57
|
+
code: "custom",
|
|
58
|
+
message: props?.message ?? "File is required!",
|
|
59
|
+
});
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return data;
|
|
63
|
+
}),
|
|
64
|
+
files: (props) => zod.array(zod.custom()).transform((data, ctx) => {
|
|
65
|
+
const minFiles = props?.minFiles ?? 2;
|
|
66
|
+
if (!data.length) {
|
|
67
|
+
ctx.addIssue({
|
|
68
|
+
code: "custom",
|
|
69
|
+
message: props?.message ?? "Files is required!",
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
else if (data.length < minFiles) {
|
|
73
|
+
ctx.addIssue({
|
|
74
|
+
code: "custom",
|
|
75
|
+
message: `Must have at least ${minFiles} items!`,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return data;
|
|
79
|
+
}),
|
|
80
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./data-table/index.js";
|
|
2
|
+
export * from "./filters-result/index.js";
|
|
3
|
+
export * from "./form/index.js";
|
|
4
|
+
export * from "./mega-menu/index.js";
|
|
5
|
+
export * from "./nav-basic/index.js";
|
|
6
|
+
export * from "./nav-core/index.js";
|
|
7
|
+
export * from "./nav-section/index.js";
|
|
8
|
+
export * from "./settings/index.js";
|
|
9
|
+
export * from "./sidebar/index.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./data-table/index.js";
|
|
2
|
+
export * from "./filters-result/index.js";
|
|
3
|
+
export * from "./form/index.js";
|
|
4
|
+
export * from "./mega-menu/index.js";
|
|
5
|
+
export * from "./nav-basic/index.js";
|
|
6
|
+
export * from "./nav-core/index.js";
|
|
7
|
+
export * from "./nav-section/index.js";
|
|
8
|
+
export * from "./settings/index.js";
|
|
9
|
+
export * from "./sidebar/index.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const megaMenuClasses: {
|
|
2
|
+
li: string;
|
|
3
|
+
ul: string;
|
|
4
|
+
subheader: string;
|
|
5
|
+
dropdown: {
|
|
6
|
+
root: string;
|
|
7
|
+
paper: string;
|
|
8
|
+
};
|
|
9
|
+
item: {
|
|
10
|
+
root: string;
|
|
11
|
+
sub: string;
|
|
12
|
+
icon: string;
|
|
13
|
+
info: string;
|
|
14
|
+
texts: string;
|
|
15
|
+
title: string;
|
|
16
|
+
arrow: string;
|
|
17
|
+
caption: string;
|
|
18
|
+
};
|
|
19
|
+
state: {
|
|
20
|
+
open: string;
|
|
21
|
+
active: string;
|
|
22
|
+
disabled: string;
|
|
23
|
+
};
|
|
24
|
+
mobile: string;
|
|
25
|
+
vertical: string;
|
|
26
|
+
horizontal: string;
|
|
27
|
+
carousel: {
|
|
28
|
+
root: string;
|
|
29
|
+
item: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createClasses } from "../../lib/create-classes.js";
|
|
2
|
+
import { navCoreClasses } from "../nav-core/index.js";
|
|
3
|
+
export const megaMenuClasses = {
|
|
4
|
+
mobile: /* @__PURE__ */ createClasses("mega__menu__mobile"),
|
|
5
|
+
vertical: /* @__PURE__ */ createClasses("mega__menu__vertical"),
|
|
6
|
+
horizontal: /* @__PURE__ */ createClasses("mega__menu__horizontal"),
|
|
7
|
+
carousel: {
|
|
8
|
+
root: /* @__PURE__ */ createClasses("nav__carousel_root"),
|
|
9
|
+
item: /* @__PURE__ */ createClasses("nav__carousel_item"),
|
|
10
|
+
},
|
|
11
|
+
...navCoreClasses,
|
|
12
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { MegaMenuItemData, MegaMenuProps, MegaMenuSlide, MegaMenuSlotProps } from "./types.js";
|
|
2
|
+
type MegaItemProps = Omit<React.ComponentProps<"a">, "title"> & Pick<MegaMenuItemData, "path" | "title" | "icon" | "info"> & {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
hasChild?: boolean;
|
|
7
|
+
externalLink?: boolean;
|
|
8
|
+
enabledRootRedirect?: boolean;
|
|
9
|
+
render?: MegaMenuProps["render"];
|
|
10
|
+
slotProps?: MegaMenuSlotProps["rootItem"];
|
|
11
|
+
arrow?: "right" | "down";
|
|
12
|
+
};
|
|
13
|
+
export declare function MegaItem({ path, icon, info, title, open, active, disabled, render, hasChild, slotProps, className, externalLink, enabledRootRedirect, arrow, ...other }: MegaItemProps): import("react").JSX.Element;
|
|
14
|
+
type SubListProps = {
|
|
15
|
+
data: MegaMenuItemData["children"];
|
|
16
|
+
slotProps?: MegaMenuSlotProps;
|
|
17
|
+
};
|
|
18
|
+
export declare function NavSubList({ data, slotProps }: SubListProps): import("react").JSX.Element;
|
|
19
|
+
export declare function NavCarousel({ slides, className, options, }: {
|
|
20
|
+
slides: MegaMenuSlide[];
|
|
21
|
+
className?: string;
|
|
22
|
+
options?: MegaMenuSlotProps["carousel"] extends infer C ? (C extends {
|
|
23
|
+
options?: infer O;
|
|
24
|
+
} ? O : never) : never;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
26
|
+
export declare function NavDropdownContent({ data, slotProps, isMultiList, hotProductsLabel, }: {
|
|
27
|
+
data: MegaMenuItemData;
|
|
28
|
+
slotProps?: MegaMenuSlotProps;
|
|
29
|
+
isMultiList: boolean;
|
|
30
|
+
hotProductsLabel?: string;
|
|
31
|
+
}): import("react").JSX.Element | null;
|
|
32
|
+
export declare function NavDrawerHeader({ title, onBack, backLabel, }: {
|
|
33
|
+
title: string;
|
|
34
|
+
onBack: () => void;
|
|
35
|
+
backLabel?: string;
|
|
36
|
+
}): import("react").JSX.Element;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
5
|
+
import { isEqualPath } from "../../lib/path.js";
|
|
6
|
+
import { Separator } from "../../components/separator/index.js";
|
|
7
|
+
import { Carousel, CarouselArrowBasicButtons, CarouselDotButtons, useCarousel, } from "../../components/carousel/index.js";
|
|
8
|
+
import { Image } from "../../components/image/index.js";
|
|
9
|
+
import { renderNavLink } from "../../lib/link.js";
|
|
10
|
+
import { NavLi, NavUl, resolveIcon, resolveInfo, useNav } from "../nav-core/index.js";
|
|
11
|
+
import { megaMenuClasses } from "./classes.js";
|
|
12
|
+
export function MegaItem({ path, icon, info, title, open, active, disabled, render, hasChild, slotProps, className, externalLink, enabledRootRedirect, arrow = "right", ...other }) {
|
|
13
|
+
const { linkRender } = useNav();
|
|
14
|
+
const asDiv = hasChild && !enabledRootRedirect;
|
|
15
|
+
const classes = cn("xui-mega-item", megaMenuClasses.item.root, open && megaMenuClasses.state.open, active && megaMenuClasses.state.active, disabled && megaMenuClasses.state.disabled, slotProps?.className, className);
|
|
16
|
+
const state = {
|
|
17
|
+
"aria-label": title,
|
|
18
|
+
"aria-disabled": disabled || undefined,
|
|
19
|
+
"data-open": open || undefined,
|
|
20
|
+
"data-active": active || undefined,
|
|
21
|
+
};
|
|
22
|
+
const content = (_jsxs(_Fragment, { children: [icon && (_jsx("span", { className: cn("xui-nav-item__icon", megaMenuClasses.item.icon, slotProps?.icon), children: resolveIcon(icon, render) })), title && (_jsx("span", { className: cn("xui-nav-item__title", megaMenuClasses.item.title, slotProps?.title), children: title })), info && (_jsx("span", { className: cn("xui-nav-item__info", megaMenuClasses.item.info, slotProps?.info), children: resolveInfo(info, render) })), hasChild && (_jsx(ChevronRightIcon, { "aria-hidden": true, className: cn("xui-nav-item__arrow", megaMenuClasses.item.arrow, arrow === "down" && "rotate-90", slotProps?.arrow) }))] }));
|
|
23
|
+
if (asDiv) {
|
|
24
|
+
return (_jsx("div", { role: "button", tabIndex: disabled ? -1 : 0, className: classes, ...state, ...other, onKeyDown: (event) => {
|
|
25
|
+
other.onKeyDown?.(event);
|
|
26
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
event.currentTarget.click();
|
|
29
|
+
}
|
|
30
|
+
}, children: content }));
|
|
31
|
+
}
|
|
32
|
+
const linkProps = externalLink ? { href: path, target: "_blank", rel: "noopener" } : { href: path };
|
|
33
|
+
return renderNavLink(linkRender, { className: classes, ...state, ...linkProps, ...other }, content);
|
|
34
|
+
}
|
|
35
|
+
export function NavSubList({ data, slotProps }) {
|
|
36
|
+
const { pathname, linkRender } = useNav();
|
|
37
|
+
return (_jsx(_Fragment, { children: data?.map((list) => (_jsxs(NavLi, { className: "mb-6 block break-inside-avoid", children: [list.subheader && (_jsx("div", { className: cn(megaMenuClasses.subheader, "text-subtitle2 mb-2 truncate", slotProps?.subheader), children: list.subheader })), _jsx(NavUl, { className: "items-start gap-1.5", children: list.items.map((item) => {
|
|
38
|
+
const active = isEqualPath(item.path, pathname);
|
|
39
|
+
return (_jsx(NavLi, { className: "inline-flex w-full", children: renderNavLink(linkRender, {
|
|
40
|
+
href: item.path,
|
|
41
|
+
"aria-current": active ? "page" : undefined,
|
|
42
|
+
className: cn(megaMenuClasses.item.sub, "text-small leading-[22px] text-text-secondary transition-colors hover:text-text-primary", active && "font-semibold text-text-primary underline", slotProps?.subItem),
|
|
43
|
+
}, item.title) }, item.title));
|
|
44
|
+
}) })] }, list.subheader ?? list.items[0].title))) }));
|
|
45
|
+
}
|
|
46
|
+
export function NavCarousel({ slides, className, options, }) {
|
|
47
|
+
const { linkRender } = useNav();
|
|
48
|
+
const carousel = useCarousel({
|
|
49
|
+
...options,
|
|
50
|
+
slidesToShow: options?.slidesToShow ?? 8,
|
|
51
|
+
slidesToScroll: options?.slidesToScroll ?? 8,
|
|
52
|
+
});
|
|
53
|
+
return (_jsxs("div", { className: cn(megaMenuClasses.carousel.root, "relative pt-4", className), children: [_jsx(Carousel, { carousel: carousel, children: slides.map((item) => renderNavLink(linkRender, {
|
|
54
|
+
key: item.name,
|
|
55
|
+
href: item.path,
|
|
56
|
+
className: cn(megaMenuClasses.carousel.item, "flex flex-col gap-2 px-2 transition-colors hover:text-primary"),
|
|
57
|
+
}, _jsxs(_Fragment, { children: [_jsx(Image, { alt: item.name, src: item.coverUrl, ratio: "1/1", className: "rounded-sm" }), _jsx("span", { className: "text-caption line-clamp-2 font-semibold", children: item.name })] }))) }), _jsxs("div", { className: "mt-4 flex items-center justify-between", children: [_jsx(CarouselArrowBasicButtons, { ...carousel.arrows, options: carousel.options }), _jsx(CarouselDotButtons, { scrollSnaps: carousel.dots.scrollSnaps, selectedIndex: carousel.dots.selectedIndex, onClickDot: carousel.dots.onClickDot, className: "text-primary" })] })] }));
|
|
58
|
+
}
|
|
59
|
+
export function NavDropdownContent({ data, slotProps, isMultiList, hotProductsLabel = "Hot products:", }) {
|
|
60
|
+
const { linkRender } = useNav();
|
|
61
|
+
if (!data.children)
|
|
62
|
+
return null;
|
|
63
|
+
if (!isMultiList) {
|
|
64
|
+
return (_jsx(NavUl, { className: "pt-2", children: _jsx(NavSubList, { data: data.children, slotProps: slotProps }) }));
|
|
65
|
+
}
|
|
66
|
+
return (_jsxs(_Fragment, { children: [_jsx("ul", { className: cn(megaMenuClasses.ul, "columns-4 gap-6"), children: _jsx(NavSubList, { data: data.children, slotProps: slotProps }) }), !!data.moreLink &&
|
|
67
|
+
renderNavLink(linkRender, {
|
|
68
|
+
href: data.moreLink.path,
|
|
69
|
+
className: cn("text-caption inline-flex items-center font-semibold", slotProps?.moreLink),
|
|
70
|
+
}, _jsxs(_Fragment, { children: [data.moreLink.title, _jsx(ChevronRightIcon, { className: "size-4" })] })), !!data.slides && (_jsxs(_Fragment, { children: [_jsx(Separator, { className: "my-6 border-t border-dashed bg-transparent" }), _jsx(NavCarousel, { slides: data.slides, options: slotProps?.carousel?.options, className: slotProps?.carousel?.className })] })), !!data.tags && (_jsxs(_Fragment, { children: [_jsx(Separator, { className: "my-6 border-t border-dashed bg-transparent" }), _jsxs("div", { className: slotProps?.tags, children: [_jsx("span", { className: "text-caption mr-1 font-bold", children: hotProductsLabel }), data.tags.map((tag, index) => renderNavLink(linkRender, {
|
|
71
|
+
key: tag.title,
|
|
72
|
+
href: tag.path,
|
|
73
|
+
className: "text-caption text-text-secondary transition-colors hover:text-text-primary",
|
|
74
|
+
}, index === 0 ? tag.title : `, ${tag.title} `))] })] }))] }));
|
|
75
|
+
}
|
|
76
|
+
export function NavDrawerHeader({ title, onBack, backLabel = "Back", }) {
|
|
77
|
+
return (_jsxs("div", { className: "text-subtitle1 flex items-center gap-2 px-2 py-3", children: [_jsx("button", { type: "button", "aria-label": backLabel, onClick: onBack, className: "inline-flex cursor-pointer rounded-full p-2 hover:bg-action-hover", children: _jsx(ChevronLeftIcon, { className: "size-4 rtl:rotate-180" }) }), title] }));
|
|
78
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { NavProvider, NavUl } from "../nav-core/index.js";
|
|
5
|
+
import { megaMenuClasses } from "./classes.js";
|
|
6
|
+
import { MegaNavList } from "./mega-nav-list.js";
|
|
7
|
+
export function MegaMenuHorizontal({ data, render, className, slotProps, enabledRootRedirect, cssVars, style, pathname, linkRender, labels, ...other }) {
|
|
8
|
+
return (_jsx(NavProvider, { pathname: pathname, linkRender: linkRender, children: _jsx("nav", { className: cn(megaMenuClasses.horizontal, className), style: { ...cssVars, ...style }, ...other, children: _jsx(NavUl, { className: "flex-row gap-(--nav-item-gap)", children: data.map((list) => (_jsx(MegaNavList, { data: list, variant: "horizontal", render: render, cssVars: cssVars, labels: labels, slotProps: slotProps, enabledRootRedirect: enabledRootRedirect }, list.title))) }) }) }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MegaMenuItemData, MegaMenuProps } from "./types.js";
|
|
2
|
+
type Props = Pick<MegaMenuProps, "render" | "slotProps" | "enabledRootRedirect" | "cssVars" | "labels"> & {
|
|
3
|
+
data: MegaMenuItemData;
|
|
4
|
+
variant: "vertical" | "horizontal";
|
|
5
|
+
};
|
|
6
|
+
export declare function MegaNavList({ data, variant, render, slotProps, enabledRootRedirect, cssVars, labels }: Props): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { useEffect } from "react";
|
|
5
|
+
import { usePopoverHover } from "../../hooks/use-popover-hover.js";
|
|
6
|
+
import { isActiveLink, isExternalLink } from "../../lib/path.js";
|
|
7
|
+
import { NavDropdown, NavLi, useNav } from "../nav-core/index.js";
|
|
8
|
+
import { useTheme } from "../../components/theme-provider/index.js";
|
|
9
|
+
import { MegaItem, NavDropdownContent } from "./components.js";
|
|
10
|
+
import { megaMenuClasses } from "./classes.js";
|
|
11
|
+
export function MegaNavList({ data, variant, render, slotProps, enabledRootRedirect, cssVars, labels }) {
|
|
12
|
+
const { pathname } = useNav();
|
|
13
|
+
const { direction } = useTheme();
|
|
14
|
+
const isActive = isActiveLink(pathname, data.path, !!data.children);
|
|
15
|
+
const hover = usePopoverHover();
|
|
16
|
+
const { open, onClose } = hover;
|
|
17
|
+
const hasChild = !!data.children;
|
|
18
|
+
const isMultiList = data.children?.length !== 1;
|
|
19
|
+
const isRtl = direction === "rtl";
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (open)
|
|
22
|
+
onClose();
|
|
23
|
+
}, [pathname]);
|
|
24
|
+
return (_jsxs(NavLi, { disabled: data.disabled, children: [_jsx(MegaItem, { path: data.path, icon: data.icon, info: data.info, title: data.title, open: open, active: isActive, disabled: data.disabled, render: render, hasChild: hasChild, arrow: variant === "horizontal" ? "down" : "right", externalLink: isExternalLink(data.path), enabledRootRedirect: enabledRootRedirect, slotProps: slotProps?.rootItem, onMouseEnter: (event) => hasChild && hover.triggerProps.onMouseEnter(event), onMouseLeave: hover.triggerProps.onMouseLeave, onFocus: (event) => hasChild && hover.triggerProps.onFocus(event) }), hasChild && (_jsx(NavDropdown, { open: open, anchorEl: hover.anchorEl, side: variant === "horizontal" ? "bottom" : isRtl ? "left" : "right", align: "start", sideOffset: 8, varsClassName: variant === "horizontal" ? megaMenuClasses.horizontal : megaMenuClasses.vertical, style: cssVars, paperClassName: cn("rounded-2xl", isMultiList ? "w-[min(800px,90vw)] p-5" : "min-w-60 p-4", slotProps?.dropdown), ...hover.popupProps, children: _jsx(NavDropdownContent, { data: data, slotProps: slotProps, isMultiList: isMultiList, hotProductsLabel: labels?.hotProducts }) }))] }));
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { MegaMenuProps } from "./types.js";
|
|
2
|
+
export type MegaMenuMobileProps = MegaMenuProps & {
|
|
3
|
+
slots?: {
|
|
4
|
+
/** Element that opens the drawer; receives `onClick`. */
|
|
5
|
+
button?: React.ReactElement<{
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
}>;
|
|
8
|
+
topArea?: React.ReactNode;
|
|
9
|
+
bottomArea?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
labels?: MegaMenuProps["labels"] & {
|
|
12
|
+
menu?: string;
|
|
13
|
+
back?: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare function MegaMenuMobile({ data, slots, render, className, slotProps, enabledRootRedirect, cssVars, style, pathname, linkRender, labels, ...other }: MegaMenuMobileProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { MenuIcon } from "lucide-react";
|
|
5
|
+
import { cloneElement, useEffect, useState } from "react";
|
|
6
|
+
import { isActiveLink, isExternalLink } from "../../lib/path.js";
|
|
7
|
+
import { Sheet, SheetContent, SheetTitle } from "../../components/sheet/index.js";
|
|
8
|
+
import { NavProvider, NavUl, NavLi, useNav } from "../nav-core/index.js";
|
|
9
|
+
import { megaMenuClasses } from "./classes.js";
|
|
10
|
+
import { MegaItem, NavDrawerHeader, NavSubList } from "./components.js";
|
|
11
|
+
export function MegaMenuMobile({ data, slots, render, className, slotProps, enabledRootRedirect, cssVars, style, pathname, linkRender, labels, ...other }) {
|
|
12
|
+
return (_jsx(NavProvider, { pathname: pathname, linkRender: linkRender, children: _jsx(Drawer, { data: data, slots: slots, render: render, className: className, slotProps: slotProps, enabledRootRedirect: enabledRootRedirect, cssVars: cssVars, style: style, labels: labels, navProps: other }) }));
|
|
13
|
+
}
|
|
14
|
+
function Drawer({ data, slots, render, className, slotProps, enabledRootRedirect, cssVars, style, labels, navProps, }) {
|
|
15
|
+
const { pathname } = useNav();
|
|
16
|
+
const [open, setOpen] = useState(false);
|
|
17
|
+
const [stack, setStack] = useState(null);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
setOpen(false);
|
|
20
|
+
}, [pathname]);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!open)
|
|
23
|
+
setStack(null);
|
|
24
|
+
}, [open]);
|
|
25
|
+
const button = slots?.button ? (cloneElement(slots.button, { onClick: () => setOpen(true) })) : (_jsx("button", { type: "button", "aria-label": labels?.menu ?? "Open menu", onClick: () => setOpen(true), className: "inline-flex cursor-pointer rounded-full p-2 text-action-active hover:bg-action-hover", children: _jsx(MenuIcon, { className: "size-6" }) }));
|
|
26
|
+
return (_jsxs(_Fragment, { children: [button, _jsx(Sheet, { open: open, onOpenChange: setOpen, children: _jsxs(SheetContent, { side: "left", showCloseButton: false, className: cn(megaMenuClasses.mobile, "w-(--nav-width) gap-0 p-0 sm:max-w-none", className), style: { ...cssVars, ...style }, children: [_jsx(SheetTitle, { className: "sr-only", children: labels?.menu ?? "Menu" }), slots?.topArea, _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: stack ? (_jsxs(_Fragment, { children: [_jsx(NavDrawerHeader, { title: stack.title, onBack: () => setStack(null), backLabel: labels?.back }), _jsx("div", { className: "border-t border-divider p-4", children: _jsx("nav", { ...navProps, children: _jsx(NavUl, { className: "gap-6", children: _jsx(NavSubList, { data: stack.children, slotProps: slotProps }) }) }) })] })) : (_jsx("nav", { ...navProps, children: _jsx(NavUl, { className: "gap-(--nav-item-gap)", children: data.map((item) => (_jsx(NavLi, { disabled: item.disabled, children: _jsx(MegaItem, { path: item.path, icon: item.icon, info: item.info, title: item.title, active: isActiveLink(pathname, item.path, !!item.children), disabled: item.disabled, render: render, hasChild: !!item.children, externalLink: isExternalLink(item.path), enabledRootRedirect: enabledRootRedirect, slotProps: slotProps?.rootItem, onClick: () => item.children && setStack(item) }) }, item.title))) }) })) }), slots?.bottomArea] }) })] }));
|
|
27
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { CarouselOptions } from "../../components/carousel/index.js";
|
|
2
|
+
import type { NavLinkRender } from "../../lib/link.js";
|
|
3
|
+
import type { NavItemRenderProps } from "../nav-core/index.js";
|
|
4
|
+
export type MegaMenuItemSlotProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
info?: string;
|
|
9
|
+
arrow?: string;
|
|
10
|
+
};
|
|
11
|
+
export type MegaMenuSlotProps = {
|
|
12
|
+
rootItem?: MegaMenuItemSlotProps;
|
|
13
|
+
subItem?: string;
|
|
14
|
+
subheader?: string;
|
|
15
|
+
dropdown?: string;
|
|
16
|
+
tags?: string;
|
|
17
|
+
moreLink?: string;
|
|
18
|
+
carousel?: {
|
|
19
|
+
className?: string;
|
|
20
|
+
options?: CarouselOptions;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type MegaMenuSlide = {
|
|
24
|
+
name: string;
|
|
25
|
+
path: string;
|
|
26
|
+
coverUrl: string;
|
|
27
|
+
};
|
|
28
|
+
export type MegaMenuItemData = {
|
|
29
|
+
path: string;
|
|
30
|
+
title: string;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
icon?: string | React.ReactNode;
|
|
33
|
+
info?: string[] | React.ReactNode;
|
|
34
|
+
slides?: MegaMenuSlide[];
|
|
35
|
+
moreLink?: {
|
|
36
|
+
path: string;
|
|
37
|
+
title: string;
|
|
38
|
+
};
|
|
39
|
+
tags?: {
|
|
40
|
+
path: string;
|
|
41
|
+
title: string;
|
|
42
|
+
}[];
|
|
43
|
+
children?: {
|
|
44
|
+
subheader?: string;
|
|
45
|
+
items: {
|
|
46
|
+
title: string;
|
|
47
|
+
path: string;
|
|
48
|
+
}[];
|
|
49
|
+
}[];
|
|
50
|
+
};
|
|
51
|
+
export type MegaMenuProps = Omit<React.ComponentProps<"nav">, "data"> & {
|
|
52
|
+
data: MegaMenuItemData[];
|
|
53
|
+
render?: NavItemRenderProps;
|
|
54
|
+
enabledRootRedirect?: boolean;
|
|
55
|
+
slotProps?: MegaMenuSlotProps;
|
|
56
|
+
/** CSS variable overrides, e.g. `{ "--nav-width": "300px" }`. */
|
|
57
|
+
cssVars?: React.CSSProperties;
|
|
58
|
+
/** Current location path. Falls back to the surrounding `NavProvider`. */
|
|
59
|
+
pathname?: string;
|
|
60
|
+
/** Router link element, e.g. `<Link />`. Falls back to the surrounding `NavProvider`. */
|
|
61
|
+
linkRender?: NavLinkRender;
|
|
62
|
+
labels?: {
|
|
63
|
+
hotProducts?: string;
|
|
64
|
+
};
|
|
65
|
+
};
|