@prunellejs/ui 0.1.1 → 0.5.3
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/llms.txt +9 -3
- package/package.json +2 -2
- package/src/CommandPalette.tsx +120 -67
- package/src/DataTable.tsx +27 -17
- package/src/Dialog.tsx +29 -13
- package/src/Menu.tsx +10 -8
- package/src/Select.tsx +16 -6
- package/src/Toaster.tsx +112 -2
- package/src/behaviors.ts +108 -6
- package/src/index.ts +1 -1
- package/src/plugin.ts +96 -32
- package/src/styles/bare.css +21 -312
- package/src/styles/base.css +55 -0
- package/src/styles/components/accordion.css +10 -0
- package/src/styles/components/badge.css +6 -0
- package/src/styles/components/button.css +11 -0
- package/src/styles/components/card.css +5 -0
- package/src/styles/components/checkbox.css +11 -0
- package/src/styles/components/command.css +25 -0
- package/src/styles/components/datatable.css +9 -0
- package/src/styles/components/dialog.css +16 -0
- package/src/styles/components/drawer.css +29 -0
- package/src/styles/components/field.css +8 -0
- package/src/styles/components/layout.css +69 -0
- package/src/styles/components/menu.css +21 -0
- package/src/styles/components/notice.css +5 -0
- package/src/styles/components/popover.css +8 -0
- package/src/styles/components/progress.css +14 -0
- package/src/styles/components/radio-group.css +11 -0
- package/src/styles/components/select.css +25 -0
- package/src/styles/components/switch.css +42 -0
- package/src/styles/components/tabs.css +4 -0
- package/src/styles/components/toast.css +28 -0
- package/src/styles/grammars/console.css +113 -256
- package/src/styles/grammars/editorial.css +99 -270
- package/src/styles/grammars/orbit.css +118 -388
- package/src/styles/grammars/prunelle.css +157 -360
- package/src/styles/grammars/soft.css +103 -237
- package/src/styles/grammars/workshop.css +104 -246
- package/src/styles/scan.ts +137 -0
- package/src/styles/split.ts +381 -0
- package/src/styles/theme.css +21 -0
- package/src/styles/themed/accordion.css +20 -0
- package/src/styles/themed/badge.css +20 -0
- package/src/styles/themed/button.css +21 -0
- package/src/styles/themed/card.css +23 -0
- package/src/styles/themed/checkbox.css +4 -0
- package/src/styles/themed/command.css +33 -0
- package/src/styles/themed/datatable.css +28 -0
- package/src/styles/themed/dialog.css +13 -0
- package/src/styles/themed/drawer.css +13 -0
- package/src/styles/themed/field.css +22 -0
- package/src/styles/themed/menu.css +21 -0
- package/src/styles/themed/notice.css +17 -0
- package/src/styles/themed/popover.css +11 -0
- package/src/styles/themed/radio-group.css +12 -0
- package/src/styles/themed/select.css +32 -0
- package/src/styles/themed/switch.css +18 -0
- package/src/styles/themed/tabs.css +17 -0
- package/src/styles/themed/toast.css +18 -0
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
* The eye is the only ornament: a radio is an eye, shut until checked; a switch's knob opens its eye when on; Progress looks left and right while it waits, and its pupil widens until it fills the eye.
|
|
4
4
|
* Eject via `prunelle ui-eject prunelle`. */
|
|
5
5
|
|
|
6
|
-
@import '../
|
|
6
|
+
@import '../theme.css';
|
|
7
7
|
|
|
8
|
+
/* @part: progress */
|
|
8
9
|
@property --ui-progress { syntax: '<number>'; inherits: true; initial-value: 0; }
|
|
10
|
+
/* @part: radio-group, switch */
|
|
9
11
|
@property --ui-lid-ink { syntax: '<color>'; inherits: true; initial-value: transparent; }
|
|
10
12
|
|
|
11
13
|
@layer kui {
|
|
@@ -38,50 +40,34 @@
|
|
|
38
40
|
--ui-motion: 180ms;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
html {
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
body {
|
|
46
|
-
background-color: var(--ui-paper);
|
|
47
|
-
color: var(--ui-ink);
|
|
48
|
-
font-family: var(--ui-font-body);
|
|
49
|
-
}
|
|
43
|
+
html { background-color: var(--ui-paper); }
|
|
44
|
+
body { background-color: var(--ui-paper); color: var(--ui-ink); font-family: var(--ui-font-body); }
|
|
50
45
|
|
|
51
46
|
[data-ui="button"] {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
--ui-btn-gap: 0.45rem;
|
|
48
|
+
--ui-btn-h: 34px;
|
|
49
|
+
--ui-btn-pad: 0 14px;
|
|
50
|
+
--ui-btn-f: 500 0.8125rem/1 var(--ui-font-body);
|
|
51
|
+
--ui-btn-bd: 0;
|
|
52
|
+
--ui-btn-sm-h: 28px;
|
|
53
|
+
--ui-btn-sm-pad: 0 10px;
|
|
54
|
+
--ui-btn-sm-fs: 0.75rem;
|
|
55
|
+
--ui-btn-lg-h: 42px;
|
|
56
|
+
--ui-btn-lg-pad: 0 20px;
|
|
57
|
+
--ui-btn-lg-fs: 0.9375rem;
|
|
58
|
+
min-inline-size: var(--ui-touch-min, auto);
|
|
59
59
|
white-space: nowrap;
|
|
60
|
-
border: 0;
|
|
61
|
-
border-radius: var(--ui-radius);
|
|
62
|
-
background: var(--ui-surface);
|
|
63
60
|
box-shadow: inset 0 0 0 1px var(--ui-line-strong);
|
|
64
|
-
color: var(--ui-ink);
|
|
65
|
-
text-decoration: none;
|
|
66
|
-
cursor: pointer;
|
|
67
|
-
transition: box-shadow var(--ui-motion), background-color var(--ui-motion), color var(--ui-motion);
|
|
68
|
-
|
|
69
61
|
&:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ui-ink); }
|
|
70
|
-
&:disabled { opacity: 0.45; cursor: not-allowed; }
|
|
71
|
-
&[data-variant="outline"] { background: transparent; }
|
|
72
62
|
&[data-variant="ghost"] {
|
|
73
|
-
background: transparent;
|
|
74
|
-
box-shadow: none;
|
|
75
63
|
padding-inline: 2px;
|
|
76
64
|
text-decoration: underline 1px var(--ui-accent);
|
|
77
65
|
text-underline-offset: 5px;
|
|
78
66
|
&:hover:not(:disabled) { box-shadow: none; text-decoration-thickness: 2px; }
|
|
79
67
|
}
|
|
80
68
|
&[data-tone="accent"] {
|
|
81
|
-
background: var(--ui-accent-fill);
|
|
82
69
|
box-shadow: none;
|
|
83
70
|
color: var(--ui-on-primary);
|
|
84
|
-
text-decoration: none;
|
|
85
71
|
&:hover:not(:disabled) { box-shadow: none; background: color-mix(in srgb, var(--ui-accent-fill) 86%, var(--ui-paper)); }
|
|
86
72
|
}
|
|
87
73
|
&[data-tone="danger"] {
|
|
@@ -90,104 +76,56 @@
|
|
|
90
76
|
color: var(--ui-danger);
|
|
91
77
|
&:hover:not(:disabled) { background: var(--ui-danger); box-shadow: none; color: var(--ui-on-accent); }
|
|
92
78
|
}
|
|
93
|
-
&[data-size="sm"] { min-block-size: 28px; padding: 0 10px; font-size: 0.75rem; }
|
|
94
|
-
&[data-size="lg"] { min-block-size: 42px; padding: 0 20px; font-size: 0.9375rem; }
|
|
95
|
-
&[data-variant="ghost"][data-size] { padding-inline: 2px; }
|
|
96
79
|
}
|
|
97
80
|
|
|
98
81
|
[data-ui="card"] {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
margin-block-end: 14px;
|
|
109
|
-
border-bottom: 1px solid var(--ui-ink);
|
|
110
|
-
}
|
|
111
|
-
& [data-part="footer"] {
|
|
112
|
-
margin-block-start: 14px;
|
|
113
|
-
padding-block-start: 10px;
|
|
114
|
-
border-top: 1px solid var(--ui-line);
|
|
115
|
-
color: var(--ui-muted);
|
|
116
|
-
font-size: 0.75rem;
|
|
117
|
-
}
|
|
82
|
+
--ui-card-pad: 1.1rem 1.25rem;
|
|
83
|
+
--ui-card-hf: 500 0.9375rem/1.3 var(--ui-font-display);
|
|
84
|
+
--ui-card-hpb: 6px;
|
|
85
|
+
--ui-card-hmb: 14px;
|
|
86
|
+
--ui-card-hbd: 1px solid var(--ui-ink);
|
|
87
|
+
--ui-card-fmt: 14px;
|
|
88
|
+
--ui-card-fpt: 10px;
|
|
89
|
+
--ui-card-fbd: 1px solid var(--ui-line);
|
|
90
|
+
& [data-part="footer"] { font-size: 0.75rem; }
|
|
118
91
|
}
|
|
119
92
|
|
|
120
93
|
/* A badge is a word in its tone after a dot, as in a book's margin. */
|
|
121
94
|
[data-ui="badge"] {
|
|
122
|
-
|
|
123
|
-
|
|
95
|
+
--ui-badge-f: 400 0.8125rem/1.3 var(--ui-font-body);
|
|
96
|
+
--ui-badge-pad: 0;
|
|
124
97
|
gap: 6px;
|
|
125
|
-
font: 400 0.8125rem/1.3 var(--ui-font-body);
|
|
126
98
|
white-space: nowrap;
|
|
127
|
-
|
|
128
|
-
&::before {
|
|
129
|
-
content: '';
|
|
130
|
-
inline-size: 6px;
|
|
131
|
-
block-size: 6px;
|
|
132
|
-
border-radius: 50%;
|
|
133
|
-
background: currentColor;
|
|
134
|
-
flex: none;
|
|
135
|
-
}
|
|
99
|
+
&::before { content: ''; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; flex: none; }
|
|
136
100
|
}
|
|
137
|
-
:is([data-ui="badge"], [data-ui="notice"], [data-ui="toast"])[data-tone="accent"] { --ui-tone: var(--ui-accent); }
|
|
138
|
-
:is([data-ui="badge"], [data-ui="notice"])[data-tone="success"] { --ui-tone: var(--ui-success); }
|
|
139
|
-
:is([data-ui="badge"], [data-ui="notice"])[data-tone="warning"] { --ui-tone: var(--ui-warning); }
|
|
140
|
-
:is([data-ui="badge"], [data-ui="notice"])[data-tone="danger"] { --ui-tone: var(--ui-danger); }
|
|
141
101
|
|
|
142
102
|
/* A notice is a rule in its tone above the text, its bold words in the tone too. */
|
|
143
103
|
[data-ui="notice"] {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
104
|
+
--ui-notice-bw: 2px 0 0 0;
|
|
105
|
+
--ui-notice-bg: transparent;
|
|
106
|
+
--ui-notice-pad: 10px 0 2px;
|
|
147
107
|
font: 400 0.875rem/1.55 var(--ui-font-body);
|
|
148
|
-
|
|
108
|
+
border-top-color: var(--ui-tone);
|
|
109
|
+
& :is(b, strong) { color: var(--ui-tone); font-weight: 600; }
|
|
149
110
|
}
|
|
150
111
|
|
|
151
112
|
[data-ui="field"] {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
color: var(--ui-ink);
|
|
161
|
-
background: var(--ui-surface);
|
|
162
|
-
border: 1px solid var(--ui-line-strong);
|
|
163
|
-
border-radius: var(--ui-radius);
|
|
164
|
-
transition: border-color var(--ui-motion), box-shadow var(--ui-motion);
|
|
165
|
-
}
|
|
166
|
-
& :is(input, textarea, select):focus {
|
|
167
|
-
outline: none;
|
|
168
|
-
border-color: var(--ui-accent);
|
|
169
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 22%, transparent);
|
|
170
|
-
}
|
|
171
|
-
& [aria-invalid="true"] { border-color: var(--ui-danger); }
|
|
172
|
-
& [data-part="hint"] { margin: 0; font-size: 0.75rem; color: var(--ui-muted); }
|
|
173
|
-
& [data-part="error"] { margin: 0; font-size: 0.75rem; color: var(--ui-danger); }
|
|
113
|
+
--ui-fld-gap: 4px;
|
|
114
|
+
--ui-fld-lf: 500 0.8125rem/1.3 var(--ui-font-body);
|
|
115
|
+
--ui-in-h: 34px;
|
|
116
|
+
--ui-in-pad: 0.4rem 10px;
|
|
117
|
+
--ui-in-f: 400 0.875rem/1.4 var(--ui-font-body);
|
|
118
|
+
--ui-in-fs: 0.875rem;
|
|
119
|
+
--ui-fld-ms: 0.75rem;
|
|
120
|
+
& :is(input:not([type="checkbox"], [type="radio"]), textarea, select):focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 22%, transparent); }
|
|
174
121
|
}
|
|
175
122
|
|
|
176
|
-
[data-ui="accordion"]
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
display: flex;
|
|
183
|
-
align-items: center;
|
|
184
|
-
justify-content: space-between;
|
|
185
|
-
gap: 12px;
|
|
186
|
-
padding: 11px 0;
|
|
187
|
-
font: 500 1rem/1.3 var(--ui-font-display);
|
|
188
|
-
color: var(--ui-ink);
|
|
189
|
-
&::-webkit-details-marker { display: none; }
|
|
190
|
-
&::after {
|
|
123
|
+
[data-ui="accordion"] {
|
|
124
|
+
--ui-acc-bb: 1px solid var(--ui-line);
|
|
125
|
+
--ui-acc-tpad: 11px 0;
|
|
126
|
+
--ui-acc-tf: 500 1rem/1.3 var(--ui-font-display);
|
|
127
|
+
--ui-acc-cpad: 0 0 12px;
|
|
128
|
+
& summary[data-part="trigger"]::after {
|
|
191
129
|
content: '';
|
|
192
130
|
inline-size: 7px;
|
|
193
131
|
block-size: 7px;
|
|
@@ -197,122 +135,57 @@
|
|
|
197
135
|
transform: translateY(-2px) rotate(45deg);
|
|
198
136
|
transition: transform var(--ui-motion);
|
|
199
137
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
transform: translateY(2px) rotate(-135deg);
|
|
203
|
-
}
|
|
204
|
-
[data-ui="accordion"] [data-part="content"] {
|
|
205
|
-
padding-block-end: 12px;
|
|
206
|
-
color: var(--ui-muted);
|
|
207
|
-
font-size: 0.875rem;
|
|
208
|
-
line-height: 1.55;
|
|
138
|
+
& details[open] summary[data-part="trigger"]::after { transform: translateY(2px) rotate(-135deg); }
|
|
139
|
+
& [data-part="content"] { font-size: 0.875rem; line-height: 1.55; }
|
|
209
140
|
}
|
|
210
141
|
|
|
211
|
-
[data-ui="tabs"]
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
border: 0;
|
|
219
|
-
padding: 8px 0;
|
|
220
|
-
margin-block-end: -1px;
|
|
221
|
-
font: 400 0.8125rem/1.3 var(--ui-font-body);
|
|
222
|
-
color: var(--ui-muted);
|
|
223
|
-
cursor: pointer;
|
|
224
|
-
transition: color var(--ui-motion), box-shadow var(--ui-motion);
|
|
225
|
-
&:hover { color: var(--ui-ink); }
|
|
226
|
-
&[data-state="active"] {
|
|
227
|
-
color: var(--ui-ink);
|
|
228
|
-
box-shadow: inset 0 -2px 0 var(--ui-accent);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
[data-ui="tabs"] [data-part="panel"] {
|
|
232
|
-
padding-block-start: 14px;
|
|
142
|
+
[data-ui="tabs"] {
|
|
143
|
+
--ui-tab-gap: 22px;
|
|
144
|
+
--ui-tab-lbb: 1px solid var(--ui-line-strong);
|
|
145
|
+
--ui-tab-pad: 8px 0;
|
|
146
|
+
--ui-tab-f: 400 0.8125rem/1.3 var(--ui-font-body);
|
|
147
|
+
--ui-tab-ppad: 14px 0 0;
|
|
148
|
+
& [data-part="trigger"] { margin-block-end: -1px; &[data-state="active"] { box-shadow: inset 0 -2px 0 var(--ui-accent); } }
|
|
233
149
|
}
|
|
234
150
|
|
|
235
151
|
dialog[data-ui="dialog"],
|
|
236
152
|
dialog[data-ui="drawer"],
|
|
237
153
|
dialog[data-ui="command"] {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
font-family: var(--ui-font-body);
|
|
243
|
-
padding: 0;
|
|
244
|
-
& [data-part="title"] {
|
|
245
|
-
margin: 0 0 8px;
|
|
246
|
-
font: 500 1.375rem/1.2 var(--ui-font-display);
|
|
247
|
-
}
|
|
248
|
-
& [data-part="description"] { color: var(--ui-muted); font-size: 0.875rem; }
|
|
249
|
-
}
|
|
250
|
-
dialog[data-ui="dialog"] {
|
|
251
|
-
& > [data-part="panel"] { padding: 20px 22px; }
|
|
252
|
-
}
|
|
253
|
-
dialog[data-ui="drawer"] {
|
|
254
|
-
border-radius: 0;
|
|
255
|
-
border-block: 0;
|
|
256
|
-
& > [data-part="panel"] { padding: 20px 22px; }
|
|
154
|
+
--ui-dlg-bd: 1px solid var(--ui-ink);
|
|
155
|
+
--ui-dlg-bg: var(--ui-paper);
|
|
156
|
+
--ui-dlg-pad: 20px 22px;
|
|
157
|
+
--ui-dlg-tf: 500 1.375rem/1.2 var(--ui-font-display);
|
|
257
158
|
}
|
|
159
|
+
dialog[data-ui="drawer"] { border-block: 0; }
|
|
258
160
|
|
|
259
|
-
[data-ui="popover"]
|
|
260
|
-
[data-ui="menu"]
|
|
261
|
-
[data-ui="select"]
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
161
|
+
[data-ui="popover"],
|
|
162
|
+
[data-ui="menu"],
|
|
163
|
+
[data-ui="select"] {
|
|
164
|
+
--ui-pop-bg: var(--ui-paper);
|
|
165
|
+
--ui-pop-bd: 1px solid var(--ui-line-strong);
|
|
166
|
+
--ui-pop-pad: 4px;
|
|
167
|
+
--ui-pop-w: 11.5rem;
|
|
168
|
+
--ui-it-pad: 0 10px;
|
|
169
|
+
--ui-it-f: 400 0.8125rem/1.35 var(--ui-font-body);
|
|
170
|
+
--ui-it-hbg: var(--ui-surface-strong);
|
|
268
171
|
}
|
|
269
|
-
|
|
270
172
|
[data-ui="menu"] [data-part="item"],
|
|
271
|
-
[data-ui="select"] [data-part="option"] {
|
|
272
|
-
display: flex;
|
|
273
|
-
align-items: center;
|
|
274
|
-
justify-content: space-between;
|
|
275
|
-
width: 100%;
|
|
276
|
-
min-block-size: 32px;
|
|
277
|
-
text-align: start;
|
|
278
|
-
background: transparent;
|
|
279
|
-
border: 0;
|
|
280
|
-
border-radius: var(--ui-radius);
|
|
281
|
-
padding: 0 10px;
|
|
282
|
-
font: 400 0.8125rem/1.35 var(--ui-font-body);
|
|
283
|
-
color: var(--ui-ink);
|
|
284
|
-
cursor: pointer;
|
|
285
|
-
&:hover, &[data-highlighted="true"] { background: var(--ui-surface-strong); }
|
|
286
|
-
&[data-selected="true"] { color: var(--ui-accent); }
|
|
287
|
-
}
|
|
173
|
+
[data-ui="select"] [data-part="option"] { min-block-size: 32px; }
|
|
288
174
|
|
|
289
|
-
[data-ui="select"]
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
min-inline-size: 11.5rem;
|
|
295
|
-
min-block-size: 34px;
|
|
296
|
-
background: var(--ui-surface);
|
|
297
|
-
color: var(--ui-ink);
|
|
298
|
-
border: 1px solid var(--ui-line-strong);
|
|
299
|
-
border-radius: var(--ui-radius);
|
|
300
|
-
padding: 0 10px;
|
|
301
|
-
font: 400 0.8125rem/1.3 var(--ui-font-body);
|
|
302
|
-
cursor: pointer;
|
|
303
|
-
&:hover { border-color: var(--ui-ink); }
|
|
175
|
+
[data-ui="select"] {
|
|
176
|
+
--ui-sel-h: 34px;
|
|
177
|
+
--ui-sel-pad: 0 10px;
|
|
178
|
+
--ui-sel-f: 400 0.8125rem/1.3 var(--ui-font-body);
|
|
179
|
+
& [data-part="trigger"]:hover { border-color: var(--ui-ink); }
|
|
304
180
|
}
|
|
305
181
|
|
|
306
|
-
/* A toast is the page inverted: ink ground, paper text, its tone a
|
|
182
|
+
/* A toast is the page inverted: ink ground, paper text, its tone a rule in the other theme's colour. */
|
|
307
183
|
[data-ui="toast"] {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
border-radius: var(--ui-radius);
|
|
314
|
-
background: var(--ui-ink);
|
|
315
|
-
color: var(--ui-paper);
|
|
184
|
+
--ui-toast-gap: 10px;
|
|
185
|
+
--ui-tst-bw: 0;
|
|
186
|
+
--ui-tst-bg: var(--ui-ink);
|
|
187
|
+
--ui-tst-fg: var(--ui-paper);
|
|
188
|
+
--ui-tst-pad: 10px 14px;
|
|
316
189
|
font: 400 0.8125rem/1.45 var(--ui-font-body);
|
|
317
190
|
&[data-tone] { box-shadow: inset 3px 0 0 var(--ui-tone); }
|
|
318
191
|
&[data-tone="accent"] { --ui-tone: light-dark(#e5c068, #7a3667); }
|
|
@@ -322,29 +195,29 @@
|
|
|
322
195
|
}
|
|
323
196
|
|
|
324
197
|
[data-ui="checkbox"] {
|
|
325
|
-
gap: 10px;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
198
|
+
--ui-check-gap: 10px;
|
|
199
|
+
--ui-chk-fs: 0.875rem;
|
|
200
|
+
& input[type="checkbox"] {
|
|
201
|
+
appearance: none;
|
|
202
|
+
display: inline-grid;
|
|
203
|
+
place-items: center;
|
|
204
|
+
flex: none;
|
|
205
|
+
inline-size: 16px;
|
|
206
|
+
block-size: 16px;
|
|
207
|
+
margin: 0;
|
|
208
|
+
border-radius: var(--ui-radius);
|
|
209
|
+
background: var(--ui-surface);
|
|
210
|
+
box-shadow: inset 0 0 0 1.5px var(--ui-line-strong);
|
|
211
|
+
cursor: pointer;
|
|
212
|
+
&:checked { background: var(--ui-accent); box-shadow: none; }
|
|
213
|
+
&:checked::after {
|
|
214
|
+
content: '';
|
|
215
|
+
inline-size: 4px;
|
|
216
|
+
block-size: 8px;
|
|
217
|
+
border: solid var(--ui-on-accent);
|
|
218
|
+
border-width: 0 2px 2px 0;
|
|
219
|
+
transform: translateY(-1px) rotate(45deg);
|
|
220
|
+
}
|
|
348
221
|
}
|
|
349
222
|
}
|
|
350
223
|
|
|
@@ -391,31 +264,30 @@
|
|
|
391
264
|
&::after { opacity: 1; }
|
|
392
265
|
}
|
|
393
266
|
|
|
394
|
-
[data-ui="radio-group"]
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
cursor: pointer;
|
|
411
|
-
&:disabled { cursor: not-allowed; }
|
|
267
|
+
[data-ui="radio-group"] {
|
|
268
|
+
--ui-radio-gap: 10px;
|
|
269
|
+
--ui-chk-fs: 0.875rem;
|
|
270
|
+
--ui-rg-lf: 500 0.8125rem/1.3 var(--ui-font-body);
|
|
271
|
+
--ui-rg-lfg: var(--ui-ink);
|
|
272
|
+
--ui-rg-lmb: 6px;
|
|
273
|
+
--ui-rg-hs: 0.75rem;
|
|
274
|
+
& input[type="radio"] {
|
|
275
|
+
--ui-eye: 24px;
|
|
276
|
+
--ui-lid-w: 2px;
|
|
277
|
+
appearance: none;
|
|
278
|
+
margin: 0;
|
|
279
|
+
border-radius: 4px;
|
|
280
|
+
cursor: pointer;
|
|
281
|
+
&:disabled { cursor: not-allowed; }
|
|
282
|
+
}
|
|
412
283
|
}
|
|
413
284
|
|
|
414
|
-
/* Switch: the input is the track
|
|
285
|
+
/* Switch: the input is the visible track (and carries base.css's focus-visible ring), the track part its sliding eye knob. */
|
|
415
286
|
[data-ui="switch"] {
|
|
287
|
+
--ui-switch-gap: 10px;
|
|
288
|
+
--ui-chk-fs: 0.875rem;
|
|
289
|
+
--ui-switch-track-focus-w: 0px;
|
|
416
290
|
position: relative;
|
|
417
|
-
gap: 10px;
|
|
418
|
-
font-size: 0.875rem;
|
|
419
291
|
}
|
|
420
292
|
[data-ui="switch"] input[type="checkbox"] {
|
|
421
293
|
appearance: none;
|
|
@@ -460,12 +332,8 @@
|
|
|
460
332
|
inset-inline-start: 18px;
|
|
461
333
|
&::after { inset-inline-start: auto; transform: scaleY(var(--ui-lid)); }
|
|
462
334
|
}
|
|
463
|
-
[data-ui="switch"]:has(input:focus-visible) [data-part="track"],
|
|
464
|
-
[data-ui="switch"] input:focus-visible + [data-part="track"] {
|
|
465
|
-
outline: none;
|
|
466
|
-
}
|
|
467
335
|
|
|
468
|
-
/* Progress: the native bar stays for assistive tech and the eye shows it.
|
|
336
|
+
/* Progress: the native bar stays for assistive tech and the eye shows it. */
|
|
469
337
|
[data-ui="progress"] {
|
|
470
338
|
--ui-eye: 22px;
|
|
471
339
|
position: relative;
|
|
@@ -503,9 +371,7 @@
|
|
|
503
371
|
transform: rotate(-45deg) scale(calc(1 + var(--ui-progress) * 10), calc(1 + var(--ui-progress) * 0.8));
|
|
504
372
|
}
|
|
505
373
|
}
|
|
506
|
-
[data-ui="progress"][data-value] [data-part="eye"] {
|
|
507
|
-
box-shadow: 0 0 0 calc(var(--ui-eye) * 0.05) var(--ui-iris);
|
|
508
|
-
}
|
|
374
|
+
[data-ui="progress"][data-value] [data-part="eye"] { box-shadow: 0 0 0 calc(var(--ui-eye) * 0.05) var(--ui-iris); }
|
|
509
375
|
[data-ui="progress"]:not([data-value]) [data-part="eye"] {
|
|
510
376
|
animation: ui-eye-blink 3.2s ease-in-out infinite;
|
|
511
377
|
&::after { animation: ui-eye-look 3.2s ease-in-out infinite; }
|
|
@@ -532,10 +398,12 @@
|
|
|
532
398
|
[data-ui="progress"][data-value="95"] { --ui-progress: 0.95; }
|
|
533
399
|
[data-ui="progress"][data-value="100"] { --ui-progress: 1; }
|
|
534
400
|
|
|
401
|
+
/* @part: progress */
|
|
535
402
|
@keyframes ui-eye-blink {
|
|
536
403
|
0%, 83%, 93%, 100% { transform: scaleY(1) rotate(45deg); }
|
|
537
404
|
88% { transform: scaleY(0.08) rotate(45deg); }
|
|
538
405
|
}
|
|
406
|
+
/* @part: progress */
|
|
539
407
|
@keyframes ui-eye-look {
|
|
540
408
|
0%, 100% { transform: rotate(-45deg) translateX(0) scale(1, 1); }
|
|
541
409
|
10%, 74% { transform: rotate(-45deg) translateX(0) scale(1.9, 1); }
|
|
@@ -545,108 +413,37 @@
|
|
|
545
413
|
}
|
|
546
414
|
|
|
547
415
|
dialog[data-ui="command"] {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
border-bottom-color: var(--ui-accent);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
& [data-part="list"] { padding: 4px; }
|
|
563
|
-
& [data-part="item"] {
|
|
564
|
-
display: flex;
|
|
565
|
-
justify-content: space-between;
|
|
566
|
-
align-items: center;
|
|
567
|
-
width: 100%;
|
|
568
|
-
min-block-size: 32px;
|
|
569
|
-
border: 0;
|
|
570
|
-
border-radius: var(--ui-radius);
|
|
571
|
-
background: transparent;
|
|
572
|
-
color: var(--ui-ink);
|
|
573
|
-
padding: 0 10px;
|
|
574
|
-
font: 400 0.8125rem/1.35 var(--ui-font-body);
|
|
575
|
-
cursor: pointer;
|
|
576
|
-
&[data-highlighted="true"] { background: var(--ui-surface-strong); }
|
|
577
|
-
}
|
|
578
|
-
& [data-part="kbd"] {
|
|
579
|
-
font: 400 0.75rem/1 var(--ui-font-mono);
|
|
580
|
-
color: var(--ui-muted);
|
|
581
|
-
background: var(--ui-surface-strong);
|
|
582
|
-
border-radius: var(--ui-radius);
|
|
583
|
-
padding: 3px 5px;
|
|
584
|
-
}
|
|
585
|
-
& [data-part="empty"] { padding: 12px 14px; margin: 0; color: var(--ui-muted); font-size: 0.8125rem; }
|
|
416
|
+
--ui-cmd-ibb: 1px solid var(--ui-line-strong);
|
|
417
|
+
--ui-cmd-ibg: var(--ui-paper);
|
|
418
|
+
--ui-cmd-ipad: 12px 14px;
|
|
419
|
+
--ui-cmd-if: 400 0.9375rem/1.35 var(--ui-font-body);
|
|
420
|
+
--ui-cmd-ifs: 0.9375rem;
|
|
421
|
+
--ui-cmd-lpad: 4px;
|
|
422
|
+
--ui-cmd-mpad: 0 10px;
|
|
423
|
+
--ui-cmd-mf: 400 0.8125rem/1.35 var(--ui-font-body);
|
|
424
|
+
--ui-cmd-hbg: var(--ui-surface-strong);
|
|
425
|
+
& [data-part="item"] { min-block-size: 32px; }
|
|
426
|
+
& [data-part="kbd"] { background: var(--ui-surface-strong); border: 0; font-family: var(--ui-font-mono); }
|
|
586
427
|
}
|
|
587
428
|
|
|
588
|
-
/* Tables are ruled like a book's: a heavy rule above and below, a thin one under the head, none between rows. */
|
|
589
429
|
table[data-ui="table"],
|
|
590
|
-
[data-ui="datatable"]
|
|
591
|
-
|
|
592
|
-
|
|
430
|
+
[data-ui="datatable"] {
|
|
431
|
+
--ui-table-gap: 10px;
|
|
432
|
+
--ui-tbl-fs: 0.8125rem;
|
|
433
|
+
--ui-srch-h: 34px;
|
|
434
|
+
--ui-srch-pad: 0 10px;
|
|
435
|
+
--ui-srch-f: 400 0.8125rem/1.35 var(--ui-font-body);
|
|
436
|
+
--ui-srch-fs: 0.8125rem;
|
|
437
|
+
--ui-th-bb: 1px solid var(--ui-ink);
|
|
438
|
+
--ui-th-pad: 7px 12px 7px 0;
|
|
439
|
+
--ui-td-bb: 0;
|
|
440
|
+
--ui-td-pad: 7px 12px 7px 0;
|
|
441
|
+
--ui-tbl-sel: color-mix(in srgb, var(--ui-accent) 12%, transparent);
|
|
593
442
|
font-variant-numeric: tabular-nums;
|
|
443
|
+
& [data-part="search"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 22%, transparent); }
|
|
444
|
+
& table { border-block: 2px solid var(--ui-ink); }
|
|
594
445
|
& > caption { font: 500 0.9375rem/1.3 var(--ui-font-display); }
|
|
595
|
-
& th {
|
|
596
|
-
padding: 7px 12px 7px 0;
|
|
597
|
-
border-bottom: 1px solid var(--ui-ink);
|
|
598
|
-
font-weight: 400;
|
|
599
|
-
font-size: 0.75rem;
|
|
600
|
-
color: var(--ui-muted);
|
|
601
|
-
text-align: start;
|
|
602
|
-
}
|
|
603
|
-
& td { padding: 7px 12px 7px 0; }
|
|
446
|
+
& th { font-weight: 400; color: var(--ui-muted); }
|
|
604
447
|
& :is(th, td):last-child { padding-inline-end: 0; }
|
|
605
448
|
}
|
|
606
|
-
[data-ui="datatable"] {
|
|
607
|
-
display: flex;
|
|
608
|
-
flex-direction: column;
|
|
609
|
-
gap: 10px;
|
|
610
|
-
& [data-part="search"] {
|
|
611
|
-
min-block-size: 34px;
|
|
612
|
-
border: 1px solid var(--ui-line-strong);
|
|
613
|
-
border-radius: var(--ui-radius);
|
|
614
|
-
background: var(--ui-surface);
|
|
615
|
-
color: var(--ui-ink);
|
|
616
|
-
padding: 0 10px;
|
|
617
|
-
font: 400 0.8125rem/1.35 var(--ui-font-body);
|
|
618
|
-
&:focus { outline: none; border-color: var(--ui-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 22%, transparent); }
|
|
619
|
-
}
|
|
620
|
-
& [data-part="meta"] { font-size: 0.75rem; color: var(--ui-muted); font-variant-numeric: tabular-nums; }
|
|
621
|
-
& tr[data-selected="true"] { background: color-mix(in srgb, var(--ui-accent) 12%, transparent); }
|
|
622
|
-
& [data-part="sort"] {
|
|
623
|
-
background: transparent;
|
|
624
|
-
border: 0;
|
|
625
|
-
padding: 0;
|
|
626
|
-
font: inherit;
|
|
627
|
-
color: inherit;
|
|
628
|
-
cursor: pointer;
|
|
629
|
-
&[data-active="true"] { color: var(--ui-accent); }
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
/* bare.css keeps 44px targets and 16px fields on phones; the sizes above would undercut it */
|
|
634
|
-
@media (max-width: 600px) {
|
|
635
|
-
[data-ui="button"],
|
|
636
|
-
[data-ui="button"][data-size] {
|
|
637
|
-
min-inline-size: 44px;
|
|
638
|
-
}
|
|
639
|
-
[data-ui="button"],
|
|
640
|
-
[data-ui="button"][data-size],
|
|
641
|
-
[data-ui="field"] :is(input:not([type="checkbox"], [type="radio"]), select),
|
|
642
|
-
[data-ui="select"] [data-part="trigger"],
|
|
643
|
-
[data-ui="datatable"] [data-part="search"] {
|
|
644
|
-
min-block-size: 44px;
|
|
645
|
-
}
|
|
646
|
-
[data-ui="field"] :is(input:not([type="checkbox"], [type="radio"]), select, textarea),
|
|
647
|
-
[data-ui="datatable"] [data-part="search"],
|
|
648
|
-
dialog[data-ui="command"] [data-part="input"] {
|
|
649
|
-
font-size: max(1rem, 16px);
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
449
|
}
|