@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,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Collapsible } from "@base-ui/react/collapsible";
|
|
6
|
+
//#region src/ui/morphing-panel.tsx
|
|
7
|
+
function MorphingPanelTriggerElement({ triggerProps, open, render, className, children }) {
|
|
8
|
+
const panelState = open ? "open" : "closed";
|
|
9
|
+
return useRender({
|
|
10
|
+
defaultTagName: "button",
|
|
11
|
+
render,
|
|
12
|
+
state: { open },
|
|
13
|
+
props: {
|
|
14
|
+
...triggerProps,
|
|
15
|
+
"data-control-ui": "morphing-panel",
|
|
16
|
+
"data-slot": "trigger",
|
|
17
|
+
"data-state": panelState,
|
|
18
|
+
className: cn(triggerProps.className, className),
|
|
19
|
+
children
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function MorphingPanel({ collapsedSize, expandedSize, className, style, ...props }) {
|
|
24
|
+
const dimensions = {
|
|
25
|
+
"--_morphing-panel-collapsed-height": collapsedSize.height,
|
|
26
|
+
"--_morphing-panel-collapsed-width": collapsedSize.width,
|
|
27
|
+
"--_morphing-panel-expanded-height": expandedSize.height,
|
|
28
|
+
"--_morphing-panel-expanded-width": expandedSize.width,
|
|
29
|
+
...style
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ jsx(Collapsible.Root, {
|
|
32
|
+
className,
|
|
33
|
+
style: dimensions,
|
|
34
|
+
render: (renderProps, state) => {
|
|
35
|
+
const panelState = state.open ? "open" : "closed";
|
|
36
|
+
const panelSize = state.open ? "expanded" : "collapsed";
|
|
37
|
+
const panelStyle = {
|
|
38
|
+
...renderProps.style,
|
|
39
|
+
height: `var(--_morphing-panel-${panelSize}-height)`,
|
|
40
|
+
width: `min(var(--_morphing-panel-${panelSize}-width), 100%)`
|
|
41
|
+
};
|
|
42
|
+
return /* @__PURE__ */ jsx("div", {
|
|
43
|
+
...renderProps,
|
|
44
|
+
"data-control-ui": "morphing-panel",
|
|
45
|
+
"data-control-family": "morphing-panel",
|
|
46
|
+
"data-slot": "root",
|
|
47
|
+
"data-state": panelState,
|
|
48
|
+
"data-surface": "panel",
|
|
49
|
+
style: panelStyle,
|
|
50
|
+
className: cn("relative isolate max-w-full overflow-hidden", renderProps.className)
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function MorphingPanelTrigger({ render, className, children, ...props }) {
|
|
57
|
+
return /* @__PURE__ */ jsx(Collapsible.Trigger, {
|
|
58
|
+
className: "group/morphing-panel-trigger absolute top-0 right-0 z-10 flex cursor-pointer items-center justify-between data-[state=open]:top-2 data-[state=open]:right-2 data-[state=open]:justify-center [&>svg]:shrink-0",
|
|
59
|
+
...props,
|
|
60
|
+
render: (triggerProps, state) => /* @__PURE__ */ jsx(MorphingPanelTriggerElement, {
|
|
61
|
+
triggerProps,
|
|
62
|
+
open: state.open,
|
|
63
|
+
render,
|
|
64
|
+
className,
|
|
65
|
+
children
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function MorphingPanelContent({ className, ...props }) {
|
|
70
|
+
return /* @__PURE__ */ jsx(Collapsible.Panel, {
|
|
71
|
+
className,
|
|
72
|
+
render: (renderProps, state) => {
|
|
73
|
+
const panelState = state.open ? "open" : "closed";
|
|
74
|
+
return /* @__PURE__ */ jsx("div", {
|
|
75
|
+
...renderProps,
|
|
76
|
+
"data-control-ui": "morphing-panel",
|
|
77
|
+
"data-control-family": "morphing-panel",
|
|
78
|
+
"data-slot": "content",
|
|
79
|
+
"data-state": panelState,
|
|
80
|
+
className: cn("absolute inset-0 overflow-hidden", renderProps.className)
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
...props
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
export { MorphingPanel, MorphingPanelContent, MorphingPanelTrigger };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ControlSize } from "../control-variants.js";
|
|
2
|
+
import { FieldKnobStyle } from "../knob-contracts/field-knobs.js";
|
|
3
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
4
|
+
//#region src/ui/native-select.d.ts
|
|
5
|
+
type NativeSelectProps = Omit<Omit<ComponentProps<"select">, "size">, "style"> & {
|
|
6
|
+
style?: CSSProperties & FieldKnobStyle;
|
|
7
|
+
} & {
|
|
8
|
+
size?: ControlSize;
|
|
9
|
+
};
|
|
10
|
+
declare function NativeSelect({ size, className, children, ...props }: NativeSelectProps): import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { NativeSelect, NativeSelectProps };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/ui/native-select.tsx
|
|
4
|
+
function NativeSelect({ size = "md", className, children, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
6
|
+
className: "relative inline-flex w-full items-center",
|
|
7
|
+
children: [/* @__PURE__ */ jsx("select", {
|
|
8
|
+
"data-control-ui": "native-select",
|
|
9
|
+
"data-field-kind": "native-select",
|
|
10
|
+
"data-slot": "root",
|
|
11
|
+
"data-size": size,
|
|
12
|
+
"data-control-family": "field",
|
|
13
|
+
"data-control": "true",
|
|
14
|
+
className: cn("w-full min-w-0 cursor-pointer", className),
|
|
15
|
+
...props,
|
|
16
|
+
children
|
|
17
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
"data-control-ui": "native-select",
|
|
20
|
+
"data-control-family": "field",
|
|
21
|
+
"data-field-kind": "native-select",
|
|
22
|
+
"data-slot": "icon",
|
|
23
|
+
className: "pointer-events-none absolute right-[calc(var(--padding-x)*0.6)]",
|
|
24
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
25
|
+
viewBox: "0 0 12 12",
|
|
26
|
+
className: "size-3",
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
fill: "none",
|
|
29
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
30
|
+
d: "M3 4.5 6 7.5 9 4.5",
|
|
31
|
+
stroke: "currentColor",
|
|
32
|
+
strokeWidth: "1.3",
|
|
33
|
+
strokeLinecap: "round",
|
|
34
|
+
strokeLinejoin: "round"
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { NativeSelect };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ButtonKnobStyle } from "../knob-contracts/button-knobs.js";
|
|
2
|
+
import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
3
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
4
|
+
import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
|
|
5
|
+
//#region src/ui/navigation-menu.d.ts
|
|
6
|
+
type NavigationMenuProps = ComponentProps<"nav"> & {
|
|
7
|
+
value?: string | null;
|
|
8
|
+
defaultValue?: string | null;
|
|
9
|
+
onValueChange?: (value: string | null) => void;
|
|
10
|
+
orientation?: "horizontal" | "vertical";
|
|
11
|
+
delay?: number;
|
|
12
|
+
closeDelay?: number;
|
|
13
|
+
} & {
|
|
14
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
15
|
+
};
|
|
16
|
+
type NavigationMenuListProps = ComponentProps<"ul"> & {
|
|
17
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
18
|
+
};
|
|
19
|
+
type NavigationMenuItemProps = ComponentProps<"li"> & {
|
|
20
|
+
value?: string;
|
|
21
|
+
} & {
|
|
22
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
23
|
+
};
|
|
24
|
+
type NavigationMenuTriggerProps = Omit<ComponentProps<"button">, "style"> & {
|
|
25
|
+
style?: CSSProperties & ButtonKnobStyle & PopupKnobStyle;
|
|
26
|
+
};
|
|
27
|
+
type NavigationMenuContentProps = ComponentProps<"div"> & {
|
|
28
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
29
|
+
};
|
|
30
|
+
declare const navigationMenuLinkVariants: readonly ["default", "compact"];
|
|
31
|
+
type NavigationMenuLinkVariant = (typeof navigationMenuLinkVariants)[number];
|
|
32
|
+
type NavigationMenuLinkProps = Omit<ComponentProps<"a">, "style"> & {
|
|
33
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
34
|
+
} & {
|
|
35
|
+
active?: boolean;
|
|
36
|
+
closeOnClick?: boolean;
|
|
37
|
+
variant?: NavigationMenuLinkVariant;
|
|
38
|
+
};
|
|
39
|
+
type NavigationMenuViewportProps = Omit<ComponentProps<"div">, "style"> & {
|
|
40
|
+
style?: CSSProperties & PopupKnobStyle;
|
|
41
|
+
};
|
|
42
|
+
type RefinedLinkProps = NavigationMenuLinkProps & Pick<ComponentProps<typeof NavigationMenu$1.Link>, "render">;
|
|
43
|
+
declare function NavigationMenu({ className, children, ...props }: NavigationMenuProps): import("react").JSX.Element;
|
|
44
|
+
declare function NavigationMenuList({ className, ...props }: NavigationMenuListProps): import("react").JSX.Element;
|
|
45
|
+
declare function NavigationMenuItem({ className, ...props }: NavigationMenuItemProps): import("react").JSX.Element;
|
|
46
|
+
declare function NavigationMenuTrigger({ className, children, ...props }: NavigationMenuTriggerProps): import("react").JSX.Element;
|
|
47
|
+
declare function NavigationMenuContent({ className, children, ...props }: NavigationMenuContentProps): import("react").JSX.Element;
|
|
48
|
+
declare function NavigationMenuLink({ variant, className, active, children, ...props }: RefinedLinkProps): import("react").JSX.Element;
|
|
49
|
+
declare function NavigationMenuViewport({ className, ...props }: NavigationMenuViewportProps): import("react").JSX.Element;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuContentProps, NavigationMenuItem, NavigationMenuItemProps, NavigationMenuLink, NavigationMenuLinkProps, NavigationMenuLinkVariant, NavigationMenuList, NavigationMenuListProps, NavigationMenuProps, NavigationMenuTrigger, NavigationMenuTriggerProps, NavigationMenuViewport, NavigationMenuViewportProps, navigationMenuLinkVariants };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { skinEffects, skinId } from "../skin.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
|
|
6
|
+
//#region src/ui/navigation-menu.tsx
|
|
7
|
+
const navigationMenuLinkVariants = ["default", "compact"];
|
|
8
|
+
function NavigationMenu({ className, children, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Root, {
|
|
10
|
+
"data-control-ui": "navigation-menu",
|
|
11
|
+
"data-control-family": "popup",
|
|
12
|
+
"data-popup-kind": "navigation-menu",
|
|
13
|
+
"data-slot": "root",
|
|
14
|
+
className: cn("relative flex max-w-max flex-1 items-center justify-center", className),
|
|
15
|
+
...props,
|
|
16
|
+
children
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function NavigationMenuList({ className, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.List, {
|
|
21
|
+
"data-control-ui": "navigation-menu",
|
|
22
|
+
"data-control-family": "popup",
|
|
23
|
+
"data-popup-kind": "navigation-menu",
|
|
24
|
+
"data-slot": "list",
|
|
25
|
+
className: cn("flex flex-1 list-none items-center justify-center", className),
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function NavigationMenuItem({ className, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Item, {
|
|
31
|
+
"data-control-ui": "navigation-menu",
|
|
32
|
+
"data-control-family": "popup",
|
|
33
|
+
"data-popup-kind": "navigation-menu",
|
|
34
|
+
"data-slot": "item",
|
|
35
|
+
className: cn("relative", className),
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function NavigationMenuTrigger({ className, children, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsxs(NavigationMenu$1.Trigger, {
|
|
41
|
+
"data-control-ui": "navigation-menu",
|
|
42
|
+
"data-control-family": "button",
|
|
43
|
+
"data-slot": "trigger",
|
|
44
|
+
"data-control": "true",
|
|
45
|
+
"data-cursor": "default",
|
|
46
|
+
"data-size": "sm",
|
|
47
|
+
"data-variant": "quiet",
|
|
48
|
+
"data-tone": "neutral",
|
|
49
|
+
"data-shape": "default",
|
|
50
|
+
className: cn("inline-flex select-none items-center", className),
|
|
51
|
+
...props,
|
|
52
|
+
children: [children, /* @__PURE__ */ jsx(NavigationMenu$1.Icon, {
|
|
53
|
+
"data-control-ui": "navigation-menu",
|
|
54
|
+
"data-control-family": "popup",
|
|
55
|
+
"data-popup-kind": "navigation-menu",
|
|
56
|
+
"data-slot": "icon",
|
|
57
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
58
|
+
viewBox: "0 0 12 12",
|
|
59
|
+
className: "size-3",
|
|
60
|
+
"aria-hidden": "true",
|
|
61
|
+
fill: "none",
|
|
62
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
63
|
+
d: "M3 4.5 6 7.5 9 4.5",
|
|
64
|
+
stroke: "currentColor",
|
|
65
|
+
strokeWidth: "1.3",
|
|
66
|
+
strokeLinecap: "round",
|
|
67
|
+
strokeLinejoin: "round"
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function NavigationMenuContent({ className, children, ...props }) {
|
|
74
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Content, {
|
|
75
|
+
"data-control-ui": "navigation-menu",
|
|
76
|
+
"data-control-family": "popup",
|
|
77
|
+
"data-popup-kind": "navigation-menu",
|
|
78
|
+
"data-slot": "content",
|
|
79
|
+
className: cn("h-full w-full p-[var(--popover-padding)]", className),
|
|
80
|
+
...props,
|
|
81
|
+
children
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function NavigationMenuLink({ variant = "default", className, active, children, ...props }) {
|
|
85
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Link, {
|
|
86
|
+
"data-control-ui": "navigation-menu",
|
|
87
|
+
"data-popup-kind": "navigation-menu",
|
|
88
|
+
"data-slot": "link",
|
|
89
|
+
"data-control-family": "popup",
|
|
90
|
+
"data-popup-part": "navigation-link",
|
|
91
|
+
"data-variant": variant,
|
|
92
|
+
active,
|
|
93
|
+
className: cn("block select-none", variant === "compact" && "inline-flex h-[var(--control-h-sm)] items-center px-[calc(var(--padding-x)*0.75)]", className),
|
|
94
|
+
...props,
|
|
95
|
+
children
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function NavigationMenuViewport({ className, ...props }) {
|
|
99
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Portal, { children: /* @__PURE__ */ jsx(NavigationMenu$1.Positioner, {
|
|
100
|
+
"data-control-ui": "navigation-menu",
|
|
101
|
+
"data-control-family": "popup",
|
|
102
|
+
"data-popup-kind": "navigation-menu",
|
|
103
|
+
"data-slot": "positioner",
|
|
104
|
+
"data-skin": skinId(),
|
|
105
|
+
"data-effects": skinEffects(),
|
|
106
|
+
sideOffset: 8,
|
|
107
|
+
collisionPadding: {
|
|
108
|
+
top: 5,
|
|
109
|
+
bottom: 5,
|
|
110
|
+
left: 16,
|
|
111
|
+
right: 16
|
|
112
|
+
},
|
|
113
|
+
collisionAvoidance: { side: "none" },
|
|
114
|
+
className: "z-[80] h-[var(--positioner-height)] w-[var(--positioner-width)] max-w-[var(--available-width)] before:absolute before:inset-x-0 before:top-[-8px] before:h-2 before:content-['']",
|
|
115
|
+
children: /* @__PURE__ */ jsx(NavigationMenu$1.Popup, {
|
|
116
|
+
"data-control-ui": "navigation-menu",
|
|
117
|
+
"data-control-family": "popup",
|
|
118
|
+
"data-popup-kind": "navigation-menu",
|
|
119
|
+
"data-slot": "popup",
|
|
120
|
+
className: "relative h-[var(--popup-height)] w-[var(--popup-width)]",
|
|
121
|
+
children: /* @__PURE__ */ jsx(NavigationMenu$1.Viewport, {
|
|
122
|
+
"data-control-ui": "navigation-menu",
|
|
123
|
+
"data-popup-kind": "navigation-menu",
|
|
124
|
+
"data-slot": "viewport",
|
|
125
|
+
"data-surface": "floating",
|
|
126
|
+
"data-control-family": "popup",
|
|
127
|
+
"data-popup-part": "surface",
|
|
128
|
+
className: cn("relative h-full w-full overflow-hidden", className),
|
|
129
|
+
...props
|
|
130
|
+
})
|
|
131
|
+
})
|
|
132
|
+
}) });
|
|
133
|
+
}
|
|
134
|
+
//#endregion
|
|
135
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuLinkVariants };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ControlSize } from "../control-variants.js";
|
|
2
|
+
import { FieldKnobStyle } from "../knob-contracts/field-knobs.js";
|
|
3
|
+
import { CSSProperties, ComponentProps, ReactNode, Ref } from "react";
|
|
4
|
+
//#region src/ui/number-field.d.ts
|
|
5
|
+
type NumberFieldChangeReason = "input-change" | "input-clear" | "input-blur" | "input-paste" | "keyboard" | "increment-press" | "decrement-press" | "wheel" | "scrub" | "none";
|
|
6
|
+
type NumberFieldChangeEventDetails = {
|
|
7
|
+
reason: NumberFieldChangeReason;
|
|
8
|
+
event: Event;
|
|
9
|
+
cancel?: () => void;
|
|
10
|
+
allowPropagation?: () => void;
|
|
11
|
+
isCanceled?: boolean;
|
|
12
|
+
isPropagationAllowed?: boolean;
|
|
13
|
+
trigger?: Element | undefined;
|
|
14
|
+
};
|
|
15
|
+
type NumberFieldProps = {
|
|
16
|
+
size?: ControlSize;
|
|
17
|
+
value?: number | null;
|
|
18
|
+
defaultValue?: number;
|
|
19
|
+
onValueChange?: (value: number | null, eventDetails: NumberFieldChangeEventDetails) => void;
|
|
20
|
+
onValueCommitted?: (value: number | null, eventDetails: NumberFieldChangeEventDetails) => void;
|
|
21
|
+
min?: number;
|
|
22
|
+
max?: number;
|
|
23
|
+
step?: number;
|
|
24
|
+
smallStep?: number;
|
|
25
|
+
largeStep?: number;
|
|
26
|
+
snapOnStep?: boolean;
|
|
27
|
+
allowOutOfRange?: boolean;
|
|
28
|
+
allowWheelScrub?: boolean;
|
|
29
|
+
format?: Intl.NumberFormatOptions;
|
|
30
|
+
locale?: Intl.LocalesArgument;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
readOnly?: boolean;
|
|
33
|
+
required?: boolean;
|
|
34
|
+
name?: string;
|
|
35
|
+
form?: string;
|
|
36
|
+
id?: string;
|
|
37
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
38
|
+
className?: string;
|
|
39
|
+
style?: CSSProperties & FieldKnobStyle;
|
|
40
|
+
children?: ReactNode;
|
|
41
|
+
};
|
|
42
|
+
type NumberFieldGroupProps = Omit<ComponentProps<"div">, "style"> & {
|
|
43
|
+
style?: CSSProperties & FieldKnobStyle;
|
|
44
|
+
};
|
|
45
|
+
type NumberFieldInputProps = Omit<ComponentProps<"input">, "style"> & {
|
|
46
|
+
style?: CSSProperties & FieldKnobStyle;
|
|
47
|
+
};
|
|
48
|
+
type NumberFieldIncrementProps = ComponentProps<"button"> & {
|
|
49
|
+
nativeButton?: boolean;
|
|
50
|
+
} & {
|
|
51
|
+
style?: CSSProperties & FieldKnobStyle;
|
|
52
|
+
};
|
|
53
|
+
type NumberFieldDecrementProps = ComponentProps<"button"> & {
|
|
54
|
+
nativeButton?: boolean;
|
|
55
|
+
} & {
|
|
56
|
+
style?: CSSProperties & FieldKnobStyle;
|
|
57
|
+
};
|
|
58
|
+
type NumberFieldScrubAreaProps = ComponentProps<"span"> & {
|
|
59
|
+
direction?: "horizontal" | "vertical";
|
|
60
|
+
pixelSensitivity?: number;
|
|
61
|
+
teleportDistance?: number;
|
|
62
|
+
} & {
|
|
63
|
+
style?: CSSProperties & FieldKnobStyle;
|
|
64
|
+
};
|
|
65
|
+
declare function NumberField({ size, value, defaultValue, children, ...props }: NumberFieldProps): import("react").JSX.Element;
|
|
66
|
+
declare function NumberFieldGroup({ className, children, ...props }: NumberFieldGroupProps): import("react").JSX.Element;
|
|
67
|
+
declare function NumberFieldInput({ className, ...props }: NumberFieldInputProps): import("react").JSX.Element;
|
|
68
|
+
declare function NumberFieldDecrement({ className, children, ...props }: NumberFieldDecrementProps): import("react").JSX.Element;
|
|
69
|
+
declare function NumberFieldIncrement({ className, children, ...props }: NumberFieldIncrementProps): import("react").JSX.Element;
|
|
70
|
+
declare function NumberFieldScrubArea({ className, children, ...props }: NumberFieldScrubAreaProps): import("react").JSX.Element;
|
|
71
|
+
//#endregion
|
|
72
|
+
export { NumberField, NumberFieldChangeEventDetails, NumberFieldChangeReason, NumberFieldDecrement, NumberFieldDecrementProps, NumberFieldGroup, NumberFieldGroupProps, NumberFieldIncrement, NumberFieldIncrementProps, NumberFieldInput, NumberFieldInputProps, NumberFieldProps, NumberFieldScrubArea, NumberFieldScrubAreaProps };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { NumberField as NumberField$1 } from "@base-ui/react/number-field";
|
|
6
|
+
//#region src/ui/number-field.tsx
|
|
7
|
+
const NumberFieldSizeContext = createContext("md");
|
|
8
|
+
function NumberField({ size = "md", value, defaultValue, children, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(NumberFieldSizeContext.Provider, {
|
|
10
|
+
value: size,
|
|
11
|
+
children: /* @__PURE__ */ jsx(NumberField$1.Root, {
|
|
12
|
+
value,
|
|
13
|
+
defaultValue,
|
|
14
|
+
...props,
|
|
15
|
+
children
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function NumberFieldGroup({ className, children, ...props }) {
|
|
20
|
+
const size = useContext(NumberFieldSizeContext);
|
|
21
|
+
return /* @__PURE__ */ jsx(NumberField$1.Group, {
|
|
22
|
+
"data-control-ui": "number-field",
|
|
23
|
+
"data-field-kind": "number-field",
|
|
24
|
+
"data-slot": "group",
|
|
25
|
+
"data-control": "true",
|
|
26
|
+
"data-control-family": "field",
|
|
27
|
+
"data-size": size,
|
|
28
|
+
className: cn("inline-flex items-stretch overflow-hidden", className),
|
|
29
|
+
...props,
|
|
30
|
+
children
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function NumberFieldInput({ className, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(NumberField$1.Input, {
|
|
35
|
+
"data-control-ui": "number-field",
|
|
36
|
+
"data-control-family": "field",
|
|
37
|
+
"data-field-kind": "number-field",
|
|
38
|
+
"data-slot": "input",
|
|
39
|
+
className: cn("h-full min-w-0 flex-1 disabled:cursor-not-allowed", className),
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function NumberFieldDecrement({ className, children, ...props }) {
|
|
44
|
+
return /* @__PURE__ */ jsx(NumberField$1.Decrement, {
|
|
45
|
+
"data-control-ui": "number-field",
|
|
46
|
+
"data-control-family": "field",
|
|
47
|
+
"data-field-kind": "number-field",
|
|
48
|
+
"data-slot": "decrement",
|
|
49
|
+
"aria-label": "Decrease",
|
|
50
|
+
className: cn("flex aspect-square h-full shrink-0 cursor-pointer select-none items-center justify-center", className),
|
|
51
|
+
...props,
|
|
52
|
+
children: children ?? /* @__PURE__ */ jsx(MinusIcon, {})
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function NumberFieldIncrement({ className, children, ...props }) {
|
|
56
|
+
return /* @__PURE__ */ jsx(NumberField$1.Increment, {
|
|
57
|
+
"data-control-ui": "number-field",
|
|
58
|
+
"data-control-family": "field",
|
|
59
|
+
"data-field-kind": "number-field",
|
|
60
|
+
"data-slot": "increment",
|
|
61
|
+
"aria-label": "Increase",
|
|
62
|
+
className: cn("flex aspect-square h-full shrink-0 cursor-pointer select-none items-center justify-center", className),
|
|
63
|
+
...props,
|
|
64
|
+
children: children ?? /* @__PURE__ */ jsx(PlusIcon, {})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function NumberFieldScrubArea({ className, children, ...props }) {
|
|
68
|
+
return /* @__PURE__ */ jsxs(NumberField$1.ScrubArea, {
|
|
69
|
+
"data-control-ui": "number-field",
|
|
70
|
+
"data-control-family": "field",
|
|
71
|
+
"data-field-kind": "number-field",
|
|
72
|
+
"data-slot": "scrub-area",
|
|
73
|
+
className: cn("cursor-ew-resize select-none", className),
|
|
74
|
+
...props,
|
|
75
|
+
children: [children, /* @__PURE__ */ jsx(NumberField$1.ScrubAreaCursor, {
|
|
76
|
+
"data-control-ui": "number-field",
|
|
77
|
+
"data-control-family": "field",
|
|
78
|
+
"data-field-kind": "number-field",
|
|
79
|
+
"data-slot": "scrub-cursor",
|
|
80
|
+
children: /* @__PURE__ */ jsx(CursorGrowIcon, {})
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function MinusIcon() {
|
|
85
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
86
|
+
viewBox: "0 0 16 16",
|
|
87
|
+
className: "size-3.5",
|
|
88
|
+
fill: "none",
|
|
89
|
+
stroke: "currentColor",
|
|
90
|
+
strokeWidth: "1.5",
|
|
91
|
+
strokeLinecap: "round",
|
|
92
|
+
"aria-hidden": "true",
|
|
93
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3 8h10" })
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function PlusIcon() {
|
|
97
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
98
|
+
viewBox: "0 0 16 16",
|
|
99
|
+
className: "size-3.5",
|
|
100
|
+
fill: "none",
|
|
101
|
+
stroke: "currentColor",
|
|
102
|
+
strokeWidth: "1.5",
|
|
103
|
+
strokeLinecap: "round",
|
|
104
|
+
"aria-hidden": "true",
|
|
105
|
+
children: /* @__PURE__ */ jsx("path", { d: "M8 3v10M3 8h10" })
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function CursorGrowIcon() {
|
|
109
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
110
|
+
"data-control-ui": "number-field",
|
|
111
|
+
"data-field-kind": "number-field",
|
|
112
|
+
"data-control-family": "field",
|
|
113
|
+
"data-slot": "drag-icon",
|
|
114
|
+
width: "26",
|
|
115
|
+
height: "14",
|
|
116
|
+
viewBox: "0 0 24 14",
|
|
117
|
+
fill: "currentColor",
|
|
118
|
+
className: "block",
|
|
119
|
+
"aria-hidden": "true",
|
|
120
|
+
children: /* @__PURE__ */ jsx("path", { d: "M19.5 5.5 6.5 5.52V2L1 7l5.5 5V8.5h13V12L25 7l-5.5-5v3.5Z" })
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
export { NumberField, NumberFieldDecrement, NumberFieldGroup, NumberFieldIncrement, NumberFieldInput, NumberFieldScrubArea };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PaginationKnobStyle } from "../knob-contracts/pagination-knobs.js";
|
|
2
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
3
|
+
//#region src/ui/pagination.d.ts
|
|
4
|
+
type PaginationEllipsisProps = Omit<ComponentProps<"span">, "style"> & {
|
|
5
|
+
style?: CSSProperties & PaginationKnobStyle;
|
|
6
|
+
};
|
|
7
|
+
type PaginationLinkProps = Omit<ComponentProps<"a"> & {
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
}, "style"> & {
|
|
10
|
+
style?: CSSProperties & PaginationKnobStyle;
|
|
11
|
+
};
|
|
12
|
+
declare function Pagination({ className, ...props }: ComponentProps<"nav"> & {
|
|
13
|
+
style?: CSSProperties & PaginationKnobStyle;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
declare function PaginationContent({ className, ...props }: ComponentProps<"ul"> & {
|
|
16
|
+
style?: CSSProperties & PaginationKnobStyle;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
declare function PaginationItem({ className, ...props }: ComponentProps<"li"> & {
|
|
19
|
+
style?: CSSProperties & PaginationKnobStyle;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
declare function PaginationLink({ isActive, className, ...props }: PaginationLinkProps): import("react").JSX.Element;
|
|
22
|
+
declare function PaginationPrevious({ className, ...props }: ComponentProps<typeof PaginationLink>): import("react").JSX.Element;
|
|
23
|
+
declare function PaginationNext({ className, ...props }: ComponentProps<typeof PaginationLink>): import("react").JSX.Element;
|
|
24
|
+
declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): import("react").JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationEllipsisProps, PaginationItem, PaginationLink, PaginationLinkProps, PaginationNext, PaginationPrevious };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
|
4
|
+
//#region src/ui/pagination.tsx
|
|
5
|
+
function Pagination({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
7
|
+
"aria-label": "pagination",
|
|
8
|
+
"data-control-ui": "pagination",
|
|
9
|
+
"data-control-family": "pagination",
|
|
10
|
+
"data-slot": "root",
|
|
11
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function PaginationContent({ className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
17
|
+
"data-control-ui": "pagination",
|
|
18
|
+
"data-control-family": "pagination",
|
|
19
|
+
"data-slot": "content",
|
|
20
|
+
className: cn("flex flex-row items-center", className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function PaginationItem({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx("li", {
|
|
26
|
+
"data-control-ui": "pagination",
|
|
27
|
+
"data-control-family": "pagination",
|
|
28
|
+
"data-slot": "item",
|
|
29
|
+
className,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const paginationLinkChrome = "inline-flex h-[var(--control-h-sm)] min-w-[var(--control-h-sm)] cursor-pointer select-none items-center justify-center whitespace-nowrap aria-disabled:pointer-events-none [&>svg]:size-4 [&>svg]:shrink-0";
|
|
34
|
+
function PaginationLink({ isActive = false, className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx("a", {
|
|
36
|
+
"aria-current": isActive ? "page" : void 0,
|
|
37
|
+
"data-control-ui": "pagination",
|
|
38
|
+
"data-control-family": "pagination",
|
|
39
|
+
"data-slot": "link",
|
|
40
|
+
"data-control": "true",
|
|
41
|
+
"data-active": isActive ? "true" : void 0,
|
|
42
|
+
className: cn(paginationLinkChrome, className),
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function PaginationPrevious({ className, ...props }) {
|
|
47
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
48
|
+
"aria-label": "Go to previous page",
|
|
49
|
+
className,
|
|
50
|
+
...props,
|
|
51
|
+
children: [/* @__PURE__ */ jsx(ChevronLeft, {}), /* @__PURE__ */ jsx("span", { children: "Previous" })]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function PaginationNext({ className, ...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
56
|
+
"aria-label": "Go to next page",
|
|
57
|
+
className,
|
|
58
|
+
...props,
|
|
59
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Next" }), /* @__PURE__ */ jsx(ChevronRight, {})]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function PaginationEllipsis({ className, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
"data-control-ui": "pagination",
|
|
66
|
+
"data-control-family": "pagination",
|
|
67
|
+
"data-slot": "ellipsis",
|
|
68
|
+
className: cn("flex h-[var(--control-h-sm)] min-w-[var(--control-h-sm)] items-center justify-center [&>svg]:size-4", className),
|
|
69
|
+
...props,
|
|
70
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontal, {}), /* @__PURE__ */ jsx("span", {
|
|
71
|
+
className: "sr-only",
|
|
72
|
+
children: "More pages"
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ControlSize } from "../control-variants.js";
|
|
2
|
+
import { PhoneInputKnobStyle } from "../knob-contracts/phone-input-knobs.js";
|
|
3
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
4
|
+
import { Country, Value } from "react-phone-number-input/max";
|
|
5
|
+
import { Labels } from "react-phone-number-input";
|
|
6
|
+
//#region src/ui/phone-input.d.ts
|
|
7
|
+
type PhoneInputValue = Value;
|
|
8
|
+
type PhoneInputCountry = Country;
|
|
9
|
+
type CountryOptionOrder = PhoneInputCountry | "XX" | "🌐" | "|" | "..." | "…";
|
|
10
|
+
type PhoneInputProps = Omit<ComponentProps<"input">, "defaultValue" | "size" | "style" | "type" | "value"> & {
|
|
11
|
+
size?: ControlSize;
|
|
12
|
+
value?: PhoneInputValue | string;
|
|
13
|
+
defaultValue?: PhoneInputValue | string;
|
|
14
|
+
onValueChange?: (value?: PhoneInputValue) => void;
|
|
15
|
+
defaultCountry?: PhoneInputCountry;
|
|
16
|
+
countries?: PhoneInputCountry[];
|
|
17
|
+
labels?: Labels;
|
|
18
|
+
locales?: string | string[];
|
|
19
|
+
countryOptionsOrder?: CountryOptionOrder[];
|
|
20
|
+
onCountryChange?: (country?: PhoneInputCountry) => void;
|
|
21
|
+
countryCallingCodeEditable?: boolean;
|
|
22
|
+
addInternationalOption?: boolean;
|
|
23
|
+
countrySearchPlaceholder?: string;
|
|
24
|
+
countryEmptyMessage?: string;
|
|
25
|
+
"data-invalid"?: boolean | string;
|
|
26
|
+
style?: CSSProperties & PhoneInputKnobStyle;
|
|
27
|
+
};
|
|
28
|
+
declare function PhoneInput(props: PhoneInputProps): import("react").JSX.Element;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { PhoneInput, PhoneInputCountry, PhoneInputProps, PhoneInputValue };
|