@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,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
function Textarea({ className, ...props }) {
|
|
5
|
+
return (_jsx("textarea", { "data-slot": "textarea", className: cn("flex field-sizing-content min-h-20 px-3.5 py-2.5", "w-full min-w-0 rounded-md border border-input bg-transparent text-input text-foreground transition-colors outline-none placeholder:text-text-disabled placeholder:opacity-100 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-error/20 max-sm:text-base", className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
export { Textarea };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./theme-provider.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./theme-provider.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Mode = "light" | "dark" | "system";
|
|
3
|
+
type Direction = "ltr" | "rtl";
|
|
4
|
+
type ThemeState = {
|
|
5
|
+
mode: Mode;
|
|
6
|
+
/** Brand (primary) colour as hex. `undefined` keeps whatever the CSS defines. */
|
|
7
|
+
brand?: string;
|
|
8
|
+
direction: Direction;
|
|
9
|
+
};
|
|
10
|
+
type ThemeContextValue = ThemeState & {
|
|
11
|
+
resolvedMode: "light" | "dark";
|
|
12
|
+
setMode: (mode: Mode) => void;
|
|
13
|
+
setBrand: (hex: string | undefined) => void;
|
|
14
|
+
setDirection: (direction: Direction) => void;
|
|
15
|
+
};
|
|
16
|
+
type ThemeProviderProps = {
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
storageKey?: string;
|
|
19
|
+
defaultMode?: Mode;
|
|
20
|
+
/** Primary colour for this product. Overrides the stylesheet default. */
|
|
21
|
+
brandColor?: string;
|
|
22
|
+
defaultDirection?: Direction;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Mode (light/dark/system), brand colour and text direction for the whole app.
|
|
26
|
+
* Writes `.dark`, `--brand-primary` and `dir` onto <html>. Not tied to any router or framework.
|
|
27
|
+
*/
|
|
28
|
+
declare function ThemeProvider({ children, storageKey, defaultMode, brandColor, defaultDirection, }: ThemeProviderProps): React.JSX.Element;
|
|
29
|
+
declare function useTheme(): ThemeContextValue;
|
|
30
|
+
export { ThemeProvider, useTheme };
|
|
31
|
+
export type { Mode, Direction, ThemeProviderProps };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { getBrandVars } from "../../lib/brand.js";
|
|
5
|
+
const ThemeContext = /* @__PURE__ */ React.createContext(null);
|
|
6
|
+
function readStored(key) {
|
|
7
|
+
try {
|
|
8
|
+
return JSON.parse(localStorage.getItem(key) ?? "{}");
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return {};
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Mode (light/dark/system), brand colour and text direction for the whole app.
|
|
16
|
+
* Writes `.dark`, `--brand-primary` and `dir` onto <html>. Not tied to any router or framework.
|
|
17
|
+
*/
|
|
18
|
+
function ThemeProvider({ children, storageKey = "xerobi-ui-theme", defaultMode = "system", brandColor, defaultDirection = "ltr", }) {
|
|
19
|
+
const [state, setState] = React.useState(() => {
|
|
20
|
+
const s = typeof window === "undefined" ? {} : readStored(storageKey);
|
|
21
|
+
return {
|
|
22
|
+
mode: s.mode ?? defaultMode,
|
|
23
|
+
brand: s.brand ?? brandColor,
|
|
24
|
+
direction: s.direction ?? defaultDirection,
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
const [systemDark, setSystemDark] = React.useState(false);
|
|
28
|
+
// A brandColor prop change always wins over the stored value.
|
|
29
|
+
React.useEffect(() => {
|
|
30
|
+
if (brandColor)
|
|
31
|
+
setState((s) => ({ ...s, brand: brandColor }));
|
|
32
|
+
}, [brandColor]);
|
|
33
|
+
React.useEffect(() => {
|
|
34
|
+
const mql = window.matchMedia("(prefers-color-scheme: dark)");
|
|
35
|
+
const update = () => setSystemDark(mql.matches);
|
|
36
|
+
update();
|
|
37
|
+
mql.addEventListener("change", update);
|
|
38
|
+
return () => mql.removeEventListener("change", update);
|
|
39
|
+
}, []);
|
|
40
|
+
const resolvedMode = state.mode === "system" ? (systemDark ? "dark" : "light") : state.mode;
|
|
41
|
+
React.useEffect(() => {
|
|
42
|
+
const root = document.documentElement;
|
|
43
|
+
root.classList.toggle("dark", resolvedMode === "dark");
|
|
44
|
+
root.style.colorScheme = resolvedMode;
|
|
45
|
+
root.setAttribute("dir", state.direction);
|
|
46
|
+
}, [resolvedMode, state.direction]);
|
|
47
|
+
const brandVars = React.useMemo(() => {
|
|
48
|
+
if (!state.brand)
|
|
49
|
+
return undefined;
|
|
50
|
+
try {
|
|
51
|
+
return getBrandVars(state.brand);
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
}, [state.brand]);
|
|
57
|
+
React.useEffect(() => {
|
|
58
|
+
const root = document.documentElement;
|
|
59
|
+
if (!brandVars)
|
|
60
|
+
return;
|
|
61
|
+
for (const [k, v] of Object.entries(brandVars))
|
|
62
|
+
root.style.setProperty(k, v);
|
|
63
|
+
return () => {
|
|
64
|
+
for (const k of Object.keys(brandVars))
|
|
65
|
+
root.style.removeProperty(k);
|
|
66
|
+
};
|
|
67
|
+
}, [brandVars]);
|
|
68
|
+
React.useEffect(() => {
|
|
69
|
+
try {
|
|
70
|
+
const stored = { ...state, brandContrast: brandVars?.["--brand-primary-contrast"] };
|
|
71
|
+
localStorage.setItem(storageKey, JSON.stringify(stored));
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
/* storage unavailable (private mode): the theme still works for the session */
|
|
75
|
+
}
|
|
76
|
+
}, [state, brandVars, storageKey]);
|
|
77
|
+
const value = React.useMemo(() => ({
|
|
78
|
+
...state,
|
|
79
|
+
resolvedMode,
|
|
80
|
+
setMode: (mode) => setState((s) => ({ ...s, mode })),
|
|
81
|
+
setBrand: (brand) => setState((s) => ({ ...s, brand })),
|
|
82
|
+
setDirection: (direction) => setState((s) => ({ ...s, direction })),
|
|
83
|
+
}), [state, resolvedMode]);
|
|
84
|
+
return _jsx(ThemeContext.Provider, { value: value, children: children });
|
|
85
|
+
}
|
|
86
|
+
function useTheme() {
|
|
87
|
+
const ctx = React.useContext(ThemeContext);
|
|
88
|
+
if (!ctx)
|
|
89
|
+
throw new Error("useTheme must be used within <ThemeProvider>");
|
|
90
|
+
return ctx;
|
|
91
|
+
}
|
|
92
|
+
export { ThemeProvider, useTheme };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./toast.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./toast.js";
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type ToastManagerAddOptions, type ToastManagerUpdateOptions, type ToastObject } from "@base-ui/react/toast";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import { type ButtonProps } from "../button/index.js";
|
|
4
|
+
export declare const TOAST_VARIANTS: {
|
|
5
|
+
readonly default: {
|
|
6
|
+
readonly classes: "xui-paper border-zinc-200 dark:bg-zinc-950 dark:border-zinc-800 text-zinc-900 dark:text-zinc-50";
|
|
7
|
+
readonly icon: null;
|
|
8
|
+
readonly iconColor: "";
|
|
9
|
+
readonly closeColor: "text-zinc-400 hover:text-zinc-900";
|
|
10
|
+
};
|
|
11
|
+
readonly success: {
|
|
12
|
+
readonly classes: "bg-white border-zinc-200 dark:bg-zinc-950 dark:border-zinc-800";
|
|
13
|
+
readonly icon: import("lucide-react").LucideIcon;
|
|
14
|
+
readonly iconColor: "text-green-500";
|
|
15
|
+
readonly closeColor: "text-green-600 hover:text-green-700";
|
|
16
|
+
};
|
|
17
|
+
readonly error: {
|
|
18
|
+
readonly classes: "bg-white border-zinc-200 dark:bg-zinc-950 dark:border-zinc-800";
|
|
19
|
+
readonly icon: import("lucide-react").LucideIcon;
|
|
20
|
+
readonly iconColor: "text-red-500";
|
|
21
|
+
readonly closeColor: "text-red-600 hover:text-red-700";
|
|
22
|
+
};
|
|
23
|
+
readonly warning: {
|
|
24
|
+
readonly classes: "bg-white border-zinc-200 dark:bg-zinc-950 dark:border-zinc-800";
|
|
25
|
+
readonly icon: import("lucide-react").LucideIcon;
|
|
26
|
+
readonly iconColor: "text-amber-500";
|
|
27
|
+
readonly closeColor: "text-amber-600 hover:text-amber-700";
|
|
28
|
+
};
|
|
29
|
+
readonly info: {
|
|
30
|
+
readonly classes: "bg-white border-zinc-200 dark:bg-zinc-950 dark:border-zinc-800";
|
|
31
|
+
readonly icon: import("lucide-react").LucideIcon;
|
|
32
|
+
readonly iconColor: "text-blue-500";
|
|
33
|
+
readonly closeColor: "text-blue-600 hover:text-blue-700";
|
|
34
|
+
};
|
|
35
|
+
readonly loading: {
|
|
36
|
+
readonly classes: "bg-white border-zinc-200 dark:bg-zinc-950 dark:border-zinc-800";
|
|
37
|
+
readonly icon: import("lucide-react").LucideIcon;
|
|
38
|
+
readonly iconColor: "text-zinc-500 animate-spin";
|
|
39
|
+
readonly closeColor: "text-zinc-400 hover:text-zinc-900";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export type ToastVariant = keyof typeof TOAST_VARIANTS;
|
|
43
|
+
export declare function toastVariants({ variant }?: {
|
|
44
|
+
variant?: ToastVariant;
|
|
45
|
+
}): string;
|
|
46
|
+
export type ToastyOptions<Data extends object = object> = ToastObject<Data> & {
|
|
47
|
+
variant?: ToastVariant;
|
|
48
|
+
content?: React.ReactNode;
|
|
49
|
+
actions?: Array<ButtonProps>;
|
|
50
|
+
bump?: boolean;
|
|
51
|
+
};
|
|
52
|
+
export interface ToastyProps {
|
|
53
|
+
children: React.ReactNode;
|
|
54
|
+
container?: HTMLElement | null;
|
|
55
|
+
toastManager?: ReturnType<typeof createToastyManager>;
|
|
56
|
+
}
|
|
57
|
+
export declare const useToasty: () => {
|
|
58
|
+
toasts: Array<ToastyOptions>;
|
|
59
|
+
add: (<T extends any = any>(options: ToastManagerAddOptions<T>) => string) & ((options: ToastManagerAddOptions<any> & {
|
|
60
|
+
variant?: ToastVariant;
|
|
61
|
+
bump?: boolean;
|
|
62
|
+
}) => any);
|
|
63
|
+
close: (toastId?: string) => void;
|
|
64
|
+
update: (<T extends any = any>(toastId: string, options: ToastManagerUpdateOptions<T> | ((prevToast: ToastObject<T>) => ToastManagerUpdateOptions<T>)) => void) & ((id: string, options: (ToastManagerUpdateOptions<any> & {
|
|
65
|
+
variant?: ToastVariant;
|
|
66
|
+
bump?: boolean;
|
|
67
|
+
}) | ((prev: any) => any)) => any);
|
|
68
|
+
promise: (<Value, T extends any = any>(promise: Promise<Value>, options: import("@base-ui/react").ToastManagerPromiseOptions<Value, T>) => Promise<Value>) & (<T>(promise: Promise<T>, options: {
|
|
69
|
+
loading: ToastManagerAddOptions<any>;
|
|
70
|
+
success: ToastManagerAddOptions<any> | ((data: T) => ToastManagerAddOptions<any>);
|
|
71
|
+
error: ToastManagerAddOptions<any> | ((err: Error) => ToastManagerAddOptions<any>);
|
|
72
|
+
}) => any);
|
|
73
|
+
};
|
|
74
|
+
export declare const createToastyManager: () => import("@base-ui/react").ToastManager<any> & {
|
|
75
|
+
add: (options: ToastManagerAddOptions<any> & {
|
|
76
|
+
variant?: ToastVariant;
|
|
77
|
+
bump?: boolean;
|
|
78
|
+
}) => any;
|
|
79
|
+
update: (id: string, options: (ToastManagerUpdateOptions<any> & {
|
|
80
|
+
variant?: ToastVariant;
|
|
81
|
+
bump?: boolean;
|
|
82
|
+
}) | ((prev: any) => any)) => any;
|
|
83
|
+
promise: <T>(promise: Promise<T>, options: {
|
|
84
|
+
loading: ToastManagerAddOptions<any>;
|
|
85
|
+
success: ToastManagerAddOptions<any> | ((data: T) => ToastManagerAddOptions<any>);
|
|
86
|
+
error: ToastManagerAddOptions<any> | ((err: Error) => ToastManagerAddOptions<any>);
|
|
87
|
+
}) => any;
|
|
88
|
+
};
|
|
89
|
+
export declare function Toasty({ children, container, toastManager }: ToastyProps): React.JSX.Element;
|
|
90
|
+
export declare const ToastProvider: typeof Toasty;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Toast, } from "@base-ui/react/toast";
|
|
4
|
+
import { useDirection } from "@base-ui/react/direction-provider";
|
|
5
|
+
import { CheckCircle2, Info, AlertTriangle, XCircle, X, Loader, } from "lucide-react";
|
|
6
|
+
import { cn } from "cn"; // Replace with your utility path
|
|
7
|
+
import { Button } from "../button/index.js";
|
|
8
|
+
/* ------------------------------------------------------------------ */
|
|
9
|
+
/* Variants & Styling */
|
|
10
|
+
/* ------------------------------------------------------------------ */
|
|
11
|
+
export const TOAST_VARIANTS = {
|
|
12
|
+
default: {
|
|
13
|
+
classes: "xui-paper border-zinc-200 dark:bg-zinc-950 dark:border-zinc-800 text-zinc-900 dark:text-zinc-50",
|
|
14
|
+
icon: null,
|
|
15
|
+
iconColor: "",
|
|
16
|
+
closeColor: "text-zinc-400 hover:text-zinc-900",
|
|
17
|
+
},
|
|
18
|
+
success: {
|
|
19
|
+
classes: "bg-white border-zinc-200 dark:bg-zinc-950 dark:border-zinc-800",
|
|
20
|
+
icon: CheckCircle2,
|
|
21
|
+
iconColor: "text-green-500",
|
|
22
|
+
closeColor: "text-green-600 hover:text-green-700",
|
|
23
|
+
},
|
|
24
|
+
error: {
|
|
25
|
+
classes: "bg-white border-zinc-200 dark:bg-zinc-950 dark:border-zinc-800",
|
|
26
|
+
icon: XCircle,
|
|
27
|
+
iconColor: "text-red-500",
|
|
28
|
+
closeColor: "text-red-600 hover:text-red-700",
|
|
29
|
+
},
|
|
30
|
+
warning: {
|
|
31
|
+
classes: "bg-white border-zinc-200 dark:bg-zinc-950 dark:border-zinc-800",
|
|
32
|
+
icon: AlertTriangle,
|
|
33
|
+
iconColor: "text-amber-500",
|
|
34
|
+
closeColor: "text-amber-600 hover:text-amber-700",
|
|
35
|
+
},
|
|
36
|
+
info: {
|
|
37
|
+
classes: "bg-white border-zinc-200 dark:bg-zinc-950 dark:border-zinc-800",
|
|
38
|
+
icon: Info,
|
|
39
|
+
iconColor: "text-blue-500",
|
|
40
|
+
closeColor: "text-blue-600 hover:text-blue-700",
|
|
41
|
+
},
|
|
42
|
+
loading: {
|
|
43
|
+
classes: "bg-white border-zinc-200 dark:bg-zinc-950 dark:border-zinc-800",
|
|
44
|
+
icon: Loader,
|
|
45
|
+
iconColor: "text-zinc-500 animate-spin",
|
|
46
|
+
closeColor: "text-zinc-400 hover:text-zinc-900",
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
export function toastVariants({ variant = "default" } = {}) {
|
|
50
|
+
return cn("rounded-xl border p-4 shadow-lg ring-1 ring-black/5 dark:ring-white/10", TOAST_VARIANTS[variant].classes);
|
|
51
|
+
}
|
|
52
|
+
const AUTO_BUMP = Symbol("toast-auto-bump");
|
|
53
|
+
function withBump(options, autoBump) {
|
|
54
|
+
return { ...options, bump: options.bump, [AUTO_BUMP]: autoBump };
|
|
55
|
+
}
|
|
56
|
+
/* ------------------------------------------------------------------ */
|
|
57
|
+
/* Manager Wrappers */
|
|
58
|
+
/* ------------------------------------------------------------------ */
|
|
59
|
+
function wrapManager(manager) {
|
|
60
|
+
return {
|
|
61
|
+
...manager,
|
|
62
|
+
add: (options) => {
|
|
63
|
+
const existing = options.id ? manager.toasts?.find((t) => t.id === options.id) : undefined;
|
|
64
|
+
if (existing) {
|
|
65
|
+
if (existing.transitionStatus !== "ending") {
|
|
66
|
+
const updateOpts = options.timeout !== undefined ? { timeout: options.timeout } : {};
|
|
67
|
+
manager.update(existing.id, withBump(updateOpts, true));
|
|
68
|
+
}
|
|
69
|
+
return existing.id;
|
|
70
|
+
}
|
|
71
|
+
return manager.add(withBump(options, true));
|
|
72
|
+
},
|
|
73
|
+
update: (id, options) => {
|
|
74
|
+
return manager.update(id, typeof options === "function"
|
|
75
|
+
? (prev) => withBump(options(prev), false)
|
|
76
|
+
: withBump(options, false));
|
|
77
|
+
},
|
|
78
|
+
promise: (promise, options) => {
|
|
79
|
+
const { success, error, loading } = options;
|
|
80
|
+
// FIX: Cast loading to `any` so TypeScript allows us to append the `variant` property
|
|
81
|
+
const loadingWithVariant = { ...loading, variant: loading.variant || "loading" };
|
|
82
|
+
return manager.promise(promise, {
|
|
83
|
+
loading: withBump(loadingWithVariant, false),
|
|
84
|
+
success: typeof success === "function"
|
|
85
|
+
? (data) => withBump(success(data), false)
|
|
86
|
+
: withBump(success, false),
|
|
87
|
+
error: typeof error === "function"
|
|
88
|
+
? (err) => withBump(error(err), false)
|
|
89
|
+
: withBump(error, false),
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export const useToasty = () => {
|
|
95
|
+
const manager = Toast.useToastManager();
|
|
96
|
+
return {
|
|
97
|
+
...wrapManager(manager),
|
|
98
|
+
toasts: manager.toasts,
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
export const createToastyManager = () => {
|
|
102
|
+
return wrapManager(Toast.createToastManager());
|
|
103
|
+
};
|
|
104
|
+
/* ------------------------------------------------------------------ */
|
|
105
|
+
/* Provider */
|
|
106
|
+
/* ------------------------------------------------------------------ */
|
|
107
|
+
export function Toasty({ children, container, toastManager }) {
|
|
108
|
+
return (_jsxs(Toast.Provider, { toastManager: toastManager, children: [children, _jsx(Toast.Portal, { container: container, children: _jsx(Toast.Viewport, { className: "fixed top-4 right-4 z-50 mx-auto flex w-[calc(100%-2rem)] sm:top-8 sm:right-8 sm:w-[380px]", children: _jsx(ToastList, {}) }) })] }));
|
|
109
|
+
}
|
|
110
|
+
export const ToastProvider = Toasty;
|
|
111
|
+
/* ------------------------------------------------------------------ */
|
|
112
|
+
/* Internal Components */
|
|
113
|
+
/* ------------------------------------------------------------------ */
|
|
114
|
+
function getBumpAnimation(toast) {
|
|
115
|
+
const updateKey = toast.updateKey ?? 0;
|
|
116
|
+
const shouldBump = toast.bump === true || (toast.bump !== false && toast[AUTO_BUMP] === true && updateKey > 0);
|
|
117
|
+
return shouldBump && (updateKey % 2 === 0 ? "animate-bump-alt" : "animate-bump");
|
|
118
|
+
}
|
|
119
|
+
function useSwipeDirection() {
|
|
120
|
+
const dir = useDirection();
|
|
121
|
+
return dir === "rtl" ? ["up", "left"] : ["up", "right"];
|
|
122
|
+
}
|
|
123
|
+
function ToastList() {
|
|
124
|
+
const { toasts } = useToasty();
|
|
125
|
+
const swipeDir = useSwipeDirection();
|
|
126
|
+
return toasts.map((toast) => (_jsx(Toast.Root, { toast: toast, swipeDirection: [...swipeDir], className: cn(
|
|
127
|
+
// FIX 3: Changed absolute bottom-0 to top-0, and flipped the offset math
|
|
128
|
+
"absolute top-0 right-0 left-auto z-[calc(1000-var(--toast-index))] m-0 h-[var(--height)] w-full origin-top select-none rounded-xl motion-reduce:[transition-property:opacity]", "[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*1+calc(var(--toast-index)*var(--gap)*1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]", "[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--peek))+(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s,height_0.15s]", "after:absolute after:bottom-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']", "data-[ending-style]:opacity-0 data-[expanded]:h-[var(--toast-height)] data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--offset-y)))] data-[limited]:opacity-0 data-[starting-style]:[transform:translateY(-150%)]", "data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))] data-[expanded]:data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]", "data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-[expanded]:data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]", "data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-[expanded]:data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]", "[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(-150%)]"), children: _jsx("div", { className: cn("relative h-full w-full", toastVariants({ variant: toast.variant }), getBumpAnimation(toast)), children: _jsxs(Toast.Content, { className: "isolate flex flex-col gap-1 pe-6 transition-opacity [transition-duration:250ms] data-[behind]:pointer-events-none data-[behind]:opacity-0 data-[expanded]:pointer-events-auto data-[expanded]:opacity-100", children: [toast.content ?? (_jsxs("div", { className: "flex items-start gap-3", children: [_jsx(ToastIcon, { variant: toast.variant }), _jsxs("div", { className: "flex flex-col gap-1 overflow-hidden", children: [_jsx(Toast.Title, { className: "text-sm font-semibold" }), _jsx(Toast.Description, { className: "text-sm text-zinc-500 dark:text-zinc-400" }), !!toast.actions && (_jsx("div", { className: "mt-2 flex min-w-0 flex-nowrap gap-2 overflow-x-auto p-px", children: toast.actions.map((actionProps, idx) => (_jsx(Button, { color: "primary", ...actionProps }, idx))) }))] })] })), _jsx(Toast.Close, { "aria-label": "Close", render: _jsx(Button, { variant: "ghost", size: "sm", "aria-label": "Close", className: cn("absolute right-2 top-2 size-6 rounded-md hover:bg-zinc-100 dark:hover:bg-zinc-800", toast.variant && TOAST_VARIANTS[toast.variant]?.closeColor), children: _jsx(X, { className: "size-4" }) }) })] }) }) }, toast.id)));
|
|
129
|
+
}
|
|
130
|
+
function ToastIcon({ variant }) {
|
|
131
|
+
if (!variant || variant === "default")
|
|
132
|
+
return null;
|
|
133
|
+
const Icon = TOAST_VARIANTS[variant].icon;
|
|
134
|
+
if (!Icon)
|
|
135
|
+
return null;
|
|
136
|
+
return _jsx(Icon, { className: cn("mt-0.5 size-4 shrink-0", TOAST_VARIANTS[variant].iconColor) });
|
|
137
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./toggle.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./toggle.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Toggle as TogglePrimitive } from "@base-ui/react/toggle";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const toggleVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "outline" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Toggle({ className, variant, size, children, ...props }: TogglePrimitive.Props & VariantProps<typeof toggleVariants>): import("react").JSX.Element;
|
|
8
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Toggle as TogglePrimitive } from "@base-ui/react/toggle";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
import { Ripple } from "../ripple/index.js";
|
|
7
|
+
const toggleVariants = /* @__PURE__ */ cva("group/toggle relative inline-flex items-center justify-center gap-1 rounded-md text-subtitle2 whitespace-nowrap transition-all outline-none hover:bg-action-hover focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-action-selected data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-transparent",
|
|
11
|
+
outline: "border border-input bg-transparent hover:bg-action-hover",
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
default: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
15
|
+
sm: "h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-caption has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
16
|
+
lg: "h-12 min-w-12 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "default",
|
|
21
|
+
size: "default",
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
function Toggle({ className, variant = "default", size = "default", children, ...props }) {
|
|
25
|
+
return (_jsxs(TogglePrimitive, { "data-slot": "toggle", className: cn(toggleVariants({ variant, size, className })), ...props, children: [children, _jsx(Ripple, {})] }));
|
|
26
|
+
}
|
|
27
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./toggle-group.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./toggle-group.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Toggle as TogglePrimitive } from "@base-ui/react/toggle";
|
|
3
|
+
import { ToggleGroup as ToggleGroupPrimitive } from "@base-ui/react/toggle-group";
|
|
4
|
+
import { type VariantProps } from "class-variance-authority";
|
|
5
|
+
import { toggleVariants } from "../toggle/index.js";
|
|
6
|
+
declare function ToggleGroup({ className, variant, size, spacing, orientation, children, ...props }: ToggleGroupPrimitive.Props & VariantProps<typeof toggleVariants> & {
|
|
7
|
+
spacing?: number;
|
|
8
|
+
orientation?: "horizontal" | "vertical";
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
declare function ToggleGroupItem({ className, children, variant, size, ...props }: TogglePrimitive.Props & VariantProps<typeof toggleVariants>): React.JSX.Element;
|
|
11
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Toggle as TogglePrimitive } from "@base-ui/react/toggle";
|
|
5
|
+
import { ToggleGroup as ToggleGroupPrimitive } from "@base-ui/react/toggle-group";
|
|
6
|
+
import { cn } from "cn";
|
|
7
|
+
import { toggleVariants } from "../toggle/index.js";
|
|
8
|
+
const ToggleGroupContext = /* @__PURE__ */ React.createContext({
|
|
9
|
+
size: "default",
|
|
10
|
+
variant: "default",
|
|
11
|
+
spacing: 2,
|
|
12
|
+
orientation: "horizontal",
|
|
13
|
+
});
|
|
14
|
+
function ToggleGroup({ className, variant, size, spacing = 2, orientation = "horizontal", children, ...props }) {
|
|
15
|
+
return (_jsx(ToggleGroupPrimitive, { "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing, "data-orientation": orientation, style: { "--gap": spacing }, className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch", className), ...props, children: _jsx(ToggleGroupContext.Provider, { value: { variant, size, spacing, orientation }, children: children }) }));
|
|
16
|
+
}
|
|
17
|
+
function ToggleGroupItem({ className, children, variant = "default", size = "default", ...props }) {
|
|
18
|
+
const context = React.useContext(ToggleGroupContext);
|
|
19
|
+
return (_jsx(TogglePrimitive, { "data-slot": "toggle-group-item", "data-variant": context.variant || variant, "data-size": context.size || size, "data-spacing": context.spacing, className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-local focus-visible:z-local group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", toggleVariants({
|
|
20
|
+
variant: context.variant || variant,
|
|
21
|
+
size: context.size || size,
|
|
22
|
+
}), className), ...props, children: children }));
|
|
23
|
+
}
|
|
24
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./toolbar.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./toolbar.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Toolbar as ToolbarBase } from "@base-ui/react/toolbar";
|
|
3
|
+
import type { InputProps } from "@base-ui/react/input";
|
|
4
|
+
import { type ButtonProps } from "../button/index.js";
|
|
5
|
+
import { InputGroup } from "../input-group/index.js";
|
|
6
|
+
export interface ToolbarProps extends Omit<ToolbarBase.Root.Props, "children"> {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export type ToolbarButtonProps = Omit<ButtonProps, "size" | "variant"> & Pick<ToolbarBase.Button.Props, "focusableWhenDisabled">;
|
|
10
|
+
export type ToolbarInputProps = Omit<InputProps, "size" | "variant" | "label" | "labelTooltip" | "description" | "hideLabel" | "error" | "passwordManagerIgnore" | "render"> & {
|
|
11
|
+
focusableWhenDisabled?: ToolbarBase.Input.Props["focusableWhenDisabled"];
|
|
12
|
+
};
|
|
13
|
+
export type ToolbarInputGroupProps = Omit<React.ComponentPropsWithoutRef<typeof InputGroup>, "size">;
|
|
14
|
+
export declare const Toolbar: React.ForwardRefExoticComponent<Omit<ToolbarProps, "ref"> & React.RefAttributes<HTMLDivElement>> & {
|
|
15
|
+
Button: React.ForwardRefExoticComponent<Omit<ToolbarButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
Input: React.ForwardRefExoticComponent<Omit<ToolbarInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
17
|
+
InputGroup: React.ForwardRefExoticComponent<ToolbarInputGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Toolbar as ToolbarBase } from "@base-ui/react/toolbar";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
import { Button } from "../button/index.js";
|
|
7
|
+
import { Input } from "../input/index.js";
|
|
8
|
+
import { InputGroup } from "../input-group/index.js";
|
|
9
|
+
const TOOLBAR_CONTROL_STYLES = cn("relative min-w-0 rounded-none border-0 bg-transparent shadow-none ring-0", "focus-within:z-10 focus:z-10 focus-visible:z-10 has-[:focus-visible]:z-10");
|
|
10
|
+
const Root = /* @__PURE__ */ React.forwardRef(({ children, className, ...props }, ref) => {
|
|
11
|
+
return (_jsx(ToolbarBase.Root, { ref: ref, className: cn("inline-flex w-fit items-stretch rounded-lg bg-white shadow-sm ring-1 ring-zinc-200 dark:bg-zinc-950 dark:ring-zinc-800", "[&>*:first-child]:rounded-l-lg [&>*:not([aria-hidden='true']):not([type='hidden']):not(:has(~_:not([aria-hidden='true']):not([type='hidden'])))]:rounded-r-lg", "[&>*:not([aria-hidden='true']):not(:first-child)]:border-l [&>*:not([aria-hidden='true']):not(:first-child)]:border-zinc-200 dark:[&>*:not([aria-hidden='true']):not(:first-child)]:border-zinc-800", className), ...props, children: children }));
|
|
12
|
+
});
|
|
13
|
+
Root.displayName = "Toolbar";
|
|
14
|
+
const ButtonItem = /* @__PURE__ */ React.forwardRef(({ children, className, disabled, loading, type, ...props }, ref) => {
|
|
15
|
+
return (_jsx(ToolbarBase.Button, { ref: ref, disabled: loading || disabled, className: cn(className, TOOLBAR_CONTROL_STYLES), render: _jsx(Button, { variant: "ghost", size: "sm", disabled: disabled, loading: loading, type: type ?? "button", ...props }), ...props, children: children }));
|
|
16
|
+
});
|
|
17
|
+
ButtonItem.displayName = "Toolbar.Button";
|
|
18
|
+
const InputItem = /* @__PURE__ */ React.forwardRef(({ className, style, ...props }, ref) => {
|
|
19
|
+
// FIX: Change parameter type from InputState to any
|
|
20
|
+
const resolvedClassName = (state) => typeof className === "function"
|
|
21
|
+
? cn(className(state), TOOLBAR_CONTROL_STYLES)
|
|
22
|
+
: cn(className, TOOLBAR_CONTROL_STYLES);
|
|
23
|
+
// FIX: Change parameter type from InputState to any
|
|
24
|
+
const resolvedStyle = (state) => typeof style === "function" ? style(state) : style;
|
|
25
|
+
return (_jsx(ToolbarBase.Input, { ref: ref, render: (rootProps, state) => {
|
|
26
|
+
return (_jsx(Input, { ...rootProps, className: resolvedClassName(state), style: resolvedStyle(state), ...props }));
|
|
27
|
+
}, ...props }));
|
|
28
|
+
});
|
|
29
|
+
InputItem.displayName = "Toolbar.Input";
|
|
30
|
+
// FIX 2: Changed the forwarded ref type from HTMLElement to HTMLDivElement
|
|
31
|
+
// to match what your InputGroup component expects.
|
|
32
|
+
const InputGroupItem = /* @__PURE__ */ React.forwardRef(({ children, className, ...props }, ref) => {
|
|
33
|
+
const ariaLabel = props["aria-label"];
|
|
34
|
+
const ariaLabelledBy = props["aria-labelledby"];
|
|
35
|
+
// FIX 3: Explicitly type the child props to avoid 'unknown' errors
|
|
36
|
+
const toolbarChildren = React.Children.map(children, (child) => {
|
|
37
|
+
if (!React.isValidElement(child) ||
|
|
38
|
+
child.type?.displayName !== "InputGroup.Input") {
|
|
39
|
+
return child;
|
|
40
|
+
}
|
|
41
|
+
return (_jsx(ToolbarBase.Input, { "aria-label": child.props["aria-label"] ?? ariaLabel, "aria-labelledby": child.props["aria-labelledby"] ?? ariaLabelledBy, render: React.cloneElement(child) }));
|
|
42
|
+
});
|
|
43
|
+
return (_jsx(InputGroup, { ref: ref, className: cn(TOOLBAR_CONTROL_STYLES, className), ...props, children: toolbarChildren }));
|
|
44
|
+
});
|
|
45
|
+
InputGroupItem.displayName = "Toolbar.InputGroup";
|
|
46
|
+
/* ------------------------------------------------------------------ */
|
|
47
|
+
/* Compound Export */
|
|
48
|
+
/* ------------------------------------------------------------------ */
|
|
49
|
+
export const Toolbar = Object.assign(Root, {
|
|
50
|
+
Button: ButtonItem,
|
|
51
|
+
Input: InputItem,
|
|
52
|
+
InputGroup: InputGroupItem,
|
|
53
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./tooltip.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./tooltip.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
declare function TooltipProvider({ delay, ...props }: TooltipPrimitive.Provider.Props): import("react").JSX.Element;
|
|
4
|
+
declare function TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
5
|
+
/**
|
|
6
|
+
* Arrow with three paths for correct border rendering in light AND dark modes.
|
|
7
|
+
*
|
|
8
|
+
* 1. fill-current → main arrow body, inherits text color (white in light, grey-700 in dark)
|
|
9
|
+
* 2. fill-transparent → outer stroke (invisible in our current flat design)
|
|
10
|
+
* 3. fill-transparent → inner stroke (invisible in our current flat design)
|
|
11
|
+
*/
|
|
12
|
+
declare function ArrowSvg(props: React.ComponentProps<"svg">): import("react").JSX.Element;
|
|
13
|
+
type TooltipContentProps = TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset"> & {
|
|
14
|
+
withArrow?: boolean;
|
|
15
|
+
container?: HTMLElement | null;
|
|
16
|
+
};
|
|
17
|
+
declare function TooltipContent({ className, side, sideOffset, align, alignOffset, withArrow, container, children, ...props }: TooltipContentProps): import("react").JSX.Element;
|
|
18
|
+
type TooltipAlign = "start" | "center" | "end";
|
|
19
|
+
type TooltipSide = "top" | "bottom" | "left" | "right";
|
|
20
|
+
type TooltipProps = Omit<TooltipPrimitive.Root.Props, "children"> & {
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
content?: ReactNode;
|
|
23
|
+
side?: TooltipSide;
|
|
24
|
+
align?: TooltipAlign;
|
|
25
|
+
sideOffset?: TooltipPrimitive.Positioner.Props["sideOffset"];
|
|
26
|
+
alignOffset?: number;
|
|
27
|
+
withArrow?: boolean;
|
|
28
|
+
container?: HTMLElement | null;
|
|
29
|
+
className?: string;
|
|
30
|
+
render?: TooltipPrimitive.Trigger.Props["render"];
|
|
31
|
+
/** @deprecated Use `render` instead. */
|
|
32
|
+
asChild?: boolean;
|
|
33
|
+
delay?: number;
|
|
34
|
+
closeDelay?: number;
|
|
35
|
+
};
|
|
36
|
+
declare const Tooltip: import("react").ForwardRefExoticComponent<Omit<TooltipPrimitive.Root.Props<unknown>, "children"> & {
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
content?: ReactNode;
|
|
39
|
+
side?: TooltipSide;
|
|
40
|
+
align?: TooltipAlign;
|
|
41
|
+
sideOffset?: TooltipPrimitive.Positioner.Props["sideOffset"];
|
|
42
|
+
alignOffset?: number;
|
|
43
|
+
withArrow?: boolean;
|
|
44
|
+
container?: HTMLElement | null;
|
|
45
|
+
className?: string;
|
|
46
|
+
render?: TooltipPrimitive.Trigger.Props["render"];
|
|
47
|
+
/** @deprecated Use `render` instead. */
|
|
48
|
+
asChild?: boolean;
|
|
49
|
+
delay?: number;
|
|
50
|
+
closeDelay?: number;
|
|
51
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
52
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, ArrowSvg, };
|
|
53
|
+
export type { TooltipProps, TooltipContentProps, TooltipSide, TooltipAlign };
|