@adea-ai/ui 0.159.8 → 0.160.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -24
- package/dist/NOTICE +11 -12
- package/dist/components/composites/about-dialog/about-dialog.d.ts +1 -1
- package/dist/components/composites/about-dialog/about-dialog.d.ts.map +1 -1
- package/dist/components/composites/about-dialog/about-dialog.js +26 -15
- package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
- package/dist/components/composites/accent-picker/accent-picker.d.ts +1 -1
- package/dist/components/composites/accent-picker/accent-picker.d.ts.map +1 -1
- package/dist/components/composites/accent-picker/accent-picker.js +186 -175
- package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
- package/dist/components/composites/accent-picker/custom-color-popover.d.ts +1 -1
- package/dist/components/composites/accent-picker/custom-color-popover.d.ts.map +1 -1
- package/dist/components/composites/accent-picker/custom-color-popover.js +114 -100
- package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
- package/dist/components/composites/account-menu/account-menu.d.ts +1 -1
- package/dist/components/composites/account-menu/account-menu.d.ts.map +1 -1
- package/dist/components/composites/account-menu/account-menu.js +68 -61
- package/dist/components/composites/account-menu/account-menu.js.map +1 -1
- package/dist/components/composites/action-button/action-button.d.ts +1 -1
- package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
- package/dist/components/composites/action-button/action-button.js +82 -100
- package/dist/components/composites/action-button/action-button.js.map +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js +82 -73
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.d.ts +3 -3
- package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.js +185 -197
- package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-editor.d.ts +3 -3
- package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-editor.js +370 -343
- package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-rows.d.ts +1 -1
- package/dist/components/composites/appearance-editor/appearance-rows.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-rows.js +219 -192
- package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-types.d.ts +1 -1
- package/dist/components/composites/appearance-editor/appearance-types.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-types.js.map +1 -1
- package/dist/components/composites/appearance-editor/font-settings-group.d.ts +1 -1
- package/dist/components/composites/appearance-editor/font-settings-group.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/font-settings-group.js +137 -117
- package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
- package/dist/components/composites/appearance-editor/theme-preview.d.ts +4 -4
- package/dist/components/composites/appearance-editor/theme-preview.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/theme-preview.js +190 -175
- package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser-group.d.ts +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser-group.d.ts.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser-group.js +162 -140
- package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser.d.ts +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser.d.ts.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser.js +284 -274
- package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-detail.d.ts +1 -1
- package/dist/components/composites/catalog-browser/catalog-detail.d.ts.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-detail.js +104 -76
- package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-types.d.ts +1 -1
- package/dist/components/composites/catalog-browser/catalog-types.d.ts.map +1 -1
- package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts +1 -1
- package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts.map +1 -1
- package/dist/components/composites/chain-of-thought/chain-of-thought.js +57 -54
- package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
- package/dist/components/composites/chat/chat.d.ts +1 -1
- package/dist/components/composites/chat/chat.d.ts.map +1 -1
- package/dist/components/composites/chat/chat.js +158 -147
- package/dist/components/composites/chat/chat.js.map +1 -1
- package/dist/components/composites/checkpoint/checkpoint.d.ts +2 -2
- package/dist/components/composites/checkpoint/checkpoint.d.ts.map +1 -1
- package/dist/components/composites/checkpoint/checkpoint.js +117 -116
- package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
- package/dist/components/composites/confirmation/confirmation.d.ts +1 -1
- package/dist/components/composites/confirmation/confirmation.d.ts.map +1 -1
- package/dist/components/composites/confirmation/confirmation.js +230 -202
- package/dist/components/composites/confirmation/confirmation.js.map +1 -1
- package/dist/components/composites/context/context.d.ts +2 -2
- package/dist/components/composites/context/context.d.ts.map +1 -1
- package/dist/components/composites/context/context.js +206 -195
- package/dist/components/composites/context/context.js.map +1 -1
- package/dist/components/composites/file-tree/file-tree.d.ts +2 -2
- package/dist/components/composites/file-tree/file-tree.d.ts.map +1 -1
- package/dist/components/composites/file-tree/file-tree.js +275 -239
- package/dist/components/composites/file-tree/file-tree.js.map +1 -1
- package/dist/components/composites/help-center/help-center.d.ts +1 -1
- package/dist/components/composites/help-center/help-center.d.ts.map +1 -1
- package/dist/components/composites/help-center/help-center.js +138 -118
- package/dist/components/composites/help-center/help-center.js.map +1 -1
- package/dist/components/composites/icon-picker/icon-picker.d.ts +1 -1
- package/dist/components/composites/icon-picker/icon-picker.d.ts.map +1 -1
- package/dist/components/composites/icon-picker/icon-picker.js +191 -165
- package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
- package/dist/components/composites/icon-picker/shell-icons.d.ts +60 -60
- package/dist/components/composites/icon-picker/shell-icons.d.ts.map +1 -1
- package/dist/components/composites/icon-picker/shell-icons.js +1 -1
- package/dist/components/composites/icon-picker/shell-icons.js.map +1 -1
- package/dist/components/composites/inline-citation/inline-citation.d.ts +2 -2
- package/dist/components/composites/inline-citation/inline-citation.d.ts.map +1 -1
- package/dist/components/composites/inline-citation/inline-citation.js +123 -104
- package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
- package/dist/components/composites/list-row/list-row-control.d.ts +8 -2
- package/dist/components/composites/list-row/list-row-control.d.ts.map +1 -1
- package/dist/components/composites/list-row/list-row-control.js +32 -34
- package/dist/components/composites/list-row/list-row-control.js.map +1 -1
- package/dist/components/composites/list-row/list-row.d.ts +5 -6
- package/dist/components/composites/list-row/list-row.d.ts.map +1 -1
- package/dist/components/composites/list-row/list-row.js +53 -55
- package/dist/components/composites/list-row/list-row.js.map +1 -1
- package/dist/components/composites/message-scroller/message-scroller.d.ts +1 -1
- package/dist/components/composites/message-scroller/message-scroller.d.ts.map +1 -1
- package/dist/components/composites/message-scroller/message-scroller.js +111 -103
- package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
- package/dist/components/composites/model-selector/model-selector.d.ts +1 -1
- package/dist/components/composites/model-selector/model-selector.d.ts.map +1 -1
- package/dist/components/composites/model-selector/model-selector.js +414 -406
- package/dist/components/composites/model-selector/model-selector.js.map +1 -1
- package/dist/components/composites/plan/plan.d.ts +1 -1
- package/dist/components/composites/plan/plan.d.ts.map +1 -1
- package/dist/components/composites/plan/plan.js +11 -17
- package/dist/components/composites/plan/plan.js.map +1 -1
- package/dist/components/composites/prompt-input/prompt-input.d.ts +1 -1
- package/dist/components/composites/prompt-input/prompt-input.d.ts.map +1 -1
- package/dist/components/composites/prompt-input/prompt-input.js +85 -105
- package/dist/components/composites/prompt-input/prompt-input.js.map +1 -1
- package/dist/components/composites/queue/queue.d.ts +1 -1
- package/dist/components/composites/queue/queue.d.ts.map +1 -1
- package/dist/components/composites/queue/queue.js +180 -188
- package/dist/components/composites/queue/queue.js.map +1 -1
- package/dist/components/composites/reasoning/reasoning.d.ts +1 -1
- package/dist/components/composites/reasoning/reasoning.d.ts.map +1 -1
- package/dist/components/composites/reasoning/reasoning.js +13 -18
- package/dist/components/composites/reasoning/reasoning.js.map +1 -1
- package/dist/components/composites/scene-controls/scene-controls.d.ts +1 -1
- package/dist/components/composites/scene-controls/scene-controls.d.ts.map +1 -1
- package/dist/components/composites/scene-controls/scene-controls.js +98 -83
- package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
- package/dist/components/composites/settings/settings-layout.d.ts +2 -2
- package/dist/components/composites/settings/settings-layout.d.ts.map +1 -1
- package/dist/components/composites/settings/settings-layout.js +15 -21
- package/dist/components/composites/settings/settings-layout.js.map +1 -1
- package/dist/components/composites/settings/settings-navigation.d.ts +1 -1
- package/dist/components/composites/settings/settings-navigation.d.ts.map +1 -1
- package/dist/components/composites/settings/settings-navigation.js +96 -72
- package/dist/components/composites/settings/settings-navigation.js.map +1 -1
- package/dist/components/composites/settings/settings.d.ts +1 -1
- package/dist/components/composites/settings/settings.d.ts.map +1 -1
- package/dist/components/composites/settings/settings.js +154 -136
- package/dist/components/composites/settings/settings.js.map +1 -1
- package/dist/components/composites/sources/sources.d.ts +1 -1
- package/dist/components/composites/sources/sources.d.ts.map +1 -1
- package/dist/components/composites/sources/sources.js +155 -144
- package/dist/components/composites/sources/sources.js.map +1 -1
- package/dist/components/composites/stack-trace/stack-trace.d.ts +2 -2
- package/dist/components/composites/stack-trace/stack-trace.d.ts.map +1 -1
- package/dist/components/composites/stack-trace/stack-trace.js +386 -371
- package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
- package/dist/components/composites/stat/stat.d.ts +1 -1
- package/dist/components/composites/stat/stat.d.ts.map +1 -1
- package/dist/components/composites/stat/stat.js +132 -116
- package/dist/components/composites/stat/stat.js.map +1 -1
- package/dist/components/composites/subagent/subagent.d.ts +1 -1
- package/dist/components/composites/subagent/subagent.d.ts.map +1 -1
- package/dist/components/composites/subagent/subagent.js +16 -29
- package/dist/components/composites/subagent/subagent.js.map +1 -1
- package/dist/components/composites/suggestion/suggestion.d.ts +3 -3
- package/dist/components/composites/suggestion/suggestion.d.ts.map +1 -1
- package/dist/components/composites/suggestion/suggestion.js +42 -43
- package/dist/components/composites/suggestion/suggestion.js.map +1 -1
- package/dist/components/composites/task/task.d.ts +1 -1
- package/dist/components/composites/task/task.d.ts.map +1 -1
- package/dist/components/composites/task/task.js +150 -147
- package/dist/components/composites/task/task.js.map +1 -1
- package/dist/components/composites/terminal/terminal.d.ts +2 -2
- package/dist/components/composites/terminal/terminal.d.ts.map +1 -1
- package/dist/components/composites/terminal/terminal.js +328 -286
- package/dist/components/composites/terminal/terminal.js.map +1 -1
- package/dist/components/composites/test-results/test-results.d.ts +1 -1
- package/dist/components/composites/test-results/test-results.d.ts.map +1 -1
- package/dist/components/composites/test-results/test-results.js +304 -266
- package/dist/components/composites/test-results/test-results.js.map +1 -1
- package/dist/components/composites/tool/tool.d.ts +2 -2
- package/dist/components/composites/tool/tool.d.ts.map +1 -1
- package/dist/components/composites/tool/tool.js +68 -68
- package/dist/components/composites/tool/tool.js.map +1 -1
- package/dist/components/composites/tree/tree.d.ts +6 -5
- package/dist/components/composites/tree/tree.d.ts.map +1 -1
- package/dist/components/composites/tree/tree.js +234 -215
- package/dist/components/composites/tree/tree.js.map +1 -1
- package/dist/components/composites/update-dialog/channel-control.d.ts +1 -1
- package/dist/components/composites/update-dialog/channel-control.d.ts.map +1 -1
- package/dist/components/composites/update-dialog/channel-control.js +50 -46
- package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
- package/dist/components/composites/update-dialog/update-dialog.d.ts +2 -1
- package/dist/components/composites/update-dialog/update-dialog.d.ts.map +1 -1
- package/dist/components/composites/update-dialog/update-dialog.js +353 -282
- package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.d.ts +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.d.ts.map +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.js +70 -69
- package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.d.ts +1 -1
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.d.ts.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js +41 -38
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-switcher.d.ts +1 -1
- package/dist/components/composites/workspace-switcher/workspace-switcher.d.ts.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-switcher.js +39 -21
- package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
- package/dist/components/conversation/atomic/chat-composer.d.ts +1 -1
- package/dist/components/conversation/atomic/chat-composer.d.ts.map +1 -1
- package/dist/components/conversation/atomic/chat-composer.js +2 -2
- package/dist/components/conversation/atomic/chat-composer.js.map +1 -1
- package/dist/components/conversation/busy-send-button.d.ts +2 -2
- package/dist/components/conversation/busy-send-button.d.ts.map +1 -1
- package/dist/components/conversation/busy-send-button.js +137 -137
- package/dist/components/conversation/busy-send-button.js.map +1 -1
- package/dist/components/conversation/chat-composer.d.ts +1 -1
- package/dist/components/conversation/chat-composer.d.ts.map +1 -1
- package/dist/components/conversation/chat-composer.js +5 -5
- package/dist/components/conversation/chat-composer.js.map +1 -1
- package/dist/components/conversation/composer-core.d.ts +2 -2
- package/dist/components/conversation/composer-menu.d.ts +3 -3
- package/dist/components/conversation/composer-menu.d.ts.map +1 -1
- package/dist/components/conversation/composer-menu.js +23 -23
- package/dist/components/conversation/composer-menu.js.map +1 -1
- package/dist/components/conversation/conversation-avatar.d.ts +2 -2
- package/dist/components/conversation/conversation-avatar.d.ts.map +1 -1
- package/dist/components/conversation/conversation-avatar.js +28 -32
- package/dist/components/conversation/conversation-avatar.js.map +1 -1
- package/dist/components/conversation/conversation-pane.d.ts +1 -1
- package/dist/components/conversation/conversation-pane.d.ts.map +1 -1
- package/dist/components/conversation/conversation-pane.js +65 -59
- package/dist/components/conversation/conversation-pane.js.map +1 -1
- package/dist/components/conversation/conversation-surface.d.ts +2 -1
- package/dist/components/conversation/conversation-surface.d.ts.map +1 -1
- package/dist/components/conversation/conversation-surface.js +68 -72
- package/dist/components/conversation/conversation-surface.js.map +1 -1
- package/dist/components/conversation/internal/chat-composer-shell.d.ts +3 -2
- package/dist/components/conversation/internal/chat-composer-shell.d.ts.map +1 -1
- package/dist/components/conversation/internal/chat-composer-shell.js +267 -264
- package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
- package/dist/components/conversation/message-composer.d.ts +2 -1
- package/dist/components/conversation/message-composer.d.ts.map +1 -1
- package/dist/components/conversation/message-composer.js +82 -98
- package/dist/components/conversation/message-composer.js.map +1 -1
- package/dist/components/conversation/message-row.d.ts +1 -1
- package/dist/components/conversation/message-row.d.ts.map +1 -1
- package/dist/components/conversation/message-row.js +317 -316
- package/dist/components/conversation/message-row.js.map +1 -1
- package/dist/components/conversation/paste-token-editor.d.ts +1 -1
- package/dist/components/conversation/paste-token-editor.d.ts.map +1 -1
- package/dist/components/conversation/paste-token-editor.js +210 -161
- package/dist/components/conversation/paste-token-editor.js.map +1 -1
- package/dist/components/conversation/scroll-follow.d.ts +1 -1
- package/dist/components/conversation/scroll-follow.d.ts.map +1 -1
- package/dist/components/conversation/scroll-follow.js +11 -9
- package/dist/components/conversation/scroll-follow.js.map +1 -1
- package/dist/components/conversation/thread-panel.d.ts +1 -1
- package/dist/components/conversation/thread-panel.d.ts.map +1 -1
- package/dist/components/conversation/thread-panel.js +124 -116
- package/dist/components/conversation/thread-panel.js.map +1 -1
- package/dist/components/conversation/transcript-composition.d.ts +3 -2
- package/dist/components/conversation/transcript-composition.d.ts.map +1 -1
- package/dist/components/conversation/transcript-composition.js +127 -132
- package/dist/components/conversation/transcript-composition.js.map +1 -1
- package/dist/components/layout/app-shell/app-shell.d.ts +1 -1
- package/dist/components/layout/app-shell/app-shell.d.ts.map +1 -1
- package/dist/components/layout/app-shell/app-shell.js +40 -34
- package/dist/components/layout/app-shell/app-shell.js.map +1 -1
- package/dist/components/layout/app-shell/skip-link.d.ts +2 -2
- package/dist/components/layout/app-shell/skip-link.d.ts.map +1 -1
- package/dist/components/layout/app-shell/skip-link.js +22 -25
- package/dist/components/layout/app-shell/skip-link.js.map +1 -1
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.d.ts +2 -1
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.d.ts.map +1 -1
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.js +70 -40
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
- package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.d.ts +2 -1
- package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.d.ts.map +1 -1
- package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js +6 -5
- package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js.map +1 -1
- package/dist/components/layout/floating-preview/floating-preview.d.ts +1 -1
- package/dist/components/layout/floating-preview/floating-preview.d.ts.map +1 -1
- package/dist/components/layout/floating-preview/floating-preview.js +95 -83
- package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
- package/dist/components/layout/orbit-layout/orbit-layout.d.ts +3 -3
- package/dist/components/layout/orbit-layout/orbit-layout.d.ts.map +1 -1
- package/dist/components/layout/orbit-layout/orbit-layout.js +29 -38
- package/dist/components/layout/orbit-layout/orbit-layout.js.map +1 -1
- package/dist/components/layout/page/page.d.ts +1 -1
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +116 -103
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/panel/panel.d.ts +11 -11
- package/dist/components/layout/panel/panel.d.ts.map +1 -1
- package/dist/components/layout/panel/panel.js +98 -82
- package/dist/components/layout/panel/panel.js.map +1 -1
- package/dist/components/layout/pixel-pane/pixel-pane.d.ts +1 -1
- package/dist/components/layout/pixel-pane/pixel-pane.d.ts.map +1 -1
- package/dist/components/layout/pixel-pane/pixel-pane.js +15 -15
- package/dist/components/layout/pixel-pane/pixel-pane.js.map +1 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts +1 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts.map +1 -1
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +112 -105
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
- package/dist/components/layout/shell-rail/shell-rail.d.ts +4 -2
- package/dist/components/layout/shell-rail/shell-rail.d.ts.map +1 -1
- package/dist/components/layout/shell-rail/shell-rail.js +32 -35
- package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
- package/dist/components/layout/shell-top-bar/shell-top-bar.d.ts +2 -2
- package/dist/components/layout/shell-top-bar/shell-top-bar.d.ts.map +1 -1
- package/dist/components/layout/shell-top-bar/shell-top-bar.js +126 -120
- package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail-context.d.ts +1 -1
- package/dist/components/layout/side-rail/side-rail-context.d.ts.map +1 -1
- package/dist/components/layout/side-rail/side-rail-context.js +1 -1
- package/dist/components/layout/side-rail/side-rail-context.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail.d.ts +8 -2
- package/dist/components/layout/side-rail/side-rail.d.ts.map +1 -1
- package/dist/components/layout/side-rail/side-rail.js +155 -138
- package/dist/components/layout/side-rail/side-rail.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.d.ts +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.d.ts.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts +8 -2
- package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.js +231 -224
- package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts +2 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core-retry.js +64 -63
- package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.d.ts +2 -1
- package/dist/components/layout/split-layout/resize-controller-core.d.ts.map +1 -1
- package/dist/components/layout/split-layout/resize-controller-core.js +64 -63
- package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
- package/dist/components/layout/split-layout/split-layout.d.ts +2 -1
- package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
- package/dist/components/layout/split-layout/split-layout.js +330 -275
- package/dist/components/layout/split-layout/split-layout.js.map +1 -1
- package/dist/components/layout/status-bar/status-bar.d.ts +4 -4
- package/dist/components/layout/status-bar/status-bar.d.ts.map +1 -1
- package/dist/components/layout/status-bar/status-bar.js +42 -33
- package/dist/components/layout/status-bar/status-bar.js.map +1 -1
- package/dist/components/layout/top-bar/top-bar.d.ts +8 -8
- package/dist/components/layout/top-bar/top-bar.d.ts.map +1 -1
- package/dist/components/layout/top-bar/top-bar.js +96 -98
- package/dist/components/layout/top-bar/top-bar.js.map +1 -1
- package/dist/components/layout/virtual-window/virtual-window.d.ts +1 -1
- package/dist/components/layout/virtual-window/virtual-window.d.ts.map +1 -1
- package/dist/components/layout/virtual-window/virtual-window.js +29 -34
- package/dist/components/layout/virtual-window/virtual-window.js.map +1 -1
- package/dist/components/motion/index.d.ts +1 -1
- package/dist/components/motion/index.d.ts.map +1 -1
- package/dist/components/motion/index.js +1 -1
- package/dist/components/motion/motion.d.ts +84 -0
- package/dist/components/motion/motion.d.ts.map +1 -0
- package/dist/components/motion/motion.js +198 -0
- package/dist/components/motion/motion.js.map +1 -0
- package/dist/components/motion/presence.d.ts +16 -7
- package/dist/components/motion/presence.d.ts.map +1 -1
- package/dist/components/motion/presence.js +75 -3
- package/dist/components/motion/presence.js.map +1 -1
- package/dist/components/theme/appearance-panel.d.ts +2 -2
- package/dist/components/theme/appearance-panel.d.ts.map +1 -1
- package/dist/components/theme/appearance-panel.js +156 -141
- package/dist/components/theme/appearance-panel.js.map +1 -1
- package/dist/components/theme/lazy.d.ts +1 -1
- package/dist/components/theme/lazy.d.ts.map +1 -1
- package/dist/components/theme/lazy.js +3 -2
- package/dist/components/theme/lazy.js.map +1 -1
- package/dist/components/theme/theme-context.d.ts +1 -1
- package/dist/components/theme/theme-context.d.ts.map +1 -1
- package/dist/components/theme/theme-context.js +2 -2
- package/dist/components/theme/theme-context.js.map +1 -1
- package/dist/components/theme/theme-mode-toggle.d.ts +2 -2
- package/dist/components/theme/theme-mode-toggle.d.ts.map +1 -1
- package/dist/components/theme/theme-mode-toggle.js +22 -17
- package/dist/components/theme/theme-mode-toggle.js.map +1 -1
- package/dist/components/theme/theme-picker.d.ts +4 -4
- package/dist/components/theme/theme-picker.d.ts.map +1 -1
- package/dist/components/theme/theme-picker.js +145 -133
- package/dist/components/theme/theme-picker.js.map +1 -1
- package/dist/components/theme/theme-provider-value.d.ts +1 -1
- package/dist/components/theme/theme-provider-value.d.ts.map +1 -1
- package/dist/components/theme/theme-provider-value.js +48 -57
- package/dist/components/theme/theme-provider-value.js.map +1 -1
- package/dist/components/theme/theme-provider.d.ts +1 -1
- package/dist/components/theme/theme-provider.d.ts.map +1 -1
- package/dist/components/theme/theme-provider.js +1 -1
- package/dist/components/theme/theme-provider.js.map +1 -1
- package/dist/components/theme/theme-toggle.d.ts +2 -2
- package/dist/components/theme/theme-toggle.d.ts.map +1 -1
- package/dist/components/theme/theme-toggle.js +19 -12
- package/dist/components/theme/theme-toggle.js.map +1 -1
- package/dist/components/ui/accordion/accordion.d.ts +25 -12
- package/dist/components/ui/accordion/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion/accordion.js +42 -38
- package/dist/components/ui/accordion/accordion.js.map +1 -1
- package/dist/components/ui/alert/alert.d.ts +1 -1
- package/dist/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/components/ui/alert/alert.js +67 -53
- package/dist/components/ui/alert/alert.js.map +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts +59 -12
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog.js +163 -136
- package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/ui/annotation-surface/annotation-surface.d.ts +1 -1
- package/dist/components/ui/annotation-surface/annotation-surface.d.ts.map +1 -1
- package/dist/components/ui/annotation-surface/annotation-surface.js +80 -91
- package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
- package/dist/components/ui/aspect-ratio/aspect-ratio.d.ts +1 -1
- package/dist/components/ui/aspect-ratio/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio/aspect-ratio.js +19 -22
- package/dist/components/ui/aspect-ratio/aspect-ratio.js.map +1 -1
- package/dist/components/ui/attachment/attachment.d.ts +1 -1
- package/dist/components/ui/attachment/attachment.d.ts.map +1 -1
- package/dist/components/ui/attachment/attachment.js +202 -198
- package/dist/components/ui/attachment/attachment.js.map +1 -1
- package/dist/components/ui/avatar/avatar.d.ts +4 -4
- package/dist/components/ui/avatar/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar/avatar.js +61 -52
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/badge/badge.d.ts +10 -3
- package/dist/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/components/ui/badge/badge.js +22 -28
- package/dist/components/ui/badge/badge.js.map +1 -1
- package/dist/components/ui/board/board.d.ts +1 -1
- package/dist/components/ui/board/board.d.ts.map +1 -1
- package/dist/components/ui/board/board.js +259 -236
- package/dist/components/ui/board/board.js.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.d.ts +8 -8
- package/dist/components/ui/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js +90 -75
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble/bubble.d.ts +1 -1
- package/dist/components/ui/bubble/bubble.d.ts.map +1 -1
- package/dist/components/ui/bubble/bubble.js +47 -45
- package/dist/components/ui/bubble/bubble.js.map +1 -1
- package/dist/components/ui/button/button.d.ts +18 -3
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/button/button.js +34 -25
- package/dist/components/ui/button/button.js.map +1 -1
- package/dist/components/ui/button-group/button-group.d.ts +4 -4
- package/dist/components/ui/button-group/button-group.d.ts.map +1 -1
- package/dist/components/ui/button-group/button-group.js +32 -32
- package/dist/components/ui/button-group/button-group.js.map +1 -1
- package/dist/components/ui/calendar/calendar.d.ts +93 -39
- package/dist/components/ui/calendar/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar/calendar.js +287 -193
- package/dist/components/ui/calendar/calendar.js.map +1 -1
- package/dist/components/ui/callout/callout.d.ts +3 -3
- package/dist/components/ui/callout/callout.d.ts.map +1 -1
- package/dist/components/ui/callout/callout.js +30 -33
- package/dist/components/ui/callout/callout.js.map +1 -1
- package/dist/components/ui/card/card.d.ts +8 -8
- package/dist/components/ui/card/card.d.ts.map +1 -1
- package/dist/components/ui/card/card.js +66 -58
- package/dist/components/ui/card/card.js.map +1 -1
- package/dist/components/ui/carousel/carousel.d.ts +8 -2
- package/dist/components/ui/carousel/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel/carousel.js +115 -105
- package/dist/components/ui/carousel/carousel.js.map +1 -1
- package/dist/components/ui/chart/chart.d.ts +7 -8
- package/dist/components/ui/chart/chart.d.ts.map +1 -1
- package/dist/components/ui/chart/chart.js +311 -245
- package/dist/components/ui/chart/chart.js.map +1 -1
- package/dist/components/ui/checkbox/checkbox.d.ts +47 -23
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox/checkbox.js +312 -356
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/code-block/code-block.d.ts +1 -1
- package/dist/components/ui/code-block/code-block.d.ts.map +1 -1
- package/dist/components/ui/code-block/code-block.js +263 -253
- package/dist/components/ui/code-block/code-block.js.map +1 -1
- package/dist/components/ui/collapsible/collapsible.d.ts +20 -8
- package/dist/components/ui/collapsible/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible/collapsible.js +24 -27
- package/dist/components/ui/collapsible/collapsible.js.map +1 -1
- package/dist/components/ui/combobox/combobox.d.ts +97 -13
- package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox/combobox.js +302 -97
- package/dist/components/ui/combobox/combobox.js.map +1 -1
- package/dist/components/ui/combobox/value-combobox.d.ts +1 -1
- package/dist/components/ui/combobox/value-combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox/value-combobox.js +4 -7
- package/dist/components/ui/combobox/value-combobox.js.map +1 -1
- package/dist/components/ui/command/command.d.ts +100 -36
- package/dist/components/ui/command/command.d.ts.map +1 -1
- package/dist/components/ui/command/command.js +377 -169
- package/dist/components/ui/command/command.js.map +1 -1
- package/dist/components/ui/context-menu/context-menu.d.ts +24 -12
- package/dist/components/ui/context-menu/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu/context-menu.js +45 -14
- package/dist/components/ui/context-menu/context-menu.js.map +1 -1
- package/dist/components/ui/detail-panel/detail-panel.d.ts +1 -1
- package/dist/components/ui/detail-panel/detail-panel.d.ts.map +1 -1
- package/dist/components/ui/detail-panel/detail-panel.js +110 -102
- package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
- package/dist/components/ui/dialog/dialog-layer.d.ts +98 -28
- package/dist/components/ui/dialog/dialog-layer.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog-layer.js +257 -151
- package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
- package/dist/components/ui/dialog/dialog.d.ts +55 -14
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog.js +201 -118
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/diff-block/diff-block.d.ts +1 -1
- package/dist/components/ui/diff-block/diff-block.d.ts.map +1 -1
- package/dist/components/ui/diff-block/diff-block.js +111 -86
- package/dist/components/ui/diff-block/diff-block.js.map +1 -1
- package/dist/components/ui/drawer/drawer.d.ts +53 -19
- package/dist/components/ui/drawer/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer/drawer.js +108 -83
- package/dist/components/ui/drawer/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +60 -47
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +73 -188
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdown-menu/menu-parts.d.ts +219 -18
- package/dist/components/ui/dropdown-menu/menu-parts.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu/menu-parts.js +556 -150
- package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
- package/dist/components/ui/empty/empty-state.d.ts +1 -1
- package/dist/components/ui/empty/empty-state.d.ts.map +1 -1
- package/dist/components/ui/empty/empty-state.js +16 -27
- package/dist/components/ui/empty/empty-state.js.map +1 -1
- package/dist/components/ui/empty/empty.d.ts +1 -1
- package/dist/components/ui/empty/empty.d.ts.map +1 -1
- package/dist/components/ui/empty/empty.js +57 -50
- package/dist/components/ui/empty/empty.js.map +1 -1
- package/dist/components/ui/entity-icon/entity-icon.d.ts +2 -1
- package/dist/components/ui/entity-icon/entity-icon.d.ts.map +1 -1
- package/dist/components/ui/entity-icon/entity-icon.js +71 -72
- package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
- package/dist/components/ui/field/field.d.ts +53 -14
- package/dist/components/ui/field/field.d.ts.map +1 -1
- package/dist/components/ui/field/field.js +175 -110
- package/dist/components/ui/field/field.js.map +1 -1
- package/dist/components/ui/field/number-field.d.ts +1 -1
- package/dist/components/ui/field/number-field.d.ts.map +1 -1
- package/dist/components/ui/field/number-field.js +14 -10
- package/dist/components/ui/field/number-field.js.map +1 -1
- package/dist/components/ui/hover-card/hover-card.d.ts +19 -4
- package/dist/components/ui/hover-card/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card/hover-card.js +80 -17
- package/dist/components/ui/hover-card/hover-card.js.map +1 -1
- package/dist/components/ui/input/input-control.d.ts +4 -3
- package/dist/components/ui/input/input-control.d.ts.map +1 -1
- package/dist/components/ui/input/input-control.js +16 -20
- package/dist/components/ui/input/input-control.js.map +1 -1
- package/dist/components/ui/input/input.d.ts +2 -2
- package/dist/components/ui/input/input.d.ts.map +1 -1
- package/dist/components/ui/input/input.js +42 -47
- package/dist/components/ui/input/input.js.map +1 -1
- package/dist/components/ui/input-group/input-group.d.ts +1 -1
- package/dist/components/ui/input-group/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group/input-group.js +119 -132
- package/dist/components/ui/input-group/input-group.js.map +1 -1
- package/dist/components/ui/input-group/secret-input-group.d.ts +1 -1
- package/dist/components/ui/input-group/secret-input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group/secret-input-group.js +11 -17
- package/dist/components/ui/input-group/secret-input-group.js.map +1 -1
- package/dist/components/ui/input-otp/input-otp.d.ts +23 -9
- package/dist/components/ui/input-otp/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp/input-otp.js +60 -67
- package/dist/components/ui/input-otp/input-otp.js.map +1 -1
- package/dist/components/ui/item/item.d.ts +1 -1
- package/dist/components/ui/item/item.d.ts.map +1 -1
- package/dist/components/ui/item/item.js +105 -101
- package/dist/components/ui/item/item.js.map +1 -1
- package/dist/components/ui/kbd/kbd.d.ts +4 -4
- package/dist/components/ui/kbd/kbd.d.ts.map +1 -1
- package/dist/components/ui/kbd/kbd.js +25 -24
- package/dist/components/ui/kbd/kbd.js.map +1 -1
- package/dist/components/ui/label/label.d.ts +5 -5
- package/dist/components/ui/label/label.d.ts.map +1 -1
- package/dist/components/ui/label/label.js +15 -13
- package/dist/components/ui/label/label.js.map +1 -1
- package/dist/components/ui/marker/marker.d.ts +1 -1
- package/dist/components/ui/marker/marker.d.ts.map +1 -1
- package/dist/components/ui/marker/marker.js +72 -74
- package/dist/components/ui/marker/marker.js.map +1 -1
- package/dist/components/ui/menubar/menubar.d.ts +37 -23
- package/dist/components/ui/menubar/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar/menubar.js +76 -39
- package/dist/components/ui/menubar/menubar.js.map +1 -1
- package/dist/components/ui/message/message.d.ts +1 -1
- package/dist/components/ui/message/message.d.ts.map +1 -1
- package/dist/components/ui/message/message.js +281 -250
- package/dist/components/ui/message/message.js.map +1 -1
- package/dist/components/ui/modal-dialog/modal-dialog.d.ts +18 -17
- package/dist/components/ui/modal-dialog/modal-dialog.d.ts.map +1 -1
- package/dist/components/ui/modal-dialog/modal-dialog.js +95 -106
- package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/ui/native-select/native-select.d.ts +2 -2
- package/dist/components/ui/native-select/native-select.d.ts.map +1 -1
- package/dist/components/ui/native-select/native-select.js +93 -93
- package/dist/components/ui/native-select/native-select.js.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.d.ts +45 -44
- package/dist/components/ui/navigation-menu/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu/navigation-menu.js +215 -96
- package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination/pagination.d.ts +36 -16
- package/dist/components/ui/pagination/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination/pagination.js +86 -68
- package/dist/components/ui/pagination/pagination.js.map +1 -1
- package/dist/components/ui/popover/popover.d.ts +51 -10
- package/dist/components/ui/popover/popover.d.ts.map +1 -1
- package/dist/components/ui/popover/popover.js +204 -37
- package/dist/components/ui/popover/popover.js.map +1 -1
- package/dist/components/ui/progress/progress.d.ts +23 -5
- package/dist/components/ui/progress/progress.d.ts.map +1 -1
- package/dist/components/ui/progress/progress.js +52 -32
- package/dist/components/ui/progress/progress.js.map +1 -1
- package/dist/components/ui/questionnaire/questionnaire.d.ts +1 -1
- package/dist/components/ui/questionnaire/questionnaire.d.ts.map +1 -1
- package/dist/components/ui/questionnaire/questionnaire.js +351 -338
- package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group/radio-group.d.ts +27 -6
- package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group/radio-group.js +202 -145
- package/dist/components/ui/radio-group/radio-group.js.map +1 -1
- package/dist/components/ui/resizable/index.d.ts +1 -1
- package/dist/components/ui/resizable/index.d.ts.map +1 -1
- package/dist/components/ui/resizable/resizable.d.ts +55 -9
- package/dist/components/ui/resizable/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable/resizable.js +104 -81
- package/dist/components/ui/resizable/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.d.ts +2 -2
- package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js +22 -28
- package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/ui/select/select.d.ts +104 -24
- package/dist/components/ui/select/select.d.ts.map +1 -1
- package/dist/components/ui/select/select.js +304 -111
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/separator/separator.d.ts +13 -3
- package/dist/components/ui/separator/separator.d.ts.map +1 -1
- package/dist/components/ui/separator/separator.js +11 -9
- package/dist/components/ui/separator/separator.js.map +1 -1
- package/dist/components/ui/sheet/index.js +3 -1
- package/dist/components/ui/sheet/sheet.d.ts +34 -9
- package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet/sheet.js +144 -106
- package/dist/components/ui/sheet/sheet.js.map +1 -1
- package/dist/components/ui/skeleton/skeleton.d.ts +2 -2
- package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton/skeleton.js +13 -10
- package/dist/components/ui/skeleton/skeleton.js.map +1 -1
- package/dist/components/ui/slider/slider.d.ts +27 -8
- package/dist/components/ui/slider/slider.d.ts.map +1 -1
- package/dist/components/ui/slider/slider.js +74 -60
- package/dist/components/ui/slider/slider.js.map +1 -1
- package/dist/components/ui/spinner/spinner.d.ts +2 -2
- package/dist/components/ui/spinner/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner/spinner.js +23 -18
- package/dist/components/ui/spinner/spinner.js.map +1 -1
- package/dist/components/ui/status-chip/status-chip.d.ts +1 -1
- package/dist/components/ui/status-chip/status-chip.d.ts.map +1 -1
- package/dist/components/ui/status-chip/status-chip.js +69 -55
- package/dist/components/ui/status-chip/status-chip.js.map +1 -1
- package/dist/components/ui/switch/switch.d.ts +31 -15
- package/dist/components/ui/switch/switch.d.ts.map +1 -1
- package/dist/components/ui/switch/switch.js +275 -325
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/table/table.d.ts +10 -10
- package/dist/components/ui/table/table.d.ts.map +1 -1
- package/dist/components/ui/table/table.js +96 -79
- package/dist/components/ui/table/table.js.map +1 -1
- package/dist/components/ui/tabs/tabs.d.ts +32 -8
- package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs/tabs.js +80 -63
- package/dist/components/ui/tabs/tabs.js.map +1 -1
- package/dist/components/ui/text-link/text-link.d.ts +2 -2
- package/dist/components/ui/text-link/text-link.d.ts.map +1 -1
- package/dist/components/ui/text-link/text-link.js +16 -16
- package/dist/components/ui/text-link/text-link.js.map +1 -1
- package/dist/components/ui/textarea/textarea.d.ts +3 -2
- package/dist/components/ui/textarea/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea/textarea.js +39 -49
- package/dist/components/ui/textarea/textarea.js.map +1 -1
- package/dist/components/ui/toast/toast.d.ts +30 -8
- package/dist/components/ui/toast/toast.d.ts.map +1 -1
- package/dist/components/ui/toast/toast.js +188 -86
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/components/ui/toggle/toggle.d.ts +9 -5
- package/dist/components/ui/toggle/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle/toggle.js +18 -17
- package/dist/components/ui/toggle/toggle.js.map +1 -1
- package/dist/components/ui/toggle-group/toggle-group.d.ts +27 -11
- package/dist/components/ui/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group/toggle-group.js +30 -32
- package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/ui/tooltip/deferred-tooltip.d.ts +8 -6
- package/dist/components/ui/tooltip/deferred-tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip/deferred-tooltip.js +33 -16
- package/dist/components/ui/tooltip/deferred-tooltip.js.map +1 -1
- package/dist/components/ui/tooltip/lazy-tooltip.d.ts +2 -2
- package/dist/components/ui/tooltip/lazy-tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip/lazy-tooltip.js +27 -28
- package/dist/components/ui/tooltip/lazy-tooltip.js.map +1 -1
- package/dist/components/ui/tooltip/tooltip.d.ts +142 -16
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip/tooltip.js +255 -254
- package/dist/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/components/ui/trace/trace.d.ts +1 -1
- package/dist/components/ui/trace/trace.d.ts.map +1 -1
- package/dist/components/ui/trace/trace.js +245 -250
- package/dist/components/ui/trace/trace.js.map +1 -1
- package/dist/components/ui/typography/typography.d.ts +11 -4
- package/dist/components/ui/typography/typography.d.ts.map +1 -1
- package/dist/components/ui/typography/typography.js +8 -19
- package/dist/components/ui/typography/typography.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/lib/async-action.d.ts.map +1 -1
- package/dist/lib/async-action.js +1 -1
- package/dist/lib/async-action.js.map +1 -1
- package/dist/lib/create-poll.d.ts.map +1 -1
- package/dist/lib/create-poll.js +11 -10
- package/dist/lib/create-poll.js.map +1 -1
- package/dist/lib/events.d.ts +1 -1
- package/dist/lib/events.d.ts.map +1 -1
- package/dist/lib/events.js.map +1 -1
- package/dist/lib/fast-icon.d.ts +2 -2
- package/dist/lib/fast-icon.d.ts.map +1 -1
- package/dist/lib/fast-icon.js +8 -7
- package/dist/lib/fast-icon.js.map +1 -1
- package/dist/lib/form-field.d.ts +12 -10
- package/dist/lib/form-field.d.ts.map +1 -1
- package/dist/lib/form-field.js +12 -8
- package/dist/lib/form-field.js.map +1 -1
- package/dist/lib/keyed-rows.d.ts.map +1 -1
- package/dist/lib/keyed-rows.js +4 -1
- package/dist/lib/keyed-rows.js.map +1 -1
- package/dist/lib/overlay.d.ts +24 -5
- package/dist/lib/overlay.d.ts.map +1 -1
- package/dist/lib/overlay.js +41 -6
- package/dist/lib/overlay.js.map +1 -1
- package/dist/lib/refs.d.ts +13 -0
- package/dist/lib/refs.d.ts.map +1 -0
- package/dist/lib/refs.js +22 -0
- package/dist/lib/refs.js.map +1 -0
- package/dist/lib/resize-separator.d.ts +1 -1
- package/dist/lib/resize-separator.d.ts.map +1 -1
- package/dist/lib/resize-separator.js +1 -1
- package/dist/lib/resize-separator.js.map +1 -1
- package/dist/lib/slotted.d.ts +14 -0
- package/dist/lib/slotted.d.ts.map +1 -0
- package/dist/lib/slotted.js +19 -0
- package/dist/lib/slotted.js.map +1 -0
- package/dist/lint/index.d.ts.map +1 -1
- package/dist/lint.js +11 -4
- package/dist/lint.js.map +1 -1
- package/dist/r/about-dialog.json +1 -1
- package/dist/r/accent-picker.json +2 -1
- package/dist/r/accordion.json +3 -2
- package/dist/r/account-menu.json +2 -1
- package/dist/r/action-button.json +1 -1
- package/dist/r/alert-dialog.json +3 -1
- package/dist/r/alert.json +2 -1
- package/dist/r/annotation-surface.json +3 -1
- package/dist/r/app-shell.json +3 -1
- package/dist/r/appearance-editor.json +3 -2
- package/dist/r/aspect-ratio.json +3 -1
- package/dist/r/attachment.json +2 -1
- package/dist/r/avatar.json +3 -1
- package/dist/r/badge.json +1 -1
- package/dist/r/board.json +3 -1
- package/dist/r/breadcrumb.json +2 -1
- package/dist/r/bubble.json +3 -1
- package/dist/r/button-group.json +3 -1
- package/dist/r/button.json +1 -1
- package/dist/r/calendar.json +3 -2
- package/dist/r/callout.json +3 -1
- package/dist/r/card.json +3 -1
- package/dist/r/carousel.json +3 -3
- package/dist/r/catalog-browser.json +3 -2
- package/dist/r/chain-of-thought.json +2 -1
- package/dist/r/chart.json +2 -2
- package/dist/r/chat.json +2 -1
- package/dist/r/checkbox.json +2 -2
- package/dist/r/checkpoint.json +2 -1
- package/dist/r/code-block.json +2 -1
- package/dist/r/collapsible.json +2 -1
- package/dist/r/combobox.json +3 -2
- package/dist/r/command.json +4 -3
- package/dist/r/confirmation.json +2 -1
- package/dist/r/context-menu.json +3 -3
- package/dist/r/context.json +2 -1
- package/dist/r/contextual-sidebar.json +3 -1
- package/dist/r/conversation.json +3 -2
- package/dist/r/detail-panel.json +2 -1
- package/dist/r/dialog.json +3 -2
- package/dist/r/diff-block.json +3 -1
- package/dist/r/drawer.json +3 -1
- package/dist/r/dropdown-menu.json +3 -2
- package/dist/r/empty.json +2 -1
- package/dist/r/entity-icon.json +3 -1
- package/dist/r/field.json +2 -1
- package/dist/r/file-tree.json +2 -1
- package/dist/r/floating-preview.json +2 -1
- package/dist/r/help-center.json +1 -1
- package/dist/r/hover-card.json +3 -1
- package/dist/r/icon-picker.json +2 -1
- package/dist/r/inline-citation.json +1 -1
- package/dist/r/input-group.json +3 -1
- package/dist/r/input-otp.json +2 -1
- package/dist/r/input.json +4 -1
- package/dist/r/item.json +3 -1
- package/dist/r/kbd.json +3 -1
- package/dist/r/label.json +3 -1
- package/dist/r/lib.json +10 -0
- package/dist/r/list-row.json +1 -1
- package/dist/r/marker.json +3 -1
- package/dist/r/menubar.json +2 -1
- package/dist/r/message-scroller.json +2 -1
- package/dist/r/message.json +2 -1
- package/dist/r/modal-dialog.json +3 -1
- package/dist/r/model-selector.json +2 -1
- package/dist/r/motion.json +6 -1
- package/dist/r/native-select.json +2 -1
- package/dist/r/navigation-menu.json +3 -2
- package/dist/r/orbit-layout.json +3 -1
- package/dist/r/page.json +3 -1
- package/dist/r/pagination.json +3 -2
- package/dist/r/panel.json +3 -1
- package/dist/r/pixel-pane.json +3 -1
- package/dist/r/pixel-resize-handle.json +1 -1
- package/dist/r/plan.json +2 -1
- package/dist/r/popover.json +5 -1
- package/dist/r/progress.json +2 -1
- package/dist/r/prompt-input.json +2 -1
- package/dist/r/questionnaire.json +2 -1
- package/dist/r/queue.json +2 -1
- package/dist/r/radio-group.json +3 -2
- package/dist/r/reasoning.json +2 -1
- package/dist/r/registry.json +315 -151
- package/dist/r/resizable.json +3 -2
- package/dist/r/scene-controls.json +2 -1
- package/dist/r/scroll-area.json +3 -1
- package/dist/r/select.json +3 -2
- package/dist/r/separator.json +2 -1
- package/dist/r/settings.json +2 -2
- package/dist/r/sheet.json +4 -2
- package/dist/r/shell-rail.json +2 -1
- package/dist/r/shell-top-bar.json +3 -1
- package/dist/r/side-rail.json +1 -1
- package/dist/r/sidebar-nav.json +2 -2
- package/dist/r/skeleton.json +3 -1
- package/dist/r/slider.json +2 -1
- package/dist/r/sources.json +1 -1
- package/dist/r/spinner.json +2 -1
- package/dist/r/split-layout.json +2 -1
- package/dist/r/src/components/composites/about-dialog/about-dialog.tsx +13 -21
- package/dist/r/src/components/composites/accent-picker/accent-picker.tsx +17 -20
- package/dist/r/src/components/composites/accent-picker/custom-color-popover.tsx +61 -53
- package/dist/r/src/components/composites/account-menu/account-menu.tsx +27 -19
- package/dist/r/src/components/composites/action-button/action-button.tsx +75 -52
- package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +7 -8
- package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +53 -47
- package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +11 -8
- package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +45 -28
- package/dist/r/src/components/composites/appearance-editor/appearance-types.ts +1 -1
- package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +22 -13
- package/dist/r/src/components/composites/catalog-browser/catalog-browser-group.tsx +14 -9
- package/dist/r/src/components/composites/catalog-browser/catalog-browser.tsx +36 -28
- package/dist/r/src/components/composites/catalog-browser/catalog-detail.tsx +3 -3
- package/dist/r/src/components/composites/catalog-browser/catalog-types.ts +1 -1
- package/dist/r/src/components/composites/chain-of-thought/chain-of-thought.tsx +11 -6
- package/dist/r/src/components/composites/chat/chat.tsx +12 -14
- package/dist/r/src/components/composites/checkpoint/checkpoint.tsx +22 -27
- package/dist/r/src/components/composites/confirmation/confirmation.tsx +20 -22
- package/dist/r/src/components/composites/context/context.tsx +10 -4
- package/dist/r/src/components/composites/file-tree/file-tree.tsx +23 -24
- package/dist/r/src/components/composites/help-center/help-center.tsx +1 -1
- package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +14 -9
- package/dist/r/src/components/composites/icon-picker/shell-icons.ts +1 -1
- package/dist/r/src/components/composites/inline-citation/inline-citation.tsx +57 -24
- package/dist/r/src/components/composites/list-row/list-row-control.tsx +23 -12
- package/dist/r/src/components/composites/list-row/list-row.tsx +10 -19
- package/dist/r/src/components/composites/message-scroller/message-scroller.tsx +55 -34
- package/dist/r/src/components/composites/model-selector/model-selector.tsx +42 -47
- package/dist/r/src/components/composites/plan/plan.tsx +11 -15
- package/dist/r/src/components/composites/prompt-input/prompt-input.tsx +22 -26
- package/dist/r/src/components/composites/queue/queue.tsx +18 -20
- package/dist/r/src/components/composites/reasoning/reasoning.tsx +19 -23
- package/dist/r/src/components/composites/scene-controls/scene-controls.tsx +4 -3
- package/dist/r/src/components/composites/settings/settings-layout.tsx +10 -8
- package/dist/r/src/components/composites/settings/settings-navigation.tsx +86 -65
- package/dist/r/src/components/composites/settings/settings.tsx +19 -13
- package/dist/r/src/components/composites/sources/sources.tsx +8 -6
- package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +9 -15
- package/dist/r/src/components/composites/stat/stat.tsx +19 -12
- package/dist/r/src/components/composites/subagent/subagent.tsx +8 -5
- package/dist/r/src/components/composites/suggestion/suggestion.tsx +12 -22
- package/dist/r/src/components/composites/task/task.tsx +12 -24
- package/dist/r/src/components/composites/terminal/terminal.tsx +36 -38
- package/dist/r/src/components/composites/test-results/test-results.tsx +59 -64
- package/dist/r/src/components/composites/tool/tool.tsx +9 -6
- package/dist/r/src/components/composites/tree/tree.tsx +88 -52
- package/dist/r/src/components/composites/update-dialog/channel-control.tsx +29 -19
- package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +62 -61
- package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +4 -3
- package/dist/r/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +21 -16
- package/dist/r/src/components/composites/workspace-switcher/workspace-switcher.tsx +4 -4
- package/dist/r/src/components/conversation/busy-send-button.tsx +2 -2
- package/dist/r/src/components/conversation/chat-composer.tsx +2 -2
- package/dist/r/src/components/conversation/composer-menu.tsx +6 -4
- package/dist/r/src/components/conversation/conversation-avatar.tsx +6 -5
- package/dist/r/src/components/conversation/conversation-pane.tsx +4 -10
- package/dist/r/src/components/conversation/conversation-surface.tsx +12 -8
- package/dist/r/src/components/conversation/internal/chat-composer-shell.tsx +27 -29
- package/dist/r/src/components/conversation/message-composer.tsx +14 -9
- package/dist/r/src/components/conversation/message-row.tsx +19 -14
- package/dist/r/src/components/conversation/paste-token-editor.tsx +106 -54
- package/dist/r/src/components/conversation/scroll-follow.ts +125 -112
- package/dist/r/src/components/conversation/thread-panel.tsx +10 -7
- package/dist/r/src/components/conversation/transcript-composition.tsx +14 -16
- package/dist/r/src/components/layout/app-shell/app-shell.tsx +10 -6
- package/dist/r/src/components/layout/app-shell/skip-link.tsx +5 -4
- package/dist/r/src/components/layout/contextual-sidebar/contextual-sidebar.tsx +67 -25
- package/dist/r/src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx +2 -1
- package/dist/r/src/components/layout/floating-preview/floating-preview.tsx +15 -16
- package/dist/r/src/components/layout/orbit-layout/orbit-layout.tsx +10 -15
- package/dist/r/src/components/layout/page/page.tsx +16 -9
- package/dist/r/src/components/layout/panel/panel.tsx +22 -12
- package/dist/r/src/components/layout/pixel-pane/pixel-pane.tsx +7 -4
- package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +2 -2
- package/dist/r/src/components/layout/shell-rail/shell-rail.tsx +11 -7
- package/dist/r/src/components/layout/shell-top-bar/shell-top-bar.tsx +8 -6
- package/dist/r/src/components/layout/side-rail/side-rail-context.ts +3 -1
- package/dist/r/src/components/layout/side-rail/side-rail.tsx +37 -20
- package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +50 -26
- package/dist/r/src/components/layout/split-layout/resize-controller-core-retry.tsx +3 -2
- package/dist/r/src/components/layout/split-layout/resize-controller-core.tsx +3 -2
- package/dist/r/src/components/layout/split-layout/split-layout.tsx +116 -91
- package/dist/r/src/components/layout/status-bar/status-bar.tsx +6 -4
- package/dist/r/src/components/layout/top-bar/top-bar.tsx +19 -12
- package/dist/r/src/components/layout/virtual-window/virtual-window.tsx +4 -10
- package/dist/r/src/components/motion/index.ts +7 -1
- package/dist/r/src/components/motion/motion.tsx +322 -0
- package/dist/r/src/components/motion/presence.tsx +95 -7
- package/dist/r/src/components/theme/appearance-panel.tsx +11 -9
- package/dist/r/src/components/theme/lazy.ts +3 -2
- package/dist/r/src/components/theme/theme-context.ts +6 -4
- package/dist/r/src/components/theme/theme-mode-toggle.tsx +5 -4
- package/dist/r/src/components/theme/theme-picker.tsx +9 -6
- package/dist/r/src/components/theme/theme-provider-value.ts +117 -97
- package/dist/r/src/components/theme/theme-toggle.tsx +5 -4
- package/dist/r/src/components/ui/accordion/accordion.tsx +71 -35
- package/dist/r/src/components/ui/alert/alert.tsx +11 -7
- package/dist/r/src/components/ui/alert-dialog/alert-dialog.tsx +193 -127
- package/dist/r/src/components/ui/annotation-surface/annotation-surface.tsx +15 -37
- package/dist/r/src/components/ui/aspect-ratio/aspect-ratio.tsx +4 -3
- package/dist/r/src/components/ui/attachment/attachment.tsx +10 -6
- package/dist/r/src/components/ui/avatar/avatar.tsx +24 -10
- package/dist/r/src/components/ui/badge/badge.tsx +19 -12
- package/dist/r/src/components/ui/board/board.tsx +55 -48
- package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +18 -11
- package/dist/r/src/components/ui/bubble/bubble.tsx +4 -9
- package/dist/r/src/components/ui/button/button.tsx +42 -32
- package/dist/r/src/components/ui/button-group/button-group.tsx +8 -5
- package/dist/r/src/components/ui/calendar/calendar.tsx +382 -180
- package/dist/r/src/components/ui/callout/callout.tsx +6 -4
- package/dist/r/src/components/ui/card/card.tsx +16 -9
- package/dist/r/src/components/ui/carousel/carousel.tsx +38 -20
- package/dist/r/src/components/ui/chart/chart.tsx +149 -93
- package/dist/r/src/components/ui/checkbox/checkbox.tsx +228 -221
- package/dist/r/src/components/ui/code-block/code-block.tsx +61 -59
- package/dist/r/src/components/ui/collapsible/collapsible.tsx +46 -20
- package/dist/r/src/components/ui/combobox/combobox.tsx +395 -73
- package/dist/r/src/components/ui/combobox/value-combobox.tsx +5 -3
- package/dist/r/src/components/ui/command/command.tsx +416 -175
- package/dist/r/src/components/ui/context-menu/context-menu.tsx +53 -24
- package/dist/r/src/components/ui/detail-panel/detail-panel.tsx +14 -8
- package/dist/r/src/components/ui/dialog/dialog-layer.tsx +331 -240
- package/dist/r/src/components/ui/dialog/dialog.tsx +225 -95
- package/dist/r/src/components/ui/diff-block/diff-block.tsx +4 -9
- package/dist/r/src/components/ui/drawer/drawer.tsx +113 -41
- package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +116 -276
- package/dist/r/src/components/ui/dropdown-menu/menu-parts.tsx +732 -155
- package/dist/r/src/components/ui/empty/empty-state.tsx +9 -7
- package/dist/r/src/components/ui/empty/empty.tsx +14 -8
- package/dist/r/src/components/ui/entity-icon/entity-icon.tsx +20 -17
- package/dist/r/src/components/ui/field/field.tsx +165 -55
- package/dist/r/src/components/ui/field/number-field.tsx +21 -5
- package/dist/r/src/components/ui/hover-card/hover-card.tsx +108 -22
- package/dist/r/src/components/ui/input/input-control.tsx +6 -4
- package/dist/r/src/components/ui/input/input.tsx +7 -5
- package/dist/r/src/components/ui/input-group/input-group.tsx +20 -12
- package/dist/r/src/components/ui/input-group/secret-input-group.tsx +7 -4
- package/dist/r/src/components/ui/input-otp/input-otp.tsx +88 -70
- package/dist/r/src/components/ui/item/item.tsx +15 -9
- package/dist/r/src/components/ui/kbd/kbd.tsx +8 -5
- package/dist/r/src/components/ui/label/label.tsx +7 -6
- package/dist/r/src/components/ui/marker/marker.tsx +7 -4
- package/dist/r/src/components/ui/menubar/menubar.tsx +101 -49
- package/dist/r/src/components/ui/message/message.tsx +24 -38
- package/dist/r/src/components/ui/modal-dialog/modal-dialog.tsx +57 -46
- package/dist/r/src/components/ui/native-select/native-select.tsx +30 -19
- package/dist/r/src/components/ui/navigation-menu/navigation-menu.tsx +221 -127
- package/dist/r/src/components/ui/pagination/pagination.tsx +153 -88
- package/dist/r/src/components/ui/popover/popover.tsx +252 -49
- package/dist/r/src/components/ui/progress/progress.tsx +64 -22
- package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +29 -41
- package/dist/r/src/components/ui/radio-group/radio-group.tsx +159 -54
- package/dist/r/src/components/ui/resizable/index.ts +3 -0
- package/dist/r/src/components/ui/resizable/resizable.tsx +157 -60
- package/dist/r/src/components/ui/scroll-area/scroll-area.tsx +5 -10
- package/dist/r/src/components/ui/select/select.tsx +403 -106
- package/dist/r/src/components/ui/separator/separator.tsx +33 -6
- package/dist/r/src/components/ui/sheet/sheet.tsx +144 -64
- package/dist/r/src/components/ui/skeleton/skeleton.tsx +4 -3
- package/dist/r/src/components/ui/slider/slider.tsx +112 -64
- package/dist/r/src/components/ui/spinner/spinner.tsx +9 -5
- package/dist/r/src/components/ui/status-chip/status-chip.tsx +4 -9
- package/dist/r/src/components/ui/switch/switch.tsx +203 -201
- package/dist/r/src/components/ui/table/table.tsx +20 -11
- package/dist/r/src/components/ui/tabs/tabs.tsx +93 -34
- package/dist/r/src/components/ui/text-link/text-link.tsx +5 -4
- package/dist/r/src/components/ui/textarea/textarea.tsx +8 -5
- package/dist/r/src/components/ui/toast/toast.tsx +192 -83
- package/dist/r/src/components/ui/toggle/toggle.tsx +26 -9
- package/dist/r/src/components/ui/toggle-group/toggle-group.tsx +48 -31
- package/dist/r/src/components/ui/tooltip/deferred-tooltip.tsx +51 -12
- package/dist/r/src/components/ui/tooltip/lazy-tooltip.tsx +2 -2
- package/dist/r/src/components/ui/tooltip/tooltip.tsx +452 -362
- package/dist/r/src/components/ui/trace/trace.tsx +17 -20
- package/dist/r/src/components/ui/typography/typography.tsx +17 -18
- package/dist/r/src/lib/async-action.ts +3 -1
- package/dist/r/src/lib/create-poll.ts +41 -38
- package/dist/r/src/lib/events.ts +1 -1
- package/dist/r/src/lib/fast-icon.ts +9 -13
- package/dist/r/src/lib/form-field.ts +36 -18
- package/dist/r/src/lib/keyed-rows.ts +4 -0
- package/dist/r/src/lib/overlay.ts +44 -5
- package/dist/r/src/lib/refs.ts +21 -0
- package/dist/r/src/lib/resize-separator.ts +4 -3
- package/dist/r/src/lib/slotted.ts +16 -0
- package/dist/r/src/styles/globals.css +7 -0
- package/dist/r/stack-trace.json +2 -1
- package/dist/r/stat.json +2 -1
- package/dist/r/status-bar.json +3 -1
- package/dist/r/status-chip.json +3 -1
- package/dist/r/subagent.json +2 -1
- package/dist/r/suggestion.json +3 -1
- package/dist/r/switch.json +1 -1
- package/dist/r/table.json +3 -1
- package/dist/r/tabs.json +2 -1
- package/dist/r/task.json +2 -1
- package/dist/r/terminal.json +2 -1
- package/dist/r/test-results.json +2 -1
- package/dist/r/text-link.json +3 -1
- package/dist/r/textarea.json +1 -0
- package/dist/r/theming.json +3 -2
- package/dist/r/toast.json +3 -2
- package/dist/r/toggle-group.json +2 -1
- package/dist/r/toggle.json +2 -1
- package/dist/r/tool.json +2 -1
- package/dist/r/tooltip.json +3 -1
- package/dist/r/top-bar.json +2 -1
- package/dist/r/trace.json +2 -1
- package/dist/r/tree.json +2 -1
- package/dist/r/typography.json +1 -1
- package/dist/r/update-dialog.json +2 -1
- package/dist/r/virtual-window.json +3 -1
- package/dist/r/workspace-mark.json +3 -1
- package/dist/r/workspace-switcher.json +2 -1
- package/dist/vite/tailwind-sources.js +2 -2
- package/dist/vite/tailwind-sources.js.map +1 -1
- package/package.json +14 -31
- package/registry.json +315 -151
- package/src/components/composites/about-dialog/about-dialog.tsx +13 -21
- package/src/components/composites/accent-picker/accent-picker.tsx +17 -20
- package/src/components/composites/accent-picker/custom-color-popover.tsx +61 -53
- package/src/components/composites/account-menu/account-menu.tsx +27 -19
- package/src/components/composites/action-button/action-button.tsx +75 -52
- package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +7 -8
- package/src/components/composites/appearance-editor/appearance-choices.tsx +53 -47
- package/src/components/composites/appearance-editor/appearance-editor.tsx +11 -8
- package/src/components/composites/appearance-editor/appearance-rows.tsx +45 -28
- package/src/components/composites/appearance-editor/appearance-types.ts +1 -1
- package/src/components/composites/appearance-editor/font-settings-group.tsx +22 -13
- package/src/components/composites/catalog-browser/catalog-browser-group.tsx +14 -9
- package/src/components/composites/catalog-browser/catalog-browser.tsx +36 -28
- package/src/components/composites/catalog-browser/catalog-detail.tsx +3 -3
- package/src/components/composites/catalog-browser/catalog-types.ts +1 -1
- package/src/components/composites/chain-of-thought/chain-of-thought.tsx +11 -6
- package/src/components/composites/chat/chat.tsx +12 -14
- package/src/components/composites/checkpoint/checkpoint.tsx +22 -27
- package/src/components/composites/confirmation/confirmation.tsx +20 -22
- package/src/components/composites/context/context.tsx +10 -4
- package/src/components/composites/file-tree/file-tree.tsx +23 -24
- package/src/components/composites/help-center/help-center.tsx +1 -1
- package/src/components/composites/icon-picker/icon-picker.tsx +14 -9
- package/src/components/composites/icon-picker/shell-icons.ts +1 -1
- package/src/components/composites/inline-citation/inline-citation.tsx +57 -24
- package/src/components/composites/list-row/list-row-control.tsx +23 -12
- package/src/components/composites/list-row/list-row.tsx +10 -19
- package/src/components/composites/message-scroller/message-scroller.tsx +55 -34
- package/src/components/composites/model-selector/model-selector.tsx +42 -47
- package/src/components/composites/plan/plan.tsx +11 -15
- package/src/components/composites/prompt-input/prompt-input.tsx +22 -26
- package/src/components/composites/queue/queue.tsx +18 -20
- package/src/components/composites/reasoning/reasoning.tsx +19 -23
- package/src/components/composites/scene-controls/scene-controls.tsx +4 -3
- package/src/components/composites/settings/settings-layout.tsx +10 -8
- package/src/components/composites/settings/settings-navigation.tsx +86 -65
- package/src/components/composites/settings/settings.tsx +19 -13
- package/src/components/composites/sources/sources.tsx +8 -6
- package/src/components/composites/stack-trace/stack-trace.tsx +9 -15
- package/src/components/composites/stat/stat.tsx +19 -12
- package/src/components/composites/subagent/subagent.tsx +8 -5
- package/src/components/composites/suggestion/suggestion.tsx +12 -22
- package/src/components/composites/task/task.tsx +12 -24
- package/src/components/composites/terminal/terminal.tsx +36 -38
- package/src/components/composites/test-results/test-results.tsx +59 -64
- package/src/components/composites/tool/tool.tsx +9 -6
- package/src/components/composites/tree/tree.tsx +88 -52
- package/src/components/composites/update-dialog/channel-control.tsx +29 -19
- package/src/components/composites/update-dialog/update-dialog.tsx +62 -61
- package/src/components/composites/workspace-mark/workspace-mark.tsx +4 -3
- package/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +21 -16
- package/src/components/composites/workspace-switcher/workspace-switcher.tsx +4 -4
- package/src/components/conversation/busy-send-button.tsx +2 -2
- package/src/components/conversation/chat-composer.tsx +2 -2
- package/src/components/conversation/composer-menu.tsx +6 -4
- package/src/components/conversation/conversation-avatar.tsx +6 -5
- package/src/components/conversation/conversation-pane.tsx +4 -10
- package/src/components/conversation/conversation-surface.tsx +12 -8
- package/src/components/conversation/internal/chat-composer-shell.tsx +27 -29
- package/src/components/conversation/message-composer.tsx +14 -9
- package/src/components/conversation/message-row.tsx +19 -14
- package/src/components/conversation/paste-token-editor.tsx +106 -54
- package/src/components/conversation/scroll-follow.ts +125 -112
- package/src/components/conversation/thread-panel.tsx +10 -7
- package/src/components/conversation/transcript-composition.tsx +14 -16
- package/src/components/layout/app-shell/app-shell.tsx +10 -6
- package/src/components/layout/app-shell/skip-link.tsx +5 -4
- package/src/components/layout/contextual-sidebar/contextual-sidebar.tsx +67 -25
- package/src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx +2 -1
- package/src/components/layout/floating-preview/floating-preview.tsx +15 -16
- package/src/components/layout/orbit-layout/orbit-layout.tsx +10 -15
- package/src/components/layout/page/page.tsx +16 -9
- package/src/components/layout/panel/panel.tsx +22 -12
- package/src/components/layout/pixel-pane/pixel-pane.tsx +7 -4
- package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +2 -2
- package/src/components/layout/shell-rail/shell-rail.tsx +11 -7
- package/src/components/layout/shell-top-bar/shell-top-bar.tsx +8 -6
- package/src/components/layout/side-rail/side-rail-context.ts +3 -1
- package/src/components/layout/side-rail/side-rail.tsx +37 -20
- package/src/components/layout/sidebar-nav/sidebar-nav.tsx +50 -26
- package/src/components/layout/split-layout/resize-controller-core-retry.tsx +3 -2
- package/src/components/layout/split-layout/resize-controller-core.tsx +3 -2
- package/src/components/layout/split-layout/split-layout.tsx +116 -91
- package/src/components/layout/status-bar/status-bar.tsx +6 -4
- package/src/components/layout/top-bar/top-bar.tsx +19 -12
- package/src/components/layout/virtual-window/virtual-window.tsx +4 -10
- package/src/components/motion/index.ts +7 -1
- package/src/components/motion/motion.tsx +322 -0
- package/src/components/motion/presence.tsx +95 -7
- package/src/components/theme/appearance-panel.tsx +11 -9
- package/src/components/theme/lazy.ts +3 -2
- package/src/components/theme/theme-context.ts +6 -4
- package/src/components/theme/theme-mode-toggle.tsx +5 -4
- package/src/components/theme/theme-picker.tsx +9 -6
- package/src/components/theme/theme-provider-value.ts +117 -97
- package/src/components/theme/theme-toggle.tsx +5 -4
- package/src/components/ui/accordion/accordion.tsx +71 -35
- package/src/components/ui/alert/alert.tsx +11 -7
- package/src/components/ui/alert-dialog/alert-dialog.tsx +193 -127
- package/src/components/ui/annotation-surface/annotation-surface.tsx +15 -37
- package/src/components/ui/aspect-ratio/aspect-ratio.tsx +4 -3
- package/src/components/ui/attachment/attachment.tsx +10 -6
- package/src/components/ui/avatar/avatar.tsx +24 -10
- package/src/components/ui/badge/badge.tsx +19 -12
- package/src/components/ui/board/board.tsx +55 -48
- package/src/components/ui/breadcrumb/breadcrumb.tsx +18 -11
- package/src/components/ui/bubble/bubble.tsx +4 -9
- package/src/components/ui/button/button.tsx +42 -32
- package/src/components/ui/button-group/button-group.tsx +8 -5
- package/src/components/ui/calendar/calendar.tsx +382 -180
- package/src/components/ui/callout/callout.tsx +6 -4
- package/src/components/ui/card/card.tsx +16 -9
- package/src/components/ui/carousel/carousel.tsx +38 -20
- package/src/components/ui/chart/chart.tsx +149 -93
- package/src/components/ui/checkbox/checkbox.tsx +228 -221
- package/src/components/ui/code-block/code-block.tsx +61 -59
- package/src/components/ui/collapsible/collapsible.tsx +46 -20
- package/src/components/ui/combobox/combobox.tsx +395 -73
- package/src/components/ui/combobox/value-combobox.tsx +5 -3
- package/src/components/ui/command/command.tsx +416 -175
- package/src/components/ui/context-menu/context-menu.tsx +53 -24
- package/src/components/ui/detail-panel/detail-panel.tsx +14 -8
- package/src/components/ui/dialog/dialog-layer.tsx +331 -240
- package/src/components/ui/dialog/dialog.tsx +225 -95
- package/src/components/ui/diff-block/diff-block.tsx +4 -9
- package/src/components/ui/drawer/drawer.tsx +113 -41
- package/src/components/ui/dropdown-menu/dropdown-menu.tsx +116 -276
- package/src/components/ui/dropdown-menu/menu-parts.tsx +732 -155
- package/src/components/ui/empty/empty-state.tsx +9 -7
- package/src/components/ui/empty/empty.tsx +14 -8
- package/src/components/ui/entity-icon/entity-icon.tsx +20 -17
- package/src/components/ui/field/field.tsx +165 -55
- package/src/components/ui/field/number-field.tsx +21 -5
- package/src/components/ui/hover-card/hover-card.tsx +108 -22
- package/src/components/ui/input/input-control.tsx +6 -4
- package/src/components/ui/input/input.tsx +7 -5
- package/src/components/ui/input-group/input-group.tsx +20 -12
- package/src/components/ui/input-group/secret-input-group.tsx +7 -4
- package/src/components/ui/input-otp/input-otp.tsx +88 -70
- package/src/components/ui/item/item.tsx +15 -9
- package/src/components/ui/kbd/kbd.tsx +8 -5
- package/src/components/ui/label/label.tsx +7 -6
- package/src/components/ui/marker/marker.tsx +7 -4
- package/src/components/ui/menubar/menubar.tsx +101 -49
- package/src/components/ui/message/message.tsx +24 -38
- package/src/components/ui/modal-dialog/modal-dialog.tsx +57 -46
- package/src/components/ui/native-select/native-select.tsx +30 -19
- package/src/components/ui/navigation-menu/navigation-menu.tsx +221 -127
- package/src/components/ui/pagination/pagination.tsx +153 -88
- package/src/components/ui/popover/popover.tsx +252 -49
- package/src/components/ui/progress/progress.tsx +64 -22
- package/src/components/ui/questionnaire/questionnaire.tsx +29 -41
- package/src/components/ui/radio-group/radio-group.tsx +159 -54
- package/src/components/ui/resizable/index.ts +3 -0
- package/src/components/ui/resizable/resizable.tsx +157 -60
- package/src/components/ui/scroll-area/scroll-area.tsx +5 -10
- package/src/components/ui/select/select.tsx +403 -106
- package/src/components/ui/separator/separator.tsx +33 -6
- package/src/components/ui/sheet/sheet.tsx +144 -64
- package/src/components/ui/skeleton/skeleton.tsx +4 -3
- package/src/components/ui/slider/slider.tsx +112 -64
- package/src/components/ui/spinner/spinner.tsx +9 -5
- package/src/components/ui/status-chip/status-chip.tsx +4 -9
- package/src/components/ui/switch/switch.tsx +203 -201
- package/src/components/ui/table/table.tsx +20 -11
- package/src/components/ui/tabs/tabs.tsx +93 -34
- package/src/components/ui/text-link/text-link.tsx +5 -4
- package/src/components/ui/textarea/textarea.tsx +8 -5
- package/src/components/ui/toast/toast.tsx +192 -83
- package/src/components/ui/toggle/toggle.tsx +26 -9
- package/src/components/ui/toggle-group/toggle-group.tsx +48 -31
- package/src/components/ui/tooltip/deferred-tooltip.tsx +51 -12
- package/src/components/ui/tooltip/lazy-tooltip.tsx +2 -2
- package/src/components/ui/tooltip/tooltip.tsx +452 -362
- package/src/components/ui/trace/trace.tsx +17 -20
- package/src/components/ui/typography/typography.tsx +17 -18
- package/src/lib/async-action.ts +3 -1
- package/src/lib/create-poll.ts +41 -38
- package/src/lib/events.ts +1 -1
- package/src/lib/fast-icon.ts +9 -13
- package/src/lib/form-field.ts +36 -18
- package/src/lib/keyed-rows.ts +4 -0
- package/src/lib/overlay.ts +44 -5
- package/src/lib/refs.ts +21 -0
- package/src/lib/resize-separator.ts +4 -3
- package/src/lib/slotted.ts +16 -0
- package/src/lint/index.ts +20 -5
- package/src/styles/globals.css +7 -0
- package/src/testing/happy-dom-text.ts +30 -0
- package/src/testing/solid-transform.ts +19 -36
- package/src/vite/tailwind-sources.ts +2 -2
|
@@ -1,17 +1,36 @@
|
|
|
1
|
-
import { menuItem
|
|
1
|
+
import { menuItem } from "../../../lib/overlay.js";
|
|
2
2
|
import { useFormFieldControl } from "../../../lib/form-field.js";
|
|
3
3
|
import { cn } from "../../../lib/utils.js";
|
|
4
4
|
import { fastIcon } from "../../../lib/fast-icon.js";
|
|
5
|
-
import { className, createComponent, delegateEvents, effect, insert, memo, mergeProps, template } from "
|
|
6
|
-
import { Check, ChevronDown, X } from "lucide
|
|
7
|
-
import {
|
|
8
|
-
import { Combobox } from "@
|
|
5
|
+
import { className, createComponent, delegateEvents, dynamic, effect, insert, memo, mergeProps, readShallow, ref, spread, template } from "@solidjs/web";
|
|
6
|
+
import { Check, ChevronDown, X } from "@lucide/solid";
|
|
7
|
+
import { For, createContext, createMemo, omit, useContext } from "solid-js";
|
|
8
|
+
import { Combobox, ComboboxContent, ComboboxInput, ComboboxItem, ComboboxList, ComboboxTrigger } from "@ui-sdk/solid/combobox";
|
|
9
9
|
// src/components/ui/combobox/combobox.tsx
|
|
10
|
-
var _tmpl$ =
|
|
10
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
11
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<span aria-hidden=true>`);
|
|
12
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<button>`);
|
|
13
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<span data-slot=combobox-indicator aria-hidden=true class="absolute end-2 flex size-4 items-center justify-center text-primary">`);
|
|
14
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<button type=button aria-label="Clear selection">`);
|
|
11
15
|
var Check$1 = fastIcon(Check);
|
|
12
16
|
var ChevronDown$1 = fastIcon(ChevronDown);
|
|
13
17
|
var X$1 = fastIcon(X);
|
|
14
18
|
/**
|
|
19
|
+
* Calls a caller's `ref`, which Solid 2 hands over as a function or, once
|
|
20
|
+
* merged with another (a tooltip trigger around a menu trigger), an array.
|
|
21
|
+
*/
|
|
22
|
+
function callRef(ref, element) {
|
|
23
|
+
if (typeof ref === "function") ref(element);
|
|
24
|
+
else if (Array.isArray(ref)) for (const each of ref) callRef(each, element);
|
|
25
|
+
}
|
|
26
|
+
var ComboboxScopeContext = createContext(null);
|
|
27
|
+
function read(accessor, option, fallback) {
|
|
28
|
+
if (accessor === void 0) return fallback;
|
|
29
|
+
if (typeof accessor === "function") return accessor(option);
|
|
30
|
+
if (option !== null && typeof option === "object") return option[accessor];
|
|
31
|
+
return fallback;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
15
34
|
* Combobox.
|
|
16
35
|
*
|
|
17
36
|
* A Select whose list is filterable by typing. The difference from Select is
|
|
@@ -20,121 +39,307 @@ var X$1 = fastIcon(X);
|
|
|
20
39
|
* search is the feature; below it, a Select is quieter and a RadioGroup is
|
|
21
40
|
* better still.
|
|
22
41
|
*
|
|
23
|
-
*
|
|
24
|
-
* keyboard selection and the multiple-selection mode, which is the
|
|
25
|
-
* hand-rolled version reliably gets wrong.
|
|
42
|
+
* ui-sdk's Combobox supplies the filtering, the `aria-activedescendant`
|
|
43
|
+
* wiring, the keyboard selection and the multiple-selection mode, which is the
|
|
44
|
+
* part a hand-rolled version reliably gets wrong. This keeps the Kobalte-era
|
|
45
|
+
* collection API on top of it: `options` drawn through `itemComponent`, with
|
|
46
|
+
* the caller's option object as the value.
|
|
26
47
|
*/
|
|
27
48
|
function Combobox$1(props) {
|
|
28
|
-
|
|
49
|
+
const rest = omit(props, "options", "optionValue", "optionTextValue", "optionLabel", "optionDisabled", "optionGroupChildren", "itemComponent", "sectionComponent", "placeholder", "multiple", "value", "defaultValue", "onChange", "inputValue", "defaultInputValue", "onInputChange", "defaultFilter", "allowsEmptyCollection", "open", "defaultOpen", "onOpenChange", "disabled", "required", "readOnly", "name", "validationState", "gutter", "children");
|
|
50
|
+
const keyOf = (option) => String(read(props.optionValue, option, option));
|
|
51
|
+
const textOf = (option) => read(props.optionTextValue, option, keyOf(option));
|
|
52
|
+
const labelOf = (option) => read(props.optionLabel, option, textOf(option));
|
|
53
|
+
const cache = /* @__PURE__ */ new WeakMap();
|
|
54
|
+
const nodeOf = (rawValue, type, index) => {
|
|
55
|
+
const disabled = type === "item" && !!read(props.optionDisabled, rawValue, false);
|
|
56
|
+
const key = type === "item" ? keyOf(rawValue) : `section-${index}`;
|
|
57
|
+
const textValue = type === "item" ? labelOf(rawValue) : "";
|
|
58
|
+
const cached = rawValue !== null && typeof rawValue === "object" ? cache.get(rawValue) : void 0;
|
|
59
|
+
if (cached && cached.type === type && cached.key === key && cached.textValue === textValue && cached.disabled === disabled && cached.index === index) return cached;
|
|
60
|
+
const node = {
|
|
61
|
+
type,
|
|
62
|
+
key,
|
|
63
|
+
rawValue,
|
|
64
|
+
textValue,
|
|
65
|
+
disabled,
|
|
66
|
+
index
|
|
67
|
+
};
|
|
68
|
+
if (rawValue !== null && typeof rawValue === "object") cache.set(rawValue, node);
|
|
69
|
+
return node;
|
|
70
|
+
};
|
|
71
|
+
const nodes = createMemo(() => {
|
|
72
|
+
const children = props.optionGroupChildren;
|
|
73
|
+
const list = [];
|
|
74
|
+
let index = 0;
|
|
75
|
+
for (const entry of props.options) {
|
|
76
|
+
const groupItems = children && entry !== null && typeof entry === "object" ? entry[children] : void 0;
|
|
77
|
+
if (Array.isArray(groupItems)) {
|
|
78
|
+
list.push(nodeOf(entry, "section", index++));
|
|
79
|
+
for (const option of groupItems) list.push(nodeOf(option, "item", index++));
|
|
80
|
+
} else list.push(nodeOf(entry, "item", index++));
|
|
81
|
+
}
|
|
82
|
+
return list;
|
|
83
|
+
});
|
|
84
|
+
const filter = (item, query) => {
|
|
85
|
+
const text = textOf(item.value);
|
|
86
|
+
const mode = props.defaultFilter ?? "startsWith";
|
|
87
|
+
if (typeof mode === "function") return mode(text, query);
|
|
88
|
+
const haystack = text.toLocaleLowerCase();
|
|
89
|
+
const needle = query.toLocaleLowerCase();
|
|
90
|
+
if (mode === "contains") return haystack.includes(needle);
|
|
91
|
+
if (mode === "endsWith") return haystack.endsWith(needle);
|
|
92
|
+
return haystack.startsWith(needle);
|
|
93
|
+
};
|
|
94
|
+
const scope = {
|
|
95
|
+
nodes,
|
|
96
|
+
itemComponent: () => props.itemComponent,
|
|
97
|
+
sectionComponent: () => props.sectionComponent,
|
|
98
|
+
placeholder: () => props.placeholder,
|
|
99
|
+
gutter: () => props.gutter,
|
|
100
|
+
invalid: () => props.validationState === "invalid",
|
|
101
|
+
disabled: () => !!props.disabled,
|
|
102
|
+
control: {}
|
|
103
|
+
};
|
|
104
|
+
var _el$ = _tmpl$();
|
|
105
|
+
spread(_el$, rest, true);
|
|
106
|
+
insert(_el$, createComponent(ComboboxScopeContext, {
|
|
107
|
+
value: scope,
|
|
108
|
+
get children() {
|
|
109
|
+
return createComponent(Combobox, {
|
|
110
|
+
get multiple() {
|
|
111
|
+
return props.multiple;
|
|
112
|
+
},
|
|
113
|
+
get value() {
|
|
114
|
+
return props.value;
|
|
115
|
+
},
|
|
116
|
+
get defaultValue() {
|
|
117
|
+
return props.defaultValue;
|
|
118
|
+
},
|
|
119
|
+
onValueChange: (value) => props.onChange?.(value ?? null),
|
|
120
|
+
get query() {
|
|
121
|
+
return props.inputValue;
|
|
122
|
+
},
|
|
123
|
+
get defaultQuery() {
|
|
124
|
+
return props.defaultInputValue;
|
|
125
|
+
},
|
|
126
|
+
onQueryChange: (query) => props.onInputChange?.(query),
|
|
127
|
+
itemToValue: keyOf,
|
|
128
|
+
itemToLabel: labelOf,
|
|
129
|
+
isItemEqualToValue: (item, value) => keyOf(item) === keyOf(value),
|
|
130
|
+
filter,
|
|
131
|
+
get open() {
|
|
132
|
+
return props.open;
|
|
133
|
+
},
|
|
134
|
+
get defaultOpen() {
|
|
135
|
+
return props.defaultOpen;
|
|
136
|
+
},
|
|
137
|
+
onOpenChange: (open) => props.onOpenChange?.(open),
|
|
138
|
+
get disabled() {
|
|
139
|
+
return props.disabled;
|
|
140
|
+
},
|
|
141
|
+
get required() {
|
|
142
|
+
return props.required;
|
|
143
|
+
},
|
|
144
|
+
get readOnly() {
|
|
145
|
+
return props.readOnly;
|
|
146
|
+
},
|
|
147
|
+
get name() {
|
|
148
|
+
return props.name;
|
|
149
|
+
},
|
|
150
|
+
modal: false,
|
|
151
|
+
get children() {
|
|
152
|
+
return props.children;
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}));
|
|
157
|
+
return _el$;
|
|
29
158
|
}
|
|
159
|
+
/** The input row: the input, its trigger and any clear button, as one bordered control. */
|
|
30
160
|
function ComboboxControl(props) {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
161
|
+
const scope = useContext(ComboboxScopeContext);
|
|
162
|
+
const rest = omit(props, "class", "ref");
|
|
163
|
+
var _el$2 = _tmpl$();
|
|
164
|
+
spread(_el$2, [{
|
|
165
|
+
get "data-invalid"() {
|
|
166
|
+
return scope?.invalid() ? "" : void 0;
|
|
167
|
+
},
|
|
168
|
+
get "data-disabled"() {
|
|
169
|
+
return scope?.disabled() ? "" : void 0;
|
|
170
|
+
},
|
|
171
|
+
get "class"() {
|
|
172
|
+
return cn("border-input bg-transparent flex h-control-md w-full items-center gap-1.5 rounded-md border px-control-sm", "transition-[color,box-shadow,border-color] ease-out", "focus-within:border-ring focus-within:ring-3 focus-within:ring-primary-subtle", "data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", props.class);
|
|
173
|
+
}
|
|
174
|
+
}, rest], false);
|
|
175
|
+
ref(() => {
|
|
176
|
+
return (element) => {
|
|
177
|
+
if (scope) scope.control.current = element;
|
|
178
|
+
callRef(props.ref, element);
|
|
179
|
+
};
|
|
180
|
+
}, _el$2);
|
|
181
|
+
return _el$2;
|
|
35
182
|
}
|
|
36
|
-
function ComboboxInput(props) {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"aria-labelledby",
|
|
42
|
-
"aria-describedby",
|
|
43
|
-
"aria-invalid",
|
|
44
|
-
"aria-errormessage"
|
|
45
|
-
]);
|
|
46
|
-
const field = useFormFieldControl("control", local);
|
|
47
|
-
return createComponent(Combobox.Input, mergeProps({
|
|
183
|
+
function ComboboxInput$1(props) {
|
|
184
|
+
const scope = useContext(ComboboxScopeContext);
|
|
185
|
+
const rest = omit(props, "class", "id", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "aria-errormessage", "placeholder");
|
|
186
|
+
const field = useFormFieldControl("control", props);
|
|
187
|
+
return createComponent(ComboboxInput, mergeProps(rest, {
|
|
48
188
|
get id() {
|
|
49
|
-
return field?.id ??
|
|
189
|
+
return field?.id ?? props.id;
|
|
50
190
|
},
|
|
51
|
-
get
|
|
52
|
-
return
|
|
191
|
+
get placeholder() {
|
|
192
|
+
return props.placeholder ?? scope?.placeholder();
|
|
53
193
|
},
|
|
54
|
-
get
|
|
55
|
-
return
|
|
194
|
+
get "aria-label"() {
|
|
195
|
+
return props["aria-label"];
|
|
56
196
|
},
|
|
57
|
-
get
|
|
58
|
-
return field?.["aria-
|
|
197
|
+
get "aria-labelledby"() {
|
|
198
|
+
return field?.["aria-labelledby"] ?? props["aria-labelledby"];
|
|
59
199
|
},
|
|
60
|
-
get
|
|
61
|
-
return field?.["aria-
|
|
200
|
+
get "aria-describedby"() {
|
|
201
|
+
return field?.["aria-describedby"] ?? props["aria-describedby"];
|
|
62
202
|
},
|
|
63
|
-
get
|
|
64
|
-
return field?.["aria-
|
|
203
|
+
get "aria-invalid"() {
|
|
204
|
+
return field?.["aria-invalid"] ?? props["aria-invalid"] ?? (scope?.invalid() ? "true" : void 0);
|
|
65
205
|
},
|
|
66
|
-
get
|
|
67
|
-
return
|
|
206
|
+
get "aria-errormessage"() {
|
|
207
|
+
return field?.["aria-errormessage"] ?? props["aria-errormessage"];
|
|
208
|
+
},
|
|
209
|
+
get "class"() {
|
|
210
|
+
return cn("h-full flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground", "disabled:cursor-not-allowed", props.class);
|
|
68
211
|
}
|
|
69
|
-
}
|
|
212
|
+
}));
|
|
70
213
|
}
|
|
71
|
-
function ComboboxTrigger(props) {
|
|
72
|
-
const
|
|
73
|
-
return createComponent(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
214
|
+
function ComboboxTrigger$1(props) {
|
|
215
|
+
const rest = omit(props, "class", "children");
|
|
216
|
+
return createComponent(ComboboxTrigger, mergeProps(rest, {
|
|
217
|
+
render: (part, state) => (() => {
|
|
218
|
+
var _el$4 = _tmpl$3();
|
|
219
|
+
spread(_el$4, [part, { get "data-expanded"() {
|
|
220
|
+
return state.open ? "" : void 0;
|
|
221
|
+
} }], false);
|
|
222
|
+
return _el$4;
|
|
223
|
+
})(),
|
|
224
|
+
get "class"() {
|
|
225
|
+
return cn("text-muted-foreground flex shrink-0 items-center justify-center rounded-sm outline-none", "transition-colors ease-out hover:text-foreground", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", "disabled:pointer-events-none disabled:opacity-50", props.class);
|
|
226
|
+
},
|
|
227
|
+
get children() {
|
|
228
|
+
return [memo(() => {
|
|
229
|
+
return props.children;
|
|
230
|
+
}), (() => {
|
|
231
|
+
var _el$3 = _tmpl$2();
|
|
232
|
+
insert(_el$3, createComponent(ChevronDown$1, { class: "size-4" }));
|
|
233
|
+
return _el$3;
|
|
234
|
+
})()];
|
|
235
|
+
}
|
|
236
|
+
}));
|
|
80
237
|
}
|
|
81
|
-
function ComboboxContent(props) {
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return
|
|
88
|
-
|
|
238
|
+
function ComboboxContent$1(props) {
|
|
239
|
+
const scope = useContext(ComboboxScopeContext);
|
|
240
|
+
const rest = omit(props, "class", "children");
|
|
241
|
+
return createComponent(ComboboxContent, mergeProps(rest, {
|
|
242
|
+
anchor: { getBoundingClientRect: () => (scope?.control.current ?? document.body).getBoundingClientRect() },
|
|
243
|
+
get sideOffset() {
|
|
244
|
+
return (scope?.gutter() ?? 8) + 15;
|
|
245
|
+
},
|
|
246
|
+
render: (part, state) => (() => {
|
|
247
|
+
var _el$5 = _tmpl$();
|
|
248
|
+
spread(_el$5, [part, { get "data-expanded"() {
|
|
249
|
+
return state.open ? "" : void 0;
|
|
250
|
+
} }], false);
|
|
251
|
+
return _el$5;
|
|
252
|
+
})(),
|
|
253
|
+
get "class"() {
|
|
254
|
+
return cn("bg-popover text-popover-foreground rounded-xl border border-border shadow-lg", "z-(--z-menu) max-h-72 min-w-(--anchor-width) origin-(--transform-origin) overflow-hidden", "data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95", "data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "data-expanded:duration-150 data-closed:duration-100", props.class);
|
|
255
|
+
},
|
|
256
|
+
get children() {
|
|
257
|
+
return [createComponent(ComboboxList, {
|
|
258
|
+
get "class"() {
|
|
89
259
|
return cn("max-h-72 overflow-y-auto", "p-1");
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
260
|
+
},
|
|
261
|
+
get children() {
|
|
262
|
+
return createComponent(For, {
|
|
263
|
+
get each() {
|
|
264
|
+
return scope?.nodes() ?? [];
|
|
265
|
+
},
|
|
266
|
+
children: (node) => {
|
|
267
|
+
if (node.type === "section") {
|
|
268
|
+
const Section = dynamic(() => scope?.sectionComponent());
|
|
269
|
+
return createComponent(Section, { section: node });
|
|
270
|
+
}
|
|
271
|
+
const Item = dynamic(() => scope?.itemComponent());
|
|
272
|
+
return createComponent(Item, { item: node });
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}), memo(() => {
|
|
277
|
+
return props.children;
|
|
278
|
+
})];
|
|
279
|
+
}
|
|
280
|
+
}));
|
|
99
281
|
}
|
|
100
|
-
function ComboboxItem(props) {
|
|
101
|
-
const
|
|
102
|
-
return createComponent(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
282
|
+
function ComboboxItem$1(props) {
|
|
283
|
+
const rest = omit(props, "class", "children", "item");
|
|
284
|
+
return createComponent(ComboboxItem, mergeProps(rest, {
|
|
285
|
+
get value() {
|
|
286
|
+
return props.item.rawValue;
|
|
287
|
+
},
|
|
288
|
+
get label() {
|
|
289
|
+
return props.item.textValue;
|
|
290
|
+
},
|
|
291
|
+
get disabled() {
|
|
292
|
+
return props.item.disabled;
|
|
293
|
+
},
|
|
294
|
+
get "class"() {
|
|
295
|
+
return cn(menuItem, "pe-8", props.class);
|
|
296
|
+
},
|
|
297
|
+
children: (state) => [(() => {
|
|
298
|
+
var _el$6 = _tmpl$();
|
|
299
|
+
insert(_el$6, () => {
|
|
300
|
+
return props.children;
|
|
301
|
+
});
|
|
302
|
+
return _el$6;
|
|
303
|
+
})(), memo(() => {
|
|
304
|
+
return memo(() => {
|
|
305
|
+
return !!state.selected;
|
|
306
|
+
})() ? (() => {
|
|
307
|
+
var _el$7 = _tmpl$4();
|
|
308
|
+
insert(_el$7, createComponent(Check$1, { class: "size-4" }));
|
|
309
|
+
return _el$7;
|
|
310
|
+
})() : void 0;
|
|
311
|
+
})]
|
|
312
|
+
}));
|
|
115
313
|
}
|
|
314
|
+
/** A group's wrapper inside the list, for a `sectionComponent`. */
|
|
116
315
|
function ComboboxSection(props) {
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
316
|
+
const rest = omit(props, "class");
|
|
317
|
+
var _el$8 = _tmpl$();
|
|
318
|
+
spread(_el$8, [{
|
|
319
|
+
role: "presentation",
|
|
320
|
+
get "class"() {
|
|
321
|
+
return cn("flex flex-col", props.class);
|
|
322
|
+
}
|
|
323
|
+
}, rest], false);
|
|
324
|
+
return _el$8;
|
|
121
325
|
}
|
|
122
326
|
/** The clear affordance for a single-select Combobox with a value. */
|
|
123
327
|
function ComboboxClear(props) {
|
|
124
|
-
return
|
|
125
|
-
|
|
126
|
-
return props.onClear;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
_el
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
328
|
+
return memo(() => {
|
|
329
|
+
return memo(() => {
|
|
330
|
+
return !!props.onClear;
|
|
331
|
+
})() ? (() => {
|
|
332
|
+
var _el$9 = _tmpl$5();
|
|
333
|
+
_el$9._$$click = () => props.onClear();
|
|
334
|
+
insert(_el$9, createComponent(X$1, { class: "size-3.5" }));
|
|
335
|
+
effect(() => readShallow(cn("text-muted-foreground flex size-4 shrink-0 items-center justify-center rounded-sm", "transition-colors ease-out outline-none hover:text-foreground", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", props.class)), (_v$, _$p) => {
|
|
336
|
+
className(_el$9, _v$, _$p);
|
|
337
|
+
});
|
|
338
|
+
return _el$9;
|
|
339
|
+
})() : void 0;
|
|
135
340
|
});
|
|
136
341
|
}
|
|
137
342
|
delegateEvents(["click"]);
|
|
138
|
-
export { Combobox$1 as Combobox, ComboboxClear, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxSection, ComboboxTrigger };
|
|
343
|
+
export { Combobox$1 as Combobox, ComboboxClear, ComboboxContent$1 as ComboboxContent, ComboboxControl, ComboboxInput$1 as ComboboxInput, ComboboxItem$1 as ComboboxItem, ComboboxSection, ComboboxTrigger$1 as ComboboxTrigger };
|
|
139
344
|
|
|
140
345
|
//# sourceMappingURL=combobox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.js","names":["Combobox","KobalteCombobox","Check","LucideCheck","ChevronDown","LucideChevronDown","X","LucideX","Show","splitProps","menuItem","popoverArrow","topLayerProps","useFormFieldControl","cn","fastIcon","props","_$createComponent","ComboboxControl","Control","local","rest","_$mergeProps","class","ComboboxInput","Input","field","id","ComboboxTrigger","Trigger","children","_$memo","Icon","ComboboxContent","Content","Portal","Listbox","Arrow","ComboboxItem","Item","ItemLabel","ItemIndicator","ComboboxSection","Section","ComboboxClear","onClear","when","_el$","_tmpl$","$$click","_$insert","_$effect","_$className","_$delegateEvents"],"sources":["../../../../src/components/ui/combobox/combobox.tsx"],"sourcesContent":["import { Combobox as KobalteCombobox } from '@kobalte/core/combobox'\nimport { Check as LucideCheck, ChevronDown as LucideChevronDown, X as LucideX } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { menuContentPadding, menuItem, popoverArrow, topLayerProps } from '#lib/overlay'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Check = fastIcon(LucideCheck)\nconst ChevronDown = fastIcon(LucideChevronDown)\nconst X = fastIcon(LucideX)\n\n/**\n * Combobox.\n *\n * A Select whose list is filterable by typing. The difference from Select is\n * not cosmetic: a Combobox has a text input, so the user can narrow forty\n * options to one without reading the list. Above roughly ten options the\n * search is the feature; below it, a Select is quieter and a RadioGroup is\n * better still.\n *\n * Kobalte supplies the filtering, the `aria-activedescendant` wiring, the\n * keyboard selection and the multiple-selection mode, which is the part a\n * hand-rolled version reliably gets wrong.\n */\nexport function Combobox<Option, OptGroup = never>(\n props: ComponentProps<typeof KobalteCombobox<Option, OptGroup>>\n) {\n return <KobalteCombobox {...props} />\n}\n\nexport function ComboboxControl(props: ComponentProps<typeof KobalteCombobox.Control>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteCombobox.Control\n class={cn(\n 'border-input bg-transparent flex h-control-md w-full items-center gap-1.5 rounded-md border px-control-sm',\n 'transition-[color,box-shadow,border-color] ease-out',\n 'focus-within:border-ring focus-within:ring-3 focus-within:ring-primary-subtle',\n 'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function ComboboxInput(props: ComponentProps<typeof KobalteCombobox.Input>) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n ])\n const field = useFormFieldControl('control', local)\n\n return (\n <KobalteCombobox.Input\n id={field?.id ?? local.id}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n class={cn(\n 'h-full flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground',\n 'disabled:cursor-not-allowed',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function ComboboxTrigger(props: ComponentProps<typeof KobalteCombobox.Trigger>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteCombobox.Trigger\n class={cn(\n 'text-muted-foreground flex shrink-0 items-center justify-center rounded-sm outline-none',\n 'transition-colors ease-out hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <KobalteCombobox.Icon>\n <ChevronDown class=\"size-4\" />\n </KobalteCombobox.Icon>\n </KobalteCombobox.Trigger>\n )\n}\n\nexport function ComboboxContent(props: ComponentProps<typeof KobalteCombobox.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteCombobox.Portal>\n <KobalteCombobox.Content\n {...topLayerProps}\n class={cn(\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg',\n 'z-(--z-menu) max-h-72 min-w-(--kb-popper-anchor-width) origin-(--kb-combobox-content-transform-origin) overflow-hidden',\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-expanded:duration-150 data-closed:duration-100',\n local.class\n )}\n {...rest}\n >\n <KobalteCombobox.Listbox class={cn('max-h-72 overflow-y-auto', menuContentPadding)} />\n {local.children}\n <KobalteCombobox.Arrow aria-hidden=\"true\" class={popoverArrow} />\n </KobalteCombobox.Content>\n </KobalteCombobox.Portal>\n )\n}\n\nexport function ComboboxItem(props: ComponentProps<typeof KobalteCombobox.Item>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteCombobox.Item class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n <KobalteCombobox.ItemLabel>{local.children}</KobalteCombobox.ItemLabel>\n {/* The indicator reads in the accent, like every other selected state in\n the system. */}\n <KobalteCombobox.ItemIndicator\n data-slot=\"combobox-indicator\"\n class=\"absolute end-2 flex size-4 items-center justify-center text-primary\"\n >\n <Check class=\"size-4\" />\n </KobalteCombobox.ItemIndicator>\n </KobalteCombobox.Item>\n )\n}\n\nexport function ComboboxSection(props: ComponentProps<typeof KobalteCombobox.Section>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteCombobox.Section class={cn('flex flex-col', local.class)} {...rest} />\n}\n\n/** The clear affordance for a single-select Combobox with a value. */\nexport function ComboboxClear(props: { class?: string; onClear: () => void }) {\n return (\n <Show when={props.onClear}>\n <button\n type=\"button\"\n aria-label=\"Clear selection\"\n onClick={() => props.onClear()}\n class={cn(\n 'text-muted-foreground flex size-4 shrink-0 items-center justify-center rounded-sm',\n 'transition-colors ease-out outline-none hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n props.class\n )}\n >\n <X class=\"size-3.5\" />\n </button>\n </Show>\n )\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"combobox.js","names":["<ComboboxScopeContext value={scope}>\n <ComboboxPrimitive<unknown, boolean>\n multiple={props.multiple}\n value={props.value as unknown}\n defaultValue={props.defaultValue as unknown}\n onValueChange={(value: unknown) =>\n (props.onChange as ((value: unknown) => void) | undefined)?.(value ?? null)\n }\n query={props.inputValue}\n defaultQuery={props.defaultInputValue}\n onQueryChange={(query: string) => props.onInputChange?.(query)}\n itemToValue={keyOf}\n itemToLabel={labelOf}\n isItemEqualToValue={(item: unknown, value: unknown) => keyOf(item) === keyOf(value)}\n filter={filter}\n open={props.open}\n defaultOpen={props.defaultOpen}\n onOpenChange={(open: boolean) => props.onOpenChange?.(open)}\n disabled={props.disabled}\n required={props.required}\n readOnly={props.readOnly}\n name={props.name}\n modal={false}\n >\n {props.children}\n </ComboboxPrimitive>\n </ComboboxScopeContext>","value={scope}","<ComboboxPrimitive<unknown, boolean>\n multiple={props.multiple}\n value={props.value as unknown}\n defaultValue={props.defaultValue as unknown}\n onValueChange={(value: unknown) =>\n (props.onChange as ((value: unknown) => void) | undefined)?.(value ?? null)\n }\n query={props.inputValue}\n defaultQuery={props.defaultInputValue}\n onQueryChange={(query: string) => props.onInputChange?.(query)}\n itemToValue={keyOf}\n itemToLabel={labelOf}\n isItemEqualToValue={(item: unknown, value: unknown) => keyOf(item) === keyOf(value)}\n filter={filter}\n open={props.open}\n defaultOpen={props.defaultOpen}\n onOpenChange={(open: boolean) => props.onOpenChange?.(open)}\n disabled={props.disabled}\n required={props.required}\n readOnly={props.readOnly}\n name={props.name}\n modal={false}\n >\n {props.children}\n </ComboboxPrimitive>","onValueChange={(value: unknown) =>\n (props.onChange as ((value: unknown) => void) | undefined)?.(value ?? null)\n }","onQueryChange={(query: string) => props.onInputChange?.(query)}","itemToValue={keyOf}","itemToLabel={labelOf}","isItemEqualToValue={(item: unknown, value: unknown) => keyOf(item) === keyOf(value)}","onOpenChange={(open: boolean) => props.onOpenChange?.(open)}","modal={false}","<div {...rest}>\n <ComboboxScopeContext value={scope}>\n <ComboboxPrimitive<unknown, boolean>\n multiple={props.multiple}\n value={props.value as unknown}\n defaultValue={props.defaultValue as unknown}\n onValueChange={(value: unknown) =>\n (props.onChange as ((value: unknown) => void) | undefined)?.(value ?? null)\n }\n query={props.inputValue}\n defaultQuery={props.defaultInputValue}\n onQueryChange={(query: string) => props.onInputChange?.(query)}\n itemToValue={keyOf}\n itemToLabel={labelOf}\n isItemEqualToValue={(item: unknown, value: unknown) => keyOf(item) === keyOf(value)}\n filter={filter}\n open={props.open}\n defaultOpen={props.defaultOpen}\n onOpenChange={(open: boolean) => props.onOpenChange?.(open)}\n disabled={props.disabled}\n required={props.required}\n readOnly={props.readOnly}\n name={props.name}\n modal={false}\n >\n {props.children}\n </ComboboxPrimitive>\n </ComboboxScopeContext>\n </div>","ref={(element: HTMLDivElement) => {\n if (scope) scope.control.current = element\n callRef(props.ref, element)\n }}","<div\n ref={(element: HTMLDivElement) => {\n if (scope) scope.control.current = element\n callRef(props.ref, element)\n }}\n data-invalid={scope?.invalid() ? '' : undefined}\n data-disabled={scope?.disabled() ? '' : undefined}\n class={cn(\n 'border-input bg-transparent flex h-control-md w-full items-center gap-1.5 rounded-md border px-control-sm',\n 'transition-[color,box-shadow,border-color] ease-out',\n 'focus-within:border-ring focus-within:ring-3 focus-within:ring-primary-subtle',\n 'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n props.class\n )}\n {...rest}\n />","<ComboboxInputPrimitive\n {...(rest as Record<string, unknown>)}\n id={field?.id ?? props.id}\n placeholder={props.placeholder ?? scope?.placeholder()}\n aria-label={props['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? props['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? props['aria-describedby']}\n aria-invalid={\n field?.['aria-invalid'] ?? props['aria-invalid'] ?? (scope?.invalid() ? 'true' : undefined)\n }\n aria-errormessage={field?.['aria-errormessage'] ?? props['aria-errormessage']}\n class={cn(\n 'h-full flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground',\n 'disabled:cursor-not-allowed',\n props.class\n )}\n />","<ComboboxTriggerPrimitive\n {...(rest as Record<string, unknown>)}\n render={(part: Record<string, unknown>, state: { open: boolean }) => (\n <button {...part} data-expanded={state.open ? '' : undefined} />\n )}\n class={cn(\n 'text-muted-foreground flex shrink-0 items-center justify-center rounded-sm outline-none',\n 'transition-colors ease-out hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n props.class\n )}\n >\n {props.children}\n <span aria-hidden=\"true\">\n <ChevronDown class=\"size-4\" />\n </span>\n </ComboboxTriggerPrimitive>","render={(part: Record<string, unknown>, state: { open: boolean }) => (\n <button {...part} data-expanded={state.open ? '' : undefined} />\n )}","props.children","<ChevronDown class=\"size-4\" />","class=\"size-4\"","<ComboboxContentPrimitive\n {...(rest as Record<string, unknown>)}\n // Anchored to the whole control, as Kobalte did, so the list lines up\n // with the bordered row rather than the bare input inside it.\n anchor={{\n getBoundingClientRect: () =>\n (scope?.control.current ?? document.body).getBoundingClientRect(),\n }}\n // Kobalte's listbox popper gap (8 by default) plus half its arrow's box:\n // the Solid 1 content carried a popper arrow, which drew nothing visible\n // but pushed the list 15px further from the control. Kept for parity.\n sideOffset={(scope?.gutter() ?? 8) + 15}\n render={(part: Record<string, unknown>, state: { open: boolean }) => (\n <div {...part} data-expanded={state.open ? '' : undefined} />\n )}\n class={cn(\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg',\n 'z-(--z-menu) max-h-72 min-w-(--anchor-width) origin-(--transform-origin) overflow-hidden',\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-expanded:duration-150 data-closed:duration-100',\n props.class\n )}\n >\n <ComboboxList class={cn('max-h-72 overflow-y-auto', menuContentPadding)}>\n <For each={scope?.nodes() ?? []}>\n {(node) => {\n if (node.type === 'section') {\n const Section = dynamic(() => scope?.sectionComponent())\n return <Section section={node} />\n }\n const Item = dynamic(() => scope?.itemComponent())\n return <Item item={node} />\n }}\n </For>\n </ComboboxList>\n {props.children}\n </ComboboxContentPrimitive>","anchor={{\n getBoundingClientRect: () =>\n (scope?.control.current ?? document.body).getBoundingClientRect(),\n }}","render={(part: Record<string, unknown>, state: { open: boolean }) => (\n <div {...part} data-expanded={state.open ? '' : undefined} />\n )}","<ComboboxList class={cn('max-h-72 overflow-y-auto', menuContentPadding)}>\n <For each={scope?.nodes() ?? []}>\n {(node) => {\n if (node.type === 'section') {\n const Section = dynamic(() => scope?.sectionComponent())\n return <Section section={node} />\n }\n const Item = dynamic(() => scope?.itemComponent())\n return <Item item={node} />\n }}\n </For>\n </ComboboxList>","<For each={scope?.nodes() ?? []}>\n {(node) => {\n if (node.type === 'section') {\n const Section = dynamic(() => scope?.sectionComponent())\n return <Section section={node} />\n }\n const Item = dynamic(() => scope?.itemComponent())\n return <Item item={node} />\n }}\n </For>","<Section section={node} />","section={node}","<Item item={node} />","item={node}","<ComboboxItemPrimitive\n {...(rest as Record<string, unknown>)}\n value={props.item.rawValue}\n label={props.item.textValue}\n disabled={props.item.disabled}\n class={cn(menuItem, 'pe-8', props.class)}\n >\n {(state: { selected: boolean }) => (\n <>\n <div>{props.children}</div>\n {/* The indicator reads in the accent, like every other selected\n state in the system. Drawn from the row's `selected` state. */}\n <Show when={state.selected}>\n <span\n data-slot=\"combobox-indicator\"\n aria-hidden=\"true\"\n class=\"absolute end-2 flex size-4 items-center justify-center text-primary\"\n >\n <Check class=\"size-4\" />\n </span>\n </Show>\n </>\n )}\n </ComboboxItemPrimitive>","<Show when={state.selected}>\n <span\n data-slot=\"combobox-indicator\"\n aria-hidden=\"true\"\n class=\"absolute end-2 flex size-4 items-center justify-center text-primary\"\n >\n <Check class=\"size-4\" />\n </span>\n </Show>","<Check class=\"size-4\" />","role=\"presentation\"","<div role=\"presentation\" class={cn('flex flex-col', props.class)} {...rest} />","<Show when={props.onClear}>\n <button\n type=\"button\"\n aria-label=\"Clear selection\"\n onClick={() => props.onClear()}\n class={cn(\n 'text-muted-foreground flex size-4 shrink-0 items-center justify-center rounded-sm',\n 'transition-colors ease-out outline-none hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n props.class\n )}\n >\n <X class=\"size-3.5\" />\n </button>\n </Show>","<X class=\"size-3.5\" />","class=\"size-3.5\"","Check","LucideCheck","ChevronDown","LucideChevronDown","X","LucideX","Combobox","ComboboxInput","ComboboxTrigger","ComboboxContent","ComboboxItem","_$readShallow"],"sources":["../../../../src/components/ui/combobox/combobox.tsx"],"sourcesContent":["import {\n Combobox as ComboboxPrimitive,\n ComboboxContent as ComboboxContentPrimitive,\n ComboboxInput as ComboboxInputPrimitive,\n ComboboxItem as ComboboxItemPrimitive,\n ComboboxList,\n ComboboxTrigger as ComboboxTriggerPrimitive,\n} from '@ui-sdk/solid/combobox'\nimport { Check as LucideCheck, ChevronDown as LucideChevronDown, X as LucideX } from '@lucide/solid'\nimport { dynamic, type ComponentProps, type JSX } from '@solidjs/web'\nimport { For, Show, createContext, createMemo, omit, useContext, type Component } from 'solid-js'\nimport { menuContentPadding, menuItem } from '#lib/overlay'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Check = fastIcon(LucideCheck)\nconst ChevronDown = fastIcon(LucideChevronDown)\nconst X = fastIcon(LucideX)\n\n/**\n * One entry of the list the root builds from `options`: an option, or the\n * section heading of a group, with the Kobalte-era `CollectionNode` fields a\n * caller's `itemComponent` reads (`rawValue`, `key`, `textValue`).\n */\nexport type ComboboxCollectionNode<T> = {\n type: 'item' | 'section'\n key: string\n rawValue: T\n textValue: string\n disabled: boolean\n index: number\n}\n\ntype Accessor<T, R> = keyof T | ((option: T) => R)\n\ntype Selection<Option, Multiple extends boolean> = Multiple extends true ? Option[] : Option | null\n\nexport type ComboboxProps<Option, OptGroup = never, Multiple extends boolean = false> = Omit<\n ComponentProps<'div'>,\n 'onChange' | 'children'\n> & {\n options: ReadonlyArray<Option | OptGroup>\n /** The option's identity: a field name or a function. Defaults to the option itself. */\n optionValue?: Accessor<Option, string | number>\n /** The text the input filters by. */\n optionTextValue?: Accessor<Option, string>\n /** The text the input shows once the option is chosen. Defaults to `optionTextValue`. */\n optionLabel?: Accessor<Option, string>\n optionDisabled?: Accessor<Option, boolean>\n /** The field of a group that holds its options. */\n optionGroupChildren?: keyof OptGroup\n /** Draws one option; render a `ComboboxItem` with the `item` it receives. */\n itemComponent?: Component<{ item: ComboboxCollectionNode<Option> }>\n /** Draws a group's heading, before its options. */\n sectionComponent?: Component<{ section: ComboboxCollectionNode<OptGroup> }>\n /** The input's placeholder. */\n placeholder?: string\n multiple?: Multiple\n value?: Selection<Option, Multiple>\n defaultValue?: Selection<Option, Multiple>\n /** The chosen option, `null` for none, or the list with `multiple`. */\n onChange?: (value: Selection<Option, Multiple>) => void\n /** The input's text, which filters the list. Pass it to control the text. */\n inputValue?: string\n /** The input's text at first, when uncontrolled. */\n defaultInputValue?: string\n /** Runs as the input's text changes. */\n onInputChange?: (value: string) => void\n /**\n * How typing narrows the list: `startsWith` (the default, as before),\n * `endsWith`, `contains`, or a function of an option's text and the input.\n */\n defaultFilter?:\n | 'startsWith'\n | 'endsWith'\n | 'contains'\n | ((textValue: string, inputValue: string) => boolean)\n /**\n * Kept from the Kobalte-era API. ui-sdk opens the list with no match too,\n * so the content's own message (or a `ComboboxContent` child) shows.\n */\n allowsEmptyCollection?: boolean\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n disabled?: boolean\n required?: boolean\n readOnly?: boolean\n name?: string\n /** `invalid` marks the control and the input. */\n validationState?: 'valid' | 'invalid'\n /** The gap between the control and the list, in pixels. */\n gutter?: number\n children?: JSX.Element\n}\n\ntype ComboboxScope = {\n nodes: () => ComboboxCollectionNode<unknown>[]\n itemComponent: () => Component<{ item: ComboboxCollectionNode<unknown> }> | undefined\n sectionComponent: () => Component<{ section: ComboboxCollectionNode<unknown> }> | undefined\n placeholder: () => string | undefined\n gutter: () => number | undefined\n invalid: () => boolean\n disabled: () => boolean\n /** The control the list is anchored to, the whole input row. */\n control: { current?: HTMLElement }\n}\n\n/**\n * Calls a caller's `ref`, which Solid 2 hands over as a function or, once\n * merged with another (a tooltip trigger around a menu trigger), an array.\n */\nfunction callRef<T>(ref: unknown, element: T): void {\n if (typeof ref === 'function') ref(element)\n else if (Array.isArray(ref)) for (const each of ref) callRef(each, element)\n}\n\nconst ComboboxScopeContext = createContext<ComboboxScope | null>(null)\n\nfunction read<T, R>(accessor: Accessor<T, R> | undefined, option: T, fallback: R): R {\n if (accessor === undefined) return fallback\n if (typeof accessor === 'function') return accessor(option)\n if (option !== null && typeof option === 'object') return option[accessor] as R\n return fallback\n}\n\n/**\n * Combobox.\n *\n * A Select whose list is filterable by typing. The difference from Select is\n * not cosmetic: a Combobox has a text input, so the user can narrow forty\n * options to one without reading the list. Above roughly ten options the\n * search is the feature; below it, a Select is quieter and a RadioGroup is\n * better still.\n *\n * ui-sdk's Combobox supplies the filtering, the `aria-activedescendant`\n * wiring, the keyboard selection and the multiple-selection mode, which is the\n * part a hand-rolled version reliably gets wrong. This keeps the Kobalte-era\n * collection API on top of it: `options` drawn through `itemComponent`, with\n * the caller's option object as the value.\n */\nexport function Combobox<Option, OptGroup = never, Multiple extends boolean = false>(\n props: ComboboxProps<Option, OptGroup, Multiple>\n) {\n const rest = omit(\n props,\n 'options',\n 'optionValue',\n 'optionTextValue',\n 'optionLabel',\n 'optionDisabled',\n 'optionGroupChildren',\n 'itemComponent',\n 'sectionComponent',\n 'placeholder',\n 'multiple',\n 'value',\n 'defaultValue',\n 'onChange',\n 'inputValue',\n 'defaultInputValue',\n 'onInputChange',\n 'defaultFilter',\n 'allowsEmptyCollection',\n 'open',\n 'defaultOpen',\n 'onOpenChange',\n 'disabled',\n 'required',\n 'readOnly',\n 'name',\n 'validationState',\n 'gutter',\n 'children'\n )\n const keyOf = (option: unknown) =>\n String(read(props.optionValue as Accessor<unknown, string | number>, option, option as string))\n const textOf = (option: unknown) =>\n read(props.optionTextValue as Accessor<unknown, string>, option, keyOf(option))\n const labelOf = (option: unknown) =>\n read(props.optionLabel as Accessor<unknown, string>, option, textOf(option))\n\n // One node per option, reused while the option object is, so the `<For>`\n // over them keeps its rows when `options` is replaced by an equal list.\n const cache = new WeakMap<object, ComboboxCollectionNode<unknown>>()\n const nodeOf = (rawValue: unknown, type: 'item' | 'section', index: number) => {\n const disabled =\n type === 'item' && !!read(props.optionDisabled as Accessor<unknown, boolean>, rawValue, false)\n const key = type === 'item' ? keyOf(rawValue) : `section-${index}`\n const textValue = type === 'item' ? labelOf(rawValue) : ''\n const cached =\n rawValue !== null && typeof rawValue === 'object' ? cache.get(rawValue) : undefined\n if (\n cached &&\n cached.type === type &&\n cached.key === key &&\n cached.textValue === textValue &&\n cached.disabled === disabled &&\n cached.index === index\n ) {\n return cached\n }\n const node = { type, key, rawValue, textValue, disabled, index }\n if (rawValue !== null && typeof rawValue === 'object') cache.set(rawValue, node)\n return node\n }\n\n const nodes = createMemo(() => {\n const children = props.optionGroupChildren\n const list: ComboboxCollectionNode<unknown>[] = []\n let index = 0\n for (const entry of props.options) {\n const groupItems =\n children && entry !== null && typeof entry === 'object'\n ? (entry as Record<PropertyKey, unknown>)[children as PropertyKey]\n : undefined\n if (Array.isArray(groupItems)) {\n list.push(nodeOf(entry, 'section', index++))\n for (const option of groupItems) list.push(nodeOf(option, 'item', index++))\n } else {\n list.push(nodeOf(entry, 'item', index++))\n }\n }\n return list\n })\n\n // Kobalte matched `optionTextValue`; ui-sdk matches an item's label, which\n // here is the chosen text, so a function filter reads the option again.\n const filter = (item: { value: unknown }, query: string) => {\n const text = textOf(item.value)\n const mode = props.defaultFilter ?? 'startsWith'\n if (typeof mode === 'function') return mode(text, query)\n const haystack = text.toLocaleLowerCase()\n const needle = query.toLocaleLowerCase()\n if (mode === 'contains') return haystack.includes(needle)\n if (mode === 'endsWith') return haystack.endsWith(needle)\n return haystack.startsWith(needle)\n }\n\n const scope: ComboboxScope = {\n nodes,\n itemComponent: () =>\n props.itemComponent as Component<{ item: ComboboxCollectionNode<unknown> }> | undefined,\n sectionComponent: () =>\n props.sectionComponent as Component<{ section: ComboboxCollectionNode<unknown> }> | undefined,\n placeholder: () => props.placeholder,\n gutter: () => props.gutter,\n invalid: () => props.validationState === 'invalid',\n disabled: () => !!props.disabled,\n control: {},\n }\n\n // Kobalte's root was an element; the wrapper keeps that box and its props.\n return (\n <div {...rest}>\n <ComboboxScopeContext value={scope}>\n <ComboboxPrimitive<unknown, boolean>\n multiple={props.multiple}\n value={props.value as unknown}\n defaultValue={props.defaultValue as unknown}\n onValueChange={(value: unknown) =>\n (props.onChange as ((value: unknown) => void) | undefined)?.(value ?? null)\n }\n query={props.inputValue}\n defaultQuery={props.defaultInputValue}\n onQueryChange={(query: string) => props.onInputChange?.(query)}\n itemToValue={keyOf}\n itemToLabel={labelOf}\n isItemEqualToValue={(item: unknown, value: unknown) => keyOf(item) === keyOf(value)}\n filter={filter}\n open={props.open}\n defaultOpen={props.defaultOpen}\n onOpenChange={(open: boolean) => props.onOpenChange?.(open)}\n disabled={props.disabled}\n required={props.required}\n readOnly={props.readOnly}\n name={props.name}\n modal={false}\n >\n {props.children}\n </ComboboxPrimitive>\n </ComboboxScopeContext>\n </div>\n )\n}\n\n/** The input row: the input, its trigger and any clear button, as one bordered control. */\nexport function ComboboxControl(props: ComponentProps<'div'>) {\n const scope = useContext(ComboboxScopeContext)\n const rest = omit(props, 'class', 'ref')\n\n return (\n <div\n ref={(element: HTMLDivElement) => {\n if (scope) scope.control.current = element\n callRef(props.ref, element)\n }}\n data-invalid={scope?.invalid() ? '' : undefined}\n data-disabled={scope?.disabled() ? '' : undefined}\n class={cn(\n 'border-input bg-transparent flex h-control-md w-full items-center gap-1.5 rounded-md border px-control-sm',\n 'transition-[color,box-shadow,border-color] ease-out',\n 'focus-within:border-ring focus-within:ring-3 focus-within:ring-primary-subtle',\n 'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n props.class\n )}\n {...rest}\n />\n )\n}\n\nexport type ComboboxInputProps = Omit<\n ComponentProps<'input'>,\n 'value' | 'defaultValue' | 'children'\n>\n\nexport function ComboboxInput(props: ComboboxInputProps) {\n const scope = useContext(ComboboxScopeContext)\n const rest = omit(\n props,\n 'class',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n 'placeholder'\n )\n const field = useFormFieldControl('control', props)\n\n return (\n <ComboboxInputPrimitive\n {...(rest as Record<string, unknown>)}\n id={field?.id ?? props.id}\n placeholder={props.placeholder ?? scope?.placeholder()}\n aria-label={props['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? props['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? props['aria-describedby']}\n aria-invalid={\n field?.['aria-invalid'] ?? props['aria-invalid'] ?? (scope?.invalid() ? 'true' : undefined)\n }\n aria-errormessage={field?.['aria-errormessage'] ?? props['aria-errormessage']}\n class={cn(\n 'h-full flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground',\n 'disabled:cursor-not-allowed',\n props.class\n )}\n />\n )\n}\n\nexport function ComboboxTrigger(props: ComponentProps<'button'>) {\n const rest = omit(props, 'class', 'children')\n\n return (\n <ComboboxTriggerPrimitive\n {...(rest as Record<string, unknown>)}\n render={(part: Record<string, unknown>, state: { open: boolean }) => (\n <button {...part} data-expanded={state.open ? '' : undefined} />\n )}\n class={cn(\n 'text-muted-foreground flex shrink-0 items-center justify-center rounded-sm outline-none',\n 'transition-colors ease-out hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n props.class\n )}\n >\n {props.children}\n <span aria-hidden=\"true\">\n <ChevronDown class=\"size-4\" />\n </span>\n </ComboboxTriggerPrimitive>\n )\n}\n\nexport type ComboboxContentProps = Omit<ComponentProps<'div'>, 'children'> & {\n /** Shown under the list, such as an empty-state message. */\n children?: JSX.Element\n}\n\nexport function ComboboxContent(props: ComboboxContentProps) {\n const scope = useContext(ComboboxScopeContext)\n const rest = omit(props, 'class', 'children')\n\n return (\n <ComboboxContentPrimitive\n {...(rest as Record<string, unknown>)}\n // Anchored to the whole control, as Kobalte did, so the list lines up\n // with the bordered row rather than the bare input inside it.\n anchor={{\n getBoundingClientRect: () =>\n (scope?.control.current ?? document.body).getBoundingClientRect(),\n }}\n // Kobalte's listbox popper gap (8 by default) plus half its arrow's box:\n // the Solid 1 content carried a popper arrow, which drew nothing visible\n // but pushed the list 15px further from the control. Kept for parity.\n sideOffset={(scope?.gutter() ?? 8) + 15}\n render={(part: Record<string, unknown>, state: { open: boolean }) => (\n <div {...part} data-expanded={state.open ? '' : undefined} />\n )}\n class={cn(\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg',\n 'z-(--z-menu) max-h-72 min-w-(--anchor-width) origin-(--transform-origin) overflow-hidden',\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-expanded:duration-150 data-closed:duration-100',\n props.class\n )}\n >\n <ComboboxList class={cn('max-h-72 overflow-y-auto', menuContentPadding)}>\n <For each={scope?.nodes() ?? []}>\n {(node) => {\n if (node.type === 'section') {\n const Section = dynamic(() => scope?.sectionComponent())\n return <Section section={node} />\n }\n const Item = dynamic(() => scope?.itemComponent())\n return <Item item={node} />\n }}\n </For>\n </ComboboxList>\n {props.children}\n </ComboboxContentPrimitive>\n )\n}\n\nexport type ComboboxItemProps = Omit<ComponentProps<'div'>, 'onSelect' | 'onChange'> & {\n /** The node the root's `itemComponent` received. */\n item: ComboboxCollectionNode<any>\n}\n\nexport function ComboboxItem(props: ComboboxItemProps) {\n const rest = omit(props, 'class', 'children', 'item')\n\n return (\n <ComboboxItemPrimitive\n {...(rest as Record<string, unknown>)}\n value={props.item.rawValue}\n label={props.item.textValue}\n disabled={props.item.disabled}\n class={cn(menuItem, 'pe-8', props.class)}\n >\n {(state: { selected: boolean }) => (\n <>\n <div>{props.children}</div>\n {/* The indicator reads in the accent, like every other selected\n state in the system. Drawn from the row's `selected` state. */}\n <Show when={state.selected}>\n <span\n data-slot=\"combobox-indicator\"\n aria-hidden=\"true\"\n class=\"absolute end-2 flex size-4 items-center justify-center text-primary\"\n >\n <Check class=\"size-4\" />\n </span>\n </Show>\n </>\n )}\n </ComboboxItemPrimitive>\n )\n}\n\n/** A group's wrapper inside the list, for a `sectionComponent`. */\nexport function ComboboxSection(props: ComponentProps<'div'>) {\n const rest = omit(props, 'class')\n return <div role=\"presentation\" class={cn('flex flex-col', props.class)} {...rest} />\n}\n\n/** The clear affordance for a single-select Combobox with a value. */\nexport function ComboboxClear(props: { class?: string; onClear: () => void }) {\n return (\n <Show when={props.onClear}>\n <button\n type=\"button\"\n aria-label=\"Clear selection\"\n onClick={() => props.onClear()}\n class={cn(\n 'text-muted-foreground flex size-4 shrink-0 items-center justify-center rounded-sm',\n 'transition-colors ease-out outline-none hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n props.class\n )}\n >\n <X class=\"size-3.5\" />\n </button>\n </Show>\n )\n}\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value-combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/combobox/value-combobox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"value-combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/combobox/value-combobox.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,GAAG,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EAA6B,aAAa,EAAgB,MAAM,YAAY,CAAA;AAEnF,MAAM,MAAM,mBAAmB,GAC3B;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7D;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAA;AAE5D,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAAE,OAAO,CAAC,GAAG;IACrF,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,mBAAmB,EAAE,CAAA;IAC9B,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACvC,CAAA;AAED,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,eAoBtD"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { Combobox, ComboboxContent, ComboboxInput, ComboboxItem } from "./combobox.js";
|
|
2
|
-
import { createComponent } from "
|
|
3
|
-
import {
|
|
2
|
+
import { createComponent } from "@solidjs/web";
|
|
3
|
+
import { omit } from "solid-js";
|
|
4
4
|
// src/components/ui/combobox/value-combobox.tsx
|
|
5
5
|
/** A single-choice combobox for a controlled string value and labelled choices. */
|
|
6
6
|
function ValueCombobox(props) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
"choices",
|
|
10
|
-
"onValueChange"
|
|
11
|
-
]);
|
|
7
|
+
const local = props;
|
|
8
|
+
const rest = omit(props, "value", "choices", "onValueChange");
|
|
12
9
|
return createComponent(Combobox, {
|
|
13
10
|
get options() {
|
|
14
11
|
return local.choices;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value-combobox.js","names":["
|
|
1
|
+
{"version":3,"file":"value-combobox.js","names":["<Combobox<ValueComboboxChoice>\n options={local.choices}\n optionValue=\"value\"\n optionTextValue={(choice) => choice.textValue ?? textFromLabel(choice.label)}\n optionLabel={(choice) => choice.textValue ?? textFromLabel(choice.label)}\n value={local.choices.find((choice) => String(choice.value) === local.value) ?? null}\n onChange={(option) => option && local.onValueChange(String(option.value))}\n itemComponent={(itemProps) => (\n <ComboboxItem item={itemProps.item}>{itemProps.item.rawValue.label}</ComboboxItem>\n )}\n >\n <ComboboxInput {...rest} />\n <ComboboxContent />\n </Combobox>","optionValue=\"value\"","optionTextValue={(choice) => choice.textValue ?? textFromLabel(choice.label)}","optionLabel={(choice) => choice.textValue ?? textFromLabel(choice.label)}","onChange={(option) => option && local.onValueChange(String(option.value))}","itemComponent={(itemProps) => (\n <ComboboxItem item={itemProps.item}>{itemProps.item.rawValue.label}</ComboboxItem>\n )}","<ComboboxItem item={itemProps.item}>{itemProps.item.rawValue.label}</ComboboxItem>","<ComboboxInput {...rest} />","<ComboboxContent />"],"sources":["../../../../src/components/ui/combobox/value-combobox.tsx"],"sourcesContent":["import { omit } from 'solid-js'\nimport { type ComponentProps, type JSX } from '@solidjs/web'\nimport { Combobox, ComboboxContent, ComboboxInput, ComboboxItem } from './combobox'\n\nexport type ValueComboboxChoice =\n | { value: string; label: string | number; textValue?: string }\n | { value: string; label: JSX.Element; textValue: string }\n\nexport type ValueComboboxProps = Omit<ComponentProps<typeof ComboboxInput>, 'value'> & {\n value: string\n choices: ValueComboboxChoice[]\n onValueChange: (value: string) => void\n}\n\n/** A single-choice combobox for a controlled string value and labelled choices. */\nexport function ValueCombobox(props: ValueComboboxProps) {\n const local = props\n const rest = omit(props, 'value', 'choices', 'onValueChange')\n\n return (\n <Combobox<ValueComboboxChoice>\n options={local.choices}\n optionValue=\"value\"\n optionTextValue={(choice) => choice.textValue ?? textFromLabel(choice.label)}\n optionLabel={(choice) => choice.textValue ?? textFromLabel(choice.label)}\n value={local.choices.find((choice) => String(choice.value) === local.value) ?? null}\n onChange={(option) => option && local.onValueChange(String(option.value))}\n itemComponent={(itemProps) => (\n <ComboboxItem item={itemProps.item}>{itemProps.item.rawValue.label}</ComboboxItem>\n )}\n >\n <ComboboxInput {...rest} />\n <ComboboxContent />\n </Combobox>\n )\n}\n\nfunction textFromLabel(label: JSX.Element) {\n return typeof label === 'string' || typeof label === 'number' ? String(label) : ''\n}\n"],"mappings":";;;;;AAeA,SAAgB,cAAc,OAA2B;CACvD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,WAAW,eAAe;CAE5D,OACEA,gBAAAA,UAAAA;EACE,IAAA,UAAA;GAAS,OAAA,MAAM;EAAO;EACtBC,aAAY;EACZC,kBAAkB,WAAW,OAAO,aAAa,cAAc,OAAO,KAAK;EAC3EC,cAAc,WAAW,OAAO,aAAa,cAAc,OAAO,KAAK;EACvE,IAAA,QAAA;GAAO,OAAA,MAAM,QAAQ,MAAM,WAAW,OAAO,OAAO,KAAK,MAAM,MAAM,KAAK,KAAK;EAAI;EACnFC,WAAW,WAAW,UAAU,MAAM,cAAc,OAAO,OAAO,KAAK,CAAC;EACxEC,gBAAgB,cACdC,gBAAAA,cAAAA;GAAc,IAAA,OAAA;IAAM,OAAA,UAAU;GAAI;GAAlC,IAAA,WAAA;IAAqC,OAAA,UAAU,KAAK,SAAS;GAAoB;;EARrF,IAAA,WAAA;GAUC,OAAA,CACCC,gBAAAA,eAAmB,IAAO,GAC1BC,gBAAAA,iBAAAA,CAAkB,CAAA,CADnB;EAES;;AAEd;AAEA,SAAS,cAAc,OAAoB;CACzC,OAAO,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI;AAClF"}
|