@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/table.d.ts
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
import { TableKnobStyle } from "../knob-contracts/table-knobs.js";
|
|
2
2
|
import { CSSProperties, ComponentProps } from "react";
|
|
3
3
|
//#region src/ui/table.d.ts
|
|
4
|
-
type TableProps = Omit<ComponentProps<"table">, "style"> & {
|
|
4
|
+
export type TableProps = Omit<ComponentProps<"table">, "style"> & {
|
|
5
5
|
style?: CSSProperties & TableKnobStyle;
|
|
6
6
|
};
|
|
7
|
-
type TableHeaderProps = Omit<ComponentProps<"thead">, "style"> & {
|
|
7
|
+
export type TableHeaderProps = Omit<ComponentProps<"thead">, "style"> & {
|
|
8
8
|
style?: CSSProperties & TableKnobStyle;
|
|
9
9
|
};
|
|
10
|
-
type TableBodyProps = Omit<ComponentProps<"tbody">, "style"> & {
|
|
10
|
+
export type TableBodyProps = Omit<ComponentProps<"tbody">, "style"> & {
|
|
11
11
|
style?: CSSProperties & TableKnobStyle;
|
|
12
12
|
};
|
|
13
|
-
type TableFooterProps = Omit<ComponentProps<"tfoot">, "style"> & {
|
|
13
|
+
export type TableFooterProps = Omit<ComponentProps<"tfoot">, "style"> & {
|
|
14
14
|
style?: CSSProperties & TableKnobStyle;
|
|
15
15
|
};
|
|
16
|
-
type TableRowProps = Omit<ComponentProps<"tr">, "style"> & {
|
|
16
|
+
export type TableRowProps = Omit<ComponentProps<"tr">, "style"> & {
|
|
17
17
|
style?: CSSProperties & TableKnobStyle;
|
|
18
18
|
};
|
|
19
|
-
type TableHeadProps = Omit<ComponentProps<"th">, "style"> & {
|
|
19
|
+
export type TableHeadProps = Omit<ComponentProps<"th">, "style"> & {
|
|
20
20
|
style?: CSSProperties & TableKnobStyle;
|
|
21
21
|
};
|
|
22
|
-
type TableCellProps = ComponentProps<"td"> & {
|
|
22
|
+
export type TableCellProps = ComponentProps<"td"> & {
|
|
23
23
|
style?: CSSProperties & TableKnobStyle;
|
|
24
24
|
};
|
|
25
|
-
type TableCaptionProps = Omit<ComponentProps<"caption">, "style"> & {
|
|
25
|
+
export type TableCaptionProps = Omit<ComponentProps<"caption">, "style"> & {
|
|
26
26
|
style?: CSSProperties & TableKnobStyle;
|
|
27
27
|
};
|
|
28
|
-
declare function Table({ className, ...props }: TableProps): import("react").JSX.Element;
|
|
29
|
-
declare function TableHeader({ className, ...props }: TableHeaderProps): import("react").JSX.Element;
|
|
30
|
-
declare function TableBody({ className, ...props }: TableBodyProps): import("react").JSX.Element;
|
|
31
|
-
declare function TableFooter({ className, ...props }: TableFooterProps): import("react").JSX.Element;
|
|
32
|
-
declare function TableRow({ className, ...props }: TableRowProps): import("react").JSX.Element;
|
|
33
|
-
declare function TableHead({ className, ...props }: TableHeadProps): import("react").JSX.Element;
|
|
34
|
-
declare function TableCell({ className, ...props }: TableCellProps): import("react").JSX.Element;
|
|
35
|
-
declare function TableCaption({ className, ...props }: TableCaptionProps): import("react").JSX.Element;
|
|
36
|
-
//#endregion
|
|
37
|
-
export { Table, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableFooter, TableFooterProps, TableHead, TableHeadProps, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps };
|
|
28
|
+
export declare function Table({ className, ...props }: TableProps): import("react").JSX.Element;
|
|
29
|
+
export declare function TableHeader({ className, ...props }: TableHeaderProps): import("react").JSX.Element;
|
|
30
|
+
export declare function TableBody({ className, ...props }: TableBodyProps): import("react").JSX.Element;
|
|
31
|
+
export declare function TableFooter({ className, ...props }: TableFooterProps): import("react").JSX.Element;
|
|
32
|
+
export declare function TableRow({ className, ...props }: TableRowProps): import("react").JSX.Element;
|
|
33
|
+
export declare function TableHead({ className, ...props }: TableHeadProps): import("react").JSX.Element;
|
|
34
|
+
export declare function TableCell({ className, ...props }: TableCellProps): import("react").JSX.Element;
|
|
35
|
+
export declare function TableCaption({ className, ...props }: TableCaptionProps): import("react").JSX.Element;
|
|
36
|
+
//#endregion
|
package/dist/ui/tabs.d.ts
CHANGED
|
@@ -3,17 +3,20 @@ import { ControlSize } from "../control-variants.js";
|
|
|
3
3
|
import { TabsKnobStyle } from "../knob-contracts/tabs-knobs.js";
|
|
4
4
|
import { CSSProperties, ComponentProps } from "react";
|
|
5
5
|
//#region src/ui/tabs.d.ts
|
|
6
|
-
type TabsProps<TValue extends string = string> = Omit<ComponentProps<"div">, "defaultValue" | "onChange"> & ControlledChoice<TValue> & {
|
|
6
|
+
export type TabsProps<TValue extends string = string> = Omit<ComponentProps<"div">, "defaultValue" | "onChange"> & ControlledChoice<TValue> & {
|
|
7
|
+
orientation?: "horizontal" | "vertical";
|
|
7
8
|
style?: CSSProperties & TabsKnobStyle;
|
|
8
9
|
};
|
|
9
|
-
type TabsListVariant = "default" | "browser";
|
|
10
|
-
type TabsListProps = Omit<ComponentProps<"div">, "style"> & {
|
|
10
|
+
export type TabsListVariant = "default" | "browser";
|
|
11
|
+
export type TabsListProps = Omit<ComponentProps<"div">, "style"> & {
|
|
11
12
|
style?: CSSProperties & TabsKnobStyle;
|
|
12
13
|
} & {
|
|
13
14
|
size?: ControlSize;
|
|
14
15
|
variant?: TabsListVariant;
|
|
16
|
+
activateOnFocus?: boolean;
|
|
17
|
+
loopFocus?: boolean;
|
|
15
18
|
};
|
|
16
|
-
type TabsTabProps = Omit<Omit<ComponentProps<"button">, "value">, "style"> & {
|
|
19
|
+
export type TabsTabProps = Omit<Omit<ComponentProps<"button">, "value">, "style"> & {
|
|
17
20
|
style?: CSSProperties & TabsKnobStyle;
|
|
18
21
|
} & {
|
|
19
22
|
value: string;
|
|
@@ -23,14 +26,14 @@ type TabsTabProps = Omit<Omit<ComponentProps<"button">, "value">, "style"> & {
|
|
|
23
26
|
}>;
|
|
24
27
|
nativeButton?: boolean;
|
|
25
28
|
};
|
|
26
|
-
type TabsPanelProps = Omit<ComponentProps<"div">, "style"> & {
|
|
29
|
+
export type TabsPanelProps = Omit<ComponentProps<"div">, "style"> & {
|
|
27
30
|
style?: CSSProperties & TabsKnobStyle;
|
|
28
31
|
} & {
|
|
29
32
|
value: string;
|
|
33
|
+
keepMounted?: boolean;
|
|
30
34
|
};
|
|
31
|
-
declare function Tabs<TValue extends string = string>({ className, onValueChange, children, ...props }: TabsProps<TValue>): import("react").JSX.Element;
|
|
32
|
-
declare function TabsList({ size, variant, className, children, style, ...props }: TabsListProps): import("react").JSX.Element;
|
|
33
|
-
declare function TabsTab({ className, ...props }: TabsTabProps): import("react").JSX.Element;
|
|
34
|
-
declare function TabsPanel({ className, value, ref, ...props }: TabsPanelProps): import("react").JSX.Element;
|
|
35
|
-
//#endregion
|
|
36
|
-
export { Tabs, TabsList, TabsListProps, TabsListVariant, TabsPanel, TabsPanelProps, TabsProps, TabsTab, TabsTabProps };
|
|
35
|
+
export declare function Tabs<TValue extends string = string>({ className, onValueChange, children, ...props }: TabsProps<TValue>): import("react").JSX.Element;
|
|
36
|
+
export declare function TabsList({ size, variant, className, children, style, ...props }: TabsListProps): import("react").JSX.Element;
|
|
37
|
+
export declare function TabsTab({ className, ...props }: TabsTabProps): import("react").JSX.Element;
|
|
38
|
+
export declare function TabsPanel({ className, value, ref, ...props }: TabsPanelProps): import("react").JSX.Element;
|
|
39
|
+
//#endregion
|
package/dist/ui/textarea.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { FieldKnobStyle } from "../knob-contracts/field-knobs.js";
|
|
2
2
|
import { CSSProperties, ComponentProps } from "react";
|
|
3
3
|
//#region src/ui/textarea.d.ts
|
|
4
|
-
type TextareaProps = Omit<ComponentProps<"textarea">, "style"> & {
|
|
4
|
+
export type TextareaProps = Omit<ComponentProps<"textarea">, "style"> & {
|
|
5
5
|
style?: CSSProperties & FieldKnobStyle;
|
|
6
6
|
};
|
|
7
|
-
declare function Textarea({ className, ...props }: TextareaProps): import("react").JSX.Element;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { Textarea, TextareaProps };
|
|
7
|
+
export declare function Textarea({ className, ...props }: TextareaProps): import("react").JSX.Element;
|
|
8
|
+
//#endregion
|
package/dist/ui/timeline.d.ts
CHANGED
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
import { TimelineKnobStyle } from "../knob-contracts/timeline-knobs.js";
|
|
2
2
|
import { CSSProperties, ComponentProps } from "react";
|
|
3
3
|
//#region src/ui/timeline.d.ts
|
|
4
|
-
type TimelineState = "neutral" | "pending" | "running" | "success" | "error";
|
|
5
|
-
type TimelineProps = ComponentProps<"ol"> & {
|
|
4
|
+
export type TimelineState = "neutral" | "pending" | "running" | "success" | "error";
|
|
5
|
+
export type TimelineProps = ComponentProps<"ol"> & {
|
|
6
6
|
style?: CSSProperties & TimelineKnobStyle;
|
|
7
7
|
};
|
|
8
|
-
type TimelineItemProps = ComponentProps<"li"> & {
|
|
8
|
+
export type TimelineItemProps = ComponentProps<"li"> & {
|
|
9
9
|
state?: TimelineState;
|
|
10
10
|
} & {
|
|
11
11
|
style?: CSSProperties & TimelineKnobStyle;
|
|
12
12
|
};
|
|
13
|
-
type TimelineIndicatorProps = Omit<ComponentProps<"span">, "style"> & {
|
|
13
|
+
export type TimelineIndicatorProps = Omit<ComponentProps<"span">, "style"> & {
|
|
14
14
|
style?: CSSProperties & TimelineKnobStyle;
|
|
15
15
|
};
|
|
16
|
-
type TimelineSeparatorProps = Omit<ComponentProps<"span">, "style"> & {
|
|
16
|
+
export type TimelineSeparatorProps = Omit<ComponentProps<"span">, "style"> & {
|
|
17
17
|
style?: CSSProperties & TimelineKnobStyle;
|
|
18
18
|
};
|
|
19
|
-
type TimelineContentProps = ComponentProps<"div"> & {
|
|
19
|
+
export type TimelineContentProps = ComponentProps<"div"> & {
|
|
20
20
|
style?: CSSProperties & TimelineKnobStyle;
|
|
21
21
|
};
|
|
22
|
-
type TimelineTitleProps = Omit<ComponentProps<"div">, "style"> & {
|
|
22
|
+
export type TimelineTitleProps = Omit<ComponentProps<"div">, "style"> & {
|
|
23
23
|
style?: CSSProperties & TimelineKnobStyle;
|
|
24
24
|
};
|
|
25
|
-
type TimelineDescriptionProps = Omit<ComponentProps<"div">, "style"> & {
|
|
25
|
+
export type TimelineDescriptionProps = Omit<ComponentProps<"div">, "style"> & {
|
|
26
26
|
style?: CSSProperties & TimelineKnobStyle;
|
|
27
27
|
};
|
|
28
|
-
type TimelineMetaProps = ComponentProps<"div"> & {
|
|
28
|
+
export type TimelineMetaProps = ComponentProps<"div"> & {
|
|
29
29
|
style?: CSSProperties & TimelineKnobStyle;
|
|
30
30
|
};
|
|
31
|
-
declare function Timeline({ className, ...props }: TimelineProps): import("react").JSX.Element;
|
|
32
|
-
declare function TimelineItem({ state, className, ...props }: TimelineItemProps): import("react").JSX.Element;
|
|
33
|
-
declare function TimelineIndicator({ className, ...props }: TimelineIndicatorProps): import("react").JSX.Element;
|
|
34
|
-
declare function TimelineSeparator({ className, ...props }: TimelineSeparatorProps): import("react").JSX.Element;
|
|
35
|
-
declare function TimelineContent({ className, ...props }: TimelineContentProps): import("react").JSX.Element;
|
|
36
|
-
declare function TimelineTitle({ className, ...props }: TimelineTitleProps): import("react").JSX.Element;
|
|
37
|
-
declare function TimelineDescription({ className, ...props }: TimelineDescriptionProps): import("react").JSX.Element;
|
|
38
|
-
declare function TimelineMeta({ className, ...props }: TimelineMetaProps): import("react").JSX.Element;
|
|
39
|
-
//#endregion
|
|
40
|
-
export { Timeline, TimelineContent, TimelineContentProps, TimelineDescription, TimelineDescriptionProps, TimelineIndicator, TimelineIndicatorProps, TimelineItem, TimelineItemProps, TimelineMeta, TimelineMetaProps, TimelineProps, TimelineSeparator, TimelineSeparatorProps, TimelineState, TimelineTitle, TimelineTitleProps };
|
|
31
|
+
export declare function Timeline({ className, ...props }: TimelineProps): import("react").JSX.Element;
|
|
32
|
+
export declare function TimelineItem({ state, className, ...props }: TimelineItemProps): import("react").JSX.Element;
|
|
33
|
+
export declare function TimelineIndicator({ className, ...props }: TimelineIndicatorProps): import("react").JSX.Element;
|
|
34
|
+
export declare function TimelineSeparator({ className, ...props }: TimelineSeparatorProps): import("react").JSX.Element;
|
|
35
|
+
export declare function TimelineContent({ className, ...props }: TimelineContentProps): import("react").JSX.Element;
|
|
36
|
+
export declare function TimelineTitle({ className, ...props }: TimelineTitleProps): import("react").JSX.Element;
|
|
37
|
+
export declare function TimelineDescription({ className, ...props }: TimelineDescriptionProps): import("react").JSX.Element;
|
|
38
|
+
export declare function TimelineMeta({ className, ...props }: TimelineMetaProps): import("react").JSX.Element;
|
|
39
|
+
//#endregion
|
package/dist/ui/toast.d.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
import { ButtonProps } from "./button.js";
|
|
1
2
|
import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
2
3
|
import { CSSProperties, ReactNode } from "react";
|
|
3
4
|
import { Toast } from "@base-ui/react/toast";
|
|
4
5
|
//#region src/ui/toast.d.ts
|
|
5
|
-
type ToasterProps = {
|
|
6
|
+
export type ToasterProps = {
|
|
6
7
|
className?: string;
|
|
7
8
|
timeout?: number;
|
|
8
9
|
limit?: number;
|
|
9
10
|
rootStyle?: CSSProperties & PopupKnobStyle;
|
|
10
11
|
indicatorStyle?: CSSProperties & PopupKnobStyle;
|
|
11
|
-
actionStyle?:
|
|
12
|
-
closeStyle?:
|
|
12
|
+
actionStyle?: ButtonProps["style"];
|
|
13
|
+
closeStyle?: ButtonProps["style"];
|
|
13
14
|
};
|
|
14
|
-
declare const toastManager: import("@base-ui/react").ToastManager<any>;
|
|
15
|
+
export declare const toastManager: import("@base-ui/react").ToastManager<any>;
|
|
15
16
|
type ToastOptions = Omit<Parameters<typeof toastManager.add>[0], "title">;
|
|
16
|
-
declare const toast: ((title: ReactNode, options?: ToastOptions) => string) & {
|
|
17
|
+
export declare const toast: ((title: ReactNode, options?: ToastOptions) => string) & {
|
|
17
18
|
success: (title: ReactNode, options?: ToastOptions) => string;
|
|
18
19
|
error: (title: ReactNode, options?: ToastOptions) => string;
|
|
19
20
|
warning: (title: ReactNode, options?: ToastOptions) => string;
|
|
@@ -22,7 +23,6 @@ declare const toast: ((title: ReactNode, options?: ToastOptions) => string) & {
|
|
|
22
23
|
promise: (...args: Parameters<typeof toastManager.promise>) => Promise<unknown>;
|
|
23
24
|
dismiss: (id?: string) => void;
|
|
24
25
|
};
|
|
25
|
-
declare const useToast: typeof Toast.useToastManager;
|
|
26
|
-
declare function Toaster({ className, timeout, limit, rootStyle, indicatorStyle, actionStyle, closeStyle }: ToasterProps): import("react").JSX.Element;
|
|
27
|
-
//#endregion
|
|
28
|
-
export { Toaster, ToasterProps, toast, toastManager, useToast };
|
|
26
|
+
export declare const useToast: typeof Toast.useToastManager;
|
|
27
|
+
export declare function Toaster({ className, timeout, limit, rootStyle, indicatorStyle, actionStyle, closeStyle }: ToasterProps): import("react").JSX.Element;
|
|
28
|
+
//#endregion
|
package/dist/ui/toast.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
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";
|
|
5
|
+
import { Button } from "./button.js";
|
|
4
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
7
|
import { Toast } from "@base-ui/react/toast";
|
|
6
8
|
//#region src/ui/toast.tsx
|
|
@@ -41,7 +43,7 @@ function ToastList({ rootStyle, indicatorStyle, actionStyle, closeStyle }) {
|
|
|
41
43
|
style: rootStyle,
|
|
42
44
|
"data-slot": "root",
|
|
43
45
|
"data-surface": "floating",
|
|
44
|
-
className: cn("[--gap:0.75rem] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))]", "absolute right-0 bottom-0 left-auto z-[calc(
|
|
46
|
+
className: cn("[--gap:0.75rem] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))]", "absolute right-0 bottom-0 left-auto z-[calc(var(--z-toast)-var(--toast-index))] h-[var(--height)] w-full select-none data-[expanded]:h-[var(--toast-height)]", "after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']"),
|
|
45
47
|
children: /* @__PURE__ */ jsxs(Toast.Content, {
|
|
46
48
|
"data-control-ui": "toast",
|
|
47
49
|
"data-control-family": "popup",
|
|
@@ -73,24 +75,28 @@ function ToastList({ rootStyle, indicatorStyle, actionStyle, closeStyle }) {
|
|
|
73
75
|
}) : null]
|
|
74
76
|
}),
|
|
75
77
|
entry.actionProps ? /* @__PURE__ */ jsx(Toast.Action, {
|
|
76
|
-
"data-control-ui": "toast",
|
|
77
|
-
"data-control-family": "popup",
|
|
78
|
-
"data-popup-kind": "toast",
|
|
79
|
-
"data-slot": "action",
|
|
80
78
|
style: actionStyle,
|
|
81
|
-
|
|
79
|
+
render: (renderProps) => /* @__PURE__ */ jsx(Button, {
|
|
80
|
+
...renderProps,
|
|
81
|
+
"data-popup-kind": "toast",
|
|
82
|
+
"data-popup-part": "action",
|
|
83
|
+
variant: "surface",
|
|
84
|
+
size: "xs"
|
|
85
|
+
})
|
|
82
86
|
}) : null,
|
|
83
87
|
/* @__PURE__ */ jsx(Toast.Close, {
|
|
84
|
-
"data-control-ui": "toast",
|
|
85
|
-
"data-control-family": "popup",
|
|
86
|
-
"data-popup-kind": "toast",
|
|
87
|
-
"data-slot": "close",
|
|
88
88
|
style: closeStyle,
|
|
89
89
|
"aria-label": "Close",
|
|
90
|
-
|
|
90
|
+
render: (renderProps) => /* @__PURE__ */ jsx(Button, {
|
|
91
|
+
...renderProps,
|
|
92
|
+
"data-popup-kind": "toast",
|
|
93
|
+
"data-popup-part": "close",
|
|
94
|
+
variant: "quiet",
|
|
95
|
+
size: "xs",
|
|
96
|
+
iconOnly: true
|
|
97
|
+
}),
|
|
91
98
|
children: /* @__PURE__ */ jsx("svg", {
|
|
92
99
|
viewBox: "0 0 16 16",
|
|
93
|
-
className: "size-4",
|
|
94
100
|
"aria-hidden": "true",
|
|
95
101
|
fill: "none",
|
|
96
102
|
children: /* @__PURE__ */ jsx("path", {
|
|
@@ -107,6 +113,7 @@ function ToastList({ rootStyle, indicatorStyle, actionStyle, closeStyle }) {
|
|
|
107
113
|
});
|
|
108
114
|
}
|
|
109
115
|
function Toaster({ className, timeout, limit, rootStyle, indicatorStyle, actionStyle, closeStyle }) {
|
|
116
|
+
const skin = useSkin();
|
|
110
117
|
return /* @__PURE__ */ jsx(Toast.Provider, {
|
|
111
118
|
toastManager,
|
|
112
119
|
timeout,
|
|
@@ -116,9 +123,9 @@ function Toaster({ className, timeout, limit, rootStyle, indicatorStyle, actionS
|
|
|
116
123
|
"data-control-family": "popup",
|
|
117
124
|
"data-popup-kind": "toast",
|
|
118
125
|
"data-slot": "viewport",
|
|
119
|
-
"data-skin":
|
|
120
|
-
"data-effects":
|
|
121
|
-
className: cn("fixed right-4 bottom-4 z-
|
|
126
|
+
"data-skin": skin.id,
|
|
127
|
+
"data-effects": controlEffectsAttribute(skin.effects),
|
|
128
|
+
className: cn("fixed right-4 bottom-4 z-(--z-toast) mx-auto w-[calc(100vw-2rem)] sm:right-6 sm:bottom-6 sm:w-[22.5rem]", className),
|
|
122
129
|
children: /* @__PURE__ */ jsx(ToastList, {
|
|
123
130
|
rootStyle,
|
|
124
131
|
indicatorStyle,
|
package/dist/ui/toggle.d.ts
CHANGED
|
@@ -2,20 +2,19 @@ import { ControlledMultiChoice, HoverIndicator } from "../control-props.js";
|
|
|
2
2
|
import { ButtonProps } from "./button.js";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
//#region src/ui/toggle.d.ts
|
|
5
|
-
type ToggleProps = Omit<ButtonProps, "render" | "nativeButton" | "value"> & {
|
|
5
|
+
export type ToggleProps = Omit<ButtonProps, "render" | "nativeButton" | "value"> & {
|
|
6
6
|
pressed?: boolean;
|
|
7
7
|
defaultPressed?: boolean;
|
|
8
8
|
onPressedChange?: (pressed: boolean) => void;
|
|
9
9
|
value?: string;
|
|
10
10
|
showCheck?: boolean;
|
|
11
11
|
};
|
|
12
|
-
type ToggleGroupProps<TValue extends string = string> = Omit<ComponentProps<"div">, "defaultValue" | "onChange"> & ControlledMultiChoice<TValue> & {
|
|
12
|
+
export type ToggleGroupProps<TValue extends string = string> = Omit<ComponentProps<"div">, "defaultValue" | "onChange"> & ControlledMultiChoice<TValue> & {
|
|
13
13
|
multiple?: boolean;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
orientation?: "horizontal" | "vertical";
|
|
16
16
|
indicator?: HoverIndicator;
|
|
17
17
|
};
|
|
18
|
-
declare function Toggle({ variant, size, tone, active, showCheck, className, pressed, defaultPressed, onPressedChange, value, disabled, children, ...props }: ToggleProps): import("react").JSX.Element;
|
|
19
|
-
declare function ToggleGroup<TValue extends string = string>({ className, orientation, indicator, children, ...props }: ToggleGroupProps<TValue>): import("react").JSX.Element;
|
|
20
|
-
//#endregion
|
|
21
|
-
export { Toggle, ToggleGroup, ToggleGroupProps, ToggleProps };
|
|
18
|
+
export declare function Toggle({ variant, size, tone, active, showCheck, className, pressed, defaultPressed, onPressedChange, value, disabled, children, ...props }: ToggleProps): import("react").JSX.Element;
|
|
19
|
+
export declare function ToggleGroup<TValue extends string = string>({ className, orientation, indicator, children, ...props }: ToggleGroupProps<TValue>): import("react").JSX.Element;
|
|
20
|
+
//#endregion
|
package/dist/ui/toggle.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
-
import {
|
|
3
|
+
import { useSkin } from "../skin-provider.js";
|
|
4
4
|
import { ButtonTrackContext, buttonContentClasses, buttonStructureClasses, buttonTrackStructureClasses } from "./button.js";
|
|
5
5
|
import { TrackHighlight } from "../extensions/track-highlight.js";
|
|
6
6
|
import { useContext } from "react";
|
|
@@ -62,7 +62,8 @@ function Toggle({ variant = "surface", size = "sm", tone = "neutral", active, sh
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
function ToggleGroup({ className, orientation = "horizontal", indicator, children, ...props }) {
|
|
65
|
-
const
|
|
65
|
+
const skin = useSkin();
|
|
66
|
+
const resolvedIndicator = indicator ?? skin.indicators?.["toggle-group"] ?? "none";
|
|
66
67
|
const tracksHover = resolvedIndicator === "hover";
|
|
67
68
|
return /* @__PURE__ */ jsx(ButtonTrackContext, {
|
|
68
69
|
value: tracksHover,
|
package/dist/ui/toolbar.d.ts
CHANGED
|
@@ -2,39 +2,38 @@ import { ToolbarKnobStyle } from "../knob-contracts/toolbar-knobs.js";
|
|
|
2
2
|
import { CSSProperties, ComponentProps } from "react";
|
|
3
3
|
import { Toolbar as Toolbar$1 } from "@base-ui/react/toolbar";
|
|
4
4
|
//#region src/ui/toolbar.d.ts
|
|
5
|
-
type ToolbarVariant = "default" | "inverse";
|
|
6
|
-
type ToolbarLinkVariant = "default" | "track";
|
|
7
|
-
type ToolbarProps = Omit<ComponentProps<"div">, "style"> & {
|
|
5
|
+
export type ToolbarVariant = "default" | "inverse" | "floating";
|
|
6
|
+
export type ToolbarLinkVariant = "default" | "track";
|
|
7
|
+
export type ToolbarProps = Omit<ComponentProps<"div">, "style"> & {
|
|
8
8
|
orientation?: "horizontal" | "vertical";
|
|
9
9
|
variant?: ToolbarVariant;
|
|
10
10
|
style?: CSSProperties & ToolbarKnobStyle;
|
|
11
11
|
};
|
|
12
|
-
type ToolbarButtonProps = Omit<ComponentProps<"button">, "style"> & {
|
|
12
|
+
export type ToolbarButtonProps = Omit<ComponentProps<"button">, "style"> & {
|
|
13
13
|
iconOnly?: boolean;
|
|
14
14
|
style?: CSSProperties & ToolbarKnobStyle;
|
|
15
15
|
};
|
|
16
|
-
type ToolbarLinkProps = Omit<ComponentProps<"a">, "style"> & {
|
|
16
|
+
export type ToolbarLinkProps = Omit<ComponentProps<"a">, "style"> & {
|
|
17
17
|
variant?: ToolbarLinkVariant;
|
|
18
18
|
style?: CSSProperties & ToolbarKnobStyle;
|
|
19
19
|
};
|
|
20
|
-
type ToolbarGroupProps = ComponentProps<"div"> & {
|
|
20
|
+
export type ToolbarGroupProps = ComponentProps<"div"> & {
|
|
21
21
|
style?: CSSProperties & ToolbarKnobStyle;
|
|
22
22
|
};
|
|
23
|
-
type ToolbarSeparatorProps = Omit<ComponentProps<"div">, "style"> & {
|
|
23
|
+
export type ToolbarSeparatorProps = Omit<ComponentProps<"div">, "style"> & {
|
|
24
24
|
orientation?: "horizontal" | "vertical";
|
|
25
25
|
style?: CSSProperties & ToolbarKnobStyle;
|
|
26
26
|
};
|
|
27
|
-
type ToolbarInputProps = Omit<ComponentProps<"input">, "style"> & {
|
|
27
|
+
export type ToolbarInputProps = Omit<ComponentProps<"input">, "style"> & {
|
|
28
28
|
style?: CSSProperties & ToolbarKnobStyle;
|
|
29
29
|
};
|
|
30
|
-
declare function Toolbar({ orientation, variant, className, ...props }: ToolbarProps): import("react").JSX.Element;
|
|
30
|
+
export declare function Toolbar({ orientation, variant, className, children, ...props }: ToolbarProps): import("react").JSX.Element;
|
|
31
31
|
type RefinedToolbarButtonProps = ToolbarButtonProps & Pick<ComponentProps<typeof Toolbar$1.Button>, "render">;
|
|
32
|
-
declare function ToolbarButton({ iconOnly, className, ...props }: RefinedToolbarButtonProps): import("react").JSX.Element;
|
|
32
|
+
export declare function ToolbarButton({ iconOnly, className, ...props }: RefinedToolbarButtonProps): import("react").JSX.Element;
|
|
33
33
|
type RefinedToolbarLinkProps = ToolbarLinkProps & Pick<ComponentProps<typeof Toolbar$1.Link>, "render">;
|
|
34
|
-
declare function ToolbarLink({ variant, className, ...props }: RefinedToolbarLinkProps): import("react").JSX.Element;
|
|
35
|
-
declare function ToolbarGroup({ className, ...props }: ToolbarGroupProps): import("react").JSX.Element;
|
|
36
|
-
declare function ToolbarSeparator({ orientation, className, ...props }: ToolbarSeparatorProps): import("react").JSX.Element;
|
|
34
|
+
export declare function ToolbarLink({ variant, className, ...props }: RefinedToolbarLinkProps): import("react").JSX.Element;
|
|
35
|
+
export declare function ToolbarGroup({ className, ...props }: ToolbarGroupProps): import("react").JSX.Element;
|
|
36
|
+
export declare function ToolbarSeparator({ orientation, className, ...props }: ToolbarSeparatorProps): import("react").JSX.Element;
|
|
37
37
|
type RefinedToolbarInputProps = ToolbarInputProps & Pick<ComponentProps<typeof Toolbar$1.Input>, "render">;
|
|
38
|
-
declare function ToolbarInput({ className, ...props }: RefinedToolbarInputProps): import("react").JSX.Element;
|
|
39
|
-
//#endregion
|
|
40
|
-
export { Toolbar, ToolbarButton, ToolbarButtonProps, ToolbarGroup, ToolbarGroupProps, ToolbarInput, ToolbarInputProps, ToolbarLink, ToolbarLinkProps, ToolbarLinkVariant, ToolbarProps, ToolbarSeparator, ToolbarSeparatorProps, ToolbarVariant };
|
|
38
|
+
export declare function ToolbarInput({ className, ...props }: RefinedToolbarInputProps): import("react").JSX.Element;
|
|
39
|
+
//#endregion
|
package/dist/ui/toolbar.js
CHANGED
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Toolbar as Toolbar$1 } from "@base-ui/react/toolbar";
|
|
5
5
|
//#region src/ui/toolbar.tsx
|
|
6
|
-
function Toolbar({ orientation = "horizontal", variant = "default", className, ...props }) {
|
|
7
|
-
return /* @__PURE__ */
|
|
6
|
+
function Toolbar({ orientation = "horizontal", variant = "default", className, children, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsxs(Toolbar$1.Root, {
|
|
8
8
|
orientation,
|
|
9
9
|
"data-control-ui": "toolbar",
|
|
10
10
|
"data-control-family": "toolbar",
|
|
11
11
|
"data-slot": "root",
|
|
12
12
|
"data-variant": variant,
|
|
13
13
|
className: cn("group/toolbar inline-flex", orientation === "vertical" ? "flex-col items-stretch" : "items-center", className),
|
|
14
|
-
...props
|
|
14
|
+
...props,
|
|
15
|
+
children: [variant === "floating" && /* @__PURE__ */ jsx("div", {
|
|
16
|
+
"aria-hidden": "true",
|
|
17
|
+
"data-control-ui": "toolbar",
|
|
18
|
+
"data-control-family": "popup",
|
|
19
|
+
"data-popup-kind": "toolbar",
|
|
20
|
+
"data-popup-part": "surface",
|
|
21
|
+
"data-popup-static": "",
|
|
22
|
+
"data-surface": "floating",
|
|
23
|
+
"data-slot": "surface",
|
|
24
|
+
className: "pointer-events-none absolute inset-0 -z-1"
|
|
25
|
+
}), children]
|
|
15
26
|
});
|
|
16
27
|
}
|
|
17
28
|
function ToolbarButton({ iconOnly = false, className, ...props }) {
|
package/dist/ui/tooltip.d.ts
CHANGED
|
@@ -2,26 +2,19 @@ import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
|
2
2
|
import { CSSProperties, ComponentProps, Ref } from "react";
|
|
3
3
|
import { Tooltip as Tooltip$1, TooltipPopupProps, TooltipPositionerProps } from "@base-ui/react/tooltip";
|
|
4
4
|
//#region src/ui/tooltip.d.ts
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
timeout?: number;
|
|
8
|
-
delayDuration?: number;
|
|
9
|
-
skipDelayDuration?: number;
|
|
10
|
-
};
|
|
11
|
-
declare function TooltipProvider({ delay, delayDuration, timeout, skipDelayDuration, ...props }: TooltipProviderProps): import("react").JSX.Element;
|
|
12
|
-
declare function Tooltip(props: ComponentProps<typeof Tooltip$1.Root>): import("react").JSX.Element;
|
|
5
|
+
export declare function TooltipProvider({ delay, ...props }: ComponentProps<typeof Tooltip$1.Provider>): import("react").JSX.Element;
|
|
6
|
+
export declare function Tooltip(props: ComponentProps<typeof Tooltip$1.Root>): import("react").JSX.Element;
|
|
13
7
|
type TooltipTriggerProps = ComponentProps<typeof Tooltip$1.Trigger> & {
|
|
14
8
|
ref?: Ref<HTMLButtonElement>;
|
|
15
9
|
};
|
|
16
|
-
declare function TooltipTrigger({ render, children, ref, ...props }: TooltipTriggerProps): import("react").JSX.Element;
|
|
10
|
+
export declare function TooltipTrigger({ render, children, ref, ...props }: TooltipTriggerProps): import("react").JSX.Element;
|
|
17
11
|
type TooltipContentPositionerProps = Omit<TooltipPositionerProps, keyof TooltipPopupProps>;
|
|
18
|
-
type TooltipContentProps = Omit<TooltipPopupProps & Omit<TooltipContentPositionerProps, "style">, "style"> & {
|
|
12
|
+
export type TooltipContentProps = Omit<TooltipPopupProps & Omit<TooltipContentPositionerProps, "style">, "style"> & {
|
|
19
13
|
style?: CSSProperties & PopupKnobStyle;
|
|
20
14
|
} & {
|
|
21
15
|
arrow?: boolean;
|
|
22
16
|
hidden?: boolean;
|
|
23
17
|
ref?: Ref<HTMLDivElement>;
|
|
24
18
|
};
|
|
25
|
-
declare function TooltipContent({ className, children, side, sideOffset, align, alignOffset, arrowPadding, anchor, positionMethod, collisionBoundary, collisionPadding, sticky, disableAnchorTracking, collisionAvoidance, arrow, hidden, ref, ...props }: TooltipContentProps): import("react").JSX.Element | null;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { Tooltip, TooltipContent, TooltipContentProps, TooltipProvider, TooltipTrigger };
|
|
19
|
+
export declare function TooltipContent({ className, children, side, sideOffset, align, alignOffset, arrowPadding, anchor, positionMethod, collisionBoundary, collisionPadding, sticky, disableAnchorTracking, collisionAvoidance, arrow, hidden, ref, ...props }: TooltipContentProps): import("react").JSX.Element | null;
|
|
20
|
+
//#endregion
|
package/dist/ui/tooltip.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
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 { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
6
7
|
//#region src/ui/tooltip.tsx
|
|
7
|
-
function TooltipProvider({ delay
|
|
8
|
-
const resolvedDelay = delay ?? delayDuration;
|
|
9
|
-
const resolvedTimeout = timeout ?? skipDelayDuration;
|
|
8
|
+
function TooltipProvider({ delay = 500, ...props }) {
|
|
10
9
|
return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
|
|
11
|
-
|
|
12
|
-
...resolvedTimeout !== void 0 ? { timeout: resolvedTimeout } : {},
|
|
10
|
+
delay,
|
|
13
11
|
...props
|
|
14
12
|
});
|
|
15
13
|
}
|
|
@@ -25,6 +23,7 @@ function TooltipTrigger({ render, children, ref, ...props }) {
|
|
|
25
23
|
});
|
|
26
24
|
}
|
|
27
25
|
function TooltipContent({ className, children, side = "top", sideOffset = 8, align = "center", alignOffset = 0, arrowPadding = 10, anchor, positionMethod, collisionBoundary, collisionPadding, sticky, disableAnchorTracking, collisionAvoidance, arrow = true, hidden = false, ref, ...props }) {
|
|
26
|
+
const skin = useSkin();
|
|
28
27
|
if (hidden) return null;
|
|
29
28
|
const positionerProps = {
|
|
30
29
|
side,
|
|
@@ -45,9 +44,9 @@ function TooltipContent({ className, children, side = "top", sideOffset = 8, ali
|
|
|
45
44
|
"data-popup-kind": "tooltip",
|
|
46
45
|
"data-control-family": "popup",
|
|
47
46
|
"data-slot": "positioner",
|
|
48
|
-
"data-skin":
|
|
49
|
-
"data-effects":
|
|
50
|
-
className: "z-
|
|
47
|
+
"data-skin": skin.id,
|
|
48
|
+
"data-effects": controlEffectsAttribute(skin.effects),
|
|
49
|
+
className: "z-(--z-tooltip)",
|
|
51
50
|
...positionerProps,
|
|
52
51
|
children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
|
|
53
52
|
ref,
|
package/dist/ui/tree.d.ts
CHANGED
|
@@ -2,19 +2,19 @@ import { RenderProp, SelectionIndicator } from "../control-props.js";
|
|
|
2
2
|
import { TreeKnobStyle } from "../knob-contracts/tree-knobs.js";
|
|
3
3
|
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
4
4
|
//#region src/ui/tree.d.ts
|
|
5
|
-
type TreeSelectionMode = "none" | "single" | "multiple";
|
|
6
|
-
type TreeInteractionReason = "pointer" | "keyboard" | "imperative";
|
|
7
|
-
type TreeSelectionChangeDetails = {
|
|
5
|
+
export type TreeSelectionMode = "none" | "single" | "multiple";
|
|
6
|
+
export type TreeInteractionReason = "pointer" | "keyboard" | "imperative";
|
|
7
|
+
export type TreeSelectionChangeDetails = {
|
|
8
8
|
value: string;
|
|
9
9
|
reason: TreeInteractionReason;
|
|
10
10
|
};
|
|
11
|
-
type TreeExpandedChangeDetails = {
|
|
11
|
+
export type TreeExpandedChangeDetails = {
|
|
12
12
|
value: string;
|
|
13
13
|
expanded: boolean;
|
|
14
14
|
reason: TreeInteractionReason;
|
|
15
15
|
};
|
|
16
|
-
type TreeSelectionIndicator = SelectionIndicator;
|
|
17
|
-
type TreeProps = Omit<Omit<ComponentProps<"ul">, "onChange" | "defaultValue">, "style"> & {
|
|
16
|
+
export type TreeSelectionIndicator = SelectionIndicator;
|
|
17
|
+
export type TreeProps = Omit<Omit<ComponentProps<"ul">, "onChange" | "defaultValue">, "style"> & {
|
|
18
18
|
style?: CSSProperties & TreeKnobStyle;
|
|
19
19
|
} & {
|
|
20
20
|
selectionMode?: TreeSelectionMode;
|
|
@@ -26,31 +26,30 @@ type TreeProps = Omit<Omit<ComponentProps<"ul">, "onChange" | "defaultValue">, "
|
|
|
26
26
|
onExpandedChange?: (expanded: string[], details: TreeExpandedChangeDetails) => void;
|
|
27
27
|
indicator?: TreeSelectionIndicator;
|
|
28
28
|
};
|
|
29
|
-
type TreeItemProps = Omit<ComponentProps<"li">, "value"> & {
|
|
29
|
+
export type TreeItemProps = Omit<ComponentProps<"li">, "value"> & {
|
|
30
30
|
value: string;
|
|
31
31
|
disabled?: boolean;
|
|
32
32
|
label?: string;
|
|
33
33
|
children?: ReactNode;
|
|
34
34
|
};
|
|
35
|
-
type TreeItemTriggerProps = Omit<ComponentProps<"div">, "style"> & {
|
|
35
|
+
export type TreeItemTriggerProps = Omit<ComponentProps<"div">, "style"> & {
|
|
36
36
|
style?: CSSProperties & TreeKnobStyle;
|
|
37
37
|
} & {
|
|
38
38
|
render?: RenderProp<ComponentProps<"div">>;
|
|
39
39
|
};
|
|
40
|
-
type TreeItemIndicatorProps = Omit<ComponentProps<"span">, "style"> & {
|
|
40
|
+
export type TreeItemIndicatorProps = Omit<ComponentProps<"span">, "style"> & {
|
|
41
41
|
style?: CSSProperties & TreeKnobStyle;
|
|
42
42
|
};
|
|
43
|
-
type TreeItemLabelProps = ComponentProps<"span"> & {
|
|
43
|
+
export type TreeItemLabelProps = ComponentProps<"span"> & {
|
|
44
44
|
render?: RenderProp<ComponentProps<"span">>;
|
|
45
45
|
};
|
|
46
|
-
type TreeItemContentProps = ComponentProps<"div"> & {
|
|
46
|
+
export type TreeItemContentProps = ComponentProps<"div"> & {
|
|
47
47
|
style?: CSSProperties & TreeKnobStyle;
|
|
48
48
|
};
|
|
49
|
-
declare function Tree({ selectionMode, indicator, value, defaultValue, onValueChange, expandedValue, defaultExpandedValue, onExpandedChange, className, style, children, onKeyDown, onFocusCapture, ...props }: TreeProps): import("react").JSX.Element;
|
|
50
|
-
declare function TreeItem({ value, disabled, label, className, style, children, ref, ...props }: TreeItemProps): import("react").JSX.Element;
|
|
51
|
-
declare function TreeItemTrigger({ className, children, onClick, render, ...props }: TreeItemTriggerProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
52
|
-
declare function TreeItemIndicator({ className, children, ...props }: TreeItemIndicatorProps): import("react").JSX.Element;
|
|
53
|
-
declare function TreeItemLabel({ className, children, render, ref, ...props }: TreeItemLabelProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
54
|
-
declare function TreeItemContent({ className, children, ...props }: TreeItemContentProps): import("react").JSX.Element;
|
|
55
|
-
//#endregion
|
|
56
|
-
export { Tree, TreeExpandedChangeDetails, TreeInteractionReason, TreeItem, TreeItemContent, TreeItemContentProps, TreeItemIndicator, TreeItemIndicatorProps, TreeItemLabel, TreeItemLabelProps, TreeItemProps, TreeItemTrigger, TreeItemTriggerProps, TreeProps, TreeSelectionChangeDetails, TreeSelectionIndicator, TreeSelectionMode };
|
|
49
|
+
export declare function Tree({ selectionMode, indicator, value, defaultValue, onValueChange, expandedValue, defaultExpandedValue, onExpandedChange, className, style, children, onKeyDown, onFocusCapture, ...props }: TreeProps): import("react").JSX.Element;
|
|
50
|
+
export declare function TreeItem({ value, disabled, label, className, style, children, ref, ...props }: TreeItemProps): import("react").JSX.Element;
|
|
51
|
+
export declare function TreeItemTrigger({ className, children, onClick, render, ...props }: TreeItemTriggerProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
52
|
+
export declare function TreeItemIndicator({ className, children, ...props }: TreeItemIndicatorProps): import("react").JSX.Element;
|
|
53
|
+
export declare function TreeItemLabel({ className, children, render, ref, ...props }: TreeItemLabelProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
54
|
+
export declare function TreeItemContent({ className, children, ...props }: TreeItemContentProps): import("react").JSX.Element;
|
|
55
|
+
//#endregion
|
package/dist/ui/tree.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
-
import {
|
|
3
|
+
import { useSkin } from "../skin-provider.js";
|
|
4
4
|
import { TrackHighlight } from "../extensions/track-highlight.js";
|
|
5
5
|
import { Children, createContext, isValidElement, useContext, useRef, useState } from "react";
|
|
6
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -128,6 +128,7 @@ function handleTreeKeyDown(event, ctx, typeahead) {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
function Tree({ selectionMode = "single", indicator, value, defaultValue, onValueChange, expandedValue, defaultExpandedValue, onExpandedChange, className, style, children, onKeyDown, onFocusCapture, ...props }) {
|
|
131
|
+
const skin = useSkin();
|
|
131
132
|
const [selectedState, setSelectedState] = useState(() => new Set(defaultValue));
|
|
132
133
|
const [expandedState, setExpandedState] = useState(() => new Set(defaultExpandedValue));
|
|
133
134
|
const [focusedValue, setFocusedValue] = useState(null);
|
|
@@ -194,7 +195,7 @@ function Tree({ selectionMode = "single", indicator, value, defaultValue, onValu
|
|
|
194
195
|
reason
|
|
195
196
|
});
|
|
196
197
|
};
|
|
197
|
-
const resolvedIndicator = indicator ??
|
|
198
|
+
const resolvedIndicator = indicator ?? skin.indicators?.tree ?? "none";
|
|
198
199
|
const contextValue = {
|
|
199
200
|
selectionMode,
|
|
200
201
|
indicator: resolvedIndicator,
|