@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,100 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { skinEffects, skinId } from "../skin.js";
|
|
4
|
+
import { Button } from "./button.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
7
|
+
//#region src/ui/alert-dialog.tsx
|
|
8
|
+
function AlertDialog(props) {
|
|
9
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Root, { ...props });
|
|
10
|
+
}
|
|
11
|
+
function AlertDialogTrigger({ className, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
|
|
13
|
+
"data-control-ui": "alert-dialog",
|
|
14
|
+
"data-popup-kind": "alert-dialog",
|
|
15
|
+
"data-slot": "trigger",
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function AlertDialogClose({ className, children, variant = "surface", size = "sm", tone = "neutral", iconOnly, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Close, {
|
|
22
|
+
...props,
|
|
23
|
+
render: (renderProps) => /* @__PURE__ */ jsx(Button, {
|
|
24
|
+
...renderProps,
|
|
25
|
+
"data-popup-part": "close",
|
|
26
|
+
variant,
|
|
27
|
+
size,
|
|
28
|
+
tone,
|
|
29
|
+
iconOnly,
|
|
30
|
+
className: cn(renderProps.className, className),
|
|
31
|
+
children
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function AlertDialogContent({ className, children, ...props }) {
|
|
36
|
+
return /* @__PURE__ */ jsxs(AlertDialog$1.Portal, { children: [/* @__PURE__ */ jsx(AlertDialog$1.Backdrop, {
|
|
37
|
+
"data-control-ui": "alert-dialog",
|
|
38
|
+
"data-popup-kind": "alert-dialog",
|
|
39
|
+
"data-slot": "backdrop",
|
|
40
|
+
"data-control-family": "popup",
|
|
41
|
+
"data-popup-part": "backdrop",
|
|
42
|
+
"data-skin": skinId(),
|
|
43
|
+
"data-effects": skinEffects(),
|
|
44
|
+
className: "fixed inset-0 z-[70]"
|
|
45
|
+
}), /* @__PURE__ */ jsx(AlertDialog$1.Popup, {
|
|
46
|
+
"data-skin": skinId(),
|
|
47
|
+
"data-effects": skinEffects(),
|
|
48
|
+
"data-control-ui": "alert-dialog",
|
|
49
|
+
"data-popup-kind": "alert-dialog",
|
|
50
|
+
"data-slot": "content",
|
|
51
|
+
"data-control-family": "popup",
|
|
52
|
+
"data-popup-part": "surface",
|
|
53
|
+
"data-surface": "modal",
|
|
54
|
+
className: cn("fixed left-1/2 top-[12vh] z-[71] grid w-[calc(100%-2rem)] max-w-md -translate-x-1/2 p-0", className),
|
|
55
|
+
...props,
|
|
56
|
+
children
|
|
57
|
+
})] });
|
|
58
|
+
}
|
|
59
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
60
|
+
return /* @__PURE__ */ jsx("div", {
|
|
61
|
+
"data-control-ui": "alert-dialog",
|
|
62
|
+
"data-control-family": "popup",
|
|
63
|
+
"data-popup-kind": "alert-dialog",
|
|
64
|
+
"data-slot": "header",
|
|
65
|
+
className: cn("grid", className),
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
70
|
+
return /* @__PURE__ */ jsx("div", {
|
|
71
|
+
"data-control-ui": "alert-dialog",
|
|
72
|
+
"data-control-family": "popup",
|
|
73
|
+
"data-popup-kind": "alert-dialog",
|
|
74
|
+
"data-slot": "footer",
|
|
75
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end", className),
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
80
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
|
|
81
|
+
"data-control-ui": "alert-dialog",
|
|
82
|
+
"data-control-family": "popup",
|
|
83
|
+
"data-popup-kind": "alert-dialog",
|
|
84
|
+
"data-slot": "title",
|
|
85
|
+
className,
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
90
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Description, {
|
|
91
|
+
"data-control-ui": "alert-dialog",
|
|
92
|
+
"data-control-family": "popup",
|
|
93
|
+
"data-popup-kind": "alert-dialog",
|
|
94
|
+
"data-slot": "description",
|
|
95
|
+
className,
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
//#endregion
|
|
100
|
+
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AlertKnobStyle } from "../knob-contracts/alert-knobs.js";
|
|
2
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
3
|
+
//#region src/ui/alert.d.ts
|
|
4
|
+
declare const alertVariants: readonly ["default", "destructive"];
|
|
5
|
+
type AlertVariant = (typeof alertVariants)[number];
|
|
6
|
+
type AlertProps = Omit<ComponentProps<"div">, "style"> & {
|
|
7
|
+
style?: CSSProperties & AlertKnobStyle;
|
|
8
|
+
} & {
|
|
9
|
+
variant?: AlertVariant;
|
|
10
|
+
};
|
|
11
|
+
type AlertTitleProps = Omit<ComponentProps<"div">, "style"> & {
|
|
12
|
+
style?: CSSProperties & AlertKnobStyle;
|
|
13
|
+
};
|
|
14
|
+
type AlertDescriptionProps = Omit<ComponentProps<"div">, "style"> & {
|
|
15
|
+
style?: CSSProperties & AlertKnobStyle;
|
|
16
|
+
};
|
|
17
|
+
declare function Alert({ variant, className, ...props }: AlertProps): import("react").JSX.Element;
|
|
18
|
+
declare function AlertTitle({ className, ...props }: AlertTitleProps): import("react").JSX.Element;
|
|
19
|
+
declare function AlertDescription({ className, ...props }: AlertDescriptionProps): import("react").JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Alert, AlertDescription, AlertDescriptionProps, AlertProps, AlertTitle, AlertTitleProps, AlertVariant, alertVariants };
|
package/dist/ui/alert.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/ui/alert.tsx
|
|
4
|
+
const alertVariants = ["default", "destructive"];
|
|
5
|
+
function Alert({ variant = "default", className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
role: "alert",
|
|
8
|
+
"data-control-ui": "alert",
|
|
9
|
+
"data-control-family": "alert",
|
|
10
|
+
"data-slot": "root",
|
|
11
|
+
"data-surface": "panel",
|
|
12
|
+
"data-variant": variant,
|
|
13
|
+
className: cn("relative grid w-full grid-cols-[0_1fr] items-start has-[>svg]:grid-cols-[1rem_1fr] [&>svg]:size-4", className),
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function AlertTitle({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx("div", {
|
|
19
|
+
"data-control-ui": "alert",
|
|
20
|
+
"data-control-family": "alert",
|
|
21
|
+
"data-slot": "title",
|
|
22
|
+
className: cn("col-start-2 line-clamp-1", className),
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function AlertDescription({ className, ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx("div", {
|
|
28
|
+
"data-control-ui": "alert",
|
|
29
|
+
"data-control-family": "alert",
|
|
30
|
+
"data-slot": "description",
|
|
31
|
+
className: cn("col-start-2 grid justify-items-start", className),
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Alert, AlertDescription, AlertTitle, alertVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/ui/aspect-ratio.d.ts
|
|
3
|
+
type AspectRatioProps = ComponentProps<"div"> & {
|
|
4
|
+
ratio?: number;
|
|
5
|
+
};
|
|
6
|
+
declare function AspectRatio({ ratio, className, style, ...props }: AspectRatioProps): import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { AspectRatio, AspectRatioProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/ui/aspect-ratio.tsx
|
|
3
|
+
const DEFAULT_ASPECT_RATIO = 16 / 9;
|
|
4
|
+
function AspectRatio({ ratio = DEFAULT_ASPECT_RATIO, className, style, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6
|
+
"data-control-ui": "aspect-ratio",
|
|
7
|
+
"data-slot": "root",
|
|
8
|
+
style: {
|
|
9
|
+
aspectRatio: ratio,
|
|
10
|
+
...style
|
|
11
|
+
},
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { AspectRatio };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { OpenChangeEventDetails } from "../control-props.js";
|
|
2
|
+
import { ControlSize } from "../control-variants.js";
|
|
3
|
+
import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
4
|
+
import { FieldKnobStyle } from "../knob-contracts/field-knobs.js";
|
|
5
|
+
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
6
|
+
//#region src/ui/autocomplete.d.ts
|
|
7
|
+
type AutocompleteProps<Value = string> = {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
items?: readonly Value[];
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
onValueChange?: (value: string) => void;
|
|
13
|
+
open?: boolean;
|
|
14
|
+
defaultOpen?: boolean;
|
|
15
|
+
onOpenChange?: (open: boolean, eventDetails: OpenChangeEventDetails) => void;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
readOnly?: boolean;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
name?: string;
|
|
20
|
+
mode?: "list" | "both" | "inline" | "none";
|
|
21
|
+
autoHighlight?: boolean | "always";
|
|
22
|
+
limit?: number;
|
|
23
|
+
openOnInputClick?: boolean;
|
|
24
|
+
filter?: ((itemValue: Value, query: string, itemToString?: (itemValue: Value) => string) => boolean) | null;
|
|
25
|
+
itemToStringValue?: (itemValue: Value) => string;
|
|
26
|
+
};
|
|
27
|
+
type AutocompleteInputProps = Omit<Omit<ComponentProps<"input">, "size">, "style"> & {
|
|
28
|
+
style?: CSSProperties & FieldKnobStyle;
|
|
29
|
+
} & {
|
|
30
|
+
size?: ControlSize;
|
|
31
|
+
};
|
|
32
|
+
type AutocompleteClearProps = ComponentProps<"button"> & {
|
|
33
|
+
style?: CSSProperties & FieldKnobStyle;
|
|
34
|
+
};
|
|
35
|
+
type AutocompleteContentProps = Omit<ComponentProps<"div"> & {
|
|
36
|
+
sideOffset?: number;
|
|
37
|
+
}, "style"> & {
|
|
38
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
39
|
+
};
|
|
40
|
+
type AutocompleteListProps<Value = unknown> = Omit<ComponentProps<"div">, "children"> & {
|
|
41
|
+
children?: ReactNode | ((item: Value, index: number) => ReactNode);
|
|
42
|
+
} & {
|
|
43
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
44
|
+
};
|
|
45
|
+
type AutocompleteItemProps<Value = unknown> = Omit<Omit<ComponentProps<"div">, "value"> & {
|
|
46
|
+
value?: Value;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
}, "style"> & {
|
|
49
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
50
|
+
};
|
|
51
|
+
type AutocompleteEmptyProps = Omit<ComponentProps<"div">, "style"> & {
|
|
52
|
+
style?: CSSProperties & FieldKnobStyle;
|
|
53
|
+
};
|
|
54
|
+
type AutocompleteGroupProps = ComponentProps<"div"> & {
|
|
55
|
+
style?: CSSProperties & FieldKnobStyle;
|
|
56
|
+
};
|
|
57
|
+
type AutocompleteGroupLabelProps = Omit<ComponentProps<"div">, "style"> & {
|
|
58
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
59
|
+
};
|
|
60
|
+
declare function Autocomplete<Value = string>({ children, autoHighlight, ...props }: AutocompleteProps<Value>): import("react").JSX.Element;
|
|
61
|
+
declare function AutocompleteClear({ className, children, ...props }: AutocompleteClearProps): import("react").JSX.Element;
|
|
62
|
+
declare function AutocompleteInput({ size, className, ...props }: AutocompleteInputProps): import("react").JSX.Element;
|
|
63
|
+
declare function AutocompleteContent({ className, children, sideOffset, ...props }: AutocompleteContentProps): import("react").JSX.Element;
|
|
64
|
+
declare function AutocompleteList<Value = unknown>({ className, children, ...props }: AutocompleteListProps<Value>): import("react").JSX.Element;
|
|
65
|
+
declare function AutocompleteEmpty({ className, children, ...props }: AutocompleteEmptyProps): import("react").JSX.Element;
|
|
66
|
+
declare function AutocompleteItem<Value = unknown>({ className, children, disabled, ...props }: AutocompleteItemProps<Value>): import("react").JSX.Element;
|
|
67
|
+
declare function AutocompleteGroup({ className, children, ...props }: AutocompleteGroupProps): import("react").JSX.Element;
|
|
68
|
+
declare function AutocompleteGroupLabel({ className, children, ...props }: AutocompleteGroupLabelProps): import("react").JSX.Element;
|
|
69
|
+
//#endregion
|
|
70
|
+
export { Autocomplete, AutocompleteClear, AutocompleteClearProps, AutocompleteContent, AutocompleteContentProps, AutocompleteEmpty, AutocompleteEmptyProps, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteGroupLabelProps, AutocompleteGroupProps, AutocompleteInput, AutocompleteInputProps, AutocompleteItem, AutocompleteItemProps, AutocompleteList, AutocompleteListProps, AutocompleteProps };
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { skinEffects, skinId } from "../skin.js";
|
|
4
|
+
import { ScrollArea } from "./scroll-area.js";
|
|
5
|
+
import { popupItemStructureClasses } from "../surface-variants.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Autocomplete as Autocomplete$1 } from "@base-ui/react/autocomplete";
|
|
8
|
+
//#region src/ui/autocomplete.tsx
|
|
9
|
+
function Autocomplete({ children, autoHighlight = true, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(Autocomplete$1.Root, {
|
|
11
|
+
autoHighlight,
|
|
12
|
+
...props,
|
|
13
|
+
children
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function AutocompleteClear({ className, children, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(Autocomplete$1.Clear, {
|
|
18
|
+
"data-control-ui": "autocomplete",
|
|
19
|
+
"data-control-family": "field",
|
|
20
|
+
"data-field-kind": "autocomplete",
|
|
21
|
+
"data-slot": "clear",
|
|
22
|
+
"aria-label": "Clear search",
|
|
23
|
+
className: cn("inline-flex size-6 shrink-0 cursor-pointer items-center justify-center disabled:cursor-not-allowed", className),
|
|
24
|
+
...props,
|
|
25
|
+
children: children ?? /* @__PURE__ */ jsx("svg", {
|
|
26
|
+
viewBox: "0 0 12 12",
|
|
27
|
+
className: "size-3",
|
|
28
|
+
"aria-hidden": "true",
|
|
29
|
+
fill: "none",
|
|
30
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
31
|
+
d: "M3 3 9 9M9 3 3 9",
|
|
32
|
+
stroke: "currentColor",
|
|
33
|
+
strokeWidth: "1.3",
|
|
34
|
+
strokeLinecap: "round",
|
|
35
|
+
strokeLinejoin: "round"
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function AutocompleteInput({ size = "md", className, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsxs(Autocomplete$1.InputGroup, {
|
|
42
|
+
"data-control-ui": "autocomplete",
|
|
43
|
+
"data-field-kind": "autocomplete",
|
|
44
|
+
"data-slot": "root",
|
|
45
|
+
className: "relative flex w-full items-center",
|
|
46
|
+
children: [/* @__PURE__ */ jsx(Autocomplete$1.Input, {
|
|
47
|
+
"data-control-ui": "autocomplete",
|
|
48
|
+
"data-field-kind": "autocomplete",
|
|
49
|
+
"data-slot": "input",
|
|
50
|
+
"data-control": "true",
|
|
51
|
+
"data-control-family": "field",
|
|
52
|
+
"data-size": size,
|
|
53
|
+
className: cn("w-full min-w-0 disabled:cursor-not-allowed", className),
|
|
54
|
+
...props
|
|
55
|
+
}), /* @__PURE__ */ jsx(AutocompleteClear, { className: "absolute right-1.5 top-1/2 -translate-y-1/2" })]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function AutocompleteContent({ className, children, sideOffset = 6, ...props }) {
|
|
59
|
+
return /* @__PURE__ */ jsx(Autocomplete$1.Portal, { children: /* @__PURE__ */ jsx(Autocomplete$1.Positioner, {
|
|
60
|
+
"data-control-ui": "autocomplete",
|
|
61
|
+
"data-popup-kind": "autocomplete",
|
|
62
|
+
"data-control-family": "popup",
|
|
63
|
+
"data-slot": "positioner",
|
|
64
|
+
"data-skin": skinId(),
|
|
65
|
+
"data-effects": skinEffects(),
|
|
66
|
+
side: "bottom",
|
|
67
|
+
align: "start",
|
|
68
|
+
sideOffset,
|
|
69
|
+
className: "z-[80]",
|
|
70
|
+
children: /* @__PURE__ */ jsx(Autocomplete$1.Popup, {
|
|
71
|
+
"data-control-ui": "autocomplete",
|
|
72
|
+
"data-popup-kind": "autocomplete",
|
|
73
|
+
"data-control-family": "popup",
|
|
74
|
+
"data-slot": "content",
|
|
75
|
+
"data-surface": "floating",
|
|
76
|
+
"data-popup-part": "list-surface",
|
|
77
|
+
className: cn("w-[var(--anchor-width)] max-w-[var(--available-width)]", className),
|
|
78
|
+
...props,
|
|
79
|
+
children
|
|
80
|
+
})
|
|
81
|
+
}) });
|
|
82
|
+
}
|
|
83
|
+
function AutocompleteList({ className, children, ...props }) {
|
|
84
|
+
return /* @__PURE__ */ jsx(ScrollArea, {
|
|
85
|
+
className: "w-full",
|
|
86
|
+
maxHeight: "min(18rem, var(--available-height))",
|
|
87
|
+
children: /* @__PURE__ */ jsx(Autocomplete$1.List, {
|
|
88
|
+
"data-control-ui": "autocomplete",
|
|
89
|
+
"data-popup-kind": "autocomplete",
|
|
90
|
+
"data-slot": "list",
|
|
91
|
+
"data-control-family": "popup",
|
|
92
|
+
"data-popup-part": "list-content",
|
|
93
|
+
className,
|
|
94
|
+
...props,
|
|
95
|
+
children
|
|
96
|
+
})
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function AutocompleteEmpty({ className, children, ...props }) {
|
|
100
|
+
return /* @__PURE__ */ jsx(Autocomplete$1.Empty, {
|
|
101
|
+
"data-control-ui": "autocomplete",
|
|
102
|
+
"data-control-family": "popup",
|
|
103
|
+
"data-popup-kind": "autocomplete",
|
|
104
|
+
"data-slot": "empty",
|
|
105
|
+
className: cn("px-[calc(var(--padding-x)*0.5)] empty:h-0 empty:overflow-hidden empty:p-0", className),
|
|
106
|
+
...props,
|
|
107
|
+
children
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function AutocompleteItem({ className, children, disabled, ...props }) {
|
|
111
|
+
return /* @__PURE__ */ jsx(Autocomplete$1.Item, {
|
|
112
|
+
"data-control-ui": "autocomplete",
|
|
113
|
+
"data-popup-kind": "autocomplete",
|
|
114
|
+
"data-control-family": "popup",
|
|
115
|
+
"data-slot": "item",
|
|
116
|
+
"data-popup-part": "item",
|
|
117
|
+
disabled,
|
|
118
|
+
className: cn(popupItemStructureClasses, className),
|
|
119
|
+
...props,
|
|
120
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
121
|
+
className: "flex min-w-0 flex-1 items-center truncate",
|
|
122
|
+
children
|
|
123
|
+
})
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function AutocompleteGroup({ className, children, ...props }) {
|
|
127
|
+
return /* @__PURE__ */ jsx(Autocomplete$1.Group, {
|
|
128
|
+
"data-control-ui": "autocomplete",
|
|
129
|
+
"data-control-family": "field",
|
|
130
|
+
"data-field-kind": "autocomplete",
|
|
131
|
+
"data-slot": "group",
|
|
132
|
+
className,
|
|
133
|
+
...props,
|
|
134
|
+
children
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function AutocompleteGroupLabel({ className, children, ...props }) {
|
|
138
|
+
return /* @__PURE__ */ jsx(Autocomplete$1.GroupLabel, {
|
|
139
|
+
"data-control-ui": "autocomplete",
|
|
140
|
+
"data-popup-kind": "autocomplete",
|
|
141
|
+
"data-slot": "group-label",
|
|
142
|
+
"data-control-family": "popup",
|
|
143
|
+
"data-popup-part": "label",
|
|
144
|
+
className: cn("px-[calc(var(--padding-x)*0.5)]", className),
|
|
145
|
+
...props,
|
|
146
|
+
children
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
//#endregion
|
|
150
|
+
export { Autocomplete, AutocompleteClear, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteItem, AutocompleteList };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AvatarKnobStyle } from "../knob-contracts/avatar-knobs.js";
|
|
2
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
3
|
+
//#region src/ui/avatar.d.ts
|
|
4
|
+
type AvatarProps = Omit<ComponentProps<"span">, "style"> & {
|
|
5
|
+
style?: CSSProperties & AvatarKnobStyle;
|
|
6
|
+
};
|
|
7
|
+
type AvatarGroupProps = Omit<ComponentProps<"div">, "style"> & {
|
|
8
|
+
style?: CSSProperties & AvatarKnobStyle;
|
|
9
|
+
};
|
|
10
|
+
type AvatarImageProps = ComponentProps<"img"> & {
|
|
11
|
+
onLoadingStatusChange?: (status: "idle" | "loading" | "loaded" | "error") => void;
|
|
12
|
+
} & {
|
|
13
|
+
style?: CSSProperties & AvatarKnobStyle;
|
|
14
|
+
};
|
|
15
|
+
type AvatarFallbackProps = Omit<ComponentProps<"span">, "style"> & {
|
|
16
|
+
delay?: number;
|
|
17
|
+
style?: CSSProperties & AvatarKnobStyle;
|
|
18
|
+
};
|
|
19
|
+
declare function Avatar({ className, ...props }: AvatarProps): import("react").JSX.Element;
|
|
20
|
+
declare function AvatarGroup({ className, ...props }: AvatarGroupProps): import("react").JSX.Element;
|
|
21
|
+
declare function AvatarImage({ className, ...props }: AvatarImageProps): import("react").JSX.Element;
|
|
22
|
+
declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): import("react").JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Avatar, AvatarFallback, AvatarFallbackProps, AvatarGroup, AvatarGroupProps, AvatarImage, AvatarImageProps, AvatarProps };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
5
|
+
//#region src/ui/avatar.tsx
|
|
6
|
+
function Avatar({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Avatar$1.Root, {
|
|
8
|
+
"data-control-ui": "avatar",
|
|
9
|
+
"data-control-family": "avatar",
|
|
10
|
+
"data-slot": "root",
|
|
11
|
+
className: cn("relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden align-middle", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function AvatarGroup({ className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
role: "group",
|
|
18
|
+
"data-control-ui": "avatar",
|
|
19
|
+
"data-control-family": "avatar",
|
|
20
|
+
"data-slot": "group",
|
|
21
|
+
className: cn("isolate inline-flex items-center -space-x-2", className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function AvatarImage({ className, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(Avatar$1.Image, {
|
|
27
|
+
"data-control-ui": "avatar",
|
|
28
|
+
"data-control-family": "avatar",
|
|
29
|
+
"data-slot": "image",
|
|
30
|
+
className: cn("size-full object-cover", className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function AvatarFallback({ className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
|
|
36
|
+
"data-control-ui": "avatar",
|
|
37
|
+
"data-control-family": "avatar",
|
|
38
|
+
"data-slot": "fallback",
|
|
39
|
+
className: cn("flex size-full items-center justify-center", className),
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Avatar, AvatarFallback, AvatarGroup, AvatarImage };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RenderProp } from "../control-props.js";
|
|
2
|
+
import { BadgeKnobStyle } from "../knob-contracts/badge-knobs.js";
|
|
3
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
4
|
+
//#region src/ui/badge.d.ts
|
|
5
|
+
declare const badgeVariants: readonly ["default", "outline"];
|
|
6
|
+
type BadgeVariant = (typeof badgeVariants)[number];
|
|
7
|
+
declare const badgeSizes: readonly ["sm", "md"];
|
|
8
|
+
type BadgeSize = (typeof badgeSizes)[number];
|
|
9
|
+
declare const BADGE_COLORS: readonly ["neutral", "red", "orange", "yellow", "green", "blue", "purple", "pink"];
|
|
10
|
+
type BadgeColor = (typeof BADGE_COLORS)[number];
|
|
11
|
+
type BadgeProps = Omit<ComponentProps<"span">, "style"> & {
|
|
12
|
+
variant?: BadgeVariant;
|
|
13
|
+
size?: BadgeSize;
|
|
14
|
+
color?: BadgeColor;
|
|
15
|
+
render?: RenderProp<ComponentProps<"span">>;
|
|
16
|
+
style?: CSSProperties & BadgeKnobStyle;
|
|
17
|
+
};
|
|
18
|
+
declare function Badge({ variant, size, color, render, className, children, ...props }: BadgeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { BADGE_COLORS, Badge, BadgeColor, BadgeProps, BadgeSize, BadgeVariant, badgeSizes, badgeVariants };
|
package/dist/ui/badge.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
//#region src/ui/badge.tsx
|
|
5
|
+
const badgeVariants = ["default", "outline"];
|
|
6
|
+
const badgeSizes = ["sm", "md"];
|
|
7
|
+
const BADGE_COLORS = [
|
|
8
|
+
"neutral",
|
|
9
|
+
"red",
|
|
10
|
+
"orange",
|
|
11
|
+
"yellow",
|
|
12
|
+
"green",
|
|
13
|
+
"blue",
|
|
14
|
+
"purple",
|
|
15
|
+
"pink"
|
|
16
|
+
];
|
|
17
|
+
function Badge({ variant = "default", size = "md", color, render, className, children, ...props }) {
|
|
18
|
+
const resolvedColor = color ?? "neutral";
|
|
19
|
+
return useRender({
|
|
20
|
+
defaultTagName: "span",
|
|
21
|
+
render,
|
|
22
|
+
props: {
|
|
23
|
+
...props,
|
|
24
|
+
"data-control-ui": "badge",
|
|
25
|
+
"data-control-family": "badge",
|
|
26
|
+
"data-slot": "root",
|
|
27
|
+
"data-variant": variant,
|
|
28
|
+
"data-size": size,
|
|
29
|
+
"data-color": resolvedColor,
|
|
30
|
+
className: cn("inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap border font-medium [&>svg]:pointer-events-none [&>svg]:size-3", size === "sm" ? "text-micro" : "text-caption", className),
|
|
31
|
+
children
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { BADGE_COLORS, Badge, badgeSizes, badgeVariants };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ControlSize } from "../control-variants.js";
|
|
2
|
+
import { ButtonGroupKnobStyle } from "../knob-contracts/button-group-knobs.js";
|
|
3
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
4
|
+
//#region src/ui/button-group.d.ts
|
|
5
|
+
type ButtonGroupTextProps = Omit<ComponentProps<"div"> & {
|
|
6
|
+
size?: ControlSize;
|
|
7
|
+
}, "style"> & {
|
|
8
|
+
style?: CSSProperties & ButtonGroupKnobStyle;
|
|
9
|
+
};
|
|
10
|
+
type ButtonGroupProps = ComponentProps<"div"> & {
|
|
11
|
+
orientation?: "horizontal" | "vertical";
|
|
12
|
+
} & {
|
|
13
|
+
style?: CSSProperties & ButtonGroupKnobStyle;
|
|
14
|
+
};
|
|
15
|
+
type ButtonGroupSeparatorProps = Omit<ComponentProps<"div"> & {
|
|
16
|
+
orientation?: "horizontal" | "vertical";
|
|
17
|
+
}, "style"> & {
|
|
18
|
+
style?: CSSProperties & ButtonGroupKnobStyle;
|
|
19
|
+
};
|
|
20
|
+
declare function ButtonGroup({ orientation, className, ...props }: ButtonGroupProps): import("react").JSX.Element;
|
|
21
|
+
declare function ButtonGroupText({ size, className, ...props }: ButtonGroupTextProps): import("react").JSX.Element;
|
|
22
|
+
declare function ButtonGroupSeparator({ orientation, className, ...props }: ButtonGroupSeparatorProps): import("react").JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupSeparatorProps, ButtonGroupText, ButtonGroupTextProps };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
//#region src/ui/button-group.tsx
|
|
5
|
+
const buttonGroupVariant = cva("inline-flex w-fit items-stretch [&>*]:relative [&>*:focus-within:not([data-active=true])]:z-[1] [&>*[data-active=true]]:z-[2] [&>*[data-active=true]:focus-within]:z-[3]", {
|
|
6
|
+
variants: { orientation: {
|
|
7
|
+
horizontal: "flex-row [&>*:not(:first-child)]:-ml-px [&>*:not(:first-child)]:rounded-l-none [&>*:not(:last-child)]:rounded-r-none",
|
|
8
|
+
vertical: "flex-col [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:rounded-t-none [&>*:not(:last-child)]:rounded-b-none"
|
|
9
|
+
} },
|
|
10
|
+
defaultVariants: { orientation: "horizontal" }
|
|
11
|
+
});
|
|
12
|
+
function ButtonGroup({ orientation = "horizontal", className, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
role: "group",
|
|
15
|
+
"data-control-ui": "button-group",
|
|
16
|
+
"data-control-family": "button-group",
|
|
17
|
+
"data-slot": "root",
|
|
18
|
+
"data-orientation": orientation,
|
|
19
|
+
className: cn(buttonGroupVariant({ orientation }), className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function ButtonGroupText({ size = "sm", className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25
|
+
"data-control-ui": "button-group",
|
|
26
|
+
"data-control-family": "button-group",
|
|
27
|
+
"data-slot": "text",
|
|
28
|
+
"data-size": size,
|
|
29
|
+
className: cn("inline-flex items-center whitespace-nowrap [&>svg]:pointer-events-none [&>svg]:size-4 [&>svg]:shrink-0", className),
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function ButtonGroupSeparator({ orientation = "vertical", className, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx("div", {
|
|
35
|
+
"aria-hidden": "true",
|
|
36
|
+
"data-control-ui": "button-group",
|
|
37
|
+
"data-control-family": "button-group",
|
|
38
|
+
"data-slot": "separator",
|
|
39
|
+
"data-orientation": orientation,
|
|
40
|
+
className: cn("shrink-0 self-stretch", orientation === "vertical" ? "w-px" : "h-px w-full", className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { RenderProp } from "../control-props.js";
|
|
2
|
+
import { ControlSize, ControlTone, ControlVariant } from "../control-variants.js";
|
|
3
|
+
import { ButtonKnobStyle } from "../knob-contracts/button-knobs.js";
|
|
4
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
5
|
+
//#region src/ui/button.d.ts
|
|
6
|
+
type ButtonVariant = ControlVariant;
|
|
7
|
+
type ButtonSize = ControlSize;
|
|
8
|
+
type ButtonTone = ControlTone;
|
|
9
|
+
declare const buttonShapes: readonly ["default", "circle"];
|
|
10
|
+
type ButtonShape = (typeof buttonShapes)[number];
|
|
11
|
+
type ButtonAppearanceProps = {
|
|
12
|
+
variant?: ButtonVariant;
|
|
13
|
+
size?: ButtonSize;
|
|
14
|
+
tone?: ButtonTone;
|
|
15
|
+
active?: boolean;
|
|
16
|
+
iconOnly?: boolean;
|
|
17
|
+
shape?: ButtonShape;
|
|
18
|
+
style?: CSSProperties & ButtonKnobStyle;
|
|
19
|
+
};
|
|
20
|
+
type ButtonProps = ComponentProps<"button"> & ButtonAppearanceProps & {
|
|
21
|
+
render?: RenderProp<ComponentProps<"button">, {
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
nativeButton?: boolean;
|
|
25
|
+
};
|
|
26
|
+
type ButtonLinkProps = ComponentProps<"a"> & ButtonAppearanceProps & {
|
|
27
|
+
render?: RenderProp<ComponentProps<"a">>;
|
|
28
|
+
};
|
|
29
|
+
type ButtonLabelProps = ComponentProps<"label"> & ButtonAppearanceProps;
|
|
30
|
+
declare const buttonStructureClasses = "relative isolate inline-flex shrink-0 items-center justify-center overflow-visible whitespace-nowrap";
|
|
31
|
+
declare const buttonContentClasses = "relative z-[1] inline-flex min-w-0 items-center justify-center gap-[inherit]";
|
|
32
|
+
declare function Button({ variant, size, tone, active, iconOnly, shape, type, disabled, render, nativeButton, className, children, ...props }: ButtonProps): import("react").JSX.Element;
|
|
33
|
+
declare function ButtonLink({ variant, size, tone, active, iconOnly, shape, render, className, children, ...props }: ButtonLinkProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
34
|
+
declare function ButtonLabel({ variant, size, tone, active, iconOnly, shape, className, children, ...props }: ButtonLabelProps): import("react").JSX.Element;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Button, ButtonAppearanceProps, ButtonLabel, ButtonLabelProps, ButtonLink, ButtonLinkProps, ButtonProps, ButtonShape, ButtonSize, ButtonTone, ButtonVariant, buttonContentClasses, buttonShapes, buttonStructureClasses };
|