@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
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { EASE_OUT } from "../../lib/ease.js";
|
|
3
|
+
import { useCallback, useId, useLayoutEffect, useRef, useState } from "react";
|
|
4
|
+
import { cn } from "@kumix/utils";
|
|
5
|
+
import { ChevronDown } from "lucide-react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { motion, useReducedMotion } from "motion/react";
|
|
8
|
+
//#region src/components/motion/bouncy-accordion.tsx
|
|
9
|
+
const ROW_TRANSITION = {
|
|
10
|
+
type: "spring",
|
|
11
|
+
duration: .55,
|
|
12
|
+
bounce: .38
|
|
13
|
+
};
|
|
14
|
+
const CONTENT_OPEN_TRANSITION = {
|
|
15
|
+
type: "spring",
|
|
16
|
+
duration: .58,
|
|
17
|
+
bounce: .32
|
|
18
|
+
};
|
|
19
|
+
const CONTENT_CLOSE_TRANSITION = {
|
|
20
|
+
type: "spring",
|
|
21
|
+
duration: .46,
|
|
22
|
+
bounce: .26
|
|
23
|
+
};
|
|
24
|
+
const DESCRIPTION_TRANSITION = {
|
|
25
|
+
duration: .18,
|
|
26
|
+
ease: EASE_OUT
|
|
27
|
+
};
|
|
28
|
+
const CHEVRON_TRANSITION = {
|
|
29
|
+
type: "spring",
|
|
30
|
+
duration: .42,
|
|
31
|
+
bounce: .28
|
|
32
|
+
};
|
|
33
|
+
function useControllableAccordionValue({ value, defaultValue, onValueChange }) {
|
|
34
|
+
const [internalValue, setInternalValue] = useState(defaultValue ?? null);
|
|
35
|
+
const isControlled = value !== void 0;
|
|
36
|
+
return [value ?? internalValue, useCallback((next) => {
|
|
37
|
+
if (!isControlled) setInternalValue(next);
|
|
38
|
+
onValueChange?.(next);
|
|
39
|
+
}, [isControlled, onValueChange])];
|
|
40
|
+
}
|
|
41
|
+
function BouncyAccordionRow({ item, open, startsGroup, endsGroup, separatedFromPrevious, contentId, triggerId, reduce, classNames, onToggle }) {
|
|
42
|
+
const contentRef = useRef(null);
|
|
43
|
+
const [contentHeight, setContentHeight] = useState(0);
|
|
44
|
+
useLayoutEffect(() => {
|
|
45
|
+
const node = contentRef.current;
|
|
46
|
+
if (!node) return;
|
|
47
|
+
const updateHeight = () => {
|
|
48
|
+
setContentHeight(node.offsetHeight);
|
|
49
|
+
};
|
|
50
|
+
updateHeight();
|
|
51
|
+
const observer = new ResizeObserver(updateHeight);
|
|
52
|
+
observer.observe(node);
|
|
53
|
+
return () => {
|
|
54
|
+
observer.disconnect();
|
|
55
|
+
};
|
|
56
|
+
}, []);
|
|
57
|
+
return /* @__PURE__ */ jsx(motion.div, {
|
|
58
|
+
layout: "position",
|
|
59
|
+
initial: false,
|
|
60
|
+
style: { marginTop: separatedFromPrevious ? 12 : 0 },
|
|
61
|
+
transition: reduce ? { duration: 0 } : ROW_TRANSITION,
|
|
62
|
+
children: /* @__PURE__ */ jsxs(motion.div, {
|
|
63
|
+
"data-state": open ? "open" : "closed",
|
|
64
|
+
initial: false,
|
|
65
|
+
animate: {
|
|
66
|
+
borderTopLeftRadius: startsGroup ? 28 : 0,
|
|
67
|
+
borderTopRightRadius: startsGroup ? 28 : 0,
|
|
68
|
+
borderBottomLeftRadius: endsGroup ? 28 : 0,
|
|
69
|
+
borderBottomRightRadius: endsGroup ? 28 : 0
|
|
70
|
+
},
|
|
71
|
+
transition: reduce ? { duration: 0 } : ROW_TRANSITION,
|
|
72
|
+
className: cn("overflow-hidden bg-card text-card-foreground", item.disabled && "opacity-50", classNames?.item),
|
|
73
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
|
74
|
+
id: triggerId,
|
|
75
|
+
type: "button",
|
|
76
|
+
disabled: item.disabled,
|
|
77
|
+
"aria-expanded": open,
|
|
78
|
+
"aria-controls": contentId,
|
|
79
|
+
onClick: onToggle,
|
|
80
|
+
className: cn("flex min-h-[54px] w-full items-center gap-4 px-5 text-left outline-none transition-colors", "focus-visible:bg-muted/25", "disabled:pointer-events-none", classNames?.trigger),
|
|
81
|
+
children: [
|
|
82
|
+
item.icon ? /* @__PURE__ */ jsx("span", {
|
|
83
|
+
className: cn("grid h-7 w-7 shrink-0 place-items-center text-muted-foreground", classNames?.icon),
|
|
84
|
+
children: item.icon
|
|
85
|
+
}) : null,
|
|
86
|
+
/* @__PURE__ */ jsx("span", {
|
|
87
|
+
className: cn("min-w-0 flex-1 truncate font-medium text-[15px] text-foreground", classNames?.title),
|
|
88
|
+
children: item.title
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ jsx(motion.span, {
|
|
91
|
+
"aria-hidden": true,
|
|
92
|
+
animate: { rotate: open ? 180 : 0 },
|
|
93
|
+
transition: reduce ? { duration: 0 } : CHEVRON_TRANSITION,
|
|
94
|
+
className: cn("grid h-6 w-6 shrink-0 place-items-center text-muted-foreground", classNames?.chevron),
|
|
95
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}), /* @__PURE__ */ jsx(motion.div, {
|
|
99
|
+
layout: "size",
|
|
100
|
+
id: contentId,
|
|
101
|
+
role: "region",
|
|
102
|
+
"aria-labelledby": triggerId,
|
|
103
|
+
"aria-hidden": !open,
|
|
104
|
+
inert: !open,
|
|
105
|
+
initial: false,
|
|
106
|
+
style: { height: open && item.description ? contentHeight : 0 },
|
|
107
|
+
transition: reduce ? { duration: 0 } : open ? CONTENT_OPEN_TRANSITION : CONTENT_CLOSE_TRANSITION,
|
|
108
|
+
className: cn("overflow-hidden", classNames?.content),
|
|
109
|
+
children: /* @__PURE__ */ jsx(motion.div, {
|
|
110
|
+
ref: contentRef,
|
|
111
|
+
animate: { opacity: open ? 1 : 0 },
|
|
112
|
+
transition: reduce ? { duration: 0 } : DESCRIPTION_TRANSITION,
|
|
113
|
+
className: "px-5 pb-5",
|
|
114
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
115
|
+
className: cn("text-[15px] text-muted-foreground leading-6", classNames?.description),
|
|
116
|
+
children: item.description
|
|
117
|
+
})
|
|
118
|
+
})
|
|
119
|
+
})]
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function BouncyAccordion({ items, value, defaultValue = null, onValueChange, collapsible = true, className, classNames }) {
|
|
124
|
+
const reduce = useReducedMotion();
|
|
125
|
+
const baseId = useId();
|
|
126
|
+
const [activeValue, setActiveValue] = useControllableAccordionValue({
|
|
127
|
+
value,
|
|
128
|
+
defaultValue,
|
|
129
|
+
onValueChange
|
|
130
|
+
});
|
|
131
|
+
const activeIndex = items.findIndex((item) => item.id === activeValue);
|
|
132
|
+
const toggleItem = useCallback((id) => {
|
|
133
|
+
if (activeValue === id) {
|
|
134
|
+
if (collapsible) setActiveValue(null);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
setActiveValue(id);
|
|
138
|
+
}, [
|
|
139
|
+
activeValue,
|
|
140
|
+
collapsible,
|
|
141
|
+
setActiveValue
|
|
142
|
+
]);
|
|
143
|
+
return /* @__PURE__ */ jsx("div", {
|
|
144
|
+
className: cn("w-full", className, classNames?.root),
|
|
145
|
+
children: items.map((item, index) => {
|
|
146
|
+
const open = activeValue === item.id;
|
|
147
|
+
const previousIsOpen = activeIndex === index - 1;
|
|
148
|
+
const nextIsOpen = activeIndex === index + 1;
|
|
149
|
+
const startsGroup = open || index === 0 || previousIsOpen;
|
|
150
|
+
const endsGroup = open || index === items.length - 1 || nextIsOpen;
|
|
151
|
+
const separatedFromPrevious = index > 0 && (open || previousIsOpen);
|
|
152
|
+
const contentId = `${baseId}-${item.id}-content`;
|
|
153
|
+
const triggerId = `${baseId}-${item.id}-trigger`;
|
|
154
|
+
return /* @__PURE__ */ jsx(BouncyAccordionRow, {
|
|
155
|
+
item,
|
|
156
|
+
open,
|
|
157
|
+
startsGroup,
|
|
158
|
+
endsGroup,
|
|
159
|
+
separatedFromPrevious,
|
|
160
|
+
contentId,
|
|
161
|
+
triggerId,
|
|
162
|
+
reduce,
|
|
163
|
+
classNames,
|
|
164
|
+
onToggle: () => toggleItem(item.id)
|
|
165
|
+
}, item.id);
|
|
166
|
+
})
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
export { BouncyAccordion };
|
|
171
|
+
|
|
172
|
+
//# sourceMappingURL=bouncy-accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bouncy-accordion.js","names":[],"sources":["../../../src/components/motion/bouncy-accordion.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactNode, useCallback, useId, useLayoutEffect, useRef, useState } from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport { motion, type Transition, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT } from \"../../lib/ease\";\n\nexport type BouncyAccordionItem = {\n id: string;\n title: ReactNode;\n description?: ReactNode;\n icon?: ReactNode;\n disabled?: boolean;\n};\n\nexport type BouncyAccordionClassNames = {\n root?: string;\n item?: string;\n trigger?: string;\n icon?: string;\n title?: string;\n chevron?: string;\n content?: string;\n description?: string;\n};\n\nexport interface BouncyAccordionProps {\n items: BouncyAccordionItem[];\n value?: string | null;\n defaultValue?: string | null;\n onValueChange?: (value: string | null) => void;\n collapsible?: boolean;\n className?: string;\n classNames?: BouncyAccordionClassNames;\n}\n\n// Local springs keep the accordion's connected groups moving together while\n// avoiding scale projection on text-heavy row contents.\n// Gap spring: must not overshoot y — positive y overshoot drifts items below\n// their mt-3 resting point and briefly overlaps the next item.\nconst ROW_TRANSITION: Transition = {\n type: \"spring\",\n duration: 0.55,\n bounce: 0.38,\n};\n\nconst CONTENT_OPEN_TRANSITION: Transition = {\n type: \"spring\",\n duration: 0.58,\n bounce: 0.32,\n};\n\nconst CONTENT_CLOSE_TRANSITION: Transition = {\n type: \"spring\",\n duration: 0.46,\n bounce: 0.26,\n};\n\nconst DESCRIPTION_TRANSITION: Transition = {\n duration: 0.18,\n ease: EASE_OUT,\n};\n\nconst CHEVRON_TRANSITION: Transition = {\n type: \"spring\",\n duration: 0.42,\n bounce: 0.28,\n};\n\nfunction useControllableAccordionValue({\n value,\n defaultValue,\n onValueChange,\n}: {\n value?: string | null;\n defaultValue?: string | null;\n onValueChange?: (value: string | null) => void;\n}) {\n const [internalValue, setInternalValue] = useState(defaultValue ?? null);\n const isControlled = value !== undefined;\n const currentValue = value ?? internalValue;\n\n const setValue = useCallback(\n (next: string | null) => {\n if (!isControlled) {\n setInternalValue(next);\n }\n\n onValueChange?.(next);\n },\n [isControlled, onValueChange],\n );\n\n return [currentValue, setValue] as const;\n}\n\nfunction BouncyAccordionRow({\n item,\n open,\n startsGroup,\n endsGroup,\n separatedFromPrevious,\n contentId,\n triggerId,\n reduce,\n classNames,\n onToggle,\n}: {\n item: BouncyAccordionItem;\n open: boolean;\n startsGroup: boolean;\n endsGroup: boolean;\n separatedFromPrevious: boolean;\n contentId: string;\n triggerId: string;\n reduce: boolean | null;\n classNames?: BouncyAccordionClassNames;\n onToggle: () => void;\n}) {\n const contentRef = useRef<HTMLDivElement>(null);\n const [contentHeight, setContentHeight] = useState(0);\n\n useLayoutEffect(() => {\n const node = contentRef.current;\n if (!node) return;\n\n const updateHeight = () => {\n setContentHeight(node.offsetHeight);\n };\n\n updateHeight();\n\n const observer = new ResizeObserver(updateHeight);\n observer.observe(node);\n\n return () => {\n observer.disconnect();\n };\n }, []);\n\n return (\n <motion.div\n layout=\"position\"\n initial={false}\n style={{ marginTop: separatedFromPrevious ? 12 : 0 }}\n transition={reduce ? { duration: 0 } : ROW_TRANSITION}\n >\n <motion.div\n data-state={open ? \"open\" : \"closed\"}\n initial={false}\n animate={{\n borderTopLeftRadius: startsGroup ? 28 : 0,\n borderTopRightRadius: startsGroup ? 28 : 0,\n borderBottomLeftRadius: endsGroup ? 28 : 0,\n borderBottomRightRadius: endsGroup ? 28 : 0,\n }}\n transition={reduce ? { duration: 0 } : ROW_TRANSITION}\n className={cn(\n \"overflow-hidden bg-card text-card-foreground\",\n item.disabled && \"opacity-50\",\n classNames?.item,\n )}\n >\n <button\n id={triggerId}\n type=\"button\"\n disabled={item.disabled}\n aria-expanded={open}\n aria-controls={contentId}\n onClick={onToggle}\n className={cn(\n \"flex min-h-[54px] w-full items-center gap-4 px-5 text-left outline-none transition-colors\",\n \"focus-visible:bg-muted/25\",\n \"disabled:pointer-events-none\",\n classNames?.trigger,\n )}\n >\n {item.icon ? (\n <span\n className={cn(\n \"grid h-7 w-7 shrink-0 place-items-center text-muted-foreground\",\n classNames?.icon,\n )}\n >\n {item.icon}\n </span>\n ) : null}\n <span\n className={cn(\n \"min-w-0 flex-1 truncate font-medium text-[15px] text-foreground\",\n classNames?.title,\n )}\n >\n {item.title}\n </span>\n <motion.span\n aria-hidden\n animate={{ rotate: open ? 180 : 0 }}\n transition={reduce ? { duration: 0 } : CHEVRON_TRANSITION}\n className={cn(\n \"grid h-6 w-6 shrink-0 place-items-center text-muted-foreground\",\n classNames?.chevron,\n )}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </motion.span>\n </button>\n\n <motion.div\n layout=\"size\"\n id={contentId}\n role=\"region\"\n aria-labelledby={triggerId}\n aria-hidden={!open}\n inert={!open}\n initial={false}\n style={{ height: open && item.description ? contentHeight : 0 }}\n transition={\n reduce ? { duration: 0 } : open ? CONTENT_OPEN_TRANSITION : CONTENT_CLOSE_TRANSITION\n }\n className={cn(\"overflow-hidden\", classNames?.content)}\n >\n <motion.div\n ref={contentRef}\n animate={{\n opacity: open ? 1 : 0,\n }}\n transition={reduce ? { duration: 0 } : DESCRIPTION_TRANSITION}\n className=\"px-5 pb-5\"\n >\n <div\n className={cn(\"text-[15px] text-muted-foreground leading-6\", classNames?.description)}\n >\n {item.description}\n </div>\n </motion.div>\n </motion.div>\n </motion.div>\n </motion.div>\n );\n}\n\nexport function BouncyAccordion({\n items,\n value,\n defaultValue = null,\n onValueChange,\n collapsible = true,\n className,\n classNames,\n}: BouncyAccordionProps) {\n const reduce = useReducedMotion();\n const baseId = useId();\n const [activeValue, setActiveValue] = useControllableAccordionValue({\n value,\n defaultValue,\n onValueChange,\n });\n const activeIndex = items.findIndex((item) => item.id === activeValue);\n\n const toggleItem = useCallback(\n (id: string) => {\n if (activeValue === id) {\n if (collapsible) {\n setActiveValue(null);\n }\n return;\n }\n\n setActiveValue(id);\n },\n [activeValue, collapsible, setActiveValue],\n );\n\n return (\n <div className={cn(\"w-full\", className, classNames?.root)}>\n {items.map((item, index) => {\n const open = activeValue === item.id;\n const previousIsOpen = activeIndex === index - 1;\n const nextIsOpen = activeIndex === index + 1;\n const startsGroup = open || index === 0 || previousIsOpen;\n const endsGroup = open || index === items.length - 1 || nextIsOpen;\n const separatedFromPrevious = index > 0 && (open || previousIsOpen);\n const contentId = `${baseId}-${item.id}-content`;\n const triggerId = `${baseId}-${item.id}-trigger`;\n\n return (\n <BouncyAccordionRow\n key={item.id}\n item={item}\n open={open}\n startsGroup={startsGroup}\n endsGroup={endsGroup}\n separatedFromPrevious={separatedFromPrevious}\n contentId={contentId}\n triggerId={triggerId}\n reduce={reduce}\n classNames={classNames}\n onToggle={() => toggleItem(item.id)}\n />\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AA0CA,MAAM,iBAA6B;CACjC,MAAM;CACN,UAAU;CACV,QAAQ;AACV;AAEA,MAAM,0BAAsC;CAC1C,MAAM;CACN,UAAU;CACV,QAAQ;AACV;AAEA,MAAM,2BAAuC;CAC3C,MAAM;CACN,UAAU;CACV,QAAQ;AACV;AAEA,MAAM,yBAAqC;CACzC,UAAU;CACV,MAAM;AACR;AAEA,MAAM,qBAAiC;CACrC,MAAM;CACN,UAAU;CACV,QAAQ;AACV;AAEA,SAAS,8BAA8B,EACrC,OACA,cACA,iBAKC;CACD,MAAM,CAAC,eAAe,oBAAoB,SAAS,gBAAgB,IAAI;CACvE,MAAM,eAAe,UAAU,KAAA;CAc/B,OAAO,CAbc,SAAS,eAEb,aACd,SAAwB;EACvB,IAAI,CAAC,cACH,iBAAiB,IAAI;EAGvB,gBAAgB,IAAI;CACtB,GACA,CAAC,cAAc,aAAa,CAGD,CAAC;AAChC;AAEA,SAAS,mBAAmB,EAC1B,MACA,MACA,aACA,WACA,uBACA,WACA,WACA,QACA,YACA,YAYC;CACD,MAAM,aAAa,OAAuB,IAAI;CAC9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UAAU,KAAK;GAC3C,MAAM,YAAY,QAAQ,UAAU,MAAM,SAAS,KAAK;GACxD,MAAM,wBAAwB,QAAQ,MAAM,QAAQ;GACpD,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG;GACvC,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG;GAEvC,OACE,oBAAC,oBAAD;IAEQ;IACA;IACO;IACF;IACY;IACZ;IACA;IACH;IACI;IACZ,gBAAgB,WAAW,KAAK,EAAE;GACnC,GAXM,KAAK,EAWX;EAEL,CAAC;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { HTMLMotionProps } from "motion/react";
|
|
3
|
+
//#region src/components/motion/button/base.d.ts
|
|
4
|
+
type ButtonVariant = "primary" | "secondary" | "ghost" | "outline";
|
|
5
|
+
type ButtonSize = "sm" | "md" | "lg" | "icon";
|
|
6
|
+
interface ButtonProps extends Omit<HTMLMotionProps<"button">, "children"> {
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
size?: ButtonSize;
|
|
9
|
+
pressScale?: number;
|
|
10
|
+
/** Spawn a Material-style ripple from the press point. Off by default. */
|
|
11
|
+
ripple?: boolean;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Button, ButtonProps, ButtonSize, ButtonVariant };
|
|
17
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","names":[],"sources":["../../../../src/components/motion/button/base.tsx"],"mappings":";;;KAgBY;KACA;UAEK,oBAAoB,KAAK;EACxC,UAAU;EACV,OAAO;EACP;;EAEA;EACA,WAAW;;cAmBA,wBAAM,0BAAA,KAAA,sCAAA,cAAA"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useHoverCapable } from "../../../hooks/use-hover-capable.js";
|
|
3
|
+
import { EASE_OUT, SPRING_PRESS } from "../../../lib/ease.js";
|
|
4
|
+
import { forwardRef, useCallback, useRef, useState } from "react";
|
|
5
|
+
import { cn } from "@kumix/utils";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
8
|
+
//#region src/components/motion/button/base.tsx
|
|
9
|
+
const VARIANT_CLASS = {
|
|
10
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
11
|
+
secondary: "border border-border bg-card text-foreground hover:border-border",
|
|
12
|
+
ghost: "text-muted-foreground hover:text-foreground hover:bg-primary/5",
|
|
13
|
+
outline: "border border-border bg-transparent text-foreground hover:bg-primary/5"
|
|
14
|
+
};
|
|
15
|
+
const SIZE_CLASS = {
|
|
16
|
+
sm: "h-8 px-3 text-xs gap-1.5 rounded-full",
|
|
17
|
+
md: "h-10 px-5 text-sm gap-2 rounded-full",
|
|
18
|
+
lg: "h-12 px-6 text-base gap-2 rounded-full",
|
|
19
|
+
icon: "h-8 w-8 rounded-lg"
|
|
20
|
+
};
|
|
21
|
+
const Button = forwardRef(function Button({ variant = "primary", size = "md", pressScale = .93, ripple = false, className, children, onPointerDown, ...rest }, ref) {
|
|
22
|
+
const reduce = useReducedMotion();
|
|
23
|
+
const canHover = useHoverCapable();
|
|
24
|
+
const [ripples, setRipples] = useState([]);
|
|
25
|
+
const nextId = useRef(0);
|
|
26
|
+
const handlePointerDown = useCallback((event) => {
|
|
27
|
+
if (ripple && !reduce) {
|
|
28
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
29
|
+
const size = Math.max(rect.width, rect.height) * 2;
|
|
30
|
+
const id = nextId.current++;
|
|
31
|
+
setRipples((prev) => [...prev, {
|
|
32
|
+
id,
|
|
33
|
+
x: event.clientX - rect.left,
|
|
34
|
+
y: event.clientY - rect.top,
|
|
35
|
+
size
|
|
36
|
+
}]);
|
|
37
|
+
}
|
|
38
|
+
onPointerDown?.(event);
|
|
39
|
+
}, [
|
|
40
|
+
ripple,
|
|
41
|
+
reduce,
|
|
42
|
+
onPointerDown
|
|
43
|
+
]);
|
|
44
|
+
return /* @__PURE__ */ jsxs(motion.button, {
|
|
45
|
+
ref,
|
|
46
|
+
type: "button",
|
|
47
|
+
whileTap: reduce ? void 0 : { scale: pressScale },
|
|
48
|
+
whileHover: reduce || !canHover ? void 0 : { scale: 1.02 },
|
|
49
|
+
transition: SPRING_PRESS,
|
|
50
|
+
onPointerDown: handlePointerDown,
|
|
51
|
+
className: cn("inline-flex select-none items-center justify-center font-medium", "transition-colors", "disabled:pointer-events-none disabled:opacity-50", ripple && "relative overflow-hidden", VARIANT_CLASS[variant], SIZE_CLASS[size], className),
|
|
52
|
+
...rest,
|
|
53
|
+
children: [ripple && !reduce ? /* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: "pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit]",
|
|
55
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, { children: ripples.map((r) => /* @__PURE__ */ jsx(motion.span, {
|
|
56
|
+
className: "absolute rounded-full bg-current",
|
|
57
|
+
style: {
|
|
58
|
+
left: r.x,
|
|
59
|
+
top: r.y,
|
|
60
|
+
width: r.size,
|
|
61
|
+
height: r.size,
|
|
62
|
+
x: "-50%",
|
|
63
|
+
y: "-50%"
|
|
64
|
+
},
|
|
65
|
+
initial: {
|
|
66
|
+
scale: .05,
|
|
67
|
+
opacity: .3
|
|
68
|
+
},
|
|
69
|
+
animate: {
|
|
70
|
+
scale: 1,
|
|
71
|
+
opacity: 0
|
|
72
|
+
},
|
|
73
|
+
exit: { opacity: 0 },
|
|
74
|
+
transition: {
|
|
75
|
+
duration: 1.6,
|
|
76
|
+
ease: EASE_OUT
|
|
77
|
+
},
|
|
78
|
+
onAnimationComplete: () => setRipples((prev) => prev.filter((x) => x.id !== r.id))
|
|
79
|
+
}, r.id)) })
|
|
80
|
+
}) : null, children]
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
//#endregion
|
|
84
|
+
export { Button };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","names":[],"sources":["../../../../src/components/motion/button/base.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n forwardRef,\n type PointerEvent,\n type ReactNode,\n useCallback,\n useRef,\n useState,\n} from \"react\";\nimport { AnimatePresence, type HTMLMotionProps, motion, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { useHoverCapable } from \"../../../hooks/use-hover-capable\";\nimport { EASE_OUT, SPRING_PRESS } from \"../../../lib/ease\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"ghost\" | \"outline\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\" | \"icon\";\n\nexport interface ButtonProps extends Omit<HTMLMotionProps<\"button\">, \"children\"> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n pressScale?: number;\n /** Spawn a Material-style ripple from the press point. Off by default. */\n ripple?: boolean;\n children?: ReactNode;\n}\n\ntype Ripple = { id: number; x: number; y: number; size: number };\n\nconst VARIANT_CLASS: Record<ButtonVariant, string> = {\n primary: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n secondary: \"border border-border bg-card text-foreground hover:border-border\",\n ghost: \"text-muted-foreground hover:text-foreground hover:bg-primary/5\",\n outline: \"border border-border bg-transparent text-foreground hover:bg-primary/5\",\n};\n\nconst SIZE_CLASS: Record<ButtonSize, string> = {\n sm: \"h-8 px-3 text-xs gap-1.5 rounded-full\",\n md: \"h-10 px-5 text-sm gap-2 rounded-full\",\n lg: \"h-12 px-6 text-base gap-2 rounded-full\",\n icon: \"h-8 w-8 rounded-lg\",\n};\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = \"primary\",\n size = \"md\",\n pressScale = 0.93,\n ripple = false,\n className,\n children,\n onPointerDown,\n ...rest\n },\n ref,\n) {\n const reduce = useReducedMotion();\n const canHover = useHoverCapable();\n const [ripples, setRipples] = useState<Ripple[]>([]);\n const nextId = useRef(0);\n\n const handlePointerDown = useCallback(\n (event: PointerEvent<HTMLButtonElement>) => {\n if (ripple && !reduce) {\n const rect = event.currentTarget.getBoundingClientRect();\n const size = Math.max(rect.width, rect.height) * 2;\n const id = nextId.current++;\n setRipples((prev) => [\n ...prev,\n {\n id,\n x: event.clientX - rect.left,\n y: event.clientY - rect.top,\n size,\n },\n ]);\n }\n onPointerDown?.(event);\n },\n [ripple, reduce, onPointerDown],\n );\n\n return (\n <motion.button\n ref={ref}\n type=\"button\"\n whileTap={reduce ? undefined : { scale: pressScale }}\n whileHover={reduce || !canHover ? undefined : { scale: 1.02 }}\n transition={SPRING_PRESS}\n onPointerDown={handlePointerDown}\n className={cn(\n \"inline-flex select-none items-center justify-center font-medium\",\n \"transition-colors\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n ripple && \"relative overflow-hidden\",\n VARIANT_CLASS[variant],\n SIZE_CLASS[size],\n className,\n )}\n {...rest}\n >\n {ripple && !reduce ? (\n <span className=\"pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit]\">\n <AnimatePresence>\n {ripples.map((r) => (\n <motion.span\n key={r.id}\n className=\"absolute rounded-full bg-current\"\n style={{\n left: r.x,\n top: r.y,\n width: r.size,\n height: r.size,\n x: \"-50%\",\n y: \"-50%\",\n }}\n initial={{ scale: 0.05, opacity: 0.3 }}\n animate={{ scale: 1, opacity: 0 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 1.6, ease: EASE_OUT }}\n onAnimationComplete={() => setRipples((prev) => prev.filter((x) => x.id !== r.id))}\n />\n ))}\n </AnimatePresence>\n </span>\n ) : null}\n {children}\n </motion.button>\n );\n});\n"],"mappings":";;;;;;;;AA8BA,MAAM,g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QAAQ,EAAE;KACV,GAAG;KACH,GAAG;IACL;IACA,SAAS;KAAE,OAAO;KAAM,SAAS;IAAI;IACrC,SAAS;KAAE,OAAO;KAAG,SAAS;IAAE;IAChC,MAAM,EAAE,SAAS,EAAE;IACnB,YAAY;KAAE,UAAU;KAAK,MAAM;IAAS;IAC5C,2BAA2B,YAAY,SAAS,KAAK,QAAQ,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC;GAClF,GAfM,EAAE,EAeR,CACF,EACc,CAAA;EACb,CAAA,IACJ,MACH,QACY;;AAEnB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Button, ButtonProps, ButtonSize, ButtonVariant } from "./base.js";
|
|
2
|
+
import { MagneticButton, MagneticButtonProps } from "./magnetic.js";
|
|
3
|
+
import { ButtonState, StatefulButton, StatefulButtonProps } from "./stateful.js";
|
|
4
|
+
export { Button, type ButtonProps, type ButtonSize, type ButtonState, type ButtonVariant, MagneticButton, type MagneticButtonProps, StatefulButton, type StatefulButtonProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ButtonProps } from "./base.js";
|
|
2
|
+
//#region src/components/motion/button/magnetic.d.ts
|
|
3
|
+
interface MagneticButtonProps extends ButtonProps {
|
|
4
|
+
/** Magnetic pull strength. Default 0.25. */
|
|
5
|
+
strength?: number;
|
|
6
|
+
/** Class applied to the magnetic wrapper. */
|
|
7
|
+
magneticClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const MagneticButton: import("react").ForwardRefExoticComponent<Omit<MagneticButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { MagneticButton, MagneticButtonProps };
|
|
12
|
+
//# sourceMappingURL=magnetic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"magnetic.d.ts","names":[],"sources":["../../../../src/components/motion/button/magnetic.tsx"],"mappings":";;UAOiB,4BAA4B;;EAE3C;;EAEA;;cAGW,gCAAc,0BAAA,KAAA,8CAAA,cAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "./base.js";
|
|
3
|
+
import { Magnetic } from "../magnetic.js";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/motion/button/magnetic.tsx
|
|
7
|
+
const MagneticButton = forwardRef(function MagneticButton({ strength = .25, magneticClassName, children, ...rest }, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Magnetic, {
|
|
9
|
+
strength,
|
|
10
|
+
className: magneticClassName,
|
|
11
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
12
|
+
ref,
|
|
13
|
+
...rest,
|
|
14
|
+
children
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { MagneticButton };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=magnetic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"magnetic.js","names":[],"sources":["../../../../src/components/motion/button/magnetic.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef } from \"react\";\n\nimport { Magnetic } from \"../magnetic\";\nimport { Button, type ButtonProps } from \"./base\";\n\nexport interface MagneticButtonProps extends ButtonProps {\n /** Magnetic pull strength. Default 0.25. */\n strength?: number;\n /** Class applied to the magnetic wrapper. */\n magneticClassName?: string;\n}\n\nexport const MagneticButton = forwardRef<HTMLButtonElement, MagneticButtonProps>(\n function MagneticButton({ strength = 0.25, magneticClassName, children, ...rest }, ref) {\n return (\n <Magnetic strength={strength} className={magneticClassName}>\n <Button ref={ref} {...rest}>\n {children}\n </Button>\n </Magnetic>\n );\n },\n);\n"],"mappings":";;;;;;AAcA,MAAa,iBAAiB,WAC5B,SAAS,eAAe,EAAE,WAAW,KAAM,mBAAmB,UAAU,GAAG,QAAQ,KAAK;CACtF,OACE,oBAAC,UAAD;EAAoB;EAAU,WAAW;EACvC,UAAA,oBAAC,QAAD;GAAa;GAAK,GAAI;GACnB;EACK,CAAA;CACA,CAAA;AAEd,CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ButtonProps } from "./base.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
//#region src/components/motion/button/stateful.d.ts
|
|
4
|
+
type ButtonState = "idle" | "loading" | "success" | "error";
|
|
5
|
+
interface StatefulButtonProps extends Omit<ButtonProps, "children"> {
|
|
6
|
+
state?: ButtonState;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
loadingText?: ReactNode;
|
|
9
|
+
successText?: ReactNode;
|
|
10
|
+
errorText?: ReactNode;
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const StatefulButton: import("react").ForwardRefExoticComponent<Omit<StatefulButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { ButtonState, StatefulButton, StatefulButtonProps };
|
|
16
|
+
//# sourceMappingURL=stateful.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stateful.d.ts","names":[],"sources":["../../../../src/components/motion/button/stateful.tsx"],"mappings":";;;KASY;UAEK,4BAA4B,KAAK;EAChD,QAAQ;EACR,UAAU;EACV,cAAc;EACd,cAAc;EACd,YAAY;EACZ,OAAO;;cAuII,gCAAc,0BAAA,KAAA,8CAAA,cAAA"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { EASE_OUT, SPRING_SWAP } from "../../../lib/ease.js";
|
|
3
|
+
import { Button } from "./base.js";
|
|
4
|
+
import { forwardRef, useLayoutEffect, useRef, useState } from "react";
|
|
5
|
+
import { Check, Loader2, X } from "lucide-react";
|
|
6
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
8
|
+
//#region src/components/motion/button/stateful.tsx
|
|
9
|
+
const CASCADE_STAGGER = .025;
|
|
10
|
+
const ROLL_BLUR = "blur(6px)";
|
|
11
|
+
const CASCADE_LETTER_VARIANTS = {
|
|
12
|
+
initial: {
|
|
13
|
+
opacity: 0,
|
|
14
|
+
y: "105%",
|
|
15
|
+
filter: ROLL_BLUR
|
|
16
|
+
},
|
|
17
|
+
animate: (delay = 0) => ({
|
|
18
|
+
opacity: 1,
|
|
19
|
+
y: "0%",
|
|
20
|
+
filter: "blur(0px)",
|
|
21
|
+
transition: {
|
|
22
|
+
...SPRING_SWAP,
|
|
23
|
+
delay
|
|
24
|
+
}
|
|
25
|
+
}),
|
|
26
|
+
exit: (delay = 0) => ({
|
|
27
|
+
opacity: 0,
|
|
28
|
+
y: "-105%",
|
|
29
|
+
filter: ROLL_BLUR,
|
|
30
|
+
transition: {
|
|
31
|
+
duration: .16,
|
|
32
|
+
ease: EASE_OUT,
|
|
33
|
+
delay: delay * .5
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
};
|
|
37
|
+
const ICON_VARIANTS = {
|
|
38
|
+
initial: {
|
|
39
|
+
opacity: 0,
|
|
40
|
+
width: 0,
|
|
41
|
+
scale: .7,
|
|
42
|
+
filter: ROLL_BLUR
|
|
43
|
+
},
|
|
44
|
+
animate: {
|
|
45
|
+
opacity: 1,
|
|
46
|
+
width: "1.5rem",
|
|
47
|
+
scale: 1,
|
|
48
|
+
filter: "blur(0px)",
|
|
49
|
+
transition: SPRING_SWAP
|
|
50
|
+
},
|
|
51
|
+
exit: {
|
|
52
|
+
opacity: 0,
|
|
53
|
+
width: 0,
|
|
54
|
+
scale: .7,
|
|
55
|
+
filter: ROLL_BLUR,
|
|
56
|
+
transition: {
|
|
57
|
+
duration: .16,
|
|
58
|
+
ease: EASE_OUT
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
function IconSlot({ keyId, children }) {
|
|
63
|
+
const reduce = useReducedMotion();
|
|
64
|
+
return /* @__PURE__ */ jsx(motion.span, {
|
|
65
|
+
variants: ICON_VARIANTS,
|
|
66
|
+
initial: reduce ? { opacity: 0 } : "initial",
|
|
67
|
+
animate: reduce ? { opacity: 1 } : "animate",
|
|
68
|
+
exit: reduce ? { opacity: 0 } : "exit",
|
|
69
|
+
transition: reduce ? { duration: .15 } : void 0,
|
|
70
|
+
className: "inline-grid shrink-0 place-items-center overflow-hidden",
|
|
71
|
+
children
|
|
72
|
+
}, keyId);
|
|
73
|
+
}
|
|
74
|
+
function TextSlot({ value, children }) {
|
|
75
|
+
const reduce = useReducedMotion();
|
|
76
|
+
const measureRef = useRef(null);
|
|
77
|
+
const [width, setWidth] = useState();
|
|
78
|
+
const label = typeof children === "string" ? children : null;
|
|
79
|
+
const cascade = label !== null && !reduce;
|
|
80
|
+
useLayoutEffect(() => {
|
|
81
|
+
const nextWidth = measureRef.current?.offsetWidth;
|
|
82
|
+
if (!nextWidth) return;
|
|
83
|
+
setWidth((current) => current === nextWidth ? current : nextWidth);
|
|
84
|
+
});
|
|
85
|
+
return /* @__PURE__ */ jsxs(motion.span, {
|
|
86
|
+
initial: false,
|
|
87
|
+
animate: { width },
|
|
88
|
+
transition: reduce ? { duration: 0 } : SPRING_SWAP,
|
|
89
|
+
className: "relative inline-block overflow-hidden whitespace-nowrap align-bottom",
|
|
90
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
91
|
+
ref: measureRef,
|
|
92
|
+
"aria-hidden": true,
|
|
93
|
+
className: "invisible inline-block whitespace-nowrap",
|
|
94
|
+
children: cascade ? label.split("").map((char, index) => /* @__PURE__ */ jsx("span", {
|
|
95
|
+
className: "inline-block whitespace-pre",
|
|
96
|
+
children: char
|
|
97
|
+
}, index)) : children
|
|
98
|
+
}), cascade ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
99
|
+
className: "sr-only",
|
|
100
|
+
children: label
|
|
101
|
+
}), /* @__PURE__ */ jsx(AnimatePresence, {
|
|
102
|
+
initial: false,
|
|
103
|
+
children: /* @__PURE__ */ jsx(motion.span, {
|
|
104
|
+
"aria-hidden": true,
|
|
105
|
+
initial: "initial",
|
|
106
|
+
animate: "animate",
|
|
107
|
+
exit: "exit",
|
|
108
|
+
className: "absolute top-0 left-0 inline-block whitespace-pre",
|
|
109
|
+
children: label.split("").map((char, index) => /* @__PURE__ */ jsx(motion.span, {
|
|
110
|
+
custom: index * CASCADE_STAGGER,
|
|
111
|
+
variants: CASCADE_LETTER_VARIANTS,
|
|
112
|
+
className: "inline-block whitespace-pre will-change-[opacity,filter,transform]",
|
|
113
|
+
children: char
|
|
114
|
+
}, index))
|
|
115
|
+
}, `cascade-${value}`)
|
|
116
|
+
})] }) : /* @__PURE__ */ jsx(AnimatePresence, {
|
|
117
|
+
initial: false,
|
|
118
|
+
children: /* @__PURE__ */ jsx(motion.span, {
|
|
119
|
+
initial: reduce ? { opacity: 0 } : {
|
|
120
|
+
opacity: 0,
|
|
121
|
+
y: 14,
|
|
122
|
+
filter: ROLL_BLUR
|
|
123
|
+
},
|
|
124
|
+
animate: reduce ? { opacity: 1 } : {
|
|
125
|
+
opacity: 1,
|
|
126
|
+
y: 0,
|
|
127
|
+
filter: "blur(0px)"
|
|
128
|
+
},
|
|
129
|
+
exit: reduce ? { opacity: 0 } : {
|
|
130
|
+
opacity: 0,
|
|
131
|
+
y: -14,
|
|
132
|
+
filter: ROLL_BLUR
|
|
133
|
+
},
|
|
134
|
+
transition: reduce ? { duration: .15 } : SPRING_SWAP,
|
|
135
|
+
className: "absolute top-0 left-0 inline-block will-change-[opacity,filter,transform]",
|
|
136
|
+
children
|
|
137
|
+
}, `text-${value}`)
|
|
138
|
+
})]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
const StatefulButton = forwardRef(function StatefulButton({ state = "idle", children, loadingText = "Loading", successText = "Done", errorText = "Try again", icon, disabled, ...rest }, ref) {
|
|
142
|
+
const isBusy = state === "loading";
|
|
143
|
+
const stateText = state === "loading" ? loadingText : state === "success" ? successText : state === "error" ? errorText : children;
|
|
144
|
+
const textKey = typeof stateText === "string" ? `${state}-${stateText}` : state;
|
|
145
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
146
|
+
ref,
|
|
147
|
+
disabled: disabled || isBusy,
|
|
148
|
+
"aria-busy": isBusy,
|
|
149
|
+
whileHover: void 0,
|
|
150
|
+
...rest,
|
|
151
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
152
|
+
"aria-live": "polite",
|
|
153
|
+
className: "relative inline-flex items-center justify-center overflow-hidden",
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ jsxs(AnimatePresence, {
|
|
156
|
+
initial: false,
|
|
157
|
+
children: [
|
|
158
|
+
state === "loading" ? /* @__PURE__ */ jsx(IconSlot, {
|
|
159
|
+
keyId: "loading-icon",
|
|
160
|
+
children: /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" })
|
|
161
|
+
}) : null,
|
|
162
|
+
state === "success" ? /* @__PURE__ */ jsx(IconSlot, {
|
|
163
|
+
keyId: "success-icon",
|
|
164
|
+
children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" })
|
|
165
|
+
}) : null,
|
|
166
|
+
state === "error" ? /* @__PURE__ */ jsx(IconSlot, {
|
|
167
|
+
keyId: "error-icon",
|
|
168
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
169
|
+
}) : null
|
|
170
|
+
]
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ jsx(TextSlot, {
|
|
173
|
+
value: textKey,
|
|
174
|
+
children: stateText
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ jsx(AnimatePresence, {
|
|
177
|
+
initial: false,
|
|
178
|
+
children: state === "idle" && icon ? /* @__PURE__ */ jsx(IconSlot, {
|
|
179
|
+
keyId: "idle-icon",
|
|
180
|
+
children: icon
|
|
181
|
+
}) : null
|
|
182
|
+
})
|
|
183
|
+
]
|
|
184
|
+
})
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
//#endregion
|
|
188
|
+
export { StatefulButton };
|
|
189
|
+
|
|
190
|
+
//# sourceMappingURL=stateful.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stateful.js","names":[],"sources":["../../../../src/components/motion/button/stateful.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef, type ReactNode, useLayoutEffect, useRef, useState } from \"react\";\nimport { Check, Loader2, X } from \"lucide-react\";\nimport { AnimatePresence, motion, useReducedMotion, type Variants } from \"motion/react\";\n\nimport { EASE_OUT, SPRING_SWAP } from \"../../../lib/ease\";\nimport { Button, type ButtonProps } from \"./base\";\n\nexport type ButtonState = \"idle\" | \"loading\" | \"success\" | \"error\";\n\nexport interface StatefulButtonProps extends Omit<ButtonProps, \"children\"> {\n state?: ButtonState;\n children: ReactNode;\n loadingText?: ReactNode;\n successText?: ReactNode;\n errorText?: ReactNode;\n icon?: ReactNode;\n}\n\nconst CASCADE_STAGGER = 0.025;\nconst ROLL_BLUR = \"blur(6px)\";\n\nconst CASCADE_LETTER_VARIANTS: Variants = {\n initial: { opacity: 0, y: \"105%\", filter: ROLL_BLUR },\n animate: (delay: number = 0) => ({\n opacity: 1,\n y: \"0%\",\n filter: \"blur(0px)\",\n transition: { ...SPRING_SWAP, delay },\n }),\n exit: (delay: number = 0) => ({\n opacity: 0,\n y: \"-105%\",\n filter: ROLL_BLUR,\n transition: { duration: 0.16, ease: EASE_OUT, delay: delay * 0.5 },\n }),\n};\n\nconst ICON_VARIANTS: Variants = {\n // Width collapses too, so the icon adds/removes its own space smoothly\n // instead of popping the row width in a single frame.\n initial: { opacity: 0, width: 0, scale: 0.7, filter: ROLL_BLUR },\n animate: {\n opacity: 1,\n width: \"1.5rem\",\n scale: 1,\n filter: \"blur(0px)\",\n transition: SPRING_SWAP,\n },\n exit: {\n opacity: 0,\n width: 0,\n scale: 0.7,\n filter: ROLL_BLUR,\n transition: { duration: 0.16, ease: EASE_OUT },\n },\n};\n\nfunction IconSlot({ keyId, children }: { keyId: string; children: ReactNode }) {\n const reduce = useReducedMotion();\n return (\n <motion.span\n key={keyId}\n variants={ICON_VARIANTS}\n initial={reduce ? { opacity: 0 } : \"initial\"}\n animate={reduce ? { opacity: 1 } : \"animate\"}\n exit={reduce ? { opacity: 0 } : \"exit\"}\n transition={reduce ? { duration: 0.15 } : undefined}\n className=\"inline-grid shrink-0 place-items-center overflow-hidden\"\n >\n {children}\n </motion.span>\n );\n}\n\nfunction TextSlot({ value, children }: { value: string; children: ReactNode }) {\n const reduce = useReducedMotion();\n const measureRef = useRef<HTMLSpanElement>(null);\n const [width, setWidth] = useState<number>();\n const label = typeof children === \"string\" ? children : null;\n const cascade = label !== null && !reduce;\n\n // Measure strings with the same per-letter layout as the cascade. Measuring\n // the whole string preserves kerning, which can make it narrower than the\n // inline-block letters and clip the final glyph during the width animation.\n useLayoutEffect(() => {\n const nextWidth = measureRef.current?.offsetWidth;\n if (!nextWidth) return;\n setWidth((current) => (current === nextWidth ? current : nextWidth));\n });\n\n return (\n <motion.span\n initial={false}\n animate={{ width }}\n transition={reduce ? { duration: 0 } : SPRING_SWAP}\n className=\"relative inline-block overflow-hidden whitespace-nowrap align-bottom\"\n >\n <span ref={measureRef} aria-hidden className=\"invisible inline-block whitespace-nowrap\">\n {cascade\n ? label.split(\"\").map((char, index) => (\n <span key={index} className=\"inline-block whitespace-pre\">\n {char}\n </span>\n ))\n : children}\n </span>\n\n {cascade ? (\n <>\n <span className=\"sr-only\">{label}</span>\n <AnimatePresence initial={false}>\n <motion.span\n key={`cascade-${value}`}\n aria-hidden\n initial=\"initial\"\n animate=\"animate\"\n exit=\"exit\"\n className=\"absolute top-0 left-0 inline-block whitespace-pre\"\n >\n {label.split(\"\").map((char, index) => (\n <motion.span\n key={index}\n custom={index * CASCADE_STAGGER}\n variants={CASCADE_LETTER_VARIANTS}\n className=\"inline-block whitespace-pre will-change-[opacity,filter,transform]\"\n >\n {char}\n </motion.span>\n ))}\n </motion.span>\n </AnimatePresence>\n </>\n ) : (\n <AnimatePresence initial={false}>\n <motion.span\n key={`text-${value}`}\n initial={reduce ? { opacity: 0 } : { opacity: 0, y: 14, filter: ROLL_BLUR }}\n animate={reduce ? { opacity: 1 } : { opacity: 1, y: 0, filter: \"blur(0px)\" }}\n exit={reduce ? { opacity: 0 } : { opacity: 0, y: -14, filter: ROLL_BLUR }}\n transition={reduce ? { duration: 0.15 } : SPRING_SWAP}\n className=\"absolute top-0 left-0 inline-block will-change-[opacity,filter,transform]\"\n >\n {children}\n </motion.span>\n </AnimatePresence>\n )}\n </motion.span>\n );\n}\n\nexport const StatefulButton = forwardRef<HTMLButtonElement, StatefulButtonProps>(\n function StatefulButton(\n {\n state = \"idle\",\n children,\n loadingText = \"Loading\",\n successText = \"Done\",\n errorText = \"Try again\",\n icon,\n disabled,\n ...rest\n },\n ref,\n ) {\n const isBusy = state === \"loading\";\n const stateText =\n state === \"loading\"\n ? loadingText\n : state === \"success\"\n ? successText\n : state === \"error\"\n ? errorText\n : children;\n const textKey = typeof stateText === \"string\" ? `${state}-${stateText}` : state;\n\n return (\n <Button\n ref={ref}\n disabled={disabled || isBusy}\n aria-busy={isBusy}\n whileHover={undefined}\n {...rest}\n >\n <span\n aria-live=\"polite\"\n className=\"relative inline-flex items-center justify-center overflow-hidden\"\n >\n <AnimatePresence initial={false}>\n {state === \"loading\" ? (\n <IconSlot keyId=\"loading-icon\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n </IconSlot>\n ) : null}\n {state === \"success\" ? (\n <IconSlot keyId=\"success-icon\">\n <Check className=\"h-4 w-4\" />\n </IconSlot>\n ) : null}\n {state === \"error\" ? (\n <IconSlot keyId=\"error-icon\">\n <X className=\"h-4 w-4\" />\n </IconSlot>\n ) : null}\n </AnimatePresence>\n\n <TextSlot value={textKey}>{stateText}</TextSlot>\n\n <AnimatePresence initial={false}>\n {state === \"idle\" && icon ? <IconSlot keyId=\"idle-icon\">{icon}</IconSlot> : null}\n </AnimatePresence>\n </span>\n </Button>\n );\n },\n);\n"],"mappings":";;;;;;;;AAoBA,MAAM,kBAAkB;AACxB,MAAM,YAAY;AAElB,MAAM,0BAAoC;CACxC,SAAS;EAAE,SAAS;EAAG,GAAG;EAAQ,QAAQ;CAAU;CACpD,UAAU,QAAgB,OAAO;EAC/B,SAAS;EACT,GAAG;EACH,QAAQ;EACR,YAAY;GAAE,GAAG;GAAa;EAAM;CACtC;CACA,OAAO,QAAgB,OAAO;EAC5B,SAAS;EACT,GAAG;EACH,QAAQ;EACR,YAAY;GAAE,UAAU;GAAM,MAAM;GAAU,OAAO,QAAQ;EAAI;CACnE;AACF;AAEA,MAAM,gBAA0B;CAG9B,SAAS;EAAE,SAAS;EAAG,OAAO;EAAG,OAAO;EAAK,QAAQ;CAAU;CAC/D,SAAS;EACP,SAAS;EACT,OAAO;EACP,OAAO;EACP,QAAQ;EACR,YAAY;CACd;CACA,MAAM;EACJ,SAAS;EACT,OAAO;EACP,OAAO;EACP,QAAQ;EACR,YAAY;GAAE,UAAU;GAAM,MAAM;EAAS;CAC/C;AACF;AAEA,SAAS,SAAS,EAAE,OAAO,YAAoD;CAC7E,MAAM,SAAS,iBAAiB;CAChC,OACE,oBAAC,OAAO,MAAR;EAEE,UAAU;EACV,SAAS,SAAS,EAAE,SAAS,EAAE,IAAI;EACnC,SAAS,SAAS,EAAE,SAAS,EAAE,IAAI;EACnC,MAAM,SAAS,EAAE,SAAS,EAAE,IAAI;EAChC,YAAY,SAAS,EAAE,UAAU,IAAK,IAAI,KAAA;EAC1C,WAAU;EAET;CACU,GATN,KASM;AAEjB;AAEA,SAAS,SAAS,EAAE,OAAO,YAAoD;CAC7E,MAAM,SAAS,iBAAiB;CAChC,MAAM,aAAa,OAAwB,IAAI;CAC/C,MAAM,CAAC,OAAO,YAAY,SAAiB;CAC3C,MAAM,QAAQ,OAAO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