@ctrl-ui/react 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -0
- package/dist/action-bar.d.ts +44 -0
- package/dist/action-bar.js +89 -0
- package/dist/activity.d.ts +53 -0
- package/dist/activity.js +188 -0
- package/dist/audio-recorder.d.ts +32 -0
- package/dist/audio-recorder.js +235 -0
- package/dist/audio-visualizer.d.ts +12 -0
- package/dist/audio-visualizer.js +58 -0
- package/dist/blocks/chat.d.ts +10 -0
- package/dist/blocks/chat.js +12 -0
- package/dist/blocks/coding-agent.d.ts +61 -0
- package/dist/blocks/coding-agent.js +255 -0
- package/dist/blocks/file-explorer-data.d.ts +57 -0
- package/dist/blocks/file-explorer-data.js +74 -0
- package/dist/blocks/file-explorer.d.ts +24 -0
- package/dist/blocks/file-explorer.js +427 -0
- package/dist/blocks/settings-data.d.ts +36 -0
- package/dist/blocks/settings-data.js +66 -0
- package/dist/blocks/settings.d.ts +19 -0
- package/dist/blocks/settings.js +282 -0
- package/dist/blocks/theme-toggle.d.ts +43 -0
- package/dist/blocks/theme-toggle.js +180 -0
- package/dist/chat-composer-attachment.d.ts +55 -0
- package/dist/chat-composer-attachment.js +267 -0
- package/dist/chat-composer-editor/extensions/mention.d.ts +14 -0
- package/dist/chat-composer-editor/extensions/mention.js +278 -0
- package/dist/chat-composer-editor/ghost.d.ts +5 -0
- package/dist/chat-composer-editor/ghost.js +55 -0
- package/dist/chat-composer-editor/schema.d.ts +6 -0
- package/dist/chat-composer-editor/schema.js +25 -0
- package/dist/chat-composer-editor/serialize.d.ts +6 -0
- package/dist/chat-composer-editor/serialize.js +16 -0
- package/dist/chat-composer-editor/types.d.ts +29 -0
- package/dist/chat-composer-editor/types.js +0 -0
- package/dist/chat-composer-editor.d.ts +9 -0
- package/dist/chat-composer-editor.js +154 -0
- package/dist/chat-composer.d.ts +60 -0
- package/dist/chat-composer.js +134 -0
- package/dist/chat-layout.d.ts +27 -0
- package/dist/chat-layout.js +114 -0
- package/dist/chat-message.d.ts +31 -0
- package/dist/chat-message.js +95 -0
- package/dist/code-block-editor.d.ts +59 -0
- package/dist/code-block-editor.js +250 -0
- package/dist/context-model.d.ts +33 -0
- package/dist/context-model.js +52 -0
- package/dist/context.d.ts +47 -0
- package/dist/context.js +335 -0
- package/dist/control-props.d.ts +28 -0
- package/dist/control-props.js +4 -0
- package/dist/control-variants.d.ts +8 -0
- package/dist/control-variants.js +14 -0
- package/dist/dynamic-notification-glass.d.ts +10 -0
- package/dist/dynamic-notification-glass.js +311 -0
- package/dist/dynamic-notification-liquid.d.ts +24 -0
- package/dist/dynamic-notification-liquid.js +682 -0
- package/dist/dynamic-notification-siri-wave.d.ts +4 -0
- package/dist/dynamic-notification-siri-wave.js +82 -0
- package/dist/dynamic-notification.d.ts +74 -0
- package/dist/dynamic-notification.js +342 -0
- package/dist/environment-variables.d.ts +124 -0
- package/dist/environment-variables.js +492 -0
- package/dist/extensions/create-track-highlight.d.ts +12 -0
- package/dist/extensions/create-track-highlight.js +147 -0
- package/dist/extensions/track-highlight.d.ts +22 -0
- package/dist/extensions/track-highlight.js +52 -0
- package/dist/hooks/use-audio-recorder.d.ts +107 -0
- package/dist/hooks/use-audio-recorder.js +577 -0
- package/dist/hooks/use-chat-composer.d.ts +56 -0
- package/dist/hooks/use-chat-composer.js +63 -0
- package/dist/hooks/use-chat-message.d.ts +28 -0
- package/dist/hooks/use-chat-message.js +24 -0
- package/dist/hooks/use-color-area.d.ts +18 -0
- package/dist/hooks/use-color-area.js +60 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts +22 -0
- package/dist/hooks/use-copy-to-clipboard.js +90 -0
- package/dist/hooks/use-dropzone.d.ts +59 -0
- package/dist/hooks/use-dropzone.js +372 -0
- package/dist/hooks/use-dynamic-notification.d.ts +37 -0
- package/dist/hooks/use-dynamic-notification.js +87 -0
- package/dist/hooks/use-environment-variables.d.ts +51 -0
- package/dist/hooks/use-environment-variables.js +188 -0
- package/dist/hooks/use-mobile.d.ts +5 -0
- package/dist/hooks/use-mobile.js +29 -0
- package/dist/hooks/use-textarea-trigger-menu.d.ts +8 -0
- package/dist/hooks/use-textarea-trigger-menu.js +69 -0
- package/dist/hooks/use-trigger-menu.d.ts +49 -0
- package/dist/hooks/use-trigger-menu.js +102 -0
- package/dist/hooks/use-user-ask.d.ts +48 -0
- package/dist/hooks/use-user-ask.js +167 -0
- package/dist/inline-attachment.d.ts +37 -0
- package/dist/inline-attachment.js +192 -0
- package/dist/inline-citation.d.ts +56 -0
- package/dist/inline-citation.js +319 -0
- package/dist/knob-contracts/accordion-knobs.d.ts +5 -0
- package/dist/knob-contracts/accordion-knobs.js +9 -0
- package/dist/knob-contracts/action-bar-knobs.d.ts +5 -0
- package/dist/knob-contracts/action-bar-knobs.js +4 -0
- package/dist/knob-contracts/activity-knobs.d.ts +5 -0
- package/dist/knob-contracts/activity-knobs.js +9 -0
- package/dist/knob-contracts/alert-knobs.d.ts +5 -0
- package/dist/knob-contracts/alert-knobs.js +9 -0
- package/dist/knob-contracts/audio-recorder-knobs.d.ts +5 -0
- package/dist/knob-contracts/audio-recorder-knobs.js +9 -0
- package/dist/knob-contracts/audio-visualizer-knobs.d.ts +5 -0
- package/dist/knob-contracts/audio-visualizer-knobs.js +9 -0
- package/dist/knob-contracts/avatar-knobs.d.ts +5 -0
- package/dist/knob-contracts/avatar-knobs.js +9 -0
- package/dist/knob-contracts/badge-knobs.d.ts +5 -0
- package/dist/knob-contracts/badge-knobs.js +9 -0
- package/dist/knob-contracts/button-group-knobs.d.ts +5 -0
- package/dist/knob-contracts/button-group-knobs.js +9 -0
- package/dist/knob-contracts/button-knobs.d.ts +5 -0
- package/dist/knob-contracts/button-knobs.js +25 -0
- package/dist/knob-contracts/calendar-knobs.d.ts +5 -0
- package/dist/knob-contracts/calendar-knobs.js +10 -0
- package/dist/knob-contracts/card-knobs.d.ts +5 -0
- package/dist/knob-contracts/card-knobs.js +11 -0
- package/dist/knob-contracts/chat-composer-attachment-knobs.d.ts +5 -0
- package/dist/knob-contracts/chat-composer-attachment-knobs.js +11 -0
- package/dist/knob-contracts/chat-composer-knobs.d.ts +5 -0
- package/dist/knob-contracts/chat-composer-knobs.js +18 -0
- package/dist/knob-contracts/chat-layout-knobs.d.ts +5 -0
- package/dist/knob-contracts/chat-layout-knobs.js +11 -0
- package/dist/knob-contracts/chat-message-knobs.d.ts +5 -0
- package/dist/knob-contracts/chat-message-knobs.js +17 -0
- package/dist/knob-contracts/choice-knobs.d.ts +5 -0
- package/dist/knob-contracts/choice-knobs.js +9 -0
- package/dist/knob-contracts/code-block-editor-knobs.d.ts +5 -0
- package/dist/knob-contracts/code-block-editor-knobs.js +11 -0
- package/dist/knob-contracts/code-diff-knobs.d.ts +5 -0
- package/dist/knob-contracts/code-diff-knobs.js +18 -0
- package/dist/knob-contracts/code-knobs.d.ts +5 -0
- package/dist/knob-contracts/code-knobs.js +11 -0
- package/dist/knob-contracts/collapsible-knobs.d.ts +5 -0
- package/dist/knob-contracts/collapsible-knobs.js +4 -0
- package/dist/knob-contracts/color-picker-knobs.d.ts +5 -0
- package/dist/knob-contracts/color-picker-knobs.js +12 -0
- package/dist/knob-contracts/context-knobs.d.ts +5 -0
- package/dist/knob-contracts/context-knobs.js +13 -0
- package/dist/knob-contracts/dockable-panel-knobs.d.ts +5 -0
- package/dist/knob-contracts/dockable-panel-knobs.js +12 -0
- package/dist/knob-contracts/dropzone-knobs.d.ts +5 -0
- package/dist/knob-contracts/dropzone-knobs.js +11 -0
- package/dist/knob-contracts/dynamic-notification-knobs.d.ts +5 -0
- package/dist/knob-contracts/dynamic-notification-knobs.js +18 -0
- package/dist/knob-contracts/empty-knobs.d.ts +5 -0
- package/dist/knob-contracts/empty-knobs.js +12 -0
- package/dist/knob-contracts/environment-variables-knobs.d.ts +5 -0
- package/dist/knob-contracts/environment-variables-knobs.js +11 -0
- package/dist/knob-contracts/field-knobs.d.ts +5 -0
- package/dist/knob-contracts/field-knobs.js +16 -0
- package/dist/knob-contracts/gradient-editor-knobs.d.ts +5 -0
- package/dist/knob-contracts/gradient-editor-knobs.js +13 -0
- package/dist/knob-contracts/infinite-canvas-knobs.d.ts +5 -0
- package/dist/knob-contracts/infinite-canvas-knobs.js +13 -0
- package/dist/knob-contracts/inline-attachment-knobs.d.ts +5 -0
- package/dist/knob-contracts/inline-attachment-knobs.js +14 -0
- package/dist/knob-contracts/inline-citation-knobs.d.ts +5 -0
- package/dist/knob-contracts/inline-citation-knobs.js +14 -0
- package/dist/knob-contracts/item-knobs.d.ts +5 -0
- package/dist/knob-contracts/item-knobs.js +10 -0
- package/dist/knob-contracts/kbd-knobs.d.ts +5 -0
- package/dist/knob-contracts/kbd-knobs.js +10 -0
- package/dist/knob-contracts/markdown-block-knobs.d.ts +5 -0
- package/dist/knob-contracts/markdown-block-knobs.js +11 -0
- package/dist/knob-contracts/markdown-knobs.d.ts +5 -0
- package/dist/knob-contracts/markdown-knobs.js +14 -0
- package/dist/knob-contracts/morphing-panel-knobs.d.ts +5 -0
- package/dist/knob-contracts/morphing-panel-knobs.js +11 -0
- package/dist/knob-contracts/pagination-knobs.d.ts +5 -0
- package/dist/knob-contracts/pagination-knobs.js +10 -0
- package/dist/knob-contracts/phone-input-knobs.d.ts +5 -0
- package/dist/knob-contracts/phone-input-knobs.js +10 -0
- package/dist/knob-contracts/popup-knobs.d.ts +5 -0
- package/dist/knob-contracts/popup-knobs.js +21 -0
- package/dist/knob-contracts/range-knobs.d.ts +5 -0
- package/dist/knob-contracts/range-knobs.js +13 -0
- package/dist/knob-contracts/resizable-knobs.d.ts +5 -0
- package/dist/knob-contracts/resizable-knobs.js +14 -0
- package/dist/knob-contracts/rich-tooltip-knobs.d.ts +5 -0
- package/dist/knob-contracts/rich-tooltip-knobs.js +13 -0
- package/dist/knob-contracts/scroll-area-knobs.d.ts +5 -0
- package/dist/knob-contracts/scroll-area-knobs.js +8 -0
- package/dist/knob-contracts/separator-knobs.d.ts +5 -0
- package/dist/knob-contracts/separator-knobs.js +4 -0
- package/dist/knob-contracts/sidebar-knobs.d.ts +5 -0
- package/dist/knob-contracts/sidebar-knobs.js +26 -0
- package/dist/knob-contracts/skeleton-knobs.d.ts +5 -0
- package/dist/knob-contracts/skeleton-knobs.js +4 -0
- package/dist/knob-contracts/source-badge-knobs.d.ts +5 -0
- package/dist/knob-contracts/source-badge-knobs.js +11 -0
- package/dist/knob-contracts/spinner-knobs.d.ts +5 -0
- package/dist/knob-contracts/spinner-knobs.js +4 -0
- package/dist/knob-contracts/stepper-knobs.d.ts +5 -0
- package/dist/knob-contracts/stepper-knobs.js +11 -0
- package/dist/knob-contracts/switch-knobs.d.ts +5 -0
- package/dist/knob-contracts/switch-knobs.js +12 -0
- package/dist/knob-contracts/table-knobs.d.ts +5 -0
- package/dist/knob-contracts/table-knobs.js +12 -0
- package/dist/knob-contracts/table-of-contents-knobs.d.ts +5 -0
- package/dist/knob-contracts/table-of-contents-knobs.js +8 -0
- package/dist/knob-contracts/tabs-knobs.d.ts +5 -0
- package/dist/knob-contracts/tabs-knobs.js +16 -0
- package/dist/knob-contracts/task-list-knobs.d.ts +5 -0
- package/dist/knob-contracts/task-list-knobs.js +14 -0
- package/dist/knob-contracts/thread-rail-knobs.d.ts +5 -0
- package/dist/knob-contracts/thread-rail-knobs.js +14 -0
- package/dist/knob-contracts/timeline-knobs.d.ts +5 -0
- package/dist/knob-contracts/timeline-knobs.js +12 -0
- package/dist/knob-contracts/toolbar-knobs.d.ts +5 -0
- package/dist/knob-contracts/toolbar-knobs.js +20 -0
- package/dist/knob-contracts/track-highlight-knobs.d.ts +5 -0
- package/dist/knob-contracts/track-highlight-knobs.js +11 -0
- package/dist/knob-contracts/transcript-divider-knobs.d.ts +5 -0
- package/dist/knob-contracts/transcript-divider-knobs.js +10 -0
- package/dist/knob-contracts/tree-knobs.d.ts +5 -0
- package/dist/knob-contracts/tree-knobs.js +13 -0
- package/dist/knob-contracts/user-ask-knobs.d.ts +5 -0
- package/dist/knob-contracts/user-ask-knobs.js +17 -0
- package/dist/lib/cn.d.ts +5 -0
- package/dist/lib/cn.js +34 -0
- package/dist/lib/code-block-shiki.d.ts +9 -0
- package/dist/lib/code-block-shiki.js +6 -0
- package/dist/lib/code-tokens.d.ts +28 -0
- package/dist/lib/code-tokens.js +160 -0
- package/dist/lib/color.d.ts +72 -0
- package/dist/lib/color.js +490 -0
- package/dist/lib/contrast.d.ts +30 -0
- package/dist/lib/contrast.js +64 -0
- package/dist/lib/diff.d.ts +50 -0
- package/dist/lib/diff.js +315 -0
- package/dist/lib/dropzone-validation.d.ts +66 -0
- package/dist/lib/dropzone-validation.js +228 -0
- package/dist/lib/env-file.d.ts +28 -0
- package/dist/lib/env-file.js +218 -0
- package/dist/lib/format-audio-recorder-duration.d.ts +4 -0
- package/dist/lib/format-audio-recorder-duration.js +7 -0
- package/dist/lib/liquid-glass-optics.d.ts +4 -0
- package/dist/lib/liquid-glass-optics.js +96 -0
- package/dist/lib/phone-input-format.d.ts +6 -0
- package/dist/lib/phone-input-format.js +26 -0
- package/dist/lib/phone-number.d.ts +18 -0
- package/dist/lib/phone-number.js +28 -0
- package/dist/lib/trigger-detect.d.ts +15 -0
- package/dist/lib/trigger-detect.js +77 -0
- package/dist/markdown-block.d.ts +25 -0
- package/dist/markdown-block.js +77 -0
- package/dist/skin.config.d.ts +5 -0
- package/dist/skin.config.js +4 -0
- package/dist/skin.d.ts +69 -0
- package/dist/skin.js +62 -0
- package/dist/source-badge.d.ts +23 -0
- package/dist/source-badge.js +72 -0
- package/dist/styles/chat-composer-editor.css +44 -0
- package/dist/styles/code.css +57 -0
- package/dist/styles/effects.css +126 -0
- package/dist/styles/index.css +81 -0
- package/dist/styles/recipes/accordion.css +87 -0
- package/dist/styles/recipes/action-bar.css +19 -0
- package/dist/styles/recipes/activity.css +129 -0
- package/dist/styles/recipes/alert.css +75 -0
- package/dist/styles/recipes/audio-recorder.css +102 -0
- package/dist/styles/recipes/audio-visualizer.css +90 -0
- package/dist/styles/recipes/avatar.css +52 -0
- package/dist/styles/recipes/badge.css +110 -0
- package/dist/styles/recipes/button-group.css +64 -0
- package/dist/styles/recipes/button.css +305 -0
- package/dist/styles/recipes/calendar.css +152 -0
- package/dist/styles/recipes/card.css +93 -0
- package/dist/styles/recipes/chat-composer-attachment.css +177 -0
- package/dist/styles/recipes/chat-composer.css +195 -0
- package/dist/styles/recipes/chat-layout.css +108 -0
- package/dist/styles/recipes/chat-message.css +160 -0
- package/dist/styles/recipes/choice.css +108 -0
- package/dist/styles/recipes/code-block-editor.css +136 -0
- package/dist/styles/recipes/code-diff.css +256 -0
- package/dist/styles/recipes/code.css +136 -0
- package/dist/styles/recipes/collapsible.css +27 -0
- package/dist/styles/recipes/color-picker-details.css +61 -0
- package/dist/styles/recipes/color-picker-values.css +117 -0
- package/dist/styles/recipes/color-picker.css +158 -0
- package/dist/styles/recipes/context.css +237 -0
- package/dist/styles/recipes/dockable-panel.css +106 -0
- package/dist/styles/recipes/dropzone.css +149 -0
- package/dist/styles/recipes/dynamic-notification-input.css +29 -0
- package/dist/styles/recipes/dynamic-notification-motion.css +298 -0
- package/dist/styles/recipes/dynamic-notification.css +241 -0
- package/dist/styles/recipes/empty.css +96 -0
- package/dist/styles/recipes/environment-variables.css +173 -0
- package/dist/styles/recipes/field-parts.css +148 -0
- package/dist/styles/recipes/field.css +234 -0
- package/dist/styles/recipes/gradient-editor.css +109 -0
- package/dist/styles/recipes/infinite-canvas.css +78 -0
- package/dist/styles/recipes/inline-attachment.css +182 -0
- package/dist/styles/recipes/inline-citation.css +174 -0
- package/dist/styles/recipes/item.css +107 -0
- package/dist/styles/recipes/kbd.css +55 -0
- package/dist/styles/recipes/markdown-block.css +75 -0
- package/dist/styles/recipes/markdown.css +204 -0
- package/dist/styles/recipes/morphing-panel.css +123 -0
- package/dist/styles/recipes/pagination.css +86 -0
- package/dist/styles/recipes/phone-input.css +105 -0
- package/dist/styles/recipes/popup-controls.css +59 -0
- package/dist/styles/recipes/popup-drawer.css +162 -0
- package/dist/styles/recipes/popup-lists.css +198 -0
- package/dist/styles/recipes/popup-motion.css +94 -0
- package/dist/styles/recipes/popup-toast.css +126 -0
- package/dist/styles/recipes/popup.css +396 -0
- package/dist/styles/recipes/range.css +259 -0
- package/dist/styles/recipes/resizable.css +170 -0
- package/dist/styles/recipes/rich-tooltip.css +272 -0
- package/dist/styles/recipes/scroll-area.css +59 -0
- package/dist/styles/recipes/separator.css +12 -0
- package/dist/styles/recipes/sidebar.css +345 -0
- package/dist/styles/recipes/skeleton.css +23 -0
- package/dist/styles/recipes/source-badge.css +77 -0
- package/dist/styles/recipes/spinner.css +33 -0
- package/dist/styles/recipes/stepper.css +178 -0
- package/dist/styles/recipes/switch.css +149 -0
- package/dist/styles/recipes/table-of-contents.css +107 -0
- package/dist/styles/recipes/table.css +124 -0
- package/dist/styles/recipes/tabs.css +235 -0
- package/dist/styles/recipes/task-list.css +146 -0
- package/dist/styles/recipes/thread-rail.css +247 -0
- package/dist/styles/recipes/timeline.css +107 -0
- package/dist/styles/recipes/toolbar.css +260 -0
- package/dist/styles/recipes/track-highlight.css +73 -0
- package/dist/styles/recipes/transcript-divider.css +64 -0
- package/dist/styles/recipes/tree.css +137 -0
- package/dist/styles/recipes/user-ask-details.css +45 -0
- package/dist/styles/recipes/user-ask.css +204 -0
- package/dist/styles/skin-theme.css +137 -0
- package/dist/styles/skin.css +143 -0
- package/dist/styles/theme.css +628 -0
- package/dist/styles/type-scale.css +45 -0
- package/dist/surface-variants.d.ts +6 -0
- package/dist/surface-variants.js +16 -0
- package/dist/task-list.d.ts +34 -0
- package/dist/task-list.js +177 -0
- package/dist/thread-rail.d.ts +52 -0
- package/dist/thread-rail.js +190 -0
- package/dist/transcript-divider.d.ts +15 -0
- package/dist/transcript-divider.js +25 -0
- package/dist/ui/accordion.d.ts +31 -0
- package/dist/ui/accordion.js +60 -0
- package/dist/ui/alert-dialog.d.ts +36 -0
- package/dist/ui/alert-dialog.js +100 -0
- package/dist/ui/alert.d.ts +21 -0
- package/dist/ui/alert.js +36 -0
- package/dist/ui/aspect-ratio.d.ts +8 -0
- package/dist/ui/aspect-ratio.js +17 -0
- package/dist/ui/autocomplete.d.ts +70 -0
- package/dist/ui/autocomplete.js +150 -0
- package/dist/ui/avatar.d.ts +24 -0
- package/dist/ui/avatar.js +44 -0
- package/dist/ui/badge.d.ts +20 -0
- package/dist/ui/badge.js +36 -0
- package/dist/ui/button-group.d.ts +24 -0
- package/dist/ui/button-group.js +45 -0
- package/dist/ui/button.d.ts +36 -0
- package/dist/ui/button.js +104 -0
- package/dist/ui/calendar.d.ts +11 -0
- package/dist/ui/calendar.js +160 -0
- package/dist/ui/card.d.ts +36 -0
- package/dist/ui/card.js +70 -0
- package/dist/ui/checkbox-group.d.ts +11 -0
- package/dist/ui/checkbox-group.js +16 -0
- package/dist/ui/checkbox.d.ts +23 -0
- package/dist/ui/checkbox.js +58 -0
- package/dist/ui/code-diff.d.ts +28 -0
- package/dist/ui/code-diff.js +561 -0
- package/dist/ui/code.d.ts +62 -0
- package/dist/ui/code.js +292 -0
- package/dist/ui/collapsible.d.ts +31 -0
- package/dist/ui/collapsible.js +72 -0
- package/dist/ui/color-picker.d.ts +137 -0
- package/dist/ui/color-picker.js +797 -0
- package/dist/ui/combobox-disabled-selection.d.ts +5 -0
- package/dist/ui/combobox-disabled-selection.js +11 -0
- package/dist/ui/combobox.d.ts +70 -0
- package/dist/ui/combobox.js +194 -0
- package/dist/ui/command.d.ts +44 -0
- package/dist/ui/command.js +166 -0
- package/dist/ui/context-menu.d.ts +86 -0
- package/dist/ui/context-menu.js +202 -0
- package/dist/ui/dialog.d.ts +38 -0
- package/dist/ui/dialog.js +124 -0
- package/dist/ui/dockable-panel-geometry.d.ts +18 -0
- package/dist/ui/dockable-panel-geometry.js +17 -0
- package/dist/ui/dockable-panel.d.ts +58 -0
- package/dist/ui/dockable-panel.js +366 -0
- package/dist/ui/drawer.d.ts +42 -0
- package/dist/ui/drawer.js +182 -0
- package/dist/ui/dropdown-menu.d.ts +46 -0
- package/dist/ui/dropdown-menu.js +89 -0
- package/dist/ui/dropzone.d.ts +66 -0
- package/dist/ui/dropzone.js +311 -0
- package/dist/ui/empty.d.ts +28 -0
- package/dist/ui/empty.js +59 -0
- package/dist/ui/field.d.ts +64 -0
- package/dist/ui/field.js +166 -0
- package/dist/ui/form.d.ts +10 -0
- package/dist/ui/form.js +17 -0
- package/dist/ui/gradient-editor.d.ts +47 -0
- package/dist/ui/gradient-editor.js +301 -0
- package/dist/ui/hover-card.d.ts +25 -0
- package/dist/ui/hover-card.js +46 -0
- package/dist/ui/infinite-canvas.d.ts +40 -0
- package/dist/ui/infinite-canvas.js +278 -0
- package/dist/ui/input-group.d.ts +21 -0
- package/dist/ui/input-group.js +44 -0
- package/dist/ui/input-otp.d.ts +38 -0
- package/dist/ui/input-otp.js +45 -0
- package/dist/ui/input.d.ts +12 -0
- package/dist/ui/input.js +18 -0
- package/dist/ui/item.d.ts +46 -0
- package/dist/ui/item.js +110 -0
- package/dist/ui/kbd.d.ts +12 -0
- package/dist/ui/kbd.js +23 -0
- package/dist/ui/markdown-elements.d.ts +52 -0
- package/dist/ui/markdown-elements.js +211 -0
- package/dist/ui/markdown.d.ts +14 -0
- package/dist/ui/markdown.js +31 -0
- package/dist/ui/menubar.d.ts +74 -0
- package/dist/ui/menubar.js +162 -0
- package/dist/ui/meter.d.ts +34 -0
- package/dist/ui/meter.js +57 -0
- package/dist/ui/morphing-panel.d.ts +24 -0
- package/dist/ui/morphing-panel.js +87 -0
- package/dist/ui/native-select.d.ts +12 -0
- package/dist/ui/native-select.js +41 -0
- package/dist/ui/navigation-menu.d.ts +51 -0
- package/dist/ui/navigation-menu.js +135 -0
- package/dist/ui/number-field.d.ts +72 -0
- package/dist/ui/number-field.js +124 -0
- package/dist/ui/pagination.d.ts +26 -0
- package/dist/ui/pagination.js +77 -0
- package/dist/ui/phone-input.d.ts +30 -0
- package/dist/ui/phone-input.js +263 -0
- package/dist/ui/popover.d.ts +34 -0
- package/dist/ui/popover.js +87 -0
- package/dist/ui/progress.d.ts +34 -0
- package/dist/ui/progress.js +57 -0
- package/dist/ui/radio-group.d.ts +29 -0
- package/dist/ui/radio-group.js +37 -0
- package/dist/ui/resizable.d.ts +56 -0
- package/dist/ui/resizable.js +82 -0
- package/dist/ui/responsive-dialog.d.ts +18 -0
- package/dist/ui/responsive-dialog.js +121 -0
- package/dist/ui/rich-tooltip-tour.d.ts +12 -0
- package/dist/ui/rich-tooltip-tour.js +20 -0
- package/dist/ui/rich-tooltip.d.ts +83 -0
- package/dist/ui/rich-tooltip.js +331 -0
- package/dist/ui/scroll-area.d.ts +25 -0
- package/dist/ui/scroll-area.js +93 -0
- package/dist/ui/select.d.ts +44 -0
- package/dist/ui/select.js +124 -0
- package/dist/ui/separator.d.ts +9 -0
- package/dist/ui/separator.js +16 -0
- package/dist/ui/sheet.d.ts +25 -0
- package/dist/ui/sheet.js +76 -0
- package/dist/ui/sidebar.d.ts +88 -0
- package/dist/ui/sidebar.js +362 -0
- package/dist/ui/skeleton.d.ts +8 -0
- package/dist/ui/skeleton.js +13 -0
- package/dist/ui/slider.d.ts +24 -0
- package/dist/ui/slider.js +114 -0
- package/dist/ui/spinner.d.ts +12 -0
- package/dist/ui/spinner.js +26 -0
- package/dist/ui/stepper.d.ts +58 -0
- package/dist/ui/stepper.js +232 -0
- package/dist/ui/switch.d.ts +26 -0
- package/dist/ui/switch.js +71 -0
- package/dist/ui/table-of-contents.d.ts +22 -0
- package/dist/ui/table-of-contents.js +181 -0
- package/dist/ui/table.d.ts +37 -0
- package/dist/ui/table.js +83 -0
- package/dist/ui/tabs.d.ts +36 -0
- package/dist/ui/tabs.js +127 -0
- package/dist/ui/textarea.d.ts +9 -0
- package/dist/ui/textarea.js +16 -0
- package/dist/ui/timeline.d.ts +40 -0
- package/dist/ui/timeline.js +80 -0
- package/dist/ui/toast.d.ts +28 -0
- package/dist/ui/toast.js +132 -0
- package/dist/ui/toggle.d.ts +20 -0
- package/dist/ui/toggle.js +71 -0
- package/dist/ui/toolbar.d.ts +40 -0
- package/dist/ui/toolbar.js +72 -0
- package/dist/ui/tooltip.d.ts +27 -0
- package/dist/ui/tooltip.js +93 -0
- package/dist/ui/tree.d.ts +56 -0
- package/dist/ui/tree.js +438 -0
- package/dist/ui/trigger-menu.d.ts +46 -0
- package/dist/ui/trigger-menu.js +116 -0
- package/dist/user-ask.d.ts +50 -0
- package/dist/user-ask.js +398 -0
- package/package.json +115 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ScrollAreaKnobStyle } from "../knob-contracts/scroll-area-knobs.js";
|
|
2
|
+
import { CSSProperties, ComponentProps, Ref } from "react";
|
|
3
|
+
//#region src/ui/scroll-area.d.ts
|
|
4
|
+
declare const scrollAreaScrollbarVisibilities: readonly ["scroll", "hover", "always"];
|
|
5
|
+
type ScrollAreaScrollbarVisibility = (typeof scrollAreaScrollbarVisibilities)[number];
|
|
6
|
+
type ScrollAreaLockAxis = "x" | "y" | "both";
|
|
7
|
+
type ScrollAreaViewportProps = Omit<ComponentProps<"div">, "children" | "className" | "ref"> & {
|
|
8
|
+
"data-control-ui"?: string;
|
|
9
|
+
"data-control-family"?: string;
|
|
10
|
+
"data-slot"?: string;
|
|
11
|
+
};
|
|
12
|
+
type ScrollAreaProps = Omit<ComponentProps<"div">, "style"> & {
|
|
13
|
+
style?: CSSProperties & ScrollAreaKnobStyle;
|
|
14
|
+
} & {
|
|
15
|
+
viewportClassName?: string;
|
|
16
|
+
viewportProps?: ScrollAreaViewportProps;
|
|
17
|
+
viewportRef?: Ref<HTMLDivElement>;
|
|
18
|
+
maxHeight?: string;
|
|
19
|
+
mask?: boolean;
|
|
20
|
+
lockAxis?: ScrollAreaLockAxis;
|
|
21
|
+
scrollbarVisibility?: ScrollAreaScrollbarVisibility;
|
|
22
|
+
};
|
|
23
|
+
declare function ScrollArea({ className, viewportClassName, viewportProps, viewportRef, maxHeight, mask, lockAxis, scrollbarVisibility, children, style, ...props }: ScrollAreaProps): import("react").JSX.Element;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { ScrollArea, ScrollAreaLockAxis, ScrollAreaProps, ScrollAreaScrollbarVisibility, ScrollAreaViewportProps, scrollAreaScrollbarVisibilities };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
|
|
5
|
+
//#region src/ui/scroll-area.tsx
|
|
6
|
+
const scrollAreaScrollbarVisibilities = [
|
|
7
|
+
"scroll",
|
|
8
|
+
"hover",
|
|
9
|
+
"always"
|
|
10
|
+
];
|
|
11
|
+
const maskXOverflowClasses = cn("data-[overflow-x-start]:mask-l-from-[calc(100%_-_var(--scroll-fade-size))]", "data-[overflow-x-end]:mask-r-from-[calc(100%_-_var(--scroll-fade-size))]");
|
|
12
|
+
const maskYOverflowClasses = cn("data-[overflow-y-start]:mask-t-from-[calc(100%_-_var(--scroll-fade-size))]", "data-[overflow-y-end]:mask-b-from-[calc(100%_-_var(--scroll-fade-size))]");
|
|
13
|
+
function Scrollbar({ orientation, visibility, thumbStyle }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(ScrollArea$1.Scrollbar, {
|
|
15
|
+
orientation,
|
|
16
|
+
"data-control-ui": "scroll-area",
|
|
17
|
+
"data-control-family": "scroll-area",
|
|
18
|
+
"data-slot": "scrollbar",
|
|
19
|
+
"data-visibility": visibility,
|
|
20
|
+
className: cn("m-px flex touch-none select-none", orientation === "vertical" ? "justify-center" : "flex-col"),
|
|
21
|
+
children: /* @__PURE__ */ jsx(ScrollArea$1.Thumb, {
|
|
22
|
+
"data-control-ui": "scroll-area",
|
|
23
|
+
"data-control-family": "scroll-area",
|
|
24
|
+
"data-slot": "thumb",
|
|
25
|
+
className: cn("flex-1", orientation === "vertical" ? "w-full" : "h-full"),
|
|
26
|
+
style: thumbStyle
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function viewportStyle(maxHeight, lockX, lockY) {
|
|
31
|
+
if (!maxHeight && !lockX && !lockY) return void 0;
|
|
32
|
+
return {
|
|
33
|
+
...maxHeight ? { maxHeight } : {},
|
|
34
|
+
...lockX ? { overflowX: "hidden" } : {},
|
|
35
|
+
...lockY ? { overflowY: "hidden" } : {}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function ScrollArea({ className, viewportClassName, viewportProps, viewportRef, maxHeight, mask = true, lockAxis, scrollbarVisibility = "scroll", children, style, ...props }) {
|
|
39
|
+
const lockX = lockAxis === "x" || lockAxis === "both";
|
|
40
|
+
const lockY = lockAxis === "y" || lockAxis === "both";
|
|
41
|
+
const resolvedViewportStyle = viewportStyle(maxHeight, lockX, lockY);
|
|
42
|
+
const { style: viewportPropsStyle, ...resolvedViewportProps } = viewportProps ?? {};
|
|
43
|
+
const mergedViewportStyle = viewportPropsStyle || resolvedViewportStyle ? {
|
|
44
|
+
...viewportPropsStyle,
|
|
45
|
+
...resolvedViewportStyle
|
|
46
|
+
} : void 0;
|
|
47
|
+
const thumbStyle = style;
|
|
48
|
+
const cornerStyle = style;
|
|
49
|
+
return /* @__PURE__ */ jsxs(ScrollArea$1.Root, {
|
|
50
|
+
...props,
|
|
51
|
+
"data-control-ui": "scroll-area",
|
|
52
|
+
"data-control-family": "scroll-area",
|
|
53
|
+
"data-slot": "root",
|
|
54
|
+
className: cn("relative overflow-hidden", className),
|
|
55
|
+
style,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsx(ScrollArea$1.Viewport, {
|
|
58
|
+
"data-control-ui": "scroll-area",
|
|
59
|
+
"data-control-family": "scroll-area",
|
|
60
|
+
"data-slot": "viewport",
|
|
61
|
+
...resolvedViewportProps,
|
|
62
|
+
ref: viewportRef,
|
|
63
|
+
className: cn("h-full w-full", mask && !lockX && maskXOverflowClasses, mask && !lockY && maskYOverflowClasses, viewportClassName),
|
|
64
|
+
style: mergedViewportStyle,
|
|
65
|
+
children: /* @__PURE__ */ jsx(ScrollArea$1.Content, {
|
|
66
|
+
"data-control-ui": "scroll-area",
|
|
67
|
+
"data-control-family": "scroll-area",
|
|
68
|
+
"data-slot": "content",
|
|
69
|
+
style: { minWidth: 0 },
|
|
70
|
+
children
|
|
71
|
+
})
|
|
72
|
+
}),
|
|
73
|
+
!lockY && /* @__PURE__ */ jsx(Scrollbar, {
|
|
74
|
+
orientation: "vertical",
|
|
75
|
+
visibility: scrollbarVisibility,
|
|
76
|
+
thumbStyle
|
|
77
|
+
}),
|
|
78
|
+
!lockX && /* @__PURE__ */ jsx(Scrollbar, {
|
|
79
|
+
orientation: "horizontal",
|
|
80
|
+
visibility: scrollbarVisibility,
|
|
81
|
+
thumbStyle
|
|
82
|
+
}),
|
|
83
|
+
!lockX && !lockY && /* @__PURE__ */ jsx(ScrollArea$1.Corner, {
|
|
84
|
+
"data-control-ui": "scroll-area",
|
|
85
|
+
"data-control-family": "scroll-area",
|
|
86
|
+
"data-slot": "corner",
|
|
87
|
+
style: cornerStyle
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { ScrollArea, scrollAreaScrollbarVisibilities };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ControlledChoice } from "../control-props.js";
|
|
2
|
+
import { ControlSize } from "../control-variants.js";
|
|
3
|
+
import { ButtonKnobStyle } from "../knob-contracts/button-knobs.js";
|
|
4
|
+
import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
5
|
+
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
6
|
+
import { Select as Select$1 } from "@base-ui/react/select";
|
|
7
|
+
//#region src/ui/select.d.ts
|
|
8
|
+
type SelectProps<TValue extends string = string> = ControlledChoice<TValue> & {
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
name?: string;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
declare const selectTriggerVariants: readonly ["surface", "ghost"];
|
|
14
|
+
type SelectTriggerVariant = (typeof selectTriggerVariants)[number];
|
|
15
|
+
type SelectTriggerProps = Omit<ComponentProps<"button">, "style"> & {
|
|
16
|
+
style?: CSSProperties & ButtonKnobStyle;
|
|
17
|
+
} & {
|
|
18
|
+
size?: ControlSize;
|
|
19
|
+
variant?: SelectTriggerVariant;
|
|
20
|
+
};
|
|
21
|
+
type SelectValueProps = {
|
|
22
|
+
placeholder?: ReactNode;
|
|
23
|
+
children?: ReactNode | ((value: string) => ReactNode);
|
|
24
|
+
};
|
|
25
|
+
type SelectContentProps = Omit<ComponentProps<"div">, "style"> & {
|
|
26
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
27
|
+
};
|
|
28
|
+
type SelectItemProps = Omit<ComponentProps<"div">, "style"> & {
|
|
29
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
30
|
+
} & {
|
|
31
|
+
value: string;
|
|
32
|
+
label?: string;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
};
|
|
35
|
+
type RefinedSelectTriggerProps = SelectTriggerProps & Pick<ComponentProps<typeof Select$1.Trigger>, "nativeButton" | "render"> & {
|
|
36
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
37
|
+
};
|
|
38
|
+
declare function Select<TValue extends string = string>({ children, onValueChange, ...props }: SelectProps<TValue>): import("react").JSX.Element;
|
|
39
|
+
declare function SelectTrigger({ size, variant, className, children, disabled, ...props }: RefinedSelectTriggerProps): import("react").JSX.Element;
|
|
40
|
+
declare function SelectValue({ children, ...props }: SelectValueProps): import("react").JSX.Element;
|
|
41
|
+
declare function SelectContent({ className, children, ...props }: SelectContentProps): import("react").JSX.Element;
|
|
42
|
+
declare function SelectItem({ className, children, disabled, ...props }: SelectItemProps): import("react").JSX.Element;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Select, SelectContent, SelectContentProps, SelectItem, SelectItemProps, SelectProps, SelectTrigger, SelectTriggerProps, SelectTriggerVariant, SelectValue, SelectValueProps, selectTriggerVariants };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { skinEffects, skinId } from "../skin.js";
|
|
4
|
+
import { popupItemStructureClasses } from "../surface-variants.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Select as Select$1 } from "@base-ui/react/select";
|
|
7
|
+
//#region src/ui/select.tsx
|
|
8
|
+
const selectTriggerVariants = ["surface", "ghost"];
|
|
9
|
+
function Select({ children, onValueChange, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(Select$1.Root, {
|
|
11
|
+
...props,
|
|
12
|
+
onValueChange: (value) => {
|
|
13
|
+
if (value !== null) onValueChange?.(value);
|
|
14
|
+
},
|
|
15
|
+
children
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function SelectTrigger({ size = "sm", variant = "surface", className, children, disabled, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsxs(Select$1.Trigger, {
|
|
20
|
+
"data-control-ui": "select",
|
|
21
|
+
"data-control-family": "button",
|
|
22
|
+
"data-popup-kind": "select",
|
|
23
|
+
"data-slot": "trigger",
|
|
24
|
+
"data-control": "true",
|
|
25
|
+
"data-size": size,
|
|
26
|
+
"data-variant": variant,
|
|
27
|
+
"data-tone": "neutral",
|
|
28
|
+
"data-shape": "default",
|
|
29
|
+
className: cn("group relative isolate inline-flex shrink-0 items-center justify-between overflow-visible", className),
|
|
30
|
+
disabled,
|
|
31
|
+
...props,
|
|
32
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
33
|
+
"data-control-ui": "button",
|
|
34
|
+
"data-control-family": "button",
|
|
35
|
+
"data-slot": "content",
|
|
36
|
+
className: "relative z-[1] inline-flex min-w-0 items-center justify-center gap-[inherit]",
|
|
37
|
+
children
|
|
38
|
+
}), /* @__PURE__ */ jsx(Select$1.Icon, {
|
|
39
|
+
"data-control-ui": "select",
|
|
40
|
+
"data-control-family": "popup",
|
|
41
|
+
"data-popup-kind": "select",
|
|
42
|
+
"data-slot": "icon",
|
|
43
|
+
className: "relative z-[1]",
|
|
44
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
45
|
+
viewBox: "0 0 12 12",
|
|
46
|
+
className: "size-3",
|
|
47
|
+
"aria-hidden": "true",
|
|
48
|
+
fill: "none",
|
|
49
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
50
|
+
d: "M3 4.5 6 7.5 9 4.5",
|
|
51
|
+
stroke: "currentColor",
|
|
52
|
+
strokeWidth: "1.3",
|
|
53
|
+
strokeLinecap: "round",
|
|
54
|
+
strokeLinejoin: "round"
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function SelectValue({ children, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ jsx(Select$1.Value, {
|
|
62
|
+
className: "min-w-0 truncate",
|
|
63
|
+
...props,
|
|
64
|
+
children
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function SelectContent({ className, children, ...props }) {
|
|
68
|
+
return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
69
|
+
"data-skin": skinId(),
|
|
70
|
+
"data-effects": skinEffects(),
|
|
71
|
+
side: "bottom",
|
|
72
|
+
align: "start",
|
|
73
|
+
sideOffset: 6,
|
|
74
|
+
className: "z-[80]",
|
|
75
|
+
children: /* @__PURE__ */ jsx(Select$1.Popup, {
|
|
76
|
+
"data-control-ui": "select",
|
|
77
|
+
"data-popup-kind": "select",
|
|
78
|
+
"data-slot": "content",
|
|
79
|
+
"data-surface": "floating",
|
|
80
|
+
"data-control-family": "popup",
|
|
81
|
+
"data-popup-part": "list-surface",
|
|
82
|
+
className: cn("max-h-[min(20rem,var(--available-height))] min-w-[var(--anchor-width)] overflow-y-auto", className),
|
|
83
|
+
...props,
|
|
84
|
+
children
|
|
85
|
+
})
|
|
86
|
+
}) });
|
|
87
|
+
}
|
|
88
|
+
function SelectItem({ className, children, disabled, ...props }) {
|
|
89
|
+
return /* @__PURE__ */ jsxs(Select$1.Item, {
|
|
90
|
+
"data-control-ui": "select",
|
|
91
|
+
"data-popup-kind": "select",
|
|
92
|
+
"data-slot": "item",
|
|
93
|
+
"data-control-family": "popup",
|
|
94
|
+
"data-popup-part": "item",
|
|
95
|
+
disabled,
|
|
96
|
+
className: cn(popupItemStructureClasses, className),
|
|
97
|
+
...props,
|
|
98
|
+
children: [/* @__PURE__ */ jsx(Select$1.ItemText, {
|
|
99
|
+
className: "flex min-w-0 flex-1 items-center",
|
|
100
|
+
children
|
|
101
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
102
|
+
"data-control-ui": "select",
|
|
103
|
+
"data-control-family": "popup",
|
|
104
|
+
"data-popup-kind": "select",
|
|
105
|
+
"data-slot": "item-indicator",
|
|
106
|
+
className: "flex size-3.5 shrink-0 items-center justify-center",
|
|
107
|
+
children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx("svg", {
|
|
108
|
+
viewBox: "0 0 12 12",
|
|
109
|
+
className: "size-3",
|
|
110
|
+
"aria-hidden": "true",
|
|
111
|
+
fill: "none",
|
|
112
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
113
|
+
d: "M2.5 6.5 5 9l4.5-5",
|
|
114
|
+
stroke: "currentColor",
|
|
115
|
+
strokeWidth: "1.4",
|
|
116
|
+
strokeLinecap: "round",
|
|
117
|
+
strokeLinejoin: "round"
|
|
118
|
+
})
|
|
119
|
+
}) })
|
|
120
|
+
})]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
export { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, selectTriggerVariants };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SeparatorKnobStyle } from "../knob-contracts/separator-knobs.js";
|
|
2
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
3
|
+
import { Separator as Separator$1 } from "@base-ui/react/separator";
|
|
4
|
+
//#region src/ui/separator.d.ts
|
|
5
|
+
declare function Separator({ className, orientation, ...props }: Omit<ComponentProps<typeof Separator$1>, "style"> & {
|
|
6
|
+
style?: CSSProperties & SeparatorKnobStyle;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Separator };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Separator as Separator$1 } from "@base-ui/react/separator";
|
|
4
|
+
//#region src/ui/separator.tsx
|
|
5
|
+
function Separator({ className, orientation = "horizontal", ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Separator$1, {
|
|
7
|
+
"data-control-ui": "separator",
|
|
8
|
+
"data-control-family": "separator",
|
|
9
|
+
"data-slot": "root",
|
|
10
|
+
orientation,
|
|
11
|
+
className: cn("shrink-0", orientation === "vertical" ? "h-full w-px" : "h-px w-full", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Separator };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
2
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
3
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
4
|
+
//#region src/ui/sheet.d.ts
|
|
5
|
+
declare function Sheet(props: ComponentProps<typeof Dialog.Root>): import("react").JSX.Element;
|
|
6
|
+
declare function SheetClose({ className, ...props }: ComponentProps<typeof Dialog.Close> & {
|
|
7
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
type SheetContentProps = Omit<ComponentProps<typeof Dialog.Popup>, "style"> & {
|
|
10
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
11
|
+
} & {
|
|
12
|
+
side?: "left" | "right";
|
|
13
|
+
};
|
|
14
|
+
declare function SheetContent({ className, children, side, ...props }: SheetContentProps): import("react").JSX.Element;
|
|
15
|
+
declare function SheetHeader({ className, ...props }: ComponentProps<"div"> & {
|
|
16
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
declare function SheetTitle({ className, ...props }: ComponentProps<typeof Dialog.Title> & {
|
|
19
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
declare function SheetDescription({ className, ...props }: ComponentProps<typeof Dialog.Description> & {
|
|
22
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Sheet, SheetClose, SheetContent, SheetContentProps, SheetDescription, SheetHeader, SheetTitle };
|
package/dist/ui/sheet.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { skinEffects, skinId } from "../skin.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
6
|
+
//#region src/ui/sheet.tsx
|
|
7
|
+
function Sheet(props) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Dialog.Root, { ...props });
|
|
9
|
+
}
|
|
10
|
+
function SheetClose({ className, ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
12
|
+
"data-control-ui": "sheet",
|
|
13
|
+
"data-control-family": "popup",
|
|
14
|
+
"data-popup-kind": "sheet",
|
|
15
|
+
"data-slot": "close",
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function SheetContent({ className, children, side = "right", ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsxs(Dialog.Portal, { children: [/* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
22
|
+
"data-control-ui": "sheet",
|
|
23
|
+
"data-popup-kind": "sheet",
|
|
24
|
+
"data-slot": "backdrop",
|
|
25
|
+
"data-control-family": "popup",
|
|
26
|
+
"data-popup-part": "backdrop",
|
|
27
|
+
"data-skin": skinId(),
|
|
28
|
+
"data-effects": skinEffects(),
|
|
29
|
+
className: "fixed inset-0 z-[70]"
|
|
30
|
+
}), /* @__PURE__ */ jsx(Dialog.Popup, {
|
|
31
|
+
"data-skin": skinId(),
|
|
32
|
+
"data-effects": skinEffects(),
|
|
33
|
+
"data-control-ui": "sheet",
|
|
34
|
+
"data-popup-kind": "sheet",
|
|
35
|
+
"data-control-family": "popup",
|
|
36
|
+
"data-slot": "content",
|
|
37
|
+
"data-popup-part": "surface",
|
|
38
|
+
"data-surface": "modal",
|
|
39
|
+
className: cn("fixed inset-y-0 z-[71] flex h-full w-3/4 max-w-sm flex-col", side === "left" ? "left-0" : "right-0", className),
|
|
40
|
+
...props,
|
|
41
|
+
"data-side": side,
|
|
42
|
+
children
|
|
43
|
+
})] });
|
|
44
|
+
}
|
|
45
|
+
function SheetHeader({ className, ...props }) {
|
|
46
|
+
return /* @__PURE__ */ jsx("div", {
|
|
47
|
+
"data-control-ui": "sheet",
|
|
48
|
+
"data-control-family": "popup",
|
|
49
|
+
"data-popup-kind": "sheet",
|
|
50
|
+
"data-slot": "header",
|
|
51
|
+
className: cn("flex flex-col", className),
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function SheetTitle({ className, ...props }) {
|
|
56
|
+
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
57
|
+
"data-control-ui": "sheet",
|
|
58
|
+
"data-control-family": "popup",
|
|
59
|
+
"data-popup-kind": "sheet",
|
|
60
|
+
"data-slot": "title",
|
|
61
|
+
className,
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function SheetDescription({ className, ...props }) {
|
|
66
|
+
return /* @__PURE__ */ jsx(Dialog.Description, {
|
|
67
|
+
"data-control-ui": "sheet",
|
|
68
|
+
"data-control-family": "popup",
|
|
69
|
+
"data-popup-kind": "sheet",
|
|
70
|
+
"data-slot": "description",
|
|
71
|
+
className,
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetHeader, SheetTitle };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { RenderProp, SelectionIndicator } from "../control-props.js";
|
|
2
|
+
import { Button } from "./button.js";
|
|
3
|
+
import { SidebarKnobStyle } from "../knob-contracts/sidebar-knobs.js";
|
|
4
|
+
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
5
|
+
//#region src/ui/sidebar.d.ts
|
|
6
|
+
declare const sidebarMenuButtonVariants: readonly ["default", "outline"];
|
|
7
|
+
type SidebarMenuButtonVariant = (typeof sidebarMenuButtonVariants)[number];
|
|
8
|
+
declare const sidebarMenuButtonSizes: readonly ["default", "sm", "lg"];
|
|
9
|
+
type SidebarMenuButtonSize = (typeof sidebarMenuButtonSizes)[number];
|
|
10
|
+
type SidebarRailProps = Omit<ComponentProps<"button">, "style"> & {
|
|
11
|
+
style?: CSSProperties & SidebarKnobStyle;
|
|
12
|
+
};
|
|
13
|
+
type SidebarInsetProps = Omit<ComponentProps<"main">, "style"> & {
|
|
14
|
+
style?: CSSProperties & SidebarKnobStyle;
|
|
15
|
+
};
|
|
16
|
+
type SidebarGroupLabelProps = Omit<ComponentProps<"div">, "style"> & {
|
|
17
|
+
style?: CSSProperties & SidebarKnobStyle;
|
|
18
|
+
} & {
|
|
19
|
+
render?: RenderProp<ComponentProps<"div">>;
|
|
20
|
+
};
|
|
21
|
+
type SidebarMenuButtonProps = Omit<ComponentProps<"button">, "style"> & {
|
|
22
|
+
style?: CSSProperties & SidebarKnobStyle;
|
|
23
|
+
} & {
|
|
24
|
+
render?: RenderProp<ComponentProps<"button">>;
|
|
25
|
+
isActive?: boolean;
|
|
26
|
+
tooltip?: ReactNode;
|
|
27
|
+
variant?: SidebarMenuButtonVariant;
|
|
28
|
+
size?: SidebarMenuButtonSize;
|
|
29
|
+
};
|
|
30
|
+
/** Exported so blocks can set width through `style` and stay type-checked. */
|
|
31
|
+
type SidebarStyle = CSSProperties & SidebarKnobStyle & {
|
|
32
|
+
"--sidebar-width"?: string;
|
|
33
|
+
"--sidebar-width-icon"?: string;
|
|
34
|
+
};
|
|
35
|
+
type SidebarSurfaceStyle = CSSProperties & SidebarKnobStyle;
|
|
36
|
+
type SidebarContextProps = {
|
|
37
|
+
state: "expanded" | "collapsed";
|
|
38
|
+
open: boolean;
|
|
39
|
+
setOpen: (open: boolean) => void;
|
|
40
|
+
openMobile: boolean;
|
|
41
|
+
setOpenMobile: (open: boolean) => void;
|
|
42
|
+
isMobile: boolean;
|
|
43
|
+
toggleSidebar: () => void;
|
|
44
|
+
};
|
|
45
|
+
declare function useSidebar(): SidebarContextProps;
|
|
46
|
+
type SidebarProviderProps = Omit<ComponentProps<"div">, "style"> & {
|
|
47
|
+
defaultOpen?: boolean;
|
|
48
|
+
open?: boolean;
|
|
49
|
+
onOpenChange?: (open: boolean) => void;
|
|
50
|
+
style?: SidebarStyle;
|
|
51
|
+
};
|
|
52
|
+
declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, ref, className, style, children, ...props }: SidebarProviderProps): import("react").JSX.Element;
|
|
53
|
+
declare function Sidebar({ side, variant, collapsible, ref, className, children, style, ...props }: Omit<ComponentProps<"div">, "style"> & {
|
|
54
|
+
side?: "left" | "right";
|
|
55
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
56
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
57
|
+
style?: SidebarSurfaceStyle;
|
|
58
|
+
}): import("react").JSX.Element;
|
|
59
|
+
declare function SidebarTrigger({ className, onClick, size, ...props }: ComponentProps<typeof Button>): import("react").JSX.Element;
|
|
60
|
+
declare function SidebarRail({ className, ...props }: SidebarRailProps): import("react").JSX.Element;
|
|
61
|
+
declare function SidebarInset({ className, ...props }: SidebarInsetProps): import("react").JSX.Element;
|
|
62
|
+
declare function SidebarHeader({ className, ...props }: ComponentProps<"div"> & {
|
|
63
|
+
style?: CSSProperties & SidebarKnobStyle;
|
|
64
|
+
}): import("react").JSX.Element;
|
|
65
|
+
declare function SidebarFooter({ className, ...props }: ComponentProps<"div"> & {
|
|
66
|
+
style?: CSSProperties & SidebarKnobStyle;
|
|
67
|
+
}): import("react").JSX.Element;
|
|
68
|
+
declare function SidebarContent({ className, children, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
69
|
+
declare function SidebarGroup({ className, ...props }: ComponentProps<"div"> & {
|
|
70
|
+
style?: CSSProperties & SidebarKnobStyle;
|
|
71
|
+
}): import("react").JSX.Element;
|
|
72
|
+
declare function SidebarGroupLabel({ className, render, children, ...props }: SidebarGroupLabelProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
73
|
+
type SidebarSelectionIndicator = SelectionIndicator;
|
|
74
|
+
declare function SidebarMenu({ className, indicator, children, ...props }: ComponentProps<"ul"> & {
|
|
75
|
+
/**
|
|
76
|
+
* `slide` replaces per-row backgrounds with one pill that glides to hovered or active item.
|
|
77
|
+
* Defaults to ControlUiSkin.indicators.sidebar, else `none`.
|
|
78
|
+
*/
|
|
79
|
+
indicator?: SidebarSelectionIndicator;
|
|
80
|
+
} & {
|
|
81
|
+
style?: CSSProperties & SidebarKnobStyle;
|
|
82
|
+
}): import("react").JSX.Element;
|
|
83
|
+
declare function SidebarMenuItem({ className, ...props }: ComponentProps<"li"> & {
|
|
84
|
+
style?: CSSProperties & SidebarKnobStyle;
|
|
85
|
+
}): import("react").JSX.Element;
|
|
86
|
+
declare function SidebarMenuButton({ render, isActive, variant, size, tooltip, className, children, ...props }: SidebarMenuButtonProps): import("react").JSX.Element;
|
|
87
|
+
//#endregion
|
|
88
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarGroupLabelProps, SidebarHeader, SidebarInset, SidebarInsetProps, SidebarMenu, SidebarMenuButton, SidebarMenuButtonProps, SidebarMenuButtonSize, SidebarMenuButtonVariant, SidebarMenuItem, SidebarProvider, SidebarProviderProps, SidebarRail, SidebarRailProps, SidebarSelectionIndicator, SidebarStyle, SidebarTrigger, sidebarMenuButtonSizes, sidebarMenuButtonVariants, useSidebar };
|