@kerfjs/ui 5.0.0-beta.52 → 5.0.0-beta.54

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 (188) hide show
  1. package/README.md +1 -0
  2. package/ai/application-ui-diagnostic-ids-v1.json +1 -0
  3. package/ai/component-catalog-v2.d.ts +3 -0
  4. package/ai/component-catalog-v2.json +85 -7
  5. package/ai/component-catalog-v2.schema.json +9 -1
  6. package/ai/component-catalog.json +108 -11
  7. package/ai/public-api-signatures-v1.md +215 -25
  8. package/ai/skill.md +23 -17
  9. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  10. package/analyzer/index.mjs +48 -0
  11. package/analyzer/loud-pairs.d.mts +49 -0
  12. package/analyzer/loud-pairs.mjs +357 -0
  13. package/dist/app-tab.d.ts +7 -5
  14. package/dist/app-tab.js +1 -1
  15. package/dist/browser/segmented-control.js +0 -1
  16. package/dist/catalog.js +4 -4
  17. package/dist/{chunk-EKYZCRCX.js → chunk-3CGQ7ZNO.js} +54 -22
  18. package/dist/chunk-3CGQ7ZNO.js.map +1 -0
  19. package/dist/{chunk-7XJO4D6A.js → chunk-3NBL3OUQ.js} +2 -2
  20. package/dist/{chunk-7XJO4D6A.js.map → chunk-3NBL3OUQ.js.map} +1 -1
  21. package/dist/{chunk-2S7OWAEV.js → chunk-44IG7PFV.js} +3 -3
  22. package/dist/{chunk-2S7OWAEV.js.map → chunk-44IG7PFV.js.map} +1 -1
  23. package/dist/{chunk-UKKSMZYT.js → chunk-46263QLK.js} +51 -1
  24. package/dist/chunk-46263QLK.js.map +1 -0
  25. package/dist/{chunk-DNCOFEUL.js → chunk-5I22LMCV.js} +2 -2
  26. package/dist/{chunk-DNCOFEUL.js.map → chunk-5I22LMCV.js.map} +1 -1
  27. package/dist/{chunk-NDUGJ4TU.js → chunk-5NDQABWK.js} +1 -1
  28. package/dist/{chunk-NDUGJ4TU.js.map → chunk-5NDQABWK.js.map} +1 -1
  29. package/dist/{chunk-KAQUUTZR.js → chunk-ATHXW6RP.js} +2 -2
  30. package/dist/{chunk-KAQUUTZR.js.map → chunk-ATHXW6RP.js.map} +1 -1
  31. package/dist/{chunk-JGFZ42ZF.js → chunk-BJJKFVWW.js} +14 -5
  32. package/dist/chunk-BJJKFVWW.js.map +1 -0
  33. package/dist/{chunk-T7C2VZUB.js → chunk-C2FAYFDE.js} +2 -2
  34. package/dist/{chunk-T7C2VZUB.js.map → chunk-C2FAYFDE.js.map} +1 -1
  35. package/dist/{chunk-SV22UIW4.js → chunk-DQA5FMOX.js} +2 -2
  36. package/dist/{chunk-SV22UIW4.js.map → chunk-DQA5FMOX.js.map} +1 -1
  37. package/dist/{chunk-LIOXPQ7N.js → chunk-GUIHMIT2.js} +12 -10
  38. package/dist/chunk-GUIHMIT2.js.map +1 -0
  39. package/dist/{chunk-3S7OUHUN.js → chunk-KPNTVB7A.js} +9 -4
  40. package/dist/chunk-KPNTVB7A.js.map +1 -0
  41. package/dist/{chunk-IR53BQUJ.js → chunk-NE5JAOQS.js} +9 -9
  42. package/dist/chunk-NE5JAOQS.js.map +1 -0
  43. package/dist/chunk-PSHUSWQH.js +18 -0
  44. package/dist/chunk-PSHUSWQH.js.map +1 -0
  45. package/dist/{chunk-OSCL5TKR.js → chunk-RNZAKSME.js} +11 -8
  46. package/dist/chunk-RNZAKSME.js.map +1 -0
  47. package/dist/{chunk-ABAXNUXU.js → chunk-T22EM4ET.js} +7 -5
  48. package/dist/chunk-T22EM4ET.js.map +1 -0
  49. package/dist/{chunk-YZV2PTY4.js → chunk-TZ5IHWB2.js} +3 -3
  50. package/dist/{chunk-YZV2PTY4.js.map → chunk-TZ5IHWB2.js.map} +1 -1
  51. package/dist/{chunk-VOCPXGQN.js → chunk-VHADGP3B.js} +9 -8
  52. package/dist/chunk-VHADGP3B.js.map +1 -0
  53. package/dist/{chunk-2CE22Q2K.js → chunk-WZ2GLEY4.js} +2 -1
  54. package/dist/chunk-WZ2GLEY4.js.map +1 -0
  55. package/dist/{chunk-M6GLI6A6.js → chunk-X5QSICJ3.js} +5 -5
  56. package/dist/chunk-X5QSICJ3.js.map +1 -0
  57. package/dist/chunk-XQV2B4IL.js +14 -0
  58. package/dist/chunk-XQV2B4IL.js.map +1 -0
  59. package/dist/{chunk-4XE2CDYB.js → chunk-ZMBU522F.js} +2 -2
  60. package/dist/{chunk-4XE2CDYB.js.map → chunk-ZMBU522F.js.map} +1 -1
  61. package/dist/collapsible-panel.d.ts +6 -2
  62. package/dist/collapsible-panel.js +1 -0
  63. package/dist/collapsible-panel.js.map +1 -1
  64. package/dist/css-values.d.ts +1 -1
  65. package/dist/css-values.js +1 -1
  66. package/dist/floating-toolbar.d.ts +5 -2
  67. package/dist/floating-toolbar.js +1 -1
  68. package/dist/grid.js +1 -1
  69. package/dist/index.js +20 -19
  70. package/dist/list-action-row.d.ts +2 -1
  71. package/dist/list-action-row.js +1 -1
  72. package/dist/list-header.d.ts +1 -0
  73. package/dist/list-header.js +1 -1
  74. package/dist/list-item.d.ts +5 -3
  75. package/dist/list-item.js +1 -1
  76. package/dist/list.js +1 -1
  77. package/dist/nav-stack.js +1 -1
  78. package/dist/resizable-region.d.ts +4 -1
  79. package/dist/resizable-region.js +1 -1
  80. package/dist/row.js +1 -1
  81. package/dist/segmented-control.d.ts +1 -1
  82. package/dist/segmented-control.js +1 -3
  83. package/dist/select.js +1 -1
  84. package/dist/skeleton.js +1 -1
  85. package/dist/spacer.js +1 -1
  86. package/dist/split-view.js +2 -2
  87. package/dist/state-banner.d.ts +1 -1
  88. package/dist/state-banner.js +1 -1
  89. package/dist/styles/badge.css +17 -6
  90. package/dist/styles/collapsible-panel.css +89 -11
  91. package/dist/styles/floating-toolbar.css +11 -6
  92. package/dist/styles/foundation.css +82 -26
  93. package/dist/styles/list-action-row.css +29 -8
  94. package/dist/styles/list-header.css +19 -7
  95. package/dist/styles/list-item.css +11 -3
  96. package/dist/styles/resizable-region.css +82 -14
  97. package/dist/styles/segmented-control.css +21 -1
  98. package/dist/styles/select.css +24 -13
  99. package/dist/styles/skeleton.css +33 -2
  100. package/dist/styles/state-banner.css +48 -12
  101. package/dist/styles/webawesome.css +47 -20
  102. package/dist/styles/workbench.css +473 -11
  103. package/dist/toolbar-text.js +1 -1
  104. package/dist/value-table.js +1 -1
  105. package/dist/wire-resizable-regions.d.ts +2 -1
  106. package/dist/wire-resizable-regions.js +2 -1
  107. package/dist/wire-tab-bars.js +1 -1
  108. package/dist/wire-workbench.d.ts +109 -0
  109. package/dist/wire-workbench.js +355 -0
  110. package/dist/wire-workbench.js.map +1 -0
  111. package/dist/workbench.d.ts +65 -6
  112. package/dist/workbench.js +180 -76
  113. package/dist/workbench.js.map +1 -1
  114. package/docs/accessibility.md +54 -9
  115. package/docs/app-layouts.md +12 -1
  116. package/docs/collapsible-panel.md +59 -1
  117. package/docs/component-contract.md +76 -4
  118. package/docs/component-selection.md +16 -6
  119. package/docs/design/templates/empty-state/with-action-dark.svg +1 -1
  120. package/docs/design/templates/empty-state-dark.svg +1 -1
  121. package/docs/design/templates/list/stack-dark.svg +1 -1
  122. package/docs/design/templates/list/stack.svg +1 -1
  123. package/docs/design/templates/list-action-row/selected.svg +1 -1
  124. package/docs/design/templates/list-action-row.svg +1 -1
  125. package/docs/design/templates/list-dark.svg +1 -1
  126. package/docs/design/templates/list-header/action-dark.svg +1 -1
  127. package/docs/design/templates/list-header/action.svg +1 -1
  128. package/docs/design/templates/list-header/count-dark.svg +1 -1
  129. package/docs/design/templates/list-header/count.svg +1 -1
  130. package/docs/design/templates/list-header/inline-action-dark.svg +1 -1
  131. package/docs/design/templates/list-header/inline-action.svg +1 -1
  132. package/docs/design/templates/list-header/toggle-expanded-dark.svg +1 -1
  133. package/docs/design/templates/list-header/toggle-expanded.svg +1 -1
  134. package/docs/design/templates/list-header-dark.svg +1 -1
  135. package/docs/design/templates/list-header.svg +1 -1
  136. package/docs/design/templates/list-item/selected.svg +1 -1
  137. package/docs/design/templates/list-item.svg +1 -1
  138. package/docs/design/templates/list.svg +1 -1
  139. package/docs/design/templates/segmented-control/equal-dark.svg +1 -1
  140. package/docs/design/templates/segmented-control/equal.svg +1 -1
  141. package/docs/design/templates/segmented-control/pill-small-dark.svg +1 -1
  142. package/docs/design/templates/segmented-control/pill-small.svg +1 -1
  143. package/docs/design/templates/segmented-control-dark.svg +1 -1
  144. package/docs/design/templates/segmented-control.svg +1 -1
  145. package/docs/design/templates/state-banner/danger-dark.svg +1 -1
  146. package/docs/design/templates/state-banner/danger.svg +1 -1
  147. package/docs/design/templates/state-banner/info-badge-dark.svg +1 -1
  148. package/docs/design/templates/state-banner/info-badge.svg +1 -1
  149. package/docs/design/templates/state-banner/info-dark.svg +1 -1
  150. package/docs/design/templates/state-banner/info.svg +1 -1
  151. package/docs/design/templates/state-banner/success-dark.svg +1 -1
  152. package/docs/design/templates/state-banner/success.svg +1 -1
  153. package/docs/design/templates/state-banner/warning-dark.svg +1 -1
  154. package/docs/design/templates/state-banner/warning.svg +1 -1
  155. package/docs/design/templates/state-banner-dark.svg +1 -1
  156. package/docs/design/templates/state-banner.svg +1 -1
  157. package/docs/design/templates/tab-bar/workspace-tabs-dark.svg +1 -1
  158. package/docs/design/templates/tab-bar/workspace-tabs.svg +1 -1
  159. package/docs/design/templates/tab-bar-dark.svg +1 -1
  160. package/docs/design/templates/tab-bar.svg +1 -1
  161. package/docs/design/templates/token-search-field/tokens.svg +1 -1
  162. package/docs/design/templates/token-search-field.svg +1 -1
  163. package/docs/design/templates.md +11 -1
  164. package/docs/device-class.md +2 -1
  165. package/docs/document-baseline.md +4 -0
  166. package/docs/layout.md +5 -1
  167. package/docs/recipes.md +5 -3
  168. package/docs/type-contracts.md +2 -1
  169. package/docs/ui-analyzer.md +94 -19
  170. package/docs/ui-doctor.md +6 -0
  171. package/docs/ux-demo.md +2 -2
  172. package/docs/webawesome-theme.md +18 -2
  173. package/docs/workbench.md +302 -7
  174. package/llms.txt +14 -6
  175. package/package.json +5 -1
  176. package/ux-demo/recipes/collapsible-sidebar.tsx +8 -7
  177. package/ux-demo/recipes/loading-inspector.tsx +3 -2
  178. package/dist/chunk-2CE22Q2K.js.map +0 -1
  179. package/dist/chunk-3S7OUHUN.js.map +0 -1
  180. package/dist/chunk-ABAXNUXU.js.map +0 -1
  181. package/dist/chunk-EKYZCRCX.js.map +0 -1
  182. package/dist/chunk-IR53BQUJ.js.map +0 -1
  183. package/dist/chunk-JGFZ42ZF.js.map +0 -1
  184. package/dist/chunk-LIOXPQ7N.js.map +0 -1
  185. package/dist/chunk-M6GLI6A6.js.map +0 -1
  186. package/dist/chunk-OSCL5TKR.js.map +0 -1
  187. package/dist/chunk-UKKSMZYT.js.map +0 -1
  188. package/dist/chunk-VOCPXGQN.js.map +0 -1
@@ -25,6 +25,12 @@
25
25
  --kui-edge-inset-inline-end,
26
26
  var(--kui-safe-area-inline-end, env(safe-area-inset-right, 0px))
27
27
  );
28
+ /* The content keeps its fixed expanded size (collapsing slides it rather
29
+ than squeezing it), so a flex parent must never shrink the track below
30
+ that size: a shrunk track only clips the content's trailing edge (a
31
+ rail's row badges, a drawer's last row). The panel holds its size and
32
+ the sibling work area gives way. */
33
+ flex-shrink: 0;
28
34
  overflow: hidden;
29
35
  background: var(--kui-color-surface);
30
36
  }
@@ -232,7 +238,7 @@
232
238
  .kui-collapsible-panel[data-presentation="overlay"] {
233
239
  position: fixed;
234
240
  z-index: var(--kui-collapsible-panel-overlay-z, 40);
235
- box-shadow: var(--kui-shadow-l, 0 8px 32px rgb(0 0 0 / 24%));
241
+ box-shadow: var(--kui-shadow-l);
236
242
  }
237
243
 
238
244
  [data-collapsible-overlay="true"] .kui-collapsible-panel--left,
@@ -265,37 +271,109 @@
265
271
  display: none;
266
272
  }
267
273
 
274
+ /* A collapsed panel's restore control floats in a corner of the panel's own
275
+ container, never of the viewport, so a panel embedded in a page cannot float
276
+ it over page content outside that container. The container becomes the
277
+ corner's containing block and isolates its stacking only while a restore
278
+ control is shown, at zero specificity so an app's own positioning of that
279
+ container wins. The corner is inset from the container's edges plus the
280
+ unsafe area of each edge it reaches. The control belongs to the layer
281
+ beneath open overlays, two below the overlay z-index and so below the
282
+ compact overlay's backdrop: an open overlay covers it as it covers the rest
283
+ of the page, the Workbench rule. A collapsed overlay passes pointer events
284
+ through, so the control is usable again as soon as the overlay closes. */
285
+ :where(:has(> .kui-collapsible-panel__restore)) {
286
+ position: relative;
287
+ isolation: isolate;
288
+ anchor-scope: --kui-restore-drawer;
289
+ }
290
+
291
+ /* An expanded bottom drawer beside the collapsed panel — a direct child of
292
+ that container or of one of its direct children (the app's work-area
293
+ column) — owns the container's bottom, so the corner floats above the
294
+ drawer's top edge instead of over it. The drawer publishes that edge as an
295
+ anchor; a drawer nested deeper, inside the work area's own content, belongs
296
+ to another layout and is scoped out. Without anchor positioning the corner
297
+ keeps the container's bottom edge. */
298
+ .kui-collapsible-panel--bottom[data-presentation="inline"]:not(
299
+ [data-collapsed="true"],
300
+ [data-collapsible-overlay="true"] *,
301
+ [data-collapsible-responsive="hidden"] *
302
+ ) {
303
+ anchor-name: --kui-restore-drawer;
304
+ }
305
+
306
+ :where(:has(> .kui-collapsible-panel__restore)) > * > * > * {
307
+ anchor-scope: --kui-restore-drawer;
308
+ }
309
+
268
310
  .kui-collapsible-panel__restore {
269
- position: fixed;
270
- z-index: var(--kui-collapsible-panel-restore-z, 42);
311
+ --_kui-collapsible-panel-restore-inset: var(
312
+ --kui-collapsible-panel-restore-inset,
313
+ 1rem
314
+ );
315
+ /* The corner owns the inset, so a FloatingToolbar composed here floats
316
+ from this point instead of adding its own inset on top. */
317
+ --kui-floating-toolbar-inset: 0px;
318
+ position: absolute;
319
+ z-index: var(
320
+ --kui-collapsible-panel-restore-z,
321
+ calc(var(--kui-collapsible-panel-overlay-z, 40) - 2)
322
+ );
323
+ position-visibility: always;
271
324
  inset-block-end: calc(
272
- var(--kui-collapsible-panel-restore-inset, 1rem) +
273
- var(--kui-safe-area-block-end, env(safe-area-inset-bottom, 0px))
325
+ var(--_kui-collapsible-panel-restore-inset) +
326
+ var(
327
+ --kui-edge-inset-block-end,
328
+ var(--kui-safe-area-block-end, env(safe-area-inset-bottom, 0px))
329
+ )
330
+ );
331
+ /* Above an expanded drawer's top edge when one is in scope (see above). */
332
+ inset-block-end: calc(
333
+ var(--_kui-collapsible-panel-restore-inset) +
334
+ anchor(
335
+ --kui-restore-drawer top,
336
+ var(
337
+ --kui-edge-inset-block-end,
338
+ var(--kui-safe-area-block-end, env(safe-area-inset-bottom, 0px))
339
+ )
340
+ )
274
341
  );
275
342
  }
276
343
 
277
344
  .kui-collapsible-panel__restore[data-position="bottom-start"] {
278
345
  inset-inline-start: calc(
279
- var(--kui-collapsible-panel-restore-inset, 1rem) +
280
- var(--kui-safe-area-inline-start, env(safe-area-inset-left, 0px))
346
+ var(--_kui-collapsible-panel-restore-inset) +
347
+ var(
348
+ --kui-edge-inset-inline-start,
349
+ var(--kui-safe-area-inline-start, env(safe-area-inset-left, 0px))
350
+ )
281
351
  );
282
352
  }
283
353
 
284
354
  .kui-collapsible-panel__restore[data-position="bottom-end"] {
285
355
  inset-inline-end: calc(
286
- var(--kui-collapsible-panel-restore-inset, 1rem) +
287
- var(--kui-safe-area-inline-end, env(safe-area-inset-right, 0px))
356
+ var(--_kui-collapsible-panel-restore-inset) +
357
+ var(
358
+ --kui-edge-inset-inline-end,
359
+ var(--kui-safe-area-inline-end, env(safe-area-inset-right, 0px))
360
+ )
288
361
  );
289
362
  }
290
363
 
291
364
  /* A button does not stretch between its insets the way a div does, so the
292
- backdrop sizes itself to its containing block explicitly. */
365
+ backdrop sizes itself to its containing block explicitly. It sits one below
366
+ the overlay z-index, so an app that moves the overlay moves the backdrop
367
+ with it, and the restore controls stay beneath both. */
293
368
  .kui-collapsible-panel__backdrop {
294
369
  position: fixed;
295
370
  inset: 0;
296
371
  width: 100%;
297
372
  height: 100%;
298
- z-index: var(--kui-collapsible-panel-backdrop-z, 39);
373
+ z-index: var(
374
+ --kui-collapsible-panel-backdrop-z,
375
+ calc(var(--kui-collapsible-panel-overlay-z, 40) - 1)
376
+ );
299
377
  border: 0;
300
378
  padding: 0;
301
379
  background: var(--kui-color-scrim, rgb(0 0 0 / 32%));
@@ -1,7 +1,12 @@
1
1
  .kui-floating-toolbar {
2
2
  /* Inset from the container edges: a top toolbar sits 8px in, so this floats an
3
- extra 8px past that (--kui-space-m = 16px). Override the token to reposition. */
4
- --kui-floating-toolbar-inset: var(--kui-space-m, 1rem);
3
+ extra 8px past that (--kui-space-m = 16px). Override the token to reposition,
4
+ on the toolbar or on an ancestor composition boundary: a Workbench restore
5
+ corner sets it to 0 because the corner already owns the inset. */
6
+ --_kui-floating-toolbar-inset: var(
7
+ --kui-floating-toolbar-inset,
8
+ var(--kui-space-m, 1rem)
9
+ );
5
10
 
6
11
  /* Floats above the main content of its nearest positioned ancestor. z-index
7
12
  stays low so it never covers dialogs/overlays (it is not top-layer). Forced
@@ -15,19 +20,19 @@
15
20
  }
16
21
 
17
22
  .kui-floating-toolbar[data-position^="bottom"] {
18
- inset-block-end: var(--kui-floating-toolbar-inset);
23
+ inset-block-end: var(--_kui-floating-toolbar-inset);
19
24
  }
20
25
 
21
26
  .kui-floating-toolbar[data-position^="top"] {
22
- inset-block-start: var(--kui-floating-toolbar-inset);
27
+ inset-block-start: var(--_kui-floating-toolbar-inset);
23
28
  }
24
29
 
25
30
  .kui-floating-toolbar[data-position$="-end"] {
26
- inset-inline-end: var(--kui-floating-toolbar-inset);
31
+ inset-inline-end: var(--_kui-floating-toolbar-inset);
27
32
  }
28
33
 
29
34
  .kui-floating-toolbar[data-position$="-start"] {
30
- inset-inline-start: var(--kui-floating-toolbar-inset);
35
+ inset-inline-start: var(--_kui-floating-toolbar-inset);
31
36
  }
32
37
 
33
38
  /* The centered edges span from the middle rather than an inline edge. */
@@ -80,13 +80,21 @@
80
80
  --kui-radius-pill: var(--wa-border-radius-pill, 999px);
81
81
  --kui-disclosure-icon-scale: 0.5;
82
82
  /* macOS Tahoe light semantics used by Hot Sheet 2, with a compatible dark extension. */
83
+ /* Every --kui-color-* token (and the focus-ring color) that reads a --wa-*
84
+ token falls back to the value src/webawesome.css assigns to that token,
85
+ including its light-dark() pair, so a page without the Web Awesome theme
86
+ resolves the same palette in both color schemes. A single light color
87
+ here would render, e.g., dark red danger text on a dark surface, and a
88
+ fallback that points at a different token (surface-raised at the surface,
89
+ text-link at the brand fill) silently diverges from the theme.
90
+ tests/browser/tone-contrast.spec.ts pins the parity for every token. */
83
91
  --kui-color-surface: var(
84
92
  --wa-color-surface-default,
85
93
  light-dark(#fff, #1c1c1e)
86
94
  );
87
95
  --kui-color-surface-raised: var(
88
96
  --wa-color-surface-raised,
89
- var(--kui-color-surface)
97
+ light-dark(#fff, #2c2c2e)
90
98
  );
91
99
  --kui-color-surface-lowered: var(
92
100
  --wa-color-surface-lowered,
@@ -99,7 +107,7 @@
99
107
  );
100
108
  --kui-color-text-link: var(
101
109
  --wa-color-text-link,
102
- var(--kui-color-brand-fill-loud)
110
+ var(--kui-color-brand-on-quiet)
103
111
  );
104
112
 
105
113
  --kui-color-neutral-fill-quiet: var(
@@ -116,7 +124,7 @@
116
124
  );
117
125
  --kui-color-neutral-border-quiet: var(
118
126
  --wa-color-neutral-border-quiet,
119
- var(--kui-color-neutral-fill-normal)
127
+ light-dark(#e5e5ea, #38383a)
120
128
  );
121
129
  --kui-color-neutral-border-normal: var(
122
130
  --wa-color-neutral-border-normal,
@@ -141,7 +149,7 @@
141
149
 
142
150
  --kui-color-brand-fill-loud: var(
143
151
  --wa-color-brand-fill-loud,
144
- light-dark(#0088ff, #64d2ff)
152
+ light-dark(#0075db, #64d2ff)
145
153
  );
146
154
  --kui-color-brand-fill-quiet: var(
147
155
  --wa-color-brand-fill-quiet,
@@ -179,21 +187,30 @@
179
187
  --wa-color-brand-border-loud,
180
188
  var(--kui-color-brand-fill-loud)
181
189
  );
190
+ /* The light brand/success/warning on-quiet values are Kerf-owned (mirrored
191
+ in src/webawesome.css): each is the Hot Sheet 2 hue darkened just enough to
192
+ clear WCAG AA (>=4.5:1) on the lowered page background (#f2f2f7), not only
193
+ on the white surface. The prior #1e6ef4 / #008932 / #a16a00 reached ~4.1:1
194
+ there. Brand #0c62f3 is 4.64:1, success #007f2e 4.62:1, warning #966200
195
+ 4.65:1 on the page (5.2:1 on white). */
182
196
  --kui-color-brand-on-quiet: var(
183
197
  --wa-color-brand-on-quiet,
184
- light-dark(#1e6ef4, #8acbff)
198
+ light-dark(#0c62f3, #8acbff)
185
199
  );
186
200
  --kui-color-brand-on-normal: var(
187
201
  --wa-color-brand-on-normal,
188
202
  var(--kui-color-brand-on-quiet)
189
203
  );
190
- --kui-color-brand-on-loud: var(--wa-color-brand-on-loud, #fff);
204
+ --kui-color-brand-on-loud: var(
205
+ --wa-color-brand-on-loud,
206
+ light-dark(#fff, #111113)
207
+ );
191
208
  /* Brand accent text placed directly ON a brand fill (quiet or normal), such as
192
209
  the info StateBanner and Select's current option. Darker than brand-on-quiet
193
- so it clears WCAG AA (>=4.5:1): brand-on-quiet (#1e6ef4) resolves to only
194
- 3.77:1 over brand-fill-normal (#d6ecff) and 4.15:1 over brand-fill-quiet
195
- (#ebf6ff), while #1a5dcf (same hue) clears ~4.9:1 and ~5.2:1 there. The dark
196
- value matches brand-on-quiet, which already passes over the dark fills. */
210
+ so it clears WCAG AA (>=4.5:1): brand-on-quiet (#0c62f3) resolves to only
211
+ 4.26:1 over brand-fill-normal (#d6ecff), while #1a5dcf (same hue) clears
212
+ ~4.9:1 there and ~5.5:1 over brand-fill-quiet (#ebf6ff). The dark value
213
+ matches brand-on-quiet, which already passes over the dark fills. */
197
214
  --kui-color-brand-on-fill: light-dark(#1a5dcf, #8acbff);
198
215
 
199
216
  /* Pop is attractive emphasis without status meaning: use it for featured,
@@ -266,12 +283,19 @@
266
283
  var(--kui-color-neutral-on-normal)
267
284
  )
268
285
  );
269
- --kui-color-success-on-quiet: var(--wa-color-success-on-quiet, #008932);
270
- --kui-color-success-on-normal: var(--wa-color-success-on-normal, #006d28);
271
- --kui-color-success-on-loud: var(--wa-color-success-on-loud, #fff);
286
+ --kui-color-success-on-quiet: var(
287
+ --wa-color-success-on-quiet,
288
+ light-dark(#007f2e, #63e685)
289
+ );
290
+ --kui-color-success-on-normal: var(
291
+ --wa-color-success-on-normal,
292
+ light-dark(#006d28, #8cea9f)
293
+ );
294
+ --kui-color-success-on-loud: var(--wa-color-success-on-loud, #1d1d1f);
272
295
  /* Success text placed ON a success fill (e.g. the success StateBanner). Darker
273
- than success-on-quiet so it clears WCAG AA (>=4.5:1) over success-fill-quiet
274
- (#e3f7e8), where #008932 reached only 4.05:1. Dark matches success-on-quiet. */
296
+ than success-on-quiet for margin over success-fill-quiet (#e3f7e8): the
297
+ original on-quiet #008932 reached only 4.05:1 there and today's #007f2e sits
298
+ at 4.60:1, while #00792c clears ~5:1. Dark matches success-on-quiet. */
275
299
  --kui-color-success-on-fill: light-dark(#00792c, #63e685);
276
300
 
277
301
  --kui-color-warning-fill-loud: var(--wa-color-warning-fill-loud, #ffcc00);
@@ -315,15 +339,25 @@
315
339
  var(--kui-color-neutral-on-normal)
316
340
  )
317
341
  );
318
- --kui-color-warning-on-quiet: var(--wa-color-warning-on-quiet, #a16a00);
319
- --kui-color-warning-on-normal: var(--wa-color-warning-on-normal, #5f3f00);
342
+ --kui-color-warning-on-quiet: var(
343
+ --wa-color-warning-on-quiet,
344
+ light-dark(#966200, #ffd84a)
345
+ );
346
+ --kui-color-warning-on-normal: var(
347
+ --wa-color-warning-on-normal,
348
+ light-dark(#5f3f00, #ffe27a)
349
+ );
320
350
  --kui-color-warning-on-loud: var(--wa-color-warning-on-loud, #1d1d1f);
321
351
  /* Warning text placed ON a warning fill (e.g. the warning StateBanner). Darker
322
- than warning-on-quiet so it clears WCAG AA (>=4.5:1) over warning-fill-quiet
323
- (#fffae8), where #a16a00 reached only 4.39:1. Dark matches warning-on-quiet. */
352
+ than warning-on-quiet for margin over warning-fill-quiet (#fffae8): the
353
+ original on-quiet #a16a00 reached only 4.39:1 there (today's #966200 is
354
+ 4.97:1), while #8f5e00 clears ~5.3:1. Dark matches warning-on-quiet. */
324
355
  --kui-color-warning-on-fill: light-dark(#8f5e00, #ffd84a);
325
356
 
326
- --kui-color-danger-fill-loud: var(--wa-color-danger-fill-loud, #ff383c);
357
+ --kui-color-danger-fill-loud: var(
358
+ --wa-color-danger-fill-loud,
359
+ light-dark(#eb0005, #ff383c)
360
+ );
327
361
  --kui-color-danger-fill-quiet: var(
328
362
  --wa-color-danger-fill-quiet,
329
363
  color-mix(
@@ -364,9 +398,26 @@
364
398
  var(--kui-color-neutral-on-normal)
365
399
  )
366
400
  );
367
- --kui-color-danger-on-quiet: var(--wa-color-danger-on-quiet, #c20b20);
368
- --kui-color-danger-on-normal: var(--wa-color-danger-on-normal, #8e0717);
369
- --kui-color-danger-on-loud: var(--wa-color-danger-on-loud, #fff);
401
+ --kui-color-danger-on-quiet: var(
402
+ --wa-color-danger-on-quiet,
403
+ light-dark(#c20b20, #ff696c)
404
+ );
405
+ --kui-color-danger-on-normal: var(
406
+ --wa-color-danger-on-normal,
407
+ light-dark(#8e0717, #ff8a8c)
408
+ );
409
+ --kui-color-danger-on-loud: var(
410
+ --wa-color-danger-on-loud,
411
+ light-dark(#fff, #111113)
412
+ );
413
+ /* Danger text placed ON a danger fill (e.g. the danger StateBanner) and the
414
+ danger Badge's solid fill. The light value matches danger-on-quiet, which
415
+ already clears WCAG AA (5.7:1) over danger-fill-quiet. The dark value is
416
+ lighter than danger-on-quiet (#ff696c), which reached only 5.7:1 over the
417
+ dark fill-quiet (4.0:1 as dimmed banner detail) and left the solid badge's
418
+ dark text and placeholder skeleton the weakest of any tone on a mid-red
419
+ fill; #ffa0a2 matches the other tones' pale dark on-fill values. */
420
+ --kui-color-danger-on-fill: light-dark(#c20b20, #ffa0a2);
370
421
 
371
422
  /* Compatibility aliases retained for existing @kerfjs/ui consumers. */
372
423
  --kui-color-border: var(
@@ -386,12 +437,17 @@
386
437
  --kui-color-danger-text: var(--kui-color-danger-on-quiet);
387
438
  --kui-focus-ring: var(
388
439
  --wa-focus-ring,
389
- 3px solid var(--wa-color-focus, var(--kui-color-brand-fill-loud))
440
+ 3px solid var(--wa-color-focus, light-dark(#007aff, #64d2ff))
441
+ );
442
+ /* Elevation mirrors webawesome.css's scheme-aware shadows: dark raises the
443
+ alpha so a raised surface still separates from a near-black page. */
444
+ --kui-shadow-s: var(
445
+ --wa-shadow-s,
446
+ 0 1px 3px light-dark(rgb(0 0 0 / 0.14), rgb(0 0 0 / 0.5))
390
447
  );
391
- --kui-shadow-s: var(--wa-shadow-s, 0 1px 3px rgb(0 0 0 / 0.14));
392
448
  --kui-shadow-l: var(
393
449
  --wa-shadow-l,
394
- 0 0.75rem 2rem rgb(0 0 0 / 0.09)
450
+ 0 0.75rem 2rem light-dark(rgb(0 0 0 / 0.09), rgb(0 0 0 / 0.32))
395
451
  );
396
452
  }
397
453
 
@@ -45,7 +45,9 @@
45
45
  border-end-end-radius: 0;
46
46
  }
47
47
 
48
- .kui-list-action-row:has(.kui-list-action-row__primary:hover) {
48
+ .kui-list-action-row:not([data-placeholder="true"]):has(
49
+ .kui-list-action-row__primary:hover
50
+ ) {
49
51
  --kui-list-action-row-border: var(--kui-list-action-row-hover-border);
50
52
  --kui-list-action-row-background: var(--kui-list-action-row-hover-background);
51
53
  }
@@ -92,12 +94,27 @@
92
94
  outline: none;
93
95
  }
94
96
 
95
- .kui-list-action-row__primary:disabled,
96
- .kui-list-action-row__trailing-action:disabled {
97
- cursor: not-allowed;
97
+ /* A placeholder is disabled to stay inert, but it is loading, not unavailable:
98
+ it keeps the live row's tone (see the placeholder rule in skeleton.css). The
99
+ disabled tone follows the author's disabled props (the data-kui-disabled
100
+ marker), so a disabled button's placeholder is dimmed like the loaded one;
101
+ only the `not-allowed` cursor is reserved for the live row. */
102
+ .kui-list-action-row
103
+ :is(
104
+ .kui-list-action-row__primary,
105
+ .kui-list-action-row__trailing-action
106
+ )[data-kui-disabled="true"] {
98
107
  opacity: 0.58;
99
108
  }
100
109
 
110
+ .kui-list-action-row:not([data-placeholder="true"])
111
+ :is(
112
+ .kui-list-action-row__primary:disabled,
113
+ .kui-list-action-row__trailing-action:disabled
114
+ ) {
115
+ cursor: not-allowed;
116
+ }
117
+
101
118
  .kui-list-action-row__icon {
102
119
  position: absolute;
103
120
  inset-block-start: 50%;
@@ -144,6 +161,9 @@
144
161
 
145
162
  .kui-list-action-row__status {
146
163
  display: inline-flex;
164
+ /* A full line even when it holds only a placeholder skeleton, which is
165
+ shorter than the text line it stands in for. */
166
+ min-block-size: 1lh;
147
167
  align-items: center;
148
168
  gap: 0.25rem;
149
169
  }
@@ -180,10 +200,11 @@
180
200
  opacity: 0;
181
201
  }
182
202
 
183
- .kui-list-action-row[data-trailing-visibility="interaction"]:is(
184
- :hover,
185
- :focus-within
186
- )
203
+ /* A placeholder is inert, so hovering it reveals nothing: the trailing action
204
+ keeps the live resting state (hidden until interaction). */
205
+ .kui-list-action-row[data-trailing-visibility="interaction"]:not(
206
+ [data-placeholder="true"]
207
+ ):is(:hover, :focus-within)
187
208
  .kui-list-action-row__trailing-action {
188
209
  opacity: 1;
189
210
  }
@@ -187,8 +187,13 @@
187
187
  flex: none;
188
188
  }
189
189
 
190
- .kui-list-header__action:hover,
191
- .kui-list-header__toggle:hover {
190
+ /* A placeholder is disabled to stay inert, but it is loading, not unavailable:
191
+ it keeps the live tone and gives no hover feedback (see the placeholder rule
192
+ in skeleton.css). A disabled control gives none either. */
193
+ .kui-list-header:not([data-placeholder="true"])
194
+ .kui-list-header__action:hover:not(:disabled),
195
+ .kui-list-header:not([data-placeholder="true"])
196
+ .kui-list-header__toggle:hover:not(:disabled) {
192
197
  border-color: var(--kui-color-neutral-border-normal);
193
198
  background: var(--kui-list-header-hover-background);
194
199
  }
@@ -199,14 +204,21 @@
199
204
  outline-offset: 1px;
200
205
  }
201
206
 
202
- .kui-list-header__action:disabled {
203
- cursor: not-allowed;
207
+ /* The disabled tone follows the author's `actionDisabled` (the
208
+ data-kui-disabled marker), so a disabled action or toggle's placeholder is
209
+ dimmed like the loaded one; only the `not-allowed` cursor is reserved for
210
+ the live header. The tone is the component's own, never Web Awesome's
211
+ native `button:disabled`, so it holds without webawesome.css. */
212
+ .kui-list-header__action[data-kui-disabled="true"],
213
+ .kui-list-header__toggle[data-kui-disabled="true"] {
204
214
  opacity: 0.48;
205
215
  }
206
216
 
207
- .kui-list-header__action:disabled:hover {
208
- border-color: transparent;
209
- background: transparent;
217
+ .kui-list-header:not([data-placeholder="true"])
218
+ .kui-list-header__action:disabled,
219
+ .kui-list-header:not([data-placeholder="true"])
220
+ .kui-list-header__toggle:disabled {
221
+ cursor: not-allowed;
210
222
  }
211
223
 
212
224
  .kui-list-header__action > svg,
@@ -78,17 +78,25 @@
78
78
  grid-column: 2;
79
79
  }
80
80
 
81
- .kui-list-item:hover {
81
+ .kui-list-item:hover:not([data-placeholder="true"]) {
82
82
  border-color: var(--kui-list-item-hover-border);
83
83
  background: var(--kui-list-item-hover-background);
84
84
  }
85
85
 
86
- .kui-list-item:disabled {
86
+ /* A placeholder is disabled to stay inert, but it is loading, not unavailable:
87
+ it keeps the live row's tone (see the placeholder rule in skeleton.css). The
88
+ disabled tone follows the author's `disabled` prop (the data-kui-disabled
89
+ marker), so a disabled row's placeholder is dimmed like the loaded row; only
90
+ the `not-allowed` cursor is reserved for the live row. */
91
+ .kui-list-item[data-kui-disabled="true"] {
87
92
  color: var(--kui-color-neutral-on-quiet);
88
- cursor: not-allowed;
89
93
  opacity: 0.58;
90
94
  }
91
95
 
96
+ .kui-list-item:disabled:not([data-placeholder="true"]) {
97
+ cursor: not-allowed;
98
+ }
99
+
92
100
  .kui-list-item[aria-current="page"],
93
101
  .kui-list-item[aria-pressed="true"] {
94
102
  border-color: var(--kui-list-item-selected-border);
@@ -146,16 +146,22 @@
146
146
 
147
147
  /* Responsive replacement policies. Overlay regions stay on their logical edge
148
148
  and stop participating in the parent's flex tracks; hidden regions are fully
149
- replaced by application-owned compact UI. */
149
+ replaced by application-owned compact UI. An overlay floats over the work
150
+ area, so it paints the surface like an overlay CollapsiblePanel: without it
151
+ the content beneath (and the restore control stacked below it) shows
152
+ through the shadowed box. An inline region stays transparent and shows its
153
+ host's background. */
150
154
  .kui-resizable-region[data-presentation="overlay"] {
151
155
  position: absolute;
152
156
  z-index: var(--kui-resizable-region-overlay-z, 41);
153
- max-width: var(--kui-resizable-region-overlay-max-width, 85vw);
154
- max-height: var(--kui-resizable-region-overlay-max-height, 85vh);
155
- box-shadow: var(--kui-shadow-l, 0 8px 32px rgb(0 0 0 / 24%));
157
+ background: var(--kui-color-surface);
158
+ box-shadow: var(--kui-shadow-l);
156
159
  }
160
+ /* Each overlay maximum caps only the resizable axis: a side overlay spans its
161
+ host's full height and a drawer its full width, like their inline tracks. */
157
162
  .kui-resizable-region[data-presentation="overlay"][data-axis="horizontal"] {
158
163
  inset-block: 0;
164
+ max-width: var(--kui-resizable-region-overlay-max-width, 85vw);
159
165
  }
160
166
  .kui-resizable-region[data-presentation="overlay"][data-axis="horizontal"][data-edge="end"] {
161
167
  inset-inline-start: 0;
@@ -165,6 +171,7 @@
165
171
  }
166
172
  .kui-resizable-region[data-presentation="overlay"][data-axis="vertical"] {
167
173
  inset-inline: 0;
174
+ max-height: var(--kui-resizable-region-overlay-max-height, 85vh);
168
175
  }
169
176
  .kui-resizable-region[data-presentation="overlay"][data-axis="vertical"][data-edge="end"] {
170
177
  inset-block-start: 0;
@@ -229,26 +236,87 @@
229
236
  }
230
237
  }
231
238
 
232
- /* A collapsed panel can supply its own affordance while Kerf owns consistent,
233
- safe-area-aware viewport placement. */
239
+ /* A collapsed region can supply its own affordance. It floats in a corner of
240
+ the region's own container, never of the viewport, so a region embedded in a
241
+ page cannot float it over page content outside that container. The
242
+ container becomes the corner's containing block and isolates its stacking
243
+ only while a restore control is shown, at zero specificity so an app's own
244
+ positioning of that container wins. The corner is inset from the
245
+ container's edges plus the unsafe area of each edge it reaches. The
246
+ control belongs to the layer beneath open overlays, two below the overlay
247
+ z-index: an open overlay region covers it as it covers the rest of the
248
+ work area, the Workbench rule. A collapsed overlay drops its pointer
249
+ events, so the control is usable again as soon as the overlay closes. */
250
+ :where(:has(> .kui-resizable-region__restore)) {
251
+ position: relative;
252
+ isolation: isolate;
253
+ anchor-scope: --kui-restore-drawer;
254
+ }
255
+ /* An expanded bottom region (a vertical region resized from its top edge)
256
+ beside the collapsed one — a direct child of that container or of one of
257
+ its direct children (the app's work-area column) — owns the container's
258
+ bottom, so the corner floats above the drawer's top edge instead of over
259
+ it. CollapsiblePanel drawers publish the same anchor. A drawer nested
260
+ deeper, inside the work area's own content, belongs to another layout and
261
+ is scoped out. Without anchor positioning the corner keeps the container's
262
+ bottom edge. */
263
+ .kui-resizable-region[data-axis="vertical"][data-edge="start"][data-presentation="inline"]:not(
264
+ [data-collapsed="true"]
265
+ ) {
266
+ anchor-name: --kui-restore-drawer;
267
+ }
268
+ :where(:has(> .kui-resizable-region__restore)) > * > * > * {
269
+ anchor-scope: --kui-restore-drawer;
270
+ }
234
271
  .kui-resizable-region__restore {
235
- position: fixed;
236
- z-index: var(--kui-resizable-region-restore-z, 42);
272
+ --_kui-resizable-region-restore-inset: var(
273
+ --kui-resizable-region-restore-inset,
274
+ 1rem
275
+ );
276
+ /* The corner owns the inset, so a FloatingToolbar composed here floats
277
+ from this point instead of adding its own inset on top. */
278
+ --kui-floating-toolbar-inset: 0px;
279
+ position: absolute;
280
+ z-index: var(
281
+ --kui-resizable-region-restore-z,
282
+ calc(var(--kui-resizable-region-overlay-z, 41) - 2)
283
+ );
284
+ position-visibility: always;
285
+ inset-block-end: calc(
286
+ var(--_kui-resizable-region-restore-inset) +
287
+ var(
288
+ --kui-edge-inset-block-end,
289
+ var(--kui-safe-area-block-end, env(safe-area-inset-bottom, 0px))
290
+ )
291
+ );
292
+ /* Above an expanded drawer's top edge when one is in scope (see above). */
237
293
  inset-block-end: calc(
238
- var(--kui-resizable-region-restore-inset, 1rem) +
239
- var(--kui-safe-area-block-end, env(safe-area-inset-bottom, 0px))
294
+ var(--_kui-resizable-region-restore-inset) +
295
+ anchor(
296
+ --kui-restore-drawer top,
297
+ var(
298
+ --kui-edge-inset-block-end,
299
+ var(--kui-safe-area-block-end, env(safe-area-inset-bottom, 0px))
300
+ )
301
+ )
240
302
  );
241
303
  }
242
304
  .kui-resizable-region__restore[data-position="bottom-start"] {
243
305
  inset-inline-start: calc(
244
- var(--kui-resizable-region-restore-inset, 1rem) +
245
- var(--kui-safe-area-inline-start, env(safe-area-inset-left, 0px))
306
+ var(--_kui-resizable-region-restore-inset) +
307
+ var(
308
+ --kui-edge-inset-inline-start,
309
+ var(--kui-safe-area-inline-start, env(safe-area-inset-left, 0px))
310
+ )
246
311
  );
247
312
  }
248
313
  .kui-resizable-region__restore[data-position="bottom-end"] {
249
314
  inset-inline-end: calc(
250
- var(--kui-resizable-region-restore-inset, 1rem) +
251
- var(--kui-safe-area-inline-end, env(safe-area-inset-right, 0px))
315
+ var(--_kui-resizable-region-restore-inset) +
316
+ var(
317
+ --kui-edge-inset-inline-end,
318
+ var(--kui-safe-area-inline-end, env(safe-area-inset-right, 0px))
319
+ )
252
320
  );
253
321
  }
254
322
  .kui-resizable-region__handle {
@@ -148,8 +148,28 @@
148
148
  outline-offset: 1px;
149
149
  }
150
150
 
151
- .kui-segmented-control__item:disabled {
151
+ /* A placeholder is disabled to stay inert, but it is loading, not unavailable:
152
+ its choices keep the live tone. SegmentedControl renders no skeleton (its
153
+ choices are known; only the selection is unknown), so it does not load
154
+ skeleton.css and neutralizes disabled chrome itself, including Web Awesome's
155
+ native button:disabled. A choice the author disabled (the data-kui-disabled
156
+ marker) keeps the live disabled tone; only the `not-allowed` cursor is
157
+ reserved for the live control. */
158
+ .kui-segmented-control[data-placeholder="true"] .kui-segmented-control__item {
159
+ cursor: default;
160
+ }
161
+
162
+ .kui-segmented-control[data-placeholder="true"]
163
+ .kui-segmented-control__item:not([data-kui-disabled="true"]) {
164
+ opacity: 1;
165
+ }
166
+
167
+ .kui-segmented-control__item[data-kui-disabled="true"] {
152
168
  opacity: 0.45;
169
+ }
170
+
171
+ .kui-segmented-control:not([data-placeholder="true"])
172
+ .kui-segmented-control__item:disabled {
153
173
  cursor: not-allowed;
154
174
  }
155
175