@ctrl-ui/react 0.9.6 → 0.9.8
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 +38 -2
- package/dist/activity.d.ts +3 -1
- package/dist/activity.js +2 -1
- package/dist/blocks/agent-run-sidebar.js +11 -10
- package/dist/blocks/agent-run.d.ts +3 -1
- package/dist/blocks/agent-run.js +21 -13
- package/dist/blocks/coding-agent.js +50 -69
- package/dist/blocks/design-canvas-inspector.js +1 -1
- package/dist/blocks/design-canvas.js +41 -34
- package/dist/blocks/discussion.js +1 -1
- package/dist/blocks/file-explorer.js +66 -47
- package/dist/blocks/settings.js +37 -41
- package/dist/blocks/team-chat.js +2 -1
- package/dist/blocks/theme-toggle.d.ts +2 -1
- package/dist/blocks/theme-toggle.js +13 -4
- package/dist/hooks/use-mobile.d.ts +1 -1
- package/dist/hooks/use-mobile.js +1 -1
- package/dist/knob-contracts/badge-knobs.d.ts +1 -1
- package/dist/knob-contracts/badge-knobs.js +3 -1
- package/dist/knob-contracts/button-knobs.d.ts +1 -1
- package/dist/knob-contracts/button-knobs.js +1 -0
- package/dist/knob-contracts/calendar-knobs.d.ts +1 -1
- package/dist/knob-contracts/calendar-knobs.js +9 -1
- package/dist/knob-contracts/card-knobs.d.ts +1 -1
- package/dist/knob-contracts/card-knobs.js +5 -1
- package/dist/knob-contracts/choice-knobs.d.ts +1 -1
- package/dist/knob-contracts/choice-knobs.js +1 -0
- package/dist/knob-contracts/collapsible-knobs.d.ts +1 -1
- package/dist/knob-contracts/collapsible-knobs.js +5 -1
- package/dist/knob-contracts/emoji-picker-knobs.d.ts +1 -1
- package/dist/knob-contracts/emoji-picker-knobs.js +3 -1
- package/dist/knob-contracts/field-knobs.d.ts +1 -1
- package/dist/knob-contracts/field-knobs.js +17 -1
- package/dist/knob-contracts/item-knobs.d.ts +1 -1
- package/dist/knob-contracts/item-knobs.js +5 -1
- package/dist/knob-contracts/kbd-knobs.d.ts +1 -1
- package/dist/knob-contracts/kbd-knobs.js +4 -1
- 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/pagination-knobs.d.ts +1 -1
- package/dist/knob-contracts/pagination-knobs.js +2 -1
- package/dist/knob-contracts/popup-knobs.d.ts +1 -1
- package/dist/knob-contracts/popup-knobs.js +9 -0
- package/dist/knob-contracts/range-knobs.d.ts +1 -1
- package/dist/knob-contracts/range-knobs.js +2 -0
- package/dist/knob-contracts/sidebar-knobs.d.ts +1 -1
- package/dist/knob-contracts/sidebar-knobs.js +2 -0
- package/dist/knob-contracts/tabs-knobs.d.ts +1 -1
- package/dist/knob-contracts/tabs-knobs.js +3 -0
- package/dist/knob-contracts/timeline-knobs.d.ts +1 -1
- package/dist/knob-contracts/timeline-knobs.js +4 -1
- package/dist/knob-contracts/tree-knobs.d.ts +1 -1
- package/dist/knob-contracts/tree-knobs.js +3 -1
- package/dist/skin.d.ts +2 -0
- package/dist/styles/index.css +2 -3
- package/dist/styles/recipes/activity.css +4 -0
- package/dist/styles/recipes/avatar.css +1 -1
- package/dist/styles/recipes/badge.css +17 -0
- package/dist/styles/recipes/button.css +8 -1
- package/dist/styles/recipes/calendar.css +82 -6
- package/dist/styles/recipes/card.css +40 -5
- package/dist/styles/recipes/choice.css +9 -2
- package/dist/styles/recipes/collapsible.css +8 -1
- package/dist/styles/recipes/color-picker-values.css +4 -0
- package/dist/styles/recipes/emoji-picker.css +29 -8
- package/dist/styles/recipes/field-parts.css +80 -5
- package/dist/styles/recipes/field.css +113 -40
- package/dist/styles/recipes/item.css +33 -5
- package/dist/styles/recipes/kbd.css +26 -6
- package/dist/styles/recipes/morphing-panel.css +1 -1
- package/dist/styles/recipes/page-layout.css +18 -2
- package/dist/styles/recipes/pagination.css +8 -0
- package/dist/styles/recipes/popup-controls.css +9 -0
- package/dist/styles/recipes/popup-drawer.css +1 -0
- package/dist/styles/recipes/popup-lists.css +55 -6
- package/dist/styles/recipes/popup-motion.css +7 -1
- package/dist/styles/recipes/popup.css +10 -0
- package/dist/styles/recipes/range.css +16 -2
- package/dist/styles/recipes/sidebar-mobile.css +1 -1
- package/dist/styles/recipes/sidebar-parts.css +17 -1
- package/dist/styles/recipes/sidebar.css +11 -0
- package/dist/styles/recipes/tabs.css +41 -8
- package/dist/styles/recipes/timeline.css +25 -2
- package/dist/styles/recipes/tree.css +33 -0
- package/dist/styles/theme.css +11 -1
- package/dist/ui/alert-dialog.js +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/calendar.js +9 -4
- package/dist/ui/card.d.ts +3 -1
- package/dist/ui/card.js +2 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/dropdown-menu.d.ts +1 -1
- package/dist/ui/dropdown-menu.js +23 -6
- package/dist/ui/dropzone.js +10 -11
- package/dist/ui/field.d.ts +6 -2
- package/dist/ui/field.js +4 -2
- package/dist/ui/morphing-panel.d.ts +5 -1
- package/dist/ui/morphing-panel.js +4 -2
- package/dist/ui/select.js +2 -2
- package/dist/ui/sidebar-mobile.js +1 -1
- package/dist/ui/sidebar-provider.d.ts +3 -1
- package/dist/ui/sidebar-provider.js +3 -2
- package/dist/ui/sidebar-resize-rail.js +1 -1
- package/dist/ui/sidebar.d.ts +6 -5
- package/dist/ui/sidebar.js +10 -9
- package/dist/ui/tabs.d.ts +1 -1
- package/dist/ui/tabs.js +2 -13
- package/dist/ui/timeline.js +1 -1
- package/dist/ui/typography.d.ts +11 -5
- package/dist/ui/typography.js +18 -6
- package/lint/biome-preset.json +3 -0
- package/lint/class-policy.mjs +17 -0
- package/lint/eslint-plugin.mjs +87 -0
- package/lint/grit-rules.mjs +40 -0
- package/lint/no-component-style-classes.grit +16 -0
- package/lint/no-raw-type-classes.grit +2 -3
- package/lint/write-grit-rules.mjs +19 -0
- package/package.json +11 -2
- package/dist/styles/type-scale.css +0 -72
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
/* Block padding lives inside the scroller, never on the popup: the scroll edge would clip a focus ring on the first or last row. */
|
|
86
86
|
:where([data-control-family="popup"][data-popup-kind="drawer"][data-slot="body"][data-padding="default"]) {
|
|
87
87
|
padding-block: calc(var(--spacing) * 4);
|
|
88
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
:where([data-control-family="popup"][data-popup-kind="drawer"][data-slot="body"][data-padding="default"]:last-child) {
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
:where([data-control-family="popup"][data-popup-kind="command"][data-slot="group"] [cmdk-group-heading]) {
|
|
67
|
-
padding-inline:
|
|
68
|
-
padding-block:
|
|
69
|
-
text-transform:
|
|
70
|
-
font-size: var(--
|
|
67
|
+
padding-inline: var(--cui-popup-command-heading-padding-inline);
|
|
68
|
+
padding-block: var(--cui-popup-command-heading-padding-block);
|
|
69
|
+
text-transform: var(--cui-popup-command-heading-text-transform);
|
|
70
|
+
font-size: var(--cui-popup-command-heading-font-size);
|
|
71
71
|
font-weight: var(--font-weight-medium);
|
|
72
|
-
letter-spacing:
|
|
72
|
+
letter-spacing: var(--cui-popup-command-heading-letter-spacing);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
:where([data-control-family="popup"][data-popup-kind="command"][data-slot="empty"]),
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
:where([data-control-family="popup"][data-popup-part="separator"]) {
|
|
156
|
-
margin-block:
|
|
156
|
+
margin-block: var(--cui-popup-separator-gap);
|
|
157
157
|
margin-inline: var(--cui-popup-separator-inset);
|
|
158
158
|
block-size: 1px;
|
|
159
159
|
background-color: var(--cui-popup-separator-color);
|
|
@@ -175,6 +175,7 @@
|
|
|
175
175
|
margin-inline-start: auto;
|
|
176
176
|
padding-inline-start: calc(var(--spacing) * 4);
|
|
177
177
|
line-height: 1;
|
|
178
|
+
color: var(--cui-popup-submenu-indicator-foreground);
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
:where([data-control-family="popup"][data-popup-part="bar"]) {
|
|
@@ -317,3 +318,51 @@
|
|
|
317
318
|
inherits: true;
|
|
318
319
|
initial-value: 0px;
|
|
319
320
|
}
|
|
321
|
+
|
|
322
|
+
@property --cui-popup-separator-gap {
|
|
323
|
+
syntax: "<length-percentage>";
|
|
324
|
+
inherits: true;
|
|
325
|
+
initial-value: 0px;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
@property --cui-popup-submenu-indicator-foreground {
|
|
329
|
+
syntax: "<color>";
|
|
330
|
+
inherits: true;
|
|
331
|
+
initial-value: transparent;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
@property --cui-popup-command-heading-padding-block {
|
|
335
|
+
syntax: "<length-percentage>";
|
|
336
|
+
inherits: true;
|
|
337
|
+
initial-value: 0px;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
@property --cui-popup-command-heading-padding-inline {
|
|
341
|
+
syntax: "<length-percentage>";
|
|
342
|
+
inherits: true;
|
|
343
|
+
initial-value: 0px;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
@property --cui-popup-command-heading-font-size {
|
|
347
|
+
syntax: "<length-percentage>";
|
|
348
|
+
inherits: true;
|
|
349
|
+
initial-value: 0px;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
@property --cui-popup-command-heading-letter-spacing {
|
|
353
|
+
syntax: "<length>";
|
|
354
|
+
inherits: true;
|
|
355
|
+
initial-value: 0px;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
@property --cui-popup-command-heading-text-transform {
|
|
359
|
+
syntax: "none | uppercase | lowercase | capitalize";
|
|
360
|
+
inherits: true;
|
|
361
|
+
initial-value: none;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
@property --cui-popup-dialog-max-inline-size {
|
|
365
|
+
syntax: "<length-percentage>";
|
|
366
|
+
inherits: true;
|
|
367
|
+
initial-value: 0px;
|
|
368
|
+
}
|
|
@@ -63,7 +63,13 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
:where([data-control-family="popup"][data-popup-kind="tooltip"][data-slot="content"][data-popup-part="surface"][data-arrow="true"]) {
|
|
66
|
-
--_popup-tooltip-content-radius: clamp(0px, var(--cui-popup-radius),
|
|
66
|
+
--_popup-tooltip-content-radius: clamp(0px, var(--cui-popup-radius), var(--cui-popup-tooltip-arrow-radius));
|
|
67
67
|
border-radius: var(--_popup-tooltip-content-radius);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
+
|
|
71
|
+
@property --cui-popup-tooltip-arrow-radius {
|
|
72
|
+
syntax: "<length-percentage>";
|
|
73
|
+
inherits: true;
|
|
74
|
+
initial-value: 0px;
|
|
75
|
+
}
|
|
@@ -37,6 +37,15 @@
|
|
|
37
37
|
--cui-popup-label-text-transform: uppercase;
|
|
38
38
|
--cui-popup-separator-color: var(--border);
|
|
39
39
|
--cui-popup-separator-inset: calc(var(--popover-padding) * -1);
|
|
40
|
+
--cui-popup-separator-gap: calc(var(--spacing) * 1);
|
|
41
|
+
--cui-popup-submenu-indicator-foreground: var(--cui-popup-item-foreground);
|
|
42
|
+
--cui-popup-tooltip-arrow-radius: 3px;
|
|
43
|
+
--cui-popup-command-heading-padding-block: calc(var(--spacing) * 1.5);
|
|
44
|
+
--cui-popup-command-heading-padding-inline: calc(var(--spacing) * 2);
|
|
45
|
+
--cui-popup-command-heading-font-size: var(--text-caption);
|
|
46
|
+
--cui-popup-command-heading-letter-spacing: calc(var(--cui-popup-command-heading-font-size) * 0.08);
|
|
47
|
+
--cui-popup-command-heading-text-transform: uppercase;
|
|
48
|
+
--cui-popup-dialog-max-inline-size: 32rem;
|
|
40
49
|
--cui-popup-shortcut-foreground: var(--muted-foreground);
|
|
41
50
|
--cui-popup-shortcut-font-size: var(--text-body);
|
|
42
51
|
--cui-popup-shortcut-letter-spacing: 0.02em;
|
|
@@ -197,6 +206,7 @@
|
|
|
197
206
|
)
|
|
198
207
|
) {
|
|
199
208
|
--cui-popup-shortcut-foreground: var(--cui-popup-item-highlight-foreground);
|
|
209
|
+
--cui-popup-submenu-indicator-foreground: var(--cui-popup-item-highlight-foreground);
|
|
200
210
|
--muted-foreground: var(--cui-popup-item-highlight-muted-foreground);
|
|
201
211
|
background-color: var(--cui-popup-item-highlight-background);
|
|
202
212
|
color: var(--cui-popup-item-highlight-foreground);
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
--cui-range-indicator-radius: 9999px;
|
|
6
6
|
--cui-range-indicator-background: var(--primary);
|
|
7
7
|
--cui-range-thumb-radius: 9999px;
|
|
8
|
+
--cui-range-thumb-inline-size: calc(var(--spacing) * 3.5);
|
|
9
|
+
--cui-range-thumb-block-size: calc(var(--spacing) * 3.5);
|
|
8
10
|
--cui-range-thumb-background: var(--background);
|
|
9
11
|
--cui-range-thumb-border-color: var(--control-rim);
|
|
10
12
|
--cui-range-thumb-shadow: var(--shadow-sm);
|
|
@@ -85,8 +87,8 @@
|
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
:where([data-control-family="range"][data-range-kind="slider"][data-slot="thumb"][data-variant="default"]) {
|
|
88
|
-
inline-size:
|
|
89
|
-
block-size:
|
|
90
|
+
inline-size: var(--cui-range-thumb-inline-size);
|
|
91
|
+
block-size: var(--cui-range-thumb-block-size);
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
:where([data-control-family="range"][data-range-kind="slider"][data-slot="thumb"]) {
|
|
@@ -347,6 +349,18 @@
|
|
|
347
349
|
initial-value: 0px;
|
|
348
350
|
}
|
|
349
351
|
|
|
352
|
+
@property --cui-range-thumb-inline-size {
|
|
353
|
+
syntax: "<length-percentage>";
|
|
354
|
+
inherits: true;
|
|
355
|
+
initial-value: 0px;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
@property --cui-range-thumb-block-size {
|
|
359
|
+
syntax: "<length-percentage>";
|
|
360
|
+
inherits: true;
|
|
361
|
+
initial-value: 0px;
|
|
362
|
+
}
|
|
363
|
+
|
|
350
364
|
@property --cui-range-thumb-background {
|
|
351
365
|
syntax: "<color>";
|
|
352
366
|
inherits: true;
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
--focus-ring-offset: calc(var(--focus-ring-width) * -1);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
@
|
|
97
|
+
@variant sidebar {
|
|
98
98
|
:where(
|
|
99
99
|
[data-control-family="sidebar"][data-slot="root"][data-variant="inset"][data-state]
|
|
100
100
|
~ [data-control-family="sidebar"][data-slot="inset"]
|
|
@@ -122,6 +122,10 @@
|
|
|
122
122
|
box-shadow: var(--cui-sidebar-header-shadow);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
:where([data-control-family="sidebar"][data-slot="header"][data-divider]) {
|
|
126
|
+
border-block-end: var(--cui-sidebar-header-border-width) solid var(--cui-sidebar-header-border-color);
|
|
127
|
+
}
|
|
128
|
+
|
|
125
129
|
:where([data-control-family="sidebar"][data-slot="content-stack"]) {
|
|
126
130
|
gap: calc(var(--spacing) * 2);
|
|
127
131
|
}
|
|
@@ -219,3 +223,15 @@
|
|
|
219
223
|
inherits: true;
|
|
220
224
|
initial-value: transparent;
|
|
221
225
|
}
|
|
226
|
+
|
|
227
|
+
@property --cui-sidebar-header-border-width {
|
|
228
|
+
syntax: "<length>";
|
|
229
|
+
inherits: true;
|
|
230
|
+
initial-value: 0px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@property --cui-sidebar-header-border-color {
|
|
234
|
+
syntax: "<color>";
|
|
235
|
+
inherits: true;
|
|
236
|
+
initial-value: transparent;
|
|
237
|
+
}
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
background-image: var(--cui-sidebar-wrapper-background-image);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
:where([data-control-family="sidebar"][data-slot="wrapper"][data-surface="background"]) {
|
|
21
|
+
--cui-sidebar-wrapper-background: var(--background);
|
|
22
|
+
color: var(--foreground);
|
|
23
|
+
}
|
|
24
|
+
|
|
20
25
|
:where([data-control-family="sidebar"][data-slot="wrapper"]:has([data-control-family="sidebar"][data-variant="inset"][data-state])) {
|
|
21
26
|
--cui-sidebar-wrapper-background: var(--sidebar);
|
|
22
27
|
}
|
|
@@ -35,6 +40,8 @@
|
|
|
35
40
|
--cui-sidebar-inner-shadow: none;
|
|
36
41
|
--cui-sidebar-header-background: transparent;
|
|
37
42
|
--cui-sidebar-header-shadow: 0 0 transparent;
|
|
43
|
+
--cui-sidebar-header-border-width: 1px;
|
|
44
|
+
--cui-sidebar-header-border-color: var(--sidebar-border);
|
|
38
45
|
--cui-sidebar-rail-divider-background: transparent;
|
|
39
46
|
--cui-sidebar-group-label-foreground: oklch(from var(--sidebar-foreground) l c h / 0.7);
|
|
40
47
|
--cui-sidebar-group-label-font-size: var(--text-caption);
|
|
@@ -71,6 +78,10 @@
|
|
|
71
78
|
background-color: transparent;
|
|
72
79
|
}
|
|
73
80
|
|
|
81
|
+
:where([data-control-family="sidebar"][data-slot="root"]:is([data-variant="page"], [data-variant="inset"])[data-state]) {
|
|
82
|
+
--cui-sidebar-header-border-width: 0px;
|
|
83
|
+
}
|
|
84
|
+
|
|
74
85
|
:where([data-control-family="sidebar"][data-slot="gap"]) {
|
|
75
86
|
background-color: transparent;
|
|
76
87
|
transition: width var(--_sidebar-transition-duration) var(--ease-standard);
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
--cui-tabs-indicator-shadow: var(--shadow-sm);
|
|
23
23
|
--cui-tabs-border-color: var(--border);
|
|
24
24
|
--cui-tabs-border-width: var(--control-rim-width);
|
|
25
|
+
--cui-tabs-font-size: var(--text-label);
|
|
26
|
+
--cui-tabs-font-weight: var(--font-weight-medium);
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
:where([data-control-family="tabs"][data-slot="root"][data-orientation="vertical"]) {
|
|
@@ -30,14 +32,15 @@
|
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
:where([data-control-family="tabs"][data-slot="list"]) {
|
|
33
|
-
--
|
|
35
|
+
--cui-tabs-trigger-height: var(--control-h-sm);
|
|
36
|
+
--_tabs-trigger-radius-fit: min(var(--cui-tabs-trigger-radius), calc(var(--cui-tabs-trigger-height) / 2));
|
|
34
37
|
position: relative;
|
|
35
38
|
display: flex;
|
|
36
|
-
min-height: calc(var(--
|
|
39
|
+
min-height: calc(var(--cui-tabs-trigger-height) + var(--cui-tabs-list-padding) + var(--cui-tabs-list-padding));
|
|
37
40
|
width: fit-content;
|
|
38
41
|
align-items: center;
|
|
39
42
|
gap: calc(var(--spacing) * 1);
|
|
40
|
-
border-radius: min(var(--cui-tabs-list-radius), calc(var(--
|
|
43
|
+
border-radius: min(var(--cui-tabs-list-radius), calc(var(--cui-tabs-trigger-height) / 2 + var(--cui-tabs-list-padding)));
|
|
41
44
|
background: var(--cui-tabs-list-background);
|
|
42
45
|
box-shadow: var(--cui-tabs-list-shadow);
|
|
43
46
|
padding: var(--cui-tabs-list-padding);
|
|
@@ -45,12 +48,24 @@
|
|
|
45
48
|
backdrop-filter: var(--cui-tabs-list-backdrop-filter);
|
|
46
49
|
}
|
|
47
50
|
|
|
51
|
+
:where([data-control-family="tabs"][data-slot="list"][data-size="xs"]) {
|
|
52
|
+
--cui-tabs-trigger-height: var(--control-h-xs);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:where([data-control-family="tabs"][data-slot="list"][data-size="md"]) {
|
|
56
|
+
--cui-tabs-trigger-height: var(--control-h-md);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:where([data-control-family="tabs"][data-slot="list"][data-size="lg"]) {
|
|
60
|
+
--cui-tabs-trigger-height: var(--control-h-lg);
|
|
61
|
+
}
|
|
62
|
+
|
|
48
63
|
:where([data-control-family="tabs"][data-slot="indicator"]) {
|
|
49
64
|
position: absolute;
|
|
50
65
|
top: 50%;
|
|
51
66
|
left: 0;
|
|
52
67
|
z-index: 0;
|
|
53
|
-
height: var(--
|
|
68
|
+
height: var(--cui-tabs-trigger-height);
|
|
54
69
|
width: var(--active-tab-width);
|
|
55
70
|
transform: translateX(var(--active-tab-left)) translateY(-50%);
|
|
56
71
|
border-radius: var(--_tabs-trigger-radius-fit);
|
|
@@ -81,7 +96,7 @@
|
|
|
81
96
|
position: relative;
|
|
82
97
|
z-index: 1;
|
|
83
98
|
display: inline-flex;
|
|
84
|
-
height: var(--
|
|
99
|
+
height: var(--cui-tabs-trigger-height);
|
|
85
100
|
flex-shrink: 0;
|
|
86
101
|
cursor: pointer;
|
|
87
102
|
align-items: center;
|
|
@@ -91,8 +106,8 @@
|
|
|
91
106
|
border-radius: var(--_tabs-trigger-radius-fit);
|
|
92
107
|
padding-inline: calc(var(--spacing) * 3.5);
|
|
93
108
|
color: var(--cui-tabs-foreground);
|
|
94
|
-
font-size: var(--
|
|
95
|
-
font-weight: var(--font-weight
|
|
109
|
+
font-size: var(--cui-tabs-font-size);
|
|
110
|
+
font-weight: var(--cui-tabs-font-weight);
|
|
96
111
|
}
|
|
97
112
|
|
|
98
113
|
:where([data-control-family="tabs"][data-slot="list"]:not([data-orientation="vertical"], [data-variant="browser"]) [data-slot="tab"]) {
|
|
@@ -129,7 +144,7 @@
|
|
|
129
144
|
:where([data-control-family="tabs"][data-slot="list"][data-variant="browser"]) {
|
|
130
145
|
--_tabs-browser-corner-double: calc(var(--_tabs-trigger-radius-fit) + var(--_tabs-trigger-radius-fit));
|
|
131
146
|
--_tabs-browser-inset: calc(var(--_tabs-trigger-radius-fit) + var(--cui-tabs-surface-radius));
|
|
132
|
-
min-height: calc(var(--
|
|
147
|
+
min-height: calc(var(--cui-tabs-trigger-height) + var(--cui-tabs-list-padding));
|
|
133
148
|
width: auto;
|
|
134
149
|
align-items: flex-end;
|
|
135
150
|
isolation: isolate;
|
|
@@ -269,6 +284,12 @@
|
|
|
269
284
|
initial-value: 0px;
|
|
270
285
|
}
|
|
271
286
|
|
|
287
|
+
@property --cui-tabs-trigger-height {
|
|
288
|
+
syntax: "<length-percentage>";
|
|
289
|
+
inherits: true;
|
|
290
|
+
initial-value: 0px;
|
|
291
|
+
}
|
|
292
|
+
|
|
272
293
|
@property --cui-tabs-list-padding {
|
|
273
294
|
syntax: "<length-percentage>";
|
|
274
295
|
inherits: true;
|
|
@@ -304,6 +325,18 @@
|
|
|
304
325
|
initial-value: transparent;
|
|
305
326
|
}
|
|
306
327
|
|
|
328
|
+
@property --cui-tabs-font-size {
|
|
329
|
+
syntax: "<length-percentage>";
|
|
330
|
+
inherits: true;
|
|
331
|
+
initial-value: 0px;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
@property --cui-tabs-font-weight {
|
|
335
|
+
syntax: "<number>";
|
|
336
|
+
inherits: true;
|
|
337
|
+
initial-value: 400;
|
|
338
|
+
}
|
|
339
|
+
|
|
307
340
|
@property --cui-tabs-active-foreground {
|
|
308
341
|
syntax: "<color>";
|
|
309
342
|
inherits: true;
|
|
@@ -7,11 +7,14 @@
|
|
|
7
7
|
--cui-timeline-success-foreground: var(--foreground);
|
|
8
8
|
--cui-timeline-error-foreground: var(--destructive-text);
|
|
9
9
|
--cui-timeline-separator-background: var(--border);
|
|
10
|
+
--cui-timeline-separator-inline-size: 1px;
|
|
10
11
|
--cui-timeline-title-foreground: var(--foreground);
|
|
12
|
+
--cui-timeline-title-font-weight: var(--font-weight-medium);
|
|
13
|
+
--cui-timeline-item-padding-block: calc(var(--spacing) * 5);
|
|
11
14
|
}
|
|
12
15
|
:where([data-control-family="timeline"][data-slot="item"]) {
|
|
13
16
|
column-gap: calc(var(--spacing) * 3);
|
|
14
|
-
padding-block-end:
|
|
17
|
+
padding-block-end: var(--cui-timeline-item-padding-block);
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
:where([data-control-family="timeline"][data-slot="item"]:last-child) {
|
|
@@ -52,13 +55,15 @@
|
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
:where([data-control-family="timeline"][data-slot="separator"]) {
|
|
58
|
+
inset-inline-start: calc(var(--spacing) * 2 - var(--cui-timeline-separator-inline-size) / 2);
|
|
59
|
+
inline-size: var(--cui-timeline-separator-inline-size);
|
|
55
60
|
background: var(--cui-timeline-separator-background);
|
|
56
61
|
}
|
|
57
62
|
|
|
58
63
|
:where([data-control-family="timeline"][data-slot="title"]) {
|
|
59
64
|
color: var(--cui-timeline-title-foreground);
|
|
60
65
|
font-size: var(--text-label);
|
|
61
|
-
font-weight: var(--font-weight
|
|
66
|
+
font-weight: var(--cui-timeline-title-font-weight);
|
|
62
67
|
line-height: calc(var(--spacing) * 5);
|
|
63
68
|
text-wrap: balance;
|
|
64
69
|
}
|
|
@@ -118,3 +123,21 @@
|
|
|
118
123
|
inherits: true;
|
|
119
124
|
initial-value: transparent;
|
|
120
125
|
}
|
|
126
|
+
|
|
127
|
+
@property --cui-timeline-title-font-weight {
|
|
128
|
+
syntax: "<number>";
|
|
129
|
+
inherits: true;
|
|
130
|
+
initial-value: 400;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@property --cui-timeline-item-padding-block {
|
|
134
|
+
syntax: "<length-percentage>";
|
|
135
|
+
inherits: true;
|
|
136
|
+
initial-value: 0px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@property --cui-timeline-separator-inline-size {
|
|
140
|
+
syntax: "<length-percentage>";
|
|
141
|
+
inherits: true;
|
|
142
|
+
initial-value: 0px;
|
|
143
|
+
}
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
--cui-tree-item-trigger-font-size: var(--text-body);
|
|
11
11
|
--cui-tree-item-trigger-selected-font-weight: var(--font-weight-normal);
|
|
12
12
|
--cui-tree-indent-inset: 1.25rem;
|
|
13
|
+
--cui-tree-guide-background: transparent;
|
|
14
|
+
--cui-tree-guide-inline-size: 1px;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
:where([data-control-family="tree"][data-slot="list"]) {
|
|
@@ -119,10 +121,29 @@
|
|
|
119
121
|
}
|
|
120
122
|
|
|
121
123
|
:where([data-control-family="tree"][data-slot="item-group"]) {
|
|
124
|
+
position: relative;
|
|
122
125
|
translate: 0 0;
|
|
123
126
|
transition: translate var(--duration-base) var(--ease-emphasized);
|
|
124
127
|
}
|
|
125
128
|
|
|
129
|
+
:where([data-control-family="tree"][data-slot="item-group"])::before {
|
|
130
|
+
content: "";
|
|
131
|
+
position: absolute;
|
|
132
|
+
inset-block: 0;
|
|
133
|
+
inset-inline-start: calc(
|
|
134
|
+
var(--_tree-level, 1) *
|
|
135
|
+
var(--cui-tree-indent-inset) +
|
|
136
|
+
var(--spacing) *
|
|
137
|
+
2 -
|
|
138
|
+
var(--cui-tree-guide-inline-size) /
|
|
139
|
+
2
|
|
140
|
+
);
|
|
141
|
+
inline-size: var(--cui-tree-guide-inline-size);
|
|
142
|
+
border-radius: var(--cui-tree-guide-inline-size);
|
|
143
|
+
background-color: var(--cui-tree-guide-background);
|
|
144
|
+
pointer-events: none;
|
|
145
|
+
}
|
|
146
|
+
|
|
126
147
|
:where([data-control-family="tree"][data-slot="item-content"]:is([data-starting-style], [data-ending-style]) > [data-slot="item-group"]) {
|
|
127
148
|
translate: 0 calc(var(--spacing) * -1);
|
|
128
149
|
}
|
|
@@ -187,3 +208,15 @@
|
|
|
187
208
|
inherits: true;
|
|
188
209
|
initial-value: transparent;
|
|
189
210
|
}
|
|
211
|
+
|
|
212
|
+
@property --cui-tree-guide-background {
|
|
213
|
+
syntax: "<color>";
|
|
214
|
+
inherits: true;
|
|
215
|
+
initial-value: transparent;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@property --cui-tree-guide-inline-size {
|
|
219
|
+
syntax: "<length-percentage>";
|
|
220
|
+
inherits: true;
|
|
221
|
+
initial-value: 0px;
|
|
222
|
+
}
|
package/dist/styles/theme.css
CHANGED
|
@@ -242,10 +242,15 @@
|
|
|
242
242
|
--font-body: var(--font-sans);
|
|
243
243
|
--font-display: var(--font-sans);
|
|
244
244
|
--text-micro: 0.625rem;
|
|
245
|
+
--text-micro--line-height: 1.5;
|
|
245
246
|
--text-caption: 0.6875rem;
|
|
247
|
+
--text-caption--line-height: 1.5;
|
|
246
248
|
--text-label: 0.75rem;
|
|
249
|
+
--text-label--line-height: 1.5;
|
|
247
250
|
--text-body: 0.875rem;
|
|
251
|
+
--text-body--line-height: 1.5;
|
|
248
252
|
--text-body-lg: 1rem;
|
|
253
|
+
--text-body-lg--line-height: 1.5;
|
|
249
254
|
--text-heading-4: 0.9375rem;
|
|
250
255
|
--text-heading-4--line-height: 1.4;
|
|
251
256
|
--text-heading-4--font-weight: 600;
|
|
@@ -421,7 +426,7 @@
|
|
|
421
426
|
/* biome-ignore-end lint/complexity/noImportantStyles: Reduced motion must override skin and inline motion. */
|
|
422
427
|
|
|
423
428
|
@theme static {
|
|
424
|
-
--breakpoint-
|
|
429
|
+
--breakpoint-sidebar: 64rem;
|
|
425
430
|
}
|
|
426
431
|
|
|
427
432
|
@theme inline {
|
|
@@ -485,10 +490,15 @@
|
|
|
485
490
|
--spacing-control-lg: var(--control-h-lg);
|
|
486
491
|
|
|
487
492
|
--text-micro: var(--text-micro);
|
|
493
|
+
--text-micro--line-height: var(--text-micro--line-height);
|
|
488
494
|
--text-caption: var(--text-caption);
|
|
495
|
+
--text-caption--line-height: var(--text-caption--line-height);
|
|
489
496
|
--text-label: var(--text-label);
|
|
497
|
+
--text-label--line-height: var(--text-label--line-height);
|
|
490
498
|
--text-body: var(--text-body);
|
|
499
|
+
--text-body--line-height: var(--text-body--line-height);
|
|
491
500
|
--text-body-lg: var(--text-body-lg);
|
|
501
|
+
--text-body-lg--line-height: var(--text-body-lg--line-height);
|
|
492
502
|
--text-heading-4: var(--text-heading-4);
|
|
493
503
|
--text-heading-4--line-height: var(--text-heading-4--line-height);
|
|
494
504
|
--text-heading-4--font-weight: var(--text-heading-4--font-weight);
|
package/dist/ui/alert-dialog.js
CHANGED
|
@@ -53,7 +53,7 @@ function AlertDialogContent({ className, children, ...props }) {
|
|
|
53
53
|
"data-control-family": "popup",
|
|
54
54
|
"data-popup-part": "surface",
|
|
55
55
|
"data-surface": "modal",
|
|
56
|
-
className: cn("fixed left-1/2 top-[12vh] z-(--z-modal) grid w-[calc(100%-2rem)]
|
|
56
|
+
className: cn("fixed left-1/2 top-[12vh] z-(--z-modal) grid w-[calc(100%-2rem)] -translate-x-1/2", className),
|
|
57
57
|
...props,
|
|
58
58
|
children
|
|
59
59
|
})] });
|
package/dist/ui/badge.js
CHANGED
|
@@ -27,7 +27,7 @@ function Badge({ variant = "default", size = "md", color, render, className, chi
|
|
|
27
27
|
"data-variant": variant,
|
|
28
28
|
"data-size": size,
|
|
29
29
|
"data-color": resolvedColor,
|
|
30
|
-
className: cn("inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap
|
|
30
|
+
className: cn("inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap [&>svg]:pointer-events-none [&>svg]:size-3", className),
|
|
31
31
|
children
|
|
32
32
|
}
|
|
33
33
|
});
|
package/dist/ui/calendar.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { useSkin } from "../skin-provider.js";
|
|
3
4
|
import { useEffect, useRef } from "react";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { CaptionLabel, Day, DayPicker, Month, MonthCaption, MonthGrid, Months, Nav, Weekday } from "react-day-picker";
|
|
@@ -12,7 +13,8 @@ const chevronPathByOrientation = {
|
|
|
12
13
|
up: "M3 10 8 5.5 13 10",
|
|
13
14
|
down: "M3 6 8 10.5 13 6"
|
|
14
15
|
};
|
|
15
|
-
function Calendar({ className, showOutsideDays
|
|
16
|
+
function Calendar({ className, showOutsideDays, style, ...props }) {
|
|
17
|
+
const skin = useSkin();
|
|
16
18
|
return /* @__PURE__ */ jsx("div", {
|
|
17
19
|
"data-control-ui": "calendar",
|
|
18
20
|
"data-control-family": "calendar",
|
|
@@ -20,7 +22,7 @@ function Calendar({ className, showOutsideDays = true, style, ...props }) {
|
|
|
20
22
|
className: cn("w-fit", className),
|
|
21
23
|
style,
|
|
22
24
|
children: /* @__PURE__ */ jsx(DayPicker, {
|
|
23
|
-
showOutsideDays,
|
|
25
|
+
showOutsideDays: showOutsideDays ?? skin.calendarShowOutsideDays ?? true,
|
|
24
26
|
components: {
|
|
25
27
|
Chevron: CalendarChevron,
|
|
26
28
|
Months: CalendarMonths,
|
|
@@ -111,12 +113,15 @@ function CalendarWeekday({ className, ...props }) {
|
|
|
111
113
|
...props
|
|
112
114
|
});
|
|
113
115
|
}
|
|
114
|
-
function CalendarDay({ className, ...props }) {
|
|
116
|
+
function CalendarDay({ className, day, ...props }) {
|
|
117
|
+
const dayOfWeek = day.date.getDay();
|
|
115
118
|
return /* @__PURE__ */ jsx(Day, {
|
|
116
119
|
"data-control-ui": "calendar",
|
|
117
120
|
"data-control-family": "calendar",
|
|
118
121
|
"data-slot": "day-cell",
|
|
119
|
-
|
|
122
|
+
"data-weekend": dayOfWeek === 0 || dayOfWeek === 6 ? true : void 0,
|
|
123
|
+
className: cn("align-middle", className),
|
|
124
|
+
day,
|
|
120
125
|
...props
|
|
121
126
|
});
|
|
122
127
|
}
|
package/dist/ui/card.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ import { CardKnobStyle } from "../knob-contracts/card-knobs.js";
|
|
|
3
3
|
import { CSSProperties, ComponentProps } from "react";
|
|
4
4
|
//#region src/ui/card.d.ts
|
|
5
5
|
export type CardVariant = "default" | "sectioned";
|
|
6
|
+
export type CardSize = "default" | "sm";
|
|
6
7
|
export type CardProps = Omit<ComponentProps<"div">, "style"> & {
|
|
7
8
|
style?: CSSProperties & CardKnobStyle;
|
|
8
9
|
} & {
|
|
9
10
|
variant?: CardVariant;
|
|
11
|
+
size?: CardSize;
|
|
10
12
|
};
|
|
11
13
|
export type CardHeaderProps = ComponentProps<"div"> & {
|
|
12
14
|
style?: CSSProperties & CardKnobStyle;
|
|
@@ -27,7 +29,7 @@ export type CardContentProps = ComponentProps<"div"> & {
|
|
|
27
29
|
export type CardFooterProps = ComponentProps<"div"> & {
|
|
28
30
|
style?: CSSProperties & CardKnobStyle;
|
|
29
31
|
};
|
|
30
|
-
export declare function Card({ variant, className, ...props }: CardProps): import("react").JSX.Element;
|
|
32
|
+
export declare function Card({ variant, size, className, ...props }: CardProps): import("react").JSX.Element;
|
|
31
33
|
export declare function CardHeader({ className, ...props }: CardHeaderProps): import("react").JSX.Element;
|
|
32
34
|
export declare function CardTitle({ render, ...props }: CardTitleProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
33
35
|
export declare function CardDescription({ className, ...props }: CardDescriptionProps): import("react").JSX.Element;
|
package/dist/ui/card.js
CHANGED
|
@@ -3,13 +3,14 @@ import { cn } from "../lib/cn.js";
|
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/ui/card.tsx
|
|
6
|
-
function Card({ variant = "default", className, ...props }) {
|
|
6
|
+
function Card({ variant = "default", size = "default", className, ...props }) {
|
|
7
7
|
return /* @__PURE__ */ jsx("div", {
|
|
8
8
|
"data-control-ui": "card",
|
|
9
9
|
"data-control-family": "card",
|
|
10
10
|
"data-slot": "root",
|
|
11
11
|
"data-surface": "panel",
|
|
12
12
|
"data-variant": variant,
|
|
13
|
+
"data-size": size,
|
|
13
14
|
className: cn("flex flex-col", className),
|
|
14
15
|
...props
|
|
15
16
|
});
|
package/dist/ui/dialog.js
CHANGED
|
@@ -54,7 +54,7 @@ function DialogContent({ className, children, showCloseButton = true, closeLabel
|
|
|
54
54
|
"data-control-family": "popup",
|
|
55
55
|
"data-popup-part": "surface",
|
|
56
56
|
"data-surface": "modal",
|
|
57
|
-
className: cn("fixed left-1/2 top-[12vh] z-(--z-modal) grid w-[calc(100%-2rem)]
|
|
57
|
+
className: cn("fixed left-1/2 top-[12vh] z-(--z-modal) grid w-[calc(100%-2rem)] -translate-x-1/2", className),
|
|
58
58
|
...props,
|
|
59
59
|
children: [
|
|
60
60
|
skinAdornment(skin, "dialog", "titlebar", {}),
|
|
@@ -35,7 +35,7 @@ export type DropdownMenuLabelProps = Omit<ComponentProps<"div">, "style"> & {
|
|
|
35
35
|
style?: CSSProperties & PopupKnobStyle;
|
|
36
36
|
};
|
|
37
37
|
export declare function DropdownMenu({ children, ...props }: DropdownMenuProps): import("react").JSX.Element;
|
|
38
|
-
export declare function DropdownMenuTrigger({ size, iconOnly, variant, className,
|
|
38
|
+
export declare function DropdownMenuTrigger({ size, iconOnly, variant, className, ...props }: DropdownMenuTriggerProps): import("react").JSX.Element;
|
|
39
39
|
export declare function DropdownMenuContent({ className, children, side, sideOffset, align, alignOffset, collisionBoundary, collisionPadding, collisionAvoidance, ...props }: DropdownMenuContentProps): import("react").JSX.Element;
|
|
40
40
|
export declare function DropdownMenuItem({ className, ...props }: DropdownMenuItemProps): import("react").JSX.Element;
|
|
41
41
|
export declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps): import("react").JSX.Element;
|