@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,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { skinAdornment } from "../skin.js";
|
|
4
|
+
import { Button as Button$1 } from "@base-ui/react/button";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/ui/button.tsx
|
|
8
|
+
const buttonShapes = ["default", "circle"];
|
|
9
|
+
const buttonStructureClasses = "relative isolate inline-flex shrink-0 items-center justify-center overflow-visible whitespace-nowrap";
|
|
10
|
+
const buttonContentClasses = "relative z-[1] inline-flex min-w-0 items-center justify-center gap-[inherit]";
|
|
11
|
+
function ButtonContent({ children }) {
|
|
12
|
+
return /* @__PURE__ */ jsx("span", {
|
|
13
|
+
"data-control-ui": "button",
|
|
14
|
+
"data-control-family": "button",
|
|
15
|
+
"data-slot": "content",
|
|
16
|
+
className: buttonContentClasses,
|
|
17
|
+
children
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/** The content wrapper only earns its node when a skin layer sits behind it and needs stacking above it. */
|
|
21
|
+
function ButtonBody({ layer, wrap = true, children }) {
|
|
22
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [layer, wrap && layer ? /* @__PURE__ */ jsx(ButtonContent, { children }) : children] });
|
|
23
|
+
}
|
|
24
|
+
function Button({ variant = "quiet", size = "sm", tone = "neutral", active = false, iconOnly = false, shape = "default", type = "button", disabled, render, nativeButton, className, children, ...props }) {
|
|
25
|
+
const layer = skinAdornment("button", "layer", {
|
|
26
|
+
variant,
|
|
27
|
+
tone
|
|
28
|
+
});
|
|
29
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
30
|
+
type: nativeButton === false ? void 0 : type,
|
|
31
|
+
disabled,
|
|
32
|
+
"data-control-ui": "button",
|
|
33
|
+
"data-control-family": "button",
|
|
34
|
+
"data-slot": "root",
|
|
35
|
+
"data-control": "true",
|
|
36
|
+
"data-active": active ? "true" : void 0,
|
|
37
|
+
"data-icon-only": iconOnly ? "true" : void 0,
|
|
38
|
+
"data-shape": shape,
|
|
39
|
+
"data-variant": variant,
|
|
40
|
+
"data-tone": tone,
|
|
41
|
+
"data-size": size,
|
|
42
|
+
className: cn(buttonStructureClasses, className),
|
|
43
|
+
render,
|
|
44
|
+
nativeButton,
|
|
45
|
+
...props,
|
|
46
|
+
children: /* @__PURE__ */ jsx(ButtonBody, {
|
|
47
|
+
layer,
|
|
48
|
+
wrap: !render,
|
|
49
|
+
children
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function ButtonLink({ variant = "quiet", size = "sm", tone = "neutral", active = false, iconOnly = false, shape = "default", render, className, children, ...props }) {
|
|
54
|
+
return useRender({
|
|
55
|
+
defaultTagName: "a",
|
|
56
|
+
render,
|
|
57
|
+
props: {
|
|
58
|
+
...props,
|
|
59
|
+
"data-control-ui": "button",
|
|
60
|
+
"data-control-family": "button",
|
|
61
|
+
"data-slot": "root",
|
|
62
|
+
"data-control": "true",
|
|
63
|
+
"data-active": active ? "true" : void 0,
|
|
64
|
+
"data-icon-only": iconOnly ? "true" : void 0,
|
|
65
|
+
"data-shape": shape,
|
|
66
|
+
"data-variant": variant,
|
|
67
|
+
"data-tone": tone,
|
|
68
|
+
"data-size": size,
|
|
69
|
+
className: cn(buttonStructureClasses, className),
|
|
70
|
+
children: /* @__PURE__ */ jsx(ButtonBody, {
|
|
71
|
+
layer: skinAdornment("button", "layer", {
|
|
72
|
+
variant,
|
|
73
|
+
tone
|
|
74
|
+
}),
|
|
75
|
+
children
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function ButtonLabel({ variant = "quiet", size = "sm", tone = "neutral", active = false, iconOnly = false, shape = "default", className, children, ...props }) {
|
|
81
|
+
return /* @__PURE__ */ jsx("label", {
|
|
82
|
+
...props,
|
|
83
|
+
"data-control-ui": "button",
|
|
84
|
+
"data-control-family": "button",
|
|
85
|
+
"data-slot": "root",
|
|
86
|
+
"data-control": "true",
|
|
87
|
+
"data-active": active ? "true" : void 0,
|
|
88
|
+
"data-icon-only": iconOnly ? "true" : void 0,
|
|
89
|
+
"data-shape": shape,
|
|
90
|
+
"data-variant": variant,
|
|
91
|
+
"data-tone": tone,
|
|
92
|
+
"data-size": size,
|
|
93
|
+
className: cn(buttonStructureClasses, className),
|
|
94
|
+
children: /* @__PURE__ */ jsx(ButtonBody, {
|
|
95
|
+
layer: skinAdornment("button", "layer", {
|
|
96
|
+
variant,
|
|
97
|
+
tone
|
|
98
|
+
}),
|
|
99
|
+
children
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { Button, ButtonLabel, ButtonLink, buttonContentClasses, buttonShapes, buttonStructureClasses };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CalendarKnobStyle } from "../knob-contracts/calendar-knobs.js";
|
|
2
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
3
|
+
import { DayPicker } from "react-day-picker";
|
|
4
|
+
//#region src/ui/calendar.d.ts
|
|
5
|
+
type CalendarPropsWithStyle<Props> = Props extends unknown ? Omit<Props, "style"> & {
|
|
6
|
+
style?: CSSProperties & CalendarKnobStyle;
|
|
7
|
+
} : never;
|
|
8
|
+
type CalendarProps = CalendarPropsWithStyle<ComponentProps<typeof DayPicker>>;
|
|
9
|
+
declare function Calendar({ className, showOutsideDays, style, ...props }: CalendarProps): import("react").JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Calendar, CalendarProps };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { CaptionLabel, Day, DayPicker, Month, MonthCaption, MonthGrid, Months, Nav, Weekday } from "react-day-picker";
|
|
6
|
+
//#region src/ui/calendar.tsx
|
|
7
|
+
const dayButtonClasses = "flex w-full items-center justify-center disabled:pointer-events-none";
|
|
8
|
+
const navButtonClasses = "inline-flex items-center justify-center disabled:pointer-events-none";
|
|
9
|
+
const chevronPathByOrientation = {
|
|
10
|
+
left: "M10 3 5.5 8 10 13",
|
|
11
|
+
right: "M6 3 10.5 8 6 13",
|
|
12
|
+
up: "M3 10 8 5.5 13 10",
|
|
13
|
+
down: "M3 6 8 10.5 13 6"
|
|
14
|
+
};
|
|
15
|
+
function Calendar({ className, showOutsideDays = true, style, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
"data-control-ui": "calendar",
|
|
18
|
+
"data-control-family": "calendar",
|
|
19
|
+
"data-slot": "root",
|
|
20
|
+
className: cn("w-fit", className),
|
|
21
|
+
style,
|
|
22
|
+
children: /* @__PURE__ */ jsx(DayPicker, {
|
|
23
|
+
showOutsideDays,
|
|
24
|
+
components: {
|
|
25
|
+
Chevron: CalendarChevron,
|
|
26
|
+
Months: CalendarMonths,
|
|
27
|
+
Month: CalendarMonth,
|
|
28
|
+
MonthCaption: CalendarMonthCaption,
|
|
29
|
+
CaptionLabel: CalendarCaptionLabel,
|
|
30
|
+
Nav: CalendarNav,
|
|
31
|
+
PreviousMonthButton: CalendarNavButton,
|
|
32
|
+
NextMonthButton: CalendarNavButton,
|
|
33
|
+
MonthGrid: CalendarMonthGrid,
|
|
34
|
+
Weekday: CalendarWeekday,
|
|
35
|
+
Day: CalendarDay,
|
|
36
|
+
DayButton: CalendarDayButton
|
|
37
|
+
},
|
|
38
|
+
...props
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function CalendarMonths({ className, ...props }) {
|
|
43
|
+
return /* @__PURE__ */ jsx(Months, {
|
|
44
|
+
"data-control-ui": "calendar",
|
|
45
|
+
"data-control-family": "calendar",
|
|
46
|
+
"data-slot": "months",
|
|
47
|
+
className: cn("relative flex flex-col sm:flex-row", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function CalendarMonth({ className, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsx(Month, {
|
|
53
|
+
"data-control-ui": "calendar",
|
|
54
|
+
"data-control-family": "calendar",
|
|
55
|
+
"data-slot": "month",
|
|
56
|
+
className: cn("flex flex-col", className),
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function CalendarMonthCaption({ className, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ jsx(MonthCaption, {
|
|
62
|
+
"data-control-ui": "calendar",
|
|
63
|
+
"data-control-family": "calendar",
|
|
64
|
+
"data-slot": "month-caption",
|
|
65
|
+
className: cn("flex items-center justify-center", className),
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function CalendarCaptionLabel({ className, ...props }) {
|
|
70
|
+
return /* @__PURE__ */ jsx(CaptionLabel, {
|
|
71
|
+
"data-control-ui": "calendar",
|
|
72
|
+
"data-control-family": "calendar",
|
|
73
|
+
"data-slot": "caption-label",
|
|
74
|
+
className: cn("select-none", className),
|
|
75
|
+
...props
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function CalendarNav({ className, ...props }) {
|
|
79
|
+
return /* @__PURE__ */ jsx(Nav, {
|
|
80
|
+
"data-control-ui": "calendar",
|
|
81
|
+
"data-control-family": "calendar",
|
|
82
|
+
"data-slot": "nav",
|
|
83
|
+
className: cn("absolute inset-x-0 top-0 flex items-center justify-between", className),
|
|
84
|
+
...props
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function CalendarNavButton({ className, ...props }) {
|
|
88
|
+
return /* @__PURE__ */ jsx("button", {
|
|
89
|
+
"data-control-ui": "calendar",
|
|
90
|
+
"data-control-family": "calendar",
|
|
91
|
+
"data-slot": "nav-button",
|
|
92
|
+
className: cn(navButtonClasses, className),
|
|
93
|
+
...props
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function CalendarMonthGrid({ className, ...props }) {
|
|
97
|
+
return /* @__PURE__ */ jsx(MonthGrid, {
|
|
98
|
+
"data-control-ui": "calendar",
|
|
99
|
+
"data-control-family": "calendar",
|
|
100
|
+
"data-slot": "month-grid",
|
|
101
|
+
className: cn("w-full", className),
|
|
102
|
+
...props
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function CalendarWeekday({ className, ...props }) {
|
|
106
|
+
return /* @__PURE__ */ jsx(Weekday, {
|
|
107
|
+
"data-control-ui": "calendar",
|
|
108
|
+
"data-control-family": "calendar",
|
|
109
|
+
"data-slot": "weekday",
|
|
110
|
+
className: cn(className),
|
|
111
|
+
...props
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function CalendarDay({ className, ...props }) {
|
|
115
|
+
return /* @__PURE__ */ jsx(Day, {
|
|
116
|
+
"data-control-ui": "calendar",
|
|
117
|
+
"data-control-family": "calendar",
|
|
118
|
+
"data-slot": "day-cell",
|
|
119
|
+
className: cn("p-0 align-middle", className),
|
|
120
|
+
...props
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function CalendarDayButton({ day, modifiers, className, ...props }) {
|
|
124
|
+
const ref = useRef(null);
|
|
125
|
+
useEffect(() => {
|
|
126
|
+
if (modifiers.focused) ref.current?.focus();
|
|
127
|
+
}, [modifiers.focused]);
|
|
128
|
+
const isSingleDayRange = Boolean(modifiers.range_start && modifiers.range_end);
|
|
129
|
+
const isRange = !isSingleDayRange && (modifiers.range_start || modifiers.range_middle || modifiers.range_end);
|
|
130
|
+
return /* @__PURE__ */ jsx("button", {
|
|
131
|
+
ref,
|
|
132
|
+
type: "button",
|
|
133
|
+
"data-control-ui": "calendar",
|
|
134
|
+
"data-control-family": "calendar",
|
|
135
|
+
"data-slot": "day",
|
|
136
|
+
"data-today": modifiers.today ? true : void 0,
|
|
137
|
+
"data-selected-single": modifiers.selected && !isRange ? true : void 0,
|
|
138
|
+
"data-range-start": modifiers.range_start && !isSingleDayRange ? true : void 0,
|
|
139
|
+
"data-range-middle": modifiers.range_middle ? true : void 0,
|
|
140
|
+
"data-range-end": modifiers.range_end && !isSingleDayRange ? true : void 0,
|
|
141
|
+
className: cn(dayButtonClasses, className),
|
|
142
|
+
...props
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function CalendarChevron({ className, orientation }) {
|
|
146
|
+
const path = chevronPathByOrientation[orientation ?? "down"];
|
|
147
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
148
|
+
viewBox: "0 0 16 16",
|
|
149
|
+
className: cn("size-4", className),
|
|
150
|
+
fill: "none",
|
|
151
|
+
stroke: "currentColor",
|
|
152
|
+
strokeWidth: "1.5",
|
|
153
|
+
strokeLinecap: "round",
|
|
154
|
+
strokeLinejoin: "round",
|
|
155
|
+
"aria-hidden": "true",
|
|
156
|
+
children: /* @__PURE__ */ jsx("path", { d: path })
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
export { Calendar };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CardKnobStyle } from "../knob-contracts/card-knobs.js";
|
|
2
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
3
|
+
//#region src/ui/card.d.ts
|
|
4
|
+
type CardVariant = "default" | "sectioned";
|
|
5
|
+
type CardProps = Omit<ComponentProps<"div">, "style"> & {
|
|
6
|
+
style?: CSSProperties & CardKnobStyle;
|
|
7
|
+
} & {
|
|
8
|
+
variant?: CardVariant;
|
|
9
|
+
};
|
|
10
|
+
type CardHeaderProps = ComponentProps<"div"> & {
|
|
11
|
+
style?: CSSProperties & CardKnobStyle;
|
|
12
|
+
};
|
|
13
|
+
type CardTitleProps = Omit<ComponentProps<"div">, "style"> & {
|
|
14
|
+
style?: CSSProperties & CardKnobStyle;
|
|
15
|
+
};
|
|
16
|
+
type CardDescriptionProps = ComponentProps<"div"> & {
|
|
17
|
+
style?: CSSProperties & CardKnobStyle;
|
|
18
|
+
};
|
|
19
|
+
type CardActionProps = ComponentProps<"div"> & {
|
|
20
|
+
style?: CSSProperties & CardKnobStyle;
|
|
21
|
+
};
|
|
22
|
+
type CardContentProps = ComponentProps<"div"> & {
|
|
23
|
+
style?: CSSProperties & CardKnobStyle;
|
|
24
|
+
};
|
|
25
|
+
type CardFooterProps = ComponentProps<"div"> & {
|
|
26
|
+
style?: CSSProperties & CardKnobStyle;
|
|
27
|
+
};
|
|
28
|
+
declare function Card({ variant, className, ...props }: CardProps): import("react").JSX.Element;
|
|
29
|
+
declare function CardHeader({ className, ...props }: CardHeaderProps): import("react").JSX.Element;
|
|
30
|
+
declare function CardTitle({ className, ...props }: CardTitleProps): import("react").JSX.Element;
|
|
31
|
+
declare function CardDescription({ className, ...props }: CardDescriptionProps): import("react").JSX.Element;
|
|
32
|
+
declare function CardAction({ className, ...props }: CardActionProps): import("react").JSX.Element;
|
|
33
|
+
declare function CardContent({ className, ...props }: CardContentProps): import("react").JSX.Element;
|
|
34
|
+
declare function CardFooter({ className, ...props }: CardFooterProps): import("react").JSX.Element;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Card, CardAction, CardActionProps, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, CardVariant };
|
package/dist/ui/card.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/ui/card.tsx
|
|
4
|
+
function Card({ variant = "default", className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6
|
+
"data-control-ui": "card",
|
|
7
|
+
"data-control-family": "card",
|
|
8
|
+
"data-slot": "root",
|
|
9
|
+
"data-surface": "panel",
|
|
10
|
+
"data-variant": variant,
|
|
11
|
+
className: cn("flex flex-col", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function CardHeader({ className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
"data-control-ui": "card",
|
|
18
|
+
"data-control-family": "card",
|
|
19
|
+
"data-slot": "header",
|
|
20
|
+
className: cn("grid auto-rows-min grid-rows-[auto_auto] items-start has-data-[slot=card-action]:grid-cols-[1fr_auto]", className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function CardTitle({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx("div", {
|
|
26
|
+
"data-control-ui": "card",
|
|
27
|
+
"data-control-family": "card",
|
|
28
|
+
"data-slot": "title",
|
|
29
|
+
className,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function CardDescription({ className, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx("div", {
|
|
35
|
+
"data-control-ui": "card",
|
|
36
|
+
"data-control-family": "card",
|
|
37
|
+
"data-slot": "description",
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function CardAction({ className, ...props }) {
|
|
43
|
+
return /* @__PURE__ */ jsx("div", {
|
|
44
|
+
"data-control-ui": "card",
|
|
45
|
+
"data-control-family": "card",
|
|
46
|
+
"data-slot": "action",
|
|
47
|
+
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function CardContent({ className, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsx("div", {
|
|
53
|
+
"data-control-ui": "card",
|
|
54
|
+
"data-control-family": "card",
|
|
55
|
+
"data-slot": "content",
|
|
56
|
+
className,
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function CardFooter({ className, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ jsx("div", {
|
|
62
|
+
"data-control-ui": "card",
|
|
63
|
+
"data-control-family": "card",
|
|
64
|
+
"data-slot": "footer",
|
|
65
|
+
className: cn("flex items-center [.border-t]:pt-6", className),
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ControlledMultiChoice } from "../control-props.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
//#region src/ui/checkbox-group.d.ts
|
|
4
|
+
type CheckboxGroupProps = Omit<ComponentProps<"div">, "defaultValue" | "onChange"> & ControlledMultiChoice & {
|
|
5
|
+
allValues?: string[];
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
orientation?: "horizontal" | "vertical";
|
|
8
|
+
};
|
|
9
|
+
declare function CheckboxGroup({ className, orientation, ...props }: CheckboxGroupProps): import("react").JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { CheckboxGroup, CheckboxGroupProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { CheckboxGroup as CheckboxGroup$1 } from "@base-ui/react/checkbox-group";
|
|
5
|
+
//#region src/ui/checkbox-group.tsx
|
|
6
|
+
function CheckboxGroup({ className, orientation = "vertical", ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(CheckboxGroup$1, {
|
|
8
|
+
"data-control-ui": "checkbox-group",
|
|
9
|
+
"data-slot": "root",
|
|
10
|
+
"data-orientation": orientation,
|
|
11
|
+
className: cn("flex flex-col gap-2.5 data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:gap-4", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { CheckboxGroup };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ChoiceKnobStyle } from "../knob-contracts/choice-knobs.js";
|
|
2
|
+
import { CSSProperties } from "react";
|
|
3
|
+
//#region src/ui/checkbox.d.ts
|
|
4
|
+
type CheckboxProps = Omit<{
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
defaultChecked?: boolean;
|
|
7
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
name?: string;
|
|
13
|
+
value?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
"aria-label"?: string;
|
|
17
|
+
"aria-labelledby"?: string;
|
|
18
|
+
}, "style"> & {
|
|
19
|
+
style?: CSSProperties & ChoiceKnobStyle;
|
|
20
|
+
};
|
|
21
|
+
declare function Checkbox({ className, checked, defaultChecked, onCheckedChange, indeterminate, disabled, readOnly, required, name, value, id, ...props }: CheckboxProps): import("react").JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Checkbox, CheckboxProps };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
5
|
+
//#region src/ui/checkbox.tsx
|
|
6
|
+
function Checkbox({ className, checked, defaultChecked, onCheckedChange, indeterminate, disabled, readOnly, required, name, value, id, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
8
|
+
"data-control-ui": "checkbox",
|
|
9
|
+
"data-choice-kind": "checkbox",
|
|
10
|
+
"data-control-family": "choice",
|
|
11
|
+
"data-slot": "root",
|
|
12
|
+
checked,
|
|
13
|
+
defaultChecked,
|
|
14
|
+
onCheckedChange,
|
|
15
|
+
indeterminate,
|
|
16
|
+
disabled,
|
|
17
|
+
readOnly,
|
|
18
|
+
required,
|
|
19
|
+
name,
|
|
20
|
+
value,
|
|
21
|
+
id,
|
|
22
|
+
className: cn("group/checkbox relative inline-flex shrink-0 cursor-pointer items-center justify-center", "data-[disabled]:cursor-not-allowed", className),
|
|
23
|
+
...props,
|
|
24
|
+
children: /* @__PURE__ */ jsxs(Checkbox$1.Indicator, {
|
|
25
|
+
"data-control-ui": "checkbox",
|
|
26
|
+
"data-control-family": "choice",
|
|
27
|
+
"data-choice-kind": "checkbox",
|
|
28
|
+
"data-slot": "indicator",
|
|
29
|
+
className: "flex items-center justify-center data-[unchecked]:hidden",
|
|
30
|
+
children: [/* @__PURE__ */ jsx("svg", {
|
|
31
|
+
viewBox: "0 0 12 12",
|
|
32
|
+
className: "size-3 group-data-[indeterminate]/checkbox:hidden",
|
|
33
|
+
"aria-hidden": "true",
|
|
34
|
+
fill: "none",
|
|
35
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
36
|
+
d: "M2.5 6.5 5 9l4.5-5",
|
|
37
|
+
stroke: "currentColor",
|
|
38
|
+
strokeWidth: "1.6",
|
|
39
|
+
strokeLinecap: "round",
|
|
40
|
+
strokeLinejoin: "round"
|
|
41
|
+
})
|
|
42
|
+
}), /* @__PURE__ */ jsx("svg", {
|
|
43
|
+
viewBox: "0 0 12 12",
|
|
44
|
+
className: "hidden size-3 group-data-[indeterminate]/checkbox:block",
|
|
45
|
+
"aria-hidden": "true",
|
|
46
|
+
fill: "none",
|
|
47
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
48
|
+
d: "M2.75 6h6.5",
|
|
49
|
+
stroke: "currentColor",
|
|
50
|
+
strokeWidth: "1.6",
|
|
51
|
+
strokeLinecap: "round"
|
|
52
|
+
})
|
|
53
|
+
})]
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { Checkbox };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CodeDiffKnobStyle } from "../knob-contracts/code-diff-knobs.js";
|
|
2
|
+
import { CodeCopyProps, CodeOverflow } from "./code.js";
|
|
3
|
+
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
4
|
+
//#region src/ui/code-diff.d.ts
|
|
5
|
+
type DiffStyle = "unified" | "split";
|
|
6
|
+
type DiffIndicators = "classic" | "bars" | "none";
|
|
7
|
+
type DiffLineKind = "word" | "char" | "none";
|
|
8
|
+
type CodeDiffProps = Omit<ComponentProps<"figure">, "children" | "style"> & {
|
|
9
|
+
patch?: string;
|
|
10
|
+
oldText?: string;
|
|
11
|
+
newText?: string;
|
|
12
|
+
lang?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
diffStyle?: DiffStyle;
|
|
15
|
+
diffIndicators?: DiffIndicators;
|
|
16
|
+
lineDiffType?: DiffLineKind;
|
|
17
|
+
overflow?: CodeOverflow;
|
|
18
|
+
maxLineDiffLength?: number;
|
|
19
|
+
maxHeight?: string;
|
|
20
|
+
header?: boolean;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
style?: CSSProperties & CodeDiffKnobStyle;
|
|
23
|
+
};
|
|
24
|
+
declare function CodeDiff({ patch, oldText, newText, lang, name, diffStyle, diffIndicators, lineDiffType, overflow, maxLineDiffLength, maxHeight, header, className, style, ...props }: CodeDiffProps): import("react").JSX.Element;
|
|
25
|
+
type CodeDiffCopyProps = CodeCopyProps;
|
|
26
|
+
declare function CodeDiffCopy(props: CodeDiffCopyProps): import("react").JSX.Element;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { CodeDiff, CodeDiffCopy, CodeDiffCopyProps, CodeDiffProps, DiffIndicators, DiffLineKind, DiffStyle };
|