@kumix/ui 0.2.4 → 0.3.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/README.md +45 -10
- package/dist/components/custom/confirm-dialog.d.ts +16 -0
- package/dist/components/custom/confirm-dialog.d.ts.map +1 -0
- package/dist/components/custom/confirm-dialog.js +93 -0
- package/dist/components/custom/confirm-dialog.js.map +1 -0
- package/dist/components/custom/toast.d.ts +20 -0
- package/dist/components/custom/toast.d.ts.map +1 -0
- package/dist/components/custom/toast.js +73 -0
- package/dist/components/custom/toast.js.map +1 -0
- package/dist/components/motion/action-swap-blur.d.ts +11 -0
- package/dist/components/motion/action-swap-blur.d.ts.map +1 -0
- package/dist/components/motion/action-swap-blur.js +26 -0
- package/dist/components/motion/action-swap-blur.js.map +1 -0
- package/dist/components/motion/action-swap-cascade.d.ts +11 -0
- package/dist/components/motion/action-swap-cascade.d.ts.map +1 -0
- package/dist/components/motion/action-swap-cascade.js +26 -0
- package/dist/components/motion/action-swap-cascade.js.map +1 -0
- package/dist/components/motion/action-swap-roll.d.ts +11 -0
- package/dist/components/motion/action-swap-roll.d.ts.map +1 -0
- package/dist/components/motion/action-swap-roll.js +26 -0
- package/dist/components/motion/action-swap-roll.js.map +1 -0
- package/dist/components/motion/action-swap.d.ts +41 -0
- package/dist/components/motion/action-swap.d.ts.map +1 -0
- package/dist/components/motion/action-swap.js +261 -0
- package/dist/components/motion/action-swap.js.map +1 -0
- package/dist/components/motion/animated-badge.d.ts +18 -0
- package/dist/components/motion/animated-badge.d.ts.map +1 -0
- package/dist/components/motion/animated-badge.js +206 -0
- package/dist/components/motion/animated-badge.js.map +1 -0
- package/dist/components/motion/animated-number.d.ts +12 -0
- package/dist/components/motion/animated-number.d.ts.map +1 -0
- package/dist/components/motion/animated-number.js +47 -0
- package/dist/components/motion/animated-number.js.map +1 -0
- package/dist/components/motion/animated-sidebar.d.ts +97 -0
- package/dist/components/motion/animated-sidebar.d.ts.map +1 -0
- package/dist/components/motion/animated-sidebar.js +611 -0
- package/dist/components/motion/animated-sidebar.js.map +1 -0
- package/dist/components/motion/animated-toast-stack.d.ts +65 -0
- package/dist/components/motion/animated-toast-stack.d.ts.map +1 -0
- package/dist/components/motion/animated-toast-stack.js +303 -0
- package/dist/components/motion/animated-toast-stack.js.map +1 -0
- package/dist/components/motion/attachment-upload.d.ts +47 -0
- package/dist/components/motion/attachment-upload.d.ts.map +1 -0
- package/dist/components/motion/attachment-upload.js +737 -0
- package/dist/components/motion/attachment-upload.js.map +1 -0
- package/dist/components/motion/availability-scheduler/copy-menu.d.ts +10 -0
- package/dist/components/motion/availability-scheduler/copy-menu.d.ts.map +1 -0
- package/dist/components/motion/availability-scheduler/copy-menu.js +3 -0
- package/dist/components/motion/availability-scheduler/day-row.d.ts +15 -0
- package/dist/components/motion/availability-scheduler/day-row.d.ts.map +1 -0
- package/dist/components/motion/availability-scheduler/day-row.js +181 -0
- package/dist/components/motion/availability-scheduler/day-row.js.map +1 -0
- package/dist/components/motion/availability-scheduler/icon-button.d.ts +15 -0
- package/dist/components/motion/availability-scheduler/icon-button.d.ts.map +1 -0
- package/dist/components/motion/availability-scheduler/icon-button.js +24 -0
- package/dist/components/motion/availability-scheduler/icon-button.js.map +1 -0
- package/dist/components/motion/availability-scheduler/index.d.ts +14 -0
- package/dist/components/motion/availability-scheduler/index.d.ts.map +1 -0
- package/dist/components/motion/availability-scheduler/index.js +59 -0
- package/dist/components/motion/availability-scheduler/index.js.map +1 -0
- package/dist/components/motion/availability-scheduler/time-select.d.ts +10 -0
- package/dist/components/motion/availability-scheduler/time-select.d.ts.map +1 -0
- package/dist/components/motion/availability-scheduler/time-select.js +26 -0
- package/dist/components/motion/availability-scheduler/time-select.js.map +1 -0
- package/dist/components/motion/bloom-menu.d.ts +17 -0
- package/dist/components/motion/bloom-menu.d.ts.map +1 -0
- package/dist/components/motion/bloom-menu.js +170 -0
- package/dist/components/motion/bloom-menu.js.map +1 -0
- package/dist/components/motion/bottom-sheet.d.ts +19 -0
- package/dist/components/motion/bottom-sheet.d.ts.map +1 -0
- package/dist/components/motion/bottom-sheet.js +146 -0
- package/dist/components/motion/bottom-sheet.js.map +1 -0
- package/dist/components/motion/bounce-sidebar.d.ts +26 -0
- package/dist/components/motion/bounce-sidebar.d.ts.map +1 -0
- package/dist/components/motion/bounce-sidebar.js +164 -0
- package/dist/components/motion/bounce-sidebar.js.map +1 -0
- package/dist/components/motion/bouncy-accordion.d.ts +32 -0
- package/dist/components/motion/bouncy-accordion.d.ts.map +1 -0
- package/dist/components/motion/bouncy-accordion.js +172 -0
- package/dist/components/motion/bouncy-accordion.js.map +1 -0
- package/dist/components/motion/button/base.d.ts +17 -0
- package/dist/components/motion/button/base.d.ts.map +1 -0
- package/dist/components/motion/button/base.js +86 -0
- package/dist/components/motion/button/base.js.map +1 -0
- package/dist/components/motion/button/index.d.ts +4 -0
- package/dist/components/motion/button/index.js +5 -0
- package/dist/components/motion/button/magnetic.d.ts +12 -0
- package/dist/components/motion/button/magnetic.d.ts.map +1 -0
- package/dist/components/motion/button/magnetic.js +21 -0
- package/dist/components/motion/button/magnetic.js.map +1 -0
- package/dist/components/motion/button/stateful.d.ts +16 -0
- package/dist/components/motion/button/stateful.d.ts.map +1 -0
- package/dist/components/motion/button/stateful.js +190 -0
- package/dist/components/motion/button/stateful.js.map +1 -0
- package/dist/components/motion/center-morph-modal.d.ts +43 -0
- package/dist/components/motion/center-morph-modal.d.ts.map +1 -0
- package/dist/components/motion/center-morph-modal.js +238 -0
- package/dist/components/motion/center-morph-modal.js.map +1 -0
- package/dist/components/motion/checkbox.d.ts +15 -0
- package/dist/components/motion/checkbox.d.ts.map +1 -0
- package/dist/components/motion/checkbox.js +81 -0
- package/dist/components/motion/checkbox.js.map +1 -0
- package/dist/components/motion/chromatic-text-reveal.d.ts +31 -0
- package/dist/components/motion/chromatic-text-reveal.d.ts.map +1 -0
- package/dist/components/motion/chromatic-text-reveal.js +132 -0
- package/dist/components/motion/chromatic-text-reveal.js.map +1 -0
- package/dist/components/motion/command-palette.d.ts +26 -0
- package/dist/components/motion/command-palette.d.ts.map +1 -0
- package/dist/components/motion/command-palette.js +246 -0
- package/dist/components/motion/command-palette.js.map +1 -0
- package/dist/components/motion/context-menu.d.ts +71 -0
- package/dist/components/motion/context-menu.d.ts.map +1 -0
- package/dist/components/motion/context-menu.js +454 -0
- package/dist/components/motion/context-menu.js.map +1 -0
- package/dist/components/motion/cylinder-carousel.d.ts +40 -0
- package/dist/components/motion/cylinder-carousel.d.ts.map +1 -0
- package/dist/components/motion/cylinder-carousel.js +274 -0
- package/dist/components/motion/cylinder-carousel.js.map +1 -0
- package/dist/components/motion/dock.d.ts +24 -0
- package/dist/components/motion/dock.d.ts.map +1 -0
- package/dist/components/motion/dock.js +62 -0
- package/dist/components/motion/dock.js.map +1 -0
- package/dist/components/motion/drawer.d.ts +19 -0
- package/dist/components/motion/drawer.d.ts.map +1 -0
- package/dist/components/motion/drawer.js +58 -0
- package/dist/components/motion/drawer.js.map +1 -0
- package/dist/components/motion/dynamic-island.d.ts +22 -0
- package/dist/components/motion/dynamic-island.d.ts.map +1 -0
- package/dist/components/motion/dynamic-island.js +143 -0
- package/dist/components/motion/dynamic-island.js.map +1 -0
- package/dist/components/motion/expandable-action-bar.d.ts +52 -0
- package/dist/components/motion/expandable-action-bar.d.ts.map +1 -0
- package/dist/components/motion/expandable-action-bar.js +191 -0
- package/dist/components/motion/expandable-action-bar.js.map +1 -0
- package/dist/components/motion/expandable-tabs.d.ts +33 -0
- package/dist/components/motion/expandable-tabs.d.ts.map +1 -0
- package/dist/components/motion/expandable-tabs.js +291 -0
- package/dist/components/motion/expandable-tabs.js.map +1 -0
- package/dist/components/motion/feedback-widget.d.ts +18 -0
- package/dist/components/motion/feedback-widget.d.ts.map +1 -0
- package/dist/components/motion/feedback-widget.js +413 -0
- package/dist/components/motion/feedback-widget.js.map +1 -0
- package/dist/components/motion/file-upload.d.ts +48 -0
- package/dist/components/motion/file-upload.d.ts.map +1 -0
- package/dist/components/motion/file-upload.js +382 -0
- package/dist/components/motion/file-upload.js.map +1 -0
- package/dist/components/motion/hold-action-button.d.ts +17 -0
- package/dist/components/motion/hold-action-button.d.ts.map +1 -0
- package/dist/components/motion/hold-action-button.js +158 -0
- package/dist/components/motion/hold-action-button.js.map +1 -0
- package/dist/components/motion/infinite-masonry.d.ts +31 -0
- package/dist/components/motion/infinite-masonry.d.ts.map +1 -0
- package/dist/components/motion/infinite-masonry.js +223 -0
- package/dist/components/motion/infinite-masonry.js.map +1 -0
- package/dist/components/motion/input.d.ts +29 -0
- package/dist/components/motion/input.d.ts.map +1 -0
- package/dist/components/motion/input.js +126 -0
- package/dist/components/motion/input.js.map +1 -0
- package/dist/components/motion/loader.d.ts +17 -0
- package/dist/components/motion/loader.d.ts.map +1 -0
- package/dist/components/motion/loader.js +791 -0
- package/dist/components/motion/loader.js.map +1 -0
- package/dist/components/motion/magnetic.d.ts +11 -0
- package/dist/components/motion/magnetic.d.ts.map +1 -0
- package/dist/components/motion/magnetic.js +44 -0
- package/dist/components/motion/magnetic.js.map +1 -0
- package/dist/components/motion/marquee.d.ts +15 -0
- package/dist/components/motion/marquee.d.ts.map +1 -0
- package/dist/components/motion/marquee.js +35 -0
- package/dist/components/motion/marquee.js.map +1 -0
- package/dist/components/motion/morphing-modal.d.ts +15 -0
- package/dist/components/motion/morphing-modal.d.ts.map +1 -0
- package/dist/components/motion/morphing-modal.js +117 -0
- package/dist/components/motion/morphing-modal.js.map +1 -0
- package/dist/components/motion/not-found/glitch.d.ts +6 -0
- package/dist/components/motion/not-found/glitch.d.ts.map +1 -0
- package/dist/components/motion/not-found/glitch.js +90 -0
- package/dist/components/motion/not-found/glitch.js.map +1 -0
- package/dist/components/motion/not-found/magnetic.d.ts +6 -0
- package/dist/components/motion/not-found/magnetic.d.ts.map +1 -0
- package/dist/components/motion/not-found/magnetic.js +47 -0
- package/dist/components/motion/not-found/magnetic.js.map +1 -0
- package/dist/components/motion/not-found/shared.d.ts +32 -0
- package/dist/components/motion/not-found/shared.d.ts.map +1 -0
- package/dist/components/motion/not-found/shared.js +52 -0
- package/dist/components/motion/not-found/shared.js.map +1 -0
- package/dist/components/motion/not-found/spotlight.d.ts +6 -0
- package/dist/components/motion/not-found/spotlight.d.ts.map +1 -0
- package/dist/components/motion/not-found/spotlight.js +70 -0
- package/dist/components/motion/not-found/spotlight.js.map +1 -0
- package/dist/components/motion/not-found/stacked.d.ts +6 -0
- package/dist/components/motion/not-found/stacked.d.ts.map +1 -0
- package/dist/components/motion/not-found/stacked.js +95 -0
- package/dist/components/motion/not-found/stacked.js.map +1 -0
- package/dist/components/motion/not-found/terminal.d.ts +6 -0
- package/dist/components/motion/not-found/terminal.d.ts.map +1 -0
- package/dist/components/motion/not-found/terminal.js +90 -0
- package/dist/components/motion/not-found/terminal.js.map +1 -0
- package/dist/components/motion/notification-stack.d.ts +35 -0
- package/dist/components/motion/notification-stack.d.ts.map +1 -0
- package/dist/components/motion/notification-stack.js +187 -0
- package/dist/components/motion/notification-stack.js.map +1 -0
- package/dist/components/motion/number-ticker.d.ts +26 -0
- package/dist/components/motion/number-ticker.d.ts.map +1 -0
- package/dist/components/motion/number-ticker.js +129 -0
- package/dist/components/motion/number-ticker.js.map +1 -0
- package/dist/components/motion/otp-input.d.ts +32 -0
- package/dist/components/motion/otp-input.d.ts.map +1 -0
- package/dist/components/motion/otp-input.js +272 -0
- package/dist/components/motion/otp-input.js.map +1 -0
- package/dist/components/motion/overflow-actions.d.ts +39 -0
- package/dist/components/motion/overflow-actions.d.ts.map +1 -0
- package/dist/components/motion/overflow-actions.js +220 -0
- package/dist/components/motion/overflow-actions.js.map +1 -0
- package/dist/components/motion/parallax.d.ts +21 -0
- package/dist/components/motion/parallax.d.ts.map +1 -0
- package/dist/components/motion/parallax.js +35 -0
- package/dist/components/motion/parallax.js.map +1 -0
- package/dist/components/motion/popover-morph.d.ts +38 -0
- package/dist/components/motion/popover-morph.d.ts.map +1 -0
- package/dist/components/motion/popover-morph.js +167 -0
- package/dist/components/motion/popover-morph.js.map +1 -0
- package/dist/components/motion/popover.d.ts +40 -0
- package/dist/components/motion/popover.d.ts.map +1 -0
- package/dist/components/motion/popover.js +393 -0
- package/dist/components/motion/popover.js.map +1 -0
- package/dist/components/motion/preview-rail.d.ts +26 -0
- package/dist/components/motion/preview-rail.d.ts.map +1 -0
- package/dist/components/motion/preview-rail.js +134 -0
- package/dist/components/motion/preview-rail.js.map +1 -0
- package/dist/components/motion/pull-to-refresh.d.ts +28 -0
- package/dist/components/motion/pull-to-refresh.d.ts.map +1 -0
- package/dist/components/motion/pull-to-refresh.js +389 -0
- package/dist/components/motion/pull-to-refresh.js.map +1 -0
- package/dist/components/motion/radio.d.ts +22 -0
- package/dist/components/motion/radio.d.ts.map +1 -0
- package/dist/components/motion/radio.js +79 -0
- package/dist/components/motion/radio.js.map +1 -0
- package/dist/components/motion/range-slider-bubble.d.ts +16 -0
- package/dist/components/motion/range-slider-bubble.d.ts.map +1 -0
- package/dist/components/motion/range-slider-bubble.js +117 -0
- package/dist/components/motion/range-slider-bubble.js.map +1 -0
- package/dist/components/motion/range-slider-fluid.d.ts +18 -0
- package/dist/components/motion/range-slider-fluid.d.ts.map +1 -0
- package/dist/components/motion/range-slider-fluid.js +63 -0
- package/dist/components/motion/range-slider-fluid.js.map +1 -0
- package/dist/components/motion/range-slider-ruler.d.ts +19 -0
- package/dist/components/motion/range-slider-ruler.d.ts.map +1 -0
- package/dist/components/motion/range-slider-ruler.js +142 -0
- package/dist/components/motion/range-slider-ruler.js.map +1 -0
- package/dist/components/motion/range-slider-wave.d.ts +16 -0
- package/dist/components/motion/range-slider-wave.d.ts.map +1 -0
- package/dist/components/motion/range-slider-wave.js +57 -0
- package/dist/components/motion/range-slider-wave.js.map +1 -0
- package/dist/components/motion/range-slider.d.ts +11 -0
- package/dist/components/motion/range-slider.d.ts.map +1 -0
- package/dist/components/motion/range-slider.js +63 -0
- package/dist/components/motion/range-slider.js.map +1 -0
- package/dist/components/motion/scroll-progress.d.ts +29 -0
- package/dist/components/motion/scroll-progress.d.ts.map +1 -0
- package/dist/components/motion/scroll-progress.js +71 -0
- package/dist/components/motion/scroll-progress.js.map +1 -0
- package/dist/components/motion/scroll-reveal.d.ts +23 -0
- package/dist/components/motion/scroll-reveal.d.ts.map +1 -0
- package/dist/components/motion/scroll-reveal.js +42 -0
- package/dist/components/motion/scroll-reveal.js.map +1 -0
- package/dist/components/motion/scroll-to.d.ts +21 -0
- package/dist/components/motion/scroll-to.d.ts.map +1 -0
- package/dist/components/motion/scroll-to.js +27 -0
- package/dist/components/motion/scroll-to.js.map +1 -0
- package/dist/components/motion/select-morph.d.ts +41 -0
- package/dist/components/motion/select-morph.d.ts.map +1 -0
- package/dist/components/motion/select-morph.js +251 -0
- package/dist/components/motion/select-morph.js.map +1 -0
- package/dist/components/motion/select.d.ts +36 -0
- package/dist/components/motion/select.d.ts.map +1 -0
- package/dist/components/motion/select.js +319 -0
- package/dist/components/motion/select.js.map +1 -0
- package/dist/components/motion/shader-background.d.ts +38 -0
- package/dist/components/motion/shader-background.d.ts.map +1 -0
- package/dist/components/motion/shader-background.js +49 -0
- package/dist/components/motion/shader-background.js.map +1 -0
- package/dist/components/motion/shared-layout-bg.d.ts +17 -0
- package/dist/components/motion/shared-layout-bg.d.ts.map +1 -0
- package/dist/components/motion/shared-layout-bg.js +88 -0
- package/dist/components/motion/shared-layout-bg.js.map +1 -0
- package/dist/components/motion/slide-action-button.d.ts +15 -0
- package/dist/components/motion/slide-action-button.d.ts.map +1 -0
- package/dist/components/motion/slide-action-button.js +146 -0
- package/dist/components/motion/slide-action-button.js.map +1 -0
- package/dist/components/motion/smooth-scroll.d.ts +47 -0
- package/dist/components/motion/smooth-scroll.d.ts.map +1 -0
- package/dist/components/motion/smooth-scroll.js +182 -0
- package/dist/components/motion/smooth-scroll.js.map +1 -0
- package/dist/components/motion/swipeable-list.d.ts +60 -0
- package/dist/components/motion/swipeable-list.d.ts.map +1 -0
- package/dist/components/motion/swipeable-list.js +254 -0
- package/dist/components/motion/swipeable-list.js.map +1 -0
- package/dist/components/motion/switch.d.ts +13 -0
- package/dist/components/motion/switch.d.ts.map +1 -0
- package/dist/components/motion/switch.js +76 -0
- package/dist/components/motion/switch.js.map +1 -0
- package/dist/components/motion/table/editable-cell.d.ts +9 -0
- package/dist/components/motion/table/editable-cell.d.ts.map +1 -0
- package/dist/components/motion/table/editable-cell.js +17 -0
- package/dist/components/motion/table/editable-cell.js.map +1 -0
- package/dist/components/motion/table/index.d.ts +6 -0
- package/dist/components/motion/table/index.d.ts.map +1 -0
- package/dist/components/motion/table/index.js +420 -0
- package/dist/components/motion/table/index.js.map +1 -0
- package/dist/components/motion/table/row-handle.d.ts +15 -0
- package/dist/components/motion/table/row-handle.d.ts.map +1 -0
- package/dist/components/motion/table/row-handle.js +51 -0
- package/dist/components/motion/table/row-handle.js.map +1 -0
- package/dist/components/motion/table/skeleton-rows.d.ts +11 -0
- package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -0
- package/dist/components/motion/table/skeleton-rows.js +23 -0
- package/dist/components/motion/table/skeleton-rows.js.map +1 -0
- package/dist/components/motion/table/table-header.d.ts +35 -0
- package/dist/components/motion/table/table-header.d.ts.map +1 -0
- package/dist/components/motion/table/table-header.js +167 -0
- package/dist/components/motion/table/table-header.js.map +1 -0
- package/dist/components/motion/table/table-menu.d.ts +17 -0
- package/dist/components/motion/table/table-menu.d.ts.map +1 -0
- package/dist/components/motion/table/table-menu.js +92 -0
- package/dist/components/motion/table/table-menu.js.map +1 -0
- package/dist/components/motion/tabs.d.ts +29 -0
- package/dist/components/motion/tabs.d.ts.map +1 -0
- package/dist/components/motion/tabs.js +125 -0
- package/dist/components/motion/tabs.js.map +1 -0
- package/dist/components/motion/text-cascade.d.ts +15 -0
- package/dist/components/motion/text-cascade.d.ts.map +1 -0
- package/dist/components/motion/text-cascade.js +21 -0
- package/dist/components/motion/text-cascade.js.map +1 -0
- package/dist/components/motion/text-reveal.d.ts +25 -0
- package/dist/components/motion/text-reveal.d.ts.map +1 -0
- package/dist/components/motion/text-reveal.js +94 -0
- package/dist/components/motion/text-reveal.js.map +1 -0
- package/dist/components/motion/text-shimmer.d.ts +12 -0
- package/dist/components/motion/text-shimmer.d.ts.map +1 -0
- package/dist/components/motion/text-shimmer.js +15 -0
- package/dist/components/motion/text-shimmer.js.map +1 -0
- package/dist/components/motion/theme-toggle.d.ts +23 -0
- package/dist/components/motion/theme-toggle.d.ts.map +1 -0
- package/dist/components/motion/theme-toggle.js +160 -0
- package/dist/components/motion/theme-toggle.js.map +1 -0
- package/dist/components/motion/tilt-card.d.ts +12 -0
- package/dist/components/motion/tilt-card.d.ts.map +1 -0
- package/dist/components/motion/tilt-card.js +56 -0
- package/dist/components/motion/tilt-card.js.map +1 -0
- package/dist/components/motion/tooltip.d.ts +17 -0
- package/dist/components/motion/tooltip.d.ts.map +1 -0
- package/dist/components/motion/tooltip.js +194 -0
- package/dist/components/motion/tooltip.js.map +1 -0
- package/dist/components/motion/wheel-picker.d.ts +24 -0
- package/dist/components/motion/wheel-picker.d.ts.map +1 -0
- package/dist/components/motion/wheel-picker.js +442 -0
- package/dist/components/motion/wheel-picker.js.map +1 -0
- package/dist/components/reui/alert.d.ts +1 -1
- package/dist/components/reui/autocomplete.js +1 -1
- package/dist/components/reui/badge.d.ts +2 -2
- package/dist/components/reui/badge.js +10 -9
- package/dist/components/reui/badge.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js +2 -2
- package/dist/components/reui/data-grid/data-grid-column-header.js +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.js +22 -20
- package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js +5 -3
- package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
- package/dist/components/reui/date-selector.js +2 -2
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +3 -2
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-content.js +8 -7
- package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-dnd.js +7 -4
- package/dist/components/reui/event-calendar/event-calendar-dnd.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js +50 -48
- package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-lib.js +3 -2
- package/dist/components/reui/event-calendar/event-calendar-lib.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-month-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +38 -32
- package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js +2 -1
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.js +2 -1
- package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
- package/dist/components/reui/filters.js +6 -4
- package/dist/components/reui/filters.js.map +1 -1
- package/dist/components/reui/frame.d.ts +1 -1
- package/dist/components/reui/gantt/gantt-bar.js +53 -52
- package/dist/components/reui/gantt/gantt-bar.js.map +1 -1
- package/dist/components/reui/gantt/gantt-lib.js +3 -2
- package/dist/components/reui/gantt/gantt-lib.js.map +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +35 -31
- package/dist/components/reui/gantt/gantt-nav.js.map +1 -1
- package/dist/components/reui/gantt/gantt-recurrence.js +2 -2
- package/dist/components/reui/gantt/gantt-recurrence.js.map +1 -1
- package/dist/components/reui/gantt/gantt-view.js +177 -173
- package/dist/components/reui/gantt/gantt-view.js.map +1 -1
- package/dist/components/reui/icon-tile.d.ts +1 -1
- package/dist/components/reui/icon-tile.js +12 -11
- package/dist/components/reui/icon-tile.js.map +1 -1
- package/dist/components/reui/kanban.js +42 -37
- package/dist/components/reui/kanban.js.map +1 -1
- package/dist/components/reui/number-field.js +1 -1
- package/dist/components/reui/phone-input.js +2 -2
- package/dist/components/reui/rating.js +1 -1
- package/dist/components/reui/sortable.js +10 -9
- package/dist/components/reui/sortable.js.map +1 -1
- package/dist/components/reui/stepper.js +16 -16
- package/dist/components/reui/stepper.js.map +1 -1
- package/dist/components/reui/timeline.js +45 -38
- package/dist/components/reui/timeline.js.map +1 -1
- package/dist/components/reui/tree.js +3 -2
- package/dist/components/reui/tree.js.map +1 -1
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/alert-dialog.js +1 -1
- package/dist/components/ui/attachment.d.ts +2 -2
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/bubble.d.ts +1 -1
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button.d.ts +3 -3
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/calendar.js +1 -1
- package/dist/components/ui/carousel.js +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/combobox.js +1 -1
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/context-menu.js +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/empty.d.ts +1 -1
- package/dist/components/ui/field.d.ts +1 -1
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/components/ui/marker.d.ts +1 -1
- package/dist/components/ui/menubar.js +1 -1
- package/dist/components/ui/message-scroller.js +1 -1
- package/dist/components/ui/native-select.js +1 -1
- package/dist/components/ui/navigation-menu.js +1 -1
- package/dist/components/ui/pagination.js +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/sidebar.js +2 -2
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/spinner.js +1 -1
- package/dist/components/ui/toast.js +1 -1
- package/dist/copy-menu-BJ-MXnkN.js +201 -0
- package/dist/copy-menu-BJ-MXnkN.js.map +1 -0
- package/dist/hooks/use-hover-capable.d.ts +10 -0
- package/dist/hooks/use-hover-capable.d.ts.map +1 -0
- package/dist/hooks/use-hover-capable.js +24 -0
- package/dist/hooks/use-hover-capable.js.map +1 -0
- package/dist/hooks/use-mobile.js +1 -1
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/hooks/use-slider.d.ts +58 -0
- package/dist/hooks/use-slider.d.ts.map +1 -0
- package/dist/hooks/use-slider.js +133 -0
- package/dist/hooks/use-slider.js.map +1 -0
- package/dist/lib/ease.d.ts +50 -0
- package/dist/lib/ease.d.ts.map +1 -0
- package/dist/lib/ease.js +66 -0
- package/dist/lib/ease.js.map +1 -0
- package/dist/lib/tick-sound.d.ts +17 -0
- package/dist/lib/tick-sound.d.ts.map +1 -0
- package/dist/lib/tick-sound.js +120 -0
- package/dist/lib/tick-sound.js.map +1 -0
- package/dist/popover-position-BUqYCq8X.js +54 -0
- package/dist/popover-position-BUqYCq8X.js.map +1 -0
- package/dist/types-Bah5NY44.d.ts +81 -0
- package/dist/types-Bah5NY44.d.ts.map +1 -0
- package/dist/types-smkWN_7x.d.ts +20 -0
- package/dist/types-smkWN_7x.d.ts.map +1 -0
- package/dist/utils-DQ7OpbYQ.js +25 -0
- package/dist/utils-DQ7OpbYQ.js.map +1 -0
- package/package.json +17 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.js","names":[],"sources":["../../../src/components/reui/stepper.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Children,\n createContext,\n type HTMLAttributes,\n isValidElement,\n type ReactElement,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\n\nimport { cn } from \"@kumix/utils\";\n\n// Types\ntype StepperOrientation = \"horizontal\" | \"vertical\";\ntype StepState = \"active\" | \"completed\" | \"inactive\" | \"loading\";\ntype StepIndicators = {\n active?: React.ReactNode;\n completed?: React.ReactNode;\n inactive?: React.ReactNode;\n loading?: React.ReactNode;\n};\n\ninterface StepperContextValue {\n activeStep: number;\n setActiveStep: (step: number) => void;\n stepsCount: number;\n orientation: StepperOrientation;\n registerTrigger: (node: HTMLButtonElement | null) => void;\n triggerNodes: HTMLButtonElement[];\n focusNext: (currentIdx: number) => void;\n focusPrev: (currentIdx: number) => void;\n focusFirst: () => void;\n focusLast: () => void;\n indicators: StepIndicators;\n}\n\ninterface StepItemContextValue {\n step: number;\n state: StepState;\n isDisabled: boolean;\n isLoading: boolean;\n}\n\nconst StepperContext = createContext<StepperContextValue | undefined>(undefined);\nconst StepItemContext = createContext<StepItemContextValue | undefined>(undefined);\n\nfunction useStepper() {\n const ctx = useContext(StepperContext);\n if (!ctx) throw new Error(\"useStepper must be used within a Stepper\");\n return ctx;\n}\n\nfunction useStepItem() {\n const ctx = useContext(StepItemContext);\n if (!ctx) throw new Error(\"useStepItem must be used within a StepperItem\");\n return ctx;\n}\n\ninterface StepperProps extends HTMLAttributes<HTMLDivElement> {\n defaultValue?: number;\n value?: number;\n onValueChange?: (value: number) => void;\n orientation?: StepperOrientation;\n indicators?: StepIndicators;\n}\n\nfunction Stepper({\n defaultValue = 1,\n value,\n onValueChange,\n orientation = \"horizontal\",\n className,\n children,\n indicators = {},\n ...props\n}: StepperProps) {\n const [activeStep, setActiveStep] = useState(defaultValue);\n const [triggerNodes, setTriggerNodes] = useState<HTMLButtonElement[]>([]);\n\n // Register/unregister triggers\n const registerTrigger = useCallback((node: HTMLButtonElement | null) => {\n setTriggerNodes((prev) => {\n if (node && !prev.includes(node)) {\n return [...prev, node];\n } else if (!node && prev.includes(node!)) {\n return prev.filter((n) => n !== node);\n } else {\n return prev;\n }\n });\n }, []);\n\n const handleSetActiveStep = useCallback(\n (step: number) => {\n if (value === undefined) {\n setActiveStep(step);\n }\n onValueChange?.(step);\n },\n [value, onValueChange],\n );\n\n const currentStep = value ?? activeStep;\n\n // Keyboard navigation logic\n const focusTrigger = useCallback(\n (idx: number) => {\n if (triggerNodes[idx]) triggerNodes[idx].focus();\n },\n [triggerNodes],\n );\n const focusNext = useCallback(\n (currentIdx: number) => focusTrigger((currentIdx + 1) % triggerNodes.length),\n [focusTrigger, triggerNodes.length],\n );\n const focusPrev = useCallback(\n (currentIdx: number) =>\n focusTrigger((currentIdx - 1 + triggerNodes.length) % triggerNodes.length),\n [focusTrigger, triggerNodes.length],\n );\n const focusFirst = useCallback(() => focusTrigger(0), [focusTrigger]);\n const focusLast = useCallback(\n () => focusTrigger(triggerNodes.length - 1),\n [focusTrigger, triggerNodes.length],\n );\n\n // Context value\n const contextValue = useMemo<StepperContextValue>(\n () => ({\n activeStep: currentStep,\n setActiveStep: handleSetActiveStep,\n stepsCount: Children.toArray(children).filter(\n (child): child is ReactElement =>\n isValidElement(child) &&\n (child.type as { displayName?: string }).displayName === \"StepperItem\",\n ).length,\n orientation,\n registerTrigger,\n focusNext,\n focusPrev,\n focusFirst,\n focusLast,\n triggerNodes,\n indicators,\n }),\n [\n currentStep,\n handleSetActiveStep,\n children,\n orientation,\n registerTrigger,\n triggerNodes,\n focusNext,\n indicators,\n focusLast,\n focusPrev,\n focusFirst,\n ],\n );\n\n return (\n <StepperContext.Provider value={contextValue}>\n <div\n role=\"tablist\"\n aria-orientation={orientation}\n data-slot=\"stepper\"\n className={cn(\"w-full\", className)}\n data-orientation={orientation}\n {...props}\n >\n {children}\n </div>\n </StepperContext.Provider>\n );\n}\n\ninterface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {\n step: number;\n completed?: boolean;\n disabled?: boolean;\n loading?: boolean;\n}\n\nfunction StepperItem({\n step,\n completed = false,\n disabled = false,\n loading = false,\n className,\n children,\n ...props\n}: StepperItemProps) {\n const { activeStep } = useStepper();\n\n const state: StepState =\n completed || step < activeStep ? \"completed\" : activeStep === step ? \"active\" : \"inactive\";\n\n const isLoading = loading && step === activeStep;\n\n return (\n <StepItemContext.Provider value={{ step, state, isDisabled: disabled, isLoading }}>\n <div\n data-slot=\"stepper-item\"\n className={cn(\n \"group/step flex not-last:flex-1 items-center justify-center group-data-[orientation=horizontal]/stepper-nav:flex-row group-data-[orientation=vertical]/stepper-nav:flex-col\",\n className,\n )}\n data-state={state}\n {...(isLoading ? { \"data-loading\": true } : {})}\n {...props}\n >\n {children}\n </div>\n </StepItemContext.Provider>\n );\n}\n\ntype StepperTriggerProps = useRender.ComponentProps<\"button\">;\n\nfunction StepperTrigger({ className, children, tabIndex, render, ...props }: StepperTriggerProps) {\n const { state, isLoading } = useStepItem();\n const stepperCtx = useStepper();\n const {\n setActiveStep,\n activeStep,\n registerTrigger,\n triggerNodes,\n focusNext,\n focusPrev,\n focusFirst,\n focusLast,\n } = stepperCtx;\n const { step, isDisabled } = useStepItem();\n const isSelected = activeStep === step;\n const id = `stepper-tab-${step}`;\n const panelId = `stepper-panel-${step}`;\n\n // Register this trigger for keyboard navigation\n const btnRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (btnRef.current) {\n registerTrigger(btnRef.current);\n }\n }, [registerTrigger]);\n\n // Find our index among triggers for navigation\n const myIdx = useMemo(\n () => triggerNodes.findIndex((n: HTMLButtonElement) => n === btnRef.current),\n [triggerNodes],\n );\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (e.key) {\n case \"ArrowRight\":\n case \"ArrowDown\":\n e.preventDefault();\n if (myIdx !== -1 && focusNext) focusNext(myIdx);\n break;\n case \"ArrowLeft\":\n case \"ArrowUp\":\n e.preventDefault();\n if (myIdx !== -1 && focusPrev) focusPrev(myIdx);\n break;\n case \"Home\":\n e.preventDefault();\n if (focusFirst) focusFirst();\n break;\n case \"End\":\n e.preventDefault();\n if (focusLast) focusLast();\n break;\n case \"Enter\":\n case \" \":\n e.preventDefault();\n setActiveStep(step);\n break;\n }\n };\n\n const defaultProps = {\n role: \"tab\",\n id,\n \"aria-selected\": isSelected,\n \"aria-controls\": panelId,\n tabIndex: typeof tabIndex === \"number\" ? tabIndex : isSelected ? 0 : -1,\n \"data-slot\": \"stepper-trigger\",\n \"data-state\": state,\n \"data-loading\": isLoading,\n className: cn(\n \"inline-flex cursor-pointer items-center outline-none focus-visible:z-10 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-60\",\n \"gap-2.5 rounded-full\",\n className,\n ),\n onClick: () => setActiveStep(step),\n onKeyDown: handleKeyDown,\n disabled: isDisabled,\n children,\n };\n\n return useRender({\n defaultTagName: \"button\",\n render,\n ref: btnRef,\n props: mergeProps<\"button\">(defaultProps, props),\n });\n}\n\nfunction StepperIndicator({ children, className }: React.ComponentProps<\"div\">) {\n const { state, isLoading } = useStepItem();\n const { indicators } = useStepper();\n\n return (\n <div\n data-slot=\"stepper-indicator\"\n data-state={state}\n className={cn(\n \"relative flex size-6 shrink-0 items-center justify-center overflow-hidden border-background bg-accent text-accent-foreground data-[state=active]:bg-primary data-[state=completed]:bg-primary data-[state=active]:text-primary-foreground data-[state=completed]:text-primary-foreground\",\n \"rounded-full text-xs\",\n className,\n )}\n >\n <div className=\"absolute\">\n {indicators &&\n ((isLoading && indicators.loading) ||\n (state === \"completed\" && indicators.completed) ||\n (state === \"active\" && indicators.active) ||\n (state === \"inactive\" && indicators.inactive))\n ? (isLoading && indicators.loading) ||\n (state === \"completed\" && indicators.completed) ||\n (state === \"active\" && indicators.active) ||\n (state === \"inactive\" && indicators.inactive)\n : children}\n </div>\n </div>\n );\n}\n\nfunction StepperSeparator({ className }: React.ComponentProps<\"div\">) {\n const { state } = useStepItem();\n\n return (\n <div\n data-slot=\"stepper-separator\"\n data-state={state}\n className={cn(\n \"m-0.5 rounded-sm bg-muted group-data-[orientation=horizontal]/stepper-nav:h-0.5 group-data-[orientation=vertical]/stepper-nav:h-12 group-data-[orientation=vertical]/stepper-nav:w-0.5 group-data-[orientation=horizontal]/stepper-nav:flex-1\",\n className,\n )}\n />\n );\n}\n\nfunction StepperTitle({ children, className }: React.ComponentProps<\"h3\">) {\n const { state } = useStepItem();\n\n return (\n <h3\n data-slot=\"stepper-title\"\n data-state={state}\n className={cn(\"font-medium text-sm leading-none\", className)}\n >\n {children}\n </h3>\n );\n}\n\nfunction StepperDescription({ children, className }: React.ComponentProps<\"div\">) {\n const { state } = useStepItem();\n\n return (\n <div\n data-slot=\"stepper-description\"\n data-state={state}\n className={cn(\"text-muted-foreground text-sm\", className)}\n >\n {children}\n </div>\n );\n}\n\nfunction StepperNav({ children, className }: React.ComponentProps<\"nav\">) {\n const { activeStep, orientation } = useStepper();\n\n return (\n <nav\n data-slot=\"stepper-nav\"\n data-state={activeStep}\n data-orientation={orientation}\n className={cn(\n \"group/stepper-nav inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col\",\n className,\n )}\n >\n {children}\n </nav>\n );\n}\n\nfunction StepperPanel({ children, className }: React.ComponentProps<\"div\">) {\n const { activeStep } = useStepper();\n\n return (\n <div data-slot=\"stepper-panel\" data-state={activeStep} className={cn(\"w-full\", className)}>\n {children}\n </div>\n );\n}\n\ninterface StepperContentProps extends React.ComponentProps<\"div\"> {\n value: number;\n forceMount?: boolean;\n}\n\nfunction StepperContent({ value, forceMount, children, className }: StepperContentProps) {\n const { activeStep } = useStepper();\n const isActive = value === activeStep;\n\n if (!forceMount && !isActive) {\n return null;\n }\n\n return (\n <div\n data-slot=\"stepper-content\"\n data-state={activeStep}\n className={cn(\"w-full\", className, !isActive && forceMount && \"hidden\")}\n hidden={!isActive && forceMount}\n >\n {children}\n </div>\n );\n}\n\nexport {\n Stepper,\n StepperContent,\n type StepperContentProps,\n StepperDescription,\n StepperIndicator,\n StepperItem,\n type StepperItemProps,\n StepperNav,\n StepperPanel,\n type StepperProps,\n StepperSeparator,\n StepperTitle,\n StepperTrigger,\n type StepperTriggerProps,\n useStepItem,\n useStepper,\n};\n"],"mappings":";;;;;;;AAmDA,MAAM,iBAAiB,cAA+C,KAAA,CAAS;AAC/E,MAAM,kBAAkB,cAAgD,KAAA,CAAS;AAEjF,SAAS,aAAa;CACpB,MAAM,MAAM,WAAW,cAAc;CACrC,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,0CAA0C;CACpE,OAAO;AACT;AAEA,SAAS,cAAc;CACrB,MAAM,MAAM,WAAW,eAAe;CACtC,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,+CAA+C;CACzE,OAAO;AACT;AAUA,SAAS,QAAQ,EACf,eAAe,GACf,OACA,eACA,cAAc,cACd,WACA,UACA,aAAa,CAAC,GACd,GAAG,SACY;CACf,MAAM,CAAC,YAAY,iBAAiB,SAAS,YAAY;CACzD,MAAM,CAAC,cAAc,mBAAmB,SAA8B,CAAC,CAAC;CAGxE,MAAM,kBAAkB,aAAa,SAAmC;EACtE,iBAAiB,SAAS;GACxB,IAAI,QAAQ,CAAC,KAAK,SAAS,IAAI,GAC7B,OAAO,CAAC,GAAG,MAAM,IAAI;QAChB,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAK,GACrC,OAAO,KAAK,QAAQ,MAAM,MAAM,IAAI;QAEpC,OAAO;EAEX,CAAC;CACH,GAAG,CAAC,CAAC;CAEL,MAAM,sBAAsB,aACzB,SAAiB;EAChB,IAAI,UAAU,KAAA,GACZ,cAAc,IAAI;EAEpB,gBAAgB,IAAI;CACtB,GACA,CAAC,OAAO,aAAa,CACvB;CAEA,MAAM,cAAc,SAAS;CAG7B,MAAM,eAAe,aAClB,QAAgB;EACf,IAAI,aAAa,MAAM,aAAa,IAAI,CAAC,MAAM;CACjD,GACA,CAAC,YAAY,CACf;CACA,MAAM,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ACE,oBAAC,OAAD;EAAK,aAAU;EAAgB,cAAY;EAAY,WAAW,GAAG,UAAU,SAAS;EACrF;CACE,CAAA;AAET;AAOA,SAAS,eAAe,EAAE,OAAO,YAAY,UAAU,aAAkC;CACvF,MAAM,EAAE,eAAe,WAAW;CAClC,MAAM,WAAW,UAAU;CAE3B,IAAI,CAAC,cAAc,CAAC,UAClB,OAAO;CAGT,OACE,oBAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,WAAW,GAAG,UAAU,WAAW,CAAC,YAAY,cAAc,QAAQ;EACtE,QAAQ,CAAC,YAAY;EAEpB;CACE,CAAA;AAET"}
|
|
1
|
+
{"version":3,"file":"stepper.js","names":[],"sources":["../../../src/components/reui/stepper.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Children,\n createContext,\n type HTMLAttributes,\n isValidElement,\n type ReactElement,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\n\nimport { cn } from \"@kumix/utils\";\n\n// Types\ntype StepperOrientation = \"horizontal\" | \"vertical\";\ntype StepState = \"active\" | \"completed\" | \"inactive\" | \"loading\";\ntype StepIndicators = {\n active?: React.ReactNode;\n completed?: React.ReactNode;\n inactive?: React.ReactNode;\n loading?: React.ReactNode;\n};\n\ninterface StepperContextValue {\n activeStep: number;\n setActiveStep: (step: number) => void;\n stepsCount: number;\n orientation: StepperOrientation;\n registerTrigger: (node: HTMLButtonElement | null) => void;\n triggerNodes: HTMLButtonElement[];\n focusNext: (currentIdx: number) => void;\n focusPrev: (currentIdx: number) => void;\n focusFirst: () => void;\n focusLast: () => void;\n indicators: StepIndicators;\n}\n\ninterface StepItemContextValue {\n step: number;\n state: StepState;\n isDisabled: boolean;\n isLoading: boolean;\n}\n\nconst StepperContext = createContext<StepperContextValue | undefined>(undefined);\nconst StepItemContext = createContext<StepItemContextValue | undefined>(undefined);\n\nfunction useStepper() {\n const ctx = useContext(StepperContext);\n if (!ctx) throw new Error(\"useStepper must be used within a Stepper\");\n return ctx;\n}\n\nfunction useStepItem() {\n const ctx = useContext(StepItemContext);\n if (!ctx) throw new Error(\"useStepItem must be used within a StepperItem\");\n return ctx;\n}\n\ninterface StepperProps extends HTMLAttributes<HTMLDivElement> {\n defaultValue?: number;\n value?: number;\n onValueChange?: (value: number) => void;\n orientation?: StepperOrientation;\n indicators?: StepIndicators;\n}\n\nfunction Stepper({\n defaultValue = 1,\n value,\n onValueChange,\n orientation = \"horizontal\",\n className,\n children,\n indicators = {},\n ...props\n}: StepperProps) {\n const [activeStep, setActiveStep] = useState(defaultValue);\n const [triggerNodes, setTriggerNodes] = useState<HTMLButtonElement[]>([]);\n\n // Register/unregister triggers\n const registerTrigger = useCallback((node: HTMLButtonElement | null) => {\n setTriggerNodes((prev) => {\n if (node && !prev.includes(node)) {\n return [...prev, node];\n } else if (!node && prev.includes(node!)) {\n return prev.filter((n) => n !== node);\n } else {\n return prev;\n }\n });\n }, []);\n\n const handleSetActiveStep = useCallback(\n (step: number) => {\n if (value === undefined) {\n setActiveStep(step);\n }\n onValueChange?.(step);\n },\n [value, onValueChange],\n );\n\n const currentStep = value ?? activeStep;\n\n // Keyboard navigation logic\n const focusTrigger = useCallback(\n (idx: number) => {\n if (triggerNodes[idx]) triggerNodes[idx].focus();\n },\n [triggerNodes],\n );\n const focusNext = useCallback(\n (currentIdx: number) => focusTrigger((currentIdx + 1) % triggerNodes.length),\n [focusTrigger, triggerNodes.length],\n );\n const focusPrev = useCallback(\n (currentIdx: number) =>\n focusTrigger((currentIdx - 1 + triggerNodes.length) % triggerNodes.length),\n [focusTrigger, triggerNodes.length],\n );\n const focusFirst = useCallback(() => focusTrigger(0), [focusTrigger]);\n const focusLast = useCallback(\n () => focusTrigger(triggerNodes.length - 1),\n [focusTrigger, triggerNodes.length],\n );\n\n // Context value\n const contextValue = useMemo<StepperContextValue>(\n () => ({\n activeStep: currentStep,\n setActiveStep: handleSetActiveStep,\n stepsCount: Children.toArray(children).filter(\n (child): child is ReactElement =>\n isValidElement(child) &&\n (child.type as { displayName?: string }).displayName === \"StepperItem\",\n ).length,\n orientation,\n registerTrigger,\n focusNext,\n focusPrev,\n focusFirst,\n focusLast,\n triggerNodes,\n indicators,\n }),\n [\n currentStep,\n handleSetActiveStep,\n children,\n orientation,\n registerTrigger,\n triggerNodes,\n focusNext,\n indicators,\n focusLast,\n focusPrev,\n focusFirst,\n ],\n );\n\n return (\n <StepperContext.Provider value={contextValue}>\n <div\n role=\"tablist\"\n aria-orientation={orientation}\n data-slot=\"stepper\"\n className={cn(\"w-full\", className)}\n data-orientation={orientation}\n {...props}\n >\n {children}\n </div>\n </StepperContext.Provider>\n );\n}\n\ninterface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {\n step: number;\n completed?: boolean;\n disabled?: boolean;\n loading?: boolean;\n}\n\nfunction StepperItem({\n step,\n completed = false,\n disabled = false,\n loading = false,\n className,\n children,\n ...props\n}: StepperItemProps) {\n const { activeStep } = useStepper();\n\n const state: StepState =\n completed || step < activeStep ? \"completed\" : activeStep === step ? \"active\" : \"inactive\";\n\n const isLoading = loading && step === activeStep;\n\n return (\n <StepItemContext.Provider value={{ step, state, isDisabled: disabled, isLoading }}>\n <div\n data-slot=\"stepper-item\"\n className={cn(\n \"group/step flex not-last:flex-1 items-center justify-center group-data-[orientation=horizontal]/stepper-nav:flex-row group-data-[orientation=vertical]/stepper-nav:flex-col\",\n className,\n )}\n data-state={state}\n {...(isLoading ? { \"data-loading\": true } : {})}\n {...props}\n >\n {children}\n </div>\n </StepItemContext.Provider>\n );\n}\n\ntype StepperTriggerProps = useRender.ComponentProps<\"button\">;\n\nfunction StepperTrigger({ className, children, tabIndex, render, ...props }: StepperTriggerProps) {\n const { state, isLoading } = useStepItem();\n const stepperCtx = useStepper();\n const {\n setActiveStep,\n activeStep,\n registerTrigger,\n triggerNodes,\n focusNext,\n focusPrev,\n focusFirst,\n focusLast,\n } = stepperCtx;\n const { step, isDisabled } = useStepItem();\n const isSelected = activeStep === step;\n const id = `stepper-tab-${step}`;\n const panelId = `stepper-panel-${step}`;\n\n // Register this trigger for keyboard navigation\n const btnRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (btnRef.current) {\n registerTrigger(btnRef.current);\n }\n }, [registerTrigger]);\n\n // Find our index among triggers for navigation\n const myIdx = useMemo(\n () => triggerNodes.findIndex((n: HTMLButtonElement) => n === btnRef.current),\n [triggerNodes],\n );\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (e.key) {\n case \"ArrowRight\":\n case \"ArrowDown\":\n e.preventDefault();\n if (myIdx !== -1 && focusNext) focusNext(myIdx);\n break;\n case \"ArrowLeft\":\n case \"ArrowUp\":\n e.preventDefault();\n if (myIdx !== -1 && focusPrev) focusPrev(myIdx);\n break;\n case \"Home\":\n e.preventDefault();\n if (focusFirst) focusFirst();\n break;\n case \"End\":\n e.preventDefault();\n if (focusLast) focusLast();\n break;\n case \"Enter\":\n case \" \":\n e.preventDefault();\n setActiveStep(step);\n break;\n }\n };\n\n const defaultProps = {\n role: \"tab\",\n id,\n \"aria-selected\": isSelected,\n \"aria-controls\": panelId,\n tabIndex: typeof tabIndex === \"number\" ? tabIndex : isSelected ? 0 : -1,\n \"data-slot\": \"stepper-trigger\",\n \"data-state\": state,\n \"data-loading\": isLoading,\n className: cn(\n \"inline-flex cursor-pointer items-center outline-none focus-visible:z-10 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-60\",\n \"gap-2.5 rounded-full\",\n className,\n ),\n onClick: () => setActiveStep(step),\n onKeyDown: handleKeyDown,\n disabled: isDisabled,\n children,\n };\n\n return useRender({\n defaultTagName: \"button\",\n render,\n ref: btnRef,\n props: mergeProps<\"button\">(defaultProps, props),\n });\n}\n\nfunction StepperIndicator({ children, className }: React.ComponentProps<\"div\">) {\n const { state, isLoading } = useStepItem();\n const { indicators } = useStepper();\n\n return (\n <div\n data-slot=\"stepper-indicator\"\n data-state={state}\n className={cn(\n \"relative flex size-6 shrink-0 items-center justify-center overflow-hidden border-background bg-accent text-accent-foreground data-[state=active]:bg-primary data-[state=completed]:bg-primary data-[state=active]:text-primary-foreground data-[state=completed]:text-primary-foreground\",\n \"rounded-full text-xs\",\n className,\n )}\n >\n <div className=\"absolute\">\n {indicators &&\n ((isLoading && indicators.loading) ||\n (state === \"completed\" && indicators.completed) ||\n (state === \"active\" && indicators.active) ||\n (state === \"inactive\" && indicators.inactive))\n ? (isLoading && indicators.loading) ||\n (state === \"completed\" && indicators.completed) ||\n (state === \"active\" && indicators.active) ||\n (state === \"inactive\" && indicators.inactive)\n : children}\n </div>\n </div>\n );\n}\n\nfunction StepperSeparator({ className }: React.ComponentProps<\"div\">) {\n const { state } = useStepItem();\n\n return (\n <div\n data-slot=\"stepper-separator\"\n data-state={state}\n className={cn(\n \"m-0.5 rounded-sm bg-muted group-data-[orientation=horizontal]/stepper-nav:h-0.5 group-data-[orientation=vertical]/stepper-nav:h-12 group-data-[orientation=vertical]/stepper-nav:w-0.5 group-data-[orientation=horizontal]/stepper-nav:flex-1\",\n className,\n )}\n />\n );\n}\n\nfunction StepperTitle({ children, className }: React.ComponentProps<\"h3\">) {\n const { state } = useStepItem();\n\n return (\n <h3\n data-slot=\"stepper-title\"\n data-state={state}\n className={cn(\"font-medium text-sm leading-none\", className)}\n >\n {children}\n </h3>\n );\n}\n\nfunction StepperDescription({ children, className }: React.ComponentProps<\"div\">) {\n const { state } = useStepItem();\n\n return (\n <div\n data-slot=\"stepper-description\"\n data-state={state}\n className={cn(\"text-muted-foreground text-sm\", className)}\n >\n {children}\n </div>\n );\n}\n\nfunction StepperNav({ children, className }: React.ComponentProps<\"nav\">) {\n const { activeStep, orientation } = useStepper();\n\n return (\n <nav\n data-slot=\"stepper-nav\"\n data-state={activeStep}\n data-orientation={orientation}\n className={cn(\n \"group/stepper-nav inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col\",\n className,\n )}\n >\n {children}\n </nav>\n );\n}\n\nfunction StepperPanel({ children, className }: React.ComponentProps<\"div\">) {\n const { activeStep } = useStepper();\n\n return (\n <div data-slot=\"stepper-panel\" data-state={activeStep} className={cn(\"w-full\", className)}>\n {children}\n </div>\n );\n}\n\ninterface StepperContentProps extends React.ComponentProps<\"div\"> {\n value: number;\n forceMount?: boolean;\n}\n\nfunction StepperContent({ value, forceMount, children, className }: StepperContentProps) {\n const { activeStep } = useStepper();\n const isActive = value === activeStep;\n\n if (!forceMount && !isActive) {\n return null;\n }\n\n return (\n <div\n data-slot=\"stepper-content\"\n data-state={activeStep}\n className={cn(\"w-full\", className, !isActive && forceMount && \"hidden\")}\n hidden={!isActive && forceMount}\n >\n {children}\n </div>\n );\n}\n\nexport {\n Stepper,\n StepperContent,\n type StepperContentProps,\n StepperDescription,\n StepperIndicator,\n StepperItem,\n type StepperItemProps,\n StepperNav,\n StepperPanel,\n type StepperProps,\n StepperSeparator,\n StepperTitle,\n StepperTrigger,\n type StepperTriggerProps,\n useStepItem,\n useStepper,\n};\n"],"mappings":";;;;;;;AAmDA,MAAM,iBAAiB,cAA+C,KAAA,CAAS;AAC/E,MAAM,kBAAkB,cAAgD,KAAA,CAAS;AAEjF,SAAS,aAAa;CACpB,MAAM,MAAM,WAAW,cAAc;CACrC,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,0CAA0C;CACpE,OAAO;AACT;AAEA,SAAS,cAAc;CACrB,MAAM,MAAM,WAAW,eAAe;CACtC,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,+CAA+C;CACzE,OAAO;AACT;AAUA,SAAS,QAAQ,EACf,eAAe,GACf,OACA,eACA,cAAc,cACd,WACA,UACA,aAAa,CAAC,GACd,GAAG,SACY;CACf,MAAM,CAAC,YAAY,iBAAiB,SAAS,YAAY;CACzD,MAAM,CAAC,cAAc,mBAAmB,SAA8B,CAAC,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AM,EAAE,UAAU,YAAY;CAE9B,OACE,oBAAC,MAAD;EACE,aAAU;EACV,cAAY;EACZ,WAAW,GAAG,oCAAoC,SAAS;EAE1D;CACC,CAAA;AAER;AAEA,SAAS,mBAAmB,EAAE,UAAU,aAA0C;CAChF,MAAM,EAAE,UAAU,YAAY;CAE9B,OACE,oBAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,WAAW,GAAG,iCAAiC,SAAS;EAEvD;CACE,CAAA;AAET;AAEA,SAAS,WAAW,EAAE,UAAU,aAA0C;CACxE,MAAM,EAAE,YAAY,gBAAgB,WAAW;CAE/C,OACE,oBAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,oBAAkB;EAClB,WAAW,GACT,kJACA,SACF;EAEC;CACE,CAAA;AAET;AAEA,SAAS,aAAa,EAAE,UAAU,aAA0C;CAC1E,MAAM,EAAE,eAAe,WAAW;CAElC,OACE,oBAAC,OAAD;EAAK,aAAU;EAAgB,cAAY;EAAY,WAAW,GAAG,UAAU,SAAS;EACrF;CACE,CAAA;AAET;AAOA,SAAS,eAAe,EAAE,OAAO,YAAY,UAAU,aAAkC;CACvF,MAAM,EAAE,eAAe,WAAW;CAClC,MAAM,WAAW,UAAU;CAE3B,IAAI,CAAC,cAAc,CAAC,UAClB,OAAO;CAGT,OACE,oBAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,WAAW,GAAG,UAAU,WAAW,CAAC,YAAY,cAAc,QAAQ;EACtE,QAAQ,CAAC,YAAY;EAEpB;CACE,CAAA;AAET"}
|
|
@@ -37,84 +37,91 @@ function Timeline({ defaultValue = 1, value, onValueChange, orientation = "verti
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
function TimelineContent({ className, render, children, ...props }) {
|
|
40
|
+
const defaultProps = {
|
|
41
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
42
|
+
"data-slot": "timeline-content",
|
|
43
|
+
children
|
|
44
|
+
};
|
|
40
45
|
return useRender({
|
|
41
46
|
defaultTagName: "div",
|
|
42
47
|
render,
|
|
43
|
-
props: mergeProps(
|
|
44
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
45
|
-
"data-slot": "timeline-content",
|
|
46
|
-
children
|
|
47
|
-
}, props)
|
|
48
|
+
props: mergeProps(defaultProps, props)
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
51
|
function TimelineDate({ className, render, children, ...props }) {
|
|
52
|
+
const defaultProps = {
|
|
53
|
+
className: cn("mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4", className),
|
|
54
|
+
"data-slot": "timeline-date",
|
|
55
|
+
children
|
|
56
|
+
};
|
|
51
57
|
return useRender({
|
|
52
58
|
defaultTagName: "time",
|
|
53
59
|
render,
|
|
54
|
-
props: mergeProps(
|
|
55
|
-
className: cn("mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4", className),
|
|
56
|
-
"data-slot": "timeline-date",
|
|
57
|
-
children
|
|
58
|
-
}, props)
|
|
60
|
+
props: mergeProps(defaultProps, props)
|
|
59
61
|
});
|
|
60
62
|
}
|
|
61
63
|
function TimelineHeader({ className, render, children, ...props }) {
|
|
64
|
+
const defaultProps = {
|
|
65
|
+
className: cn(className),
|
|
66
|
+
"data-slot": "timeline-header",
|
|
67
|
+
children
|
|
68
|
+
};
|
|
62
69
|
return useRender({
|
|
63
70
|
defaultTagName: "div",
|
|
64
71
|
render,
|
|
65
|
-
props: mergeProps(
|
|
66
|
-
className: cn(className),
|
|
67
|
-
"data-slot": "timeline-header",
|
|
68
|
-
children
|
|
69
|
-
}, props)
|
|
72
|
+
props: mergeProps(defaultProps, props)
|
|
70
73
|
});
|
|
71
74
|
}
|
|
72
75
|
function TimelineIndicator({ className, children, render, ...props }) {
|
|
76
|
+
const defaultProps = {
|
|
77
|
+
"aria-hidden": true,
|
|
78
|
+
className: cn("absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-completed/timeline-item:border-primary", className),
|
|
79
|
+
"data-slot": "timeline-indicator",
|
|
80
|
+
children
|
|
81
|
+
};
|
|
73
82
|
return useRender({
|
|
74
83
|
defaultTagName: "div",
|
|
75
84
|
render,
|
|
76
|
-
props: mergeProps(
|
|
77
|
-
"aria-hidden": true,
|
|
78
|
-
className: cn("absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-completed/timeline-item:border-primary", className),
|
|
79
|
-
"data-slot": "timeline-indicator",
|
|
80
|
-
children
|
|
81
|
-
}, props)
|
|
85
|
+
props: mergeProps(defaultProps, props)
|
|
82
86
|
});
|
|
83
87
|
}
|
|
84
88
|
function TimelineItem({ step, className, render, children, ...props }) {
|
|
85
89
|
const { activeStep } = useTimeline();
|
|
90
|
+
const defaultProps = {
|
|
91
|
+
className: cn("group/timeline-item relative flex flex-1 flex-col gap-0.5 has-[+[data-completed]]:**:data-[slot=timeline-separator]:bg-primary group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-6", className),
|
|
92
|
+
"data-completed": step <= activeStep || void 0,
|
|
93
|
+
"data-slot": "timeline-item",
|
|
94
|
+
children
|
|
95
|
+
};
|
|
86
96
|
return useRender({
|
|
87
97
|
defaultTagName: "div",
|
|
88
98
|
render,
|
|
89
|
-
props: mergeProps(
|
|
90
|
-
className: cn("group/timeline-item relative flex flex-1 flex-col gap-0.5 has-[+[data-completed]]:**:data-[slot=timeline-separator]:bg-primary group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-6", className),
|
|
91
|
-
"data-completed": step <= activeStep || void 0,
|
|
92
|
-
"data-slot": "timeline-item",
|
|
93
|
-
children
|
|
94
|
-
}, props)
|
|
99
|
+
props: mergeProps(defaultProps, props)
|
|
95
100
|
});
|
|
96
101
|
}
|
|
97
102
|
function TimelineSeparator({ className, render, children, ...props }) {
|
|
103
|
+
const defaultProps = {
|
|
104
|
+
"aria-hidden": true,
|
|
105
|
+
className: cn("absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:translate-y-4.5", className),
|
|
106
|
+
"data-slot": "timeline-separator",
|
|
107
|
+
children
|
|
108
|
+
};
|
|
98
109
|
return useRender({
|
|
99
110
|
defaultTagName: "div",
|
|
100
111
|
render,
|
|
101
|
-
props: mergeProps(
|
|
102
|
-
"aria-hidden": true,
|
|
103
|
-
className: cn("absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:translate-y-4.5", className),
|
|
104
|
-
"data-slot": "timeline-separator",
|
|
105
|
-
children
|
|
106
|
-
}, props)
|
|
112
|
+
props: mergeProps(defaultProps, props)
|
|
107
113
|
});
|
|
108
114
|
}
|
|
109
115
|
function TimelineTitle({ className, render, children, ...props }) {
|
|
116
|
+
const defaultProps = {
|
|
117
|
+
className: cn("font-medium text-sm", className),
|
|
118
|
+
"data-slot": "timeline-title",
|
|
119
|
+
children
|
|
120
|
+
};
|
|
110
121
|
return useRender({
|
|
111
122
|
defaultTagName: "h3",
|
|
112
123
|
render,
|
|
113
|
-
props: mergeProps(
|
|
114
|
-
className: cn("font-medium text-sm", className),
|
|
115
|
-
"data-slot": "timeline-title",
|
|
116
|
-
children
|
|
117
|
-
}, props)
|
|
124
|
+
props: mergeProps(defaultProps, props)
|
|
118
125
|
});
|
|
119
126
|
}
|
|
120
127
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline.js","names":[],"sources":["../../../src/components/reui/timeline.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, useCallback, useContext, useState } from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\n\nimport { cn } from \"@kumix/utils\";\n\n// Types\ntype TimelineContextValue = {\n activeStep: number;\n setActiveStep: (step: number) => void;\n};\n\n// Context\nconst TimelineContext = createContext<TimelineContextValue | undefined>(undefined);\n\nconst useTimeline = () => {\n const context = useContext(TimelineContext);\n if (!context) {\n throw new Error(\"useTimeline must be used within a Timeline\");\n }\n return context;\n};\n\n// Components\ninterface TimelineProps extends useRender.ComponentProps<\"div\"> {\n defaultValue?: number;\n value?: number;\n onValueChange?: (value: number) => void;\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nfunction Timeline({\n defaultValue = 1,\n value,\n onValueChange,\n orientation = \"vertical\",\n className,\n render,\n children,\n ...props\n}: TimelineProps) {\n const [activeStep, setInternalStep] = useState(defaultValue);\n\n const setActiveStep = useCallback(\n (step: number) => {\n if (value === undefined) {\n setInternalStep(step);\n }\n onValueChange?.(step);\n },\n [value, onValueChange],\n );\n\n const currentStep = value ?? activeStep;\n\n const defaultProps = {\n className: cn(\n \"group/timeline flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col\",\n className,\n ),\n \"data-orientation\": orientation,\n \"data-slot\": \"timeline\",\n children,\n };\n\n return (\n <TimelineContext.Provider value={{ activeStep: currentStep, setActiveStep }}>\n {useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n })}\n </TimelineContext.Provider>\n );\n}\n\n// TimelineContent\nfunction TimelineContent({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n className: cn(\"text-muted-foreground text-sm\", className),\n \"data-slot\": \"timeline-content\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineDate\ntype TimelineDateProps = useRender.ComponentProps<\"time\">;\n\nfunction TimelineDate({ className, render, children, ...props }: TimelineDateProps) {\n const defaultProps = {\n className: cn(\n \"mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4\",\n className,\n ),\n \"data-slot\": \"timeline-date\",\n children,\n };\n\n return useRender({\n defaultTagName: \"time\",\n render,\n props: mergeProps<\"time\">(defaultProps, props),\n });\n}\n\n// TimelineHeader\nfunction TimelineHeader({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n className: cn(className),\n \"data-slot\": \"timeline-header\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineIndicator\ntype TimelineIndicatorProps = useRender.ComponentProps<\"div\">;\n\nfunction TimelineIndicator({ className, children, render, ...props }: TimelineIndicatorProps) {\n const defaultProps = {\n \"aria-hidden\": true,\n className: cn(\n \"absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-completed/timeline-item:border-primary\",\n className,\n ),\n \"data-slot\": \"timeline-indicator\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineItem\ninterface TimelineItemProps extends useRender.ComponentProps<\"div\"> {\n step: number;\n}\n\nfunction TimelineItem({ step, className, render, children, ...props }: TimelineItemProps) {\n const { activeStep } = useTimeline();\n\n const defaultProps = {\n className: cn(\n \"group/timeline-item relative flex flex-1 flex-col gap-0.5 has-[+[data-completed]]:**:data-[slot=timeline-separator]:bg-primary group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-6\",\n className,\n ),\n \"data-completed\": step <= activeStep || undefined,\n \"data-slot\": \"timeline-item\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineSeparator\nfunction TimelineSeparator({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n \"aria-hidden\": true,\n className: cn(\n \"absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:translate-y-4.5\",\n className,\n ),\n \"data-slot\": \"timeline-separator\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineTitle\nfunction TimelineTitle({ className, render, children, ...props }: useRender.ComponentProps<\"h3\">) {\n const defaultProps = {\n className: cn(\"font-medium text-sm\", className),\n \"data-slot\": \"timeline-title\",\n children,\n };\n\n return useRender({\n defaultTagName: \"h3\",\n render,\n props: mergeProps<\"h3\">(defaultProps, props),\n });\n}\n\nexport {\n Timeline,\n TimelineContent,\n TimelineDate,\n TimelineHeader,\n TimelineIndicator,\n TimelineItem,\n TimelineSeparator,\n TimelineTitle,\n};\n"],"mappings":";;;;;;;AAeA,MAAM,kBAAkB,cAAgD,KAAA,CAAS;AAEjF,MAAM,oBAAoB;CACxB,MAAM,UAAU,WAAW,eAAe;CAC1C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,4CAA4C;CAE9D,OAAO;AACT;AAUA,SAAS,SAAS,EAChB,eAAe,GACf,OACA,eACA,cAAc,YACd,WACA,QACA,UACA,GAAG,SACa;CAChB,MAAM,CAAC,YAAY,mBAAmB,SAAS,YAAY;CAE3D,MAAM,gBAAgB,aACnB,SAAiB;EAChB,IAAI,UAAU,KAAA,GACZ,gBAAgB,IAAI;EAEtB,gBAAgB,IAAI;CACtB,GACA,CAAC,OAAO,aAAa,CACvB;CAEA,MAAM,cAAc,SAAS;CAE7B,MAAM,eAAe;EACnB,WAAW,GACT,wIACA,SACF;EACA,oBAAoB;EACpB,aAAa;EACb;CACF;CAEA,OACE,oBAAC,gBAAgB,UAAjB;EAA0B,OAAO;GAAE,YAAY;GAAa;EAAc;EACvE,UAAA,UAAU;GACT,gBAAgB;GAChB;GACA,OAAO,WAAkB,cAAc,KAAK;EAC9C,CAAC;CACuB,CAAA;AAE9B;AAGA,SAAS,gBAAgB,EACvB,WACA,QACA,UACA,GAAG,SAC+B;
|
|
1
|
+
{"version":3,"file":"timeline.js","names":[],"sources":["../../../src/components/reui/timeline.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, useCallback, useContext, useState } from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\n\nimport { cn } from \"@kumix/utils\";\n\n// Types\ntype TimelineContextValue = {\n activeStep: number;\n setActiveStep: (step: number) => void;\n};\n\n// Context\nconst TimelineContext = createContext<TimelineContextValue | undefined>(undefined);\n\nconst useTimeline = () => {\n const context = useContext(TimelineContext);\n if (!context) {\n throw new Error(\"useTimeline must be used within a Timeline\");\n }\n return context;\n};\n\n// Components\ninterface TimelineProps extends useRender.ComponentProps<\"div\"> {\n defaultValue?: number;\n value?: number;\n onValueChange?: (value: number) => void;\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nfunction Timeline({\n defaultValue = 1,\n value,\n onValueChange,\n orientation = \"vertical\",\n className,\n render,\n children,\n ...props\n}: TimelineProps) {\n const [activeStep, setInternalStep] = useState(defaultValue);\n\n const setActiveStep = useCallback(\n (step: number) => {\n if (value === undefined) {\n setInternalStep(step);\n }\n onValueChange?.(step);\n },\n [value, onValueChange],\n );\n\n const currentStep = value ?? activeStep;\n\n const defaultProps = {\n className: cn(\n \"group/timeline flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col\",\n className,\n ),\n \"data-orientation\": orientation,\n \"data-slot\": \"timeline\",\n children,\n };\n\n return (\n <TimelineContext.Provider value={{ activeStep: currentStep, setActiveStep }}>\n {useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n })}\n </TimelineContext.Provider>\n );\n}\n\n// TimelineContent\nfunction TimelineContent({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n className: cn(\"text-muted-foreground text-sm\", className),\n \"data-slot\": \"timeline-content\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineDate\ntype TimelineDateProps = useRender.ComponentProps<\"time\">;\n\nfunction TimelineDate({ className, render, children, ...props }: TimelineDateProps) {\n const defaultProps = {\n className: cn(\n \"mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4\",\n className,\n ),\n \"data-slot\": \"timeline-date\",\n children,\n };\n\n return useRender({\n defaultTagName: \"time\",\n render,\n props: mergeProps<\"time\">(defaultProps, props),\n });\n}\n\n// TimelineHeader\nfunction TimelineHeader({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n className: cn(className),\n \"data-slot\": \"timeline-header\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineIndicator\ntype TimelineIndicatorProps = useRender.ComponentProps<\"div\">;\n\nfunction TimelineIndicator({ className, children, render, ...props }: TimelineIndicatorProps) {\n const defaultProps = {\n \"aria-hidden\": true,\n className: cn(\n \"absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-completed/timeline-item:border-primary\",\n className,\n ),\n \"data-slot\": \"timeline-indicator\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineItem\ninterface TimelineItemProps extends useRender.ComponentProps<\"div\"> {\n step: number;\n}\n\nfunction TimelineItem({ step, className, render, children, ...props }: TimelineItemProps) {\n const { activeStep } = useTimeline();\n\n const defaultProps = {\n className: cn(\n \"group/timeline-item relative flex flex-1 flex-col gap-0.5 has-[+[data-completed]]:**:data-[slot=timeline-separator]:bg-primary group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-6\",\n className,\n ),\n \"data-completed\": step <= activeStep || undefined,\n \"data-slot\": \"timeline-item\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineSeparator\nfunction TimelineSeparator({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n \"aria-hidden\": true,\n className: cn(\n \"absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:translate-y-4.5\",\n className,\n ),\n \"data-slot\": \"timeline-separator\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineTitle\nfunction TimelineTitle({ className, render, children, ...props }: useRender.ComponentProps<\"h3\">) {\n const defaultProps = {\n className: cn(\"font-medium text-sm\", className),\n \"data-slot\": \"timeline-title\",\n children,\n };\n\n return useRender({\n defaultTagName: \"h3\",\n render,\n props: mergeProps<\"h3\">(defaultProps, props),\n });\n}\n\nexport {\n Timeline,\n TimelineContent,\n TimelineDate,\n TimelineHeader,\n TimelineIndicator,\n TimelineItem,\n TimelineSeparator,\n TimelineTitle,\n};\n"],"mappings":";;;;;;;AAeA,MAAM,kBAAkB,cAAgD,KAAA,CAAS;AAEjF,MAAM,oBAAoB;CACxB,MAAM,UAAU,WAAW,eAAe;CAC1C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,4CAA4C;CAE9D,OAAO;AACT;AAUA,SAAS,SAAS,EAChB,eAAe,GACf,OACA,eACA,cAAc,YACd,WACA,QACA,UACA,GAAG,SACa;CAChB,MAAM,CAAC,YAAY,mBAAmB,SAAS,YAAY;CAE3D,MAAM,gBAAgB,aACnB,SAAiB;EAChB,IAAI,UAAU,KAAA,GACZ,gBAAgB,IAAI;EAEtB,gBAAgB,IAAI;CACtB,GACA,CAAC,OAAO,aAAa,CACvB;CAEA,MAAM,cAAc,SAAS;CAE7B,MAAM,eAAe;EACnB,WAAW,GACT,wIACA,SACF;EACA,oBAAoB;EACpB,aAAa;EACb;CACF;CAEA,OACE,oBAAC,gBAAgB,UAAjB;EAA0B,OAAO;GAAE,YAAY;GAAa;EAAc;EACvE,UAAA,UAAU;GACT,gBAAgB;GAChB;GACA,OAAO,WAAkB,cAAc,KAAK;EAC9C,CAAC;CACuB,CAAA;AAE9B;AAGA,SAAS,gBAAgB,EACvB,WACA,QACA,UACA,GAAG,SAC+B;CAClC,MAAM,eAAe;EACnB,WAAW,GAAG,iCAAiC,SAAS;EACxD,aAAa;EACb;CACF;CAEA,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB,cAAc,KAAK;CAC9C,CAAC;AACH;AAKA,SAAS,aAAa,EAAE,WAAW,QAAQ,UAAU,GAAG,SAA4B;CAClF,MAAM,eAAe;EACnB,WAAW,GACT,8GACA,SACF;EACA,a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ACH"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
import { cn } from "@kumix/utils";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { ChevronDownIcon, MinusIcon, PlusIcon } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
7
|
import { useRender } from "@base-ui/react/use-render";
|
|
8
8
|
//#region src/components/reui/tree.tsx
|
|
@@ -103,8 +103,9 @@ function TreeDragLine({ className, ...props }) {
|
|
|
103
103
|
console.warn("TreeDragLine: No tree provided via context or tree does not have getDragLineStyle method");
|
|
104
104
|
return null;
|
|
105
105
|
}
|
|
106
|
+
const dragLine = tree.getDragLineStyle();
|
|
106
107
|
return /* @__PURE__ */ jsx("div", {
|
|
107
|
-
style:
|
|
108
|
+
style: dragLine,
|
|
108
109
|
className: cn("absolute z-30 -mt-px h-0.5 w-[unset] bg-primary before:absolute before:-top-[3px] before:left-0 before:size-2 before:border-2 before:border-primary before:bg-background", "before:rounded-full", className),
|
|
109
110
|
...props
|
|
110
111
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.js","names":[],"sources":["../../../src/components/reui/tree.tsx"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: <> */\n\n\"use client\";\n\nimport { createContext, useContext } from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { ItemInstance } from \"@headless-tree/core\";\nimport { ChevronDownIcon, MinusIcon, PlusIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\n\ntype ToggleIconType = \"chevron\" | \"plus-minus\";\n\ninterface TreeContextValue<T = any> {\n indent: number;\n currentItem?: ItemInstance<T>;\n tree?: any;\n toggleIconType?: ToggleIconType;\n}\n\nconst TreeContext = createContext<TreeContextValue>({\n indent: 20,\n currentItem: undefined,\n tree: undefined,\n toggleIconType: \"plus-minus\",\n});\n\nfunction useTreeContext<T = any>() {\n return useContext(TreeContext) as TreeContextValue<T>;\n}\n\ninterface TreeProps extends React.HTMLAttributes<HTMLDivElement> {\n indent?: number;\n tree?: any;\n toggleIconType?: ToggleIconType;\n}\n\nfunction Tree({ indent = 20, tree, className, toggleIconType = \"chevron\", ...props }: TreeProps) {\n const containerProps =\n tree && typeof tree.getContainerProps === \"function\" ? tree.getContainerProps() : {};\n const mergedProps = { ...props, ...containerProps };\n\n // Extract style from mergedProps to merge with our custom styles\n const { style: propStyle, ...otherProps } = mergedProps;\n\n // Merge styles\n const mergedStyle = {\n ...propStyle,\n \"--tree-indent\": `${indent}px`,\n } as React.CSSProperties;\n\n return (\n <TreeContext.Provider value={{ indent, tree, toggleIconType }}>\n <div\n data-slot=\"tree\"\n style={mergedStyle}\n className={cn(\"flex flex-col\", className)}\n {...otherProps}\n />\n </TreeContext.Provider>\n );\n}\n\ninterface TreeItemProps<T = any> extends Omit<useRender.ComponentProps<\"button\">, \"indent\"> {\n item: ItemInstance<T>;\n indent?: number;\n}\n\nfunction TreeItem<T = any>({ item, className, render, children, ...props }: TreeItemProps<T>) {\n const parentContext = useTreeContext<T>();\n const { indent } = parentContext;\n\n const itemProps = typeof item.getProps === \"function\" ? item.getProps() : {};\n const mergedProps = { ...props, children, ...itemProps };\n\n // Extract style from mergedProps to merge with our custom styles\n const { style: propStyle, ...otherProps } = mergedProps;\n\n // Merge styles\n const mergedStyle = {\n ...propStyle,\n \"--tree-padding\": `${item.getItemMeta().level * indent}px`,\n } as React.CSSProperties;\n\n const defaultProps = {\n \"data-slot\": \"tree-item\",\n style: mergedStyle,\n className: cn(\n \"z-10 select-none ps-(--tree-padding) not-last:pb-0.5 outline-hidden focus:z-20 data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n ),\n \"data-focus\": typeof item.isFocused === \"function\" ? item.isFocused() || false : undefined,\n \"data-folder\": typeof item.isFolder === \"function\" ? item.isFolder() || false : undefined,\n \"data-selected\": typeof item.isSelected === \"function\" ? item.isSelected() || false : undefined,\n \"data-drag-target\":\n typeof item.isDragTarget === \"function\" ? item.isDragTarget() || false : undefined,\n \"data-search-match\":\n typeof item.isMatchingSearch === \"function\" ? item.isMatchingSearch() || false : undefined,\n \"aria-expanded\": item.isExpanded(),\n };\n\n return (\n <TreeContext.Provider value={{ ...parentContext, currentItem: item }}>\n {useRender({\n defaultTagName: \"button\",\n render,\n props: mergeProps<\"button\">(defaultProps, otherProps),\n })}\n </TreeContext.Provider>\n );\n}\n\ninterface TreeItemLabelProps<T = any> extends React.HTMLAttributes<HTMLSpanElement> {\n item?: ItemInstance<T>;\n}\n\nfunction TreeItemLabel<T = any>({\n item: propItem,\n children,\n className,\n ...props\n}: TreeItemLabelProps<T>) {\n const { currentItem, toggleIconType } = useTreeContext<T>();\n const item = propItem || currentItem;\n\n if (!item) {\n console.warn(\"TreeItemLabel: No item provided via props or context\");\n return null;\n }\n\n return (\n <span\n data-slot=\"tree-item-label\"\n className={cn(\n \"flex items-center gap-1 bg-background in-data-[drag-target=true]:bg-accent in-data-[search-match=true]:bg-blue-50! in-data-[selected=true]:bg-accent not-in-data-[folder=true]:ps-7 in-data-[selected=true]:text-accent-foreground in-focus-visible:ring-[3px] in-focus-visible:ring-ring/50 transition-colors hover:bg-accent [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n \"rounded-md\",\n \"py-1.5\",\n \"px-2\",\n \"text-sm\",\n className,\n )}\n {...props}\n >\n {item.isFolder() &&\n (toggleIconType === \"plus-minus\" ? (\n item.isExpanded() ? (\n <MinusIcon\n className=\"size-3.5 text-muted-foreground\"\n stroke=\"currentColor\"\n strokeWidth=\"1\"\n />\n ) : (\n <PlusIcon\n className=\"size-3.5 text-muted-foreground\"\n stroke=\"currentColor\"\n strokeWidth=\"1\"\n />\n )\n ) : (\n <ChevronDownIcon className=\"size-4 in-aria-[expanded=false]:-rotate-90 text-muted-foreground\" />\n ))}\n {children || (typeof item.getItemName === \"function\" ? item.getItemName() : null)}\n </span>\n );\n}\n\nfunction TreeDragLine({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n const { tree } = useTreeContext();\n\n if (!tree || typeof tree.getDragLineStyle !== \"function\") {\n console.warn(\n \"TreeDragLine: No tree provided via context or tree does not have getDragLineStyle method\",\n );\n return null;\n }\n\n const dragLine = tree.getDragLineStyle();\n return (\n <div\n style={dragLine}\n className={cn(\n \"absolute z-30 -mt-px h-0.5 w-[unset] bg-primary before:absolute before:-top-[3px] before:left-0 before:size-2 before:border-2 before:border-primary before:bg-background\",\n \"before:rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Tree, TreeDragLine, TreeItem, TreeItemLabel };\n"],"mappings":";;;;;;;;;AAqBA,MAAM,cAAc,cAAgC;CAClD,QAAQ;CACR,aAAa,KAAA;CACb,MAAM,KAAA;CACN,gBAAgB;AAClB,CAAC;AAED,SAAS,iBAA0B;CACjC,OAAO,WAAW,WAAW;AAC/B;AAQA,SAAS,KAAK,EAAE,SAAS,IAAI,MAAM,WAAW,iBAAiB,WAAW,GAAG,SAAoB;CAC/F,MAAM,iBACJ,QAAQ,OAAO,KAAK,sBAAsB,aAAa,KAAK,kBAAkB,IAAI,CAAC;CAIrF,MAAM,EAAE,OAAO,WAAW,GAAG,eAAe;EAHtB,GAAG;EAAO,GAAG;CAGmB;CAGtD,MAAM,cAAc;EAClB,GAAG;EACH,iBAAiB,GAAG,OAAO;CAC7B;CAEA,OACE,oBAAC,YAAY,UAAb;EAAsB,OAAO;GAAE;GAAQ;GAAM;EAAe;EAC1D,UAAA,oBAAC,OAAD;GACE,aAAU;GACV,OAAO;GACP,WAAW,GAAG,iBAAiB,SAAS;GACxC,GAAI;EACL,CAAA;CACmB,CAAA;AAE1B;AAOA,SAAS,SAAkB,EAAE,MAAM,WAAW,QAAQ,UAAU,GAAG,SAA2B;CAC5F,MAAM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ACd,oBAAC,WAAD;GACE,WAAU;GACV,QAAO;GACP,aAAY;EACb,CAAA,IAED,oBAAC,UAAD;GACE,WAAU;GACV,QAAO;GACP,aAAY;EACb,CAAA,IAGH,oBAAC,iBAAD,EAAiB,WAAU,mEAAoE,CAAA,IAElG,aAAa,OAAO,KAAK,gBAAgB,aAAa,KAAK,YAAY,IAAI,KACxE;;AAEV;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA+C;CACnF,MAAM,EAAE,SAAS,eAAe;CAEhC,IAAI,CAAC,QAAQ,OAAO,KAAK,qBAAqB,YAAY;EACxD,QAAQ,KACN,0FACF;EACA,OAAO;CACT;
|
|
1
|
+
{"version":3,"file":"tree.js","names":[],"sources":["../../../src/components/reui/tree.tsx"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: <> */\n\n\"use client\";\n\nimport { createContext, useContext } from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { ItemInstance } from \"@headless-tree/core\";\nimport { ChevronDownIcon, MinusIcon, PlusIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\n\ntype ToggleIconType = \"chevron\" | \"plus-minus\";\n\ninterface TreeContextValue<T = any> {\n indent: number;\n currentItem?: ItemInstance<T>;\n tree?: any;\n toggleIconType?: ToggleIconType;\n}\n\nconst TreeContext = createContext<TreeContextValue>({\n indent: 20,\n currentItem: undefined,\n tree: undefined,\n toggleIconType: \"plus-minus\",\n});\n\nfunction useTreeContext<T = any>() {\n return useContext(TreeContext) as TreeContextValue<T>;\n}\n\ninterface TreeProps extends React.HTMLAttributes<HTMLDivElement> {\n indent?: number;\n tree?: any;\n toggleIconType?: ToggleIconType;\n}\n\nfunction Tree({ indent = 20, tree, className, toggleIconType = \"chevron\", ...props }: TreeProps) {\n const containerProps =\n tree && typeof tree.getContainerProps === \"function\" ? tree.getContainerProps() : {};\n const mergedProps = { ...props, ...containerProps };\n\n // Extract style from mergedProps to merge with our custom styles\n const { style: propStyle, ...otherProps } = mergedProps;\n\n // Merge styles\n const mergedStyle = {\n ...propStyle,\n \"--tree-indent\": `${indent}px`,\n } as React.CSSProperties;\n\n return (\n <TreeContext.Provider value={{ indent, tree, toggleIconType }}>\n <div\n data-slot=\"tree\"\n style={mergedStyle}\n className={cn(\"flex flex-col\", className)}\n {...otherProps}\n />\n </TreeContext.Provider>\n );\n}\n\ninterface TreeItemProps<T = any> extends Omit<useRender.ComponentProps<\"button\">, \"indent\"> {\n item: ItemInstance<T>;\n indent?: number;\n}\n\nfunction TreeItem<T = any>({ item, className, render, children, ...props }: TreeItemProps<T>) {\n const parentContext = useTreeContext<T>();\n const { indent } = parentContext;\n\n const itemProps = typeof item.getProps === \"function\" ? item.getProps() : {};\n const mergedProps = { ...props, children, ...itemProps };\n\n // Extract style from mergedProps to merge with our custom styles\n const { style: propStyle, ...otherProps } = mergedProps;\n\n // Merge styles\n const mergedStyle = {\n ...propStyle,\n \"--tree-padding\": `${item.getItemMeta().level * indent}px`,\n } as React.CSSProperties;\n\n const defaultProps = {\n \"data-slot\": \"tree-item\",\n style: mergedStyle,\n className: cn(\n \"z-10 select-none ps-(--tree-padding) not-last:pb-0.5 outline-hidden focus:z-20 data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n ),\n \"data-focus\": typeof item.isFocused === \"function\" ? item.isFocused() || false : undefined,\n \"data-folder\": typeof item.isFolder === \"function\" ? item.isFolder() || false : undefined,\n \"data-selected\": typeof item.isSelected === \"function\" ? item.isSelected() || false : undefined,\n \"data-drag-target\":\n typeof item.isDragTarget === \"function\" ? item.isDragTarget() || false : undefined,\n \"data-search-match\":\n typeof item.isMatchingSearch === \"function\" ? item.isMatchingSearch() || false : undefined,\n \"aria-expanded\": item.isExpanded(),\n };\n\n return (\n <TreeContext.Provider value={{ ...parentContext, currentItem: item }}>\n {useRender({\n defaultTagName: \"button\",\n render,\n props: mergeProps<\"button\">(defaultProps, otherProps),\n })}\n </TreeContext.Provider>\n );\n}\n\ninterface TreeItemLabelProps<T = any> extends React.HTMLAttributes<HTMLSpanElement> {\n item?: ItemInstance<T>;\n}\n\nfunction TreeItemLabel<T = any>({\n item: propItem,\n children,\n className,\n ...props\n}: TreeItemLabelProps<T>) {\n const { currentItem, toggleIconType } = useTreeContext<T>();\n const item = propItem || currentItem;\n\n if (!item) {\n console.warn(\"TreeItemLabel: No item provided via props or context\");\n return null;\n }\n\n return (\n <span\n data-slot=\"tree-item-label\"\n className={cn(\n \"flex items-center gap-1 bg-background in-data-[drag-target=true]:bg-accent in-data-[search-match=true]:bg-blue-50! in-data-[selected=true]:bg-accent not-in-data-[folder=true]:ps-7 in-data-[selected=true]:text-accent-foreground in-focus-visible:ring-[3px] in-focus-visible:ring-ring/50 transition-colors hover:bg-accent [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n \"rounded-md\",\n \"py-1.5\",\n \"px-2\",\n \"text-sm\",\n className,\n )}\n {...props}\n >\n {item.isFolder() &&\n (toggleIconType === \"plus-minus\" ? (\n item.isExpanded() ? (\n <MinusIcon\n className=\"size-3.5 text-muted-foreground\"\n stroke=\"currentColor\"\n strokeWidth=\"1\"\n />\n ) : (\n <PlusIcon\n className=\"size-3.5 text-muted-foreground\"\n stroke=\"currentColor\"\n strokeWidth=\"1\"\n />\n )\n ) : (\n <ChevronDownIcon className=\"size-4 in-aria-[expanded=false]:-rotate-90 text-muted-foreground\" />\n ))}\n {children || (typeof item.getItemName === \"function\" ? item.getItemName() : null)}\n </span>\n );\n}\n\nfunction TreeDragLine({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n const { tree } = useTreeContext();\n\n if (!tree || typeof tree.getDragLineStyle !== \"function\") {\n console.warn(\n \"TreeDragLine: No tree provided via context or tree does not have getDragLineStyle method\",\n );\n return null;\n }\n\n const dragLine = tree.getDragLineStyle();\n return (\n <div\n style={dragLine}\n className={cn(\n \"absolute z-30 -mt-px h-0.5 w-[unset] bg-primary before:absolute before:-top-[3px] before:left-0 before:size-2 before:border-2 before:border-primary before:bg-background\",\n \"before:rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Tree, TreeDragLine, TreeItem, TreeItemLabel };\n"],"mappings":";;;;;;;;;AAqBA,MAAM,cAAc,cAAgC;CAClD,QAAQ;CACR,aAAa,KAAA;CACb,MAAM,KAAA;CACN,gBAAgB;AAClB,CAAC;AAED,SAAS,iBAA0B;CACjC,OAAO,WAAW,WAAW;AAC/B;AAQA,SAAS,KAAK,EAAE,SAAS,IAAI,MAAM,WAAW,iBAAiB,WAAW,GAAG,SAAoB;CAC/F,MAAM,iBACJ,QAAQ,OAAO,KAAK,sBAAsB,aAAa,KAAK,kBAAkB,IAAI,CAAC;CAIrF,MAAM,EAAE,OAAO,WAAW,GAAG,eAAe;EAHtB,GAAG;EAAO,GAAG;CAGmB;CAGtD,MAAM,cAAc;EAClB,GAAG;EACH,iBAAiB,GAAG,OAAO;CAC7B;CAEA,OACE,oBAAC,YAAY,UAAb;EAAsB,OAAO;GAAE;GAAQ;GAAM;EAAe;EAC1D,UAAA,oBAAC,OAAD;GACE,aAAU;GACV,OAAO;GACP,WAAW,GAAG,iBAAiB,SAAS;GACxC,GAAI;EACL,CAAA;CACmB,CAAA;AAE1B;AAOA,SAAS,SAAkB,EAAE,MAAM,WAAW,QAAQ,UAAU,GAAG,SAA2B;CAC5F,MAAM,gBAAgB,eAAkB;CACxC,MAAM,EAAE,WAAW;CAEnB,MAAM,YAAY,OAAO,KAAK,aAAa,aAAa,KAAK,SAAS,IAAI,CAAC;CAI3E,MAAM,EAAE,OAAO,WAAW,GAAG,eAAe;EAHtB,GAAG;EAAO;EAAU,GAAG;CAGS;CAQtD,MAAM,eAAe;EACnB,aAAa;EACb,OAAO;GANP,GAAG;GACH,kBAAkB,GAAG,KAAK,YAAY,CAAC,CAAC,QAAQ,OAAO;EAKtC;EACjB,WAAW,GACT,iJACA,SACF;EACA,cAAc,OAAO,KAAK,cAAc,aAAa,KA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,QAAQ,KACN,0FACF;EACA,OAAO;CACT;CAEA,MAAM,WAAW,KAAK,iBAAiB;CACvC,OACE,oBAAC,OAAD;EACE,OAAO;EACP,WAAW,GACT,4KACA,uBACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "@kumix/utils";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
6
6
|
//#region src/components/ui/accordion.tsx
|
|
7
7
|
function Accordion({ className, ...props }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
3
|
import { cn } from "@kumix/utils";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/ui/alert-dialog.tsx
|
|
7
7
|
function AlertDialog({ ...props }) {
|
|
8
8
|
return /* @__PURE__ */ jsx(AlertDialog$1.Root, {
|
|
@@ -5,13 +5,13 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
5
5
|
//#region src/components/ui/attachment.d.ts
|
|
6
6
|
declare const attachmentVariants: (props?: ({
|
|
7
7
|
size?: "default" | "sm" | "xs" | null | undefined;
|
|
8
|
-
orientation?: "
|
|
8
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
declare function Attachment({ className, state, size, orientation, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof attachmentVariants> & {
|
|
11
11
|
state?: "idle" | "uploading" | "processing" | "error" | "done";
|
|
12
12
|
}): React$1.JSX.Element;
|
|
13
13
|
declare const attachmentMediaVariants: (props?: ({
|
|
14
|
-
variant?: "
|
|
14
|
+
variant?: "icon" | "image" | null | undefined;
|
|
15
15
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
16
|
declare function AttachmentMedia({ className, variant, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof attachmentMediaVariants>): React$1.JSX.Element;
|
|
17
17
|
declare function AttachmentContent({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
3
|
//#region src/components/ui/badge.d.ts
|
|
4
4
|
declare const badgeVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
5
|
+
variant?: "link" | "ghost" | "outline" | "secondary" | "default" | "destructive" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
8
8
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "@kumix/utils";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
7
7
|
//#region src/components/ui/breadcrumb.tsx
|
|
@@ -4,7 +4,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
4
4
|
//#region src/components/ui/bubble.d.ts
|
|
5
5
|
declare function BubbleGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
6
6
|
declare const bubbleVariants: (props?: ({
|
|
7
|
-
variant?: "ghost" | "outline" | "secondary" | "default" | "
|
|
7
|
+
variant?: "ghost" | "outline" | "secondary" | "default" | "destructive" | "muted" | "tinted" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
declare function Bubble({ variant, align, className, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
|
|
10
10
|
align?: "start" | "end";
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
//#region src/components/ui/button-group.d.ts
|
|
5
5
|
declare const buttonGroupVariants: (props?: ({
|
|
6
|
-
orientation?: "
|
|
6
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): import("react").JSX.Element;
|
|
9
9
|
declare function ButtonGroupText({ className, render, ...props }: useRender.ComponentProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { VariantProps } from "class-variance-authority";
|
|
2
1
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
//#region src/components/ui/button.d.ts
|
|
4
4
|
declare const buttonVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
6
|
-
size?: "
|
|
5
|
+
variant?: "link" | "ghost" | "outline" | "secondary" | "default" | "destructive" | null | undefined;
|
|
6
|
+
size?: "icon" | "default" | "sm" | "lg" | "xs" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function Button({ className, variant, size, ...props }: Button$1.Props & VariantProps<typeof buttonVariants>): import("react").JSX.Element;
|
|
9
9
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "@kumix/utils";
|
|
3
|
+
import { Button as Button$1 } from "@base-ui/react/button";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { Button as Button$1 } from "@base-ui/react/button";
|
|
6
6
|
//#region src/components/ui/button.tsx
|
|
7
7
|
const buttonVariants = cva("group/button inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-lg border border-transparent bg-clip-padding font-medium text-sm outline-none transition-all focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
8
8
|
variants: {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Button, buttonVariants } from "./button.js";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import { cn } from "@kumix/utils";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
5
|
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
8
8
|
//#region src/components/ui/calendar.tsx
|
|
9
9
|
function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", locale, formatters, components, ...props }) {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import { cn } from "@kumix/utils";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import useEmblaCarousel from "embla-carousel-react";
|
|
8
8
|
//#region src/components/ui/carousel.tsx
|
|
9
9
|
const CarouselContext = React$1.createContext(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "@kumix/utils";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { CheckIcon } from "lucide-react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
6
6
|
//#region src/components/ui/checkbox.tsx
|
|
7
7
|
function Checkbox({ className, ...props }) {
|
|
@@ -3,8 +3,8 @@ import { Button } from "./button.js";
|
|
|
3
3
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.js";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
5
|
import { cn } from "@kumix/utils";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Combobox as Combobox$1 } from "@base-ui/react";
|
|
9
9
|
//#region src/components/ui/combobox.tsx
|
|
10
10
|
const Combobox = Combobox$1.Root;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { InputGroup, InputGroupAddon } from "./input-group.js";
|
|
3
3
|
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "./dialog.js";
|
|
4
4
|
import { cn } from "@kumix/utils";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { CheckIcon, SearchIcon } from "lucide-react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Command as Command$1 } from "cmdk";
|
|
8
8
|
//#region src/components/ui/command.tsx
|
|
9
9
|
function Command({ className, ...props }) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "@kumix/utils";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { CheckIcon, ChevronRightIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
|
|
6
6
|
//#region src/components/ui/context-menu.tsx
|
|
7
7
|
function ContextMenu({ ...props }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
3
|
import { cn } from "@kumix/utils";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { XIcon } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
7
7
|
//#region src/components/ui/dialog.tsx
|
|
8
8
|
function Dialog({ ...props }) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "@kumix/utils";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { CheckIcon, ChevronRightIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Menu } from "@base-ui/react/menu";
|
|
6
6
|
//#region src/components/ui/dropdown-menu.tsx
|
|
7
7
|
function DropdownMenu({ ...props }) {
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
declare function Empty({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
4
4
|
declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
5
5
|
declare const emptyMediaVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "icon" | "default" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): import("react").JSX.Element;
|
|
9
9
|
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
@@ -7,7 +7,7 @@ declare function FieldLegend({ className, variant, ...props }: React.ComponentPr
|
|
|
7
7
|
}): import("react").JSX.Element;
|
|
8
8
|
declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
9
9
|
declare const fieldVariants: (props?: ({
|
|
10
|
-
orientation?: "
|
|
10
|
+
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
11
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
12
|
declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react").JSX.Element;
|
|
13
13
|
declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { cn } from "@kumix/utils";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { MinusIcon } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
7
7
|
//#region src/components/ui/input-otp.tsx
|
|
8
8
|
function InputOTP({ className, containerClassName, ...props }) {
|
|
@@ -11,7 +11,7 @@ declare const itemVariants: (props?: ({
|
|
|
11
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
12
|
declare function Item({ className, variant, size, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof itemVariants>): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
|
|
13
13
|
declare const itemMediaVariants: (props?: ({
|
|
14
|
-
variant?: "
|
|
14
|
+
variant?: "icon" | "default" | "image" | null | undefined;
|
|
15
15
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
16
|
declare function ItemMedia({ className, variant, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): React$1.JSX.Element;
|
|
17
17
|
declare function ItemContent({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
//#region src/components/ui/marker.d.ts
|
|
5
5
|
declare const markerVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "separator" | "default" | "border" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function Marker({ className, variant, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof markerVariants>): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
|
|
9
9
|
declare function MarkerIcon({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js";
|
|
3
3
|
import { cn } from "@kumix/utils";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { CheckIcon } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Menu } from "@base-ui/react/menu";
|
|
7
7
|
import { Menubar as Menubar$1 } from "@base-ui/react/menubar";
|
|
8
8
|
//#region src/components/ui/menubar.tsx
|