@xerobi/ui 0.0.0-stage → 0.1.1
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/clipboard-text/clipboard-text.d.ts +15 -0
- package/dist/components/clipboard-text/clipboard-text.js +58 -0
- package/dist/components/clipboard-text/index.d.ts +1 -0
- package/dist/components/clipboard-text/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 +90 -0
- package/dist/components/index.js +90 -0
- package/dist/components/inline-copy-text/index.d.ts +1 -0
- package/dist/components/inline-copy-text/index.js +1 -0
- package/dist/components/inline-copy-text/inline-copy-text.d.ts +35 -0
- package/dist/components/inline-copy-text/inline-copy-text.js +66 -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/navigation-progress/index.d.ts +1 -0
- package/dist/components/navigation-progress/index.js +1 -0
- package/dist/components/navigation-progress/navigation-progress.d.ts +10 -0
- package/dist/components/navigation-progress/navigation-progress.js +59 -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/sensitive-input/index.d.ts +1 -0
- package/dist/components/sensitive-input/index.js +1 -0
- package/dist/components/sensitive-input/sensitive-input.d.ts +14 -0
- package/dist/components/sensitive-input/sensitive-input.js +175 -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/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 +59 -0
- package/dist/components/switch/switch.js +61 -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/toast/index.d.ts +1 -0
- package/dist/components/toast/index.js +1 -0
- package/dist/components/toast/toast.d.ts +90 -0
- package/dist/components/toast/toast.js +137 -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/toolbar/index.d.ts +1 -0
- package/dist/components/toolbar/index.js +1 -0
- package/dist/components/toolbar/toolbar.d.ts +18 -0
- package/dist/components/toolbar/toolbar.js +53 -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 +53 -0
- package/dist/components/tooltip/tooltip.js +49 -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/components/xerobi-logo/index.d.ts +1 -0
- package/dist/components/xerobi-logo/index.js +1 -0
- package/dist/components/xerobi-logo/xerobi-logo.d.ts +60 -0
- package/dist/components/xerobi-logo/xerobi-logo.js +88 -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 +219 -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/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 +542 -4
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
4
|
+
import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "../dropdown-menu/index.js";
|
|
7
|
+
import { CheckIcon } from "lucide-react";
|
|
8
|
+
function Menubar({ className, ...props }) {
|
|
9
|
+
return (_jsx(MenubarPrimitive, { "data-slot": "menubar", className: cn("flex h-8 items-center gap-0.5 rounded-lg border p-[3px]", className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function MenubarMenu({ ...props }) {
|
|
12
|
+
return _jsx(DropdownMenu, { "data-slot": "menubar-menu", ...props });
|
|
13
|
+
}
|
|
14
|
+
function MenubarGroup({ ...props }) {
|
|
15
|
+
return _jsx(DropdownMenuGroup, { "data-slot": "menubar-group", ...props });
|
|
16
|
+
}
|
|
17
|
+
function MenubarPortal({ ...props }) {
|
|
18
|
+
return _jsx(DropdownMenuPortal, { "data-slot": "menubar-portal", ...props });
|
|
19
|
+
}
|
|
20
|
+
function MenubarTrigger({ className, ...props }) {
|
|
21
|
+
return (_jsx(DropdownMenuTrigger, { "data-slot": "menubar-trigger", className: cn("flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted", className), ...props }));
|
|
22
|
+
}
|
|
23
|
+
function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
|
|
24
|
+
return (_jsx(DropdownMenuContent, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("min-w-36 xui-paper xui-paper-dropdown text-popover-foreground duration-150 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", className), ...props }));
|
|
25
|
+
}
|
|
26
|
+
function MenubarItem({ className, inset, variant = "default", ...props }) {
|
|
27
|
+
return (_jsx(DropdownMenuItem, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("group/menubar-item gap-1.5 rounded-sm px-2 py-1.5 text-body2 not-last:mb-1 focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!", className), ...props }));
|
|
28
|
+
}
|
|
29
|
+
function MenubarCheckboxItem({ className, children, checked, inset, ...props }) {
|
|
30
|
+
return (_jsxs(MenuPrimitive.CheckboxItem, { "data-slot": "menubar-checkbox-item", "data-inset": inset, className: cn("relative flex cursor-default items-center gap-1.5 rounded-sm py-1.5 pr-2 pl-8 text-body2 not-last:mb-1 outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: _jsx(MenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
|
|
31
|
+
}
|
|
32
|
+
function MenubarRadioGroup({ ...props }) {
|
|
33
|
+
return _jsx(DropdownMenuRadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
34
|
+
}
|
|
35
|
+
function MenubarRadioItem({ className, children, inset, ...props }) {
|
|
36
|
+
return (_jsxs(MenuPrimitive.RadioItem, { "data-slot": "menubar-radio-item", "data-inset": inset, className: cn("relative flex cursor-default items-center gap-1.5 rounded-sm py-1.5 pr-2 pl-8 text-body2 not-last:mb-1 outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: _jsx(MenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
|
|
37
|
+
}
|
|
38
|
+
function MenubarLabel({ className, inset, ...props }) {
|
|
39
|
+
return (_jsx(DropdownMenuLabel, { "data-slot": "menubar-label", "data-inset": inset, className: cn("px-2 py-1.5 text-body2 font-semibold data-inset:pl-8", className), ...props }));
|
|
40
|
+
}
|
|
41
|
+
function MenubarSeparator({ className, ...props }) {
|
|
42
|
+
return (_jsx(DropdownMenuSeparator, { "data-slot": "menubar-separator", className: cn("-mx-1 my-1 h-px bg-divider", className), ...props }));
|
|
43
|
+
}
|
|
44
|
+
function MenubarShortcut({ className, ...props }) {
|
|
45
|
+
return (_jsx(DropdownMenuShortcut, { "data-slot": "menubar-shortcut", className: cn("ml-auto text-caption tracking-widest text-text-secondary group-focus/menubar-item:text-accent-foreground", className), ...props }));
|
|
46
|
+
}
|
|
47
|
+
function MenubarSub({ ...props }) {
|
|
48
|
+
return _jsx(DropdownMenuSub, { "data-slot": "menubar-sub", ...props });
|
|
49
|
+
}
|
|
50
|
+
function MenubarSubTrigger({ className, inset, ...props }) {
|
|
51
|
+
return (_jsx(DropdownMenuSubTrigger, { "data-slot": "menubar-sub-trigger", "data-inset": inset, className: cn("gap-1.5 rounded-sm px-2 py-1.5 text-body2 not-last:mb-1 focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
52
|
+
}
|
|
53
|
+
function MenubarSubContent({ className, ...props }) {
|
|
54
|
+
return (_jsx(DropdownMenuSubContent, { "data-slot": "menubar-sub-content", className: cn("min-w-32 xui-paper xui-paper-dropdown text-popover-foreground duration-150 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }));
|
|
55
|
+
}
|
|
56
|
+
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./native-select.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./native-select.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
|
|
3
|
+
size?: "sm" | "default";
|
|
4
|
+
};
|
|
5
|
+
declare function NativeSelect({ className, size, ...props }: NativeSelectProps): React.JSX.Element;
|
|
6
|
+
declare function NativeSelectOption({ className, ...props }: React.ComponentProps<"option">): React.JSX.Element;
|
|
7
|
+
declare function NativeSelectOptGroup({ className, ...props }: React.ComponentProps<"optgroup">): React.JSX.Element;
|
|
8
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
5
|
+
function NativeSelect({ className, size = "default", ...props }) {
|
|
6
|
+
return (_jsxs("div", { className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className), "data-slot": "native-select-wrapper", "data-size": size, children: [_jsx("select", { "data-slot": "native-select", "data-size": size, className: "h-10 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent py-1 pr-9 pl-3.5 text-input transition-colors outline-none select-none hover:border-text-primary focus-visible:border-text-primary focus-visible:ring-3 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-action-disabled-bg disabled:text-text-disabled aria-invalid:border-error aria-invalid:ring-3 aria-invalid:ring-error/20", ...props }), _jsx(ChevronDownIcon, { className: "pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-text-secondary select-none", "aria-hidden": "true", "data-slot": "native-select-icon" })] }));
|
|
7
|
+
}
|
|
8
|
+
function NativeSelectOption({ className, ...props }) {
|
|
9
|
+
return (_jsx("option", { "data-slot": "native-select-option", className: cn("bg-[Canvas] text-[CanvasText]", className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function NativeSelectOptGroup({ className, ...props }) {
|
|
12
|
+
return (_jsx("optgroup", { "data-slot": "native-select-optgroup", className: cn("bg-[Canvas] text-[CanvasText]", className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./navigation-menu.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./navigation-menu.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu";
|
|
2
|
+
declare function NavigationMenu({ align, className, children, ...props }: NavigationMenuPrimitive.Root.Props & Pick<NavigationMenuPrimitive.Positioner.Props, "align">): import("react").JSX.Element;
|
|
3
|
+
declare function NavigationMenuList({ className, ...props }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.List>): import("react").JSX.Element;
|
|
4
|
+
declare function NavigationMenuItem({ className, ...props }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Item>): import("react").JSX.Element;
|
|
5
|
+
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
6
|
+
declare function NavigationMenuTrigger({ className, children, ...props }: NavigationMenuPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
7
|
+
declare function NavigationMenuContent({ className, ...props }: NavigationMenuPrimitive.Content.Props): import("react").JSX.Element;
|
|
8
|
+
declare function NavigationMenuPositioner({ className, side, sideOffset, align, alignOffset, ...props }: NavigationMenuPrimitive.Positioner.Props): import("react").JSX.Element;
|
|
9
|
+
declare function NavigationMenuLink({ className, ...props }: NavigationMenuPrimitive.Link.Props): import("react").JSX.Element;
|
|
10
|
+
declare function NavigationMenuIndicator({ className, ...props }: React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Icon>): import("react").JSX.Element;
|
|
11
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerStyle, NavigationMenuPositioner, };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
7
|
+
function NavigationMenu({ align = "start", className, children, ...props }) {
|
|
8
|
+
return (_jsxs(NavigationMenuPrimitive.Root, { "data-slot": "navigation-menu", className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className), ...props, children: [children, _jsx(NavigationMenuPositioner, { align: align })] }));
|
|
9
|
+
}
|
|
10
|
+
function NavigationMenuList({ className, ...props }) {
|
|
11
|
+
return (_jsx(NavigationMenuPrimitive.List, { "data-slot": "navigation-menu-list", className: cn("group flex flex-1 list-none items-center justify-center gap-0", className), ...props }));
|
|
12
|
+
}
|
|
13
|
+
function NavigationMenuItem({ className, ...props }) {
|
|
14
|
+
return (_jsx(NavigationMenuPrimitive.Item, { "data-slot": "navigation-menu-item", className: cn("relative", className), ...props }));
|
|
15
|
+
}
|
|
16
|
+
const navigationMenuTriggerStyle = /* @__PURE__ */ cva("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");
|
|
17
|
+
function NavigationMenuTrigger({ className, children, ...props }) {
|
|
18
|
+
return (_jsxs(NavigationMenuPrimitive.Trigger, { "data-slot": "navigation-menu-trigger", className: cn(navigationMenuTriggerStyle(), "group", className), ...props, children: [children, " ", _jsx(ChevronDownIcon, { className: "relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180", "aria-hidden": "true" })] }));
|
|
19
|
+
}
|
|
20
|
+
function NavigationMenuContent({ className, ...props }) {
|
|
21
|
+
return (_jsx(NavigationMenuPrimitive.Content, { "data-slot": "navigation-menu-content", className: cn("data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95", className), ...props }));
|
|
22
|
+
}
|
|
23
|
+
function NavigationMenuPositioner({ className, side = "bottom", sideOffset = 8, align = "start", alignOffset = 0, ...props }) {
|
|
24
|
+
return (_jsx(NavigationMenuPrimitive.Portal, { children: _jsx(NavigationMenuPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, className: cn("isolate z-modal h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0", className), ...props, children: _jsx(NavigationMenuPrimitive.Popup, { className: "data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) xui-paper xui-paper-dropdown text-popover-foreground transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0", children: _jsx(NavigationMenuPrimitive.Viewport, { className: "relative size-full overflow-hidden" }) }) }) }));
|
|
25
|
+
}
|
|
26
|
+
function NavigationMenuLink({ className, ...props }) {
|
|
27
|
+
return (_jsx(NavigationMenuPrimitive.Link, { "data-slot": "navigation-menu-link", className: cn("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
28
|
+
}
|
|
29
|
+
function NavigationMenuIndicator({ className, ...props }) {
|
|
30
|
+
return (_jsx(NavigationMenuPrimitive.Icon, { "data-slot": "navigation-menu-indicator", className: cn("top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in", className), ...props, children: _jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-dropdown" }) }));
|
|
31
|
+
}
|
|
32
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerStyle, NavigationMenuPositioner, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./navigation-progress.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./navigation-progress.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface NavigationProgressProps {
|
|
2
|
+
/**
|
|
3
|
+
* Optional: For TanStack Router/Start, you can pass `useRouterState` output directly
|
|
4
|
+
* to get exact loading states. If omitted, it falls back to click/link interception.
|
|
5
|
+
*/
|
|
6
|
+
isPending?: boolean;
|
|
7
|
+
/** Optional: Customize the color (defaults to bg-primary) */
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function NavigationProgress({ isPending, className }: NavigationProgressProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState, useCallback } from "react";
|
|
4
|
+
import { cn } from "cn"; // Replace with your utility path
|
|
5
|
+
export function NavigationProgress({ isPending, className }) {
|
|
6
|
+
const [isNavigating, setIsNavigating] = useState(false);
|
|
7
|
+
// Use the explicit `isPending` prop if provided (TanStack Start),
|
|
8
|
+
// otherwise rely on the internal state (Next.js / Astro fallback).
|
|
9
|
+
const pending = isPending !== undefined ? isPending : isNavigating;
|
|
10
|
+
const startNavigation = useCallback(() => {
|
|
11
|
+
if (isPending !== undefined)
|
|
12
|
+
return; // Let the framework handle it
|
|
13
|
+
setIsNavigating(true);
|
|
14
|
+
}, [isPending]);
|
|
15
|
+
const stopNavigation = useCallback(() => {
|
|
16
|
+
if (isPending !== undefined)
|
|
17
|
+
return;
|
|
18
|
+
// Add a tiny delay so the user actually sees the bar complete
|
|
19
|
+
setTimeout(() => setIsNavigating(false), 300);
|
|
20
|
+
}, [isPending]);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (isPending !== undefined)
|
|
23
|
+
return; // Skip if explicitly controlled
|
|
24
|
+
// 1. Intercept internal link clicks
|
|
25
|
+
const handleAnchorClick = (event) => {
|
|
26
|
+
const target = event.target;
|
|
27
|
+
const anchor = target.closest("a");
|
|
28
|
+
if (anchor &&
|
|
29
|
+
anchor.href &&
|
|
30
|
+
anchor.target !== "_blank" &&
|
|
31
|
+
anchor.origin === window.location.origin &&
|
|
32
|
+
!event.defaultPrevented &&
|
|
33
|
+
!event.metaKey &&
|
|
34
|
+
!event.ctrlKey &&
|
|
35
|
+
!event.shiftKey) {
|
|
36
|
+
startNavigation();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
// 2. Stop navigation when the new page finishes loading
|
|
40
|
+
const handlePopState = () => {
|
|
41
|
+
stopNavigation();
|
|
42
|
+
};
|
|
43
|
+
// 3. Astro/Next.js full page reload detection
|
|
44
|
+
window.addEventListener("beforeunload", startNavigation);
|
|
45
|
+
document.addEventListener("click", handleAnchorClick);
|
|
46
|
+
window.addEventListener("popstate", handlePopState);
|
|
47
|
+
// For Next.js/React client-side transitions, the new route will mount
|
|
48
|
+
// and this component will re-render. We use a timeout to "finish" the bar.
|
|
49
|
+
stopNavigation();
|
|
50
|
+
return () => {
|
|
51
|
+
window.removeEventListener("beforeunload", startNavigation);
|
|
52
|
+
document.removeEventListener("click", handleAnchorClick);
|
|
53
|
+
window.removeEventListener("popstate", handlePopState);
|
|
54
|
+
};
|
|
55
|
+
}, [isPending, startNavigation, stopNavigation]);
|
|
56
|
+
return (_jsx("div", { "aria-hidden": true, className: cn("pointer-events-none fixed inset-x-0 top-0 z-50 h-[3px] overflow-hidden transition-opacity duration-200", className), style: { opacity: pending ? 1 : 0 }, children: _jsx("div", { className: cn("h-full w-1/3 rounded-r-full bg-primary",
|
|
57
|
+
// Tailwind arbitrary animation for the loading bar
|
|
58
|
+
pending && "animate-[nav-progress_1s_ease-in-out_infinite]") }) }));
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./number-input.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./number-input.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type EventHandler = React.MouseEvent<HTMLButtonElement, MouseEvent> | React.ChangeEvent<HTMLInputElement>;
|
|
2
|
+
export type NumberInputSlotProps = {
|
|
3
|
+
wrapper?: React.ComponentProps<"div">;
|
|
4
|
+
input?: Omit<React.ComponentProps<"input">, "value" | "onChange">;
|
|
5
|
+
button?: React.ComponentProps<"button">;
|
|
6
|
+
inputWrapper?: React.ComponentProps<"div">;
|
|
7
|
+
captionText?: React.ComponentProps<"span">;
|
|
8
|
+
helperText?: React.ComponentProps<"p">;
|
|
9
|
+
};
|
|
10
|
+
export type NumberInputProps = Omit<React.ComponentProps<"div">, "onChange"> & {
|
|
11
|
+
min?: number;
|
|
12
|
+
max?: number;
|
|
13
|
+
error?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
value?: number | null;
|
|
16
|
+
hideDivider?: boolean;
|
|
17
|
+
hideButtons?: boolean;
|
|
18
|
+
disableInput?: boolean;
|
|
19
|
+
helperText?: React.ReactNode;
|
|
20
|
+
captionText?: React.ReactNode;
|
|
21
|
+
slotProps?: NumberInputSlotProps;
|
|
22
|
+
onChange?: (event: EventHandler, value: number) => void;
|
|
23
|
+
};
|
|
24
|
+
export declare function NumberInput({ error, value, onChange, disabled, slotProps, helperText, captionText, hideDivider, hideButtons, disableInput, min, max, className, ...other }: NumberInputProps): import("react").JSX.Element;
|
|
25
|
+
export declare function transformNumberOnChange(value: string, options?: {
|
|
26
|
+
min?: number;
|
|
27
|
+
max?: number;
|
|
28
|
+
}): number;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { MinusIcon, PlusIcon } from "lucide-react";
|
|
5
|
+
import { useId, useCallback } from "react";
|
|
6
|
+
const counterButton = "w-8 shrink-0 inline-flex cursor-pointer items-center justify-center outline-none focus-visible:bg-action-hover disabled:pointer-events-none disabled:opacity-50";
|
|
7
|
+
export function NumberInput({ error, value, onChange, disabled, slotProps, helperText, captionText, hideDivider, hideButtons, disableInput, min = 0, max = 9999, className, ...other }) {
|
|
8
|
+
const id = useId();
|
|
9
|
+
const currentValue = value ?? 0;
|
|
10
|
+
const isDecrementDisabled = currentValue <= min || disabled;
|
|
11
|
+
const isIncrementDisabled = currentValue >= max || disabled;
|
|
12
|
+
const handleDecrement = useCallback((event) => {
|
|
13
|
+
if (!isDecrementDisabled)
|
|
14
|
+
onChange?.(event, currentValue - 1);
|
|
15
|
+
}, [isDecrementDisabled, onChange, currentValue]);
|
|
16
|
+
const handleIncrement = useCallback((event) => {
|
|
17
|
+
if (!isIncrementDisabled)
|
|
18
|
+
onChange?.(event, currentValue + 1);
|
|
19
|
+
}, [isIncrementDisabled, onChange, currentValue]);
|
|
20
|
+
const handleChange = useCallback((event) => {
|
|
21
|
+
onChange?.(event, transformNumberOnChange(event.target.value, { min, max }));
|
|
22
|
+
}, [max, min, onChange]);
|
|
23
|
+
return (_jsxs("div", { ...slotProps?.wrapper, children: [_jsxs("div", { className: cn("flex overflow-hidden rounded-md border border-grey-500/20", error && !disabled && "border-error", className), ...other, children: [!hideButtons && (_jsx("button", { type: "button", "aria-label": "Decrease", disabled: isDecrementDisabled, onClick: handleDecrement, ...slotProps?.button, className: cn(counterButton, slotProps?.button?.className), children: _jsx(MinusIcon, { size: 16 }) })), _jsxs("div", { ...slotProps?.inputWrapper, className: cn("flex flex-col items-center justify-center", !hideButtons && !hideDivider && "border-x border-grey-500/20", !disabled && error ? "bg-error/8" : "bg-grey-500/8", slotProps?.inputWrapper?.className), children: [_jsx("input", { name: id, inputMode: "numeric", disabled: disabled || disableInput, value: currentValue, onChange: handleChange, ...slotProps?.input, className: cn("text-body2 min-h-6 w-full min-w-0 bg-transparent px-2 py-1 text-center font-medium outline-none disabled:cursor-not-allowed", slotProps?.input?.className) }), captionText && (_jsx("span", { ...slotProps?.captionText, className: cn("text-caption -mt-px flex w-full items-center justify-center gap-1 px-1 pb-1 text-center text-text-disabled", slotProps?.captionText?.className), children: captionText }))] }), !hideButtons && (_jsx("button", { type: "button", "aria-label": "Increase", disabled: isIncrementDisabled, onClick: handleIncrement, ...slotProps?.button, className: cn(counterButton, slotProps?.button?.className), children: _jsx(PlusIcon, { size: 16 }) }))] }), helperText && (_jsx("p", { ...slotProps?.helperText, className: cn("text-caption mt-2 flex items-center gap-1 px-3.5", error ? "text-error" : "text-text-secondary", slotProps?.helperText?.className), children: helperText }))] }));
|
|
24
|
+
}
|
|
25
|
+
export function transformNumberOnChange(value, options) {
|
|
26
|
+
const { min = 0, max = 9999 } = options ?? {};
|
|
27
|
+
if (!value || value.trim() === "")
|
|
28
|
+
return 0;
|
|
29
|
+
const numericValue = Number(value.trim());
|
|
30
|
+
if (!Number.isNaN(numericValue)) {
|
|
31
|
+
return Math.min(Math.max(numericValue, min), max);
|
|
32
|
+
}
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./organizational-chart.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
export function OrganizationalChart({ data, nodeItem, lineWidth = 1.5, nodePadding = 4, className, style, ...other }) {
|
|
5
|
+
return (_jsx("div", { className: cn("xui-org-chart", className), style: {
|
|
6
|
+
"--org-line-width": `${lineWidth}px`,
|
|
7
|
+
"--org-node-padding": `${nodePadding}px`,
|
|
8
|
+
...style,
|
|
9
|
+
}, ...other, children: _jsx("ul", { children: _jsxs("li", { children: [_jsx("div", { className: "xui-org-chart__node", children: nodeItem({ ...data }) }), data.children.length > 0 && (_jsx("ul", { children: data.children.map((child, index) => (_jsx(TreeItem, { data: child, depth: 1, nodeItem: nodeItem }, index))) }))] }) }) }));
|
|
10
|
+
}
|
|
11
|
+
function TreeItem({ data, depth, nodeItem }) {
|
|
12
|
+
const children = data.children;
|
|
13
|
+
const totalChildren = children ? flattenArray(children).length : 0;
|
|
14
|
+
return (_jsxs("li", { children: [_jsx("div", { className: "xui-org-chart__node", children: nodeItem({ ...data, depth, totalChildren }) }), children && children.length > 0 && (_jsx("ul", { children: children.map((child, index) => (_jsx(TreeItem, { data: child, depth: depth + 1, nodeItem: nodeItem }, index))) }))] }));
|
|
15
|
+
}
|
|
16
|
+
function flattenArray(list) {
|
|
17
|
+
return list.flatMap((item) => [
|
|
18
|
+
item,
|
|
19
|
+
...(Array.isArray(item.children) ? flattenArray(item.children) : []),
|
|
20
|
+
]);
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type OrgChartProps<T> = Omit<React.ComponentProps<"div">, "children"> & {
|
|
2
|
+
data: {
|
|
3
|
+
name: string;
|
|
4
|
+
children: T[];
|
|
5
|
+
};
|
|
6
|
+
nodeItem: (props: T) => React.ReactElement;
|
|
7
|
+
/** Connector line width in px. */
|
|
8
|
+
lineWidth?: number;
|
|
9
|
+
/** Gap between a node and its connector lines, in px. */
|
|
10
|
+
nodePadding?: number;
|
|
11
|
+
};
|
|
12
|
+
export type OrgChartBaseNode = {
|
|
13
|
+
depth?: number;
|
|
14
|
+
totalChildren?: number;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./pagination.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./pagination.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { Button } from "../button/index.js";
|
|
3
|
+
declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
4
|
+
declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
5
|
+
declare function PaginationItem({ ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
6
|
+
type PaginationLinkProps = {
|
|
7
|
+
isActive?: boolean;
|
|
8
|
+
} & Pick<React.ComponentProps<typeof Button>, "size"> & React.ComponentProps<"a">;
|
|
9
|
+
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): React.JSX.Element;
|
|
10
|
+
declare function PaginationPrevious({ className, text, ...props }: React.ComponentProps<typeof PaginationLink> & {
|
|
11
|
+
text?: string;
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
declare function PaginationNext({ className, text, ...props }: React.ComponentProps<typeof PaginationLink> & {
|
|
14
|
+
text?: string;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
17
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { Button } from "../button/index.js";
|
|
5
|
+
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
6
|
+
function Pagination({ className, ...props }) {
|
|
7
|
+
return (_jsx("nav", { role: "navigation", "aria-label": "pagination", "data-slot": "pagination", className: cn("mx-auto flex w-full justify-center", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function PaginationContent({ className, ...props }) {
|
|
10
|
+
return (_jsx("ul", { "data-slot": "pagination-content", className: cn("flex items-center gap-1", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function PaginationItem({ ...props }) {
|
|
13
|
+
return _jsx("li", { "data-slot": "pagination-item", ...props });
|
|
14
|
+
}
|
|
15
|
+
function PaginationLink({ className, isActive, size = "icon", ...props }) {
|
|
16
|
+
return (_jsx(Button, { variant: isActive ? "default" : "ghost", color: "inherit", size: size, className: cn("rounded-full", size === "icon" && "size-8 text-body2", isActive && "font-semibold", className), nativeButton: false, render: _jsx("a", { "aria-current": isActive ? "page" : undefined, "data-slot": "pagination-link", "data-active": isActive, ...props }) }));
|
|
17
|
+
}
|
|
18
|
+
function PaginationPrevious({ className, text = "Previous", ...props }) {
|
|
19
|
+
return (_jsxs(PaginationLink, { "aria-label": "Go to previous page", size: "default", className: cn("pl-1.5!", className), ...props, children: [_jsx(ChevronLeftIcon, { "data-icon": "inline-start" }), _jsx("span", { className: "hidden sm:block", children: text })] }));
|
|
20
|
+
}
|
|
21
|
+
function PaginationNext({ className, text = "Next", ...props }) {
|
|
22
|
+
return (_jsxs(PaginationLink, { "aria-label": "Go to next page", size: "default", className: cn("pr-1.5!", className), ...props, children: [_jsx("span", { className: "hidden sm:block", children: text }), _jsx(ChevronRightIcon, { "data-icon": "inline-end" })] }));
|
|
23
|
+
}
|
|
24
|
+
function PaginationEllipsis({ className, ...props }) {
|
|
25
|
+
return (_jsxs("span", { "aria-hidden": true, "data-slot": "pagination-ellipsis", className: cn("flex size-8 items-center text-text-secondary justify-center [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx(MoreHorizontalIcon, {}), _jsx("span", { className: "sr-only", children: "More pages" })] }));
|
|
26
|
+
}
|
|
27
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./phone-input.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { useMemo, useState } from "react";
|
|
5
|
+
import { ChevronDownIcon, SearchIcon, XIcon } from "lucide-react";
|
|
6
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../popover/index.js";
|
|
7
|
+
import { FlagIcon } from "../flag-icon/index.js";
|
|
8
|
+
import { SearchNotFound } from "../search-not-found/index.js";
|
|
9
|
+
export function CountryListPopover({ className, disabled, labels, countries, countryCode, searchCountry, onClickCountry, onSearchCountry, }) {
|
|
10
|
+
const [open, setOpen] = useState(false);
|
|
11
|
+
const selectedCountry = useMemo(() => countries.find((country) => country.code === countryCode), [countries, countryCode]);
|
|
12
|
+
const dataFiltered = useMemo(() => applyFilter({ inputData: countries, query: searchCountry }), [countries, searchCountry]);
|
|
13
|
+
const notFound = dataFiltered.length === 0 && !!searchCountry;
|
|
14
|
+
const handleOpenChange = (next) => {
|
|
15
|
+
setOpen(next);
|
|
16
|
+
if (!next)
|
|
17
|
+
onSearchCountry("");
|
|
18
|
+
};
|
|
19
|
+
return (_jsxs(Popover, { open: open, onOpenChange: handleOpenChange, children: [_jsxs(PopoverTrigger, { disabled: disabled, "aria-label": "Select country", className: cn("absolute z-local flex h-(--popover-button-height) w-(--popover-button-width) cursor-pointer items-center justify-start outline-none disabled:cursor-not-allowed disabled:opacity-50", className), children: [_jsx(FlagIcon, { code: selectedCountry?.code, className: "size-(--popover-button-height) rounded-full" }), _jsx(ChevronDownIcon, { className: "ml-0.5 size-4 shrink-0 text-text-disabled" }), _jsx("span", { className: "ml-auto h-5 w-px bg-divider" })] }), _jsxs(PopoverContent, { align: "start", className: "h-80 w-80 max-w-80 gap-0 p-0", children: [_jsx("div", { className: "px-2 py-3", children: _jsxs("div", { className: "relative", children: [_jsx(SearchIcon, { className: "pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-text-disabled" }), _jsx("input", { autoFocus: true, value: searchCountry, onChange: (event) => onSearchCountry(event.target.value), placeholder: labels?.search ?? "Search...", className: "h-10 w-full rounded-md border border-input bg-transparent pr-9 pl-9 text-input outline-none placeholder:text-text-disabled focus-visible:border-text-primary" }), searchCountry && (_jsx("button", { type: "button", "aria-label": labels?.clear ?? "Clear search", onClick: () => onSearchCountry(""), className: "absolute top-1/2 right-2 inline-flex -translate-y-1/2 cursor-pointer rounded-full p-1 text-text-secondary hover:bg-action-hover", children: _jsx(XIcon, { className: "size-4" }) }))] }) }), _jsx("div", { className: "min-h-0 flex-1 overflow-x-hidden overflow-y-auto", children: notFound ? (_jsx(SearchNotFound, { query: searchCountry, className: "px-4 pt-10" })) : (_jsx("ul", { role: "listbox", className: "p-1", children: dataFiltered.map((country) => {
|
|
20
|
+
const selected = countryCode === country.code;
|
|
21
|
+
return (_jsx("li", { role: "option", "aria-selected": selected, children: _jsxs("button", { type: "button", onClick: () => {
|
|
22
|
+
setOpen(false);
|
|
23
|
+
onSearchCountry("");
|
|
24
|
+
onClickCountry(country.code);
|
|
25
|
+
}, className: cn("flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left outline-none hover:bg-action-hover focus-visible:bg-action-hover", selected && "bg-primary/8"), children: [_jsx(FlagIcon, { code: country.code, className: "size-[22px] shrink-0 rounded-full" }), _jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "text-body2 block truncate", children: country.label }), _jsxs("span", { className: "text-caption block text-text-secondary", children: [country.code, " (+", country.phone, ")"] })] })] }) }, country.code));
|
|
26
|
+
}) })) })] })] }));
|
|
27
|
+
}
|
|
28
|
+
function applyFilter({ inputData, query, }) {
|
|
29
|
+
if (!query)
|
|
30
|
+
return inputData;
|
|
31
|
+
const q = query.toLowerCase();
|
|
32
|
+
return inputData.filter(({ label, code, phone }) => [label, code, phone].some((field) => field?.toLowerCase().includes(q)));
|
|
33
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { PhoneInputProps } from "./types.js";
|
|
2
|
+
export declare function PhoneInput({ id, value, label, error, labels, onChange, disabled, className, helperText, placeholder, disableSelect, country: inputCountryCode, ...other }: PhoneInputProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { XIcon } from "lucide-react";
|
|
5
|
+
import { parsePhoneNumber } from "react-phone-number-input";
|
|
6
|
+
import PhoneNumberInput from "react-phone-number-input/input";
|
|
7
|
+
import { useState, useEffect, useCallback, useId, startTransition } from "react";
|
|
8
|
+
import { Input } from "../input/index.js";
|
|
9
|
+
import { countries } from "../country-select/index.js";
|
|
10
|
+
import { CountryListPopover } from "./list-popover.js";
|
|
11
|
+
function getCountryCode(inputValue, countryCode) {
|
|
12
|
+
if (inputValue) {
|
|
13
|
+
return parsePhoneNumber(inputValue)?.country;
|
|
14
|
+
}
|
|
15
|
+
return countryCode;
|
|
16
|
+
}
|
|
17
|
+
export function PhoneInput({ id, value, label, error, labels, onChange, disabled, className, helperText, placeholder, disableSelect, country: inputCountryCode, ...other }) {
|
|
18
|
+
const autoId = useId();
|
|
19
|
+
const inputId = id ?? autoId;
|
|
20
|
+
const defaultCountryCode = getCountryCode(value, inputCountryCode);
|
|
21
|
+
const [searchCountry, setSearchCountry] = useState("");
|
|
22
|
+
const [selectedCountry, setSelectedCountry] = useState(defaultCountryCode);
|
|
23
|
+
const cleanValue = value.replace(/[\s-]+/g, "");
|
|
24
|
+
const handleClear = useCallback(() => onChange(""), [onChange]);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (!selectedCountry)
|
|
27
|
+
setSelectedCountry(defaultCountryCode);
|
|
28
|
+
}, [defaultCountryCode, selectedCountry]);
|
|
29
|
+
return (_jsxs("div", { className: cn("w-full", className), children: [label && (_jsx("label", { htmlFor: inputId, className: "text-subtitle2 mb-1.5 block text-text-secondary", children: label })), _jsxs("div", { className: "relative", style: {
|
|
30
|
+
"--popover-button-mr": "12px",
|
|
31
|
+
"--popover-button-height": "22px",
|
|
32
|
+
"--popover-button-width": "60px",
|
|
33
|
+
}, children: [!disableSelect && (_jsx(CountryListPopover, { labels: labels, disabled: disabled, countries: countries, searchCountry: searchCountry, countryCode: selectedCountry, className: "top-[9px] left-3.5", onClickCountry: (next) => startTransition(() => setSelectedCountry(next)), onSearchCountry: setSearchCountry })), _jsx(PhoneNumberInput, { id: inputId, type: "tel", value: cleanValue, onChange: onChange, disabled: disabled, country: selectedCountry, inputComponent: Input, "aria-invalid": error || undefined, placeholder: placeholder ?? "Enter phone number", className: cn(!disableSelect && "pl-[calc(var(--popover-button-width)+var(--popover-button-mr)+8px)]", cleanValue && "pr-10"), ...other }), cleanValue && !disabled && (_jsx("button", { type: "button", "aria-label": labels?.clear ?? "Clear", onClick: handleClear, className: "absolute top-1/2 right-2.5 inline-flex -translate-y-1/2 cursor-pointer rounded-full p-1 text-text-secondary hover:bg-action-hover", children: _jsx(XIcon, { className: "size-4" }) }))] }), helperText && (_jsx("p", { className: cn("text-caption mt-2 px-3.5", error ? "text-error" : "text-text-secondary"), children: helperText }))] }));
|
|
34
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Value, Country } from "react-phone-number-input/input";
|
|
2
|
+
export type PhoneInputProps = Omit<React.ComponentProps<"input">, "onChange" | "value" | "ref" | "defaultValue"> & {
|
|
3
|
+
value: string;
|
|
4
|
+
country?: Country;
|
|
5
|
+
label?: string;
|
|
6
|
+
error?: boolean;
|
|
7
|
+
helperText?: React.ReactNode;
|
|
8
|
+
disableSelect?: boolean;
|
|
9
|
+
onChange: (newValue: Value) => void;
|
|
10
|
+
labels?: {
|
|
11
|
+
search?: string;
|
|
12
|
+
clear?: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type CountryListProps = {
|
|
16
|
+
className?: string;
|
|
17
|
+
countryCode?: Country;
|
|
18
|
+
searchCountry: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
labels?: PhoneInputProps["labels"];
|
|
21
|
+
countries: {
|
|
22
|
+
label: string;
|
|
23
|
+
code: string;
|
|
24
|
+
phone: string;
|
|
25
|
+
}[];
|
|
26
|
+
onClickCountry: (inputValue: Country) => void;
|
|
27
|
+
onSearchCountry: (inputValue: string) => void;
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./popover.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./popover.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
3
|
+
declare function Popover({ ...props }: PopoverPrimitive.Root.Props): React.JSX.Element;
|
|
4
|
+
declare function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props): React.JSX.Element;
|
|
5
|
+
declare function PopoverContent({ className, align, alignOffset, side, sideOffset, ...props }: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
|
|
6
|
+
declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props): React.JSX.Element;
|
|
8
|
+
declare function PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props): React.JSX.Element;
|
|
9
|
+
export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
function Popover({ ...props }) {
|
|
6
|
+
return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
7
|
+
}
|
|
8
|
+
function PopoverTrigger({ ...props }) {
|
|
9
|
+
return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
10
|
+
}
|
|
11
|
+
function PopoverContent({ className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }) {
|
|
12
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-modal", children: _jsx(PopoverPrimitive.Popup, { "data-slot": "popover-content", className: cn("xui-paper xui-paper-dropdown z-modal flex w-72 origin-(--transform-origin) flex-col gap-2.5 p-2.5 text-body2 text-popover-foreground outline-hidden duration-150 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }) }));
|
|
13
|
+
}
|
|
14
|
+
function PopoverHeader({ className, ...props }) {
|
|
15
|
+
return (_jsx("div", { "data-slot": "popover-header", className: cn("flex flex-col gap-0.5 text-sm", className), ...props }));
|
|
16
|
+
}
|
|
17
|
+
function PopoverTitle({ className, ...props }) {
|
|
18
|
+
return (_jsx(PopoverPrimitive.Title, { "data-slot": "popover-title", className: cn("font-semibold", className), ...props }));
|
|
19
|
+
}
|
|
20
|
+
function PopoverDescription({ className, ...props }) {
|
|
21
|
+
return (_jsx(PopoverPrimitive.Description, { "data-slot": "popover-description", className: cn("text-text-secondary", className), ...props }));
|
|
22
|
+
}
|
|
23
|
+
export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./progress.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./progress.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
2
|
+
declare function Progress({ className, children, value, ...props }: ProgressPrimitive.Root.Props): import("react").JSX.Element;
|
|
3
|
+
declare function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props): import("react").JSX.Element;
|
|
4
|
+
declare function ProgressIndicator({ className, ...props }: ProgressPrimitive.Indicator.Props): import("react").JSX.Element;
|
|
5
|
+
declare function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props): import("react").JSX.Element;
|
|
6
|
+
declare function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props): import("react").JSX.Element;
|
|
7
|
+
export { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue, };
|