@ctrl-ui/react 0.8.10 → 0.8.11
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/dist/knob-contracts/emoji-picker-knobs.d.ts +1 -1
- package/dist/knob-contracts/emoji-picker-knobs.js +1 -0
- package/dist/knob-contracts/icon-picker-knobs.d.ts +4 -0
- package/dist/knob-contracts/icon-picker-knobs.js +9 -0
- package/dist/knob-contracts/markdown-knobs.d.ts +1 -1
- package/dist/knob-contracts/markdown-knobs.js +3 -1
- package/dist/skin.d.ts +2 -0
- package/dist/styles/index.css +2 -1
- package/dist/styles/recipes/accordion.css +13 -1
- package/dist/styles/recipes/collapsible.css +15 -0
- package/dist/styles/recipes/emoji-picker.css +84 -1
- package/dist/styles/recipes/icon-picker.css +101 -0
- package/dist/styles/recipes/markdown.css +66 -0
- package/dist/styles/recipes/popup-motion.css +10 -0
- package/dist/styles/recipes/scroll-area.css +53 -27
- package/dist/styles/recipes/tabs.css +104 -0
- package/dist/styles/recipes/tree.css +13 -1
- package/dist/ui/collapsible.js +0 -1
- package/dist/ui/emoji-icon-picker.d.ts +13 -0
- package/dist/ui/emoji-icon-picker.js +50 -0
- package/dist/ui/emoji-picker.d.ts +14 -3
- package/dist/ui/emoji-picker.js +194 -15
- package/dist/ui/icon-picker.d.ts +35 -0
- package/dist/ui/icon-picker.js +140 -0
- package/dist/ui/markdown-elements.js +6 -10
- package/dist/ui/markdown.d.ts +6 -5
- package/dist/ui/markdown.js +12 -4
- package/dist/ui/popover.d.ts +3 -0
- package/dist/ui/popover.js +36 -1
- package/dist/ui/scroll-area.d.ts +4 -1
- package/dist/ui/scroll-area.js +21 -6
- package/dist/ui/tabs.js +58 -22
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/emoji-picker-knobs.d.ts
|
|
2
|
-
export declare const emojiPickerKnobs: readonly ["--cui-emoji-picker-cell-size", "--cui-emoji-picker-cell-radius", "--cui-emoji-picker-active-background", "--cui-emoji-picker-header-background", "--cui-emoji-picker-header-foreground"];
|
|
2
|
+
export declare const emojiPickerKnobs: readonly ["--cui-emoji-picker-cell-size", "--cui-emoji-picker-height", "--cui-emoji-picker-cell-radius", "--cui-emoji-picker-active-background", "--cui-emoji-picker-header-background", "--cui-emoji-picker-header-foreground"];
|
|
3
3
|
export type EmojiPickerKnobStyle = Partial<Record<(typeof emojiPickerKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/knob-contracts/icon-picker-knobs.d.ts
|
|
2
|
+
export declare const iconPickerKnobs: readonly ["--cui-icon-picker-cell-size", "--cui-icon-picker-cell-radius", "--cui-icon-picker-foreground", "--cui-icon-picker-active-background"];
|
|
3
|
+
export type IconPickerKnobStyle = Partial<Record<(typeof iconPickerKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/knob-contracts/icon-picker-knobs.ts
|
|
2
|
+
const iconPickerKnobs = [
|
|
3
|
+
"--cui-icon-picker-cell-size",
|
|
4
|
+
"--cui-icon-picker-cell-radius",
|
|
5
|
+
"--cui-icon-picker-foreground",
|
|
6
|
+
"--cui-icon-picker-active-background"
|
|
7
|
+
];
|
|
8
|
+
//#endregion
|
|
9
|
+
export { iconPickerKnobs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/markdown-knobs.d.ts
|
|
2
|
-
export declare const markdownKnobs: readonly ["--cui-markdown-foreground", "--cui-markdown-blockquote-border-color", "--cui-markdown-blockquote-foreground", "--cui-markdown-inline-code-background", "--cui-markdown-inline-code-foreground", "--cui-markdown-inline-code-radius", "--cui-markdown-link-foreground", "--cui-markdown-image-outline-color", "--cui-markdown-table-cell-border-color", "--cui-markdown-table-header-background", "--cui-markdown-font-size", "--cui-markdown-line-height"];
|
|
2
|
+
export declare const markdownKnobs: readonly ["--cui-markdown-foreground", "--cui-markdown-blockquote-border-color", "--cui-markdown-blockquote-foreground", "--cui-markdown-inline-code-background", "--cui-markdown-inline-code-foreground", "--cui-markdown-inline-code-radius", "--cui-markdown-link-foreground", "--cui-markdown-image-outline-color", "--cui-markdown-table-cell-border-color", "--cui-markdown-table-header-background", "--cui-markdown-font-size", "--cui-markdown-line-height", "--cui-markdown-flow-gap", "--cui-markdown-heading-gap"];
|
|
3
3
|
export type MarkdownKnobStyle = Partial<Record<(typeof markdownKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -11,7 +11,9 @@ const markdownKnobs = [
|
|
|
11
11
|
"--cui-markdown-table-cell-border-color",
|
|
12
12
|
"--cui-markdown-table-header-background",
|
|
13
13
|
"--cui-markdown-font-size",
|
|
14
|
-
"--cui-markdown-line-height"
|
|
14
|
+
"--cui-markdown-line-height",
|
|
15
|
+
"--cui-markdown-flow-gap",
|
|
16
|
+
"--cui-markdown-heading-gap"
|
|
15
17
|
];
|
|
16
18
|
//#endregion
|
|
17
19
|
export { markdownKnobs };
|
package/dist/skin.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export type ControlUiSkin = {
|
|
|
38
38
|
colorScheme?: "light" | "dark";
|
|
39
39
|
sidebarLayout?: SidebarLayout;
|
|
40
40
|
scrollAreaBlur?: boolean;
|
|
41
|
+
scrollAreaScrollbarVisibility?: "scroll" | "hover" | "always";
|
|
42
|
+
scrollAreaScrollbarGutter?: "auto" | "stable";
|
|
41
43
|
indicators?: SkinIndicators;
|
|
42
44
|
sidebarWidth?: string;
|
|
43
45
|
effects?: ControlEffect[];
|
package/dist/styles/index.css
CHANGED
|
@@ -58,6 +58,8 @@
|
|
|
58
58
|
@import "./recipes/dynamic-notification-input.css";
|
|
59
59
|
@import "./recipes/dynamic-notification-motion.css";
|
|
60
60
|
@import "./recipes/emoji-picker.css";
|
|
61
|
+
@import "./recipes/icon-picker.css";
|
|
62
|
+
@import "./recipes/tabs.css";
|
|
61
63
|
@import "./recipes/environment-variables.css";
|
|
62
64
|
@import "./recipes/filter-bar.css";
|
|
63
65
|
@import "./recipes/gradient-editor.css";
|
|
@@ -76,7 +78,6 @@
|
|
|
76
78
|
@import "./recipes/switch.css";
|
|
77
79
|
@import "./recipes/table.css";
|
|
78
80
|
@import "./recipes/table-of-contents.css";
|
|
79
|
-
@import "./recipes/tabs.css";
|
|
80
81
|
@import "./recipes/task-list.css";
|
|
81
82
|
@import "./recipes/thread-rail.css";
|
|
82
83
|
@import "./recipes/timeline.css";
|
|
@@ -55,13 +55,25 @@
|
|
|
55
55
|
font-size: var(--text-body);
|
|
56
56
|
text-wrap: pretty;
|
|
57
57
|
height: var(--accordion-panel-height);
|
|
58
|
-
overflow: hidden;
|
|
59
58
|
transition: height var(--duration-base) var(--ease-emphasized);
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
:where([data-control-family="accordion"][data-slot="panel"][data-starting-style]),
|
|
63
62
|
:where([data-control-family="accordion"][data-slot="panel"][data-ending-style]) {
|
|
64
63
|
height: 0;
|
|
64
|
+
overflow: clip;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@supports (transition-behavior: allow-discrete) {
|
|
68
|
+
:where([data-control-family="accordion"][data-slot="panel"]) {
|
|
69
|
+
transition-property: height, overflow;
|
|
70
|
+
transition-timing-function: var(--ease-emphasized), step-end;
|
|
71
|
+
transition-behavior: normal, allow-discrete;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:where([data-control-family="accordion"][data-slot="panel"][data-ending-style]) {
|
|
75
|
+
transition-timing-function: var(--ease-emphasized), step-start;
|
|
76
|
+
}
|
|
65
77
|
}
|
|
66
78
|
}
|
|
67
79
|
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
:where([data-control-family="collapsible"][data-slot="content"]) {
|
|
41
|
+
height: var(--collapsible-panel-height);
|
|
41
42
|
transition-property: height, opacity;
|
|
42
43
|
transition-duration: var(--duration-slow);
|
|
43
44
|
transition-timing-function: var(--ease-standard);
|
|
@@ -45,9 +46,23 @@
|
|
|
45
46
|
|
|
46
47
|
:where([data-control-family="collapsible"][data-slot="content"][data-starting-style]),
|
|
47
48
|
:where([data-control-family="collapsible"][data-slot="content"][data-ending-style]) {
|
|
49
|
+
height: 0;
|
|
50
|
+
overflow: clip;
|
|
48
51
|
opacity: 0;
|
|
49
52
|
}
|
|
50
53
|
|
|
54
|
+
@supports (transition-behavior: allow-discrete) {
|
|
55
|
+
:where([data-control-family="collapsible"][data-slot="content"]) {
|
|
56
|
+
transition-property: height, opacity, overflow;
|
|
57
|
+
transition-timing-function: var(--ease-standard), var(--ease-standard), step-end;
|
|
58
|
+
transition-behavior: normal, normal, allow-discrete;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:where([data-control-family="collapsible"][data-slot="content"][data-ending-style]) {
|
|
62
|
+
transition-timing-function: var(--ease-standard), var(--ease-standard), step-start;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
51
66
|
:where([data-control-family="collapsible"][data-slot="trigger"][data-state="open"] > svg) {
|
|
52
67
|
rotate: 90deg;
|
|
53
68
|
}
|
|
@@ -1,14 +1,78 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
:where([data-control-family="emoji-picker"][data-slot="root"]) {
|
|
3
|
-
--cui-emoji-picker-cell-size: calc(var(--spacing) *
|
|
3
|
+
--cui-emoji-picker-cell-size: calc(var(--spacing) * 10);
|
|
4
4
|
--cui-emoji-picker-cell-radius: var(--radius-control);
|
|
5
5
|
--cui-emoji-picker-active-background: var(--accent);
|
|
6
6
|
--cui-emoji-picker-header-background: var(--popover);
|
|
7
7
|
--cui-emoji-picker-header-foreground: var(--muted-foreground);
|
|
8
|
+
--cui-emoji-picker-height: 22rem;
|
|
9
|
+
}
|
|
10
|
+
:where([data-control-family="emoji-picker"][data-slot="root"]:not([data-variant="reactions"])) {
|
|
11
|
+
inline-size: calc(var(--_emoji-picker-columns) * var(--cui-emoji-picker-cell-size) + var(--spacing) * 4);
|
|
12
|
+
max-inline-size: 100%;
|
|
13
|
+
block-size: var(--cui-emoji-picker-height);
|
|
8
14
|
color: var(--foreground);
|
|
9
15
|
font-family: var(--font-sans);
|
|
10
16
|
}
|
|
11
17
|
|
|
18
|
+
:where([data-control-family="emoji-picker"][data-slot="categories"]) {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
flex-shrink: 0;
|
|
22
|
+
overflow-x: auto;
|
|
23
|
+
padding-inline: calc(var(--spacing) * 1.5);
|
|
24
|
+
}
|
|
25
|
+
:where([data-control-family="emoji-picker"][data-slot="category"]) {
|
|
26
|
+
display: grid;
|
|
27
|
+
place-items: center;
|
|
28
|
+
flex: 0 0 calc(var(--spacing) * 9);
|
|
29
|
+
block-size: calc(var(--spacing) * 9);
|
|
30
|
+
border-radius: var(--cui-emoji-picker-cell-radius);
|
|
31
|
+
color: var(--muted-foreground);
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
:where([data-control-family="emoji-picker"][data-slot="category"]:hover) {
|
|
35
|
+
color: var(--foreground);
|
|
36
|
+
background: var(--cui-emoji-picker-active-background);
|
|
37
|
+
}
|
|
38
|
+
:where([data-control-family="emoji-picker"][data-slot="category"] svg) {
|
|
39
|
+
inline-size: calc(var(--spacing) * 4);
|
|
40
|
+
block-size: calc(var(--spacing) * 4);
|
|
41
|
+
}
|
|
42
|
+
:where([data-control-family="emoji-picker"][data-slot="recent"]) {
|
|
43
|
+
padding-inline: calc(var(--spacing) * 2);
|
|
44
|
+
padding-block: calc(var(--spacing) * 1);
|
|
45
|
+
}
|
|
46
|
+
:where([data-control-family="emoji-picker"][data-slot="recent-label"]) {
|
|
47
|
+
color: var(--muted-foreground);
|
|
48
|
+
font-size: var(--text-caption);
|
|
49
|
+
padding-inline: calc(var(--spacing) * 1);
|
|
50
|
+
}
|
|
51
|
+
:where([data-control-family="emoji-picker"]:is([data-slot="recent-grid"], [data-variant="reactions"])) {
|
|
52
|
+
display: flex;
|
|
53
|
+
}
|
|
54
|
+
:where(
|
|
55
|
+
[data-control-family="emoji-picker"][data-slot="root"]:has(input:not(:placeholder-shown))
|
|
56
|
+
:is([data-slot="categories"], [data-slot="recent"])
|
|
57
|
+
) {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
:where([data-control-family="emoji-picker"][data-slot="error"]) {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
gap: calc(var(--spacing) * 2);
|
|
66
|
+
block-size: 100%;
|
|
67
|
+
color: var(--muted-foreground);
|
|
68
|
+
font-size: var(--text-label);
|
|
69
|
+
}
|
|
70
|
+
:where([data-control-family="emoji-picker"][data-slot="error"] button) {
|
|
71
|
+
color: var(--foreground);
|
|
72
|
+
text-decoration: underline;
|
|
73
|
+
min-block-size: 44px;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
12
76
|
:where([data-control-family="emoji-picker"][data-slot="search"]) {
|
|
13
77
|
position: relative;
|
|
14
78
|
margin: calc(var(--spacing) * 2);
|
|
@@ -99,6 +163,19 @@
|
|
|
99
163
|
:where([data-control-family="emoji-picker"][data-slot="footer-label"]) {
|
|
100
164
|
color: var(--foreground);
|
|
101
165
|
}
|
|
166
|
+
|
|
167
|
+
@media (pointer: coarse) {
|
|
168
|
+
:where([data-control-family="emoji-picker"][data-slot="root"]) {
|
|
169
|
+
--cui-emoji-picker-cell-size: 44px;
|
|
170
|
+
}
|
|
171
|
+
:where([data-control-family="emoji-picker"][data-slot="category"]) {
|
|
172
|
+
flex-basis: 44px;
|
|
173
|
+
block-size: 44px;
|
|
174
|
+
}
|
|
175
|
+
:where([data-control-family="emoji-picker"][data-slot="search-input"]) {
|
|
176
|
+
font-size: 16px;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
102
179
|
}
|
|
103
180
|
|
|
104
181
|
@property --cui-emoji-picker-cell-size {
|
|
@@ -107,6 +184,12 @@
|
|
|
107
184
|
initial-value: 0px;
|
|
108
185
|
}
|
|
109
186
|
|
|
187
|
+
@property --cui-emoji-picker-height {
|
|
188
|
+
syntax: "<length>";
|
|
189
|
+
inherits: true;
|
|
190
|
+
initial-value: 0px;
|
|
191
|
+
}
|
|
192
|
+
|
|
110
193
|
@property --cui-emoji-picker-cell-radius {
|
|
111
194
|
syntax: "<length-percentage>";
|
|
112
195
|
inherits: true;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
:where([data-control-family="icon-picker"][data-slot="root"]) {
|
|
3
|
+
--cui-icon-picker-cell-size: calc(var(--spacing) * 10);
|
|
4
|
+
--cui-icon-picker-cell-radius: var(--radius-control);
|
|
5
|
+
--cui-icon-picker-foreground: var(--foreground);
|
|
6
|
+
--cui-icon-picker-active-background: var(--accent);
|
|
7
|
+
inline-size: calc(var(--_icon-picker-columns) * var(--cui-icon-picker-cell-size) + var(--spacing) * 4);
|
|
8
|
+
max-inline-size: 100%;
|
|
9
|
+
color: var(--cui-icon-picker-foreground);
|
|
10
|
+
}
|
|
11
|
+
:where([data-control-family="icon-picker"][data-slot="content"]) {
|
|
12
|
+
padding: calc(var(--spacing) * 2);
|
|
13
|
+
max-block-size: 16rem;
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
overscroll-behavior: contain;
|
|
16
|
+
scrollbar-width: thin;
|
|
17
|
+
}
|
|
18
|
+
:where([data-control-family="icon-picker"][data-slot="grid"]) {
|
|
19
|
+
display: grid;
|
|
20
|
+
grid-template-columns: repeat(var(--_icon-picker-columns), minmax(0, 1fr));
|
|
21
|
+
}
|
|
22
|
+
:where([data-control-family="icon-picker"][data-slot="icon"]) {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
block-size: var(--cui-icon-picker-cell-size);
|
|
27
|
+
min-inline-size: 0;
|
|
28
|
+
border-radius: var(--cui-icon-picker-cell-radius);
|
|
29
|
+
background: transparent;
|
|
30
|
+
color: inherit;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
transition: background-color var(--duration-fast) var(--ease-standard);
|
|
33
|
+
}
|
|
34
|
+
:where([data-control-family="icon-picker"][data-slot="icon"]:is(:hover, [aria-pressed="true"])) {
|
|
35
|
+
background: var(--cui-icon-picker-active-background);
|
|
36
|
+
}
|
|
37
|
+
:where([data-control-family="icon-picker"][data-slot="icon"] svg) {
|
|
38
|
+
inline-size: calc(var(--spacing) * 5);
|
|
39
|
+
block-size: calc(var(--spacing) * 5);
|
|
40
|
+
}
|
|
41
|
+
:where([data-control-family="icon-picker"][data-slot="colors"]) {
|
|
42
|
+
display: flex;
|
|
43
|
+
gap: calc(var(--spacing) * 1);
|
|
44
|
+
padding: calc(var(--spacing) * 1) calc(var(--spacing) * 2) 0;
|
|
45
|
+
overflow-x: auto;
|
|
46
|
+
}
|
|
47
|
+
:where([data-control-family="icon-picker"][data-slot="color"]) {
|
|
48
|
+
display: grid;
|
|
49
|
+
place-items: center;
|
|
50
|
+
flex: 1 0 calc(var(--spacing) * 9);
|
|
51
|
+
block-size: calc(var(--spacing) * 10);
|
|
52
|
+
border-radius: var(--cui-icon-picker-cell-radius, var(--radius-control));
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
}
|
|
55
|
+
:where([data-control-family="icon-picker"][data-slot="color"] > span) {
|
|
56
|
+
inline-size: calc(var(--spacing) * 6);
|
|
57
|
+
block-size: calc(var(--spacing) * 6);
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
background: currentColor;
|
|
60
|
+
}
|
|
61
|
+
:where([data-control-family="icon-picker"][data-slot="color"][data-checked] > span) {
|
|
62
|
+
outline: 2px solid var(--foreground);
|
|
63
|
+
outline-offset: 3px;
|
|
64
|
+
}
|
|
65
|
+
:where([data-control-family="icon-picker"][data-slot="empty"]) {
|
|
66
|
+
display: grid;
|
|
67
|
+
place-items: center;
|
|
68
|
+
min-block-size: calc(var(--spacing) * 20);
|
|
69
|
+
color: var(--muted-foreground);
|
|
70
|
+
font-size: var(--text-label);
|
|
71
|
+
}
|
|
72
|
+
@media (pointer: coarse) {
|
|
73
|
+
:where([data-control-family="icon-picker"][data-slot="root"]) {
|
|
74
|
+
--cui-icon-picker-cell-size: 44px;
|
|
75
|
+
}
|
|
76
|
+
:where([data-control-family="icon-picker"][data-slot="color"]) {
|
|
77
|
+
min-inline-size: 44px;
|
|
78
|
+
block-size: 44px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
@property --cui-icon-picker-cell-size {
|
|
83
|
+
syntax: "<length>";
|
|
84
|
+
inherits: true;
|
|
85
|
+
initial-value: 0px;
|
|
86
|
+
}
|
|
87
|
+
@property --cui-icon-picker-cell-radius {
|
|
88
|
+
syntax: "<length-percentage>";
|
|
89
|
+
inherits: true;
|
|
90
|
+
initial-value: 0px;
|
|
91
|
+
}
|
|
92
|
+
@property --cui-icon-picker-foreground {
|
|
93
|
+
syntax: "<color>";
|
|
94
|
+
inherits: true;
|
|
95
|
+
initial-value: transparent;
|
|
96
|
+
}
|
|
97
|
+
@property --cui-icon-picker-active-background {
|
|
98
|
+
syntax: "<color>";
|
|
99
|
+
inherits: true;
|
|
100
|
+
initial-value: transparent;
|
|
101
|
+
}
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
--cui-markdown-table-header-background: var(--muted);
|
|
13
13
|
--cui-markdown-font-size: var(--text-body);
|
|
14
14
|
--cui-markdown-line-height: var(--leading-relaxed);
|
|
15
|
+
--cui-markdown-flow-gap: calc(var(--spacing) * 4);
|
|
16
|
+
--cui-markdown-heading-gap: calc(var(--spacing) * 6);
|
|
15
17
|
color: var(--cui-markdown-foreground);
|
|
16
18
|
font-size: var(--cui-markdown-font-size);
|
|
17
19
|
overflow-wrap: break-word;
|
|
@@ -180,6 +182,58 @@
|
|
|
180
182
|
margin-block: calc(var(--spacing) * 4);
|
|
181
183
|
}
|
|
182
184
|
|
|
185
|
+
:where([data-control-family="markdown"][data-slot="flow"] > .cui-markdown-streamdown) {
|
|
186
|
+
display: contents;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:where([data-control-family="markdown"][data-slot="flow"]) {
|
|
190
|
+
display: grid;
|
|
191
|
+
min-width: 0;
|
|
192
|
+
row-gap: var(--cui-markdown-flow-gap);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
:where(
|
|
196
|
+
:is([data-control-family="markdown"][data-slot="flow"], .cui-markdown-streamdown)
|
|
197
|
+
> [data-control-family="markdown"]:is(
|
|
198
|
+
[data-slot="paragraph"],
|
|
199
|
+
[data-slot="unordered-list"],
|
|
200
|
+
[data-slot="ordered-list"],
|
|
201
|
+
[data-slot="blockquote"],
|
|
202
|
+
[data-slot="separator"],
|
|
203
|
+
[data-slot="table-scroll"]
|
|
204
|
+
)
|
|
205
|
+
) {
|
|
206
|
+
margin-block: 0;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:where(
|
|
210
|
+
:is([data-control-family="markdown"][data-slot="flow"], .cui-markdown-streamdown)
|
|
211
|
+
> [data-control-family="markdown"]:is(
|
|
212
|
+
[data-slot="h1"],
|
|
213
|
+
[data-slot="h2"],
|
|
214
|
+
[data-slot="h3"],
|
|
215
|
+
[data-slot="h4"],
|
|
216
|
+
[data-slot="h5"],
|
|
217
|
+
[data-slot="h6"]
|
|
218
|
+
)
|
|
219
|
+
) {
|
|
220
|
+
margin-block: max(0px, calc(var(--cui-markdown-heading-gap) - var(--cui-markdown-flow-gap))) 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
:where(
|
|
224
|
+
:is([data-control-family="markdown"][data-slot="flow"], .cui-markdown-streamdown)
|
|
225
|
+
> [data-control-family="markdown"]:is(
|
|
226
|
+
[data-slot="h1"],
|
|
227
|
+
[data-slot="h2"],
|
|
228
|
+
[data-slot="h3"],
|
|
229
|
+
[data-slot="h4"],
|
|
230
|
+
[data-slot="h5"],
|
|
231
|
+
[data-slot="h6"]
|
|
232
|
+
):first-child
|
|
233
|
+
) {
|
|
234
|
+
margin-block-start: 0;
|
|
235
|
+
}
|
|
236
|
+
|
|
183
237
|
:where([data-control-family="markdown"][data-slot="inline-code"]) {
|
|
184
238
|
padding-inline: calc(var(--spacing) * 1);
|
|
185
239
|
padding-block: calc(var(--spacing) * 0.5);
|
|
@@ -263,3 +317,15 @@
|
|
|
263
317
|
inherits: true;
|
|
264
318
|
initial-value: 1.5;
|
|
265
319
|
}
|
|
320
|
+
|
|
321
|
+
@property --cui-markdown-flow-gap {
|
|
322
|
+
syntax: "<length>";
|
|
323
|
+
inherits: true;
|
|
324
|
+
initial-value: 0px;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
@property --cui-markdown-heading-gap {
|
|
328
|
+
syntax: "<length>";
|
|
329
|
+
inherits: true;
|
|
330
|
+
initial-value: 0px;
|
|
331
|
+
}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
+
:where([data-control-family="popup"][data-popup-kind="popover"][data-slot="viewport"]) {
|
|
3
|
+
block-size: var(--_popover-viewport-height, auto);
|
|
4
|
+
overflow: clip;
|
|
5
|
+
transition: block-size var(--duration-base) var(--ease-emphasized);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:where([data-control-family="popup"][data-popup-kind="popover"][data-slot="viewport-content"]) {
|
|
9
|
+
display: flow-root;
|
|
10
|
+
}
|
|
11
|
+
|
|
2
12
|
:where([data-control-family="popup"][data-popup-kind="sheet"][data-popup-part="surface"]) {
|
|
3
13
|
transition-property: translate;
|
|
4
14
|
transition-duration: var(--duration-base);
|
|
@@ -5,6 +5,50 @@
|
|
|
5
5
|
--cui-scroll-area-corner-background: transparent;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
:where([data-control-family="scroll-area"][data-slot="root"][data-scrollbar-gutter="stable"]) {
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
11
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where(
|
|
15
|
+
[data-control-family="scroll-area"][data-slot="root"][data-scrollbar-gutter="stable"] > [data-scroll-area-viewport],
|
|
16
|
+
[data-control-family="scroll-area"][data-slot="root"][data-scrollbar-gutter="stable"] > [data-control-family="progressive-blur"]
|
|
17
|
+
) {
|
|
18
|
+
grid-area: 1 / 1;
|
|
19
|
+
min-inline-size: 0;
|
|
20
|
+
min-block-size: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where(
|
|
24
|
+
[data-control-family="scroll-area"][data-slot="root"][data-scrollbar-gutter="stable"]
|
|
25
|
+
> [data-slot="scrollbar"][data-orientation="vertical"]
|
|
26
|
+
) {
|
|
27
|
+
grid-area: 1 / 2;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:where(
|
|
31
|
+
[data-control-family="scroll-area"][data-slot="root"][data-scrollbar-gutter="stable"]
|
|
32
|
+
> [data-slot="scrollbar"][data-orientation="horizontal"]
|
|
33
|
+
) {
|
|
34
|
+
grid-area: 2 / 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where([data-control-family="scroll-area"][data-slot="root"][data-scrollbar-gutter="stable"] > [data-slot="corner"]) {
|
|
38
|
+
grid-area: 2 / 2;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:where(
|
|
42
|
+
[data-control-family="scroll-area"][data-slot="root"][data-scrollbar-gutter="stable"]
|
|
43
|
+
> [data-slot="scrollbar"][data-orientation="vertical"]:not([data-has-overflow-y])
|
|
44
|
+
> [data-slot="thumb"],
|
|
45
|
+
[data-control-family="scroll-area"][data-slot="root"][data-scrollbar-gutter="stable"]
|
|
46
|
+
> [data-slot="scrollbar"][data-orientation="horizontal"]:not([data-has-overflow-x])
|
|
47
|
+
> [data-slot="thumb"]
|
|
48
|
+
) {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
8
52
|
@supports (corner-shape: squircle) {
|
|
9
53
|
@container not style(--corner-shape: round) {
|
|
10
54
|
:where([data-control-family="scroll-area"][data-slot="root"] > [data-control-family="progressive-blur"]) {
|
|
@@ -18,11 +62,6 @@
|
|
|
18
62
|
z-index: 0;
|
|
19
63
|
border-radius: inherit;
|
|
20
64
|
outline: none;
|
|
21
|
-
transition:
|
|
22
|
-
--_scroll-area-fade-top var(--duration-fast) var(--ease-standard),
|
|
23
|
-
--_scroll-area-fade-bottom var(--duration-fast) var(--ease-standard),
|
|
24
|
-
--_scroll-area-fade-left var(--duration-fast) var(--ease-standard),
|
|
25
|
-
--_scroll-area-fade-right var(--duration-fast) var(--ease-standard);
|
|
26
65
|
}
|
|
27
66
|
|
|
28
67
|
:where(
|
|
@@ -53,39 +92,26 @@
|
|
|
53
92
|
}
|
|
54
93
|
|
|
55
94
|
:where(
|
|
56
|
-
[data-control-family="scroll-area"][data-slot="root"]
|
|
57
|
-
> [data-scroll-area-viewport]
|
|
58
|
-
) {
|
|
59
|
-
--_scroll-area-fade-top: var(--scroll-fade-size);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
:where(
|
|
63
|
-
[data-control-family="scroll-area"][data-slot="root"][data-overflow-y-end]:not([data-lock-axis="y"], [data-lock-axis="both"])
|
|
64
|
-
> [data-scroll-area-viewport]
|
|
95
|
+
[data-control-family="scroll-area"][data-slot="root"]:not([data-lock-axis="y"], [data-lock-axis="both"]) > [data-scroll-area-viewport]
|
|
65
96
|
) {
|
|
66
|
-
--_scroll-area-fade-
|
|
97
|
+
--_scroll-area-fade-top: min(var(--scroll-fade-size), var(--scroll-area-overflow-y-start, 0px));
|
|
98
|
+
--_scroll-area-fade-bottom: min(var(--scroll-fade-size), var(--scroll-area-overflow-y-end, 0px));
|
|
67
99
|
}
|
|
68
100
|
|
|
69
101
|
:where(
|
|
70
|
-
[data-control-family="scroll-area"][data-slot="root"]
|
|
71
|
-
> [data-scroll-area-viewport]
|
|
72
|
-
),
|
|
73
|
-
:where(
|
|
74
|
-
[data-control-family="scroll-area"][data-slot="root"][data-overflow-x-end]:not([data-lock-axis="x"], [data-lock-axis="both"]):dir(rtl)
|
|
102
|
+
[data-control-family="scroll-area"][data-slot="root"]:not([data-lock-axis="x"], [data-lock-axis="both"]):dir(ltr)
|
|
75
103
|
> [data-scroll-area-viewport]
|
|
76
104
|
) {
|
|
77
|
-
--_scroll-area-fade-left: var(--scroll-fade-size);
|
|
105
|
+
--_scroll-area-fade-left: min(var(--scroll-fade-size), var(--scroll-area-overflow-x-start, 0px));
|
|
106
|
+
--_scroll-area-fade-right: min(var(--scroll-fade-size), var(--scroll-area-overflow-x-end, 0px));
|
|
78
107
|
}
|
|
79
108
|
|
|
80
109
|
:where(
|
|
81
|
-
[data-control-family="scroll-area"][data-slot="root"]
|
|
82
|
-
> [data-scroll-area-viewport]
|
|
83
|
-
),
|
|
84
|
-
:where(
|
|
85
|
-
[data-control-family="scroll-area"][data-slot="root"][data-overflow-x-start]:not([data-lock-axis="x"], [data-lock-axis="both"]):dir(rtl)
|
|
110
|
+
[data-control-family="scroll-area"][data-slot="root"]:not([data-lock-axis="x"], [data-lock-axis="both"]):dir(rtl)
|
|
86
111
|
> [data-scroll-area-viewport]
|
|
87
112
|
) {
|
|
88
|
-
--_scroll-area-fade-
|
|
113
|
+
--_scroll-area-fade-left: min(var(--scroll-fade-size), var(--scroll-area-overflow-x-end, 0px));
|
|
114
|
+
--_scroll-area-fade-right: min(var(--scroll-fade-size), var(--scroll-area-overflow-x-start, 0px));
|
|
89
115
|
}
|
|
90
116
|
|
|
91
117
|
:where(
|