@kumix/ui 0.4.1 → 0.4.3
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 +38 -33
- package/dist/{account-avatar-DILzuuvz.js → account-avatar--0_0u0WW.js} +4 -6
- package/dist/{account-avatar-DILzuuvz.js.map → account-avatar--0_0u0WW.js.map} +1 -1
- package/dist/{cascader-types-DVT-znZ-.d.ts → cascader-types-Bh_kJ3Qw.d.ts} +11 -5
- package/dist/cascader-types-Bh_kJ3Qw.d.ts.map +1 -0
- package/dist/components/agents/agent-activity/activity-row.d.ts +1 -3
- package/dist/components/agents/agent-activity/activity-row.d.ts.map +1 -1
- package/dist/components/agents/agent-activity/activity-row.js +18 -19
- package/dist/components/agents/agent-activity/activity-row.js.map +1 -1
- package/dist/components/agents/agent-activity/index.d.ts +1 -3
- package/dist/components/agents/agent-activity/index.d.ts.map +1 -1
- package/dist/components/agents/agent-activity/index.js +4 -5
- package/dist/components/agents/agent-activity/index.js.map +1 -1
- package/dist/components/agents/agent-code.d.ts +0 -2
- package/dist/components/agents/agent-code.d.ts.map +1 -1
- package/dist/components/agents/agent-code.js +3 -4
- package/dist/components/agents/agent-code.js.map +1 -1
- package/dist/components/agents/agent-disclosure.d.ts +0 -2
- package/dist/components/agents/agent-disclosure.d.ts.map +1 -1
- package/dist/components/agents/agent-disclosure.js +1 -2
- package/dist/components/agents/ai-sidebar.d.ts +0 -2
- package/dist/components/agents/ai-sidebar.d.ts.map +1 -1
- package/dist/components/agents/ai-sidebar.js +8 -9
- package/dist/components/agents/ai-sidebar.js.map +1 -1
- package/dist/components/agents/approval-card/index.d.ts +0 -4
- package/dist/components/agents/approval-card/index.d.ts.map +1 -1
- package/dist/components/agents/approval-card/index.js +12 -13
- package/dist/components/agents/approval-card/index.js.map +1 -1
- package/dist/components/agents/chat-app.d.ts +0 -2
- package/dist/components/agents/chat-app.d.ts.map +1 -1
- package/dist/components/agents/chat-app.js +2 -3
- package/dist/components/agents/chat-app.js.map +1 -1
- package/dist/components/agents/citations.d.ts +0 -2
- package/dist/components/agents/citations.d.ts.map +1 -1
- package/dist/components/agents/citations.js +10 -11
- package/dist/components/agents/citations.js.map +1 -1
- package/dist/components/agents/code-block.d.ts +0 -2
- package/dist/components/agents/code-block.d.ts.map +1 -1
- package/dist/components/agents/code-block.js +10 -11
- package/dist/components/agents/code-block.js.map +1 -1
- package/dist/components/agents/file-diff.d.ts +0 -2
- package/dist/components/agents/file-diff.d.ts.map +1 -1
- package/dist/components/agents/file-diff.js +12 -13
- package/dist/components/agents/file-diff.js.map +1 -1
- package/dist/components/agents/image-generation.d.ts +0 -2
- package/dist/components/agents/image-generation.d.ts.map +1 -1
- package/dist/components/agents/image-generation.js +8 -9
- package/dist/components/agents/image-generation.js.map +1 -1
- package/dist/components/agents/loading-states/agent-progress.d.ts +0 -2
- package/dist/components/agents/loading-states/agent-progress.d.ts.map +1 -1
- package/dist/components/agents/loading-states/agent-progress.js +3 -4
- package/dist/components/agents/loading-states/agent-progress.js.map +1 -1
- package/dist/components/agents/loading-states/reasoning-text.d.ts +0 -2
- package/dist/components/agents/loading-states/reasoning-text.d.ts.map +1 -1
- package/dist/components/agents/loading-states/reasoning-text.js +2 -3
- package/dist/components/agents/loading-states/reasoning-text.js.map +1 -1
- package/dist/components/agents/loading-states/thinking-shimmer.d.ts +0 -2
- package/dist/components/agents/loading-states/thinking-shimmer.d.ts.map +1 -1
- package/dist/components/agents/loading-states/thinking-shimmer.js +1 -2
- package/dist/components/agents/message-bubble.d.ts +0 -2
- package/dist/components/agents/message-bubble.d.ts.map +1 -1
- package/dist/components/agents/message-bubble.js +4 -5
- package/dist/components/agents/message-bubble.js.map +1 -1
- package/dist/components/agents/message-context.d.ts +0 -2
- package/dist/components/agents/message-context.d.ts.map +1 -1
- package/dist/components/agents/message-context.js +1 -2
- package/dist/components/agents/message-scroller.d.ts +0 -2
- package/dist/components/agents/message-scroller.d.ts.map +1 -1
- package/dist/components/agents/message-scroller.js +2 -3
- package/dist/components/agents/message-scroller.js.map +1 -1
- package/dist/components/agents/message.d.ts +0 -2
- package/dist/components/agents/message.d.ts.map +1 -1
- package/dist/components/agents/message.js +5 -6
- package/dist/components/agents/message.js.map +1 -1
- package/dist/components/agents/prompt-input.d.ts +0 -2
- package/dist/components/agents/prompt-input.d.ts.map +1 -1
- package/dist/components/agents/prompt-input.js +13 -14
- package/dist/components/agents/prompt-input.js.map +1 -1
- package/dist/components/agents/streaming-response.d.ts +0 -2
- package/dist/components/agents/streaming-response.d.ts.map +1 -1
- package/dist/components/agents/streaming-response.js +5 -6
- package/dist/components/agents/streaming-response.js.map +1 -1
- package/dist/components/agents/todo-list.d.ts +0 -2
- package/dist/components/agents/todo-list.d.ts.map +1 -1
- package/dist/components/agents/todo-list.js +10 -11
- package/dist/components/agents/todo-list.js.map +1 -1
- package/dist/components/agents/tool-approval.d.ts +0 -2
- package/dist/components/agents/tool-approval.d.ts.map +1 -1
- package/dist/components/agents/tool-approval.js +15 -16
- package/dist/components/agents/tool-approval.js.map +1 -1
- package/dist/components/agents/tool-result.d.ts +0 -2
- package/dist/components/agents/tool-result.d.ts.map +1 -1
- package/dist/components/agents/tool-result.js +12 -13
- package/dist/components/agents/tool-result.js.map +1 -1
- package/dist/components/agents/voice-orb.d.ts +0 -2
- package/dist/components/agents/voice-orb.d.ts.map +1 -1
- package/dist/components/agents/voice-orb.js +3 -5
- package/dist/components/agents/voice-orb.js.map +1 -1
- package/dist/components/charts/bump-chart/context.d.ts +1 -1
- package/dist/components/charts/bump-chart/context.js +1 -1
- package/dist/components/charts/bump-chart/legend.d.ts +0 -2
- package/dist/components/charts/bump-chart/legend.d.ts.map +1 -1
- package/dist/components/charts/bump-chart/legend.js +4 -5
- package/dist/components/charts/bump-chart/legend.js.map +1 -1
- package/dist/components/charts/bump-chart/plot.d.ts +0 -2
- package/dist/components/charts/bump-chart/plot.d.ts.map +1 -1
- package/dist/components/charts/bump-chart/plot.js +1 -1
- package/dist/components/charts/bump-chart/point.d.ts +1 -3
- package/dist/components/charts/bump-chart/point.d.ts.map +1 -1
- package/dist/components/charts/bump-chart/point.js +8 -9
- package/dist/components/charts/bump-chart/point.js.map +1 -1
- package/dist/components/charts/bump-chart/series.d.ts +2 -4
- package/dist/components/charts/bump-chart/series.d.ts.map +1 -1
- package/dist/components/charts/bump-chart/series.js +3 -4
- package/dist/components/charts/bump-chart/series.js.map +1 -1
- package/dist/components/charts/bump-chart.d.ts +1 -3
- package/dist/components/charts/bump-chart.d.ts.map +1 -1
- package/dist/components/charts/bump-chart.js +3 -4
- package/dist/components/charts/candlestick-chart/context.d.ts +0 -2
- package/dist/components/charts/candlestick-chart/context.d.ts.map +1 -1
- package/dist/components/charts/candlestick-chart/context.js +1 -2
- package/dist/components/charts/candlestick-chart/legend.d.ts +0 -2
- package/dist/components/charts/candlestick-chart/legend.d.ts.map +1 -1
- package/dist/components/charts/candlestick-chart/legend.js +1 -2
- package/dist/components/charts/candlestick-chart/plot.d.ts +0 -2
- package/dist/components/charts/candlestick-chart/plot.d.ts.map +1 -1
- package/dist/components/charts/candlestick-chart/plot.js +5 -6
- package/dist/components/charts/candlestick-chart/plot.js.map +1 -1
- package/dist/components/charts/candlestick-chart.d.ts +0 -2
- package/dist/components/charts/candlestick-chart.d.ts.map +1 -1
- package/dist/components/charts/candlestick-chart.js +1 -2
- package/dist/components/charts/composition-chart/context.d.ts +1 -1
- package/dist/components/charts/composition-chart/context.js +1 -1
- package/dist/components/charts/composition-chart/legend.d.ts +0 -2
- package/dist/components/charts/composition-chart/legend.d.ts.map +1 -1
- package/dist/components/charts/composition-chart/legend.js +5 -6
- package/dist/components/charts/composition-chart/legend.js.map +1 -1
- package/dist/components/charts/composition-chart/plot.d.ts +0 -2
- package/dist/components/charts/composition-chart/plot.d.ts.map +1 -1
- package/dist/components/charts/composition-chart/plot.js +7 -8
- package/dist/components/charts/composition-chart/plot.js.map +1 -1
- package/dist/components/charts/composition-chart/tooltip-content.d.ts +0 -2
- package/dist/components/charts/composition-chart/tooltip-content.d.ts.map +1 -1
- package/dist/components/charts/composition-chart/tooltip-content.js +6 -7
- package/dist/components/charts/composition-chart/tooltip-content.js.map +1 -1
- package/dist/components/charts/composition-chart.d.ts +1 -3
- package/dist/components/charts/composition-chart.d.ts.map +1 -1
- package/dist/components/charts/composition-chart.js +2 -3
- package/dist/components/charts/donut-chart/center.d.ts +1 -3
- package/dist/components/charts/donut-chart/center.d.ts.map +1 -1
- package/dist/components/charts/donut-chart/center.js +4 -5
- package/dist/components/charts/donut-chart/center.js.map +1 -1
- package/dist/components/charts/donut-chart/context.d.ts +1 -3
- package/dist/components/charts/donut-chart/context.d.ts.map +1 -1
- package/dist/components/charts/donut-chart/context.js +1 -1
- package/dist/components/charts/donut-chart/legend.d.ts +1 -3
- package/dist/components/charts/donut-chart/legend.d.ts.map +1 -1
- package/dist/components/charts/donut-chart/legend.js +7 -8
- package/dist/components/charts/donut-chart/legend.js.map +1 -1
- package/dist/components/charts/donut-chart/plot.d.ts +0 -2
- package/dist/components/charts/donut-chart/plot.d.ts.map +1 -1
- package/dist/components/charts/donut-chart/plot.js +2 -3
- package/dist/components/charts/donut-chart.d.ts +1 -3
- package/dist/components/charts/donut-chart.d.ts.map +1 -1
- package/dist/components/charts/donut-chart.js +2 -3
- package/dist/components/charts/funnel-chart.d.ts +0 -4
- package/dist/components/charts/funnel-chart.d.ts.map +1 -1
- package/dist/components/charts/funnel-chart.js +9 -11
- package/dist/components/charts/funnel-chart.js.map +1 -1
- package/dist/components/charts/heat-calendar/grid.d.ts +0 -2
- package/dist/components/charts/heat-calendar/grid.d.ts.map +1 -1
- package/dist/components/charts/heat-calendar/grid.js +4 -5
- package/dist/components/charts/heat-calendar/grid.js.map +1 -1
- package/dist/components/charts/heat-calendar/legend.d.ts +0 -2
- package/dist/components/charts/heat-calendar/legend.d.ts.map +1 -1
- package/dist/components/charts/heat-calendar/legend.js +4 -5
- package/dist/components/charts/heat-calendar/legend.js.map +1 -1
- package/dist/components/charts/heat-calendar/tooltip.d.ts +1 -1
- package/dist/components/charts/heat-calendar/tooltip.js +3 -4
- package/dist/components/charts/heat-calendar.d.ts +1 -3
- package/dist/components/charts/heat-calendar.d.ts.map +1 -1
- package/dist/components/charts/heat-calendar.js +2 -3
- package/dist/components/charts/liquidity-heatmap.d.ts +0 -4
- package/dist/components/charts/liquidity-heatmap.d.ts.map +1 -1
- package/dist/components/charts/liquidity-heatmap.js +8 -10
- package/dist/components/charts/liquidity-heatmap.js.map +1 -1
- package/dist/components/charts/order-book/depth-row.d.ts +1 -3
- package/dist/components/charts/order-book/depth-row.d.ts.map +1 -1
- package/dist/components/charts/order-book/depth-row.js +4 -5
- package/dist/components/charts/order-book/depth-row.js.map +1 -1
- package/dist/components/charts/order-book.d.ts +1 -3
- package/dist/components/charts/order-book.d.ts.map +1 -1
- package/dist/components/charts/order-book.js +10 -12
- package/dist/components/charts/order-book.js.map +1 -1
- package/dist/components/charts/price-target-fan/header.d.ts +0 -2
- package/dist/components/charts/price-target-fan/header.d.ts.map +1 -1
- package/dist/components/charts/price-target-fan/header.js +4 -5
- package/dist/components/charts/price-target-fan/header.js.map +1 -1
- package/dist/components/charts/price-target-fan/plot.d.ts +0 -2
- package/dist/components/charts/price-target-fan/plot.d.ts.map +1 -1
- package/dist/components/charts/price-target-fan/plot.js +2 -3
- package/dist/components/charts/price-target-fan/series.d.ts +0 -2
- package/dist/components/charts/price-target-fan/series.d.ts.map +1 -1
- package/dist/components/charts/price-target-fan/series.js +2 -3
- package/dist/components/charts/price-target-fan/tooltip.d.ts +1 -1
- package/dist/components/charts/price-target-fan/tooltip.js +8 -9
- package/dist/components/charts/price-target-fan/tooltip.js.map +1 -1
- package/dist/components/charts/price-target-fan.d.ts +1 -3
- package/dist/components/charts/price-target-fan.d.ts.map +1 -1
- package/dist/components/charts/price-target-fan.js +2 -3
- package/dist/components/charts/returns-calendar/grid.d.ts +0 -2
- package/dist/components/charts/returns-calendar/grid.d.ts.map +1 -1
- package/dist/components/charts/returns-calendar/grid.js +6 -7
- package/dist/components/charts/returns-calendar/grid.js.map +1 -1
- package/dist/components/charts/returns-calendar/tooltip.d.ts +1 -1
- package/dist/components/charts/returns-calendar/tooltip.js +3 -4
- package/dist/components/charts/returns-calendar.d.ts +1 -5
- package/dist/components/charts/returns-calendar.d.ts.map +1 -1
- package/dist/components/charts/returns-calendar.js +2 -3
- package/dist/components/charts/status-bar/legend.d.ts +0 -2
- package/dist/components/charts/status-bar/legend.d.ts.map +1 -1
- package/dist/components/charts/status-bar/legend.js +3 -4
- package/dist/components/charts/status-bar/legend.js.map +1 -1
- package/dist/components/charts/status-bar/plot.d.ts +0 -2
- package/dist/components/charts/status-bar/plot.d.ts.map +1 -1
- package/dist/components/charts/status-bar/plot.js +6 -7
- package/dist/components/charts/status-bar/plot.js.map +1 -1
- package/dist/components/charts/status-bar/tooltip.d.ts +1 -1
- package/dist/components/charts/status-bar/tooltip.js +3 -4
- package/dist/components/charts/status-bar.d.ts +1 -3
- package/dist/components/charts/status-bar.d.ts.map +1 -1
- package/dist/components/charts/status-bar.js +2 -3
- package/dist/components/charts/treemap/legend.d.ts +0 -2
- package/dist/components/charts/treemap/legend.d.ts.map +1 -1
- package/dist/components/charts/treemap/legend.js +2 -3
- package/dist/components/charts/treemap/plot.d.ts +1 -3
- package/dist/components/charts/treemap/plot.d.ts.map +1 -1
- package/dist/components/charts/treemap/plot.js +4 -5
- package/dist/components/charts/treemap/plot.js.map +1 -1
- package/dist/components/charts/treemap/tile.d.ts +1 -3
- package/dist/components/charts/treemap/tile.d.ts.map +1 -1
- package/dist/components/charts/treemap/tile.js +4 -5
- package/dist/components/charts/treemap/tile.js.map +1 -1
- package/dist/components/charts/treemap/tooltip.d.ts +1 -3
- package/dist/components/charts/treemap/tooltip.d.ts.map +1 -1
- package/dist/components/charts/treemap/tooltip.js +3 -4
- package/dist/components/charts/treemap.d.ts +1 -5
- package/dist/components/charts/treemap.d.ts.map +1 -1
- package/dist/components/charts/treemap.js +2 -3
- package/dist/components/charts/volume-profile/plot.d.ts +0 -2
- package/dist/components/charts/volume-profile/plot.d.ts.map +1 -1
- package/dist/components/charts/volume-profile/plot.js +9 -10
- package/dist/components/charts/volume-profile/plot.js.map +1 -1
- package/dist/components/charts/volume-profile/summary.d.ts +0 -2
- package/dist/components/charts/volume-profile/summary.d.ts.map +1 -1
- package/dist/components/charts/volume-profile/summary.js +8 -9
- package/dist/components/charts/volume-profile/summary.js.map +1 -1
- package/dist/components/charts/volume-profile/tooltip.d.ts +1 -1
- package/dist/components/charts/volume-profile/tooltip.js +4 -5
- package/dist/components/charts/volume-profile/tooltip.js.map +1 -1
- package/dist/components/charts/volume-profile.d.ts +1 -5
- package/dist/components/charts/volume-profile.d.ts.map +1 -1
- package/dist/components/charts/volume-profile.js +2 -3
- package/dist/components/custom/confirm-dialog.d.ts +0 -2
- package/dist/components/custom/confirm-dialog.d.ts.map +1 -1
- package/dist/components/custom/confirm-dialog.js +7 -8
- package/dist/components/custom/confirm-dialog.js.map +1 -1
- package/dist/components/custom/toast.d.ts +0 -2
- package/dist/components/custom/toast.d.ts.map +1 -1
- package/dist/components/custom/toast.js +1 -2
- package/dist/components/motion/action-swap-blur.d.ts +0 -2
- package/dist/components/motion/action-swap-blur.d.ts.map +1 -1
- package/dist/components/motion/action-swap-blur.js +1 -2
- package/dist/components/motion/action-swap-cascade.d.ts +0 -2
- package/dist/components/motion/action-swap-cascade.d.ts.map +1 -1
- package/dist/components/motion/action-swap-cascade.js +1 -2
- package/dist/components/motion/action-swap-roll.d.ts +0 -2
- package/dist/components/motion/action-swap-roll.d.ts.map +1 -1
- package/dist/components/motion/action-swap-roll.js +1 -2
- package/dist/components/motion/action-swap.d.ts +1 -3
- package/dist/components/motion/action-swap.d.ts.map +1 -1
- package/dist/components/motion/action-swap.js +45 -23
- package/dist/components/motion/action-swap.js.map +1 -1
- package/dist/components/motion/adaptive-stepper.d.ts +0 -2
- package/dist/components/motion/adaptive-stepper.d.ts.map +1 -1
- package/dist/components/motion/adaptive-stepper.js +4 -6
- package/dist/components/motion/adaptive-stepper.js.map +1 -1
- package/dist/components/motion/alert.d.ts +0 -2
- package/dist/components/motion/alert.d.ts.map +1 -1
- package/dist/components/motion/alert.js +5 -6
- package/dist/components/motion/alert.js.map +1 -1
- package/dist/components/motion/animated-badge.d.ts +1 -3
- package/dist/components/motion/animated-badge.d.ts.map +1 -1
- package/dist/components/motion/animated-badge.js +62 -104
- package/dist/components/motion/animated-badge.js.map +1 -1
- package/dist/components/motion/animated-number.d.ts +0 -2
- package/dist/components/motion/animated-number.d.ts.map +1 -1
- package/dist/components/motion/animated-number.js +1 -2
- package/dist/components/motion/animated-sidebar.d.ts +0 -2
- package/dist/components/motion/animated-sidebar.d.ts.map +1 -1
- package/dist/components/motion/animated-sidebar.js +15 -16
- package/dist/components/motion/animated-sidebar.js.map +1 -1
- package/dist/components/motion/animated-toast-stack.d.ts +0 -2
- package/dist/components/motion/animated-toast-stack.d.ts.map +1 -1
- package/dist/components/motion/animated-toast-stack.js +6 -7
- package/dist/components/motion/animated-toast-stack.js.map +1 -1
- package/dist/components/motion/arc-picker.d.ts +0 -2
- package/dist/components/motion/arc-picker.d.ts.map +1 -1
- package/dist/components/motion/arc-picker.js +5 -6
- package/dist/components/motion/arc-picker.js.map +1 -1
- package/dist/components/motion/aspect-ratio.d.ts +0 -2
- package/dist/components/motion/aspect-ratio.d.ts.map +1 -1
- package/dist/components/motion/aspect-ratio.js +1 -2
- package/dist/components/motion/attachment-upload.d.ts +0 -2
- package/dist/components/motion/attachment-upload.d.ts.map +1 -1
- package/dist/components/motion/attachment-upload.js +28 -29
- package/dist/components/motion/attachment-upload.js.map +1 -1
- package/dist/components/motion/availability-scheduler/copy-menu.d.ts +1 -3
- package/dist/components/motion/availability-scheduler/copy-menu.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/copy-menu.js +1 -1
- package/dist/components/motion/availability-scheduler/day-row.d.ts +1 -3
- package/dist/components/motion/availability-scheduler/day-row.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/day-row.js +5 -6
- package/dist/components/motion/availability-scheduler/day-row.js.map +1 -1
- package/dist/components/motion/availability-scheduler/icon-button.d.ts +0 -2
- package/dist/components/motion/availability-scheduler/icon-button.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/icon-button.js +2 -3
- package/dist/components/motion/availability-scheduler/icon-button.js.map +1 -1
- package/dist/components/motion/availability-scheduler/index.d.ts +1 -3
- package/dist/components/motion/availability-scheduler/index.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/index.js +3 -4
- package/dist/components/motion/availability-scheduler/index.js.map +1 -1
- package/dist/components/motion/availability-scheduler/time-select.d.ts +1 -3
- package/dist/components/motion/availability-scheduler/time-select.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/time-select.js +1 -2
- package/dist/components/motion/bloom-menu.d.ts +0 -2
- package/dist/components/motion/bloom-menu.d.ts.map +1 -1
- package/dist/components/motion/bloom-menu.js +78 -14
- package/dist/components/motion/bloom-menu.js.map +1 -1
- package/dist/components/motion/bottom-sheet.d.ts +0 -2
- package/dist/components/motion/bottom-sheet.d.ts.map +1 -1
- package/dist/components/motion/bottom-sheet.js +12 -17
- package/dist/components/motion/bottom-sheet.js.map +1 -1
- package/dist/components/motion/bounce-sidebar.d.ts +0 -2
- package/dist/components/motion/bounce-sidebar.d.ts.map +1 -1
- package/dist/components/motion/bounce-sidebar.js +3 -4
- package/dist/components/motion/bounce-sidebar.js.map +1 -1
- package/dist/components/motion/bouncy-accordion.d.ts +0 -2
- package/dist/components/motion/bouncy-accordion.d.ts.map +1 -1
- package/dist/components/motion/bouncy-accordion.js +42 -30
- package/dist/components/motion/bouncy-accordion.js.map +1 -1
- package/dist/components/motion/breadcrumb.d.ts +0 -2
- package/dist/components/motion/breadcrumb.d.ts.map +1 -1
- package/dist/components/motion/breadcrumb.js +7 -8
- package/dist/components/motion/breadcrumb.js.map +1 -1
- package/dist/components/motion/button/base.d.ts +0 -2
- package/dist/components/motion/button/base.d.ts.map +1 -1
- package/dist/components/motion/button/base.js +3 -4
- package/dist/components/motion/button/base.js.map +1 -1
- package/dist/components/motion/button/magnetic.d.ts +0 -2
- package/dist/components/motion/button/magnetic.d.ts.map +1 -1
- package/dist/components/motion/button/magnetic.js +1 -2
- package/dist/components/motion/button/metallic.d.ts +0 -2
- package/dist/components/motion/button/metallic.d.ts.map +1 -1
- package/dist/components/motion/button/metallic.js +3 -4
- package/dist/components/motion/button/metallic.js.map +1 -1
- package/dist/components/motion/button/stateful.d.ts +0 -2
- package/dist/components/motion/button/stateful.d.ts.map +1 -1
- package/dist/components/motion/button/stateful.js +2 -3
- package/dist/components/motion/button/stateful.js.map +1 -1
- package/dist/components/motion/card-folder.d.ts +0 -2
- package/dist/components/motion/card-folder.d.ts.map +1 -1
- package/dist/components/motion/card-folder.js +14 -15
- package/dist/components/motion/card-folder.js.map +1 -1
- package/dist/components/motion/card.d.ts +0 -2
- package/dist/components/motion/card.d.ts.map +1 -1
- package/dist/components/motion/card.js +3 -4
- package/dist/components/motion/card.js.map +1 -1
- package/dist/components/motion/center-morph-modal.d.ts +0 -2
- package/dist/components/motion/center-morph-modal.d.ts.map +1 -1
- package/dist/components/motion/center-morph-modal.js +5 -6
- package/dist/components/motion/center-morph-modal.js.map +1 -1
- package/dist/components/motion/checkbox.d.ts +0 -2
- package/dist/components/motion/checkbox.d.ts.map +1 -1
- package/dist/components/motion/checkbox.js +3 -4
- package/dist/components/motion/checkbox.js.map +1 -1
- package/dist/components/motion/chromatic-text-reveal.d.ts +0 -2
- package/dist/components/motion/chromatic-text-reveal.d.ts.map +1 -1
- package/dist/components/motion/chromatic-text-reveal.js +2 -3
- package/dist/components/motion/chromatic-text-reveal.js.map +1 -1
- package/dist/components/motion/collapsible.d.ts +0 -2
- package/dist/components/motion/collapsible.d.ts.map +1 -1
- package/dist/components/motion/collapsible.js +3 -4
- package/dist/components/motion/collapsible.js.map +1 -1
- package/dist/components/motion/color-picker.d.ts +0 -2
- package/dist/components/motion/color-picker.d.ts.map +1 -1
- package/dist/components/motion/color-picker.js +13 -14
- package/dist/components/motion/color-picker.js.map +1 -1
- package/dist/components/motion/color-selector.d.ts +0 -2
- package/dist/components/motion/color-selector.d.ts.map +1 -1
- package/dist/components/motion/color-selector.js +3 -4
- package/dist/components/motion/color-selector.js.map +1 -1
- package/dist/components/motion/combobox/content.d.ts +0 -2
- package/dist/components/motion/combobox/content.d.ts.map +1 -1
- package/dist/components/motion/combobox/content.js +3 -4
- package/dist/components/motion/combobox/content.js.map +1 -1
- package/dist/components/motion/combobox/context.d.ts +0 -2
- package/dist/components/motion/combobox/context.d.ts.map +1 -1
- package/dist/components/motion/combobox/context.js +2 -3
- package/dist/components/motion/combobox/list.d.ts +0 -2
- package/dist/components/motion/combobox/list.d.ts.map +1 -1
- package/dist/components/motion/combobox/list.js +8 -9
- package/dist/components/motion/combobox/list.js.map +1 -1
- package/dist/components/motion/combobox/trigger.d.ts +0 -2
- package/dist/components/motion/combobox/trigger.d.ts.map +1 -1
- package/dist/components/motion/combobox/trigger.js +5 -6
- package/dist/components/motion/combobox/trigger.js.map +1 -1
- package/dist/components/motion/command-palette.d.ts +0 -2
- package/dist/components/motion/command-palette.d.ts.map +1 -1
- package/dist/components/motion/command-palette.js +13 -14
- package/dist/components/motion/command-palette.js.map +1 -1
- package/dist/components/motion/context-menu.d.ts +0 -2
- package/dist/components/motion/context-menu.d.ts.map +1 -1
- package/dist/components/motion/context-menu.js +7 -8
- package/dist/components/motion/context-menu.js.map +1 -1
- package/dist/components/motion/cylinder-carousel.d.ts +0 -2
- package/dist/components/motion/cylinder-carousel.d.ts.map +1 -1
- package/dist/components/motion/cylinder-carousel.js +2 -3
- package/dist/components/motion/cylinder-carousel.js.map +1 -1
- package/dist/components/motion/date-range-picker.d.ts +0 -4
- package/dist/components/motion/date-range-picker.d.ts.map +1 -1
- package/dist/components/motion/date-range-picker.js +22 -26
- package/dist/components/motion/date-range-picker.js.map +1 -1
- package/dist/components/motion/digit-swap.d.ts +0 -2
- package/dist/components/motion/digit-swap.d.ts.map +1 -1
- package/dist/components/motion/digit-swap.js +1 -2
- package/dist/components/motion/dock.d.ts +0 -2
- package/dist/components/motion/dock.d.ts.map +1 -1
- package/dist/components/motion/dock.js +6 -7
- package/dist/components/motion/dock.js.map +1 -1
- package/dist/components/motion/drawer.d.ts +1 -3
- package/dist/components/motion/drawer.d.ts.map +1 -1
- package/dist/components/motion/drawer.js +12 -13
- package/dist/components/motion/drawer.js.map +1 -1
- package/dist/components/motion/dynamic-island.d.ts +0 -2
- package/dist/components/motion/dynamic-island.d.ts.map +1 -1
- package/dist/components/motion/dynamic-island.js +2 -3
- package/dist/components/motion/dynamic-island.js.map +1 -1
- package/dist/components/motion/expandable-action-bar.d.ts +0 -2
- package/dist/components/motion/expandable-action-bar.d.ts.map +1 -1
- package/dist/components/motion/expandable-action-bar.js +6 -7
- package/dist/components/motion/expandable-action-bar.js.map +1 -1
- package/dist/components/motion/expandable-control.d.ts +0 -2
- package/dist/components/motion/expandable-control.d.ts.map +1 -1
- package/dist/components/motion/expandable-control.js +6 -7
- package/dist/components/motion/expandable-control.js.map +1 -1
- package/dist/components/motion/expandable-tabs.d.ts +0 -2
- package/dist/components/motion/expandable-tabs.d.ts.map +1 -1
- package/dist/components/motion/expandable-tabs.js +5 -6
- package/dist/components/motion/expandable-tabs.js.map +1 -1
- package/dist/components/motion/expanding-arrow-button.d.ts +0 -2
- package/dist/components/motion/expanding-arrow-button.d.ts.map +1 -1
- package/dist/components/motion/expanding-arrow-button.js +3 -4
- package/dist/components/motion/expanding-arrow-button.js.map +1 -1
- package/dist/components/motion/feedback-widget.d.ts +0 -2
- package/dist/components/motion/feedback-widget.d.ts.map +1 -1
- package/dist/components/motion/feedback-widget.js +19 -17
- package/dist/components/motion/feedback-widget.js.map +1 -1
- package/dist/components/motion/file-tree.d.ts +0 -2
- package/dist/components/motion/file-tree.d.ts.map +1 -1
- package/dist/components/motion/file-tree.js +4 -5
- package/dist/components/motion/file-tree.js.map +1 -1
- package/dist/components/motion/file-upload.d.ts +0 -2
- package/dist/components/motion/file-upload.d.ts.map +1 -1
- package/dist/components/motion/file-upload.js +13 -14
- package/dist/components/motion/file-upload.js.map +1 -1
- package/dist/components/motion/hold-action-button.d.ts +0 -2
- package/dist/components/motion/hold-action-button.d.ts.map +1 -1
- package/dist/components/motion/hold-action-button.js +3 -4
- package/dist/components/motion/hold-action-button.js.map +1 -1
- package/dist/components/motion/infinite-masonry.d.ts +0 -2
- package/dist/components/motion/infinite-masonry.d.ts.map +1 -1
- package/dist/components/motion/infinite-masonry.js +16 -17
- package/dist/components/motion/infinite-masonry.js.map +1 -1
- package/dist/components/motion/input.d.ts +0 -2
- package/dist/components/motion/input.d.ts.map +1 -1
- package/dist/components/motion/input.js +7 -8
- package/dist/components/motion/input.js.map +1 -1
- package/dist/components/motion/knockout-bracket.d.ts +0 -2
- package/dist/components/motion/knockout-bracket.d.ts.map +1 -1
- package/dist/components/motion/knockout-bracket.js +17 -18
- package/dist/components/motion/knockout-bracket.js.map +1 -1
- package/dist/components/motion/knockout-wheel.d.ts +0 -2
- package/dist/components/motion/knockout-wheel.d.ts.map +1 -1
- package/dist/components/motion/knockout-wheel.js +7 -8
- package/dist/components/motion/knockout-wheel.js.map +1 -1
- package/dist/components/motion/liquid.d.ts +0 -2
- package/dist/components/motion/liquid.d.ts.map +1 -1
- package/dist/components/motion/liquid.js +1 -2
- package/dist/components/motion/loader.d.ts +0 -2
- package/dist/components/motion/loader.d.ts.map +1 -1
- package/dist/components/motion/loader.js +5 -6
- package/dist/components/motion/loader.js.map +1 -1
- package/dist/components/motion/magnetic.d.ts +0 -2
- package/dist/components/motion/magnetic.d.ts.map +1 -1
- package/dist/components/motion/magnetic.js +1 -2
- package/dist/components/motion/marquee.d.ts +0 -2
- package/dist/components/motion/marquee.d.ts.map +1 -1
- package/dist/components/motion/marquee.js +1 -2
- package/dist/components/motion/morphing-lightbox.d.ts +0 -2
- package/dist/components/motion/morphing-lightbox.d.ts.map +1 -1
- package/dist/components/motion/morphing-lightbox.js +4 -5
- package/dist/components/motion/morphing-lightbox.js.map +1 -1
- package/dist/components/motion/morphing-modal.d.ts +6 -3
- package/dist/components/motion/morphing-modal.d.ts.map +1 -1
- package/dist/components/motion/morphing-modal.js +40 -9
- package/dist/components/motion/morphing-modal.js.map +1 -1
- package/dist/components/motion/morphing-search-chips.d.ts +0 -2
- package/dist/components/motion/morphing-search-chips.d.ts.map +1 -1
- package/dist/components/motion/morphing-search-chips.js +17 -18
- package/dist/components/motion/morphing-search-chips.js.map +1 -1
- package/dist/components/motion/morphing-search.d.ts +0 -2
- package/dist/components/motion/morphing-search.d.ts.map +1 -1
- package/dist/components/motion/morphing-search.js +16 -17
- package/dist/components/motion/morphing-search.js.map +1 -1
- package/dist/components/motion/morphing-tabs.d.ts +0 -2
- package/dist/components/motion/morphing-tabs.d.ts.map +1 -1
- package/dist/components/motion/morphing-tabs.js +5 -6
- package/dist/components/motion/morphing-tabs.js.map +1 -1
- package/dist/components/motion/multi-select/content.d.ts +0 -2
- package/dist/components/motion/multi-select/content.d.ts.map +1 -1
- package/dist/components/motion/multi-select/content.js +3 -4
- package/dist/components/motion/multi-select/content.js.map +1 -1
- package/dist/components/motion/multi-select/context.d.ts +0 -2
- package/dist/components/motion/multi-select/context.d.ts.map +1 -1
- package/dist/components/motion/multi-select/context.js +2 -3
- package/dist/components/motion/multi-select/list.d.ts +0 -2
- package/dist/components/motion/multi-select/list.d.ts.map +1 -1
- package/dist/components/motion/multi-select/list.js +8 -9
- package/dist/components/motion/multi-select/list.js.map +1 -1
- package/dist/components/motion/multi-select/trigger.d.ts +0 -2
- package/dist/components/motion/multi-select/trigger.d.ts.map +1 -1
- package/dist/components/motion/multi-select/trigger.js +7 -8
- package/dist/components/motion/multi-select/trigger.js.map +1 -1
- package/dist/components/motion/not-found/glitch.d.ts +0 -2
- package/dist/components/motion/not-found/glitch.d.ts.map +1 -1
- package/dist/components/motion/not-found/glitch.js +4 -5
- package/dist/components/motion/not-found/glitch.js.map +1 -1
- package/dist/components/motion/not-found/magnetic.d.ts +0 -2
- package/dist/components/motion/not-found/magnetic.d.ts.map +1 -1
- package/dist/components/motion/not-found/magnetic.js +4 -5
- package/dist/components/motion/not-found/magnetic.js.map +1 -1
- package/dist/components/motion/not-found/shared.d.ts +0 -2
- package/dist/components/motion/not-found/shared.d.ts.map +1 -1
- package/dist/components/motion/not-found/shared.js +3 -4
- package/dist/components/motion/not-found/shared.js.map +1 -1
- package/dist/components/motion/not-found/spotlight.d.ts +0 -2
- package/dist/components/motion/not-found/spotlight.d.ts.map +1 -1
- package/dist/components/motion/not-found/spotlight.js +6 -7
- package/dist/components/motion/not-found/spotlight.js.map +1 -1
- package/dist/components/motion/not-found/stacked.d.ts +0 -2
- package/dist/components/motion/not-found/stacked.d.ts.map +1 -1
- package/dist/components/motion/not-found/stacked.js +6 -7
- package/dist/components/motion/not-found/stacked.js.map +1 -1
- package/dist/components/motion/not-found/terminal.d.ts +0 -2
- package/dist/components/motion/not-found/terminal.d.ts.map +1 -1
- package/dist/components/motion/not-found/terminal.js +6 -7
- package/dist/components/motion/not-found/terminal.js.map +1 -1
- package/dist/components/motion/notification-stack.d.ts +0 -2
- package/dist/components/motion/notification-stack.d.ts.map +1 -1
- package/dist/components/motion/notification-stack.js +8 -9
- package/dist/components/motion/notification-stack.js.map +1 -1
- package/dist/components/motion/number-ticker.d.ts +0 -2
- package/dist/components/motion/number-ticker.d.ts.map +1 -1
- package/dist/components/motion/number-ticker.js +1 -2
- package/dist/components/motion/otp-input.d.ts +0 -2
- package/dist/components/motion/otp-input.d.ts.map +1 -1
- package/dist/components/motion/otp-input.js +23 -16
- package/dist/components/motion/otp-input.js.map +1 -1
- package/dist/components/motion/overflow-actions.d.ts +0 -2
- package/dist/components/motion/overflow-actions.d.ts.map +1 -1
- package/dist/components/motion/overflow-actions.js +4 -5
- package/dist/components/motion/overflow-actions.js.map +1 -1
- package/dist/components/motion/parallax.d.ts +0 -2
- package/dist/components/motion/parallax.d.ts.map +1 -1
- package/dist/components/motion/parallax.js +1 -2
- package/dist/components/motion/popover-morph.d.ts +4 -5
- package/dist/components/motion/popover-morph.d.ts.map +1 -1
- package/dist/components/motion/popover-morph.js +50 -59
- package/dist/components/motion/popover-morph.js.map +1 -1
- package/dist/components/motion/popover.d.ts +0 -2
- package/dist/components/motion/popover.d.ts.map +1 -1
- package/dist/components/motion/popover.js +12 -7
- package/dist/components/motion/popover.js.map +1 -1
- package/dist/components/motion/prediction-market-card.d.ts +0 -2
- package/dist/components/motion/prediction-market-card.d.ts.map +1 -1
- package/dist/components/motion/prediction-market-card.js +14 -15
- package/dist/components/motion/prediction-market-card.js.map +1 -1
- package/dist/components/motion/prediction-market.d.ts +0 -2
- package/dist/components/motion/prediction-market.d.ts.map +1 -1
- package/dist/components/motion/prediction-market.js +17 -18
- package/dist/components/motion/prediction-market.js.map +1 -1
- package/dist/components/motion/preview-rail.d.ts +0 -2
- package/dist/components/motion/preview-rail.d.ts.map +1 -1
- package/dist/components/motion/preview-rail.js +5 -6
- package/dist/components/motion/preview-rail.js.map +1 -1
- package/dist/components/motion/project-folder.d.ts +0 -2
- package/dist/components/motion/project-folder.d.ts.map +1 -1
- package/dist/components/motion/project-folder.js +14 -15
- package/dist/components/motion/project-folder.js.map +1 -1
- package/dist/components/motion/pull-to-refresh.d.ts +0 -2
- package/dist/components/motion/pull-to-refresh.d.ts.map +1 -1
- package/dist/components/motion/pull-to-refresh.js +3 -4
- package/dist/components/motion/pull-to-refresh.js.map +1 -1
- package/dist/components/motion/radio.d.ts +5 -3
- package/dist/components/motion/radio.d.ts.map +1 -1
- package/dist/components/motion/radio.js +57 -10
- package/dist/components/motion/radio.js.map +1 -1
- package/dist/components/motion/range-slider-bubble.d.ts +0 -2
- package/dist/components/motion/range-slider-bubble.d.ts.map +1 -1
- package/dist/components/motion/range-slider-bubble.js +7 -8
- package/dist/components/motion/range-slider-bubble.js.map +1 -1
- package/dist/components/motion/range-slider-fluid.d.ts +0 -2
- package/dist/components/motion/range-slider-fluid.d.ts.map +1 -1
- package/dist/components/motion/range-slider-fluid.js +6 -7
- package/dist/components/motion/range-slider-fluid.js.map +1 -1
- package/dist/components/motion/range-slider-inline.d.ts +0 -2
- package/dist/components/motion/range-slider-inline.d.ts.map +1 -1
- package/dist/components/motion/range-slider-inline.js +9 -10
- package/dist/components/motion/range-slider-inline.js.map +1 -1
- package/dist/components/motion/range-slider-ruler.d.ts +0 -2
- package/dist/components/motion/range-slider-ruler.d.ts.map +1 -1
- package/dist/components/motion/range-slider-ruler.js +7 -8
- package/dist/components/motion/range-slider-ruler.js.map +1 -1
- package/dist/components/motion/range-slider-wave.d.ts +0 -2
- package/dist/components/motion/range-slider-wave.d.ts.map +1 -1
- package/dist/components/motion/range-slider-wave.js +2 -3
- package/dist/components/motion/range-slider-wave.js.map +1 -1
- package/dist/components/motion/range-slider.d.ts +0 -2
- package/dist/components/motion/range-slider.d.ts.map +1 -1
- package/dist/components/motion/range-slider.js +5 -6
- package/dist/components/motion/range-slider.js.map +1 -1
- package/dist/components/motion/scroll-progress.d.ts +0 -2
- package/dist/components/motion/scroll-progress.d.ts.map +1 -1
- package/dist/components/motion/scroll-progress.js +2 -3
- package/dist/components/motion/scroll-progress.js.map +1 -1
- package/dist/components/motion/scroll-reveal.d.ts +0 -2
- package/dist/components/motion/scroll-reveal.d.ts.map +1 -1
- package/dist/components/motion/scroll-reveal.js +1 -2
- package/dist/components/motion/scroll-to.d.ts +0 -2
- package/dist/components/motion/scroll-to.d.ts.map +1 -1
- package/dist/components/motion/scroll-to.js +1 -2
- package/dist/components/motion/select-morph.d.ts +1 -3
- package/dist/components/motion/select-morph.d.ts.map +1 -1
- package/dist/components/motion/select-morph.js +95 -28
- package/dist/components/motion/select-morph.js.map +1 -1
- package/dist/components/motion/select.d.ts +0 -2
- package/dist/components/motion/select.d.ts.map +1 -1
- package/dist/components/motion/select.js +155 -138
- package/dist/components/motion/select.js.map +1 -1
- package/dist/components/motion/shader-background.d.ts +3 -4
- package/dist/components/motion/shader-background.d.ts.map +1 -1
- package/dist/components/motion/shader-background.js +10 -5
- package/dist/components/motion/shader-background.js.map +1 -1
- package/dist/components/motion/shared-layout-bg.d.ts +0 -2
- package/dist/components/motion/shared-layout-bg.d.ts.map +1 -1
- package/dist/components/motion/shared-layout-bg.js +19 -6
- package/dist/components/motion/shared-layout-bg.js.map +1 -1
- package/dist/components/motion/signup-form.d.ts +0 -2
- package/dist/components/motion/signup-form.d.ts.map +1 -1
- package/dist/components/motion/signup-form.js +8 -9
- package/dist/components/motion/signup-form.js.map +1 -1
- package/dist/components/motion/slide-action-button.d.ts +0 -2
- package/dist/components/motion/slide-action-button.d.ts.map +1 -1
- package/dist/components/motion/slide-action-button.js +6 -7
- package/dist/components/motion/slide-action-button.js.map +1 -1
- package/dist/components/motion/smooth-scroll.d.ts +0 -2
- package/dist/components/motion/smooth-scroll.d.ts.map +1 -1
- package/dist/components/motion/smooth-scroll.js +1 -2
- package/dist/components/motion/sortable-list.d.ts +0 -2
- package/dist/components/motion/sortable-list.d.ts.map +1 -1
- package/dist/components/motion/sortable-list.js +4 -5
- package/dist/components/motion/sortable-list.js.map +1 -1
- package/dist/components/motion/swap/controls.d.ts +1 -3
- package/dist/components/motion/swap/controls.d.ts.map +1 -1
- package/dist/components/motion/swap/controls.js +9 -10
- package/dist/components/motion/swap/controls.js.map +1 -1
- package/dist/components/motion/swap/field.d.ts +1 -3
- package/dist/components/motion/swap/field.d.ts.map +1 -1
- package/dist/components/motion/swap/field.js +12 -13
- package/dist/components/motion/swap/field.js.map +1 -1
- package/dist/components/motion/swap/quote-row.d.ts +1 -3
- package/dist/components/motion/swap/quote-row.d.ts.map +1 -1
- package/dist/components/motion/swap/quote-row.js +8 -9
- package/dist/components/motion/swap/quote-row.js.map +1 -1
- package/dist/components/motion/swap/token-badges.d.ts +1 -3
- package/dist/components/motion/swap/token-badges.d.ts.map +1 -1
- package/dist/components/motion/swap/token-badges.js +5 -6
- package/dist/components/motion/swap/token-badges.js.map +1 -1
- package/dist/components/motion/swap/token-picker.d.ts +1 -3
- package/dist/components/motion/swap/token-picker.d.ts.map +1 -1
- package/dist/components/motion/swap/token-picker.js +18 -19
- package/dist/components/motion/swap/token-picker.js.map +1 -1
- package/dist/components/motion/swap.d.ts +2 -4
- package/dist/components/motion/swap.d.ts.map +1 -1
- package/dist/components/motion/swap.js +7 -9
- package/dist/components/motion/swap.js.map +1 -1
- package/dist/components/motion/swipeable-list.d.ts +0 -2
- package/dist/components/motion/swipeable-list.d.ts.map +1 -1
- package/dist/components/motion/swipeable-list.js +69 -13
- package/dist/components/motion/swipeable-list.js.map +1 -1
- package/dist/components/motion/switch.d.ts +0 -2
- package/dist/components/motion/switch.d.ts.map +1 -1
- package/dist/components/motion/switch.js +4 -5
- package/dist/components/motion/switch.js.map +1 -1
- package/dist/components/motion/table/editable-cell.d.ts +0 -2
- package/dist/components/motion/table/editable-cell.d.ts.map +1 -1
- package/dist/components/motion/table/editable-cell.js +2 -3
- package/dist/components/motion/table/editable-cell.js.map +1 -1
- package/dist/components/motion/table/index.d.ts +1 -3
- package/dist/components/motion/table/index.d.ts.map +1 -1
- package/dist/components/motion/table/index.js +9 -14
- package/dist/components/motion/table/index.js.map +1 -1
- package/dist/components/motion/table/row-handle.d.ts +0 -2
- package/dist/components/motion/table/row-handle.d.ts.map +1 -1
- package/dist/components/motion/table/row-handle.js +1 -2
- package/dist/components/motion/table/skeleton-rows.d.ts +1 -3
- package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -1
- package/dist/components/motion/table/skeleton-rows.js +3 -4
- package/dist/components/motion/table/skeleton-rows.js.map +1 -1
- package/dist/components/motion/table/table-header.d.ts +1 -3
- package/dist/components/motion/table/table-header.d.ts.map +1 -1
- package/dist/components/motion/table/table-header.js +9 -10
- package/dist/components/motion/table/table-header.js.map +1 -1
- package/dist/components/motion/table/table-menu.d.ts +0 -2
- package/dist/components/motion/table/table-menu.d.ts.map +1 -1
- package/dist/components/motion/table/table-menu.js +2 -3
- package/dist/components/motion/table/table-menu.js.map +1 -1
- package/dist/components/motion/tabs.d.ts +12 -5
- package/dist/components/motion/tabs.d.ts.map +1 -1
- package/dist/components/motion/tabs.js +258 -37
- package/dist/components/motion/tabs.js.map +1 -1
- package/dist/components/motion/text-cascade.d.ts +0 -2
- package/dist/components/motion/text-cascade.d.ts.map +1 -1
- package/dist/components/motion/text-cascade.js +1 -2
- package/dist/components/motion/text-reveal.d.ts +0 -2
- package/dist/components/motion/text-reveal.d.ts.map +1 -1
- package/dist/components/motion/text-reveal.js +1 -2
- package/dist/components/motion/text-scramble.d.ts +0 -2
- package/dist/components/motion/text-scramble.d.ts.map +1 -1
- package/dist/components/motion/text-scramble.js +1 -2
- package/dist/components/motion/text-shimmer.d.ts +0 -2
- package/dist/components/motion/text-shimmer.d.ts.map +1 -1
- package/dist/components/motion/text-shimmer.js +1 -2
- package/dist/components/motion/theme-toggle.d.ts +0 -2
- package/dist/components/motion/theme-toggle.d.ts.map +1 -1
- package/dist/components/motion/theme-toggle.js +2 -3
- package/dist/components/motion/tilt-card.d.ts +0 -2
- package/dist/components/motion/tilt-card.d.ts.map +1 -1
- package/dist/components/motion/tilt-card.js +1 -2
- package/dist/components/motion/timeline.d.ts +37 -0
- package/dist/components/motion/timeline.d.ts.map +1 -0
- package/dist/components/motion/timeline.js +483 -0
- package/dist/components/motion/timeline.js.map +1 -0
- package/dist/components/motion/tooltip/positioner.d.ts +1 -3
- package/dist/components/motion/tooltip/positioner.d.ts.map +1 -1
- package/dist/components/motion/tooltip/positioner.js +1 -1
- package/dist/components/motion/tooltip-surface.d.ts +0 -2
- package/dist/components/motion/tooltip-surface.d.ts.map +1 -1
- package/dist/components/motion/tooltip-surface.js +2 -3
- package/dist/components/motion/tooltip-surface.js.map +1 -1
- package/dist/components/motion/tooltip.d.ts +1 -3
- package/dist/components/motion/tooltip.d.ts.map +1 -1
- package/dist/components/motion/tooltip.js +1 -1
- package/dist/components/motion/wallet-card/account-avatar.d.ts +1 -3
- package/dist/components/motion/wallet-card/account-avatar.d.ts.map +1 -1
- package/dist/components/motion/wallet-card/account-avatar.js +1 -1
- package/dist/components/motion/wallet-card/account-switcher.d.ts +1 -3
- package/dist/components/motion/wallet-card/account-switcher.d.ts.map +1 -1
- package/dist/components/motion/wallet-card/account-switcher.js +10 -11
- package/dist/components/motion/wallet-card/account-switcher.js.map +1 -1
- package/dist/components/motion/wallet-card/actions.d.ts +0 -2
- package/dist/components/motion/wallet-card/actions.d.ts.map +1 -1
- package/dist/components/motion/wallet-card/actions.js +3 -4
- package/dist/components/motion/wallet-card/actions.js.map +1 -1
- package/dist/components/motion/wallet-card/balance-delta.d.ts +0 -2
- package/dist/components/motion/wallet-card/balance-delta.d.ts.map +1 -1
- package/dist/components/motion/wallet-card/balance-delta.js +2 -3
- package/dist/components/motion/wallet-card/balance-delta.js.map +1 -1
- package/dist/components/motion/wallet-card/copy-button.d.ts +0 -2
- package/dist/components/motion/wallet-card/copy-button.d.ts.map +1 -1
- package/dist/components/motion/wallet-card/copy-button.js +2 -3
- package/dist/components/motion/wallet-card/copy-button.js.map +1 -1
- package/dist/components/motion/wallet-card/index.d.ts +1 -3
- package/dist/components/motion/wallet-card/index.d.ts.map +1 -1
- package/dist/components/motion/wallet-card/index.js +6 -7
- package/dist/components/motion/wallet-card/index.js.map +1 -1
- package/dist/components/motion/wallet-card/search-bar.d.ts +0 -2
- package/dist/components/motion/wallet-card/search-bar.d.ts.map +1 -1
- package/dist/components/motion/wallet-card/search-bar.js +9 -10
- package/dist/components/motion/wallet-card/search-bar.js.map +1 -1
- package/dist/components/motion/wheel-picker.d.ts +0 -2
- package/dist/components/motion/wheel-picker.d.ts.map +1 -1
- package/dist/components/motion/wheel-picker.js +11 -12
- package/dist/components/motion/wheel-picker.js.map +1 -1
- package/dist/components/reui/alert.d.ts +1 -3
- package/dist/components/reui/alert.d.ts.map +1 -1
- package/dist/components/reui/alert.js +2 -3
- package/dist/components/reui/alert.js.map +1 -1
- package/dist/components/reui/autocomplete.d.ts +1 -3
- package/dist/components/reui/autocomplete.d.ts.map +1 -1
- package/dist/components/reui/autocomplete.js +12 -13
- package/dist/components/reui/autocomplete.js.map +1 -1
- package/dist/components/reui/badge.d.ts +2 -4
- package/dist/components/reui/badge.d.ts.map +1 -1
- package/dist/components/reui/badge.js +5 -6
- package/dist/components/reui/badge.js.map +1 -1
- package/dist/components/reui/cascader/cascader-async.d.ts +21 -7
- package/dist/components/reui/cascader/cascader-async.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-async.js +62 -36
- package/dist/components/reui/cascader/cascader-async.js.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.d.ts +0 -2
- package/dist/components/reui/cascader/cascader-columns.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.js +8 -6
- package/dist/components/reui/cascader/cascader-columns.js.map +1 -1
- package/dist/components/reui/cascader/cascader-context.d.ts +3 -3
- package/dist/components/reui/cascader/cascader-context.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-context.js +1 -2
- package/dist/components/reui/cascader/cascader-context.js.map +1 -1
- package/dist/components/reui/cascader/cascader-footer.d.ts +0 -2
- package/dist/components/reui/cascader/cascader-footer.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-footer.js +6 -7
- package/dist/components/reui/cascader/cascader-footer.js.map +1 -1
- package/dist/components/reui/cascader/cascader-i18n.d.ts +1 -3
- package/dist/components/reui/cascader/cascader-i18n.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-i18n.js +1 -2
- package/dist/components/reui/cascader/cascader-item.d.ts +1 -3
- package/dist/components/reui/cascader/cascader-item.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-item.js +10 -11
- package/dist/components/reui/cascader/cascader-item.js.map +1 -1
- package/dist/components/reui/cascader/cascader-lib.d.ts +34 -10
- package/dist/components/reui/cascader/cascader-lib.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-lib.js +146 -31
- package/dist/components/reui/cascader/cascader-lib.js.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.d.ts +1 -3
- package/dist/components/reui/cascader/cascader-nav.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.js +10 -11
- package/dist/components/reui/cascader/cascader-nav.js.map +1 -1
- package/dist/components/reui/cascader/cascader-types.d.ts +1 -1
- package/dist/components/reui/cascader/cascader-virtual.d.ts +0 -2
- package/dist/components/reui/cascader/cascader-virtual.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-virtual.js +1 -2
- package/dist/components/reui/cascader/cascader.d.ts +13 -10
- package/dist/components/reui/cascader/cascader.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader.js +36 -24
- package/dist/components/reui/cascader/cascader.js.map +1 -1
- package/dist/components/reui/code-block/code-block-highlight.d.ts +0 -2
- package/dist/components/reui/code-block/code-block-highlight.d.ts.map +1 -1
- package/dist/components/reui/code-block/code-block-highlight.js +1 -2
- package/dist/components/reui/code-block/code-block.d.ts +0 -2
- package/dist/components/reui/code-block/code-block.d.ts.map +1 -1
- package/dist/components/reui/code-block/code-block.js +13 -14
- package/dist/components/reui/code-block/code-block.js.map +1 -1
- package/dist/components/reui/color-picker.d.ts +0 -2
- package/dist/components/reui/color-picker.d.ts.map +1 -1
- package/dist/components/reui/color-picker.js +4 -5
- package/dist/components/reui/color-picker.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts +0 -2
- package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-cell-selection.js +4 -4
- package/dist/components/reui/data-grid/data-grid-cell-selection.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.d.ts +0 -2
- package/dist/components/reui/data-grid/data-grid-column-filter.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js +8 -8
- 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 +6 -10
- 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 +14 -16
- package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts +0 -2
- package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-visibility.js +2 -2
- package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-i18n.d.ts +1 -1
- package/dist/components/reui/data-grid/data-grid-i18n.js +1 -2
- package/dist/components/reui/data-grid/data-grid-pagination.d.ts +0 -2
- package/dist/components/reui/data-grid/data-grid-pagination.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js +3 -3
- package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts +0 -2
- package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.js +3 -3
- package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts +0 -2
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +5 -5
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts +0 -2
- package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.js +5 -4
- package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +0 -2
- package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js +4 -4
- package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.d.ts +6 -13
- package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js +42 -43
- package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid.d.ts +17 -4
- package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid.js +82 -25
- package/dist/components/reui/data-grid/data-grid.js.map +1 -1
- package/dist/components/reui/date-selector.d.ts +0 -2
- package/dist/components/reui/date-selector.d.ts.map +1 -1
- package/dist/components/reui/date-selector.js +25 -20
- package/dist/components/reui/date-selector.js.map +1 -1
- package/dist/components/reui/emoji-picker.d.ts +0 -2
- package/dist/components/reui/emoji-picker.d.ts.map +1 -1
- package/dist/components/reui/emoji-picker.js +6 -7
- package/dist/components/reui/emoji-picker.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.d.ts +0 -2
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +8 -11
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-content.d.ts +0 -2
- package/dist/components/reui/event-calendar/event-calendar-content.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-content.js +1 -2
- package/dist/components/reui/event-calendar/event-calendar-dnd.d.ts +0 -2
- package/dist/components/reui/event-calendar/event-calendar-dnd.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-dnd.js +4 -5
- package/dist/components/reui/event-calendar/event-calendar-dnd.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.d.ts +0 -2
- package/dist/components/reui/event-calendar/event-calendar-event.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js +7 -8
- package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts +0 -2
- package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-i18n.js +1 -2
- package/dist/components/reui/event-calendar/event-calendar-lib.d.ts +3 -2
- package/dist/components/reui/event-calendar/event-calendar-lib.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-lib.js +13 -7
- package/dist/components/reui/event-calendar/event-calendar-lib.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts +0 -2
- package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-month-view.js +10 -11
- package/dist/components/reui/event-calendar/event-calendar-month-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.d.ts +0 -2
- package/dist/components/reui/event-calendar/event-calendar-nav.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +7 -8
- package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-recurrence.d.ts +0 -2
- package/dist/components/reui/event-calendar/event-calendar-recurrence.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-recurrence.js +1 -2
- package/dist/components/reui/event-calendar/event-calendar-resource-view.d.ts +0 -2
- package/dist/components/reui/event-calendar/event-calendar-resource-view.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-resource-view.js +4 -5
- package/dist/components/reui/event-calendar/event-calendar-resource-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts +0 -2
- package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js +9 -10
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-types.d.ts +0 -2
- package/dist/components/reui/event-calendar/event-calendar-types.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.d.ts +0 -2
- package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.js +35 -33
- package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
- package/dist/components/reui/file-type.d.ts +302 -8
- package/dist/components/reui/file-type.d.ts.map +1 -1
- package/dist/components/reui/file-type.js +423 -21
- package/dist/components/reui/file-type.js.map +1 -1
- package/dist/components/reui/filters/filters-advanced.d.ts +0 -2
- package/dist/components/reui/filters/filters-advanced.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-advanced.js +15 -16
- package/dist/components/reui/filters/filters-advanced.js.map +1 -1
- package/dist/components/reui/filters/filters-builder.d.ts +1 -3
- package/dist/components/reui/filters/filters-builder.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-builder.js +1 -2
- package/dist/components/reui/filters/filters-chip.d.ts +0 -2
- package/dist/components/reui/filters/filters-chip.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-chip.js +6 -7
- package/dist/components/reui/filters/filters-chip.js.map +1 -1
- package/dist/components/reui/filters/filters-context.d.ts +1 -3
- package/dist/components/reui/filters/filters-context.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-context.js +1 -2
- package/dist/components/reui/filters/filters-date.d.ts +0 -2
- package/dist/components/reui/filters/filters-date.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-date.js +1 -2
- package/dist/components/reui/filters/filters-dnd.d.ts +0 -2
- package/dist/components/reui/filters/filters-dnd.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-dnd.js +1 -2
- package/dist/components/reui/filters/filters-draft.d.ts +1 -1
- package/dist/components/reui/filters/filters-draft.js +1 -2
- package/dist/components/reui/filters/filters-editors.d.ts +0 -2
- package/dist/components/reui/filters/filters-editors.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-editors.js +5 -6
- package/dist/components/reui/filters/filters-editors.js.map +1 -1
- package/dist/components/reui/filters/filters-i18n.d.ts +0 -2
- package/dist/components/reui/filters/filters-i18n.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-i18n.js +1 -2
- package/dist/components/reui/filters/filters-lib.d.ts +1 -3
- package/dist/components/reui/filters/filters-lib.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-lib.js +1 -2
- package/dist/components/reui/filters/filters-operators.d.ts +0 -2
- package/dist/components/reui/filters/filters-operators.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-operators.js +1 -2
- package/dist/components/reui/filters/filters-query.d.ts +0 -2
- package/dist/components/reui/filters/filters-query.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-query.js +1 -2
- package/dist/components/reui/filters/filters-types.d.ts +0 -2
- package/dist/components/reui/filters/filters-types.d.ts.map +1 -1
- package/dist/components/reui/filters/filters.d.ts +0 -2
- package/dist/components/reui/filters/filters.d.ts.map +1 -1
- package/dist/components/reui/filters/filters.js +1 -2
- package/dist/components/reui/frame.d.ts +1 -3
- package/dist/components/reui/frame.d.ts.map +1 -1
- package/dist/components/reui/frame.js +5 -6
- package/dist/components/reui/frame.js.map +1 -1
- package/dist/components/reui/gantt/gantt-bar.d.ts +0 -2
- package/dist/components/reui/gantt/gantt-bar.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt-bar.js +9 -10
- package/dist/components/reui/gantt/gantt-bar.js.map +1 -1
- package/dist/components/reui/gantt/gantt-dnd.d.ts +0 -2
- package/dist/components/reui/gantt/gantt-dnd.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt-dnd.js +1 -2
- package/dist/components/reui/gantt/gantt-i18n.d.ts +0 -2
- package/dist/components/reui/gantt/gantt-i18n.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt-i18n.js +1 -2
- package/dist/components/reui/gantt/gantt-lib.d.ts +0 -2
- package/dist/components/reui/gantt/gantt-lib.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt-lib.js +1 -2
- package/dist/components/reui/gantt/gantt-nav.d.ts +0 -2
- package/dist/components/reui/gantt/gantt-nav.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +6 -7
- package/dist/components/reui/gantt/gantt-nav.js.map +1 -1
- package/dist/components/reui/gantt/gantt-recurrence.d.ts +0 -2
- package/dist/components/reui/gantt/gantt-recurrence.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt-recurrence.js +1 -2
- package/dist/components/reui/gantt/gantt-types.d.ts +0 -2
- package/dist/components/reui/gantt/gantt-types.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt-view.d.ts +0 -2
- package/dist/components/reui/gantt/gantt-view.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt-view.js +48 -49
- package/dist/components/reui/gantt/gantt-view.js.map +1 -1
- package/dist/components/reui/gantt/gantt.d.ts +0 -2
- package/dist/components/reui/gantt/gantt.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt.js +7 -5
- package/dist/components/reui/gantt/gantt.js.map +1 -1
- package/dist/components/reui/icon-stack.d.ts +0 -2
- package/dist/components/reui/icon-stack.d.ts.map +1 -1
- package/dist/components/reui/icon-stack.js +3 -4
- package/dist/components/reui/icon-stack.js.map +1 -1
- package/dist/components/reui/icon-tile.d.ts +2 -4
- package/dist/components/reui/icon-tile.d.ts.map +1 -1
- package/dist/components/reui/icon-tile.js +7 -8
- package/dist/components/reui/icon-tile.js.map +1 -1
- package/dist/components/reui/kanban.d.ts +0 -2
- package/dist/components/reui/kanban.d.ts.map +1 -1
- package/dist/components/reui/kanban.js +2 -3
- package/dist/components/reui/kanban.js.map +1 -1
- package/dist/components/reui/number-field.d.ts +3 -5
- package/dist/components/reui/number-field.d.ts.map +1 -1
- package/dist/components/reui/number-field.js +3 -4
- package/dist/components/reui/number-field.js.map +1 -1
- package/dist/components/reui/phone-input.d.ts +0 -2
- package/dist/components/reui/phone-input.d.ts.map +1 -1
- package/dist/components/reui/phone-input.js +33 -31
- package/dist/components/reui/phone-input.js.map +1 -1
- package/dist/components/reui/rating.d.ts +1 -3
- package/dist/components/reui/rating.d.ts.map +1 -1
- package/dist/components/reui/rating.js +2 -3
- package/dist/components/reui/rating.js.map +1 -1
- package/dist/components/reui/scrollspy.d.ts +0 -2
- package/dist/components/reui/scrollspy.d.ts.map +1 -1
- package/dist/components/reui/scrollspy.js +1 -2
- package/dist/components/reui/signature-pad.d.ts +0 -2
- package/dist/components/reui/signature-pad.d.ts.map +1 -1
- package/dist/components/reui/signature-pad.js +4 -5
- package/dist/components/reui/signature-pad.js.map +1 -1
- package/dist/components/reui/sortable.d.ts +0 -2
- package/dist/components/reui/sortable.d.ts.map +1 -1
- package/dist/components/reui/sortable.js +1 -2
- package/dist/components/reui/stepper.d.ts +0 -2
- package/dist/components/reui/stepper.d.ts.map +1 -1
- package/dist/components/reui/stepper.js +6 -7
- package/dist/components/reui/stepper.js.map +1 -1
- package/dist/components/reui/time-picker.d.ts +0 -2
- package/dist/components/reui/time-picker.d.ts.map +1 -1
- package/dist/components/reui/time-picker.js +2 -3
- package/dist/components/reui/time-picker.js.map +1 -1
- package/dist/components/reui/timeline.d.ts +0 -2
- package/dist/components/reui/timeline.d.ts.map +1 -1
- package/dist/components/reui/timeline.js +6 -7
- package/dist/components/reui/timeline.js.map +1 -1
- package/dist/components/reui/tree.d.ts +0 -2
- package/dist/components/reui/tree.d.ts.map +1 -1
- package/dist/components/reui/tree.js +7 -8
- package/dist/components/reui/tree.js.map +1 -1
- package/dist/components/ui/accordion.d.ts +0 -2
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +4 -5
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +0 -2
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +7 -8
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts +0 -2
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +4 -5
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.d.ts +0 -2
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -2
- package/dist/components/ui/attachment.d.ts +3 -5
- package/dist/components/ui/attachment.d.ts.map +1 -1
- package/dist/components/ui/attachment.js +10 -11
- package/dist/components/ui/attachment.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +0 -2
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +6 -7
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.d.ts +1 -3
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +2 -3
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +0 -2
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +4 -5
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble.d.ts +1 -3
- package/dist/components/ui/bubble.d.ts.map +1 -1
- package/dist/components/ui/bubble.js +6 -7
- package/dist/components/ui/bubble.js.map +1 -1
- package/dist/components/ui/button-group.d.ts +1 -3
- package/dist/components/ui/button-group.d.ts.map +1 -1
- package/dist/components/ui/button-group.js +3 -4
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button.d.ts +2 -4
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +7 -8
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.d.ts +0 -2
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +14 -15
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts +0 -2
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +4 -5
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.d.ts +0 -2
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +1 -2
- package/dist/components/ui/chart.d.ts +0 -2
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +6 -7
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts +0 -2
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +2 -3
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/code-block.d.ts +27 -0
- package/dist/components/ui/code-block.d.ts.map +1 -0
- package/dist/components/ui/code-block.js +123 -0
- package/dist/components/ui/code-block.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +0 -2
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +1 -2
- package/dist/components/ui/combobox.d.ts +0 -2
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox.js +9 -10
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/command.d.ts +0 -2
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +8 -9
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +0 -2
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +9 -10
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +0 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +6 -7
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +0 -2
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +7 -8
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +0 -2
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +10 -11
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/empty.d.ts +1 -3
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +6 -7
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/field.d.ts +1 -3
- package/dist/components/ui/field.d.ts.map +1 -1
- package/dist/components/ui/field.js +8 -9
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts +0 -2
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +2 -3
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.d.ts +1 -3
- package/dist/components/ui/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group.js +4 -5
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-otp.d.ts +0 -2
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +4 -5
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts +0 -2
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +2 -3
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.d.ts +2 -4
- package/dist/components/ui/item.d.ts.map +1 -1
- package/dist/components/ui/item.js +6 -7
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/kbd.d.ts +0 -2
- package/dist/components/ui/kbd.d.ts.map +1 -1
- package/dist/components/ui/kbd.js +2 -3
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/label.d.ts +0 -2
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +2 -3
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/marker.d.ts +1 -3
- package/dist/components/ui/marker.d.ts.map +1 -1
- package/dist/components/ui/marker.js +4 -5
- package/dist/components/ui/marker.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +0 -2
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +11 -12
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/message-scroller.d.ts +0 -2
- package/dist/components/ui/message-scroller.d.ts.map +1 -1
- package/dist/components/ui/message-scroller.js +3 -4
- package/dist/components/ui/message-scroller.js.map +1 -1
- package/dist/components/ui/message.d.ts +0 -2
- package/dist/components/ui/message.d.ts.map +1 -1
- package/dist/components/ui/message.js +5 -6
- package/dist/components/ui/message.js.map +1 -1
- package/dist/components/ui/native-select.d.ts +0 -2
- package/dist/components/ui/native-select.d.ts.map +1 -1
- package/dist/components/ui/native-select.js +3 -4
- package/dist/components/ui/native-select.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +0 -2
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +7 -8
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.d.ts +0 -2
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +1 -2
- package/dist/components/ui/popover.d.ts +0 -2
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +2 -3
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts +0 -2
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +5 -6
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/questionnaire.d.ts +0 -2
- package/dist/components/ui/questionnaire.d.ts.map +1 -1
- package/dist/components/ui/questionnaire.js +10 -11
- package/dist/components/ui/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts +0 -2
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +3 -4
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +0 -2
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +3 -4
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +0 -2
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +4 -5
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts +0 -2
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +9 -10
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.d.ts +0 -2
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +2 -3
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +0 -2
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +3 -4
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -3
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +19 -20
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.d.ts +0 -2
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +2 -3
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.d.ts +0 -2
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +6 -7
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/spinner.d.ts +0 -2
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner.js +1 -2
- package/dist/components/ui/switch.d.ts +0 -2
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +3 -4
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts +0 -2
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +6 -7
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +0 -2
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +3 -4
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.d.ts +0 -2
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +2 -3
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toast.d.ts +0 -2
- package/dist/components/ui/toast.d.ts.map +1 -1
- package/dist/components/ui/toast.js +5 -6
- package/dist/components/ui/toast.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +0 -2
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +2 -3
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +1 -3
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +3 -4
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts +0 -2
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +3 -4
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/trace.d.ts +19 -0
- package/dist/components/ui/trace.d.ts.map +1 -0
- package/dist/components/ui/trace.js +76 -0
- package/dist/components/ui/trace.js.map +1 -0
- package/dist/{constants-CsKm9sSk.js → constants-evLzfUhL.js} +2 -3
- package/dist/{constants-CsKm9sSk.js.map → constants-evLzfUhL.js.map} +1 -1
- package/dist/{context-tTdLKYNf.js → context-3i2_6ly8.js} +2 -4
- package/dist/{context-tTdLKYNf.js.map → context-3i2_6ly8.js.map} +1 -1
- package/dist/{context-3_vY1jbv.js → context-C5TW-k6u.js} +3 -5
- package/dist/{context-3_vY1jbv.js.map → context-C5TW-k6u.js.map} +1 -1
- package/dist/{context-BE60udRT.js → context-CXlD0FcC.js} +2 -3
- package/dist/{context-BE60udRT.js.map → context-CXlD0FcC.js.map} +1 -1
- package/dist/{context-Rl5VCYA8.js → context-ChsuSih6.js} +3 -5
- package/dist/{context-Rl5VCYA8.js.map → context-ChsuSih6.js.map} +1 -1
- package/dist/{context-BYXeJQnz.d.ts → context-D-juVNr2.d.ts} +1 -5
- package/dist/context-D-juVNr2.d.ts.map +1 -0
- package/dist/{context-BqjZ1Z_w.js → context-DUx44mGi.js} +3 -5
- package/dist/{context-BqjZ1Z_w.js.map → context-DUx44mGi.js.map} +1 -1
- package/dist/{context-Bc6VC1HA.js → context-DWXNECDe.js} +3 -5
- package/dist/{context-Bc6VC1HA.js.map → context-DWXNECDe.js.map} +1 -1
- package/dist/{context-sD8DQga-.js → context-DdnKlMjE.js} +3 -5
- package/dist/{context-sD8DQga-.js.map → context-DdnKlMjE.js.map} +1 -1
- package/dist/{context-Cn-00gfW.js → context-Dk6C9IvC.js} +3 -5
- package/dist/{context-Cn-00gfW.js.map → context-Dk6C9IvC.js.map} +1 -1
- package/dist/{context-CZfRKkcZ.js → context-i6Dwvi3T.js} +3 -5
- package/dist/{context-CZfRKkcZ.js.map → context-i6Dwvi3T.js.map} +1 -1
- package/dist/{context-Cnlo53sV.d.ts → context-mjP5wifG.d.ts} +1 -5
- package/dist/context-mjP5wifG.d.ts.map +1 -0
- package/dist/{copy-menu-BXUh52bu.js → copy-menu-CKW3jM1J.js} +9 -11
- package/dist/{copy-menu-BXUh52bu.js.map → copy-menu-CKW3jM1J.js.map} +1 -1
- package/dist/{data-grid-i18n-TQR2PZlU.d.ts → data-grid-i18n-BySPLTBy.d.ts} +1 -3
- package/dist/data-grid-i18n-BySPLTBy.d.ts.map +1 -0
- package/dist/{ease-B82HVmio.d.ts → ease-CHhXKlG3.d.ts} +1 -3
- package/dist/ease-CHhXKlG3.d.ts.map +1 -0
- package/dist/{filters-draft-DEAl3TO-.d.ts → filters-draft-COwwppZX.d.ts} +1 -3
- package/dist/filters-draft-COwwppZX.d.ts.map +1 -0
- package/dist/hooks/use-body-classes.d.ts +0 -2
- package/dist/hooks/use-body-classes.d.ts.map +1 -1
- package/dist/hooks/use-body-classes.js +1 -2
- package/dist/hooks/use-copy-to-clipboard.d.ts +0 -2
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -1
- package/dist/hooks/use-copy-to-clipboard.js +1 -2
- package/dist/hooks/use-dismiss.d.ts +0 -2
- package/dist/hooks/use-dismiss.d.ts.map +1 -1
- package/dist/hooks/use-dismiss.js +1 -2
- package/dist/hooks/use-favicon.d.ts +0 -2
- package/dist/hooks/use-favicon.d.ts.map +1 -1
- package/dist/hooks/use-favicon.js +1 -2
- package/dist/hooks/use-file-upload.d.ts +0 -2
- package/dist/hooks/use-file-upload.d.ts.map +1 -1
- package/dist/hooks/use-file-upload.js +2 -3
- package/dist/hooks/use-file-upload.js.map +1 -1
- package/dist/hooks/use-focus-trap.d.ts +20 -0
- package/dist/hooks/use-focus-trap.d.ts.map +1 -0
- package/dist/hooks/use-focus-trap.js +79 -0
- package/dist/hooks/use-focus-trap.js.map +1 -0
- package/dist/hooks/use-highlighted-code.d.ts +3 -0
- package/dist/hooks/use-highlighted-code.d.ts.map +1 -0
- package/dist/hooks/use-highlighted-code.js +126 -0
- package/dist/hooks/use-highlighted-code.js.map +1 -0
- package/dist/hooks/use-hover-capable.d.ts +0 -2
- package/dist/hooks/use-hover-capable.d.ts.map +1 -1
- package/dist/hooks/use-hover-capable.js +1 -2
- package/dist/hooks/use-hover-gesture.d.ts +0 -2
- package/dist/hooks/use-hover-gesture.d.ts.map +1 -1
- package/dist/hooks/use-hover-gesture.js +1 -2
- package/dist/hooks/use-hydrated.d.ts +0 -2
- package/dist/hooks/use-hydrated.d.ts.map +1 -1
- package/dist/hooks/use-hydrated.js +1 -2
- package/dist/hooks/use-intersection-observer.d.ts +0 -2
- package/dist/hooks/use-intersection-observer.d.ts.map +1 -1
- package/dist/hooks/use-intersection-observer.js +1 -2
- package/dist/hooks/use-is-mac.d.ts +0 -2
- package/dist/hooks/use-is-mac.d.ts.map +1 -1
- package/dist/hooks/use-is-mac.js +1 -2
- package/dist/hooks/use-listbox.d.ts +27 -0
- package/dist/hooks/use-listbox.d.ts.map +1 -0
- package/dist/hooks/use-listbox.js +74 -0
- package/dist/hooks/use-listbox.js.map +1 -0
- package/dist/hooks/use-media-query.d.ts +0 -2
- package/dist/hooks/use-media-query.d.ts.map +1 -1
- package/dist/hooks/use-media-query.js +1 -2
- package/dist/hooks/use-meta-color.d.ts +0 -2
- package/dist/hooks/use-meta-color.d.ts.map +1 -1
- package/dist/hooks/use-meta-color.js +1 -2
- package/dist/hooks/use-mobile.d.ts +0 -2
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +1 -2
- package/dist/hooks/use-modal-scope.d.ts +0 -2
- package/dist/hooks/use-modal-scope.d.ts.map +1 -1
- package/dist/hooks/use-modal-scope.js +1 -2
- package/dist/hooks/use-mutation-observer.d.ts +0 -2
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -1
- package/dist/hooks/use-mutation-observer.js +1 -2
- package/dist/hooks/use-on-open.d.ts +0 -2
- package/dist/hooks/use-on-open.d.ts.map +1 -1
- package/dist/hooks/use-on-open.js +1 -2
- package/dist/hooks/use-row-cursor.d.ts +0 -2
- package/dist/hooks/use-row-cursor.d.ts.map +1 -1
- package/dist/hooks/use-row-cursor.js +2 -3
- package/dist/hooks/use-row-cursor.js.map +1 -1
- package/dist/hooks/use-scroll-position.d.ts +0 -2
- package/dist/hooks/use-scroll-position.d.ts.map +1 -1
- package/dist/hooks/use-scroll-position.js +1 -2
- package/dist/hooks/use-slider-input.d.ts +0 -2
- package/dist/hooks/use-slider-input.d.ts.map +1 -1
- package/dist/hooks/use-slider-input.js +1 -2
- package/dist/hooks/use-slider.d.ts +0 -2
- package/dist/hooks/use-slider.d.ts.map +1 -1
- package/dist/hooks/use-slider.js +1 -2
- package/dist/hooks/use-tap-gesture.d.ts +0 -2
- package/dist/hooks/use-tap-gesture.d.ts.map +1 -1
- package/dist/hooks/use-tap-gesture.js +1 -2
- package/dist/hooks/use-touch-capable.d.ts +0 -2
- package/dist/hooks/use-touch-capable.d.ts.map +1 -1
- package/dist/hooks/use-touch-capable.js +1 -2
- package/dist/hooks/use-viewport.d.ts +0 -2
- package/dist/hooks/use-viewport.d.ts.map +1 -1
- package/dist/hooks/use-viewport.js +1 -2
- package/dist/lib/command-search.d.ts +0 -2
- package/dist/lib/command-search.d.ts.map +1 -1
- package/dist/lib/command-search.js +1 -2
- package/dist/lib/ease.d.ts +1 -1
- package/dist/lib/ease.js +1 -2
- package/dist/lib/favicon.d.ts +0 -2
- package/dist/lib/favicon.d.ts.map +1 -1
- package/dist/lib/favicon.js +1 -2
- package/dist/lib/text-shimmer.d.ts +0 -2
- package/dist/lib/text-shimmer.d.ts.map +1 -1
- package/dist/lib/text-shimmer.js +1 -2
- package/dist/lib/tick-sound.d.ts +0 -2
- package/dist/lib/tick-sound.d.ts.map +1 -1
- package/dist/lib/tick-sound.js +1 -2
- package/dist/lib/touch.d.ts +0 -2
- package/dist/lib/touch.d.ts.map +1 -1
- package/dist/lib/touch.js +1 -2
- package/dist/{model-DlbIqCZg.d.ts → model-BFZGhrnQ.d.ts} +1 -3
- package/dist/model-BFZGhrnQ.d.ts.map +1 -0
- package/dist/{model-NSIg2p7a.d.ts → model-DuAc65oe.d.ts} +1 -3
- package/dist/model-DuAc65oe.d.ts.map +1 -0
- package/dist/{model-_mRyI6V9.d.ts → model-mS4UXPwk.d.ts} +1 -3
- package/dist/model-mS4UXPwk.d.ts.map +1 -0
- package/dist/{plot-CdFTbMI_.js → plot-DAKl-Lu1.js} +6 -8
- package/dist/{plot-CdFTbMI_.js.map → plot-DAKl-Lu1.js.map} +1 -1
- package/dist/{popover-position-BUqYCq8X.js → popover-position-BaDNBZ-D.js} +2 -3
- package/dist/{popover-position-BUqYCq8X.js.map → popover-position-BaDNBZ-D.js.map} +1 -1
- package/dist/{positioner-3r3cfkqT.js → positioner-MidjIUUT.js} +3 -5
- package/dist/{positioner-3r3cfkqT.js.map → positioner-MidjIUUT.js.map} +1 -1
- package/dist/{presence-gate-BekdC4Bo.js → presence-gate-DC7yL1Ls.js} +2 -3
- package/dist/{presence-gate-BekdC4Bo.js.map → presence-gate-DC7yL1Ls.js.map} +1 -1
- package/dist/{tooltip-DQ4DXgeu.d.ts → tooltip-BVRmgnbZ.d.ts} +1 -7
- package/dist/tooltip-BVRmgnbZ.d.ts.map +1 -0
- package/dist/{tooltip-C6qUs7px.d.ts → tooltip-CMVyNolz.d.ts} +1 -5
- package/dist/tooltip-CMVyNolz.d.ts.map +1 -0
- package/dist/{tooltip-C01qUgsW.d.ts → tooltip-CNEYdIX3.d.ts} +1 -7
- package/dist/tooltip-CNEYdIX3.d.ts.map +1 -0
- package/dist/{tooltip-BqxVD6D-.d.ts → tooltip-Cq46pSJ2.d.ts} +1 -5
- package/dist/tooltip-Cq46pSJ2.d.ts.map +1 -0
- package/dist/{tooltip-Bam5KeYe.js → tooltip-CuHpilPN.js} +5 -7
- package/dist/{tooltip-Bam5KeYe.js.map → tooltip-CuHpilPN.js.map} +1 -1
- package/dist/{tooltip-BarafYiU.d.ts → tooltip-w0KptZat.d.ts} +1 -5
- package/dist/tooltip-w0KptZat.d.ts.map +1 -0
- package/dist/{types-B_6p3LXz.d.ts → types-B0d0d7PF.d.ts} +1 -3
- package/dist/types-B0d0d7PF.d.ts.map +1 -0
- package/dist/{types-Bah5NY44.d.ts → types-BB61jXS_.d.ts} +1 -3
- package/dist/types-BB61jXS_.d.ts.map +1 -0
- package/dist/{types-smkWN_7x.d.ts → types-BSMELKE5.d.ts} +1 -3
- package/dist/types-BSMELKE5.d.ts.map +1 -0
- package/dist/{types-kSZH1k8K.d.ts → types-D9hKqIzm.d.ts} +1 -3
- package/dist/types-D9hKqIzm.d.ts.map +1 -0
- package/dist/{types-D6e3gWOA.d.ts → types-qTGsGdN1.d.ts} +1 -3
- package/dist/types-qTGsGdN1.d.ts.map +1 -0
- package/dist/{use-active-option-CmX6Z-4S.js → use-active-option-DerS-wGL.js} +2 -3
- package/dist/{use-active-option-CmX6Z-4S.js.map → use-active-option-DerS-wGL.js.map} +1 -1
- package/dist/{use-geometry-CH0foIo7.d.ts → use-geometry-C84j2gUk.d.ts} +1 -3
- package/dist/use-geometry-C84j2gUk.d.ts.map +1 -0
- package/dist/{use-position-DOi1gVL0.d.ts → use-position-CWSE4wCz.d.ts} +1 -3
- package/dist/use-position-CWSE4wCz.d.ts.map +1 -0
- package/dist/{utils-B3YXTsDI.js → utils-DMrlhG6M.js} +2 -3
- package/dist/{utils-B3YXTsDI.js.map → utils-DMrlhG6M.js.map} +1 -1
- package/dist/{utils-DQ7OpbYQ.js → utils-ZRfJ78Df.js} +1 -2
- package/dist/{utils-DQ7OpbYQ.js.map → utils-ZRfJ78Df.js.map} +1 -1
- package/package.json +9 -9
- package/dist/cascader-types-DVT-znZ-.d.ts.map +0 -1
- package/dist/context-BYXeJQnz.d.ts.map +0 -1
- package/dist/context-Cnlo53sV.d.ts.map +0 -1
- package/dist/data-grid-i18n-TQR2PZlU.d.ts.map +0 -1
- package/dist/ease-B82HVmio.d.ts.map +0 -1
- package/dist/filters-draft-DEAl3TO-.d.ts.map +0 -1
- package/dist/model-DlbIqCZg.d.ts.map +0 -1
- package/dist/model-NSIg2p7a.d.ts.map +0 -1
- package/dist/model-_mRyI6V9.d.ts.map +0 -1
- package/dist/tooltip-BarafYiU.d.ts.map +0 -1
- package/dist/tooltip-BqxVD6D-.d.ts.map +0 -1
- package/dist/tooltip-C01qUgsW.d.ts.map +0 -1
- package/dist/tooltip-C6qUs7px.d.ts.map +0 -1
- package/dist/tooltip-DQ4DXgeu.d.ts.map +0 -1
- package/dist/types-B_6p3LXz.d.ts.map +0 -1
- package/dist/types-Bah5NY44.d.ts.map +0 -1
- package/dist/types-D6e3gWOA.d.ts.map +0 -1
- package/dist/types-kSZH1k8K.d.ts.map +0 -1
- package/dist/types-smkWN_7x.d.ts.map +0 -1
- package/dist/use-geometry-CH0foIo7.d.ts.map +0 -1
- package/dist/use-position-DOi1gVL0.d.ts.map +0 -1
|
@@ -1,37 +1,45 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useListbox } from "../../hooks/use-listbox.js";
|
|
2
3
|
import { EASE_OUT } from "../../lib/ease.js";
|
|
3
4
|
import { createContext, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
4
5
|
import { cn } from "@kumix/utils";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { motion, useReducedMotion } from "motion/react";
|
|
7
|
+
import { animate, motion, useMotionValue, useMotionValueEvent, useReducedMotion, useTransform } from "motion/react";
|
|
7
8
|
import { Check, ChevronDown } from "lucide-react";
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const CHEVRON_TRANSITION = {
|
|
9
|
+
// src/components/motion/select.tsx
|
|
10
|
+
const UNFOLD_SPRING = {
|
|
11
11
|
type: "spring",
|
|
12
|
-
|
|
13
|
-
bounce: .
|
|
12
|
+
visualDuration: .2,
|
|
13
|
+
bounce: .12
|
|
14
14
|
};
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
staggerChildren: .035,
|
|
19
|
-
delayChildren: .05
|
|
20
|
-
} }
|
|
15
|
+
const UNFOLD_EXIT = {
|
|
16
|
+
duration: .2,
|
|
17
|
+
ease: EASE_OUT
|
|
21
18
|
};
|
|
19
|
+
const RADIUS = 12;
|
|
20
|
+
const GAP = 8;
|
|
21
|
+
const LIP = 8;
|
|
22
|
+
const lerp = (a, b, t) => a + (b - a) * t;
|
|
22
23
|
const ITEM_VARIANTS = {
|
|
23
24
|
hidden: {
|
|
24
25
|
opacity: 0,
|
|
25
|
-
y: -
|
|
26
|
-
|
|
26
|
+
y: -4,
|
|
27
|
+
transition: {
|
|
28
|
+
duration: .08,
|
|
29
|
+
ease: EASE_OUT
|
|
30
|
+
}
|
|
27
31
|
},
|
|
28
32
|
show: {
|
|
29
33
|
opacity: 1,
|
|
30
34
|
y: 0,
|
|
31
|
-
|
|
35
|
+
transition: {
|
|
36
|
+
duration: .12,
|
|
37
|
+
ease: EASE_OUT
|
|
38
|
+
}
|
|
32
39
|
}
|
|
33
40
|
};
|
|
34
41
|
const SelectContext = createContext(null);
|
|
42
|
+
const ActiveOptionContext = createContext(void 0);
|
|
35
43
|
function useSelectContext(component) {
|
|
36
44
|
const ctx = useContext(SelectContext);
|
|
37
45
|
if (!ctx) throw new Error(`${component} must be used within <Select>`);
|
|
@@ -49,21 +57,34 @@ function Select({ value, defaultValue, onValueChange, open: openProp, defaultOpe
|
|
|
49
57
|
const current = controlled ? value : internal;
|
|
50
58
|
const openControlled = openProp !== void 0;
|
|
51
59
|
const open = openControlled ? openProp : internalOpen;
|
|
60
|
+
const progress = useMotionValue(open ? 1 : 0);
|
|
52
61
|
const setOpen = useCallback((next) => {
|
|
53
62
|
if (!openControlled) setInternalOpen(next);
|
|
54
63
|
onOpenChange?.(next);
|
|
55
64
|
}, [onOpenChange, openControlled]);
|
|
65
|
+
const close = useCallback(() => {
|
|
66
|
+
const trigger = document.getElementById(`${baseId}-trigger`);
|
|
67
|
+
if (rootRef.current?.contains(document.activeElement) && document.activeElement !== trigger) trigger?.focus();
|
|
68
|
+
setOpen(false);
|
|
69
|
+
}, [baseId, setOpen]);
|
|
56
70
|
const select = useCallback((next) => {
|
|
57
71
|
if (!controlled) setInternal(next);
|
|
58
72
|
onValueChange?.(next);
|
|
59
|
-
|
|
73
|
+
close();
|
|
60
74
|
}, [
|
|
61
75
|
controlled,
|
|
62
76
|
onValueChange,
|
|
63
|
-
|
|
77
|
+
close
|
|
64
78
|
]);
|
|
65
|
-
const register = useCallback((v, label) => {
|
|
66
|
-
setLabels((m) =>
|
|
79
|
+
const register = useCallback((v, label, disabled) => {
|
|
80
|
+
setLabels((m) => {
|
|
81
|
+
const entry = m.get(v);
|
|
82
|
+
if (entry?.label === label && entry.disabled === disabled) return m;
|
|
83
|
+
return new Map(m).set(v, {
|
|
84
|
+
label,
|
|
85
|
+
disabled
|
|
86
|
+
});
|
|
87
|
+
});
|
|
67
88
|
}, []);
|
|
68
89
|
const unregister = useCallback((v) => {
|
|
69
90
|
setLabels((m) => {
|
|
@@ -73,9 +94,17 @@ function Select({ value, defaultValue, onValueChange, open: openProp, defaultOpe
|
|
|
73
94
|
return next;
|
|
74
95
|
});
|
|
75
96
|
}, []);
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
const animation = animate(progress, open ? 1 : 0, reduce ? { duration: .12 } : open ? UNFOLD_SPRING : UNFOLD_EXIT);
|
|
99
|
+
return () => animation.stop();
|
|
100
|
+
}, [
|
|
101
|
+
open,
|
|
102
|
+
progress,
|
|
103
|
+
reduce
|
|
104
|
+
]);
|
|
76
105
|
useEffect(() => {
|
|
77
106
|
if (!open) return;
|
|
78
|
-
const onKey = (e) => e.key === "Escape" &&
|
|
107
|
+
const onKey = (e) => e.key === "Escape" && close();
|
|
79
108
|
const onPointer = (e) => {
|
|
80
109
|
if (rootRef.current && !rootRef.current.contains(e.target)) setOpen(false);
|
|
81
110
|
};
|
|
@@ -85,7 +114,16 @@ function Select({ value, defaultValue, onValueChange, open: openProp, defaultOpe
|
|
|
85
114
|
window.removeEventListener("keydown", onKey);
|
|
86
115
|
window.removeEventListener("pointerdown", onPointer);
|
|
87
116
|
};
|
|
88
|
-
}, [
|
|
117
|
+
}, [
|
|
118
|
+
open,
|
|
119
|
+
setOpen,
|
|
120
|
+
close
|
|
121
|
+
]);
|
|
122
|
+
const rows = useMemo(() => Array.from(labels, ([id, entry]) => ({
|
|
123
|
+
id,
|
|
124
|
+
label: entry.label,
|
|
125
|
+
disabled: entry.disabled
|
|
126
|
+
})), [labels]);
|
|
89
127
|
const ctx = useMemo(() => ({
|
|
90
128
|
value: current,
|
|
91
129
|
open,
|
|
@@ -93,8 +131,11 @@ function Select({ value, defaultValue, onValueChange, open: openProp, defaultOpe
|
|
|
93
131
|
select,
|
|
94
132
|
register,
|
|
95
133
|
unregister,
|
|
96
|
-
labelFor: (v) => v === void 0 ? void 0 : labels.get(v),
|
|
134
|
+
labelFor: (v) => v === void 0 ? void 0 : labels.get(v)?.label,
|
|
135
|
+
rows,
|
|
136
|
+
close,
|
|
97
137
|
reduce,
|
|
138
|
+
progress,
|
|
98
139
|
triggerId: `${baseId}-trigger`,
|
|
99
140
|
listId: `${baseId}-list`,
|
|
100
141
|
disabled,
|
|
@@ -108,7 +149,10 @@ function Select({ value, defaultValue, onValueChange, open: openProp, defaultOpe
|
|
|
108
149
|
register,
|
|
109
150
|
unregister,
|
|
110
151
|
labels,
|
|
152
|
+
rows,
|
|
153
|
+
close,
|
|
111
154
|
reduce,
|
|
155
|
+
progress,
|
|
112
156
|
baseId,
|
|
113
157
|
disabled,
|
|
114
158
|
placement
|
|
@@ -125,32 +169,18 @@ function Select({ value, defaultValue, onValueChange, open: openProp, defaultOpe
|
|
|
125
169
|
function SelectTrigger({ className, children }) {
|
|
126
170
|
const ctx = useSelectContext("SelectTrigger");
|
|
127
171
|
const isTop = ctx.placement === "top";
|
|
128
|
-
const
|
|
172
|
+
const nearRadius = useTransform(ctx.progress, [
|
|
129
173
|
0,
|
|
174
|
+
.2,
|
|
175
|
+
.4,
|
|
176
|
+
1
|
|
177
|
+
], [
|
|
178
|
+
RADIUS,
|
|
130
179
|
0,
|
|
131
|
-
12
|
|
132
|
-
] : [
|
|
133
|
-
12,
|
|
134
180
|
0,
|
|
135
|
-
|
|
136
|
-
];
|
|
137
|
-
const
|
|
138
|
-
duration: .6,
|
|
139
|
-
times: [
|
|
140
|
-
0,
|
|
141
|
-
.4,
|
|
142
|
-
1
|
|
143
|
-
],
|
|
144
|
-
ease: EASE_OUT
|
|
145
|
-
} : {
|
|
146
|
-
duration: .42,
|
|
147
|
-
times: [
|
|
148
|
-
0,
|
|
149
|
-
.5,
|
|
150
|
-
1
|
|
151
|
-
],
|
|
152
|
-
ease: EASE_OUT
|
|
153
|
-
};
|
|
181
|
+
RADIUS
|
|
182
|
+
]);
|
|
183
|
+
const rotate = useTransform(ctx.progress, (p) => ctx.reduce ? ctx.open ? 180 : 0 : Math.min(1, Math.max(0, p)) * 180);
|
|
154
184
|
return /* @__PURE__ */ jsxs(motion.button, {
|
|
155
185
|
type: "button",
|
|
156
186
|
id: ctx.triggerId,
|
|
@@ -159,24 +189,22 @@ function SelectTrigger({ className, children }) {
|
|
|
159
189
|
"aria-expanded": ctx.open,
|
|
160
190
|
"aria-controls": ctx.listId,
|
|
161
191
|
onClick: () => ctx.setOpen(!ctx.open),
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
borderBottomRightRadius: isTop ? 12 : kf
|
|
192
|
+
onKeyDown: (event) => {
|
|
193
|
+
if (!ctx.open && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
|
|
194
|
+
event.preventDefault();
|
|
195
|
+
ctx.setOpen(true);
|
|
196
|
+
}
|
|
168
197
|
},
|
|
169
|
-
|
|
170
|
-
borderTopLeftRadius: isTop ?
|
|
171
|
-
borderTopRightRadius: isTop ?
|
|
172
|
-
borderBottomLeftRadius: isTop ?
|
|
173
|
-
borderBottomRightRadius: isTop ?
|
|
198
|
+
style: {
|
|
199
|
+
borderTopLeftRadius: ctx.reduce || !isTop ? RADIUS : nearRadius,
|
|
200
|
+
borderTopRightRadius: ctx.reduce || !isTop ? RADIUS : nearRadius,
|
|
201
|
+
borderBottomLeftRadius: ctx.reduce || isTop ? RADIUS : nearRadius,
|
|
202
|
+
borderBottomRightRadius: ctx.reduce || isTop ? RADIUS : nearRadius
|
|
174
203
|
},
|
|
175
|
-
className: cn("relative z-10 flex w-full items-center justify-between gap-2
|
|
204
|
+
className: cn("border-border bg-background text-foreground relative z-10 flex w-full items-center justify-between gap-2 border px-3 py-2 text-sm transition-colors outline-none", "focus-visible:ring-foreground/20 hover:border-(--color-border-strong) focus-visible:ring-2", "disabled:pointer-events-none disabled:opacity-50", className),
|
|
176
205
|
children: [children, /* @__PURE__ */ jsx(motion.span, {
|
|
177
206
|
"aria-hidden": true,
|
|
178
|
-
|
|
179
|
-
transition: ctx.reduce ? { duration: 0 } : CHEVRON_TRANSITION,
|
|
207
|
+
style: { rotate },
|
|
180
208
|
className: "text-muted-foreground",
|
|
181
209
|
children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
182
210
|
})]
|
|
@@ -192,23 +220,38 @@ function SelectValue({ placeholder, className }) {
|
|
|
192
220
|
}
|
|
193
221
|
function SelectContent({ className, children }) {
|
|
194
222
|
const ctx = useSelectContext("SelectContent");
|
|
195
|
-
const
|
|
223
|
+
const panelRef = useRef(null);
|
|
196
224
|
const [height, setHeight] = useState(0);
|
|
197
|
-
const open = ctx
|
|
198
|
-
const {
|
|
225
|
+
const { open, progress, reduce, setPlacement } = ctx;
|
|
226
|
+
const { activeId, onKeyDown } = useListbox({
|
|
227
|
+
open,
|
|
228
|
+
rows: ctx.rows,
|
|
229
|
+
selected: ctx.value,
|
|
230
|
+
list: panelRef
|
|
231
|
+
});
|
|
232
|
+
const [exiting, setExiting] = useState(false);
|
|
233
|
+
const [wasOpen, setWasOpen] = useState(open);
|
|
234
|
+
if (open !== wasOpen) {
|
|
235
|
+
setWasOpen(open);
|
|
236
|
+
if (!open) setExiting(true);
|
|
237
|
+
}
|
|
238
|
+
const present = open || exiting;
|
|
239
|
+
useMotionValueEvent(progress, "animationComplete", () => {
|
|
240
|
+
if (progress.get() === 0) setExiting(false);
|
|
241
|
+
});
|
|
199
242
|
useLayoutEffect(() => {
|
|
200
|
-
const node =
|
|
201
|
-
if (!node) return;
|
|
243
|
+
const node = panelRef.current;
|
|
244
|
+
if (!node || !present) return;
|
|
202
245
|
const measure = () => setHeight(node.offsetHeight);
|
|
203
246
|
measure();
|
|
204
247
|
const observer = new ResizeObserver(measure);
|
|
205
248
|
observer.observe(node);
|
|
206
249
|
return () => observer.disconnect();
|
|
207
|
-
});
|
|
250
|
+
}, [present]);
|
|
208
251
|
useLayoutEffect(() => {
|
|
209
252
|
if (!open) return;
|
|
210
253
|
const trigger = document.getElementById(ctx.triggerId);
|
|
211
|
-
const node =
|
|
254
|
+
const node = panelRef.current;
|
|
212
255
|
if (!trigger || !node) return;
|
|
213
256
|
const rect = trigger.getBoundingClientRect();
|
|
214
257
|
const h = node.offsetHeight;
|
|
@@ -221,110 +264,84 @@ function SelectContent({ className, children }) {
|
|
|
221
264
|
setPlacement
|
|
222
265
|
]);
|
|
223
266
|
const isTop = ctx.placement === "top";
|
|
224
|
-
const
|
|
225
|
-
const
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
ease: EASE_OUT,
|
|
239
|
-
delay: .14
|
|
240
|
-
} : {
|
|
241
|
-
duration: .16,
|
|
242
|
-
ease: EASE_OUT
|
|
243
|
-
};
|
|
267
|
+
const ready = height > 0 && !reduce;
|
|
268
|
+
const fromY = ready ? isTop ? GAP : -8 : 0;
|
|
269
|
+
const detach = useTransform(progress, [.4, 1], [0, 1]);
|
|
270
|
+
const y = useTransform(detach, (d) => lerp(fromY, 0, d));
|
|
271
|
+
const nearRadius = useTransform(detach, (d) => ready ? RADIUS * d : RADIUS);
|
|
272
|
+
const borderRadius = useTransform(nearRadius, (near) => isTop ? `${RADIUS}px ${RADIUS}px ${near}px ${near}px` : `${near}px ${near}px ${RADIUS}px ${RADIUS}px`);
|
|
273
|
+
const clipPath = useTransform([progress, nearRadius], ([p, near]) => {
|
|
274
|
+
if (!ready) return "none";
|
|
275
|
+
const reveal = Math.min(1, Math.max(0, p));
|
|
276
|
+
if (reveal === 1) return "none";
|
|
277
|
+
const hidden = Math.max(0, (height - LIP) * (1 - reveal));
|
|
278
|
+
return `inset(${isTop ? `${hidden}px 0 0 0` : `0 0 ${hidden}px 0`} round ${isTop ? `${RADIUS}px ${RADIUS}px ${near}px ${near}px` : `${near}px ${near}px ${RADIUS}px ${RADIUS}px`})`;
|
|
279
|
+
});
|
|
280
|
+
const opacity = useTransform(progress, reduce ? [0, 1] : [0, .12], [0, 1]);
|
|
244
281
|
return /* @__PURE__ */ jsx(motion.div, {
|
|
282
|
+
ref: panelRef,
|
|
245
283
|
id: ctx.listId,
|
|
246
284
|
role: "listbox",
|
|
247
285
|
"aria-labelledby": ctx.triggerId,
|
|
248
286
|
"aria-hidden": !open,
|
|
249
287
|
inert: !open,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
height: open ? height : 0
|
|
254
|
-
} : {
|
|
255
|
-
opacity: open ? 1 : 0,
|
|
256
|
-
height: open ? height : 0,
|
|
257
|
-
marginTop: isTop ? 0 : nearGap,
|
|
258
|
-
marginBottom: isTop ? nearGap : 0,
|
|
259
|
-
borderTopLeftRadius: isTop ? 12 : nearRadius,
|
|
260
|
-
borderTopRightRadius: isTop ? 12 : nearRadius,
|
|
261
|
-
borderBottomLeftRadius: isTop ? nearRadius : 12,
|
|
262
|
-
borderBottomRightRadius: isTop ? nearRadius : 12
|
|
263
|
-
},
|
|
264
|
-
transition: ctx.reduce ? { duration: .12 } : {
|
|
265
|
-
opacity: open ? { duration: .18 } : {
|
|
266
|
-
duration: .16,
|
|
267
|
-
delay: .12
|
|
268
|
-
},
|
|
269
|
-
height: open ? {
|
|
270
|
-
type: "spring",
|
|
271
|
-
duration: .42,
|
|
272
|
-
bounce: .14
|
|
273
|
-
} : {
|
|
274
|
-
duration: .26,
|
|
275
|
-
ease: EASE_OUT,
|
|
276
|
-
delay: .14
|
|
277
|
-
},
|
|
278
|
-
marginTop: isTop ? INSTANT_TRANSITION : gapT,
|
|
279
|
-
marginBottom: isTop ? gapT : INSTANT_TRANSITION,
|
|
280
|
-
borderTopLeftRadius: isTop ? INSTANT_TRANSITION : radiusT,
|
|
281
|
-
borderTopRightRadius: isTop ? INSTANT_TRANSITION : radiusT,
|
|
282
|
-
borderBottomLeftRadius: isTop ? radiusT : INSTANT_TRANSITION,
|
|
283
|
-
borderBottomRightRadius: isTop ? radiusT : INSTANT_TRANSITION
|
|
288
|
+
onKeyDown: (event) => {
|
|
289
|
+
if (event.key === "Tab") ctx.close();
|
|
290
|
+
else onKeyDown(event);
|
|
284
291
|
},
|
|
285
292
|
style: {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
293
|
+
visibility: present ? void 0 : "hidden",
|
|
294
|
+
maxHeight: present ? void 0 : 0,
|
|
295
|
+
borderWidth: present ? void 0 : 0,
|
|
296
|
+
y,
|
|
297
|
+
clipPath,
|
|
298
|
+
borderRadius,
|
|
299
|
+
opacity,
|
|
300
|
+
pointerEvents: open ? "auto" : "none",
|
|
301
|
+
marginTop: isTop ? 0 : GAP,
|
|
302
|
+
marginBottom: isTop ? GAP : 0
|
|
289
303
|
},
|
|
290
|
-
className: cn("absolute right-0 left-0 z-20
|
|
291
|
-
children: /* @__PURE__ */ jsx(
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
304
|
+
className: cn("border-border bg-background absolute right-0 left-0 z-20 overflow-hidden border shadow-lg", isTop ? "bottom-full" : "top-full", className),
|
|
305
|
+
children: /* @__PURE__ */ jsx(ActiveOptionContext.Provider, {
|
|
306
|
+
value: activeId,
|
|
307
|
+
children: /* @__PURE__ */ jsx(motion.div, {
|
|
308
|
+
initial: false,
|
|
309
|
+
animate: open ? "show" : "hidden",
|
|
310
|
+
className: "p-1",
|
|
311
|
+
children
|
|
312
|
+
})
|
|
298
313
|
})
|
|
299
314
|
});
|
|
300
315
|
}
|
|
301
316
|
function SelectItem({ value, disabled = false, className, children }) {
|
|
302
317
|
const ctx = useSelectContext("SelectItem");
|
|
318
|
+
const activeId = useContext(ActiveOptionContext);
|
|
303
319
|
const selected = ctx.value === value;
|
|
304
320
|
const label = typeof children === "string" ? children : value;
|
|
305
321
|
useLayoutEffect(() => {
|
|
306
|
-
ctx.register(value, label);
|
|
307
|
-
return () => ctx.unregister(value);
|
|
322
|
+
ctx.register(value, label, disabled);
|
|
308
323
|
}, [
|
|
309
324
|
ctx.register,
|
|
310
|
-
ctx.unregister,
|
|
311
325
|
value,
|
|
312
|
-
label
|
|
326
|
+
label,
|
|
327
|
+
disabled
|
|
313
328
|
]);
|
|
314
|
-
|
|
329
|
+
useLayoutEffect(() => () => ctx.unregister(value), [ctx.unregister, value]);
|
|
330
|
+
return /* @__PURE__ */ jsx(motion.div, {
|
|
315
331
|
variants: ctx.reduce ? void 0 : ITEM_VARIANTS,
|
|
316
332
|
children: /* @__PURE__ */ jsxs("button", {
|
|
317
333
|
type: "button",
|
|
318
334
|
role: "option",
|
|
319
335
|
"aria-selected": selected,
|
|
320
336
|
disabled,
|
|
337
|
+
tabIndex: activeId === value ? 0 : -1,
|
|
338
|
+
"data-listbox-id": value,
|
|
321
339
|
onClick: () => ctx.select(value),
|
|
322
|
-
className: cn("flex w-full items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm outline-none
|
|
340
|
+
className: cn("flex w-full items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm transition-colors outline-none", selected ? "bg-muted text-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:bg-muted", "disabled:pointer-events-none disabled:opacity-50", className),
|
|
323
341
|
children: [children, selected ? /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 shrink-0" }) : null]
|
|
324
342
|
})
|
|
325
343
|
});
|
|
326
344
|
}
|
|
327
|
-
//#endregion
|
|
328
345
|
export { Select, SelectContent, SelectItem, SelectTrigger, SelectValue };
|
|
329
346
|
|
|
330
347
|
//# sourceMappingURL=select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","names":[],"sources":["../../../src/components/motion/select.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { Check, ChevronDown } from \"lucide-react\";\nimport { motion, type Transition, useReducedMotion, type Variants } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT } from \"../../lib/ease\";\n\nconst INSTANT_TRANSITION: Transition = { duration: 0 };\n\n// Spring with bounce powers the unfold/separation; per-property timings in the\n// content choreograph it (see SelectContent). Mirrors bouncy-accordion's feel.\nconst CHEVRON_TRANSITION: Transition = { type: \"spring\", duration: 0.4, bounce: 0.3 };\n\nconst LIST_VARIANTS: Variants = {\n hidden: {},\n show: { transition: { staggerChildren: 0.035, delayChildren: 0.05 } },\n};\nconst ITEM_VARIANTS: Variants = {\n hidden: { opacity: 0, y: -6, filter: \"blur(3px)\" },\n show: { opacity: 1, y: 0, filter: \"blur(0px)\" },\n};\n\ntype Placement = \"bottom\" | \"top\";\n\ninterface SelectContextValue {\n value: string | undefined;\n open: boolean;\n setOpen: (open: boolean) => void;\n select: (value: string) => void;\n register: (value: string, label: string) => void;\n unregister: (value: string) => void;\n labelFor: (value: string | undefined) => string | undefined;\n reduce: boolean;\n triggerId: string;\n listId: string;\n disabled: boolean;\n placement: Placement;\n setPlacement: (p: Placement) => void;\n}\n\nconst SelectContext = createContext<SelectContextValue | null>(null);\n\nfunction useSelectContext(component: string) {\n const ctx = useContext(SelectContext);\n if (!ctx) throw new Error(`${component} must be used within <Select>`);\n return ctx;\n}\n\nexport interface SelectProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n /**\n * Controlled open state of the panel. A layout that stacks selects can hold\n * this to keep exactly one panel open — the panel is absolutely positioned\n * inside its field, so two open at once paint over each other's options.\n */\n open?: boolean;\n /** Uncontrolled initial open state. Default false. */\n defaultOpen?: boolean;\n /**\n * Fires whenever the panel opens or closes. The panel is absolutely\n * positioned inside the field, so a layout that stacks selects has to know\n * which one is open to paint it above its neighbours.\n */\n onOpenChange?: (open: boolean) => void;\n disabled?: boolean;\n className?: string;\n children: ReactNode;\n}\n\nexport function Select({\n value,\n defaultValue,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n disabled = false,\n className,\n children,\n}: SelectProps) {\n const reduce = useReducedMotion() ?? false;\n const baseId = useId();\n const rootRef = useRef<HTMLDivElement>(null);\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n const [internal, setInternal] = useState(defaultValue);\n const [labels, setLabels] = useState<Map<string, string>>(new Map());\n const [placement, setPlacement] = useState<Placement>(\"bottom\");\n\n const controlled = value !== undefined;\n const current = controlled ? value : internal;\n const openControlled = openProp !== undefined;\n const open = openControlled ? openProp : internalOpen;\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!openControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [onOpenChange, openControlled],\n );\n\n const select = useCallback(\n (next: string) => {\n if (!controlled) setInternal(next);\n onValueChange?.(next);\n setOpen(false);\n },\n [controlled, onValueChange, setOpen],\n );\n\n const register = useCallback((v: string, label: string) => {\n setLabels((m) => (m.get(v) === label ? m : new Map(m).set(v, label)));\n }, []);\n const unregister = useCallback((v: string) => {\n setLabels((m) => {\n if (!m.has(v)) return m;\n const next = new Map(m);\n next.delete(v);\n return next;\n });\n }, []);\n\n // close on outside pointer / escape\n useEffect(() => {\n if (!open) return;\n const onKey = (e: KeyboardEvent) => e.key === \"Escape\" && setOpen(false);\n const onPointer = (e: PointerEvent) => {\n if (rootRef.current && !rootRef.current.contains(e.target as Node)) setOpen(false);\n };\n window.addEventListener(\"keydown\", onKey);\n window.addEventListener(\"pointerdown\", onPointer);\n return () => {\n window.removeEventListener(\"keydown\", onKey);\n window.removeEventListener(\"pointerdown\", onPointer);\n };\n }, [open, setOpen]);\n\n const ctx = useMemo<SelectContextValue>(\n () => ({\n value: current,\n open,\n setOpen,\n select,\n register,\n unregister,\n labelFor: (v) => (v === undefined ? undefined : labels.get(v)),\n reduce,\n triggerId: `${baseId}-trigger`,\n listId: `${baseId}-list`,\n disabled,\n placement,\n setPlacement,\n }),\n [\n current,\n open,\n setOpen,\n select,\n register,\n unregister,\n labels,\n reduce,\n baseId,\n disabled,\n placement,\n ],\n );\n\n return (\n <SelectContext.Provider value={ctx}>\n <div ref={rootRef} className={cn(\"relative\", className)}>\n {children}\n </div>\n </SelectContext.Provider>\n );\n}\n\nexport interface SelectTriggerProps {\n className?: string;\n children: ReactNode;\n}\n\nexport function SelectTrigger({ className, children }: SelectTriggerProps) {\n const ctx = useSelectContext(\"SelectTrigger\");\n const isTop = ctx.placement === \"top\";\n // edge facing the panel flattens then rounds; the far edge stays rounded.\n // All four corners are specified so none gets stranded when placement flips.\n const kf = ctx.open ? [0, 0, 12] : [12, 0, 12];\n const kfT: Transition = ctx.reduce\n ? { duration: 0 }\n : ctx.open\n ? { duration: 0.6, times: [0, 0.4, 1], ease: EASE_OUT }\n : { duration: 0.42, times: [0, 0.5, 1], ease: EASE_OUT };\n return (\n <motion.button\n type=\"button\"\n id={ctx.triggerId}\n disabled={ctx.disabled}\n aria-haspopup=\"listbox\"\n aria-expanded={ctx.open}\n aria-controls={ctx.listId}\n onClick={() => ctx.setOpen(!ctx.open)}\n // Gooey: the edge facing the panel snaps flat (panel attached) then rounds\n // back once the panel pulls away — the two pinch apart.\n initial={false}\n animate={{\n borderTopLeftRadius: isTop ? kf : 12,\n borderTopRightRadius: isTop ? kf : 12,\n borderBottomLeftRadius: isTop ? 12 : kf,\n borderBottomRightRadius: isTop ? 12 : kf,\n }}\n transition={{\n borderTopLeftRadius: isTop ? kfT : INSTANT_TRANSITION,\n borderTopRightRadius: isTop ? kfT : INSTANT_TRANSITION,\n borderBottomLeftRadius: isTop ? INSTANT_TRANSITION : kfT,\n borderBottomRightRadius: isTop ? INSTANT_TRANSITION : kfT,\n }}\n className={cn(\n \"relative z-10 flex w-full items-center justify-between gap-2 rounded-xl border border-border bg-background px-3 py-2 text-foreground text-sm outline-none transition-colors\",\n \"hover:border-(--color-border-strong) focus-visible:ring-2 focus-visible:ring-foreground/20\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n className,\n )}\n >\n {children}\n <motion.span\n aria-hidden\n animate={{ rotate: ctx.open ? 180 : 0 }}\n transition={ctx.reduce ? { duration: 0 } : CHEVRON_TRANSITION}\n className=\"text-muted-foreground\"\n >\n <ChevronDown className=\"h-4 w-4\" />\n </motion.span>\n </motion.button>\n );\n}\n\nexport interface SelectValueProps {\n placeholder?: string;\n className?: string;\n}\n\nexport function SelectValue({ placeholder, className }: SelectValueProps) {\n const ctx = useSelectContext(\"SelectValue\");\n const label = ctx.labelFor(ctx.value);\n return (\n <span className={cn(label ? \"text-foreground\" : \"text-muted-foreground\", className)}>\n {label ?? placeholder ?? \"Select\"}\n </span>\n );\n}\n\nexport interface SelectContentProps {\n className?: string;\n children: ReactNode;\n}\n\nexport function SelectContent({ className, children }: SelectContentProps) {\n const ctx = useSelectContext(\"SelectContent\");\n const innerRef = useRef<HTMLDivElement>(null);\n const [height, setHeight] = useState(0);\n const open = ctx.open;\n const { setPlacement } = ctx;\n\n useLayoutEffect(() => {\n const node = innerRef.current;\n if (!node) return;\n const measure = () => setHeight(node.offsetHeight);\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(node);\n return () => observer.disconnect();\n });\n\n // On open, flip upward when there isn't room below and there's more above.\n useLayoutEffect(() => {\n if (!open) return;\n const trigger = document.getElementById(ctx.triggerId);\n const node = innerRef.current;\n if (!trigger || !node) return;\n const rect = trigger.getBoundingClientRect();\n const h = node.offsetHeight;\n const below = window.innerHeight - rect.bottom;\n const above = rect.top;\n setPlacement(below < h + 16 && above > below ? \"top\" : \"bottom\");\n }, [open, ctx.triggerId, setPlacement]);\n\n // Specify EVERY corner + both margins each render. The near edge (facing the\n // trigger) animates flat->round and the gap opens on that side; the far edge\n // stays rounded and its margin pinned to 0. Setting all of them avoids a\n // stranded square corner when the placement flips between opens.\n const isTop = ctx.placement === \"top\";\n const nearGap = open ? 8 : 0;\n const nearRadius = open ? 12 : 0;\n\n const gapT: Transition = open\n ? { type: \"spring\", duration: 0.6, bounce: 0.5, delay: 0.12 }\n : { type: \"spring\", duration: 0.3, bounce: 0.1 };\n const radiusT: Transition = open\n ? { duration: 0.3, ease: EASE_OUT, delay: 0.14 }\n : { duration: 0.16, ease: EASE_OUT };\n\n // Items stay mounted (open just animates the panel) so each item's label\n // registration persists — otherwise the trigger would fall back to the\n // placeholder the moment the panel closes.\n return (\n <motion.div\n id={ctx.listId}\n role=\"listbox\"\n aria-labelledby={ctx.triggerId}\n aria-hidden={!open}\n inert={!open}\n initial={false}\n animate={\n ctx.reduce\n ? { opacity: open ? 1 : 0, height: open ? height : 0 }\n : {\n opacity: open ? 1 : 0,\n height: open ? height : 0,\n // gap opens on the side facing the trigger\n marginTop: isTop ? 0 : nearGap,\n marginBottom: isTop ? nearGap : 0,\n // near corners go flat->round; far corners stay rounded\n borderTopLeftRadius: isTop ? 12 : nearRadius,\n borderTopRightRadius: isTop ? 12 : nearRadius,\n borderBottomLeftRadius: isTop ? nearRadius : 12,\n borderBottomRightRadius: isTop ? nearRadius : 12,\n }\n }\n transition={\n ctx.reduce\n ? { duration: 0.12 }\n : {\n opacity: open ? { duration: 0.18 } : { duration: 0.16, delay: 0.12 },\n height: open\n ? { type: \"spring\", duration: 0.42, bounce: 0.14 }\n : { duration: 0.26, ease: EASE_OUT, delay: 0.14 },\n marginTop: isTop ? INSTANT_TRANSITION : gapT,\n marginBottom: isTop ? gapT : INSTANT_TRANSITION,\n borderTopLeftRadius: isTop ? INSTANT_TRANSITION : radiusT,\n borderTopRightRadius: isTop ? INSTANT_TRANSITION : radiusT,\n borderBottomLeftRadius: isTop ? radiusT : INSTANT_TRANSITION,\n borderBottomRightRadius: isTop ? radiusT : INSTANT_TRANSITION,\n }\n }\n style={{\n transformOrigin: isTop ? \"bottom\" : \"top\",\n overflow: \"hidden\",\n pointerEvents: open ? \"auto\" : \"none\",\n }}\n // flush against the trigger, then separates into its own rounded pill;\n // sits above or below depending on available space\n className={cn(\n \"absolute right-0 left-0 z-20 rounded-xl border border-border bg-background shadow-lg\",\n isTop ? \"bottom-full\" : \"top-full\",\n className,\n )}\n >\n <motion.div\n ref={innerRef}\n variants={ctx.reduce ? undefined : LIST_VARIANTS}\n initial={false}\n animate={open ? \"show\" : \"hidden\"}\n className=\"p-1\"\n >\n {children}\n </motion.div>\n </motion.div>\n );\n}\n\nexport interface SelectItemProps {\n value: string;\n disabled?: boolean;\n className?: string;\n children: ReactNode;\n}\n\nexport function SelectItem({ value, disabled = false, className, children }: SelectItemProps) {\n const ctx = useSelectContext(\"SelectItem\");\n const selected = ctx.value === value;\n const label = typeof children === \"string\" ? children : value;\n\n useLayoutEffect(() => {\n ctx.register(value, label);\n return () => ctx.unregister(value);\n }, [ctx.register, ctx.unregister, value, label]);\n\n return (\n <motion.li variants={ctx.reduce ? undefined : ITEM_VARIANTS}>\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={selected}\n disabled={disabled}\n onClick={() => ctx.select(value)}\n className={cn(\n \"flex w-full items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm outline-none transition-colors\",\n selected\n ? \"bg-muted text-foreground\"\n : \"text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:bg-muted\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n className,\n )}\n >\n {children}\n {selected ? <Check className=\"h-3.5 w-3.5 shrink-0\" /> : null}\n </button>\n </motion.li>\n );\n}\n"],"mappings":";;;;;;;;AAoBA,MAAM,qBAAiC,EAAE,UAAU,EAAE;AAIrD,MAAM,qBAAiC;CAAE,MAAM;CAAU,UAAU;CAAK,QAAQ;AAAI;AAEpF,MAAM,gBAA0B;CAC9B,QAAQ,CAAC;CACT,MAAM,EAAE,YAAY;EAAE,iBAAiB;EAAO,eAAe;CAAK,EAAE;AACtE;AACA,MAAM,gBAA0B;CAC9B,QAAQ;EAAE,SAAS;EAAG,GAAG;EAAI,QAAQ;CAAY;CACjD,MAAM;EAAE,SAAS;EAAG,GAAG;EAAG,QAAQ;CAAY;AAChD;AAoBA,MAAM,gBAAgB,cAAyC,IAAI;AAEnE,SAAS,iBAAiB,WAAmB;CAC3C,MAAM,MAAM,WAAW,aAAa;CACpC,IAAI,CAAC,KAAK,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;CACC,CAAA;AAEf"}
|
|
1
|
+
{"version":3,"file":"select.js","names":[],"sources":["../../../src/components/motion/select.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { Check, ChevronDown } from \"lucide-react\";\nimport {\n animate,\n type MotionValue,\n motion,\n useMotionValue,\n useMotionValueEvent,\n useReducedMotion,\n useTransform,\n type Variants,\n} from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { type ListboxRow, useListbox } from \"../../hooks/use-listbox\";\nimport { EASE_OUT } from \"../../lib/ease\";\n\n// One progress value drives the surface, gap, corners and chevron. This short\n// spring suits the full reveal distance; each reader clamps its small internal\n// overshoot, so all visible endpoints settle together. Rows share a short\n// reveal so long lists have no late entries.\nconst UNFOLD_SPRING = {\n type: \"spring\",\n visualDuration: 0.2,\n bounce: 0.12,\n} as const;\n// Exits are faster than entrances: the panel folds back on a short ease.\nconst UNFOLD_EXIT = { duration: 0.2, ease: EASE_OUT } as const;\nconst RADIUS = 12;\n// How far the open panel sits from the trigger once it has pulled away.\nconst GAP = 8;\n// The surface starts as a thin lip flush against the trigger's edge.\nconst LIP = 8;\nconst lerp = (a: number, b: number, t: number) => a + (b - a) * t;\n\nconst ITEM_VARIANTS: Variants = {\n // A shared short reveal keeps late rows in long, scrolled lists ready with\n // the surface. Per-index staggering can delay visible rows by over a second.\n hidden: { opacity: 0, y: -4, transition: { duration: 0.08, ease: EASE_OUT } },\n show: { opacity: 1, y: 0, transition: { duration: 0.12, ease: EASE_OUT } },\n};\n\ntype Placement = \"bottom\" | \"top\";\n\ninterface SelectContextValue {\n value: string | undefined;\n open: boolean;\n setOpen: (open: boolean) => void;\n select: (value: string) => void;\n register: (value: string, label: string, disabled: boolean) => void;\n unregister: (value: string) => void;\n labelFor: (value: string | undefined) => string | undefined;\n rows: ListboxRow[];\n /** Closes the panel; focus inside it returns to the trigger. */\n close: () => void;\n reduce: boolean;\n progress: MotionValue<number>;\n triggerId: string;\n listId: string;\n disabled: boolean;\n placement: Placement;\n setPlacement: (p: Placement) => void;\n}\n\nconst SelectContext = createContext<SelectContextValue | null>(null);\n// The option keyboard focus is on, resolved during render by the content.\nconst ActiveOptionContext = createContext<string | undefined>(undefined);\n\nfunction useSelectContext(component: string) {\n const ctx = useContext(SelectContext);\n if (!ctx) throw new Error(`${component} must be used within <Select>`);\n return ctx;\n}\n\nexport interface SelectProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n /**\n * Controlled open state of the panel. A layout that stacks selects can hold\n * this to keep exactly one panel open — the panel is absolutely positioned\n * inside its field, so two open at once paint over each other's options.\n */\n open?: boolean;\n /** Uncontrolled initial open state. Default false. */\n defaultOpen?: boolean;\n /**\n * Fires whenever the panel opens or closes. The panel is absolutely\n * positioned inside the field, so a layout that stacks selects has to know\n * which one is open to paint it above its neighbours.\n */\n onOpenChange?: (open: boolean) => void;\n disabled?: boolean;\n className?: string;\n children: ReactNode;\n}\n\nexport function Select({\n value,\n defaultValue,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n disabled = false,\n className,\n children,\n}: SelectProps) {\n const reduce = useReducedMotion() ?? false;\n const baseId = useId();\n const rootRef = useRef<HTMLDivElement>(null);\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n const [internal, setInternal] = useState(defaultValue);\n const [labels, setLabels] = useState<Map<string, { label: string; disabled: boolean }>>(\n new Map(),\n );\n const [placement, setPlacement] = useState<Placement>(\"bottom\");\n\n const controlled = value !== undefined;\n const current = controlled ? value : internal;\n const openControlled = openProp !== undefined;\n const open = openControlled ? openProp : internalOpen;\n const progress = useMotionValue(open ? 1 : 0);\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!openControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [onOpenChange, openControlled],\n );\n\n // The panel turns inert as it closes, which would drop focus held inside it\n // on the page body. Hand it back to the trigger before that happens.\n const close = useCallback(() => {\n const trigger = document.getElementById(`${baseId}-trigger`);\n if (rootRef.current?.contains(document.activeElement) && document.activeElement !== trigger)\n trigger?.focus();\n setOpen(false);\n }, [baseId, setOpen]);\n\n const select = useCallback(\n (next: string) => {\n if (!controlled) setInternal(next);\n onValueChange?.(next);\n close();\n },\n [controlled, onValueChange, close],\n );\n\n const register = useCallback((v: string, label: string, disabled: boolean) => {\n setLabels((m) => {\n const entry = m.get(v);\n if (entry?.label === label && entry.disabled === disabled) return m;\n return new Map(m).set(v, { label, disabled });\n });\n }, []);\n const unregister = useCallback((v: string) => {\n setLabels((m) => {\n if (!m.has(v)) return m;\n const next = new Map(m);\n next.delete(v);\n return next;\n });\n }, []);\n\n // Reduced motion has no travel, so the progress only carries a short fade.\n useEffect(() => {\n const animation = animate(\n progress,\n open ? 1 : 0,\n reduce ? { duration: 0.12 } : open ? UNFOLD_SPRING : UNFOLD_EXIT,\n );\n return () => animation.stop();\n }, [open, progress, reduce]);\n\n // close on outside pointer / escape\n useEffect(() => {\n if (!open) return;\n const onKey = (e: KeyboardEvent) => e.key === \"Escape\" && close();\n const onPointer = (e: PointerEvent) => {\n if (rootRef.current && !rootRef.current.contains(e.target as Node)) setOpen(false);\n };\n window.addEventListener(\"keydown\", onKey);\n window.addEventListener(\"pointerdown\", onPointer);\n return () => {\n window.removeEventListener(\"keydown\", onKey);\n window.removeEventListener(\"pointerdown\", onPointer);\n };\n }, [open, setOpen, close]);\n\n const rows = useMemo(\n () =>\n Array.from(labels, ([id, entry]) => ({\n id,\n label: entry.label,\n disabled: entry.disabled,\n })),\n [labels],\n );\n\n const ctx = useMemo<SelectContextValue>(\n () => ({\n value: current,\n open,\n setOpen,\n select,\n register,\n unregister,\n labelFor: (v) => (v === undefined ? undefined : labels.get(v)?.label),\n rows,\n close,\n reduce,\n progress,\n triggerId: `${baseId}-trigger`,\n listId: `${baseId}-list`,\n disabled,\n placement,\n setPlacement,\n }),\n [\n current,\n open,\n setOpen,\n select,\n register,\n unregister,\n labels,\n rows,\n close,\n reduce,\n progress,\n baseId,\n disabled,\n placement,\n ],\n );\n\n return (\n <SelectContext.Provider value={ctx}>\n <div ref={rootRef} className={cn(\"relative\", className)}>\n {children}\n </div>\n </SelectContext.Provider>\n );\n}\n\nexport interface SelectTriggerProps {\n className?: string;\n children: ReactNode;\n}\n\nexport function SelectTrigger({ className, children }: SelectTriggerProps) {\n const ctx = useSelectContext(\"SelectTrigger\");\n const isTop = ctx.placement === \"top\";\n // The edge facing the panel flattens while the panel is attached to it and\n // rounds back as the panel pulls away — the two pinch apart — on the same\n // curve the panel moves on. The far edge stays rounded.\n const nearRadius = useTransform(ctx.progress, [0, 0.2, 0.4, 1], [RADIUS, 0, 0, RADIUS]);\n const rotate = useTransform(ctx.progress, (p) =>\n ctx.reduce ? (ctx.open ? 180 : 0) : Math.min(1, Math.max(0, p)) * 180,\n );\n return (\n <motion.button\n type=\"button\"\n id={ctx.triggerId}\n disabled={ctx.disabled}\n aria-haspopup=\"listbox\"\n aria-expanded={ctx.open}\n aria-controls={ctx.listId}\n onClick={() => ctx.setOpen(!ctx.open)}\n onKeyDown={(event) => {\n if (!ctx.open && (event.key === \"ArrowDown\" || event.key === \"ArrowUp\")) {\n event.preventDefault();\n ctx.setOpen(true);\n }\n }}\n style={{\n borderTopLeftRadius: ctx.reduce || !isTop ? RADIUS : nearRadius,\n borderTopRightRadius: ctx.reduce || !isTop ? RADIUS : nearRadius,\n borderBottomLeftRadius: ctx.reduce || isTop ? RADIUS : nearRadius,\n borderBottomRightRadius: ctx.reduce || isTop ? RADIUS : nearRadius,\n }}\n className={cn(\n \"border-border bg-background text-foreground relative z-10 flex w-full items-center justify-between gap-2 border px-3 py-2 text-sm transition-colors outline-none\",\n \"focus-visible:ring-foreground/20 hover:border-(--color-border-strong) focus-visible:ring-2\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n className,\n )}\n >\n {children}\n <motion.span aria-hidden style={{ rotate }} className=\"text-muted-foreground\">\n <ChevronDown className=\"h-4 w-4\" />\n </motion.span>\n </motion.button>\n );\n}\n\nexport interface SelectValueProps {\n placeholder?: string;\n className?: string;\n}\n\nexport function SelectValue({ placeholder, className }: SelectValueProps) {\n const ctx = useSelectContext(\"SelectValue\");\n const label = ctx.labelFor(ctx.value);\n return (\n <span className={cn(label ? \"text-foreground\" : \"text-muted-foreground\", className)}>\n {label ?? placeholder ?? \"Select\"}\n </span>\n );\n}\n\nexport interface SelectContentProps {\n className?: string;\n children: ReactNode;\n}\n\nexport function SelectContent({ className, children }: SelectContentProps) {\n const ctx = useSelectContext(\"SelectContent\");\n const panelRef = useRef<HTMLDivElement>(null);\n const [height, setHeight] = useState(0);\n const { open, progress, reduce, setPlacement } = ctx;\n const { activeId, onKeyDown } = useListbox({\n open,\n rows: ctx.rows,\n selected: ctx.value,\n list: panelRef,\n });\n\n // Keep descendants laid out while hidden: display:none resets nested\n // scrollers in Chromium. Collapse only the hidden outer footprint after\n // exit so it cannot extend page scrolling. Opening restores the full box\n // before measurement or focus; neither layout change is animated.\n const [exiting, setExiting] = useState(false);\n const [wasOpen, setWasOpen] = useState(open);\n if (open !== wasOpen) {\n setWasOpen(open);\n if (!open) setExiting(true);\n }\n const present = open || exiting;\n useMotionValueEvent(progress, \"animationComplete\", () => {\n if (progress.get() === 0) setExiting(false);\n });\n\n useLayoutEffect(() => {\n const node = panelRef.current;\n if (!node || !present) return;\n const measure = () => setHeight(node.offsetHeight);\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(node);\n return () => observer.disconnect();\n }, [present]);\n\n // On open, flip upward when there isn't room below and there's more above.\n useLayoutEffect(() => {\n if (!open) return;\n const trigger = document.getElementById(ctx.triggerId);\n const node = panelRef.current;\n if (!trigger || !node) return;\n const rect = trigger.getBoundingClientRect();\n const h = node.offsetHeight;\n const below = window.innerHeight - rect.bottom;\n const above = rect.top;\n setPlacement(below < h + 16 && above > below ? \"top\" : \"bottom\");\n }, [open, ctx.triggerId, setPlacement]);\n\n const isTop = ctx.placement === \"top\";\n\n // Reveal a full-size panel from its near edge. No ancestor scales the list,\n // so rows, borders and shadow keep their natural thickness. The clip and\n // corner writes can paint; only the gap uses a transform. All read one\n // progress value, with no animated layout properties.\n const ready = height > 0 && !reduce;\n const fromY = ready ? (isTop ? GAP : -GAP) : 0;\n const detach = useTransform(progress, [0.4, 1], [0, 1]);\n const y = useTransform(detach, (d) => lerp(fromY, 0, d));\n const nearRadius = useTransform(detach, (d) => (ready ? RADIUS * d : RADIUS));\n const borderRadius = useTransform(nearRadius, (near) =>\n isTop\n ? `${RADIUS}px ${RADIUS}px ${near}px ${near}px`\n : `${near}px ${near}px ${RADIUS}px ${RADIUS}px`,\n );\n const clipPath = useTransform([progress, nearRadius], ([p, near]: number[]) => {\n if (!ready) return \"none\";\n // Clamp overshoot so the clip never extends into the trigger or exposes\n // overflowing children. At rest remove it so the native shadow is whole.\n const reveal = Math.min(1, Math.max(0, p));\n if (reveal === 1) return \"none\";\n const hidden = Math.max(0, (height - LIP) * (1 - reveal));\n const inset = isTop ? `${hidden}px 0 0 0` : `0 0 ${hidden}px 0`;\n const corners = isTop\n ? `${RADIUS}px ${RADIUS}px ${near}px ${near}px`\n : `${near}px ${near}px ${RADIUS}px ${RADIUS}px`;\n return `inset(${inset} round ${corners})`;\n });\n // The surface materialises over its first frames rather than popping in as\n // a lip; with reduced motion the fade is the whole entrance.\n const opacity = useTransform(progress, reduce ? [0, 1] : [0, 0.12], [0, 1]);\n\n return (\n <motion.div\n ref={panelRef}\n id={ctx.listId}\n role=\"listbox\"\n aria-labelledby={ctx.triggerId}\n aria-hidden={!open}\n inert={!open}\n onKeyDown={(event) => {\n // Tab leaves the list from the trigger, so focus moves on to the\n // control after the select rather than into the closing panel.\n if (event.key === \"Tab\") ctx.close();\n else onKeyDown(event);\n }}\n style={{\n visibility: present ? undefined : \"hidden\",\n maxHeight: present ? undefined : 0,\n borderWidth: present ? undefined : 0,\n y,\n clipPath,\n borderRadius,\n opacity,\n pointerEvents: open ? \"auto\" : \"none\",\n marginTop: isTop ? 0 : GAP,\n marginBottom: isTop ? GAP : 0,\n }}\n // flush against the trigger, then separates into its own rounded pill;\n // sits above or below depending on available space\n className={cn(\n \"border-border bg-background absolute right-0 left-0 z-20 overflow-hidden border shadow-lg\",\n isTop ? \"bottom-full\" : \"top-full\",\n className,\n )}\n >\n <ActiveOptionContext.Provider value={activeId}>\n <motion.div initial={false} animate={open ? \"show\" : \"hidden\"} className=\"p-1\">\n {children}\n </motion.div>\n </ActiveOptionContext.Provider>\n </motion.div>\n );\n}\n\nexport interface SelectItemProps {\n value: string;\n disabled?: boolean;\n className?: string;\n children: ReactNode;\n}\n\nexport function SelectItem({ value, disabled = false, className, children }: SelectItemProps) {\n const ctx = useSelectContext(\"SelectItem\");\n const activeId = useContext(ActiveOptionContext);\n const selected = ctx.value === value;\n const label = typeof children === \"string\" ? children : value;\n\n useLayoutEffect(() => {\n ctx.register(value, label, disabled);\n }, [ctx.register, value, label, disabled]);\n useLayoutEffect(() => () => ctx.unregister(value), [ctx.unregister, value]);\n\n return (\n <motion.div variants={ctx.reduce ? undefined : ITEM_VARIANTS}>\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={selected}\n disabled={disabled}\n // One tab stop: the active option, which focus follows while open.\n tabIndex={activeId === value ? 0 : -1}\n data-listbox-id={value}\n onClick={() => ctx.select(value)}\n className={cn(\n \"flex w-full items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm transition-colors outline-none\",\n selected\n ? \"bg-muted text-foreground\"\n : \"text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:bg-muted\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n className,\n )}\n >\n {children}\n {selected ? <Check className=\"h-3.5 w-3.5 shrink-0\" /> : null}\n </button>\n </motion.div>\n );\n}\n"],"mappings":";;;;;;;;;AAkCA,MAAM,gBAAgB;CACpB,MAAM;CACN,gBAAgB;CAChB,QAAQ;AACV;AAEA,MAAM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,WAAW,YAA6B;CAC5F,MAAM,MAAM,iBAAiB,YAAY;CACzC,MAAM,WAAW,WAAW,mBAAmB;CAC/C,MAAM,WAAW,IAAI,UAAU;CAC/B,MAAM,QAAQ,OAAO,aAAa,WAAW,WAAW;CAExD,sBAAsB;EACpB,IAAI,SAAS,OAAO,OAAO,QAAQ;CACrC,GAAG;EAAC,IAAI;EAAU;EAAO;EAAO;CAAQ,CAAC;CACzC,4BAA4B,IAAI,WAAW,KAAK,GAAG,CAAC,IAAI,YAAY,KAAK,CAAC;CAE1E,OACE,oBAAC,OAAO,KAAR;EAAY,UAAU,IAAI,SAAS,KAAA,IAAY;EAC7C,UAAA,qBAAC,UAAD;GACE,MAAK;GACL,MAAK;GACL,iBAAe;GACL;GAEV,UAAU,aAAa,QAAQ,IAAI;GACnC,mBAAiB;GACjB,eAAe,IAAI,OAAO,KAAK;GAC/B,WAAW,GACT,4HACA,WACI,6BACA,qFACJ,oDACA,SACF;GAhBF,UAAA,CAkBG,UACA,WAAW,oBAAC,OAAD,EAAO,WAAU,uBAAwB,CAAA,IAAI,IACnD;;CACE,CAAA;AAEhB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ColorPanelsProps, DitheringProps, DotGridProps, DotOrbitProps, GodRaysProps, GrainGradientProps, MeshGradientProps, MetaballsProps, NeuroNoiseProps, PerlinNoiseProps, PulsingBorderProps, SimplexNoiseProps, SmokeRingProps, SpiralProps, StaticMeshGradientProps, StaticRadialGradientProps, SwirlProps, VoronoiProps, WarpProps, WaterProps, WavesProps } from "@paper-design/shaders-react";
|
|
2
|
-
//#region src/components/motion/shader-background.d.ts
|
|
3
2
|
type ShaderVariantProps = {
|
|
4
3
|
"mesh-gradient": MeshGradientProps;
|
|
5
4
|
"grain-gradient": GrainGradientProps;
|
|
@@ -29,10 +28,10 @@ export type ShaderBackgroundProps = { [K in ShaderBackgroundVariant]: {
|
|
|
29
28
|
} & ShaderVariantProps[K]; }[ShaderBackgroundVariant];
|
|
30
29
|
export declare const SHADER_BACKGROUND_VARIANTS: ShaderBackgroundVariant[];
|
|
31
30
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* Reduced motion freezes every animating variant at speed 0, whether or not
|
|
32
|
+
* the caller passed `speed`: the shaders animate by default when it is left
|
|
33
|
+
* out.
|
|
34
34
|
*/
|
|
35
35
|
export declare function ShaderBackground({ variant, className, ...rest }: ShaderBackgroundProps): import("react").JSX.Element;
|
|
36
|
-
//#endregion
|
|
37
36
|
export {};
|
|
38
37
|
//# sourceMappingURL=shader-background.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader-background.d.ts","names":[],"sources":["../../../src/components/motion/shader-background.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader-background.d.ts","names":[],"sources":["../../../src/components/motion/shader-background.tsx"],"mappings":";KAmDK;EACH,iBAAiB;EACjB,kBAAkB;EAClB,YAAY;EACZ,aAAa;EACb,MAAM;EACN,OAAO;EACP,OAAO;EACP,SAAS;EACT,OAAO;EACP,cAAc;EACd,0BAA0B;EAC1B,eAAe;EACf,WAAW;EACX,YAAY;EACZ,QAAQ;EACR,WAAW;EACX,kBAAkB;EAClB,gBAAgB;EAChB,wBAAwB;EACxB,iBAAiB;EACjB,gBAAgB;;YAGN,gCAAgC;YAEhC,2BACT,KAAK;EAA4B,SAAS;IAAM,mBAAmB,MACpE;qBA4BW,4BAER;;;;;;wBAaW,mBAAmB,SAAS,cAAc,QAAQ,wCAAqB,IAAA"}
|
|
@@ -3,7 +3,7 @@ import { cn } from "@kumix/utils";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { useReducedMotion } from "motion/react";
|
|
5
5
|
import { ColorPanels, Dithering, DotGrid, DotOrbit, GodRays, GrainGradient, MeshGradient, Metaballs, NeuroNoise, PerlinNoise, PulsingBorder, SimplexNoise, SmokeRing, Spiral, StaticMeshGradient, StaticRadialGradient, Swirl, Voronoi, Warp, Water, Waves } from "@paper-design/shaders-react";
|
|
6
|
-
|
|
6
|
+
// src/components/motion/shader-background.tsx
|
|
7
7
|
const VARIANT_COMPONENTS = {
|
|
8
8
|
"mesh-gradient": MeshGradient,
|
|
9
9
|
"grain-gradient": GrainGradient,
|
|
@@ -29,21 +29,26 @@ const VARIANT_COMPONENTS = {
|
|
|
29
29
|
};
|
|
30
30
|
const SHADER_BACKGROUND_VARIANTS = Object.keys(VARIANT_COMPONENTS);
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
32
|
+
* Variants with no `speed` param: static patterns that never animate, and that
|
|
33
|
+
* would pass an unknown `speed` through to their DOM node.
|
|
34
|
+
*/
|
|
35
|
+
const STATIC_VARIANTS = /* @__PURE__ */ new Set(["dot-grid", "waves"]);
|
|
36
|
+
/**
|
|
37
|
+
* Reduced motion freezes every animating variant at speed 0, whether or not
|
|
38
|
+
* the caller passed `speed`: the shaders animate by default when it is left
|
|
39
|
+
* out.
|
|
34
40
|
*/
|
|
35
41
|
function ShaderBackground({ variant, className, ...rest }) {
|
|
36
42
|
const reducedMotion = useReducedMotion();
|
|
37
43
|
const Shader = VARIANT_COMPONENTS[variant];
|
|
38
44
|
const props = rest;
|
|
39
|
-
const speedProps = reducedMotion &&
|
|
45
|
+
const speedProps = reducedMotion && !STATIC_VARIANTS.has(variant) ? { speed: 0 } : {};
|
|
40
46
|
return /* @__PURE__ */ jsx(Shader, {
|
|
41
47
|
...props,
|
|
42
48
|
...speedProps,
|
|
43
49
|
className: cn("h-full w-full", className)
|
|
44
50
|
});
|
|
45
51
|
}
|
|
46
|
-
//#endregion
|
|
47
52
|
export { SHADER_BACKGROUND_VARIANTS, ShaderBackground };
|
|
48
53
|
|
|
49
54
|
//# sourceMappingURL=shader-background.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader-background.js","names":[],"sources":["../../../src/components/motion/shader-background.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ComponentType } from \"react\";\nimport {\n ColorPanels,\n type ColorPanelsProps,\n Dithering,\n type DitheringProps,\n DotGrid,\n type DotGridProps,\n DotOrbit,\n type DotOrbitProps,\n GodRays,\n type GodRaysProps,\n GrainGradient,\n type GrainGradientProps,\n MeshGradient,\n type MeshGradientProps,\n Metaballs,\n type MetaballsProps,\n NeuroNoise,\n type NeuroNoiseProps,\n PerlinNoise,\n type PerlinNoiseProps,\n PulsingBorder,\n type PulsingBorderProps,\n SimplexNoise,\n type SimplexNoiseProps,\n SmokeRing,\n type SmokeRingProps,\n Spiral,\n type SpiralProps,\n StaticMeshGradient,\n type StaticMeshGradientProps,\n StaticRadialGradient,\n type StaticRadialGradientProps,\n Swirl,\n type SwirlProps,\n Voronoi,\n type VoronoiProps,\n Warp,\n type WarpProps,\n Water,\n type WaterProps,\n Waves,\n type WavesProps,\n} from \"@paper-design/shaders-react\";\nimport { useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\n\ntype ShaderVariantProps = {\n \"mesh-gradient\": MeshGradientProps;\n \"grain-gradient\": GrainGradientProps;\n \"dot-grid\": DotGridProps;\n \"dot-orbit\": DotOrbitProps;\n warp: WarpProps;\n waves: WavesProps;\n water: WaterProps;\n voronoi: VoronoiProps;\n swirl: SwirlProps;\n \"smoke-ring\": SmokeRingProps;\n \"static-radial-gradient\": StaticRadialGradientProps;\n \"neuro-noise\": NeuroNoiseProps;\n metaballs: MetaballsProps;\n \"god-rays\": GodRaysProps;\n spiral: SpiralProps;\n dithering: DitheringProps;\n \"pulsing-border\": PulsingBorderProps;\n \"color-panels\": ColorPanelsProps;\n \"static-mesh-gradient\": StaticMeshGradientProps;\n \"simplex-noise\": SimplexNoiseProps;\n \"perlin-noise\": PerlinNoiseProps;\n};\n\nexport type ShaderBackgroundVariant = keyof ShaderVariantProps;\n\nexport type ShaderBackgroundProps = {\n [K in ShaderBackgroundVariant]: { variant: K } & ShaderVariantProps[K];\n}[ShaderBackgroundVariant];\n\nconst VARIANT_COMPONENTS: {\n [K in ShaderBackgroundVariant]: ComponentType<ShaderVariantProps[K]>;\n} = {\n \"mesh-gradient\": MeshGradient,\n \"grain-gradient\": GrainGradient,\n \"dot-grid\": DotGrid,\n \"dot-orbit\": DotOrbit,\n warp: Warp,\n waves: Waves,\n water: Water,\n voronoi: Voronoi,\n swirl: Swirl,\n \"smoke-ring\": SmokeRing,\n \"static-radial-gradient\": StaticRadialGradient,\n \"neuro-noise\": NeuroNoise,\n metaballs: Metaballs,\n \"god-rays\": GodRays,\n spiral: Spiral,\n dithering: Dithering,\n \"pulsing-border\": PulsingBorder,\n \"color-panels\": ColorPanels,\n \"static-mesh-gradient\": StaticMeshGradient,\n \"simplex-noise\": SimplexNoise,\n \"perlin-noise\": PerlinNoise,\n};\n\nexport const SHADER_BACKGROUND_VARIANTS = Object.keys(\n VARIANT_COMPONENTS,\n) as ShaderBackgroundVariant[];\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"shader-background.js","names":[],"sources":["../../../src/components/motion/shader-background.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ComponentType } from \"react\";\nimport {\n ColorPanels,\n type ColorPanelsProps,\n Dithering,\n type DitheringProps,\n DotGrid,\n type DotGridProps,\n DotOrbit,\n type DotOrbitProps,\n GodRays,\n type GodRaysProps,\n GrainGradient,\n type GrainGradientProps,\n MeshGradient,\n type MeshGradientProps,\n Metaballs,\n type MetaballsProps,\n NeuroNoise,\n type NeuroNoiseProps,\n PerlinNoise,\n type PerlinNoiseProps,\n PulsingBorder,\n type PulsingBorderProps,\n SimplexNoise,\n type SimplexNoiseProps,\n SmokeRing,\n type SmokeRingProps,\n Spiral,\n type SpiralProps,\n StaticMeshGradient,\n type StaticMeshGradientProps,\n StaticRadialGradient,\n type StaticRadialGradientProps,\n Swirl,\n type SwirlProps,\n Voronoi,\n type VoronoiProps,\n Warp,\n type WarpProps,\n Water,\n type WaterProps,\n Waves,\n type WavesProps,\n} from \"@paper-design/shaders-react\";\nimport { useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\n\ntype ShaderVariantProps = {\n \"mesh-gradient\": MeshGradientProps;\n \"grain-gradient\": GrainGradientProps;\n \"dot-grid\": DotGridProps;\n \"dot-orbit\": DotOrbitProps;\n warp: WarpProps;\n waves: WavesProps;\n water: WaterProps;\n voronoi: VoronoiProps;\n swirl: SwirlProps;\n \"smoke-ring\": SmokeRingProps;\n \"static-radial-gradient\": StaticRadialGradientProps;\n \"neuro-noise\": NeuroNoiseProps;\n metaballs: MetaballsProps;\n \"god-rays\": GodRaysProps;\n spiral: SpiralProps;\n dithering: DitheringProps;\n \"pulsing-border\": PulsingBorderProps;\n \"color-panels\": ColorPanelsProps;\n \"static-mesh-gradient\": StaticMeshGradientProps;\n \"simplex-noise\": SimplexNoiseProps;\n \"perlin-noise\": PerlinNoiseProps;\n};\n\nexport type ShaderBackgroundVariant = keyof ShaderVariantProps;\n\nexport type ShaderBackgroundProps = {\n [K in ShaderBackgroundVariant]: { variant: K } & ShaderVariantProps[K];\n}[ShaderBackgroundVariant];\n\nconst VARIANT_COMPONENTS: {\n [K in ShaderBackgroundVariant]: ComponentType<ShaderVariantProps[K]>;\n} = {\n \"mesh-gradient\": MeshGradient,\n \"grain-gradient\": GrainGradient,\n \"dot-grid\": DotGrid,\n \"dot-orbit\": DotOrbit,\n warp: Warp,\n waves: Waves,\n water: Water,\n voronoi: Voronoi,\n swirl: Swirl,\n \"smoke-ring\": SmokeRing,\n \"static-radial-gradient\": StaticRadialGradient,\n \"neuro-noise\": NeuroNoise,\n metaballs: Metaballs,\n \"god-rays\": GodRays,\n spiral: Spiral,\n dithering: Dithering,\n \"pulsing-border\": PulsingBorder,\n \"color-panels\": ColorPanels,\n \"static-mesh-gradient\": StaticMeshGradient,\n \"simplex-noise\": SimplexNoise,\n \"perlin-noise\": PerlinNoise,\n};\n\nexport const SHADER_BACKGROUND_VARIANTS = Object.keys(\n VARIANT_COMPONENTS,\n) as ShaderBackgroundVariant[];\n\n/**\n * Variants with no `speed` param: static patterns that never animate, and that\n * would pass an unknown `speed` through to their DOM node.\n */\nconst STATIC_VARIANTS = new Set<ShaderBackgroundVariant>([\"dot-grid\", \"waves\"]);\n\n/**\n * Reduced motion freezes every animating variant at speed 0, whether or not\n * the caller passed `speed`: the shaders animate by default when it is left\n * out.\n */\nexport function ShaderBackground({ variant, className, ...rest }: ShaderBackgroundProps) {\n const reducedMotion = useReducedMotion();\n const Shader = VARIANT_COMPONENTS[variant] as ComponentType<Record<string, unknown>>;\n const props = rest as Record<string, unknown>;\n const speedProps = reducedMotion && !STATIC_VARIANTS.has(variant) ? { speed: 0 } : {};\n\n return <Shader {...props} {...speedProps} className={cn(\"h-full w-full\", className)} />;\n}\n"],"mappings":";;;;;;AAiFA,MAAM,qBAEF;CACF,iBAAiB;CACjB,kBAAkB;CAClB,YAAY;CACZ,aAAa;CACb,MAAM;CACN,OAAO;CACP,OAAO;CACP,SAAS;CACT,OAAO;CACP,cAAc;CACd,0BAA0B;CAC1B,eAAe;CACf,WAAW;CACX,YAAY;CACZ,QAAQ;CACR,WAAW;CACX,kBAAkB;CAClB,gBAAgB;CAChB,wBAAwB;CACxB,iBAAiB;CACjB,gBAAgB;AAClB;AAEA,MAAa,6BAA6B,OAAO,KAC/C,kBACF;;;;;AAMA,MAAM,kCAAkB,IAAI,IAA6B,CAAC,YAAY,OAAO,CAAC;;;;;;AAO9E,SAAgB,iBAAiB,EAAE,SAAS,WAAW,GAAG,QAA+B;CACvF,MAAM,gBAAgB,iBAAiB;CACvC,MAAM,SAAS,mBAAmB;CAClC,MAAM,QAAQ;CACd,MAAM,aAAa,iBAAiB,CAAC,gBAAgB,IAAI,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC;CAEpF,OAAO,oBAAC,QAAD;EAAQ,GAAI;EAAO,GAAI;EAAY,WAAW,GAAG,iBAAiB,SAAS;CAAI,CAAA;AACxF"}
|