@ctrl-ui/react 0.9.11 → 0.9.13
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 +3 -1
- package/dist/control-variants.d.ts +1 -1
- package/dist/control-variants.js +1 -0
- package/dist/knob-contracts/button-knobs.d.ts +1 -1
- package/dist/knob-contracts/button-knobs.js +11 -5
- package/dist/knob-contracts/dropzone-knobs.d.ts +1 -1
- package/dist/knob-contracts/dropzone-knobs.js +5 -1
- package/dist/knob-contracts/field-knobs.d.ts +1 -1
- package/dist/knob-contracts/field-knobs.js +10 -0
- package/dist/knob-contracts/gradient-editor-knobs.d.ts +1 -1
- package/dist/knob-contracts/gradient-editor-knobs.js +1 -4
- package/dist/knob-contracts/page-layout-knobs.d.ts +1 -1
- package/dist/knob-contracts/page-layout-knobs.js +1 -0
- package/dist/knob-contracts/popup-knobs.d.ts +1 -1
- package/dist/knob-contracts/popup-knobs.js +5 -2
- package/dist/knob-contracts/sidebar-knobs.d.ts +1 -1
- package/dist/knob-contracts/sidebar-knobs.js +1 -0
- package/dist/styles/recipes/avatar.css +2 -0
- package/dist/styles/recipes/button-states.css +43 -0
- package/dist/styles/recipes/button.css +29 -21
- package/dist/styles/recipes/card.css +8 -0
- package/dist/styles/recipes/color-picker-values.css +4 -18
- package/dist/styles/recipes/color-picker.css +3 -4
- package/dist/styles/recipes/dropzone.css +47 -4
- package/dist/styles/recipes/field-parts.css +101 -1
- package/dist/styles/recipes/gradient-editor.css +3 -47
- package/dist/styles/recipes/markdown.css +5 -1
- package/dist/styles/recipes/page-layout.css +8 -1
- package/dist/styles/recipes/popup-controls.css +7 -1
- package/dist/styles/recipes/popup-lists.css +30 -5
- package/dist/styles/recipes/popup.css +5 -6
- package/dist/styles/recipes/sidebar-parts.css +6 -0
- package/dist/styles/recipes/sidebar.css +9 -8
- package/dist/styles/recipes/table.css +29 -0
- package/dist/styles/theme.css +4 -0
- package/dist/ui/autocomplete.d.ts +3 -0
- package/dist/ui/autocomplete.js +17 -2
- package/dist/ui/chart-cartesian.d.ts +60 -57
- package/dist/ui/chart-cartesian.js +7 -7
- package/dist/ui/chart-colors.d.ts +4 -2
- package/dist/ui/chart-colors.js +6 -2
- package/dist/ui/chart-marks.d.ts +4 -4
- package/dist/ui/chart-marks.js +14 -5
- package/dist/ui/chart-series.d.ts +9 -6
- package/dist/ui/chart-series.js +3 -2
- package/dist/ui/color-picker-swatches.d.ts +4 -3
- package/dist/ui/color-picker-swatches.js +7 -8
- package/dist/ui/command.d.ts +12 -0
- package/dist/ui/command.js +32 -2
- package/dist/ui/dropzone.d.ts +4 -1
- package/dist/ui/dropzone.js +16 -8
- package/dist/ui/field.d.ts +4 -1
- package/dist/ui/field.js +4 -2
- package/dist/ui/gradient-editor.d.ts +3 -2
- package/dist/ui/gradient-editor.js +7 -8
- package/dist/ui/markdown-components.d.ts +27 -0
- package/dist/ui/markdown-components.js +57 -0
- package/dist/ui/markdown-elements.d.ts +6 -25
- package/dist/ui/markdown-elements.js +19 -53
- package/dist/ui/markdown.d.ts +2 -7
- package/dist/ui/markdown.js +3 -20
- package/dist/ui/table.d.ts +6 -0
- package/dist/ui/table.js +17 -1
- package/lint/class-policy.mjs +31 -1
- package/lint/eslint-plugin.mjs +48 -4
- package/lint/grit-rules.mjs +52 -11
- package/lint/no-component-style-classes.grit +41 -6
- package/lint/no-raw-type-classes.grit +1 -1
- package/package.json +5 -1
|
@@ -181,6 +181,36 @@
|
|
|
181
181
|
opacity: var(--disabled-opacity);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
:where([data-control-family="field"][data-field-kind="field"][data-slot="label"][data-variant="card"]) {
|
|
185
|
+
padding-block: var(--cui-field-label-padding-block);
|
|
186
|
+
padding-inline: var(--cui-field-label-padding-inline);
|
|
187
|
+
border: var(--cui-field-label-border-width) solid var(--cui-field-label-border-color);
|
|
188
|
+
border-radius: var(--cui-field-label-radius);
|
|
189
|
+
background-color: var(--cui-field-label-background);
|
|
190
|
+
transition-property: background-color, border-color;
|
|
191
|
+
transition-duration: var(--duration-fast);
|
|
192
|
+
transition-timing-function: var(--ease-standard);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@media (hover: hover) {
|
|
196
|
+
:where(
|
|
197
|
+
[data-control-family="field"][data-field-kind="field"][data-slot="label"][data-variant="card"]:hover:not(
|
|
198
|
+
:has([data-control-family="choice"]:is([data-checked], [data-disabled]))
|
|
199
|
+
)
|
|
200
|
+
) {
|
|
201
|
+
background-color: var(--cui-field-label-hover-background);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:where(
|
|
206
|
+
[data-control-family="field"][data-field-kind="field"][data-slot="label"][data-variant="card"]:has(
|
|
207
|
+
[data-control-family="choice"][data-checked]
|
|
208
|
+
)
|
|
209
|
+
) {
|
|
210
|
+
border-color: var(--cui-field-label-checked-border-color);
|
|
211
|
+
background-color: var(--cui-field-label-checked-background);
|
|
212
|
+
}
|
|
213
|
+
|
|
184
214
|
:where([data-control-family="field"][data-field-kind="field"][data-slot="description"]) {
|
|
185
215
|
color: var(--muted-foreground);
|
|
186
216
|
font-size: var(--cui-field-description-font-size);
|
|
@@ -210,12 +240,22 @@
|
|
|
210
240
|
}
|
|
211
241
|
|
|
212
242
|
:where([data-control-family="field"][data-field-kind="field"]) {
|
|
243
|
+
--cui-field-legend-foreground: var(--foreground);
|
|
213
244
|
--cui-field-legend-font-size: var(--text-label);
|
|
214
245
|
--cui-field-legend-font-weight: var(--font-weight-semibold);
|
|
246
|
+
--cui-field-label-radius: var(--radius-lg);
|
|
247
|
+
--cui-field-label-background: transparent;
|
|
248
|
+
--cui-field-label-hover-background: var(--hover-fill);
|
|
249
|
+
--cui-field-label-checked-background: oklch(from var(--primary) l c h / 0.06);
|
|
250
|
+
--cui-field-label-border-color: var(--border);
|
|
251
|
+
--cui-field-label-checked-border-color: var(--primary);
|
|
252
|
+
--cui-field-label-border-width: var(--control-rim-width);
|
|
253
|
+
--cui-field-label-padding-block: calc(var(--spacing) * 3);
|
|
254
|
+
--cui-field-label-padding-inline: calc(var(--spacing) * 3);
|
|
215
255
|
}
|
|
216
256
|
|
|
217
257
|
:where([data-control-family="field"][data-field-kind="field"][data-slot="legend"]) {
|
|
218
|
-
color: var(--foreground);
|
|
258
|
+
color: var(--cui-field-legend-foreground);
|
|
219
259
|
font-size: var(--cui-field-legend-font-size);
|
|
220
260
|
font-weight: var(--cui-field-legend-font-weight);
|
|
221
261
|
}
|
|
@@ -275,6 +315,66 @@
|
|
|
275
315
|
}
|
|
276
316
|
}
|
|
277
317
|
|
|
318
|
+
@property --cui-field-label-radius {
|
|
319
|
+
syntax: "<length-percentage>";
|
|
320
|
+
inherits: true;
|
|
321
|
+
initial-value: 0px;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
@property --cui-field-label-background {
|
|
325
|
+
syntax: "<color>";
|
|
326
|
+
inherits: true;
|
|
327
|
+
initial-value: transparent;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
@property --cui-field-label-hover-background {
|
|
331
|
+
syntax: "<color>";
|
|
332
|
+
inherits: true;
|
|
333
|
+
initial-value: transparent;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
@property --cui-field-label-checked-background {
|
|
337
|
+
syntax: "<color>";
|
|
338
|
+
inherits: true;
|
|
339
|
+
initial-value: transparent;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
@property --cui-field-label-border-color {
|
|
343
|
+
syntax: "<color>";
|
|
344
|
+
inherits: true;
|
|
345
|
+
initial-value: transparent;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@property --cui-field-label-checked-border-color {
|
|
349
|
+
syntax: "<color>";
|
|
350
|
+
inherits: true;
|
|
351
|
+
initial-value: transparent;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
@property --cui-field-label-border-width {
|
|
355
|
+
syntax: "<length>";
|
|
356
|
+
inherits: true;
|
|
357
|
+
initial-value: 0px;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
@property --cui-field-label-padding-block {
|
|
361
|
+
syntax: "<length-percentage>";
|
|
362
|
+
inherits: true;
|
|
363
|
+
initial-value: 0px;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
@property --cui-field-label-padding-inline {
|
|
367
|
+
syntax: "<length-percentage>";
|
|
368
|
+
inherits: true;
|
|
369
|
+
initial-value: 0px;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
@property --cui-field-legend-foreground {
|
|
373
|
+
syntax: "<color>";
|
|
374
|
+
inherits: true;
|
|
375
|
+
initial-value: transparent;
|
|
376
|
+
}
|
|
377
|
+
|
|
278
378
|
@property --cui-field-legend-font-size {
|
|
279
379
|
syntax: "<length-percentage>";
|
|
280
380
|
inherits: true;
|
|
@@ -5,9 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
:where([data-control-family="gradient-editor"][data-slot="root"]) {
|
|
7
7
|
gap: calc(var(--spacing) * 3);
|
|
8
|
-
--cui-gradient-editor-add-border-color: var(--border);
|
|
9
|
-
--cui-gradient-editor-add-border-width: var(--control-rim-width);
|
|
10
|
-
--cui-gradient-editor-add-radius: 9999px;
|
|
11
8
|
--cui-gradient-editor-preview-radius: var(--radius-field);
|
|
12
9
|
--cui-gradient-editor-preview-ring-color: oklch(from var(--border) l c h / 0.6);
|
|
13
10
|
--cui-gradient-editor-stop-border-color: oklch(1 0 0);
|
|
@@ -48,19 +45,9 @@
|
|
|
48
45
|
transition: scale var(--duration-fast) var(--ease-standard);
|
|
49
46
|
}
|
|
50
47
|
|
|
51
|
-
:where([data-control-family="
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
border: var(--cui-gradient-editor-add-border-width) dashed var(--cui-gradient-editor-add-border-color);
|
|
55
|
-
border-radius: var(--cui-gradient-editor-add-radius);
|
|
56
|
-
color: var(--muted-foreground);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@media (hover: hover) {
|
|
60
|
-
:where([data-control-family="gradient-editor"][data-slot="stop-add"]:hover:not(:disabled)) {
|
|
61
|
-
border-color: oklch(from var(--foreground) l c h / 0.4);
|
|
62
|
-
color: var(--foreground);
|
|
63
|
-
}
|
|
48
|
+
:where([data-control-family="button"][data-gradient-editor-stop-add="true"]) {
|
|
49
|
+
--nest-radius: 9999px;
|
|
50
|
+
--cui-button-height: calc(var(--spacing) * 7);
|
|
64
51
|
}
|
|
65
52
|
|
|
66
53
|
:where([data-control-family="gradient-editor"][data-slot="stop"][data-selected="true"]) {
|
|
@@ -77,19 +64,6 @@
|
|
|
77
64
|
}
|
|
78
65
|
|
|
79
66
|
@media (pointer: coarse) {
|
|
80
|
-
:where([data-control-family="gradient-editor"][data-slot="stop-add"]) {
|
|
81
|
-
position: relative;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
:where([data-control-family="gradient-editor"][data-slot="stop-add"])::after {
|
|
85
|
-
content: "";
|
|
86
|
-
position: absolute;
|
|
87
|
-
inset: 50%;
|
|
88
|
-
translate: -50% -50%;
|
|
89
|
-
inline-size: max(100%, var(--touch-target));
|
|
90
|
-
block-size: max(100%, var(--touch-target));
|
|
91
|
-
}
|
|
92
|
-
|
|
93
67
|
:where([data-control-family="gradient-editor"][data-slot="stop"])::after {
|
|
94
68
|
block-size: max(100%, var(--touch-target));
|
|
95
69
|
}
|
|
@@ -136,21 +110,3 @@
|
|
|
136
110
|
syntax: "*";
|
|
137
111
|
inherits: true;
|
|
138
112
|
}
|
|
139
|
-
|
|
140
|
-
@property --cui-gradient-editor-add-radius {
|
|
141
|
-
syntax: "<length-percentage>";
|
|
142
|
-
inherits: true;
|
|
143
|
-
initial-value: 0px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
@property --cui-gradient-editor-add-border-color {
|
|
147
|
-
syntax: "<color>";
|
|
148
|
-
inherits: true;
|
|
149
|
-
initial-value: transparent;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
@property --cui-gradient-editor-add-border-width {
|
|
153
|
-
syntax: "<length>";
|
|
154
|
-
inherits: true;
|
|
155
|
-
initial-value: 0px;
|
|
156
|
-
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
:where([data-control-family="markdown"][data-slot="root"])
|
|
2
|
+
:where([data-control-family="markdown"][data-slot="root"]),
|
|
3
|
+
:where([data-control-family="markdown"]:not([data-control-family="markdown"][data-slot="root"] *)) {
|
|
3
4
|
--cui-markdown-foreground: oklch(from var(--foreground) l c h / 0.9);
|
|
4
5
|
--cui-markdown-blockquote-border-color: var(--border);
|
|
5
6
|
--cui-markdown-blockquote-foreground: var(--muted-foreground);
|
|
@@ -14,6 +15,9 @@
|
|
|
14
15
|
--cui-markdown-line-height: var(--leading-relaxed);
|
|
15
16
|
--cui-markdown-flow-gap: calc(var(--spacing) * 4);
|
|
16
17
|
--cui-markdown-heading-gap: calc(var(--spacing) * 6);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where([data-control-family="markdown"][data-slot="root"]) {
|
|
17
21
|
color: var(--cui-markdown-foreground);
|
|
18
22
|
font-size: var(--cui-markdown-font-size);
|
|
19
23
|
overflow-wrap: break-word;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
--cui-page-layout-header-gap: calc(var(--spacing) * 8);
|
|
10
10
|
--cui-page-layout-header-column-gap: calc(var(--spacing) * 4);
|
|
11
11
|
--cui-page-layout-header-row-gap: calc(var(--spacing) * 2);
|
|
12
|
+
--cui-page-layout-title-font-size: var(--text-heading-1);
|
|
12
13
|
--cui-page-layout-sticky-gap: 0px;
|
|
13
14
|
--cui-page-layout-floating-inset: calc(var(--spacing) * 2);
|
|
14
15
|
--cui-page-layout-background: var(--canvas);
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
|
|
77
78
|
:where([data-control-family="page-layout"][data-slot="title"]) {
|
|
78
79
|
grid-area: title;
|
|
79
|
-
font-size: var(--
|
|
80
|
+
font-size: var(--cui-page-layout-title-font-size);
|
|
80
81
|
line-height: var(--text-heading-1--line-height);
|
|
81
82
|
font-weight: var(--text-heading-1--font-weight);
|
|
82
83
|
letter-spacing: var(--text-heading-1--letter-spacing);
|
|
@@ -231,6 +232,12 @@
|
|
|
231
232
|
initial-value: 0px;
|
|
232
233
|
}
|
|
233
234
|
|
|
235
|
+
@property --cui-page-layout-title-font-size {
|
|
236
|
+
syntax: "<length-percentage>";
|
|
237
|
+
inherits: true;
|
|
238
|
+
initial-value: 0px;
|
|
239
|
+
}
|
|
240
|
+
|
|
234
241
|
@property --cui-page-layout-header-row-gap {
|
|
235
242
|
syntax: "<length-percentage>";
|
|
236
243
|
inherits: true;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
:where([data-control-family="popup"][data-popup-kind="popover"][data-slot="description"]),
|
|
27
27
|
:where([data-control-family="popup"][data-popup-kind="toast"][data-slot="description"]) {
|
|
28
28
|
color: var(--cui-popup-description-foreground);
|
|
29
|
-
font-size: var(--
|
|
29
|
+
font-size: var(--cui-popup-description-font-size);
|
|
30
30
|
text-wrap: pretty;
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -265,6 +265,12 @@
|
|
|
265
265
|
initial-value: transparent;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
+
@property --cui-popup-description-font-size {
|
|
269
|
+
syntax: "<length-percentage>";
|
|
270
|
+
inherits: true;
|
|
271
|
+
initial-value: 0px;
|
|
272
|
+
}
|
|
273
|
+
|
|
268
274
|
@property --cui-popup-close-inset {
|
|
269
275
|
syntax: "<length-percentage>";
|
|
270
276
|
inherits: true;
|
|
@@ -112,11 +112,13 @@
|
|
|
112
112
|
color: var(--muted-foreground);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
:where([data-control-family="popup"][data-popup-kind="command"][data-slot="dialog-root"])
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
:where([data-control-family="popup"][data-popup-part="surface"]:has(> [data-popup-kind="command"][data-slot="dialog-root"])),
|
|
116
|
+
:where(
|
|
117
|
+
[data-control-family="popup"][data-popup-part="backdrop"]:has(
|
|
118
|
+
~ [data-popup-part="surface"] > [data-popup-kind="command"][data-slot="dialog-root"]
|
|
119
|
+
)
|
|
120
|
+
) {
|
|
121
|
+
transition: none;
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
:where([data-control-family="popup"][data-popup-kind="autocomplete"][data-slot="group-label"]) {
|
|
@@ -167,6 +169,11 @@
|
|
|
167
169
|
letter-spacing: var(--cui-popup-shortcut-letter-spacing);
|
|
168
170
|
}
|
|
169
171
|
|
|
172
|
+
:where([data-control-family="popup"][data-slot="item-description"]) {
|
|
173
|
+
color: var(--cui-popup-item-description-foreground);
|
|
174
|
+
font-size: var(--cui-popup-item-description-font-size);
|
|
175
|
+
}
|
|
176
|
+
|
|
170
177
|
:where([data-control-family="popup"][data-popup-kind="command"][data-slot="shortcut"]) {
|
|
171
178
|
--cui-popup-shortcut-font-size: var(--text-label);
|
|
172
179
|
}
|
|
@@ -366,3 +373,21 @@
|
|
|
366
373
|
inherits: true;
|
|
367
374
|
initial-value: 0px;
|
|
368
375
|
}
|
|
376
|
+
|
|
377
|
+
@property --cui-popup-item-description-foreground {
|
|
378
|
+
syntax: "<color>";
|
|
379
|
+
inherits: true;
|
|
380
|
+
initial-value: transparent;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
@property --cui-popup-item-description-font-size {
|
|
384
|
+
syntax: "<length-percentage>";
|
|
385
|
+
inherits: true;
|
|
386
|
+
initial-value: 0px;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
@property --cui-popup-shortcut-foreground {
|
|
390
|
+
syntax: "<color>";
|
|
391
|
+
inherits: true;
|
|
392
|
+
initial-value: transparent;
|
|
393
|
+
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
--cui-popup-title-line-height: var(--text-heading-3--line-height);
|
|
16
16
|
--cui-popup-title-letter-spacing: -0.025em;
|
|
17
17
|
--cui-popup-description-foreground: var(--muted-foreground);
|
|
18
|
+
--cui-popup-description-font-size: var(--text-body);
|
|
18
19
|
--cui-popup-close-inset: calc(var(--spacing) * 3);
|
|
19
20
|
--cui-popup-item-radius: var(--radius-popup-item-fit);
|
|
20
21
|
--cui-popup-item-foreground: var(--foreground);
|
|
@@ -27,6 +28,8 @@
|
|
|
27
28
|
--cui-popup-item-highlight-background: var(--hover-fill);
|
|
28
29
|
--cui-popup-item-highlight-foreground: var(--cui-popup-item-foreground);
|
|
29
30
|
--cui-popup-item-highlight-muted-foreground: var(--muted-foreground);
|
|
31
|
+
--cui-popup-item-description-foreground: var(--muted-foreground);
|
|
32
|
+
--cui-popup-item-description-font-size: var(--text-label);
|
|
30
33
|
--cui-popup-item-highlight-shadow: inset 0 0 0 1px oklch(from var(--foreground) l c h / 0.35);
|
|
31
34
|
--cui-popup-item-disabled-opacity: var(--disabled-opacity);
|
|
32
35
|
--cui-popup-label-padding-block: var(--cui-popup-item-padding-block);
|
|
@@ -146,6 +149,7 @@
|
|
|
146
149
|
--cui-popup-title-font-size: var(--text-body);
|
|
147
150
|
--cui-popup-title-line-height: 1.35;
|
|
148
151
|
--cui-popup-title-letter-spacing: -0.01em;
|
|
152
|
+
--cui-popup-description-font-size: var(--text-label);
|
|
149
153
|
max-block-size: var(--available-height);
|
|
150
154
|
max-inline-size: var(--available-width);
|
|
151
155
|
overflow: auto;
|
|
@@ -207,6 +211,7 @@
|
|
|
207
211
|
) {
|
|
208
212
|
--cui-popup-shortcut-foreground: var(--cui-popup-item-highlight-foreground);
|
|
209
213
|
--cui-popup-submenu-indicator-foreground: var(--cui-popup-item-highlight-foreground);
|
|
214
|
+
--cui-popup-item-description-foreground: var(--cui-popup-item-highlight-muted-foreground);
|
|
210
215
|
--muted-foreground: var(--cui-popup-item-highlight-muted-foreground);
|
|
211
216
|
background-color: var(--cui-popup-item-highlight-background);
|
|
212
217
|
color: var(--cui-popup-item-highlight-foreground);
|
|
@@ -392,9 +397,3 @@
|
|
|
392
397
|
inherits: true;
|
|
393
398
|
initial-value: transparent;
|
|
394
399
|
}
|
|
395
|
-
|
|
396
|
-
@property --cui-popup-shortcut-foreground {
|
|
397
|
-
syntax: "<color>";
|
|
398
|
-
inherits: true;
|
|
399
|
-
initial-value: transparent;
|
|
400
|
-
}
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
--cui-sidebar-inner-border-width: 0px;
|
|
39
39
|
--cui-sidebar-inner-radius: 0px;
|
|
40
40
|
--cui-sidebar-inner-shadow: none;
|
|
41
|
+
--cui-sidebar-container-border-width: 1px;
|
|
41
42
|
--cui-sidebar-header-background: transparent;
|
|
42
43
|
--cui-sidebar-header-shadow: 0 0 transparent;
|
|
43
44
|
--cui-sidebar-header-border-width: 1px;
|
|
@@ -88,11 +89,11 @@
|
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
:where([data-control-family="sidebar"][data-slot="root"][data-variant="sidebar"][data-side="left"] [data-slot="container"]) {
|
|
91
|
-
border-inline-end:
|
|
92
|
+
border-inline-end: var(--cui-sidebar-container-border-width) solid var(--sidebar-border);
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
:where([data-control-family="sidebar"][data-slot="root"][data-variant="sidebar"][data-side="right"] [data-slot="container"]) {
|
|
95
|
-
border-inline-start:
|
|
96
|
+
border-inline-start: var(--cui-sidebar-container-border-width) solid var(--sidebar-border);
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
:where([data-control-family="sidebar"][data-slot="inner"]) {
|
|
@@ -132,12 +133,6 @@
|
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
135
|
|
|
135
|
-
@property --cui-sidebar-rail-divider-background {
|
|
136
|
-
syntax: "<color>";
|
|
137
|
-
inherits: true;
|
|
138
|
-
initial-value: transparent;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
136
|
@property --cui-sidebar-wrapper-background {
|
|
142
137
|
syntax: "<color>";
|
|
143
138
|
inherits: true;
|
|
@@ -171,6 +166,12 @@
|
|
|
171
166
|
inherits: true;
|
|
172
167
|
}
|
|
173
168
|
|
|
169
|
+
@property --cui-sidebar-container-border-width {
|
|
170
|
+
syntax: "<length>";
|
|
171
|
+
inherits: true;
|
|
172
|
+
initial-value: 0px;
|
|
173
|
+
}
|
|
174
|
+
|
|
174
175
|
@property --cui-sidebar-inner-border-width {
|
|
175
176
|
syntax: "<length>";
|
|
176
177
|
inherits: true;
|
|
@@ -44,6 +44,35 @@
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
:where([data-control-family="table"][data-slot="row"]:has([data-control-family="table"][data-slot="row-link"])) {
|
|
48
|
+
position: relative;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:where([data-control-family="table"][data-slot="row-link"]) {
|
|
52
|
+
text-align: start;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
outline: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:where([data-control-family="table"][data-slot="row-link"])::after {
|
|
58
|
+
content: "";
|
|
59
|
+
position: absolute;
|
|
60
|
+
inset: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where([data-control-family="table"][data-slot="row-link"]:focus-visible)::after {
|
|
64
|
+
outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring);
|
|
65
|
+
outline-offset: calc(var(--focus-ring-width) * -1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where(
|
|
69
|
+
[data-control-family="table"][data-slot="row"]:has([data-control-family="table"][data-slot="row-link"])
|
|
70
|
+
:is(a[href], button, input, select, textarea, [role="checkbox"]):not([data-slot="row-link"])
|
|
71
|
+
) {
|
|
72
|
+
position: relative;
|
|
73
|
+
z-index: 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
47
76
|
:where([data-control-family="table"][data-slot="row"][data-state="selected"]) {
|
|
48
77
|
background: var(--cui-table-row-selected-background);
|
|
49
78
|
}
|
package/dist/styles/theme.css
CHANGED
|
@@ -710,6 +710,10 @@
|
|
|
710
710
|
outline-width: 0;
|
|
711
711
|
}
|
|
712
712
|
|
|
713
|
+
:where([data-control-family][data-focus-ring="none"]):focus-visible {
|
|
714
|
+
outline-style: none;
|
|
715
|
+
}
|
|
716
|
+
|
|
713
717
|
:where([data-control-family][data-highlighted]):focus-visible {
|
|
714
718
|
outline-offset: calc(var(--focus-ring-width) * -1);
|
|
715
719
|
}
|
|
@@ -2,6 +2,7 @@ import { OpenChangeEventDetails } from "../control-props.js";
|
|
|
2
2
|
import { ControlSize } from "../control-variants.js";
|
|
3
3
|
import { FieldKnobStyle } from "../knob-contracts/field-knobs.js";
|
|
4
4
|
import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
|
|
5
|
+
import { InputGroupProps } from "./input-group.js";
|
|
5
6
|
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
6
7
|
//#region src/ui/autocomplete.d.ts
|
|
7
8
|
export type AutocompleteProps<Value = string> = {
|
|
@@ -29,6 +30,7 @@ export type AutocompleteInputProps = Omit<Omit<ComponentProps<"input">, "size">,
|
|
|
29
30
|
} & {
|
|
30
31
|
size?: ControlSize;
|
|
31
32
|
};
|
|
33
|
+
export type AutocompleteInputGroupProps = Omit<InputGroupProps, "render">;
|
|
32
34
|
export type AutocompleteClearProps = ComponentProps<"button"> & {
|
|
33
35
|
style?: CSSProperties & FieldKnobStyle;
|
|
34
36
|
};
|
|
@@ -59,6 +61,7 @@ export type AutocompleteGroupLabelProps = Omit<ComponentProps<"div">, "style"> &
|
|
|
59
61
|
};
|
|
60
62
|
export declare function Autocomplete<Value = string>({ children, autoHighlight, ...props }: AutocompleteProps<Value>): import("react").JSX.Element;
|
|
61
63
|
export declare function AutocompleteClear({ className, children, ...props }: AutocompleteClearProps): import("react").JSX.Element;
|
|
64
|
+
export declare function AutocompleteInputGroup(props: AutocompleteInputGroupProps): import("react").JSX.Element;
|
|
62
65
|
export declare function AutocompleteInput({ size, className, ...props }: AutocompleteInputProps): import("react").JSX.Element;
|
|
63
66
|
export declare function AutocompleteContent({ className, children, sideOffset, ...props }: AutocompleteContentProps): import("react").JSX.Element;
|
|
64
67
|
export declare function AutocompleteList<Value = unknown>({ className, children, ...props }: AutocompleteListProps<Value>): import("react").JSX.Element;
|
package/dist/ui/autocomplete.js
CHANGED
|
@@ -4,7 +4,8 @@ import { controlEffectsAttribute } from "../skin.js";
|
|
|
4
4
|
import { useSkin } from "../skin-provider.js";
|
|
5
5
|
import { ScrollArea } from "./scroll-area.js";
|
|
6
6
|
import { popupItemStructureClasses } from "../surface-variants.js";
|
|
7
|
-
import {
|
|
7
|
+
import { InputGroup, InputGroupAddon, useIsInsideInputGroup } from "./input-group.js";
|
|
8
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { Autocomplete as Autocomplete$1 } from "@base-ui/react/autocomplete";
|
|
9
10
|
//#region src/ui/autocomplete.tsx
|
|
10
11
|
function Autocomplete({ children, autoHighlight = true, ...props }) {
|
|
@@ -38,7 +39,21 @@ function AutocompleteClear({ className, children, ...props }) {
|
|
|
38
39
|
})
|
|
39
40
|
});
|
|
40
41
|
}
|
|
42
|
+
function AutocompleteInputGroup(props) {
|
|
43
|
+
return /* @__PURE__ */ jsx(InputGroup, {
|
|
44
|
+
...props,
|
|
45
|
+
render: /* @__PURE__ */ jsx(Autocomplete$1.InputGroup, {})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
41
48
|
function AutocompleteInput({ size = "md", className, ...props }) {
|
|
49
|
+
if (useIsInsideInputGroup()) return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Autocomplete$1.Input, {
|
|
50
|
+
...props,
|
|
51
|
+
"data-control-ui": "input-group",
|
|
52
|
+
"data-control-family": "field",
|
|
53
|
+
"data-field-kind": "input-group",
|
|
54
|
+
"data-slot": "input",
|
|
55
|
+
className: cn("h-full min-w-0 flex-1", className)
|
|
56
|
+
}), /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(AutocompleteClear, {}) })] });
|
|
42
57
|
return /* @__PURE__ */ jsxs(Autocomplete$1.InputGroup, {
|
|
43
58
|
"data-control-ui": "autocomplete",
|
|
44
59
|
"data-field-kind": "autocomplete",
|
|
@@ -155,4 +170,4 @@ function AutocompleteGroupLabel({ className, children, ...props }) {
|
|
|
155
170
|
});
|
|
156
171
|
}
|
|
157
172
|
//#endregion
|
|
158
|
-
export { Autocomplete, AutocompleteClear, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteItem, AutocompleteList };
|
|
173
|
+
export { Autocomplete, AutocompleteClear, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteInputGroup, AutocompleteItem, AutocompleteList };
|