@kumix/ui 0.3.13 → 0.3.15
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 +12 -12
- package/dist/components/agents/agent-activity/activity-row.js +1 -1
- package/dist/components/agents/agent-activity/activity-row.js.map +1 -1
- package/dist/components/agents/agent-activity/index.js +1 -1
- package/dist/components/agents/agent-activity/index.js.map +1 -1
- package/dist/components/agents/agent-code.d.ts.map +1 -1
- package/dist/components/agents/agent-code.js +1 -1
- package/dist/components/agents/agent-code.js.map +1 -1
- package/dist/components/agents/agent-disclosure.js +1 -1
- package/dist/components/agents/agent-disclosure.js.map +1 -1
- package/dist/components/agents/ai-sidebar.js +1 -1
- package/dist/components/agents/ai-sidebar.js.map +1 -1
- package/dist/components/agents/approval-card/index.js +1 -1
- package/dist/components/agents/approval-card/index.js.map +1 -1
- package/dist/components/agents/chat-app.js +1 -1
- package/dist/components/agents/chat-app.js.map +1 -1
- package/dist/components/agents/citations.js +1 -1
- package/dist/components/agents/citations.js.map +1 -1
- package/dist/components/agents/code-block.js +1 -1
- package/dist/components/agents/code-block.js.map +1 -1
- package/dist/components/agents/file-diff.js +1 -1
- package/dist/components/agents/file-diff.js.map +1 -1
- package/dist/components/agents/image-generation.js +1 -1
- package/dist/components/agents/image-generation.js.map +1 -1
- package/dist/components/agents/loading-states/agent-progress.js +1 -1
- package/dist/components/agents/loading-states/agent-progress.js.map +1 -1
- package/dist/components/agents/loading-states/reasoning-text.js +1 -1
- package/dist/components/agents/loading-states/reasoning-text.js.map +1 -1
- package/dist/components/agents/loading-states/thinking-shimmer.js +1 -1
- package/dist/components/agents/loading-states/thinking-shimmer.js.map +1 -1
- package/dist/components/agents/message-bubble.js +1 -1
- package/dist/components/agents/message-bubble.js.map +1 -1
- package/dist/components/agents/message-scroller.js +1 -1
- package/dist/components/agents/message-scroller.js.map +1 -1
- package/dist/components/agents/message.js +1 -1
- package/dist/components/agents/message.js.map +1 -1
- package/dist/components/agents/prompt-input.js +1 -1
- package/dist/components/agents/prompt-input.js.map +1 -1
- package/dist/components/agents/streaming-response.js +1 -1
- package/dist/components/agents/streaming-response.js.map +1 -1
- package/dist/components/agents/todo-list.js +1 -1
- package/dist/components/agents/todo-list.js.map +1 -1
- package/dist/components/agents/tool-approval.js +1 -1
- package/dist/components/agents/tool-approval.js.map +1 -1
- package/dist/components/agents/tool-result.js +1 -1
- package/dist/components/agents/tool-result.js.map +1 -1
- package/dist/components/motion/action-swap.js +1 -1
- package/dist/components/motion/action-swap.js.map +1 -1
- package/dist/components/motion/adaptive-stepper.js +1 -1
- package/dist/components/motion/adaptive-stepper.js.map +1 -1
- package/dist/components/motion/animated-badge.js +1 -1
- package/dist/components/motion/animated-badge.js.map +1 -1
- package/dist/components/motion/animated-number.js +1 -1
- package/dist/components/motion/animated-number.js.map +1 -1
- package/dist/components/motion/animated-sidebar.js +1 -1
- package/dist/components/motion/animated-sidebar.js.map +1 -1
- package/dist/components/motion/animated-toast-stack.js +5 -4
- package/dist/components/motion/animated-toast-stack.js.map +1 -1
- package/dist/components/motion/attachment-upload.js +1 -1
- package/dist/components/motion/attachment-upload.js.map +1 -1
- package/dist/components/motion/availability-scheduler/icon-button.js +1 -1
- package/dist/components/motion/availability-scheduler/icon-button.js.map +1 -1
- package/dist/components/motion/availability-scheduler/index.js +1 -1
- package/dist/components/motion/availability-scheduler/index.js.map +1 -1
- package/dist/components/motion/bloom-menu.js +1 -1
- package/dist/components/motion/bloom-menu.js.map +1 -1
- package/dist/components/motion/bottom-sheet.js +1 -1
- package/dist/components/motion/bottom-sheet.js.map +1 -1
- package/dist/components/motion/bounce-sidebar.d.ts.map +1 -1
- package/dist/components/motion/bounce-sidebar.js +1 -1
- package/dist/components/motion/bounce-sidebar.js.map +1 -1
- package/dist/components/motion/bouncy-accordion.js +1 -1
- package/dist/components/motion/bouncy-accordion.js.map +1 -1
- package/dist/components/motion/button/base.js +1 -1
- package/dist/components/motion/button/base.js.map +1 -1
- package/dist/components/motion/button/metallic.js +1 -1
- package/dist/components/motion/button/metallic.js.map +1 -1
- package/dist/components/motion/card-folder.js +1 -1
- package/dist/components/motion/card-folder.js.map +1 -1
- package/dist/components/motion/center-morph-modal.js +1 -1
- package/dist/components/motion/center-morph-modal.js.map +1 -1
- package/dist/components/motion/checkbox.js +1 -1
- package/dist/components/motion/checkbox.js.map +1 -1
- package/dist/components/motion/chromatic-text-reveal.js +1 -1
- package/dist/components/motion/chromatic-text-reveal.js.map +1 -1
- package/dist/components/motion/combobox/content.js +1 -1
- package/dist/components/motion/combobox/content.js.map +1 -1
- package/dist/components/motion/combobox/context.js +1 -1
- package/dist/components/motion/combobox/context.js.map +1 -1
- package/dist/components/motion/combobox/list.js +1 -1
- package/dist/components/motion/combobox/list.js.map +1 -1
- package/dist/components/motion/combobox/trigger.js +1 -1
- package/dist/components/motion/combobox/trigger.js.map +1 -1
- package/dist/components/motion/command-palette.d.ts.map +1 -1
- package/dist/components/motion/command-palette.js +3 -22
- package/dist/components/motion/command-palette.js.map +1 -1
- package/dist/components/motion/context-menu.js +1 -1
- package/dist/components/motion/context-menu.js.map +1 -1
- package/dist/components/motion/cylinder-carousel.js +1 -1
- package/dist/components/motion/cylinder-carousel.js.map +1 -1
- package/dist/components/motion/digit-swap.js +1 -1
- package/dist/components/motion/digit-swap.js.map +1 -1
- package/dist/components/motion/dock.js +1 -1
- package/dist/components/motion/dock.js.map +1 -1
- package/dist/components/motion/drawer.js +1 -1
- package/dist/components/motion/drawer.js.map +1 -1
- package/dist/components/motion/dynamic-island.js +1 -1
- package/dist/components/motion/dynamic-island.js.map +1 -1
- package/dist/components/motion/expandable-action-bar.js +1 -1
- package/dist/components/motion/expandable-action-bar.js.map +1 -1
- package/dist/components/motion/expandable-control.d.ts.map +1 -1
- package/dist/components/motion/expandable-control.js +1 -1
- package/dist/components/motion/expandable-control.js.map +1 -1
- package/dist/components/motion/expandable-tabs.js +1 -1
- package/dist/components/motion/expandable-tabs.js.map +1 -1
- package/dist/components/motion/expanding-arrow-button.js +1 -1
- package/dist/components/motion/expanding-arrow-button.js.map +1 -1
- package/dist/components/motion/feedback-widget.js +1 -1
- package/dist/components/motion/feedback-widget.js.map +1 -1
- package/dist/components/motion/file-tree.js +1 -1
- package/dist/components/motion/file-tree.js.map +1 -1
- package/dist/components/motion/file-upload.js +1 -1
- package/dist/components/motion/file-upload.js.map +1 -1
- package/dist/components/motion/hold-action-button.js +1 -1
- package/dist/components/motion/hold-action-button.js.map +1 -1
- package/dist/components/motion/infinite-masonry.js +1 -1
- package/dist/components/motion/infinite-masonry.js.map +1 -1
- package/dist/components/motion/input.d.ts.map +1 -1
- package/dist/components/motion/input.js +1 -1
- package/dist/components/motion/input.js.map +1 -1
- package/dist/components/motion/liquid.js +1 -1
- package/dist/components/motion/liquid.js.map +1 -1
- package/dist/components/motion/loader.js +1 -1
- package/dist/components/motion/loader.js.map +1 -1
- package/dist/components/motion/magnetic.js +1 -1
- package/dist/components/motion/magnetic.js.map +1 -1
- package/dist/components/motion/marquee.d.ts.map +1 -1
- package/dist/components/motion/marquee.js +1 -1
- package/dist/components/motion/marquee.js.map +1 -1
- package/dist/components/motion/morphing-modal.js +1 -1
- package/dist/components/motion/morphing-modal.js.map +1 -1
- package/dist/components/motion/morphing-search.js +1 -1
- package/dist/components/motion/morphing-search.js.map +1 -1
- package/dist/components/motion/morphing-tabs.js +1 -1
- package/dist/components/motion/morphing-tabs.js.map +1 -1
- package/dist/components/motion/multi-select/content.js +1 -1
- package/dist/components/motion/multi-select/content.js.map +1 -1
- package/dist/components/motion/multi-select/context.js +1 -1
- package/dist/components/motion/multi-select/context.js.map +1 -1
- package/dist/components/motion/multi-select/list.js +1 -1
- package/dist/components/motion/multi-select/list.js.map +1 -1
- package/dist/components/motion/multi-select/trigger.js +1 -1
- package/dist/components/motion/multi-select/trigger.js.map +1 -1
- package/dist/components/motion/not-found/magnetic.d.ts.map +1 -1
- package/dist/components/motion/not-found/magnetic.js +1 -1
- package/dist/components/motion/not-found/magnetic.js.map +1 -1
- package/dist/components/motion/not-found/shared.js +1 -1
- package/dist/components/motion/not-found/shared.js.map +1 -1
- package/dist/components/motion/not-found/spotlight.js +1 -1
- package/dist/components/motion/not-found/spotlight.js.map +1 -1
- package/dist/components/motion/notification-stack.js +1 -1
- package/dist/components/motion/notification-stack.js.map +1 -1
- package/dist/components/motion/number-ticker.js +1 -1
- package/dist/components/motion/number-ticker.js.map +1 -1
- package/dist/components/motion/otp-input.js +1 -1
- package/dist/components/motion/otp-input.js.map +1 -1
- package/dist/components/motion/overflow-actions.js +1 -1
- package/dist/components/motion/overflow-actions.js.map +1 -1
- package/dist/components/motion/parallax.d.ts.map +1 -1
- package/dist/components/motion/parallax.js +1 -1
- package/dist/components/motion/parallax.js.map +1 -1
- package/dist/components/motion/popover-morph.js +1 -1
- package/dist/components/motion/popover-morph.js.map +1 -1
- package/dist/components/motion/popover.js +1 -1
- package/dist/components/motion/popover.js.map +1 -1
- package/dist/components/motion/preview-rail.js +1 -1
- package/dist/components/motion/preview-rail.js.map +1 -1
- package/dist/components/motion/project-folder.js +1 -1
- package/dist/components/motion/project-folder.js.map +1 -1
- package/dist/components/motion/pull-to-refresh.js +1 -1
- package/dist/components/motion/pull-to-refresh.js.map +1 -1
- package/dist/components/motion/radio.js +1 -1
- package/dist/components/motion/radio.js.map +1 -1
- package/dist/components/motion/range-slider-bubble.js +1 -1
- package/dist/components/motion/range-slider-bubble.js.map +1 -1
- package/dist/components/motion/range-slider-fluid.js +1 -1
- package/dist/components/motion/range-slider-fluid.js.map +1 -1
- package/dist/components/motion/range-slider-inline.d.ts +18 -0
- package/dist/components/motion/range-slider-inline.d.ts.map +1 -0
- package/dist/components/motion/range-slider-inline.js +267 -0
- package/dist/components/motion/range-slider-inline.js.map +1 -0
- package/dist/components/motion/range-slider-ruler.js +1 -1
- package/dist/components/motion/range-slider-ruler.js.map +1 -1
- package/dist/components/motion/range-slider-wave.js +1 -1
- package/dist/components/motion/range-slider-wave.js.map +1 -1
- package/dist/components/motion/range-slider.d.ts.map +1 -1
- package/dist/components/motion/range-slider.js +27 -11
- package/dist/components/motion/range-slider.js.map +1 -1
- package/dist/components/motion/scroll-progress.js +1 -1
- package/dist/components/motion/scroll-progress.js.map +1 -1
- package/dist/components/motion/scroll-reveal.js +1 -1
- package/dist/components/motion/scroll-reveal.js.map +1 -1
- package/dist/components/motion/scroll-to.js +1 -1
- package/dist/components/motion/scroll-to.js.map +1 -1
- package/dist/components/motion/select-morph.d.ts.map +1 -1
- package/dist/components/motion/select-morph.js +1 -1
- package/dist/components/motion/select-morph.js.map +1 -1
- package/dist/components/motion/select.js +1 -1
- package/dist/components/motion/select.js.map +1 -1
- package/dist/components/motion/shader-background.d.ts.map +1 -1
- package/dist/components/motion/shader-background.js +1 -1
- package/dist/components/motion/shader-background.js.map +1 -1
- package/dist/components/motion/shared-layout-bg.js +1 -1
- package/dist/components/motion/shared-layout-bg.js.map +1 -1
- package/dist/components/motion/signup-form.js +1 -1
- package/dist/components/motion/signup-form.js.map +1 -1
- package/dist/components/motion/slide-action-button.js +1 -1
- package/dist/components/motion/slide-action-button.js.map +1 -1
- package/dist/components/motion/swipeable-list.js +1 -1
- package/dist/components/motion/swipeable-list.js.map +1 -1
- package/dist/components/motion/switch.d.ts.map +1 -1
- package/dist/components/motion/switch.js +1 -1
- package/dist/components/motion/switch.js.map +1 -1
- package/dist/components/motion/table/index.js +1 -1
- package/dist/components/motion/table/index.js.map +1 -1
- package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -1
- package/dist/components/motion/table/skeleton-rows.js +1 -1
- package/dist/components/motion/table/skeleton-rows.js.map +1 -1
- package/dist/components/motion/table/table-header.js +1 -1
- package/dist/components/motion/table/table-header.js.map +1 -1
- package/dist/components/motion/table/table-menu.js +1 -1
- package/dist/components/motion/table/table-menu.js.map +1 -1
- package/dist/components/motion/tabs.js +2 -2
- package/dist/components/motion/tabs.js.map +1 -1
- package/dist/components/motion/text-reveal.js +1 -1
- package/dist/components/motion/text-reveal.js.map +1 -1
- package/dist/components/motion/text-scramble.d.ts.map +1 -1
- package/dist/components/motion/text-scramble.js +1 -1
- package/dist/components/motion/text-scramble.js.map +1 -1
- package/dist/components/motion/text-shimmer.js +1 -1
- package/dist/components/motion/text-shimmer.js.map +1 -1
- package/dist/components/motion/theme-toggle.js +1 -1
- package/dist/components/motion/theme-toggle.js.map +1 -1
- package/dist/components/motion/tilt-card.js +1 -1
- package/dist/components/motion/tilt-card.js.map +1 -1
- package/dist/components/motion/tooltip-surface.d.ts +12 -0
- package/dist/components/motion/tooltip-surface.d.ts.map +1 -0
- package/dist/components/motion/tooltip-surface.js +97 -0
- package/dist/components/motion/tooltip-surface.js.map +1 -0
- package/dist/components/motion/tooltip.d.ts +13 -3
- package/dist/components/motion/tooltip.d.ts.map +1 -1
- package/dist/components/motion/tooltip.js +75 -104
- package/dist/components/motion/tooltip.js.map +1 -1
- package/dist/components/motion/wheel-picker.js +1 -1
- package/dist/components/motion/wheel-picker.js.map +1 -1
- package/dist/components/reui/alert.d.ts +1 -1
- package/dist/components/reui/alert.d.ts.map +1 -1
- package/dist/components/reui/alert.js +1 -1
- package/dist/components/reui/alert.js.map +1 -1
- package/dist/components/reui/autocomplete.d.ts +1 -1
- package/dist/components/reui/autocomplete.d.ts.map +1 -1
- package/dist/components/reui/autocomplete.js +2 -2
- package/dist/components/reui/autocomplete.js.map +1 -1
- package/dist/components/reui/badge.d.ts +2 -2
- package/dist/components/reui/badge.d.ts.map +1 -1
- package/dist/components/reui/badge.js +1 -1
- package/dist/components/reui/badge.js.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.js +1 -1
- package/dist/components/reui/cascader/cascader-columns.js.map +1 -1
- package/dist/components/reui/cascader/cascader-footer.js +1 -1
- package/dist/components/reui/cascader/cascader-footer.js.map +1 -1
- package/dist/components/reui/cascader/cascader-item.js +1 -1
- package/dist/components/reui/cascader/cascader-item.js.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.js +1 -1
- package/dist/components/reui/cascader/cascader-nav.js.map +1 -1
- package/dist/components/reui/cascader/cascader.js +1 -1
- package/dist/components/reui/cascader/cascader.js.map +1 -1
- package/dist/components/reui/code-block/code-block.js +1 -1
- package/dist/components/reui/code-block/code-block.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-cell-selection.js +1 -1
- package/dist/components/reui/data-grid/data-grid-cell-selection.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.js +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.js +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid.js +1 -1
- package/dist/components/reui/data-grid/data-grid.js.map +1 -1
- package/dist/components/reui/date-selector.js +1 -1
- package/dist/components/reui/date-selector.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-content.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-month-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-month-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-resource-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-resource-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
- package/dist/components/reui/filters/filters-advanced.js +1 -1
- package/dist/components/reui/filters/filters-advanced.js.map +1 -1
- package/dist/components/reui/filters/filters-builder.js +1 -1
- package/dist/components/reui/filters/filters-builder.js.map +1 -1
- package/dist/components/reui/filters/filters-chip.js +1 -1
- package/dist/components/reui/filters/filters-chip.js.map +1 -1
- package/dist/components/reui/filters/filters-editors.js +1 -1
- package/dist/components/reui/filters/filters-editors.js.map +1 -1
- package/dist/components/reui/filters/filters.js +1 -1
- package/dist/components/reui/filters/filters.js.map +1 -1
- package/dist/components/reui/frame.d.ts +6 -12
- package/dist/components/reui/frame.d.ts.map +1 -1
- package/dist/components/reui/frame.js +10 -17
- package/dist/components/reui/frame.js.map +1 -1
- package/dist/components/reui/gantt/gantt-bar.js +1 -1
- package/dist/components/reui/gantt/gantt-bar.js.map +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +1 -1
- package/dist/components/reui/gantt/gantt-nav.js.map +1 -1
- package/dist/components/reui/gantt/gantt-view.js +1 -1
- package/dist/components/reui/gantt/gantt-view.js.map +1 -1
- package/dist/components/reui/gantt/gantt.js +1 -1
- package/dist/components/reui/gantt/gantt.js.map +1 -1
- package/dist/components/reui/icon-stack.js +1 -1
- package/dist/components/reui/icon-stack.js.map +1 -1
- package/dist/components/reui/icon-tile.d.ts +2 -2
- package/dist/components/reui/icon-tile.d.ts.map +1 -1
- package/dist/components/reui/icon-tile.js +1 -1
- package/dist/components/reui/icon-tile.js.map +1 -1
- package/dist/components/reui/kanban.d.ts.map +1 -1
- package/dist/components/reui/kanban.js +1 -1
- package/dist/components/reui/kanban.js.map +1 -1
- package/dist/components/reui/number-field.d.ts +3 -3
- package/dist/components/reui/number-field.d.ts.map +1 -1
- package/dist/components/reui/number-field.js +4 -4
- package/dist/components/reui/number-field.js.map +1 -1
- package/dist/components/reui/phone-input.js +1 -1
- package/dist/components/reui/phone-input.js.map +1 -1
- package/dist/components/reui/rating.d.ts +1 -1
- package/dist/components/reui/rating.d.ts.map +1 -1
- package/dist/components/reui/rating.js +1 -1
- package/dist/components/reui/rating.js.map +1 -1
- package/dist/components/reui/sortable.d.ts.map +1 -1
- package/dist/components/reui/sortable.js +1 -1
- package/dist/components/reui/sortable.js.map +1 -1
- package/dist/components/reui/stepper.d.ts.map +1 -1
- package/dist/components/reui/stepper.js +1 -1
- package/dist/components/reui/stepper.js.map +1 -1
- package/dist/components/reui/timeline.d.ts.map +1 -1
- package/dist/components/reui/timeline.js +1 -1
- package/dist/components/reui/timeline.js.map +1 -1
- package/dist/components/reui/tree.d.ts.map +1 -1
- package/dist/components/reui/tree.js +1 -1
- package/dist/components/reui/tree.js.map +1 -1
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.js +1 -1
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +1 -1
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -1
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/attachment.d.ts +1 -1
- package/dist/components/ui/attachment.js +1 -1
- package/dist/components/ui/attachment.js.map +1 -1
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +1 -1
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble.d.ts +1 -1
- package/dist/components/ui/bubble.d.ts.map +1 -1
- package/dist/components/ui/bubble.js +1 -1
- package/dist/components/ui/bubble.js.map +1 -1
- package/dist/components/ui/button-group.js +1 -1
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.js +1 -1
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.js +1 -1
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +1 -1
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/combobox.js +1 -1
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +1 -1
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +1 -1
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +1 -1
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/field.js +1 -1
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +1 -1
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.d.ts +1 -1
- package/dist/components/ui/input-group.js +1 -1
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.d.ts +2 -2
- package/dist/components/ui/item.js +1 -1
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/kbd.js +1 -1
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/marker.d.ts +1 -1
- package/dist/components/ui/marker.d.ts.map +1 -1
- package/dist/components/ui/marker.js +1 -1
- package/dist/components/ui/marker.js.map +1 -1
- package/dist/components/ui/menubar.js +1 -1
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/message-scroller.js +1 -1
- package/dist/components/ui/message-scroller.js.map +1 -1
- package/dist/components/ui/message.d.ts.map +1 -1
- package/dist/components/ui/message.js +1 -1
- package/dist/components/ui/message.js.map +1 -1
- package/dist/components/ui/native-select.d.ts.map +1 -1
- package/dist/components/ui/native-select.js +1 -1
- package/dist/components/ui/native-select.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +1 -1
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.js +1 -1
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +1 -1
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/questionnaire.js +1 -1
- package/dist/components/ui/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +1 -1
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +1 -1
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +1 -1
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +1 -1
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner.js +1 -1
- package/dist/components/ui/spinner.js.map +1 -1
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +1 -1
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +1 -1
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toast.js +1 -1
- package/dist/components/ui/toast.js.map +1 -1
- package/dist/components/ui/toggle-group.js +1 -1
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +1 -1
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/hooks/use-dismiss.d.ts +1 -1
- package/dist/hooks/use-dismiss.d.ts.map +1 -1
- package/dist/hooks/use-dismiss.js.map +1 -1
- package/dist/lib/command-search.d.ts +10 -0
- package/dist/lib/command-search.d.ts.map +1 -0
- package/dist/lib/command-search.js +52 -0
- package/dist/lib/command-search.js.map +1 -0
- package/package.json +10 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","names":[],"sources":["../../../src/components/motion/tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useId,\n useMemo,\n useState,\n} from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"tabs.js","names":[],"sources":["../../../src/components/motion/tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useId,\n useMemo,\n useState,\n} from \"react\";\nimport { MotionConfig, motion, type Transition, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT } from \"../../lib/ease\";\n\ntype Variant = \"pill\" | \"underline\" | \"segment\";\n\ntype Ctx = {\n value: string;\n setValue: (v: string) => void;\n layoutId: string;\n variant: Variant;\n};\n\nconst TabsCtx = createContext<Ctx | null>(null);\n\nfunction useTabs() {\n const ctx = useContext(TabsCtx);\n if (!ctx) throw new Error(\"Tabs.* must be used inside <Tabs>\");\n return ctx;\n}\n\n// Settle without overshoot: a scrollable tab list would turn even a small\n// overshoot into a transient scrollbar and layout shift.\nconst transition: Transition = {\n type: \"spring\",\n stiffness: 170,\n damping: 30,\n mass: 1.2,\n};\n\nexport function Tabs({\n defaultValue,\n value,\n onValueChange,\n variant = \"pill\",\n children,\n className,\n}: {\n defaultValue?: string;\n value?: string;\n onValueChange?: (v: string) => void;\n variant?: Variant;\n children: ReactNode;\n className?: string;\n}) {\n const [internal, setInternal] = useState(defaultValue ?? \"\");\n const layoutId = useId();\n const reduce = useReducedMotion();\n const controlled = value !== undefined;\n const current = controlled ? value : internal;\n const setValue = useCallback(\n (v: string) => {\n if (!controlled) setInternal(v);\n onValueChange?.(v);\n },\n [controlled, onValueChange],\n );\n const contextValue = useMemo(\n () => ({ value: current, setValue, layoutId, variant }),\n [current, layoutId, setValue, variant],\n );\n return (\n <MotionConfig transition={reduce ? { duration: 0 } : transition}>\n <TabsCtx.Provider value={contextValue}>\n {/* layoutRoot: the indicator's layoutId measures in page coordinates, so\n inside fixed/scrolled containers it would replay scroll offsets as\n movement. The pill only ever travels within the list, so scoping\n projection to the Tabs wrapper is always correct. */}\n <motion.div layoutRoot className={className}>\n {children}\n </motion.div>\n </TabsCtx.Provider>\n </MotionConfig>\n );\n}\n\nconst listClasses: Record<Variant, string> = {\n pill: \"inline-flex items-center gap-1 rounded-full bg-card p-1\",\n underline: \"inline-flex items-center gap-1 border-b border-border\",\n segment: \"inline-flex items-center gap-0 rounded-lg bg-card p-0.5\",\n};\n\nexport function TabsList({ children, className }: { children: ReactNode; className?: string }) {\n const { variant } = useTabs();\n return (\n <div role=\"tablist\" className={cn(listClasses[variant], className)}>\n {children}\n </div>\n );\n}\n\nexport function TabsTrigger({\n value,\n children,\n className,\n indicatorClassName,\n}: {\n value: string;\n children: ReactNode;\n className?: string;\n indicatorClassName?: string;\n}) {\n const { value: current, setValue, layoutId, variant } = useTabs();\n const active = current === value;\n\n if (variant === \"underline\") {\n return (\n <button\n type=\"button\"\n role=\"tab\"\n aria-selected={active}\n onClick={() => setValue(value)}\n className={cn(\n \"relative isolate -mb-px inline-flex min-h-[44px] items-center px-3 pt-1 pb-2.5 font-medium text-sm transition-colors\",\n active ? \"text-foreground\" : \"text-muted-foreground hover:text-foreground\",\n className,\n )}\n >\n {children}\n {active ? (\n <motion.span\n layoutId={layoutId}\n layout=\"position\"\n className={cn(\"absolute right-0 -bottom-px left-0 h-px bg-primary\", indicatorClassName)}\n />\n ) : null}\n </button>\n );\n }\n\n const radius = variant === \"pill\" ? \"rounded-full\" : \"rounded-md\";\n\n return (\n <div className=\"relative\">\n {active ? (\n <motion.span\n layoutId={layoutId}\n layout=\"position\"\n style={{ borderRadius: variant === \"pill\" ? 9999 : 8 }}\n className={cn(\"absolute inset-0 bg-primary\", radius, indicatorClassName)}\n />\n ) : null}\n <button\n type=\"button\"\n role=\"tab\"\n aria-selected={active}\n onClick={() => setValue(value)}\n className={cn(\n \"relative z-10 inline-flex items-center justify-center whitespace-nowrap bg-transparent px-3.5 py-1.5 font-medium text-sm outline-none\",\n \"transition-colors\",\n active ? \"text-primary-foreground\" : \"text-muted-foreground hover:text-foreground\",\n radius,\n className,\n )}\n >\n {children}\n </button>\n </div>\n );\n}\n\nexport function TabsContent({\n value,\n children,\n className,\n}: {\n value: string;\n children: ReactNode;\n className?: string;\n}) {\n const { value: current } = useTabs();\n const reduce = useReducedMotion();\n const active = current === value;\n // Inactive panels stay mounted but hidden, so their content (e.g. source\n // code) is present in the server-rendered HTML for crawlers and assistive\n // tech, instead of being dropped from the DOM.\n if (!active) {\n return (\n <div hidden className={className}>\n {children}\n </div>\n );\n }\n return (\n <motion.div\n key={value}\n initial={{ opacity: 0, y: reduce ? 0 : 4 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.18, ease: EASE_OUT }}\n className={cn(\"mt-4\", className)}\n >\n {children}\n </motion.div>\n );\n}\n"],"mappings":";;;;;;;AAyBA,MAAM,UAAU,cAA0B,IAAI;AAE9C,SAAS,UAAU;CACjB,MAAM,MAAM,WAAW,OAAO;CAC9B,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,mCAAmC;CAC7D,OAAO;AACT;AAIA,MAAM,aAAyB;CAC7B,MAAM;CACN,WAAW;CACX,SAAS;CACT,MAAM;AACR;AAEA,SAAgB,KAAK,EACnB,cACA,OACA,eACA,UAAU,QACV,UACA,aAQC;CACD,MAAM,CAAC,UAAU,eAAe,SAAS,gBAAgB,EAAE;CAC3D,MAAM,WAAW,MAAM;CACvB,MAAM,SAAS,iBAAiB;CAChC,MAAM,aAAa,UAAU,KAAA;CAC7B,MAAM,UAAU,aAAa,QAAQ;CACrC,MAAM,WAAW,aACd,MAAc;EACb,IAAI,CAAC,YAAY,YAAY,CAAC;EAC9B,gBAAgB,CAAC;CACnB,GACA,CAAC,YAAY,aAAa,CAC5B;CACA,MAAM,eAAe,eACZ;EAAE,OAAO;EAAS;EAAU;EAAU;CAAQ,IACrD;EAAC;EAAS;EAAU;EAAU;CAAO,CACvC;CACA,OACE,oBAAC,cAAD;EAAc,YAAY,SAAS,EAAE,UAAU,EAAE,IAAI;EACnD,UAAA,oBAAC,QAAQ,UAAT;GAAkB,OAAO;GAKvB,UAAA,oBAAC,OAAO,KAAR;IAAY,YAAA;IAAsB;IAC/B;GACS,CAAA;EACI,CAAA;CACN,CAAA;AAElB;AAEA,MAAM,cAAuC;CAC3C,MAAM;CACN,WAAW;CACX,SAAS;AACX;AAEA,SAAgB,SAAS,EAAE,UAAU,aAA0D;CAC7F,MAAM,EAAE,YAAY,QAAQ;CAC5B,OACE,oBAAC,OAAD;EAAK,MAAK;EAAU,WAAW,GAAG,YAAY,UAAU,SAAS;EAC9D;CACE,CAAA;AAET;AAEA,SAAgB,YAAY,EAC1B,OACA,UACA,WACA,sBAMC;CACD,MAAM,EAAE,OAAO,SAAS,UAAU,UAAU,YAAY,QAAQ;CAChE,MAAM,SAAS,YAAY;CAE3B,IAAI,YAAY,aACd,OACE,qBAAC,UAAD;EACE,MAAK;EACL,MAAK;EACL,iBAAe;EACf,eAAe,SAAS,KAAK;EAC7B,WAAW,GACT,wHACA,SAAS,oBAAoB,+CAC7B,SACF;EATF,UAAA,CAWG,UACA,SACC,oBAAC,OAAO,MAAR;GACY;GACV,QAAO;GACP,WAAW,GAAG,sDAAsD,kBAAkB;EACvF,CAAA,IACC,IACE;;CAIZ,MAAM,SAAS,YAAY,SAAS,iBAAiB;CAErD,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACG,SACC,oBAAC,OAAO,MAAR;GACY;GACV,QAAO;GACP,OAAO,EAAE,cAAc,YAAY,SAAS,OAAO,EAAE;GACrD,WAAW,GAAG,+BAA+B,QAAQ,kBAAkB;EACxE,CAAA,IACC,MACJ,oBAAC,UAAD;GACE,MAAK;GACL,MAAK;GACL,iBAAe;GACf,eAAe,SAAS,KAAK;GAC7B,WAAW,GACT,yIACA,qBACA,SAAS,4BAA4B,+CACrC,QACA,SACF;GAEC;EACK,CAAA,CACL;;AAET;AAEA,SAAgB,YAAY,EAC1B,OACA,UACA,aAKC;CACD,MAAM,EAAE,OAAO,YAAY,QAAQ;CACnC,MAAM,SAAS,iBAAiB;CAKhC,IAAI,EAJW,YAAY,QAKzB,OACE,oBAAC,OAAD;EAAK,QAAA;EAAkB;EACpB;CACE,CAAA;CAGT,OACE,oBAAC,OAAO,KAAR;EAEE,SAAS;GAAE,SAAS;GAAG,GAAG,SAAS,IAAI;EAAE;EACzC,SAAS;GAAE,SAAS;GAAG,GAAG;EAAE;EAC5B,YAAY;GAAE,UAAU;GAAM,MAAM;EAAS;EAC7C,WAAW,GAAG,QAAQ,SAAS;EAE9B;CACS,GAPL,KAOK;AAEhB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { EASE_OUT } from "../../lib/ease.js";
|
|
3
3
|
import { useRef } from "react";
|
|
4
|
-
import { cn } from "
|
|
4
|
+
import { cn } from "@kumix/utils";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { motion, useInView, useReducedMotion } from "motion/react";
|
|
7
7
|
//#region src/components/motion/text-reveal.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-reveal.js","names":[],"sources":["../../../src/components/motion/text-reveal.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ElementType, type ReactNode, useRef } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"text-reveal.js","names":[],"sources":["../../../src/components/motion/text-reveal.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ElementType, type ReactNode, useRef } from \"react\";\nimport { motion, type Transition, useInView, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT } from \"../../lib/ease\";\n\ntype SplitMode = \"word\" | \"char\";\n\nexport interface TextRevealProps {\n text: string | string[];\n as?: ElementType;\n className?: string;\n split?: SplitMode;\n stagger?: number;\n delay?: number;\n blur?: number;\n yOffset?: string | number;\n spring?: { stiffness?: number; damping?: number; mass?: number };\n once?: boolean;\n whileInView?: boolean;\n children?: ReactNode;\n}\n\nconst DEFAULT_SPRING = { stiffness: 140, damping: 26, mass: 1.2 };\n\ntype WordGroup = { text: string; trailing: string };\n\n/**\n * One tokenizer for both modes: a line becomes the words it is made of, each\n * carrying the whitespace that follows it. Word mode animates a group at a\n * time, char mode the characters inside one — so the two can't drift apart on\n * what counts as a word or where a space belongs. Runs of whitespace and tabs\n * survive as their own group rather than collapsing.\n */\nfunction toWordGroups(line: string): WordGroup[] {\n const chunks = line.match(/\\S+\\s*|\\s+/g) ?? [];\n return chunks.map((chunk) => {\n const text = chunk.replace(/\\s+$/, \"\");\n return { text, trailing: chunk.slice(text.length) };\n });\n}\n\nexport function TextReveal({\n text,\n as: Comp = \"span\",\n className,\n split = \"word\",\n stagger = 0.09,\n delay = 0,\n blur = 12,\n yOffset = \"40%\",\n spring,\n once = true,\n whileInView = false,\n children,\n}: TextRevealProps) {\n const ref = useRef<HTMLElement>(null);\n const inView = useInView(ref, { once, amount: 0.4 });\n const reduce = useReducedMotion();\n const shouldAnimate = whileInView ? inView : true;\n\n const lines = Array.isArray(text) ? text : [text];\n const s = { ...DEFAULT_SPRING, ...spring };\n\n let unitIndex = 0;\n const lineCounts = new Map<string, number>();\n\n return (\n <Comp ref={ref} className={cn(\"block\", className)}>\n {lines.map((line) => {\n const lineCount = lineCounts.get(line) ?? 0;\n lineCounts.set(line, lineCount + 1);\n const lineKey = `${line}-${lineCount}`;\n const unitCounts = new Map<string, number>();\n\n const renderUnit = (unit: string) => {\n const d = delay + unitIndex * stagger;\n unitIndex += 1;\n const unitCount = unitCounts.get(unit) ?? 0;\n unitCounts.set(unit, unitCount + 1);\n const unitKey = `${unit}-${unitCount}`;\n const initial = reduce\n ? { opacity: 0 }\n : { y: yOffset, opacity: 0, filter: `blur(${blur}px)` };\n const animate = shouldAnimate\n ? reduce\n ? { opacity: 1 }\n : { y: 0, opacity: 1, filter: \"blur(0px)\" }\n : initial;\n const transition: Transition = reduce\n ? { opacity: { duration: 0.25, ease: EASE_OUT, delay: d * 0.3 } }\n : {\n y: { type: \"spring\" as const, ...s, delay: d },\n opacity: { duration: 0.7, ease: EASE_OUT, delay: d },\n filter: { duration: 0.9, ease: EASE_OUT, delay: d },\n };\n return (\n <motion.span\n key={unitKey}\n initial={initial}\n animate={animate}\n transition={transition}\n // `whitespace-pre` is load-bearing: a unit's trailing space is\n // inside an inline-block and would otherwise collapse to zero\n // width, running every word together.\n className=\"inline-block whitespace-pre will-change-transform\"\n >\n {unit}\n </motion.span>\n );\n };\n\n const groups = toWordGroups(line);\n const groupCounts = new Map<string, number>();\n\n return (\n <span key={lineKey} className=\"block\">\n {groups.map((group) => {\n const whole = group.text + group.trailing;\n // Characters animate one at a time, but each word (plus the\n // space that follows it) sits in its own inline-block so a long\n // line wraps between words instead of mid-word.\n if (split !== \"char\") return renderUnit(whole);\n\n const groupCount = groupCounts.get(whole) ?? 0;\n groupCounts.set(whole, groupCount + 1);\n return (\n <span key={`${whole}-${groupCount}`} className=\"inline-block whitespace-pre\">\n {Array.from(whole).map((char) => renderUnit(char))}\n </span>\n );\n })}\n </span>\n );\n })}\n {children}\n </Comp>\n );\n}\n"],"mappings":";;;;;;;AAyBA,MAAM,iBAAiB;CAAE,WAAW;CAAK,SAAS;CAAI,MAAM;AAAI;;;;;;;;AAWhE,SAAS,aAAa,MAA2B;CAE/C,QADe,KAAK,MAAM,aAAa,KAAK,CAAC,EAAA,CAC/B,KAAK,UAAU;EAC3B,MAAM,OAAO,MAAM,QAAQ,QAAQ,EAAE;EACrC,OAAO;GAAE;GAAM,UAAU,MAAM,MAAM,KAAK,MAAM;EAAE;CACpD,CAAC;AACH;AAEA,SAAgB,WAAW,EACzB,MACA,IAAI,OAAO,QACX,WACA,QAAQ,QACR,UAAU,KACV,QAAQ,GACR,OAAO,IACP,UAAU,OACV,QACA,OAAO,MACP,cAAc,OACd,YACkB;CAClB,MAAM,MAAM,OAAoB,IAAI;CACpC,MAAM,SAAS,UAAU,KAAK;EAAE;EAAM,QAAQ;CAAI,CAAC;CACnD,MAAM,SAAS,iBAAiB;CAChC,MAAM,gBAAgB,cAAc,SAAS;CAE7C,MAAM,QAAQ,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI;CAChD,MAAM,IAAI;EAAE,GAAG;EAAgB,GAAG;CAAO;CAEzC,IAAI,YAAY;CAChB,MAAM,6BAAa,IAAI,IAAoB;CAE3C,OACE,qBAAC,MAAD;EAAW;EAAK,WAAW,GAAG,SAAS,SAAS;EAAhD,UAAA,CACG,MAAM,KAAK,SAAS;GACnB,MAAM,YAAY,WAAW,IAAI,IAAI,KAAK;GAC1C,WAAW,IAAI,MAAM,YAAY,CAAC;GAClC,MAAM,UAAU,GAAG,KAAK,GAAG;GAC3B,MAAM,6BAAa,IAAI,IAAoB;GAE3C,MAAM,cAAc,SAAiB;IACnC,MAAM,IAAI,QAAQ,YAAY;IAC9B,aAAa;IACb,MAAM,YAAY,WAAW,IAAI,IAAI,KAAK;IAC1C,WAAW,IAAI,MAAM,YAAY,CAAC;IAClC,MAAM,UAAU,GAAG,KAAK,GAAG;IAC3B,MAAM,UAAU,SACZ,EAAE,SAAS,EAAE,IACb;KAAE,GAAG;KAAS,SAAS;KAAG,QAAQ,QAAQ,KAAK;IAAK;IACxD,MAAM,UAAU,gBACZ,SACE,EAAE,SAAS,EAAE,IACb;KAAE,GAAG;KAAG,SAAS;KAAG,QAAQ;IAAY,IAC1C;IACJ,MAAM,aAAyB,SAC3B,EAAE,SAAS;KAAE,UAAU;KAAM,MAAM;KAAU,OAAO,IAAI;IAAI,EAAE,IAC9D;KACE,GAAG;MAAE,MAAM;MAAmB,GAAG;MAAG,OAAO;KAAE;KAC7C,SAAS;MAAE,UAAU;MAAK,MAAM;MAAU,OAAO;KAAE;KACnD,QAAQ;MAAE,UAAU;MAAK,MAAM;MAAU,OAAO;KAAE;IACpD;IACJ,OACE,oBAAC,OAAO,MAAR;KAEW;KACA;KACG;KAIZ,WAAU;KAET,UAAA;IACU,GAVN,OAUM;GAEjB;GAEA,MAAM,SAAS,aAAa,IAAI;GAChC,MAAM,8BAAc,IAAI,IAAoB;GAE5C,OACE,oBAAC,QAAD;IAAoB,WAAU;IAC3B,UAAA,OAAO,KAAK,UAAU;KACrB,MAAM,QAAQ,MAAM,OAAO,MAAM;KAIjC,IAAI,UAAU,QAAQ,OAAO,WAAW,KAAK;KAE7C,MAAM,aAAa,YAAY,IAAI,KAAK,KAAK;KAC7C,YAAY,IAAI,OAAO,aAAa,CAAC;KACrC,OACE,oBAAC,QAAD;MAAqC,WAAU;MAC5C,UAAA,MAAM,KAAK,KAAK,CAAC,CAAC,KAAK,SAAS,WAAW,IAAI,CAAC;KAC7C,GAFK,GAAG,MAAM,GAAG,YAEjB;IAEV,CAAC;GACG,GAhBK,OAgBL;EAEV,CAAC,GACA,QACG;;AAEV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-scramble.d.ts","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"text-scramble.d.ts","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"mappings":";;iBASiB;;EAEf;;EAEA;;EAEA;EACA;EACA,QAAQ;;;wBAIM,eACd,MACA,UACA,QACA,WACA,SACC,oCAAiB,IAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useEffect, useRef, useState } from "react";
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "@kumix/utils";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useReducedMotion } from "motion/react";
|
|
6
6
|
//#region src/components/motion/text-scramble.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-scramble.js","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"sourcesContent":["\"use client\";\n\nimport { type CSSProperties, useEffect, useRef, useState } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"text-scramble.js","names":[],"sources":["../../../src/components/motion/text-scramble.tsx"],"sourcesContent":["\"use client\";\n\nimport { type CSSProperties, useEffect, useRef, useState } from \"react\";\nimport { useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\n\nconst DEFAULT_GLYPHS = \"ABCDEFGHJKLMNPQRSTUVWXYZ0123456789#%&@$?/\";\n\nexport interface TextScrambleProps {\n /** Final text revealed by the scramble animation. */\n text: string;\n /** Maximum animation duration in milliseconds. */\n duration?: number;\n /** Characters sampled while unresolved positions are scrambling. */\n glyphs?: string;\n className?: string;\n style?: CSSProperties;\n}\n\n/** Character scramble that resolves to `text` and respects reduced motion. */\nexport function TextScramble({\n text,\n duration,\n glyphs = DEFAULT_GLYPHS,\n className,\n style,\n}: TextScrambleProps) {\n const reduce = useReducedMotion() ?? false;\n const [display, setDisplay] = useState(text);\n const mounted = useRef(false);\n\n useEffect(() => {\n if (!mounted.current) {\n mounted.current = true;\n setDisplay(text);\n return;\n }\n\n if (reduce || !glyphs) {\n setDisplay(text);\n return;\n }\n\n const characters = text.split(\"\");\n const startedAt = performance.now();\n const animationDuration = duration ?? Math.min(760, Math.max(420, characters.length * 32));\n let frame = 0;\n let lastUpdate = 0;\n\n const animate = (now: number) => {\n if (now - lastUpdate >= 40) {\n lastUpdate = now;\n const progress = Math.min((now - startedAt) / animationDuration, 1);\n const settled = Math.floor(progress * characters.length);\n setDisplay(\n characters\n .map((character, index) => {\n if (index < settled || character === \" \") return character;\n return glyphs[Math.floor(Math.random() * glyphs.length)];\n })\n .join(\"\"),\n );\n }\n\n if (now - startedAt < animationDuration) {\n frame = requestAnimationFrame(animate);\n } else {\n setDisplay(text);\n }\n };\n\n frame = requestAnimationFrame(animate);\n return () => cancelAnimationFrame(frame);\n }, [duration, glyphs, reduce, text]);\n\n return (\n <span className={cn(\"inline-block whitespace-pre\", className)} style={style}>\n <span className=\"sr-only\">{text}</span>\n <span aria-hidden=\"true\">{reduce ? text : display}</span>\n </span>\n );\n}\n"],"mappings":";;;;;;AAOA,MAAM,iBAAiB;;AAcvB,SAAgB,aAAa,EAC3B,MACA,UACA,SAAS,gBACT,WACA,SACoB;CACpB,MAAM,SAAS,iBAAiB,KAAK;CACrC,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAC3C,MAAM,UAAU,OAAO,KAAK;CAE5B,gBAAgB;EACd,IAAI,CAAC,QAAQ,SAAS;GACpB,QAAQ,UAAU;GAClB,WAAW,IAAI;GACf;EACF;EAEA,IAAI,UAAU,CAAC,QAAQ;GACrB,WAAW,IAAI;GACf;EACF;EAEA,MAAM,aAAa,KAAK,MAAM,EAAE;EAChC,MAAM,YAAY,YAAY,IAAI;EAClC,MAAM,oBAAoB,YAAY,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,WAAW,SAAS,EAAE,CAAC;EACzF,IAAI,QAAQ;EACZ,IAAI,aAAa;EAEjB,MAAM,WAAW,QAAgB;GAC/B,IAAI,MAAM,cAAc,IAAI;IAC1B,aAAa;IACb,MAAM,WAAW,KAAK,KAAK,MAAM,aAAa,mBAAmB,CAAC;IAClE,MAAM,UAAU,KAAK,MAAM,WAAW,WAAW,MAAM;IACvD,WACE,WACG,KAAK,WAAW,UAAU;KACzB,IAAI,QAAQ,WAAW,cAAc,KAAK,OAAO;KACjD,OAAO,OAAO,KAAK,MAAM,KAAK,OAAO,IAAI,OAAO,MAAM;IACxD,CAAC,CAAC,CACD,KAAK,EAAE,CACZ;GACF;GAEA,IAAI,MAAM,YAAY,mBACpB,QAAQ,sBAAsB,OAAO;QAErC,WAAW,IAAI;EAEnB;EAEA,QAAQ,sBAAsB,OAAO;EACrC,aAAa,qBAAqB,KAAK;CACzC,GAAG;EAAC;EAAU;EAAQ;EAAQ;CAAI,CAAC;CAEnC,OACE,qBAAC,QAAD;EAAM,WAAW,GAAG,+BAA+B,SAAS;EAAU;EAAtE,UAAA,CACE,oBAAC,QAAD;GAAM,WAAU;GAAW,UAAA;EAAW,CAAA,GACtC,oBAAC,QAAD;GAAM,eAAY;GAAQ,UAAA,SAAS,OAAO;EAAc,CAAA,CACpD;;AAEV"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { TEXT_SHIMMER_CLASS_NAME, TEXT_SHIMMER_KEYFRAMES, textShimmerStyle } from "../../lib/text-shimmer.js";
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "@kumix/utils";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/motion/text-shimmer.tsx
|
|
6
6
|
function TextShimmer({ children, as: Comp = "span", duration = 2.5, className }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-shimmer.js","names":[],"sources":["../../../src/components/motion/text-shimmer.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType, ReactNode } from \"react\";\nimport { cn } from \"
|
|
1
|
+
{"version":3,"file":"text-shimmer.js","names":[],"sources":["../../../src/components/motion/text-shimmer.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType, ReactNode } from \"react\";\n\nimport { cn } from \"@kumix/utils\";\nimport {\n TEXT_SHIMMER_CLASS_NAME,\n TEXT_SHIMMER_KEYFRAMES,\n textShimmerStyle,\n} from \"../../lib/text-shimmer\";\n\nexport interface TextShimmerProps {\n children: ReactNode;\n as?: ElementType;\n duration?: number;\n className?: string;\n}\n\nexport function TextShimmer({\n children,\n as: Comp = \"span\",\n duration = 2.5,\n className,\n}: TextShimmerProps) {\n return (\n <>\n <style>{TEXT_SHIMMER_KEYFRAMES}</style>\n <Comp\n style={textShimmerStyle(duration)}\n className={cn(\"inline-block\", TEXT_SHIMMER_CLASS_NAME, className)}\n >\n {children}\n </Comp>\n </>\n );\n}\n"],"mappings":";;;;;AAkBA,SAAgB,YAAY,EAC1B,UACA,IAAI,OAAO,QACX,WAAW,KACX,aACmB;CACnB,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,SAAD,EAAA,UAAQ,uBAA8B,CAAA,GACtC,oBAAC,MAAD;EACE,OAAO,iBAAiB,QAAQ;EAChC,WAAW,GAAG,gBAAgB,yBAAyB,SAAS;EAE/D;CACG,CAAA,CACN,EAAA,CAAA;AAEN"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { EASE_OUT_CSS } from "../../lib/ease.js";
|
|
3
3
|
import { ActionSwapIcon } from "./action-swap.js";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
|
+
import { cn } from "@kumix/utils";
|
|
5
6
|
import { useTheme } from "next-themes";
|
|
6
|
-
import { cn } from "cn";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { useReducedMotion } from "motion/react";
|
|
9
9
|
import { Moon, Sun } from "lucide-react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-toggle.js","names":[],"sources":["../../../src/components/motion/theme-toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentPropsWithoutRef, useEffect, useState } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"theme-toggle.js","names":[],"sources":["../../../src/components/motion/theme-toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentPropsWithoutRef, useEffect, useState } from \"react\";\nimport { Moon, Sun } from \"lucide-react\";\nimport { useReducedMotion } from \"motion/react\";\nimport { useTheme } from \"next-themes\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT_CSS } from \"../../lib/ease\";\nimport { ActionSwapIcon } from \"./action-swap\";\n\nexport type ThemeVariant = \"rectangle\" | \"circle\" | \"circle-blur\" | \"blinds\";\n\nexport type RectStart =\n | \"top-left\"\n | \"top-right\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"center\"\n | \"bottom-up\";\n\nexport interface ThemeToggleProps\n extends Omit<ComponentPropsWithoutRef<\"button\">, \"children\" | \"onClick\"> {\n /** Animation variant. Default: \"rectangle\". */\n variant?: ThemeVariant;\n /** Origin direction for the reveal. Default: \"bottom-up\". */\n start?: RectStart;\n iconClassName?: string;\n}\n\nconst VT_STYLE_ID = \"beui-theme-toggle-vt\";\n\n// View transitions animate in CSS, not motion springs, so easing here is\n// either EASE_OUT_CSS or a keyword. The circle variants keep the Material\n// standard curve because their reveal expands symmetrically rather than\n// decelerating. Durations differ per variant to match native OS mode switches.\nconst VT_CSS = `\nhtml[data-beui-vt=\"rect\"]::view-transition-old(root) {\n animation: none;\n mix-blend-mode: normal;\n}\nhtml[data-beui-vt=\"rect\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n animation: beui-rect-reveal 400ms ease-out;\n}\nhtml[data-beui-vt=\"circle\"]::view-transition-old(root),\nhtml[data-beui-vt=\"circle-blur\"]::view-transition-old(root) {\n animation: none;\n mix-blend-mode: normal;\n}\nhtml[data-beui-vt=\"circle\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n animation: beui-circle-reveal 700ms cubic-bezier(0.4, 0, 0.2, 1);\n}\nhtml[data-beui-vt=\"circle-blur\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n animation: beui-circle-blur-reveal 700ms cubic-bezier(0.4, 0, 0.2, 1);\n}\nhtml[data-beui-vt=\"blinds\"]::view-transition-old(root) {\n animation: none;\n mix-blend-mode: normal;\n}\n/* Slats: a masked band widens inside every 72px tile, so the new theme opens\n across the page like a shutter. The band edge has to be a registered custom\n property — mask-image itself is not animatable, but it re-resolves every\n frame the property ticks. mask-size fixes the tile at 72px rather than\n letting a repeating gradient's last stop define it, which is what keeps the\n 20px soft edge from dragging the tile wider than the slat and leaving a\n feathered gap that never closes; it also means both ends land clean, fully\n transparent at -20px and fully opaque at 72px. Falling back to no mask\n (unregistered property, so the var is invalid) reveals the page in one\n step. */\n@property --beui-vt-slat {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 72px;\n}\nhtml[data-beui-vt=\"blinds\"]::view-transition-new(root) {\n mix-blend-mode: normal;\n mask-image: linear-gradient(\n 90deg,\n #000 0 var(--beui-vt-slat),\n transparent calc(var(--beui-vt-slat) + 20px)\n );\n mask-size: 72px 100%;\n mask-repeat: repeat;\n animation: beui-blinds-reveal 700ms ${EASE_OUT_CSS};\n}\n@keyframes beui-rect-reveal {\n from { clip-path: var(--beui-vt-from, inset(100% 0 0 0)); }\n to { clip-path: inset(0 0 0 0); }\n}\n@keyframes beui-circle-reveal {\n from { clip-path: circle(0% at var(--beui-vt-origin, 50% 100%)); }\n to { clip-path: circle(150% at var(--beui-vt-origin, 50% 100%)); }\n}\n@keyframes beui-circle-blur-reveal {\n from { clip-path: circle(0% at var(--beui-vt-origin, 50% 100%)); filter: blur(8px); }\n to { clip-path: circle(150% at var(--beui-vt-origin, 50% 100%)); filter: blur(0px); }\n}\n@keyframes beui-blinds-reveal {\n from { --beui-vt-slat: -20px; }\n to { --beui-vt-slat: 72px; }\n}\n`;\n\nconst RECT_FROM: Record<RectStart, string> = {\n \"top-left\": \"inset(0 100% 100% 0)\",\n \"top-right\": \"inset(0 0 100% 100%)\",\n \"bottom-left\": \"inset(100% 100% 0 0)\",\n \"bottom-right\": \"inset(100% 0 0 100%)\",\n center: \"inset(50% 50% 50% 50%)\",\n \"bottom-up\": \"inset(100% 0 0 0)\",\n};\n\nconst CIRCLE_ORIGIN: Record<RectStart, string> = {\n \"top-left\": \"0% 0%\",\n \"top-right\": \"100% 0%\",\n \"bottom-left\": \"0% 100%\",\n \"bottom-right\": \"100% 100%\",\n center: \"50% 50%\",\n \"bottom-up\": \"50% 100%\",\n};\n\nexport function useThemeToggle({\n variant = \"rectangle\",\n start = \"bottom-up\",\n}: {\n variant?: ThemeVariant;\n start?: RectStart;\n} = {}) {\n const { setTheme, resolvedTheme } = useTheme();\n const reduce = useReducedMotion() ?? false;\n const [mounted, setMounted] = useState(false);\n useEffect(() => setMounted(true), []);\n useEffect(() => {\n if (document.getElementById(VT_STYLE_ID)) return;\n const el = document.createElement(\"style\");\n el.id = VT_STYLE_ID;\n el.textContent = VT_CSS;\n document.head.appendChild(el);\n }, []);\n const isDark = mounted && resolvedTheme === \"dark\";\n\n const toggle = () => {\n const next = isDark ? \"light\" : \"dark\";\n\n if (reduce || !(\"startViewTransition\" in document)) {\n setTheme(next);\n return;\n }\n\n const root = document.documentElement;\n\n if (variant === \"rectangle\") {\n root.style.setProperty(\"--beui-vt-from\", RECT_FROM[start]);\n root.dataset.beuiVt = \"rect\";\n } else if (variant === \"blinds\") {\n // Slats sweep the whole viewport; there is no origin point to set.\n root.dataset.beuiVt = \"blinds\";\n } else {\n root.style.setProperty(\"--beui-vt-origin\", CIRCLE_ORIGIN[start]);\n root.dataset.beuiVt = variant;\n }\n\n const vt = (\n document as Document & {\n startViewTransition(cb: () => void): { finished: Promise<void> };\n }\n ).startViewTransition(() => setTheme(next));\n\n vt.finished.finally(() => {\n delete root.dataset.beuiVt;\n });\n };\n\n return { isDark, mounted, toggle };\n}\n\nexport function ThemeToggle({\n variant = \"rectangle\",\n start = \"bottom-up\",\n className,\n iconClassName,\n ...rest\n}: ThemeToggleProps) {\n const { isDark, mounted, toggle } = useThemeToggle({ variant, start });\n\n return (\n <button\n type=\"button\"\n aria-label={mounted && isDark ? \"Switch to light mode\" : \"Switch to dark mode\"}\n onClick={toggle}\n className={cn(\"flex items-center justify-center\", className)}\n {...rest}\n >\n {mounted ? (\n <ActionSwapIcon\n value={isDark ? \"dark\" : \"light\"}\n animation=\"blur\"\n className={iconClassName}\n >\n {isDark ? <Sun className={iconClassName} /> : <Moon className={iconClassName} />}\n </ActionSwapIcon>\n ) : (\n <span className={iconClassName} aria-hidden=\"true\" />\n )}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;;AA8BA,MAAM,cAAc;AAMpB,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAkDyB,aAAa;;;;;;;;;;;;;;;;;;;AAoBrD,MAAM,YAAuC;CAC3C,YAAY;CACZ,aAAa;CACb,eAAe;CACf,gBAAgB;CAChB,QAAQ;CACR,aAAa;AACf;AAEA,MAAM,gBAA2C;CAC/C,YAAY;CACZ,aAAa;CACb,eAAe;CACf,gBAAgB;CAChB,QAAQ;CACR,aAAa;AACf;AAEA,SAAgB,eAAe,EAC7B,UAAU,aACV,QAAQ,gBAIN,CAAC,GAAG;CACN,MAAM,EAAE,UAAU,kBAAkB,SAAS;CAC7C,MAAM,SAAS,iBAAiB,KAAK;CACrC,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,gBAAgB,WAAW,IAAI,GAAG,CAAC,CAAC;CACpC,gBAAgB;EACd,IAAI,SAAS,eAAe,WAAW,GAAG;EAC1C,MAAM,KAAK,SAAS,cAAc,OAAO;EACzC,GAAG,KAAK;EACR,GAAG,cAAc;EACjB,SAAS,KAAK,YAAY,EAAE;CAC9B,GAAG,CAAC,CAAC;CACL,MAAM,SAAS,WAAW,kBAAkB;CAE5C,MAAM,eAAe;EACnB,MAAM,OAAO,SAAS,UAAU;EAEhC,IAAI,UAAU,EAAE,yBAAyB,WAAW;GAClD,SAAS,IAAI;GACb;EACF;EAEA,MAAM,OAAO,SAAS;EAEtB,IAAI,YAAY,aAAa;GAC3B,KAAK,MAAM,YAAY,kBAAkB,UAAU,MAAM;GACzD,KAAK,QAAQ,SAAS;EACxB,OAAO,IAAI,YAAY,UAErB,KAAK,QAAQ,SAAS;OACjB;GACL,KAAK,MAAM,YAAY,oBAAoB,cAAc,MAAM;GAC/D,KAAK,QAAQ,SAAS;EACxB;EAQA,SAFE,0BAA0B,SAAS,IAAI,CAExC,CAAC,CAAC,SAAS,cAAc;GACxB,OAAO,KAAK,QAAQ;EACtB,CAAC;CACH;CAEA,OAAO;EAAE;EAAQ;EAAS;CAAO;AACnC;AAEA,SAAgB,YAAY,EAC1B,UAAU,aACV,QAAQ,aACR,WACA,eACA,GAAG,QACgB;CACnB,MAAM,EAAE,QAAQ,SAAS,WAAW,eAAe;EAAE;EAAS;CAAM,CAAC;CAErE,OACE,oBAAC,UAAD;EACE,MAAK;EACL,cAAY,WAAW,SAAS,yBAAyB;EACzD,SAAS;EACT,WAAW,GAAG,oCAAoC,SAAS;EAC3D,GAAI;EAEH,UAAA,UACC,oBAAC,gBAAD;GACE,OAAO,SAAS,SAAS;GACzB,WAAU;GACV,WAAW;GAEV,UAAA,SAAS,oBAAC,KAAD,EAAK,WAAW,cAAgB,CAAA,IAAI,oBAAC,MAAD,EAAM,WAAW,cAAgB,CAAA;EACjE,CAAA,IAEhB,oBAAC,QAAD;GAAM,WAAW;GAAe,eAAY;EAAQ,CAAA;CAEhD,CAAA;AAEZ"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useHoverCapable } from "../../hooks/use-hover-capable.js";
|
|
3
3
|
import { SPRING_MOUSE } from "../../lib/ease.js";
|
|
4
4
|
import { useRef } from "react";
|
|
5
|
-
import { cn } from "
|
|
5
|
+
import { cn } from "@kumix/utils";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { motion, useMotionTemplate, useMotionValue, useReducedMotion, useSpring } from "motion/react";
|
|
8
8
|
//#region src/components/motion/tilt-card.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tilt-card.js","names":[],"sources":["../../../src/components/motion/tilt-card.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactNode, useRef } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"tilt-card.js","names":[],"sources":["../../../src/components/motion/tilt-card.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactNode, useRef } from \"react\";\nimport {\n motion,\n useMotionTemplate,\n useMotionValue,\n useReducedMotion,\n useSpring,\n} from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { useHoverCapable } from \"../../hooks/use-hover-capable\";\nimport { SPRING_MOUSE } from \"../../lib/ease\";\n\nexport interface TiltCardProps {\n children: ReactNode;\n max?: number;\n glare?: boolean;\n className?: string;\n}\n\nexport function TiltCard({ children, max = 12, glare = true, className }: TiltCardProps) {\n const ref = useRef<HTMLDivElement>(null);\n const reduce = useReducedMotion();\n const canHover = useHoverCapable();\n // Decorative cursor-follow: skip on touch (phantom hover) and reduced motion.\n const enabled = !reduce && canHover;\n const rx = useMotionValue(0);\n const ry = useMotionValue(0);\n const gx = useMotionValue(50);\n const gy = useMotionValue(50);\n\n const srx = useSpring(rx, SPRING_MOUSE);\n const sry = useSpring(ry, SPRING_MOUSE);\n\n const onMove = (e: React.MouseEvent<HTMLDivElement>) => {\n const el = ref.current;\n if (!el || !enabled) return;\n const rect = el.getBoundingClientRect();\n const px = (e.clientX - rect.left) / rect.width;\n const py = (e.clientY - rect.top) / rect.height;\n ry.set((px - 0.5) * max);\n rx.set((0.5 - py) * max);\n gx.set(px * 100);\n gy.set(py * 100);\n };\n\n const onLeave = () => {\n rx.set(0);\n ry.set(0);\n };\n\n const transform = useMotionTemplate`perspective(1000px) rotateX(${srx}deg) rotateY(${sry}deg)`;\n const glareBg = useMotionTemplate`radial-gradient(circle at ${gx}% ${gy}%, var(--foreground), transparent 50%)`;\n\n return (\n <motion.div\n ref={ref}\n onMouseMove={onMove}\n onMouseLeave={onLeave}\n style={{ transform, transformStyle: \"preserve-3d\" }}\n className={cn(\"relative overflow-hidden rounded-2xl will-change-transform\", className)}\n >\n {children}\n {glare && enabled ? (\n <motion.div\n aria-hidden\n style={{ background: glareBg }}\n className=\"pointer-events-none absolute inset-0 opacity-15\"\n />\n ) : null}\n </motion.div>\n );\n}\n"],"mappings":";;;;;;;;AAsBA,SAAgB,SAAS,EAAE,UAAU,MAAM,IAAI,QAAQ,MAAM,aAA4B;CACvF,MAAM,MAAM,OAAuB,IAAI;CACvC,MAAM,SAAS,iBAAiB;CAChC,MAAM,WAAW,gBAAgB;CAEjC,MAAM,UAAU,CAAC,UAAU;CAC3B,MAAM,KAAK,eAAe,CAAC;CAC3B,MAAM,KAAK,eAAe,CAAC;CAC3B,MAAM,KAAK,eAAe,EAAE;CAC5B,MAAM,KAAK,eAAe,EAAE;CAE5B,MAAM,MAAM,UAAU,IAAI,YAAY;CACtC,MAAM,MAAM,UAAU,IAAI,YAAY;CAEtC,MAAM,UAAU,MAAwC;EACtD,MAAM,KAAK,IAAI;EACf,IAAI,CAAC,MAAM,CAAC,SAAS;EACrB,MAAM,OAAO,GAAG,sBAAsB;EACtC,MAAM,MAAM,EAAE,UAAU,KAAK,QAAQ,KAAK;EAC1C,MAAM,MAAM,EAAE,UAAU,KAAK,OAAO,KAAK;EACzC,GAAG,KAAK,KAAK,MAAO,GAAG;EACvB,GAAG,KAAK,KAAM,MAAM,GAAG;EACvB,GAAG,IAAI,KAAK,GAAG;EACf,GAAG,IAAI,KAAK,GAAG;CACjB;CAEA,MAAM,gBAAgB;EACpB,GAAG,IAAI,CAAC;EACR,GAAG,IAAI,CAAC;CACV;CAEA,MAAM,YAAY,iBAAiB,+BAA+B,IAAI,eAAe,IAAI;CACzF,MAAM,UAAU,iBAAiB,6BAA6B,GAAG,IAAI,GAAG;CAExE,OACE,qBAAC,OAAO,KAAR;EACO;EACL,aAAa;EACb,cAAc;EACd,OAAO;GAAE;GAAW,gBAAgB;EAAc;EAClD,WAAW,GAAG,8DAA8D,SAAS;EALvF,UAAA,CAOG,UACA,SAAS,UACR,oBAAC,OAAO,KAAR;GACE,eAAA;GACA,OAAO,EAAE,YAAY,QAAQ;GAC7B,WAAU;EACX,CAAA,IACC,IACM;;AAEhB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode, Ref } from "react";
|
|
2
|
+
import { motion } from "motion/react";
|
|
3
|
+
//#region src/components/motion/tooltip-surface.d.ts
|
|
4
|
+
type Side = "top" | "right" | "bottom" | "left";
|
|
5
|
+
/** The shared visual surface for trigger tooltips and chart readouts. Positioning belongs to the caller. */
|
|
6
|
+
export declare function TooltipSurface({ children, side, className, ref, ...props }: Omit<ComponentProps<typeof motion.span>, "children"> & {
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
side?: Side;
|
|
9
|
+
ref?: Ref<HTMLSpanElement>;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
//# sourceMappingURL=tooltip-surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip-surface.d.ts","names":[],"sources":["../../../src/components/motion/tooltip-surface.tsx"],"mappings":";;;KAQK;;wBAsDW,iBACd,UACA,MACA,WACA,QACG,SACF,KAAK,sBAAsB,OAAO;EACnC,WAAW;EACX,OAAO;EACP,MAAM,IAAI;oBACX,IAAA"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { EASE_OUT } from "../../lib/ease.js";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { cn } from "@kumix/utils";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { motion, useReducedMotion } from "motion/react";
|
|
7
|
+
//#region src/components/motion/tooltip-surface.tsx
|
|
8
|
+
const offsetFrom = {
|
|
9
|
+
top: { y: 8 },
|
|
10
|
+
bottom: { y: -8 },
|
|
11
|
+
left: { x: 8 },
|
|
12
|
+
right: { x: -8 }
|
|
13
|
+
};
|
|
14
|
+
const TOOLTIP_SPRING = {
|
|
15
|
+
type: "spring",
|
|
16
|
+
stiffness: 380,
|
|
17
|
+
damping: 30,
|
|
18
|
+
mass: .7
|
|
19
|
+
};
|
|
20
|
+
function buildVariants(side) {
|
|
21
|
+
const o = offsetFrom[side];
|
|
22
|
+
return {
|
|
23
|
+
initial: {
|
|
24
|
+
opacity: 0,
|
|
25
|
+
scale: .9,
|
|
26
|
+
filter: "blur(5px)",
|
|
27
|
+
x: o.x ?? 0,
|
|
28
|
+
y: o.y ?? 0
|
|
29
|
+
},
|
|
30
|
+
animate: {
|
|
31
|
+
opacity: 1,
|
|
32
|
+
scale: 1,
|
|
33
|
+
filter: "blur(0px)",
|
|
34
|
+
x: 0,
|
|
35
|
+
y: 0,
|
|
36
|
+
transition: {
|
|
37
|
+
...TOOLTIP_SPRING,
|
|
38
|
+
opacity: {
|
|
39
|
+
duration: .14,
|
|
40
|
+
ease: EASE_OUT
|
|
41
|
+
},
|
|
42
|
+
filter: {
|
|
43
|
+
duration: .18,
|
|
44
|
+
ease: EASE_OUT
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
exit: {
|
|
49
|
+
opacity: 0,
|
|
50
|
+
scale: .94,
|
|
51
|
+
filter: "blur(3px)",
|
|
52
|
+
x: (o.x ?? 0) * .6,
|
|
53
|
+
y: (o.y ?? 0) * .6,
|
|
54
|
+
transition: {
|
|
55
|
+
duration: .12,
|
|
56
|
+
ease: EASE_OUT
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const REDUCED_VARIANTS = {
|
|
62
|
+
initial: { opacity: 0 },
|
|
63
|
+
animate: {
|
|
64
|
+
opacity: 1,
|
|
65
|
+
transition: {
|
|
66
|
+
duration: .14,
|
|
67
|
+
ease: EASE_OUT
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
exit: {
|
|
71
|
+
opacity: 0,
|
|
72
|
+
transition: {
|
|
73
|
+
duration: .1,
|
|
74
|
+
ease: EASE_OUT
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
/** The shared visual surface for trigger tooltips and chart readouts. Positioning belongs to the caller. */
|
|
79
|
+
function TooltipSurface({ children, side = "top", className, ref, ...props }) {
|
|
80
|
+
const reduce = useReducedMotion();
|
|
81
|
+
const variants = useMemo(() => reduce ? REDUCED_VARIANTS : buildVariants(side), [reduce, side]);
|
|
82
|
+
return /* @__PURE__ */ jsx(motion.span, {
|
|
83
|
+
ref,
|
|
84
|
+
role: "tooltip",
|
|
85
|
+
variants,
|
|
86
|
+
initial: "initial",
|
|
87
|
+
animate: "animate",
|
|
88
|
+
exit: "exit",
|
|
89
|
+
className: cn("block whitespace-nowrap rounded-lg border border-border bg-background px-2.5 py-1 font-medium text-foreground text-xs shadow-lg", className),
|
|
90
|
+
...props,
|
|
91
|
+
children
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { TooltipSurface };
|
|
96
|
+
|
|
97
|
+
//# sourceMappingURL=tooltip-surface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip-surface.js","names":[],"sources":["../../../src/components/motion/tooltip-surface.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentProps, type ReactNode, type Ref, useMemo } from \"react\";\nimport { motion, useReducedMotion, type Variants } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT } from \"../../lib/ease\";\n\ntype Side = \"top\" | \"right\" | \"bottom\" | \"left\";\n\n// Offset is in the direction *away* from the trigger — content originates near\n// the trigger and rises into resting position.\nconst offsetFrom: Record<Side, { x?: number; y?: number }> = {\n top: { y: 8 },\n bottom: { y: -8 },\n left: { x: 8 },\n right: { x: -8 },\n};\n\n// Small tooltip surfaces need the lighter spawn used by the original Tooltip.\nconst TOOLTIP_SPRING = { type: \"spring\", stiffness: 380, damping: 30, mass: 0.7 } as const;\n\nfunction buildVariants(side: Side): Variants {\n const o = offsetFrom[side];\n return {\n initial: {\n opacity: 0,\n scale: 0.9,\n filter: \"blur(5px)\",\n x: o.x ?? 0,\n y: o.y ?? 0,\n },\n animate: {\n opacity: 1,\n scale: 1,\n filter: \"blur(0px)\",\n x: 0,\n y: 0,\n transition: {\n ...TOOLTIP_SPRING,\n opacity: { duration: 0.14, ease: EASE_OUT },\n filter: { duration: 0.18, ease: EASE_OUT },\n },\n },\n exit: {\n opacity: 0,\n scale: 0.94,\n filter: \"blur(3px)\",\n x: (o.x ?? 0) * 0.6,\n y: (o.y ?? 0) * 0.6,\n transition: { duration: 0.12, ease: EASE_OUT },\n },\n };\n}\n\nconst REDUCED_VARIANTS: Variants = {\n initial: { opacity: 0 },\n animate: { opacity: 1, transition: { duration: 0.14, ease: EASE_OUT } },\n exit: { opacity: 0, transition: { duration: 0.1, ease: EASE_OUT } },\n};\n\n/** The shared visual surface for trigger tooltips and chart readouts. Positioning belongs to the caller. */\nexport function TooltipSurface({\n children,\n side = \"top\",\n className,\n ref,\n ...props\n}: Omit<ComponentProps<typeof motion.span>, \"children\"> & {\n children?: ReactNode;\n side?: Side;\n ref?: Ref<HTMLSpanElement>;\n}) {\n const reduce = useReducedMotion();\n const variants = useMemo(() => (reduce ? REDUCED_VARIANTS : buildVariants(side)), [reduce, side]);\n return (\n <motion.span\n ref={ref}\n role=\"tooltip\"\n variants={variants}\n initial=\"initial\"\n animate=\"animate\"\n exit=\"exit\"\n className={cn(\n \"block whitespace-nowrap rounded-lg border border-border bg-background px-2.5 py-1 font-medium text-foreground text-xs shadow-lg\",\n className,\n )}\n {...props}\n >\n {children}\n </motion.span>\n );\n}\n"],"mappings":";;;;;;;AAYA,MAAM,aAAuD;CAC3D,KAAK,EAAE,GAAG,EAAE;CACZ,QAAQ,EAAE,GAAG,GAAG;CAChB,MAAM,EAAE,GAAG,EAAE;CACb,OAAO,EAAE,GAAG,GAAG;AACjB;AAGA,MAAM,iBAAiB;CAAE,MAAM;CAAU,WAAW;CAAK,SAAS;CAAI,MAAM;AAAI;AAEhF,SAAS,cAAc,MAAsB;CAC3C,MAAM,IAAI,WAAW;CACrB,OAAO;EACL,SAAS;GACP,SAAS;GACT,OAAO;GACP,QAAQ;GACR,GAAG,EAAE,KAAK;GACV,GAAG,EAAE,KAAK;EACZ;EACA,SAAS;GACP,SAAS;GACT,OAAO;GACP,QAAQ;GACR,GAAG;GACH,GAAG;GACH,YAAY;IACV,GAAG;IACH,SAAS;KAAE,UAAU;KAAM,MAAM;IAAS;IAC1C,QAAQ;KAAE,UAAU;KAAM,MAAM;IAAS;GAC3C;EACF;EACA,MAAM;GACJ,SAAS;GACT,OAAO;GACP,QAAQ;GACR,IAAI,EAAE,KAAK,KAAK;GAChB,IAAI,EAAE,KAAK,KAAK;GAChB,YAAY;IAAE,UAAU;IAAM,MAAM;GAAS;EAC/C;CACF;AACF;AAEA,MAAM,mBAA6B;CACjC,SAAS,EAAE,SAAS,EAAE;CACtB,SAAS;EAAE,SAAS;EAAG,YAAY;GAAE,UAAU;GAAM,MAAM;EAAS;CAAE;CACtE,MAAM;EAAE,SAAS;EAAG,YAAY;GAAE,UAAU;GAAK,MAAM;EAAS;CAAE;AACpE;;AAGA,SAAgB,eAAe,EAC7B,UACA,OAAO,OACP,WACA,KACA,GAAG,SAKF;CACD,MAAM,SAAS,iBAAiB;CAChC,MAAM,WAAW,cAAe,SAAS,mBAAmB,cAAc,IAAI,GAAI,CAAC,QAAQ,IAAI,CAAC;CAChG,OACE,oBAAC,OAAO,MAAR;EACO;EACL,MAAK;EACK;EACV,SAAQ;EACR,SAAQ;EACR,MAAK;EACL,WAAW,GACT,mIACA,SACF;EACA,GAAI;EAEH;CACU,CAAA;AAEjB"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from "react";
|
|
1
|
+
import { ReactElement, ReactNode, RefObject } from "react";
|
|
2
2
|
//#region src/components/motion/tooltip.d.ts
|
|
3
3
|
type Side = "top" | "right" | "bottom" | "left";
|
|
4
4
|
export interface TooltipProps {
|
|
5
5
|
content: ReactNode;
|
|
6
|
-
children
|
|
6
|
+
children?: ReactElement;
|
|
7
|
+
/** Existing trigger for controlled integrations such as chart cells. */
|
|
8
|
+
anchorRef?: RefObject<HTMLElement | SVGElement | null>;
|
|
9
|
+
/** Point within the anchor, as fractions of its rendered width and height. */
|
|
10
|
+
anchorPoint?: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
open?: boolean;
|
|
15
|
+
onOpenChange?: (open: boolean) => void;
|
|
16
|
+
id?: string;
|
|
7
17
|
side?: Side;
|
|
8
18
|
/** Delay before showing (ms). Default 120. */
|
|
9
19
|
delay?: number;
|
|
@@ -11,6 +21,6 @@ export interface TooltipProps {
|
|
|
11
21
|
/** Classes for the outer wrapper span. Use to fix baseline / fill parent. */
|
|
12
22
|
wrapperClassName?: string;
|
|
13
23
|
}
|
|
14
|
-
export declare function Tooltip({ content, children, side, delay, className, wrapperClassName }: TooltipProps): import("react").JSX.Element;
|
|
24
|
+
export declare function Tooltip({ content, children, side, delay, className, wrapperClassName, anchorRef: externalAnchorRef, anchorPoint, open: controlledOpen, onOpenChange, id: providedId }: TooltipProps): import("react").JSX.Element | undefined;
|
|
15
25
|
//#endregion
|
|
16
26
|
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../../src/components/motion/tooltip.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../../src/components/motion/tooltip.tsx"],"mappings":";;KAyBK;iBAEY;EACf,SAAS;EACT,WAAW;;EAEX,YAAY,UAAU,cAAc;;EAEpC;IAAgB;IAAW;;EAC3B;EACA,gBAAgB;EAChB;EACA,OAAO;;EAEP;EACA;;EAEA;;wBA0Bc,UACd,SACA,UACA,MACA,OACA,WACA,kBACA,WAAW,mBACX,aACA,MAAM,gBACN,cACA,IAAI,cACH,+BAAY,IAAA"}
|