@adea-ai/ui 0.162.5 → 0.162.7
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/dist/components/composites/about-dialog/about-dialog.js +5 -5
- package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
- package/dist/components/composites/accent-picker/accent-picker.js +3 -3
- package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
- package/dist/components/composites/accent-picker/custom-color-popover.js +2 -2
- package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
- package/dist/components/composites/account-menu/account-menu.js +22 -22
- package/dist/components/composites/account-menu/account-menu.js.map +1 -1
- package/dist/components/composites/action-button/action-button.js +2 -2
- package/dist/components/composites/action-button/action-button.js.map +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js +3 -3
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.js +10 -10
- package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-editor.js +13 -13
- package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-rows.js +12 -12
- package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
- package/dist/components/composites/appearance-editor/font-settings-group.js +13 -13
- package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
- package/dist/components/composites/appearance-editor/theme-preview.js +1 -1
- package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser-group.js +9 -9
- package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser.js +10 -10
- package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-detail.js +1 -1
- package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -1
- package/dist/components/composites/chain-of-thought/chain-of-thought.js +5 -5
- package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
- package/dist/components/composites/chat/chat.js +7 -7
- package/dist/components/composites/chat/chat.js.map +1 -1
- package/dist/components/composites/checkpoint/checkpoint.js +5 -5
- package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
- package/dist/components/composites/confirmation/confirmation.js +13 -13
- package/dist/components/composites/confirmation/confirmation.js.map +1 -1
- package/dist/components/composites/context/context.js +7 -7
- package/dist/components/composites/context/context.js.map +1 -1
- package/dist/components/composites/file-tree/build-file-tree.js +1 -1
- package/dist/components/composites/file-tree/build-file-tree.js.map +1 -1
- package/dist/components/composites/file-tree/file-tree.js +9 -9
- package/dist/components/composites/file-tree/file-tree.js.map +1 -1
- package/dist/components/composites/help-center/help-center.js +5 -5
- package/dist/components/composites/help-center/help-center.js.map +1 -1
- package/dist/components/composites/icon-picker/icon-picker.js +10 -10
- package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
- package/dist/components/composites/icon-picker/image-data-url.js.map +1 -1
- package/dist/components/composites/icon-picker/shell-icons.js +117 -117
- package/dist/components/composites/icon-picker/shell-icons.js.map +1 -1
- package/dist/components/composites/inline-citation/inline-citation.js +7 -7
- package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
- package/dist/components/composites/list-row/list-row-control.js +1 -1
- package/dist/components/composites/list-row/list-row-control.js.map +1 -1
- package/dist/components/composites/list-row/list-row.js +2 -2
- package/dist/components/composites/list-row/list-row.js.map +1 -1
- package/dist/components/composites/message-scroller/message-scroller.js +7 -7
- package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
- package/dist/components/composites/message-scroller/scroll-anchor.js +1 -1
- package/dist/components/composites/message-scroller/scroll-anchor.js.map +1 -1
- package/dist/components/composites/model-selector/model-selector.js +12 -12
- package/dist/components/composites/model-selector/model-selector.js.map +1 -1
- package/dist/components/composites/plan/plan.js +5 -5
- package/dist/components/composites/plan/plan.js.map +1 -1
- package/dist/components/composites/prompt-input/prompt-input.js +3 -3
- package/dist/components/composites/prompt-input/prompt-input.js.map +1 -1
- package/dist/components/composites/queue/queue.js +13 -13
- package/dist/components/composites/queue/queue.js.map +1 -1
- package/dist/components/composites/reasoning/reasoning.js +5 -5
- package/dist/components/composites/reasoning/reasoning.js.map +1 -1
- package/dist/components/composites/scene-controls/scene-controls.js +16 -16
- package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
- package/dist/components/composites/settings/settings-layout.js +2 -2
- package/dist/components/composites/settings/settings-layout.js.map +1 -1
- package/dist/components/composites/settings/settings-navigation.js +2 -2
- package/dist/components/composites/settings/settings-navigation.js.map +1 -1
- package/dist/components/composites/settings/settings.js +5 -5
- package/dist/components/composites/settings/settings.js.map +1 -1
- package/dist/components/composites/sources/sources.js +5 -5
- package/dist/components/composites/sources/sources.js.map +1 -1
- package/dist/components/composites/stack-trace/parse-stack-trace.js +2 -2
- package/dist/components/composites/stack-trace/parse-stack-trace.js.map +1 -1
- package/dist/components/composites/stack-trace/stack-trace.js +10 -10
- package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
- package/dist/components/composites/stat/stat.js +6 -6
- package/dist/components/composites/stat/stat.js.map +1 -1
- package/dist/components/composites/subagent/subagent.js +5 -5
- package/dist/components/composites/subagent/subagent.js.map +1 -1
- package/dist/components/composites/suggestion/suggestion.js +2 -2
- package/dist/components/composites/suggestion/suggestion.js.map +1 -1
- package/dist/components/composites/task/task.js +5 -5
- package/dist/components/composites/task/task.js.map +1 -1
- package/dist/components/composites/terminal/ansi.js +1 -1
- package/dist/components/composites/terminal/ansi.js.map +1 -1
- package/dist/components/composites/terminal/terminal.js +18 -18
- package/dist/components/composites/terminal/terminal.js.map +1 -1
- package/dist/components/composites/test-results/test-results.js +17 -17
- package/dist/components/composites/test-results/test-results.js.map +1 -1
- package/dist/components/composites/tool/tool.js +5 -5
- package/dist/components/composites/tool/tool.js.map +1 -1
- package/dist/components/composites/tree/tree.js +6 -6
- package/dist/components/composites/tree/tree.js.map +1 -1
- package/dist/components/composites/update-dialog/channel-control.js +1 -1
- package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
- package/dist/components/composites/update-dialog/update-dialog.js +23 -23
- package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.js +2 -2
- package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js +6 -6
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-switcher.js +11 -11
- package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
- package/dist/components/conversation/atomic/chat-composer.js +1 -1
- package/dist/components/conversation/busy-send-button.js +10 -10
- package/dist/components/conversation/busy-send-button.js.map +1 -1
- package/dist/components/conversation/chat-composer.js +1 -1
- package/dist/components/conversation/composer-core.js +1 -1
- package/dist/components/conversation/composer-menu.js +2 -2
- package/dist/components/conversation/composer-menu.js.map +1 -1
- package/dist/components/conversation/conversation-avatar.js +7 -7
- package/dist/components/conversation/conversation-avatar.js.map +1 -1
- package/dist/components/conversation/conversation-pane.js +1 -1
- package/dist/components/conversation/conversation-pane.js.map +1 -1
- package/dist/components/conversation/conversation-surface.js +5 -5
- package/dist/components/conversation/conversation-surface.js.map +1 -1
- package/dist/components/conversation/internal/chat-composer-shell.js +9 -9
- package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
- package/dist/components/conversation/message-composer.js +9 -9
- package/dist/components/conversation/message-composer.js.map +1 -1
- package/dist/components/conversation/message-row.js +13 -13
- package/dist/components/conversation/message-row.js.map +1 -1
- package/dist/components/conversation/paste-token-editor.js +1 -1
- package/dist/components/conversation/paste-token-editor.js.map +1 -1
- package/dist/components/conversation/scroll-follow.js +1 -1
- package/dist/components/conversation/thread-panel.js +5 -5
- package/dist/components/conversation/thread-panel.js.map +1 -1
- package/dist/components/conversation/transcript-composition.js +5 -5
- package/dist/components/conversation/transcript-composition.js.map +1 -1
- package/dist/components/layout/app-shell/app-shell.js +1 -1
- package/dist/components/layout/app-shell/app-shell.js.map +1 -1
- package/dist/components/layout/app-shell/skip-link.js +1 -1
- package/dist/components/layout/app-shell/skip-link.js.map +1 -1
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.js +2 -2
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
- package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js +1 -1
- package/dist/components/layout/floating-preview/floating-preview.js +7 -7
- package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
- package/dist/components/layout/orbit-layout/orbit-layout.js +1 -1
- package/dist/components/layout/orbit-layout/orbit-layout.js.map +1 -1
- package/dist/components/layout/page/page.js +2 -2
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/panel/panel.js +1 -1
- package/dist/components/layout/panel/panel.js.map +1 -1
- package/dist/components/layout/pixel-pane/pixel-pane.js +1 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +5 -5
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
- package/dist/components/layout/shell-rail/shell-rail.js +5 -5
- package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
- package/dist/components/layout/shell-top-bar/shell-top-bar.js +2 -2
- package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail.js +2 -2
- package/dist/components/layout/side-rail/side-rail.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.js +5 -5
- package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
- package/dist/components/layout/split-layout/pane-focus.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.js +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.js +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
- package/dist/components/layout/split-layout/split-layout.js +7 -7
- package/dist/components/layout/split-layout/split-layout.js.map +1 -1
- package/dist/components/layout/status-bar/status-bar.js +1 -1
- package/dist/components/layout/status-bar/status-bar.js.map +1 -1
- package/dist/components/layout/top-bar/top-bar.js +5 -5
- package/dist/components/layout/top-bar/top-bar.js.map +1 -1
- package/dist/components/layout/virtual-window/virtual-window.js +1 -1
- package/dist/components/layout/virtual-window/virtual-window.js.map +1 -1
- package/dist/components/motion/presence.js +1 -1
- package/dist/components/theme/appearance-panel.js +3 -3
- package/dist/components/theme/appearance-panel.js.map +1 -1
- package/dist/components/theme/lazy.js +3 -3
- package/dist/components/theme/lazy.js.map +1 -1
- package/dist/components/theme/script-projection.js +1 -1
- package/dist/components/theme/theme-catalogue-source.js +1 -1
- package/dist/components/theme/theme-document.js.map +1 -1
- package/dist/components/theme/theme-mode-toggle.js +7 -7
- package/dist/components/theme/theme-mode-toggle.js.map +1 -1
- package/dist/components/theme/theme-picker.js +2 -2
- package/dist/components/theme/theme-picker.js.map +1 -1
- package/dist/components/theme/theme-provider-value.js +1 -1
- package/dist/components/theme/theme-provider-value.js.map +1 -1
- package/dist/components/theme/theme-provider.js +1 -1
- package/dist/components/theme/theme-toggle.js +7 -7
- package/dist/components/theme/theme-toggle.js.map +1 -1
- package/dist/components/ui/accordion/accordion.js +13 -13
- package/dist/components/ui/accordion/accordion.js.map +1 -1
- package/dist/components/ui/alert/alert.js +12 -12
- package/dist/components/ui/alert/alert.js.map +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog.js +14 -14
- package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/ui/annotation-surface/annotation-surface.js +2 -2
- package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
- package/dist/components/ui/aspect-ratio/aspect-ratio.js +1 -1
- package/dist/components/ui/aspect-ratio/aspect-ratio.js.map +1 -1
- package/dist/components/ui/attachment/attachment.js +16 -16
- package/dist/components/ui/attachment/attachment.js.map +1 -1
- package/dist/components/ui/avatar/avatar.js +1 -1
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/badge/badge.js +2 -2
- package/dist/components/ui/badge/badge.js.map +1 -1
- package/dist/components/ui/board/board.js +2 -2
- package/dist/components/ui/board/board.js.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js +7 -7
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble/bubble.js +2 -2
- package/dist/components/ui/bubble/bubble.js.map +1 -1
- package/dist/components/ui/button/button.js +2 -2
- package/dist/components/ui/button-group/button-group.js +2 -2
- package/dist/components/ui/button-group/button-group.js.map +1 -1
- package/dist/components/ui/calendar/calendar.js +8 -8
- package/dist/components/ui/calendar/calendar.js.map +1 -1
- package/dist/components/ui/callout/callout.js +2 -2
- package/dist/components/ui/callout/callout.js.map +1 -1
- package/dist/components/ui/card/card.js +2 -2
- package/dist/components/ui/card/card.js.map +1 -1
- package/dist/components/ui/carousel/carousel.js +8 -8
- package/dist/components/ui/carousel/carousel.js.map +1 -1
- package/dist/components/ui/chart/chart.js +2 -2
- package/dist/components/ui/chart/chart.js.map +1 -1
- package/dist/components/ui/checkbox/checkbox.js +6 -6
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/code-block/code-block.js +6 -6
- package/dist/components/ui/code-block/code-block.js.map +1 -1
- package/dist/components/ui/collapsible/collapsible.js +7 -7
- package/dist/components/ui/collapsible/collapsible.js.map +1 -1
- package/dist/components/ui/combobox/combobox.js +21 -21
- package/dist/components/ui/combobox/combobox.js.map +1 -1
- package/dist/components/ui/combobox/value-combobox.js +1 -1
- package/dist/components/ui/command/command.js +23 -23
- package/dist/components/ui/command/command.js.map +1 -1
- package/dist/components/ui/context-menu/context-menu.js +2 -2
- package/dist/components/ui/detail-panel/detail-panel.js +5 -5
- package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
- package/dist/components/ui/dialog/dialog-layer.js +2 -2
- package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
- package/dist/components/ui/dialog/dialog.js +21 -21
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/diff-block/diff-block.js +2 -2
- package/dist/components/ui/diff-block/diff-block.js.map +1 -1
- package/dist/components/ui/drawer/drawer.js +14 -14
- package/dist/components/ui/drawer/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +3 -3
- package/dist/components/ui/dropdown-menu/menu-parts.js +10 -10
- package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
- package/dist/components/ui/empty/empty-state.js +5 -5
- package/dist/components/ui/empty/empty-state.js.map +1 -1
- package/dist/components/ui/empty/empty.js +1 -1
- package/dist/components/ui/empty/empty.js.map +1 -1
- package/dist/components/ui/entity-icon/entity-icon.js +2 -2
- package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
- package/dist/components/ui/field/field.js +14 -14
- package/dist/components/ui/field/field.js.map +1 -1
- package/dist/components/ui/field/number-field.js +2 -2
- package/dist/components/ui/field/number-field.js.map +1 -1
- package/dist/components/ui/hover-card/hover-card.js +10 -10
- package/dist/components/ui/hover-card/hover-card.js.map +1 -1
- package/dist/components/ui/input/input-control.js +1 -1
- package/dist/components/ui/input/input-control.js.map +1 -1
- package/dist/components/ui/input/input.js +2 -2
- package/dist/components/ui/input/input.js.map +1 -1
- package/dist/components/ui/input-group/input-group.js +2 -2
- package/dist/components/ui/input-group/input-group.js.map +1 -1
- package/dist/components/ui/input-group/secret-input-group.js +2 -2
- package/dist/components/ui/input-otp/input-otp.js +2 -2
- package/dist/components/ui/input-otp/input-otp.js.map +1 -1
- package/dist/components/ui/item/item.js +2 -2
- package/dist/components/ui/item/item.js.map +1 -1
- package/dist/components/ui/kbd/kbd.js +2 -2
- package/dist/components/ui/kbd/kbd.js.map +1 -1
- package/dist/components/ui/label/label.js +1 -1
- package/dist/components/ui/label/label.js.map +1 -1
- package/dist/components/ui/marker/marker.js +2 -2
- package/dist/components/ui/marker/marker.js.map +1 -1
- package/dist/components/ui/menubar/menubar.js +7 -7
- package/dist/components/ui/menubar/menubar.js.map +1 -1
- package/dist/components/ui/message/message.js +3 -3
- package/dist/components/ui/message/message.js.map +1 -1
- package/dist/components/ui/modal-dialog/modal-dialog.js +2 -2
- package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/ui/native-select/native-select.js +5 -5
- package/dist/components/ui/native-select/native-select.js.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.js +18 -18
- package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination/pagination.js +28 -28
- package/dist/components/ui/pagination/pagination.js.map +1 -1
- package/dist/components/ui/popover/popover.js +15 -15
- package/dist/components/ui/popover/popover.js.map +1 -1
- package/dist/components/ui/progress/progress.js +5 -5
- package/dist/components/ui/progress/progress.js.map +1 -1
- package/dist/components/ui/questionnaire/questionnaire.js +10 -10
- package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group/radio-group.js +9 -9
- package/dist/components/ui/radio-group/radio-group.js.map +1 -1
- package/dist/components/ui/resizable/resizable.js +11 -11
- package/dist/components/ui/resizable/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/ui/select/select.js +21 -21
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/separator/separator.js +5 -5
- package/dist/components/ui/separator/separator.js.map +1 -1
- package/dist/components/ui/sheet/sheet.js +6 -6
- package/dist/components/ui/sheet/sheet.js.map +1 -1
- package/dist/components/ui/skeleton/skeleton.js +1 -1
- package/dist/components/ui/skeleton/skeleton.js.map +1 -1
- package/dist/components/ui/slider/slider.js +5 -5
- package/dist/components/ui/slider/slider.js.map +1 -1
- package/dist/components/ui/spinner/spinner.js +5 -5
- package/dist/components/ui/spinner/spinner.js.map +1 -1
- package/dist/components/ui/status-chip/status-chip.js +2 -2
- package/dist/components/ui/status-chip/status-chip.js.map +1 -1
- package/dist/components/ui/switch/switch.js +4 -4
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/table/table.js +1 -1
- package/dist/components/ui/table/table.js.map +1 -1
- package/dist/components/ui/tabs/tabs.js +7 -7
- package/dist/components/ui/tabs/tabs.js.map +1 -1
- package/dist/components/ui/text-link/text-link.js +1 -1
- package/dist/components/ui/text-link/text-link.js.map +1 -1
- package/dist/components/ui/textarea/textarea.js +2 -2
- package/dist/components/ui/textarea/textarea.js.map +1 -1
- package/dist/components/ui/toast/toast.js +7 -7
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/components/ui/toggle/toggle.js +6 -6
- package/dist/components/ui/toggle/toggle.js.map +1 -1
- package/dist/components/ui/toggle-group/toggle-group.js +7 -8
- package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/ui/tooltip/deferred-tooltip.js +6 -6
- package/dist/components/ui/tooltip/deferred-tooltip.js.map +1 -1
- package/dist/components/ui/tooltip/lazy-tooltip.js +2 -2
- package/dist/components/ui/tooltip/tooltip.js +10 -10
- package/dist/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/components/ui/trace/trace.js +19 -19
- package/dist/components/ui/trace/trace.js.map +1 -1
- package/dist/components/ui/typography/typography.js +2 -2
- package/dist/lib/accent-presets.js +1 -1
- package/dist/lib/accent-roles.js +2 -2
- package/dist/lib/async-action.js +1 -1
- package/dist/lib/create-poll.js +1 -1
- package/dist/lib/create-poll.js.map +1 -1
- package/dist/lib/external-link.js +1 -1
- package/dist/lib/external-link.js.map +1 -1
- package/dist/lib/fast-icon.js +1 -1
- package/dist/lib/theme-css.js +1 -1
- package/dist/lib/theme-engine-light.js +1 -1
- package/dist/lib/theme-projection.js +2 -2
- package/dist/lib/theme-records.js +1 -1
- package/dist/lib/themes.js +1 -1
- package/dist/lib/themes.js.map +1 -1
- package/dist/lib/tooltip-focus-gate.js.map +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/vite/source-parser.js +1 -1
- package/dist/vite/tailwind-sources.js +1 -1
- package/package.json +7 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { className, createComponent, delegateEvents, effect, insert, memo, readShallow, ref, setAttribute, spread, template } from "@solidjs/web";
|
|
2
|
+
import { For, Show, createEffect, createMemo, createProjection, createSignal, omit, onCleanup, untrack } from "solid-js";
|
|
1
3
|
import { cva } from "../../../lib/variants.js";
|
|
2
4
|
import { cn } from "../../../lib/utils.js";
|
|
3
5
|
import { badgeVariants } from "../badge/badge.js";
|
|
4
6
|
import { headingVariants, textVariants } from "../typography/typography.js";
|
|
5
|
-
import { className, createComponent, delegateEvents, effect, insert, memo, readShallow, ref, setAttribute, spread, template } from "@solidjs/web";
|
|
6
|
-
import { For, Show, createEffect, createMemo, createProjection, createSignal, omit, onCleanup, untrack } from "solid-js";
|
|
7
7
|
// src/components/ui/board/board.tsx
|
|
8
8
|
var _tmpl$ = /* @__PURE__ */ template(`<span aria-hidden=true>`);
|
|
9
9
|
var _tmpl$2 = /* @__PURE__ */ template(`<span data-slot=board-column-count>`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board.js","names":["<Show when={props.tone}>\n {(tone) => (\n <span aria-hidden=\"true\" class={cn('size-2 shrink-0 rounded-full', toneDot[tone()])} />\n )}\n </Show>","<Show when={props.count !== undefined}>\n {/* The Badge's classes, not the component: Board stays plain markup. */}\n <span\n class={cn(badgeVariants({ variant: 'subtle', size: 'sm' }), 'tabular-nums')}\n data-slot=\"board-column-count\"\n >\n {/* A string: the renderer assigns a lone number through textContent, and\n some DOMs (happy-dom) drop a 0 there, leaving no node to update. */}\n {String(props.count)}\n </span>\n </Show>","<For keyed={false} each={local.columns}>\n {(column) => {\n const items = () => byColumn().get(column().id) ?? []\n const collapsed = () =>\n Boolean(local.collapseEmpty) && column().collapsible !== false && items().length === 0\n const over = () => overColumn() === column().id\n return (\n <section\n class={cn(\n 'flex shrink-0 flex-col rounded-lg border border-border bg-muted/40 transition-colors',\n {\n 'w-72': !collapsed(),\n 'w-10 items-center': collapsed(),\n 'border-dashed border-ring': accepts(column()) && !over(),\n 'border-ring bg-primary-subtle': accepts(column()) && over(),\n 'border-dashed opacity-60': over() && !accepts(column()),\n 'opacity-50': column().disabled,\n }\n )}\n aria-label={column().label}\n data-collapsed={collapsed() ? '' : undefined}\n onDragOver={(event) => {\n setOverColumn(column().id)\n if (accepts(column())) event.preventDefault()\n }}\n onDragLeave={(event) => {\n // Leaving for a child is not leaving the lane.\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n setOverColumn((current) => (current === column().id ? null : current))\n }}\n onDrop={(event) => {\n event.preventDefault()\n drop(column())\n }}\n >\n <Show\n when={!collapsed()}\n fallback={\n <header class=\"flex flex-col items-center gap-2 py-3\">\n <BoardColumnDot tone={column().tone} />\n <BoardColumnCount count={column().count} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'muted' }),\n 'text-vertical'\n )}\n >\n {column().label}\n </h3>\n </header>\n }\n >\n <header class=\"flex h-10 shrink-0 items-center gap-2 px-3\">\n <BoardColumnDot tone={column().tone} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'foreground' }),\n 'truncate'\n )}\n >\n {column().label}\n </h3>\n <BoardColumnCount count={column().count} />\n <Show when={column().meta}>\n <span class=\"ms-auto text-2xs text-muted-foreground\">{column().meta}</span>\n </Show>\n </header>\n <div class=\"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2\">\n <For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n // The row's owner unregisters the card: a ref callback cannot\n // own a cleanup.\n let card: HTMLElement | undefined\n let cardId: string | undefined\n onCleanup(() => {\n if (cardId !== undefined && cardElements.get(cardId) === card)\n cardElements.delete(cardId)\n })\n return (\n <article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>\n <Show when={items().length === 0}>\n <p class=\"rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground\">\n {local.emptyColumn?.(column()) ?? 'Nothing here'}\n </p>\n </Show>\n </div>\n </Show>\n </section>\n )\n }}\n </For>","keyed={false}","<BoardColumnDot tone={column().tone} />","<header class=\"flex h-10 shrink-0 items-center gap-2 px-3\">\n <BoardColumnDot tone={column().tone} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'foreground' }),\n 'truncate'\n )}\n >\n {column().label}\n </h3>\n <BoardColumnCount count={column().count} />\n <Show when={column().meta}>\n <span class=\"ms-auto text-2xs text-muted-foreground\">{column().meta}</span>\n </Show>\n </header>","<BoardColumnCount count={column().count} />","<For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n // The row's owner unregisters the card: a ref callback cannot\n // own a cleanup.\n let card: HTMLElement | undefined\n let cardId: string | undefined\n onCleanup(() => {\n if (cardId !== undefined && cardElements.get(cardId) === card)\n cardElements.delete(cardId)\n })\n return (\n <article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>","ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}","<article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>","<div class=\"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2\">\n <For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n // The row's owner unregisters the card: a ref callback cannot\n // own a cleanup.\n let card: HTMLElement | undefined\n let cardId: string | undefined\n onCleanup(() => {\n if (cardId !== undefined && cardElements.get(cardId) === card)\n cardElements.delete(cardId)\n })\n return (\n <article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>\n <Show when={items().length === 0}>\n <p class=\"rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground\">\n {local.emptyColumn?.(column()) ?? 'Nothing here'}\n </p>\n </Show>\n </div>","<header class=\"flex flex-col items-center gap-2 py-3\">\n <BoardColumnDot tone={column().tone} />\n <BoardColumnCount count={column().count} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'muted' }),\n 'text-vertical'\n )}\n >\n {column().label}\n </h3>\n </header>","aria-label={column().label}","data-collapsed={collapsed() ? '' : undefined}","<section\n class={cn(\n 'flex shrink-0 flex-col rounded-lg border border-border bg-muted/40 transition-colors',\n {\n 'w-72': !collapsed(),\n 'w-10 items-center': collapsed(),\n 'border-dashed border-ring': accepts(column()) && !over(),\n 'border-ring bg-primary-subtle': accepts(column()) && over(),\n 'border-dashed opacity-60': over() && !accepts(column()),\n 'opacity-50': column().disabled,\n }\n )}\n aria-label={column().label}\n data-collapsed={collapsed() ? '' : undefined}\n onDragOver={(event) => {\n setOverColumn(column().id)\n if (accepts(column())) event.preventDefault()\n }}\n onDragLeave={(event) => {\n // Leaving for a child is not leaving the lane.\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n setOverColumn((current) => (current === column().id ? null : current))\n }}\n onDrop={(event) => {\n event.preventDefault()\n drop(column())\n }}\n >\n <Show\n when={!collapsed()}\n fallback={\n <header class=\"flex flex-col items-center gap-2 py-3\">\n <BoardColumnDot tone={column().tone} />\n <BoardColumnCount count={column().count} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'muted' }),\n 'text-vertical'\n )}\n >\n {column().label}\n </h3>\n </header>\n }\n >\n <header class=\"flex h-10 shrink-0 items-center gap-2 px-3\">\n <BoardColumnDot tone={column().tone} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'foreground' }),\n 'truncate'\n )}\n >\n {column().label}\n </h3>\n <BoardColumnCount count={column().count} />\n <Show when={column().meta}>\n <span class=\"ms-auto text-2xs text-muted-foreground\">{column().meta}</span>\n </Show>\n </header>\n <div class=\"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2\">\n <For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n // The row's owner unregisters the card: a ref callback cannot\n // own a cleanup.\n let card: HTMLElement | undefined\n let cardId: string | undefined\n onCleanup(() => {\n if (cardId !== undefined && cardElements.get(cardId) === card)\n cardElements.delete(cardId)\n })\n return (\n <article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>\n <Show when={items().length === 0}>\n <p class=\"rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground\">\n {local.emptyColumn?.(column()) ?? 'Nothing here'}\n </p>\n </Show>\n </div>\n </Show>\n </section>","<div\n class={cn('flex min-h-0 gap-3 overflow-x-auto pb-2', local.class)}\n role=\"region\"\n aria-label={local.label ?? 'Board'}\n tabindex=\"0\"\n >\n {/*\n Index, not For: callers derive columns (a count, a tone) and hand over\n fresh objects whenever a card moves. Keyed by identity, every lane would\n remount on each move and take the moved card's restored focus with it.\n */}\n <For keyed={false} each={local.columns}>\n {(column) => {\n const items = () => byColumn().get(column().id) ?? []\n const collapsed = () =>\n Boolean(local.collapseEmpty) && column().collapsible !== false && items().length === 0\n const over = () => overColumn() === column().id\n return (\n <section\n class={cn(\n 'flex shrink-0 flex-col rounded-lg border border-border bg-muted/40 transition-colors',\n {\n 'w-72': !collapsed(),\n 'w-10 items-center': collapsed(),\n 'border-dashed border-ring': accepts(column()) && !over(),\n 'border-ring bg-primary-subtle': accepts(column()) && over(),\n 'border-dashed opacity-60': over() && !accepts(column()),\n 'opacity-50': column().disabled,\n }\n )}\n aria-label={column().label}\n data-collapsed={collapsed() ? '' : undefined}\n onDragOver={(event) => {\n setOverColumn(column().id)\n if (accepts(column())) event.preventDefault()\n }}\n onDragLeave={(event) => {\n // Leaving for a child is not leaving the lane.\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n setOverColumn((current) => (current === column().id ? null : current))\n }}\n onDrop={(event) => {\n event.preventDefault()\n drop(column())\n }}\n >\n <Show\n when={!collapsed()}\n fallback={\n <header class=\"flex flex-col items-center gap-2 py-3\">\n <BoardColumnDot tone={column().tone} />\n <BoardColumnCount count={column().count} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'muted' }),\n 'text-vertical'\n )}\n >\n {column().label}\n </h3>\n </header>\n }\n >\n <header class=\"flex h-10 shrink-0 items-center gap-2 px-3\">\n <BoardColumnDot tone={column().tone} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'foreground' }),\n 'truncate'\n )}\n >\n {column().label}\n </h3>\n <BoardColumnCount count={column().count} />\n <Show when={column().meta}>\n <span class=\"ms-auto text-2xs text-muted-foreground\">{column().meta}</span>\n </Show>\n </header>\n <div class=\"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2\">\n <For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n // The row's owner unregisters the card: a ref callback cannot\n // own a cleanup.\n let card: HTMLElement | undefined\n let cardId: string | undefined\n onCleanup(() => {\n if (cardId !== undefined && cardElements.get(cardId) === card)\n cardElements.delete(cardId)\n })\n return (\n <article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>\n <Show when={items().length === 0}>\n <p class=\"rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground\">\n {local.emptyColumn?.(column()) ?? 'Nothing here'}\n </p>\n </Show>\n </div>\n </Show>\n </section>\n )\n }}\n </For>\n {/*\n The keyboard move's result, announced. A drag speaks for itself — the card\n visibly moves — while a keyboard move happens with the focus elsewhere.\n */}\n <div class=\"visually-hidden\" role=\"status\" aria-live=\"polite\">\n {announcement()}\n </div>\n </div>","aria-label={local.label ?? 'Board'}","<h4 class={cn(boardCardTitleVariants({ size: props.size }), props.class)}>{props.children}</h4>","<div class={cn('grid gap-1.5 p-2.5', props.class)}>{props.children}</div>","<button\n type={local.type ?? 'button'}\n data-slot=\"board-card-trigger\"\n class={cn(\n textVariants({ variant: 'label', tone: 'foreground' }),\n 'min-w-0 flex-1 truncate rounded-sm text-start outline-none',\n 'after:absolute after:inset-0 after:rounded-md',\n 'focus-visible:ring-3 focus-visible:ring-primary-subtle',\n local.class\n )}\n {...rest}\n />","_$readShallow","_$setAttribute"],"sources":["../../../../src/components/ui/board/board.tsx"],"sourcesContent":["import {\n createEffect,\n createMemo,\n createProjection,\n createSignal,\n For,\n onCleanup,\n Show,\n omit,\n untrack,\n} from 'solid-js'\nimport { type ComponentProps, type JSX } from '@solidjs/web'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\nimport { badgeVariants } from '../badge'\nimport { headingVariants, textVariants } from '../typography'\n\n/**\n * Board.\n *\n * Columns of cards, with drag between them — the shape a task tracker, a CRM\n * pipeline, a support queue and a release plan all share. It is generic in the\n * one place that matters: the *column ids are the caller's*, and so is the rule\n * that decides which moves are legal. The component knows nothing about tasks.\n *\n * The transitions are a predicate rather than a derived table because the legal\n * moves in a real product are not \"any column to any column\". A task that is\n * `completed` may be archived but not re-queued; a lead may become a customer but\n * not a stranger again. A board that let you drop anything anywhere would encode\n * a state machine in the UI that the server rejects — so `canDrop` is required,\n * and a column that cannot receive the dragged card renders as unavailable rather\n * than silently accepting a drop that will fail.\n *\n * Three input methods, because a drag-only board is unusable by keyboard:\n * dragging with the pointer, `Ctrl`/`Cmd` + arrow keys to move a focused card\n * between columns, and whatever the caller wires into `actions`. The card is\n * focusable and its move is announced through a live region, so the board is\n * operable without a mouse.\n *\n * The card is rendered by the caller through `children`, given the item and a set\n * of drag props. That is deliberate: a card's contents are domain — a title, a\n * priority tag, an assignee — and a board that rendered them itself could only\n * ever serve one product.\n *\n * `collapseEmpty` folds a column with no cards to a strip one line of text wide,\n * its label turned on its side. A board of seven lanes where three are empty\n * otherwise spends half its width on nothing, and the lanes with work in them\n * are the ones that need the room. A folded lane is still a full-height drop\n * target and still accepts a keyboard move, so nothing about operating the\n * board changes; it does not unfold under a drag, because a lane that grows\n * under the pointer moves every lane after it and the drop lands somewhere else.\n *\n * Give the board a height (`class=\"h-full\"`) and each lane scrolls on its own;\n * leave it unconstrained and lanes grow with their cards and the page scrolls.\n */\n\n/**\n * A lane's identifying colour, drawn as a dot before its label. The chart hues,\n * in the order the token set gives them, because a lane colour tells lanes apart\n * like a series does; it carries no status. `neutral` is for a lane that should\n * not draw the eye — a backlog, an archive.\n */\nexport type BoardTone =\n | 'neutral'\n | 'chart-1'\n | 'chart-2'\n | 'chart-3'\n | 'chart-4'\n | 'chart-5'\n | 'chart-6'\n\nexport type BoardColumn = Readonly<{\n id: string\n label: string\n /** The number of cards, shown as an accent count beside the label. */\n count?: number\n /** A limit or any other note, shown after the count. */\n meta?: JSX.Element\n /** The lane's dot colour. Omitted, the header has no dot. */\n tone?: BoardTone\n /**\n * `false` keeps this lane open when it is empty under `collapseEmpty` — the\n * inbox lane new cards arrive in, which should always show where they land.\n */\n collapsible?: boolean\n /** Dim the column and refuse drops — a lane that is closed or read-only. */\n disabled?: boolean\n}>\n\nexport type BoardMove = Readonly<{\n itemId: string\n from: string\n to: string\n}>\n\nexport type BoardProps<T> = {\n columns: readonly BoardColumn[]\n items: readonly T[]\n itemId: (item: T) => string\n itemColumn: (item: T) => string\n /** Whether `item` may move from `from` to `to`. Required: see the note above. */\n canDrop: (item: T, from: string, to: string) => boolean\n onMove: (move: BoardMove) => void\n /** The card body. `dragging` is true while this card is the one being dragged. */\n children: (item: T, state: { dragging: boolean }) => JSX.Element\n emptyColumn?: (column: BoardColumn) => JSX.Element\n /** The board's accessible name. Defaults to \"Board\". */\n label?: string\n /** Fold columns with no cards to a narrow strip with a sideways label. */\n collapseEmpty?: boolean\n class?: string\n}\n\nconst cardDragState = {\n idle: '',\n dragging: 'opacity-40',\n} as const\n\nconst toneDot: Record<BoardTone, string> = {\n neutral: 'bg-muted-foreground',\n 'chart-1': 'bg-chart-1',\n 'chart-2': 'bg-chart-2',\n 'chart-3': 'bg-chart-3',\n 'chart-4': 'bg-chart-4',\n 'chart-5': 'bg-chart-5',\n 'chart-6': 'bg-chart-6',\n}\n\nfunction BoardColumnDot(props: { tone?: BoardTone }) {\n return (\n <Show when={props.tone}>\n {(tone) => (\n <span aria-hidden=\"true\" class={cn('size-2 shrink-0 rounded-full', toneDot[tone()])} />\n )}\n </Show>\n )\n}\n\nfunction BoardColumnCount(props: { count?: number }) {\n return (\n <Show when={props.count !== undefined}>\n {/* The Badge's classes, not the component: Board stays plain markup. */}\n <span\n class={cn(badgeVariants({ variant: 'subtle', size: 'sm' }), 'tabular-nums')}\n data-slot=\"board-column-count\"\n >\n {/* A string: the renderer assigns a lone number through textContent, and\n some DOMs (happy-dom) drop a 0 there, leaving no node to update. */}\n {String(props.count)}\n </span>\n </Show>\n )\n}\n\nexport function Board<T>(props: BoardProps<T>) {\n const local = props\n\n // The dragged item, not its id: `canDrop` takes the item itself, and the\n // pointer may leave the card before it is dropped.\n const [dragging, setDragging] = createSignal<T | null>(null)\n // Only the two cards whose answer flips update when a drag starts or ends.\n const draggingIds = createProjection<Record<string, true>>((draft) => {\n const current = dragging()\n const id = current ? local.itemId(current) : undefined\n for (const key of Object.keys(draft)) if (key !== id) delete draft[key]\n if (id !== undefined) draft[id] = true\n }, {})\n const isDraggingId = (id: string) => draggingIds[id] === true\n const [overColumn, setOverColumn] = createSignal<string | null>(null)\n const [announcement, setAnnouncement] = createSignal('')\n const cardElements = new Map<string, HTMLElement>()\n const [pendingFocus, setPendingFocus] = createSignal<{\n itemId: string\n columnId: string\n source: HTMLElement\n } | null>(null)\n const cancelOnPointer = () => setPendingFocus(null)\n\n // A controlled move can settle after a server response. Restore only the\n // focus that belonged to the moved card; another focus action cancels it.\n createEffect(pendingFocus, (pending) => {\n if (!pending) return\n const document = pending.source.ownerDocument\n const cancelOnFocus = (event: FocusEvent) => {\n if (!pending.source.contains(event.target as Node)) setPendingFocus(null)\n }\n document.addEventListener('focusin', cancelOnFocus)\n document.addEventListener('pointerdown', cancelOnPointer)\n return () => {\n document.removeEventListener('focusin', cancelOnFocus)\n document.removeEventListener('pointerdown', cancelOnPointer)\n }\n })\n\n // The compute answers \"has the pending card landed in its column\"; the apply\n // moves focus to it and clears the request.\n createEffect(\n () => {\n const pending = pendingFocus()\n if (!pending) return undefined\n const moved = local.items.find((item) => local.itemId(item) === pending.itemId)\n return moved && local.itemColumn(moved) === pending.columnId ? pending : undefined\n },\n (landed) => {\n if (!landed) return\n const target = cardElements.get(landed.itemId)\n setPendingFocus(null)\n if (target?.isConnected) target.focus()\n }\n )\n\n /**\n * `always` is for a pointer drop: dragging a card is a direct act on it, so it\n * ends focused wherever focus was. Chromium also blurs a focused control\n * inside a draggable once the native drag starts, so \"was focus in the card\"\n * cannot be read at drop time.\n */\n const prepareFocus = (item: T, columnId: string, source?: HTMLElement, always = false) => {\n const card = source ?? cardElements.get(local.itemId(item))\n if (card && (always || card.contains(card.ownerDocument.activeElement))) {\n setPendingFocus({ itemId: local.itemId(item), columnId, source: card })\n }\n }\n\n const byColumn = createMemo(() => {\n const grouped = new Map<string, T[]>()\n for (const column of local.columns) grouped.set(column.id, [])\n for (const item of local.items) grouped.get(local.itemColumn(item))?.push(item)\n return grouped\n })\n\n const accepts = (column: BoardColumn) => {\n const item = dragging()\n return Boolean(\n item && !column.disabled && local.canDrop(item, local.itemColumn(item), column.id)\n )\n }\n\n const drop = (column: BoardColumn) => {\n const item = dragging()\n const from = item ? local.itemColumn(item) : null\n const accepted = accepts(column)\n setDragging(null)\n setOverColumn(null)\n if (!item || !from || from === column.id || !accepted) return\n prepareFocus(item, column.id, undefined, true)\n local.onMove({ itemId: local.itemId(item), from, to: column.id })\n }\n\n /**\n * Keyboard move. `Ctrl`/`Cmd` plus an arrow is the convention for \"reorder this\n * thing within its container\" that does not collide with scrolling or with the\n * text caret, and it is the same chord a browser tab or a spreadsheet uses.\n */\n const moveByKeyboard = (item: T, direction: -1 | 1, source: HTMLElement) => {\n const from = local.itemColumn(item)\n const index = local.columns.findIndex((column) => column.id === from)\n if (index < 0) return\n const ordered =\n direction === 1 ? local.columns.slice(index + 1) : local.columns.slice(0, index).toReversed()\n const target = ordered.find(\n (column) => !column.disabled && local.canDrop(item, from, column.id)\n )\n if (!target) {\n setAnnouncement(`No column after ${from} accepts this item`)\n return\n }\n prepareFocus(item, target.id, source)\n local.onMove({ itemId: local.itemId(item), from, to: target.id })\n setAnnouncement(`Moved to ${target.label}`)\n }\n\n return (\n /*\n `role=\"region\"` + `tabindex=\"0\"` because the board scrolls horizontally and a\n keyboard user has to be able to scroll it — axe's `scrollable-region-focusable`.\n It is not enough that the cards are focusable: a board with empty columns, or\n with more columns than fit, has nothing focusable to scroll from.\n */\n <div\n class={cn('flex min-h-0 gap-3 overflow-x-auto pb-2', local.class)}\n role=\"region\"\n aria-label={local.label ?? 'Board'}\n tabindex=\"0\"\n >\n {/*\n Index, not For: callers derive columns (a count, a tone) and hand over\n fresh objects whenever a card moves. Keyed by identity, every lane would\n remount on each move and take the moved card's restored focus with it.\n */}\n <For keyed={false} each={local.columns}>\n {(column) => {\n const items = () => byColumn().get(column().id) ?? []\n const collapsed = () =>\n Boolean(local.collapseEmpty) && column().collapsible !== false && items().length === 0\n const over = () => overColumn() === column().id\n return (\n <section\n class={cn(\n 'flex shrink-0 flex-col rounded-lg border border-border bg-muted/40 transition-colors',\n {\n 'w-72': !collapsed(),\n 'w-10 items-center': collapsed(),\n 'border-dashed border-ring': accepts(column()) && !over(),\n 'border-ring bg-primary-subtle': accepts(column()) && over(),\n 'border-dashed opacity-60': over() && !accepts(column()),\n 'opacity-50': column().disabled,\n }\n )}\n aria-label={column().label}\n data-collapsed={collapsed() ? '' : undefined}\n onDragOver={(event) => {\n setOverColumn(column().id)\n if (accepts(column())) event.preventDefault()\n }}\n onDragLeave={(event) => {\n // Leaving for a child is not leaving the lane.\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n setOverColumn((current) => (current === column().id ? null : current))\n }}\n onDrop={(event) => {\n event.preventDefault()\n drop(column())\n }}\n >\n <Show\n when={!collapsed()}\n fallback={\n <header class=\"flex flex-col items-center gap-2 py-3\">\n <BoardColumnDot tone={column().tone} />\n <BoardColumnCount count={column().count} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'muted' }),\n 'text-vertical'\n )}\n >\n {column().label}\n </h3>\n </header>\n }\n >\n <header class=\"flex h-10 shrink-0 items-center gap-2 px-3\">\n <BoardColumnDot tone={column().tone} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'foreground' }),\n 'truncate'\n )}\n >\n {column().label}\n </h3>\n <BoardColumnCount count={column().count} />\n <Show when={column().meta}>\n <span class=\"ms-auto text-2xs text-muted-foreground\">{column().meta}</span>\n </Show>\n </header>\n <div class=\"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2\">\n <For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n // The row's owner unregisters the card: a ref callback cannot\n // own a cleanup.\n let card: HTMLElement | undefined\n let cardId: string | undefined\n onCleanup(() => {\n if (cardId !== undefined && cardElements.get(cardId) === card)\n cardElements.delete(cardId)\n })\n return (\n <article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>\n <Show when={items().length === 0}>\n <p class=\"rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground\">\n {local.emptyColumn?.(column()) ?? 'Nothing here'}\n </p>\n </Show>\n </div>\n </Show>\n </section>\n )\n }}\n </For>\n {/*\n The keyboard move's result, announced. A drag speaks for itself — the card\n visibly moves — while a keyboard move happens with the focus elsewhere.\n */}\n <div class=\"visually-hidden\" role=\"status\" aria-live=\"polite\">\n {announcement()}\n </div>\n </div>\n )\n}\n\nexport const boardCardTitleVariants = cva('truncate font-medium text-foreground', {\n variants: { size: { sm: 'text-xs', md: 'text-sm' } },\n defaultVariants: { size: 'md' },\n})\n\nexport type BoardCardTitleProps = { class?: string; children: JSX.Element } & VariantProps<\n typeof boardCardTitleVariants\n>\n\n/** The card's title line, at the size a board card uses. */\nexport function BoardCardTitle(props: BoardCardTitleProps) {\n return (\n <h4 class={cn(boardCardTitleVariants({ size: props.size }), props.class)}>{props.children}</h4>\n )\n}\n\n/** A card's padding, so every card in an application is the same shape. */\nexport function BoardCardBody(props: { class?: string; children: JSX.Element }) {\n return <div class={cn('grid gap-1.5 p-2.5', props.class)}>{props.children}</div>\n}\n\n/**\n * The card's open action: its title, as a real button whose hit area stretches\n * over the whole card. A card is one target to a pointer — clicking anywhere on\n * it opens it — while assistive technology still meets a named button rather\n * than a clickable `article`. Other controls on the card sit above the stretched\n * area by being positioned (`class=\"relative\"`), so they keep their own click.\n */\nexport function BoardCardTrigger(props: ComponentProps<'button'>) {\n const local = props\n const rest = omit(props, 'class', 'type')\n return (\n <button\n type={local.type ?? 'button'}\n data-slot=\"board-card-trigger\"\n class={cn(\n textVariants({ variant: 'label', tone: 'foreground' }),\n 'min-w-0 flex-1 truncate rounded-sm text-start outline-none',\n 'after:absolute after:inset-0 after:rounded-md',\n 'focus-visible:ring-3 focus-visible:ring-primary-subtle',\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiHA,IAAM,gBAAgB;CACpB,MAAM;CACN,UAAU;AACZ;AAEA,IAAM,UAAqC;CACzC,SAAS;CACT,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;AACb;AAEA,SAAS,eAAe,OAA6B;CACnD,OACEA,gBAAAA,MAAAA;EAAM,IAAA,OAAA;GAAM,OAAA,MAAM;EAAI;EAAtBA,WACI,gBACA;GAAsF,IAAA,OAAA,OAAA;GAA7D,aAAAoB,YAAO,GAAG,gCAAgC,QAAQ,KAAK,EAAE,CAAC,IAA1D,KAAA,QAAA;IAA0D,UAAA,MAAA,KAAA,GAAA;;GAAnF,OAAA;EAAsF,EAAA,CAAA;CAEpF,CAAA;AAEV;AAEA,SAAS,iBAAiB,OAA2B;CACnD,OACEnB,WAAAA;;GAAY,OAAA,MAAM,UAAU,KAAA;EAUtB,CAAA,CAAC,CAAD,WARJ;GAOM,IAAA,QAAA,QAAA;GAPN,OAAA,aAME;IAAC,OAAA,OAAO,MAAM,KAAK;GAAC,CAChB;GANJ,aAAAmB,YAAO,GAAG,c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A,CAAA;EATA,IAAA,OAAA;GAAM,OAAA,MAAM,QAAQ;EAAQ;EAC5B,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,aAAa;IAAE,SAAS;IAAS,MAAM;GAAa,CAAC,GACrD,8DACA,iDACA,0DACA,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,KAAA;CAXR,OACEC;AAaJ"}
|
|
1
|
+
{"version":3,"file":"board.js","names":["<Show when={props.tone}>\n {(tone) => (\n <span aria-hidden=\"true\" class={cn('size-2 shrink-0 rounded-full', toneDot[tone()])} />\n )}\n </Show>","<Show when={props.count !== undefined}>\n {/* The Badge's classes, not the component: Board stays plain markup. */}\n <span\n class={cn(badgeVariants({ variant: 'subtle', size: 'sm' }), 'tabular-nums')}\n data-slot=\"board-column-count\"\n >\n {/* A string: the renderer assigns a lone number through textContent, and\n some DOMs (happy-dom) drop a 0 there, leaving no node to update. */}\n {String(props.count)}\n </span>\n </Show>","<For keyed={false} each={local.columns}>\n {(column) => {\n const items = () => byColumn().get(column().id) ?? []\n const collapsed = () =>\n Boolean(local.collapseEmpty) && column().collapsible !== false && items().length === 0\n const over = () => overColumn() === column().id\n return (\n <section\n class={cn(\n 'flex shrink-0 flex-col rounded-lg border border-border bg-muted/40 transition-colors',\n {\n 'w-72': !collapsed(),\n 'w-10 items-center': collapsed(),\n 'border-dashed border-ring': accepts(column()) && !over(),\n 'border-ring bg-primary-subtle': accepts(column()) && over(),\n 'border-dashed opacity-60': over() && !accepts(column()),\n 'opacity-50': column().disabled,\n }\n )}\n aria-label={column().label}\n data-collapsed={collapsed() ? '' : undefined}\n onDragOver={(event) => {\n setOverColumn(column().id)\n if (accepts(column())) event.preventDefault()\n }}\n onDragLeave={(event) => {\n // Leaving for a child is not leaving the lane.\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n setOverColumn((current) => (current === column().id ? null : current))\n }}\n onDrop={(event) => {\n event.preventDefault()\n drop(column())\n }}\n >\n <Show\n when={!collapsed()}\n fallback={\n <header class=\"flex flex-col items-center gap-2 py-3\">\n <BoardColumnDot tone={column().tone} />\n <BoardColumnCount count={column().count} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'muted' }),\n 'text-vertical'\n )}\n >\n {column().label}\n </h3>\n </header>\n }\n >\n <header class=\"flex h-10 shrink-0 items-center gap-2 px-3\">\n <BoardColumnDot tone={column().tone} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'foreground' }),\n 'truncate'\n )}\n >\n {column().label}\n </h3>\n <BoardColumnCount count={column().count} />\n <Show when={column().meta}>\n <span class=\"ms-auto text-2xs text-muted-foreground\">{column().meta}</span>\n </Show>\n </header>\n <div class=\"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2\">\n <For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n // The row's owner unregisters the card: a ref callback cannot\n // own a cleanup.\n let card: HTMLElement | undefined\n let cardId: string | undefined\n onCleanup(() => {\n if (cardId !== undefined && cardElements.get(cardId) === card)\n cardElements.delete(cardId)\n })\n return (\n <article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>\n <Show when={items().length === 0}>\n <p class=\"rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground\">\n {local.emptyColumn?.(column()) ?? 'Nothing here'}\n </p>\n </Show>\n </div>\n </Show>\n </section>\n )\n }}\n </For>","keyed={false}","<BoardColumnDot tone={column().tone} />","<header class=\"flex h-10 shrink-0 items-center gap-2 px-3\">\n <BoardColumnDot tone={column().tone} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'foreground' }),\n 'truncate'\n )}\n >\n {column().label}\n </h3>\n <BoardColumnCount count={column().count} />\n <Show when={column().meta}>\n <span class=\"ms-auto text-2xs text-muted-foreground\">{column().meta}</span>\n </Show>\n </header>","<BoardColumnCount count={column().count} />","<For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n // The row's owner unregisters the card: a ref callback cannot\n // own a cleanup.\n let card: HTMLElement | undefined\n let cardId: string | undefined\n onCleanup(() => {\n if (cardId !== undefined && cardElements.get(cardId) === card)\n cardElements.delete(cardId)\n })\n return (\n <article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>","ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}","<article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>","<div class=\"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2\">\n <For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n // The row's owner unregisters the card: a ref callback cannot\n // own a cleanup.\n let card: HTMLElement | undefined\n let cardId: string | undefined\n onCleanup(() => {\n if (cardId !== undefined && cardElements.get(cardId) === card)\n cardElements.delete(cardId)\n })\n return (\n <article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>\n <Show when={items().length === 0}>\n <p class=\"rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground\">\n {local.emptyColumn?.(column()) ?? 'Nothing here'}\n </p>\n </Show>\n </div>","<header class=\"flex flex-col items-center gap-2 py-3\">\n <BoardColumnDot tone={column().tone} />\n <BoardColumnCount count={column().count} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'muted' }),\n 'text-vertical'\n )}\n >\n {column().label}\n </h3>\n </header>","aria-label={column().label}","data-collapsed={collapsed() ? '' : undefined}","<section\n class={cn(\n 'flex shrink-0 flex-col rounded-lg border border-border bg-muted/40 transition-colors',\n {\n 'w-72': !collapsed(),\n 'w-10 items-center': collapsed(),\n 'border-dashed border-ring': accepts(column()) && !over(),\n 'border-ring bg-primary-subtle': accepts(column()) && over(),\n 'border-dashed opacity-60': over() && !accepts(column()),\n 'opacity-50': column().disabled,\n }\n )}\n aria-label={column().label}\n data-collapsed={collapsed() ? '' : undefined}\n onDragOver={(event) => {\n setOverColumn(column().id)\n if (accepts(column())) event.preventDefault()\n }}\n onDragLeave={(event) => {\n // Leaving for a child is not leaving the lane.\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n setOverColumn((current) => (current === column().id ? null : current))\n }}\n onDrop={(event) => {\n event.preventDefault()\n drop(column())\n }}\n >\n <Show\n when={!collapsed()}\n fallback={\n <header class=\"flex flex-col items-center gap-2 py-3\">\n <BoardColumnDot tone={column().tone} />\n <BoardColumnCount count={column().count} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'muted' }),\n 'text-vertical'\n )}\n >\n {column().label}\n </h3>\n </header>\n }\n >\n <header class=\"flex h-10 shrink-0 items-center gap-2 px-3\">\n <BoardColumnDot tone={column().tone} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'foreground' }),\n 'truncate'\n )}\n >\n {column().label}\n </h3>\n <BoardColumnCount count={column().count} />\n <Show when={column().meta}>\n <span class=\"ms-auto text-2xs text-muted-foreground\">{column().meta}</span>\n </Show>\n </header>\n <div class=\"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2\">\n <For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n // The row's owner unregisters the card: a ref callback cannot\n // own a cleanup.\n let card: HTMLElement | undefined\n let cardId: string | undefined\n onCleanup(() => {\n if (cardId !== undefined && cardElements.get(cardId) === card)\n cardElements.delete(cardId)\n })\n return (\n <article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>\n <Show when={items().length === 0}>\n <p class=\"rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground\">\n {local.emptyColumn?.(column()) ?? 'Nothing here'}\n </p>\n </Show>\n </div>\n </Show>\n </section>","<div\n class={cn('flex min-h-0 gap-3 overflow-x-auto pb-2', local.class)}\n role=\"region\"\n aria-label={local.label ?? 'Board'}\n tabindex=\"0\"\n >\n {/*\n Index, not For: callers derive columns (a count, a tone) and hand over\n fresh objects whenever a card moves. Keyed by identity, every lane would\n remount on each move and take the moved card's restored focus with it.\n */}\n <For keyed={false} each={local.columns}>\n {(column) => {\n const items = () => byColumn().get(column().id) ?? []\n const collapsed = () =>\n Boolean(local.collapseEmpty) && column().collapsible !== false && items().length === 0\n const over = () => overColumn() === column().id\n return (\n <section\n class={cn(\n 'flex shrink-0 flex-col rounded-lg border border-border bg-muted/40 transition-colors',\n {\n 'w-72': !collapsed(),\n 'w-10 items-center': collapsed(),\n 'border-dashed border-ring': accepts(column()) && !over(),\n 'border-ring bg-primary-subtle': accepts(column()) && over(),\n 'border-dashed opacity-60': over() && !accepts(column()),\n 'opacity-50': column().disabled,\n }\n )}\n aria-label={column().label}\n data-collapsed={collapsed() ? '' : undefined}\n onDragOver={(event) => {\n setOverColumn(column().id)\n if (accepts(column())) event.preventDefault()\n }}\n onDragLeave={(event) => {\n // Leaving for a child is not leaving the lane.\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n setOverColumn((current) => (current === column().id ? null : current))\n }}\n onDrop={(event) => {\n event.preventDefault()\n drop(column())\n }}\n >\n <Show\n when={!collapsed()}\n fallback={\n <header class=\"flex flex-col items-center gap-2 py-3\">\n <BoardColumnDot tone={column().tone} />\n <BoardColumnCount count={column().count} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'muted' }),\n 'text-vertical'\n )}\n >\n {column().label}\n </h3>\n </header>\n }\n >\n <header class=\"flex h-10 shrink-0 items-center gap-2 px-3\">\n <BoardColumnDot tone={column().tone} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'foreground' }),\n 'truncate'\n )}\n >\n {column().label}\n </h3>\n <BoardColumnCount count={column().count} />\n <Show when={column().meta}>\n <span class=\"ms-auto text-2xs text-muted-foreground\">{column().meta}</span>\n </Show>\n </header>\n <div class=\"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2\">\n <For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n // The row's owner unregisters the card: a ref callback cannot\n // own a cleanup.\n let card: HTMLElement | undefined\n let cardId: string | undefined\n onCleanup(() => {\n if (cardId !== undefined && cardElements.get(cardId) === card)\n cardElements.delete(cardId)\n })\n return (\n <article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>\n <Show when={items().length === 0}>\n <p class=\"rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground\">\n {local.emptyColumn?.(column()) ?? 'Nothing here'}\n </p>\n </Show>\n </div>\n </Show>\n </section>\n )\n }}\n </For>\n {/*\n The keyboard move's result, announced. A drag speaks for itself — the card\n visibly moves — while a keyboard move happens with the focus elsewhere.\n */}\n <div class=\"visually-hidden\" role=\"status\" aria-live=\"polite\">\n {announcement()}\n </div>\n </div>","aria-label={local.label ?? 'Board'}","<h4 class={cn(boardCardTitleVariants({ size: props.size }), props.class)}>{props.children}</h4>","<div class={cn('grid gap-1.5 p-2.5', props.class)}>{props.children}</div>","<button\n type={local.type ?? 'button'}\n data-slot=\"board-card-trigger\"\n class={cn(\n textVariants({ variant: 'label', tone: 'foreground' }),\n 'min-w-0 flex-1 truncate rounded-sm text-start outline-none',\n 'after:absolute after:inset-0 after:rounded-md',\n 'focus-visible:ring-3 focus-visible:ring-primary-subtle',\n local.class\n )}\n {...rest}\n />","_$effect","_$readShallow","_$className","_$insert","_$ref","_$setAttribute","_$spread"],"sources":["../../../../src/components/ui/board/board.tsx"],"sourcesContent":["import {\n createEffect,\n createMemo,\n createProjection,\n createSignal,\n For,\n onCleanup,\n Show,\n omit,\n untrack,\n} from 'solid-js'\nimport { type ComponentProps, type JSX } from '@solidjs/web'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\nimport { badgeVariants } from '../badge'\nimport { headingVariants, textVariants } from '../typography'\n\n/**\n * Board.\n *\n * Columns of cards, with drag between them — the shape a task tracker, a CRM\n * pipeline, a support queue and a release plan all share. It is generic in the\n * one place that matters: the *column ids are the caller's*, and so is the rule\n * that decides which moves are legal. The component knows nothing about tasks.\n *\n * The transitions are a predicate rather than a derived table because the legal\n * moves in a real product are not \"any column to any column\". A task that is\n * `completed` may be archived but not re-queued; a lead may become a customer but\n * not a stranger again. A board that let you drop anything anywhere would encode\n * a state machine in the UI that the server rejects — so `canDrop` is required,\n * and a column that cannot receive the dragged card renders as unavailable rather\n * than silently accepting a drop that will fail.\n *\n * Three input methods, because a drag-only board is unusable by keyboard:\n * dragging with the pointer, `Ctrl`/`Cmd` + arrow keys to move a focused card\n * between columns, and whatever the caller wires into `actions`. The card is\n * focusable and its move is announced through a live region, so the board is\n * operable without a mouse.\n *\n * The card is rendered by the caller through `children`, given the item and a set\n * of drag props. That is deliberate: a card's contents are domain — a title, a\n * priority tag, an assignee — and a board that rendered them itself could only\n * ever serve one product.\n *\n * `collapseEmpty` folds a column with no cards to a strip one line of text wide,\n * its label turned on its side. A board of seven lanes where three are empty\n * otherwise spends half its width on nothing, and the lanes with work in them\n * are the ones that need the room. A folded lane is still a full-height drop\n * target and still accepts a keyboard move, so nothing about operating the\n * board changes; it does not unfold under a drag, because a lane that grows\n * under the pointer moves every lane after it and the drop lands somewhere else.\n *\n * Give the board a height (`class=\"h-full\"`) and each lane scrolls on its own;\n * leave it unconstrained and lanes grow with their cards and the page scrolls.\n */\n\n/**\n * A lane's identifying colour, drawn as a dot before its label. The chart hues,\n * in the order the token set gives them, because a lane colour tells lanes apart\n * like a series does; it carries no status. `neutral` is for a lane that should\n * not draw the eye — a backlog, an archive.\n */\nexport type BoardTone =\n | 'neutral'\n | 'chart-1'\n | 'chart-2'\n | 'chart-3'\n | 'chart-4'\n | 'chart-5'\n | 'chart-6'\n\nexport type BoardColumn = Readonly<{\n id: string\n label: string\n /** The number of cards, shown as an accent count beside the label. */\n count?: number\n /** A limit or any other note, shown after the count. */\n meta?: JSX.Element\n /** The lane's dot colour. Omitted, the header has no dot. */\n tone?: BoardTone\n /**\n * `false` keeps this lane open when it is empty under `collapseEmpty` — the\n * inbox lane new cards arrive in, which should always show where they land.\n */\n collapsible?: boolean\n /** Dim the column and refuse drops — a lane that is closed or read-only. */\n disabled?: boolean\n}>\n\nexport type BoardMove = Readonly<{\n itemId: string\n from: string\n to: string\n}>\n\nexport type BoardProps<T> = {\n columns: readonly BoardColumn[]\n items: readonly T[]\n itemId: (item: T) => string\n itemColumn: (item: T) => string\n /** Whether `item` may move from `from` to `to`. Required: see the note above. */\n canDrop: (item: T, from: string, to: string) => boolean\n onMove: (move: BoardMove) => void\n /** The card body. `dragging` is true while this card is the one being dragged. */\n children: (item: T, state: { dragging: boolean }) => JSX.Element\n emptyColumn?: (column: BoardColumn) => JSX.Element\n /** The board's accessible name. Defaults to \"Board\". */\n label?: string\n /** Fold columns with no cards to a narrow strip with a sideways label. */\n collapseEmpty?: boolean\n class?: string\n}\n\nconst cardDragState = {\n idle: '',\n dragging: 'opacity-40',\n} as const\n\nconst toneDot: Record<BoardTone, string> = {\n neutral: 'bg-muted-foreground',\n 'chart-1': 'bg-chart-1',\n 'chart-2': 'bg-chart-2',\n 'chart-3': 'bg-chart-3',\n 'chart-4': 'bg-chart-4',\n 'chart-5': 'bg-chart-5',\n 'chart-6': 'bg-chart-6',\n}\n\nfunction BoardColumnDot(props: { tone?: BoardTone }) {\n return (\n <Show when={props.tone}>\n {(tone) => (\n <span aria-hidden=\"true\" class={cn('size-2 shrink-0 rounded-full', toneDot[tone()])} />\n )}\n </Show>\n )\n}\n\nfunction BoardColumnCount(props: { count?: number }) {\n return (\n <Show when={props.count !== undefined}>\n {/* The Badge's classes, not the component: Board stays plain markup. */}\n <span\n class={cn(badgeVariants({ variant: 'subtle', size: 'sm' }), 'tabular-nums')}\n data-slot=\"board-column-count\"\n >\n {/* A string: the renderer assigns a lone number through textContent, and\n some DOMs (happy-dom) drop a 0 there, leaving no node to update. */}\n {String(props.count)}\n </span>\n </Show>\n )\n}\n\nexport function Board<T>(props: BoardProps<T>) {\n const local = props\n\n // The dragged item, not its id: `canDrop` takes the item itself, and the\n // pointer may leave the card before it is dropped.\n const [dragging, setDragging] = createSignal<T | null>(null)\n // Only the two cards whose answer flips update when a drag starts or ends.\n const draggingIds = createProjection<Record<string, true>>((draft) => {\n const current = dragging()\n const id = current ? local.itemId(current) : undefined\n for (const key of Object.keys(draft)) if (key !== id) delete draft[key]\n if (id !== undefined) draft[id] = true\n }, {})\n const isDraggingId = (id: string) => draggingIds[id] === true\n const [overColumn, setOverColumn] = createSignal<string | null>(null)\n const [announcement, setAnnouncement] = createSignal('')\n const cardElements = new Map<string, HTMLElement>()\n const [pendingFocus, setPendingFocus] = createSignal<{\n itemId: string\n columnId: string\n source: HTMLElement\n } | null>(null)\n const cancelOnPointer = () => setPendingFocus(null)\n\n // A controlled move can settle after a server response. Restore only the\n // focus that belonged to the moved card; another focus action cancels it.\n createEffect(pendingFocus, (pending) => {\n if (!pending) return\n const document = pending.source.ownerDocument\n const cancelOnFocus = (event: FocusEvent) => {\n if (!pending.source.contains(event.target as Node)) setPendingFocus(null)\n }\n document.addEventListener('focusin', cancelOnFocus)\n document.addEventListener('pointerdown', cancelOnPointer)\n return () => {\n document.removeEventListener('focusin', cancelOnFocus)\n document.removeEventListener('pointerdown', cancelOnPointer)\n }\n })\n\n // The compute answers \"has the pending card landed in its column\"; the apply\n // moves focus to it and clears the request.\n createEffect(\n () => {\n const pending = pendingFocus()\n if (!pending) return undefined\n const moved = local.items.find((item) => local.itemId(item) === pending.itemId)\n return moved && local.itemColumn(moved) === pending.columnId ? pending : undefined\n },\n (landed) => {\n if (!landed) return\n const target = cardElements.get(landed.itemId)\n setPendingFocus(null)\n if (target?.isConnected) target.focus()\n }\n )\n\n /**\n * `always` is for a pointer drop: dragging a card is a direct act on it, so it\n * ends focused wherever focus was. Chromium also blurs a focused control\n * inside a draggable once the native drag starts, so \"was focus in the card\"\n * cannot be read at drop time.\n */\n const prepareFocus = (item: T, columnId: string, source?: HTMLElement, always = false) => {\n const card = source ?? cardElements.get(local.itemId(item))\n if (card && (always || card.contains(card.ownerDocument.activeElement))) {\n setPendingFocus({ itemId: local.itemId(item), columnId, source: card })\n }\n }\n\n const byColumn = createMemo(() => {\n const grouped = new Map<string, T[]>()\n for (const column of local.columns) grouped.set(column.id, [])\n for (const item of local.items) grouped.get(local.itemColumn(item))?.push(item)\n return grouped\n })\n\n const accepts = (column: BoardColumn) => {\n const item = dragging()\n return Boolean(\n item && !column.disabled && local.canDrop(item, local.itemColumn(item), column.id)\n )\n }\n\n const drop = (column: BoardColumn) => {\n const item = dragging()\n const from = item ? local.itemColumn(item) : null\n const accepted = accepts(column)\n setDragging(null)\n setOverColumn(null)\n if (!item || !from || from === column.id || !accepted) return\n prepareFocus(item, column.id, undefined, true)\n local.onMove({ itemId: local.itemId(item), from, to: column.id })\n }\n\n /**\n * Keyboard move. `Ctrl`/`Cmd` plus an arrow is the convention for \"reorder this\n * thing within its container\" that does not collide with scrolling or with the\n * text caret, and it is the same chord a browser tab or a spreadsheet uses.\n */\n const moveByKeyboard = (item: T, direction: -1 | 1, source: HTMLElement) => {\n const from = local.itemColumn(item)\n const index = local.columns.findIndex((column) => column.id === from)\n if (index < 0) return\n const ordered =\n direction === 1 ? local.columns.slice(index + 1) : local.columns.slice(0, index).toReversed()\n const target = ordered.find(\n (column) => !column.disabled && local.canDrop(item, from, column.id)\n )\n if (!target) {\n setAnnouncement(`No column after ${from} accepts this item`)\n return\n }\n prepareFocus(item, target.id, source)\n local.onMove({ itemId: local.itemId(item), from, to: target.id })\n setAnnouncement(`Moved to ${target.label}`)\n }\n\n return (\n /*\n `role=\"region\"` + `tabindex=\"0\"` because the board scrolls horizontally and a\n keyboard user has to be able to scroll it — axe's `scrollable-region-focusable`.\n It is not enough that the cards are focusable: a board with empty columns, or\n with more columns than fit, has nothing focusable to scroll from.\n */\n <div\n class={cn('flex min-h-0 gap-3 overflow-x-auto pb-2', local.class)}\n role=\"region\"\n aria-label={local.label ?? 'Board'}\n tabindex=\"0\"\n >\n {/*\n Index, not For: callers derive columns (a count, a tone) and hand over\n fresh objects whenever a card moves. Keyed by identity, every lane would\n remount on each move and take the moved card's restored focus with it.\n */}\n <For keyed={false} each={local.columns}>\n {(column) => {\n const items = () => byColumn().get(column().id) ?? []\n const collapsed = () =>\n Boolean(local.collapseEmpty) && column().collapsible !== false && items().length === 0\n const over = () => overColumn() === column().id\n return (\n <section\n class={cn(\n 'flex shrink-0 flex-col rounded-lg border border-border bg-muted/40 transition-colors',\n {\n 'w-72': !collapsed(),\n 'w-10 items-center': collapsed(),\n 'border-dashed border-ring': accepts(column()) && !over(),\n 'border-ring bg-primary-subtle': accepts(column()) && over(),\n 'border-dashed opacity-60': over() && !accepts(column()),\n 'opacity-50': column().disabled,\n }\n )}\n aria-label={column().label}\n data-collapsed={collapsed() ? '' : undefined}\n onDragOver={(event) => {\n setOverColumn(column().id)\n if (accepts(column())) event.preventDefault()\n }}\n onDragLeave={(event) => {\n // Leaving for a child is not leaving the lane.\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n setOverColumn((current) => (current === column().id ? null : current))\n }}\n onDrop={(event) => {\n event.preventDefault()\n drop(column())\n }}\n >\n <Show\n when={!collapsed()}\n fallback={\n <header class=\"flex flex-col items-center gap-2 py-3\">\n <BoardColumnDot tone={column().tone} />\n <BoardColumnCount count={column().count} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'muted' }),\n 'text-vertical'\n )}\n >\n {column().label}\n </h3>\n </header>\n }\n >\n <header class=\"flex h-10 shrink-0 items-center gap-2 px-3\">\n <BoardColumnDot tone={column().tone} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'foreground' }),\n 'truncate'\n )}\n >\n {column().label}\n </h3>\n <BoardColumnCount count={column().count} />\n <Show when={column().meta}>\n <span class=\"ms-auto text-2xs text-muted-foreground\">{column().meta}</span>\n </Show>\n </header>\n <div class=\"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2\">\n <For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n // The row's owner unregisters the card: a ref callback cannot\n // own a cleanup.\n let card: HTMLElement | undefined\n let cardId: string | undefined\n onCleanup(() => {\n if (cardId !== undefined && cardElements.get(cardId) === card)\n cardElements.delete(cardId)\n })\n return (\n <article\n ref={(element: HTMLElement) => {\n card = element\n cardId = local.itemId(item)\n cardElements.set(cardId, element)\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable=\"true\"\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The projection notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n isolated with untrack, the same boundary a component\n call gets: reads inside the consumer's renderer belong\n to its own computations, and only the drag state\n re-runs this one. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>\n <Show when={items().length === 0}>\n <p class=\"rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground\">\n {local.emptyColumn?.(column()) ?? 'Nothing here'}\n </p>\n </Show>\n </div>\n </Show>\n </section>\n )\n }}\n </For>\n {/*\n The keyboard move's result, announced. A drag speaks for itself — the card\n visibly moves — while a keyboard move happens with the focus elsewhere.\n */}\n <div class=\"visually-hidden\" role=\"status\" aria-live=\"polite\">\n {announcement()}\n </div>\n </div>\n )\n}\n\nexport const boardCardTitleVariants = cva('truncate font-medium text-foreground', {\n variants: { size: { sm: 'text-xs', md: 'text-sm' } },\n defaultVariants: { size: 'md' },\n})\n\nexport type BoardCardTitleProps = { class?: string; children: JSX.Element } & VariantProps<\n typeof boardCardTitleVariants\n>\n\n/** The card's title line, at the size a board card uses. */\nexport function BoardCardTitle(props: BoardCardTitleProps) {\n return (\n <h4 class={cn(boardCardTitleVariants({ size: props.size }), props.class)}>{props.children}</h4>\n )\n}\n\n/** A card's padding, so every card in an application is the same shape. */\nexport function BoardCardBody(props: { class?: string; children: JSX.Element }) {\n return <div class={cn('grid gap-1.5 p-2.5', props.class)}>{props.children}</div>\n}\n\n/**\n * The card's open action: its title, as a real button whose hit area stretches\n * over the whole card. A card is one target to a pointer — clicking anywhere on\n * it opens it — while assistive technology still meets a named button rather\n * than a clickable `article`. Other controls on the card sit above the stretched\n * area by being positioned (`class=\"relative\"`), so they keep their own click.\n */\nexport function BoardCardTrigger(props: ComponentProps<'button'>) {\n const local = props\n const rest = omit(props, 'class', 'type')\n return (\n <button\n type={local.type ?? 'button'}\n data-slot=\"board-card-trigger\"\n class={cn(\n textVariants({ variant: 'label', tone: 'foreground' }),\n 'min-w-0 flex-1 truncate rounded-sm text-start outline-none',\n 'after:absolute after:inset-0 after:rounded-md',\n 'focus-visible:ring-3 focus-visible:ring-prim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ARrE,OAOEV;AAkKJ;AAEA,IAAa,yBAAyB,IAAI,wCAAwC;CAChF,UAAU,EAAE,MAAM;EAAE,IAAI;EAAW,IAAI;CAAU,EAAE;CACnD,iBAAiB,EAAE,MAAM,KAAK;AAChC,CAAC;;AAOD,SAAgB,eAAe,OAA4B;CAEvD,IAAA,SAAA,SAA8F;CAA9FQ,OAAA,cAA0E;EAAC,OAAA,MAAM;CAAQ,CAAK;CAA1FH,aAAAC,YAAO,GAAG,uBAAuB,EAAE,MAAM,MAAM,KAAK,CAAC,GAAG,MAAM,KAAK,CAAC,IAApE,KAAA,QAAA;EAAoEC,UAAA,QAAA,KAAA,GAAA;;CAD1E,OACEL;AAEJ;;AAGA,SAAgB,cAAc,OAAkD;CACvE,IAAA,SAAA,SAAwE;CAAxEM,OAAA,cAAmD;EAAC,OAAA,MAAM;CAAQ,CAAM;CAAnEH,aAAAC,YAAO,GAAG,sBAAsB,MAAM,KAAK,CAAC,IAA5C,KAAA,QAAA;EAA4CC,UAAA,QAAA,KAAA,GAAA;;CAAxD,OAAOJ;AACT;;;;;;;;AASA,SAAgB,iBAAiB,OAAiC;CAChE,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,MAAM;CAEtC,IAAA,SAAA,SAWC;CADCQ,OAAA,QAAA,CAAA;EATA,IAAA,OAAA;GAAM,OAAA,MAAM,QAAQ;EAAQ;EAC5B,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,aAAa;IAAE,SAAS;IAAS,MAAM;GAAa,CAAC,GACrD,8DACA,iDACA,0DACA,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,KAAA;CAXR,OACEP;AAaJ"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { cn } from "../../../lib/utils.js";
|
|
2
|
-
import { fastIcon } from "../../../lib/fast-icon.js";
|
|
3
1
|
import { createComponent, insert, memo, mergeProps, spread, template } from "@solidjs/web";
|
|
4
|
-
import { ChevronRight, MoreHorizontal } from "@lucide/solid";
|
|
2
|
+
import { ChevronRight as ChevronRight$1, MoreHorizontal as MoreHorizontal$1 } from "@lucide/solid";
|
|
5
3
|
import { omit } from "solid-js";
|
|
4
|
+
import { cn } from "../../../lib/utils.js";
|
|
5
|
+
import { fastIcon } from "../../../lib/fast-icon.js";
|
|
6
6
|
// src/components/ui/breadcrumb/breadcrumb.tsx
|
|
7
7
|
var _tmpl$ = /* @__PURE__ */ template(`<nav>`);
|
|
8
8
|
var _tmpl$2 = /* @__PURE__ */ template(`<ol>`);
|
|
@@ -10,8 +10,8 @@ var _tmpl$3 = /* @__PURE__ */ template(`<li>`);
|
|
|
10
10
|
var _tmpl$4 = /* @__PURE__ */ template(`<a>`);
|
|
11
11
|
var _tmpl$5 = /* @__PURE__ */ template(`<span>`);
|
|
12
12
|
var _tmpl$6 = /* @__PURE__ */ template(`<span><span class=visually-hidden>More`);
|
|
13
|
-
var ChevronRight
|
|
14
|
-
var MoreHorizontal
|
|
13
|
+
var ChevronRight = fastIcon(ChevronRight$1);
|
|
14
|
+
var MoreHorizontal = fastIcon(MoreHorizontal$1);
|
|
15
15
|
/**
|
|
16
16
|
* Breadcrumb.
|
|
17
17
|
*
|
|
@@ -117,7 +117,7 @@ function BreadcrumbSeparator(props) {
|
|
|
117
117
|
}
|
|
118
118
|
}, rest], true);
|
|
119
119
|
insert(_el$6, () => {
|
|
120
|
-
return local.children ?? createComponent(ChevronRight
|
|
120
|
+
return local.children ?? createComponent(ChevronRight, {});
|
|
121
121
|
});
|
|
122
122
|
return _el$6;
|
|
123
123
|
}
|
|
@@ -134,7 +134,7 @@ function BreadcrumbEllipsis(props) {
|
|
|
134
134
|
return cn("flex size-6 items-center justify-center", local.class);
|
|
135
135
|
}
|
|
136
136
|
}, rest], true);
|
|
137
|
-
insert(_el$7, createComponent(MoreHorizontal
|
|
137
|
+
insert(_el$7, createComponent(MoreHorizontal, { class: "size-4" }), _el$8);
|
|
138
138
|
return _el$7;
|
|
139
139
|
}
|
|
140
140
|
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.js","names":["<nav\n data-slot=\"breadcrumb\"\n aria-label={local['aria-label'] ?? 'Breadcrumb'}\n class={cn('text-muted-foreground', local.class)}\n {...rest}\n />","<ol\n data-slot=\"breadcrumb-list\"\n class={cn('flex flex-wrap items-center gap-1.5 text-sm break-words', local.class)}\n {...rest}\n />","<li\n data-slot=\"breadcrumb-item\"\n class={cn('inline-flex items-center gap-1.5', local.class)}\n {...rest}\n />","<Show\n when={!local.current}\n // The current page is text, so the link's href stays off it.\n fallback={<BreadcrumbPage class={local.class} {...(rest as ComponentProps<'span'>)} />}\n >\n <a\n data-slot=\"breadcrumb-link\"\n class={cn(\n 'rounded-sm transition-colors ease-out outline-none hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n local.class\n )}\n href={local.href}\n {...rest}\n />\n </Show>","<BreadcrumbPage class={local.class} {...(rest as ComponentProps<'span'>)} />","<span\n data-slot=\"breadcrumb-page\"\n aria-current=\"page\"\n class={cn('font-medium text-foreground', local.class)}\n {...rest}\n />","role=\"presentation\"","<ChevronRight />","<li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n class={cn('[&_svg]:size-3.5', local.class)}\n {...rest}\n >\n {local.children ?? <ChevronRight />}\n </li>","<span class=\"visually-hidden\">More</span>","<MoreHorizontal class=\"size-4\" />","class=\"size-4\"","<span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n class={cn('flex size-6 items-center justify-center', local.class)}\n {...rest}\n >\n <MoreHorizontal class=\"size-4\" />\n <span class=\"visually-hidden\">More</span>\n </span>","
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","names":["<nav\n data-slot=\"breadcrumb\"\n aria-label={local['aria-label'] ?? 'Breadcrumb'}\n class={cn('text-muted-foreground', local.class)}\n {...rest}\n />","<ol\n data-slot=\"breadcrumb-list\"\n class={cn('flex flex-wrap items-center gap-1.5 text-sm break-words', local.class)}\n {...rest}\n />","<li\n data-slot=\"breadcrumb-item\"\n class={cn('inline-flex items-center gap-1.5', local.class)}\n {...rest}\n />","<Show\n when={!local.current}\n // The current page is text, so the link's href stays off it.\n fallback={<BreadcrumbPage class={local.class} {...(rest as ComponentProps<'span'>)} />}\n >\n <a\n data-slot=\"breadcrumb-link\"\n class={cn(\n 'rounded-sm transition-colors ease-out outline-none hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n local.class\n )}\n href={local.href}\n {...rest}\n />\n </Show>","<BreadcrumbPage class={local.class} {...(rest as ComponentProps<'span'>)} />","<span\n data-slot=\"breadcrumb-page\"\n aria-current=\"page\"\n class={cn('font-medium text-foreground', local.class)}\n {...rest}\n />","role=\"presentation\"","<ChevronRight />","<li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n class={cn('[&_svg]:size-3.5', local.class)}\n {...rest}\n >\n {local.children ?? <ChevronRight />}\n </li>","<span class=\"visually-hidden\">More</span>","<MoreHorizontal class=\"size-4\" />","class=\"size-4\"","<span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n class={cn('flex size-6 items-center justify-center', local.class)}\n {...rest}\n >\n <MoreHorizontal class=\"size-4\" />\n <span class=\"visually-hidden\">More</span>\n </span>","LucideChevronRight","LucideMoreHorizontal","_$spread","_$insert"],"sources":["../../../../src/components/ui/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import {\n ChevronRight as LucideChevronRight,\n MoreHorizontal as LucideMoreHorizontal,\n} from '@lucide/solid'\nimport type { ComponentProps } from '@solidjs/web'\nimport { Show, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ChevronRight = fastIcon(LucideChevronRight)\nconst MoreHorizontal = fastIcon(LucideMoreHorizontal)\n\n/**\n * Breadcrumb.\n *\n * The path to the current view, in a real `<nav>` wrapping an ordered list so\n * the structure is announced rather than read as loose text. The final crumb is\n * the current page and is marked `aria-current=\"page\"` instead of being a link\n * to itself.\n *\n * A long path collapses from the middle: the root says where the user started\n * and the last crumbs say what they are looking at, so those are the parts that\n * have to survive.\n */\nexport function Breadcrumb(props: ComponentProps<'nav'>) {\n const local = props\n const rest = omit(props, 'class', 'aria-label')\n\n return (\n <nav\n data-slot=\"breadcrumb\"\n aria-label={local['aria-label'] ?? 'Breadcrumb'}\n class={cn('text-muted-foreground', local.class)}\n {...rest}\n />\n )\n}\n\nexport function BreadcrumbList(props: ComponentProps<'ol'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <ol\n data-slot=\"breadcrumb-list\"\n class={cn('flex flex-wrap items-center gap-1.5 text-sm break-words', local.class)}\n {...rest}\n />\n )\n}\n\nexport function BreadcrumbItem(props: ComponentProps<'li'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <li\n data-slot=\"breadcrumb-item\"\n class={cn('inline-flex items-center gap-1.5', local.class)}\n {...rest}\n />\n )\n}\n\nexport type BreadcrumbLinkProps = ComponentProps<'a'> & {\n /** Render as the current page rather than as a link. */\n current?: boolean\n}\n\nexport function BreadcrumbLink(props: BreadcrumbLinkProps) {\n const local = props\n const rest = omit(props, 'class', 'current', 'href')\n\n return (\n <Show\n when={!local.current}\n // The current page is text, so the link's href stays off it.\n fallback={<BreadcrumbPage class={local.class} {...(rest as ComponentProps<'span'>)} />}\n >\n <a\n data-slot=\"breadcrumb-link\"\n class={cn(\n 'rounded-sm transition-colors ease-out outline-none hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n local.class\n )}\n href={local.href}\n {...rest}\n />\n </Show>\n )\n}\n\n/**\n * The current page: the last crumb, as text rather than a link to itself, and\n * marked `aria-current=\"page\"`. The same element `BreadcrumbLink current`\n * renders, for a trail whose last crumb is never a link.\n */\nexport function BreadcrumbPage(props: ComponentProps<'span'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <span\n data-slot=\"breadcrumb-page\"\n aria-current=\"page\"\n class={cn('font-medium text-foreground', local.class)}\n {...rest}\n />\n )\n}\n\nexport function BreadcrumbSeparator(props: ComponentProps<'li'>) {\n const local = props\n const rest = omit(props, 'class', 'children')\n\n return (\n <li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n class={cn('[&_svg]:size-3.5', local.class)}\n {...rest}\n >\n {local.children ?? <ChevronRight />}\n </li>\n )\n}\n\nexport function BreadcrumbEllipsis(props: ComponentProps<'span'>) {\n const local = props\n const rest = omit(props, 'class')\n\n return (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n class={cn('flex size-6 items-center justify-center', local.class)}\n {...rest}\n >\n <MoreHorizontal class=\"size-4\" />\n <span class=\"visually-hidden\">More</span>\n </span>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAUA,IAAM,eAAe,SAASa,cAAkB;AAChD,IAAM,iBAAiB,SAASC,gBAAoB;;;;;;;;;;;;;AAcpD,SAAgB,WAAW,OAA8B;CACvD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,YAAY;CAG5C,IAAA,OAAA,OAKC;CADCC,OAAA,MAAA,CAAA;EAHA,aAAA;EACA,IAAA,eAAA;GAAY,OAAA,MAAM,iBAAiB;EAAY;EAC/C,IAAA,UAAA;GAAO,OAAA,GAAG,yBAAyB,MAAM,KAAK;EAAC;CACvC,GAAJ,IAAA,GAAA,KAAA;CALR,OACEf;AAOJ;AAEA,SAAgB,eAAe,OAA6B;CAC1D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAE9B,IAAA,QAAA,QAIC;CADCe,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ACd,MAAM,OAAO,KAAK,OAAO,SAAS,UAAU;CAG1C,IAAA,QAAA,QAQI;CAHFU,OAAA,OAAA,CAAA;EAJA,aAAA;EACAT,MAAAA;EACA,eAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,oBAAoB,MAAM,KAAK;EAAC;CAClC,GAAJ,IAAA,GAAA,IAAA;CALNU,OAAA,aAOE;EAAC,OAAA,MAAM,YAAYT,gBAAAA,cAAAA,CAAe,CAAA;CAAC,CACjC;CATN,OACEC;AAUJ;AAEA,SAAgB,mBAAmB,OAA+B;CAChE,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAG9B,IAAA,QAAA,QASM;CATN,IAAA,QAQEC,MAAAA;CAHAM,OAAA,OAAA,CAAA;EAJA,aAAA;EACAT,MAAAA;EACA,eAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,2CAA2C,MAAM,KAAK;EAAC;CACzD,GAAJ,IAAA,GAAA,IAAA;CALNU,OAAA,OAOEN,gBAAAA,gBAAAA,EAAgBC,OAAM,SAAU,CAAA,GAPlCC,KASM;CAVR,OACEA;AAWJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cn } from "../../../lib/utils.js";
|
|
2
|
-
import { cva } from "../../../lib/variants.js";
|
|
3
1
|
import { className, effect, insert, memo, readShallow, setAttribute, spread, template } from "@solidjs/web";
|
|
4
2
|
import { children, omit } from "solid-js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { cva } from "../../../lib/variants.js";
|
|
5
5
|
// src/components/ui/bubble/bubble.tsx
|
|
6
6
|
var _tmpl$ = /* @__PURE__ */ template(`<div class="flex max-w-full min-w-0 flex-col items-end gap-1"data-slot=bubble-root><div>`);
|
|
7
7
|
var _tmpl$2 = /* @__PURE__ */ template(`<div data-slot=bubble-status><!><!>`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubble.js","names":["<div\n data-slot=\"bubble-status\"\n role={local.state === 'failed' ? 'alert' : 'status'}\n class={cn('flex items-center gap-2 text-xs', {\n 'text-destructive': local.state === 'failed',\n 'text-muted-foreground': local.state !== 'failed',\n })}\n >\n {status()}\n {statusAction()}\n </div>","class={cn('flex items-center gap-2 text-xs', {\n 'text-destructive': local.state === 'failed',\n 'text-muted-foreground': local.state !== 'failed',\n })}","<div class=\"flex max-w-full min-w-0 flex-col items-end gap-1\" data-slot=\"bubble-root\">\n <div\n data-slot=\"bubble\"\n data-state={local.state ?? 'sent'}\n class={cn(bubbleVariants({ tone: local.tone, state: local.state }), local.class)}\n {...rest}\n >\n {local.children}\n </div>\n {status() != null || statusAction() != null ? (\n <div\n data-slot=\"bubble-status\"\n role={local.state === 'failed' ? 'alert' : 'status'}\n class={cn('flex items-center gap-2 text-xs', {\n 'text-destructive': local.state === 'failed',\n 'text-muted-foreground': local.state !== 'failed',\n })}\n >\n {status()}\n {statusAction()}\n </div>\n ) : null}\n </div>","resolveChildren","_$setAttribute"],"sources":["../../../../src/components/ui/bubble/bubble.tsx"],"sourcesContent":["import { children as resolveChildren, omit } from 'solid-js'\nimport { type ComponentProps, type JSX } from '@solidjs/web'\nimport { cn } from '#lib/utils'\nimport { cva, type VariantProps } from '#lib/variants'\n\n/**\n * Bubble.\n *\n * The container for what *the person* sends. The assistant's reply is not a\n * bubble: it is the page, set in the reading column with no surface behind it,\n * because a reply that is a card among cards turns every long answer into a box\n * to scroll inside. A bubble marks the one voice that is quoting itself back — a\n * short, bounded message — so the eye can find where each turn begins.\n *\n * `state` is the delivery truth, not decoration: `pending` while the send is in\n * flight, `queued` for a follow-up the runtime has not taken yet (dashed, so it\n * reads as not yet part of the conversation), `failed` when it did not go. Each\n * state has a word in `status`, because the border alone is not a signal.\n *\n * Text is rendered as text. `whitespace-pre-wrap` keeps the sender's line breaks\n * and `overflow-wrap: anywhere` stops a pasted token or URL from widening the\n * column; nothing here interprets markup.\n */\nexport const bubbleVariants = cva(\n 'relative w-fit max-w-full min-w-0 rounded-2xl px-3.5 py-2 font-content text-content break-words whitespace-pre-wrap [overflow-wrap:anywhere]',\n {\n variants: {\n tone: {\n user: 'bg-primary-subtle text-foreground',\n neutral: 'bg-muted text-foreground',\n quiet: 'border border-border bg-transparent text-foreground',\n },\n state: {\n sent: '',\n pending: 'opacity-70',\n queued: 'border border-dashed border-border bg-transparent',\n failed: 'border border-destructive',\n },\n },\n defaultVariants: { tone: 'user', state: 'sent' },\n }\n)\n\nexport type BubbleProps = Omit<ComponentProps<'div'>, 'children'> &\n VariantProps<typeof bubbleVariants> & {\n children?: JSX.Element\n /** What the state means in words: \"Sending…\", \"Queued\", \"Not sent\". */\n status?: JSX.Element\n /** Shown beside the status, e.g. a Retry button for a failed send. */\n statusAction?: JSX.Element\n }\n\nexport function Bubble(props: BubbleProps) {\n const local = props\n const rest = omit(props, 'class', 'tone', 'state', 'children', 'status', 'statusAction')\n const status = resolveChildren(() => local.status)\n const statusAction = resolveChildren(() => local.statusAction)\n return (\n <div class=\"flex max-w-full min-w-0 flex-col items-end gap-1\" data-slot=\"bubble-root\">\n <div\n data-slot=\"bubble\"\n data-state={local.state ?? 'sent'}\n class={cn(bubbleVariants({ tone: local.tone, state: local.state }), local.class)}\n {...rest}\n >\n {local.children}\n </div>\n {status() != null || statusAction() != null ? (\n <div\n data-slot=\"bubble-status\"\n role={local.state === 'failed' ? 'alert' : 'status'}\n class={cn('flex items-center gap-2 text-xs', {\n 'text-destructive': local.state === 'failed',\n 'text-muted-foreground': local.state !== 'failed',\n })}\n >\n {status()}\n {statusAction()}\n </div>\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAa,iBAAiB,IAC5B,gJACA;CACE,UAAU;EACR,MAAM;GACJ,MAAM;GACN,SAAS;GACT,OAAO;EACT;EACA,OAAO;GACL,MAAM;GACN,SAAS;GACT,QAAQ;GACR,QAAQ;EACV;CACF;CACA,iBAAiB;EAAE,MAAM;EAAQ,OAAO;CAAO;AACjD,CACF;AAWA,SAAgB,OAAO,OAAoB;CACzC,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,QAAQ,SAAS,YAAY,UAAU,cAAc;CACvF,MAAM,SAASG,eAAsB,MAAM,MAAM;CACjD,MAAM,eAAeA,eAAsB,MAAM,YAAY;CAE3D,IAAA,OAAA,OAsBK;CArBH,IAAA,QAAA,KAAA;
|
|
1
|
+
{"version":3,"file":"bubble.js","names":["<div\n data-slot=\"bubble-status\"\n role={local.state === 'failed' ? 'alert' : 'status'}\n class={cn('flex items-center gap-2 text-xs', {\n 'text-destructive': local.state === 'failed',\n 'text-muted-foreground': local.state !== 'failed',\n })}\n >\n {status()}\n {statusAction()}\n </div>","class={cn('flex items-center gap-2 text-xs', {\n 'text-destructive': local.state === 'failed',\n 'text-muted-foreground': local.state !== 'failed',\n })}","<div class=\"flex max-w-full min-w-0 flex-col items-end gap-1\" data-slot=\"bubble-root\">\n <div\n data-slot=\"bubble\"\n data-state={local.state ?? 'sent'}\n class={cn(bubbleVariants({ tone: local.tone, state: local.state }), local.class)}\n {...rest}\n >\n {local.children}\n </div>\n {status() != null || statusAction() != null ? (\n <div\n data-slot=\"bubble-status\"\n role={local.state === 'failed' ? 'alert' : 'status'}\n class={cn('flex items-center gap-2 text-xs', {\n 'text-destructive': local.state === 'failed',\n 'text-muted-foreground': local.state !== 'failed',\n })}\n >\n {status()}\n {statusAction()}\n </div>\n ) : null}\n </div>","resolveChildren","_$spread","_$insert","_$effect","_$setAttribute","_$className"],"sources":["../../../../src/components/ui/bubble/bubble.tsx"],"sourcesContent":["import { children as resolveChildren, omit } from 'solid-js'\nimport { type ComponentProps, type JSX } from '@solidjs/web'\nimport { cn } from '#lib/utils'\nimport { cva, type VariantProps } from '#lib/variants'\n\n/**\n * Bubble.\n *\n * The container for what *the person* sends. The assistant's reply is not a\n * bubble: it is the page, set in the reading column with no surface behind it,\n * because a reply that is a card among cards turns every long answer into a box\n * to scroll inside. A bubble marks the one voice that is quoting itself back — a\n * short, bounded message — so the eye can find where each turn begins.\n *\n * `state` is the delivery truth, not decoration: `pending` while the send is in\n * flight, `queued` for a follow-up the runtime has not taken yet (dashed, so it\n * reads as not yet part of the conversation), `failed` when it did not go. Each\n * state has a word in `status`, because the border alone is not a signal.\n *\n * Text is rendered as text. `whitespace-pre-wrap` keeps the sender's line breaks\n * and `overflow-wrap: anywhere` stops a pasted token or URL from widening the\n * column; nothing here interprets markup.\n */\nexport const bubbleVariants = cva(\n 'relative w-fit max-w-full min-w-0 rounded-2xl px-3.5 py-2 font-content text-content break-words whitespace-pre-wrap [overflow-wrap:anywhere]',\n {\n variants: {\n tone: {\n user: 'bg-primary-subtle text-foreground',\n neutral: 'bg-muted text-foreground',\n quiet: 'border border-border bg-transparent text-foreground',\n },\n state: {\n sent: '',\n pending: 'opacity-70',\n queued: 'border border-dashed border-border bg-transparent',\n failed: 'border border-destructive',\n },\n },\n defaultVariants: { tone: 'user', state: 'sent' },\n }\n)\n\nexport type BubbleProps = Omit<ComponentProps<'div'>, 'children'> &\n VariantProps<typeof bubbleVariants> & {\n children?: JSX.Element\n /** What the state means in words: \"Sending…\", \"Queued\", \"Not sent\". */\n status?: JSX.Element\n /** Shown beside the status, e.g. a Retry button for a failed send. */\n statusAction?: JSX.Element\n }\n\nexport function Bubble(props: BubbleProps) {\n const local = props\n const rest = omit(props, 'class', 'tone', 'state', 'children', 'status', 'statusAction')\n const status = resolveChildren(() => local.status)\n const statusAction = resolveChildren(() => local.statusAction)\n return (\n <div class=\"flex max-w-full min-w-0 flex-col items-end gap-1\" data-slot=\"bubble-root\">\n <div\n data-slot=\"bubble\"\n data-state={local.state ?? 'sent'}\n class={cn(bubbleVariants({ tone: local.tone, state: local.state }), local.class)}\n {...rest}\n >\n {local.children}\n </div>\n {status() != null || statusAction() != null ? (\n <div\n data-slot=\"bubble-status\"\n role={local.state === 'failed' ? 'alert' : 'status'}\n class={cn('flex items-center gap-2 text-xs', {\n 'text-destructive': local.state === 'failed',\n 'text-muted-foreground': local.state !== 'failed',\n })}\n >\n {status()}\n {statusAction()}\n </div>\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAa,iBAAiB,IAC5B,gJACA;CACE,UAAU;EACR,MAAM;GACJ,MAAM;GACN,SAAS;GACT,OAAO;EACT;EACA,OAAO;GACL,MAAM;GACN,SAAS;GACT,QAAQ;GACR,QAAQ;EACV;CACF;CACA,iBAAiB;EAAE,MAAM;EAAQ,OAAO;CAAO;AACjD,CACF;AAWA,SAAgB,OAAO,OAAoB;CACzC,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,QAAQ,SAAS,YAAY,UAAU,cAAc;CACvF,MAAM,SAASG,eAAsB,MAAM,MAAM;CACjD,MAAM,eAAeA,eAAsB,MAAM,YAAY;CAE3D,IAAA,OAAA,OAsBK;CArBH,IAAA,QAAA,KAAA;CAIEC,OAAA,OAAA,CAAA;EAHA,aAAA;EACA,IAAA,eAAA;GAAY,OAAA,MAAM,SAAS;EAAM;EACjC,IAAA,UAAA;GAAO,OAAA,GAAG,eAAe;IAAE,MAAM,MAAM;IAAM,OAAO,MAAM;GAAM,CAAC,GAAG,MAAM,KAAK;EAAC;CACxE,GAAJ,IAAA,GAAA,IAAA;CAJNC,OAAA,aAME;EAAC,OAAA,MAAM;CAAQ,CACZ;CARPA,OAAA,aASE;;GAAC,OAAA,CAAA,EAAA,OAAO,KAAK,QAAQ,aAAa,KAAK;EAY/B,CAAA;EAZR,aAAA;GAYQ,OAAA,IAAA,WAXN;IAUK,IAAA,QAAA,QAAA;IAVL,IAAA,QAAA,MAAA;;IAQGA,OAAA,OAAA,QARHL,KAUK;IAVLK,OAAA,OASG,cATHL,KAUK;IARHM,aAAA;;MAAM,GAAA,MAAM,UAAU,WAAW,UAAU;MAC3CL,GAAAA,YAAO,GAAG,mCAAmC;OAC3C,oBAAoB,MAAM,UAAU;OACpC,yBAAyB,MAAM,UAAU;MAC3C,CAAC,CAAC;KAJiD;IAAnD,IAAA,EAAA,GAAA,KAAA,QAAA;KAAmD,MAAA,KAAA,KAAAM,aAAA,OAAA,QAAA,CAAA;KACnDC,UAAA,OAAA,GAAA,KAAA,CAGE;IAJiD,CAAA;IAFrD,OAAA;GAUK,EAAA,CAAA,IACH;EAAI;CAAC,EAAA,CAAD,GArBV,IAsBK;CAvBP,OACEN;AAwBJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { controlInteractive, controlSize, cva } from "../../../lib/variants.js";
|
|
2
|
-
import { cn } from "../../../lib/utils.js";
|
|
3
1
|
import { Dynamic, createComponent, isServer, memo, mergeProps, spread } from "@solidjs/web";
|
|
4
2
|
import { Show, isHydrating, omit } from "solid-js";
|
|
3
|
+
import { controlInteractive, controlSize, cva } from "../../../lib/variants.js";
|
|
4
|
+
import { cn } from "../../../lib/utils.js";
|
|
5
5
|
// src/components/ui/button/button.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Button.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cn } from "../../../lib/utils.js";
|
|
2
|
-
import { Separator } from "../separator/separator.js";
|
|
3
1
|
import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
4
2
|
import { omit } from "solid-js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { Separator } from "../separator/separator.js";
|
|
5
5
|
// src/components/ui/button-group/button-group.tsx
|
|
6
6
|
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
7
7
|
function ButtonGroup(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.js","names":["role=\"group\"","<div\n data-slot=\"button-group\"\n role=\"group\"\n aria-label={local.label}\n class={cn(\n 'flex w-fit items-stretch',\n horizontal() ? 'flex-row' : 'flex-col',\n /* Ends keep their outer radius; everything between them is squared, and the\n seam is collapsed by pulling each item back over its neighbour's border. */\n horizontal()\n ? '[&>*:first-child]:rounded-e-none [&>*:last-child]:rounded-s-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-ms-px'\n : '[&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-mt-px',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>","<Separator\n orientation={local.orientation ?? 'vertical'}\n class={cn('self-stretch', local.class)}\n {...rest}\n />","<div\n data-slot=\"button-group-text\"\n class={cn(\n 'bg-muted text-muted-foreground flex items-center gap-2 rounded-md border border-border px-control-sm text-sm',\n local.class\n )}\n {...rest}\n />"],"sources":["../../../../src/components/ui/button-group/button-group.tsx"],"sourcesContent":["import type { ComponentProps } from '@solidjs/web'\nimport { omit } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Separator } from '../separator'\n\n/**\n * ButtonGroup.\n *\n * Several controls acting as one. The point is the *join*: the items share a\n * border, collapse the seam between them, and round only at the ends, so a row of\n * buttons reads as a single object with segments rather than as buttons that happen\n * to be adjacent.\n *\n * The joining lives on the group, through child selectors, so an item never has to\n * know whether it sits at an end — which is also where the border collapse belongs.\n * A caller composing a group out of `Button`, `Select` and `InputGroup` therefore\n * gets the same treatment without those components knowing about it.\n *\n * The group is a `role=\"group\"` with a label, because a screen reader announcing\n * four unrelated buttons where the sighted user sees one control is the failure\n * this prevents.\n */\nexport type ButtonGroupProps = ComponentProps<'div'> & {\n /** The group's accessible name. Required: a group with no name is announced as loose buttons. */\n label: string\n orientation?: 'horizontal' | 'vertical'\n}\n\nexport function ButtonGroup(props: ButtonGroupProps) {\n const local = props\n const rest = omit(props, 'class', 'label', 'orientation', 'children')\n\n const horizontal = () => local.orientation !== 'vertical'\n\n return (\n <div\n data-slot=\"button-group\"\n role=\"group\"\n aria-label={local.label}\n class={cn(\n 'flex w-fit items-stretch',\n horizontal() ? 'flex-row' : 'flex-col',\n /* Ends keep their outer radius; everything between them is squared, and the\n seam is collapsed by pulling each item back over its neighbour's border. */\n horizontal()\n ? '[&>*:first-child]:rounded-e-none [&>*:last-child]:rounded-s-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-ms-px'\n : '[&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-mt-px',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n )\n}\n\n/**\n * A separator inside a group. `orientation` follows the group: a vertical rule in a\n * horizontal group, and the reverse.\n */\nexport function ButtonGroupSeparator(\n props: ComponentProps<typeof Separator> & { orientation?: 'horizontal' | 'vertical' }\n) {\n const local = props\n const rest = omit(props, 'class', 'orientation')\n\n return (\n <Separator\n orientation={local.orientation ?? 'vertical'}\n class={cn('self-stretch', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * Static text in a group, a unit, a label, a readout that is not a control. It\n * takes the group's border and height so it sits in the row as a peer, but it is\n * not focusable and does not pretend to be.\n */\nexport function ButtonGroupText(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n\n return (\n <div\n data-slot=\"button-group-text\"\n class={cn(\n 'bg-muted text-muted-foreground flex items-center gap-2 rounded-md border border-border px-control-sm text-sm',\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;AA4BA,SAAgB,YAAY,OAAyB;CACnD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,SAAS,eAAe,UAAU;CAEpE,MAAM,mBAAmB,MAAM,gBAAgB;CAG7C,IAAA,OAAA,OAiBK;
|
|
1
|
+
{"version":3,"file":"button-group.js","names":["role=\"group\"","<div\n data-slot=\"button-group\"\n role=\"group\"\n aria-label={local.label}\n class={cn(\n 'flex w-fit items-stretch',\n horizontal() ? 'flex-row' : 'flex-col',\n /* Ends keep their outer radius; everything between them is squared, and the\n seam is collapsed by pulling each item back over its neighbour's border. */\n horizontal()\n ? '[&>*:first-child]:rounded-e-none [&>*:last-child]:rounded-s-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-ms-px'\n : '[&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-mt-px',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>","<Separator\n orientation={local.orientation ?? 'vertical'}\n class={cn('self-stretch', local.class)}\n {...rest}\n />","<div\n data-slot=\"button-group-text\"\n class={cn(\n 'bg-muted text-muted-foreground flex items-center gap-2 rounded-md border border-border px-control-sm text-sm',\n local.class\n )}\n {...rest}\n />","_$spread","_$insert"],"sources":["../../../../src/components/ui/button-group/button-group.tsx"],"sourcesContent":["import type { ComponentProps } from '@solidjs/web'\nimport { omit } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Separator } from '../separator'\n\n/**\n * ButtonGroup.\n *\n * Several controls acting as one. The point is the *join*: the items share a\n * border, collapse the seam between them, and round only at the ends, so a row of\n * buttons reads as a single object with segments rather than as buttons that happen\n * to be adjacent.\n *\n * The joining lives on the group, through child selectors, so an item never has to\n * know whether it sits at an end — which is also where the border collapse belongs.\n * A caller composing a group out of `Button`, `Select` and `InputGroup` therefore\n * gets the same treatment without those components knowing about it.\n *\n * The group is a `role=\"group\"` with a label, because a screen reader announcing\n * four unrelated buttons where the sighted user sees one control is the failure\n * this prevents.\n */\nexport type ButtonGroupProps = ComponentProps<'div'> & {\n /** The group's accessible name. Required: a group with no name is announced as loose buttons. */\n label: string\n orientation?: 'horizontal' | 'vertical'\n}\n\nexport function ButtonGroup(props: ButtonGroupProps) {\n const local = props\n const rest = omit(props, 'class', 'label', 'orientation', 'children')\n\n const horizontal = () => local.orientation !== 'vertical'\n\n return (\n <div\n data-slot=\"button-group\"\n role=\"group\"\n aria-label={local.label}\n class={cn(\n 'flex w-fit items-stretch',\n horizontal() ? 'flex-row' : 'flex-col',\n /* Ends keep their outer radius; everything between them is squared, and the\n seam is collapsed by pulling each item back over its neighbour's border. */\n horizontal()\n ? '[&>*:first-child]:rounded-e-none [&>*:last-child]:rounded-s-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-ms-px'\n : '[&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-mt-px',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n )\n}\n\n/**\n * A separator inside a group. `orientation` follows the group: a vertical rule in a\n * horizontal group, and the reverse.\n */\nexport function ButtonGroupSeparator(\n props: ComponentProps<typeof Separator> & { orientation?: 'horizontal' | 'vertical' }\n) {\n const local = props\n const rest = omit(props, 'class', 'orientation')\n\n return (\n <Separator\n orientation={local.orientation ?? 'vertical'}\n class={cn('self-stretch', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * Static text in a group, a unit, a label, a readout that is not a control. It\n * takes the group's border and height so it sits in the row as a peer, but it is\n * not focusable and does not pretend to be.\n */\nexport function ButtonGroupText(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n\n return (\n <div\n data-slot=\"button-group-text\"\n class={cn(\n 'bg-muted text-muted-foreground flex items-center gap-2 rounded-md border border-border px-control-sm text-sm',\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;AA4BA,SAAgB,YAAY,OAAyB;CACnD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,SAAS,eAAe,UAAU;CAEpE,MAAM,mBAAmB,MAAM,gBAAgB;CAG7C,IAAA,OAAA,OAiBK;CAHHI,OAAA,MAAA,CAAA;EAbA,aAAA;EACAJ,MAAAA;EACA,IAAA,eAAA;GAAY,OAAA,MAAM;EAAK;EACvB,IAAA,UAAA;GAAO,OAAA,GACL,4BACA,WAAW,IAAI,aAAa,YAG5B,WAAW,IACP,0JACA,yJACJ,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,IAAA;CAdNK,OAAA,YAgBE;EAAC,OAAA,MAAM;CAAQ,CACZ;CAlBP,OACEJ;AAmBJ;;;;;AAMA,SAAgB,qBACd,OACA;CACA,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,aAAa;CAE/C,OACEC,gBAAAA,WAAAA,WAAAA;EACE,IAAA,cAAA;GAAa,OAAA,MAAM,eAAe;EAAU;EAC5C,IAAA,UAAA;GAAO,OAAA,GAAG,gBAAgB,MAAM,KAAK;EAAC;CAEvC,GADK,IACL,CAAA;AAEL;;;;;;AAOA,SAAgB,gBAAgB,OAA8B;CAC5D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAG9B,IAAA,QAAA,OAOC;CADCE,OAAA,OAAA,CAAA;EALA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,gHACA,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,KAAA;CAPR,OACED;AASJ"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { fastIcon } from "../../../lib/fast-icon.js";
|
|
2
|
-
import { cn } from "../../../lib/utils.js";
|
|
3
|
-
import { Button } from "../button/button.js";
|
|
4
1
|
import { className, createComponent, effect, insert, memo, mergeProps, readShallow, setAttribute, template } from "@solidjs/web";
|
|
5
|
-
import { ChevronLeft, ChevronRight } from "@lucide/solid";
|
|
6
2
|
import { For, Show, createMemo, omit } from "solid-js";
|
|
7
3
|
import { Calendar, CalendarDay, CalendarGrid, CalendarHeading, CalendarNext, CalendarPrevious, CalendarWeekday, CalendarWeekdays, CalendarWeeks } from "@ui-sdk/solid/calendar";
|
|
4
|
+
import { ChevronLeft as ChevronLeft$1, ChevronRight as ChevronRight$1 } from "@lucide/solid";
|
|
5
|
+
import { fastIcon } from "../../../lib/fast-icon.js";
|
|
6
|
+
import { cn } from "../../../lib/utils.js";
|
|
7
|
+
import { Button } from "../button/button.js";
|
|
8
8
|
// src/components/ui/calendar/calendar.tsx
|
|
9
9
|
var _tmpl$ = /* @__PURE__ */ template(`<div class="flex flex-col gap-2"><div class="flex items-center justify-between gap-2"><!><!><!>`);
|
|
10
10
|
var _tmpl$2 = /* @__PURE__ */ template(`<h2 class="text-sm font-semibold text-foreground">`);
|
|
@@ -12,8 +12,8 @@ var _tmpl$3 = /* @__PURE__ */ template(`<span aria-hidden=true>`);
|
|
|
12
12
|
var _tmpl$4 = /* @__PURE__ */ template(`<div><!><!><!>`);
|
|
13
13
|
var _tmpl$5 = /* @__PURE__ */ template(`<p class="text-xs font-semibold text-foreground">`);
|
|
14
14
|
var _tmpl$6 = /* @__PURE__ */ template(`<div class="flex justify-end gap-2">`);
|
|
15
|
-
var ChevronLeft
|
|
16
|
-
var ChevronRight
|
|
15
|
+
var ChevronLeft = fastIcon(ChevronLeft$1);
|
|
16
|
+
var ChevronRight = fastIcon(ChevronRight$1);
|
|
17
17
|
var MONTH_FORMAT = {
|
|
18
18
|
month: "long",
|
|
19
19
|
year: "numeric"
|
|
@@ -104,7 +104,7 @@ function CalendarMonth(props) {
|
|
|
104
104
|
size: "icon-sm"
|
|
105
105
|
})),
|
|
106
106
|
get children() {
|
|
107
|
-
return createComponent(ChevronLeft
|
|
107
|
+
return createComponent(ChevronLeft, { "aria-hidden": "true" });
|
|
108
108
|
}
|
|
109
109
|
}), _el$3);
|
|
110
110
|
insert(_el$2, (() => {
|
|
@@ -133,7 +133,7 @@ function CalendarMonth(props) {
|
|
|
133
133
|
size: "icon-sm"
|
|
134
134
|
})),
|
|
135
135
|
get children() {
|
|
136
|
-
return createComponent(ChevronRight
|
|
136
|
+
return createComponent(ChevronRight, { "aria-hidden": "true" });
|
|
137
137
|
}
|
|
138
138
|
}), _el$5);
|
|
139
139
|
insert(_el$, createComponent(CalendarGrid, {
|