@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,129 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { tokens } from "@xerobi/tokens";
|
|
3
|
+
import { merge } from "es-toolkit";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
/**
|
|
6
|
+
* ApexCharts writes colours straight into SVG attributes, where `var()` is not
|
|
7
|
+
* resolved. The CSS tokens are therefore resolved to concrete colours here.
|
|
8
|
+
*/
|
|
9
|
+
function resolveColor(root, value, ctx) {
|
|
10
|
+
const probe = document.createElement("span");
|
|
11
|
+
probe.style.color = value;
|
|
12
|
+
root.appendChild(probe);
|
|
13
|
+
const computed = getComputedStyle(probe).color;
|
|
14
|
+
probe.remove();
|
|
15
|
+
if (!ctx)
|
|
16
|
+
return computed;
|
|
17
|
+
ctx.fillStyle = tokens.palette.common.black;
|
|
18
|
+
ctx.fillStyle = computed;
|
|
19
|
+
return ctx.fillStyle;
|
|
20
|
+
}
|
|
21
|
+
function readTokens() {
|
|
22
|
+
const root = document.documentElement;
|
|
23
|
+
const ctx = document.createElement("canvas").getContext("2d");
|
|
24
|
+
const c = (name) => resolveColor(root, `var(${name})`, ctx);
|
|
25
|
+
return {
|
|
26
|
+
primary: c("--primary-main"),
|
|
27
|
+
warning: c("--warning-main"),
|
|
28
|
+
info: c("--info-main"),
|
|
29
|
+
error: c("--error-main"),
|
|
30
|
+
success: c("--success-main"),
|
|
31
|
+
warningDark: c("--warning-dark"),
|
|
32
|
+
successDarker: c("--success-darker"),
|
|
33
|
+
infoDark: c("--info-dark"),
|
|
34
|
+
infoDarker: c("--info-darker"),
|
|
35
|
+
textPrimary: c("--text-primary"),
|
|
36
|
+
textSecondary: c("--text-secondary"),
|
|
37
|
+
textDisabled: c("--text-disabled"),
|
|
38
|
+
divider: c("--divider"),
|
|
39
|
+
paper: c("--bg-paper"),
|
|
40
|
+
grey500Track: resolveColor(root, "color-mix(in srgb, var(--grey-500) 16%, transparent)", ctx),
|
|
41
|
+
font: getComputedStyle(root).getPropertyValue("--font-sans").trim() || getComputedStyle(document.body).fontFamily,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function useTokens() {
|
|
45
|
+
const [tokens, setTokens] = useState(null);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
const update = () => setTokens(readTokens());
|
|
48
|
+
update();
|
|
49
|
+
const observer = new MutationObserver(update);
|
|
50
|
+
observer.observe(document.documentElement, { attributes: true, attributeFilter: ["class", "style", "data-color-scheme"] });
|
|
51
|
+
return () => observer.disconnect();
|
|
52
|
+
}, []);
|
|
53
|
+
return tokens;
|
|
54
|
+
}
|
|
55
|
+
const SM = 600;
|
|
56
|
+
const MD = 900;
|
|
57
|
+
/**
|
|
58
|
+
* Default ApexCharts options matching the Minimal look, merged with `updatedOptions`.
|
|
59
|
+
* Colours follow the active brand and light/dark mode.
|
|
60
|
+
*/
|
|
61
|
+
export function useChart(updatedOptions) {
|
|
62
|
+
const t = useTokens();
|
|
63
|
+
if (!t)
|
|
64
|
+
return updatedOptions ?? {};
|
|
65
|
+
const labelTotal = { show: true, label: "Total", color: t.textSecondary, fontSize: "14px", fontWeight: 600 };
|
|
66
|
+
const labelValue = { offsetY: 8, color: t.textPrimary, fontSize: "24px", fontWeight: 700 };
|
|
67
|
+
const base = {
|
|
68
|
+
chart: {
|
|
69
|
+
toolbar: { show: false },
|
|
70
|
+
zoom: { enabled: false },
|
|
71
|
+
parentHeightOffset: 0,
|
|
72
|
+
fontFamily: t.font,
|
|
73
|
+
foreColor: t.textDisabled,
|
|
74
|
+
animations: {
|
|
75
|
+
enabled: true,
|
|
76
|
+
speed: 360,
|
|
77
|
+
animateGradually: { enabled: true, delay: 120 },
|
|
78
|
+
dynamicAnimation: { enabled: true, speed: 360 },
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
colors: [t.primary, t.warning, t.info, t.error, t.success, t.warningDark, t.successDarker, t.infoDark, t.infoDarker],
|
|
82
|
+
states: { hover: { filter: { type: "darken" } }, active: { filter: { type: "darken" } } },
|
|
83
|
+
fill: {
|
|
84
|
+
opacity: 1,
|
|
85
|
+
gradient: { type: "vertical", shadeIntensity: 0, opacityFrom: 0.4, opacityTo: 0, stops: [0, 100] },
|
|
86
|
+
},
|
|
87
|
+
dataLabels: { enabled: false },
|
|
88
|
+
stroke: { width: 2.5, curve: "smooth", lineCap: "round" },
|
|
89
|
+
grid: {
|
|
90
|
+
strokeDashArray: 3,
|
|
91
|
+
borderColor: t.divider,
|
|
92
|
+
padding: { top: 0, right: 0, bottom: 0 },
|
|
93
|
+
xaxis: { lines: { show: false } },
|
|
94
|
+
},
|
|
95
|
+
xaxis: { axisBorder: { show: false }, axisTicks: { show: false } },
|
|
96
|
+
yaxis: { tickAmount: 5 },
|
|
97
|
+
markers: { size: 0, strokeColors: t.paper },
|
|
98
|
+
tooltip: { theme: "false", fillSeriesColor: false, x: { show: true } },
|
|
99
|
+
legend: {
|
|
100
|
+
show: false,
|
|
101
|
+
position: "top",
|
|
102
|
+
fontWeight: 500,
|
|
103
|
+
fontSize: "13px",
|
|
104
|
+
horizontalAlign: "right",
|
|
105
|
+
markers: { shape: "circle" },
|
|
106
|
+
labels: { colors: t.textPrimary },
|
|
107
|
+
itemMargin: { horizontal: 8, vertical: 8 },
|
|
108
|
+
},
|
|
109
|
+
plotOptions: {
|
|
110
|
+
bar: { borderRadius: 4, columnWidth: "48%", borderRadiusApplication: "end" },
|
|
111
|
+
pie: { donut: { labels: { show: true, value: labelValue, total: labelTotal } } },
|
|
112
|
+
radialBar: {
|
|
113
|
+
hollow: { margin: -8, size: "100%" },
|
|
114
|
+
track: { margin: -8, strokeWidth: "50%", background: t.grey500Track },
|
|
115
|
+
dataLabels: { value: labelValue, total: labelTotal },
|
|
116
|
+
},
|
|
117
|
+
radar: {
|
|
118
|
+
polygons: { fill: { colors: ["transparent"] }, strokeColors: t.divider, connectorColors: t.divider },
|
|
119
|
+
},
|
|
120
|
+
polarArea: { rings: { strokeColor: t.divider }, spokes: { connectorColors: t.divider } },
|
|
121
|
+
heatmap: { distributed: true },
|
|
122
|
+
},
|
|
123
|
+
responsive: [
|
|
124
|
+
{ breakpoint: SM, options: { plotOptions: { bar: { borderRadius: 3, columnWidth: "80%" } } } },
|
|
125
|
+
{ breakpoint: MD, options: { plotOptions: { bar: { columnWidth: "60%" } } } },
|
|
126
|
+
],
|
|
127
|
+
};
|
|
128
|
+
return merge(base ?? {}, updatedOptions ?? {});
|
|
129
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
2
|
+
type CheckboxColor = "primary" | "secondary" | "info" | "success" | "warning" | "error" | "inherit";
|
|
3
|
+
declare function Checkbox({ className, color, ...props }: Omit<CheckboxPrimitive.Root.Props, "color"> & {
|
|
4
|
+
color?: CheckboxColor;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
export { Checkbox };
|
|
7
|
+
export type { CheckboxColor };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
import { CheckIcon, MinusIcon } from "lucide-react";
|
|
6
|
+
const checkedColor = {
|
|
7
|
+
primary: "data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground",
|
|
8
|
+
secondary: "data-checked:border-brand-secondary data-checked:bg-brand-secondary data-checked:text-brand-secondary-foreground data-indeterminate:border-brand-secondary data-indeterminate:bg-brand-secondary data-indeterminate:text-brand-secondary-foreground",
|
|
9
|
+
info: "data-checked:border-info data-checked:bg-info data-checked:text-info-foreground data-indeterminate:border-info data-indeterminate:bg-info data-indeterminate:text-info-foreground",
|
|
10
|
+
success: "data-checked:border-success data-checked:bg-success data-checked:text-success-foreground data-indeterminate:border-success data-indeterminate:bg-success data-indeterminate:text-success-foreground",
|
|
11
|
+
warning: "data-checked:border-warning data-checked:bg-warning data-checked:text-warning-foreground data-indeterminate:border-warning data-indeterminate:bg-warning data-indeterminate:text-warning-foreground",
|
|
12
|
+
error: "data-checked:border-error data-checked:bg-error data-checked:text-error-foreground data-indeterminate:border-error data-indeterminate:bg-error data-indeterminate:text-error-foreground",
|
|
13
|
+
inherit: "data-checked:border-text-primary data-checked:bg-text-primary data-checked:text-background data-indeterminate:border-text-primary data-indeterminate:bg-text-primary data-indeterminate:text-background",
|
|
14
|
+
};
|
|
15
|
+
function Checkbox({ className, color = "primary", ...props }) {
|
|
16
|
+
return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("peer relative flex size-[18px] shrink-0 items-center justify-center rounded-xs border-[1.5px] border-text-secondary transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-2.5 hover:bg-action-hover focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:border-action-disabled disabled:opacity-100 data-disabled:border-action-disabled data-checked:data-disabled:bg-action-disabled aria-invalid:border-error aria-invalid:ring-3 aria-invalid:ring-error/20", checkedColor[color], className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none [&>svg]:size-3.5 [&>svg]:stroke-[3]", render: (p, state) => (_jsx("span", { ...p, children: state.indeterminate ? _jsx(MinusIcon, {}) : _jsx(CheckIcon, {}) })) }) }));
|
|
17
|
+
}
|
|
18
|
+
export { Checkbox };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./checkbox.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./checkbox.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
type ChipColor = "default" | "primary" | "secondary" | "info" | "success" | "warning" | "error";
|
|
3
|
+
type ChipVariant = "filled" | "soft" | "outlined";
|
|
4
|
+
declare const chipVariants: (props?: ({
|
|
5
|
+
size?: "small" | "medium" | null | undefined;
|
|
6
|
+
variant?: "soft" | "filled" | "outlined" | null | undefined;
|
|
7
|
+
clickable?: boolean | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
type ChipProps = Omit<React.ComponentProps<"div">, "color"> & {
|
|
10
|
+
label?: React.ReactNode;
|
|
11
|
+
color?: ChipColor;
|
|
12
|
+
variant?: ChipVariant;
|
|
13
|
+
size?: "small" | "medium";
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
avatar?: React.ReactNode;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Renders a remove button and calls this when it is pressed (or Backspace/Delete on the chip). */
|
|
18
|
+
onDelete?: (event: React.SyntheticEvent) => void;
|
|
19
|
+
deleteIcon?: React.ReactNode;
|
|
20
|
+
};
|
|
21
|
+
declare function Chip({ className, label, color, variant, size, icon, avatar, disabled, onDelete, deleteIcon, onClick, onKeyDown, children, ...props }: ChipProps): React.JSX.Element;
|
|
22
|
+
export { Chip, chipVariants };
|
|
23
|
+
export type { ChipProps, ChipColor, ChipVariant };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
import { XCircleIcon } from "lucide-react";
|
|
6
|
+
const chipVariants = /* @__PURE__ */ cva("group/chip inline-flex max-w-full items-center gap-1.5 align-middle text-body2 font-medium whitespace-nowrap transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:pointer-events-none [&_svg]:shrink-0", {
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
medium: "h-8 rounded-lg px-3 [&_svg:not([class*='size-'])]:size-5",
|
|
10
|
+
small: "h-6 rounded-md px-2 text-xs [&_svg:not([class*='size-'])]:size-4",
|
|
11
|
+
},
|
|
12
|
+
variant: { filled: "", soft: "", outlined: "border bg-transparent" },
|
|
13
|
+
clickable: { true: "cursor-pointer", false: "" },
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: { size: "medium", variant: "filled", clickable: false },
|
|
16
|
+
});
|
|
17
|
+
const tones = {
|
|
18
|
+
default: {
|
|
19
|
+
filled: "bg-text-primary text-white hover:bg-grey-700 dark:text-grey-800 dark:hover:bg-grey-100",
|
|
20
|
+
soft: "bg-grey-500/16 text-text-primary hover:bg-grey-500/32",
|
|
21
|
+
outlined: "border-grey-500/32 text-text-primary hover:bg-action-hover",
|
|
22
|
+
},
|
|
23
|
+
primary: {
|
|
24
|
+
filled: "bg-primary text-primary-foreground hover:bg-primary-dark",
|
|
25
|
+
soft: "bg-primary/16 text-primary-dark hover:bg-primary/32 dark:text-primary-light",
|
|
26
|
+
outlined: "border-primary text-primary hover:bg-primary/8",
|
|
27
|
+
},
|
|
28
|
+
secondary: {
|
|
29
|
+
filled: "bg-brand-secondary text-brand-secondary-foreground hover:bg-brand-secondary-dark",
|
|
30
|
+
soft: "bg-brand-secondary/16 text-brand-secondary-dark hover:bg-brand-secondary/32 dark:text-brand-secondary-light",
|
|
31
|
+
outlined: "border-brand-secondary text-brand-secondary hover:bg-brand-secondary/8",
|
|
32
|
+
},
|
|
33
|
+
info: {
|
|
34
|
+
filled: "bg-info text-info-foreground hover:bg-info-dark",
|
|
35
|
+
soft: "bg-info/16 text-info-dark hover:bg-info/32 dark:text-info-light",
|
|
36
|
+
outlined: "border-info text-info hover:bg-info/8",
|
|
37
|
+
},
|
|
38
|
+
success: {
|
|
39
|
+
filled: "bg-success text-success-foreground hover:bg-success-dark",
|
|
40
|
+
soft: "bg-success/16 text-success-dark hover:bg-success/32 dark:text-success-light",
|
|
41
|
+
outlined: "border-success text-success hover:bg-success/8",
|
|
42
|
+
},
|
|
43
|
+
warning: {
|
|
44
|
+
filled: "bg-warning text-warning-foreground hover:bg-warning-dark",
|
|
45
|
+
soft: "bg-warning/16 text-warning-dark hover:bg-warning/32 dark:text-warning-light",
|
|
46
|
+
outlined: "border-warning text-warning hover:bg-warning/8",
|
|
47
|
+
},
|
|
48
|
+
error: {
|
|
49
|
+
filled: "bg-error text-error-foreground hover:bg-error-dark",
|
|
50
|
+
soft: "bg-error/16 text-error-dark hover:bg-error/32 dark:text-error-light",
|
|
51
|
+
outlined: "border-error text-error hover:bg-error/8",
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
function Chip({ className, label, color = "default", variant = "filled", size = "medium", icon, avatar, disabled, onDelete, deleteIcon, onClick, onKeyDown, children, ...props }) {
|
|
55
|
+
const clickable = !!onClick && !disabled;
|
|
56
|
+
const interactive = clickable || !!onDelete;
|
|
57
|
+
return (_jsxs("div", { "data-slot": "chip", "data-disabled": disabled || undefined, role: clickable ? "button" : undefined, tabIndex: interactive && !disabled ? 0 : undefined, "aria-disabled": disabled || undefined, onClick: disabled ? undefined : onClick, onKeyDown: (e) => {
|
|
58
|
+
onKeyDown?.(e);
|
|
59
|
+
if (e.defaultPrevented || disabled)
|
|
60
|
+
return;
|
|
61
|
+
if (onDelete && (e.key === "Backspace" || e.key === "Delete")) {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
onDelete(e);
|
|
64
|
+
}
|
|
65
|
+
else if (clickable && (e.key === "Enter" || e.key === " ")) {
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
e.currentTarget.click();
|
|
68
|
+
}
|
|
69
|
+
}, className: cn(chipVariants({ size, variant, clickable }), tones[color][variant], disabled && "bg-action-disabled-bg text-action-disabled border-action-disabled-bg", avatar && "pl-1", onDelete && "pr-1.5", className), ...props, children: [avatar ? (_jsx("span", { className: "flex size-6 items-center justify-center overflow-hidden rounded-full [&>*]:size-full", children: avatar })) : (icon), _jsx("span", { className: "truncate", children: label ?? children }), onDelete ? (_jsx("button", { type: "button", tabIndex: -1, "aria-label": "Remove", disabled: disabled, onClick: (e) => {
|
|
70
|
+
e.stopPropagation();
|
|
71
|
+
onDelete(e);
|
|
72
|
+
}, className: "inline-flex opacity-48 transition-opacity hover:opacity-100", children: deleteIcon ?? _jsx(XCircleIcon, {}) })) : null] }));
|
|
73
|
+
}
|
|
74
|
+
export { Chip, chipVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./chip.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./chip.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ClipboardTextSize = "sm" | "base" | "lg";
|
|
2
|
+
export interface ClipboardTextProps {
|
|
3
|
+
text: string;
|
|
4
|
+
textToCopy?: string;
|
|
5
|
+
masked?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
onCopy?: () => void;
|
|
8
|
+
size?: ClipboardTextSize;
|
|
9
|
+
labels?: {
|
|
10
|
+
copyAction?: string;
|
|
11
|
+
revealAction?: string;
|
|
12
|
+
hideAction?: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const ClipboardText: import("react").ForwardRefExoticComponent<ClipboardTextProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Check, Copy, Eye, EyeOff } from "lucide-react";
|
|
4
|
+
import { forwardRef, useCallback, useEffect, useRef, useState } from "react";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
import { Button } from "../button/index.js";
|
|
7
|
+
const COPIED_FEEDBACK_MS = 1500;
|
|
8
|
+
const sizeConfig = {
|
|
9
|
+
sm: { height: "h-8", text: "text-xs", button: "h-8 px-2" },
|
|
10
|
+
base: { height: "h-10", text: "text-sm", button: "h-10 px-3" },
|
|
11
|
+
lg: { height: "h-10", text: "text-sm", button: "h-10 px-3" },
|
|
12
|
+
};
|
|
13
|
+
export const ClipboardText = /* @__PURE__ */ forwardRef(({ text, textToCopy, masked = false, className, size = "lg", onCopy, labels: { copyAction = "Copy to clipboard", revealAction = "Reveal value", hideAction = "Hide value", } = {}, }, ref) => {
|
|
14
|
+
const [copied, setCopied] = useState(false);
|
|
15
|
+
const [revealed, setRevealed] = useState(false);
|
|
16
|
+
const resetTimeoutRef = useRef(null);
|
|
17
|
+
const config = sizeConfig[size];
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
return () => {
|
|
20
|
+
if (resetTimeoutRef.current !== null) {
|
|
21
|
+
clearTimeout(resetTimeoutRef.current);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}, []);
|
|
25
|
+
const copyToClipboard = useCallback(async () => {
|
|
26
|
+
try {
|
|
27
|
+
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
28
|
+
await navigator.clipboard.writeText(textToCopy ?? text);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const textarea = document.createElement("textarea");
|
|
32
|
+
textarea.value = textToCopy ?? text;
|
|
33
|
+
textarea.style.position = "absolute";
|
|
34
|
+
textarea.style.left = "-9999px";
|
|
35
|
+
document.body.appendChild(textarea);
|
|
36
|
+
textarea.select();
|
|
37
|
+
document.execCommand("copy");
|
|
38
|
+
document.body.removeChild(textarea);
|
|
39
|
+
}
|
|
40
|
+
setCopied(true);
|
|
41
|
+
if (resetTimeoutRef.current !== null) {
|
|
42
|
+
clearTimeout(resetTimeoutRef.current);
|
|
43
|
+
}
|
|
44
|
+
resetTimeoutRef.current = setTimeout(() => {
|
|
45
|
+
setCopied(false);
|
|
46
|
+
resetTimeoutRef.current = null;
|
|
47
|
+
}, COPIED_FEEDBACK_MS);
|
|
48
|
+
onCopy?.();
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
console.warn("Clipboard copy failed", error);
|
|
52
|
+
}
|
|
53
|
+
}, [text, textToCopy, onCopy]);
|
|
54
|
+
return (_jsxs("div", { ref: ref, className: cn(
|
|
55
|
+
// Mirrors your Input primitive styles so it looks native
|
|
56
|
+
"flex w-full min-w-0 items-center overflow-hidden rounded-md border border-input bg-transparent font-mono transition-colors", "hover:border-text-primary focus-within:border-text-primary focus-within:ring-3 focus-within:ring-ring/30", config.height, config.text, className), children: [_jsx("span", { className: "min-w-0 grow truncate px-3.5", children: masked && !revealed ? "••••••••" : text }), masked && (_jsx(Button, { size: "sm", variant: "ghost", onClick: () => setRevealed((v) => !v), "aria-label": revealed ? hideAction : revealAction, "aria-pressed": revealed, className: cn("h-full shrink-0 rounded-none border-l border-input px-3", "focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-inset"), children: revealed ? _jsx(EyeOff, { className: "size-4" }) : _jsx(Eye, { className: "size-4" }) })), _jsxs(Button, { size: "sm", variant: "ghost", onClick: copyToClipboard, "aria-label": copyAction, className: cn("relative isolate h-full shrink-0 overflow-hidden rounded-none rounded-r-[inherit] border-l border-input px-3", "focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-inset"), children: [_jsx("span", { className: cn("absolute inset-0 flex items-center justify-center transition-all duration-200", copied ? "translate-y-0 opacity-100" : "translate-y-full opacity-0"), children: _jsx(Check, { className: "size-4 text-green-500" }) }), _jsx("span", { className: cn("flex items-center justify-center transition-all duration-200", copied ? "-translate-y-full opacity-0" : "translate-y-0 opacity-100"), children: _jsx(Copy, { className: "size-4" }) })] }), _jsx("span", { className: "sr-only", "aria-live": "polite", children: copied ? "Copied" : "" })] }));
|
|
57
|
+
});
|
|
58
|
+
ClipboardText.displayName = "ClipboardText";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./clipboard-text.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./clipboard-text.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
|
|
2
|
+
declare function Collapsible({ ...props }: CollapsiblePrimitive.Root.Props): import("react").JSX.Element;
|
|
3
|
+
declare function CollapsibleTrigger({ ...props }: CollapsiblePrimitive.Trigger.Props): import("react").JSX.Element;
|
|
4
|
+
declare function CollapsibleContent({ ...props }: CollapsiblePrimitive.Panel.Props): import("react").JSX.Element;
|
|
5
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
|
|
4
|
+
function Collapsible({ ...props }) {
|
|
5
|
+
return _jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
|
|
6
|
+
}
|
|
7
|
+
function CollapsibleTrigger({ ...props }) {
|
|
8
|
+
return (_jsx(CollapsiblePrimitive.Trigger, { "data-slot": "collapsible-trigger", ...props }));
|
|
9
|
+
}
|
|
10
|
+
function CollapsibleContent({ ...props }) {
|
|
11
|
+
return (_jsx(CollapsiblePrimitive.Panel, { "data-slot": "collapsible-content", ...props }));
|
|
12
|
+
}
|
|
13
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./collapsible.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./collapsible.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createClasses } from "../../lib/create-classes.js";
|
|
2
|
+
export const colorPreviewClasses = {
|
|
3
|
+
root: /* @__PURE__ */ createClasses("color__preview__root"),
|
|
4
|
+
item: /* @__PURE__ */ createClasses("color__preview__item"),
|
|
5
|
+
label: /* @__PURE__ */ createClasses("color__preview__label"),
|
|
6
|
+
};
|
|
7
|
+
export const colorPickerClasses = {
|
|
8
|
+
root: /* @__PURE__ */ createClasses("color__picker__root"),
|
|
9
|
+
item: {
|
|
10
|
+
root: /* @__PURE__ */ createClasses("color__picker__item__root"),
|
|
11
|
+
container: /* @__PURE__ */ createClasses("color__picker__item__container"),
|
|
12
|
+
icon: /* @__PURE__ */ createClasses("color__picker__item__icon"),
|
|
13
|
+
},
|
|
14
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CheckIcon } from "lucide-react";
|
|
2
|
+
export type ColorPickerSlotProps = {
|
|
3
|
+
item?: React.ComponentProps<"button">;
|
|
4
|
+
itemContainer?: React.ComponentProps<"span">;
|
|
5
|
+
icon?: React.ComponentProps<typeof CheckIcon>;
|
|
6
|
+
};
|
|
7
|
+
export type ColorPickerProps = Omit<React.ComponentProps<"ul">, "onChange"> & {
|
|
8
|
+
size?: number;
|
|
9
|
+
options?: string[];
|
|
10
|
+
limit?: "auto" | number;
|
|
11
|
+
value?: string | string[];
|
|
12
|
+
variant?: "circular" | "rounded" | "square";
|
|
13
|
+
onChange?: (value: string | string[]) => void;
|
|
14
|
+
slotProps?: ColorPickerSlotProps;
|
|
15
|
+
};
|
|
16
|
+
export declare function ColorPicker({ value, size, onChange, slotProps, className, style, options, limit, variant, ...other }: ColorPickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { CheckIcon } from "lucide-react";
|
|
5
|
+
import { useCallback } from "react";
|
|
6
|
+
import { getContrastText } from "../../lib/brand.js";
|
|
7
|
+
import { colorPickerClasses } from "./classes.js";
|
|
8
|
+
const RADIUS = {
|
|
9
|
+
circular: "50%",
|
|
10
|
+
rounded: "calc(var(--item-size) / 6)",
|
|
11
|
+
square: "0px",
|
|
12
|
+
};
|
|
13
|
+
export function ColorPicker({ value, size = 36, onChange, slotProps, className, style, options = [], limit = "auto", variant = "circular", ...other }) {
|
|
14
|
+
const isSingleSelect = typeof value === "string";
|
|
15
|
+
const handleSelect = useCallback((color) => {
|
|
16
|
+
if (isSingleSelect) {
|
|
17
|
+
if (color !== value)
|
|
18
|
+
onChange?.(color);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const selected = (value ?? []);
|
|
22
|
+
onChange?.(selected.includes(color) ? selected.filter((current) => current !== color) : [...selected, color]);
|
|
23
|
+
}, [onChange, value, isSingleSelect]);
|
|
24
|
+
return (_jsx("ul", { className: cn(colorPickerClasses.root, "inline-flex flex-row flex-wrap", typeof limit === "number" && "justify-end", className), style: {
|
|
25
|
+
"--item-size": `${size}px`,
|
|
26
|
+
"--item-radius": RADIUS[variant],
|
|
27
|
+
...(typeof limit === "number" && { width: `calc(var(--item-size) * ${limit})` }),
|
|
28
|
+
...style,
|
|
29
|
+
}, ...other, children: options.map((color) => {
|
|
30
|
+
const selected = isSingleSelect ? value === color : ((value ?? [])).includes(color);
|
|
31
|
+
return (_jsx("li", { className: "inline-flex", children: _jsx("button", { type: "button", "aria-label": color, "aria-pressed": selected, onClick: () => handleSelect(color), ...slotProps?.item, className: cn(colorPickerClasses.item.root, "inline-flex size-(--item-size) cursor-pointer items-center justify-center rounded-(--item-radius) outline-none focus-visible:ring-2 focus-visible:ring-ring", slotProps?.item?.className), children: _jsx("span", { ...slotProps?.itemContainer, className: cn(colorPickerClasses.item.container, "inline-flex items-center justify-center rounded-[inherit] border border-grey-500/15 transition-all duration-150", selected ? "size-[calc(var(--item-size)-8px)]" : "size-[calc(var(--item-size)-16px)]", slotProps?.itemContainer?.className), style: {
|
|
32
|
+
backgroundColor: color,
|
|
33
|
+
...(selected && {
|
|
34
|
+
outline: `solid 2px color-mix(in srgb, ${color} 8%, transparent)`,
|
|
35
|
+
boxShadow: `4px 4px 8px 0 color-mix(in srgb, ${color} 48%, transparent)`,
|
|
36
|
+
}),
|
|
37
|
+
...slotProps?.itemContainer?.style,
|
|
38
|
+
}, children: _jsx(CheckIcon, { ...slotProps?.icon, className: cn(colorPickerClasses.item.icon, "transition-all duration-150", selected ? "size-[calc(var(--item-size)/2.4)]" : "size-0", slotProps?.icon?.className), style: { color: getContrastText(color), ...slotProps?.icon?.style } }) }) }) }, color));
|
|
39
|
+
}) }));
|
|
40
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ColorPreviewSlotProps = {
|
|
2
|
+
item?: React.ComponentProps<"li">;
|
|
3
|
+
label?: React.ComponentProps<"li">;
|
|
4
|
+
};
|
|
5
|
+
export type ColorPreviewProps = React.ComponentProps<"ul"> & {
|
|
6
|
+
limit?: number;
|
|
7
|
+
size?: number;
|
|
8
|
+
gap?: number;
|
|
9
|
+
colors: string[];
|
|
10
|
+
slotProps?: ColorPreviewSlotProps;
|
|
11
|
+
};
|
|
12
|
+
export declare function ColorPreview({ colors, limit, size, gap, className, slotProps, ...other }: ColorPreviewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { colorPreviewClasses } from "./classes.js";
|
|
5
|
+
export function ColorPreview({ colors, limit = 3, size = 16, gap = 6, className, slotProps, ...other }) {
|
|
6
|
+
const colorsRange = colors.slice(0, limit);
|
|
7
|
+
const remainingColorCount = colors.length - limit;
|
|
8
|
+
return (_jsxs("ul", { className: cn(colorPreviewClasses.root, "flex flex-row items-center justify-end", className), ...other, children: [colorsRange.map((color, index) => (_jsx("li", { ...slotProps?.item, className: cn(colorPreviewClasses.item, "rounded-full border-2 border-background shadow-[inset_-1px_1px_2px_rgb(0_0_0/0.24)]", slotProps?.item?.className), style: {
|
|
9
|
+
width: size,
|
|
10
|
+
height: size,
|
|
11
|
+
marginLeft: -gap,
|
|
12
|
+
backgroundColor: color,
|
|
13
|
+
...slotProps?.item?.style,
|
|
14
|
+
} }, color + index))), colors.length > limit && (_jsx("li", { ...slotProps?.label, className: cn(colorPreviewClasses.label, "text-subtitle2", slotProps?.label?.className), children: `+${remainingColorCount}` }))] }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Combobox as ComboboxPrimitive } from "@base-ui/react";
|
|
3
|
+
declare const Combobox: typeof ComboboxPrimitive.Root;
|
|
4
|
+
declare function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props): React.JSX.Element;
|
|
5
|
+
declare function ComboboxTrigger({ className, children, ...props }: ComboboxPrimitive.Trigger.Props): React.JSX.Element;
|
|
6
|
+
declare function ComboboxInput({ className, children, disabled, showTrigger, showClear, ...props }: ComboboxPrimitive.Input.Props & {
|
|
7
|
+
showTrigger?: boolean;
|
|
8
|
+
showClear?: boolean;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, anchor, ...props }: ComboboxPrimitive.Popup.Props & Pick<ComboboxPrimitive.Positioner.Props, "side" | "align" | "sideOffset" | "alignOffset" | "anchor">): React.JSX.Element;
|
|
11
|
+
declare function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props): React.JSX.Element;
|
|
12
|
+
declare function ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props): React.JSX.Element;
|
|
13
|
+
declare function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props): React.JSX.Element;
|
|
14
|
+
declare function ComboboxLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props): React.JSX.Element;
|
|
15
|
+
declare function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props): React.JSX.Element;
|
|
16
|
+
declare function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props): React.JSX.Element;
|
|
17
|
+
declare function ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props): React.JSX.Element;
|
|
18
|
+
declare function ComboboxChips({ className, ...props }: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> & ComboboxPrimitive.Chips.Props): React.JSX.Element;
|
|
19
|
+
declare function ComboboxChip({ className, children, showRemove, ...props }: ComboboxPrimitive.Chip.Props & {
|
|
20
|
+
showRemove?: boolean;
|
|
21
|
+
}): React.JSX.Element;
|
|
22
|
+
declare function ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props): React.JSX.Element;
|
|
23
|
+
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|
|
24
|
+
export { Combobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem, ComboboxGroup, ComboboxLabel, ComboboxCollection, ComboboxEmpty, ComboboxSeparator, ComboboxChips, ComboboxChip, ComboboxChipsInput, ComboboxTrigger, ComboboxValue, useComboboxAnchor, };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Combobox as ComboboxPrimitive } from "@base-ui/react";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
import { Button } from "../button/index.js";
|
|
7
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, } from "../input-group/index.js";
|
|
8
|
+
import { ChevronDownIcon, XIcon, CheckIcon } from "lucide-react";
|
|
9
|
+
const Combobox = ComboboxPrimitive.Root;
|
|
10
|
+
function ComboboxValue({ ...props }) {
|
|
11
|
+
return _jsx(ComboboxPrimitive.Value, { "data-slot": "combobox-value", ...props });
|
|
12
|
+
}
|
|
13
|
+
function ComboboxTrigger({ className, children, ...props }) {
|
|
14
|
+
return (_jsxs(ComboboxPrimitive.Trigger, { "data-slot": "combobox-trigger", className: cn("[&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-text-secondary" })] }));
|
|
15
|
+
}
|
|
16
|
+
function ComboboxClear({ className, ...props }) {
|
|
17
|
+
return (_jsx(ComboboxPrimitive.Clear, { "data-slot": "combobox-clear", render: _jsx(InputGroupButton, { variant: "ghost", size: "icon-xs" }), className: cn(className), ...props, children: _jsx(XIcon, { className: "pointer-events-none" }) }));
|
|
18
|
+
}
|
|
19
|
+
function ComboboxInput({ className, children, disabled = false, showTrigger = true, showClear = false, ...props }) {
|
|
20
|
+
return (_jsxs(InputGroup, { className: cn("w-auto", className), children: [_jsx(ComboboxPrimitive.Input, { render: _jsx(InputGroupInput, { disabled: disabled }), ...props }), _jsxs(InputGroupAddon, { align: "inline-end", children: [showTrigger && (_jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", render: _jsx(ComboboxTrigger, {}), "data-slot": "input-group-button", className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent", disabled: disabled })), showClear && _jsx(ComboboxClear, { disabled: disabled })] }), children] }));
|
|
21
|
+
}
|
|
22
|
+
function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props }) {
|
|
23
|
+
return (_jsx(ComboboxPrimitive.Portal, { children: _jsx(ComboboxPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, anchor: anchor, className: "isolate z-modal", children: _jsx(ComboboxPrimitive.Popup, { "data-slot": "combobox-content", "data-chips": !!anchor, className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden xui-paper xui-paper-dropdown text-popover-foreground duration-150 data-[chips=true]:min-w-(--anchor-width) 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-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none 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 }) }) }));
|
|
24
|
+
}
|
|
25
|
+
function ComboboxList({ className, ...props }) {
|
|
26
|
+
return (_jsx(ComboboxPrimitive.List, { "data-slot": "combobox-list", className: cn("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0", className), ...props }));
|
|
27
|
+
}
|
|
28
|
+
function ComboboxItem({ className, children, ...props }) {
|
|
29
|
+
return (_jsxs(ComboboxPrimitive.Item, { "data-slot": "combobox-item", className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-body2 not-last:mb-1 outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ComboboxPrimitive.ItemIndicator, { render: _jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }), children: _jsx(CheckIcon, { className: "pointer-events-none" }) })] }));
|
|
30
|
+
}
|
|
31
|
+
function ComboboxGroup({ className, ...props }) {
|
|
32
|
+
return (_jsx(ComboboxPrimitive.Group, { "data-slot": "combobox-group", className: cn(className), ...props }));
|
|
33
|
+
}
|
|
34
|
+
function ComboboxLabel({ className, ...props }) {
|
|
35
|
+
return (_jsx(ComboboxPrimitive.GroupLabel, { "data-slot": "combobox-label", className: cn("px-2 py-1.5 text-xs text-text-secondary", className), ...props }));
|
|
36
|
+
}
|
|
37
|
+
function ComboboxCollection({ ...props }) {
|
|
38
|
+
return (_jsx(ComboboxPrimitive.Collection, { "data-slot": "combobox-collection", ...props }));
|
|
39
|
+
}
|
|
40
|
+
function ComboboxEmpty({ className, ...props }) {
|
|
41
|
+
return (_jsx(ComboboxPrimitive.Empty, { "data-slot": "combobox-empty", className: cn("hidden w-full justify-center py-2 text-center text-sm text-text-secondary group-data-empty/combobox-content:flex", className), ...props }));
|
|
42
|
+
}
|
|
43
|
+
function ComboboxSeparator({ className, ...props }) {
|
|
44
|
+
return (_jsx(ComboboxPrimitive.Separator, { "data-slot": "combobox-separator", className: cn("-mx-1 my-1 h-px bg-divider", className), ...props }));
|
|
45
|
+
}
|
|
46
|
+
function ComboboxChips({ className, ...props }) {
|
|
47
|
+
return (_jsx(ComboboxPrimitive.Chips, { "data-slot": "combobox-chips", className: cn("flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", className), ...props }));
|
|
48
|
+
}
|
|
49
|
+
function ComboboxChip({ className, children, showRemove = true, ...props }) {
|
|
50
|
+
return (_jsxs(ComboboxPrimitive.Chip, { "data-slot": "combobox-chip", className: cn("flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", className), ...props, children: [children, showRemove && (_jsx(ComboboxPrimitive.ChipRemove, { render: _jsx(Button, { variant: "ghost", size: "icon-xs" }), className: "-ml-1 opacity-50 hover:opacity-100", "data-slot": "combobox-chip-remove", children: _jsx(XIcon, { className: "pointer-events-none" }) }))] }));
|
|
51
|
+
}
|
|
52
|
+
function ComboboxChipsInput({ className, ...props }) {
|
|
53
|
+
return (_jsx(ComboboxPrimitive.Input, { "data-slot": "combobox-chip-input", className: cn("min-w-16 flex-1 outline-none", className), ...props }));
|
|
54
|
+
}
|
|
55
|
+
function useComboboxAnchor() {
|
|
56
|
+
return React.useRef(null);
|
|
57
|
+
}
|
|
58
|
+
export { Combobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem, ComboboxGroup, ComboboxLabel, ComboboxCollection, ComboboxEmpty, ComboboxSeparator, ComboboxChips, ComboboxChip, ComboboxChipsInput, ComboboxTrigger, ComboboxValue, useComboboxAnchor, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./combobox.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./combobox.js";
|