@zazz-ui/core 0.8.1 → 0.8.2
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/CHANGELOG.md +12 -0
- package/README.md +2 -2
- package/dist/sri.json +4 -4
- package/dist/zazz.css +1 -1
- package/editor/zazz.css-data.json +4 -0
- package/editor/zazz.language-data.json +9 -2
- package/editor/zazz.lint-data.json +579 -568
- package/package.json +1 -1
- package/src/base/kit-styling.d.ts.map +1 -1
- package/src/base/kit-styling.js +117 -116
- package/src/base/kit-styling.ts +117 -116
- package/src/primitives/dialog/dialog.css +54 -0
- package/src/primitives/input/input.css +22 -0
package/src/base/kit-styling.ts
CHANGED
|
@@ -169,6 +169,7 @@ export const KIT_SELECTORS: readonly string[] = [
|
|
|
169
169
|
'[data-ui~="field"][data-field-orientation="horizontal"]',
|
|
170
170
|
'[data-ui~="field"][data-field-orientation="horizontal"] [data-field-slot~="label"]',
|
|
171
171
|
'[data-ui~="input"]',
|
|
172
|
+
'[data-ui~="input"]:is([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"])',
|
|
172
173
|
'[data-ui~="input-group"]',
|
|
173
174
|
'[data-ui~="input-group"] [data-input-group-slot~="addon"]',
|
|
174
175
|
'[data-ui~="input-group"] [data-input-group-slot~="addon"]:not([data-input-group-align])',
|
|
@@ -276,55 +277,55 @@ export const KIT_SELECTORS: readonly string[] = [
|
|
|
276
277
|
export const TIER_READS: Readonly<Record<string, readonly number[]>> = {
|
|
277
278
|
band: [63],
|
|
278
279
|
bg: [
|
|
279
|
-
2, 15, 29, 38, 127, 133, 136, 138, 140, 143, 147, 148, 149, 166,
|
|
280
|
-
|
|
280
|
+
2, 15, 29, 38, 127, 133, 136, 138, 140, 143, 147, 148, 149, 166, 168, 181, 202, 217, 218, 219,
|
|
281
|
+
226, 229, 238, 239, 242, 243, 244, 260, 261, 263,
|
|
281
282
|
],
|
|
282
283
|
"border-color": [
|
|
283
|
-
15, 38, 133, 136, 138, 140, 143, 147, 148, 166,
|
|
284
|
-
|
|
285
|
-
],
|
|
286
|
-
"border-style": [38, 136, 140, 147, 148, 166,
|
|
287
|
-
"border-width": [38, 136, 140, 147, 148, 166,
|
|
288
|
-
cursor: [
|
|
289
|
-
display: [2, 157, 164,
|
|
290
|
-
"flex-wrap": [38,
|
|
291
|
-
"font-family": [133, 136, 140,
|
|
292
|
-
"font-size": [38, 133, 136, 140, 166,
|
|
293
|
-
"font-weight": [133, 136, 140,
|
|
294
|
-
gap: [2, 34, 38, 61, 95, 133, 136, 140, 147, 148, 157, 164,
|
|
295
|
-
h: [38, 136, 149, 166,
|
|
296
|
-
items: [38, 164,
|
|
284
|
+
15, 38, 133, 136, 138, 140, 143, 147, 148, 166, 168, 202, 218, 219, 238, 239, 242, 243, 244,
|
|
285
|
+
247, 261,
|
|
286
|
+
],
|
|
287
|
+
"border-style": [38, 136, 140, 147, 148, 166, 218, 219, 238, 239, 261],
|
|
288
|
+
"border-width": [38, 136, 140, 147, 148, 166, 167, 218, 219, 238, 239, 261],
|
|
289
|
+
cursor: [168, 202],
|
|
290
|
+
display: [2, 157, 164, 168, 202],
|
|
291
|
+
"flex-wrap": [38, 168, 202],
|
|
292
|
+
"font-family": [133, 136, 140, 229, 239, 263],
|
|
293
|
+
"font-size": [38, 133, 136, 140, 166, 219, 229, 238, 239, 263],
|
|
294
|
+
"font-weight": [133, 136, 140, 239],
|
|
295
|
+
gap: [2, 34, 38, 61, 95, 133, 136, 140, 147, 148, 157, 164, 168, 202, 239, 263],
|
|
296
|
+
h: [38, 136, 149, 166, 181, 217, 219, 260],
|
|
297
|
+
items: [38, 164, 168, 202],
|
|
297
298
|
justify: [164],
|
|
298
|
-
leading: [38, 133, 136, 140, 166,
|
|
299
|
+
leading: [38, 133, 136, 140, 166, 219, 238, 239, 263],
|
|
299
300
|
m: [2],
|
|
300
|
-
"max-h": [26,
|
|
301
|
-
"max-w": [133,
|
|
302
|
-
"min-h": [38, 140,
|
|
303
|
-
"min-w": [38, 58, 97, 98, 166,
|
|
304
|
-
mx: [133,
|
|
305
|
-
my: [133,
|
|
306
|
-
p: [2, 147, 148,
|
|
307
|
-
pl: [38, 166,
|
|
308
|
-
pr: [38, 166,
|
|
309
|
-
px: [133, 136, 140,
|
|
310
|
-
py: [38, 133,
|
|
301
|
+
"max-h": [26, 238],
|
|
302
|
+
"max-w": [133, 247],
|
|
303
|
+
"min-h": [38, 140, 168, 202, 238, 239, 263],
|
|
304
|
+
"min-w": [38, 58, 97, 98, 166, 219, 238, 247, 263],
|
|
305
|
+
mx: [133, 247],
|
|
306
|
+
my: [133, 247],
|
|
307
|
+
p: [2, 147, 148, 168, 202, 238, 247],
|
|
308
|
+
pl: [38, 166, 219],
|
|
309
|
+
pr: [38, 166, 219],
|
|
310
|
+
px: [133, 136, 140, 239, 263],
|
|
311
|
+
py: [38, 133, 263],
|
|
311
312
|
radius: [
|
|
312
|
-
2, 29, 38, 106, 112, 127, 133, 136, 140, 147, 148, 149, 166,
|
|
313
|
-
|
|
313
|
+
2, 29, 38, 106, 112, 127, 133, 136, 140, 147, 148, 149, 166, 168, 181, 202, 217, 218, 219, 238,
|
|
314
|
+
239, 247, 260, 261, 263,
|
|
314
315
|
],
|
|
315
|
-
"ring-color": [136, 140,
|
|
316
|
+
"ring-color": [136, 140, 239],
|
|
316
317
|
self: [157],
|
|
317
318
|
shadow: [
|
|
318
|
-
20, 26, 38, 97, 133, 136, 140, 147, 148, 149, 166,
|
|
319
|
+
20, 26, 38, 97, 133, 136, 140, 147, 148, 149, 166, 168, 202, 218, 219, 238, 239, 247, 260, 261,
|
|
319
320
|
],
|
|
320
|
-
"shadow-angle": [4,
|
|
321
|
-
size: [
|
|
321
|
+
"shadow-angle": [4, 259],
|
|
322
|
+
size: [218, 261],
|
|
322
323
|
"template-cols": [157],
|
|
323
324
|
text: [
|
|
324
|
-
38, 133, 136, 138, 140, 143, 147, 148, 149, 166,
|
|
325
|
-
|
|
325
|
+
38, 133, 136, 138, 140, 143, 147, 148, 149, 166, 168, 202, 219, 229, 238, 239, 242, 243, 244,
|
|
326
|
+
263,
|
|
326
327
|
],
|
|
327
|
-
w: [38, 98, 149, 157, 166,
|
|
328
|
+
w: [38, 98, 149, 157, 166, 168, 181, 202, 217, 219, 238, 260],
|
|
328
329
|
};
|
|
329
330
|
|
|
330
331
|
/**
|
|
@@ -333,175 +334,175 @@ export const TIER_READS: Readonly<Record<string, readonly number[]>> = {
|
|
|
333
334
|
* their own value, and a tier alone applies there only through `TIER_READS`.
|
|
334
335
|
*/
|
|
335
336
|
export const TIER_BLOCKS: Readonly<Record<string, readonly number[]>> = {
|
|
336
|
-
"anchor-name": [28, 38, 49, 96, 103, 131, 149,
|
|
337
|
-
aspect: [82, 84, 139, 144, 145,
|
|
337
|
+
"anchor-name": [28, 38, 49, 96, 103, 131, 149, 188, 191, 198, 200],
|
|
338
|
+
aspect: [82, 84, 139, 144, 145, 245, 246],
|
|
338
339
|
"backdrop-filter": [117],
|
|
339
340
|
band: [63, 159, 160, 163],
|
|
340
341
|
basis: [
|
|
341
|
-
18, 19, 35, 36, 39, 55, 56, 73, 87, 120,
|
|
342
|
+
18, 19, 35, 36, 39, 55, 56, 73, 87, 120, 171, 172, 177, 178, 199, 205, 206, 211, 212, 220, 265,
|
|
342
343
|
],
|
|
343
344
|
bg: [
|
|
344
345
|
2, 15, 16, 29, 38, 39, 56, 80, 83, 99, 100, 106, 109, 111, 112, 113, 117, 123, 127, 132, 133,
|
|
345
|
-
136, 140, 147, 148, 149, 154, 166,
|
|
346
|
-
|
|
346
|
+
136, 140, 147, 148, 149, 154, 166, 168, 177, 178, 181, 184, 185, 202, 211, 212, 217, 218, 219,
|
|
347
|
+
222, 226, 229, 232, 233, 235, 238, 239, 247, 251, 253, 257, 258, 259, 260, 261, 263,
|
|
347
348
|
],
|
|
348
|
-
"col-end": [63, 158, 159, 160, 163,
|
|
349
|
+
"col-end": [63, 158, 159, 160, 163, 216],
|
|
349
350
|
"col-span": [63, 159, 160, 163],
|
|
350
|
-
"col-start": [63, 158, 159, 160, 163,
|
|
351
|
+
"col-start": [63, 158, 159, 160, 163, 216],
|
|
351
352
|
elevation: [
|
|
352
353
|
20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
|
|
353
|
-
|
|
354
|
+
168, 177, 178, 202, 218, 219, 222, 238, 239, 247, 254, 260, 261,
|
|
354
355
|
],
|
|
355
356
|
flex: [
|
|
356
|
-
18, 19, 35, 36, 39, 47, 48, 55, 56, 73, 87, 93, 94, 99, 118, 119, 120, 121, 136, 140, 154,
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
18, 19, 35, 36, 39, 47, 48, 55, 56, 73, 87, 93, 94, 99, 118, 119, 120, 121, 136, 140, 154, 169,
|
|
358
|
+
171, 172, 176, 177, 178, 199, 203, 205, 206, 210, 211, 212, 218, 220, 221, 223, 225, 226, 239,
|
|
359
|
+
257, 260, 261, 265,
|
|
359
360
|
],
|
|
360
|
-
"flex-wrap": [38,
|
|
361
|
+
"flex-wrap": [38, 168, 184, 202],
|
|
361
362
|
gap: [
|
|
362
363
|
2, 23, 25, 34, 37, 38, 42, 44, 51, 52, 57, 61, 62, 79, 85, 92, 95, 100, 102, 108, 110, 112, 120,
|
|
363
|
-
123, 133, 136, 140, 147, 148, 154, 157,
|
|
364
|
-
|
|
364
|
+
123, 133, 136, 140, 147, 148, 154, 157, 168, 169, 175, 184, 191, 198, 201, 202, 203, 209, 219,
|
|
365
|
+
220, 222, 239, 256, 263,
|
|
365
366
|
],
|
|
366
367
|
"gap-x": [
|
|
367
368
|
2, 23, 25, 34, 37, 38, 42, 44, 51, 52, 57, 61, 62, 79, 85, 92, 95, 100, 102, 108, 110, 112, 120,
|
|
368
|
-
123, 133, 136, 140, 147, 148, 154, 157,
|
|
369
|
-
|
|
369
|
+
123, 133, 136, 140, 147, 148, 154, 157, 168, 169, 175, 184, 191, 198, 201, 202, 203, 209, 219,
|
|
370
|
+
220, 222, 239, 256, 263,
|
|
370
371
|
],
|
|
371
372
|
"gap-y": [
|
|
372
373
|
2, 23, 25, 34, 37, 38, 42, 44, 51, 52, 57, 61, 79, 85, 92, 95, 100, 102, 108, 110, 112, 120,
|
|
373
|
-
123, 133, 136, 147, 148, 154, 157,
|
|
374
|
-
|
|
374
|
+
123, 133, 136, 147, 148, 154, 157, 168, 169, 175, 184, 191, 198, 201, 202, 203, 209, 219, 220,
|
|
375
|
+
222, 256, 263,
|
|
375
376
|
],
|
|
376
|
-
"grid-cols": [62, 64, 157,
|
|
377
|
-
"grid-rows": [67, 68, 153, 156,
|
|
377
|
+
"grid-cols": [62, 64, 157, 201],
|
|
378
|
+
"grid-rows": [67, 68, 153, 156, 186],
|
|
378
379
|
items: [
|
|
379
380
|
20, 21, 29, 38, 47, 48, 51, 54, 61, 62, 69, 70, 83, 85, 100, 106, 108, 110, 112, 113, 116, 123,
|
|
380
|
-
127, 133, 136, 137, 140, 141, 152, 164,
|
|
381
|
-
|
|
381
|
+
127, 133, 136, 137, 140, 141, 152, 164, 168, 169, 171, 172, 175, 185, 186, 191, 198, 201, 202,
|
|
382
|
+
203, 205, 206, 209, 215, 218, 219, 220, 222, 224, 239, 241, 261, 263,
|
|
382
383
|
],
|
|
383
384
|
justify: [
|
|
384
|
-
20, 21, 69, 70, 76, 83, 86, 113, 115, 136, 137, 140, 141, 152, 154, 164,
|
|
385
|
-
|
|
385
|
+
20, 21, 69, 70, 76, 83, 86, 113, 115, 136, 137, 140, 141, 152, 154, 164, 169, 185, 198, 203,
|
|
386
|
+
219, 239, 241, 263,
|
|
386
387
|
],
|
|
387
388
|
opacity: [
|
|
388
389
|
0, 1, 47, 66, 71, 72, 84, 88, 89, 109, 114, 117, 123, 124, 125, 126, 133, 134, 135, 161, 162,
|
|
389
|
-
|
|
390
|
+
187, 240, 247, 254, 255, 262, 264,
|
|
390
391
|
],
|
|
391
|
-
order: [24, 43, 53,
|
|
392
|
+
order: [24, 43, 53, 170, 171, 172, 173, 174, 204, 205, 206, 207, 208],
|
|
392
393
|
p: [
|
|
393
394
|
2, 3, 5, 6, 22, 25, 38, 40, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 75, 76, 83, 100, 104, 112,
|
|
394
395
|
113, 117, 122, 123, 133, 136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154,
|
|
395
|
-
155, 166,
|
|
396
|
-
|
|
397
|
-
|
|
396
|
+
155, 166, 168, 169, 171, 172, 175, 177, 178, 179, 180, 182, 183, 184, 185, 190, 198, 202, 203,
|
|
397
|
+
205, 206, 209, 211, 212, 213, 214, 219, 222, 228, 230, 231, 234, 238, 239, 241, 245, 246, 247,
|
|
398
|
+
250, 253, 263, 266, 267, 268,
|
|
398
399
|
],
|
|
399
400
|
pb: [
|
|
400
401
|
2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 75, 76, 104, 112, 117, 122, 123, 133,
|
|
401
|
-
137, 139, 141, 144, 145, 147, 148, 150, 152, 154,
|
|
402
|
-
|
|
402
|
+
137, 139, 141, 144, 145, 147, 148, 150, 152, 154, 168, 171, 172, 178, 182, 184, 185, 190, 198,
|
|
403
|
+
202, 205, 206, 212, 228, 230, 231, 234, 238, 241, 245, 246, 247, 253, 263,
|
|
403
404
|
],
|
|
404
405
|
pl: [
|
|
405
406
|
2, 3, 5, 6, 22, 25, 38, 40, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 83, 100, 112, 113, 117, 122,
|
|
406
|
-
123, 133, 136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154, 155, 166,
|
|
407
|
-
|
|
408
|
-
|
|
407
|
+
123, 133, 136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154, 155, 166, 168,
|
|
408
|
+
169, 175, 177, 178, 179, 182, 183, 184, 185, 190, 198, 202, 203, 209, 211, 212, 213, 219, 222,
|
|
409
|
+
228, 230, 231, 238, 239, 241, 245, 246, 247, 250, 253, 263, 266, 267, 268,
|
|
409
410
|
],
|
|
410
411
|
"place-content": [
|
|
411
|
-
20, 21, 69, 70, 76, 83, 86, 113, 115, 136, 137, 140, 141, 152, 154, 164,
|
|
412
|
-
|
|
412
|
+
20, 21, 69, 70, 76, 83, 86, 113, 115, 136, 137, 140, 141, 152, 154, 164, 169, 185, 198, 203,
|
|
413
|
+
219, 239, 241, 247, 263,
|
|
413
414
|
],
|
|
414
415
|
"place-items": [
|
|
415
416
|
20, 21, 29, 38, 47, 48, 51, 54, 61, 62, 69, 70, 83, 85, 100, 106, 108, 110, 112, 113, 116, 123,
|
|
416
|
-
127, 133, 136, 137, 140, 141, 152, 164,
|
|
417
|
-
|
|
417
|
+
127, 133, 136, 137, 140, 141, 152, 164, 168, 169, 171, 172, 175, 185, 186, 191, 198, 201, 202,
|
|
418
|
+
203, 205, 206, 209, 215, 218, 219, 220, 222, 224, 239, 241, 261, 263,
|
|
418
419
|
],
|
|
419
420
|
position: [
|
|
420
421
|
13, 17, 29, 30, 33, 65, 66, 77, 78, 79, 82, 90, 91, 101, 105, 109, 111, 112, 113, 114, 117, 123,
|
|
421
|
-
127, 128, 132, 151, 153, 154,
|
|
422
|
-
|
|
422
|
+
127, 128, 132, 151, 153, 154, 184, 185, 186, 188, 189, 197, 218, 228, 239, 240, 247, 251, 254,
|
|
423
|
+
261, 264, 265,
|
|
423
424
|
],
|
|
424
|
-
"position-anchor": [26, 45, 59, 97, 102, 111, 133,
|
|
425
|
-
"position-area": [117,
|
|
425
|
+
"position-anchor": [26, 45, 59, 97, 102, 111, 133, 192, 193, 194, 195, 196],
|
|
426
|
+
"position-area": [117, 247],
|
|
426
427
|
pr: [
|
|
427
428
|
2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 100, 112, 113, 117, 122, 123, 133,
|
|
428
|
-
136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154, 155, 166,
|
|
429
|
-
|
|
430
|
-
|
|
429
|
+
136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154, 155, 166, 168, 169, 175,
|
|
430
|
+
177, 178, 180, 182, 184, 185, 190, 198, 202, 203, 209, 211, 212, 214, 219, 222, 228, 230, 231,
|
|
431
|
+
238, 239, 241, 245, 246, 247, 253, 263,
|
|
431
432
|
],
|
|
432
433
|
pt: [
|
|
433
434
|
2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 75, 76, 104, 112, 117, 122, 123, 133,
|
|
434
|
-
137, 139, 141, 144, 145, 147, 148, 150, 152, 154, 155,
|
|
435
|
-
|
|
435
|
+
137, 139, 141, 144, 145, 147, 148, 150, 152, 154, 155, 168, 171, 172, 178, 182, 184, 185, 190,
|
|
436
|
+
198, 202, 205, 206, 212, 228, 230, 231, 234, 238, 241, 245, 246, 247, 253, 263,
|
|
436
437
|
],
|
|
437
438
|
px: [
|
|
438
439
|
2, 3, 5, 6, 22, 25, 38, 40, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 83, 100, 112, 113, 117, 122,
|
|
439
|
-
123, 133, 136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154, 155, 166,
|
|
440
|
-
|
|
441
|
-
|
|
440
|
+
123, 133, 136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154, 155, 166, 168,
|
|
441
|
+
169, 175, 177, 178, 179, 180, 182, 183, 184, 185, 190, 198, 202, 203, 209, 211, 212, 213, 214,
|
|
442
|
+
219, 222, 228, 230, 231, 238, 239, 241, 245, 246, 247, 250, 253, 263, 266, 267, 268,
|
|
442
443
|
],
|
|
443
444
|
py: [
|
|
444
445
|
2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 75, 76, 104, 112, 117, 122, 123, 133,
|
|
445
|
-
137, 139, 141, 144, 145, 147, 148, 150, 152, 154, 155,
|
|
446
|
-
|
|
446
|
+
137, 139, 141, 144, 145, 147, 148, 150, 152, 154, 155, 168, 171, 172, 178, 182, 184, 185, 190,
|
|
447
|
+
198, 202, 205, 206, 212, 228, 230, 231, 234, 238, 241, 245, 246, 247, 253, 263,
|
|
447
448
|
],
|
|
448
449
|
radius: [
|
|
449
450
|
2, 14, 29, 31, 32, 38, 47, 71, 74, 80, 81, 82, 87, 90, 100, 106, 111, 112, 113, 123, 127, 129,
|
|
450
|
-
130, 132, 133, 136, 140, 147, 148, 149, 166,
|
|
451
|
-
|
|
451
|
+
130, 132, 133, 136, 140, 147, 148, 149, 166, 168, 176, 177, 178, 181, 190, 198, 202, 210, 211,
|
|
452
|
+
212, 217, 218, 219, 222, 238, 239, 247, 253, 260, 261, 262, 263,
|
|
452
453
|
],
|
|
453
454
|
"radius-b": [
|
|
454
455
|
2, 14, 29, 31, 32, 38, 47, 71, 74, 80, 81, 82, 87, 90, 100, 106, 111, 112, 113, 123, 127, 129,
|
|
455
|
-
130, 132, 133, 136, 140, 147, 148, 149, 166,
|
|
456
|
-
|
|
456
|
+
130, 132, 133, 136, 140, 147, 148, 149, 166, 168, 176, 177, 178, 181, 190, 198, 202, 210, 211,
|
|
457
|
+
212, 217, 218, 219, 222, 238, 239, 247, 253, 260, 261, 262, 263,
|
|
457
458
|
],
|
|
458
459
|
"radius-l": [
|
|
459
460
|
2, 14, 29, 31, 32, 38, 47, 71, 74, 80, 81, 82, 87, 90, 100, 106, 111, 112, 113, 123, 127, 129,
|
|
460
|
-
130, 132, 133, 136, 140, 147, 148, 149, 166,
|
|
461
|
-
|
|
461
|
+
130, 132, 133, 136, 140, 147, 148, 149, 166, 168, 176, 177, 178, 181, 190, 198, 202, 210, 211,
|
|
462
|
+
212, 217, 218, 219, 222, 238, 239, 247, 253, 260, 261, 262, 263,
|
|
462
463
|
],
|
|
463
464
|
"radius-r": [
|
|
464
465
|
2, 14, 29, 31, 32, 38, 47, 71, 74, 80, 81, 82, 87, 90, 100, 106, 111, 112, 113, 123, 127, 129,
|
|
465
|
-
130, 132, 133, 136, 140, 147, 148, 149, 166,
|
|
466
|
-
|
|
466
|
+
130, 132, 133, 136, 140, 147, 148, 149, 166, 168, 176, 177, 178, 181, 190, 198, 202, 210, 211,
|
|
467
|
+
212, 217, 218, 219, 222, 238, 239, 247, 253, 260, 261, 262, 263,
|
|
467
468
|
],
|
|
468
469
|
"radius-t": [
|
|
469
470
|
2, 14, 29, 31, 32, 38, 47, 71, 74, 80, 81, 82, 87, 90, 100, 106, 111, 112, 113, 123, 127, 129,
|
|
470
|
-
130, 132, 133, 136, 140, 147, 148, 149, 166,
|
|
471
|
-
|
|
471
|
+
130, 132, 133, 136, 140, 147, 148, 149, 166, 168, 176, 177, 178, 181, 190, 198, 202, 210, 211,
|
|
472
|
+
212, 217, 218, 219, 222, 238, 239, 247, 253, 260, 261, 262, 263,
|
|
472
473
|
],
|
|
473
474
|
ring: [
|
|
474
475
|
20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
|
|
475
|
-
|
|
476
|
+
168, 177, 178, 202, 218, 219, 222, 238, 239, 247, 254, 260, 261,
|
|
476
477
|
],
|
|
477
478
|
"ring-color": [
|
|
478
479
|
20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
|
|
479
|
-
|
|
480
|
+
168, 177, 178, 202, 218, 219, 222, 238, 239, 247, 254, 260, 261,
|
|
480
481
|
],
|
|
481
482
|
"ring-offset": [
|
|
482
483
|
20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
|
|
483
|
-
|
|
484
|
+
168, 177, 178, 202, 218, 219, 222, 238, 239, 247, 254, 260, 261,
|
|
484
485
|
],
|
|
485
486
|
"ring-offset-color": [
|
|
486
487
|
20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
|
|
487
|
-
|
|
488
|
+
168, 177, 178, 202, 218, 219, 222, 238, 239, 247, 254, 260, 261,
|
|
488
489
|
],
|
|
489
|
-
"row-end": [158, 159, 160, 163,
|
|
490
|
-
"row-span": [159, 160, 163],
|
|
491
|
-
"row-start": [158, 159, 160, 163,
|
|
492
|
-
self: [153, 154, 157, 163, 165,
|
|
490
|
+
"row-end": [150, 154, 155, 158, 159, 160, 163, 216],
|
|
491
|
+
"row-span": [150, 154, 155, 159, 160, 163],
|
|
492
|
+
"row-start": [150, 154, 155, 158, 159, 160, 163, 216],
|
|
493
|
+
self: [153, 154, 157, 163, 165, 227],
|
|
493
494
|
shadow: [
|
|
494
495
|
20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
|
|
495
|
-
|
|
496
|
+
168, 177, 178, 202, 218, 219, 222, 238, 239, 247, 254, 260, 261,
|
|
496
497
|
],
|
|
497
498
|
shrink: [
|
|
498
|
-
18, 19, 35, 36, 39, 47, 48, 55, 56, 73, 87, 93, 94, 99, 118, 119, 120, 121, 136, 140, 154,
|
|
499
|
-
|
|
500
|
-
],
|
|
501
|
-
"template-cols": [62, 64, 157,
|
|
502
|
-
"template-rows": [67, 68, 153, 156,
|
|
503
|
-
"text-align": [107, 115, 163,
|
|
504
|
-
"text-decoration": [136, 140,
|
|
505
|
-
"text-wrap": [7, 8, 9, 10, 11, 12, 113, 133,
|
|
499
|
+
18, 19, 35, 36, 39, 47, 48, 55, 56, 73, 87, 93, 94, 99, 118, 119, 120, 121, 136, 140, 154, 169,
|
|
500
|
+
176, 177, 178, 199, 203, 210, 211, 212, 218, 220, 221, 223, 225, 226, 239, 257, 260, 261, 265,
|
|
501
|
+
],
|
|
502
|
+
"template-cols": [62, 64, 157, 201],
|
|
503
|
+
"template-rows": [67, 68, 153, 156, 186],
|
|
504
|
+
"text-align": [107, 115, 163, 198, 219, 229, 230, 252],
|
|
505
|
+
"text-decoration": [136, 140, 190, 237, 239, 248, 249],
|
|
506
|
+
"text-wrap": [7, 8, 9, 10, 11, 12, 113, 133, 236, 251],
|
|
506
507
|
translate: [66, 161, 162],
|
|
507
508
|
};
|
|
@@ -5,12 +5,17 @@
|
|
|
5
5
|
* @layer variables, reset, components
|
|
6
6
|
* @requires _layers.css, _variables.css, _properties.css (--_*-resolved)
|
|
7
7
|
* @uses <dialog>, ::backdrop — native modal + backdrop
|
|
8
|
+
* @uses :root:has(dialog:modal) — overflow: hidden + scrollbar-gutter: stable while a modal
|
|
9
|
+
* is open (WebKit ignores overscroll-behavior on boxes that do not overflow)
|
|
8
10
|
* @uses @starting-style + allow-discrete — open/close opacity, transform, overlay
|
|
9
11
|
* @uses anchor-name, container-type — layout hooks for sized variants
|
|
10
12
|
* @tokens --ui-dialog-* (@layer variables; --ui-dialog-h defaults to a keyword, so it is read
|
|
11
13
|
* raw: a --h length, or a tier carrying a length, applies; a scale
|
|
12
14
|
* number applies only as a base utility)
|
|
13
15
|
* @presets data-dialog-size="sm | md | lg | xl | 2xl | full | bleed" (the layout bands; sm when absent)
|
|
16
|
+
* @uses @media (width < 40rem) + @container style(--ui-dialog-mobile-size) — below the sm
|
|
17
|
+
* band every dialog takes the hook's size (layout-bleed by default) over its preset;
|
|
18
|
+
* style queries are Firefox 151+, Chrome 111+, Safari 18+, an older engine keeps the preset
|
|
14
19
|
* @consumedby alert-dialog.css, mobile-menu.css
|
|
15
20
|
*/
|
|
16
21
|
|
|
@@ -26,6 +31,9 @@
|
|
|
26
31
|
--ui-dialog-border: 1px solid var(--color-border);
|
|
27
32
|
/* the sm band, the default size */
|
|
28
33
|
--ui-dialog-w: min(var(--layout-sm), 100% - var(--gutters) * 2);
|
|
34
|
+
/* below the sm band, the size every dialog takes: layout-bleed (edge to edge, no page
|
|
35
|
+
behind it), layout-full (inside the gutters), or none (its own preset) */
|
|
36
|
+
--ui-dialog-mobile-size: layout-bleed;
|
|
29
37
|
|
|
30
38
|
/* Reveal transitions/animations */
|
|
31
39
|
--ui-dialog-opacity--start: 0;
|
|
@@ -114,6 +122,16 @@
|
|
|
114
122
|
opacity: 0;
|
|
115
123
|
}
|
|
116
124
|
}
|
|
125
|
+
|
|
126
|
+
/* Chromium and Firefox contain page scroll through overscroll-behavior above; WebKit
|
|
127
|
+
ignores it on a box that does not overflow (the backdrop, a short dialog), so the root
|
|
128
|
+
locks while a modal is open. The gutter stays the width of the scrollbar it replaces,
|
|
129
|
+
so neither the page nor the centred dialog shifts on open or on close; the scroll
|
|
130
|
+
position survives. At rest no gutter is reserved. */
|
|
131
|
+
:root:has(dialog:modal) {
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
scrollbar-gutter: stable;
|
|
134
|
+
}
|
|
117
135
|
}
|
|
118
136
|
|
|
119
137
|
/* Size privates: written by data-dialog-size, non-inheriting. */
|
|
@@ -164,7 +182,10 @@
|
|
|
164
182
|
isolation: isolate;
|
|
165
183
|
}
|
|
166
184
|
|
|
185
|
+
/* A one-row grid, so the content slot is capped by the dialog's height rather than
|
|
186
|
+
sizing it (display went missing with the --ui-dialog-display token in 0.2). */
|
|
167
187
|
:where([data-ui~="dialog"][open]) {
|
|
188
|
+
display: grid;
|
|
168
189
|
grid-template-rows: minmax(0, 1fr);
|
|
169
190
|
min-block-size: 0;
|
|
170
191
|
}
|
|
@@ -186,16 +207,22 @@
|
|
|
186
207
|
padding: 0;
|
|
187
208
|
}
|
|
188
209
|
|
|
210
|
+
/* Each slot owns a row, whatever the order and whichever are present: a body on its
|
|
211
|
+
own still takes the flexible row, so it is the part that scrolls, never the dialog,
|
|
212
|
+
and the close button keeps its corner. */
|
|
189
213
|
:where([data-ui~="dialog"]) [data-dialog-slot~="content"] {
|
|
190
214
|
display: grid;
|
|
191
215
|
align-self: center;
|
|
192
216
|
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
193
217
|
position: relative;
|
|
194
218
|
min-block-size: 0;
|
|
219
|
+
/* a centred grid item sizes to its content; the cap is what hands the body its scroll */
|
|
220
|
+
max-block-size: 100%;
|
|
195
221
|
overflow: clip;
|
|
196
222
|
}
|
|
197
223
|
|
|
198
224
|
:where([data-ui~="dialog"]) [data-dialog-slot~="header"] {
|
|
225
|
+
grid-row: 1;
|
|
199
226
|
display: flex;
|
|
200
227
|
flex-direction: column;
|
|
201
228
|
padding-inline: var(--space-sm);
|
|
@@ -213,6 +240,7 @@
|
|
|
213
240
|
}
|
|
214
241
|
|
|
215
242
|
:where([data-ui~="dialog"]) [data-dialog-slot~="body"] {
|
|
243
|
+
grid-row: 2;
|
|
216
244
|
display: grid;
|
|
217
245
|
padding-inline: var(--space-sm);
|
|
218
246
|
padding-block: var(--space-md);
|
|
@@ -224,6 +252,7 @@
|
|
|
224
252
|
}
|
|
225
253
|
|
|
226
254
|
:where([data-ui~="dialog"]) [data-dialog-slot~="footer"] {
|
|
255
|
+
grid-row: 3;
|
|
227
256
|
block-size: fit-content;
|
|
228
257
|
position: sticky;
|
|
229
258
|
inset-block-end: 0;
|
|
@@ -271,4 +300,29 @@
|
|
|
271
300
|
max-inline-size: 100vi;
|
|
272
301
|
max-block-size: 100svh;
|
|
273
302
|
}
|
|
303
|
+
|
|
304
|
+
/* Below the sm band the viewport is a phone, and every dialog takes --ui-dialog-mobile-size
|
|
305
|
+
over its preset: layout-bleed by default, so there is no page to see behind it. A style
|
|
306
|
+
query reads the hook on the dialog's parent, never on the dialog itself: set it on :root
|
|
307
|
+
for the site, or on one dialog's parent for that dialog alone. A viewport query, not a
|
|
308
|
+
container one, because a top-layer dialog is sized by the viewport. Style queries are
|
|
309
|
+
Firefox 151+; an older engine keeps the preset. */
|
|
310
|
+
@media (width < 40rem) {
|
|
311
|
+
@container style(--ui-dialog-mobile-size: layout-bleed) {
|
|
312
|
+
:where([data-ui~="dialog"]) {
|
|
313
|
+
--_dialog-w: 100vi;
|
|
314
|
+
--_dialog-h: 100svh;
|
|
315
|
+
--_dialog-radius: 0;
|
|
316
|
+
--_dialog-shadow: none;
|
|
317
|
+
max-inline-size: 100vi;
|
|
318
|
+
max-block-size: 100svh;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
@container style(--ui-dialog-mobile-size: layout-full) {
|
|
323
|
+
:where([data-ui~="dialog"]) {
|
|
324
|
+
--_dialog-w: calc(100% - var(--gutters) * 2);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
274
328
|
}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* @requires _layers.css, _variables.css, _properties.css (--_*-resolved, --_focus-shadow), fields.css, _reset.css
|
|
6
6
|
* @uses ::-webkit-calendar-picker-indicator — date/time picker chrome (WebKit)
|
|
7
7
|
* @uses mask — calendar icon (not background-image, for color: currentColor)
|
|
8
|
+
* @uses @supports (-webkit-touch-callout: none) — iOS-only width fix for temporal
|
|
9
|
+
* inputs (webkit.org/b/301648)
|
|
8
10
|
* @tokens --ui-input-* (@layer variables; surface colors and height read the
|
|
9
11
|
* --ui-field-* family directly)
|
|
10
12
|
*/
|
|
@@ -115,6 +117,26 @@
|
|
|
115
117
|
--ui-input-pr: calc(var(--spacing) * 1.5);
|
|
116
118
|
}
|
|
117
119
|
|
|
120
|
+
/* iOS WebKit adds a temporal input's padding and border on top of its inline size,
|
|
121
|
+
whatever box-sizing says (webkit.org/b/301648), so a full-width field overflows;
|
|
122
|
+
-webkit-touch-callout is iOS-only, so the correction lands there alone */
|
|
123
|
+
@supports (-webkit-touch-callout: none) {
|
|
124
|
+
:where([data-ui~="input"]):is(
|
|
125
|
+
[type="date"],
|
|
126
|
+
[type="time"],
|
|
127
|
+
[type="datetime-local"],
|
|
128
|
+
[type="month"],
|
|
129
|
+
[type="week"]
|
|
130
|
+
) {
|
|
131
|
+
inline-size: calc(
|
|
132
|
+
var(--_w-len) + var(--_w-num) * var(--spacing) -
|
|
133
|
+
(var(--_pl-len) + var(--_pl-num) * var(--spacing)) -
|
|
134
|
+
(var(--_pr-len) + var(--_pr-num) * var(--spacing)) - 2 *
|
|
135
|
+
var(--_border-width-resolved, var(--ui-input-border-width))
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
118
140
|
/* Native date/time controls keep their picker indicator tinted to the text */
|
|
119
141
|
:where([data-ui~="input"])::-webkit-calendar-picker-indicator {
|
|
120
142
|
cursor: pointer;
|