@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
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
line-height: var(--_rich-tooltip-title-line-height);
|
|
57
57
|
--_rich-tooltip-title-letter-spacing: var(--_rich-tooltip-content-title-letter-spacing);
|
|
58
58
|
letter-spacing: var(--_rich-tooltip-title-letter-spacing);
|
|
59
|
+
text-wrap: balance;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
:where([data-control-family="popup"][data-popup-kind="rich-tooltip"][data-slot="content"]) {
|
|
@@ -131,7 +132,6 @@
|
|
|
131
132
|
--_rich-tooltip-content-title-letter-spacing: var(--_rich-tooltip-title-letter-spacing);
|
|
132
133
|
--_rich-tooltip-arrow-rotate: 0deg;
|
|
133
134
|
--_rich-tooltip-action-outline: none;
|
|
134
|
-
--_rich-tooltip-action-transition-property: background-color, color, box-shadow;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
:where([data-control-family="popup"][data-popup-kind="rich-tooltip"][data-slot="content"][data-tone="accent"]) {
|
|
@@ -203,9 +203,6 @@
|
|
|
203
203
|
color: var(--cui-rich-tooltip-action-foreground);
|
|
204
204
|
font-size: var(--text-label);
|
|
205
205
|
font-weight: var(--font-weight-medium);
|
|
206
|
-
transition-property: var(--_rich-tooltip-action-transition-property);
|
|
207
|
-
transition-duration: var(--duration-fast);
|
|
208
|
-
transition-timing-function: var(--ease-standard);
|
|
209
206
|
outline-style: var(--_rich-tooltip-action-outline);
|
|
210
207
|
}
|
|
211
208
|
|
|
@@ -5,6 +5,14 @@
|
|
|
5
5
|
--cui-scroll-area-corner-background: transparent;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
@supports (corner-shape: squircle) {
|
|
9
|
+
@container not style(--corner-shape: round) {
|
|
10
|
+
:where([data-control-family="scroll-area"][data-slot="root"] > [data-control-family="progressive-blur"]) {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
8
16
|
:where([data-control-family="scroll-area"][data-slot="root"] > [data-scroll-area-viewport]) {
|
|
9
17
|
position: relative;
|
|
10
18
|
z-index: 0;
|
|
@@ -131,7 +139,6 @@
|
|
|
131
139
|
:where([data-control-family="scroll-area"][data-slot="scrollbar"]) {
|
|
132
140
|
z-index: 1;
|
|
133
141
|
opacity: 0;
|
|
134
|
-
transition: opacity var(--duration-fast) var(--ease-standard);
|
|
135
142
|
}
|
|
136
143
|
|
|
137
144
|
:where([data-control-family="scroll-area"][data-slot="scrollbar"][data-visibility="always"]),
|
|
@@ -143,7 +150,6 @@
|
|
|
143
150
|
:where([data-control-family="scroll-area"][data-slot="thumb"]) {
|
|
144
151
|
border-radius: var(--cui-scroll-area-thumb-radius);
|
|
145
152
|
background: var(--cui-scroll-area-thumb-background);
|
|
146
|
-
transition: background-color var(--duration-fast) var(--ease-standard);
|
|
147
153
|
}
|
|
148
154
|
|
|
149
155
|
:where([data-control-family="scroll-area"][data-slot="corner"]) {
|
|
@@ -7,9 +7,6 @@
|
|
|
7
7
|
font-size: var(--text-caption);
|
|
8
8
|
font-weight: var(--font-weight-medium);
|
|
9
9
|
outline: none;
|
|
10
|
-
transition-property: margin, opacity;
|
|
11
|
-
transition-duration: var(--duration-base);
|
|
12
|
-
transition-timing-function: var(--ease-standard);
|
|
13
10
|
}
|
|
14
11
|
|
|
15
12
|
:where([data-control-family="sidebar"][data-slot="menu-button"]),
|
|
@@ -22,9 +19,6 @@
|
|
|
22
19
|
background-color: transparent;
|
|
23
20
|
color: var(--cui-sidebar-menu-button-foreground);
|
|
24
21
|
outline: none;
|
|
25
|
-
transition-property: width, height, padding, color, background-color, box-shadow;
|
|
26
|
-
transition-duration: var(--duration-base);
|
|
27
|
-
transition-timing-function: var(--ease-standard);
|
|
28
22
|
}
|
|
29
23
|
|
|
30
24
|
:where([data-control-family="sidebar"][data-slot="menu-button"][data-size="sm"]) {
|
|
@@ -9,13 +9,18 @@
|
|
|
9
9
|
background-image: var(--cui-sidebar-wrapper-background-image);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
:where([data-control-family="sidebar"][data-slot="wrapper"]:has([data-control-family="sidebar"][data-variant="inset"])) {
|
|
12
|
+
:where([data-control-family="sidebar"][data-slot="wrapper"]:has([data-control-family="sidebar"][data-variant="inset"][data-state])) {
|
|
13
13
|
--cui-sidebar-wrapper-background: var(--sidebar);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
:where([data-control-family="sidebar"][data-slot="wrapper"]:has([data-control-family="sidebar"][data-variant="page"][data-state])) {
|
|
17
|
+
--cui-sidebar-inset-background: transparent;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
:where([data-control-family="sidebar"][data-slot="root"]) {
|
|
17
21
|
--cui-sidebar-inner-background: var(--sidebar);
|
|
18
22
|
--cui-sidebar-inner-background-image: none;
|
|
23
|
+
--cui-sidebar-inner-backdrop-filter: none;
|
|
19
24
|
--cui-sidebar-inner-border-color: var(--sidebar-border);
|
|
20
25
|
--cui-sidebar-inner-border-width: 0px;
|
|
21
26
|
--cui-sidebar-inner-radius: 0px;
|
|
@@ -34,15 +39,13 @@
|
|
|
34
39
|
color: var(--sidebar-foreground);
|
|
35
40
|
}
|
|
36
41
|
|
|
37
|
-
:where([data-control-family="sidebar"][data-slot="
|
|
42
|
+
:where([data-control-family="sidebar"][data-slot="root"][data-variant="page"][data-state]) {
|
|
43
|
+
--cui-sidebar-inner-background: transparent;
|
|
38
44
|
background-color: transparent;
|
|
39
|
-
transition: width var(--duration-base) var(--ease-standard);
|
|
40
45
|
}
|
|
41
46
|
|
|
42
|
-
:where([data-control-family="sidebar"][data-slot="
|
|
43
|
-
|
|
44
|
-
transition-duration: var(--duration-base);
|
|
45
|
-
transition-timing-function: var(--ease-standard);
|
|
47
|
+
:where([data-control-family="sidebar"][data-slot="gap"]) {
|
|
48
|
+
background-color: transparent;
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
:where([data-control-family="sidebar"][data-slot="root"][data-variant="sidebar"][data-side="left"] [data-slot="container"]) {
|
|
@@ -54,14 +57,28 @@
|
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
:where([data-control-family="sidebar"][data-slot="inner"]) {
|
|
60
|
+
position: relative;
|
|
61
|
+
isolation: isolate;
|
|
57
62
|
border: var(--cui-sidebar-inner-border-width) solid var(--cui-sidebar-inner-border-color);
|
|
58
63
|
border-radius: var(--cui-sidebar-inner-radius);
|
|
64
|
+
box-shadow: var(--cui-sidebar-inner-shadow);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:where([data-control-family="sidebar"][data-slot="inner"])::before {
|
|
68
|
+
content: "";
|
|
69
|
+
position: absolute;
|
|
70
|
+
inset: 0;
|
|
71
|
+
z-index: -1;
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
border-radius: inherit;
|
|
74
|
+
corner-shape: inherit;
|
|
59
75
|
background-color: var(--cui-sidebar-inner-background);
|
|
60
76
|
background-image: var(--cui-sidebar-inner-background-image);
|
|
61
|
-
|
|
77
|
+
-webkit-backdrop-filter: var(--cui-sidebar-inner-backdrop-filter);
|
|
78
|
+
backdrop-filter: var(--cui-sidebar-inner-backdrop-filter);
|
|
62
79
|
}
|
|
63
80
|
|
|
64
|
-
:where([data-control-family="sidebar"][data-slot="root"][data-variant="floating"]) {
|
|
81
|
+
:where([data-control-family="sidebar"][data-slot="root"][data-variant="floating"][data-state]) {
|
|
65
82
|
--cui-sidebar-inner-border-width: 1px;
|
|
66
83
|
--cui-sidebar-inner-radius: var(--radius-panel);
|
|
67
84
|
--cui-sidebar-inner-shadow: var(--shadow-md);
|
|
@@ -73,9 +90,6 @@
|
|
|
73
90
|
background-position: center;
|
|
74
91
|
background-repeat: no-repeat;
|
|
75
92
|
background-size: 2px 100%;
|
|
76
|
-
transition-property: --cui-sidebar-rail-divider-background, background-color, translate;
|
|
77
|
-
transition-duration: var(--duration-base);
|
|
78
|
-
transition-timing-function: var(--ease-standard);
|
|
79
93
|
}
|
|
80
94
|
|
|
81
95
|
:where([data-control-family="sidebar"][data-collapsible="offcanvas"] [data-slot="rail"]) {
|
|
@@ -87,21 +101,40 @@
|
|
|
87
101
|
--cui-sidebar-rail-divider-background: var(--sidebar-border);
|
|
88
102
|
}
|
|
89
103
|
|
|
90
|
-
:where([data-control-family="sidebar"][data-collapsible="offcanvas"] [data-slot="rail"]:hover) {
|
|
104
|
+
:where([data-control-family="sidebar"][data-collapsible="offcanvas"] [data-slot="rail"]:not([data-resizable]):hover) {
|
|
91
105
|
background-color: var(--sidebar);
|
|
92
106
|
}
|
|
93
107
|
}
|
|
94
108
|
|
|
109
|
+
:where([data-control-family="sidebar"][data-slot="rail"][data-resizable]) {
|
|
110
|
+
inline-size: calc(var(--spacing) * 2);
|
|
111
|
+
background: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:where([data-control-family="sidebar"][data-slot="rail"][data-resizable])::after {
|
|
115
|
+
content: "";
|
|
116
|
+
position: absolute;
|
|
117
|
+
inset-block: 12.5%;
|
|
118
|
+
inset-inline-start: 50%;
|
|
119
|
+
inline-size: 1px;
|
|
120
|
+
background-image: linear-gradient(transparent, var(--cui-sidebar-rail-divider-background), transparent);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:where([data-control-family="sidebar"][data-slot="rail"]:is(:focus-visible, [data-resizing="true"])) {
|
|
124
|
+
--cui-sidebar-rail-divider-background: var(--ring);
|
|
125
|
+
outline: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
95
128
|
:where([data-control-family="sidebar"][data-slot="inset"]) {
|
|
96
129
|
background-color: var(--cui-sidebar-inset-background);
|
|
97
130
|
background-image: var(--cui-sidebar-inset-background-image);
|
|
98
|
-
transition-property: margin, border-radius, box-shadow;
|
|
99
|
-
transition-duration: var(--duration-base);
|
|
100
|
-
transition-timing-function: var(--ease-standard);
|
|
101
131
|
}
|
|
102
132
|
|
|
103
133
|
@media (width >= 64rem) {
|
|
104
|
-
:where(
|
|
134
|
+
:where(
|
|
135
|
+
[data-control-family="sidebar"][data-slot="root"][data-variant="inset"][data-state]
|
|
136
|
+
~ [data-control-family="sidebar"][data-slot="inset"]
|
|
137
|
+
) {
|
|
105
138
|
margin: calc(var(--spacing) * 2);
|
|
106
139
|
margin-inline-start: 0;
|
|
107
140
|
border-radius: var(--radius-xl);
|
|
@@ -221,6 +254,12 @@
|
|
|
221
254
|
inherits: true;
|
|
222
255
|
}
|
|
223
256
|
|
|
257
|
+
@property --cui-sidebar-inner-backdrop-filter {
|
|
258
|
+
syntax: "*";
|
|
259
|
+
inherits: true;
|
|
260
|
+
initial-value: none;
|
|
261
|
+
}
|
|
262
|
+
|
|
224
263
|
@property --cui-sidebar-inner-border-width {
|
|
225
264
|
syntax: "<length>";
|
|
226
265
|
inherits: true;
|
|
@@ -2,11 +2,63 @@
|
|
|
2
2
|
:where([data-control-family="skeleton"][data-slot="root"]) {
|
|
3
3
|
--cui-skeleton-radius: var(--radius-control);
|
|
4
4
|
--cui-skeleton-background: var(--muted);
|
|
5
|
+
--cui-skeleton-background-image: none;
|
|
6
|
+
--cui-skeleton-highlight-background: oklch(from var(--foreground) l c h / 0.06);
|
|
7
|
+
--cui-skeleton-animation-duration: calc(var(--duration-slow) * 5);
|
|
8
|
+
--cui-skeleton-easing: var(--ease-standard);
|
|
9
|
+
--cui-skeleton-pulse-opacity: 0.5;
|
|
10
|
+
position: relative;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
isolation: isolate;
|
|
5
13
|
border-radius: var(--cui-skeleton-radius);
|
|
6
14
|
background-color: var(--cui-skeleton-background);
|
|
7
|
-
background-image:
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
background-image: var(--cui-skeleton-background-image);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where([data-control-family="skeleton"][data-slot="root"][data-variant="shimmer"])::after {
|
|
19
|
+
content: "";
|
|
20
|
+
position: absolute;
|
|
21
|
+
inset: 0;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
background-image: linear-gradient(90deg, transparent, var(--cui-skeleton-highlight-background), transparent);
|
|
24
|
+
transform: translateX(-100%);
|
|
25
|
+
animation: cui-skeleton-shimmer var(--cui-skeleton-animation-duration) var(--cui-skeleton-easing) infinite;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where([data-control-family="skeleton"][data-slot="root"][data-variant="pulse"]) {
|
|
29
|
+
animation: cui-skeleton-pulse var(--cui-skeleton-animation-duration) var(--cui-skeleton-easing) infinite;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where([data-control-family="skeleton"][data-slot="root"][data-variant="none"]) {
|
|
33
|
+
animation: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@media (prefers-reduced-motion: reduce) {
|
|
37
|
+
:where([data-control-family="skeleton"][data-slot="root"]),
|
|
38
|
+
:where([data-control-family="skeleton"][data-slot="root"])::after {
|
|
39
|
+
animation: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where([data-motion="reduced"] [data-control-family="skeleton"][data-slot="root"]),
|
|
44
|
+
:where([data-motion="reduced"] [data-control-family="skeleton"][data-slot="root"])::after {
|
|
45
|
+
animation: none;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@keyframes cui-skeleton-shimmer {
|
|
50
|
+
to {
|
|
51
|
+
transform: translateX(100%);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@keyframes cui-skeleton-pulse {
|
|
56
|
+
0%,
|
|
57
|
+
100% {
|
|
58
|
+
opacity: 1;
|
|
59
|
+
}
|
|
60
|
+
50% {
|
|
61
|
+
opacity: var(--cui-skeleton-pulse-opacity);
|
|
10
62
|
}
|
|
11
63
|
}
|
|
12
64
|
|
|
@@ -21,3 +73,33 @@
|
|
|
21
73
|
inherits: true;
|
|
22
74
|
initial-value: transparent;
|
|
23
75
|
}
|
|
76
|
+
|
|
77
|
+
@property --cui-skeleton-background-image {
|
|
78
|
+
syntax: "*";
|
|
79
|
+
inherits: true;
|
|
80
|
+
initial-value: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@property --cui-skeleton-highlight-background {
|
|
84
|
+
syntax: "<color>";
|
|
85
|
+
inherits: true;
|
|
86
|
+
initial-value: transparent;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@property --cui-skeleton-animation-duration {
|
|
90
|
+
syntax: "<time>";
|
|
91
|
+
inherits: true;
|
|
92
|
+
initial-value: 0s;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@property --cui-skeleton-easing {
|
|
96
|
+
syntax: "*";
|
|
97
|
+
inherits: true;
|
|
98
|
+
initial-value: ease;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@property --cui-skeleton-pulse-opacity {
|
|
102
|
+
syntax: "<number>";
|
|
103
|
+
inherits: true;
|
|
104
|
+
initial-value: 0.5;
|
|
105
|
+
}
|
|
@@ -12,9 +12,6 @@
|
|
|
12
12
|
--cui-source-badge-favicon-radius: var(--radius-sm);
|
|
13
13
|
background: var(--cui-source-badge-background);
|
|
14
14
|
color: var(--cui-source-badge-foreground);
|
|
15
|
-
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
|
|
16
|
-
transition-duration: var(--duration-fast);
|
|
17
|
-
transition-timing-function: var(--ease-standard);
|
|
18
15
|
font-weight: var(--font-weight-normal);
|
|
19
16
|
}
|
|
20
17
|
|
|
@@ -25,6 +22,26 @@
|
|
|
25
22
|
}
|
|
26
23
|
}
|
|
27
24
|
|
|
25
|
+
:where([data-control-family="badge"][data-source-badge][data-slot="root"]:focus-visible) {
|
|
26
|
+
background: var(--cui-source-badge-hover-background);
|
|
27
|
+
color: var(--cui-source-badge-hover-foreground);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (pointer: coarse) {
|
|
31
|
+
:where([data-control-family="badge"][data-source-badge][data-slot="root"]) {
|
|
32
|
+
position: relative;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where([data-control-family="badge"][data-source-badge][data-slot="root"])::after {
|
|
36
|
+
content: "";
|
|
37
|
+
position: absolute;
|
|
38
|
+
inset: 50% 50%;
|
|
39
|
+
translate: -50% -50%;
|
|
40
|
+
inline-size: 100%;
|
|
41
|
+
block-size: max(100%, 44px);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
28
45
|
:where([data-control-family="badge"][data-source-badge][data-slot="root"] [data-slot="label"]) {
|
|
29
46
|
max-inline-size: calc(var(--spacing) * 44);
|
|
30
47
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
--cui-stepper-indicator-background: var(--background);
|
|
5
5
|
--cui-stepper-indicator-foreground: var(--muted-foreground);
|
|
6
6
|
--cui-stepper-indicator-border-color: var(--border);
|
|
7
|
+
--cui-stepper-indicator-border-width: 1px;
|
|
7
8
|
--cui-stepper-separator-background: var(--border);
|
|
8
9
|
--cui-stepper-title-foreground: var(--foreground);
|
|
9
10
|
}
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
inline-size: calc(var(--spacing) * 8);
|
|
24
25
|
block-size: calc(var(--spacing) * 8);
|
|
25
26
|
--_stepper-indicator-shadow: 0 0 transparent;
|
|
26
|
-
border:
|
|
27
|
+
border: var(--cui-stepper-indicator-border-width) solid var(--cui-stepper-indicator-border-color);
|
|
27
28
|
border-radius: var(--cui-stepper-indicator-radius);
|
|
28
29
|
background: var(--cui-stepper-indicator-background);
|
|
29
30
|
color: var(--cui-stepper-indicator-foreground);
|
|
@@ -165,6 +166,12 @@
|
|
|
165
166
|
initial-value: transparent;
|
|
166
167
|
}
|
|
167
168
|
|
|
169
|
+
@property --cui-stepper-indicator-border-width {
|
|
170
|
+
syntax: "<length>";
|
|
171
|
+
inherits: true;
|
|
172
|
+
initial-value: 0px;
|
|
173
|
+
}
|
|
174
|
+
|
|
168
175
|
@property --cui-stepper-separator-background {
|
|
169
176
|
syntax: "<color>";
|
|
170
177
|
inherits: true;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
:where([data-control-family="switch"][data-slot="root"]) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
padding: calc(var(--spacing) * 0.5);
|
|
3
|
+
--cui-switch-inline-size: calc(var(--spacing) * 9);
|
|
4
|
+
--cui-switch-height: calc(var(--spacing) * 5);
|
|
5
|
+
--cui-switch-padding: calc(var(--spacing) * 0.5);
|
|
6
|
+
--cui-switch-thumb-inline-size: calc(var(--spacing) * 4);
|
|
7
|
+
--cui-switch-thumb-press-scale: 1.25 1;
|
|
8
|
+
--cui-switch-thumb-backdrop-filter: none;
|
|
9
|
+
--_switch-direction: 1;
|
|
10
|
+
--_switch-progress: 0;
|
|
11
|
+
--_switch-travel: calc(var(--cui-switch-inline-size) - var(--cui-switch-padding) * 2 - var(--cui-switch-thumb-inline-size));
|
|
12
|
+
block-size: var(--cui-switch-height);
|
|
13
|
+
inline-size: var(--cui-switch-inline-size);
|
|
14
|
+
padding: var(--cui-switch-padding);
|
|
15
|
+
touch-action: pan-y;
|
|
16
|
+
user-select: none;
|
|
6
17
|
--cui-switch-background: oklch(from var(--foreground) l c h / 0.14);
|
|
7
18
|
--cui-switch-hover-background: oklch(from var(--foreground) l c h / 0.2);
|
|
8
19
|
--cui-switch-checked-background: var(--primary);
|
|
@@ -13,7 +24,6 @@
|
|
|
13
24
|
border-radius: calc(infinity * 1px);
|
|
14
25
|
background: var(--cui-switch-background);
|
|
15
26
|
outline: none;
|
|
16
|
-
transition: background-color var(--duration-base) var(--ease-standard);
|
|
17
27
|
}
|
|
18
28
|
|
|
19
29
|
:where([data-control-family="switch"][data-slot="root"]:hover) {
|
|
@@ -21,10 +31,12 @@
|
|
|
21
31
|
}
|
|
22
32
|
|
|
23
33
|
:where([data-control-family="switch"][data-slot="root"]:active) {
|
|
24
|
-
background: oklch(from var(--foreground) l c h / 0.25);
|
|
34
|
+
--cui-switch-background: oklch(from var(--foreground) l c h / 0.25);
|
|
35
|
+
background: var(--cui-switch-background);
|
|
25
36
|
}
|
|
26
37
|
|
|
27
38
|
:where([data-control-family="switch"][data-slot="root"][data-checked]) {
|
|
39
|
+
--_switch-progress: 1;
|
|
28
40
|
background: var(--cui-switch-checked-background);
|
|
29
41
|
}
|
|
30
42
|
|
|
@@ -33,7 +45,8 @@
|
|
|
33
45
|
}
|
|
34
46
|
|
|
35
47
|
:where([data-control-family="switch"][data-slot="root"][data-checked]:active) {
|
|
36
|
-
background: oklch(from var(--primary) l c h / 0.8);
|
|
48
|
+
--cui-switch-checked-background: oklch(from var(--primary) l c h / 0.8);
|
|
49
|
+
background: var(--cui-switch-checked-background);
|
|
37
50
|
}
|
|
38
51
|
|
|
39
52
|
:where([data-control-family="switch"][data-slot="root"][data-disabled]) {
|
|
@@ -52,9 +65,13 @@
|
|
|
52
65
|
border-radius: var(--cui-switch-thumb-radius);
|
|
53
66
|
background: var(--cui-switch-thumb-background);
|
|
54
67
|
box-shadow: var(--cui-switch-thumb-shadow);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
68
|
+
inline-size: var(--cui-switch-thumb-inline-size);
|
|
69
|
+
block-size: calc(var(--cui-switch-height) - var(--cui-switch-padding) * 2);
|
|
70
|
+
translate: calc(var(--_switch-direction) * var(--_switch-travel) * var(--_switch-progress)) 0;
|
|
71
|
+
transform-origin: left center;
|
|
72
|
+
-webkit-backdrop-filter: var(--cui-switch-thumb-backdrop-filter);
|
|
73
|
+
backdrop-filter: var(--cui-switch-thumb-backdrop-filter);
|
|
74
|
+
transition-property: translate, scale, background-color, box-shadow;
|
|
58
75
|
transition-duration: var(--duration-base);
|
|
59
76
|
transition-timing-function: var(--ease-emphasized);
|
|
60
77
|
}
|
|
@@ -92,18 +109,39 @@
|
|
|
92
109
|
opacity: 1;
|
|
93
110
|
}
|
|
94
111
|
|
|
95
|
-
:where([data-control-family="switch"][data-slot="
|
|
96
|
-
--_switch-
|
|
97
|
-
translate: var(--_switch-thumb-translate);
|
|
112
|
+
:where([data-control-family="switch"][data-slot="root"]:dir(rtl)) {
|
|
113
|
+
--_switch-direction: -1;
|
|
98
114
|
}
|
|
99
115
|
|
|
100
|
-
:where([data-control-family="switch"][data-slot="
|
|
101
|
-
|
|
116
|
+
:where([data-control-family="switch"][data-slot="thumb"][data-checked]),
|
|
117
|
+
:where([data-control-family="switch"][data-slot="thumb"]:dir(rtl)) {
|
|
118
|
+
transform-origin: right center;
|
|
102
119
|
}
|
|
103
120
|
|
|
104
|
-
:where([data-control-family="switch"][data-slot="
|
|
105
|
-
|
|
106
|
-
|
|
121
|
+
:where([data-control-family="switch"][data-slot="thumb"][data-checked]:dir(rtl)) {
|
|
122
|
+
transform-origin: left center;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:where(
|
|
126
|
+
[data-control-family="switch"][data-slot="root"]:is(:active, [data-dragging]):not([data-disabled], [data-readonly]) [data-slot="thumb"]
|
|
127
|
+
) {
|
|
128
|
+
scale: var(--cui-switch-thumb-press-scale);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:where([data-control-family="switch"][data-slot="root"][data-dragging]) {
|
|
132
|
+
--_switch-progress: var(--_switch-drag-progress);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:where([data-control-family="switch"][data-slot="root"][data-drag-checked="false"]) {
|
|
136
|
+
background: var(--cui-switch-background);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:where([data-control-family="switch"][data-slot="root"][data-drag-checked="true"]) {
|
|
140
|
+
background: var(--cui-switch-checked-background);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:where([data-control-family="switch"][data-slot="root"][data-dragging] [data-slot="thumb"]) {
|
|
144
|
+
transition-property: scale, background-color, box-shadow;
|
|
107
145
|
}
|
|
108
146
|
}
|
|
109
147
|
|
|
@@ -147,3 +185,37 @@
|
|
|
147
185
|
inherits: true;
|
|
148
186
|
initial-value: transparent;
|
|
149
187
|
}
|
|
188
|
+
|
|
189
|
+
@property --cui-switch-inline-size {
|
|
190
|
+
syntax: "<length>";
|
|
191
|
+
inherits: true;
|
|
192
|
+
initial-value: 36px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@property --cui-switch-height {
|
|
196
|
+
syntax: "<length>";
|
|
197
|
+
inherits: true;
|
|
198
|
+
initial-value: 20px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@property --cui-switch-padding {
|
|
202
|
+
syntax: "<length>";
|
|
203
|
+
inherits: true;
|
|
204
|
+
initial-value: 2px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@property --cui-switch-thumb-inline-size {
|
|
208
|
+
syntax: "<length>";
|
|
209
|
+
inherits: true;
|
|
210
|
+
initial-value: 16px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@property --cui-switch-thumb-press-scale {
|
|
214
|
+
syntax: "*";
|
|
215
|
+
inherits: true;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@property --cui-switch-thumb-backdrop-filter {
|
|
219
|
+
syntax: "*";
|
|
220
|
+
inherits: true;
|
|
221
|
+
}
|