@ctrl-ui/react 0.8.2 → 0.8.4
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/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/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 +12 -21
- package/dist/chat-layout.js +28 -83
- package/dist/chat-message.d.ts +14 -15
- package/dist/context-model.d.ts +7 -8
- package/dist/context.d.ts +21 -22
- 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.d.ts +6 -7
- package/dist/email/length.d.ts +2 -3
- package/dist/email/templates.d.ts +7 -8
- package/dist/email/theme.d.ts +4 -5
- 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 +7 -8
- 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 +6 -7
- package/dist/inline-attachment.d.ts +16 -17
- 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/activity-knobs.d.ts +3 -4
- 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/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 +3 -1
- package/dist/knob-contracts/chat-composer-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-knobs.js +1 -0
- package/dist/knob-contracts/chat-layout-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-layout-knobs.js +2 -3
- package/dist/knob-contracts/chat-message-knobs.d.ts +3 -4
- 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/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 +2 -1
- package/dist/knob-contracts/inline-citation-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-citation-knobs.js +1 -0
- 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/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 +1 -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 +1 -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-input-format.js +1 -1
- 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/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 +1 -4
- package/dist/styles/recipes/accordion.css +8 -2
- package/dist/styles/recipes/action-bar.css +5 -2
- package/dist/styles/recipes/alert.css +95 -16
- package/dist/styles/recipes/avatar.css +17 -1
- package/dist/styles/recipes/badge.css +0 -1
- package/dist/styles/recipes/button.css +34 -8
- package/dist/styles/recipes/calendar.css +0 -6
- package/dist/styles/recipes/chat-composer-attachment.css +51 -53
- package/dist/styles/recipes/chat-composer.css +26 -21
- package/dist/styles/recipes/chat-layout.css +21 -62
- package/dist/styles/recipes/chat-message.css +11 -5
- package/dist/styles/recipes/choice.css +9 -2
- package/dist/styles/recipes/code-diff.css +8 -1
- package/dist/styles/recipes/code.css +39 -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/dockable-panel.css +8 -1
- package/dist/styles/recipes/dropzone.css +9 -2
- package/dist/styles/recipes/empty.css +118 -17
- package/dist/styles/recipes/environment-variables.css +8 -1
- package/dist/styles/recipes/field-parts.css +1 -6
- package/dist/styles/recipes/field.css +9 -5
- package/dist/styles/recipes/gradient-editor.css +16 -5
- package/dist/styles/recipes/inline-attachment.css +13 -8
- package/dist/styles/recipes/inline-citation.css +8 -4
- package/dist/styles/recipes/item.css +1 -1
- package/dist/styles/recipes/kbd.css +8 -0
- package/dist/styles/recipes/markdown-block.css +16 -2
- package/dist/styles/recipes/markdown.css +12 -0
- package/dist/styles/recipes/morphing-panel.css +1 -1
- package/dist/styles/recipes/pagination.css +0 -4
- package/dist/styles/recipes/phone-input.css +8 -4
- package/dist/styles/recipes/popup-lists.css +11 -0
- package/dist/styles/recipes/popup-toast.css +1 -29
- package/dist/styles/recipes/popup.css +2 -2
- package/dist/styles/recipes/progressive-blur.css +28 -7
- package/dist/styles/recipes/range.css +50 -1
- package/dist/styles/recipes/resizable.css +8 -10
- package/dist/styles/recipes/rich-tooltip.css +0 -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 +0 -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 +19 -2
- package/dist/styles/recipes/task-list.css +8 -2
- package/dist/styles/recipes/thread-rail.css +0 -4
- package/dist/styles/recipes/toolbar.css +18 -4
- package/dist/styles/recipes/track-highlight.css +63 -5
- package/dist/styles/recipes/tree.css +2 -0
- package/dist/styles/recipes/user-ask.css +8 -4
- package/dist/styles/theme.css +130 -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/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 +8 -6
- 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 +5 -3
- 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 +6 -4
- package/dist/ui/combobox-disabled-selection.d.ts +3 -4
- package/dist/ui/combobox.d.ts +19 -20
- package/dist/ui/combobox.js +5 -3
- package/dist/ui/command.d.ts +19 -18
- package/dist/ui/command.js +38 -12
- package/dist/ui/context-menu.d.ts +30 -31
- package/dist/ui/context-menu.js +8 -5
- package/dist/ui/dialog.d.ts +13 -13
- package/dist/ui/dialog.js +10 -8
- 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 +7 -6
- package/dist/ui/dropdown-menu.d.ts +32 -33
- package/dist/ui/dropdown-menu.js +5 -3
- package/dist/ui/dropzone.d.ts +24 -24
- 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/hover-card.d.ts +6 -7
- package/dist/ui/hover-card.js +5 -3
- package/dist/ui/infinite-canvas.d.ts +11 -12
- 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 +8 -5
- 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 +5 -3
- package/dist/ui/number-field.d.ts +15 -16
- package/dist/ui/pagination.d.ts +10 -11
- package/dist/ui/phone-input.d.ts +5 -6
- package/dist/ui/phone-input.js +40 -37
- package/dist/ui/popover.d.ts +11 -12
- package/dist/ui/popover.js +5 -3
- 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/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 +5 -5
- 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 +7 -4
- package/dist/ui/separator.d.ts +2 -3
- package/dist/ui/sheet.d.ts +8 -9
- package/dist/ui/sheet.js +7 -5
- 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 +21 -14
- 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 +7 -8
- 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 +5 -3
- 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 +24 -25
- package/package.json +15 -15
- 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
|
@@ -1,46 +1,45 @@
|
|
|
1
1
|
//#region src/scripts/contrast-eval.d.mts
|
|
2
|
-
declare const stripComments: (css: any) => any;
|
|
3
|
-
declare function parseBlocks(css: any): {
|
|
2
|
+
export declare const stripComments: (css: any) => any;
|
|
3
|
+
export declare function parseBlocks(css: any): {
|
|
4
4
|
prelude: any;
|
|
5
5
|
body: any;
|
|
6
6
|
}[];
|
|
7
|
-
declare function flattenBlocks(css: any): any;
|
|
8
|
-
declare function declarations(body: any): Map<any, any>;
|
|
9
|
-
|
|
10
|
-
declare function tokenMaps(cssSources: any): {
|
|
7
|
+
export declare function flattenBlocks(css: any): any;
|
|
8
|
+
export declare function declarations(body: any): Map<any, any>;
|
|
9
|
+
export declare function themeTokenBlocks(css: any): any;
|
|
10
|
+
export declare function tokenMaps(cssSources: any): {
|
|
11
11
|
light: Map<any, any>;
|
|
12
12
|
dark: Map<any, any>;
|
|
13
13
|
};
|
|
14
|
-
declare function rgbToOklch(r255: any, g255: any, b255: any): {
|
|
14
|
+
export declare function rgbToOklch(r255: any, g255: any, b255: any): {
|
|
15
15
|
L: number;
|
|
16
16
|
C: number;
|
|
17
17
|
H: number;
|
|
18
18
|
};
|
|
19
|
-
declare function oklchToRgb(L: any, C: any, H: any): {
|
|
19
|
+
export declare function oklchToRgb(L: any, C: any, H: any): {
|
|
20
20
|
r: number;
|
|
21
21
|
g: number;
|
|
22
22
|
b: number;
|
|
23
23
|
};
|
|
24
|
-
declare const luminance: ({ r, g, b }: {
|
|
24
|
+
export declare const luminance: ({ r, g, b }: {
|
|
25
25
|
b: any;
|
|
26
26
|
g: any;
|
|
27
27
|
r: any;
|
|
28
28
|
}) => number;
|
|
29
|
-
declare function contrastRatio(a: any, b: any): number;
|
|
30
|
-
declare function parseHex(value: any): {
|
|
29
|
+
export declare function contrastRatio(a: any, b: any): number;
|
|
30
|
+
export declare function parseHex(value: any): {
|
|
31
31
|
r: number;
|
|
32
32
|
g: number;
|
|
33
33
|
b: number;
|
|
34
34
|
alpha: number;
|
|
35
35
|
} | null;
|
|
36
|
-
declare function resolveColor(value: any, tokens: any, seen?: Set<any>, depth?: number): any;
|
|
37
|
-
declare function composite(over: any, under: any): {
|
|
36
|
+
export declare function resolveColor(value: any, tokens: any, seen?: Set<any>, depth?: number): any;
|
|
37
|
+
export declare function composite(over: any, under: any): {
|
|
38
38
|
r: number;
|
|
39
39
|
g: number;
|
|
40
40
|
b: number;
|
|
41
41
|
alpha: any;
|
|
42
42
|
};
|
|
43
|
-
declare function evaluatePair(pair: any, tokens: any): any;
|
|
44
|
-
declare function evaluate(tokens: any, pairs: any): any;
|
|
45
|
-
//#endregion
|
|
46
|
-
export { composite, contrastRatio, declarations, evaluate, evaluatePair, flattenBlocks, luminance, oklchToRgb, parseBlocks, parseHex, resolveColor, rgbToOklch, stripComments, tokenMaps };
|
|
43
|
+
export declare function evaluatePair(pair: any, tokens: any): any;
|
|
44
|
+
export declare function evaluate(tokens: any, pairs: any): any;
|
|
45
|
+
//#endregion
|
|
@@ -40,20 +40,27 @@ function declarations(body) {
|
|
|
40
40
|
}
|
|
41
41
|
return properties;
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
function declaresTokens(prelude) {
|
|
44
|
+
if (prelude.startsWith("@")) return prelude.startsWith("@theme") && !prelude.includes("inline");
|
|
45
|
+
return prelude.includes("[data-skin") || /(^|[\s,(])(?::root|\.dark)(?=$|[\s,.):])/.test(prelude);
|
|
46
|
+
}
|
|
47
|
+
function themeTokenBlocks(css) {
|
|
48
|
+
return parseBlocks(stripComments(css)).flatMap((block) => {
|
|
49
|
+
if (/^@layer\b/.test(block.prelude)) return themeTokenBlocks(block.body);
|
|
50
|
+
return declaresTokens(block.prelude) ? [block] : [];
|
|
51
|
+
});
|
|
52
|
+
}
|
|
44
53
|
function modesOf(prelude) {
|
|
45
54
|
if (/\.dark\b/.test(prelude.replaceAll(/:not\([^)]*\)/g, ""))) return ["dark"];
|
|
46
55
|
if (/:not\([^)]*\.dark\b/.test(prelude)) return ["light"];
|
|
47
56
|
return ["light", "dark"];
|
|
48
57
|
}
|
|
49
|
-
/** Later source wins, so the order is Tailwind palette, core theme, skin theme, app overrides. */
|
|
50
58
|
function tokenMaps(cssSources) {
|
|
51
59
|
const maps = {
|
|
52
60
|
light: /* @__PURE__ */ new Map(),
|
|
53
61
|
dark: /* @__PURE__ */ new Map()
|
|
54
62
|
};
|
|
55
|
-
for (const css of cssSources) for (const block of
|
|
56
|
-
if (!declaresTokens(block.prelude)) continue;
|
|
63
|
+
for (const css of cssSources) for (const block of themeTokenBlocks(css)) {
|
|
57
64
|
const modes = modesOf(block.prelude);
|
|
58
65
|
for (const [name, value] of declarations(block.body)) for (const mode of modes) maps[mode].set(name, value);
|
|
59
66
|
}
|
|
@@ -162,7 +169,6 @@ function splitTopLevel(text) {
|
|
|
162
169
|
}
|
|
163
170
|
const unresolved = (reason) => ({ unresolved: reason });
|
|
164
171
|
const isUnresolved = (result) => Boolean(result?.unresolved);
|
|
165
|
-
/** `calc(<base> <op> <n>)`, `calc(<n> * var(--x))` and `calc(<base> * <n>)` — the only calc shapes the packs write. */
|
|
166
172
|
function evaluateCalc(expression, base, tokens, seen, depth) {
|
|
167
173
|
const inner = expression.slice(5, -1).trim();
|
|
168
174
|
const match = /^(\S+)\s*([+\-*])\s*(\S+)$/.exec(inner);
|
|
@@ -237,7 +243,7 @@ function literalOklch(inner, tokens, seen, depth) {
|
|
|
237
243
|
const numbers = channels.map((part, index) => literalChannel(part, index === 0));
|
|
238
244
|
if (numbers.some((number) => number === null)) return unresolved(`unsupported \`oklch(${inner})\``);
|
|
239
245
|
const alphaText = slash === -1 ? null : parts.slice(slash + 1).join(" ");
|
|
240
|
-
const alpha = alphaText === null ? 1 :
|
|
246
|
+
const alpha = alphaText === null ? 1 : alphaValue(alphaText, null, tokens, seen, depth);
|
|
241
247
|
if (alpha === null) return unresolved(`unsupported alpha in \`oklch(${inner})\``);
|
|
242
248
|
return {
|
|
243
249
|
...oklchToRgb(numbers[0], numbers[1], numbers[2]),
|
|
@@ -324,4 +330,4 @@ function evaluate(tokens, pairs) {
|
|
|
324
330
|
return pairs.map((pair) => evaluatePair(pair, tokens));
|
|
325
331
|
}
|
|
326
332
|
//#endregion
|
|
327
|
-
export { composite, contrastRatio, declarations, evaluate, evaluatePair, flattenBlocks, luminance, oklchToRgb, parseBlocks, parseHex, resolveColor, rgbToOklch, stripComments, tokenMaps };
|
|
333
|
+
export { composite, contrastRatio, declarations, evaluate, evaluatePair, flattenBlocks, luminance, oklchToRgb, parseBlocks, parseHex, resolveColor, rgbToOklch, stripComments, themeTokenBlocks, tokenMaps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ControlUiSkin, SkinAdornmentContexts, SkinAdornmentPart, SkinAdornmentScope } from "./skin.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
//#region src/skin-provider.d.ts
|
|
4
|
+
export declare function SkinProvider({ skin, children }: {
|
|
5
|
+
skin: ControlUiSkin;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
export declare function useSkin(): ControlUiSkin;
|
|
9
|
+
export declare function SkinAdornment<Scope extends SkinAdornmentScope, Part extends SkinAdornmentPart<Scope>>({ scope, part, context }: {
|
|
10
|
+
scope: Scope;
|
|
11
|
+
part: Part;
|
|
12
|
+
context: SkinAdornmentContexts[Scope][Part];
|
|
13
|
+
}): ReactNode;
|
|
14
|
+
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { skinAdornment } from "./skin.js";
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/skin-provider.tsx
|
|
6
|
+
const SkinContext = createContext({});
|
|
7
|
+
function SkinProvider({ skin, children }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(SkinContext, {
|
|
9
|
+
value: skin,
|
|
10
|
+
children
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function useSkin() {
|
|
14
|
+
return useContext(SkinContext);
|
|
15
|
+
}
|
|
16
|
+
function SkinAdornment({ scope, part, context }) {
|
|
17
|
+
const skin = useSkin();
|
|
18
|
+
return skinAdornment(skin, scope, part, context);
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { SkinAdornment, SkinProvider, useSkin };
|
package/dist/skin.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ControlTone, ControlVariant } from "./control-variants.js";
|
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
//#region src/skin.d.ts
|
|
5
5
|
type StatelessPart = Record<never, never>;
|
|
6
|
-
type SkinAdornmentContexts = {
|
|
6
|
+
export type SkinAdornmentContexts = {
|
|
7
7
|
button: {
|
|
8
8
|
layer: {
|
|
9
9
|
variant: ControlVariant;
|
|
@@ -13,9 +13,6 @@ type SkinAdornmentContexts = {
|
|
|
13
13
|
"chat-layout": {
|
|
14
14
|
titlebar: StatelessPart;
|
|
15
15
|
};
|
|
16
|
-
"chat-thought": {
|
|
17
|
-
details: StatelessPart;
|
|
18
|
-
};
|
|
19
16
|
dialog: {
|
|
20
17
|
titlebar: StatelessPart;
|
|
21
18
|
};
|
|
@@ -25,47 +22,31 @@ type SkinAdornmentContexts = {
|
|
|
25
22
|
};
|
|
26
23
|
};
|
|
27
24
|
};
|
|
28
|
-
type SkinAdornmentScope = keyof SkinAdornmentContexts;
|
|
29
|
-
type SkinAdornmentPart<Scope extends SkinAdornmentScope> = keyof SkinAdornmentContexts[Scope];
|
|
25
|
+
export type SkinAdornmentScope = keyof SkinAdornmentContexts;
|
|
26
|
+
export type SkinAdornmentPart<Scope extends SkinAdornmentScope> = keyof SkinAdornmentContexts[Scope];
|
|
30
27
|
type AdornmentEntry<Ctx> = ReactNode | ((ctx: Ctx) => ReactNode);
|
|
31
|
-
type SkinIndicators = {
|
|
28
|
+
export type SkinIndicators = {
|
|
32
29
|
sidebar?: SelectionIndicator | HoverIndicator;
|
|
33
30
|
tree?: SelectionIndicator;
|
|
34
31
|
"button-group"?: HoverIndicator;
|
|
35
32
|
"toggle-group"?: HoverIndicator;
|
|
36
33
|
"checkbox-group"?: HoverIndicator;
|
|
37
34
|
};
|
|
38
|
-
type ControlUiSkin = {
|
|
39
|
-
|
|
40
|
-
id: string;
|
|
41
|
-
/** Stamps data-motion="reduced", collapsing --duration-* to 0ms. Never `animation:none` — ripple cleanup still needs `animationend` to fire. */
|
|
35
|
+
export type ControlUiSkin = {
|
|
36
|
+
id?: string;
|
|
42
37
|
motion?: "reduced";
|
|
43
|
-
/** Locks skin to one scheme; page's .dark class must then follow it, since Shiki, native color-scheme, and dark: utilities key off .dark, not skin tokens. Undefined = adaptive, both blocks authored. */
|
|
44
38
|
colorScheme?: "light" | "dark";
|
|
45
|
-
/** Geometry, not slot restyle — padding, gap, rounding, and shadow across sidebar gap/container/inner. explicit `variant` prop wins; undefined keeps "sidebar". */
|
|
46
39
|
sidebarLayout?: SidebarLayout;
|
|
40
|
+
scrollAreaBlur?: boolean;
|
|
47
41
|
indicators?: SkinIndicators;
|
|
48
|
-
/** Any CSS length. Seeds --sidebar-width; caller's own value still wins. Undefined keeps shadcn's 16rem. */
|
|
49
42
|
sidebarWidth?: string;
|
|
50
|
-
/** effects.css keys off data-effects ancestor attribute. top-shine is CSS-only; ripple needs runtime's document pointer listener. */
|
|
51
43
|
effects?: ControlEffect[];
|
|
52
44
|
adornments?: { [Scope in SkinAdornmentScope]?: { [Part in SkinAdornmentPart<Scope>]?: AdornmentEntry<SkinAdornmentContexts[Scope][Part]>; }; };
|
|
53
45
|
};
|
|
54
|
-
type SidebarLayout = "sidebar" | "floating" | "inset";
|
|
55
|
-
type ControlEffect = "top-shine" | "ripple" | "hover-circle";
|
|
56
|
-
type ControlEffectValue = ControlEffect | ControlEffect[];
|
|
57
|
-
declare function controlEffectsAttribute(effects?: ControlEffectValue): string | undefined;
|
|
58
|
-
|
|
59
|
-
declare function
|
|
60
|
-
|
|
61
|
-
/** Sidebar falls back: variant prop → this → "sidebar". */
|
|
62
|
-
declare function skinSidebarLayout(): SidebarLayout | undefined;
|
|
63
|
-
declare function skinIndicator<Component extends keyof SkinIndicators>(component: Component): SkinIndicators[Component];
|
|
64
|
-
/** SidebarProvider seeds --sidebar-width from this; caller-provided value still wins. */
|
|
65
|
-
declare function skinSidebarWidth(): string | undefined;
|
|
66
|
-
/** Portals stamp result next to data-skin; ControlEffectsRuntime mirrors it on <html>. */
|
|
67
|
-
declare function skinEffects(): string | undefined;
|
|
68
|
-
declare function skinAdornment<Scope extends SkinAdornmentScope, Part extends SkinAdornmentPart<Scope>>(scope: Scope, part: Part, ctx: SkinAdornmentContexts[Scope][Part]): ReactNode | undefined;
|
|
69
|
-
declare function hasSkinAdornment<Scope extends SkinAdornmentScope, Part extends SkinAdornmentPart<Scope>>(scope: Scope, part: Part): boolean;
|
|
70
|
-
//#endregion
|
|
71
|
-
export { ControlEffect, ControlEffectValue, ControlUiSkin, SidebarLayout, SkinAdornmentContexts, SkinAdornmentPart, SkinAdornmentScope, SkinIndicators, activeSkin, controlEffectsAttribute, hasSkinAdornment, skinAdornment, skinEffects, skinId, skinIndicator, skinSidebarLayout, skinSidebarWidth };
|
|
46
|
+
export type SidebarLayout = "sidebar" | "floating" | "inset" | "page";
|
|
47
|
+
export type ControlEffect = "top-shine" | "ripple" | "hover-circle";
|
|
48
|
+
export type ControlEffectValue = ControlEffect | ControlEffect[];
|
|
49
|
+
export declare function controlEffectsAttribute(effects?: ControlEffectValue): string | undefined;
|
|
50
|
+
export declare function skinAdornment<Scope extends SkinAdornmentScope, Part extends SkinAdornmentPart<Scope>>(skin: ControlUiSkin, scope: Scope, part: Part, ctx: SkinAdornmentContexts[Scope][Part]): ReactNode | undefined;
|
|
51
|
+
export declare function hasSkinAdornment<Scope extends SkinAdornmentScope, Part extends SkinAdornmentPart<Scope>>(skin: ControlUiSkin, scope: Scope, part: Part): boolean;
|
|
52
|
+
//#endregion
|
package/dist/skin.js
CHANGED
|
@@ -1,61 +1,18 @@
|
|
|
1
|
-
import { skin } from "./skin.config.js";
|
|
2
1
|
//#region src/skin.ts
|
|
3
2
|
function controlEffectsAttribute(effects) {
|
|
4
3
|
if (!effects) return void 0;
|
|
5
4
|
const value = (Array.isArray(effects) ? effects : [effects]).join(" ");
|
|
6
5
|
return value.length > 0 ? value : void 0;
|
|
7
6
|
}
|
|
8
|
-
/** Read at render time so getter-based configs stay live. Portals stamp it on their positioner, which lands outside any token-scoped ancestor. */
|
|
9
|
-
function activeSkin() {
|
|
10
|
-
return skin;
|
|
11
|
-
}
|
|
12
|
-
const verifiedSkinIds = /* @__PURE__ */ new Set();
|
|
13
|
-
function skinScopeProblem(id) {
|
|
14
|
-
const boundary = document.querySelector(`[data-skin="${id}"]`);
|
|
15
|
-
if (!boundary) return `Control UI: skin.config id is "${id}" but no element carries data-skin="${id}" (root has ${JSON.stringify(document.documentElement.dataset.skin ?? null)}); every token is undeclared until they match.`;
|
|
16
|
-
if (getComputedStyle(boundary).getPropertyValue("--background").trim()) return void 0;
|
|
17
|
-
return `Control UI: skin-theme.css declares no tokens for data-skin="${id}"; check the CSS entry imports (../components/control-ui/styles/skin-theme.css) or run scripts/control-ui-doctor.mjs.`;
|
|
18
|
-
}
|
|
19
|
-
function verifySkinScope(id) {
|
|
20
|
-
if (process.env.NODE_ENV === "production" || typeof document === "undefined" || verifiedSkinIds.has(id)) return;
|
|
21
|
-
verifiedSkinIds.add(id);
|
|
22
|
-
setTimeout(() => {
|
|
23
|
-
if (skin.id !== id) {
|
|
24
|
-
verifiedSkinIds.delete(id);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const problem = skinScopeProblem(id);
|
|
28
|
-
if (problem) console.error(problem);
|
|
29
|
-
}, 0);
|
|
30
|
-
}
|
|
31
|
-
function skinId() {
|
|
32
|
-
verifySkinScope(skin.id);
|
|
33
|
-
return skin.id;
|
|
34
|
-
}
|
|
35
|
-
/** Sidebar falls back: variant prop → this → "sidebar". */
|
|
36
|
-
function skinSidebarLayout() {
|
|
37
|
-
return skin.sidebarLayout;
|
|
38
|
-
}
|
|
39
|
-
function skinIndicator(component) {
|
|
40
|
-
return skin.indicators?.[component];
|
|
41
|
-
}
|
|
42
|
-
/** SidebarProvider seeds --sidebar-width from this; caller-provided value still wins. */
|
|
43
|
-
function skinSidebarWidth() {
|
|
44
|
-
return skin.sidebarWidth;
|
|
45
|
-
}
|
|
46
|
-
/** Portals stamp result next to data-skin; ControlEffectsRuntime mirrors it on <html>. */
|
|
47
|
-
function skinEffects() {
|
|
48
|
-
return controlEffectsAttribute(skin.effects);
|
|
49
|
-
}
|
|
50
7
|
function resolveAdornment(entry, ctx) {
|
|
51
8
|
if (entry === void 0) return void 0;
|
|
52
9
|
return typeof entry === "function" ? entry(ctx) : entry;
|
|
53
10
|
}
|
|
54
|
-
function skinAdornment(scope, part, ctx) {
|
|
11
|
+
function skinAdornment(skin, scope, part, ctx) {
|
|
55
12
|
return resolveAdornment(skin.adornments?.[scope]?.[part], ctx);
|
|
56
13
|
}
|
|
57
|
-
function hasSkinAdornment(scope, part) {
|
|
14
|
+
function hasSkinAdornment(skin, scope, part) {
|
|
58
15
|
return skin.adornments?.[scope]?.[part] !== void 0;
|
|
59
16
|
}
|
|
60
17
|
//#endregion
|
|
61
|
-
export {
|
|
18
|
+
export { controlEffectsAttribute, hasSkinAdornment, skinAdornment };
|
package/dist/source-badge.d.ts
CHANGED
|
@@ -3,21 +3,20 @@ import { SourceBadgeKnobStyle } from "./knob-contracts/source-badge-knobs.js";
|
|
|
3
3
|
import { Avatar, AvatarFallback, AvatarImage } from "./ui/avatar.js";
|
|
4
4
|
import { CSSProperties, ComponentProps } from "react";
|
|
5
5
|
//#region src/source-badge.d.ts
|
|
6
|
-
type SourceBadgeProps = Omit<ComponentProps<"a">, "href" | "style"> & {
|
|
6
|
+
export type SourceBadgeProps = Omit<ComponentProps<"a">, "href" | "style"> & {
|
|
7
7
|
faviconSrc?: string | false;
|
|
8
8
|
href: string;
|
|
9
9
|
style?: CSSProperties & SourceBadgeKnobStyle & BadgeKnobStyle;
|
|
10
10
|
};
|
|
11
|
-
declare function sourceHostname(href: string): string;
|
|
12
|
-
declare function sourceFaviconHref(href: string): string | undefined;
|
|
13
|
-
type SourceFaviconProps = Omit<ComponentProps<typeof Avatar>, "children" | "style"> & {
|
|
11
|
+
export declare function sourceHostname(href: string): string;
|
|
12
|
+
export declare function sourceFaviconHref(href: string): string | undefined;
|
|
13
|
+
export type SourceFaviconProps = Omit<ComponentProps<typeof Avatar>, "children" | "style"> & {
|
|
14
14
|
faviconSrc?: string | false;
|
|
15
15
|
href: string;
|
|
16
16
|
imageProps?: Omit<ComponentProps<typeof AvatarImage>, "src">;
|
|
17
17
|
fallbackProps?: ComponentProps<typeof AvatarFallback>;
|
|
18
18
|
style?: CSSProperties & SourceBadgeKnobStyle;
|
|
19
19
|
};
|
|
20
|
-
declare function SourceFavicon({ faviconSrc, href, imageProps, fallbackProps, className, ...props }: SourceFaviconProps): import("react").JSX.Element;
|
|
21
|
-
declare function SourceBadge({ faviconSrc, href, children, className, rel, target, ...props }: SourceBadgeProps): import("react").JSX.Element;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { SourceBadge, SourceBadgeProps, SourceFavicon, SourceFaviconProps, sourceFaviconHref, sourceHostname };
|
|
20
|
+
export declare function SourceFavicon({ faviconSrc, href, imageProps, fallbackProps, className, ...props }: SourceFaviconProps): import("react").JSX.Element;
|
|
21
|
+
export declare function SourceBadge({ faviconSrc, href, children, className, rel, target, ...props }: SourceBadgeProps): import("react").JSX.Element;
|
|
22
|
+
//#endregion
|
package/dist/styles/index.css
CHANGED
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
@import "./recipes/chat-message.css";
|
|
27
27
|
@import "./recipes/chat-composer.css";
|
|
28
28
|
@import "./chat-composer-editor.css";
|
|
29
|
+
@import "./recipes/spinner.css";
|
|
29
30
|
@import "./recipes/chat-composer-attachment.css";
|
|
30
31
|
@import "./recipes/choice.css";
|
|
31
32
|
@import "./code.css";
|
|
32
33
|
@import "./recipes/code.css";
|
|
33
|
-
@import "./recipes/code-block-editor.css";
|
|
34
34
|
@import "./recipes/code-diff.css";
|
|
35
35
|
@import "./recipes/sidebar.css";
|
|
36
36
|
@import "./recipes/sidebar-menu.css";
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
@import "./recipes/phone-input.css";
|
|
64
64
|
@import "./recipes/rich-tooltip.css";
|
|
65
65
|
@import "./recipes/skeleton.css";
|
|
66
|
-
@import "./recipes/spinner.css";
|
|
67
66
|
@import "./recipes/stepper.css";
|
|
68
67
|
@import "./recipes/switch.css";
|
|
69
68
|
@import "./recipes/table.css";
|
|
@@ -79,5 +78,3 @@
|
|
|
79
78
|
@import "./type-scale.css";
|
|
80
79
|
@import "./recipes/user-ask.css";
|
|
81
80
|
@import "./recipes/user-ask-details.css";
|
|
82
|
-
@import "./skin-theme.css";
|
|
83
|
-
@import "./skin.css";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
:where([data-control-family="accordion"][data-slot="root"]) {
|
|
3
3
|
--cui-accordion-item-border-color: var(--border);
|
|
4
|
+
--cui-accordion-item-border-width: 1px;
|
|
4
5
|
--cui-accordion-trigger-foreground: var(--foreground);
|
|
5
6
|
--cui-accordion-trigger-hover-foreground: oklch(from var(--foreground) l c h / 0.8);
|
|
6
7
|
--cui-accordion-icon-foreground: var(--muted-foreground);
|
|
7
8
|
}
|
|
8
9
|
:where([data-control-family="accordion"][data-slot="item"]) {
|
|
9
|
-
border-block-end:
|
|
10
|
+
border-block-end: var(--cui-accordion-item-border-width) solid var(--cui-accordion-item-border-color);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
:where([data-control-family="accordion"][data-slot="item"]:last-child) {
|
|
@@ -19,7 +20,6 @@
|
|
|
19
20
|
color: var(--cui-accordion-trigger-foreground);
|
|
20
21
|
font-size: var(--text-body);
|
|
21
22
|
outline: none;
|
|
22
|
-
transition: color var(--duration-fast) var(--ease-standard);
|
|
23
23
|
text-align: left;
|
|
24
24
|
font-weight: var(--font-weight-medium);
|
|
25
25
|
}
|
|
@@ -68,6 +68,12 @@
|
|
|
68
68
|
initial-value: transparent;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
@property --cui-accordion-item-border-width {
|
|
72
|
+
syntax: "<length>";
|
|
73
|
+
inherits: true;
|
|
74
|
+
initial-value: 0px;
|
|
75
|
+
}
|
|
76
|
+
|
|
71
77
|
@property --cui-accordion-trigger-foreground {
|
|
72
78
|
syntax: "<color>";
|
|
73
79
|
inherits: true;
|
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
margin-block-start: calc(var(--spacing) * 1);
|
|
4
4
|
min-block-size: calc(var(--spacing) * 8);
|
|
5
5
|
gap: calc(var(--spacing) * 1);
|
|
6
|
-
opacity:
|
|
7
|
-
transition: opacity var(--duration-base) var(--ease-standard);
|
|
6
|
+
opacity: 1;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
@media (hover: hover) {
|
|
10
|
+
:where([data-control-family="chat-layout"][data-slot="turn"] [data-control-family="action-bar"][data-slot="root"]) {
|
|
11
|
+
opacity: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
11
14
|
:where([data-control-family="chat-layout"][data-slot="turn"]:hover [data-control-family="action-bar"][data-slot="root"]) {
|
|
12
15
|
opacity: 1;
|
|
13
16
|
}
|
|
@@ -4,33 +4,45 @@
|
|
|
4
4
|
--cui-alert-background: var(--card);
|
|
5
5
|
--cui-alert-border-color: var(--border);
|
|
6
6
|
--cui-alert-shadow: none;
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
|
|
10
|
-
padding: calc(var(--spacing) * 3)
|
|
11
|
-
|
|
7
|
+
--cui-alert-foreground: var(--card-foreground);
|
|
8
|
+
--cui-alert-description-foreground: var(--muted-foreground);
|
|
9
|
+
--cui-alert-border-width: 1px;
|
|
10
|
+
--cui-alert-padding: calc(var(--spacing) * 3);
|
|
11
|
+
--cui-alert-padding-inline: calc(var(--spacing) * 4);
|
|
12
|
+
--cui-alert-gap: calc(var(--spacing) * 0.5);
|
|
13
|
+
--cui-alert-icon-gap: calc(var(--spacing) * 3);
|
|
14
|
+
--cui-alert-icon-size: calc(var(--spacing) * 4);
|
|
15
|
+
--cui-alert-font-size: var(--text-sm);
|
|
16
|
+
--cui-alert-title-font-weight: var(--font-weight-medium);
|
|
17
|
+
--cui-alert-description-gap: var(--spacing);
|
|
18
|
+
grid-template-columns: 0 minmax(0, 1fr);
|
|
19
|
+
row-gap: var(--cui-alert-gap);
|
|
20
|
+
padding: var(--cui-alert-padding) var(--cui-alert-padding-inline);
|
|
21
|
+
border: var(--cui-alert-border-width) solid var(--cui-alert-border-color);
|
|
12
22
|
border-radius: var(--cui-alert-radius);
|
|
13
23
|
background: var(--cui-alert-background);
|
|
14
24
|
box-shadow: var(--cui-alert-shadow);
|
|
15
|
-
color: var(--
|
|
16
|
-
font-size: var(--
|
|
25
|
+
color: var(--cui-alert-foreground);
|
|
26
|
+
font-size: var(--cui-alert-font-size);
|
|
17
27
|
line-height: var(--text-sm--line-height);
|
|
28
|
+
overflow-wrap: anywhere;
|
|
18
29
|
}
|
|
19
30
|
|
|
20
31
|
:where([data-control-family="alert"][data-slot="root"][data-variant="destructive"]) {
|
|
21
|
-
--
|
|
32
|
+
--cui-alert-foreground: var(--destructive-text);
|
|
22
33
|
--cui-alert-border-color: oklch(from var(--destructive) l c h / 0.5);
|
|
23
|
-
--
|
|
34
|
+
--cui-alert-description-foreground: oklch(from var(--destructive-text) l c h / 0.9);
|
|
24
35
|
}
|
|
25
36
|
|
|
26
37
|
:where([data-control-family="alert"][data-slot="root"]:has(> svg)) {
|
|
27
|
-
|
|
38
|
+
grid-template-columns: var(--cui-alert-icon-size) minmax(0, 1fr);
|
|
39
|
+
column-gap: var(--cui-alert-icon-gap);
|
|
28
40
|
}
|
|
29
41
|
|
|
30
42
|
:where([data-control-family="alert"][data-slot="description"]) {
|
|
31
|
-
gap:
|
|
32
|
-
color: var(--
|
|
33
|
-
font-size: var(--
|
|
43
|
+
gap: var(--cui-alert-description-gap);
|
|
44
|
+
color: var(--cui-alert-description-foreground);
|
|
45
|
+
font-size: var(--cui-alert-font-size);
|
|
34
46
|
line-height: var(--text-sm--line-height);
|
|
35
47
|
}
|
|
36
48
|
|
|
@@ -39,14 +51,15 @@
|
|
|
39
51
|
}
|
|
40
52
|
|
|
41
53
|
:where([data-control-family="alert"][data-slot="title"]) {
|
|
42
|
-
|
|
43
|
-
font-weight: var(--font-weight-medium);
|
|
54
|
+
font-weight: var(--cui-alert-title-font-weight);
|
|
44
55
|
letter-spacing: var(--tracking-tight);
|
|
45
56
|
}
|
|
46
57
|
|
|
47
58
|
:where([data-control-family="alert"][data-slot="root"] > svg) {
|
|
48
59
|
color: currentcolor;
|
|
49
|
-
|
|
60
|
+
inline-size: var(--cui-alert-icon-size);
|
|
61
|
+
block-size: var(--cui-alert-icon-size);
|
|
62
|
+
margin-block-start: max(0px, calc((1lh - var(--cui-alert-icon-size)) / 2));
|
|
50
63
|
}
|
|
51
64
|
}
|
|
52
65
|
|
|
@@ -73,3 +86,69 @@
|
|
|
73
86
|
inherits: true;
|
|
74
87
|
initial-value: none;
|
|
75
88
|
}
|
|
89
|
+
|
|
90
|
+
@property --cui-alert-foreground {
|
|
91
|
+
syntax: "<color>";
|
|
92
|
+
inherits: true;
|
|
93
|
+
initial-value: transparent;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@property --cui-alert-description-foreground {
|
|
97
|
+
syntax: "<color>";
|
|
98
|
+
inherits: true;
|
|
99
|
+
initial-value: transparent;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@property --cui-alert-border-width {
|
|
103
|
+
syntax: "<length>";
|
|
104
|
+
inherits: true;
|
|
105
|
+
initial-value: 0px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@property --cui-alert-padding {
|
|
109
|
+
syntax: "<length>";
|
|
110
|
+
inherits: true;
|
|
111
|
+
initial-value: 0px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@property --cui-alert-padding-inline {
|
|
115
|
+
syntax: "<length>";
|
|
116
|
+
inherits: true;
|
|
117
|
+
initial-value: 0px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@property --cui-alert-gap {
|
|
121
|
+
syntax: "<length>";
|
|
122
|
+
inherits: true;
|
|
123
|
+
initial-value: 0px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@property --cui-alert-icon-gap {
|
|
127
|
+
syntax: "<length>";
|
|
128
|
+
inherits: true;
|
|
129
|
+
initial-value: 0px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@property --cui-alert-icon-size {
|
|
133
|
+
syntax: "<length>";
|
|
134
|
+
inherits: true;
|
|
135
|
+
initial-value: 0px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@property --cui-alert-font-size {
|
|
139
|
+
syntax: "<length>";
|
|
140
|
+
inherits: true;
|
|
141
|
+
initial-value: 0px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@property --cui-alert-description-gap {
|
|
145
|
+
syntax: "<length>";
|
|
146
|
+
inherits: true;
|
|
147
|
+
initial-value: 0px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@property --cui-alert-title-font-weight {
|
|
151
|
+
syntax: "<number>";
|
|
152
|
+
inherits: true;
|
|
153
|
+
initial-value: 500;
|
|
154
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
:where([data-control-family="avatar"][data-slot="root"]) {
|
|
3
|
+
--cui-avatar-image-outline-color: oklch(from var(--foreground) l c h / 0.1);
|
|
3
4
|
inline-size: calc(var(--spacing) * 9);
|
|
4
5
|
block-size: calc(var(--spacing) * 9);
|
|
5
6
|
}
|
|
@@ -14,12 +15,21 @@
|
|
|
14
15
|
border-radius: var(--cui-avatar-radius);
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
:where([data-control-family="avatar"][data-slot="root"])::after {
|
|
19
|
+
content: "";
|
|
20
|
+
position: absolute;
|
|
21
|
+
inset: 0;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
border-radius: inherit;
|
|
24
|
+
box-shadow: inset 0 0 0 1px var(--cui-avatar-image-outline-color);
|
|
25
|
+
}
|
|
26
|
+
|
|
17
27
|
:where([data-control-family="avatar"][data-slot="group"] > [data-control-family="avatar"]) {
|
|
18
28
|
box-shadow: 0 0 0 2px var(--cui-avatar-group-ring-color);
|
|
19
29
|
}
|
|
20
30
|
|
|
21
31
|
:where([data-control-family="avatar"][data-slot="fallback"]) {
|
|
22
|
-
border-radius:
|
|
32
|
+
border-radius: inherit;
|
|
23
33
|
background: var(--cui-avatar-fallback-background);
|
|
24
34
|
color: var(--cui-avatar-fallback-foreground);
|
|
25
35
|
font-size: var(--text-caption);
|
|
@@ -50,3 +60,9 @@
|
|
|
50
60
|
inherits: true;
|
|
51
61
|
initial-value: transparent;
|
|
52
62
|
}
|
|
63
|
+
|
|
64
|
+
@property --cui-avatar-image-outline-color {
|
|
65
|
+
syntax: "<color>";
|
|
66
|
+
inherits: true;
|
|
67
|
+
initial-value: transparent;
|
|
68
|
+
}
|