@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
@@ -116,7 +116,7 @@
116
116
  .kui-select wa-option {
117
117
  --wa-form-control-activated-color: var(--kui-color-brand-fill-normal);
118
118
  /* Current option text sits on the activated brand fill; use the darker on-fill
119
- accent so it clears WCAG AA (brand-on-quiet was 3.77:1 over that fill). */
119
+ accent so it clears WCAG AA (brand-on-quiet is 4.26:1 over that fill). */
120
120
  --current-text-color: var(--kui-color-brand-on-fill);
121
121
  }
122
122
  .kui-select wa-option::part(start) {
@@ -189,11 +189,17 @@
189
189
  width: 100%;
190
190
  }
191
191
  .kui-select__placeholder-label {
192
+ /* The live field's top label (see webawesome.css): a ListHeader-style label,
193
+ inset by the field's border + inline padding so it lines up with the value. */
192
194
  display: block;
193
- margin-block-end: 0.25rem;
194
- color: var(--kui-color-text);
195
- font-size: var(--kui-font-s);
196
- line-height: 1.4;
195
+ margin-block-end: 0.375rem;
196
+ padding-inline: calc(1px + var(--kui-layout-item-padding, 0.5rem));
197
+ color: var(--kui-color-neutral-on-quiet);
198
+ font-size: var(--kui-font-xs);
199
+ font-weight: 650;
200
+ letter-spacing: 0.04em;
201
+ line-height: 1.2;
202
+ text-transform: uppercase;
197
203
  }
198
204
  .kui-select__placeholder-box {
199
205
  display: flex;
@@ -219,23 +225,28 @@
219
225
  max-width: 100%;
220
226
  }
221
227
  .kui-select__placeholder-hint {
228
+ /* The live wa-select hint part: small body text at Web Awesome's form-control
229
+ hint metrics (1.6 line height, 7px below the box), inset like the value. */
222
230
  display: block;
223
- margin-block-start: 0.25rem;
231
+ margin-block-start: 0.4375rem;
224
232
  padding-inline: calc(1px + var(--kui-layout-item-padding, 0.5rem));
225
233
  color: var(--kui-color-text-quiet);
226
- font-size: var(--kui-font-xs);
227
- line-height: 1.4;
234
+ font-size: var(--kui-font-s);
235
+ line-height: 1.6;
228
236
  }
229
237
  .kui-select__placeholder-chevron {
230
- display: inline-flex;
231
- width: 1rem;
238
+ /* The live control's expand-icon box and scale, with the same glyph. */
239
+ display: grid;
240
+ width: 1.25rem;
232
241
  height: 1rem;
233
242
  flex: none;
234
- color: var(--kui-color-text-quiet);
235
- transform: scale(var(--kui-disclosure-icon-scale, 0.85));
243
+ place-items: center;
244
+ color: var(--kui-color-neutral-on-quiet);
245
+ transform: scale(var(--kui-disclosure-icon-scale, 0.5));
236
246
  }
237
247
  .kui-select__placeholder-chevron svg {
238
248
  display: block;
239
- width: 100%;
249
+ width: auto;
240
250
  height: 100%;
251
+ fill: currentColor;
241
252
  }
@@ -7,8 +7,13 @@
7
7
  height: 1em;
8
8
  border-radius: var(--kui-skeleton-radius);
9
9
  /* Deliberately unanimated: a flat, subtle fill that reads as "not yet loaded"
10
- without drawing the eye or implying progress. */
11
- background: color-mix(in srgb, var(--kui-color-text) 12%, transparent);
10
+ without drawing the eye or implying progress. A host with its own solid
11
+ fill (a solid Badge) supplies `--_kui-skeleton-fill` derived from its
12
+ foreground, since a text-color tint vanishes on a saturated fill. */
13
+ background: var(
14
+ --_kui-skeleton-fill,
15
+ color-mix(in srgb, var(--kui-color-text) 12%, transparent)
16
+ );
12
17
  vertical-align: middle;
13
18
  }
14
19
 
@@ -27,6 +32,32 @@
27
32
  height: 0.8em;
28
33
  }
29
34
 
35
+ /* Placeholder mode. A component's `placeholder` keeps its controls `disabled` so
36
+ they stay inert and out of the keyboard order, but a placeholder is loading,
37
+ not unavailable: it must look exactly like the live component except for its
38
+ skeleton values. Neutralize generic disabled chrome, including Web Awesome's
39
+ layered native `button:disabled { opacity: 0.5; cursor: not-allowed }`.
40
+ Opacity carries zero specificity so a component's own opacity rules (a
41
+ hover-revealed control that is invisible until interaction) still win;
42
+ components exclude placeholders from their own disabled tone. The cursor is
43
+ the non-interactive default, never `not-allowed`.
44
+
45
+ A control the author disabled carries `data-kui-disabled="true"` (set from
46
+ the component's own disabled prop, independent of placeholder). It is
47
+ unavailable once loaded, so its placeholder keeps the live disabled tone:
48
+ the reset skips it, and components key their disabled tone on the marker. */
49
+ :where(
50
+ [data-placeholder="true"]:disabled:not([data-kui-disabled="true"]),
51
+ [data-placeholder="true"] :disabled:not([data-kui-disabled="true"])
52
+ ) {
53
+ opacity: 1;
54
+ }
55
+
56
+ [data-placeholder="true"]:disabled,
57
+ [data-placeholder="true"] :disabled {
58
+ cursor: default;
59
+ }
60
+
30
61
  @media (forced-colors: active) {
31
62
  .kui-skeleton {
32
63
  background: GrayText;
@@ -41,6 +41,15 @@
41
41
  align-items: center;
42
42
  gap: var(--kui-layout-item-gap, 0.5rem);
43
43
  }
44
+ /* The detail is secondary through its smaller, regular-weight type, not a
45
+ dimmed color: an opacity cut toned details below WCAG AA over their fills.
46
+ Only the neutral tone has a quieter text color that still clears AA. */
47
+ .kui-state-banner[data-tone="neutral"] {
48
+ --_kui-state-banner-detail: var(
49
+ --kui-state-banner-detail,
50
+ var(--kui-color-neutral-on-quiet)
51
+ );
52
+ }
44
53
  .kui-state-banner[data-tone="info"] {
45
54
  --_kui-state-banner-background: var(
46
55
  --kui-state-banner-background,
@@ -123,7 +132,7 @@
123
132
  );
124
133
  --_kui-state-banner-foreground: var(
125
134
  --kui-state-banner-foreground,
126
- var(--kui-state-banner-danger-foreground, var(--kui-color-danger-on-quiet))
135
+ var(--kui-state-banner-danger-foreground, var(--kui-color-danger-on-fill))
127
136
  );
128
137
  }
129
138
  .kui-state-banner__icon {
@@ -134,21 +143,50 @@
134
143
  width: 1rem;
135
144
  height: 1rem;
136
145
  }
146
+ /* The copy is inline flow, not flex: a wrapping title lays out as text, so the
147
+ badge follows the title's last word instead of the right edge of a
148
+ flex-shrunk title box, and the detail stays beside them only while it fits
149
+ whole. Otherwise it moves to its own line and truncates at the full copy
150
+ width. Flex shrank the title and detail together, which left a gap before
151
+ the badge and cut the detail early. Each item's trailing margin is the item
152
+ gap, so no margin lands at the start of a wrapped line. */
137
153
  .kui-state-banner__copy {
138
- display: flex;
139
154
  min-width: 0;
140
- align-items: baseline;
141
- gap: var(--kui-layout-item-gap, 0.5rem);
155
+ /* The title's size, so a wrapped title's lines keep the title's own line
156
+ height instead of the larger inherited strut. */
157
+ font-size: var(--kui-font-xs);
142
158
  }
143
159
  .kui-state-banner__copy strong {
160
+ margin-inline-end: var(--kui-layout-item-gap, 0.5rem);
144
161
  font-size: var(--kui-font-xs);
145
162
  }
163
+ /* The badge is taller than the title's line. Negative block margins keep it
164
+ out of the line-height calculation, so a wrapped title's lines stay evenly
165
+ spaced whichever line the badge lands on. */
166
+ .kui-state-banner__badge {
167
+ margin-block: -0.5em;
168
+ margin-inline-end: var(--kui-layout-item-gap, 0.5rem);
169
+ vertical-align: baseline;
170
+ }
171
+ /* A placeholder badge holds a skeleton instead of text. With no text, the
172
+ skeleton's baseline would be synthesized from its bottom edge, sitting the
173
+ badge higher than the live one by a font-dependent amount. A zero-width
174
+ character gives it a text baseline in the badge's own font and line
175
+ height, exactly where the live badge's text baseline falls on every
176
+ platform. */
177
+ .kui-state-banner[data-placeholder="true"]
178
+ .kui-state-banner__badge
179
+ > *::before {
180
+ content: "\200b";
181
+ }
146
182
  .kui-state-banner__detail {
147
- overflow: hidden;
183
+ display: inline-block;
184
+ max-width: 100%;
185
+ overflow: clip;
148
186
  color: var(--_kui-state-banner-detail);
149
187
  font-size: var(--kui-font-2xs);
150
- opacity: 0.78;
151
188
  text-overflow: ellipsis;
189
+ vertical-align: baseline;
152
190
  white-space: nowrap;
153
191
  }
154
192
  .kui-state-banner__action {
@@ -174,12 +212,10 @@
174
212
  outline-offset: 2px;
175
213
  }
176
214
  @media (max-width: 36rem) {
177
- .kui-state-banner__copy {
178
- display: grid;
179
- grid-template-columns: auto 1fr;
180
- gap: 0.05rem;
181
- }
215
+ /* The detail drops below the title. The title row keeps the wide layout's
216
+ relationship: a content-sized badge one item gap after the title, on the
217
+ title's baseline. */
182
218
  .kui-state-banner__detail {
183
- grid-column: 1 / -1;
219
+ display: block;
184
220
  }
185
221
  }
@@ -42,9 +42,18 @@
42
42
  var(--wa-color-neutral-fill-normal) 25%,
43
43
  transparent
44
44
  );
45
+ /* Kept although kerf overrides --wa-shadow-s/-m/-l below: Web Awesome's
46
+ theme stylesheets build their shadows from this token, so an app that
47
+ layers one of them keeps kerf's scheme-aware shadow color. */
45
48
  --wa-color-shadow: light-dark(rgb(0 0 0 / 0.14), rgb(0 0 0 / 0.5));
46
49
  --wa-color-focus: light-dark(#007aff, #64d2ff);
47
- --wa-color-brand-fill-loud: light-dark(#0088ff, #64d2ff);
50
+ /* Kerf-owned loud fills and on-loud text: every on-loud/fill-loud pair
51
+ clears WCAG AA (4.5:1) in both schemes. Light brand and danger keep
52
+ white text on a slightly deeper fill of the same hue (#0088ff ->
53
+ #0075db, #ff383c -> #eb0005); success keeps its bright green with dark
54
+ text, as warning already does; dark brand and danger keep their fills
55
+ with dark text. src/foundation.css mirrors these as fallbacks. */
56
+ --wa-color-brand-fill-loud: light-dark(#0075db, #64d2ff);
48
57
  --wa-color-brand-fill-quiet: color-mix(
49
58
  in srgb,
50
59
  var(--wa-color-brand-fill-loud) 8%,
@@ -66,7 +75,10 @@
66
75
  var(--wa-color-surface-default)
67
76
  );
68
77
  --wa-color-brand-border-loud: var(--wa-color-brand-fill-loud);
69
- --wa-color-brand-on-quiet: light-dark(#1e6ef4, #8acbff);
78
+ /* Kerf-owned light on-quiet values: darkened from Hot Sheet 2's hues so
79
+ they clear AA on the lowered page background (#f2f2f7) as well as on
80
+ the surface; src/foundation.css mirrors them as fallbacks. */
81
+ --wa-color-brand-on-quiet: light-dark(#0c62f3, #8acbff);
70
82
  --wa-color-brand-on-normal: var(--wa-color-brand-on-quiet);
71
83
  --wa-color-brand-on-loud: light-dark(#fff, #111113);
72
84
 
@@ -106,9 +118,9 @@
106
118
  var(--wa-color-success-fill-loud) 78%,
107
119
  var(--wa-color-neutral-on-normal)
108
120
  );
109
- --wa-color-success-on-quiet: light-dark(#008932, #63e685);
121
+ --wa-color-success-on-quiet: light-dark(#007f2e, #63e685);
110
122
  --wa-color-success-on-normal: light-dark(#006d28, #8cea9f);
111
- --wa-color-success-on-loud: #fff;
123
+ --wa-color-success-on-loud: #1d1d1f;
112
124
 
113
125
  --wa-color-warning-fill-loud: #ffcc00;
114
126
  --wa-color-warning-fill-quiet: color-mix(
@@ -136,11 +148,11 @@
136
148
  var(--wa-color-warning-fill-loud) 78%,
137
149
  var(--wa-color-neutral-on-normal)
138
150
  );
139
- --wa-color-warning-on-quiet: light-dark(#a16a00, #ffd84a);
151
+ --wa-color-warning-on-quiet: light-dark(#966200, #ffd84a);
140
152
  --wa-color-warning-on-normal: light-dark(#5f3f00, #ffe27a);
141
153
  --wa-color-warning-on-loud: #1d1d1f;
142
154
 
143
- --wa-color-danger-fill-loud: #ff383c;
155
+ --wa-color-danger-fill-loud: light-dark(#eb0005, #ff383c);
144
156
  --wa-color-danger-fill-quiet: color-mix(
145
157
  in srgb,
146
158
  var(--wa-color-danger-fill-loud) 7%,
@@ -168,7 +180,7 @@
168
180
  );
169
181
  --wa-color-danger-on-quiet: light-dark(#c20b20, #ff696c);
170
182
  --wa-color-danger-on-normal: light-dark(#8e0717, #ff8a8c);
171
- --wa-color-danger-on-loud: #fff;
183
+ --wa-color-danger-on-loud: light-dark(#fff, #111113);
172
184
 
173
185
  /* Geometry stays aligned with the compact Kerf primitives. */
174
186
  --wa-border-radius-pill: 999px;
@@ -217,9 +229,16 @@
217
229
  --kui-wa-surface-margin: var(--kui-layout-inline-margin, 0.5rem);
218
230
  --kui-wa-container-inset: var(--kui-space-m, 1rem);
219
231
  --kui-disclosure-icon-scale: 0.5;
220
- --wa-shadow-s: 0 1px 3px rgb(0 0 0 / 0.14);
221
- --wa-shadow-m: 0 0.35rem 1rem rgb(0 0 0 / 0.11);
222
- --wa-shadow-l: 0 0.75rem 2rem rgb(0 0 0 / 0.09);
232
+ /* Elevation follows the scheme like --wa-color-shadow does: the light
233
+ alphas stay Hot Sheet 2's soft values, while dark raises them so a
234
+ raised surface still separates from a near-black page (a 9% black
235
+ shadow is invisible there). src/foundation.css mirrors these as
236
+ fallbacks. */
237
+ --wa-shadow-s: 0 1px 3px light-dark(rgb(0 0 0 / 0.14), rgb(0 0 0 / 0.5));
238
+ --wa-shadow-m: 0 0.35rem 1rem
239
+ light-dark(rgb(0 0 0 / 0.11), rgb(0 0 0 / 0.4));
240
+ --wa-shadow-l: 0 0.75rem 2rem
241
+ light-dark(rgb(0 0 0 / 0.09), rgb(0 0 0 / 0.32));
223
242
  }
224
243
 
225
244
  :where(:root),
@@ -255,18 +274,26 @@
255
274
  ) !important;
256
275
  }
257
276
 
258
- /* The fixed brand/success/danger loud fills need a dark foreground in both
259
- color schemes at badge text size. Neutral and warning already select an
260
- AA-safe on-loud token, so preserve their variant-specific treatment. */
261
- wa-badge[appearance="accent"]:is(
262
- :not([variant]),
263
- [variant="brand"],
264
- [variant="success"],
265
- [variant="danger"]
266
- ) {
277
+ /* Every variant's on-loud token clears AA on its loud fill in both color
278
+ schemes, so accent badges use it by default (a fixed dark foreground here
279
+ would fail on the deeper light brand and danger fills). Brand, success,
280
+ and danger keep a reviewed-override hook. */
281
+ wa-badge[appearance="accent"]:is(:not([variant]), [variant="brand"]) {
267
282
  --wa-color-on-loud: var(
268
283
  --kui-wa-badge-accent-foreground,
269
- #1d1d1f
284
+ var(--wa-color-brand-on-loud)
285
+ ) !important;
286
+ }
287
+ wa-badge[appearance="accent"][variant="success"] {
288
+ --wa-color-on-loud: var(
289
+ --kui-wa-badge-accent-foreground,
290
+ var(--wa-color-success-on-loud)
291
+ ) !important;
292
+ }
293
+ wa-badge[appearance="accent"][variant="danger"] {
294
+ --wa-color-on-loud: var(
295
+ --kui-wa-badge-accent-foreground,
296
+ var(--wa-color-danger-on-loud)
270
297
  ) !important;
271
298
  }
272
299