@ctrl-ui/react 0.8.2 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -23
- package/dist/action-bar.d.ts +11 -12
- package/dist/activity.d.ts +24 -25
- package/dist/audio-recorder.d.ts +16 -16
- package/dist/audio-visualizer.d.ts +3 -4
- package/dist/audio-visualizer.js +1 -1
- package/dist/blocks/chat.d.ts +3 -4
- package/dist/blocks/chat.js +6 -3
- package/dist/blocks/coding-agent.d.ts +11 -12
- package/dist/blocks/coding-agent.js +10 -9
- package/dist/blocks/file-explorer-data.d.ts +11 -12
- package/dist/blocks/file-explorer.d.ts +3 -3
- package/dist/blocks/settings-data.d.ts +8 -9
- package/dist/blocks/settings.d.ts +4 -4
- package/dist/blocks/theme-toggle.d.ts +11 -12
- package/dist/blocks/theme-toggle.js +14 -4
- package/dist/chat-composer-attachment.d.ts +20 -21
- package/dist/chat-composer-attachment.js +24 -20
- package/dist/chat-composer-editor/extensions/mention.d.ts +5 -6
- package/dist/chat-composer-editor/extensions/mention.js +4 -0
- package/dist/chat-composer-editor/ghost.d.ts +3 -4
- package/dist/chat-composer-editor/schema.d.ts +2 -3
- package/dist/chat-composer-editor/serialize.d.ts +3 -4
- package/dist/chat-composer-editor/types.d.ts +5 -6
- package/dist/chat-composer-editor.d.ts +2 -3
- package/dist/chat-composer-editor.js +18 -4
- package/dist/chat-composer.d.ts +17 -18
- package/dist/chat-composer.js +14 -8
- package/dist/chat-layout.d.ts +17 -21
- package/dist/chat-layout.js +72 -86
- package/dist/chat-message.d.ts +19 -15
- package/dist/chat-message.js +19 -2
- package/dist/context-model.d.ts +7 -8
- package/dist/context.d.ts +21 -22
- package/dist/context.js +0 -2
- package/dist/control-props.d.ts +10 -11
- package/dist/control-variants.d.ts +6 -7
- package/dist/dynamic-notification-glass.d.ts +3 -4
- package/dist/dynamic-notification-liquid.d.ts +3 -4
- package/dist/dynamic-notification-siri-wave.d.ts +2 -3
- package/dist/dynamic-notification.d.ts +28 -29
- package/dist/email/email-brand.d.ts +60 -0
- package/dist/email/email-brand.js +101 -0
- package/dist/email/email-code.d.ts +18 -0
- package/dist/email/email-code.js +172 -0
- package/dist/email/email-footer.d.ts +63 -0
- package/dist/email/email-footer.js +98 -0
- package/dist/email/email.d.ts +62 -14
- package/dist/email/email.js +155 -24
- package/dist/email/length.d.ts +2 -3
- package/dist/email/templates.d.ts +56 -12
- package/dist/email/templates.js +314 -116
- package/dist/email/theme.d.ts +15 -8
- package/dist/email/theme.js +30 -8
- package/dist/environment-variables.d.ts +35 -36
- package/dist/extensions/create-track-highlight.d.ts +3 -4
- package/dist/extensions/supports-anchor-transitions.d.ts +2 -3
- package/dist/extensions/track-highlight.d.ts +3 -4
- package/dist/hooks/use-audio-recorder.d.ts +14 -15
- package/dist/hooks/use-chat-composer.d.ts +5 -6
- package/dist/hooks/use-chat-message.d.ts +8 -8
- package/dist/hooks/use-chat-message.js +1 -0
- package/dist/hooks/use-chat-thread-scroll.d.ts +8 -0
- package/dist/hooks/use-chat-thread-scroll.js +66 -0
- package/dist/hooks/use-color-area.d.ts +5 -6
- package/dist/hooks/use-copy-to-clipboard.d.ts +7 -8
- package/dist/hooks/use-dropzone.d.ts +11 -12
- package/dist/hooks/use-dynamic-notification.d.ts +6 -7
- package/dist/hooks/use-environment-variables.d.ts +9 -10
- package/dist/hooks/use-keyboard-navigation.d.ts +3 -0
- package/dist/hooks/use-keyboard-navigation.js +22 -0
- package/dist/hooks/use-mobile.d.ts +2 -3
- package/dist/hooks/use-textarea-trigger-menu.d.ts +2 -3
- package/dist/hooks/use-trigger-menu.d.ts +7 -8
- package/dist/hooks/use-user-ask.d.ts +11 -10
- package/dist/hooks/use-user-ask.js +56 -17
- package/dist/inline-attachment.d.ts +16 -17
- package/dist/inline-attachment.js +1 -1
- package/dist/inline-citation.d.ts +22 -23
- package/dist/knob-contracts/accordion-knobs.d.ts +3 -4
- package/dist/knob-contracts/accordion-knobs.js +1 -0
- package/dist/knob-contracts/action-bar-knobs.d.ts +3 -4
- package/dist/knob-contracts/action-bar-knobs.js +1 -1
- package/dist/knob-contracts/activity-knobs.d.ts +3 -4
- package/dist/knob-contracts/activity-knobs.js +2 -1
- package/dist/knob-contracts/alert-knobs.d.ts +3 -4
- package/dist/knob-contracts/alert-knobs.js +12 -1
- package/dist/knob-contracts/audio-recorder-knobs.d.ts +3 -4
- package/dist/knob-contracts/audio-visualizer-knobs.d.ts +3 -4
- package/dist/knob-contracts/audio-visualizer-knobs.js +1 -0
- package/dist/knob-contracts/avatar-knobs.d.ts +3 -4
- package/dist/knob-contracts/avatar-knobs.js +2 -1
- package/dist/knob-contracts/badge-knobs.d.ts +3 -4
- package/dist/knob-contracts/button-group-knobs.d.ts +3 -4
- package/dist/knob-contracts/button-knobs.d.ts +3 -4
- package/dist/knob-contracts/button-knobs.js +1 -0
- package/dist/knob-contracts/calendar-knobs.d.ts +3 -4
- package/dist/knob-contracts/card-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-attachment-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-attachment-knobs.js +5 -1
- package/dist/knob-contracts/chat-composer-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-knobs.js +2 -0
- package/dist/knob-contracts/chat-layout-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-layout-knobs.js +2 -2
- package/dist/knob-contracts/chat-message-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-message-knobs.js +3 -1
- package/dist/knob-contracts/choice-knobs.d.ts +3 -4
- package/dist/knob-contracts/choice-knobs.js +2 -1
- package/dist/knob-contracts/code-diff-knobs.d.ts +3 -4
- package/dist/knob-contracts/code-diff-knobs.js +1 -0
- package/dist/knob-contracts/code-knobs.d.ts +3 -4
- package/dist/knob-contracts/code-knobs.js +3 -1
- package/dist/knob-contracts/collapsible-knobs.d.ts +3 -4
- package/dist/knob-contracts/color-picker-knobs.d.ts +3 -4
- package/dist/knob-contracts/context-knobs.d.ts +3 -4
- package/dist/knob-contracts/context-knobs.js +3 -0
- package/dist/knob-contracts/dockable-panel-knobs.d.ts +3 -4
- package/dist/knob-contracts/dockable-panel-knobs.js +1 -0
- package/dist/knob-contracts/dropzone-knobs.d.ts +3 -4
- package/dist/knob-contracts/dropzone-knobs.js +1 -0
- package/dist/knob-contracts/dynamic-notification-knobs.d.ts +3 -4
- package/dist/knob-contracts/empty-knobs.d.ts +3 -4
- package/dist/knob-contracts/empty-knobs.js +14 -1
- package/dist/knob-contracts/environment-variables-knobs.d.ts +3 -4
- package/dist/knob-contracts/environment-variables-knobs.js +2 -1
- package/dist/knob-contracts/field-knobs.d.ts +3 -4
- package/dist/knob-contracts/gradient-editor-knobs.d.ts +3 -4
- package/dist/knob-contracts/gradient-editor-knobs.js +3 -1
- package/dist/knob-contracts/infinite-canvas-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-attachment-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-attachment-knobs.js +6 -1
- package/dist/knob-contracts/inline-citation-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-citation-knobs.js +4 -1
- package/dist/knob-contracts/item-knobs.d.ts +3 -4
- package/dist/knob-contracts/kbd-knobs.d.ts +3 -4
- package/dist/knob-contracts/markdown-block-knobs.d.ts +3 -4
- package/dist/knob-contracts/markdown-block-knobs.js +2 -0
- package/dist/knob-contracts/markdown-knobs.d.ts +3 -4
- package/dist/knob-contracts/markdown-knobs.js +1 -0
- package/dist/knob-contracts/morphing-panel-knobs.d.ts +3 -4
- package/dist/knob-contracts/page-layout-knobs.d.ts +4 -0
- package/dist/knob-contracts/page-layout-knobs.js +15 -0
- package/dist/knob-contracts/pagination-knobs.d.ts +3 -4
- package/dist/knob-contracts/phone-input-knobs.d.ts +3 -4
- package/dist/knob-contracts/phone-input-knobs.js +1 -0
- package/dist/knob-contracts/popup-knobs.d.ts +3 -4
- package/dist/knob-contracts/progressive-blur-knobs.d.ts +3 -4
- package/dist/knob-contracts/progressive-blur-knobs.js +1 -0
- package/dist/knob-contracts/range-knobs.d.ts +3 -4
- package/dist/knob-contracts/resizable-knobs.d.ts +3 -4
- package/dist/knob-contracts/resizable-knobs.js +1 -0
- package/dist/knob-contracts/rich-tooltip-knobs.d.ts +3 -4
- package/dist/knob-contracts/scroll-area-knobs.d.ts +3 -4
- package/dist/knob-contracts/separator-knobs.d.ts +3 -4
- package/dist/knob-contracts/sidebar-knobs.d.ts +3 -4
- package/dist/knob-contracts/sidebar-knobs.js +1 -0
- package/dist/knob-contracts/skeleton-knobs.d.ts +3 -4
- package/dist/knob-contracts/skeleton-knobs.js +9 -1
- package/dist/knob-contracts/source-badge-knobs.d.ts +3 -4
- package/dist/knob-contracts/spinner-knobs.d.ts +3 -4
- package/dist/knob-contracts/stepper-knobs.d.ts +3 -4
- package/dist/knob-contracts/stepper-knobs.js +1 -0
- package/dist/knob-contracts/switch-knobs.d.ts +3 -4
- package/dist/knob-contracts/switch-knobs.js +7 -1
- package/dist/knob-contracts/table-knobs.d.ts +3 -4
- package/dist/knob-contracts/table-of-contents-knobs.d.ts +3 -4
- package/dist/knob-contracts/table-of-contents-knobs.js +25 -0
- package/dist/knob-contracts/tabs-knobs.d.ts +3 -4
- package/dist/knob-contracts/tabs-knobs.js +2 -1
- package/dist/knob-contracts/task-list-knobs.d.ts +3 -4
- package/dist/knob-contracts/task-list-knobs.js +5 -0
- package/dist/knob-contracts/thread-rail-knobs.d.ts +3 -4
- package/dist/knob-contracts/timeline-knobs.d.ts +3 -4
- package/dist/knob-contracts/toolbar-knobs.d.ts +3 -4
- package/dist/knob-contracts/toolbar-knobs.js +1 -0
- package/dist/knob-contracts/track-highlight-knobs.d.ts +3 -4
- package/dist/knob-contracts/transcript-divider-knobs.d.ts +3 -4
- package/dist/knob-contracts/tree-knobs.d.ts +3 -4
- package/dist/knob-contracts/user-ask-knobs.d.ts +3 -4
- package/dist/knob-contracts/user-ask-knobs.js +5 -0
- package/dist/lib/cn.d.ts +2 -3
- package/dist/lib/code-tokens.d.ts +12 -13
- package/dist/lib/color.d.ts +26 -27
- package/dist/lib/contrast.d.ts +12 -13
- package/dist/lib/diff.d.ts +14 -15
- package/dist/lib/dropzone-validation.d.ts +25 -26
- package/dist/lib/env-file.d.ts +12 -13
- package/dist/lib/format-audio-recorder-duration.d.ts +2 -3
- package/dist/lib/liquid-glass-optics.d.ts +2 -3
- package/dist/lib/phone-input-format.d.ts +3 -4
- package/dist/lib/phone-number.d.ts +8 -9
- package/dist/lib/trigger-detect.d.ts +4 -5
- package/dist/markdown-block.d.ts +11 -12
- package/dist/markdown-block.js +1 -1
- package/dist/scripts/contrast-eval.d.ts +16 -17
- package/dist/scripts/contrast-eval.js +13 -7
- package/dist/skin-provider.d.ts +14 -0
- package/dist/skin-provider.js +21 -0
- package/dist/skin.d.ts +14 -33
- package/dist/skin.js +3 -46
- package/dist/source-badge.d.ts +7 -8
- package/dist/styles/index.css +3 -5
- package/dist/styles/recipes/accordion.css +8 -2
- package/dist/styles/recipes/action-bar.css +40 -5
- package/dist/styles/recipes/activity.css +36 -3
- package/dist/styles/recipes/alert.css +97 -16
- package/dist/styles/recipes/audio-visualizer.css +8 -1
- package/dist/styles/recipes/avatar.css +17 -1
- package/dist/styles/recipes/badge.css +0 -1
- package/dist/styles/recipes/button-group.css +8 -0
- package/dist/styles/recipes/button.css +49 -8
- package/dist/styles/recipes/calendar.css +21 -6
- package/dist/styles/recipes/card.css +2 -0
- package/dist/styles/recipes/chat-composer-attachment.css +83 -54
- package/dist/styles/recipes/chat-composer.css +41 -22
- package/dist/styles/recipes/chat-layout.css +37 -54
- package/dist/styles/recipes/chat-message.css +78 -5
- package/dist/styles/recipes/choice.css +21 -2
- package/dist/styles/recipes/code-diff.css +9 -1
- package/dist/styles/recipes/code.css +64 -17
- package/dist/styles/recipes/collapsible.css +0 -3
- package/dist/styles/recipes/color-picker-details.css +1 -2
- package/dist/styles/recipes/color-picker-values.css +0 -4
- package/dist/styles/recipes/context.css +30 -18
- package/dist/styles/recipes/dockable-panel.css +8 -1
- package/dist/styles/recipes/dropzone.css +9 -2
- package/dist/styles/recipes/dynamic-notification-input.css +6 -0
- package/dist/styles/recipes/dynamic-notification.css +1 -0
- package/dist/styles/recipes/empty.css +118 -17
- package/dist/styles/recipes/environment-variables.css +9 -1
- package/dist/styles/recipes/field-parts.css +3 -6
- package/dist/styles/recipes/field.css +15 -5
- package/dist/styles/recipes/gradient-editor.css +33 -5
- package/dist/styles/recipes/inline-attachment.css +68 -20
- package/dist/styles/recipes/inline-citation.css +52 -10
- package/dist/styles/recipes/item.css +4 -2
- package/dist/styles/recipes/kbd.css +8 -0
- package/dist/styles/recipes/markdown-block.css +17 -2
- package/dist/styles/recipes/markdown.css +19 -0
- package/dist/styles/recipes/morphing-panel.css +1 -1
- package/dist/styles/recipes/page-layout.css +203 -0
- package/dist/styles/recipes/pagination.css +16 -4
- package/dist/styles/recipes/phone-input.css +8 -4
- package/dist/styles/recipes/popup-drawer.css +3 -1
- package/dist/styles/recipes/popup-lists.css +11 -0
- package/dist/styles/recipes/popup-toast.css +3 -29
- package/dist/styles/recipes/popup.css +10 -14
- package/dist/styles/recipes/progressive-blur.css +28 -7
- package/dist/styles/recipes/range.css +74 -3
- package/dist/styles/recipes/resizable.css +8 -10
- package/dist/styles/recipes/rich-tooltip.css +1 -4
- package/dist/styles/recipes/scroll-area.css +8 -2
- package/dist/styles/recipes/sidebar-menu.css +0 -6
- package/dist/styles/recipes/sidebar.css +56 -17
- package/dist/styles/recipes/skeleton.css +85 -3
- package/dist/styles/recipes/source-badge.css +20 -3
- package/dist/styles/recipes/stepper.css +8 -1
- package/dist/styles/recipes/switch.css +89 -17
- package/dist/styles/recipes/table-of-contents.css +211 -45
- package/dist/styles/recipes/table.css +0 -1
- package/dist/styles/recipes/tabs.css +35 -2
- package/dist/styles/recipes/task-list.css +68 -9
- package/dist/styles/recipes/thread-rail.css +19 -17
- package/dist/styles/recipes/toolbar.css +39 -4
- package/dist/styles/recipes/track-highlight.css +63 -5
- package/dist/styles/recipes/transcript-divider.css +1 -0
- package/dist/styles/recipes/tree.css +2 -0
- package/dist/styles/recipes/user-ask.css +65 -18
- package/dist/styles/theme.css +164 -138
- package/dist/surface-variants.d.ts +4 -5
- package/dist/task-list.d.ts +16 -17
- package/dist/thread-rail.d.ts +21 -22
- package/dist/thread-rail.js +1 -1
- package/dist/transcript-divider.d.ts +6 -7
- package/dist/ui/accordion.d.ts +10 -11
- package/dist/ui/alert-dialog.d.ts +11 -12
- package/dist/ui/alert-dialog.js +9 -7
- package/dist/ui/alert.d.ts +9 -10
- package/dist/ui/alert.js +3 -3
- package/dist/ui/aspect-ratio.d.ts +3 -4
- package/dist/ui/autocomplete.d.ts +19 -20
- package/dist/ui/autocomplete.js +6 -4
- package/dist/ui/avatar.d.ts +9 -10
- package/dist/ui/badge.d.ts +9 -10
- package/dist/ui/button-group.d.ts +7 -8
- package/dist/ui/button-group.js +3 -2
- package/dist/ui/button.d.ts +17 -18
- package/dist/ui/button.js +20 -5
- package/dist/ui/calendar.d.ts +3 -4
- package/dist/ui/card.d.ts +16 -17
- package/dist/ui/checkbox-group.d.ts +4 -5
- package/dist/ui/checkbox-group.js +3 -2
- package/dist/ui/checkbox.d.ts +3 -4
- package/dist/ui/code-diff.d.ts +8 -9
- package/dist/ui/code.d.ts +32 -23
- package/dist/ui/code.js +41 -20
- package/dist/ui/collapsible.d.ts +7 -8
- package/dist/ui/color-picker.d.ts +40 -41
- package/dist/ui/color-picker.js +8 -6
- package/dist/ui/combobox-disabled-selection.d.ts +3 -4
- package/dist/ui/combobox.d.ts +19 -20
- package/dist/ui/combobox.js +6 -4
- package/dist/ui/command.d.ts +22 -19
- package/dist/ui/command.js +63 -13
- package/dist/ui/context-menu.d.ts +30 -31
- package/dist/ui/context-menu.js +10 -7
- package/dist/ui/dialog.d.ts +13 -13
- package/dist/ui/dialog.js +11 -9
- package/dist/ui/dockable-panel-geometry.d.ts +7 -8
- package/dist/ui/dockable-panel.d.ts +21 -22
- package/dist/ui/drawer.d.ts +17 -18
- package/dist/ui/drawer.js +9 -8
- package/dist/ui/dropdown-menu.d.ts +32 -33
- package/dist/ui/dropdown-menu.js +6 -4
- package/dist/ui/dropzone.d.ts +24 -24
- package/dist/ui/dropzone.js +4 -1
- package/dist/ui/empty.d.ts +14 -14
- package/dist/ui/empty.js +3 -3
- package/dist/ui/field.d.ts +26 -27
- package/dist/ui/form.d.ts +4 -5
- package/dist/ui/gradient-editor.d.ts +16 -17
- package/dist/ui/gradient-editor.js +2 -2
- package/dist/ui/hover-card.d.ts +6 -7
- package/dist/ui/hover-card.js +6 -4
- package/dist/ui/infinite-canvas.d.ts +11 -12
- package/dist/ui/infinite-canvas.js +1 -0
- package/dist/ui/input-group.d.ts +6 -7
- package/dist/ui/input-otp.d.ts +7 -8
- package/dist/ui/input.d.ts +3 -4
- package/dist/ui/item.d.ts +20 -21
- package/dist/ui/kbd.d.ts +7 -5
- package/dist/ui/kbd.js +4 -2
- package/dist/ui/markdown-elements.d.ts +20 -21
- package/dist/ui/markdown.d.ts +5 -6
- package/dist/ui/menubar.d.ts +25 -26
- package/dist/ui/menubar.js +10 -7
- package/dist/ui/meter.d.ts +11 -12
- package/dist/ui/morphing-panel.d.ts +8 -9
- package/dist/ui/native-select.d.ts +3 -4
- package/dist/ui/native-select.js +1 -1
- package/dist/ui/navigation-menu.d.ts +17 -18
- package/dist/ui/navigation-menu.js +6 -4
- package/dist/ui/number-field.d.ts +15 -16
- package/dist/ui/number-field.js +1 -1
- package/dist/ui/page-layout.d.ts +44 -0
- package/dist/ui/page-layout.js +108 -0
- package/dist/ui/pagination.d.ts +10 -11
- package/dist/ui/phone-input.d.ts +5 -6
- package/dist/ui/phone-input.js +39 -36
- package/dist/ui/popover.d.ts +11 -12
- package/dist/ui/popover.js +6 -4
- package/dist/ui/progress.d.ts +11 -12
- package/dist/ui/progressive-blur.d.ts +4 -5
- package/dist/ui/radio-group.d.ts +5 -6
- package/dist/ui/resizable.d.ts +12 -13
- package/dist/ui/resizable.js +1 -1
- package/dist/ui/responsive-dialog.d.ts +11 -12
- package/dist/ui/rich-tooltip-tour.d.ts +5 -6
- package/dist/ui/rich-tooltip.d.ts +21 -23
- package/dist/ui/rich-tooltip.js +6 -6
- package/dist/ui/scroll-area.d.ts +7 -8
- package/dist/ui/scroll-area.js +9 -6
- package/dist/ui/select.d.ts +21 -14
- package/dist/ui/select.js +8 -5
- package/dist/ui/separator.d.ts +2 -3
- package/dist/ui/sheet.d.ts +8 -9
- package/dist/ui/sheet.js +9 -7
- package/dist/ui/sidebar-menu.d.ts +18 -19
- package/dist/ui/sidebar-menu.js +4 -3
- package/dist/ui/sidebar-provider.d.ts +32 -7
- package/dist/ui/sidebar-provider.js +82 -22
- package/dist/ui/sidebar-resize-rail.d.ts +8 -0
- package/dist/ui/sidebar-resize-rail.js +192 -0
- package/dist/ui/sidebar.d.ts +19 -13
- package/dist/ui/sidebar.js +120 -55
- package/dist/ui/skeleton.d.ts +7 -4
- package/dist/ui/skeleton.js +9 -2
- package/dist/ui/slider.d.ts +6 -5
- package/dist/ui/slider.js +16 -13
- package/dist/ui/spinner.d.ts +3 -4
- package/dist/ui/stepper.d.ts +22 -23
- package/dist/ui/switch.d.ts +3 -4
- package/dist/ui/switch.js +12 -1
- package/dist/ui/table-of-contents.d.ts +7 -8
- package/dist/ui/table-of-contents.js +4 -2
- package/dist/ui/table.d.ts +17 -18
- package/dist/ui/tabs.d.ts +14 -11
- package/dist/ui/textarea.d.ts +3 -4
- package/dist/ui/timeline.d.ts +18 -19
- package/dist/ui/toast.d.ts +9 -9
- package/dist/ui/toast.js +23 -16
- package/dist/ui/toggle.d.ts +5 -6
- package/dist/ui/toggle.js +3 -2
- package/dist/ui/toolbar.d.ts +15 -16
- package/dist/ui/toolbar.js +15 -4
- package/dist/ui/tooltip.d.ts +6 -13
- package/dist/ui/tooltip.js +8 -9
- package/dist/ui/tree.d.ts +18 -19
- package/dist/ui/tree.js +3 -2
- package/dist/ui/trigger-menu.d.ts +15 -16
- package/dist/ui/trigger-menu.js +6 -4
- package/dist/ui/use-switch-drag.d.ts +7 -0
- package/dist/ui/use-switch-drag.js +104 -0
- package/dist/user-ask.d.ts +28 -27
- package/dist/user-ask.js +38 -13
- package/package.json +17 -16
- package/dist/code-block-editor.d.ts +0 -59
- package/dist/code-block-editor.js +0 -250
- package/dist/knob-contracts/code-block-editor-knobs.d.ts +0 -5
- package/dist/knob-contracts/code-block-editor-knobs.js +0 -11
- package/dist/lib/code-block-shiki.d.ts +0 -9
- package/dist/lib/code-block-shiki.js +0 -6
- package/dist/skin.config.d.ts +0 -5
- package/dist/skin.config.js +0 -12
- package/dist/styles/recipes/code-block-editor.css +0 -136
- package/dist/styles/skin-theme.css +0 -137
- package/dist/styles/skin.css +0 -143
package/dist/ui/meter.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RangeKnobStyle } from "../knob-contracts/range-knobs.js";
|
|
2
2
|
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
3
3
|
//#region src/ui/meter.d.ts
|
|
4
|
-
type MeterProps = Omit<ComponentProps<"div"> & {
|
|
4
|
+
export type MeterProps = Omit<ComponentProps<"div"> & {
|
|
5
5
|
value: number;
|
|
6
6
|
min?: number;
|
|
7
7
|
max?: number;
|
|
@@ -11,24 +11,23 @@ type MeterProps = Omit<ComponentProps<"div"> & {
|
|
|
11
11
|
}, "style"> & {
|
|
12
12
|
style?: CSSProperties & RangeKnobStyle;
|
|
13
13
|
};
|
|
14
|
-
type MeterTrackProps = Omit<ComponentProps<"div">, "style"> & {
|
|
14
|
+
export type MeterTrackProps = Omit<ComponentProps<"div">, "style"> & {
|
|
15
15
|
style?: CSSProperties & RangeKnobStyle;
|
|
16
16
|
};
|
|
17
|
-
type MeterIndicatorProps = Omit<ComponentProps<"div">, "style"> & {
|
|
17
|
+
export type MeterIndicatorProps = Omit<ComponentProps<"div">, "style"> & {
|
|
18
18
|
style?: CSSProperties & RangeKnobStyle;
|
|
19
19
|
};
|
|
20
|
-
type MeterLabelProps = Omit<ComponentProps<"span">, "style"> & {
|
|
20
|
+
export type MeterLabelProps = Omit<ComponentProps<"span">, "style"> & {
|
|
21
21
|
style?: CSSProperties & RangeKnobStyle;
|
|
22
22
|
};
|
|
23
|
-
type MeterValueProps = Omit<Omit<ComponentProps<"span">, "children"> & {
|
|
23
|
+
export type MeterValueProps = Omit<Omit<ComponentProps<"span">, "children"> & {
|
|
24
24
|
children?: ((formattedValue: string, value: number) => ReactNode) | null;
|
|
25
25
|
}, "style"> & {
|
|
26
26
|
style?: CSSProperties & RangeKnobStyle;
|
|
27
27
|
};
|
|
28
|
-
declare function Meter({ className, ...props }: MeterProps): import("react").JSX.Element;
|
|
29
|
-
declare function MeterLabel({ className, ...props }: MeterLabelProps): import("react").JSX.Element;
|
|
30
|
-
declare function MeterValue({ className, ...props }: MeterValueProps): import("react").JSX.Element;
|
|
31
|
-
declare function MeterTrack({ className, ...props }: MeterTrackProps): import("react").JSX.Element;
|
|
32
|
-
declare function MeterIndicator({ className, ...props }: MeterIndicatorProps): import("react").JSX.Element;
|
|
33
|
-
//#endregion
|
|
34
|
-
export { Meter, MeterIndicator, MeterIndicatorProps, MeterLabel, MeterLabelProps, MeterProps, MeterTrack, MeterTrackProps, MeterValue, MeterValueProps };
|
|
28
|
+
export declare function Meter({ className, ...props }: MeterProps): import("react").JSX.Element;
|
|
29
|
+
export declare function MeterLabel({ className, ...props }: MeterLabelProps): import("react").JSX.Element;
|
|
30
|
+
export declare function MeterValue({ className, ...props }: MeterValueProps): import("react").JSX.Element;
|
|
31
|
+
export declare function MeterTrack({ className, ...props }: MeterTrackProps): import("react").JSX.Element;
|
|
32
|
+
export declare function MeterIndicator({ className, ...props }: MeterIndicatorProps): import("react").JSX.Element;
|
|
33
|
+
//#endregion
|
|
@@ -2,23 +2,22 @@ import { CollapsibleContentProps, CollapsibleProps, CollapsibleTriggerProps } fr
|
|
|
2
2
|
import { MorphingPanelKnobStyle } from "../knob-contracts/morphing-panel-knobs.js";
|
|
3
3
|
import { CSSProperties } from "react";
|
|
4
4
|
//#region src/ui/morphing-panel.d.ts
|
|
5
|
-
type MorphingPanelDimensions = {
|
|
5
|
+
export type MorphingPanelDimensions = {
|
|
6
6
|
width: string;
|
|
7
7
|
height: string;
|
|
8
8
|
};
|
|
9
|
-
type MorphingPanelProps = Omit<CollapsibleProps, "style"> & {
|
|
9
|
+
export type MorphingPanelProps = Omit<CollapsibleProps, "style"> & {
|
|
10
10
|
collapsedSize: MorphingPanelDimensions;
|
|
11
11
|
expandedSize: MorphingPanelDimensions;
|
|
12
12
|
style?: CSSProperties & MorphingPanelKnobStyle;
|
|
13
13
|
};
|
|
14
|
-
type MorphingPanelTriggerProps = Omit<CollapsibleTriggerProps, "style"> & {
|
|
14
|
+
export type MorphingPanelTriggerProps = Omit<CollapsibleTriggerProps, "style"> & {
|
|
15
15
|
style?: CSSProperties & MorphingPanelKnobStyle;
|
|
16
16
|
};
|
|
17
|
-
type MorphingPanelContentProps = Omit<CollapsibleContentProps, "style"> & {
|
|
17
|
+
export type MorphingPanelContentProps = Omit<CollapsibleContentProps, "style"> & {
|
|
18
18
|
style?: CSSProperties & MorphingPanelKnobStyle;
|
|
19
19
|
};
|
|
20
|
-
declare function MorphingPanel({ collapsedSize, expandedSize, className, style, ...props }: MorphingPanelProps): import("react").JSX.Element;
|
|
21
|
-
declare function MorphingPanelTrigger({ render, className, children, ...props }: MorphingPanelTriggerProps): import("react").JSX.Element;
|
|
22
|
-
declare function MorphingPanelContent({ className, ...props }: MorphingPanelContentProps): import("react").JSX.Element;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { MorphingPanel, MorphingPanelContent, MorphingPanelContentProps, MorphingPanelDimensions, MorphingPanelProps, MorphingPanelTrigger, MorphingPanelTriggerProps };
|
|
20
|
+
export declare function MorphingPanel({ collapsedSize, expandedSize, className, style, ...props }: MorphingPanelProps): import("react").JSX.Element;
|
|
21
|
+
export declare function MorphingPanelTrigger({ render, className, children, ...props }: MorphingPanelTriggerProps): import("react").JSX.Element;
|
|
22
|
+
export declare function MorphingPanelContent({ className, ...props }: MorphingPanelContentProps): import("react").JSX.Element;
|
|
23
|
+
//#endregion
|
|
@@ -2,11 +2,10 @@ import { ControlSize } from "../control-variants.js";
|
|
|
2
2
|
import { FieldKnobStyle } from "../knob-contracts/field-knobs.js";
|
|
3
3
|
import { CSSProperties, ComponentProps } from "react";
|
|
4
4
|
//#region src/ui/native-select.d.ts
|
|
5
|
-
type NativeSelectProps = Omit<Omit<ComponentProps<"select">, "size">, "style"> & {
|
|
5
|
+
export type NativeSelectProps = Omit<Omit<ComponentProps<"select">, "size">, "style"> & {
|
|
6
6
|
style?: CSSProperties & FieldKnobStyle;
|
|
7
7
|
} & {
|
|
8
8
|
size?: ControlSize;
|
|
9
9
|
};
|
|
10
|
-
declare function NativeSelect({ size, className, children, ...props }: NativeSelectProps): import("react").JSX.Element;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { NativeSelect, NativeSelectProps };
|
|
10
|
+
export declare function NativeSelect({ size, className, children, ...props }: NativeSelectProps): import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
package/dist/ui/native-select.js
CHANGED
|
@@ -20,7 +20,7 @@ function NativeSelect({ size = "md", className, children, ...props }) {
|
|
|
20
20
|
"data-control-family": "field",
|
|
21
21
|
"data-field-kind": "native-select",
|
|
22
22
|
"data-slot": "icon",
|
|
23
|
-
className: "pointer-events-none absolute
|
|
23
|
+
className: "pointer-events-none absolute",
|
|
24
24
|
children: /* @__PURE__ */ jsx("svg", {
|
|
25
25
|
viewBox: "0 0 12 12",
|
|
26
26
|
className: "size-3",
|
|
@@ -3,7 +3,7 @@ import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
|
3
3
|
import { CSSProperties, ComponentProps } from "react";
|
|
4
4
|
import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
|
|
5
5
|
//#region src/ui/navigation-menu.d.ts
|
|
6
|
-
type NavigationMenuProps = ComponentProps<"nav"> & {
|
|
6
|
+
export type NavigationMenuProps = ComponentProps<"nav"> & {
|
|
7
7
|
value?: string | null;
|
|
8
8
|
defaultValue?: string | null;
|
|
9
9
|
onValueChange?: (value: string | null) => void;
|
|
@@ -13,39 +13,38 @@ type NavigationMenuProps = ComponentProps<"nav"> & {
|
|
|
13
13
|
} & {
|
|
14
14
|
style?: CSSProperties & PopupKnobStyle;
|
|
15
15
|
};
|
|
16
|
-
type NavigationMenuListProps = ComponentProps<"ul"> & {
|
|
16
|
+
export type NavigationMenuListProps = ComponentProps<"ul"> & {
|
|
17
17
|
style?: CSSProperties & PopupKnobStyle;
|
|
18
18
|
};
|
|
19
|
-
type NavigationMenuItemProps = ComponentProps<"li"> & {
|
|
19
|
+
export type NavigationMenuItemProps = ComponentProps<"li"> & {
|
|
20
20
|
value?: string;
|
|
21
21
|
} & {
|
|
22
22
|
style?: CSSProperties & PopupKnobStyle;
|
|
23
23
|
};
|
|
24
|
-
type NavigationMenuTriggerProps = Omit<ComponentProps<"button">, "style"> & {
|
|
24
|
+
export type NavigationMenuTriggerProps = Omit<ComponentProps<"button">, "style"> & {
|
|
25
25
|
style?: CSSProperties & ButtonKnobStyle & PopupKnobStyle;
|
|
26
26
|
};
|
|
27
|
-
type NavigationMenuContentProps = ComponentProps<"div"> & {
|
|
27
|
+
export type NavigationMenuContentProps = ComponentProps<"div"> & {
|
|
28
28
|
style?: CSSProperties & PopupKnobStyle;
|
|
29
29
|
};
|
|
30
|
-
declare const navigationMenuLinkVariants: readonly ["default", "compact"];
|
|
31
|
-
type NavigationMenuLinkVariant = (typeof navigationMenuLinkVariants)[number];
|
|
32
|
-
type NavigationMenuLinkProps = Omit<ComponentProps<"a">, "style"> & {
|
|
30
|
+
export declare const navigationMenuLinkVariants: readonly ["default", "compact"];
|
|
31
|
+
export type NavigationMenuLinkVariant = (typeof navigationMenuLinkVariants)[number];
|
|
32
|
+
export type NavigationMenuLinkProps = Omit<ComponentProps<"a">, "style"> & {
|
|
33
33
|
style?: CSSProperties & PopupKnobStyle;
|
|
34
34
|
} & {
|
|
35
35
|
active?: boolean;
|
|
36
36
|
closeOnClick?: boolean;
|
|
37
37
|
variant?: NavigationMenuLinkVariant;
|
|
38
38
|
};
|
|
39
|
-
type NavigationMenuViewportProps = Omit<ComponentProps<"div">, "style"> & {
|
|
39
|
+
export type NavigationMenuViewportProps = Omit<ComponentProps<"div">, "style"> & {
|
|
40
40
|
style?: CSSProperties & PopupKnobStyle;
|
|
41
41
|
};
|
|
42
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 };
|
|
43
|
+
export declare function NavigationMenu({ className, children, ...props }: NavigationMenuProps): import("react").JSX.Element;
|
|
44
|
+
export declare function NavigationMenuList({ className, ...props }: NavigationMenuListProps): import("react").JSX.Element;
|
|
45
|
+
export declare function NavigationMenuItem({ className, ...props }: NavigationMenuItemProps): import("react").JSX.Element;
|
|
46
|
+
export declare function NavigationMenuTrigger({ className, children, ...props }: NavigationMenuTriggerProps): import("react").JSX.Element;
|
|
47
|
+
export declare function NavigationMenuContent({ className, children, ...props }: NavigationMenuContentProps): import("react").JSX.Element;
|
|
48
|
+
export declare function NavigationMenuLink({ variant, className, active, children, ...props }: RefinedLinkProps): import("react").JSX.Element;
|
|
49
|
+
export declare function NavigationMenuViewport({ className, ...props }: NavigationMenuViewportProps): import("react").JSX.Element;
|
|
50
|
+
//#endregion
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
-
import {
|
|
3
|
+
import { controlEffectsAttribute } from "../skin.js";
|
|
4
|
+
import { useSkin } from "../skin-provider.js";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
|
|
6
7
|
//#region src/ui/navigation-menu.tsx
|
|
@@ -96,13 +97,14 @@ function NavigationMenuLink({ variant = "default", className, active, children,
|
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
99
|
function NavigationMenuViewport({ className, ...props }) {
|
|
100
|
+
const skin = useSkin();
|
|
99
101
|
return /* @__PURE__ */ jsx(NavigationMenu$1.Portal, { children: /* @__PURE__ */ jsx(NavigationMenu$1.Positioner, {
|
|
100
102
|
"data-control-ui": "navigation-menu",
|
|
101
103
|
"data-control-family": "popup",
|
|
102
104
|
"data-popup-kind": "navigation-menu",
|
|
103
105
|
"data-slot": "positioner",
|
|
104
|
-
"data-skin":
|
|
105
|
-
"data-effects":
|
|
106
|
+
"data-skin": skin.id,
|
|
107
|
+
"data-effects": controlEffectsAttribute(skin.effects),
|
|
106
108
|
sideOffset: 8,
|
|
107
109
|
collisionPadding: {
|
|
108
110
|
top: 5,
|
|
@@ -111,7 +113,7 @@ function NavigationMenuViewport({ className, ...props }) {
|
|
|
111
113
|
right: 16
|
|
112
114
|
},
|
|
113
115
|
collisionAvoidance: { side: "none" },
|
|
114
|
-
className: "z-
|
|
116
|
+
className: "z-(--z-popup) 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
117
|
children: /* @__PURE__ */ jsx(NavigationMenu$1.Popup, {
|
|
116
118
|
"data-control-ui": "navigation-menu",
|
|
117
119
|
"data-control-family": "popup",
|
|
@@ -2,8 +2,8 @@ import { ControlSize } from "../control-variants.js";
|
|
|
2
2
|
import { FieldKnobStyle } from "../knob-contracts/field-knobs.js";
|
|
3
3
|
import { CSSProperties, ComponentProps, ReactNode, Ref } from "react";
|
|
4
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 = {
|
|
5
|
+
export type NumberFieldChangeReason = "input-change" | "input-clear" | "input-blur" | "input-paste" | "keyboard" | "increment-press" | "decrement-press" | "wheel" | "scrub" | "none";
|
|
6
|
+
export type NumberFieldChangeEventDetails = {
|
|
7
7
|
reason: NumberFieldChangeReason;
|
|
8
8
|
event: Event;
|
|
9
9
|
cancel?: () => void;
|
|
@@ -12,7 +12,7 @@ type NumberFieldChangeEventDetails = {
|
|
|
12
12
|
isPropagationAllowed?: boolean;
|
|
13
13
|
trigger?: Element | undefined;
|
|
14
14
|
};
|
|
15
|
-
type NumberFieldProps = {
|
|
15
|
+
export type NumberFieldProps = {
|
|
16
16
|
size?: ControlSize;
|
|
17
17
|
value?: number | null;
|
|
18
18
|
defaultValue?: number;
|
|
@@ -39,34 +39,33 @@ type NumberFieldProps = {
|
|
|
39
39
|
style?: CSSProperties & FieldKnobStyle;
|
|
40
40
|
children?: ReactNode;
|
|
41
41
|
};
|
|
42
|
-
type NumberFieldGroupProps = Omit<ComponentProps<"div">, "style"> & {
|
|
42
|
+
export type NumberFieldGroupProps = Omit<ComponentProps<"div">, "style"> & {
|
|
43
43
|
style?: CSSProperties & FieldKnobStyle;
|
|
44
44
|
};
|
|
45
|
-
type NumberFieldInputProps = Omit<ComponentProps<"input">, "style"> & {
|
|
45
|
+
export type NumberFieldInputProps = Omit<ComponentProps<"input">, "style"> & {
|
|
46
46
|
style?: CSSProperties & FieldKnobStyle;
|
|
47
47
|
};
|
|
48
|
-
type NumberFieldIncrementProps = ComponentProps<"button"> & {
|
|
48
|
+
export type NumberFieldIncrementProps = ComponentProps<"button"> & {
|
|
49
49
|
nativeButton?: boolean;
|
|
50
50
|
} & {
|
|
51
51
|
style?: CSSProperties & FieldKnobStyle;
|
|
52
52
|
};
|
|
53
|
-
type NumberFieldDecrementProps = ComponentProps<"button"> & {
|
|
53
|
+
export type NumberFieldDecrementProps = ComponentProps<"button"> & {
|
|
54
54
|
nativeButton?: boolean;
|
|
55
55
|
} & {
|
|
56
56
|
style?: CSSProperties & FieldKnobStyle;
|
|
57
57
|
};
|
|
58
|
-
type NumberFieldScrubAreaProps = ComponentProps<"span"> & {
|
|
58
|
+
export type NumberFieldScrubAreaProps = ComponentProps<"span"> & {
|
|
59
59
|
direction?: "horizontal" | "vertical";
|
|
60
60
|
pixelSensitivity?: number;
|
|
61
61
|
teleportDistance?: number;
|
|
62
62
|
} & {
|
|
63
63
|
style?: CSSProperties & FieldKnobStyle;
|
|
64
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 };
|
|
65
|
+
export declare function NumberField({ size, value, defaultValue, children, ...props }: NumberFieldProps): import("react").JSX.Element;
|
|
66
|
+
export declare function NumberFieldGroup({ className, children, ...props }: NumberFieldGroupProps): import("react").JSX.Element;
|
|
67
|
+
export declare function NumberFieldInput({ className, ...props }: NumberFieldInputProps): import("react").JSX.Element;
|
|
68
|
+
export declare function NumberFieldDecrement({ className, children, ...props }: NumberFieldDecrementProps): import("react").JSX.Element;
|
|
69
|
+
export declare function NumberFieldIncrement({ className, children, ...props }: NumberFieldIncrementProps): import("react").JSX.Element;
|
|
70
|
+
export declare function NumberFieldScrubArea({ className, children, ...props }: NumberFieldScrubAreaProps): import("react").JSX.Element;
|
|
71
|
+
//#endregion
|
package/dist/ui/number-field.js
CHANGED
|
@@ -70,7 +70,7 @@ function NumberFieldScrubArea({ className, children, ...props }) {
|
|
|
70
70
|
"data-control-family": "field",
|
|
71
71
|
"data-field-kind": "number-field",
|
|
72
72
|
"data-slot": "scrub-area",
|
|
73
|
-
className: cn("cursor-ew-resize select-none", className),
|
|
73
|
+
className: cn("cursor-ew-resize touch-pan-y select-none", className),
|
|
74
74
|
...props,
|
|
75
75
|
children: [children, /* @__PURE__ */ jsx(NumberField$1.ScrubAreaCursor, {
|
|
76
76
|
"data-control-ui": "number-field",
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ScrollAreaProps } from "./scroll-area.js";
|
|
2
|
+
import { PageLayoutKnobStyle } from "../knob-contracts/page-layout-knobs.js";
|
|
3
|
+
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
4
|
+
//#region src/ui/page-layout.d.ts
|
|
5
|
+
export declare const pageWidths: readonly ["prose", "content", "wide", "full"];
|
|
6
|
+
export type PageWidth = (typeof pageWidths)[number];
|
|
7
|
+
export declare const pageScrollModes: readonly ["page", "inset", "none"];
|
|
8
|
+
export type PageScrollMode = (typeof pageScrollModes)[number];
|
|
9
|
+
export type PageScroll = PageScrollMode | "auto";
|
|
10
|
+
export declare const pageHeaderVariants: readonly ["flow", "sticky", "floating"];
|
|
11
|
+
export type PageHeaderVariant = (typeof pageHeaderVariants)[number];
|
|
12
|
+
type PageStyle = CSSProperties & PageLayoutKnobStyle;
|
|
13
|
+
export declare function usePageScroll(scroll?: PageScroll): PageScrollMode;
|
|
14
|
+
export type PageLayoutProps = Omit<ComponentProps<"div">, "style"> & {
|
|
15
|
+
scroll?: PageScroll;
|
|
16
|
+
width?: PageWidth;
|
|
17
|
+
scrollViewportRef?: ScrollAreaProps["viewportRef"];
|
|
18
|
+
style?: PageStyle;
|
|
19
|
+
};
|
|
20
|
+
export declare function PageLayout({ scroll, width, scrollViewportRef, children, className, ...props }: PageLayoutProps): import("react").JSX.Element;
|
|
21
|
+
export type PageHeaderProps = Omit<ComponentProps<"header">, "style"> & {
|
|
22
|
+
variant?: PageHeaderVariant;
|
|
23
|
+
style?: PageStyle;
|
|
24
|
+
};
|
|
25
|
+
export declare function PageHeader({ variant, className, ...props }: PageHeaderProps): import("react").JSX.Element;
|
|
26
|
+
export type PageTitleProps = Omit<ComponentProps<"h1">, "style"> & {
|
|
27
|
+
style?: PageStyle;
|
|
28
|
+
};
|
|
29
|
+
export declare function PageTitle({ className, ...props }: PageTitleProps): import("react").JSX.Element;
|
|
30
|
+
export type PageDescriptionProps = Omit<ComponentProps<"p">, "style"> & {
|
|
31
|
+
style?: PageStyle;
|
|
32
|
+
};
|
|
33
|
+
export declare function PageDescription({ className, ...props }: PageDescriptionProps): import("react").JSX.Element;
|
|
34
|
+
export type PageActionsProps = Omit<ComponentProps<"div">, "style"> & {
|
|
35
|
+
style?: PageStyle;
|
|
36
|
+
};
|
|
37
|
+
export declare function PageActions({ className, ...props }: PageActionsProps): import("react").JSX.Element;
|
|
38
|
+
export type PageBodyProps = Omit<ComponentProps<"div">, "style"> & {
|
|
39
|
+
aside?: ReactNode;
|
|
40
|
+
contentClassName?: string;
|
|
41
|
+
style?: PageStyle;
|
|
42
|
+
};
|
|
43
|
+
export declare function PageBody({ aside, contentClassName, children, className, ...props }: PageBodyProps): import("react").JSX.Element;
|
|
44
|
+
//#endregion
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { useSkin } from "../skin-provider.js";
|
|
4
|
+
import { ScrollArea } from "./scroll-area.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/ui/page-layout.tsx
|
|
7
|
+
const pageWidths = [
|
|
8
|
+
"prose",
|
|
9
|
+
"content",
|
|
10
|
+
"wide",
|
|
11
|
+
"full"
|
|
12
|
+
];
|
|
13
|
+
const pageScrollModes = [
|
|
14
|
+
"page",
|
|
15
|
+
"inset",
|
|
16
|
+
"none"
|
|
17
|
+
];
|
|
18
|
+
const pageHeaderVariants = [
|
|
19
|
+
"flow",
|
|
20
|
+
"sticky",
|
|
21
|
+
"floating"
|
|
22
|
+
];
|
|
23
|
+
function usePageScroll(scroll = "auto") {
|
|
24
|
+
const skin = useSkin();
|
|
25
|
+
if (scroll !== "auto") return scroll;
|
|
26
|
+
return skin.sidebarLayout === "page" ? "page" : "inset";
|
|
27
|
+
}
|
|
28
|
+
function PageLayout({ scroll = "auto", width = "prose", scrollViewportRef, children, className, ...props }) {
|
|
29
|
+
const resolvedScroll = usePageScroll(scroll);
|
|
30
|
+
const scrollsInset = resolvedScroll === "inset";
|
|
31
|
+
return /* @__PURE__ */ jsx("div", {
|
|
32
|
+
"data-control-ui": "page-layout",
|
|
33
|
+
"data-control-family": "page-layout",
|
|
34
|
+
"data-slot": "root",
|
|
35
|
+
"data-scroll": resolvedScroll,
|
|
36
|
+
"data-width": width,
|
|
37
|
+
className: cn("flex w-full flex-col", resolvedScroll !== "page" && "min-h-0 flex-1 overflow-hidden", className),
|
|
38
|
+
...props,
|
|
39
|
+
children: scrollsInset ? /* @__PURE__ */ jsx(ScrollArea, {
|
|
40
|
+
className: "min-h-0 flex-1",
|
|
41
|
+
viewportClassName: "scroll-smooth motion-reduce:scroll-auto",
|
|
42
|
+
viewportRef: scrollViewportRef,
|
|
43
|
+
lockAxis: "x",
|
|
44
|
+
children
|
|
45
|
+
}) : children
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function PageHeader({ variant = "flow", className, ...props }) {
|
|
49
|
+
return /* @__PURE__ */ jsx("header", {
|
|
50
|
+
"data-control-ui": "page-layout",
|
|
51
|
+
"data-control-family": "page-layout",
|
|
52
|
+
"data-slot": "header",
|
|
53
|
+
"data-variant": variant,
|
|
54
|
+
className,
|
|
55
|
+
...props
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function PageTitle({ className, ...props }) {
|
|
59
|
+
return /* @__PURE__ */ jsx("h1", {
|
|
60
|
+
"data-control-ui": "page-layout",
|
|
61
|
+
"data-control-family": "page-layout",
|
|
62
|
+
"data-slot": "title",
|
|
63
|
+
className: cn("text-balance", className),
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function PageDescription({ className, ...props }) {
|
|
68
|
+
return /* @__PURE__ */ jsx("p", {
|
|
69
|
+
"data-control-ui": "page-layout",
|
|
70
|
+
"data-control-family": "page-layout",
|
|
71
|
+
"data-slot": "description",
|
|
72
|
+
className: cn("text-pretty", className),
|
|
73
|
+
...props
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function PageActions({ className, ...props }) {
|
|
77
|
+
return /* @__PURE__ */ jsx("div", {
|
|
78
|
+
"data-control-ui": "page-layout",
|
|
79
|
+
"data-control-family": "page-layout",
|
|
80
|
+
"data-slot": "actions",
|
|
81
|
+
className: cn("flex items-center gap-2", className),
|
|
82
|
+
...props
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function PageBody({ aside, contentClassName, children, className, ...props }) {
|
|
86
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
87
|
+
"data-control-ui": "page-layout",
|
|
88
|
+
"data-control-family": "page-layout",
|
|
89
|
+
"data-slot": "body",
|
|
90
|
+
"data-aside": aside ? "" : void 0,
|
|
91
|
+
className,
|
|
92
|
+
...props,
|
|
93
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
94
|
+
"data-control-ui": "page-layout",
|
|
95
|
+
"data-control-family": "page-layout",
|
|
96
|
+
"data-slot": "content",
|
|
97
|
+
className: cn("min-w-0", contentClassName),
|
|
98
|
+
children
|
|
99
|
+
}), aside ? /* @__PURE__ */ jsx("aside", {
|
|
100
|
+
"data-control-ui": "page-layout",
|
|
101
|
+
"data-control-family": "page-layout",
|
|
102
|
+
"data-slot": "aside",
|
|
103
|
+
children: aside
|
|
104
|
+
}) : null]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { PageActions, PageBody, PageDescription, PageHeader, PageLayout, PageTitle, pageHeaderVariants, pageScrollModes, pageWidths, usePageScroll };
|
package/dist/ui/pagination.d.ts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { PaginationKnobStyle } from "../knob-contracts/pagination-knobs.js";
|
|
2
2
|
import { CSSProperties, ComponentProps } from "react";
|
|
3
3
|
//#region src/ui/pagination.d.ts
|
|
4
|
-
type PaginationEllipsisProps = Omit<ComponentProps<"span">, "style"> & {
|
|
4
|
+
export type PaginationEllipsisProps = Omit<ComponentProps<"span">, "style"> & {
|
|
5
5
|
style?: CSSProperties & PaginationKnobStyle;
|
|
6
6
|
};
|
|
7
|
-
type PaginationLinkProps = Omit<ComponentProps<"a"> & {
|
|
7
|
+
export type PaginationLinkProps = Omit<ComponentProps<"a"> & {
|
|
8
8
|
isActive?: boolean;
|
|
9
9
|
}, "style"> & {
|
|
10
10
|
style?: CSSProperties & PaginationKnobStyle;
|
|
11
11
|
};
|
|
12
|
-
declare function Pagination({ className, ...props }: ComponentProps<"nav"> & {
|
|
12
|
+
export declare function Pagination({ className, ...props }: ComponentProps<"nav"> & {
|
|
13
13
|
style?: CSSProperties & PaginationKnobStyle;
|
|
14
14
|
}): import("react").JSX.Element;
|
|
15
|
-
declare function PaginationContent({ className, ...props }: ComponentProps<"ul"> & {
|
|
15
|
+
export declare function PaginationContent({ className, ...props }: ComponentProps<"ul"> & {
|
|
16
16
|
style?: CSSProperties & PaginationKnobStyle;
|
|
17
17
|
}): import("react").JSX.Element;
|
|
18
|
-
declare function PaginationItem({ className, ...props }: ComponentProps<"li"> & {
|
|
18
|
+
export declare function PaginationItem({ className, ...props }: ComponentProps<"li"> & {
|
|
19
19
|
style?: CSSProperties & PaginationKnobStyle;
|
|
20
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 };
|
|
21
|
+
export declare function PaginationLink({ isActive, className, ...props }: PaginationLinkProps): import("react").JSX.Element;
|
|
22
|
+
export declare function PaginationPrevious({ className, ...props }: ComponentProps<typeof PaginationLink>): import("react").JSX.Element;
|
|
23
|
+
export declare function PaginationNext({ className, ...props }: ComponentProps<typeof PaginationLink>): import("react").JSX.Element;
|
|
24
|
+
export declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): import("react").JSX.Element;
|
|
25
|
+
//#endregion
|
package/dist/ui/phone-input.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ import { CSSProperties, ComponentProps } from "react";
|
|
|
4
4
|
import { Country, Value } from "react-phone-number-input/max";
|
|
5
5
|
import { Labels } from "react-phone-number-input";
|
|
6
6
|
//#region src/ui/phone-input.d.ts
|
|
7
|
-
type PhoneInputValue = Value;
|
|
8
|
-
type PhoneInputCountry = Country;
|
|
7
|
+
export type PhoneInputValue = Value;
|
|
8
|
+
export type PhoneInputCountry = Country;
|
|
9
9
|
type CountryOptionOrder = PhoneInputCountry | "XX" | "🌐" | "|" | "..." | "…";
|
|
10
|
-
type PhoneInputProps = Omit<ComponentProps<"input">, "defaultValue" | "size" | "style" | "type" | "value"> & {
|
|
10
|
+
export type PhoneInputProps = Omit<ComponentProps<"input">, "defaultValue" | "size" | "style" | "type" | "value"> & {
|
|
11
11
|
size?: ControlSize;
|
|
12
12
|
value?: PhoneInputValue | string;
|
|
13
13
|
defaultValue?: PhoneInputValue | string;
|
|
@@ -25,6 +25,5 @@ type PhoneInputProps = Omit<ComponentProps<"input">, "defaultValue" | "size" | "
|
|
|
25
25
|
"data-invalid"?: boolean | string;
|
|
26
26
|
style?: CSSProperties & PhoneInputKnobStyle;
|
|
27
27
|
};
|
|
28
|
-
declare function PhoneInput(props: PhoneInputProps): import("react").JSX.Element;
|
|
29
|
-
//#endregion
|
|
30
|
-
export { PhoneInput, PhoneInputCountry, PhoneInputProps, PhoneInputValue };
|
|
28
|
+
export declare function PhoneInput(props: PhoneInputProps): import("react").JSX.Element;
|
|
29
|
+
//#endregion
|
package/dist/ui/phone-input.js
CHANGED
|
@@ -35,7 +35,7 @@ function PhoneInputControl({ className, normalizationCountry, onChange, onNative
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
function PhoneCountrySelect({ value, options, onChange, onFocus, onBlur, disabled, readOnly, "aria-label": ariaLabel = "Country", searchPlaceholder = "Search country
|
|
38
|
+
function PhoneCountrySelect({ value, options, onChange, onFocus, onBlur, disabled, readOnly, "aria-label": ariaLabel = "Country", searchPlaceholder = "Search country…", emptyMessage, knobStyle }) {
|
|
39
39
|
const countryStyle = knobStyle;
|
|
40
40
|
const triggerStyle = knobStyle;
|
|
41
41
|
const metadataStyle = knobStyle;
|
|
@@ -70,41 +70,44 @@ function PhoneCountrySelect({ value, options, onChange, onFocus, onBlur, disable
|
|
|
70
70
|
align: "start",
|
|
71
71
|
padding: "none",
|
|
72
72
|
className: "w-[min(20rem,calc(100vw-2rem))]",
|
|
73
|
-
children: /* @__PURE__ */ jsxs(Command, {
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
73
|
+
children: /* @__PURE__ */ jsxs(Command, {
|
|
74
|
+
chrome: "embedded",
|
|
75
|
+
children: [/* @__PURE__ */ jsx(CommandInput, {
|
|
76
|
+
"aria-label": searchPlaceholder,
|
|
77
|
+
placeholder: searchPlaceholder
|
|
78
|
+
}), /* @__PURE__ */ jsxs(CommandList, { children: [/* @__PURE__ */ jsx(CommandEmpty, { title: emptyMessage }), /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => {
|
|
79
|
+
const callingCode = option.value ? `+${getCountryCallingCode(option.value)}` : "";
|
|
80
|
+
const selected = option.value === value;
|
|
81
|
+
return /* @__PURE__ */ jsxs(CommandItem, {
|
|
82
|
+
value: `${option.label} ${option.value ?? "international"} ${callingCode}`,
|
|
83
|
+
"data-current": selected ? "" : void 0,
|
|
84
|
+
onSelect: () => {
|
|
85
|
+
onChange(option.value);
|
|
86
|
+
setOpen(false);
|
|
87
|
+
},
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ jsx(CountryFlag, { country: option.value }),
|
|
90
|
+
/* @__PURE__ */ jsx("span", {
|
|
91
|
+
className: "min-w-0 flex-1 truncate",
|
|
92
|
+
children: option.label
|
|
93
|
+
}),
|
|
94
|
+
callingCode ? /* @__PURE__ */ jsx("span", {
|
|
95
|
+
"data-control-ui": "phone-input",
|
|
96
|
+
"data-control-family": "phone-input",
|
|
97
|
+
"data-slot": "metadata",
|
|
98
|
+
className: "min-w-0",
|
|
99
|
+
style: metadataStyle,
|
|
100
|
+
children: callingCode
|
|
101
|
+
}) : null,
|
|
102
|
+
selected ? /* @__PURE__ */ jsx("span", {
|
|
103
|
+
className: "sr-only",
|
|
104
|
+
children: "Selected"
|
|
105
|
+
}) : null,
|
|
106
|
+
/* @__PURE__ */ jsx(CheckIcon, { visible: selected })
|
|
107
|
+
]
|
|
108
|
+
}, option.value ?? "international");
|
|
109
|
+
}) })] })]
|
|
110
|
+
})
|
|
108
111
|
})]
|
|
109
112
|
})
|
|
110
113
|
});
|