@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,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { cn } from "cn"; // Replace with your utility path
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// Brand Colors (internal)
|
|
7
|
+
// =============================================================================
|
|
8
|
+
const XEROBI_BRAND_COLOR = "#0F172A"; // Slate 900 (fallback for standard color)
|
|
9
|
+
const XEROBI_TEXT_GRAY = "#404041";
|
|
10
|
+
// =============================================================================
|
|
11
|
+
// SVG Path Data (internal)
|
|
12
|
+
// =============================================================================
|
|
13
|
+
const XEROBI_GLYPH_PATH = "M 2.1 0 L 17.9 0 C 19.1 0 19.7 0.6 19.7 1.8 L 19.7 17.5 C 19.7 18.7 19.1 19.3 17.9 19.3 L 2.1 19.3 C 0.9 19.3 0.3 18.7 0.3 17.5 L 0.3 1.8 C 0.3 0.6 0.9 0 2.1 0 Z M 11.6 13.9 L 18.6 6.9 C 19.2 6.3 19.2 5.4 18.6 4.8 L 16.5 2.7 C 15.9 2.1 15 2.1 14.4 2.7 L 11.2 5.9 L 8.1 2.7 C 7.5 2.1 6.6 2.1 6 2.7 L 3.9 4.8 C 3.3 5.4 3.3 6.3 3.9 6.9 L 6.8 9.8 L 3.9 12.7 C 3.3 13.3 3.3 14.2 3.9 14.8 L 6 16.9 C 6.6 17.5 7.5 17.5 8.1 16.9 L 11.2 13.8 L 14.4 17 C 15 17.6 15.9 17.6 16.5 17 L 18.6 14.9 C 19.2 14.3 19.2 13.4 18.6 12.8 Z";
|
|
14
|
+
const XEROBI_WORDMARK_PATHS = [
|
|
15
|
+
// X
|
|
16
|
+
"M 0 44.8 L 20.8 0 L 36.1 0 L 15.3 44.8 Z",
|
|
17
|
+
// E
|
|
18
|
+
"M 44.8 0 L 92.4 0 L 92.4 9.6 L 60.8 9.6 L 60.8 18.4 L 88.5 18.4 L 88.5 28 L 60.8 28 L 60.8 35.2 L 92.4 35.2 L 92.4 44.8 L 44.8 44.8 Z",
|
|
19
|
+
// R
|
|
20
|
+
"M 107.2 0 L 134.4 0 C 142.1 0 148 5.6 148 14.4 C 148 21.6 144 26.4 138.4 28.8 L 150.4 44.8 L 134.4 44.8 L 125.6 31.2 L 123.2 31.2 L 123.2 44.8 L 107.2 44.8 Z M 123.2 22.4 L 132.8 22.4 C 135.7 22.4 137.6 20.8 137.6 18.4 C 137.6 16 135.7 14.4 132.8 14.4 L 123.2 14.4 Z",
|
|
21
|
+
// O
|
|
22
|
+
"M 170 21.6 C 170 8.8 181.6 0 198.4 0 C 215.2 0 226.8 8.8 226.8 21.6 C 226.8 34.4 215.2 44.8 198.4 44.8 C 181.6 44.8 170 34.4 170 21.6 Z M 210.4 22.4 C 210.4 15.2 205.6 10.4 198.4 10.4 C 191.2 10.4 186.4 15.2 186.4 22.4 C 186.4 29.6 191.2 34.4 198.4 34.4 C 205.6 34.4 210.4 29.6 210.4 22.4 Z",
|
|
23
|
+
// B
|
|
24
|
+
"M 245.6 0 L 276.8 0 C 286.4 0 293.6 5.6 293.6 14.4 C 293.6 20 290.4 24 285.6 26.4 C 291.2 28.8 294.4 33.6 294.4 39.2 C 294.4 49.6 286.4 55.2 274.4 55.2 L 245.6 55.2 Z M 274.4 22.4 C 278.4 22.4 280.8 20 280.8 16.8 C 280.8 13.6 278.4 11.2 274.4 11.2 L 261.6 11.2 L 261.6 22.4 Z M 277.6 44.8 C 281.6 44.8 284 42.4 284 38.4 C 284 34.4 281.6 32 277.6 32 L 261.6 32 L 261.6 44.8 Z",
|
|
25
|
+
// I
|
|
26
|
+
"M 312.8 0 L 328.8 0 L 328.8 44.8 L 312.8 44.8 Z",
|
|
27
|
+
];
|
|
28
|
+
const XEROBI_GLYPH_VIEWBOX = "0 0 20 20";
|
|
29
|
+
const XEROBI_FULL_LOGO_VIEWBOX = "0 0 329 56";
|
|
30
|
+
// =============================================================================
|
|
31
|
+
// Component Variants
|
|
32
|
+
// =============================================================================
|
|
33
|
+
export const XEROBI_LOGO_VARIANTS = {
|
|
34
|
+
variant: {
|
|
35
|
+
glyph: { description: "X glyph only (logomark)" },
|
|
36
|
+
full: { description: "Full logo with X glyph and wordmark stacked" },
|
|
37
|
+
},
|
|
38
|
+
color: {
|
|
39
|
+
color: { description: "Brand colors" },
|
|
40
|
+
black: { description: "Solid black logo" },
|
|
41
|
+
white: { description: "Solid white logo (for dark backgrounds)" },
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
export const XEROBI_LOGO_DEFAULT_VARIANTS = {
|
|
45
|
+
variant: "full",
|
|
46
|
+
color: "color",
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Xerobi logo component.
|
|
50
|
+
*/
|
|
51
|
+
export const XerobiLogo = /* @__PURE__ */ forwardRef(({ variant = XEROBI_LOGO_DEFAULT_VARIANTS.variant, color = XEROBI_LOGO_DEFAULT_VARIANTS.color, className, ...props }, ref) => {
|
|
52
|
+
const isGlyph = variant === "glyph";
|
|
53
|
+
// Determine fill colors
|
|
54
|
+
const fillBrand = color === "color" ? XEROBI_BRAND_COLOR : "currentColor";
|
|
55
|
+
const fillText = color === "color" ? XEROBI_TEXT_GRAY : "currentColor";
|
|
56
|
+
if (isGlyph) {
|
|
57
|
+
return (_jsx("svg", { ref: ref, viewBox: XEROBI_GLYPH_VIEWBOX, fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": "Xerobi logo", className: cn(color === "white" && "text-white", color === "black" && "text-black", className), ...props, children: _jsx("path", { d: XEROBI_GLYPH_PATH, fill: fillBrand }) }));
|
|
58
|
+
}
|
|
59
|
+
// Full logo with wordmark
|
|
60
|
+
return (_jsx("svg", { ref: ref, viewBox: XEROBI_FULL_LOGO_VIEWBOX, fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": "Xerobi logo", className: cn(color === "color" && "text-foreground dark:text-foreground", color === "white" && "text-white", color === "black" && "text-black", className), ...props, children: XEROBI_WORDMARK_PATHS.map((d, i) => (_jsx("path", { d: d, fill: fillText }, i))) }));
|
|
61
|
+
});
|
|
62
|
+
XerobiLogo.displayName = "XerobiLogo";
|
|
63
|
+
/**
|
|
64
|
+
* "Powered by Xerobi" badge component.
|
|
65
|
+
*/
|
|
66
|
+
export const PoweredByXerobi = /* @__PURE__ */ forwardRef(({ color = "color", href = "https://xerobi.com", className, ...props }, ref) => {
|
|
67
|
+
return (_jsxs("a", { ref: ref, href: href, target: "_blank", rel: "noopener noreferrer", className: cn("inline-flex items-center gap-2 rounded-lg py-2 pr-3 pl-2.5 text-sm font-medium", "ring-1 ring-inset transition-all hover:shadow-sm", color === "color" &&
|
|
68
|
+
"bg-background text-foreground ring-border", color === "black" && "bg-white text-black ring-black/20", color === "white" && "bg-black text-white ring-white/20", className), ...props, children: [_jsx(XerobiLogo, { variant: "glyph", color: color, className: "h-4 w-auto" }), _jsxs("span", { children: ["Powered by ", _jsx("span", { className: "font-semibold", children: "Xerobi" })] })] }));
|
|
69
|
+
});
|
|
70
|
+
PoweredByXerobi.displayName = "PoweredByXerobi";
|
|
71
|
+
/**
|
|
72
|
+
* Generates SVG markup string for the Xerobi logo.
|
|
73
|
+
*/
|
|
74
|
+
export function generateXerobiLogoSvg(options = {}) {
|
|
75
|
+
const { variant = "full", color = "color" } = options;
|
|
76
|
+
const isGlyph = variant === "glyph";
|
|
77
|
+
const fillBrand = color === "color" ? XEROBI_BRAND_COLOR : color;
|
|
78
|
+
const fillText = color === "color" ? XEROBI_TEXT_GRAY : color;
|
|
79
|
+
if (isGlyph) {
|
|
80
|
+
return `<svg viewBox="${XEROBI_GLYPH_VIEWBOX}" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Xerobi logo">
|
|
81
|
+
<path d="${XEROBI_GLYPH_PATH}" fill="${fillBrand}"/>
|
|
82
|
+
</svg>`;
|
|
83
|
+
}
|
|
84
|
+
const wordmarkPaths = XEROBI_WORDMARK_PATHS.map((d) => ` <path d="${d}" fill="${fillText}"/>`).join("\n");
|
|
85
|
+
return `<svg viewBox="${XEROBI_FULL_LOGO_VIEWBOX}" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Xerobi logo">
|
|
86
|
+
${wordmarkPaths}
|
|
87
|
+
</svg>`;
|
|
88
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type UseBooleanReturn = {
|
|
3
|
+
value: boolean;
|
|
4
|
+
onTrue: () => void;
|
|
5
|
+
onFalse: () => void;
|
|
6
|
+
onToggle: () => void;
|
|
7
|
+
setValue: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
|
+
};
|
|
9
|
+
export declare function useBoolean(defaultValue?: boolean): UseBooleanReturn;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export function useBoolean(defaultValue = false) {
|
|
4
|
+
const [value, setValue] = React.useState(defaultValue);
|
|
5
|
+
const onTrue = React.useCallback(() => setValue(true), []);
|
|
6
|
+
const onFalse = React.useCallback(() => setValue(false), []);
|
|
7
|
+
const onToggle = React.useCallback(() => setValue((v) => !v), []);
|
|
8
|
+
return React.useMemo(() => ({ value, onTrue, onFalse, onToggle, setValue }), [value, onTrue, onFalse, onToggle]);
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/** Bounding rect of an element, kept up to date on resize. */
|
|
4
|
+
export function useClientRect() {
|
|
5
|
+
const ref = React.useRef(null);
|
|
6
|
+
const [rect, setRect] = React.useState(null);
|
|
7
|
+
React.useLayoutEffect(() => {
|
|
8
|
+
const el = ref.current;
|
|
9
|
+
if (!el)
|
|
10
|
+
return;
|
|
11
|
+
const update = () => setRect(el.getBoundingClientRect());
|
|
12
|
+
update();
|
|
13
|
+
const ro = new ResizeObserver(update);
|
|
14
|
+
ro.observe(el);
|
|
15
|
+
return () => ro.disconnect();
|
|
16
|
+
}, []);
|
|
17
|
+
return { ref, rect };
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* State mirrored to localStorage under `key`. Storage failures (private mode, quota) are
|
|
4
|
+
* swallowed: the value then lives in memory only.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useLocalStorage<T>(key: string, initialValue: T): {
|
|
7
|
+
state: T;
|
|
8
|
+
setState: (next: React.SetStateAction<T>) => void;
|
|
9
|
+
resetState: () => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* State mirrored to localStorage under `key`. Storage failures (private mode, quota) are
|
|
5
|
+
* swallowed: the value then lives in memory only.
|
|
6
|
+
*/
|
|
7
|
+
export function useLocalStorage(key, initialValue) {
|
|
8
|
+
const [state, setState] = React.useState(() => {
|
|
9
|
+
try {
|
|
10
|
+
const raw = typeof window === "undefined" ? null : window.localStorage.getItem(key);
|
|
11
|
+
return raw === null ? initialValue : JSON.parse(raw);
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return initialValue;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const update = React.useCallback((next) => {
|
|
18
|
+
setState((prev) => {
|
|
19
|
+
const value = typeof next === "function" ? next(prev) : next;
|
|
20
|
+
try {
|
|
21
|
+
window.localStorage.setItem(key, JSON.stringify(value));
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
/* keep the in-memory value */
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
});
|
|
28
|
+
}, [key]);
|
|
29
|
+
const reset = React.useCallback(() => {
|
|
30
|
+
setState(initialValue);
|
|
31
|
+
try {
|
|
32
|
+
window.localStorage.removeItem(key);
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
/* ignore */
|
|
36
|
+
}
|
|
37
|
+
}, [key, initialValue]);
|
|
38
|
+
return { state, setState: update, resetState: reset };
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsMobile(): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
const MOBILE_BREAKPOINT = 768;
|
|
4
|
+
export function useIsMobile() {
|
|
5
|
+
const [isMobile, setIsMobile] = React.useState(undefined);
|
|
6
|
+
React.useEffect(() => {
|
|
7
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
8
|
+
const onChange = () => {
|
|
9
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
10
|
+
};
|
|
11
|
+
mql.addEventListener("change", onChange);
|
|
12
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
13
|
+
return () => mql.removeEventListener("change", onChange);
|
|
14
|
+
}, []);
|
|
15
|
+
return !!isMobile;
|
|
16
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type UsePopoverHoverOptions = {
|
|
3
|
+
/** Milliseconds to wait before closing, so the pointer can travel from trigger to popup. */
|
|
4
|
+
closeDelay?: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Hover-driven popover: spread `triggerProps` on the trigger and `popupProps` on the popup so
|
|
8
|
+
* the popover stays open while the pointer is on either of them.
|
|
9
|
+
*/
|
|
10
|
+
export declare function usePopoverHover<T extends HTMLElement = HTMLElement>({ closeDelay }?: UsePopoverHoverOptions): {
|
|
11
|
+
open: boolean;
|
|
12
|
+
anchorEl: T | null;
|
|
13
|
+
setAnchorEl: React.Dispatch<React.SetStateAction<T | null>>;
|
|
14
|
+
onOpen: (event: React.SyntheticEvent<T>) => void;
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
triggerProps: {
|
|
17
|
+
onMouseEnter: (event: React.SyntheticEvent<T>) => void;
|
|
18
|
+
onMouseLeave: () => void;
|
|
19
|
+
onFocus: (event: React.SyntheticEvent<T>) => void;
|
|
20
|
+
};
|
|
21
|
+
popupProps: {
|
|
22
|
+
onMouseEnter: () => void;
|
|
23
|
+
onMouseLeave: () => void;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Hover-driven popover: spread `triggerProps` on the trigger and `popupProps` on the popup so
|
|
5
|
+
* the popover stays open while the pointer is on either of them.
|
|
6
|
+
*/
|
|
7
|
+
export function usePopoverHover({ closeDelay = 120 } = {}) {
|
|
8
|
+
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
9
|
+
const timer = React.useRef(undefined);
|
|
10
|
+
const cancel = () => clearTimeout(timer.current);
|
|
11
|
+
const onOpen = React.useCallback((event) => {
|
|
12
|
+
clearTimeout(timer.current);
|
|
13
|
+
setAnchorEl(event.currentTarget);
|
|
14
|
+
}, []);
|
|
15
|
+
const onClose = React.useCallback(() => {
|
|
16
|
+
clearTimeout(timer.current);
|
|
17
|
+
setAnchorEl(null);
|
|
18
|
+
}, []);
|
|
19
|
+
const onCloseLater = React.useCallback(() => {
|
|
20
|
+
clearTimeout(timer.current);
|
|
21
|
+
timer.current = setTimeout(() => setAnchorEl(null), closeDelay);
|
|
22
|
+
}, [closeDelay]);
|
|
23
|
+
React.useEffect(() => () => clearTimeout(timer.current), []);
|
|
24
|
+
return {
|
|
25
|
+
open: Boolean(anchorEl),
|
|
26
|
+
anchorEl,
|
|
27
|
+
setAnchorEl,
|
|
28
|
+
onOpen,
|
|
29
|
+
onClose,
|
|
30
|
+
triggerProps: { onMouseEnter: onOpen, onMouseLeave: onCloseLater, onFocus: onOpen },
|
|
31
|
+
popupProps: { onMouseEnter: cancel, onMouseLeave: onCloseLater },
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type UsePopoverReturn<T extends HTMLElement = HTMLElement> = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
anchorEl: T | null;
|
|
5
|
+
onOpen: (event: React.SyntheticEvent<T>) => void;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
setAnchorEl: React.Dispatch<React.SetStateAction<T | null>>;
|
|
8
|
+
};
|
|
9
|
+
/** Anchor-element popover state: `onOpen` takes the click event and anchors to its target. */
|
|
10
|
+
export declare function usePopover<T extends HTMLElement = HTMLElement>(): UsePopoverReturn<T>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/** Anchor-element popover state: `onOpen` takes the click event and anchors to its target. */
|
|
4
|
+
export function usePopover() {
|
|
5
|
+
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
6
|
+
const onOpen = React.useCallback((event) => setAnchorEl(event.currentTarget), []);
|
|
7
|
+
const onClose = React.useCallback(() => setAnchorEl(null), []);
|
|
8
|
+
return React.useMemo(() => ({ open: Boolean(anchorEl), anchorEl, onOpen, onClose, setAnchorEl }), [anchorEl, onOpen, onClose]);
|
|
9
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./components/index.js";
|
|
2
|
+
export * from "./blocks/index.js";
|
|
3
|
+
export * from "./hooks/index.js";
|
|
4
|
+
export * from "./lib/brand.js";
|
|
5
|
+
export * from "./lib/create-classes.js";
|
|
6
|
+
export * from "./lib/date.js";
|
|
7
|
+
export * from "./lib/format.js";
|
|
8
|
+
export * from "./lib/link.js";
|
|
9
|
+
export * from "./lib/path.js";
|
|
10
|
+
export * from "./lib/theme-script.js";
|
|
11
|
+
export * from "./lib/utils.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./components/index.js";
|
|
2
|
+
export * from "./blocks/index.js";
|
|
3
|
+
export * from "./hooks/index.js";
|
|
4
|
+
export * from "./lib/brand.js";
|
|
5
|
+
export * from "./lib/create-classes.js";
|
|
6
|
+
export * from "./lib/date.js";
|
|
7
|
+
export * from "./lib/format.js";
|
|
8
|
+
export * from "./lib/link.js";
|
|
9
|
+
export * from "./lib/path.js";
|
|
10
|
+
export * from "./lib/theme-script.js";
|
|
11
|
+
export * from "./lib/utils.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brand colour helpers. A product re-brands by changing ONE value, the primary colour.
|
|
3
|
+
* The shades come from the shared recipe in @xerobi/tokens; CSS applies them (see styles/theme.css)
|
|
4
|
+
* and these helpers make it convenient from JS.
|
|
5
|
+
*/
|
|
6
|
+
import { contrastRatio } from "@xerobi/tokens";
|
|
7
|
+
export { contrastRatio };
|
|
8
|
+
export declare const DEFAULT_BRAND_PRIMARY: string;
|
|
9
|
+
/** Picks white or the dark text colour, whichever reads better on `hex`. */
|
|
10
|
+
export declare function getContrastText(hex: string): string;
|
|
11
|
+
/** CSS custom properties that re-brand the library. Spread into `style`, or use setBrandColor. */
|
|
12
|
+
export declare function getBrandVars(hex: string, contrast?: string): Record<string, string>;
|
|
13
|
+
/** Applies a brand colour to an element (default: <html>). Returns a function that undoes it. */
|
|
14
|
+
export declare function setBrandColor(hex: string, target?: HTMLElement, contrast?: string): () => void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brand colour helpers. A product re-brands by changing ONE value, the primary colour.
|
|
3
|
+
* The shades come from the shared recipe in @xerobi/tokens; CSS applies them (see styles/theme.css)
|
|
4
|
+
* and these helpers make it convenient from JS.
|
|
5
|
+
*/
|
|
6
|
+
import { contrastRatio, deriveBrand, tokens } from "@xerobi/tokens";
|
|
7
|
+
export { contrastRatio };
|
|
8
|
+
export const DEFAULT_BRAND_PRIMARY = tokens.brand.default;
|
|
9
|
+
/** Picks white or the dark text colour, whichever reads better on `hex`. */
|
|
10
|
+
export function getContrastText(hex) {
|
|
11
|
+
return deriveBrand(hex).contrast;
|
|
12
|
+
}
|
|
13
|
+
/** CSS custom properties that re-brand the library. Spread into `style`, or use setBrandColor. */
|
|
14
|
+
export function getBrandVars(hex, contrast) {
|
|
15
|
+
const main = hex.startsWith("#") ? hex : `#${hex}`;
|
|
16
|
+
deriveBrand(main); // throws on an invalid colour
|
|
17
|
+
return {
|
|
18
|
+
"--brand-primary": main,
|
|
19
|
+
"--brand-primary-contrast": contrast ?? getContrastText(main),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Applies a brand colour to an element (default: <html>). Returns a function that undoes it. */
|
|
23
|
+
export function setBrandColor(hex, target = document.documentElement, contrast) {
|
|
24
|
+
const vars = getBrandVars(hex, contrast);
|
|
25
|
+
for (const [k, v] of Object.entries(vars))
|
|
26
|
+
target.style.setProperty(k, v);
|
|
27
|
+
return () => {
|
|
28
|
+
for (const k of Object.keys(vars))
|
|
29
|
+
target.style.removeProperty(k);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createClasses(str: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type DateValue = Date | null;
|
|
2
|
+
export declare function isValidDate(value: DateValue | undefined): value is Date;
|
|
3
|
+
export declare function fIsAfter(start: DateValue, end: DateValue): boolean;
|
|
4
|
+
/** `01 Jan 2025` by default; pass any date-fns pattern to override. */
|
|
5
|
+
export declare function fDate(value: DateValue, pattern?: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Compact label for a range. With `initial` the full dates are always shown;
|
|
8
|
+
* otherwise shared years and months are dropped: `25 Apr - 26 May 2024`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function fDateRangeShortLabel(start: DateValue, end: DateValue, initial?: boolean): string;
|
package/dist/lib/date.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { format, isAfter, isValid, isSameDay, isSameMonth, isSameYear } from "date-fns";
|
|
2
|
+
export function isValidDate(value) {
|
|
3
|
+
return value instanceof Date && isValid(value);
|
|
4
|
+
}
|
|
5
|
+
export function fIsAfter(start, end) {
|
|
6
|
+
return isValidDate(start) && isValidDate(end) ? isAfter(start, end) : false;
|
|
7
|
+
}
|
|
8
|
+
/** `01 Jan 2025` by default; pass any date-fns pattern to override. */
|
|
9
|
+
export function fDate(value, pattern = "dd MMM yyyy") {
|
|
10
|
+
return isValidDate(value) ? format(value, pattern) : "Invalid date";
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Compact label for a range. With `initial` the full dates are always shown;
|
|
14
|
+
* otherwise shared years and months are dropped: `25 Apr - 26 May 2024`.
|
|
15
|
+
*/
|
|
16
|
+
export function fDateRangeShortLabel(start, end, initial) {
|
|
17
|
+
if (!isValidDate(start) || !isValidDate(end) || fIsAfter(start, end)) {
|
|
18
|
+
return "Invalid date";
|
|
19
|
+
}
|
|
20
|
+
if (initial)
|
|
21
|
+
return `${fDate(start)} - ${fDate(end)}`;
|
|
22
|
+
const sameYear = isSameYear(start, end);
|
|
23
|
+
const sameMonth = isSameMonth(start, end);
|
|
24
|
+
const sameDay = isSameDay(start, end);
|
|
25
|
+
if (sameYear && sameMonth && sameDay)
|
|
26
|
+
return fDate(end);
|
|
27
|
+
if (sameYear && sameMonth)
|
|
28
|
+
return `${fDate(start, "dd")} - ${fDate(end)}`;
|
|
29
|
+
if (sameYear)
|
|
30
|
+
return `${fDate(start, "dd MMM")} - ${fDate(end)}`;
|
|
31
|
+
return `${fDate(start)} - ${fDate(end)}`;
|
|
32
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Formats a byte count as `1.5 Mb`, `320 Kb`, etc. */
|
|
2
|
+
export function fData(inputValue) {
|
|
3
|
+
const number = Number(inputValue);
|
|
4
|
+
if (!Number.isFinite(number) || number === 0)
|
|
5
|
+
return "0 bytes";
|
|
6
|
+
const units = ["bytes", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"];
|
|
7
|
+
const base = 1024;
|
|
8
|
+
const index = Math.min(Math.floor(Math.log(number) / Math.log(base)), units.length - 1);
|
|
9
|
+
return `${parseFloat((number / base ** index).toFixed(2))} ${units[index]}`;
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
/** Any element that renders a router link, e.g. `<Link />` from next/link, react-router or TanStack Router. */
|
|
3
|
+
export type NavLinkRender = React.ReactElement<Record<string, unknown>>;
|
|
4
|
+
/** Renders `children` as the configured router link, or a plain anchor. */
|
|
5
|
+
export declare function renderNavLink(linkRender: NavLinkRender | undefined, props: Record<string, unknown>, children: React.ReactNode): React.ReactElement<Record<string, unknown>, string | React.JSXElementConstructor<any>>;
|
package/dist/lib/link.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { cloneElement, createElement } from "react";
|
|
2
|
+
/** Renders `children` as the configured router link, or a plain anchor. */
|
|
3
|
+
export function renderNavLink(linkRender, props, children) {
|
|
4
|
+
return linkRender ? cloneElement(linkRender, props, children) : createElement("a", props, children);
|
|
5
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Path helpers for navigation components. They take the current path as an argument, so no router is needed. */
|
|
2
|
+
export declare function isExternalLink(href: string): boolean;
|
|
3
|
+
/** True when `target` is the current path, or (with `deep`) a parent segment of it. */
|
|
4
|
+
export declare function isEqualPath(target: string, current: string, deep?: boolean): boolean;
|
|
5
|
+
export declare function isActiveLink(currentPath: string, targetPath: string, deep?: boolean): boolean;
|
|
6
|
+
export declare function hasKeys(obj: object | null | undefined): boolean;
|
package/dist/lib/path.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Path helpers for navigation components. They take the current path as an argument, so no router is needed. */
|
|
2
|
+
const trim = (path) => (path.length > 1 ? path.replace(/\/+$/, "") : path);
|
|
3
|
+
const strip = (path) => trim(path.split(/[?#]/)[0] ?? path);
|
|
4
|
+
export function isExternalLink(href) {
|
|
5
|
+
return /^(?:[a-z][a-z\d+.-]*:)?\/\//i.test(href) || /^(mailto|tel):/i.test(href);
|
|
6
|
+
}
|
|
7
|
+
/** True when `target` is the current path, or (with `deep`) a parent segment of it. */
|
|
8
|
+
export function isEqualPath(target, current, deep = true) {
|
|
9
|
+
const t = strip(target);
|
|
10
|
+
const c = strip(current);
|
|
11
|
+
if (t === c)
|
|
12
|
+
return true;
|
|
13
|
+
if (!deep || t === "/")
|
|
14
|
+
return false;
|
|
15
|
+
return c.startsWith(`${t}/`);
|
|
16
|
+
}
|
|
17
|
+
export function isActiveLink(currentPath, targetPath, deep = true) {
|
|
18
|
+
if (isExternalLink(targetPath))
|
|
19
|
+
return false;
|
|
20
|
+
return isEqualPath(targetPath, currentPath, deep);
|
|
21
|
+
}
|
|
22
|
+
export function hasKeys(obj) {
|
|
23
|
+
return !!obj && Object.keys(obj).length > 0;
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline this in <head> before your app renders so the first paint already has the right
|
|
3
|
+
* mode and brand colour (no flash). It reads the same storage key as <ThemeProvider>.
|
|
4
|
+
*
|
|
5
|
+
* <script dangerouslySetInnerHTML={{ __html: getThemeInitScript() }} />
|
|
6
|
+
*/
|
|
7
|
+
export type ThemeInitOptions = {
|
|
8
|
+
storageKey?: string;
|
|
9
|
+
defaultMode?: "light" | "dark" | "system";
|
|
10
|
+
};
|
|
11
|
+
export declare function getThemeInitScript({ storageKey, defaultMode, }?: ThemeInitOptions): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function getThemeInitScript({ storageKey = "xerobi-ui-theme", defaultMode = "system", } = {}) {
|
|
2
|
+
return `(function(){try{var d=document.documentElement,s={};try{s=JSON.parse(localStorage.getItem(${JSON.stringify(storageKey)})||"{}")}catch(e){}
|
|
3
|
+
var m=s.mode||${JSON.stringify(defaultMode)};
|
|
4
|
+
var dark=m==="dark"||(m==="system"&&window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
5
|
+
d.classList.toggle("dark",dark);d.style.colorScheme=dark?"dark":"light";
|
|
6
|
+
if(s.brand){d.style.setProperty("--brand-primary",s.brand);if(s.brandContrast)d.style.setProperty("--brand-primary-contrast",s.brandContrast)}
|
|
7
|
+
if(s.direction)d.setAttribute("dir",s.direction);}catch(e){}})();`;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { cn } from "cn";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { cn } from "cn";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.apexcharts-canvas .apexcharts-tooltip {
|
|
2
|
+
min-width: 80px;
|
|
3
|
+
border-radius: 10px;
|
|
4
|
+
backdrop-filter: blur(6px);
|
|
5
|
+
color: var(--text-primary);
|
|
6
|
+
box-shadow: var(--elev-dropdown);
|
|
7
|
+
background-color: color-mix(in srgb, var(--bg-default) 90%, transparent);
|
|
8
|
+
border-color: var(--divider);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.apexcharts-canvas .apexcharts-xaxistooltip {
|
|
12
|
+
border-radius: 10px;
|
|
13
|
+
border-color: transparent;
|
|
14
|
+
backdrop-filter: blur(6px);
|
|
15
|
+
color: var(--text-primary);
|
|
16
|
+
box-shadow: var(--elev-dropdown);
|
|
17
|
+
background-color: color-mix(in srgb, var(--bg-default) 90%, transparent);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.apexcharts-canvas .apexcharts-xaxistooltip::before {
|
|
21
|
+
border-bottom-color: var(--action-selected);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.apexcharts-canvas .apexcharts-xaxistooltip::after {
|
|
25
|
+
border-bottom-color: color-mix(in srgb, var(--bg-default) 90%, transparent);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.apexcharts-canvas .apexcharts-tooltip-title {
|
|
29
|
+
font-weight: 700;
|
|
30
|
+
text-align: center;
|
|
31
|
+
color: var(--text-secondary);
|
|
32
|
+
background-color: var(--bg-neutral);
|
|
33
|
+
border-bottom-color: var(--divider);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.apexcharts-canvas .apexcharts-tooltip-series-group {
|
|
37
|
+
padding: 4px 12px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.apexcharts-canvas .apexcharts-tooltip-marker {
|
|
41
|
+
margin-right: 8px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.apexcharts-canvas .apexcharts-legend {
|
|
45
|
+
padding: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.apexcharts-canvas .apexcharts-legend-marker {
|
|
49
|
+
margin-right: 6px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.apexcharts-canvas .apexcharts-legend-text {
|
|
53
|
+
margin-left: 0;
|
|
54
|
+
padding-left: 0;
|
|
55
|
+
line-height: 18px;
|
|
56
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* Styles for custom components that need real CSS (maps, lightbox, editor code blocks...). */
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
/* Translucent blurred paper with the cyan/red corner glows (old paperStyles mixin). */
|
|
5
|
+
.xui-paper {
|
|
6
|
+
background-color: color-mix(in oklab, var(--bg-paper) 90%, transparent);
|
|
7
|
+
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyMCAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiBmaWxsPSJ1cmwoI3BhaW50MF9yYWRpYWxfNDQ2NF81NTMzOCkiIGZpbGwtb3BhY2l0eT0iMC4xIi8+CjxkZWZzPgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50MF9yYWRpYWxfNDQ2NF81NTMzOCIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSgxMjAgMS44MTgxMmUtMDUpIHJvdGF0ZSgtNDUpIHNjYWxlKDEyMy4yNSkiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMDBCOEQ5Ii8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAwQjhEOSIgc3RvcC1vcGFjaXR5PSIwIi8+CjwvcmFkaWFsR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg=="), url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyMCAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiBmaWxsPSJ1cmwoI3BhaW50MF9yYWRpYWxfNDQ2NF81NTMzNykiIGZpbGwtb3BhY2l0eT0iMC4xIi8+CjxkZWZzPgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50MF9yYWRpYWxfNDQ2NF81NTMzNyIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSgwIDEyMCkgcm90YXRlKDEzNSkgc2NhbGUoMTIzLjI1KSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRjU2MzAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY1NjMwIiBzdG9wLW9wYWNpdHk9IjAiLz4KPC9yYWRpYWxHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4K");
|
|
8
|
+
background-size: 50%, 50%;
|
|
9
|
+
background-repeat: no-repeat, no-repeat;
|
|
10
|
+
background-position: top right, left bottom;
|
|
11
|
+
backdrop-filter: blur(20px);
|
|
12
|
+
-webkit-backdrop-filter: blur(20px);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[dir="rtl"] .xui-paper {
|
|
16
|
+
background-position: top left, right bottom;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Dropdown variant: same paper plus padding, shadow and radius. */
|
|
20
|
+
.xui-paper-dropdown {
|
|
21
|
+
padding: 4px;
|
|
22
|
+
border-radius: 10px;
|
|
23
|
+
box-shadow: var(--elev-dropdown);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes xui-indeterminate {
|
|
28
|
+
0% { transform: translateX(-100%); }
|
|
29
|
+
100% { transform: translateX(350%); }
|
|
30
|
+
}
|