@kumix/ui 0.3.10 → 0.3.12
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 +25 -25
- package/dist/components/agents/agent-activity/activity-row.d.ts +1 -2
- package/dist/components/agents/agent-activity/activity-row.d.ts.map +1 -1
- package/dist/components/agents/agent-activity/activity-row.js +1 -1
- package/dist/components/agents/agent-activity/index.d.ts +2 -2
- package/dist/components/agents/agent-activity/index.d.ts.map +1 -1
- package/dist/components/agents/agent-activity/index.js +1 -1
- package/dist/components/agents/agent-code.d.ts +8 -9
- package/dist/components/agents/agent-code.d.ts.map +1 -1
- package/dist/components/agents/agent-code.js +1 -1
- package/dist/components/agents/agent-disclosure.d.ts +2 -3
- package/dist/components/agents/agent-disclosure.d.ts.map +1 -1
- package/dist/components/agents/ai-sidebar.d.ts +8 -9
- package/dist/components/agents/ai-sidebar.d.ts.map +1 -1
- package/dist/components/agents/ai-sidebar.js +1 -1
- package/dist/components/agents/approval-card/index.d.ts +2 -2
- package/dist/components/agents/approval-card/index.d.ts.map +1 -1
- package/dist/components/agents/approval-card/index.js +1 -1
- package/dist/components/agents/chat-app.d.ts +2 -3
- package/dist/components/agents/chat-app.d.ts.map +1 -1
- package/dist/components/agents/citations.d.ts +10 -11
- package/dist/components/agents/citations.d.ts.map +1 -1
- package/dist/components/agents/citations.js +1 -1
- package/dist/components/agents/code-block.d.ts +3 -4
- package/dist/components/agents/code-block.d.ts.map +1 -1
- package/dist/components/agents/code-block.js +1 -1
- package/dist/components/agents/file-diff.d.ts +5 -6
- package/dist/components/agents/file-diff.d.ts.map +1 -1
- package/dist/components/agents/file-diff.js +1 -1
- package/dist/components/agents/image-generation.d.ts +3 -4
- package/dist/components/agents/image-generation.d.ts.map +1 -1
- package/dist/components/agents/image-generation.js +1 -1
- package/dist/components/agents/loading-states/agent-progress.d.ts +2 -3
- package/dist/components/agents/loading-states/agent-progress.d.ts.map +1 -1
- package/dist/components/agents/loading-states/reasoning-text.d.ts +3 -4
- package/dist/components/agents/loading-states/reasoning-text.d.ts.map +1 -1
- package/dist/components/agents/loading-states/thinking-shimmer.d.ts +2 -3
- package/dist/components/agents/loading-states/thinking-shimmer.d.ts.map +1 -1
- package/dist/components/agents/message-bubble.d.ts +10 -11
- package/dist/components/agents/message-bubble.d.ts.map +1 -1
- package/dist/components/agents/message-bubble.js +1 -1
- package/dist/components/agents/message-context.d.ts +2 -3
- package/dist/components/agents/message-context.d.ts.map +1 -1
- package/dist/components/agents/message-scroller.d.ts +2 -3
- package/dist/components/agents/message-scroller.d.ts.map +1 -1
- package/dist/components/agents/message.d.ts +18 -18
- package/dist/components/agents/message.d.ts.map +1 -1
- package/dist/components/agents/prompt-input.d.ts +4 -5
- package/dist/components/agents/prompt-input.d.ts.map +1 -1
- package/dist/components/agents/prompt-input.js +1 -1
- package/dist/components/agents/streaming-response.d.ts +4 -5
- package/dist/components/agents/streaming-response.d.ts.map +1 -1
- package/dist/components/agents/streaming-response.js +1 -1
- package/dist/components/agents/todo-list.d.ts +4 -5
- package/dist/components/agents/todo-list.d.ts.map +1 -1
- package/dist/components/agents/todo-list.js +1 -1
- package/dist/components/agents/tool-approval.d.ts +6 -7
- package/dist/components/agents/tool-approval.d.ts.map +1 -1
- package/dist/components/agents/tool-approval.js +1 -1
- package/dist/components/agents/tool-result.d.ts +6 -7
- package/dist/components/agents/tool-result.d.ts.map +1 -1
- package/dist/components/agents/tool-result.js +1 -1
- package/dist/components/custom/confirm-dialog.d.ts +2 -3
- package/dist/components/custom/confirm-dialog.d.ts.map +1 -1
- package/dist/components/custom/confirm-dialog.js +1 -1
- package/dist/components/custom/toast.d.ts +6 -7
- package/dist/components/custom/toast.d.ts.map +1 -1
- package/dist/components/motion/action-swap-blur.d.ts +7 -7
- package/dist/components/motion/action-swap-blur.d.ts.map +1 -1
- package/dist/components/motion/action-swap-cascade.d.ts +7 -7
- package/dist/components/motion/action-swap-cascade.d.ts.map +1 -1
- package/dist/components/motion/action-swap-roll.d.ts +7 -7
- package/dist/components/motion/action-swap-roll.d.ts.map +1 -1
- package/dist/components/motion/action-swap.d.ts +10 -11
- package/dist/components/motion/action-swap.d.ts.map +1 -1
- package/dist/components/motion/adaptive-stepper.d.ts +31 -0
- package/dist/components/motion/adaptive-stepper.d.ts.map +1 -0
- package/dist/components/motion/adaptive-stepper.js +302 -0
- package/dist/components/motion/adaptive-stepper.js.map +1 -0
- package/dist/components/motion/animated-badge.d.ts +4 -5
- package/dist/components/motion/animated-badge.d.ts.map +1 -1
- package/dist/components/motion/animated-badge.js +1 -1
- package/dist/components/motion/animated-number.d.ts +2 -3
- package/dist/components/motion/animated-number.d.ts.map +1 -1
- package/dist/components/motion/animated-sidebar.d.ts +28 -29
- package/dist/components/motion/animated-sidebar.d.ts.map +1 -1
- package/dist/components/motion/animated-sidebar.js +1 -1
- package/dist/components/motion/animated-toast-stack.d.ts +10 -11
- package/dist/components/motion/animated-toast-stack.d.ts.map +1 -1
- package/dist/components/motion/animated-toast-stack.js +1 -1
- package/dist/components/motion/attachment-upload.d.ts +7 -8
- package/dist/components/motion/attachment-upload.d.ts.map +1 -1
- package/dist/components/motion/attachment-upload.js +1 -1
- package/dist/components/motion/availability-scheduler/copy-menu.d.ts +1 -2
- package/dist/components/motion/availability-scheduler/copy-menu.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/copy-menu.js +1 -1
- package/dist/components/motion/availability-scheduler/day-row.d.ts +1 -2
- package/dist/components/motion/availability-scheduler/day-row.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/day-row.js +2 -2
- package/dist/components/motion/availability-scheduler/icon-button.d.ts +1 -2
- package/dist/components/motion/availability-scheduler/icon-button.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/index.d.ts +3 -3
- package/dist/components/motion/availability-scheduler/index.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/index.js +1 -1
- package/dist/components/motion/availability-scheduler/time-select.d.ts +1 -2
- package/dist/components/motion/availability-scheduler/time-select.d.ts.map +1 -1
- package/dist/components/motion/bloom-menu.d.ts +2 -3
- package/dist/components/motion/bloom-menu.d.ts.map +1 -1
- package/dist/components/motion/bloom-menu.js +1 -1
- package/dist/components/motion/bottom-sheet.d.ts +2 -3
- package/dist/components/motion/bottom-sheet.d.ts.map +1 -1
- package/dist/components/motion/bounce-sidebar.d.ts +3 -4
- package/dist/components/motion/bounce-sidebar.d.ts.map +1 -1
- package/dist/components/motion/bouncy-accordion.d.ts +4 -5
- package/dist/components/motion/bouncy-accordion.d.ts.map +1 -1
- package/dist/components/motion/bouncy-accordion.js +1 -1
- package/dist/components/motion/button/base.d.ts +6 -7
- package/dist/components/motion/button/base.d.ts.map +1 -1
- package/dist/components/motion/button/magnetic.d.ts +2 -3
- package/dist/components/motion/button/magnetic.d.ts.map +1 -1
- package/dist/components/motion/button/metallic.d.ts +2 -3
- package/dist/components/motion/button/metallic.d.ts.map +1 -1
- package/dist/components/motion/button/stateful.d.ts +3 -4
- package/dist/components/motion/button/stateful.d.ts.map +1 -1
- package/dist/components/motion/button/stateful.js +1 -1
- package/dist/components/motion/center-morph-modal.d.ts +8 -9
- package/dist/components/motion/center-morph-modal.d.ts.map +1 -1
- package/dist/components/motion/center-morph-modal.js +1 -1
- package/dist/components/motion/checkbox.d.ts +2 -3
- package/dist/components/motion/checkbox.d.ts.map +1 -1
- package/dist/components/motion/chromatic-text-reveal.d.ts +2 -3
- package/dist/components/motion/chromatic-text-reveal.d.ts.map +1 -1
- package/dist/components/motion/combobox/content.d.ts +2 -3
- package/dist/components/motion/combobox/content.d.ts.map +1 -1
- package/dist/components/motion/combobox/content.js +1 -1
- package/dist/components/motion/combobox/context.d.ts +9 -10
- package/dist/components/motion/combobox/context.d.ts.map +1 -1
- package/dist/components/motion/combobox/context.js +216 -1
- package/dist/components/motion/combobox/context.js.map +1 -0
- package/dist/components/motion/combobox/list.d.ts +12 -13
- package/dist/components/motion/combobox/list.d.ts.map +1 -1
- package/dist/components/motion/combobox/list.js +2 -2
- package/dist/components/motion/combobox/trigger.d.ts +6 -7
- package/dist/components/motion/combobox/trigger.d.ts.map +1 -1
- package/dist/components/motion/combobox/trigger.js +2 -2
- package/dist/components/motion/combobox.js +1 -1
- package/dist/components/motion/command-palette.d.ts +3 -4
- package/dist/components/motion/command-palette.d.ts.map +1 -1
- package/dist/components/motion/command-palette.js +1 -1
- package/dist/components/motion/context-menu.d.ts +20 -21
- package/dist/components/motion/context-menu.d.ts.map +1 -1
- package/dist/components/motion/context-menu.js +1 -1
- package/dist/components/motion/cylinder-carousel.d.ts +2 -3
- package/dist/components/motion/cylinder-carousel.d.ts.map +1 -1
- package/dist/components/motion/dock.d.ts +5 -6
- package/dist/components/motion/dock.d.ts.map +1 -1
- package/dist/components/motion/drawer.d.ts +2 -3
- package/dist/components/motion/drawer.d.ts.map +1 -1
- package/dist/components/motion/dynamic-island.d.ts +4 -5
- package/dist/components/motion/dynamic-island.d.ts.map +1 -1
- package/dist/components/motion/expandable-action-bar.d.ts +6 -7
- package/dist/components/motion/expandable-action-bar.d.ts.map +1 -1
- package/dist/components/motion/expandable-control.d.ts +4 -5
- package/dist/components/motion/expandable-control.d.ts.map +1 -1
- package/dist/components/motion/expandable-tabs.d.ts +4 -5
- package/dist/components/motion/expandable-tabs.d.ts.map +1 -1
- package/dist/components/motion/expanding-arrow-button.d.ts +2 -3
- package/dist/components/motion/expanding-arrow-button.d.ts.map +1 -1
- package/dist/components/motion/feedback-widget.d.ts +3 -4
- package/dist/components/motion/feedback-widget.d.ts.map +1 -1
- package/dist/components/motion/feedback-widget.js +1 -1
- package/dist/components/motion/file-tree.d.ts +7 -8
- package/dist/components/motion/file-tree.d.ts.map +1 -1
- package/dist/components/motion/file-tree.js +1 -1
- package/dist/components/motion/file-upload.d.ts +7 -8
- package/dist/components/motion/file-upload.d.ts.map +1 -1
- package/dist/components/motion/file-upload.js +1 -1
- package/dist/components/motion/hold-action-button.d.ts +2 -3
- package/dist/components/motion/hold-action-button.d.ts.map +1 -1
- package/dist/components/motion/infinite-masonry.d.ts +3 -4
- package/dist/components/motion/infinite-masonry.d.ts.map +1 -1
- package/dist/components/motion/infinite-masonry.js +1 -1
- package/dist/components/motion/input.d.ts +5 -4
- package/dist/components/motion/input.d.ts.map +1 -1
- package/dist/components/motion/input.js +28 -25
- package/dist/components/motion/input.js.map +1 -1
- package/dist/components/motion/liquid.d.ts +29 -0
- package/dist/components/motion/liquid.d.ts.map +1 -0
- package/dist/components/motion/liquid.js +248 -0
- package/dist/components/motion/liquid.js.map +1 -0
- package/dist/components/motion/loader.d.ts +3 -4
- package/dist/components/motion/loader.d.ts.map +1 -1
- package/dist/components/motion/magnetic.d.ts +2 -3
- package/dist/components/motion/magnetic.d.ts.map +1 -1
- package/dist/components/motion/marquee.d.ts +2 -3
- package/dist/components/motion/marquee.d.ts.map +1 -1
- package/dist/components/motion/morphing-modal.d.ts +2 -3
- package/dist/components/motion/morphing-modal.d.ts.map +1 -1
- package/dist/components/motion/morphing-search.d.ts +3 -4
- package/dist/components/motion/morphing-search.d.ts.map +1 -1
- package/dist/components/motion/morphing-search.js +1 -1
- package/dist/components/motion/morphing-tabs.d.ts +4 -5
- package/dist/components/motion/morphing-tabs.d.ts.map +1 -1
- package/dist/components/motion/morphing-tabs.js +1 -1
- package/dist/components/motion/multi-select/content.d.ts +15 -0
- package/dist/components/motion/multi-select/content.d.ts.map +1 -0
- package/dist/components/motion/multi-select/content.js +91 -0
- package/dist/components/motion/multi-select/content.js.map +1 -0
- package/dist/components/motion/multi-select/context.d.ts +63 -0
- package/dist/components/motion/multi-select/context.d.ts.map +1 -0
- package/dist/{context-BizvUNZv.js → components/motion/multi-select/context.js} +44 -114
- package/dist/components/motion/multi-select/context.js.map +1 -0
- package/dist/components/motion/multi-select/index.d.ts +5 -0
- package/dist/components/motion/multi-select/index.js +6 -0
- package/dist/components/motion/multi-select/list.d.ts +39 -0
- package/dist/components/motion/multi-select/list.d.ts.map +1 -0
- package/dist/components/motion/multi-select/list.js +144 -0
- package/dist/components/motion/multi-select/list.js.map +1 -0
- package/dist/components/motion/multi-select/trigger.d.ts +21 -0
- package/dist/components/motion/multi-select/trigger.d.ts.map +1 -0
- package/dist/components/motion/multi-select/trigger.js +185 -0
- package/dist/components/motion/multi-select/trigger.js.map +1 -0
- package/dist/components/motion/not-found/glitch.d.ts +1 -2
- package/dist/components/motion/not-found/glitch.d.ts.map +1 -1
- package/dist/components/motion/not-found/magnetic.d.ts +1 -2
- package/dist/components/motion/not-found/magnetic.d.ts.map +1 -1
- package/dist/components/motion/not-found/shared.d.ts +4 -5
- package/dist/components/motion/not-found/shared.d.ts.map +1 -1
- package/dist/components/motion/not-found/spotlight.d.ts +1 -2
- package/dist/components/motion/not-found/spotlight.d.ts.map +1 -1
- package/dist/components/motion/not-found/stacked.d.ts +1 -2
- package/dist/components/motion/not-found/stacked.d.ts.map +1 -1
- package/dist/components/motion/not-found/terminal.d.ts +1 -2
- package/dist/components/motion/not-found/terminal.d.ts.map +1 -1
- package/dist/components/motion/notification-stack.d.ts +4 -5
- package/dist/components/motion/notification-stack.d.ts.map +1 -1
- package/dist/components/motion/notification-stack.js +1 -1
- package/dist/components/motion/number-ticker.d.ts +2 -3
- package/dist/components/motion/number-ticker.d.ts.map +1 -1
- package/dist/components/motion/otp-input.d.ts +3 -4
- package/dist/components/motion/otp-input.d.ts.map +1 -1
- package/dist/components/motion/overflow-actions.d.ts +5 -6
- package/dist/components/motion/overflow-actions.d.ts.map +1 -1
- package/dist/components/motion/overflow-actions.js +1 -1
- package/dist/components/motion/parallax.d.ts +2 -3
- package/dist/components/motion/parallax.d.ts.map +1 -1
- package/dist/components/motion/popover-morph.d.ts +6 -7
- package/dist/components/motion/popover-morph.d.ts.map +1 -1
- package/dist/components/motion/popover.d.ts +6 -7
- package/dist/components/motion/popover.d.ts.map +1 -1
- package/dist/components/motion/preview-rail.d.ts +3 -4
- package/dist/components/motion/preview-rail.d.ts.map +1 -1
- package/dist/components/motion/project-folder.d.ts +3 -4
- package/dist/components/motion/project-folder.d.ts.map +1 -1
- package/dist/components/motion/project-folder.js +1 -1
- package/dist/components/motion/pull-to-refresh.d.ts +3 -4
- package/dist/components/motion/pull-to-refresh.d.ts.map +1 -1
- package/dist/components/motion/radio.d.ts +4 -5
- package/dist/components/motion/radio.d.ts.map +1 -1
- package/dist/components/motion/range-slider-bubble.d.ts +2 -3
- package/dist/components/motion/range-slider-bubble.d.ts.map +1 -1
- package/dist/components/motion/range-slider-fluid.d.ts +2 -3
- package/dist/components/motion/range-slider-fluid.d.ts.map +1 -1
- package/dist/components/motion/range-slider-ruler.d.ts +2 -3
- package/dist/components/motion/range-slider-ruler.d.ts.map +1 -1
- package/dist/components/motion/range-slider-wave.d.ts +2 -3
- package/dist/components/motion/range-slider-wave.d.ts.map +1 -1
- package/dist/components/motion/range-slider.d.ts +2 -3
- package/dist/components/motion/range-slider.d.ts.map +1 -1
- package/dist/components/motion/scroll-progress.d.ts +4 -5
- package/dist/components/motion/scroll-progress.d.ts.map +1 -1
- package/dist/components/motion/scroll-reveal.d.ts +2 -3
- package/dist/components/motion/scroll-reveal.d.ts.map +1 -1
- package/dist/components/motion/scroll-to.d.ts +2 -3
- package/dist/components/motion/scroll-to.d.ts.map +1 -1
- package/dist/components/motion/select-morph.d.ts +10 -11
- package/dist/components/motion/select-morph.d.ts.map +1 -1
- package/dist/components/motion/select-morph.js +1 -1
- package/dist/components/motion/select.d.ts +10 -11
- package/dist/components/motion/select.d.ts.map +1 -1
- package/dist/components/motion/select.js +1 -1
- package/dist/components/motion/shader-background.d.ts +4 -5
- package/dist/components/motion/shader-background.d.ts.map +1 -1
- package/dist/components/motion/shared-layout-bg.d.ts +2 -3
- package/dist/components/motion/shared-layout-bg.d.ts.map +1 -1
- package/dist/components/motion/signup-form.d.ts +7 -8
- package/dist/components/motion/signup-form.d.ts.map +1 -1
- package/dist/components/motion/signup-form.js +7 -3
- package/dist/components/motion/signup-form.js.map +1 -1
- package/dist/components/motion/slide-action-button.d.ts +2 -3
- package/dist/components/motion/slide-action-button.d.ts.map +1 -1
- package/dist/components/motion/smooth-scroll.d.ts +6 -7
- package/dist/components/motion/smooth-scroll.d.ts.map +1 -1
- package/dist/components/motion/swipeable-list.d.ts +8 -9
- package/dist/components/motion/swipeable-list.d.ts.map +1 -1
- package/dist/components/motion/switch.d.ts +2 -3
- package/dist/components/motion/switch.d.ts.map +1 -1
- package/dist/components/motion/table/editable-cell.d.ts +1 -2
- package/dist/components/motion/table/editable-cell.d.ts.map +1 -1
- package/dist/components/motion/table/index.d.ts +2 -2
- package/dist/components/motion/table/index.d.ts.map +1 -1
- package/dist/components/motion/table/index.js.map +1 -1
- package/dist/components/motion/table/row-handle.d.ts +1 -2
- package/dist/components/motion/table/row-handle.d.ts.map +1 -1
- package/dist/components/motion/table/row-handle.js +1 -1
- package/dist/components/motion/table/skeleton-rows.d.ts +1 -2
- package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -1
- package/dist/components/motion/table/table-header.d.ts +2 -3
- package/dist/components/motion/table/table-header.d.ts.map +1 -1
- package/dist/components/motion/table/table-header.js +1 -1
- package/dist/components/motion/table/table-menu.d.ts +2 -3
- package/dist/components/motion/table/table-menu.d.ts.map +1 -1
- package/dist/components/motion/tabs.d.ts +4 -5
- package/dist/components/motion/tabs.d.ts.map +1 -1
- package/dist/components/motion/text-cascade.d.ts +2 -3
- package/dist/components/motion/text-cascade.d.ts.map +1 -1
- package/dist/components/motion/text-reveal.d.ts +2 -3
- package/dist/components/motion/text-reveal.d.ts.map +1 -1
- package/dist/components/motion/text-scramble.d.ts +2 -3
- package/dist/components/motion/text-scramble.d.ts.map +1 -1
- package/dist/components/motion/text-shimmer.d.ts +2 -3
- package/dist/components/motion/text-shimmer.d.ts.map +1 -1
- package/dist/components/motion/theme-toggle.d.ts +5 -6
- package/dist/components/motion/theme-toggle.d.ts.map +1 -1
- package/dist/components/motion/theme-toggle.js +1 -1
- package/dist/components/motion/tilt-card.d.ts +2 -3
- package/dist/components/motion/tilt-card.d.ts.map +1 -1
- package/dist/components/motion/tooltip.d.ts +2 -3
- package/dist/components/motion/tooltip.d.ts.map +1 -1
- package/dist/components/motion/wheel-picker.d.ts +3 -4
- package/dist/components/motion/wheel-picker.d.ts.map +1 -1
- package/dist/components/reui/alert.d.ts +1 -1
- package/dist/components/reui/alert.js +1 -1
- package/dist/components/reui/autocomplete.d.ts +3 -3
- package/dist/components/reui/autocomplete.d.ts.map +1 -1
- package/dist/components/reui/autocomplete.js +1 -1
- package/dist/components/reui/badge.d.ts +2 -2
- package/dist/components/reui/cascader/cascader-async.d.ts +8 -9
- package/dist/components/reui/cascader/cascader-async.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-async.js.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.d.ts +3 -3
- package/dist/components/reui/cascader/cascader-columns.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.js +1 -1
- package/dist/components/reui/cascader/cascader-context.d.ts +13 -13
- package/dist/components/reui/cascader/cascader-context.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-footer.d.ts +8 -8
- package/dist/components/reui/cascader/cascader-footer.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-footer.js +1 -1
- package/dist/components/reui/cascader/cascader-i18n.d.ts +3 -4
- package/dist/components/reui/cascader/cascader-i18n.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-item.d.ts +9 -9
- package/dist/components/reui/cascader/cascader-item.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-item.js +1 -1
- package/dist/components/reui/cascader/cascader-lib.d.ts +38 -39
- package/dist/components/reui/cascader/cascader-lib.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.d.ts +6 -6
- package/dist/components/reui/cascader/cascader-nav.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.js +1 -1
- package/dist/components/reui/cascader/cascader-virtual.d.ts +6 -6
- package/dist/components/reui/cascader/cascader-virtual.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-virtual.js.map +1 -1
- package/dist/components/reui/cascader/cascader.d.ts +19 -19
- package/dist/components/reui/cascader/cascader.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader.js +1 -1
- package/dist/components/reui/cascader/cascader.js.map +1 -1
- package/dist/components/reui/code-block/code-block-highlight.d.ts +32 -33
- package/dist/components/reui/code-block/code-block-highlight.d.ts.map +1 -1
- package/dist/components/reui/code-block/code-block.d.ts +7 -7
- package/dist/components/reui/code-block/code-block.d.ts.map +1 -1
- package/dist/components/reui/code-block/code-block.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts +117 -0
- package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts.map +1 -0
- package/dist/components/reui/data-grid/data-grid-cell-selection.js +1554 -0
- package/dist/components/reui/data-grid/data-grid-cell-selection.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-column-filter.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js +7 -5
- package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.js +19 -13
- package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-visibility.js +3 -2
- package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-i18n.d.ts +2 -0
- package/dist/components/reui/data-grid/data-grid-i18n.js +53 -0
- package/dist/components/reui/data-grid/data-grid-i18n.js.map +1 -0
- package/dist/components/reui/data-grid/data-grid-pagination.js +15 -9
- package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.js +3 -3
- package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +7 -5
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.js +3 -3
- 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 +17 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js +146 -50
- package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.d.ts +23 -4
- package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js +215 -68
- package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid.d.ts +288 -18
- package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid.js +150 -15
- package/dist/components/reui/data-grid/data-grid.js.map +1 -1
- package/dist/components/reui/date-selector.d.ts +11 -12
- package/dist/components/reui/date-selector.d.ts.map +1 -1
- package/dist/components/reui/date-selector.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js +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 +1 -1
- package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
- package/dist/components/reui/filters/filters-advanced.d.ts +6 -7
- package/dist/components/reui/filters/filters-advanced.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-advanced.js +1 -1
- package/dist/components/reui/filters/filters-advanced.js.map +1 -1
- package/dist/components/reui/filters/filters-builder.d.ts +5 -5
- package/dist/components/reui/filters/filters-builder.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-builder.js +2 -2
- package/dist/components/reui/filters/filters-chip.d.ts +10 -11
- package/dist/components/reui/filters/filters-chip.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-chip.js +1 -1
- package/dist/components/reui/filters/filters-chip.js.map +1 -1
- package/dist/components/reui/filters/filters-context.d.ts +30 -30
- package/dist/components/reui/filters/filters-context.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-date.d.ts +13 -14
- package/dist/components/reui/filters/filters-date.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-dnd.d.ts +15 -16
- package/dist/components/reui/filters/filters-dnd.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-editors.d.ts +14 -14
- package/dist/components/reui/filters/filters-editors.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-editors.js +2 -2
- package/dist/components/reui/filters/filters-i18n.d.ts +4 -5
- package/dist/components/reui/filters/filters-i18n.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-lib.d.ts +34 -35
- package/dist/components/reui/filters/filters-lib.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-operators.d.ts +13 -14
- package/dist/components/reui/filters/filters-operators.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-query.d.ts +29 -30
- package/dist/components/reui/filters/filters-query.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-types.d.ts +31 -32
- package/dist/components/reui/filters/filters-types.d.ts.map +1 -1
- package/dist/components/reui/filters/filters.d.ts +5 -5
- package/dist/components/reui/filters/filters.d.ts.map +1 -1
- package/dist/components/reui/filters/filters.js +1 -1
- package/dist/components/reui/filters/filters.js.map +1 -1
- package/dist/components/reui/frame.d.ts +1 -1
- package/dist/components/reui/frame.js +1 -1
- package/dist/components/reui/gantt/gantt-bar.js +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +1 -1
- package/dist/components/reui/gantt/gantt-view.js +1 -1
- package/dist/components/reui/gantt/gantt.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt.js.map +1 -1
- package/dist/components/reui/icon-tile.d.ts +2 -2
- package/dist/components/reui/kanban.d.ts +11 -11
- package/dist/components/reui/kanban.d.ts.map +1 -1
- package/dist/components/reui/number-field.d.ts +3 -3
- package/dist/components/reui/number-field.js +1 -1
- package/dist/components/reui/phone-input.js +1 -1
- package/dist/components/reui/rating.d.ts +1 -1
- package/dist/components/reui/rating.js +1 -1
- package/dist/components/reui/scrollspy.d.ts +1 -2
- package/dist/components/reui/scrollspy.d.ts.map +1 -1
- package/dist/components/reui/sortable.d.ts +6 -6
- package/dist/components/reui/sortable.d.ts.map +1 -1
- package/dist/components/reui/tree.js +1 -1
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/alert-dialog.js +1 -1
- package/dist/components/ui/alert.js +1 -1
- package/dist/components/ui/attachment.d.ts +1 -1
- package/dist/components/ui/attachment.js +1 -1
- 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/bubble.js +1 -1
- package/dist/components/ui/button-group.js +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- 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/chart.d.ts +2 -2
- package/dist/components/ui/chart.d.ts.map +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.js +1 -1
- package/dist/components/ui/field.js +1 -1
- package/dist/components/ui/input-group.d.ts +1 -1
- package/dist/components/ui/input-group.js +1 -1
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/item.d.ts +2 -2
- package/dist/components/ui/item.js +1 -1
- package/dist/components/ui/marker.js +1 -1
- package/dist/components/ui/menubar.js +1 -1
- package/dist/components/ui/message-scroller.js +2 -2
- package/dist/components/ui/message-scroller.js.map +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/questionnaire.js +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/sidebar.d.ts +2 -2
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/spinner.js +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/toast.js +1 -1
- package/dist/components/ui/toggle.d.ts +2 -2
- package/dist/components/ui/toggle.js +1 -1
- package/dist/{copy-menu-C5GaT4Z-.js → copy-menu-TIKvPaAZ.js} +2 -2
- package/dist/{copy-menu-C5GaT4Z-.js.map → copy-menu-TIKvPaAZ.js.map} +1 -1
- package/dist/data-grid-i18n-TQR2PZlU.d.ts +54 -0
- package/dist/data-grid-i18n-TQR2PZlU.d.ts.map +1 -0
- package/dist/hooks/use-body-classes.d.ts +1 -2
- package/dist/hooks/use-body-classes.d.ts.map +1 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +1 -2
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -1
- package/dist/hooks/use-dismiss.d.ts +3 -4
- package/dist/hooks/use-dismiss.d.ts.map +1 -1
- package/dist/hooks/use-favicon.d.ts +1 -2
- package/dist/hooks/use-favicon.d.ts.map +1 -1
- package/dist/hooks/use-file-upload.d.ts +7 -8
- package/dist/hooks/use-file-upload.d.ts.map +1 -1
- package/dist/hooks/use-hover-capable.d.ts +1 -2
- package/dist/hooks/use-hover-capable.d.ts.map +1 -1
- package/dist/hooks/use-hover-gesture.d.ts +2 -3
- package/dist/hooks/use-hover-gesture.d.ts.map +1 -1
- package/dist/hooks/use-hydrated.d.ts +1 -2
- package/dist/hooks/use-hydrated.d.ts.map +1 -1
- package/dist/hooks/use-intersection-observer.d.ts +1 -2
- package/dist/hooks/use-intersection-observer.d.ts.map +1 -1
- package/dist/hooks/use-is-mac.d.ts +1 -2
- package/dist/hooks/use-is-mac.d.ts.map +1 -1
- package/dist/hooks/use-media-query.d.ts +1 -2
- package/dist/hooks/use-media-query.d.ts.map +1 -1
- package/dist/hooks/use-meta-color.d.ts +1 -2
- package/dist/hooks/use-meta-color.d.ts.map +1 -1
- package/dist/hooks/use-mobile.d.ts +1 -2
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mutation-observer.d.ts +1 -2
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -1
- package/dist/hooks/use-on-open.d.ts +1 -2
- package/dist/hooks/use-on-open.d.ts.map +1 -1
- package/dist/hooks/use-row-cursor.d.ts +1 -2
- package/dist/hooks/use-row-cursor.d.ts.map +1 -1
- package/dist/hooks/use-scroll-position.d.ts +1 -2
- package/dist/hooks/use-scroll-position.d.ts.map +1 -1
- package/dist/hooks/use-slider-input.d.ts +1 -2
- package/dist/hooks/use-slider-input.d.ts.map +1 -1
- package/dist/hooks/use-slider.d.ts +3 -4
- package/dist/hooks/use-slider.d.ts.map +1 -1
- package/dist/hooks/use-tap-gesture.d.ts +3 -4
- package/dist/hooks/use-tap-gesture.d.ts.map +1 -1
- package/dist/hooks/use-touch-capable.d.ts +1 -2
- package/dist/hooks/use-touch-capable.d.ts.map +1 -1
- package/dist/hooks/use-viewport.d.ts +1 -2
- package/dist/hooks/use-viewport.d.ts.map +1 -1
- package/dist/lib/ease.d.ts +10 -11
- package/dist/lib/ease.d.ts.map +1 -1
- package/dist/lib/favicon.d.ts +1 -2
- package/dist/lib/favicon.d.ts.map +1 -1
- package/dist/lib/text-shimmer.d.ts +3 -4
- package/dist/lib/text-shimmer.d.ts.map +1 -1
- package/dist/lib/tick-sound.d.ts +1 -2
- package/dist/lib/tick-sound.d.ts.map +1 -1
- package/dist/lib/touch.d.ts +6 -7
- package/dist/lib/touch.d.ts.map +1 -1
- package/dist/use-active-option-CmX6Z-4S.js +86 -0
- package/dist/use-active-option-CmX6Z-4S.js.map +1 -0
- package/package.json +6 -6
- package/dist/context-BizvUNZv.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { HTMLMotionProps } from "motion/react";
|
|
3
3
|
//#region src/components/motion/action-swap.d.ts
|
|
4
|
-
type ActionSwapItem = {
|
|
4
|
+
export type ActionSwapItem = {
|
|
5
5
|
id: string;
|
|
6
6
|
label: ReactNode;
|
|
7
7
|
icon?: ReactNode;
|
|
8
8
|
ariaLabel?: string;
|
|
9
9
|
};
|
|
10
|
-
type ActionSwapButtonVariant = "primary" | "secondary" | "outline" | "ghost";
|
|
11
|
-
type ActionSwapButtonSize = "sm" | "md" | "lg" | "icon";
|
|
12
|
-
type ActionSwapAnimation = "blur" | "roll" | "cascade";
|
|
13
|
-
interface ActionSwapButtonProps extends Omit<HTMLMotionProps<"button">, "children" | "onChange"> {
|
|
10
|
+
export type ActionSwapButtonVariant = "primary" | "secondary" | "outline" | "ghost";
|
|
11
|
+
export type ActionSwapButtonSize = "sm" | "md" | "lg" | "icon";
|
|
12
|
+
export type ActionSwapAnimation = "blur" | "roll" | "cascade";
|
|
13
|
+
export interface ActionSwapButtonProps extends Omit<HTMLMotionProps<"button">, "children" | "onChange"> {
|
|
14
14
|
items: ActionSwapItem[];
|
|
15
15
|
value?: string;
|
|
16
16
|
defaultValue?: string;
|
|
@@ -21,21 +21,20 @@ interface ActionSwapButtonProps extends Omit<HTMLMotionProps<"button">, "childre
|
|
|
21
21
|
iconOnly?: boolean;
|
|
22
22
|
cycle?: boolean;
|
|
23
23
|
}
|
|
24
|
-
interface ActionSwapTextProps {
|
|
24
|
+
export interface ActionSwapTextProps {
|
|
25
25
|
value: string;
|
|
26
26
|
children: ReactNode;
|
|
27
27
|
animation?: ActionSwapAnimation;
|
|
28
28
|
className?: string;
|
|
29
29
|
}
|
|
30
|
-
interface ActionSwapIconProps {
|
|
30
|
+
export interface ActionSwapIconProps {
|
|
31
31
|
value: string;
|
|
32
32
|
children: ReactNode;
|
|
33
33
|
animation?: ActionSwapAnimation;
|
|
34
34
|
className?: string;
|
|
35
35
|
}
|
|
36
|
-
declare function ActionSwapText({ value, children, animation, className }: ActionSwapTextProps): import("react").JSX.Element;
|
|
37
|
-
declare function ActionSwapIcon({ value, children, animation, className }: ActionSwapIconProps): import("react").JSX.Element;
|
|
38
|
-
declare function ActionSwapButton({ items, value, defaultValue, onValueChange, variant, size, animation, iconOnly, cycle, className, disabled, onClick, ...rest }: ActionSwapButtonProps): import("react").JSX.Element | null;
|
|
36
|
+
export declare function ActionSwapText({ value, children, animation, className }: ActionSwapTextProps): import("react").JSX.Element;
|
|
37
|
+
export declare function ActionSwapIcon({ value, children, animation, className }: ActionSwapIconProps): import("react").JSX.Element;
|
|
38
|
+
export declare function ActionSwapButton({ items, value, defaultValue, onValueChange, variant, size, animation, iconOnly, cycle, className, disabled, onClick, ...rest }: ActionSwapButtonProps): import("react").JSX.Element | null;
|
|
39
39
|
//#endregion
|
|
40
|
-
export { ActionSwapAnimation, ActionSwapButton, ActionSwapButtonProps, ActionSwapButtonSize, ActionSwapButtonVariant, ActionSwapIcon, ActionSwapIconProps, ActionSwapItem, ActionSwapText, ActionSwapTextProps };
|
|
41
40
|
//# sourceMappingURL=action-swap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-swap.d.ts","names":[],"sources":["../../../src/components/motion/action-swap.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"action-swap.d.ts","names":[],"sources":["../../../src/components/motion/action-swap.tsx"],"mappings":";;;YAeY;EACV;EACA,OAAO;EACP,OAAO;EACP;;YAGU;YACA;YACA;iBAKK,8BACP,KAAK;EACb,OAAO;EACP;EACA;EACA,iBAAiB,eAAe,MAAM;EACtC,UAAU;EACV,OAAO;EACP,YAAY;EACZ;EACA;;iBAGe;EACf;EACA,UAAU;EACV,YAAY;EACZ;;iBAGe;EACf;EACA,UAAU;EACV,YAAY;EACZ;;wBA+Gc,iBACd,OACA,UACA,WACA,aACC,sCAAmB,IAAA;wBA2EN,iBACd,OACA,UACA,WACA,aACC,sCAAmB,IAAA;wBA0BN,mBACd,OACA,OACA,cACA,eACA,SACA,MACA,WACA,UACA,OACA,WACA,UACA,YACG,QACF,wCAAqB,IAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { MouseEvent, ReactNode, Ref } from "react";
|
|
2
|
+
import { HTMLMotionProps } from "motion/react";
|
|
3
|
+
//#region src/components/motion/adaptive-stepper.d.ts
|
|
4
|
+
export interface AdaptiveStepperProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
value?: number;
|
|
7
|
+
defaultValue?: number;
|
|
8
|
+
onValueChange?: (value: number) => void;
|
|
9
|
+
min?: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
step?: number;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
name?: string;
|
|
14
|
+
formatValueText?: (value: number) => string;
|
|
15
|
+
className?: string;
|
|
16
|
+
"aria-label"?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function AdaptiveStepper({ children, value: controlledValue, defaultValue, onValueChange, min, max, step, disabled, name, formatValueText, className, "aria-label": ariaLabel }: AdaptiveStepperProps): import("react").JSX.Element;
|
|
19
|
+
export interface AdaptiveStepperActionProps extends Omit<HTMLMotionProps<"button">, "children" | "onClick"> {
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
22
|
+
ref?: Ref<HTMLButtonElement>;
|
|
23
|
+
}
|
|
24
|
+
export declare function AdaptiveStepperDecrement(props: AdaptiveStepperActionProps): import("react").JSX.Element;
|
|
25
|
+
export interface AdaptiveStepperValueProps extends Omit<HTMLMotionProps<"output">, "children"> {
|
|
26
|
+
children?: ReactNode | ((value: number) => ReactNode);
|
|
27
|
+
}
|
|
28
|
+
export declare function AdaptiveStepperValue({ children, className, style, ...props }: AdaptiveStepperValueProps): import("react").JSX.Element;
|
|
29
|
+
export declare function AdaptiveStepperIncrement(props: AdaptiveStepperActionProps): import("react").JSX.Element;
|
|
30
|
+
//#endregion
|
|
31
|
+
//# sourceMappingURL=adaptive-stepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adaptive-stepper.d.ts","names":[],"sources":["../../../src/components/motion/adaptive-stepper.tsx"],"mappings":";;;iBAmFiB;EACf,UAAU;EACV;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;EACA,mBAAmB;EACnB;EACA;;wBAGc,kBACd,UACA,OAAO,iBACP,cACA,eACA,KACA,KACA,MACA,UACA,MACA,iBACA,yBACc,aACb,uCAAoB,IAAA;iBAoGN,mCACP,KAAK;EACb,WAAW;EACX,WAAW,OAAO,WAAW;EAC7B,MAAM,IAAI;;wBA4EI,yBAAyB,OAAO,6CAA0B,IAAA;iBAIzD,kCAAkC,KAAK;EACtD,WAAW,cAAc,kBAAkB;;wBAG7B,uBACd,UACA,WACA,UACG,SACF,4CAAyB,IAAA;wBA8EZ,yBAAyB,OAAO,6CAA0B,IAAA"}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { EASE_OUT, SPRING_PRESS } from "../../lib/ease.js";
|
|
3
|
+
import { Liquid, LiquidItem } from "./liquid.js";
|
|
4
|
+
import { createContext, useCallback, useContext, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
5
|
+
import { cn } from "@kumix/utils";
|
|
6
|
+
import { Minus, Plus } from "lucide-react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
9
|
+
//#region src/components/motion/adaptive-stepper.tsx
|
|
10
|
+
const STEPPER_LIQUID_TRANSITION = {
|
|
11
|
+
duration: 600,
|
|
12
|
+
ease: [
|
|
13
|
+
.22,
|
|
14
|
+
1.3,
|
|
15
|
+
.71,
|
|
16
|
+
1
|
|
17
|
+
]
|
|
18
|
+
};
|
|
19
|
+
const AdaptiveStepperContext = createContext(null);
|
|
20
|
+
function useAdaptiveStepperContext(component) {
|
|
21
|
+
const context = useContext(AdaptiveStepperContext);
|
|
22
|
+
if (!context) throw new Error(`${component} must be used within <AdaptiveStepper>`);
|
|
23
|
+
return context;
|
|
24
|
+
}
|
|
25
|
+
function clamp(value, min, max) {
|
|
26
|
+
return Math.min(max, Math.max(min, value));
|
|
27
|
+
}
|
|
28
|
+
function cleanNumber(value) {
|
|
29
|
+
return Number(value.toFixed(10));
|
|
30
|
+
}
|
|
31
|
+
function nextStep(value, direction, min, max, step) {
|
|
32
|
+
if (direction === 1) {
|
|
33
|
+
const nextIndex = Math.floor((value - min) / step + 1e-10) + 1;
|
|
34
|
+
return cleanNumber(Math.min(max, min + nextIndex * step));
|
|
35
|
+
}
|
|
36
|
+
const previousIndex = Math.ceil((value - min) / step - 1e-10) - 1;
|
|
37
|
+
return cleanNumber(Math.max(min, min + previousIndex * step));
|
|
38
|
+
}
|
|
39
|
+
function mergeRefs(...refs) {
|
|
40
|
+
return (node) => {
|
|
41
|
+
for (const ref of refs) if (typeof ref === "function") ref(node);
|
|
42
|
+
else if (ref && typeof ref === "object") ref.current = node;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function AdaptiveStepper({ children, value: controlledValue, defaultValue = 0, onValueChange, min = 0, max = 10, step = 1, disabled = false, name, formatValueText, className, "aria-label": ariaLabel = "Quantity" }) {
|
|
46
|
+
const reduce = useReducedMotion() ?? false;
|
|
47
|
+
const labelId = useId();
|
|
48
|
+
const decrementRef = useRef(null);
|
|
49
|
+
const incrementRef = useRef(null);
|
|
50
|
+
const lower = Number.isFinite(min) ? min : 0;
|
|
51
|
+
const suppliedMax = Number.isFinite(max) ? max : lower;
|
|
52
|
+
const upper = suppliedMax > lower ? suppliedMax : lower;
|
|
53
|
+
const stride = Number.isFinite(step) && step > 0 ? step : 1;
|
|
54
|
+
const [internalValue, setInternalValue] = useState(() => clamp(Number.isFinite(defaultValue) ? defaultValue : lower, lower, upper));
|
|
55
|
+
const controlled = controlledValue !== void 0;
|
|
56
|
+
const suppliedValue = controlled ? controlledValue : internalValue;
|
|
57
|
+
const currentValue = clamp(Number.isFinite(suppliedValue) ? suppliedValue : lower, lower, upper);
|
|
58
|
+
const previousValueRef = useRef(currentValue);
|
|
59
|
+
const currentValueRef = useRef(currentValue);
|
|
60
|
+
const direction = currentValue === previousValueRef.current ? 0 : currentValue > previousValueRef.current ? 1 : -1;
|
|
61
|
+
useLayoutEffect(() => {
|
|
62
|
+
previousValueRef.current = currentValue;
|
|
63
|
+
currentValueRef.current = currentValue;
|
|
64
|
+
}, [currentValue]);
|
|
65
|
+
const commit = useCallback((nextValue, restoreFocus) => {
|
|
66
|
+
const next = clamp(cleanNumber(nextValue), lower, upper);
|
|
67
|
+
if (next === currentValue) return;
|
|
68
|
+
if (!controlled) setInternalValue(next);
|
|
69
|
+
onValueChange?.(next);
|
|
70
|
+
if (!restoreFocus) return;
|
|
71
|
+
requestAnimationFrame(() => {
|
|
72
|
+
if (next === upper && currentValueRef.current === upper) decrementRef.current?.focus();
|
|
73
|
+
else if (next === lower && currentValueRef.current === lower) incrementRef.current?.focus();
|
|
74
|
+
});
|
|
75
|
+
}, [
|
|
76
|
+
controlled,
|
|
77
|
+
currentValue,
|
|
78
|
+
lower,
|
|
79
|
+
onValueChange,
|
|
80
|
+
upper
|
|
81
|
+
]);
|
|
82
|
+
const decrement = useCallback((restoreFocus) => {
|
|
83
|
+
if (disabled || currentValue <= lower) return;
|
|
84
|
+
commit(nextStep(currentValue, -1, lower, upper, stride), restoreFocus);
|
|
85
|
+
}, [
|
|
86
|
+
commit,
|
|
87
|
+
currentValue,
|
|
88
|
+
disabled,
|
|
89
|
+
lower,
|
|
90
|
+
stride,
|
|
91
|
+
upper
|
|
92
|
+
]);
|
|
93
|
+
const increment = useCallback((restoreFocus) => {
|
|
94
|
+
if (disabled || currentValue >= upper) return;
|
|
95
|
+
commit(nextStep(currentValue, 1, lower, upper, stride), restoreFocus);
|
|
96
|
+
}, [
|
|
97
|
+
commit,
|
|
98
|
+
currentValue,
|
|
99
|
+
disabled,
|
|
100
|
+
lower,
|
|
101
|
+
stride,
|
|
102
|
+
upper
|
|
103
|
+
]);
|
|
104
|
+
const valueText = formatValueText?.(currentValue) ?? String(currentValue);
|
|
105
|
+
const context = useMemo(() => ({
|
|
106
|
+
value: currentValue,
|
|
107
|
+
valueText,
|
|
108
|
+
direction,
|
|
109
|
+
atMin: currentValue <= lower,
|
|
110
|
+
atMax: currentValue >= upper,
|
|
111
|
+
disabled,
|
|
112
|
+
reduce,
|
|
113
|
+
decrement,
|
|
114
|
+
increment,
|
|
115
|
+
decrementRef,
|
|
116
|
+
incrementRef
|
|
117
|
+
}), [
|
|
118
|
+
currentValue,
|
|
119
|
+
decrement,
|
|
120
|
+
direction,
|
|
121
|
+
disabled,
|
|
122
|
+
increment,
|
|
123
|
+
lower,
|
|
124
|
+
reduce,
|
|
125
|
+
upper,
|
|
126
|
+
valueText
|
|
127
|
+
]);
|
|
128
|
+
return /* @__PURE__ */ jsx(AdaptiveStepperContext.Provider, {
|
|
129
|
+
value: context,
|
|
130
|
+
children: /* @__PURE__ */ jsxs("fieldset", {
|
|
131
|
+
disabled,
|
|
132
|
+
className: cn("relative isolate m-0 inline-block h-12 w-[13.5rem] border-0 p-0", className),
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ jsxs("legend", {
|
|
135
|
+
id: labelId,
|
|
136
|
+
className: "sr-only",
|
|
137
|
+
children: [
|
|
138
|
+
ariaLabel,
|
|
139
|
+
". Current value: ",
|
|
140
|
+
valueText
|
|
141
|
+
]
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ jsx(Liquid, {
|
|
144
|
+
blur: 8,
|
|
145
|
+
contrast: 22,
|
|
146
|
+
fill: "var(--background)",
|
|
147
|
+
className: "size-full",
|
|
148
|
+
children
|
|
149
|
+
}),
|
|
150
|
+
name ? /* @__PURE__ */ jsx("input", {
|
|
151
|
+
type: "hidden",
|
|
152
|
+
name,
|
|
153
|
+
value: currentValue
|
|
154
|
+
}) : null
|
|
155
|
+
]
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function StepperAction({ direction, children, className, onClick, ref, style, tabIndex, "aria-label": ariaLabel, ...props }) {
|
|
160
|
+
const context = useAdaptiveStepperContext("AdaptiveStepper action");
|
|
161
|
+
const hidden = direction === -1 ? context.atMin : context.atMax;
|
|
162
|
+
const actionRef = direction === -1 ? context.decrementRef : context.incrementRef;
|
|
163
|
+
const label = ariaLabel ?? (direction === -1 ? "Decrease value" : "Increase value");
|
|
164
|
+
const action = direction === -1 ? context.decrement : context.increment;
|
|
165
|
+
return /* @__PURE__ */ jsx(LiquidItem, {
|
|
166
|
+
x: direction === -1 ? hidden ? 32 : 0 : hidden ? 136 : 168,
|
|
167
|
+
y: 0,
|
|
168
|
+
width: 48,
|
|
169
|
+
height: 48,
|
|
170
|
+
radius: 24,
|
|
171
|
+
transition: STEPPER_LIQUID_TRANSITION,
|
|
172
|
+
children: /* @__PURE__ */ jsx(motion.button, {
|
|
173
|
+
...props,
|
|
174
|
+
ref: mergeRefs(ref, actionRef),
|
|
175
|
+
type: "button",
|
|
176
|
+
"aria-label": label,
|
|
177
|
+
"aria-hidden": hidden || void 0,
|
|
178
|
+
tabIndex: hidden ? -1 : tabIndex,
|
|
179
|
+
disabled: context.disabled || hidden,
|
|
180
|
+
whileTap: context.reduce || context.disabled || hidden ? void 0 : { scale: .94 },
|
|
181
|
+
transition: context.reduce ? { duration: 0 } : SPRING_PRESS,
|
|
182
|
+
style,
|
|
183
|
+
className: cn("grid size-full place-items-center rounded-full border border-transparent bg-transparent bg-clip-padding text-foreground outline-none transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none", hidden && "hover:bg-transparent", context.disabled && "opacity-50", className),
|
|
184
|
+
onClick: (event) => {
|
|
185
|
+
onClick?.(event);
|
|
186
|
+
if (!event.defaultPrevented) action(event.detail === 0);
|
|
187
|
+
},
|
|
188
|
+
children: /* @__PURE__ */ jsx(motion.span, {
|
|
189
|
+
"aria-hidden": "true",
|
|
190
|
+
initial: {
|
|
191
|
+
opacity: hidden ? 0 : 1,
|
|
192
|
+
filter: hidden ? "blur(2px)" : "blur(0px)"
|
|
193
|
+
},
|
|
194
|
+
animate: {
|
|
195
|
+
opacity: hidden ? 0 : 1,
|
|
196
|
+
filter: hidden ? "blur(2px)" : "blur(0px)"
|
|
197
|
+
},
|
|
198
|
+
transition: {
|
|
199
|
+
duration: context.reduce ? 0 : .15,
|
|
200
|
+
ease: EASE_OUT
|
|
201
|
+
},
|
|
202
|
+
children: children ?? (direction === -1 ? /* @__PURE__ */ jsx(Minus, {
|
|
203
|
+
className: "size-5",
|
|
204
|
+
strokeWidth: 2.5
|
|
205
|
+
}) : /* @__PURE__ */ jsx(Plus, {
|
|
206
|
+
className: "size-5",
|
|
207
|
+
strokeWidth: 2.5
|
|
208
|
+
}))
|
|
209
|
+
})
|
|
210
|
+
})
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
function AdaptiveStepperDecrement(props) {
|
|
214
|
+
return /* @__PURE__ */ jsx(StepperAction, {
|
|
215
|
+
...props,
|
|
216
|
+
direction: -1
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
function AdaptiveStepperValue({ children, className, style, ...props }) {
|
|
220
|
+
const context = useAdaptiveStepperContext("AdaptiveStepperValue");
|
|
221
|
+
const geometry = context.atMin && context.atMax ? {
|
|
222
|
+
x: 0,
|
|
223
|
+
width: 216
|
|
224
|
+
} : context.atMin ? {
|
|
225
|
+
x: 0,
|
|
226
|
+
width: 152
|
|
227
|
+
} : context.atMax ? {
|
|
228
|
+
x: 64,
|
|
229
|
+
width: 152
|
|
230
|
+
} : {
|
|
231
|
+
x: 64,
|
|
232
|
+
width: 88
|
|
233
|
+
};
|
|
234
|
+
const renderedValue = (typeof children === "function" ? children(context.value) : children) ?? context.value;
|
|
235
|
+
const canRoll = typeof renderedValue === "number" || typeof renderedValue === "string";
|
|
236
|
+
const distance = context.reduce || !canRoll ? 0 : context.direction * 32;
|
|
237
|
+
const enterFrom = `translateY(${distance}%)`;
|
|
238
|
+
const exitTo = `translateY(${-distance}%)`;
|
|
239
|
+
return /* @__PURE__ */ jsx(LiquidItem, {
|
|
240
|
+
x: geometry.x,
|
|
241
|
+
y: 0,
|
|
242
|
+
width: geometry.width,
|
|
243
|
+
height: 48,
|
|
244
|
+
radius: 24,
|
|
245
|
+
transition: STEPPER_LIQUID_TRANSITION,
|
|
246
|
+
children: /* @__PURE__ */ jsxs(motion.output, {
|
|
247
|
+
...props,
|
|
248
|
+
"aria-live": "polite",
|
|
249
|
+
"aria-atomic": "true",
|
|
250
|
+
style,
|
|
251
|
+
className: cn("flex size-full min-w-0 items-center justify-center overflow-hidden rounded-full border border-transparent bg-transparent bg-clip-padding px-4 font-semibold text-foreground text-lg tabular-nums", className),
|
|
252
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
253
|
+
className: "sr-only",
|
|
254
|
+
children: context.valueText
|
|
255
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
256
|
+
"aria-hidden": "true",
|
|
257
|
+
className: "relative grid min-h-[1.1em] min-w-[1ch] place-items-center overflow-hidden leading-none",
|
|
258
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, {
|
|
259
|
+
initial: false,
|
|
260
|
+
mode: "popLayout",
|
|
261
|
+
children: /* @__PURE__ */ jsx(motion.span, {
|
|
262
|
+
initial: {
|
|
263
|
+
opacity: context.reduce ? 1 : .35,
|
|
264
|
+
filter: context.reduce ? "blur(0px)" : "blur(2px)",
|
|
265
|
+
transform: enterFrom
|
|
266
|
+
},
|
|
267
|
+
animate: {
|
|
268
|
+
opacity: 1,
|
|
269
|
+
filter: "blur(0px)",
|
|
270
|
+
transform: "translateY(0%)"
|
|
271
|
+
},
|
|
272
|
+
exit: {
|
|
273
|
+
opacity: context.reduce ? 1 : 0,
|
|
274
|
+
filter: context.reduce ? "blur(0px)" : "blur(2px)",
|
|
275
|
+
transform: exitTo,
|
|
276
|
+
transition: {
|
|
277
|
+
duration: context.reduce ? 0 : .12,
|
|
278
|
+
ease: EASE_OUT
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
transition: {
|
|
282
|
+
duration: context.reduce ? 0 : .18,
|
|
283
|
+
ease: EASE_OUT
|
|
284
|
+
},
|
|
285
|
+
className: "col-start-1 row-start-1 will-change-[transform,filter,opacity]",
|
|
286
|
+
children: renderedValue
|
|
287
|
+
}, context.value)
|
|
288
|
+
})
|
|
289
|
+
})]
|
|
290
|
+
})
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
function AdaptiveStepperIncrement(props) {
|
|
294
|
+
return /* @__PURE__ */ jsx(StepperAction, {
|
|
295
|
+
...props,
|
|
296
|
+
direction: 1
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
//#endregion
|
|
300
|
+
export { AdaptiveStepper, AdaptiveStepperDecrement, AdaptiveStepperIncrement, AdaptiveStepperValue };
|
|
301
|
+
|
|
302
|
+
//# sourceMappingURL=adaptive-stepper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adaptive-stepper.js","names":[],"sources":["../../../src/components/motion/adaptive-stepper.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n type MouseEvent,\n type ReactNode,\n type Ref,\n useCallback,\n useContext,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { Minus, Plus } from \"lucide-react\";\nimport { AnimatePresence, type HTMLMotionProps, motion, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT, SPRING_PRESS } from \"../../lib/ease\";\nimport { Liquid, LiquidItem, type LiquidTransition } from \"./liquid\";\n\n// The deliberately elastic separation curve from the liquid email reference.\nconst STEPPER_LIQUID_TRANSITION = {\n duration: 600,\n ease: [0.22, 1.3, 0.71, 1],\n} as const satisfies LiquidTransition;\n\ntype StepDirection = -1 | 0 | 1;\n\ntype AdaptiveStepperContextValue = {\n value: number;\n valueText: string;\n direction: StepDirection;\n atMin: boolean;\n atMax: boolean;\n disabled: boolean;\n reduce: boolean;\n decrement: (restoreFocus: boolean) => void;\n increment: (restoreFocus: boolean) => void;\n decrementRef: React.MutableRefObject<HTMLButtonElement | null>;\n incrementRef: React.MutableRefObject<HTMLButtonElement | null>;\n};\n\nconst AdaptiveStepperContext = createContext<AdaptiveStepperContextValue | null>(null);\n\nfunction useAdaptiveStepperContext(component: string) {\n const context = useContext(AdaptiveStepperContext);\n if (!context) {\n throw new Error(`${component} must be used within <AdaptiveStepper>`);\n }\n return context;\n}\n\nfunction clamp(value: number, min: number, max: number) {\n return Math.min(max, Math.max(min, value));\n}\n\nfunction cleanNumber(value: number) {\n return Number(value.toFixed(10));\n}\n\nfunction nextStep(value: number, direction: -1 | 1, min: number, max: number, step: number) {\n if (direction === 1) {\n const nextIndex = Math.floor((value - min) / step + 1e-10) + 1;\n return cleanNumber(Math.min(max, min + nextIndex * step));\n }\n\n const previousIndex = Math.ceil((value - min) / step - 1e-10) - 1;\n return cleanNumber(Math.max(min, min + previousIndex * step));\n}\n\nfunction mergeRefs<T>(...refs: Array<Ref<T> | undefined>) {\n return (node: T | null) => {\n for (const ref of refs) {\n if (typeof ref === \"function\") ref(node);\n else if (ref && typeof ref === \"object\") {\n (ref as React.MutableRefObject<T | null>).current = node;\n }\n }\n };\n}\n\nexport interface AdaptiveStepperProps {\n children: ReactNode;\n value?: number;\n defaultValue?: number;\n onValueChange?: (value: number) => void;\n min?: number;\n max?: number;\n step?: number;\n disabled?: boolean;\n name?: string;\n formatValueText?: (value: number) => string;\n className?: string;\n \"aria-label\"?: string;\n}\n\nexport function AdaptiveStepper({\n children,\n value: controlledValue,\n defaultValue = 0,\n onValueChange,\n min = 0,\n max = 10,\n step = 1,\n disabled = false,\n name,\n formatValueText,\n className,\n \"aria-label\": ariaLabel = \"Quantity\",\n}: AdaptiveStepperProps) {\n const reduce = useReducedMotion() ?? false;\n const labelId = useId();\n const decrementRef = useRef<HTMLButtonElement>(null);\n const incrementRef = useRef<HTMLButtonElement>(null);\n const lower = Number.isFinite(min) ? min : 0;\n const suppliedMax = Number.isFinite(max) ? max : lower;\n const upper = suppliedMax > lower ? suppliedMax : lower;\n const stride = Number.isFinite(step) && step > 0 ? step : 1;\n const [internalValue, setInternalValue] = useState(() =>\n clamp(Number.isFinite(defaultValue) ? defaultValue : lower, lower, upper),\n );\n const controlled = controlledValue !== undefined;\n const suppliedValue = controlled ? controlledValue : internalValue;\n const currentValue = clamp(Number.isFinite(suppliedValue) ? suppliedValue : lower, lower, upper);\n const previousValueRef = useRef(currentValue);\n const currentValueRef = useRef(currentValue);\n const direction: StepDirection =\n currentValue === previousValueRef.current\n ? 0\n : currentValue > previousValueRef.current\n ? 1\n : -1;\n\n useLayoutEffect(() => {\n previousValueRef.current = currentValue;\n currentValueRef.current = currentValue;\n }, [currentValue]);\n\n const commit = useCallback(\n (nextValue: number, restoreFocus: boolean) => {\n const next = clamp(cleanNumber(nextValue), lower, upper);\n if (next === currentValue) return;\n if (!controlled) setInternalValue(next);\n onValueChange?.(next);\n\n if (!restoreFocus) return;\n requestAnimationFrame(() => {\n if (next === upper && currentValueRef.current === upper) {\n decrementRef.current?.focus();\n } else if (next === lower && currentValueRef.current === lower) {\n incrementRef.current?.focus();\n }\n });\n },\n [controlled, currentValue, lower, onValueChange, upper],\n );\n\n const decrement = useCallback(\n (restoreFocus: boolean) => {\n if (disabled || currentValue <= lower) return;\n commit(nextStep(currentValue, -1, lower, upper, stride), restoreFocus);\n },\n [commit, currentValue, disabled, lower, stride, upper],\n );\n\n const increment = useCallback(\n (restoreFocus: boolean) => {\n if (disabled || currentValue >= upper) return;\n commit(nextStep(currentValue, 1, lower, upper, stride), restoreFocus);\n },\n [commit, currentValue, disabled, lower, stride, upper],\n );\n\n const valueText = formatValueText?.(currentValue) ?? String(currentValue);\n const context = useMemo<AdaptiveStepperContextValue>(\n () => ({\n value: currentValue,\n valueText,\n direction,\n atMin: currentValue <= lower,\n atMax: currentValue >= upper,\n disabled,\n reduce,\n decrement,\n increment,\n decrementRef,\n incrementRef,\n }),\n [currentValue, decrement, direction, disabled, increment, lower, reduce, upper, valueText],\n );\n\n return (\n <AdaptiveStepperContext.Provider value={context}>\n <fieldset\n disabled={disabled}\n className={cn(\"relative isolate m-0 inline-block h-12 w-[13.5rem] border-0 p-0\", className)}\n >\n <legend id={labelId} className=\"sr-only\">\n {ariaLabel}. Current value: {valueText}\n </legend>\n <Liquid blur={8} contrast={22} fill=\"var(--background)\" className=\"size-full\">\n {children}\n </Liquid>\n {name ? <input type=\"hidden\" name={name} value={currentValue} /> : null}\n </fieldset>\n </AdaptiveStepperContext.Provider>\n );\n}\n\nexport interface AdaptiveStepperActionProps\n extends Omit<HTMLMotionProps<\"button\">, \"children\" | \"onClick\"> {\n children?: ReactNode;\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n ref?: Ref<HTMLButtonElement>;\n}\n\nfunction StepperAction({\n direction,\n children,\n className,\n onClick,\n ref,\n style,\n tabIndex,\n \"aria-label\": ariaLabel,\n ...props\n}: AdaptiveStepperActionProps & { direction: -1 | 1 }) {\n const context = useAdaptiveStepperContext(\"AdaptiveStepper action\");\n const hidden = direction === -1 ? context.atMin : context.atMax;\n const actionRef = direction === -1 ? context.decrementRef : context.incrementRef;\n const label = ariaLabel ?? (direction === -1 ? \"Decrease value\" : \"Increase value\");\n const action = direction === -1 ? context.decrement : context.increment;\n const x = direction === -1 ? (hidden ? 32 : 0) : hidden ? 136 : 168;\n\n return (\n <LiquidItem\n x={x}\n y={0}\n width={48}\n height={48}\n radius={24}\n transition={STEPPER_LIQUID_TRANSITION}\n >\n <motion.button\n {...props}\n ref={mergeRefs(ref, actionRef)}\n type=\"button\"\n aria-label={label}\n aria-hidden={hidden || undefined}\n tabIndex={hidden ? -1 : tabIndex}\n disabled={context.disabled || hidden}\n whileTap={context.reduce || context.disabled || hidden ? undefined : { scale: 0.94 }}\n transition={context.reduce ? { duration: 0 } : SPRING_PRESS}\n style={style}\n className={cn(\n \"grid size-full place-items-center rounded-full border border-transparent bg-transparent bg-clip-padding text-foreground outline-none transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none\",\n hidden && \"hover:bg-transparent\",\n context.disabled && \"opacity-50\",\n className,\n )}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) action(event.detail === 0);\n }}\n >\n <motion.span\n aria-hidden=\"true\"\n initial={{\n opacity: hidden ? 0 : 1,\n filter: hidden ? \"blur(2px)\" : \"blur(0px)\",\n }}\n animate={{\n opacity: hidden ? 0 : 1,\n filter: hidden ? \"blur(2px)\" : \"blur(0px)\",\n }}\n transition={{ duration: context.reduce ? 0 : 0.15, ease: EASE_OUT }}\n >\n {children ??\n (direction === -1 ? (\n <Minus className=\"size-5\" strokeWidth={2.5} />\n ) : (\n <Plus className=\"size-5\" strokeWidth={2.5} />\n ))}\n </motion.span>\n </motion.button>\n </LiquidItem>\n );\n}\n\nexport function AdaptiveStepperDecrement(props: AdaptiveStepperActionProps) {\n return <StepperAction {...props} direction={-1} />;\n}\n\nexport interface AdaptiveStepperValueProps extends Omit<HTMLMotionProps<\"output\">, \"children\"> {\n children?: ReactNode | ((value: number) => ReactNode);\n}\n\nexport function AdaptiveStepperValue({\n children,\n className,\n style,\n ...props\n}: AdaptiveStepperValueProps) {\n const context = useAdaptiveStepperContext(\"AdaptiveStepperValue\");\n const geometry =\n context.atMin && context.atMax\n ? { x: 0, width: 216 }\n : context.atMin\n ? { x: 0, width: 152 }\n : context.atMax\n ? { x: 64, width: 152 }\n : { x: 64, width: 88 };\n const displayValue = typeof children === \"function\" ? children(context.value) : children;\n const renderedValue = displayValue ?? context.value;\n const canRoll = typeof renderedValue === \"number\" || typeof renderedValue === \"string\";\n const distance = context.reduce || !canRoll ? 0 : context.direction * 32;\n const enterFrom = `translateY(${distance}%)`;\n const exitTo = `translateY(${-distance}%)`;\n\n return (\n <LiquidItem\n x={geometry.x}\n y={0}\n width={geometry.width}\n height={48}\n radius={24}\n transition={STEPPER_LIQUID_TRANSITION}\n >\n <motion.output\n {...props}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n style={style}\n className={cn(\n \"flex size-full min-w-0 items-center justify-center overflow-hidden rounded-full border border-transparent bg-transparent bg-clip-padding px-4 font-semibold text-foreground text-lg tabular-nums\",\n className,\n )}\n >\n <span className=\"sr-only\">{context.valueText}</span>\n <span\n aria-hidden=\"true\"\n className=\"relative grid min-h-[1.1em] min-w-[1ch] place-items-center overflow-hidden leading-none\"\n >\n <AnimatePresence initial={false} mode=\"popLayout\">\n <motion.span\n key={context.value}\n initial={{\n opacity: context.reduce ? 1 : 0.35,\n filter: context.reduce ? \"blur(0px)\" : \"blur(2px)\",\n transform: enterFrom,\n }}\n animate={{\n opacity: 1,\n filter: \"blur(0px)\",\n transform: \"translateY(0%)\",\n }}\n exit={{\n opacity: context.reduce ? 1 : 0,\n filter: context.reduce ? \"blur(0px)\" : \"blur(2px)\",\n transform: exitTo,\n transition: {\n duration: context.reduce ? 0 : 0.12,\n ease: EASE_OUT,\n },\n }}\n transition={{\n duration: context.reduce ? 0 : 0.18,\n ease: EASE_OUT,\n }}\n className=\"col-start-1 row-start-1 will-change-[transform,filter,opacity]\"\n >\n {renderedValue}\n </motion.span>\n </AnimatePresence>\n </span>\n </motion.output>\n </LiquidItem>\n );\n}\n\nexport function AdaptiveStepperIncrement(props: AdaptiveStepperActionProps) {\n return <StepperAction {...props} direction={1} />;\n}\n"],"mappings":";;;;;;;;;AAuBA,MAAM,4BAA4B;CAChC,UAAU;CACV,MAAM;EAAC;EAAM;EAAK;EAAM;CAAC;AAC3B;AAkBA,MAAM,yBAAyB,cAAkD,IAAI;AAErF,SAAS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LMotionProps } from "motion/react";
|
|
3
3
|
//#region src/components/motion/animated-badge.d.ts
|
|
4
|
-
type AnimatedBadgeStatus = "neutral" | "info" | "success" | "warning" | "danger" | "loading";
|
|
5
|
-
type AnimatedBadgeSize = "sm" | "md";
|
|
6
|
-
interface AnimatedBadgeProps extends Omit<HTMLMotionProps<"span">, "children"> {
|
|
4
|
+
export type AnimatedBadgeStatus = "neutral" | "info" | "success" | "warning" | "danger" | "loading";
|
|
5
|
+
export type AnimatedBadgeSize = "sm" | "md";
|
|
6
|
+
export interface AnimatedBadgeProps extends Omit<HTMLMotionProps<"span">, "children"> {
|
|
7
7
|
status?: AnimatedBadgeStatus;
|
|
8
8
|
size?: AnimatedBadgeSize;
|
|
9
9
|
children?: ReactNode;
|
|
@@ -12,7 +12,6 @@ interface AnimatedBadgeProps extends Omit<HTMLMotionProps<"span">, "children"> {
|
|
|
12
12
|
pulse?: boolean;
|
|
13
13
|
contentKey?: string | number;
|
|
14
14
|
}
|
|
15
|
-
declare function AnimatedBadge({ status, size, children, icon, showIcon, pulse, contentKey, className, ...rest }: AnimatedBadgeProps): import("react").JSX.Element;
|
|
15
|
+
export declare function AnimatedBadge({ status, size, children, icon, showIcon, pulse, contentKey, className, ...rest }: AnimatedBadgeProps): import("react").JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { AnimatedBadge, AnimatedBadgeProps, AnimatedBadgeSize, AnimatedBadgeStatus };
|
|
18
17
|
//# sourceMappingURL=animated-badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animated-badge.d.ts","names":[],"sources":["../../../src/components/motion/animated-badge.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"animated-badge.d.ts","names":[],"sources":["../../../src/components/motion/animated-badge.tsx"],"mappings":";;;YAeY;YAEA;iBAEK,2BAA2B,KAAK;EAC/C,SAAS;EACT,OAAO;EACP,WAAW;EACX,OAAO;EACP;EACA;EACA;;wBAmFc,gBACd,QACA,MACA,UACA,MACA,UACA,OACA,YACA,cACG,QACF,qCAAkB,IAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { EASE_OUT } from "../../lib/ease.js";
|
|
3
3
|
import { cn } from "@kumix/utils";
|
|
4
|
+
import { AlertTriangle, Check, Circle, Info, LoaderCircle, X } from "lucide-react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
6
|
-
import { AlertTriangle, Check, Circle, Info, LoaderCircle, X } from "lucide-react";
|
|
7
7
|
//#region src/components/motion/animated-badge.tsx
|
|
8
8
|
const STATUS_CLASS = {
|
|
9
9
|
neutral: "border-border bg-card text-muted-foreground",
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
//#region src/components/motion/animated-number.d.ts
|
|
2
|
-
interface AnimatedNumberProps {
|
|
2
|
+
export interface AnimatedNumberProps {
|
|
3
3
|
value: number;
|
|
4
4
|
duration?: number;
|
|
5
5
|
format?: (n: number) => string;
|
|
6
6
|
className?: string;
|
|
7
7
|
startOnView?: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare function AnimatedNumber({ value, duration, format, className, startOnView }: AnimatedNumberProps): import("react").JSX.Element;
|
|
9
|
+
export declare function AnimatedNumber({ value, duration, format, className, startOnView }: AnimatedNumberProps): import("react").JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { AnimatedNumber, AnimatedNumberProps };
|
|
12
11
|
//# sourceMappingURL=animated-number.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animated-number.d.ts","names":[],"sources":["../../../src/components/motion/animated-number.tsx"],"mappings":";
|
|
1
|
+
{"version":3,"file":"animated-number.d.ts","names":[],"sources":["../../../src/components/motion/animated-number.tsx"],"mappings":";iBAQiB;EACf;EACA;EACA,UAAU;EACV;EACA;;wBAGc,iBACd,OACA,UACA,QACA,WACA,eACC,sCAAmB,IAAA"}
|
|
@@ -17,13 +17,13 @@ interface AnimatedSidebarContextValue {
|
|
|
17
17
|
toggleSidebar: () => void;
|
|
18
18
|
triggerRef: React.RefObject<HTMLButtonElement | null>;
|
|
19
19
|
}
|
|
20
|
-
declare function useAnimatedSidebar(): AnimatedSidebarContextValue;
|
|
20
|
+
export declare function useAnimatedSidebar(): AnimatedSidebarContextValue;
|
|
21
21
|
type SidebarProviderStyle = CSSProperties & {
|
|
22
22
|
"--sidebar-width"?: string;
|
|
23
23
|
"--sidebar-width-icon"?: string;
|
|
24
24
|
"--sidebar-width-mobile"?: string;
|
|
25
25
|
};
|
|
26
|
-
interface AnimatedSidebarProviderProps extends HTMLAttributes<HTMLDivElement> {
|
|
26
|
+
export interface AnimatedSidebarProviderProps extends HTMLAttributes<HTMLDivElement> {
|
|
27
27
|
open?: boolean;
|
|
28
28
|
defaultOpen?: boolean;
|
|
29
29
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -32,8 +32,8 @@ interface AnimatedSidebarProviderProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
32
32
|
onOpenMobileChange?: (open: boolean) => void;
|
|
33
33
|
style?: SidebarProviderStyle;
|
|
34
34
|
}
|
|
35
|
-
declare function AnimatedSidebarProvider({ children, open, defaultOpen, onOpenChange, openMobile, defaultOpenMobile, onOpenMobileChange, className, style, ...props }: AnimatedSidebarProviderProps): import("react").JSX.Element;
|
|
36
|
-
interface AnimatedSidebarProps extends Omit<HTMLMotionProps<"aside">, "children"> {
|
|
35
|
+
export declare function AnimatedSidebarProvider({ children, open, defaultOpen, onOpenChange, openMobile, defaultOpenMobile, onOpenMobileChange, className, style, ...props }: AnimatedSidebarProviderProps): import("react").JSX.Element;
|
|
36
|
+
export interface AnimatedSidebarProps extends Omit<HTMLMotionProps<"aside">, "children"> {
|
|
37
37
|
children?: ReactNode;
|
|
38
38
|
side?: SidebarSide;
|
|
39
39
|
variant?: SidebarVariant;
|
|
@@ -41,30 +41,30 @@ interface AnimatedSidebarProps extends Omit<HTMLMotionProps<"aside">, "children"
|
|
|
41
41
|
ariaLabel?: string;
|
|
42
42
|
panelClassName?: string;
|
|
43
43
|
}
|
|
44
|
-
declare const AnimatedSidebar: import("react").ForwardRefExoticComponent<Omit<AnimatedSidebarProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
45
|
-
interface AnimatedSidebarTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
46
|
-
declare const AnimatedSidebarTrigger: import("react").ForwardRefExoticComponent<AnimatedSidebarTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
47
|
-
interface AnimatedSidebarCloseProps extends ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
48
|
-
declare const AnimatedSidebarClose: import("react").ForwardRefExoticComponent<AnimatedSidebarCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
49
|
-
interface AnimatedSidebarRailProps extends ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
50
|
-
declare const AnimatedSidebarRail: import("react").ForwardRefExoticComponent<AnimatedSidebarRailProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
51
|
-
interface AnimatedSidebarInsetProps extends HTMLMotionProps<"main"> {}
|
|
52
|
-
declare const AnimatedSidebarInset: import("react").ForwardRefExoticComponent<Omit<AnimatedSidebarInsetProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
53
|
-
declare const AnimatedSidebarHeader: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
54
|
-
declare const AnimatedSidebarContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
55
|
-
declare const AnimatedSidebarFooter: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
56
|
-
declare const AnimatedSidebarGroup: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
57
|
-
declare const AnimatedSidebarGroupLabel: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
58
|
-
declare const AnimatedSidebarGroupContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
59
|
-
declare const AnimatedSidebarMenu: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLUListElement> & import("react").RefAttributes<HTMLUListElement>>;
|
|
60
|
-
declare const AnimatedSidebarMenuItem: import("react").ForwardRefExoticComponent<Omit<HTMLMotionProps<"li">, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
61
|
-
interface AnimatedSidebarMenuSubProps extends Omit<HTMLMotionProps<"ul">, "children"> {
|
|
44
|
+
export declare const AnimatedSidebar: import("react").ForwardRefExoticComponent<Omit<AnimatedSidebarProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
45
|
+
export interface AnimatedSidebarTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
46
|
+
export declare const AnimatedSidebarTrigger: import("react").ForwardRefExoticComponent<AnimatedSidebarTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
47
|
+
export interface AnimatedSidebarCloseProps extends ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
48
|
+
export declare const AnimatedSidebarClose: import("react").ForwardRefExoticComponent<AnimatedSidebarCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
49
|
+
export interface AnimatedSidebarRailProps extends ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
50
|
+
export declare const AnimatedSidebarRail: import("react").ForwardRefExoticComponent<AnimatedSidebarRailProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
51
|
+
export interface AnimatedSidebarInsetProps extends HTMLMotionProps<"main"> {}
|
|
52
|
+
export declare const AnimatedSidebarInset: import("react").ForwardRefExoticComponent<Omit<AnimatedSidebarInsetProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
53
|
+
export declare const AnimatedSidebarHeader: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
54
|
+
export declare const AnimatedSidebarContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
55
|
+
export declare const AnimatedSidebarFooter: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
56
|
+
export declare const AnimatedSidebarGroup: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
57
|
+
export declare const AnimatedSidebarGroupLabel: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
58
|
+
export declare const AnimatedSidebarGroupContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
59
|
+
export declare const AnimatedSidebarMenu: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLUListElement> & import("react").RefAttributes<HTMLUListElement>>;
|
|
60
|
+
export declare const AnimatedSidebarMenuItem: import("react").ForwardRefExoticComponent<Omit<HTMLMotionProps<"li">, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
61
|
+
export interface AnimatedSidebarMenuSubProps extends Omit<HTMLMotionProps<"ul">, "children"> {
|
|
62
62
|
open: boolean;
|
|
63
63
|
children?: ReactNode;
|
|
64
64
|
}
|
|
65
|
-
declare const AnimatedSidebarMenuSub: import("react").ForwardRefExoticComponent<Omit<AnimatedSidebarMenuSubProps, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
66
|
-
declare const AnimatedSidebarMenuSubItem: import("react").ForwardRefExoticComponent<Omit<HTMLMotionProps<"li">, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
67
|
-
interface AnimatedSidebarMenuSubButtonProps {
|
|
65
|
+
export declare const AnimatedSidebarMenuSub: import("react").ForwardRefExoticComponent<Omit<AnimatedSidebarMenuSubProps, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
66
|
+
export declare const AnimatedSidebarMenuSubItem: import("react").ForwardRefExoticComponent<Omit<HTMLMotionProps<"li">, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
67
|
+
export interface AnimatedSidebarMenuSubButtonProps {
|
|
68
68
|
children: ReactNode;
|
|
69
69
|
icon?: ReactNode;
|
|
70
70
|
href?: string;
|
|
@@ -76,8 +76,8 @@ interface AnimatedSidebarMenuSubButtonProps {
|
|
|
76
76
|
onSelect?: () => void;
|
|
77
77
|
className?: string;
|
|
78
78
|
}
|
|
79
|
-
declare function AnimatedSidebarMenuSubButton({ children, icon, href, isActive, disabled, closeOnSelect, target, rel, onSelect, className }: AnimatedSidebarMenuSubButtonProps): import("react").JSX.Element;
|
|
80
|
-
interface AnimatedSidebarMenuButtonProps {
|
|
79
|
+
export declare function AnimatedSidebarMenuSubButton({ children, icon, href, isActive, disabled, closeOnSelect, target, rel, onSelect, className }: AnimatedSidebarMenuSubButtonProps): import("react").JSX.Element;
|
|
80
|
+
export interface AnimatedSidebarMenuButtonProps {
|
|
81
81
|
children: ReactNode;
|
|
82
82
|
icon?: ReactNode;
|
|
83
83
|
badge?: ReactNode;
|
|
@@ -91,7 +91,6 @@ interface AnimatedSidebarMenuButtonProps {
|
|
|
91
91
|
onSelect?: () => void;
|
|
92
92
|
className?: string;
|
|
93
93
|
}
|
|
94
|
-
declare function AnimatedSidebarMenuButton({ children, icon, badge, href, isActive, ariaExpanded, disabled, closeOnSelect, target, rel, onSelect, className }: AnimatedSidebarMenuButtonProps): import("react").JSX.Element;
|
|
94
|
+
export declare function AnimatedSidebarMenuButton({ children, icon, badge, href, isActive, ariaExpanded, disabled, closeOnSelect, target, rel, onSelect, className }: AnimatedSidebarMenuButtonProps): import("react").JSX.Element;
|
|
95
95
|
//#endregion
|
|
96
|
-
export { AnimatedSidebar, AnimatedSidebarClose, AnimatedSidebarCloseProps, AnimatedSidebarContent, AnimatedSidebarFooter, AnimatedSidebarGroup, AnimatedSidebarGroupContent, AnimatedSidebarGroupLabel, AnimatedSidebarHeader, AnimatedSidebarInset, AnimatedSidebarInsetProps, AnimatedSidebarMenu, AnimatedSidebarMenuButton, AnimatedSidebarMenuButtonProps, AnimatedSidebarMenuItem, AnimatedSidebarMenuSub, AnimatedSidebarMenuSubButton, AnimatedSidebarMenuSubButtonProps, AnimatedSidebarMenuSubItem, AnimatedSidebarMenuSubProps, AnimatedSidebarProps, AnimatedSidebarProvider, AnimatedSidebarProviderProps, AnimatedSidebarRail, AnimatedSidebarRailProps, AnimatedSidebarTrigger, AnimatedSidebarTriggerProps, useAnimatedSidebar };
|
|
97
96
|
//# sourceMappingURL=animated-sidebar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animated-sidebar.d.ts","names":[],"sources":["../../../src/components/motion/animated-sidebar.tsx"],"mappings":";;;KA+BK;KACA;KACA;KACA;UAyGK;EACR;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,gBAAgB;EAChB,OAAO;EACP;EACA,YAAY,MAAM,UAAU;;
|
|
1
|
+
{"version":3,"file":"animated-sidebar.d.ts","names":[],"sources":["../../../src/components/motion/animated-sidebar.tsx"],"mappings":";;;KA+BK;KACA;KACA;KACA;UAyGK;EACR;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,gBAAgB;EAChB,OAAO;EACP;EACA,YAAY,MAAM,UAAU;;wBAad,sBAAkB;KAgB7B,uBAAuB;EAC1B;EACA;EACA;;iBAGe,qCAAqC,eAAe;EACnE;EACA;EACA,gBAAgB;EAChB;EACA;EACA,sBAAsB;EACtB,QAAQ;;wBAGM,0BACd,UACA,MACA,aACA,cACA,YACA,mBACA,oBACA,WACA,UACG,SACF,+CAA4B,IAAA;iBA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ESS } from "../../lib/ea
|
|
|
3
3
|
import { SharedLayoutBg } from "./shared-layout-bg.js";
|
|
4
4
|
import { createContext, createElement, forwardRef, useCallback, useContext, useEffect, useId, useRef, useState, useSyncExternalStore } from "react";
|
|
5
5
|
import { cn } from "@kumix/utils";
|
|
6
|
+
import { ChevronRight } from "lucide-react";
|
|
6
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
8
|
-
import { ChevronRight } from "lucide-react";
|
|
9
9
|
import { createPortal } from "react-dom";
|
|
10
10
|
//#region src/components/motion/animated-sidebar.tsx
|
|
11
11
|
const MOBILE_QUERY = "(max-width: 767px)";
|