@kumix/ui 0.3.11 → 0.3.13
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 +13 -13
- 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/activity-row.js.map +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-activity/index.js.map +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-code.js.map +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/agent-disclosure.js +1 -1
- package/dist/components/agents/agent-disclosure.js.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/ai-sidebar.js.map +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/approval-card/index.js.map +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/chat-app.js +1 -1
- package/dist/components/agents/chat-app.js.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/citations.js.map +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/code-block.js.map +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/file-diff.js.map +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/image-generation.js.map +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/agent-progress.js +1 -1
- package/dist/components/agents/loading-states/agent-progress.js.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/reasoning-text.js +1 -1
- package/dist/components/agents/loading-states/reasoning-text.js.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/loading-states/thinking-shimmer.js +1 -1
- package/dist/components/agents/loading-states/thinking-shimmer.js.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-bubble.js.map +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-scroller.js +1 -1
- package/dist/components/agents/message-scroller.js.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/message.js +1 -1
- package/dist/components/agents/message.js.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/prompt-input.js.map +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/streaming-response.js.map +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/todo-list.js.map +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-approval.js.map +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/agents/tool-result.js.map +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/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/action-swap.js +1 -1
- package/dist/components/motion/action-swap.js.map +1 -1
- package/dist/components/motion/adaptive-stepper.d.ts +7 -8
- package/dist/components/motion/adaptive-stepper.d.ts.map +1 -1
- package/dist/components/motion/adaptive-stepper.js +1 -1
- package/dist/components/motion/adaptive-stepper.js.map +1 -1
- 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-badge.js.map +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-number.js +1 -1
- package/dist/components/motion/animated-number.js.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-sidebar.js.map +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/animated-toast-stack.js.map +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/attachment-upload.js.map +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/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/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/icon-button.js +1 -1
- package/dist/components/motion/availability-scheduler/icon-button.js.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/index.js.map +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/bloom-menu.js.map +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/bottom-sheet.js +1 -1
- package/dist/components/motion/bottom-sheet.js.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/bounce-sidebar.js +1 -1
- package/dist/components/motion/bounce-sidebar.js.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/bouncy-accordion.js.map +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/base.js +1 -1
- package/dist/components/motion/button/base.js.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/metallic.js +1 -1
- package/dist/components/motion/button/metallic.js.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/card-folder.d.ts +30 -0
- package/dist/components/motion/card-folder.d.ts.map +1 -0
- package/dist/components/motion/card-folder.js +254 -0
- package/dist/components/motion/card-folder.js.map +1 -0
- 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/center-morph-modal.js.map +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/checkbox.js +1 -1
- package/dist/components/motion/checkbox.js.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/chromatic-text-reveal.js +1 -1
- package/dist/components/motion/chromatic-text-reveal.js.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/content.js.map +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 +1 -1
- package/dist/components/motion/combobox/context.js.map +1 -1
- 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 +1 -1
- package/dist/components/motion/combobox/list.js.map +1 -1
- 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 +1 -1
- package/dist/components/motion/combobox/trigger.js.map +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/command-palette.js.map +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/context-menu.js.map +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/cylinder-carousel.js +1 -1
- package/dist/components/motion/cylinder-carousel.js.map +1 -1
- package/dist/components/motion/digit-swap.d.ts +23 -0
- package/dist/components/motion/digit-swap.d.ts.map +1 -0
- package/dist/components/motion/digit-swap.js +77 -0
- package/dist/components/motion/digit-swap.js.map +1 -0
- package/dist/components/motion/dock.d.ts +5 -6
- package/dist/components/motion/dock.d.ts.map +1 -1
- package/dist/components/motion/dock.js +1 -1
- package/dist/components/motion/dock.js.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/drawer.js +1 -1
- package/dist/components/motion/drawer.js.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/dynamic-island.js +1 -1
- package/dist/components/motion/dynamic-island.js.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-action-bar.js +1 -1
- package/dist/components/motion/expandable-action-bar.js.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-control.js +1 -1
- package/dist/components/motion/expandable-control.js.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/expandable-tabs.js +1 -1
- package/dist/components/motion/expandable-tabs.js.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/expanding-arrow-button.js +1 -1
- package/dist/components/motion/expanding-arrow-button.js.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/feedback-widget.js.map +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-tree.js.map +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/file-upload.js.map +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/hold-action-button.js +1 -1
- package/dist/components/motion/hold-action-button.js.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/infinite-masonry.js.map +1 -1
- package/dist/components/motion/input.d.ts +3 -4
- package/dist/components/motion/input.d.ts.map +1 -1
- package/dist/components/motion/input.js +1 -1
- package/dist/components/motion/input.js.map +1 -1
- package/dist/components/motion/liquid.d.ts +6 -7
- package/dist/components/motion/liquid.d.ts.map +1 -1
- package/dist/components/motion/liquid.js +1 -1
- package/dist/components/motion/liquid.js.map +1 -1
- package/dist/components/motion/loader.d.ts +3 -4
- package/dist/components/motion/loader.d.ts.map +1 -1
- package/dist/components/motion/loader.js +1 -1
- package/dist/components/motion/loader.js.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/magnetic.js +1 -1
- package/dist/components/motion/magnetic.js.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/marquee.js +1 -1
- package/dist/components/motion/marquee.js.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-modal.js +1 -1
- package/dist/components/motion/morphing-modal.js.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-search.js.map +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/morphing-tabs.js.map +1 -1
- package/dist/components/motion/multi-select/content.d.ts +2 -3
- package/dist/components/motion/multi-select/content.d.ts.map +1 -1
- package/dist/components/motion/multi-select/content.js +1 -1
- package/dist/components/motion/multi-select/content.js.map +1 -1
- package/dist/components/motion/multi-select/context.d.ts +9 -10
- package/dist/components/motion/multi-select/context.d.ts.map +1 -1
- package/dist/components/motion/multi-select/context.js +1 -1
- package/dist/components/motion/multi-select/context.js.map +1 -1
- package/dist/components/motion/multi-select/list.d.ts +12 -13
- package/dist/components/motion/multi-select/list.d.ts.map +1 -1
- package/dist/components/motion/multi-select/list.js +1 -1
- package/dist/components/motion/multi-select/list.js.map +1 -1
- package/dist/components/motion/multi-select/trigger.d.ts +6 -7
- package/dist/components/motion/multi-select/trigger.d.ts.map +1 -1
- package/dist/components/motion/multi-select/trigger.js +1 -1
- package/dist/components/motion/multi-select/trigger.js.map +1 -1
- 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/magnetic.js +1 -1
- package/dist/components/motion/not-found/magnetic.js.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/shared.js +1 -1
- package/dist/components/motion/not-found/shared.js.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/spotlight.js +1 -1
- package/dist/components/motion/not-found/spotlight.js.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/notification-stack.js.map +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/number-ticker.js +1 -1
- package/dist/components/motion/number-ticker.js.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/otp-input.js +1 -1
- package/dist/components/motion/otp-input.js.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/overflow-actions.js.map +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/parallax.js +1 -1
- package/dist/components/motion/parallax.js.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-morph.js +1 -1
- package/dist/components/motion/popover-morph.js.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/popover.js +1 -1
- package/dist/components/motion/popover.js.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/preview-rail.js +1 -1
- package/dist/components/motion/preview-rail.js.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/project-folder.js.map +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/pull-to-refresh.js +1 -1
- package/dist/components/motion/pull-to-refresh.js.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/radio.js +1 -1
- package/dist/components/motion/radio.js.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-bubble.js +1 -1
- package/dist/components/motion/range-slider-bubble.js.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-fluid.js +1 -1
- package/dist/components/motion/range-slider-fluid.js.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-ruler.js +1 -1
- package/dist/components/motion/range-slider-ruler.js.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-wave.js +1 -1
- package/dist/components/motion/range-slider-wave.js.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/range-slider.js +1 -1
- package/dist/components/motion/range-slider.js.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-progress.js +1 -1
- package/dist/components/motion/scroll-progress.js.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-reveal.js +1 -1
- package/dist/components/motion/scroll-reveal.js.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/scroll-to.js +1 -1
- package/dist/components/motion/scroll-to.js.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-morph.js.map +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/select.js.map +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/shader-background.js +1 -1
- package/dist/components/motion/shader-background.js.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/shared-layout-bg.js +1 -1
- package/dist/components/motion/shared-layout-bg.js.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 +1 -1
- 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/slide-action-button.js +1 -1
- package/dist/components/motion/slide-action-button.js.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/swipeable-list.js +1 -1
- package/dist/components/motion/swipeable-list.js.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/switch.js +1 -1
- package/dist/components/motion/switch.js.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 +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/skeleton-rows.d.ts +1 -2
- package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -1
- package/dist/components/motion/table/skeleton-rows.js +1 -1
- package/dist/components/motion/table/skeleton-rows.js.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-header.js.map +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/table/table-menu.js +1 -1
- package/dist/components/motion/table/table-menu.js.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/tabs.js +1 -1
- package/dist/components/motion/tabs.js.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-reveal.js +1 -1
- package/dist/components/motion/text-reveal.js.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-scramble.js +1 -1
- package/dist/components/motion/text-scramble.js.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/text-shimmer.js +1 -1
- package/dist/components/motion/text-shimmer.js.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/theme-toggle.js.map +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/tilt-card.js +1 -1
- package/dist/components/motion/tilt-card.js.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/tooltip.js +1 -1
- package/dist/components/motion/tooltip.js.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/motion/wheel-picker.js +1 -1
- package/dist/components/motion/wheel-picker.js.map +1 -1
- package/dist/components/reui/alert.d.ts.map +1 -1
- package/dist/components/reui/alert.js +1 -1
- package/dist/components/reui/alert.js.map +1 -1
- package/dist/components/reui/autocomplete.d.ts +2 -2
- package/dist/components/reui/autocomplete.d.ts.map +1 -1
- package/dist/components/reui/autocomplete.js +1 -1
- package/dist/components/reui/autocomplete.js.map +1 -1
- package/dist/components/reui/badge.d.ts +1 -1
- package/dist/components/reui/badge.d.ts.map +1 -1
- package/dist/components/reui/badge.js +1 -1
- package/dist/components/reui/badge.js.map +1 -1
- 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-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-columns.js.map +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-footer.js.map +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-item.js.map +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-nav.js.map +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.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 +1 -1
- package/dist/components/reui/code-block/code-block.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-cell-selection.js +1 -1
- package/dist/components/reui/data-grid/data-grid-cell-selection.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js +1 -1
- 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 +9 -6
- package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-i18n.d.ts +1 -1
- package/dist/components/reui/data-grid/data-grid-i18n.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.js +1 -1
- 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.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid.d.ts +28 -28
- package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid.js +1 -1
- 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/date-selector.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-content.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.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-month-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-resource-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-resource-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.js +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 +1 -1
- package/dist/components/reui/filters/filters-builder.js.map +1 -1
- 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 +1 -1
- package/dist/components/reui/filters/filters-editors.js.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/components/reui/frame.js +1 -1
- package/dist/components/reui/frame.js.map +1 -1
- package/dist/components/reui/gantt/gantt-bar.js +1 -1
- package/dist/components/reui/gantt/gantt-bar.js.map +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +1 -1
- package/dist/components/reui/gantt/gantt-nav.js.map +1 -1
- package/dist/components/reui/gantt/gantt-view.js +1 -1
- package/dist/components/reui/gantt/gantt-view.js.map +1 -1
- package/dist/components/reui/gantt/gantt.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt.js +1 -1
- package/dist/components/reui/gantt/gantt.js.map +1 -1
- package/dist/components/reui/icon-stack.js +1 -1
- package/dist/components/reui/icon-stack.js.map +1 -1
- package/dist/components/reui/icon-tile.d.ts.map +1 -1
- package/dist/components/reui/icon-tile.js +1 -1
- package/dist/components/reui/icon-tile.js.map +1 -1
- package/dist/components/reui/kanban.d.ts +11 -11
- package/dist/components/reui/kanban.d.ts.map +1 -1
- package/dist/components/reui/kanban.js +1 -1
- package/dist/components/reui/kanban.js.map +1 -1
- package/dist/components/reui/number-field.js +1 -1
- package/dist/components/reui/number-field.js.map +1 -1
- package/dist/components/reui/phone-input.js +1 -1
- package/dist/components/reui/phone-input.js.map +1 -1
- package/dist/components/reui/rating.d.ts.map +1 -1
- package/dist/components/reui/rating.js +1 -1
- package/dist/components/reui/rating.js.map +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/sortable.js +1 -1
- package/dist/components/reui/sortable.js.map +1 -1
- package/dist/components/reui/stepper.d.ts.map +1 -1
- package/dist/components/reui/stepper.js +1 -1
- package/dist/components/reui/stepper.js.map +1 -1
- package/dist/components/reui/timeline.d.ts.map +1 -1
- package/dist/components/reui/timeline.js +1 -1
- package/dist/components/reui/timeline.js.map +1 -1
- package/dist/components/reui/tree.d.ts.map +1 -1
- package/dist/components/reui/tree.js +1 -1
- package/dist/components/reui/tree.js.map +1 -1
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.js +1 -1
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +1 -1
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -1
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/attachment.js +1 -1
- package/dist/components/ui/attachment.js.map +1 -1
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +1 -1
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble.d.ts +1 -1
- package/dist/components/ui/bubble.d.ts.map +1 -1
- package/dist/components/ui/bubble.js +1 -1
- package/dist/components/ui/bubble.js.map +1 -1
- package/dist/components/ui/button-group.js +1 -1
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.js +1 -1
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.js +1 -1
- package/dist/components/ui/carousel.js.map +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/chart.js +1 -1
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +2 -2
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/combobox.js +1 -1
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +1 -1
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +1 -1
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +1 -1
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/field.js +2 -2
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +1 -1
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.js +1 -1
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.d.ts +2 -2
- package/dist/components/ui/item.js +1 -1
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/kbd.js +1 -1
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/marker.d.ts +1 -1
- package/dist/components/ui/marker.d.ts.map +1 -1
- package/dist/components/ui/marker.js +1 -1
- package/dist/components/ui/marker.js.map +1 -1
- package/dist/components/ui/menubar.js +1 -1
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/message-scroller.js +1 -1
- package/dist/components/ui/message-scroller.js.map +1 -1
- package/dist/components/ui/message.d.ts.map +1 -1
- package/dist/components/ui/message.js +1 -1
- package/dist/components/ui/message.js.map +1 -1
- package/dist/components/ui/native-select.d.ts.map +1 -1
- package/dist/components/ui/native-select.js +1 -1
- package/dist/components/ui/native-select.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +1 -1
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.js +1 -1
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +1 -1
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/questionnaire.js +3 -3
- package/dist/components/ui/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +2 -2
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +1 -1
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +1 -1
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +1 -1
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner.js +1 -1
- package/dist/components/ui/spinner.js.map +1 -1
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +1 -1
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toast.js +2 -2
- package/dist/components/ui/toast.js.map +1 -1
- package/dist/components/ui/toggle-group.js +1 -1
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +1 -1
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/{data-grid-i18n-52UUYPbr.d.ts → data-grid-i18n-TQR2PZlU.d.ts} +1 -13
- 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/package.json +6 -4
- package/dist/data-grid-i18n-52UUYPbr.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-reveal.js","names":[],"sources":["../../../src/components/motion/text-reveal.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ElementType, type ReactNode, useRef } from \"react\";\nimport { motion, type Transition, useInView, useReducedMotion } from \"motion/react\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"text-reveal.js","names":[],"sources":["../../../src/components/motion/text-reveal.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ElementType, type ReactNode, useRef } from \"react\";\nimport { cn } from \"cn\";\nimport { motion, type Transition, useInView, useReducedMotion } from \"motion/react\";\n\nimport { EASE_OUT } from \"../../lib/ease\";\n\ntype SplitMode = \"word\" | \"char\";\n\nexport interface TextRevealProps {\n text: string | string[];\n as?: ElementType;\n className?: string;\n split?: SplitMode;\n stagger?: number;\n delay?: number;\n blur?: number;\n yOffset?: string | number;\n spring?: { stiffness?: number; damping?: number; mass?: number };\n once?: boolean;\n whileInView?: boolean;\n children?: ReactNode;\n}\n\nconst DEFAULT_SPRING = { stiffness: 140, damping: 26, mass: 1.2 };\n\ntype WordGroup = { text: string; trailing: string };\n\n/**\n * One tokenizer for both modes: a line becomes the words it is made of, each\n * carrying the whitespace that follows it. Word mode animates a group at a\n * time, char mode the characters inside one — so the two can't drift apart on\n * what counts as a word or where a space belongs. Runs of whitespace and tabs\n * survive as their own group rather than collapsing.\n */\nfunction toWordGroups(line: string): WordGroup[] {\n const chunks = line.match(/\\S+\\s*|\\s+/g) ?? [];\n return chunks.map((chunk) => {\n const text = chunk.replace(/\\s+$/, \"\");\n return { text, trailing: chunk.slice(text.length) };\n });\n}\n\nexport function TextReveal({\n text,\n as: Comp = \"span\",\n className,\n split = \"word\",\n stagger = 0.09,\n delay = 0,\n blur = 12,\n yOffset = \"40%\",\n spring,\n once = true,\n whileInView = false,\n children,\n}: TextRevealProps) {\n const ref = useRef<HTMLElement>(null);\n const inView = useInView(ref, { once, amount: 0.4 });\n const reduce = useReducedMotion();\n const shouldAnimate = whileInView ? inView : true;\n\n const lines = Array.isArray(text) ? text : [text];\n const s = { ...DEFAULT_SPRING, ...spring };\n\n let unitIndex = 0;\n const lineCounts = new Map<string, number>();\n\n return (\n <Comp ref={ref} className={cn(\"block\", className)}>\n {lines.map((line) => {\n const lineCount = lineCounts.get(line) ?? 0;\n lineCounts.set(line, lineCount + 1);\n const lineKey = `${line}-${lineCount}`;\n const unitCounts = new Map<string, number>();\n\n const renderUnit = (unit: string) => {\n const d = delay + unitIndex * stagger;\n unitIndex += 1;\n const unitCount = unitCounts.get(unit) ?? 0;\n unitCounts.set(unit, unitCount + 1);\n const unitKey = `${unit}-${unitCount}`;\n const initial = reduce\n ? { opacity: 0 }\n : { y: yOffset, opacity: 0, filter: `blur(${blur}px)` };\n const animate = shouldAnimate\n ? reduce\n ? { opacity: 1 }\n : { y: 0, opacity: 1, filter: \"blur(0px)\" }\n : initial;\n const transition: Transition = reduce\n ? { opacity: { duration: 0.25, ease: EASE_OUT, delay: d * 0.3 } }\n : {\n y: { type: \"spring\" as const, ...s, delay: d },\n opacity: { duration: 0.7, ease: EASE_OUT, delay: d },\n filter: { duration: 0.9, ease: EASE_OUT, delay: d },\n };\n return (\n <motion.span\n key={unitKey}\n initial={initial}\n animate={animate}\n transition={transition}\n // `whitespace-pre` is load-bearing: a unit's trailing space is\n // inside an inline-block and would otherwise collapse to zero\n // width, running every word together.\n className=\"inline-block whitespace-pre will-change-transform\"\n >\n {unit}\n </motion.span>\n );\n };\n\n const groups = toWordGroups(line);\n const groupCounts = new Map<string, number>();\n\n return (\n <span key={lineKey} className=\"block\">\n {groups.map((group) => {\n const whole = group.text + group.trailing;\n // Characters animate one at a time, but each word (plus the\n // space that follows it) sits in its own inline-block so a long\n // line wraps between words instead of mid-word.\n if (split !== \"char\") return renderUnit(whole);\n\n const groupCount = groupCounts.get(whole) ?? 0;\n groupCounts.set(whole, groupCount + 1);\n return (\n <span key={`${whole}-${groupCount}`} className=\"inline-block whitespace-pre\">\n {Array.from(whole).map((char) => renderUnit(char))}\n </span>\n );\n })}\n </span>\n );\n })}\n {children}\n </Comp>\n );\n}\n"],"mappings":";;;;;;;AAyBA,MAAM,iBAAiB;CAAE,WAAW;CAAK,SAAS;CAAI,MAAM;AAAI;;;;;;;;AAWhE,SAAS,aAAa,MAA2B;CAE/C,QADe,KAAK,MAAM,aAAa,KAAK,CAAC,EAAA,CAC/B,KAAK,UAAU;EAC3B,MAAM,OAAO,MAAM,QAAQ,QAAQ,EAAE;EACrC,OAAO;GAAE;GAAM,UAAU,MAAM,MAAM,KAAK,MAAM;EAAE;CACpD,CAAC;AACH;AAEA,S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OAAO;KAAE;KAC7C,SAAS;MAAE,UAAU;MAAK,MAAM;MAAU,OAAO;KAAE;KACnD,QAAQ;MAAE,UAAU;MAAK,MAAM;MAAU,OAAO;KAAE;IACpD;IACJ,OACE,oBAAC,OAAO,MAAR;KAEW;KACA;KACG;KAIZ,WAAU;KAET,UAAA;IACU,GAVN,OAUM;GAEjB;GAEA,MAAM,SAAS,aAAa,IAAI;GAChC,MAAM,8BAAc,IAAI,IAAoB;GAE5C,OACE,oBAAC,QAAD;IAAoB,WAAU;IAC3B,UAAA,OAAO,KAAK,UAAU;KACrB,MAAM,QAAQ,MAAM,OAAO,MAAM;KAIjC,IAAI,UAAU,QAAQ,OAAO,WAAW,KAAK;KAE7C,MAAM,aAAa,YAAY,IAAI,KAAK,KAAK;KAC7C,YAAY,IAAI,OAAO,aAAa,CAAC;KACrC,OACE,oBAAC,QAAD;MAAqC,WAAU;MAC5C,UAAA,MAAM,KAAK,KAAK,CAAC,CAAC,KAAK,SAAS,WAAW,IAAI,CAAC;KAC7C,GAFK,GAAG,MAAM,GAAG,YAEjB;IAEV,CAAC;GACG,GAhBK,OAgBL;EAEV,CAAC,GACA,QACG;;AAEV"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
//#region src/components/motion/text-scramble.d.ts
|
|
3
|
-
interface TextScrambleProps {
|
|
3
|
+
export interface TextScrambleProps {
|
|
4
4
|
/** Final text revealed by the scramble animation. */
|
|
5
5
|
text: string;
|
|
6
6
|
/** Maximum animation duration in milliseconds. */
|
|
@@ -11,7 +11,6 @@ interface TextScrambleProps {
|
|
|
11
11
|
style?: CSSProperties;
|
|
12
12
|
}
|
|
13
13
|
/** Character scramble that resolves to `text` and respects reduced motion. */
|
|
14
|
-
declare function TextScramble({ text, duration, glyphs, className, style }: TextScrambleProps): import("react").JSX.Element;
|
|
14
|
+
export declare function TextScramble({ text, duration, glyphs, className, style }: TextScrambleProps): import("react").JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { TextScramble, TextScrambleProps };
|
|
17
16
|
//# sourceMappingURL=text-scramble.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-scramble.d.ts","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"text-scramble.d.ts","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"mappings":";;iBAQiB;;EAEf;;EAEA;;EAEA;EACA;EACA,QAAQ;;;wBAIM,eACd,MACA,UACA,QACA,WACA,SACC,oCAAiB,IAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useEffect, useRef, useState } from "react";
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "cn";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useReducedMotion } from "motion/react";
|
|
6
6
|
//#region src/components/motion/text-scramble.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-scramble.js","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"sourcesContent":["\"use client\";\n\nimport { type CSSProperties, useEffect, useRef, useState } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"text-scramble.js","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"sourcesContent":["\"use client\";\n\nimport { type CSSProperties, useEffect, useRef, useState } from \"react\";\nimport { cn } from \"cn\";\nimport { useReducedMotion } from \"motion/react\";\n\nconst DEFAULT_GLYPHS = \"ABCDEFGHJKLMNPQRSTUVWXYZ0123456789#%&@$?/\";\n\nexport interface TextScrambleProps {\n /** Final text revealed by the scramble animation. */\n text: string;\n /** Maximum animation duration in milliseconds. */\n duration?: number;\n /** Characters sampled while unresolved positions are scrambling. */\n glyphs?: string;\n className?: string;\n style?: CSSProperties;\n}\n\n/** Character scramble that resolves to `text` and respects reduced motion. */\nexport function TextScramble({\n text,\n duration,\n glyphs = DEFAULT_GLYPHS,\n className,\n style,\n}: TextScrambleProps) {\n const reduce = useReducedMotion() ?? false;\n const [display, setDisplay] = useState(text);\n const mounted = useRef(false);\n\n useEffect(() => {\n if (!mounted.current) {\n mounted.current = true;\n setDisplay(text);\n return;\n }\n\n if (reduce || !glyphs) {\n setDisplay(text);\n return;\n }\n\n const characters = text.split(\"\");\n const startedAt = performance.now();\n const animationDuration = duration ?? Math.min(760, Math.max(420, characters.length * 32));\n let frame = 0;\n let lastUpdate = 0;\n\n const animate = (now: number) => {\n if (now - lastUpdate >= 40) {\n lastUpdate = now;\n const progress = Math.min((now - startedAt) / animationDuration, 1);\n const settled = Math.floor(progress * characters.length);\n setDisplay(\n characters\n .map((character, index) => {\n if (index < settled || character === \" \") return character;\n return glyphs[Math.floor(Math.random() * glyphs.length)];\n })\n .join(\"\"),\n );\n }\n\n if (now - startedAt < animationDuration) {\n frame = requestAnimationFrame(animate);\n } else {\n setDisplay(text);\n }\n };\n\n frame = requestAnimationFrame(animate);\n return () => cancelAnimationFrame(frame);\n }, [duration, glyphs, reduce, text]);\n\n return (\n <span className={cn(\"inline-block whitespace-pre\", className)} style={style}>\n <span className=\"sr-only\">{text}</span>\n <span aria-hidden=\"true\">{reduce ? text : display}</span>\n </span>\n );\n}\n"],"mappings":";;;;;;AAMA,MAAM,iBAAiB;;AAcvB,SAAgB,aAAa,EAC3B,MACA,UACA,SAAS,gBACT,WACA,SACoB;CACpB,MAAM,SAAS,iBAAiB,KAAK;CACrC,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAC3C,MAAM,UAAU,OAAO,KAAK;CAE5B,gBAAgB;EACd,IAAI,CAAC,QAAQ,SAAS;GACpB,QAAQ,UAAU;GAClB,WAAW,IAAI;GACf;EACF;EAEA,IAAI,UAAU,CAAC,QAAQ;GACrB,WAAW,IAAI;GACf;EACF;EAEA,MAAM,aAAa,KAAK,MAAM,EAAE;EAChC,MAAM,YAAY,YAAY,IAAI;EAClC,MAAM,oBAAoB,YAAY,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,WAAW,SAAS,EAAE,CAAC;EACzF,IAAI,QAAQ;EACZ,IAAI,aAAa;EAEjB,MAAM,WAAW,QAAgB;GAC/B,IAAI,MAAM,cAAc,IAAI;IAC1B,aAAa;IACb,MAAM,WAAW,KAAK,KAAK,MAAM,aAAa,mBAAmB,CAAC;IAClE,MAAM,UAAU,KAAK,MAAM,WAAW,WAAW,MAAM;IACvD,WACE,WACG,KAAK,WAAW,UAAU;KACzB,IAAI,QAAQ,WAAW,cAAc,KAAK,OAAO;KACjD,OAAO,OAAO,KAAK,MAAM,KAAK,OAAO,IAAI,OAAO,MAAM;IACxD,CAAC,CAAC,CACD,KAAK,EAAE,CACZ;GACF;GAEA,IAAI,MAAM,YAAY,mBACpB,QAAQ,sBAAsB,OAAO;QAErC,WAAW,IAAI;EAEnB;EAEA,QAAQ,sBAAsB,OAAO;EACrC,aAAa,qBAAqB,KAAK;CACzC,GAAG;EAAC;EAAU;EAAQ;EAAQ;CAAI,CAAC;CAEnC,OACE,qBAAC,QAAD;EAAM,WAAW,GAAG,+BAA+B,SAAS;EAAU;EAAtE,UAAA,CACE,oBAAC,QAAD;GAAM,WAAU;GAAW,UAAA;EAAW,CAAA,GACtC,oBAAC,QAAD;GAAM,eAAY;GAAQ,UAAA,SAAS,OAAO;EAAc,CAAA,CACpD;;AAEV"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from "react";
|
|
2
2
|
//#region src/components/motion/text-shimmer.d.ts
|
|
3
|
-
interface TextShimmerProps {
|
|
3
|
+
export interface TextShimmerProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
as?: ElementType;
|
|
6
6
|
duration?: number;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
declare function TextShimmer({ children, as: Comp, duration, className }: TextShimmerProps): import("react").JSX.Element;
|
|
9
|
+
export declare function TextShimmer({ children, as: Comp, duration, className }: TextShimmerProps): import("react").JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { TextShimmer, TextShimmerProps };
|
|
12
11
|
//# sourceMappingURL=text-shimmer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-shimmer.d.ts","names":[],"sources":["../../../src/components/motion/text-shimmer.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"text-shimmer.d.ts","names":[],"sources":["../../../src/components/motion/text-shimmer.tsx"],"mappings":";;iBAWiB;EACf,UAAU;EACV,KAAK;EACL;EACA;;wBAGc,cACd,UACA,IAAI,MACJ,UACA,aACC,mCAAgB,IAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { TEXT_SHIMMER_CLASS_NAME, TEXT_SHIMMER_KEYFRAMES, textShimmerStyle } from "../../lib/text-shimmer.js";
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "cn";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/motion/text-shimmer.tsx
|
|
6
6
|
function TextShimmer({ children, as: Comp = "span", duration = 2.5, className }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-shimmer.js","names":[],"sources":["../../../src/components/motion/text-shimmer.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType, ReactNode } from \"react\";\
|
|
1
|
+
{"version":3,"file":"text-shimmer.js","names":[],"sources":["../../../src/components/motion/text-shimmer.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType, ReactNode } from \"react\";\nimport { cn } from \"cn\";\n\nimport {\n TEXT_SHIMMER_CLASS_NAME,\n TEXT_SHIMMER_KEYFRAMES,\n textShimmerStyle,\n} from \"../../lib/text-shimmer\";\n\nexport interface TextShimmerProps {\n children: ReactNode;\n as?: ElementType;\n duration?: number;\n className?: string;\n}\n\nexport function TextShimmer({\n children,\n as: Comp = \"span\",\n duration = 2.5,\n className,\n}: TextShimmerProps) {\n return (\n <>\n <style>{TEXT_SHIMMER_KEYFRAMES}</style>\n <Comp\n style={textShimmerStyle(duration)}\n className={cn(\"inline-block\", TEXT_SHIMMER_CLASS_NAME, className)}\n >\n {children}\n </Comp>\n </>\n );\n}\n"],"mappings":";;;;;AAkBA,SAAgB,YAAY,EAC1B,UACA,IAAI,OAAO,QACX,WAAW,KACX,aACmB;CACnB,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,SAAD,EAAA,UAAQ,uBAA8B,CAAA,GACtC,oBAAC,MAAD;EACE,OAAO,iBAAiB,QAAQ;EAChC,WAAW,GAAG,gBAAgB,yBAAyB,SAAS;EAE/D;CACG,CAAA,CACN,EAAA,CAAA;AAEN"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
//#region src/components/motion/theme-toggle.d.ts
|
|
3
|
-
type ThemeVariant = "rectangle" | "circle" | "circle-blur" | "blinds";
|
|
4
|
-
type RectStart = "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | "bottom-up";
|
|
5
|
-
interface ThemeToggleProps extends Omit<ComponentPropsWithoutRef<"button">, "children" | "onClick"> {
|
|
3
|
+
export type ThemeVariant = "rectangle" | "circle" | "circle-blur" | "blinds";
|
|
4
|
+
export type RectStart = "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | "bottom-up";
|
|
5
|
+
export interface ThemeToggleProps extends Omit<ComponentPropsWithoutRef<"button">, "children" | "onClick"> {
|
|
6
6
|
/** Animation variant. Default: "rectangle". */
|
|
7
7
|
variant?: ThemeVariant;
|
|
8
8
|
/** Origin direction for the reveal. Default: "bottom-up". */
|
|
9
9
|
start?: RectStart;
|
|
10
10
|
iconClassName?: string;
|
|
11
11
|
}
|
|
12
|
-
declare function useThemeToggle({ variant, start }?: {
|
|
12
|
+
export declare function useThemeToggle({ variant, start }?: {
|
|
13
13
|
variant?: ThemeVariant;
|
|
14
14
|
start?: RectStart;
|
|
15
15
|
}): {
|
|
@@ -17,7 +17,6 @@ declare function useThemeToggle({ variant, start }?: {
|
|
|
17
17
|
mounted: boolean;
|
|
18
18
|
toggle: () => void;
|
|
19
19
|
};
|
|
20
|
-
declare function ThemeToggle({ variant, start, className, iconClassName, ...rest }: ThemeToggleProps): import("react").JSX.Element;
|
|
20
|
+
export declare function ThemeToggle({ variant, start, className, iconClassName, ...rest }: ThemeToggleProps): import("react").JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { RectStart, ThemeToggle, ThemeToggleProps, ThemeVariant, useThemeToggle };
|
|
23
22
|
//# sourceMappingURL=theme-toggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-toggle.d.ts","names":[],"sources":["../../../src/components/motion/theme-toggle.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"theme-toggle.d.ts","names":[],"sources":["../../../src/components/motion/theme-toggle.tsx"],"mappings":";;YAWY;YAEA;iBAQK,yBACP,KAAK;;EAEb,UAAU;;EAEV,QAAQ;EACR;;wBAiGc,iBACd,SACA;EAEA,UAAU;EACV,QAAQ;;;;;;wBAkDM,cACd,SACA,OACA,WACA,kBACG,QACF,mCAAgB,IAAA"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { EASE_OUT_CSS } from "../../lib/ease.js";
|
|
3
3
|
import { ActionSwapIcon } from "./action-swap.js";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
|
-
import { cn } from "@kumix/utils";
|
|
6
5
|
import { useTheme } from "next-themes";
|
|
6
|
+
import { cn } from "cn";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { useReducedMotion } from "motion/react";
|
|
9
9
|
import { Moon, Sun } from "lucide-react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-toggle.js","names":[],"sources":["../../../src/components/motion/theme-toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentPropsWithoutRef, useEffect, useState } from \"react\";\nimport { Moon, Sun } from \"lucide-react\";\nimport { useReducedMotion } from \"motion/react\";\nimport { useTheme } from \"next-themes\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"theme-toggle.js","names":[],"sources":["../../../src/components/motion/theme-toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentPropsWithoutRef, useEffect, useState } from \"react\";\nimport { cn } from \"cn\";\nimport { Moon, Sun } from \"lucide-react\";\nimport { useReducedMotion } from \"motion/react\";\nimport { useTheme } from \"next-themes\";\n\nimport { EASE_OUT_CSS } from \"../../lib/ease\";\nimport { ActionSwapIcon } from \"./action-swap\";\n\nexport type ThemeVariant = \"rectangle\" | \"circle\" | \"circle-blur\" | \"blinds\";\n\nexport type RectStart =\n | \"top-left\"\n | \"top-right\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"center\"\n | \"bottom-up\";\n\nexport interface ThemeToggleProps\n extends Omit<ComponentPropsWithoutRef<\"button\">, \"children\" | \"onClick\"> {\n /** Animation variant. Default: \"rectangle\". */\n variant?: ThemeVariant;\n /** Origin direction for the reveal. Default: \"bottom-up\". */\n start?: RectStart;\n iconClassName?: string;\n}\n\nconst VT_STYLE_ID = \"beui-theme-toggle-vt\";\n\n// View transitions animate in CSS, not motion springs, so easing here is\n// either EASE_OUT_CSS or a keyword. The circle variants keep the Material\n// standard curve because their reveal expands symmetrically rather than\n// decelerating. Durations differ per variant to match native OS mode switches.\nconst VT_CSS = `\nhtml[data-beui-vt=\"rect\"]::view-transition-old(root) {\n animation: none;\n mix-blend-mode: normal;\n}\nhtml[data-beui-vt=\"rect\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n animation: beui-rect-reveal 400ms ease-out;\n}\nhtml[data-beui-vt=\"circle\"]::view-transition-old(root),\nhtml[data-beui-vt=\"circle-blur\"]::view-transition-old(root) {\n animation: none;\n mix-blend-mode: normal;\n}\nhtml[data-beui-vt=\"circle\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n animation: beui-circle-reveal 700ms cubic-bezier(0.4, 0, 0.2, 1);\n}\nhtml[data-beui-vt=\"circle-blur\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n animation: beui-circle-blur-reveal 700ms cubic-bezier(0.4, 0, 0.2, 1);\n}\nhtml[data-beui-vt=\"blinds\"]::view-transition-old(root) {\n animation: none;\n mix-blend-mode: normal;\n}\n/* Slats: a masked band widens inside every 72px tile, so the new theme opens\n across the page like a shutter. The band edge has to be a registered custom\n property — mask-image itself is not animatable, but it re-resolves every\n frame the property ticks. mask-size fixes the tile at 72px rather than\n letting a repeating gradient's last stop define it, which is what keeps the\n 20px soft edge from dragging the tile wider than the slat and leaving a\n feathered gap that never closes; it also means both ends land clean, fully\n transparent at -20px and fully opaque at 72px. Falling back to no mask\n (unregistered property, so the var is invalid) reveals the page in one\n step. */\n@property --beui-vt-slat {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 72px;\n}\nhtml[data-beui-vt=\"blinds\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n mask-image: linear-gradient(\n 90deg,\n #000 0 var(--beui-vt-slat),\n transparent calc(var(--beui-vt-slat) + 20px)\n );\n mask-size: 72px 100%;\n mask-repeat: repeat;\n animation: beui-blinds-reveal 700ms ${EASE_OUT_CSS};\n}\n@keyframes beui-rect-reveal {\n from { clip-path: var(--beui-vt-from, inset(100% 0 0 0)); }\n to { clip-path: inset(0 0 0 0); }\n}\n@keyframes beui-circle-reveal {\n from { clip-path: circle(0% at var(--beui-vt-origin, 50% 100%)); }\n to { clip-path: circle(150% at var(--beui-vt-origin, 50% 100%)); }\n}\n@keyframes beui-circle-blur-reveal {\n from { clip-path: circle(0% at var(--beui-vt-origin, 50% 100%)); filter: blur(8px); }\n to { clip-path: circle(150% at var(--beui-vt-origin, 50% 100%)); filter: blur(0px); }\n}\n@keyframes beui-blinds-reveal {\n from { --beui-vt-slat: -20px; }\n to { --beui-vt-slat: 72px; }\n}\n`;\n\nconst RECT_FROM: Record<RectStart, string> = {\n \"top-left\": \"inset(0 100% 100% 0)\",\n \"top-right\": \"inset(0 0 100% 100%)\",\n \"bottom-left\": \"inset(100% 100% 0 0)\",\n \"bottom-right\": \"inset(100% 0 0 100%)\",\n center: \"inset(50% 50% 50% 50%)\",\n \"bottom-up\": \"inset(100% 0 0 0)\",\n};\n\nconst CIRCLE_ORIGIN: Record<RectStart, string> = {\n \"top-left\": \"0% 0%\",\n \"top-right\": \"100% 0%\",\n \"bottom-left\": \"0% 100%\",\n \"bottom-right\": \"100% 100%\",\n center: \"50% 50%\",\n \"bottom-up\": \"50% 100%\",\n};\n\nexport function useThemeToggle({\n variant = \"rectangle\",\n start = \"bottom-up\",\n}: {\n variant?: ThemeVariant;\n start?: RectStart;\n} = {}) {\n const { setTheme, resolvedTheme } = useTheme();\n const reduce = useReducedMotion() ?? false;\n const [mounted, setMounted] = useState(false);\n useEffect(() => setMounted(true), []);\n useEffect(() => {\n if (document.getElementById(VT_STYLE_ID)) return;\n const el = document.createElement(\"style\");\n el.id = VT_STYLE_ID;\n el.textContent = VT_CSS;\n document.head.appendChild(el);\n }, []);\n const isDark = mounted && resolvedTheme === \"dark\";\n\n const toggle = () => {\n const next = isDark ? \"light\" : \"dark\";\n\n if (reduce || !(\"startViewTransition\" in document)) {\n setTheme(next);\n return;\n }\n\n const root = document.documentElement;\n\n if (variant === \"rectangle\") {\n root.style.setProperty(\"--beui-vt-from\", RECT_FROM[start]);\n root.dataset.beuiVt = \"rect\";\n } else if (variant === \"blinds\") {\n // Slats sweep the whole viewport; there is no origin point to set.\n root.dataset.beuiVt = \"blinds\";\n } else {\n root.style.setProperty(\"--beui-vt-origin\", CIRCLE_ORIGIN[start]);\n root.dataset.beuiVt = variant;\n }\n\n const vt = (\n document as Document & {\n startViewTransition(cb: () => void): { finished: Promise<void> };\n }\n ).startViewTransition(() => setTheme(next));\n\n vt.finished.finally(() => {\n delete root.dataset.beuiVt;\n });\n };\n\n return { isDark, mounted, toggle };\n}\n\nexport function ThemeToggle({\n variant = \"rectangle\",\n start = \"bottom-up\",\n className,\n iconClassName,\n ...rest\n}: ThemeToggleProps) {\n const { isDark, mounted, toggle } = useThemeToggle({ variant, start });\n\n return (\n <button\n type=\"button\"\n aria-label={mounted && isDark ? \"Switch to light mode\" : \"Switch to dark mode\"}\n onClick={toggle}\n className={cn(\"flex items-center justify-center\", className)}\n {...rest}\n >\n {mounted ? (\n <ActionSwapIcon\n value={isDark ? \"dark\" : \"light\"}\n animation=\"blur\"\n className={iconClassName}\n >\n {isDark ? <Sun className={iconClassName} /> : <Moon className={iconClassName} />}\n </ActionSwapIcon>\n ) : (\n <span className={iconClassName} aria-hidden=\"true\" />\n )}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;;AA8BA,MAAM,cAAc;AAMpB,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAkDyB,aAAa;;;;;;;;;;;;;;;;;;;AAoBrD,MAAM,YAAuC;CAC3C,YAAY;CACZ,aAAa;CACb,eAAe;CACf,gBAAgB;CAChB,QAAQ;CACR,aAAa;AACf;AAEA,MAAM,gBAA2C;CAC/C,YAAY;CACZ,aAAa;CACb,eAAe;CACf,gBAAgB;CAChB,QAAQ;CACR,aAAa;AACf;AAEA,SAAgB,eAAe,EAC7B,UAAU,aACV,QAAQ,gBAIN,CAAC,GAAG;CACN,MAAM,EAAE,UAAU,kBAAkB,SAAS;CAC7C,MAAM,SAAS,iBAAiB,KAAK;CACrC,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,gBAAgB,WAAW,IAAI,GAAG,CAAC,CAAC;CACpC,gBAAgB;EACd,IAAI,SAAS,eAAe,WAAW,GAAG;EAC1C,MAAM,KAAK,SAAS,cAAc,OAAO;EACzC,GAAG,KAAK;EACR,GAAG,cAAc;EACjB,SAAS,KAAK,YAAY,EAAE;CAC9B,GAAG,CAAC,CAAC;CACL,MAAM,SAAS,WAAW,kBAAkB;CAE5C,MAAM,eAAe;EACnB,MAAM,OAAO,SAAS,UAAU;EAEhC,IAAI,UAAU,EAAE,yBAAyB,WAAW;GAClD,SAAS,IAAI;GACb;EACF;EAEA,MAAM,OAAO,SAAS;EAEtB,IAAI,YAAY,aAAa;GAC3B,KAAK,MAAM,YAAY,kBAAkB,UAAU,MAAM;GACzD,KAAK,QAAQ,SAAS;EACxB,OAAO,IAAI,YAAY,UAErB,KAAK,QAAQ,SAAS;OACjB;GACL,KAAK,MAAM,YAAY,oBAAoB,cAAc,MAAM;GAC/D,KAAK,QAAQ,SAAS;EACxB;EAQA,SAFE,0BAA0B,SAAS,IAAI,CAExC,CAAC,CAAC,SAAS,cAAc;GACxB,OAAO,KAAK,QAAQ;EACtB,CAAC;CACH;CAEA,OAAO;EAAE;EAAQ;EAAS;CAAO;AACnC;AAEA,SAAgB,YAAY,EAC1B,UAAU,aACV,QAAQ,aACR,WACA,eACA,GAAG,QACgB;CACnB,MAAM,EAAE,QAAQ,SAAS,WAAW,eAAe;EAAE;EAAS;CAAM,CAAC;CAErE,OACE,oBAAC,UAAD;EACE,MAAK;EACL,cAAY,WAAW,SAAS,yBAAyB;EACzD,SAAS;EACT,WAAW,GAAG,oCAAoC,SAAS;EAC3D,GAAI;EAEH,UAAA,UACC,oBAAC,gBAAD;GACE,OAAO,SAAS,SAAS;GACzB,WAAU;GACV,WAAW;GAEV,UAAA,SAAS,oBAAC,KAAD,EAAK,WAAW,cAAgB,CAAA,IAAI,oBAAC,MAAD,EAAM,WAAW,cAAgB,CAAA;EACjE,CAAA,IAEhB,oBAAC,QAAD;GAAM,WAAW;GAAe,eAAY;EAAQ,CAAA;CAEhD,CAAA;AAEZ"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
//#region src/components/motion/tilt-card.d.ts
|
|
3
|
-
interface TiltCardProps {
|
|
3
|
+
export interface TiltCardProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
max?: number;
|
|
6
6
|
glare?: boolean;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
declare function TiltCard({ children, max, glare, className }: TiltCardProps): import("react").JSX.Element;
|
|
9
|
+
export declare function TiltCard({ children, max, glare, className }: TiltCardProps): import("react").JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { TiltCard, TiltCardProps };
|
|
12
11
|
//# sourceMappingURL=tilt-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tilt-card.d.ts","names":[],"sources":["../../../src/components/motion/tilt-card.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"tilt-card.d.ts","names":[],"sources":["../../../src/components/motion/tilt-card.tsx"],"mappings":";;iBAeiB;EACf,UAAU;EACV;EACA;EACA;;wBAGc,WAAW,UAAU,KAAU,OAAc,aAAa,gCAAa,IAAA"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useHoverCapable } from "../../hooks/use-hover-capable.js";
|
|
3
3
|
import { SPRING_MOUSE } from "../../lib/ease.js";
|
|
4
4
|
import { useRef } from "react";
|
|
5
|
-
import { cn } from "
|
|
5
|
+
import { cn } from "cn";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { motion, useMotionTemplate, useMotionValue, useReducedMotion, useSpring } from "motion/react";
|
|
8
8
|
//#region src/components/motion/tilt-card.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tilt-card.js","names":[],"sources":["../../../src/components/motion/tilt-card.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactNode, useRef } from \"react\";\nimport {\n motion,\n useMotionTemplate,\n useMotionValue,\n useReducedMotion,\n useSpring,\n} from \"motion/react\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"tilt-card.js","names":[],"sources":["../../../src/components/motion/tilt-card.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactNode, useRef } from \"react\";\nimport { cn } from \"cn\";\nimport {\n motion,\n useMotionTemplate,\n useMotionValue,\n useReducedMotion,\n useSpring,\n} from \"motion/react\";\n\nimport { useHoverCapable } from \"../../hooks/use-hover-capable\";\nimport { SPRING_MOUSE } from \"../../lib/ease\";\n\nexport interface TiltCardProps {\n children: ReactNode;\n max?: number;\n glare?: boolean;\n className?: string;\n}\n\nexport function TiltCard({ children, max = 12, glare = true, className }: TiltCardProps) {\n const ref = useRef<HTMLDivElement>(null);\n const reduce = useReducedMotion();\n const canHover = useHoverCapable();\n // Decorative cursor-follow: skip on touch (phantom hover) and reduced motion.\n const enabled = !reduce && canHover;\n const rx = useMotionValue(0);\n const ry = useMotionValue(0);\n const gx = useMotionValue(50);\n const gy = useMotionValue(50);\n\n const srx = useSpring(rx, SPRING_MOUSE);\n const sry = useSpring(ry, SPRING_MOUSE);\n\n const onMove = (e: React.MouseEvent<HTMLDivElement>) => {\n const el = ref.current;\n if (!el || !enabled) return;\n const rect = el.getBoundingClientRect();\n const px = (e.clientX - rect.left) / rect.width;\n const py = (e.clientY - rect.top) / rect.height;\n ry.set((px - 0.5) * max);\n rx.set((0.5 - py) * max);\n gx.set(px * 100);\n gy.set(py * 100);\n };\n\n const onLeave = () => {\n rx.set(0);\n ry.set(0);\n };\n\n const transform = useMotionTemplate`perspective(1000px) rotateX(${srx}deg) rotateY(${sry}deg)`;\n const glareBg = useMotionTemplate`radial-gradient(circle at ${gx}% ${gy}%, var(--foreground), transparent 50%)`;\n\n return (\n <motion.div\n ref={ref}\n onMouseMove={onMove}\n onMouseLeave={onLeave}\n style={{ transform, transformStyle: \"preserve-3d\" }}\n className={cn(\"relative overflow-hidden rounded-2xl will-change-transform\", className)}\n >\n {children}\n {glare && enabled ? (\n <motion.div\n aria-hidden\n style={{ background: glareBg }}\n className=\"pointer-events-none absolute inset-0 opacity-15\"\n />\n ) : null}\n </motion.div>\n );\n}\n"],"mappings":";;;;;;;;AAsBA,SAAgB,SAAS,EAAE,UAAU,MAAM,IAAI,QAAQ,MAAM,aAA4B;CACvF,MAAM,MAAM,OAAuB,IAAI;CACvC,MAAM,SAAS,iBAAiB;CAChC,MAAM,WAAW,gBAAgB;CAEjC,MAAM,UAAU,CAAC,UAAU;CAC3B,MAAM,KAAK,eAAe,CAAC;CAC3B,MAAM,KAAK,eAAe,CAAC;CAC3B,MAAM,KAAK,eAAe,EAAE;CAC5B,MAAM,KAAK,eAAe,EAAE;CAE5B,MAAM,MAAM,UAAU,IAAI,YAAY;CACtC,MAAM,MAAM,UAAU,IAAI,YAAY;CAEtC,MAAM,UAAU,MAAwC;EACtD,MAAM,KAAK,IAAI;EACf,IAAI,CAAC,MAAM,CAAC,SAAS;EACrB,MAAM,OAAO,GAAG,sBAAsB;EACtC,MAAM,MAAM,EAAE,UAAU,KAAK,QAAQ,KAAK;EAC1C,MAAM,MAAM,EAAE,UAAU,KAAK,OAAO,KAAK;EACzC,GAAG,KAAK,KAAK,MAAO,GAAG;EACvB,GAAG,KAAK,KAAM,MAAM,GAAG;EACvB,GAAG,IAAI,KAAK,GAAG;EACf,GAAG,IAAI,KAAK,GAAG;CACjB;CAEA,MAAM,gBAAgB;EACpB,GAAG,IAAI,CAAC;EACR,GAAG,IAAI,CAAC;CACV;CAEA,MAAM,YAAY,iBAAiB,+BAA+B,IAAI,eAAe,IAAI;CACzF,MAAM,UAAU,iBAAiB,6BAA6B,GAAG,IAAI,GAAG;CAExE,OACE,qBAAC,OAAO,KAAR;EACO;EACL,aAAa;EACb,cAAc;EACd,OAAO;GAAE;GAAW,gBAAgB;EAAc;EAClD,WAAW,GAAG,8DAA8D,SAAS;EALvF,UAAA,CAOG,UACA,SAAS,UACR,oBAAC,OAAO,KAAR;GACE,eAAA;GACA,OAAO,EAAE,YAAY,QAAQ;GAC7B,WAAU;EACX,CAAA,IACC,IACM;;AAEhB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from "react";
|
|
2
2
|
//#region src/components/motion/tooltip.d.ts
|
|
3
3
|
type Side = "top" | "right" | "bottom" | "left";
|
|
4
|
-
interface TooltipProps {
|
|
4
|
+
export interface TooltipProps {
|
|
5
5
|
content: ReactNode;
|
|
6
6
|
children: ReactElement;
|
|
7
7
|
side?: Side;
|
|
@@ -11,7 +11,6 @@ interface TooltipProps {
|
|
|
11
11
|
/** Classes for the outer wrapper span. Use to fix baseline / fill parent. */
|
|
12
12
|
wrapperClassName?: string;
|
|
13
13
|
}
|
|
14
|
-
declare function Tooltip({ content, children, side, delay, className, wrapperClassName }: TooltipProps): import("react").JSX.Element;
|
|
14
|
+
export declare function Tooltip({ content, children, side, delay, className, wrapperClassName }: TooltipProps): import("react").JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { Tooltip, TooltipProps };
|
|
17
16
|
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../../src/components/motion/tooltip.tsx"],"mappings":";;KAwBK;
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../../src/components/motion/tooltip.tsx"],"mappings":";;KAwBK;iBAEY;EACf,SAAS;EACT,UAAU;EACV,OAAO;;EAEP;EACA;;EAEA;;wBA6Ec,UACd,SACA,UACA,MACA,OACA,WACA,oBACC,+BAAY,IAAA"}
|
|
@@ -4,7 +4,7 @@ import { useHoverGesture } from "../../hooks/use-hover-gesture.js";
|
|
|
4
4
|
import { useTapGesture } from "../../hooks/use-tap-gesture.js";
|
|
5
5
|
import { EASE_OUT } from "../../lib/ease.js";
|
|
6
6
|
import { cloneElement, isValidElement, useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
7
|
-
import { cn } from "
|
|
7
|
+
import { cn } from "cn";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
10
10
|
import { createPortal } from "react-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","names":[],"sources":["../../../src/components/motion/tooltip.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n cloneElement,\n isValidElement,\n type PointerEvent,\n type ReactElement,\n type ReactNode,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { AnimatePresence, motion, useReducedMotion, type Variants } from \"motion/react\";\nimport { createPortal } from \"react-dom\";\n\nimport { cn } from \"@kumix/utils\";\nimport { useDismiss } from \"../../hooks/use-dismiss\";\nimport { useHoverGesture } from \"../../hooks/use-hover-gesture\";\nimport { useTapGesture } from \"../../hooks/use-tap-gesture\";\nimport { EASE_OUT } from \"../../lib/ease\";\n\ntype Side = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport interface TooltipProps {\n content: ReactNode;\n children: ReactElement;\n side?: Side;\n /** Delay before showing (ms). Default 120. */\n delay?: number;\n className?: string;\n /** Classes for the outer wrapper span. Use to fix baseline / fill parent. */\n wrapperClassName?: string;\n}\n\n// Gap between trigger and tooltip, in px.\nconst GAP = 8;\n\n// Centering transform for the fixed-positioned anchor point, per side.\nconst anchorTransform: Record<Side, string> = {\n top: \"translate(-50%, -100%)\",\n bottom: \"translate(-50%, 0)\",\n left: \"translate(-100%, -50%)\",\n right: \"translate(0, -50%)\",\n};\n\nconst transformOrigin: Record<Side, string> = {\n top: \"center bottom\",\n bottom: \"center top\",\n left: \"right center\",\n right: \"left center\",\n};\n\n// Offset is in the direction *away* from the trigger — content originates near\n// the trigger and rises into resting position.\nconst offsetFrom: Record<Side, { x?: number; y?: number }> = {\n top: { y: 8 },\n bottom: { y: -8 },\n left: { x: 8 },\n right: { x: -8 },\n};\n\nfunction buildVariants(side: Side): Variants {\n const o = offsetFrom[side];\n return {\n initial: {\n opacity: 0,\n scale: 0.9,\n filter: \"blur(5px)\",\n x: o.x ?? 0,\n y: o.y ?? 0,\n },\n animate: {\n opacity: 1,\n scale: 1,\n filter: \"blur(0px)\",\n x: 0,\n y: 0,\n transition: {\n type: \"spring\",\n stiffness: 380,\n damping: 30,\n mass: 0.7,\n opacity: { duration: 0.14, ease: EASE_OUT },\n filter: { duration: 0.18, ease: EASE_OUT },\n },\n },\n exit: {\n opacity: 0,\n scale: 0.94,\n filter: \"blur(3px)\",\n x: (o.x ?? 0) * 0.6,\n y: (o.y ?? 0) * 0.6,\n transition: { duration: 0.12, ease: EASE_OUT },\n },\n };\n}\n\nconst REDUCED_VARIANTS: Variants = {\n initial: { opacity: 0 },\n animate: { opacity: 1, transition: { duration: 0.14, ease: EASE_OUT } },\n exit: { opacity: 0, transition: { duration: 0.1, ease: EASE_OUT } },\n};\n\n// Once any tooltip has just closed, neighbouring tooltips open without the\n// initial delay — moving along a toolbar feels instant after the first one.\nconst WARM_WINDOW_MS = 300;\nlet lastHiddenAt = 0;\n\nexport function Tooltip({\n content,\n children,\n side = \"top\",\n delay = 120,\n className,\n wrapperClassName,\n}: TooltipProps) {\n const [open, setOpen] = useState(false);\n const [coords, setCoords] = useState<{ top: number; left: number } | null>(null);\n const id = useId();\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n const anchorRef = useRef<HTMLSpanElement>(null);\n const hover = useHoverGesture();\n const reduce = useReducedMotion();\n\n // Anchor point in viewport coords, on the edge of the trigger facing `side`.\n // Position:fixed means these viewport coords place the tooltip directly, so\n // it escapes every ancestor's stacking context and overflow.\n const place = useCallback(() => {\n const el = anchorRef.current;\n if (!el) return;\n const r = el.getBoundingClientRect();\n const cx = r.left + r.width / 2;\n const cy = r.top + r.height / 2;\n const point: Record<Side, { top: number; left: number }> = {\n top: { top: r.top - GAP, left: cx },\n bottom: { top: r.bottom + GAP, left: cx },\n left: { top: cy, left: r.left - GAP },\n right: { top: cy, left: r.right + GAP },\n };\n setCoords(point[side]);\n }, [side]);\n\n const show = useCallback(() => {\n if (timer.current) clearTimeout(timer.current);\n const warm = Date.now() - lastHiddenAt < WARM_WINDOW_MS;\n timer.current = setTimeout(\n () => {\n place();\n setOpen(true);\n },\n warm ? 0 : delay,\n );\n }, [delay, place]);\n\n const hide = useCallback(() => {\n if (timer.current) {\n clearTimeout(timer.current);\n timer.current = null;\n }\n if (open) lastHiddenAt = Date.now();\n setOpen(false);\n }, [open]);\n\n // A finger never hovers, and Safari does not focus a button on tap either, so\n // the label is only reachable if the tap itself opens the tooltip. A click\n // carries no pointerType, so the pointerdown that preceded it is what says\n // whether this was a tap; keyboard activation arrives with no pointerdown at\n // all, and focus has already shown the label there.\n const tap = useTapGesture<boolean>();\n\n const toggleOnTap = useCallback(() => {\n const gesture = tap.take();\n if (!gesture || gesture.pointerType === \"mouse\") return;\n if (gesture.state) {\n hide();\n return;\n }\n if (timer.current) clearTimeout(timer.current);\n place();\n setOpen(true);\n }, [hide, place, tap]);\n\n // ...and closed again by the next tap that lands somewhere else. The label\n // covers nothing interactive, so that tap passes through to what it hit.\n useDismiss(open, hide, anchorRef);\n\n // Keep the tooltip pinned to the trigger while it's open and the page scrolls\n // or resizes (fixed coords are viewport-relative).\n useEffect(() => {\n if (!open) return;\n const onMove = () => place();\n window.addEventListener(\"scroll\", onMove, true);\n window.addEventListener(\"resize\", onMove);\n return () => {\n window.removeEventListener(\"scroll\", onMove, true);\n window.removeEventListener(\"resize\", onMove);\n };\n }, [open, place]);\n\n const variants = useMemo(() => (reduce ? REDUCED_VARIANTS : buildVariants(side)), [reduce, side]);\n\n if (!isValidElement(children)) return children;\n\n // The label describes the trigger, so it has to name the trigger itself.\n // Everything else the tooltip needs is read off the anchor below instead of\n // cloned on: a handler written onto the child is the child's handler as far\n // as that child can tell, and a component that owns its activation —\n // hard-wiring onClick and spreading the rest of its props over it, as\n // ThemeToggle does — then runs the tooltip's instead of its own. Composing\n // with `props.onClick` cannot save it either, because a component element's\n // props hold nothing the component does internally.\n const trigger = cloneElement(children as ReactElement<Record<string, unknown>>, {\n \"aria-describedby\": id,\n });\n\n return (\n <>\n <span\n ref={anchorRef}\n className={cn(\"relative inline-flex align-middle\", wrapperClassName)}\n // Pointer events, not the mouse pair: a tap fires compatibility\n // mouseenter/mouseleave that carry no pointerType, which raced the tap\n // path into opening and closing the same label.\n onPointerEnter={(event: PointerEvent) => {\n if (hover.enter(event)) show();\n }}\n onPointerLeave={(event: PointerEvent) => {\n if (hover.leave(event)) hide();\n }}\n onFocus={show}\n onBlur={hide}\n onPointerDown={(event: PointerEvent) => tap.start(event, open)}\n // A gesture the platform took away sends no click, and a key press\n // starts an activation that never had a pointer behind it. Either way\n // the record has to go, or the next click reads a finger that has long\n // since lifted.\n onPointerCancel={tap.drop}\n onKeyDown={tap.drop}\n onClick={toggleOnTap}\n >\n {trigger}\n </span>\n {typeof document !== \"undefined\"\n ? createPortal(\n <AnimatePresence>\n {open && coords ? (\n <span\n aria-hidden\n className=\"pointer-events-none fixed z-9999\"\n style={{\n top: coords.top,\n left: coords.left,\n transform: anchorTransform[side],\n }}\n >\n <motion.span\n id={id}\n role=\"tooltip\"\n variants={variants}\n initial=\"initial\"\n animate=\"animate\"\n exit=\"exit\"\n style={{ transformOrigin: transformOrigin[side] }}\n className={cn(\n \"block whitespace-nowrap rounded-lg border border-border bg-background px-2.5 py-1 font-medium text-foreground text-xs shadow-lg\",\n className,\n )}\n >\n {content}\n </motion.span>\n </span>\n ) : null}\n </AnimatePresence>,\n document.body,\n )\n : null}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;AAsCA,MAAM,MAAM;AAGZ,MAAM,kBAAwC;CAC5C,KAAK;CACL,QAAQ;CACR,MAAM;CACN,OAAO;AACT;AAEA,MAAM,kBAAwC;CAC5C,KAAK;CACL,QAAQ;CACR,MAAM;CACN,OAAO;AACT;AAIA,MAAM,aAAuD;CAC3D,KAAK,EAAE,GAAG,EAAE;CACZ,QAAQ,EAAE,GAAG,GAAG;CAChB,MAAM,EAAE,GAAG,EAAE;CACb,OAAO,EAAE,GAAG,GAAG;AACjB;AAEA,SAAS,cAAc,MAAsB;CAC3C,MAAM,IAAI,WAAW;CACrB,OAAO;EACL,SAAS;GACP,SAAS;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AAC,MAAM,KAAK,CAAC;CAEhB,MAAM,WAAW,cAAe,SAAS,mBAAmB,cAAc,IAAI,GAAI,CAAC,QAAQ,IAAI,CAAC;CAEhG,IAAI,CAAC,eAAe,QAAQ,GAAG,OAAO;CAUtC,MAAM,UAAU,aAAa,UAAmD,EAC9E,oBAAoB,GACtB,CAAC;CAED,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,QAAD;EACE,KAAK;EACL,WAAW,GAAG,qCAAqC,gBAAgB;EAInE,iBAAiB,UAAwB;GACvC,IAAI,MAAM,MAAM,KAAK,GAAG,KAAK;EAC/B;EACA,iBAAiB,UAAwB;GACvC,IAAI,MAAM,MAAM,KAAK,GAAG,KAAK;EAC/B;EACA,SAAS;EACT,QAAQ;EACR,gBAAgB,UAAwB,IAAI,MAAM,OAAO,IAAI;EAK7D,iBAAiB,IAAI;EACrB,WAAW,IAAI;EACf,SAAS;EAER,UAAA;CACG,CAAA,GACL,OAAO,aAAa,cACjB,aACE,oBAAC,iBAAD,EAAA,UACG,QAAQ,SACP,oBAAC,QAAD;EACE,eAAA;EACA,WAAU;EACV,OAAO;GACL,KAAK,OAAO;GACZ,MAAM,OAAO;GACb,WAAW,gBAAgB;EAC7B;EAEA,UAAA,oBAAC,OAAO,MAAR;GACM;GACJ,MAAK;GACK;GACV,SAAQ;GACR,SAAQ;GACR,MAAK;GACL,OAAO,EAAE,iBAAiB,gBAAgB,MAAM;GAChD,WAAW,GACT,mIACA,SACF;GAEC,UAAA;EACU,CAAA;CACT,CAAA,IACJ,KACW,CAAA,GACjB,SAAS,IACX,IACA,IACJ,EAAA,CAAA;AAEN"}
|
|
1
|
+
{"version":3,"file":"tooltip.js","names":[],"sources":["../../../src/components/motion/tooltip.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n cloneElement,\n isValidElement,\n type PointerEvent,\n type ReactElement,\n type ReactNode,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { cn } from \"cn\";\nimport { AnimatePresence, motion, useReducedMotion, type Variants } from \"motion/react\";\nimport { createPortal } from \"react-dom\";\n\nimport { useDismiss } from \"../../hooks/use-dismiss\";\nimport { useHoverGesture } from \"../../hooks/use-hover-gesture\";\nimport { useTapGesture } from \"../../hooks/use-tap-gesture\";\nimport { EASE_OUT } from \"../../lib/ease\";\n\ntype Side = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport interface TooltipProps {\n content: ReactNode;\n children: ReactElement;\n side?: Side;\n /** Delay before showing (ms). Default 120. */\n delay?: number;\n className?: string;\n /** Classes for the outer wrapper span. Use to fix baseline / fill parent. */\n wrapperClassName?: string;\n}\n\n// Gap between trigger and tooltip, in px.\nconst GAP = 8;\n\n// Centering transform for the fixed-positioned anchor point, per side.\nconst anchorTransform: Record<Side, string> = {\n top: \"translate(-50%, -100%)\",\n bottom: \"translate(-50%, 0)\",\n left: \"translate(-100%, -50%)\",\n right: \"translate(0, -50%)\",\n};\n\nconst transformOrigin: Record<Side, string> = {\n top: \"center bottom\",\n bottom: \"center top\",\n left: \"right center\",\n right: \"left center\",\n};\n\n// Offset is in the direction *away* from the trigger — content originates near\n// the trigger and rises into resting position.\nconst offsetFrom: Record<Side, { x?: number; y?: number }> = {\n top: { y: 8 },\n bottom: { y: -8 },\n left: { x: 8 },\n right: { x: -8 },\n};\n\nfunction buildVariants(side: Side): Variants {\n const o = offsetFrom[side];\n return {\n initial: {\n opacity: 0,\n scale: 0.9,\n filter: \"blur(5px)\",\n x: o.x ?? 0,\n y: o.y ?? 0,\n },\n animate: {\n opacity: 1,\n scale: 1,\n filter: \"blur(0px)\",\n x: 0,\n y: 0,\n transition: {\n type: \"spring\",\n stiffness: 380,\n damping: 30,\n mass: 0.7,\n opacity: { duration: 0.14, ease: EASE_OUT },\n filter: { duration: 0.18, ease: EASE_OUT },\n },\n },\n exit: {\n opacity: 0,\n scale: 0.94,\n filter: \"blur(3px)\",\n x: (o.x ?? 0) * 0.6,\n y: (o.y ?? 0) * 0.6,\n transition: { duration: 0.12, ease: EASE_OUT },\n },\n };\n}\n\nconst REDUCED_VARIANTS: Variants = {\n initial: { opacity: 0 },\n animate: { opacity: 1, transition: { duration: 0.14, ease: EASE_OUT } },\n exit: { opacity: 0, transition: { duration: 0.1, ease: EASE_OUT } },\n};\n\n// Once any tooltip has just closed, neighbouring tooltips open without the\n// initial delay — moving along a toolbar feels instant after the first one.\nconst WARM_WINDOW_MS = 300;\nlet lastHiddenAt = 0;\n\nexport function Tooltip({\n content,\n children,\n side = \"top\",\n delay = 120,\n className,\n wrapperClassName,\n}: TooltipProps) {\n const [open, setOpen] = useState(false);\n const [coords, setCoords] = useState<{ top: number; left: number } | null>(null);\n const id = useId();\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n const anchorRef = useRef<HTMLSpanElement>(null);\n const hover = useHoverGesture();\n const reduce = useReducedMotion();\n\n // Anchor point in viewport coords, on the edge of the trigger facing `side`.\n // Position:fixed means these viewport coords place the tooltip directly, so\n // it escapes every ancestor's stacking context and overflow.\n const place = useCallback(() => {\n const el = anchorRef.current;\n if (!el) return;\n const r = el.getBoundingClientRect();\n const cx = r.left + r.width / 2;\n const cy = r.top + r.height / 2;\n const point: Record<Side, { top: number; left: number }> = {\n top: { top: r.top - GAP, left: cx },\n bottom: { top: r.bottom + GAP, left: cx },\n left: { top: cy, left: r.left - GAP },\n right: { top: cy, left: r.right + GAP },\n };\n setCoords(point[side]);\n }, [side]);\n\n const show = useCallback(() => {\n if (timer.current) clearTimeout(timer.current);\n const warm = Date.now() - lastHiddenAt < WARM_WINDOW_MS;\n timer.current = setTimeout(\n () => {\n place();\n setOpen(true);\n },\n warm ? 0 : delay,\n );\n }, [delay, place]);\n\n const hide = useCallback(() => {\n if (timer.current) {\n clearTimeout(timer.current);\n timer.current = null;\n }\n if (open) lastHiddenAt = Date.now();\n setOpen(false);\n }, [open]);\n\n // A finger never hovers, and Safari does not focus a button on tap either, so\n // the label is only reachable if the tap itself opens the tooltip. A click\n // carries no pointerType, so the pointerdown that preceded it is what says\n // whether this was a tap; keyboard activation arrives with no pointerdown at\n // all, and focus has already shown the label there.\n const tap = useTapGesture<boolean>();\n\n const toggleOnTap = useCallback(() => {\n const gesture = tap.take();\n if (!gesture || gesture.pointerType === \"mouse\") return;\n if (gesture.state) {\n hide();\n return;\n }\n if (timer.current) clearTimeout(timer.current);\n place();\n setOpen(true);\n }, [hide, place, tap]);\n\n // ...and closed again by the next tap that lands somewhere else. The label\n // covers nothing interactive, so that tap passes through to what it hit.\n useDismiss(open, hide, anchorRef);\n\n // Keep the tooltip pinned to the trigger while it's open and the page scrolls\n // or resizes (fixed coords are viewport-relative).\n useEffect(() => {\n if (!open) return;\n const onMove = () => place();\n window.addEventListener(\"scroll\", onMove, true);\n window.addEventListener(\"resize\", onMove);\n return () => {\n window.removeEventListener(\"scroll\", onMove, true);\n window.removeEventListener(\"resize\", onMove);\n };\n }, [open, place]);\n\n const variants = useMemo(() => (reduce ? REDUCED_VARIANTS : buildVariants(side)), [reduce, side]);\n\n if (!isValidElement(children)) return children;\n\n // The label describes the trigger, so it has to name the trigger itself.\n // Everything else the tooltip needs is read off the anchor below instead of\n // cloned on: a handler written onto the child is the child's handler as far\n // as that child can tell, and a component that owns its activation —\n // hard-wiring onClick and spreading the rest of its props over it, as\n // ThemeToggle does — then runs the tooltip's instead of its own. Composing\n // with `props.onClick` cannot save it either, because a component element's\n // props hold nothing the component does internally.\n const trigger = cloneElement(children as ReactElement<Record<string, unknown>>, {\n \"aria-describedby\": id,\n });\n\n return (\n <>\n <span\n ref={anchorRef}\n className={cn(\"relative inline-flex align-middle\", wrapperClassName)}\n // Pointer events, not the mouse pair: a tap fires compatibility\n // mouseenter/mouseleave that carry no pointerType, which raced the tap\n // path into opening and closing the same label.\n onPointerEnter={(event: PointerEvent) => {\n if (hover.enter(event)) show();\n }}\n onPointerLeave={(event: PointerEvent) => {\n if (hover.leave(event)) hide();\n }}\n onFocus={show}\n onBlur={hide}\n onPointerDown={(event: PointerEvent) => tap.start(event, open)}\n // A gesture the platform took away sends no click, and a key press\n // starts an activation that never had a pointer behind it. Either way\n // the record has to go, or the next click reads a finger that has long\n // since lifted.\n onPointerCancel={tap.drop}\n onKeyDown={tap.drop}\n onClick={toggleOnTap}\n >\n {trigger}\n </span>\n {typeof document !== \"undefined\"\n ? createPortal(\n <AnimatePresence>\n {open && coords ? (\n <span\n aria-hidden\n className=\"pointer-events-none fixed z-9999\"\n style={{\n top: coords.top,\n left: coords.left,\n transform: anchorTransform[side],\n }}\n >\n <motion.span\n id={id}\n role=\"tooltip\"\n variants={variants}\n initial=\"initial\"\n animate=\"animate\"\n exit=\"exit\"\n style={{ transformOrigin: transformOrigin[side] }}\n className={cn(\n \"block whitespace-nowrap rounded-lg border border-border bg-background px-2.5 py-1 font-medium text-foreground text-xs shadow-lg\",\n className,\n )}\n >\n {content}\n </motion.span>\n </span>\n ) : null}\n </AnimatePresence>,\n document.body,\n )\n : null}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;AAsCA,MAAM,MAAM;AAGZ,MAAM,kBAAwC;CAC5C,KAAK;CACL,QAAQ;CACR,MAAM;CACN,OAAO;AACT;AAEA,MAAM,kBAAwC;CAC5C,KAAK;CACL,QAAQ;CACR,MAAM;CACN,OAAO;AACT;AAIA,MAAM,aAAuD;CAC3D,KAAK,EAAE,GAAG,EAAE;CACZ,QAAQ,EAAE,GAAG,GAAG;CAChB,MAAM,EAAE,GAAG,EAAE;CACb,OAAO,EAAE,GAAG,GAAG;AACjB;AAEA,SAAS,cAAc,MAAsB;CAC3C,MAAM,IAAI,WAAW;CACrB,OAAO;EACL,SAAS;GACP,SAAS;GACT,OAAO;GACP,QAAQ;GACR,GAAG,EAAE,KAAK;GACV,GAAG,EAAE,KAAK;EACZ;EACA,SAAS;GACP,SAAS;GACT,OAAO;GACP,QAAQ;GACR,GAAG;GACH,GAAG;GACH,YAAY;IACV,MAAM;IACN,WAAW;IACX,SAAS;IACT,MAAM;IACN,SAAS;K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AC;CAED,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,QAAD;EACE,KAAK;EACL,WAAW,GAAG,qCAAqC,gBAAgB;EAInE,iBAAiB,UAAwB;GACvC,IAAI,MAAM,MAAM,KAAK,GAAG,KAAK;EAC/B;EACA,iBAAiB,UAAwB;GACvC,IAAI,MAAM,MAAM,KAAK,GAAG,KAAK;EAC/B;EACA,SAAS;EACT,QAAQ;EACR,gBAAgB,UAAwB,IAAI,MAAM,OAAO,IAAI;EAK7D,iBAAiB,IAAI;EACrB,WAAW,IAAI;EACf,SAAS;EAER,UAAA;CACG,CAAA,GACL,OAAO,aAAa,cACjB,aACE,oBAAC,iBAAD,EAAA,UACG,QAAQ,SACP,oBAAC,QAAD;EACE,eAAA;EACA,WAAU;EACV,OAAO;GACL,KAAK,OAAO;GACZ,MAAM,OAAO;GACb,WAAW,gBAAgB;EAC7B;EAEA,UAAA,oBAAC,OAAO,MAAR;GACM;GACJ,MAAK;GACK;GACV,SAAQ;GACR,SAAQ;GACR,MAAK;GACL,OAAO,EAAE,iBAAiB,gBAAgB,MAAM;GAChD,WAAW,GACT,mIACA,SACF;GAEC,UAAA;EACU,CAAA;CACT,CAAA,IACJ,KACW,CAAA,GACjB,SAAS,IACX,IACA,IACJ,EAAA,CAAA;AAEN"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region src/components/motion/wheel-picker.d.ts
|
|
2
|
-
type WheelPickerOption = string | {
|
|
2
|
+
export type WheelPickerOption = string | {
|
|
3
3
|
label: string;
|
|
4
4
|
value: string;
|
|
5
5
|
};
|
|
6
|
-
interface WheelPickerProps {
|
|
6
|
+
export interface WheelPickerProps {
|
|
7
7
|
options: WheelPickerOption[];
|
|
8
8
|
value?: string;
|
|
9
9
|
defaultValue?: string;
|
|
@@ -18,7 +18,6 @@ interface WheelPickerProps {
|
|
|
18
18
|
className?: string;
|
|
19
19
|
"aria-label"?: string;
|
|
20
20
|
}
|
|
21
|
-
declare function WheelPicker({ options, value, defaultValue, onValueChange, visibleCount, itemHeight, disabled, sound, className, "aria-label": ariaLabel }: WheelPickerProps): import("react").JSX.Element;
|
|
21
|
+
export declare function WheelPicker({ options, value, defaultValue, onValueChange, visibleCount, itemHeight, disabled, sound, className, "aria-label": ariaLabel }: WheelPickerProps): import("react").JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { WheelPicker, WheelPickerOption, WheelPickerProps };
|
|
24
23
|
//# sourceMappingURL=wheel-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wheel-picker.d.ts","names":[],"sources":["../../../src/components/motion/wheel-picker.tsx"],"mappings":";
|
|
1
|
+
{"version":3,"file":"wheel-picker.d.ts","names":[],"sources":["../../../src/components/motion/wheel-picker.tsx"],"mappings":";YAiBY;EAA+B;EAAe;;iBAEzC;EACf,SAAS;EACT;EACA;EACA,iBAAiB;;EAEjB;;EAEA;EACA;;EAEA;EACA;EACA;;wBA2Bc,cACd,SACA,OACA,cACA,eACA,cACA,YACA,UACA,OACA,yBACc,aACb,mCAAgB,IAAA"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { TOUCH_GESTURE_CLASS, capturePointer, releasePointer } from "../../lib/touch.js";
|
|
3
3
|
import { createTickPlayer } from "../../lib/tick-sound.js";
|
|
4
4
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
5
|
-
import { cn } from "
|
|
5
|
+
import { cn } from "cn";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useReducedMotion } from "motion/react";
|
|
8
8
|
//#region src/components/motion/wheel-picker.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wheel-picker.js","names":[],"sources":["../../../src/components/motion/wheel-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type KeyboardEvent,\n type PointerEvent,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { createTickPlayer } from \"../../lib/tick-sound\";\nimport { capturePointer, releasePointer, TOUCH_GESTURE_CLASS } from \"../../lib/touch\";\n\nexport type WheelPickerOption = string | { label: string; value: string };\n\nexport interface WheelPickerProps {\n options: WheelPickerOption[];\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n /** Rows visible through the window, odd. More = flatter curve. Default 5. */\n visibleCount?: number;\n /** Row height in px. Default 36. */\n itemHeight?: number;\n disabled?: boolean;\n /** Play a short tick each time the selected value changes. Default false. */\n sound?: boolean;\n className?: string;\n \"aria-label\"?: string;\n}\n\nconst DEG = Math.PI / 180;\n// Physics constants, tuned for an iOS-like flick rather than reused from the\n// shared spring tokens: the wheel coasts in whole-row units and springs to an\n// integer detent, which a layout spring can't express cleanly.\nconst DECELERATION = 0.00042; // rows per ms², how fast a flick bleeds off (lower = freer)\nconst MAX_VELOCITY = 0.18; // rows per ms, caps a hard fling\nconst VELOCITY_WINDOW = 90; // ms of recent drag to average a release velocity over\nconst WHEEL_SENS = 0.012; // rows per pixel of wheel delta\nconst WHEEL_SETTLE = 110; // ms of wheel idle before snapping to a row\nconst easeOutCubic = (p: number) => 1 - (1 - p) ** 3;\n// Overshoots the target by a few percent then settles — the little spring\n// bounce as a row snaps home. `BACK` sets how far it drifts past.\nconst BACK = 1.35;\nconst easeOutBack = (p: number) => 1 + (BACK + 1) * (p - 1) ** 3 + BACK * (p - 1) ** 2;\n\nconst clamp = (v: number, lo: number, hi: number) => Math.max(lo, Math.min(v, hi));\n\nfunction optionValue(option: WheelPickerOption) {\n return typeof option === \"string\" ? option : option.value;\n}\nfunction optionLabel(option: WheelPickerOption) {\n return typeof option === \"string\" ? option : option.label;\n}\n\nexport function WheelPicker({\n options,\n value,\n defaultValue,\n onValueChange,\n visibleCount = 5,\n itemHeight = 36,\n disabled = false,\n sound = false,\n className,\n \"aria-label\": ariaLabel,\n}: WheelPickerProps) {\n const reduce = useReducedMotion() ?? false;\n const controlled = value !== undefined;\n const last = options.length - 1;\n\n const indexOf = useCallback(\n (v: string | undefined) => {\n const i = options.findIndex((o) => optionValue(o) === v);\n return i < 0 ? 0 : i;\n },\n [options],\n );\n\n const [internal, setInternal] = useState(() => defaultValue ?? value);\n const currentValue = controlled ? value : internal;\n const [grabbing, setGrabbing] = useState(false);\n\n // Cylinder geometry. Each row spans `itemAngle`; `radius` seats the rows on\n // the drum; rows past `hideBeyond` sit behind the horizon and are dropped.\n const { itemAngle, radius, height, hideBeyond } = useMemo(() => {\n const rowsEachSide = Math.max(1, Math.floor(visibleCount / 2));\n const cutoff = rowsEachSide + 1;\n const angle = 90 / cutoff;\n const r = itemHeight / Math.tan(angle * DEG);\n return {\n itemAngle: angle,\n radius: r,\n hideBeyond: cutoff,\n height: Math.round(2 * r * Math.sin(rowsEachSide * angle * DEG) + itemHeight),\n };\n }, [visibleCount, itemHeight]);\n\n const container = useRef<HTMLDivElement>(null);\n const drumRef = useRef<HTMLUListElement>(null);\n const bandRef = useRef<HTMLUListElement>(null);\n // Scroll position measured in rows (a float index). One source of truth for\n // both layers: the drum rotates by `itemAngle·scroll`, the crisp band slides\n // by `itemHeight·scroll`.\n const scroll = useRef(indexOf(currentValue));\n const raf = useRef(0);\n const emitted = useRef(currentValue);\n const tickPlayer = useRef<ReturnType<typeof createTickPlayer> | null>(null);\n const lastTick = useRef(indexOf(currentValue));\n\n const paint = useCallback(\n (s: number) => {\n const drum = drumRef.current;\n const band = bandRef.current;\n if (drum) {\n drum.style.transform = `translateZ(${-radius}px) rotateX(${itemAngle * s}deg)`;\n for (const node of Array.from(drum.children)) {\n const li = node as HTMLLIElement;\n const i = Number(li.dataset.index);\n const want = Math.abs(i - s) > hideBeyond ? \"hidden\" : \"visible\";\n // Write only on change — an unconditional write every frame thrashes\n // style recalc and is what made the drag feel draggy on mobile.\n if (li.style.visibility !== want) li.style.visibility = want;\n }\n }\n // The band is the SAME drum, clipped to the centre row — driven by the\n // identical transform so the crisp copy sits exactly on the dimmed one,\n // with no parallax ghost as rows cross the window. It needs the same\n // horizon cull, or the row on the back of the drum bleeds into the front.\n if (band) {\n band.style.transform = `translateZ(${-radius}px) rotateX(${itemAngle * s}deg)`;\n for (const node of Array.from(band.children)) {\n const li = node as HTMLLIElement;\n const i = Number(li.dataset.index);\n const want = Math.abs(i - s) > hideBeyond ? \"hidden\" : \"visible\";\n if (li.style.visibility !== want) li.style.visibility = want;\n }\n }\n },\n [radius, itemAngle, hideBeyond],\n );\n\n const getPlayer = useCallback(() => {\n if (!tickPlayer.current) tickPlayer.current = createTickPlayer();\n return tickPlayer.current;\n }, []);\n\n const emit = useCallback(\n (i: number) => {\n const v = optionValue(options[clamp(i, 0, last)]);\n if (v === emitted.current) return;\n emitted.current = v;\n // Reduced motion has no drum/glide path to tick from — it's an\n // onClick straight into emit, so the tick lives here instead.\n if (sound && reduce) getPlayer().play();\n if (!controlled) setInternal(v);\n onValueChange?.(v);\n },\n [options, last, controlled, onValueChange, sound, reduce, getPlayer],\n );\n\n // Drum path: fires a tick whenever the nearest row changes, independent of\n // `emit` (which only fires on settle during a glide/fling, not per row\n // crossed). Gated on `!reduce` since the reduced render never calls this.\n const maybeTick = useCallback(\n (pos: number) => {\n const row = clamp(Math.round(pos), 0, last);\n if (!sound || reduce) {\n lastTick.current = row;\n return;\n }\n if (row === lastTick.current) return;\n lastTick.current = row;\n getPlayer().play();\n },\n [sound, reduce, last, getPlayer],\n );\n\n const stop = useCallback(() => cancelAnimationFrame(raf.current), []);\n\n // Ease `scroll` from where it is to an integer detent over `duration`. The\n // easing may overshoot (spring bounce) before it resolves exactly on `to`.\n const glide = useCallback(\n (to: number, duration: number, ease: (p: number) => number = easeOutCubic) => {\n stop();\n const from = scroll.current;\n const dist = to - from;\n if (!dist || duration <= 0) {\n scroll.current = to;\n paint(to);\n maybeTick(to);\n emit(to);\n return;\n }\n const start = performance.now();\n const tick = (now: number) => {\n const p = (now - start) / duration;\n if (p >= 1) {\n scroll.current = to;\n paint(to);\n maybeTick(to);\n emit(to);\n return;\n }\n scroll.current = from + dist * ease(p);\n paint(scroll.current);\n maybeTick(scroll.current);\n raf.current = requestAnimationFrame(tick);\n };\n raf.current = requestAnimationFrame(tick);\n },\n [stop, paint, emit, maybeTick],\n );\n\n // Project where a flick of `velocity` (rows/ms) coasts to, snap to a row.\n const fling = useCallback(\n (velocity: number) => {\n const from = scroll.current;\n if (from < 0 || from > last) {\n glide(clamp(Math.round(from), 0, last), 260); // rubber-band back\n return;\n }\n const dir = Math.sign(velocity);\n const coast = ((velocity * velocity) / (2 * DECELERATION)) * dir;\n const to = clamp(Math.round(from + coast), 0, last);\n // Long, spring-tipped settle so a hard flick reads as free momentum\n // coasting to rest with a gentle bounce, never a clipped stop.\n const duration = clamp(Math.sqrt(Math.abs(to - from)) * 300 + 240, 280, 1700);\n glide(to, duration, easeOutBack);\n },\n [glide, last],\n );\n\n const step = useCallback(\n (by: number) => glide(clamp(Math.round(scroll.current) + by, 0, last), 300, easeOutBack),\n [glide, last],\n );\n\n // Drag: track recent points for a release velocity; rubber-band past the ends.\n const drag = useRef<{\n y: number;\n scroll: number;\n pts: [number, number][];\n } | null>(null);\n // Coalesce touch/pointer moves to one paint per animation frame — raw move\n // events fire several times per frame (and off-frame) on high-refresh\n // screens, and painting each one is what made the drag feel choppy.\n const dragFrame = useRef(0);\n const latestY = useRef(0);\n // Shared drag core, driven by a Y coordinate from either a mouse pointer or a\n // native touch. Touch is bound with non-passive listeners in the effect below\n // so the move can preventDefault the page scroll — React's synthetic touch\n // events are passive and can't, which is why finger-drag did nothing on\n // mobile.\n const beginDrag = useCallback(\n (y: number) => {\n stop();\n if (sound) getPlayer().prepare();\n setGrabbing(true);\n drag.current = {\n y,\n scroll: scroll.current,\n pts: [[y, performance.now()]],\n };\n },\n [stop, sound, getPlayer],\n );\n const moveDrag = useCallback(\n (y: number) => {\n const d = drag.current;\n if (!d) return;\n // Record every sample for an accurate release velocity, but only render\n // the newest position once per frame.\n latestY.current = y;\n d.pts.push([y, performance.now()]);\n if (d.pts.length > 8) d.pts.shift();\n if (dragFrame.current) return;\n dragFrame.current = requestAnimationFrame(() => {\n dragFrame.current = 0;\n const dd = drag.current;\n if (!dd) return;\n let next = dd.scroll + (dd.y - latestY.current) / itemHeight;\n if (next < 0) next *= 0.3;\n else if (next > last) next = last + (next - last) * 0.3;\n scroll.current = next;\n paint(next);\n maybeTick(next);\n emit(Math.round(clamp(next, 0, last)));\n });\n },\n [itemHeight, last, paint, emit, maybeTick],\n );\n const endDrag = useCallback(() => {\n const d = drag.current;\n if (!d) return;\n if (dragFrame.current) {\n cancelAnimationFrame(dragFrame.current);\n dragFrame.current = 0;\n }\n drag.current = null;\n setGrabbing(false);\n // Average velocity over the last `VELOCITY_WINDOW` ms of movement rather\n // than the final two samples — a single noisy frame otherwise makes an\n // even flick feel like it caught or slipped.\n const pts = d.pts;\n let v = 0;\n if (pts.length > 1) {\n const latest = pts[pts.length - 1];\n let ref = pts[0];\n for (const p of pts) {\n if (latest[1] - p[1] <= VELOCITY_WINDOW) {\n ref = p;\n break;\n }\n }\n const dt = latest[1] - ref[1];\n if (dt > 0) {\n const raw = (ref[0] - latest[0]) / itemHeight / dt;\n v = clamp(raw, -MAX_VELOCITY, MAX_VELOCITY);\n }\n }\n fling(v);\n }, [itemHeight, fling]);\n\n // Mouse / pen only — touch runs through the native listeners in the effect.\n const onPointerDown = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (disabled || reduce || event.pointerType === \"touch\") return;\n beginDrag(event.clientY);\n capturePointer(event.currentTarget, event.pointerId);\n },\n [disabled, reduce, beginDrag],\n );\n const onPointerMove = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (event.pointerType === \"touch\") return;\n moveDrag(event.clientY);\n },\n [moveDrag],\n );\n const onPointerUp = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (event.pointerType === \"touch\") return;\n // Also the pointercancel handler, where the capture is already gone —\n // an unguarded release throws there and the drum never settles.\n releasePointer(event.currentTarget, event.pointerId);\n endDrag();\n },\n [endDrag],\n );\n\n // Wheel drives `scroll` continuously — like a drag — then snaps once it goes\n // idle. Firing a fresh eased step per notch instead stacks overlapping\n // animations that keep interrupting each other, which read as lag.\n const wheelSnap = useRef<ReturnType<typeof setTimeout> | null>(null);\n const onWheel = useCallback(\n (event: globalThis.WheelEvent) => {\n // Native (non-passive) so preventDefault actually stops the page from\n // scrolling behind the wheel — React's synthetic wheel listener is\n // passive, so a handler on the element cannot cancel the scroll.\n if (disabled || reduce) return;\n event.preventDefault();\n if (sound) getPlayer().prepare();\n stop();\n const px = event.deltaMode === 1 ? event.deltaY * 16 : event.deltaY;\n const next = clamp(scroll.current + px * WHEEL_SENS, 0, last);\n scroll.current = next;\n paint(next);\n maybeTick(next);\n emit(Math.round(next));\n if (wheelSnap.current) clearTimeout(wheelSnap.current);\n wheelSnap.current = setTimeout(() => {\n glide(clamp(Math.round(scroll.current), 0, last), 240, easeOutBack);\n }, WHEEL_SETTLE);\n },\n [disabled, reduce, sound, last, paint, emit, stop, glide, maybeTick, getPlayer],\n );\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (disabled) return;\n const at = Math.round(scroll.current);\n const map: Record<string, number> = {\n ArrowUp: -1,\n ArrowDown: 1,\n Home: -at,\n End: last - at,\n };\n if (event.key in map) {\n event.preventDefault();\n if (sound) getPlayer().prepare();\n step(map[event.key]);\n }\n },\n [disabled, sound, last, step, getPlayer],\n );\n\n // Paint the starting frame, and follow controlled/value changes from outside\n // unless a gesture is mid-flight.\n useEffect(() => {\n if (drag.current) return;\n const target = indexOf(currentValue);\n emitted.current = currentValue;\n if (Math.abs(Math.round(scroll.current) - target) < 0.001) {\n paint(scroll.current);\n return;\n }\n glide(target, 260);\n }, [currentValue, indexOf, paint, glide]);\n\n useEffect(\n () => () => {\n cancelAnimationFrame(raf.current);\n cancelAnimationFrame(dragFrame.current);\n if (wheelSnap.current) clearTimeout(wheelSnap.current);\n tickPlayer.current?.dispose();\n },\n [],\n );\n\n // Native touch + wheel listeners, bound non-passively so touchmove and wheel\n // can block the page from scrolling while the wheel spins. React's synthetic\n // touch/wheel handlers are passive, so preventDefault there is a no-op and the\n // gesture scrolls the page instead of driving the drum.\n useEffect(() => {\n const el = container.current;\n if (!el || reduce || disabled) return;\n const onStart = (e: TouchEvent) => {\n const t = e.touches[0];\n if (t) beginDrag(t.clientY);\n };\n const onMove = (e: TouchEvent) => {\n const t = e.touches[0];\n if (!t || !drag.current) return;\n e.preventDefault();\n moveDrag(t.clientY);\n };\n const onEnd = () => endDrag();\n el.addEventListener(\"touchstart\", onStart, { passive: true });\n el.addEventListener(\"touchmove\", onMove, { passive: false });\n el.addEventListener(\"touchend\", onEnd);\n el.addEventListener(\"touchcancel\", onEnd);\n el.addEventListener(\"wheel\", onWheel, { passive: false });\n return () => {\n el.removeEventListener(\"touchstart\", onStart);\n el.removeEventListener(\"touchmove\", onMove);\n el.removeEventListener(\"touchend\", onEnd);\n el.removeEventListener(\"touchcancel\", onEnd);\n el.removeEventListener(\"wheel\", onWheel);\n };\n }, [reduce, disabled, beginDrag, moveDrag, endDrag, onWheel]);\n\n const maskFade =\n \"[mask-image:linear-gradient(to_bottom,transparent,#000_22%,#000_78%,transparent)]\";\n\n if (reduce) {\n const pad = (height - itemHeight) / 2;\n return (\n <div\n className={cn(\n \"relative overflow-hidden rounded-2xl border border-border bg-card\",\n disabled && \"pointer-events-none opacity-50\",\n className,\n )}\n style={{ height }}\n >\n <div\n className=\"pointer-events-none absolute inset-x-0 top-1/2 z-10 -translate-y-1/2 border-border border-y bg-foreground/4\"\n style={{ height: itemHeight }}\n />\n <ul\n className={cn(\n \"h-full snap-y snap-mandatory overflow-y-auto scroll-smooth [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\",\n maskFade,\n )}\n style={{ paddingTop: pad, paddingBottom: pad }}\n >\n {options.map((option) => {\n const v = optionValue(option);\n return (\n <li key={v} className=\"snap-center\">\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => emit(options.indexOf(option))}\n className={cn(\n \"flex w-full items-center justify-center font-medium\",\n v === currentValue ? \"text-foreground\" : \"text-muted-foreground\",\n )}\n style={{ height: itemHeight }}\n >\n {optionLabel(option)}\n </button>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n\n return (\n <div\n ref={container}\n role=\"listbox\"\n aria-label={ariaLabel}\n tabIndex={disabled ? -1 : 0}\n onKeyDown={onKeyDown}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={onPointerUp}\n onPointerCancel={onPointerUp}\n className={cn(\n \"relative touch-none overflow-hidden rounded-2xl border border-border bg-card outline-none focus-visible:ring-2 focus-visible:ring-foreground/20\",\n // The drum owns the whole gesture; iOS must not open its callout or\n // start a drag out of the same press and cancel ours.\n TOUCH_GESTURE_CLASS,\n grabbing ? \"cursor-grabbing\" : \"cursor-grab\",\n disabled && \"pointer-events-none opacity-50\",\n maskFade,\n className,\n )}\n style={{ height, perspective: 1000 }}\n >\n {/* Curved drum of dimmed rows. */}\n <ul\n ref={drumRef}\n aria-hidden\n className=\"backface-hidden transform-3d absolute inset-x-0 top-1/2 m-0 h-0 list-none p-0 will-change-transform\"\n >\n {options.map((option, i) => (\n <li\n key={optionValue(option)}\n data-index={i}\n className=\"absolute inset-x-0 flex items-center justify-center font-medium text-muted-foreground\"\n style={{\n top: -itemHeight / 2,\n height: itemHeight,\n transform: `rotateX(${-itemAngle * i}deg) translateZ(${radius}px)`,\n }}\n >\n {optionLabel(option)}\n </li>\n ))}\n </ul>\n\n {/* Center band: the very same drum, clipped to one row and drawn crisp.\n Its own perspective, centred on the container middle, matches the main\n drum's projection so the two copies register exactly. */}\n <div\n className=\"pointer-events-none absolute inset-x-0 top-1/2 z-10 -translate-y-1/2 overflow-hidden rounded-md bg-foreground/4\"\n style={{ height: itemHeight, perspective: 1000 }}\n >\n <ul\n ref={bandRef}\n aria-hidden\n className=\"backface-hidden transform-3d absolute inset-x-0 top-1/2 m-0 h-0 list-none p-0 will-change-transform\"\n >\n {options.map((option, i) => (\n <li\n key={optionValue(option)}\n data-index={i}\n className=\"absolute inset-x-0 flex items-center justify-center font-medium text-foreground\"\n style={{\n top: -itemHeight / 2,\n height: itemHeight,\n transform: `rotateX(${-itemAngle * i}deg) translateZ(${radius}px)`,\n }}\n >\n {optionLabel(option)}\n </li>\n ))}\n </ul>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAmCA,MAAM,MAAM,KAAK,KAAK;AAItB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,aAAa;AACnB,MAAM,eAAe;AACrB,MAAM,gBAAgB,MAAc,KAAK,IAAI,MAAM;AAGnD,MAAM,OAAO;AACb,MAAM,eAAe,MAAc,IAAK,QAAa,IAAI,MAAM,IAAI,QAAQ,IAAI,MAAM;AAErF,MAAM,SAAS,GAAW,IAAY,OAAe,KAAK,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAC;AAEjF,SAAS,YAAY,QAA2B;CAC9C,OAAO,OAAO,WAAW,WAAW,SAAS,OAAO;AACtD;AACA,SAAS,YAAY,QAA2B;CAC9C,OAAO,OAAO,WAAW,WAAW,SAAS,OAAO;AACtD;AAEA,SAAgB,YAAY,EAC1B,SACA,OACA,cACA,eACA,eAAe,GACf,aAAa,IACb,WAAW,OACX,QAAQ,OACR,WACA,cAAc,aACK;CACnB,MAAM,SAAS,iBAAiB,KAAK;CACrC,MAAM,aAAa,UAAU,KAAA;CAC7B,MAAM,OAAO,QAAQ,SAAS;CAE9B,MAAM,UAAU,aACb,MAA0B;EACzB,MAAM,IAAI,QAAQ,WAAW,MAAM,YAAY,CAAC,MAAM,CAAC;EACvD,OAAO,IAAI,IAAI,IAAI;CACrB,GACA,CAAC,OAAO,CACV;CAEA,MAAM,CAAC,UAAU,eAAe,eAAe,gBAAgB,KAAK;CACpE,MAAM,eA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ACF;EACA,OAAO;GAAE;GAAQ,aAAa;EAAK;EApBrC,UAAA,CAuBE,oBAAC,MAAD;GACE,KAAK;GACL,eAAA;GACA,WAAU;GAET,UAAA,QAAQ,KAAK,QAAQ,MACpB,oBAAC,MAAD;IAEE,cAAY;IACZ,WAAU;IACV,OAAO;KACL,KAAK,CAAC,aAAa;KACnB,QAAQ;KACR,WAAW,WAAW,CAAC,YAAY,EAAE,kBAAkB,OAAO;IAChE;IAEC,UAAA,YAAY,MAAM;GACjB,GAVG,YAAY,MAAM,CAUrB,CACL;EACC,CAAA,GAKJ,oBAAC,OAAD;GACE,WAAU;GACV,OAAO;IAAE,QAAQ;IAAY,aAAa;GAAK;GAE/C,UAAA,oBAAC,MAAD;IACE,KAAK;IACL,eAAA;IACA,WAAU;IAET,UAAA,QAAQ,KAAK,QAAQ,MACpB,oBAAC,MAAD;KAEE,cAAY;KACZ,WAAU;KACV,OAAO;MACL,KAAK,CAAC,aAAa;MACnB,QAAQ;MACR,WAAW,WAAW,CAAC,YAAY,EAAE,kBAAkB,OAAO;KAChE;KAEC,UAAA,YAAY,MAAM;IACjB,GAVG,YAAY,MAAM,CAUrB,CACL;GACC,CAAA;EACD,CAAA,CACF;;AAET"}
|
|
1
|
+
{"version":3,"file":"wheel-picker.js","names":[],"sources":["../../../src/components/motion/wheel-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type KeyboardEvent,\n type PointerEvent,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { cn } from \"cn\";\nimport { useReducedMotion } from \"motion/react\";\n\nimport { createTickPlayer } from \"../../lib/tick-sound\";\nimport { capturePointer, releasePointer, TOUCH_GESTURE_CLASS } from \"../../lib/touch\";\n\nexport type WheelPickerOption = string | { label: string; value: string };\n\nexport interface WheelPickerProps {\n options: WheelPickerOption[];\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n /** Rows visible through the window, odd. More = flatter curve. Default 5. */\n visibleCount?: number;\n /** Row height in px. Default 36. */\n itemHeight?: number;\n disabled?: boolean;\n /** Play a short tick each time the selected value changes. Default false. */\n sound?: boolean;\n className?: string;\n \"aria-label\"?: string;\n}\n\nconst DEG = Math.PI / 180;\n// Physics constants, tuned for an iOS-like flick rather than reused from the\n// shared spring tokens: the wheel coasts in whole-row units and springs to an\n// integer detent, which a layout spring can't express cleanly.\nconst DECELERATION = 0.00042; // rows per ms², how fast a flick bleeds off (lower = freer)\nconst MAX_VELOCITY = 0.18; // rows per ms, caps a hard fling\nconst VELOCITY_WINDOW = 90; // ms of recent drag to average a release velocity over\nconst WHEEL_SENS = 0.012; // rows per pixel of wheel delta\nconst WHEEL_SETTLE = 110; // ms of wheel idle before snapping to a row\nconst easeOutCubic = (p: number) => 1 - (1 - p) ** 3;\n// Overshoots the target by a few percent then settles — the little spring\n// bounce as a row snaps home. `BACK` sets how far it drifts past.\nconst BACK = 1.35;\nconst easeOutBack = (p: number) => 1 + (BACK + 1) * (p - 1) ** 3 + BACK * (p - 1) ** 2;\n\nconst clamp = (v: number, lo: number, hi: number) => Math.max(lo, Math.min(v, hi));\n\nfunction optionValue(option: WheelPickerOption) {\n return typeof option === \"string\" ? option : option.value;\n}\nfunction optionLabel(option: WheelPickerOption) {\n return typeof option === \"string\" ? option : option.label;\n}\n\nexport function WheelPicker({\n options,\n value,\n defaultValue,\n onValueChange,\n visibleCount = 5,\n itemHeight = 36,\n disabled = false,\n sound = false,\n className,\n \"aria-label\": ariaLabel,\n}: WheelPickerProps) {\n const reduce = useReducedMotion() ?? false;\n const controlled = value !== undefined;\n const last = options.length - 1;\n\n const indexOf = useCallback(\n (v: string | undefined) => {\n const i = options.findIndex((o) => optionValue(o) === v);\n return i < 0 ? 0 : i;\n },\n [options],\n );\n\n const [internal, setInternal] = useState(() => defaultValue ?? value);\n const currentValue = controlled ? value : internal;\n const [grabbing, setGrabbing] = useState(false);\n\n // Cylinder geometry. Each row spans `itemAngle`; `radius` seats the rows on\n // the drum; rows past `hideBeyond` sit behind the horizon and are dropped.\n const { itemAngle, radius, height, hideBeyond } = useMemo(() => {\n const rowsEachSide = Math.max(1, Math.floor(visibleCount / 2));\n const cutoff = rowsEachSide + 1;\n const angle = 90 / cutoff;\n const r = itemHeight / Math.tan(angle * DEG);\n return {\n itemAngle: angle,\n radius: r,\n hideBeyond: cutoff,\n height: Math.round(2 * r * Math.sin(rowsEachSide * angle * DEG) + itemHeight),\n };\n }, [visibleCount, itemHeight]);\n\n const container = useRef<HTMLDivElement>(null);\n const drumRef = useRef<HTMLUListElement>(null);\n const bandRef = useRef<HTMLUListElement>(null);\n // Scroll position measured in rows (a float index). One source of truth for\n // both layers: the drum rotates by `itemAngle·scroll`, the crisp band slides\n // by `itemHeight·scroll`.\n const scroll = useRef(indexOf(currentValue));\n const raf = useRef(0);\n const emitted = useRef(currentValue);\n const tickPlayer = useRef<ReturnType<typeof createTickPlayer> | null>(null);\n const lastTick = useRef(indexOf(currentValue));\n\n const paint = useCallback(\n (s: number) => {\n const drum = drumRef.current;\n const band = bandRef.current;\n if (drum) {\n drum.style.transform = `translateZ(${-radius}px) rotateX(${itemAngle * s}deg)`;\n for (const node of Array.from(drum.children)) {\n const li = node as HTMLLIElement;\n const i = Number(li.dataset.index);\n const want = Math.abs(i - s) > hideBeyond ? \"hidden\" : \"visible\";\n // Write only on change — an unconditional write every frame thrashes\n // style recalc and is what made the drag feel draggy on mobile.\n if (li.style.visibility !== want) li.style.visibility = want;\n }\n }\n // The band is the SAME drum, clipped to the centre row — driven by the\n // identical transform so the crisp copy sits exactly on the dimmed one,\n // with no parallax ghost as rows cross the window. It needs the same\n // horizon cull, or the row on the back of the drum bleeds into the front.\n if (band) {\n band.style.transform = `translateZ(${-radius}px) rotateX(${itemAngle * s}deg)`;\n for (const node of Array.from(band.children)) {\n const li = node as HTMLLIElement;\n const i = Number(li.dataset.index);\n const want = Math.abs(i - s) > hideBeyond ? \"hidden\" : \"visible\";\n if (li.style.visibility !== want) li.style.visibility = want;\n }\n }\n },\n [radius, itemAngle, hideBeyond],\n );\n\n const getPlayer = useCallback(() => {\n if (!tickPlayer.current) tickPlayer.current = createTickPlayer();\n return tickPlayer.current;\n }, []);\n\n const emit = useCallback(\n (i: number) => {\n const v = optionValue(options[clamp(i, 0, last)]);\n if (v === emitted.current) return;\n emitted.current = v;\n // Reduced motion has no drum/glide path to tick from — it's an\n // onClick straight into emit, so the tick lives here instead.\n if (sound && reduce) getPlayer().play();\n if (!controlled) setInternal(v);\n onValueChange?.(v);\n },\n [options, last, controlled, onValueChange, sound, reduce, getPlayer],\n );\n\n // Drum path: fires a tick whenever the nearest row changes, independent of\n // `emit` (which only fires on settle during a glide/fling, not per row\n // crossed). Gated on `!reduce` since the reduced render never calls this.\n const maybeTick = useCallback(\n (pos: number) => {\n const row = clamp(Math.round(pos), 0, last);\n if (!sound || reduce) {\n lastTick.current = row;\n return;\n }\n if (row === lastTick.current) return;\n lastTick.current = row;\n getPlayer().play();\n },\n [sound, reduce, last, getPlayer],\n );\n\n const stop = useCallback(() => cancelAnimationFrame(raf.current), []);\n\n // Ease `scroll` from where it is to an integer detent over `duration`. The\n // easing may overshoot (spring bounce) before it resolves exactly on `to`.\n const glide = useCallback(\n (to: number, duration: number, ease: (p: number) => number = easeOutCubic) => {\n stop();\n const from = scroll.current;\n const dist = to - from;\n if (!dist || duration <= 0) {\n scroll.current = to;\n paint(to);\n maybeTick(to);\n emit(to);\n return;\n }\n const start = performance.now();\n const tick = (now: number) => {\n const p = (now - start) / duration;\n if (p >= 1) {\n scroll.current = to;\n paint(to);\n maybeTick(to);\n emit(to);\n return;\n }\n scroll.current = from + dist * ease(p);\n paint(scroll.current);\n maybeTick(scroll.current);\n raf.current = requestAnimationFrame(tick);\n };\n raf.current = requestAnimationFrame(tick);\n },\n [stop, paint, emit, maybeTick],\n );\n\n // Project where a flick of `velocity` (rows/ms) coasts to, snap to a row.\n const fling = useCallback(\n (velocity: number) => {\n const from = scroll.current;\n if (from < 0 || from > last) {\n glide(clamp(Math.round(from), 0, last), 260); // rubber-band back\n return;\n }\n const dir = Math.sign(velocity);\n const coast = ((velocity * velocity) / (2 * DECELERATION)) * dir;\n const to = clamp(Math.round(from + coast), 0, last);\n // Long, spring-tipped settle so a hard flick reads as free momentum\n // coasting to rest with a gentle bounce, never a clipped stop.\n const duration = clamp(Math.sqrt(Math.abs(to - from)) * 300 + 240, 280, 1700);\n glide(to, duration, easeOutBack);\n },\n [glide, last],\n );\n\n const step = useCallback(\n (by: number) => glide(clamp(Math.round(scroll.current) + by, 0, last), 300, easeOutBack),\n [glide, last],\n );\n\n // Drag: track recent points for a release velocity; rubber-band past the ends.\n const drag = useRef<{\n y: number;\n scroll: number;\n pts: [number, number][];\n } | null>(null);\n // Coalesce touch/pointer moves to one paint per animation frame — raw move\n // events fire several times per frame (and off-frame) on high-refresh\n // screens, and painting each one is what made the drag feel choppy.\n const dragFrame = useRef(0);\n const latestY = useRef(0);\n // Shared drag core, driven by a Y coordinate from either a mouse pointer or a\n // native touch. Touch is bound with non-passive listeners in the effect below\n // so the move can preventDefault the page scroll — React's synthetic touch\n // events are passive and can't, which is why finger-drag did nothing on\n // mobile.\n const beginDrag = useCallback(\n (y: number) => {\n stop();\n if (sound) getPlayer().prepare();\n setGrabbing(true);\n drag.current = {\n y,\n scroll: scroll.current,\n pts: [[y, performance.now()]],\n };\n },\n [stop, sound, getPlayer],\n );\n const moveDrag = useCallback(\n (y: number) => {\n const d = drag.current;\n if (!d) return;\n // Record every sample for an accurate release velocity, but only render\n // the newest position once per frame.\n latestY.current = y;\n d.pts.push([y, performance.now()]);\n if (d.pts.length > 8) d.pts.shift();\n if (dragFrame.current) return;\n dragFrame.current = requestAnimationFrame(() => {\n dragFrame.current = 0;\n const dd = drag.current;\n if (!dd) return;\n let next = dd.scroll + (dd.y - latestY.current) / itemHeight;\n if (next < 0) next *= 0.3;\n else if (next > last) next = last + (next - last) * 0.3;\n scroll.current = next;\n paint(next);\n maybeTick(next);\n emit(Math.round(clamp(next, 0, last)));\n });\n },\n [itemHeight, last, paint, emit, maybeTick],\n );\n const endDrag = useCallback(() => {\n const d = drag.current;\n if (!d) return;\n if (dragFrame.current) {\n cancelAnimationFrame(dragFrame.current);\n dragFrame.current = 0;\n }\n drag.current = null;\n setGrabbing(false);\n // Average velocity over the last `VELOCITY_WINDOW` ms of movement rather\n // than the final two samples — a single noisy frame otherwise makes an\n // even flick feel like it caught or slipped.\n const pts = d.pts;\n let v = 0;\n if (pts.length > 1) {\n const latest = pts[pts.length - 1];\n let ref = pts[0];\n for (const p of pts) {\n if (latest[1] - p[1] <= VELOCITY_WINDOW) {\n ref = p;\n break;\n }\n }\n const dt = latest[1] - ref[1];\n if (dt > 0) {\n const raw = (ref[0] - latest[0]) / itemHeight / dt;\n v = clamp(raw, -MAX_VELOCITY, MAX_VELOCITY);\n }\n }\n fling(v);\n }, [itemHeight, fling]);\n\n // Mouse / pen only — touch runs through the native listeners in the effect.\n const onPointerDown = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (disabled || reduce || event.pointerType === \"touch\") return;\n beginDrag(event.clientY);\n capturePointer(event.currentTarget, event.pointerId);\n },\n [disabled, reduce, beginDrag],\n );\n const onPointerMove = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (event.pointerType === \"touch\") return;\n moveDrag(event.clientY);\n },\n [moveDrag],\n );\n const onPointerUp = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (event.pointerType === \"touch\") return;\n // Also the pointercancel handler, where the capture is already gone —\n // an unguarded release throws there and the drum never settles.\n releasePointer(event.currentTarget, event.pointerId);\n endDrag();\n },\n [endDrag],\n );\n\n // Wheel drives `scroll` continuously — like a drag — then snaps once it goes\n // idle. Firing a fresh eased step per notch instead stacks overlapping\n // animations that keep interrupting each other, which read as lag.\n const wheelSnap = useRef<ReturnType<typeof setTimeout> | null>(null);\n const onWheel = useCallback(\n (event: globalThis.WheelEvent) => {\n // Native (non-passive) so preventDefault actually stops the page from\n // scrolling behind the wheel — React's synthetic wheel listener is\n // passive, so a handler on the element cannot cancel the scroll.\n if (disabled || reduce) return;\n event.preventDefault();\n if (sound) getPlayer().prepare();\n stop();\n const px = event.deltaMode === 1 ? event.deltaY * 16 : event.deltaY;\n const next = clamp(scroll.current + px * WHEEL_SENS, 0, last);\n scroll.current = next;\n paint(next);\n maybeTick(next);\n emit(Math.round(next));\n if (wheelSnap.current) clearTimeout(wheelSnap.current);\n wheelSnap.current = setTimeout(() => {\n glide(clamp(Math.round(scroll.current), 0, last), 240, easeOutBack);\n }, WHEEL_SETTLE);\n },\n [disabled, reduce, sound, last, paint, emit, stop, glide, maybeTick, getPlayer],\n );\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (disabled) return;\n const at = Math.round(scroll.current);\n const map: Record<string, number> = {\n ArrowUp: -1,\n ArrowDown: 1,\n Home: -at,\n End: last - at,\n };\n if (event.key in map) {\n event.preventDefault();\n if (sound) getPlayer().prepare();\n step(map[event.key]);\n }\n },\n [disabled, sound, last, step, getPlayer],\n );\n\n // Paint the starting frame, and follow controlled/value changes from outside\n // unless a gesture is mid-flight.\n useEffect(() => {\n if (drag.current) return;\n const target = indexOf(currentValue);\n emitted.current = currentValue;\n if (Math.abs(Math.round(scroll.current) - target) < 0.001) {\n paint(scroll.current);\n return;\n }\n glide(target, 260);\n }, [currentValue, indexOf, paint, glide]);\n\n useEffect(\n () => () => {\n cancelAnimationFrame(raf.current);\n cancelAnimationFrame(dragFrame.current);\n if (wheelSnap.current) clearTimeout(wheelSnap.current);\n tickPlayer.current?.dispose();\n },\n [],\n );\n\n // Native touch + wheel listeners, bound non-passively so touchmove and wheel\n // can block the page from scrolling while the wheel spins. React's synthetic\n // touch/wheel handlers are passive, so preventDefault there is a no-op and the\n // gesture scrolls the page instead of driving the drum.\n useEffect(() => {\n const el = container.current;\n if (!el || reduce || disabled) return;\n const onStart = (e: TouchEvent) => {\n const t = e.touches[0];\n if (t) beginDrag(t.clientY);\n };\n const onMove = (e: TouchEvent) => {\n const t = e.touches[0];\n if (!t || !drag.current) return;\n e.preventDefault();\n moveDrag(t.clientY);\n };\n const onEnd = () => endDrag();\n el.addEventListener(\"touchstart\", onStart, { passive: true });\n el.addEventListener(\"touchmove\", onMove, { passive: false });\n el.addEventListener(\"touchend\", onEnd);\n el.addEventListener(\"touchcancel\", onEnd);\n el.addEventListener(\"wheel\", onWheel, { passive: false });\n return () => {\n el.removeEventListener(\"touchstart\", onStart);\n el.removeEventListener(\"touchmove\", onMove);\n el.removeEventListener(\"touchend\", onEnd);\n el.removeEventListener(\"touchcancel\", onEnd);\n el.removeEventListener(\"wheel\", onWheel);\n };\n }, [reduce, disabled, beginDrag, moveDrag, endDrag, onWheel]);\n\n const maskFade =\n \"[mask-image:linear-gradient(to_bottom,transparent,#000_22%,#000_78%,transparent)]\";\n\n if (reduce) {\n const pad = (height - itemHeight) / 2;\n return (\n <div\n className={cn(\n \"relative overflow-hidden rounded-2xl border border-border bg-card\",\n disabled && \"pointer-events-none opacity-50\",\n className,\n )}\n style={{ height }}\n >\n <div\n className=\"pointer-events-none absolute inset-x-0 top-1/2 z-10 -translate-y-1/2 border-border border-y bg-foreground/4\"\n style={{ height: itemHeight }}\n />\n <ul\n className={cn(\n \"h-full snap-y snap-mandatory overflow-y-auto scroll-smooth [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\",\n maskFade,\n )}\n style={{ paddingTop: pad, paddingBottom: pad }}\n >\n {options.map((option) => {\n const v = optionValue(option);\n return (\n <li key={v} className=\"snap-center\">\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => emit(options.indexOf(option))}\n className={cn(\n \"flex w-full items-center justify-center font-medium\",\n v === currentValue ? \"text-foreground\" : \"text-muted-foreground\",\n )}\n style={{ height: itemHeight }}\n >\n {optionLabel(option)}\n </button>\n </li>\n );\n })}\n </ul>\n </div>\n );\n }\n\n return (\n <div\n ref={container}\n role=\"listbox\"\n aria-label={ariaLabel}\n tabIndex={disabled ? -1 : 0}\n onKeyDown={onKeyDown}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={onPointerUp}\n onPointerCancel={onPointerUp}\n className={cn(\n \"relative touch-none overflow-hidden rounded-2xl border border-border bg-card outline-none focus-visible:ring-2 focus-visible:ring-foreground/20\",\n // The drum owns the whole gesture; iOS must not open its callout or\n // start a drag out of the same press and cancel ours.\n TOUCH_GESTURE_CLASS,\n grabbing ? \"cursor-grabbing\" : \"cursor-grab\",\n disabled && \"pointer-events-none opacity-50\",\n maskFade,\n className,\n )}\n style={{ height, perspective: 1000 }}\n >\n {/* Curved drum of dimmed rows. */}\n <ul\n ref={drumRef}\n aria-hidden\n className=\"backface-hidden transform-3d absolute inset-x-0 top-1/2 m-0 h-0 list-none p-0 will-change-transform\"\n >\n {options.map((option, i) => (\n <li\n key={optionValue(option)}\n data-index={i}\n className=\"absolute inset-x-0 flex items-center justify-center font-medium text-muted-foreground\"\n style={{\n top: -itemHeight / 2,\n height: itemHeight,\n transform: `rotateX(${-itemAngle * i}deg) translateZ(${radius}px)`,\n }}\n >\n {optionLabel(option)}\n </li>\n ))}\n </ul>\n\n {/* Center band: the very same drum, clipped to one row and drawn crisp.\n Its own perspective, centred on the container middle, matches the main\n drum's projection so the two copies register exactly. */}\n <div\n className=\"pointer-events-none absolute inset-x-0 top-1/2 z-10 -translate-y-1/2 overflow-hidden rounded-md bg-foreground/4\"\n style={{ height: itemHeight, perspective: 1000 }}\n >\n <ul\n ref={bandRef}\n aria-hidden\n className=\"backface-hidden transform-3d absolute inset-x-0 top-1/2 m-0 h-0 list-none p-0 will-change-transform\"\n >\n {options.map((option, i) => (\n <li\n key={optionValue(option)}\n data-index={i}\n className=\"absolute inset-x-0 flex items-center justify-center font-medium text-foreground\"\n style={{\n top: -itemHeight / 2,\n height: itemHeight,\n transform: `rotateX(${-itemAngle * i}deg) translateZ(${radius}px)`,\n }}\n >\n {optionLabel(option)}\n </li>\n ))}\n </ul>\n </div>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UAAA,YAAY,MAAM;GACjB,GAVG,YAAY,MAAM,CAUrB,CACL;EACC,CAAA,GAKJ,oBAAC,OAAD;GACE,WAAU;GACV,OAAO;IAAE,QAAQ;IAAY,aAAa;GAAK;GAE/C,UAAA,oBAAC,MAAD;IACE,KAAK;IACL,eAAA;IACA,WAAU;IAET,UAAA,QAAQ,KAAK,QAAQ,MACpB,oBAAC,MAAD;KAEE,cAAY;KACZ,WAAU;KACV,OAAO;MACL,KAAK,CAAC,aAAa;MACnB,QAAQ;MACR,WAAW,WAAW,CAAC,YAAY,EAAE,kBAAkB,OAAO;KAChE;KAEC,UAAA,YAAY,MAAM;IACjB,GAVG,YAAY,MAAM,CAUrB,CACL;GACC,CAAA;EACD,CAAA,CACF;;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","names":[],"sources":["../../../src/components/reui/alert.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"alert.d.ts","names":[],"sources":["../../../src/components/reui/alert.tsx"],"mappings":";;cAKM,gBAAa;;6CA2BlB;iBAEQ,QACP,WACA,YACG,SACF,MAAM,wBAAwB,oBAAoB,iCAAc,IAAA;iBAW1D,aAAa,cAAc,SAAS,MAAM,wCAAqB,IAAA;iBAU/D,mBAAmB,cAAc,SAAS,MAAM,wCAAqB,IAAA;iBAarE,cAAc,cAAc,SAAS,MAAM,wCAAqB,IAAA"}
|