@zazz-ui/core 0.10.0 → 0.11.0

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +2 -2
  3. package/dist/sri.json +27 -27
  4. package/dist/zazz.css +1 -1
  5. package/editor/zazz.css-data.json +9 -1
  6. package/editor/zazz.language-data.json +53 -19
  7. package/editor/zazz.lint-data.json +915 -896
  8. package/package.json +1 -1
  9. package/src/base/_defaults.css +2 -2
  10. package/src/base/_variables.css +28 -3
  11. package/src/base/kit-styling.d.ts.map +1 -1
  12. package/src/base/kit-styling.js +145 -143
  13. package/src/base/kit-styling.ts +145 -143
  14. package/src/primitives/accordion/accordion.css +3 -0
  15. package/src/primitives/alert-dialog/alert-dialog.html +14 -14
  16. package/src/primitives/badge/badge.css +14 -0
  17. package/src/primitives/button/button.css +31 -3
  18. package/src/primitives/checkbox/checkbox.css +9 -0
  19. package/src/primitives/combobox/combobox.css +17 -1
  20. package/src/primitives/command/command-dialog.html +109 -107
  21. package/src/primitives/command/command.css +16 -8
  22. package/src/primitives/dialog/dialog.css +92 -40
  23. package/src/primitives/input/input.css +2 -1
  24. package/src/primitives/input-group/input-group.css +7 -3
  25. package/src/primitives/lightbox/lightbox.css +4 -4
  26. package/src/primitives/mobile-menu/mobile-menu.css +17 -16
  27. package/src/primitives/mobile-menu/mobile-menu.html +4 -4
  28. package/src/primitives/navigation-menu/navigation-menu.css +3 -3
  29. package/src/primitives/otp/otp.css +3 -2
  30. package/src/primitives/password-group/password-group.css +7 -3
  31. package/src/primitives/popover/popover.css +23 -10
  32. package/src/primitives/radio/radio.css +12 -2
  33. package/src/primitives/scroll-fade/scroll-fade.css +1 -1
  34. package/src/primitives/select/select.css +26 -13
  35. package/src/primitives/slider/slider.css +3 -0
  36. package/src/primitives/switch/switch.css +11 -0
  37. package/src/primitives/tabs/tabs.css +2 -1
  38. package/src/primitives/toggle/toggle.css +27 -3
  39. package/src/primitives/tooltip/tooltip.css +40 -25
@@ -140,6 +140,7 @@ export const KIT_SELECTORS: readonly string[] = [
140
140
  '[data-reveal]:is([data-reveal-state~="in-view"], [data-gjs-type])',
141
141
  '[data-ui~="badge"]',
142
142
  '[data-ui~="badge"] > svg',
143
+ '[data-ui~="badge"]:is(button, a[href])',
143
144
  '[data-ui~="badge"]:is(button, a[href]):not([aria-disabled="true"])',
144
145
  '[data-ui~="badge"][data-badge-size="icon"]',
145
146
  '[data-ui~="button"]',
@@ -148,6 +149,7 @@ export const KIT_SELECTORS: readonly string[] = [
148
149
  '[data-ui~="button"]:not([aria-disabled="true"])',
149
150
  '[data-ui~="button"][data-button-size="icon"]',
150
151
  '[data-ui~="button"][data-button-size="icon-sm"]',
152
+ '[data-ui~="button"][data-button-size="sm"]',
151
153
  '[data-ui~="button"][data-button-size="sm"]:has(> :is(kbd, ui-kbd-group, [data-ui~="kbd-group"]))',
152
154
  '[data-ui~="callout"]',
153
155
  '[data-ui~="card"]',
@@ -275,59 +277,59 @@ export const KIT_SELECTORS: readonly string[] = [
275
277
  export const TIER_READS: Readonly<Record<string, readonly number[]>> = {
276
278
  band: [63],
277
279
  bg: [
278
- 2, 15, 29, 38, 127, 133, 136, 138, 140, 143, 147, 148, 149, 166, 168, 181, 202, 215, 216, 218,
279
- 225, 227, 236, 237, 240, 241, 242, 258, 259, 261,
280
+ 2, 15, 29, 38, 127, 133, 136, 139, 141, 144, 149, 150, 151, 168, 170, 183, 204, 217, 218, 220,
281
+ 227, 229, 238, 239, 242, 243, 244, 260, 261, 263,
280
282
  ],
281
283
  "border-color": [
282
- 15, 38, 133, 136, 138, 140, 143, 147, 148, 166, 168, 202, 216, 218, 236, 237, 240, 241, 242,
283
- 245, 258, 259,
284
+ 15, 38, 133, 136, 139, 141, 144, 149, 150, 168, 170, 204, 218, 220, 238, 239, 242, 243, 244,
285
+ 247, 260, 261,
284
286
  ],
285
- "border-style": [38, 136, 140, 147, 148, 166, 216, 218, 236, 237, 258, 259],
286
- "border-width": [38, 136, 140, 147, 148, 166, 167, 216, 218, 236, 237, 258, 259],
287
+ "border-style": [38, 136, 141, 149, 150, 168, 218, 220, 238, 239, 260, 261],
288
+ "border-width": [38, 136, 141, 149, 150, 168, 169, 218, 220, 238, 239, 260, 261],
287
289
  "corner-shape": [
288
- 2, 29, 38, 106, 112, 127, 133, 136, 140, 147, 148, 149, 166, 168, 181, 202, 215, 216, 218, 236,
289
- 237, 245, 258, 259, 261,
290
- ],
291
- cursor: [168, 202, 258],
292
- display: [2, 157, 164, 168, 202],
293
- "flex-wrap": [38, 168, 202],
294
- "font-family": [133, 136, 140, 227, 237, 261],
295
- "font-size": [38, 133, 136, 140, 166, 218, 227, 236, 237, 261],
296
- "font-weight": [133, 136, 140, 237],
297
- gap: [2, 34, 38, 61, 95, 133, 136, 140, 147, 148, 157, 164, 168, 202, 237, 261],
298
- h: [38, 136, 149, 166, 181, 215, 218, 258],
299
- items: [38, 164, 168, 202],
300
- justify: [164],
301
- leading: [38, 133, 136, 140, 166, 218, 236, 237, 261],
290
+ 2, 29, 38, 106, 112, 127, 133, 136, 141, 149, 150, 151, 168, 170, 183, 204, 217, 218, 220, 238,
291
+ 239, 247, 260, 261, 263,
292
+ ],
293
+ cursor: [170, 204, 260],
294
+ display: [2, 159, 166, 170, 204],
295
+ "flex-wrap": [38, 170, 204],
296
+ "font-family": [133, 136, 141, 229, 239, 263],
297
+ "font-size": [38, 133, 136, 141, 168, 220, 229, 238, 239, 263],
298
+ "font-weight": [133, 136, 141, 239],
299
+ gap: [2, 34, 38, 61, 95, 133, 136, 141, 149, 150, 159, 166, 170, 204, 239, 263],
300
+ h: [38, 136, 151, 168, 183, 217, 220, 260],
301
+ items: [38, 166, 170, 204],
302
+ justify: [166],
303
+ leading: [38, 133, 136, 141, 168, 220, 238, 239, 263],
302
304
  m: [2],
303
- "max-h": [26, 236],
304
- "max-w": [133, 245],
305
- "min-h": [38, 140, 168, 202, 236, 237, 261],
306
- "min-w": [38, 58, 97, 98, 166, 218, 236, 245, 261],
307
- mx: [133, 245],
308
- my: [133, 245],
309
- p: [2, 147, 148, 168, 202, 236, 245],
310
- pl: [38, 166, 218],
311
- pr: [38, 166, 218],
312
- px: [133, 136, 140, 237, 261],
313
- py: [38, 133, 261],
305
+ "max-h": [26, 238],
306
+ "max-w": [133, 247],
307
+ "min-h": [38, 141, 170, 204, 238, 239, 263],
308
+ "min-w": [38, 58, 97, 98, 168, 220, 238, 247, 263],
309
+ mx: [133, 247],
310
+ my: [133, 247],
311
+ p: [2, 149, 150, 170, 204, 238, 247],
312
+ pl: [38, 168, 220],
313
+ pr: [38, 168, 220],
314
+ px: [133, 136, 141, 239, 263],
315
+ py: [38, 133, 263],
314
316
  radius: [
315
- 2, 29, 38, 106, 112, 127, 133, 136, 140, 147, 148, 149, 166, 168, 181, 202, 215, 216, 218, 236,
316
- 237, 245, 258, 259, 261,
317
+ 2, 29, 38, 106, 112, 127, 133, 136, 141, 149, 150, 151, 168, 170, 183, 204, 217, 218, 220, 238,
318
+ 239, 247, 260, 261, 263,
317
319
  ],
318
- "ring-color": [136, 140, 237],
319
- self: [157],
320
+ "ring-color": [136, 141, 239],
321
+ self: [159],
320
322
  shadow: [
321
- 20, 26, 38, 97, 133, 136, 140, 147, 148, 149, 166, 168, 202, 216, 218, 236, 237, 245, 258, 259,
323
+ 20, 26, 38, 97, 133, 136, 141, 149, 150, 151, 168, 170, 204, 218, 220, 238, 239, 247, 260, 261,
322
324
  ],
323
- "shadow-angle": [4, 257],
324
- size: [216, 259],
325
- "template-cols": [157],
325
+ "shadow-angle": [4, 259],
326
+ size: [218, 261],
327
+ "template-cols": [159],
326
328
  text: [
327
- 38, 133, 136, 138, 140, 143, 147, 148, 149, 166, 168, 202, 218, 227, 236, 237, 240, 241, 242,
328
- 261,
329
+ 38, 133, 136, 139, 141, 144, 149, 150, 151, 168, 170, 204, 220, 229, 238, 239, 242, 243, 244,
330
+ 263,
329
331
  ],
330
- w: [38, 98, 149, 157, 166, 168, 181, 202, 215, 218, 236, 258],
332
+ w: [38, 98, 151, 159, 168, 170, 183, 204, 217, 220, 238, 260],
331
333
  };
332
334
 
333
335
  /**
@@ -336,178 +338,178 @@ export const TIER_READS: Readonly<Record<string, readonly number[]>> = {
336
338
  * their own value, and a tier alone applies there only through `TIER_READS`.
337
339
  */
338
340
  export const TIER_BLOCKS: Readonly<Record<string, readonly number[]>> = {
339
- "anchor-name": [28, 38, 49, 96, 103, 131, 149, 188, 191, 198, 200],
340
- animation: [215, 217, 257],
341
- aspect: [82, 84, 139, 144, 145, 243, 244],
341
+ "anchor-name": [28, 38, 49, 96, 103, 131, 151, 190, 193, 200, 202],
342
+ animation: [152, 217, 219, 259],
343
+ aspect: [82, 84, 140, 145, 146, 245, 246],
342
344
  "backdrop-filter": [117],
343
- band: [63, 159, 160, 163],
345
+ band: [63, 161, 162, 165],
344
346
  basis: [
345
- 18, 19, 35, 36, 39, 55, 56, 73, 87, 120, 171, 172, 177, 178, 199, 205, 206, 211, 212, 219, 263,
347
+ 18, 19, 35, 36, 39, 55, 56, 73, 87, 120, 173, 174, 179, 180, 201, 207, 208, 213, 214, 221, 265,
346
348
  ],
347
349
  bg: [
348
350
  2, 15, 16, 29, 38, 39, 56, 80, 83, 99, 100, 106, 109, 111, 112, 113, 117, 123, 127, 132, 133,
349
- 136, 140, 147, 148, 149, 154, 166, 168, 177, 178, 181, 184, 185, 202, 211, 212, 215, 216, 218,
350
- 221, 225, 227, 230, 231, 233, 236, 237, 245, 249, 251, 255, 256, 257, 258, 259, 261,
351
+ 136, 141, 149, 150, 151, 156, 168, 170, 179, 180, 183, 186, 187, 204, 213, 214, 217, 218, 220,
352
+ 223, 227, 229, 232, 233, 235, 238, 239, 247, 251, 253, 257, 258, 259, 260, 261, 263,
351
353
  ],
352
- "col-end": [63, 158, 159, 160, 163],
353
- "col-span": [63, 159, 160, 163],
354
- "col-start": [63, 158, 159, 160, 163],
354
+ "col-end": [63, 160, 161, 162, 165],
355
+ "col-span": [63, 161, 162, 165],
356
+ "col-start": [63, 160, 161, 162, 165],
355
357
  elevation: [
356
- 20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
357
- 168, 177, 178, 202, 216, 218, 221, 236, 237, 245, 252, 258, 259,
358
+ 20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 141, 149, 150, 151, 168,
359
+ 170, 179, 180, 204, 218, 220, 223, 238, 239, 247, 254, 260, 261,
358
360
  ],
359
361
  flex: [
360
- 18, 19, 35, 36, 39, 47, 48, 55, 56, 73, 87, 93, 94, 99, 118, 119, 120, 121, 136, 140, 154, 169,
361
- 171, 172, 176, 177, 178, 199, 203, 205, 206, 210, 211, 212, 216, 219, 220, 222, 224, 225, 237,
362
- 255, 258, 259, 263,
362
+ 18, 19, 35, 36, 39, 47, 48, 55, 56, 73, 87, 93, 94, 99, 118, 119, 120, 121, 136, 141, 156, 171,
363
+ 173, 174, 178, 179, 180, 201, 205, 207, 208, 212, 213, 214, 218, 221, 222, 224, 226, 227, 239,
364
+ 257, 260, 261, 265,
363
365
  ],
364
- "flex-wrap": [38, 168, 184, 202],
366
+ "flex-wrap": [38, 170, 186, 204],
365
367
  gap: [
366
368
  2, 23, 25, 34, 37, 38, 42, 44, 51, 52, 57, 61, 62, 79, 85, 92, 95, 100, 102, 108, 110, 112, 120,
367
- 123, 133, 136, 140, 147, 148, 154, 157, 168, 169, 175, 184, 191, 198, 201, 202, 203, 209, 218,
368
- 219, 221, 237, 254, 261,
369
+ 123, 133, 136, 141, 149, 150, 156, 159, 170, 171, 177, 186, 193, 200, 203, 204, 205, 211, 220,
370
+ 221, 223, 239, 256, 263,
369
371
  ],
370
372
  "gap-x": [
371
373
  2, 23, 25, 34, 37, 38, 42, 44, 51, 52, 57, 61, 62, 79, 85, 92, 95, 100, 102, 108, 110, 112, 120,
372
- 123, 133, 136, 140, 147, 148, 154, 157, 168, 169, 175, 184, 191, 198, 201, 202, 203, 209, 218,
373
- 219, 221, 237, 254, 261,
374
+ 123, 133, 136, 141, 149, 150, 156, 159, 170, 171, 177, 186, 193, 200, 203, 204, 205, 211, 220,
375
+ 221, 223, 239, 256, 263,
374
376
  ],
375
377
  "gap-y": [
376
378
  2, 23, 25, 34, 37, 38, 42, 44, 51, 52, 57, 61, 79, 85, 92, 95, 100, 102, 108, 110, 112, 120,
377
- 123, 133, 136, 147, 148, 154, 157, 168, 169, 175, 184, 191, 198, 201, 202, 203, 209, 218, 219,
378
- 221, 254, 261,
379
+ 123, 133, 136, 149, 150, 156, 159, 170, 171, 177, 186, 193, 200, 203, 204, 205, 211, 220, 221,
380
+ 223, 256, 263,
379
381
  ],
380
- "grid-cols": [62, 64, 157, 201],
381
- "grid-rows": [67, 68, 153, 156, 186],
382
- isolation: [29, 33, 127, 149, 188, 263],
382
+ "grid-cols": [62, 64, 159, 203],
383
+ "grid-rows": [67, 68, 155, 158],
384
+ isolation: [29, 33, 127, 151, 190, 254, 265],
383
385
  items: [
384
386
  20, 21, 29, 38, 47, 48, 51, 54, 61, 62, 69, 70, 83, 85, 100, 106, 108, 110, 112, 113, 116, 123,
385
- 127, 133, 136, 137, 140, 141, 152, 164, 168, 169, 171, 172, 175, 185, 186, 191, 198, 201, 202,
386
- 203, 205, 206, 209, 216, 218, 219, 221, 223, 237, 239, 259, 261,
387
+ 127, 133, 136, 137, 141, 142, 154, 166, 170, 171, 173, 174, 177, 187, 188, 193, 200, 203, 204,
388
+ 205, 207, 208, 211, 218, 220, 221, 223, 225, 239, 241, 261, 263,
387
389
  ],
388
390
  justify: [
389
- 20, 21, 69, 70, 76, 83, 86, 113, 115, 136, 137, 140, 141, 152, 154, 164, 169, 185, 198, 203,
390
- 218, 237, 239, 261,
391
+ 20, 21, 51, 69, 70, 76, 83, 86, 113, 115, 136, 137, 141, 142, 154, 155, 156, 166, 171, 186, 187,
392
+ 200, 205, 220, 239, 241, 263,
391
393
  ],
392
394
  opacity: [
393
- 0, 1, 47, 66, 71, 72, 84, 88, 89, 109, 114, 117, 123, 124, 125, 126, 133, 134, 135, 161, 162,
394
- 187, 238, 245, 252, 253, 260, 262,
395
+ 0, 1, 47, 66, 71, 72, 84, 88, 89, 109, 114, 117, 123, 124, 125, 126, 133, 134, 135, 163, 164,
396
+ 189, 240, 247, 254, 255, 262, 264,
395
397
  ],
396
- order: [24, 43, 53, 170, 171, 172, 173, 174, 204, 205, 206, 207, 208],
398
+ order: [24, 43, 53, 172, 173, 174, 175, 176, 206, 207, 208, 209, 210],
397
399
  p: [
398
- 2, 3, 5, 6, 22, 25, 38, 40, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 75, 76, 83, 100, 104, 112,
399
- 113, 117, 122, 123, 133, 136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154,
400
- 155, 166, 168, 169, 171, 172, 175, 177, 178, 179, 180, 182, 183, 184, 185, 190, 198, 202, 203,
401
- 205, 206, 209, 211, 212, 213, 214, 218, 221, 228, 229, 232, 236, 237, 239, 243, 244, 245, 248,
402
- 251, 261, 264, 265, 266,
400
+ 2, 3, 5, 6, 22, 25, 38, 40, 41, 44, 50, 51, 53, 54, 56, 57, 59, 60, 70, 75, 76, 83, 100, 104,
401
+ 112, 113, 117, 122, 123, 133, 136, 137, 140, 141, 142, 143, 145, 146, 148, 149, 150, 152, 154,
402
+ 155, 156, 157, 168, 170, 171, 173, 174, 177, 179, 180, 181, 182, 184, 185, 186, 187, 192, 200,
403
+ 204, 205, 207, 208, 211, 213, 214, 215, 216, 220, 223, 230, 231, 234, 238, 239, 241, 245, 246,
404
+ 247, 250, 253, 263, 266, 267, 268,
403
405
  ],
404
406
  pb: [
405
- 2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 75, 76, 104, 112, 117, 122, 123, 133,
406
- 137, 139, 141, 144, 145, 147, 148, 150, 152, 154, 168, 171, 172, 178, 182, 184, 185, 190, 198,
407
- 202, 205, 206, 212, 228, 229, 232, 236, 239, 243, 244, 245, 251, 261,
407
+ 2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 54, 56, 57, 59, 60, 70, 75, 76, 104, 112, 117, 122, 123,
408
+ 133, 137, 140, 142, 145, 146, 149, 150, 152, 154, 155, 156, 170, 173, 174, 180, 184, 186, 187,
409
+ 192, 200, 204, 207, 208, 214, 230, 231, 234, 238, 241, 245, 246, 247, 253, 263,
408
410
  ],
409
411
  pl: [
410
- 2, 3, 5, 6, 22, 25, 38, 40, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 83, 100, 112, 113, 117, 122,
411
- 123, 133, 136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154, 155, 166, 168,
412
- 169, 175, 177, 178, 179, 182, 183, 184, 185, 190, 198, 202, 203, 209, 211, 212, 213, 218, 221,
413
- 228, 229, 236, 237, 239, 243, 244, 245, 248, 251, 261, 264, 265, 266,
412
+ 2, 3, 5, 6, 22, 25, 38, 40, 41, 44, 50, 51, 53, 54, 56, 57, 59, 60, 70, 83, 100, 112, 113, 117,
413
+ 122, 123, 133, 136, 137, 140, 141, 142, 143, 145, 146, 148, 149, 150, 152, 154, 156, 157, 168,
414
+ 170, 171, 177, 179, 180, 181, 184, 185, 186, 187, 192, 200, 204, 205, 211, 213, 214, 215, 220,
415
+ 223, 230, 231, 238, 239, 241, 245, 246, 247, 250, 253, 263, 266, 267, 268,
414
416
  ],
415
417
  "place-content": [
416
- 20, 21, 69, 70, 76, 83, 86, 113, 115, 136, 137, 140, 141, 152, 154, 164, 169, 185, 198, 203,
417
- 218, 237, 239, 245, 261,
418
+ 20, 21, 51, 69, 70, 76, 83, 86, 113, 115, 136, 137, 141, 142, 154, 155, 156, 166, 171, 186, 187,
419
+ 200, 205, 220, 239, 241, 247, 263,
418
420
  ],
419
421
  "place-items": [
420
422
  20, 21, 29, 38, 47, 48, 51, 54, 61, 62, 69, 70, 83, 85, 100, 106, 108, 110, 112, 113, 116, 123,
421
- 127, 133, 136, 137, 140, 141, 152, 164, 168, 169, 171, 172, 175, 185, 186, 191, 198, 201, 202,
422
- 203, 205, 206, 209, 216, 218, 219, 221, 223, 237, 239, 259, 261,
423
+ 127, 133, 136, 137, 141, 142, 154, 166, 170, 171, 173, 174, 177, 187, 188, 193, 200, 203, 204,
424
+ 205, 207, 208, 211, 218, 220, 221, 223, 225, 239, 241, 261, 263,
423
425
  ],
424
426
  position: [
425
- 13, 17, 29, 30, 33, 65, 66, 77, 78, 79, 82, 90, 91, 101, 105, 109, 111, 112, 113, 114, 117, 123,
426
- 127, 128, 132, 151, 153, 154, 184, 185, 186, 188, 189, 197, 216, 237, 238, 245, 249, 252, 259,
427
- 262, 263,
427
+ 13, 17, 29, 30, 33, 47, 65, 66, 77, 78, 79, 82, 90, 91, 101, 105, 109, 111, 112, 113, 114, 117,
428
+ 123, 127, 128, 132, 138, 146, 147, 153, 155, 190, 191, 199, 218, 239, 240, 247, 251, 254, 260,
429
+ 261, 264, 265,
428
430
  ],
429
- "position-anchor": [26, 45, 59, 97, 102, 111, 133, 192, 193, 194, 195, 196],
430
- "position-area": [117, 245],
431
+ "position-anchor": [26, 45, 59, 97, 102, 111, 133, 194, 195, 196, 197, 198],
432
+ "position-area": [117, 247],
431
433
  pr: [
432
- 2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 100, 112, 113, 117, 122, 123, 133,
433
- 136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154, 155, 166, 168, 169, 175,
434
- 177, 178, 180, 182, 184, 185, 190, 198, 202, 203, 209, 211, 212, 214, 218, 221, 228, 229, 236,
435
- 237, 239, 243, 244, 245, 251, 261,
434
+ 2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 54, 56, 57, 59, 60, 70, 100, 112, 113, 117, 122, 123, 133,
435
+ 136, 137, 140, 141, 142, 143, 145, 146, 148, 149, 150, 152, 154, 156, 157, 168, 170, 171, 177,
436
+ 179, 180, 182, 184, 186, 187, 192, 200, 204, 205, 211, 213, 214, 216, 220, 223, 230, 231, 238,
437
+ 239, 241, 245, 246, 247, 253, 263,
436
438
  ],
437
439
  pt: [
438
- 2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 75, 76, 104, 112, 117, 122, 123, 133,
439
- 137, 139, 141, 144, 145, 147, 148, 150, 152, 154, 155, 168, 171, 172, 178, 182, 184, 185, 190,
440
- 198, 202, 205, 206, 212, 228, 229, 232, 236, 239, 243, 244, 245, 251, 261,
440
+ 2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 54, 56, 57, 59, 60, 70, 75, 76, 104, 112, 117, 122, 123,
441
+ 133, 137, 140, 142, 145, 146, 149, 150, 152, 154, 156, 157, 170, 173, 174, 180, 184, 186, 187,
442
+ 192, 200, 204, 207, 208, 214, 230, 231, 234, 238, 241, 245, 246, 247, 253, 263,
441
443
  ],
442
444
  px: [
443
- 2, 3, 5, 6, 22, 25, 38, 40, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 83, 100, 112, 113, 117, 122,
444
- 123, 133, 136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154, 155, 166, 168,
445
- 169, 175, 177, 178, 179, 180, 182, 183, 184, 185, 190, 198, 202, 203, 209, 211, 212, 213, 214,
446
- 218, 221, 228, 229, 236, 237, 239, 243, 244, 245, 248, 251, 261, 264, 265, 266,
445
+ 2, 3, 5, 6, 22, 25, 38, 40, 41, 44, 50, 51, 53, 54, 56, 57, 59, 60, 70, 83, 100, 112, 113, 117,
446
+ 122, 123, 133, 136, 137, 140, 141, 142, 143, 145, 146, 148, 149, 150, 152, 154, 156, 157, 168,
447
+ 170, 171, 177, 179, 180, 181, 182, 184, 185, 186, 187, 192, 200, 204, 205, 211, 213, 214, 215,
448
+ 216, 220, 223, 230, 231, 238, 239, 241, 245, 246, 247, 250, 253, 263, 266, 267, 268,
447
449
  ],
448
450
  py: [
449
- 2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 75, 76, 104, 112, 117, 122, 123, 133,
450
- 137, 139, 141, 144, 145, 147, 148, 150, 152, 154, 155, 168, 171, 172, 178, 182, 184, 185, 190,
451
- 198, 202, 205, 206, 212, 228, 229, 232, 236, 239, 243, 244, 245, 251, 261,
451
+ 2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 54, 56, 57, 59, 60, 70, 75, 76, 104, 112, 117, 122, 123,
452
+ 133, 137, 140, 142, 145, 146, 149, 150, 152, 154, 155, 156, 157, 170, 173, 174, 180, 184, 186,
453
+ 187, 192, 200, 204, 207, 208, 214, 230, 231, 234, 238, 241, 245, 246, 247, 253, 263,
452
454
  ],
453
455
  radius: [
454
456
  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, 168, 176, 177, 178, 181, 190, 198, 202, 210, 211,
456
- 212, 215, 216, 218, 221, 236, 237, 245, 251, 258, 259, 260, 261,
457
+ 130, 132, 133, 136, 141, 149, 150, 151, 168, 170, 178, 179, 180, 183, 192, 200, 204, 212, 213,
458
+ 214, 217, 218, 220, 223, 238, 239, 247, 253, 260, 261, 262, 263,
457
459
  ],
458
460
  "radius-b": [
459
461
  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, 168, 176, 177, 178, 181, 190, 198, 202, 210, 211,
461
- 212, 215, 216, 218, 221, 236, 237, 245, 251, 258, 259, 260, 261,
462
+ 130, 132, 133, 136, 141, 149, 150, 151, 168, 170, 178, 179, 180, 183, 192, 200, 204, 212, 213,
463
+ 214, 217, 218, 220, 223, 238, 239, 247, 253, 260, 261, 262, 263,
462
464
  ],
463
465
  "radius-l": [
464
466
  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, 168, 176, 177, 178, 181, 190, 198, 202, 210, 211,
466
- 212, 215, 216, 218, 221, 236, 237, 245, 251, 258, 259, 260, 261,
467
+ 130, 132, 133, 136, 141, 149, 150, 151, 168, 170, 178, 179, 180, 183, 192, 200, 204, 212, 213,
468
+ 214, 217, 218, 220, 223, 238, 239, 247, 253, 260, 261, 262, 263,
467
469
  ],
468
470
  "radius-r": [
469
471
  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, 168, 176, 177, 178, 181, 190, 198, 202, 210, 211,
471
- 212, 215, 216, 218, 221, 236, 237, 245, 251, 258, 259, 260, 261,
472
+ 130, 132, 133, 136, 141, 149, 150, 151, 168, 170, 178, 179, 180, 183, 192, 200, 204, 212, 213,
473
+ 214, 217, 218, 220, 223, 238, 239, 247, 253, 260, 261, 262, 263,
472
474
  ],
473
475
  "radius-t": [
474
476
  2, 14, 29, 31, 32, 38, 47, 71, 74, 80, 81, 82, 87, 90, 100, 106, 111, 112, 113, 123, 127, 129,
475
- 130, 132, 133, 136, 140, 147, 148, 149, 166, 168, 176, 177, 178, 181, 190, 198, 202, 210, 211,
476
- 212, 215, 216, 218, 221, 236, 237, 245, 251, 258, 259, 260, 261,
477
+ 130, 132, 133, 136, 141, 149, 150, 151, 168, 170, 178, 179, 180, 183, 192, 200, 204, 212, 213,
478
+ 214, 217, 218, 220, 223, 238, 239, 247, 253, 260, 261, 262, 263,
477
479
  ],
478
480
  ring: [
479
- 20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
480
- 168, 177, 178, 202, 216, 218, 221, 236, 237, 245, 252, 258, 259,
481
+ 20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 141, 149, 150, 151, 168,
482
+ 170, 179, 180, 204, 218, 220, 223, 238, 239, 247, 254, 260, 261,
481
483
  ],
482
484
  "ring-color": [
483
- 20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
484
- 168, 177, 178, 202, 216, 218, 221, 236, 237, 245, 252, 258, 259,
485
+ 20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 141, 149, 150, 151, 168,
486
+ 170, 179, 180, 204, 218, 220, 223, 238, 239, 247, 254, 260, 261,
485
487
  ],
486
488
  "ring-offset": [
487
- 20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
488
- 168, 177, 178, 202, 216, 218, 221, 236, 237, 245, 252, 258, 259,
489
+ 20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 141, 149, 150, 151, 168,
490
+ 170, 179, 180, 204, 218, 220, 223, 238, 239, 247, 254, 260, 261,
489
491
  ],
490
492
  "ring-offset-color": [
491
- 20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
492
- 168, 177, 178, 202, 216, 218, 221, 236, 237, 245, 252, 258, 259,
493
+ 20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 141, 149, 150, 151, 168,
494
+ 170, 179, 180, 204, 218, 220, 223, 238, 239, 247, 254, 260, 261,
493
495
  ],
494
- "row-end": [150, 154, 155, 158, 159, 160, 163],
495
- "row-span": [150, 154, 155, 159, 160, 163],
496
- "row-start": [150, 154, 155, 158, 159, 160, 163],
497
- self: [153, 154, 157, 163, 165, 226],
496
+ "row-end": [152, 156, 157, 160, 161, 162, 165],
497
+ "row-span": [152, 156, 157, 161, 162, 165],
498
+ "row-start": [152, 156, 157, 160, 161, 162, 165],
499
+ self: [155, 156, 159, 165, 167, 228],
498
500
  shadow: [
499
- 20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
500
- 168, 177, 178, 202, 216, 218, 221, 236, 237, 245, 252, 258, 259,
501
+ 20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 141, 149, 150, 151, 168,
502
+ 170, 179, 180, 204, 218, 220, 223, 238, 239, 247, 254, 260, 261,
501
503
  ],
502
504
  shrink: [
503
- 18, 19, 35, 36, 39, 47, 48, 55, 56, 73, 87, 93, 94, 99, 118, 119, 120, 121, 136, 140, 154, 169,
504
- 176, 177, 178, 199, 203, 210, 211, 212, 216, 219, 220, 222, 224, 225, 237, 255, 258, 259, 263,
505
- ],
506
- "template-cols": [62, 64, 157, 201],
507
- "template-rows": [67, 68, 153, 156, 186],
508
- "text-align": [107, 115, 163, 198, 218, 227, 228, 250],
509
- "text-decoration": [136, 140, 190, 235, 237, 246, 247],
510
- "text-wrap": [7, 8, 9, 10, 11, 12, 113, 133, 234, 249],
511
- translate: [66, 161, 162],
512
- z: [65, 77, 78, 91, 111, 113, 151, 185],
505
+ 18, 19, 35, 36, 39, 47, 48, 55, 56, 73, 87, 93, 94, 99, 118, 119, 120, 121, 136, 141, 156, 171,
506
+ 178, 179, 180, 201, 205, 212, 213, 214, 218, 221, 222, 224, 226, 227, 239, 257, 260, 261, 265,
507
+ ],
508
+ "template-cols": [62, 64, 159, 203],
509
+ "template-rows": [67, 68, 155, 158],
510
+ "text-align": [107, 115, 165, 200, 220, 229, 230, 252],
511
+ "text-decoration": [136, 141, 192, 237, 239, 248, 249],
512
+ "text-wrap": [7, 8, 9, 10, 11, 12, 113, 133, 236, 251],
513
+ translate: [66, 163, 164],
514
+ z: [65, 77, 78, 91, 111, 113, 153, 187],
513
515
  };
@@ -5,6 +5,7 @@
5
5
  * @layer variables, reset, components
6
6
  * @requires _layers.css, _variables.css, _properties.css (--_focus-shadow)
7
7
  * @uses ::details-content: native open/close block-size transition (reset layer)
8
+ * @uses --_touch-min (touch screens): the summary row grows to the touch floor
8
9
  * @uses interpolate-size: allow-keywords (from _variables.css; required for
9
10
  * block-size: 0 -> auto transitions)
10
11
  * @tokens --ui-accordion-* (@layer variables; none backs a utility)
@@ -64,6 +65,8 @@
64
65
  display: flex;
65
66
  align-items: center;
66
67
  justify-content: space-between;
68
+ /* the padding sits on <details>, so on touch the row itself takes the floor */
69
+ min-block-size: var(--_touch-min);
67
70
 
68
71
  /* The ring is published to --_focus-shadow so a --shadow utility on the
69
72
  summary keeps it; the ring widths grow from 0 so the ring eases in. */
@@ -49,19 +49,19 @@
49
49
  dialog by clicking outside the dialog or pressing the Escape key.
50
50
  </p>
51
51
  </div>
52
+ <footer data-dialog-slot="footer">
53
+ <button data-ui="button" type="button" commandfor="alert-dialog-example-1" command="close">
54
+ Cancel
55
+ </button>
56
+ <button
57
+ data-ui="button"
58
+ data-button-variant="destructive"
59
+ type="button"
60
+ commandfor="alert-dialog-example-1"
61
+ command="close"
62
+ >
63
+ Delete account
64
+ </button>
65
+ </footer>
52
66
  </div>
53
- <footer data-dialog-slot="footer">
54
- <button data-ui="button" type="button" commandfor="alert-dialog-example-1" command="close">
55
- Cancel
56
- </button>
57
- <button
58
- data-ui="button"
59
- data-button-variant="destructive"
60
- type="button"
61
- commandfor="alert-dialog-example-1"
62
- command="close"
63
- >
64
- Delete account
65
- </button>
66
- </footer>
67
67
  </dialog>
@@ -5,6 +5,8 @@
5
5
  * @requires _layers.css, _variables.css, _reset.css, _properties.css (--_*-resolved, --_focus-shadow), fields.css (--ui-field-* border/ring)
6
6
  * @uses color-mix(), oklch(from …): variant hover/active tints
7
7
  * @uses text-box: vertical trim (patchy browser support)
8
+ * @uses --_touch-min (touch screens): an interactive badge keeps its size and extends an
9
+ * invisible ::after hit area to the touch floor
8
10
  * @uses corner-shape — superellipse corners; unsupported browsers keep plain
9
11
  * rounded corners
10
12
  * @tokens --ui-badge-* (@layer variables; hooks are named after the utilities they back)
@@ -281,6 +283,18 @@
281
283
  BADGE STATES — interactive badges only (button, a[href])
282
284
  =========================================================================== */
283
285
 
286
+ /* touch: the badge keeps its box; a transparent ::after centred on it is at least
287
+ --_touch-min square (it collapses to the box on a mouse) */
288
+ :where([data-ui~="badge"]):is(button, a[href]) {
289
+ position: relative;
290
+ }
291
+
292
+ :where([data-ui~="badge"]:is(button, a[href]))::after {
293
+ content: "";
294
+ position: absolute;
295
+ inset: min(0px, calc((100% - var(--_touch-min)) / 2));
296
+ }
297
+
284
298
  @media (hover: hover) {
285
299
  :where([data-ui~="badge"]):is(button, a[href]):hover:not(:disabled, [aria-disabled="true"]) {
286
300
  color: var(--_text-resolved, var(--_badge-text--hover, var(--ui-badge-text--hover)));
@@ -7,6 +7,8 @@
7
7
  * @uses text-box — vertical trim (patchy browser support)
8
8
  * @uses corner-shape — superellipse corners; unsupported browsers keep plain
9
9
  * rounded corners
10
+ * @uses --_touch-min (touch screens) — the default and icon sizes grow to the touch
11
+ * floor; sm and icon-sm keep their box and extend an invisible ::after hit area
10
12
  * @tokens --ui-button-* (@layer variables; hooks are named after the utilities they back; metrics default to the --ui-field-* family)
11
13
  * @consumedby toggle.css, select.css, button-group.css, autocomplete.css, combobox.css,
12
14
  * command.css, lightbox.css, menu.css, navigation-menu.css, popover.css
@@ -210,7 +212,12 @@
210
212
 
211
213
  --_min-h-len: var(--_min-h-resolved, var(--_button-min-h, var(--ui-button-min-h)));
212
214
  --_min-h-num: var(--_min-h-resolved, var(--_button-min-h, var(--ui-button-min-h)));
213
- min-block-size: calc(var(--_min-h-len) + var(--_min-h-num) * var(--spacing));
215
+ /* the touch floor: 0 on a mouse; a variant or size that must stay small sets it to 0px */
216
+ --_touch-floor: var(--_touch-min);
217
+ min-block-size: max(
218
+ calc(var(--_min-h-len) + var(--_min-h-num) * var(--spacing)),
219
+ var(--_touch-floor)
220
+ );
214
221
  min-inline-size: max-content;
215
222
 
216
223
  --_px-len: var(--_px-resolved, var(--_button-px, var(--ui-button-px)));
@@ -530,6 +537,8 @@
530
537
  --_button-min-h: 0;
531
538
  --_button-px: 0;
532
539
  --_button-radius: 0;
540
+ /* inline text: no touch floor (it would break line flow) */
541
+ --_touch-floor: 0px;
533
542
 
534
543
  --_button-shadow: 0 0 transparent;
535
544
  }
@@ -543,6 +552,9 @@
543
552
  --_button-px: calc(var(--spacing) * 2);
544
553
  --_button-radius: var(--radius-sm);
545
554
  --_button-font-size: var(--font-size-xs);
555
+ /* dense by choice: the box stays small and ::after takes the touch floor */
556
+ --_touch-floor: 0px;
557
+ position: relative;
546
558
  }
547
559
 
548
560
  :where(
@@ -552,8 +564,14 @@
552
564
  }
553
565
 
554
566
  :where([data-ui~="button"][data-button-size="icon"]) {
555
- block-size: calc(var(--_min-h-len) + var(--_min-h-num) * var(--spacing));
556
- inline-size: calc(var(--_min-h-len) + var(--_min-h-num) * var(--spacing));
567
+ block-size: max(
568
+ calc(var(--_min-h-len) + var(--_min-h-num) * var(--spacing)),
569
+ var(--_touch-floor)
570
+ );
571
+ inline-size: max(
572
+ calc(var(--_min-h-len) + var(--_min-h-num) * var(--spacing)),
573
+ var(--_touch-floor)
574
+ );
557
575
  padding: 0;
558
576
  aspect-ratio: 1 / 1;
559
577
  }
@@ -564,6 +582,8 @@
564
582
  --_button-radius: var(--radius-sm);
565
583
  /* the hook, not a private: it must inherit to reach the icon */
566
584
  --ui-button-icon-size: calc(var(--spacing) * 3.5);
585
+ --_touch-floor: 0px;
586
+ position: relative;
567
587
 
568
588
  block-size: calc(var(--_min-h-len) + var(--_min-h-num) * var(--spacing));
569
589
  inline-size: calc(var(--_min-h-len) + var(--_min-h-num) * var(--spacing));
@@ -571,6 +591,14 @@
571
591
  aspect-ratio: 1 / 1;
572
592
  }
573
593
 
594
+ /* touch: sm and icon-sm keep their box; a transparent ::after centred on the button
595
+ is at least --_touch-min square (it collapses to the box on a mouse) */
596
+ :where([data-ui~="button"]:is([data-button-size="sm"], [data-button-size="icon-sm"]))::after {
597
+ content: "";
598
+ position: absolute;
599
+ inset: min(0px, calc((100% - var(--_touch-min)) / 2));
600
+ }
601
+
574
602
  /* ===========================================================================
575
603
  BUTTON KBD
576
604
  =========================================================================== */
@@ -4,6 +4,8 @@
4
4
  * @layer variables, reset
5
5
  * @requires _layers.css, _variables.css, _properties.css (--_*-resolved, --_focus-shadow), fields.css (--ui-field-* background/border)
6
6
  * @uses appearance: none — redraws the native control from theme tokens
7
+ * @uses --_touch-min (touch screens) — the box keeps its size; an invisible ::after
8
+ * centred on it is at least the touch floor square
7
9
  * @uses checked/indeterminate fill with --primary and layer a glyph (never color alone)
8
10
  * @uses corner-shape — superellipse corners; unsupported browsers keep plain
9
11
  * rounded corners
@@ -48,6 +50,13 @@
48
50
  block-size: calc(var(--_size-len) + var(--_size-num) * var(--spacing));
49
51
 
50
52
  background-color: var(--_bg-resolved, var(--ui-checkbox-bg));
53
+
54
+ /* touch: the hit area, --_touch-min square at least; collapses to the box on a mouse */
55
+ &::after {
56
+ content: "";
57
+ position: absolute;
58
+ inset: min(0px, calc((100% - var(--_touch-min)) / 2));
59
+ }
51
60
  border-width: var(--_border-width-resolved, var(--ui-checkbox-border-width));
52
61
  border-style: var(--_border-style-resolved, var(--ui-checkbox-border-style));
53
62
  border-color: var(--_border-color-resolved, var(--ui-checkbox-border-color));