@ctrl-ui/react 0.8.2 → 0.8.5
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 +32 -23
- package/dist/action-bar.d.ts +11 -12
- package/dist/activity.d.ts +24 -25
- package/dist/audio-recorder.d.ts +16 -16
- package/dist/audio-visualizer.d.ts +3 -4
- package/dist/audio-visualizer.js +1 -1
- package/dist/blocks/chat.d.ts +3 -4
- package/dist/blocks/chat.js +6 -3
- package/dist/blocks/coding-agent.d.ts +11 -12
- package/dist/blocks/coding-agent.js +10 -9
- package/dist/blocks/file-explorer-data.d.ts +11 -12
- package/dist/blocks/file-explorer.d.ts +3 -3
- package/dist/blocks/settings-data.d.ts +8 -9
- package/dist/blocks/settings.d.ts +4 -4
- package/dist/blocks/theme-toggle.d.ts +11 -12
- package/dist/blocks/theme-toggle.js +14 -4
- package/dist/chat-composer-attachment.d.ts +20 -21
- package/dist/chat-composer-attachment.js +24 -20
- package/dist/chat-composer-editor/extensions/mention.d.ts +5 -6
- package/dist/chat-composer-editor/extensions/mention.js +4 -0
- package/dist/chat-composer-editor/ghost.d.ts +3 -4
- package/dist/chat-composer-editor/schema.d.ts +2 -3
- package/dist/chat-composer-editor/serialize.d.ts +3 -4
- package/dist/chat-composer-editor/types.d.ts +5 -6
- package/dist/chat-composer-editor.d.ts +2 -3
- package/dist/chat-composer-editor.js +18 -4
- package/dist/chat-composer.d.ts +17 -18
- package/dist/chat-composer.js +14 -8
- package/dist/chat-layout.d.ts +17 -21
- package/dist/chat-layout.js +72 -86
- package/dist/chat-message.d.ts +19 -15
- package/dist/chat-message.js +19 -2
- package/dist/context-model.d.ts +7 -8
- package/dist/context.d.ts +21 -22
- package/dist/context.js +0 -2
- package/dist/control-props.d.ts +10 -11
- package/dist/control-variants.d.ts +6 -7
- package/dist/dynamic-notification-glass.d.ts +3 -4
- package/dist/dynamic-notification-liquid.d.ts +3 -4
- package/dist/dynamic-notification-siri-wave.d.ts +2 -3
- package/dist/dynamic-notification.d.ts +28 -29
- package/dist/email/email-brand.d.ts +60 -0
- package/dist/email/email-brand.js +101 -0
- package/dist/email/email-code.d.ts +18 -0
- package/dist/email/email-code.js +172 -0
- package/dist/email/email-footer.d.ts +63 -0
- package/dist/email/email-footer.js +98 -0
- package/dist/email/email.d.ts +62 -14
- package/dist/email/email.js +155 -24
- package/dist/email/length.d.ts +2 -3
- package/dist/email/templates.d.ts +56 -12
- package/dist/email/templates.js +314 -116
- package/dist/email/theme.d.ts +15 -8
- package/dist/email/theme.js +30 -8
- package/dist/environment-variables.d.ts +35 -36
- package/dist/extensions/create-track-highlight.d.ts +3 -4
- package/dist/extensions/supports-anchor-transitions.d.ts +2 -3
- package/dist/extensions/track-highlight.d.ts +3 -4
- package/dist/hooks/use-audio-recorder.d.ts +14 -15
- package/dist/hooks/use-chat-composer.d.ts +5 -6
- package/dist/hooks/use-chat-message.d.ts +8 -8
- package/dist/hooks/use-chat-message.js +1 -0
- package/dist/hooks/use-chat-thread-scroll.d.ts +8 -0
- package/dist/hooks/use-chat-thread-scroll.js +66 -0
- package/dist/hooks/use-color-area.d.ts +5 -6
- package/dist/hooks/use-copy-to-clipboard.d.ts +7 -8
- package/dist/hooks/use-dropzone.d.ts +11 -12
- package/dist/hooks/use-dynamic-notification.d.ts +6 -7
- package/dist/hooks/use-environment-variables.d.ts +9 -10
- package/dist/hooks/use-keyboard-navigation.d.ts +3 -0
- package/dist/hooks/use-keyboard-navigation.js +22 -0
- package/dist/hooks/use-mobile.d.ts +2 -3
- package/dist/hooks/use-textarea-trigger-menu.d.ts +2 -3
- package/dist/hooks/use-trigger-menu.d.ts +7 -8
- package/dist/hooks/use-user-ask.d.ts +11 -10
- package/dist/hooks/use-user-ask.js +56 -17
- package/dist/inline-attachment.d.ts +16 -17
- package/dist/inline-attachment.js +1 -1
- package/dist/inline-citation.d.ts +22 -23
- package/dist/knob-contracts/accordion-knobs.d.ts +3 -4
- package/dist/knob-contracts/accordion-knobs.js +1 -0
- package/dist/knob-contracts/action-bar-knobs.d.ts +3 -4
- package/dist/knob-contracts/action-bar-knobs.js +1 -1
- package/dist/knob-contracts/activity-knobs.d.ts +3 -4
- package/dist/knob-contracts/activity-knobs.js +2 -1
- package/dist/knob-contracts/alert-knobs.d.ts +3 -4
- package/dist/knob-contracts/alert-knobs.js +12 -1
- package/dist/knob-contracts/audio-recorder-knobs.d.ts +3 -4
- package/dist/knob-contracts/audio-visualizer-knobs.d.ts +3 -4
- package/dist/knob-contracts/audio-visualizer-knobs.js +1 -0
- package/dist/knob-contracts/avatar-knobs.d.ts +3 -4
- package/dist/knob-contracts/avatar-knobs.js +2 -1
- package/dist/knob-contracts/badge-knobs.d.ts +3 -4
- package/dist/knob-contracts/button-group-knobs.d.ts +3 -4
- package/dist/knob-contracts/button-knobs.d.ts +3 -4
- package/dist/knob-contracts/button-knobs.js +1 -0
- package/dist/knob-contracts/calendar-knobs.d.ts +3 -4
- package/dist/knob-contracts/card-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-attachment-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-attachment-knobs.js +5 -1
- package/dist/knob-contracts/chat-composer-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-knobs.js +2 -0
- package/dist/knob-contracts/chat-layout-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-layout-knobs.js +2 -2
- package/dist/knob-contracts/chat-message-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-message-knobs.js +3 -1
- package/dist/knob-contracts/choice-knobs.d.ts +3 -4
- package/dist/knob-contracts/choice-knobs.js +2 -1
- package/dist/knob-contracts/code-diff-knobs.d.ts +3 -4
- package/dist/knob-contracts/code-diff-knobs.js +1 -0
- package/dist/knob-contracts/code-knobs.d.ts +3 -4
- package/dist/knob-contracts/code-knobs.js +3 -1
- package/dist/knob-contracts/collapsible-knobs.d.ts +3 -4
- package/dist/knob-contracts/color-picker-knobs.d.ts +3 -4
- package/dist/knob-contracts/context-knobs.d.ts +3 -4
- package/dist/knob-contracts/context-knobs.js +3 -0
- package/dist/knob-contracts/dockable-panel-knobs.d.ts +3 -4
- package/dist/knob-contracts/dockable-panel-knobs.js +1 -0
- package/dist/knob-contracts/dropzone-knobs.d.ts +3 -4
- package/dist/knob-contracts/dropzone-knobs.js +1 -0
- package/dist/knob-contracts/dynamic-notification-knobs.d.ts +3 -4
- package/dist/knob-contracts/empty-knobs.d.ts +3 -4
- package/dist/knob-contracts/empty-knobs.js +14 -1
- package/dist/knob-contracts/environment-variables-knobs.d.ts +3 -4
- package/dist/knob-contracts/environment-variables-knobs.js +2 -1
- package/dist/knob-contracts/field-knobs.d.ts +3 -4
- package/dist/knob-contracts/gradient-editor-knobs.d.ts +3 -4
- package/dist/knob-contracts/gradient-editor-knobs.js +3 -1
- package/dist/knob-contracts/infinite-canvas-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-attachment-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-attachment-knobs.js +6 -1
- package/dist/knob-contracts/inline-citation-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-citation-knobs.js +4 -1
- package/dist/knob-contracts/item-knobs.d.ts +3 -4
- package/dist/knob-contracts/kbd-knobs.d.ts +3 -4
- package/dist/knob-contracts/markdown-block-knobs.d.ts +3 -4
- package/dist/knob-contracts/markdown-block-knobs.js +2 -0
- package/dist/knob-contracts/markdown-knobs.d.ts +3 -4
- package/dist/knob-contracts/markdown-knobs.js +1 -0
- package/dist/knob-contracts/morphing-panel-knobs.d.ts +3 -4
- package/dist/knob-contracts/page-layout-knobs.d.ts +4 -0
- package/dist/knob-contracts/page-layout-knobs.js +15 -0
- package/dist/knob-contracts/pagination-knobs.d.ts +3 -4
- package/dist/knob-contracts/phone-input-knobs.d.ts +3 -4
- package/dist/knob-contracts/phone-input-knobs.js +1 -0
- package/dist/knob-contracts/popup-knobs.d.ts +3 -4
- package/dist/knob-contracts/progressive-blur-knobs.d.ts +3 -4
- package/dist/knob-contracts/progressive-blur-knobs.js +1 -0
- package/dist/knob-contracts/range-knobs.d.ts +3 -4
- package/dist/knob-contracts/resizable-knobs.d.ts +3 -4
- package/dist/knob-contracts/resizable-knobs.js +1 -0
- package/dist/knob-contracts/rich-tooltip-knobs.d.ts +3 -4
- package/dist/knob-contracts/scroll-area-knobs.d.ts +3 -4
- package/dist/knob-contracts/separator-knobs.d.ts +3 -4
- package/dist/knob-contracts/sidebar-knobs.d.ts +3 -4
- package/dist/knob-contracts/sidebar-knobs.js +1 -0
- package/dist/knob-contracts/skeleton-knobs.d.ts +3 -4
- package/dist/knob-contracts/skeleton-knobs.js +9 -1
- package/dist/knob-contracts/source-badge-knobs.d.ts +3 -4
- package/dist/knob-contracts/spinner-knobs.d.ts +3 -4
- package/dist/knob-contracts/stepper-knobs.d.ts +3 -4
- package/dist/knob-contracts/stepper-knobs.js +1 -0
- package/dist/knob-contracts/switch-knobs.d.ts +3 -4
- package/dist/knob-contracts/switch-knobs.js +7 -1
- package/dist/knob-contracts/table-knobs.d.ts +3 -4
- package/dist/knob-contracts/table-of-contents-knobs.d.ts +3 -4
- package/dist/knob-contracts/table-of-contents-knobs.js +25 -0
- package/dist/knob-contracts/tabs-knobs.d.ts +3 -4
- package/dist/knob-contracts/tabs-knobs.js +2 -1
- package/dist/knob-contracts/task-list-knobs.d.ts +3 -4
- package/dist/knob-contracts/task-list-knobs.js +5 -0
- package/dist/knob-contracts/thread-rail-knobs.d.ts +3 -4
- package/dist/knob-contracts/timeline-knobs.d.ts +3 -4
- package/dist/knob-contracts/toolbar-knobs.d.ts +3 -4
- package/dist/knob-contracts/toolbar-knobs.js +1 -0
- package/dist/knob-contracts/track-highlight-knobs.d.ts +3 -4
- package/dist/knob-contracts/transcript-divider-knobs.d.ts +3 -4
- package/dist/knob-contracts/tree-knobs.d.ts +3 -4
- package/dist/knob-contracts/user-ask-knobs.d.ts +3 -4
- package/dist/knob-contracts/user-ask-knobs.js +5 -0
- package/dist/lib/cn.d.ts +2 -3
- package/dist/lib/code-tokens.d.ts +12 -13
- package/dist/lib/color.d.ts +26 -27
- package/dist/lib/contrast.d.ts +12 -13
- package/dist/lib/diff.d.ts +14 -15
- package/dist/lib/dropzone-validation.d.ts +25 -26
- package/dist/lib/env-file.d.ts +12 -13
- package/dist/lib/format-audio-recorder-duration.d.ts +2 -3
- package/dist/lib/liquid-glass-optics.d.ts +2 -3
- package/dist/lib/phone-input-format.d.ts +3 -4
- package/dist/lib/phone-number.d.ts +8 -9
- package/dist/lib/trigger-detect.d.ts +4 -5
- package/dist/markdown-block.d.ts +11 -12
- package/dist/markdown-block.js +1 -1
- package/dist/scripts/contrast-eval.d.ts +16 -17
- package/dist/scripts/contrast-eval.js +13 -7
- package/dist/skin-provider.d.ts +14 -0
- package/dist/skin-provider.js +21 -0
- package/dist/skin.d.ts +14 -33
- package/dist/skin.js +3 -46
- package/dist/source-badge.d.ts +7 -8
- package/dist/styles/index.css +3 -5
- package/dist/styles/recipes/accordion.css +8 -2
- package/dist/styles/recipes/action-bar.css +40 -5
- package/dist/styles/recipes/activity.css +36 -3
- package/dist/styles/recipes/alert.css +97 -16
- package/dist/styles/recipes/audio-visualizer.css +8 -1
- package/dist/styles/recipes/avatar.css +17 -1
- package/dist/styles/recipes/badge.css +0 -1
- package/dist/styles/recipes/button-group.css +8 -0
- package/dist/styles/recipes/button.css +49 -8
- package/dist/styles/recipes/calendar.css +21 -6
- package/dist/styles/recipes/card.css +2 -0
- package/dist/styles/recipes/chat-composer-attachment.css +83 -54
- package/dist/styles/recipes/chat-composer.css +41 -22
- package/dist/styles/recipes/chat-layout.css +37 -54
- package/dist/styles/recipes/chat-message.css +78 -5
- package/dist/styles/recipes/choice.css +21 -2
- package/dist/styles/recipes/code-diff.css +9 -1
- package/dist/styles/recipes/code.css +64 -17
- package/dist/styles/recipes/collapsible.css +0 -3
- package/dist/styles/recipes/color-picker-details.css +1 -2
- package/dist/styles/recipes/color-picker-values.css +0 -4
- package/dist/styles/recipes/context.css +30 -18
- package/dist/styles/recipes/dockable-panel.css +8 -1
- package/dist/styles/recipes/dropzone.css +9 -2
- package/dist/styles/recipes/dynamic-notification-input.css +6 -0
- package/dist/styles/recipes/dynamic-notification.css +1 -0
- package/dist/styles/recipes/empty.css +118 -17
- package/dist/styles/recipes/environment-variables.css +9 -1
- package/dist/styles/recipes/field-parts.css +3 -6
- package/dist/styles/recipes/field.css +15 -5
- package/dist/styles/recipes/gradient-editor.css +33 -5
- package/dist/styles/recipes/inline-attachment.css +68 -20
- package/dist/styles/recipes/inline-citation.css +52 -10
- package/dist/styles/recipes/item.css +4 -2
- package/dist/styles/recipes/kbd.css +8 -0
- package/dist/styles/recipes/markdown-block.css +17 -2
- package/dist/styles/recipes/markdown.css +19 -0
- package/dist/styles/recipes/morphing-panel.css +1 -1
- package/dist/styles/recipes/page-layout.css +203 -0
- package/dist/styles/recipes/pagination.css +16 -4
- package/dist/styles/recipes/phone-input.css +8 -4
- package/dist/styles/recipes/popup-drawer.css +3 -1
- package/dist/styles/recipes/popup-lists.css +11 -0
- package/dist/styles/recipes/popup-toast.css +3 -29
- package/dist/styles/recipes/popup.css +10 -14
- package/dist/styles/recipes/progressive-blur.css +28 -7
- package/dist/styles/recipes/range.css +74 -3
- package/dist/styles/recipes/resizable.css +8 -10
- package/dist/styles/recipes/rich-tooltip.css +1 -4
- package/dist/styles/recipes/scroll-area.css +8 -2
- package/dist/styles/recipes/sidebar-menu.css +0 -6
- package/dist/styles/recipes/sidebar.css +56 -17
- package/dist/styles/recipes/skeleton.css +85 -3
- package/dist/styles/recipes/source-badge.css +20 -3
- package/dist/styles/recipes/stepper.css +8 -1
- package/dist/styles/recipes/switch.css +89 -17
- package/dist/styles/recipes/table-of-contents.css +211 -45
- package/dist/styles/recipes/table.css +0 -1
- package/dist/styles/recipes/tabs.css +35 -2
- package/dist/styles/recipes/task-list.css +68 -9
- package/dist/styles/recipes/thread-rail.css +19 -17
- package/dist/styles/recipes/toolbar.css +39 -4
- package/dist/styles/recipes/track-highlight.css +63 -5
- package/dist/styles/recipes/transcript-divider.css +1 -0
- package/dist/styles/recipes/tree.css +2 -0
- package/dist/styles/recipes/user-ask.css +65 -18
- package/dist/styles/theme.css +164 -138
- package/dist/surface-variants.d.ts +4 -5
- package/dist/task-list.d.ts +16 -17
- package/dist/thread-rail.d.ts +21 -22
- package/dist/thread-rail.js +1 -1
- package/dist/transcript-divider.d.ts +6 -7
- package/dist/ui/accordion.d.ts +10 -11
- package/dist/ui/alert-dialog.d.ts +11 -12
- package/dist/ui/alert-dialog.js +9 -7
- package/dist/ui/alert.d.ts +9 -10
- package/dist/ui/alert.js +3 -3
- package/dist/ui/aspect-ratio.d.ts +3 -4
- package/dist/ui/autocomplete.d.ts +19 -20
- package/dist/ui/autocomplete.js +6 -4
- package/dist/ui/avatar.d.ts +9 -10
- package/dist/ui/badge.d.ts +9 -10
- package/dist/ui/button-group.d.ts +7 -8
- package/dist/ui/button-group.js +3 -2
- package/dist/ui/button.d.ts +17 -18
- package/dist/ui/button.js +20 -5
- package/dist/ui/calendar.d.ts +3 -4
- package/dist/ui/card.d.ts +16 -17
- package/dist/ui/checkbox-group.d.ts +4 -5
- package/dist/ui/checkbox-group.js +3 -2
- package/dist/ui/checkbox.d.ts +3 -4
- package/dist/ui/code-diff.d.ts +8 -9
- package/dist/ui/code.d.ts +32 -23
- package/dist/ui/code.js +41 -20
- package/dist/ui/collapsible.d.ts +7 -8
- package/dist/ui/color-picker.d.ts +40 -41
- package/dist/ui/color-picker.js +8 -6
- package/dist/ui/combobox-disabled-selection.d.ts +3 -4
- package/dist/ui/combobox.d.ts +19 -20
- package/dist/ui/combobox.js +6 -4
- package/dist/ui/command.d.ts +22 -19
- package/dist/ui/command.js +63 -13
- package/dist/ui/context-menu.d.ts +30 -31
- package/dist/ui/context-menu.js +10 -7
- package/dist/ui/dialog.d.ts +13 -13
- package/dist/ui/dialog.js +11 -9
- package/dist/ui/dockable-panel-geometry.d.ts +7 -8
- package/dist/ui/dockable-panel.d.ts +21 -22
- package/dist/ui/drawer.d.ts +17 -18
- package/dist/ui/drawer.js +9 -8
- package/dist/ui/dropdown-menu.d.ts +32 -33
- package/dist/ui/dropdown-menu.js +6 -4
- package/dist/ui/dropzone.d.ts +24 -24
- package/dist/ui/dropzone.js +4 -1
- package/dist/ui/empty.d.ts +14 -14
- package/dist/ui/empty.js +3 -3
- package/dist/ui/field.d.ts +26 -27
- package/dist/ui/form.d.ts +4 -5
- package/dist/ui/gradient-editor.d.ts +16 -17
- package/dist/ui/gradient-editor.js +2 -2
- package/dist/ui/hover-card.d.ts +6 -7
- package/dist/ui/hover-card.js +6 -4
- package/dist/ui/infinite-canvas.d.ts +11 -12
- package/dist/ui/infinite-canvas.js +1 -0
- package/dist/ui/input-group.d.ts +6 -7
- package/dist/ui/input-otp.d.ts +7 -8
- package/dist/ui/input.d.ts +3 -4
- package/dist/ui/item.d.ts +20 -21
- package/dist/ui/kbd.d.ts +7 -5
- package/dist/ui/kbd.js +4 -2
- package/dist/ui/markdown-elements.d.ts +20 -21
- package/dist/ui/markdown.d.ts +5 -6
- package/dist/ui/menubar.d.ts +25 -26
- package/dist/ui/menubar.js +10 -7
- package/dist/ui/meter.d.ts +11 -12
- package/dist/ui/morphing-panel.d.ts +8 -9
- package/dist/ui/native-select.d.ts +3 -4
- package/dist/ui/native-select.js +1 -1
- package/dist/ui/navigation-menu.d.ts +17 -18
- package/dist/ui/navigation-menu.js +6 -4
- package/dist/ui/number-field.d.ts +15 -16
- package/dist/ui/number-field.js +1 -1
- package/dist/ui/page-layout.d.ts +44 -0
- package/dist/ui/page-layout.js +108 -0
- package/dist/ui/pagination.d.ts +10 -11
- package/dist/ui/phone-input.d.ts +5 -6
- package/dist/ui/phone-input.js +39 -36
- package/dist/ui/popover.d.ts +11 -12
- package/dist/ui/popover.js +6 -4
- package/dist/ui/progress.d.ts +11 -12
- package/dist/ui/progressive-blur.d.ts +4 -5
- package/dist/ui/radio-group.d.ts +5 -6
- package/dist/ui/resizable.d.ts +12 -13
- package/dist/ui/resizable.js +1 -1
- package/dist/ui/responsive-dialog.d.ts +11 -12
- package/dist/ui/rich-tooltip-tour.d.ts +5 -6
- package/dist/ui/rich-tooltip.d.ts +21 -23
- package/dist/ui/rich-tooltip.js +6 -6
- package/dist/ui/scroll-area.d.ts +7 -8
- package/dist/ui/scroll-area.js +9 -6
- package/dist/ui/select.d.ts +21 -14
- package/dist/ui/select.js +8 -5
- package/dist/ui/separator.d.ts +2 -3
- package/dist/ui/sheet.d.ts +8 -9
- package/dist/ui/sheet.js +9 -7
- package/dist/ui/sidebar-menu.d.ts +18 -19
- package/dist/ui/sidebar-menu.js +4 -3
- package/dist/ui/sidebar-provider.d.ts +32 -7
- package/dist/ui/sidebar-provider.js +82 -22
- package/dist/ui/sidebar-resize-rail.d.ts +8 -0
- package/dist/ui/sidebar-resize-rail.js +192 -0
- package/dist/ui/sidebar.d.ts +19 -13
- package/dist/ui/sidebar.js +120 -55
- package/dist/ui/skeleton.d.ts +7 -4
- package/dist/ui/skeleton.js +9 -2
- package/dist/ui/slider.d.ts +6 -5
- package/dist/ui/slider.js +16 -13
- package/dist/ui/spinner.d.ts +3 -4
- package/dist/ui/stepper.d.ts +22 -23
- package/dist/ui/switch.d.ts +3 -4
- package/dist/ui/switch.js +12 -1
- package/dist/ui/table-of-contents.d.ts +7 -8
- package/dist/ui/table-of-contents.js +4 -2
- package/dist/ui/table.d.ts +17 -18
- package/dist/ui/tabs.d.ts +14 -11
- package/dist/ui/textarea.d.ts +3 -4
- package/dist/ui/timeline.d.ts +18 -19
- package/dist/ui/toast.d.ts +9 -9
- package/dist/ui/toast.js +23 -16
- package/dist/ui/toggle.d.ts +5 -6
- package/dist/ui/toggle.js +3 -2
- package/dist/ui/toolbar.d.ts +15 -16
- package/dist/ui/toolbar.js +15 -4
- package/dist/ui/tooltip.d.ts +6 -13
- package/dist/ui/tooltip.js +8 -9
- package/dist/ui/tree.d.ts +18 -19
- package/dist/ui/tree.js +3 -2
- package/dist/ui/trigger-menu.d.ts +15 -16
- package/dist/ui/trigger-menu.js +6 -4
- package/dist/ui/use-switch-drag.d.ts +7 -0
- package/dist/ui/use-switch-drag.js +104 -0
- package/dist/user-ask.d.ts +28 -27
- package/dist/user-ask.js +38 -13
- package/package.json +17 -16
- package/dist/code-block-editor.d.ts +0 -59
- package/dist/code-block-editor.js +0 -250
- package/dist/knob-contracts/code-block-editor-knobs.d.ts +0 -5
- package/dist/knob-contracts/code-block-editor-knobs.js +0 -11
- package/dist/lib/code-block-shiki.d.ts +0 -9
- package/dist/lib/code-block-shiki.js +0 -6
- package/dist/skin.config.d.ts +0 -5
- package/dist/skin.config.js +0 -12
- package/dist/styles/recipes/code-block-editor.css +0 -136
- package/dist/styles/skin-theme.css +0 -137
- package/dist/styles/skin.css +0 -143
package/dist/ui/combobox.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { FieldKnobStyle } from "../knob-contracts/field-knobs.js";
|
|
|
5
5
|
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
6
6
|
import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
|
|
7
7
|
//#region src/ui/combobox.d.ts
|
|
8
|
-
type ComboboxProps<Value = string> = {
|
|
8
|
+
export type ComboboxProps<Value = string> = {
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
items?: readonly Value[];
|
|
11
11
|
value?: Value | null;
|
|
@@ -26,47 +26,46 @@ type ComboboxProps<Value = string> = {
|
|
|
26
26
|
isItemEqualToValue?: (itemValue: Value, value: Value) => boolean;
|
|
27
27
|
filter?: Combobox$1.Root.Props<Value>["filter"];
|
|
28
28
|
};
|
|
29
|
-
type ComboboxInputProps = Omit<Omit<ComponentProps<"input">, "size">, "style"> & {
|
|
29
|
+
export type ComboboxInputProps = Omit<Omit<ComponentProps<"input">, "size">, "style"> & {
|
|
30
30
|
style?: CSSProperties & FieldKnobStyle;
|
|
31
31
|
} & {
|
|
32
32
|
size?: ControlSize;
|
|
33
33
|
};
|
|
34
|
-
type ComboboxTriggerProps = ComponentProps<"button"> & {
|
|
34
|
+
export type ComboboxTriggerProps = ComponentProps<"button"> & {
|
|
35
35
|
style?: CSSProperties & FieldKnobStyle;
|
|
36
36
|
};
|
|
37
|
-
type ComboboxContentProps = Omit<ComponentProps<"div"> & {
|
|
37
|
+
export type ComboboxContentProps = Omit<ComponentProps<"div"> & {
|
|
38
38
|
sideOffset?: number;
|
|
39
39
|
}, "style"> & {
|
|
40
40
|
style?: CSSProperties & PopupKnobStyle;
|
|
41
41
|
};
|
|
42
|
-
type ComboboxListProps<Value = unknown> = Omit<ComponentProps<"div">, "children"> & {
|
|
42
|
+
export type ComboboxListProps<Value = unknown> = Omit<ComponentProps<"div">, "children"> & {
|
|
43
43
|
children?: ReactNode | ((item: Value, index: number) => ReactNode);
|
|
44
44
|
} & {
|
|
45
45
|
style?: CSSProperties & PopupKnobStyle;
|
|
46
46
|
};
|
|
47
|
-
type ComboboxItemProps<Value = unknown> = Omit<Omit<ComponentProps<"div">, "value"> & {
|
|
47
|
+
export type ComboboxItemProps<Value = unknown> = Omit<Omit<ComponentProps<"div">, "value"> & {
|
|
48
48
|
value?: Value;
|
|
49
49
|
disabled?: boolean;
|
|
50
50
|
}, "style"> & {
|
|
51
51
|
style?: CSSProperties & PopupKnobStyle;
|
|
52
52
|
};
|
|
53
|
-
type ComboboxEmptyProps = Omit<ComponentProps<"div">, "style"> & {
|
|
53
|
+
export type ComboboxEmptyProps = Omit<ComponentProps<"div">, "style"> & {
|
|
54
54
|
style?: CSSProperties & FieldKnobStyle;
|
|
55
55
|
};
|
|
56
|
-
type ComboboxGroupProps = ComponentProps<"div"> & {
|
|
56
|
+
export type ComboboxGroupProps = ComponentProps<"div"> & {
|
|
57
57
|
style?: CSSProperties & FieldKnobStyle;
|
|
58
58
|
};
|
|
59
|
-
type ComboboxGroupLabelProps = Omit<ComponentProps<"div">, "style"> & {
|
|
59
|
+
export type ComboboxGroupLabelProps = Omit<ComponentProps<"div">, "style"> & {
|
|
60
60
|
style?: CSSProperties & PopupKnobStyle;
|
|
61
61
|
};
|
|
62
|
-
declare function Combobox<Value = string>({ children, onValueChange, autoHighlight, ...props }: ComboboxProps<Value>): import("react").JSX.Element;
|
|
63
|
-
declare function ComboboxTrigger({ className, children, ...props }: ComboboxTriggerProps): import("react").JSX.Element;
|
|
64
|
-
declare function ComboboxInput({ size, className, ...props }: ComboboxInputProps): import("react").JSX.Element;
|
|
65
|
-
declare function ComboboxContent({ className, children, sideOffset, ...props }: ComboboxContentProps): import("react").JSX.Element;
|
|
66
|
-
declare function ComboboxList<Value = unknown>({ className, children, ...props }: ComboboxListProps<Value>): import("react").JSX.Element;
|
|
67
|
-
declare function ComboboxEmpty({ className, children, ...props }: ComboboxEmptyProps): import("react").JSX.Element;
|
|
68
|
-
declare function ComboboxItem<Value = unknown>({ className, children, disabled, value, ...props }: ComboboxItemProps<Value>): import("react").JSX.Element;
|
|
69
|
-
declare function ComboboxGroup({ className, children, ...props }: ComboboxGroupProps): import("react").JSX.Element;
|
|
70
|
-
declare function ComboboxGroupLabel({ className, children, ...props }: ComboboxGroupLabelProps): import("react").JSX.Element;
|
|
71
|
-
//#endregion
|
|
72
|
-
export { Combobox, ComboboxContent, ComboboxContentProps, ComboboxEmpty, ComboboxEmptyProps, ComboboxGroup, ComboboxGroupLabel, ComboboxGroupLabelProps, ComboboxGroupProps, ComboboxInput, ComboboxInputProps, ComboboxItem, ComboboxItemProps, ComboboxList, ComboboxListProps, ComboboxProps, ComboboxTrigger, ComboboxTriggerProps };
|
|
62
|
+
export declare function Combobox<Value = string>({ children, onValueChange, autoHighlight, ...props }: ComboboxProps<Value>): import("react").JSX.Element;
|
|
63
|
+
export declare function ComboboxTrigger({ className, children, ...props }: ComboboxTriggerProps): import("react").JSX.Element;
|
|
64
|
+
export declare function ComboboxInput({ size, className, ...props }: ComboboxInputProps): import("react").JSX.Element;
|
|
65
|
+
export declare function ComboboxContent({ className, children, sideOffset, ...props }: ComboboxContentProps): import("react").JSX.Element;
|
|
66
|
+
export declare function ComboboxList<Value = unknown>({ className, children, ...props }: ComboboxListProps<Value>): import("react").JSX.Element;
|
|
67
|
+
export declare function ComboboxEmpty({ className, children, ...props }: ComboboxEmptyProps): import("react").JSX.Element;
|
|
68
|
+
export declare function ComboboxItem<Value = unknown>({ className, children, disabled, value, ...props }: ComboboxItemProps<Value>): import("react").JSX.Element;
|
|
69
|
+
export declare function ComboboxGroup({ className, children, ...props }: ComboboxGroupProps): import("react").JSX.Element;
|
|
70
|
+
export declare function ComboboxGroupLabel({ className, children, ...props }: ComboboxGroupLabelProps): import("react").JSX.Element;
|
|
71
|
+
//#endregion
|
package/dist/ui/combobox.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
-
import {
|
|
3
|
+
import { controlEffectsAttribute } from "../skin.js";
|
|
4
|
+
import { useSkin } from "../skin-provider.js";
|
|
4
5
|
import { popupItemStructureClasses } from "../surface-variants.js";
|
|
5
6
|
import { emitComboboxValueChange } from "./combobox-disabled-selection.js";
|
|
6
7
|
import { createContext, use, useEffect, useState } from "react";
|
|
@@ -76,17 +77,18 @@ function ComboboxInput({ size = "md", className, ...props }) {
|
|
|
76
77
|
});
|
|
77
78
|
}
|
|
78
79
|
function ComboboxContent({ className, children, sideOffset = 6, ...props }) {
|
|
80
|
+
const skin = useSkin();
|
|
79
81
|
return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
|
|
80
82
|
"data-control-ui": "combobox",
|
|
81
83
|
"data-popup-kind": "combobox",
|
|
82
84
|
"data-control-family": "popup",
|
|
83
85
|
"data-slot": "positioner",
|
|
84
|
-
"data-skin":
|
|
85
|
-
"data-effects":
|
|
86
|
+
"data-skin": skin.id,
|
|
87
|
+
"data-effects": controlEffectsAttribute(skin.effects),
|
|
86
88
|
side: "bottom",
|
|
87
89
|
align: "start",
|
|
88
90
|
sideOffset,
|
|
89
|
-
className: "z-
|
|
91
|
+
className: "z-(--z-popup)",
|
|
90
92
|
children: /* @__PURE__ */ jsx(Combobox$1.Popup, {
|
|
91
93
|
"data-control-ui": "combobox",
|
|
92
94
|
"data-popup-kind": "combobox",
|
package/dist/ui/command.d.ts
CHANGED
|
@@ -1,44 +1,47 @@
|
|
|
1
1
|
import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
2
2
|
import { Dialog } from "./dialog.js";
|
|
3
|
-
import { CSSProperties, ComponentProps } from "react";
|
|
3
|
+
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
4
4
|
import { Command as Command$1 } from "cmdk";
|
|
5
5
|
//#region src/ui/command.d.ts
|
|
6
|
-
type
|
|
6
|
+
export type CommandChrome = "standalone" | "embedded";
|
|
7
|
+
export type CommandProps = Omit<ComponentProps<typeof Command$1>, "style"> & {
|
|
8
|
+
chrome?: CommandChrome;
|
|
7
9
|
style?: CSSProperties & PopupKnobStyle;
|
|
8
10
|
};
|
|
9
|
-
declare function Command({ className, ...props }: CommandProps): import("react").JSX.Element;
|
|
10
|
-
declare function CommandDialog({ title, description, children, className, commandProps, ...props }: ComponentProps<typeof Dialog> & {
|
|
11
|
+
export declare function Command({ chrome, className, ...props }: CommandProps): import("react").JSX.Element;
|
|
12
|
+
export declare function CommandDialog({ title, description, children, className, commandProps, ...props }: ComponentProps<typeof Dialog> & {
|
|
11
13
|
title?: string;
|
|
12
14
|
description?: string;
|
|
13
15
|
className?: string;
|
|
14
16
|
commandProps?: ComponentProps<typeof Command>;
|
|
15
17
|
}): import("react").JSX.Element;
|
|
16
|
-
type CommandInputProps = Omit<ComponentProps<typeof Command$1.Input>, "style"> & {
|
|
18
|
+
export type CommandInputProps = Omit<ComponentProps<typeof Command$1.Input>, "style"> & {
|
|
17
19
|
style?: CSSProperties & PopupKnobStyle;
|
|
18
20
|
};
|
|
19
|
-
declare function CommandInput({ className, ...props }: CommandInputProps): import("react").JSX.Element;
|
|
20
|
-
declare function CommandList({ className, ...props }: ComponentProps<typeof Command$1.List> & {
|
|
21
|
+
export declare function CommandInput({ className, ...props }: CommandInputProps): import("react").JSX.Element;
|
|
22
|
+
export declare function CommandList({ className, children, ...props }: ComponentProps<typeof Command$1.List> & {
|
|
21
23
|
style?: CSSProperties & PopupKnobStyle;
|
|
22
24
|
}): import("react").JSX.Element;
|
|
23
|
-
type CommandEmptyProps = Omit<ComponentProps<typeof Command$1.Empty>, "style"> & {
|
|
25
|
+
export type CommandEmptyProps = Omit<ComponentProps<typeof Command$1.Empty>, "style" | "title"> & {
|
|
24
26
|
style?: CSSProperties & PopupKnobStyle;
|
|
27
|
+
title?: ReactNode;
|
|
28
|
+
description?: ReactNode;
|
|
25
29
|
};
|
|
26
|
-
declare function CommandEmpty({ className, ...props }: CommandEmptyProps): import("react").JSX.Element;
|
|
27
|
-
type CommandGroupProps = Omit<ComponentProps<typeof Command$1.Group>, "style"> & {
|
|
30
|
+
export declare function CommandEmpty({ className, children, title, description, ...props }: CommandEmptyProps): import("react").JSX.Element;
|
|
31
|
+
export type CommandGroupProps = Omit<ComponentProps<typeof Command$1.Group>, "style"> & {
|
|
28
32
|
style?: CSSProperties & PopupKnobStyle;
|
|
29
33
|
};
|
|
30
|
-
declare function CommandGroup({ className, ...props }: CommandGroupProps): import("react").JSX.Element;
|
|
31
|
-
type CommandSeparatorProps = Omit<ComponentProps<typeof Command$1.Separator>, "style"> & {
|
|
34
|
+
export declare function CommandGroup({ className, ...props }: CommandGroupProps): import("react").JSX.Element;
|
|
35
|
+
export type CommandSeparatorProps = Omit<ComponentProps<typeof Command$1.Separator>, "style"> & {
|
|
32
36
|
style?: CSSProperties & PopupKnobStyle;
|
|
33
37
|
};
|
|
34
|
-
declare function CommandSeparator({ className, ...props }: CommandSeparatorProps): import("react").JSX.Element;
|
|
35
|
-
type CommandItemProps = Omit<ComponentProps<typeof Command$1.Item>, "style"> & {
|
|
38
|
+
export declare function CommandSeparator({ className, ...props }: CommandSeparatorProps): import("react").JSX.Element;
|
|
39
|
+
export type CommandItemProps = Omit<ComponentProps<typeof Command$1.Item>, "style"> & {
|
|
36
40
|
style?: CSSProperties & PopupKnobStyle;
|
|
37
41
|
};
|
|
38
|
-
declare function CommandItem({ className, disabled, onSelect, ...props }: CommandItemProps): import("react").JSX.Element;
|
|
39
|
-
type CommandShortcutProps = Omit<ComponentProps<"span">, "style"> & {
|
|
42
|
+
export declare function CommandItem({ className, disabled, onSelect, ...props }: CommandItemProps): import("react").JSX.Element;
|
|
43
|
+
export type CommandShortcutProps = Omit<ComponentProps<"span">, "style"> & {
|
|
40
44
|
style?: CSSProperties & PopupKnobStyle;
|
|
41
45
|
};
|
|
42
|
-
declare function CommandShortcut({ className, ...props }: CommandShortcutProps): import("react").JSX.Element;
|
|
43
|
-
//#endregion
|
|
44
|
-
export { Command, CommandDialog, CommandEmpty, CommandEmptyProps, CommandGroup, CommandGroupProps, CommandInput, CommandInputProps, CommandItem, CommandItemProps, CommandList, CommandProps, CommandSeparator, CommandSeparatorProps, CommandShortcut, CommandShortcutProps };
|
|
46
|
+
export declare function CommandShortcut({ className, ...props }: CommandShortcutProps): import("react").JSX.Element;
|
|
47
|
+
//#endregion
|
package/dist/ui/command.js
CHANGED
|
@@ -2,28 +2,30 @@
|
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
3
|
import { ScrollArea } from "./scroll-area.js";
|
|
4
4
|
import { popupItemStructureClasses } from "../surface-variants.js";
|
|
5
|
+
import { Empty, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "./empty.js";
|
|
5
6
|
import { Dialog, DialogContent, DialogDescription, DialogTitle } from "./dialog.js";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Command as Command$1 } from "cmdk";
|
|
8
|
+
import { Command as Command$1, useCommandState } from "cmdk";
|
|
8
9
|
//#region src/ui/command.tsx
|
|
9
|
-
function Command({ className, ...props }) {
|
|
10
|
+
function Command({ chrome = "standalone", className, ...props }) {
|
|
10
11
|
return /* @__PURE__ */ jsx(Command$1, {
|
|
11
12
|
"data-control-ui": "command",
|
|
12
13
|
"data-popup-kind": "command",
|
|
13
14
|
"data-slot": "root",
|
|
14
15
|
"data-control-family": "popup",
|
|
15
|
-
"data-popup-part": "surface",
|
|
16
|
+
"data-popup-part": chrome === "standalone" ? "surface" : void 0,
|
|
16
17
|
"data-popup-static": "",
|
|
17
|
-
"data-
|
|
18
|
-
|
|
18
|
+
"data-chrome": chrome,
|
|
19
|
+
"data-surface": chrome === "standalone" ? "panel" : void 0,
|
|
20
|
+
className: cn("flex h-full w-full flex-col", className),
|
|
19
21
|
...props
|
|
20
22
|
});
|
|
21
23
|
}
|
|
22
|
-
function CommandDialog({ title = "Command palette", description = "Search for a command to run
|
|
24
|
+
function CommandDialog({ title = "Command palette", description = "Search for a command to run…", children, className, commandProps, ...props }) {
|
|
23
25
|
return /* @__PURE__ */ jsx(Dialog, {
|
|
24
26
|
...props,
|
|
25
27
|
children: /* @__PURE__ */ jsxs(DialogContent, {
|
|
26
|
-
className: cn("
|
|
28
|
+
className: cn("p-0", className),
|
|
27
29
|
showCloseButton: false,
|
|
28
30
|
children: [
|
|
29
31
|
/* @__PURE__ */ jsx(DialogTitle, {
|
|
@@ -35,6 +37,7 @@ function CommandDialog({ title = "Command palette", description = "Search for a
|
|
|
35
37
|
children: description
|
|
36
38
|
}),
|
|
37
39
|
/* @__PURE__ */ jsx(Command, {
|
|
40
|
+
chrome: "embedded",
|
|
38
41
|
...commandProps,
|
|
39
42
|
"data-control-ui": "command",
|
|
40
43
|
"data-popup-kind": "command",
|
|
@@ -48,6 +51,7 @@ function CommandDialog({ title = "Command palette", description = "Search for a
|
|
|
48
51
|
});
|
|
49
52
|
}
|
|
50
53
|
function CommandInput({ className, ...props }) {
|
|
54
|
+
const hasResults = useCommandState((state) => state.filtered.count > 0);
|
|
51
55
|
return /* @__PURE__ */ jsxs("div", {
|
|
52
56
|
"data-control-ui": "command",
|
|
53
57
|
"data-popup-kind": "command",
|
|
@@ -78,37 +82,82 @@ function CommandInput({ className, ...props }) {
|
|
|
78
82
|
strokeLinecap: "round"
|
|
79
83
|
})]
|
|
80
84
|
}), /* @__PURE__ */ jsx(Command$1.Input, {
|
|
85
|
+
asChild: true,
|
|
81
86
|
"data-control-ui": "command",
|
|
82
87
|
"data-popup-kind": "command",
|
|
83
88
|
"data-control-family": "popup",
|
|
84
89
|
"data-slot": "input",
|
|
85
90
|
className: cn("h-full w-full disabled:cursor-not-allowed", className),
|
|
86
|
-
...props
|
|
91
|
+
...props,
|
|
92
|
+
children: /* @__PURE__ */ jsx("input", {
|
|
93
|
+
role: "combobox",
|
|
94
|
+
"aria-expanded": hasResults
|
|
95
|
+
})
|
|
87
96
|
})]
|
|
88
97
|
});
|
|
89
98
|
}
|
|
90
|
-
function
|
|
99
|
+
function CommandListSurface({ hasResults, ...props }) {
|
|
100
|
+
return /* @__PURE__ */ jsx("div", {
|
|
101
|
+
...props,
|
|
102
|
+
role: hasResults ? "listbox" : "group"
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function CommandList({ className, children, ...props }) {
|
|
106
|
+
const hasResults = useCommandState((state) => state.filtered.count > 0);
|
|
91
107
|
return /* @__PURE__ */ jsx(ScrollArea, {
|
|
92
108
|
maxHeight: "min(360px, var(--available-height, 360px))",
|
|
93
109
|
className: "min-h-0 w-full",
|
|
94
110
|
children: /* @__PURE__ */ jsx(Command$1.List, {
|
|
111
|
+
asChild: true,
|
|
95
112
|
"data-control-ui": "command",
|
|
96
113
|
"data-control-family": "popup",
|
|
97
114
|
"data-popup-kind": "command",
|
|
98
115
|
"data-slot": "list",
|
|
99
116
|
className: cn("p-[var(--popover-padding)]", className),
|
|
100
|
-
...props
|
|
117
|
+
...props,
|
|
118
|
+
children: /* @__PURE__ */ jsx(CommandListSurface, {
|
|
119
|
+
hasResults,
|
|
120
|
+
children
|
|
121
|
+
})
|
|
101
122
|
})
|
|
102
123
|
});
|
|
103
124
|
}
|
|
104
|
-
function CommandEmpty({ className, ...props }) {
|
|
125
|
+
function CommandEmpty({ className, children, title = "No results found", description = "Try a different search term.", ...props }) {
|
|
105
126
|
return /* @__PURE__ */ jsx(Command$1.Empty, {
|
|
127
|
+
asChild: true,
|
|
106
128
|
"data-control-ui": "command",
|
|
107
129
|
"data-control-family": "popup",
|
|
108
130
|
"data-popup-kind": "command",
|
|
109
131
|
"data-slot": "empty",
|
|
110
132
|
className,
|
|
111
|
-
...props
|
|
133
|
+
...props,
|
|
134
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
135
|
+
role: "status",
|
|
136
|
+
children: children ?? /* @__PURE__ */ jsx(Empty, { children: /* @__PURE__ */ jsxs(EmptyHeader, { children: [
|
|
137
|
+
/* @__PURE__ */ jsx(EmptyMedia, { children: /* @__PURE__ */ jsx(CommandEmptyIcon, {}) }),
|
|
138
|
+
/* @__PURE__ */ jsx(EmptyTitle, { children: title }),
|
|
139
|
+
description ? /* @__PURE__ */ jsx(EmptyDescription, { children: description }) : null
|
|
140
|
+
] }) })
|
|
141
|
+
})
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function CommandEmptyIcon() {
|
|
145
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
146
|
+
viewBox: "0 0 16 16",
|
|
147
|
+
"aria-hidden": "true",
|
|
148
|
+
fill: "none",
|
|
149
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
150
|
+
cx: "7",
|
|
151
|
+
cy: "7",
|
|
152
|
+
r: "4.25",
|
|
153
|
+
stroke: "currentColor",
|
|
154
|
+
strokeWidth: "1.3"
|
|
155
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
156
|
+
d: "m10.5 10.5 3 3",
|
|
157
|
+
stroke: "currentColor",
|
|
158
|
+
strokeWidth: "1.3",
|
|
159
|
+
strokeLinecap: "round"
|
|
160
|
+
})]
|
|
112
161
|
});
|
|
113
162
|
}
|
|
114
163
|
function CommandGroup({ className, ...props }) {
|
|
@@ -117,12 +166,13 @@ function CommandGroup({ className, ...props }) {
|
|
|
117
166
|
"data-control-family": "popup",
|
|
118
167
|
"data-popup-kind": "command",
|
|
119
168
|
"data-slot": "group",
|
|
120
|
-
className: cn("
|
|
169
|
+
className: cn("p-[var(--popover-padding)]", className),
|
|
121
170
|
...props
|
|
122
171
|
});
|
|
123
172
|
}
|
|
124
173
|
function CommandSeparator({ className, ...props }) {
|
|
125
174
|
return /* @__PURE__ */ jsx(Command$1.Separator, {
|
|
175
|
+
"aria-hidden": "true",
|
|
126
176
|
"data-control-ui": "command",
|
|
127
177
|
"data-popup-kind": "command",
|
|
128
178
|
"data-control-family": "popup",
|
|
@@ -3,84 +3,83 @@ import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
|
3
3
|
import { CSSProperties, ComponentProps, MouseEvent, ReactNode } from "react";
|
|
4
4
|
import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
|
|
5
5
|
//#region src/ui/context-menu.d.ts
|
|
6
|
-
type ContextMenuProps = {
|
|
6
|
+
export type ContextMenuProps = {
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
open?: boolean;
|
|
9
9
|
defaultOpen?: boolean;
|
|
10
10
|
onOpenChange?: (open: boolean, eventDetails: OpenChangeEventDetails) => void;
|
|
11
11
|
};
|
|
12
|
-
type ContextMenuTriggerProps = ComponentProps<"div"> & {
|
|
12
|
+
export type ContextMenuTriggerProps = ComponentProps<"div"> & {
|
|
13
13
|
style?: CSSProperties & PopupKnobStyle;
|
|
14
14
|
};
|
|
15
|
-
type ContextMenuGroupProps = ComponentProps<"div"> & {
|
|
15
|
+
export type ContextMenuGroupProps = ComponentProps<"div"> & {
|
|
16
16
|
style?: CSSProperties & PopupKnobStyle;
|
|
17
17
|
};
|
|
18
|
-
type ContextMenuContentProps = Omit<ComponentProps<"div">, "style"> & {
|
|
18
|
+
export type ContextMenuContentProps = Omit<ComponentProps<"div">, "style"> & {
|
|
19
19
|
style?: CSSProperties & PopupKnobStyle;
|
|
20
20
|
};
|
|
21
|
-
type ContextMenuItemProps = Omit<Omit<ComponentProps<"div">, "onClick">, "style"> & {
|
|
21
|
+
export type ContextMenuItemProps = Omit<Omit<ComponentProps<"div">, "onClick">, "style"> & {
|
|
22
22
|
style?: CSSProperties & PopupKnobStyle;
|
|
23
23
|
} & {
|
|
24
24
|
disabled?: boolean;
|
|
25
25
|
inset?: boolean;
|
|
26
26
|
onClick?: (event: MouseEvent) => void;
|
|
27
27
|
};
|
|
28
|
-
type ContextMenuCheckboxItemProps = Omit<Omit<ComponentProps<"div">, "onClick">, "style"> & {
|
|
28
|
+
export type ContextMenuCheckboxItemProps = Omit<Omit<ComponentProps<"div">, "onClick">, "style"> & {
|
|
29
29
|
style?: CSSProperties & PopupKnobStyle;
|
|
30
30
|
} & {
|
|
31
31
|
checked?: boolean;
|
|
32
32
|
onCheckedChange?: (checked: boolean) => void;
|
|
33
33
|
disabled?: boolean;
|
|
34
34
|
};
|
|
35
|
-
type ContextMenuRadioGroupProps<TValue extends string = string> = ComponentProps<"div"> & Omit<ControlledChoice<TValue>, "defaultValue"> & {
|
|
35
|
+
export type ContextMenuRadioGroupProps<TValue extends string = string> = ComponentProps<"div"> & Omit<ControlledChoice<TValue>, "defaultValue"> & {
|
|
36
36
|
style?: CSSProperties & PopupKnobStyle;
|
|
37
37
|
};
|
|
38
|
-
type ContextMenuRadioItemProps = Omit<Omit<ComponentProps<"div">, "onClick">, "style"> & {
|
|
38
|
+
export type ContextMenuRadioItemProps = Omit<Omit<ComponentProps<"div">, "onClick">, "style"> & {
|
|
39
39
|
style?: CSSProperties & PopupKnobStyle;
|
|
40
40
|
} & {
|
|
41
41
|
value: string;
|
|
42
42
|
disabled?: boolean;
|
|
43
43
|
};
|
|
44
|
-
type ContextMenuLabelProps = Omit<ComponentProps<"div">, "style"> & {
|
|
44
|
+
export type ContextMenuLabelProps = Omit<ComponentProps<"div">, "style"> & {
|
|
45
45
|
style?: CSSProperties & PopupKnobStyle;
|
|
46
46
|
} & {
|
|
47
47
|
inset?: boolean;
|
|
48
48
|
};
|
|
49
|
-
type ContextMenuSeparatorProps = Omit<ComponentProps<"div">, "style"> & {
|
|
49
|
+
export type ContextMenuSeparatorProps = Omit<ComponentProps<"div">, "style"> & {
|
|
50
50
|
style?: CSSProperties & PopupKnobStyle;
|
|
51
51
|
};
|
|
52
|
-
type ContextMenuShortcutProps = Omit<ComponentProps<"span">, "style"> & {
|
|
52
|
+
export type ContextMenuShortcutProps = Omit<ComponentProps<"span">, "style"> & {
|
|
53
53
|
style?: CSSProperties & PopupKnobStyle;
|
|
54
54
|
};
|
|
55
|
-
type ContextMenuSubProps = {
|
|
55
|
+
export type ContextMenuSubProps = {
|
|
56
56
|
children?: ReactNode;
|
|
57
57
|
open?: boolean;
|
|
58
58
|
defaultOpen?: boolean;
|
|
59
59
|
onOpenChange?: (open: boolean, eventDetails: OpenChangeEventDetails) => void;
|
|
60
60
|
};
|
|
61
|
-
type ContextMenuSubTriggerProps = Omit<Omit<ComponentProps<"div">, "onClick">, "style"> & {
|
|
61
|
+
export type ContextMenuSubTriggerProps = Omit<Omit<ComponentProps<"div">, "onClick">, "style"> & {
|
|
62
62
|
style?: CSSProperties & PopupKnobStyle;
|
|
63
63
|
} & {
|
|
64
64
|
disabled?: boolean;
|
|
65
65
|
inset?: boolean;
|
|
66
66
|
};
|
|
67
|
-
type ContextMenuSubContentProps = Omit<ComponentProps<"div">, "style"> & {
|
|
67
|
+
export type ContextMenuSubContentProps = Omit<ComponentProps<"div">, "style"> & {
|
|
68
68
|
style?: CSSProperties & PopupKnobStyle;
|
|
69
69
|
};
|
|
70
|
-
declare function ContextMenu(props: ContextMenuProps): import("react").JSX.Element;
|
|
71
|
-
declare function ContextMenuTrigger({ className, ...props }: ContextMenuTriggerProps): import("react").JSX.Element;
|
|
72
|
-
declare function ContextMenuPortal(props: ComponentProps<typeof ContextMenu$1.Portal>): import("react").JSX.Element;
|
|
73
|
-
declare function ContextMenuGroup({ className, ...props }: ContextMenuGroupProps): import("react").JSX.Element;
|
|
74
|
-
declare function ContextMenuContent({ className, children, ...props }: ContextMenuContentProps): import("react").JSX.Element;
|
|
75
|
-
declare function ContextMenuItem({ className, inset, ...props }: ContextMenuItemProps): import("react").JSX.Element;
|
|
76
|
-
declare function ContextMenuCheckboxItem({ className, children, ...props }: ContextMenuCheckboxItemProps): import("react").JSX.Element;
|
|
77
|
-
declare function ContextMenuRadioGroup<TValue extends string = string>({ className, ...props }: ContextMenuRadioGroupProps<TValue>): import("react").JSX.Element;
|
|
78
|
-
declare function ContextMenuRadioItem({ className, children, ...props }: ContextMenuRadioItemProps): import("react").JSX.Element;
|
|
79
|
-
declare function ContextMenuLabel({ className, inset, ...props }: ContextMenuLabelProps): import("react").JSX.Element;
|
|
80
|
-
declare function ContextMenuSeparator({ className, ...props }: ContextMenuSeparatorProps): import("react").JSX.Element;
|
|
81
|
-
declare function ContextMenuShortcut({ className, ...props }: ContextMenuShortcutProps): import("react").JSX.Element;
|
|
82
|
-
declare function ContextMenuSub(props: ContextMenuSubProps): import("react").JSX.Element;
|
|
83
|
-
declare function ContextMenuSubTrigger({ className, inset, children, ...props }: ContextMenuSubTriggerProps): import("react").JSX.Element;
|
|
84
|
-
declare function ContextMenuSubContent({ className, children, ...props }: ContextMenuSubContentProps): import("react").JSX.Element;
|
|
85
|
-
//#endregion
|
|
86
|
-
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuCheckboxItemProps, ContextMenuContent, ContextMenuContentProps, ContextMenuGroup, ContextMenuGroupProps, ContextMenuItem, ContextMenuItemProps, ContextMenuLabel, ContextMenuLabelProps, ContextMenuPortal, ContextMenuProps, ContextMenuRadioGroup, ContextMenuRadioGroupProps, ContextMenuRadioItem, ContextMenuRadioItemProps, ContextMenuSeparator, ContextMenuSeparatorProps, ContextMenuShortcut, ContextMenuShortcutProps, ContextMenuSub, ContextMenuSubContent, ContextMenuSubContentProps, ContextMenuSubProps, ContextMenuSubTrigger, ContextMenuSubTriggerProps, ContextMenuTrigger, ContextMenuTriggerProps };
|
|
70
|
+
export declare function ContextMenu(props: ContextMenuProps): import("react").JSX.Element;
|
|
71
|
+
export declare function ContextMenuTrigger({ className, ...props }: ContextMenuTriggerProps): import("react").JSX.Element;
|
|
72
|
+
export declare function ContextMenuPortal(props: ComponentProps<typeof ContextMenu$1.Portal>): import("react").JSX.Element;
|
|
73
|
+
export declare function ContextMenuGroup({ className, ...props }: ContextMenuGroupProps): import("react").JSX.Element;
|
|
74
|
+
export declare function ContextMenuContent({ className, children, ...props }: ContextMenuContentProps): import("react").JSX.Element;
|
|
75
|
+
export declare function ContextMenuItem({ className, inset, ...props }: ContextMenuItemProps): import("react").JSX.Element;
|
|
76
|
+
export declare function ContextMenuCheckboxItem({ className, children, ...props }: ContextMenuCheckboxItemProps): import("react").JSX.Element;
|
|
77
|
+
export declare function ContextMenuRadioGroup<TValue extends string = string>({ className, ...props }: ContextMenuRadioGroupProps<TValue>): import("react").JSX.Element;
|
|
78
|
+
export declare function ContextMenuRadioItem({ className, children, ...props }: ContextMenuRadioItemProps): import("react").JSX.Element;
|
|
79
|
+
export declare function ContextMenuLabel({ className, inset, ...props }: ContextMenuLabelProps): import("react").JSX.Element;
|
|
80
|
+
export declare function ContextMenuSeparator({ className, ...props }: ContextMenuSeparatorProps): import("react").JSX.Element;
|
|
81
|
+
export declare function ContextMenuShortcut({ className, ...props }: ContextMenuShortcutProps): import("react").JSX.Element;
|
|
82
|
+
export declare function ContextMenuSub(props: ContextMenuSubProps): import("react").JSX.Element;
|
|
83
|
+
export declare function ContextMenuSubTrigger({ className, inset, children, ...props }: ContextMenuSubTriggerProps): import("react").JSX.Element;
|
|
84
|
+
export declare function ContextMenuSubContent({ className, children, ...props }: ContextMenuSubContentProps): import("react").JSX.Element;
|
|
85
|
+
//#endregion
|
package/dist/ui/context-menu.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
-
import {
|
|
3
|
+
import { controlEffectsAttribute } from "../skin.js";
|
|
4
|
+
import { useSkin } from "../skin-provider.js";
|
|
4
5
|
import { popupItemStructureClasses } from "../surface-variants.js";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
|
|
@@ -34,10 +35,11 @@ function ContextMenuGroup({ className, ...props }) {
|
|
|
34
35
|
});
|
|
35
36
|
}
|
|
36
37
|
function ContextMenuContent({ className, children, ...props }) {
|
|
38
|
+
const skin = useSkin();
|
|
37
39
|
return /* @__PURE__ */ jsx(ContextMenu$1.Portal, { children: /* @__PURE__ */ jsx(ContextMenu$1.Positioner, {
|
|
38
|
-
"data-skin":
|
|
39
|
-
"data-effects":
|
|
40
|
-
className: "z-
|
|
40
|
+
"data-skin": skin.id,
|
|
41
|
+
"data-effects": controlEffectsAttribute(skin.effects),
|
|
42
|
+
className: "z-(--z-popup)",
|
|
41
43
|
children: /* @__PURE__ */ jsx(ContextMenu$1.Popup, {
|
|
42
44
|
"data-control-ui": "context-menu",
|
|
43
45
|
"data-popup-kind": "context-menu",
|
|
@@ -179,10 +181,11 @@ function ContextMenuSubTrigger({ className, inset = false, children, ...props })
|
|
|
179
181
|
});
|
|
180
182
|
}
|
|
181
183
|
function ContextMenuSubContent({ className, children, ...props }) {
|
|
184
|
+
const skin = useSkin();
|
|
182
185
|
return /* @__PURE__ */ jsx(ContextMenu$1.Portal, { children: /* @__PURE__ */ jsx(ContextMenu$1.Positioner, {
|
|
183
|
-
"data-skin":
|
|
184
|
-
"data-effects":
|
|
185
|
-
className: "z-
|
|
186
|
+
"data-skin": skin.id,
|
|
187
|
+
"data-effects": controlEffectsAttribute(skin.effects),
|
|
188
|
+
className: "z-(--z-popup)",
|
|
186
189
|
sideOffset: -4,
|
|
187
190
|
alignOffset: -5,
|
|
188
191
|
children: /* @__PURE__ */ jsx(ContextMenu$1.Popup, {
|
package/dist/ui/dialog.d.ts
CHANGED
|
@@ -4,35 +4,35 @@ import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
|
4
4
|
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
5
5
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
6
6
|
//#region src/ui/dialog.d.ts
|
|
7
|
-
type DialogProps = {
|
|
7
|
+
export type DialogProps = {
|
|
8
|
+
modal?: boolean | "trap-focus";
|
|
8
9
|
children?: ReactNode;
|
|
9
10
|
open?: boolean;
|
|
10
11
|
defaultOpen?: boolean;
|
|
11
12
|
onOpenChange?: (open: boolean, eventDetails: OpenChangeEventDetails) => void;
|
|
12
13
|
};
|
|
13
|
-
type DialogContentProps = Omit<ComponentProps<"div">, "style"> & {
|
|
14
|
+
export type DialogContentProps = Omit<ComponentProps<"div">, "style"> & {
|
|
14
15
|
style?: CSSProperties & PopupKnobStyle;
|
|
15
16
|
} & {
|
|
16
17
|
showCloseButton?: boolean;
|
|
17
18
|
};
|
|
18
|
-
declare function Dialog(props: DialogProps): import("react").JSX.Element;
|
|
19
|
-
declare function DialogTrigger({ className, ...props }: ComponentProps<typeof Dialog$1.Trigger> & {
|
|
19
|
+
export declare function Dialog(props: DialogProps): import("react").JSX.Element;
|
|
20
|
+
export declare function DialogTrigger({ className, ...props }: ComponentProps<typeof Dialog$1.Trigger> & {
|
|
20
21
|
style?: CSSProperties & PopupKnobStyle;
|
|
21
22
|
}): import("react").JSX.Element;
|
|
22
|
-
type DialogCloseProps = Omit<ComponentProps<typeof Dialog$1.Close>, "render"> & Pick<ButtonProps, "variant" | "size" | "tone" | "iconOnly">;
|
|
23
|
-
declare function DialogClose({ className, children, variant, size, tone, iconOnly, ...props }: DialogCloseProps): import("react").JSX.Element;
|
|
24
|
-
declare function DialogContent({ className, children, showCloseButton, ...props }: DialogContentProps): import("react").JSX.Element;
|
|
25
|
-
declare function DialogHeader({ className, ...props }: ComponentProps<"div"> & {
|
|
23
|
+
export type DialogCloseProps = Omit<ComponentProps<typeof Dialog$1.Close>, "render"> & Pick<ButtonProps, "variant" | "size" | "tone" | "iconOnly">;
|
|
24
|
+
export declare function DialogClose({ className, children, variant, size, tone, iconOnly, ...props }: DialogCloseProps): import("react").JSX.Element;
|
|
25
|
+
export declare function DialogContent({ className, children, showCloseButton, ...props }: DialogContentProps): import("react").JSX.Element;
|
|
26
|
+
export declare function DialogHeader({ className, ...props }: ComponentProps<"div"> & {
|
|
26
27
|
style?: CSSProperties & PopupKnobStyle;
|
|
27
28
|
}): import("react").JSX.Element;
|
|
28
|
-
declare function DialogFooter({ className, ...props }: ComponentProps<"div"> & {
|
|
29
|
+
export declare function DialogFooter({ className, ...props }: ComponentProps<"div"> & {
|
|
29
30
|
style?: CSSProperties & PopupKnobStyle;
|
|
30
31
|
}): import("react").JSX.Element;
|
|
31
|
-
declare function DialogTitle({ className, ...props }: ComponentProps<"h2"> & {
|
|
32
|
+
export declare function DialogTitle({ className, ...props }: ComponentProps<"h2"> & {
|
|
32
33
|
style?: CSSProperties & PopupKnobStyle;
|
|
33
34
|
}): import("react").JSX.Element;
|
|
34
|
-
declare function DialogDescription({ className, ...props }: ComponentProps<"p"> & {
|
|
35
|
+
export declare function DialogDescription({ className, ...props }: ComponentProps<"p"> & {
|
|
35
36
|
style?: CSSProperties & PopupKnobStyle;
|
|
36
37
|
}): import("react").JSX.Element;
|
|
37
|
-
//#endregion
|
|
38
|
-
export { Dialog, DialogClose, DialogCloseProps, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProps, DialogTitle, DialogTrigger };
|
|
38
|
+
//#endregion
|
package/dist/ui/dialog.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
-
import {
|
|
3
|
+
import { controlEffectsAttribute, skinAdornment } from "../skin.js";
|
|
4
|
+
import { useSkin } from "../skin-provider.js";
|
|
4
5
|
import { Button } from "./button.js";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
@@ -33,34 +34,35 @@ function DialogClose({ className, children, variant = "surface", size = "sm", to
|
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
36
|
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
37
|
+
const skin = useSkin();
|
|
36
38
|
return /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [/* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
37
39
|
"data-control-ui": "dialog",
|
|
38
40
|
"data-popup-kind": "dialog",
|
|
39
41
|
"data-slot": "backdrop",
|
|
40
42
|
"data-control-family": "popup",
|
|
41
43
|
"data-popup-part": "backdrop",
|
|
42
|
-
"data-skin":
|
|
43
|
-
"data-effects":
|
|
44
|
-
className: "fixed inset-0 z-
|
|
44
|
+
"data-skin": skin.id,
|
|
45
|
+
"data-effects": controlEffectsAttribute(skin.effects),
|
|
46
|
+
className: "fixed inset-0 z-(--z-overlay)"
|
|
45
47
|
}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
|
|
46
|
-
"data-skin":
|
|
47
|
-
"data-effects":
|
|
48
|
+
"data-skin": skin.id,
|
|
49
|
+
"data-effects": controlEffectsAttribute(skin.effects),
|
|
48
50
|
"data-control-ui": "dialog",
|
|
49
51
|
"data-popup-kind": "dialog",
|
|
50
52
|
"data-slot": "content",
|
|
51
53
|
"data-control-family": "popup",
|
|
52
54
|
"data-popup-part": "surface",
|
|
53
55
|
"data-surface": "modal",
|
|
54
|
-
className: cn("fixed left-1/2 top-[12vh] z-
|
|
56
|
+
className: cn("fixed left-1/2 top-[12vh] z-(--z-modal) grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2", className),
|
|
55
57
|
...props,
|
|
56
58
|
children: [
|
|
57
|
-
skinAdornment("dialog", "titlebar", {}),
|
|
59
|
+
skinAdornment(skin, "dialog", "titlebar", {}),
|
|
58
60
|
children,
|
|
59
61
|
showCloseButton ? /* @__PURE__ */ jsxs(DialogClose, {
|
|
60
62
|
variant: "ghost",
|
|
61
63
|
size: "xs",
|
|
62
64
|
iconOnly: true,
|
|
63
|
-
className: "absolute
|
|
65
|
+
className: "absolute",
|
|
64
66
|
children: [/* @__PURE__ */ jsx("svg", {
|
|
65
67
|
viewBox: "0 0 16 16",
|
|
66
68
|
className: "size-4",
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
//#region src/ui/dockable-panel-geometry.d.ts
|
|
2
|
-
type DockablePanelBounds = {
|
|
2
|
+
export type DockablePanelBounds = {
|
|
3
3
|
width: number;
|
|
4
4
|
height: number;
|
|
5
5
|
};
|
|
6
|
-
type DockablePanelSize = {
|
|
6
|
+
export type DockablePanelSize = {
|
|
7
7
|
width: number;
|
|
8
8
|
height: number;
|
|
9
9
|
};
|
|
10
|
-
type DockablePanelPosition = {
|
|
10
|
+
export type DockablePanelPosition = {
|
|
11
11
|
x: number;
|
|
12
12
|
y: number;
|
|
13
13
|
};
|
|
14
|
-
declare function clampDockablePanelPosition(position: DockablePanelPosition, bounds: DockablePanelBounds, panel: DockablePanelSize, inset?: number): DockablePanelPosition;
|
|
15
|
-
declare function dockablePanelSideAt(pointerX: number, width: number): "left" | "right";
|
|
16
|
-
declare function oppositeDockablePanelSide(placement: "left" | "right"): "left" | "right";
|
|
17
|
-
//#endregion
|
|
18
|
-
export { DockablePanelBounds, DockablePanelPosition, DockablePanelSize, clampDockablePanelPosition, dockablePanelSideAt, oppositeDockablePanelSide };
|
|
14
|
+
export declare function clampDockablePanelPosition(position: DockablePanelPosition, bounds: DockablePanelBounds, panel: DockablePanelSize, inset?: number): DockablePanelPosition;
|
|
15
|
+
export declare function dockablePanelSideAt(pointerX: number, width: number): "left" | "right";
|
|
16
|
+
export declare function oppositeDockablePanelSide(placement: "left" | "right"): "left" | "right";
|
|
17
|
+
//#endregion
|