@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 @@
|
|
|
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, };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
function Progress({ className, children, value, ...props }) {
|
|
6
|
+
return (_jsxs(ProgressPrimitive.Root, { value: value, "data-slot": "progress", className: cn("flex flex-wrap gap-3", className), ...props, children: [children, _jsx(ProgressTrack, { children: _jsx(ProgressIndicator, {}) })] }));
|
|
7
|
+
}
|
|
8
|
+
function ProgressTrack({ className, ...props }) {
|
|
9
|
+
return (_jsx(ProgressPrimitive.Track, { className: cn("relative flex h-1.5 w-full items-center overflow-x-hidden rounded-sm bg-primary/24", className), "data-slot": "progress-track", ...props }));
|
|
10
|
+
}
|
|
11
|
+
function ProgressIndicator({ className, ...props }) {
|
|
12
|
+
return (_jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: cn("h-full rounded-[inherit] bg-primary transition-all", className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
function ProgressLabel({ className, ...props }) {
|
|
15
|
+
return (_jsx(ProgressPrimitive.Label, { className: cn("text-body2 font-medium", className), "data-slot": "progress-label", ...props }));
|
|
16
|
+
}
|
|
17
|
+
function ProgressValue({ className, ...props }) {
|
|
18
|
+
return (_jsx(ProgressPrimitive.Value, { className: cn("ml-auto text-body2 text-text-secondary tabular-nums", className), "data-slot": "progress-value", ...props }));
|
|
19
|
+
}
|
|
20
|
+
export { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./progress-bar.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./progress-bar.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Drives a top-of-page loading bar. Call `start()` when navigation or a request begins and
|
|
4
|
+
* `done()` when it ends; the bar trickles toward 90% in between. Works with any router.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useProgressBar({ trickleMs }?: {
|
|
7
|
+
trickleMs?: number;
|
|
8
|
+
}): {
|
|
9
|
+
progress: number;
|
|
10
|
+
visible: boolean;
|
|
11
|
+
start: () => void;
|
|
12
|
+
done: () => void;
|
|
13
|
+
};
|
|
14
|
+
export type ProgressBarProps = Omit<React.ComponentProps<"div">, "children"> & {
|
|
15
|
+
/** Start while true, finish when it turns false. */
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
/** Controlled 0-100 value. Overrides `loading` when set. */
|
|
18
|
+
value?: number;
|
|
19
|
+
};
|
|
20
|
+
export declare function ProgressBar({ loading, value, className, ...props }: ProgressBarProps): React.JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
/**
|
|
6
|
+
* Drives a top-of-page loading bar. Call `start()` when navigation or a request begins and
|
|
7
|
+
* `done()` when it ends; the bar trickles toward 90% in between. Works with any router.
|
|
8
|
+
*/
|
|
9
|
+
export function useProgressBar({ trickleMs = 200 } = {}) {
|
|
10
|
+
const [progress, setProgress] = React.useState(0);
|
|
11
|
+
const [visible, setVisible] = React.useState(false);
|
|
12
|
+
const timers = React.useRef({});
|
|
13
|
+
const clear = React.useCallback(() => {
|
|
14
|
+
clearInterval(timers.current.trickle);
|
|
15
|
+
clearTimeout(timers.current.hide);
|
|
16
|
+
}, []);
|
|
17
|
+
const start = React.useCallback(() => {
|
|
18
|
+
clear();
|
|
19
|
+
setVisible(true);
|
|
20
|
+
setProgress(8);
|
|
21
|
+
timers.current.trickle = setInterval(() => {
|
|
22
|
+
setProgress((p) => (p >= 90 ? p : p + (90 - p) * (0.05 + Math.random() * 0.1)));
|
|
23
|
+
}, trickleMs);
|
|
24
|
+
}, [clear, trickleMs]);
|
|
25
|
+
const done = React.useCallback(() => {
|
|
26
|
+
clear();
|
|
27
|
+
setProgress(100);
|
|
28
|
+
timers.current.hide = setTimeout(() => {
|
|
29
|
+
setVisible(false);
|
|
30
|
+
setProgress(0);
|
|
31
|
+
}, 300);
|
|
32
|
+
}, [clear]);
|
|
33
|
+
React.useEffect(() => clear, [clear]);
|
|
34
|
+
return { progress, visible, start, done };
|
|
35
|
+
}
|
|
36
|
+
export function ProgressBar({ loading, value, className, ...props }) {
|
|
37
|
+
const { progress, visible, start, done } = useProgressBar();
|
|
38
|
+
const wasLoading = React.useRef(false);
|
|
39
|
+
React.useEffect(() => {
|
|
40
|
+
if (value !== undefined)
|
|
41
|
+
return;
|
|
42
|
+
if (loading && !wasLoading.current)
|
|
43
|
+
start();
|
|
44
|
+
if (!loading && wasLoading.current)
|
|
45
|
+
done();
|
|
46
|
+
wasLoading.current = !!loading;
|
|
47
|
+
}, [loading, value, start, done]);
|
|
48
|
+
const shown = value !== undefined ? value > 0 && value < 100 : visible;
|
|
49
|
+
const width = value !== undefined ? value : progress;
|
|
50
|
+
return (_jsx("div", { role: "progressbar", "aria-hidden": !shown, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(width), className: cn("pointer-events-none fixed top-0 left-0 z-progress h-[2.5px] w-full transition-opacity duration-200", shown ? "opacity-100" : "opacity-0", className), ...props, children: _jsx("div", { className: "relative h-full bg-primary shadow-[0_0_2.5px_var(--primary-main)] transition-[width] duration-200 ease-out", style: { width: `${width}%` }, children: _jsx("span", { className: "absolute top-0 right-0 block h-full w-25 rotate-3 -translate-y-1 shadow-[0_0_10px_var(--primary-main),0_0_5px_var(--primary-main)]" }) }) }));
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./radio-group.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./radio-group.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
3
|
+
declare function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props): import("react").JSX.Element;
|
|
4
|
+
declare function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props): import("react").JSX.Element;
|
|
5
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
4
|
+
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
function RadioGroup({ className, ...props }) {
|
|
7
|
+
return (_jsx(RadioGroupPrimitive, { "data-slot": "radio-group", className: cn("grid w-full gap-2", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function RadioGroupItem({ className, ...props }) {
|
|
10
|
+
return (_jsx(RadioPrimitive.Root, { "data-slot": "radio-group-item", className: cn("group/radio-group-item peer relative flex aspect-square size-[18px] shrink-0 rounded-full border-[1.5px] border-text-secondary outline-none transition-colors after:absolute after:-inset-2.5 hover:bg-action-hover focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed data-disabled:border-action-disabled aria-invalid:border-error aria-invalid:ring-3 aria-invalid:ring-error/20 data-checked:border-primary", className), ...props, children: _jsx(RadioPrimitive.Indicator, { "data-slot": "radio-group-indicator", className: "flex size-full items-center justify-center", children: _jsx("span", { className: "absolute top-1/2 left-1/2 size-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary group-data-disabled/radio-group-item:bg-action-disabled" }) }) }));
|
|
11
|
+
}
|
|
12
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./rating.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./rating.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type RatingProps = Omit<React.ComponentProps<"div">, "onChange" | "defaultValue"> & {
|
|
3
|
+
value?: number | null;
|
|
4
|
+
defaultValue?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
size?: "small" | "medium" | "large";
|
|
9
|
+
onChange?: (value: number) => void;
|
|
10
|
+
};
|
|
11
|
+
declare function Rating({ value, defaultValue, max, readOnly, disabled, size, onChange, className, ...props }: RatingProps): React.JSX.Element;
|
|
12
|
+
export { Rating };
|
|
13
|
+
export type { RatingProps };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { StarIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
const sizes = { small: "size-4", medium: "size-6", large: "size-8" };
|
|
7
|
+
function Rating({ value, defaultValue = 0, max = 5, readOnly, disabled, size = "medium", onChange, className, ...props }) {
|
|
8
|
+
const [inner, setInner] = React.useState(defaultValue);
|
|
9
|
+
const [hover, setHover] = React.useState(null);
|
|
10
|
+
const current = value ?? inner;
|
|
11
|
+
const shown = hover ?? current;
|
|
12
|
+
const interactive = !readOnly && !disabled;
|
|
13
|
+
const select = (next) => {
|
|
14
|
+
if (!interactive)
|
|
15
|
+
return;
|
|
16
|
+
setInner(next);
|
|
17
|
+
onChange?.(next);
|
|
18
|
+
};
|
|
19
|
+
return (_jsx("div", { role: "radiogroup", "data-slot": "rating", "aria-readonly": readOnly || undefined, className: cn("inline-flex items-center gap-0.5", disabled && "opacity-50", className), onMouseLeave: () => setHover(null), ...props, children: Array.from({ length: max }, (_, i) => {
|
|
20
|
+
const index = i + 1;
|
|
21
|
+
const filled = index <= shown;
|
|
22
|
+
return (_jsx("button", { type: "button", role: "radio", "aria-checked": index === current, "aria-label": `${index} star${index > 1 ? "s" : ""}`, disabled: disabled, tabIndex: interactive ? 0 : -1, onClick: () => select(index === current ? 0 : index), onMouseEnter: () => interactive && setHover(index), className: cn("rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-ring", interactive ? "cursor-pointer" : "pointer-events-none"), children: _jsx(StarIcon, { className: cn(sizes[size], filled ? "fill-warning text-warning" : "fill-transparent text-grey-500/48") }) }, index));
|
|
23
|
+
}) }));
|
|
24
|
+
}
|
|
25
|
+
export { Rating };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./resizable.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./resizable.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
2
|
+
declare function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps): import("react").JSX.Element;
|
|
3
|
+
declare function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps): import("react").JSX.Element;
|
|
4
|
+
declare function ResizableHandle({ withHandle, className, ...props }: ResizablePrimitive.SeparatorProps & {
|
|
5
|
+
withHandle?: boolean;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
5
|
+
function ResizablePanelGroup({ className, ...props }) {
|
|
6
|
+
return (_jsx(ResizablePrimitive.Group, { "data-slot": "resizable-panel-group", className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
function ResizablePanel({ ...props }) {
|
|
9
|
+
return _jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
10
|
+
}
|
|
11
|
+
function ResizableHandle({ withHandle, className, ...props }) {
|
|
12
|
+
return (_jsx(ResizablePrimitive.Separator, { "data-slot": "resizable-handle", className: cn("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className), ...props, children: withHandle && (_jsx("div", { className: "z-local flex h-6 w-1 shrink-0 rounded-lg bg-border" })) }));
|
|
13
|
+
}
|
|
14
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ripple.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ripple.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type RippleProps = Omit<React.ComponentProps<"span">, "children"> & {
|
|
2
|
+
/** Start every ripple at the centre instead of the press point, e.g. for icon buttons. */
|
|
3
|
+
center?: boolean;
|
|
4
|
+
/** Turns the effect off while keeping the element mounted. */
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Material-style press ripple. Render it as a child of any pressable element that is
|
|
9
|
+
* `position: relative`; it listens on that parent and paints a circle that expands from the
|
|
10
|
+
* press point and fades when the press ends. It draws with `currentColor`, so it follows the
|
|
11
|
+
* text colour of the surface. Honours `prefers-reduced-motion` and does nothing on disabled parents.
|
|
12
|
+
*/
|
|
13
|
+
export declare function Ripple({ center, disabled, className, ...other }: RippleProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
|
+
const ENTER_MS = 550;
|
|
6
|
+
const EXIT_MS = 450;
|
|
7
|
+
const EASING = "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
8
|
+
const OPACITY = 0.3;
|
|
9
|
+
function isDisabled(el) {
|
|
10
|
+
return (el.hasAttribute("disabled") ||
|
|
11
|
+
el.getAttribute("aria-disabled") === "true" ||
|
|
12
|
+
el.getAttribute("data-disabled") === "true" ||
|
|
13
|
+
el.hasAttribute("data-disabled"));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Material-style press ripple. Render it as a child of any pressable element that is
|
|
17
|
+
* `position: relative`; it listens on that parent and paints a circle that expands from the
|
|
18
|
+
* press point and fades when the press ends. It draws with `currentColor`, so it follows the
|
|
19
|
+
* text colour of the surface. Honours `prefers-reduced-motion` and does nothing on disabled parents.
|
|
20
|
+
*/
|
|
21
|
+
export function Ripple({ center = false, disabled = false, className, ...other }) {
|
|
22
|
+
const containerRef = useRef(null);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
const container = containerRef.current;
|
|
25
|
+
const target = container?.parentElement;
|
|
26
|
+
if (!container || !target || disabled)
|
|
27
|
+
return;
|
|
28
|
+
const active = new Set();
|
|
29
|
+
const start = (clientX, clientY) => {
|
|
30
|
+
if (typeof container.animate !== "function")
|
|
31
|
+
return;
|
|
32
|
+
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
33
|
+
return;
|
|
34
|
+
if (isDisabled(target))
|
|
35
|
+
return;
|
|
36
|
+
const rect = container.getBoundingClientRect();
|
|
37
|
+
const x = center || clientX === null ? rect.width / 2 : clientX - rect.left;
|
|
38
|
+
const y = center || clientY === null ? rect.height / 2 : clientY - rect.top;
|
|
39
|
+
const radius = Math.hypot(Math.max(x, rect.width - x), Math.max(y, rect.height - y));
|
|
40
|
+
const size = radius * 2;
|
|
41
|
+
const ripple = document.createElement("span");
|
|
42
|
+
ripple.style.cssText = [
|
|
43
|
+
"position:absolute",
|
|
44
|
+
"pointer-events:none",
|
|
45
|
+
"border-radius:50%",
|
|
46
|
+
"background:currentColor",
|
|
47
|
+
`left:${x - radius}px`,
|
|
48
|
+
`top:${y - radius}px`,
|
|
49
|
+
`width:${size}px`,
|
|
50
|
+
`height:${size}px`,
|
|
51
|
+
`opacity:${OPACITY}`,
|
|
52
|
+
].join(";");
|
|
53
|
+
container.appendChild(ripple);
|
|
54
|
+
ripple.animate([{ transform: "scale(0)" }, { transform: "scale(1)" }], {
|
|
55
|
+
duration: ENTER_MS,
|
|
56
|
+
easing: EASING,
|
|
57
|
+
fill: "forwards",
|
|
58
|
+
});
|
|
59
|
+
const release = () => {
|
|
60
|
+
active.delete(release);
|
|
61
|
+
const fade = ripple.animate([{ opacity: OPACITY }, { opacity: 0 }], {
|
|
62
|
+
duration: EXIT_MS,
|
|
63
|
+
easing: EASING,
|
|
64
|
+
fill: "forwards",
|
|
65
|
+
});
|
|
66
|
+
fade.onfinish = () => ripple.remove();
|
|
67
|
+
};
|
|
68
|
+
active.add(release);
|
|
69
|
+
return release;
|
|
70
|
+
};
|
|
71
|
+
let pointerRelease;
|
|
72
|
+
let keyRelease;
|
|
73
|
+
const onPointerDown = (event) => {
|
|
74
|
+
if (event.button !== 0)
|
|
75
|
+
return;
|
|
76
|
+
pointerRelease = start(event.clientX, event.clientY);
|
|
77
|
+
};
|
|
78
|
+
const onPointerEnd = () => {
|
|
79
|
+
pointerRelease?.();
|
|
80
|
+
pointerRelease = undefined;
|
|
81
|
+
};
|
|
82
|
+
const onKeyDown = (event) => {
|
|
83
|
+
if (event.repeat || event.target !== target)
|
|
84
|
+
return;
|
|
85
|
+
if (event.key === " " || event.key === "Enter")
|
|
86
|
+
keyRelease ??= start(null, null);
|
|
87
|
+
};
|
|
88
|
+
const onKeyUp = (event) => {
|
|
89
|
+
if (event.key === " " || event.key === "Enter") {
|
|
90
|
+
keyRelease?.();
|
|
91
|
+
keyRelease = undefined;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
target.addEventListener("pointerdown", onPointerDown);
|
|
95
|
+
target.addEventListener("pointerup", onPointerEnd);
|
|
96
|
+
target.addEventListener("pointerleave", onPointerEnd);
|
|
97
|
+
target.addEventListener("pointercancel", onPointerEnd);
|
|
98
|
+
target.addEventListener("keydown", onKeyDown);
|
|
99
|
+
target.addEventListener("keyup", onKeyUp);
|
|
100
|
+
target.addEventListener("blur", onKeyUp);
|
|
101
|
+
return () => {
|
|
102
|
+
target.removeEventListener("pointerdown", onPointerDown);
|
|
103
|
+
target.removeEventListener("pointerup", onPointerEnd);
|
|
104
|
+
target.removeEventListener("pointerleave", onPointerEnd);
|
|
105
|
+
target.removeEventListener("pointercancel", onPointerEnd);
|
|
106
|
+
target.removeEventListener("keydown", onKeyDown);
|
|
107
|
+
target.removeEventListener("keyup", onKeyUp);
|
|
108
|
+
target.removeEventListener("blur", onKeyUp);
|
|
109
|
+
container.replaceChildren();
|
|
110
|
+
};
|
|
111
|
+
}, [center, disabled]);
|
|
112
|
+
return (_jsx("span", { ref: containerRef, "aria-hidden": true, "data-slot": "ripple", className: cn("pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit]", className), ...other }));
|
|
113
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./scroll-area.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./scroll-area.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
3
|
+
declare function ScrollArea({ className, children, ...props }: ScrollAreaPrimitive.Root.Props): React.JSX.Element;
|
|
4
|
+
declare function ScrollBar({ className, orientation, ...props }: ScrollAreaPrimitive.Scrollbar.Props): React.JSX.Element;
|
|
5
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
function ScrollArea({ className, children, ...props }) {
|
|
6
|
+
return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", className: cn("relative", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] }));
|
|
7
|
+
}
|
|
8
|
+
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
9
|
+
return (_jsx(ScrollAreaPrimitive.Scrollbar, { "data-slot": "scroll-area-scrollbar", "data-orientation": orientation, orientation: orientation, className: cn("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent", className), ...props, children: _jsx(ScrollAreaPrimitive.Thumb, { "data-slot": "scroll-area-thumb", className: "relative flex-1 rounded-full bg-border" }) }));
|
|
10
|
+
}
|
|
11
|
+
export { ScrollArea, ScrollBar };
|