@kerfjs/ui 5.0.0-beta.106 → 5.0.0-beta.108

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 (283) hide show
  1. package/README.md +2 -1
  2. package/ai/application-ui-diagnostic-ids-v1.json +1 -0
  3. package/ai/application-ui-profile.defaults.json +6 -1
  4. package/ai/component-catalog.json +184 -39
  5. package/ai/component-composition-rules.json +20 -2
  6. package/ai/component-composition.d.ts +11 -0
  7. package/ai/component-composition.json +126 -21
  8. package/ai/component-composition.schema.json +32 -0
  9. package/ai/components/README.md +3 -2
  10. package/ai/components/button.md +9 -6
  11. package/ai/components/checkbox-group.md +89 -0
  12. package/ai/components/checkbox.md +3 -2
  13. package/ai/components/chip.md +1 -0
  14. package/ai/components/color-picker.md +10 -7
  15. package/ai/components/disclosure.md +6 -1
  16. package/ai/components/foundation.md +1 -1
  17. package/ai/components/list-detail-dialog.md +1 -1
  18. package/ai/components/list.md +1 -1
  19. package/ai/components/message-composer.md +2 -1
  20. package/ai/components/radio-group.md +4 -3
  21. package/ai/components/segmented-control.md +1 -0
  22. package/ai/components/split-button.md +5 -2
  23. package/ai/components/surface-scaffold.md +3 -1
  24. package/ai/components/switch.md +1 -1
  25. package/ai/components/text-field.md +3 -1
  26. package/ai/components/text.md +2 -0
  27. package/ai/components/toolbar-control-group.md +1 -0
  28. package/ai/components/toolbar.md +1 -1
  29. package/ai/components/wa-checkbox-group.md +5 -5
  30. package/ai/components/workbench-dialog.md +1 -1
  31. package/ai/public-api-signatures-v1.md +258 -35
  32. package/ai/skill.md +82 -65
  33. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  34. package/dist/browser/checkbox-group.js +5 -0
  35. package/dist/button.d.ts +18 -5
  36. package/dist/button.js +1 -1
  37. package/dist/catalog.js +11 -10
  38. package/dist/catalog.js.map +1 -1
  39. package/dist/checkbox-group.d.ts +70 -0
  40. package/dist/checkbox-group.js +7 -0
  41. package/dist/checkbox-group.js.map +1 -0
  42. package/dist/chip.d.ts +20 -2
  43. package/dist/chip.js +2 -1
  44. package/dist/{chunk-SQ2Q3OQI.js → chunk-2LM3PYHA.js} +2 -2
  45. package/dist/{chunk-SQ2Q3OQI.js.map → chunk-2LM3PYHA.js.map} +1 -1
  46. package/dist/{chunk-HYORKKYP.js → chunk-3VZ6SFD4.js} +1 -1
  47. package/dist/chunk-3VZ6SFD4.js.map +1 -0
  48. package/dist/{chunk-EKBMUXFV.js → chunk-3Z7N2NAZ.js} +141 -54
  49. package/dist/chunk-3Z7N2NAZ.js.map +1 -0
  50. package/dist/{chunk-23PPPNH6.js → chunk-4OV272LF.js} +2 -2
  51. package/dist/{chunk-23PPPNH6.js.map → chunk-4OV272LF.js.map} +1 -1
  52. package/dist/{chunk-2PXZBFEC.js → chunk-5J6Z4BWY.js} +1 -1
  53. package/dist/{chunk-2PXZBFEC.js.map → chunk-5J6Z4BWY.js.map} +1 -1
  54. package/dist/{chunk-TAHR457X.js → chunk-6CDILXF4.js} +5 -1
  55. package/dist/chunk-6CDILXF4.js.map +1 -0
  56. package/dist/{chunk-DDSCVEO5.js → chunk-CPSGUGAY.js} +6 -6
  57. package/dist/{chunk-DDSCVEO5.js.map → chunk-CPSGUGAY.js.map} +1 -1
  58. package/dist/{chunk-C3RLKKFQ.js → chunk-EYDXFOSH.js} +13 -8
  59. package/dist/chunk-EYDXFOSH.js.map +1 -0
  60. package/dist/{chunk-PE2KPZDW.js → chunk-HDXUHLTQ.js} +7 -2
  61. package/dist/chunk-HDXUHLTQ.js.map +1 -0
  62. package/dist/chunk-HU5IHXCI.js +73 -0
  63. package/dist/chunk-HU5IHXCI.js.map +1 -0
  64. package/dist/{chunk-DF2YKGIX.js → chunk-JCCN3U6X.js} +2 -2
  65. package/dist/{chunk-DF2YKGIX.js.map → chunk-JCCN3U6X.js.map} +1 -1
  66. package/dist/{chunk-UTCAOOXU.js → chunk-KPINJHIC.js} +8 -2
  67. package/dist/chunk-KPINJHIC.js.map +1 -0
  68. package/dist/{chunk-N7MBGONH.js → chunk-LMHN2TJL.js} +22 -2
  69. package/dist/chunk-LMHN2TJL.js.map +1 -0
  70. package/dist/{chunk-NS2TBYM4.js → chunk-LZUUUHNH.js} +7 -3
  71. package/dist/chunk-LZUUUHNH.js.map +1 -0
  72. package/dist/{chunk-GCAK23PU.js → chunk-MVKHSAKE.js} +2 -2
  73. package/dist/{chunk-GCAK23PU.js.map → chunk-MVKHSAKE.js.map} +1 -1
  74. package/dist/{chunk-OY2MXIBB.js → chunk-NB6POCFH.js} +3 -1
  75. package/dist/chunk-NB6POCFH.js.map +1 -0
  76. package/dist/{chunk-ECFCAKWE.js → chunk-NR6O74ST.js} +5 -1
  77. package/dist/chunk-NR6O74ST.js.map +1 -0
  78. package/dist/{chunk-7W3GKMN4.js → chunk-OQP3PFKQ.js} +7 -4
  79. package/dist/chunk-OQP3PFKQ.js.map +1 -0
  80. package/dist/{chunk-FKKJHGN5.js → chunk-P7EJ4CAD.js} +2 -2
  81. package/dist/{chunk-FKKJHGN5.js.map → chunk-P7EJ4CAD.js.map} +1 -1
  82. package/dist/{chunk-ZXZAECHZ.js → chunk-SOFPUW3O.js} +4 -4
  83. package/dist/{chunk-ZXZAECHZ.js.map → chunk-SOFPUW3O.js.map} +1 -1
  84. package/dist/{chunk-WJKHLOP5.js → chunk-TI2GV36S.js} +8 -2
  85. package/dist/chunk-TI2GV36S.js.map +1 -0
  86. package/dist/{chunk-QLA25V2K.js → chunk-WPNIKZMJ.js} +15 -1
  87. package/dist/chunk-WPNIKZMJ.js.map +1 -0
  88. package/dist/{chunk-FG6U7KQQ.js → chunk-WSEJ2FDE.js} +4 -4
  89. package/dist/{chunk-FG6U7KQQ.js.map → chunk-WSEJ2FDE.js.map} +1 -1
  90. package/dist/{chunk-ACUKTVS3.js → chunk-XWNXGFX3.js} +52 -42
  91. package/dist/chunk-XWNXGFX3.js.map +1 -0
  92. package/dist/{chunk-WU57BYYM.js → chunk-YVZCKXR3.js} +8 -2
  93. package/dist/chunk-YVZCKXR3.js.map +1 -0
  94. package/dist/{chunk-CMLPFIC5.js → chunk-ZN7KUMPY.js} +3 -1
  95. package/dist/chunk-ZN7KUMPY.js.map +1 -0
  96. package/dist/collapsible-panel.js +2 -2
  97. package/dist/color-picker.d.ts +30 -5
  98. package/dist/color-picker.js +1 -1
  99. package/dist/disclosure.d.ts +13 -4
  100. package/dist/disclosure.js.map +1 -1
  101. package/dist/help-tags-register.js +1 -1
  102. package/dist/index.d.ts +2 -1
  103. package/dist/index.js +24 -23
  104. package/dist/list-action-row.js +1 -1
  105. package/dist/list-detail-dialog.d.ts +7 -1
  106. package/dist/list-detail-dialog.js +7 -5
  107. package/dist/list-detail-dialog.js.map +1 -1
  108. package/dist/list-header.d.ts +8 -1
  109. package/dist/list-header.js +1 -1
  110. package/dist/list.d.ts +7 -1
  111. package/dist/list.js +1 -1
  112. package/dist/message-composer.js +1 -1
  113. package/dist/nav-stack.js +1 -1
  114. package/dist/popup-menu-register.js +2 -2
  115. package/dist/popup-menu.d.ts +15 -5
  116. package/dist/popup-menu.js +1 -1
  117. package/dist/segmented-control.d.ts +3 -1
  118. package/dist/segmented-control.js +1 -1
  119. package/dist/select-register.js +3 -3
  120. package/dist/split-button.d.ts +14 -2
  121. package/dist/split-button.js +1 -1
  122. package/dist/split-view.js +1 -1
  123. package/dist/styles/anchored-surface.css +3 -0
  124. package/dist/styles/button.css +57 -2
  125. package/dist/styles/catalog/components/catalog-example.css +55 -18
  126. package/dist/styles/checkbox-group.css +63 -0
  127. package/dist/styles/checkbox.css +7 -6
  128. package/dist/styles/color-picker.css +69 -34
  129. package/dist/styles/components/actions/button/button.css +57 -2
  130. package/dist/styles/components/actions/split-button/split-button.css +51 -5
  131. package/dist/styles/components/actions/toolbar/toolbar.css +9 -0
  132. package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +29 -1
  133. package/dist/styles/components/collections/framed-list/framed-list.css +6 -0
  134. package/dist/styles/components/collections/list/list.css +6 -0
  135. package/dist/styles/components/collections/list-header/list-header.css +7 -0
  136. package/dist/styles/components/feedback/anchored-surface/anchored-surface.css +3 -0
  137. package/dist/styles/components/forms/checkbox/checkbox.css +7 -6
  138. package/dist/styles/components/forms/checkbox-group/checkbox-group.css +63 -0
  139. package/dist/styles/components/forms/color-picker/color-picker.css +69 -34
  140. package/dist/styles/components/forms/radio-group/radio-group.css +7 -5
  141. package/dist/styles/components/forms/select/select.css +6 -2
  142. package/dist/styles/components/forms/switch/switch.css +3 -3
  143. package/dist/styles/components/layout/pane/pane.css +24 -0
  144. package/dist/styles/components/layout/workbench/workbench.css +4 -0
  145. package/dist/styles/components/navigation/nav-stack/nav-stack.css +77 -1
  146. package/dist/styles/components/navigation/tab-bar/tab-bar.css +6 -0
  147. package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +17 -0
  148. package/dist/styles/components/surfaces/content-item/content-item.css +30 -0
  149. package/dist/styles/components/surfaces/disclosure/disclosure.css +38 -0
  150. package/dist/styles/components/surfaces/sunken-panel/sunken-panel.css +3 -0
  151. package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +8 -0
  152. package/dist/styles/components/typography/text/text.css +10 -0
  153. package/dist/styles/content-item.css +30 -0
  154. package/dist/styles/disclosure.css +38 -0
  155. package/dist/styles/foundation.css +78 -13
  156. package/dist/styles/framed-list.css +6 -0
  157. package/dist/styles/list-header.css +7 -0
  158. package/dist/styles/list.css +6 -0
  159. package/dist/styles/nav-stack.css +77 -1
  160. package/dist/styles/pane.css +24 -0
  161. package/dist/styles/radio-group.css +7 -5
  162. package/dist/styles/select.css +6 -2
  163. package/dist/styles/split-button.css +51 -5
  164. package/dist/styles/styles.css +1 -0
  165. package/dist/styles/sunken-panel.css +3 -0
  166. package/dist/styles/surface-scaffold.css +8 -0
  167. package/dist/styles/switch.css +3 -3
  168. package/dist/styles/tab-bar.css +6 -0
  169. package/dist/styles/tab-navigator.css +17 -0
  170. package/dist/styles/text.css +10 -0
  171. package/dist/styles/toolbar-control-group.css +29 -1
  172. package/dist/styles/toolbar.css +9 -0
  173. package/dist/styles/webawesome.css +56 -12
  174. package/dist/styles/workbench.css +4 -0
  175. package/dist/surface-scaffold.d.ts +15 -1
  176. package/dist/surface-scaffold.js +1 -1
  177. package/dist/text-field.d.ts +7 -1
  178. package/dist/text-field.js +1 -1
  179. package/dist/toolbar-control-group.d.ts +8 -2
  180. package/dist/toolbar-control-group.js +1 -1
  181. package/dist/toolbar.d.ts +6 -1
  182. package/dist/toolbar.js +1 -1
  183. package/dist/wire-catalog.js +1 -1
  184. package/dist/wire-color-fields.js +2 -2
  185. package/dist/wire-color-pickers.d.ts +4 -3
  186. package/dist/wire-color-pickers.js +1 -1
  187. package/dist/wire-comboboxes.js +1 -1
  188. package/dist/wire-workbench.js +1 -1
  189. package/dist/workbench-dialog.d.ts +11 -2
  190. package/dist/workbench-dialog.js +6 -3
  191. package/dist/workbench-dialog.js.map +1 -1
  192. package/dist/workbench.js +1 -1
  193. package/docs/accessibility.md +58 -3
  194. package/docs/anchored-surface.md +6 -1
  195. package/docs/catalog.md +26 -1
  196. package/docs/color-picker.md +39 -8
  197. package/docs/component-contract.md +47 -3
  198. package/docs/component-selection.md +58 -21
  199. package/docs/design/templates/button/full-width-dark.svg +1 -0
  200. package/docs/design/templates/button/full-width.svg +1 -0
  201. package/docs/design/templates/button/tones-dark.svg +1 -1
  202. package/docs/design/templates/button/tones.svg +1 -1
  203. package/docs/design/templates/button-dark.svg +1 -1
  204. package/docs/design/templates/button.svg +1 -1
  205. package/docs/design/templates/checkbox/error-dark.svg +1 -1
  206. package/docs/design/templates/checkbox/error.svg +1 -1
  207. package/docs/design/templates/checkbox/states-dark.svg +1 -1
  208. package/docs/design/templates/checkbox/states.svg +1 -1
  209. package/docs/design/templates/checkbox-dark.svg +1 -1
  210. package/docs/design/templates/checkbox-group/horizontal-dark.svg +1 -0
  211. package/docs/design/templates/checkbox-group/horizontal.svg +1 -0
  212. package/docs/design/templates/checkbox-group/vertical-dark.svg +1 -0
  213. package/docs/design/templates/checkbox-group/vertical.svg +1 -0
  214. package/docs/design/templates/checkbox-group-dark.svg +1 -0
  215. package/docs/design/templates/checkbox-group.svg +1 -0
  216. package/docs/design/templates/checkbox.svg +1 -1
  217. package/docs/design/templates/color-picker/gray-dark.svg +1 -1
  218. package/docs/design/templates/color-picker/gray.svg +1 -1
  219. package/docs/design/templates/color-picker/hsb-dark.svg +1 -0
  220. package/docs/design/templates/color-picker/hsb.svg +1 -0
  221. package/docs/design/templates/color-picker/rgb-dark.svg +1 -1
  222. package/docs/design/templates/color-picker/rgb.svg +1 -1
  223. package/docs/design/templates/color-picker-dark.svg +1 -1
  224. package/docs/design/templates/color-picker.svg +1 -1
  225. package/docs/design/templates/disclosure/embedded-dark.svg +1 -0
  226. package/docs/design/templates/disclosure/embedded.svg +1 -0
  227. package/docs/design/templates/disclosure-dark.svg +1 -1
  228. package/docs/design/templates/disclosure.svg +1 -1
  229. package/docs/design/templates/radio-group/horizontal-dark.svg +1 -1
  230. package/docs/design/templates/radio-group/horizontal.svg +1 -1
  231. package/docs/design/templates/radio-group/vertical-dark.svg +1 -1
  232. package/docs/design/templates/radio-group/vertical.svg +1 -1
  233. package/docs/design/templates/radio-group-dark.svg +1 -1
  234. package/docs/design/templates/radio-group.svg +1 -1
  235. package/docs/design/templates/split-button/full-width-dark.svg +1 -0
  236. package/docs/design/templates/split-button/full-width.svg +1 -0
  237. package/docs/design/templates/split-button/pill-dark.svg +1 -0
  238. package/docs/design/templates/split-button/pill.svg +1 -0
  239. package/docs/design/templates/split-button/states-dark.svg +1 -0
  240. package/docs/design/templates/split-button/states.svg +1 -0
  241. package/docs/design/templates/split-button/tones-dark.svg +1 -0
  242. package/docs/design/templates/split-button/tones.svg +1 -0
  243. package/docs/design/templates/split-button-dark.svg +1 -0
  244. package/docs/design/templates/split-button.svg +1 -0
  245. package/docs/design/templates/switch/states-dark.svg +1 -1
  246. package/docs/design/templates/switch/states.svg +1 -1
  247. package/docs/design/templates/switch-dark.svg +1 -1
  248. package/docs/design/templates/switch.svg +1 -1
  249. package/docs/design/templates/text-field/number-dark.svg +1 -0
  250. package/docs/design/templates/text-field/number.svg +1 -0
  251. package/docs/design/templates/text-field-dark.svg +1 -1
  252. package/docs/design/templates/text-field.svg +1 -1
  253. package/docs/design/templates.md +10 -3
  254. package/docs/disclosure.md +34 -0
  255. package/docs/layout.md +16 -5
  256. package/docs/list-detail-dialog.md +4 -0
  257. package/docs/nav-stack.md +6 -2
  258. package/docs/surface-scaffold.md +6 -2
  259. package/docs/ui-doctor.md +16 -4
  260. package/docs/webawesome-migration.md +3 -1
  261. package/docs/webawesome-theme.md +56 -18
  262. package/docs/workbench-dialog.md +4 -1
  263. package/docs/workbench.md +7 -1
  264. package/docs/writing.md +3 -3
  265. package/doctor/copy-capitalization-checks.mjs +10 -7
  266. package/llms.txt +65 -23
  267. package/package.json +7 -1
  268. package/dist/chunk-7W3GKMN4.js.map +0 -1
  269. package/dist/chunk-ACUKTVS3.js.map +0 -1
  270. package/dist/chunk-C3RLKKFQ.js.map +0 -1
  271. package/dist/chunk-CMLPFIC5.js.map +0 -1
  272. package/dist/chunk-ECFCAKWE.js.map +0 -1
  273. package/dist/chunk-EKBMUXFV.js.map +0 -1
  274. package/dist/chunk-HYORKKYP.js.map +0 -1
  275. package/dist/chunk-N7MBGONH.js.map +0 -1
  276. package/dist/chunk-NS2TBYM4.js.map +0 -1
  277. package/dist/chunk-OY2MXIBB.js.map +0 -1
  278. package/dist/chunk-PE2KPZDW.js.map +0 -1
  279. package/dist/chunk-QLA25V2K.js.map +0 -1
  280. package/dist/chunk-TAHR457X.js.map +0 -1
  281. package/dist/chunk-UTCAOOXU.js.map +0 -1
  282. package/dist/chunk-WJKHLOP5.js.map +0 -1
  283. package/dist/chunk-WU57BYYM.js.map +0 -1
@@ -1,4 +1,4 @@
1
- export { SplitView } from './chunk-FKKJHGN5.js';
1
+ export { SplitView } from './chunk-P7EJ4CAD.js';
2
2
 
3
3
 
4
4
 
@@ -20,6 +20,9 @@
20
20
  border: 1px solid var(--kui-color-neutral-border-normal);
21
21
  border-radius: var(--kui-anchored-surface-radius, var(--kui-radius-m));
22
22
  color: var(--kui-color-text, inherit);
23
+ --kui-color-surface-current: var(--kui-color-surface-raised);
24
+ --kui-color-surface-current-region: transparent;
25
+ --kui-color-surface-current-tint: transparent;
23
26
  background: var(--kui-color-surface-raised);
24
27
  box-shadow: var(--kui-shadow-l);
25
28
  font: inherit;
@@ -47,6 +47,13 @@
47
47
  --_kui-button-on-quiet: var(--kui-color-brand-on-quiet);
48
48
  --_kui-button-outline: var(--kui-color-brand-border-loud);
49
49
  }
50
+ .kui-button[data-tone="success"] {
51
+ --_kui-button-fill: var(--kui-color-success-fill-loud);
52
+ --_kui-button-text: var(--kui-color-success-on-loud);
53
+ --_kui-button-quiet: var(--kui-color-success-fill-quiet);
54
+ --_kui-button-on-quiet: var(--kui-color-success-on-fill);
55
+ --_kui-button-outline: var(--kui-color-success-border-loud);
56
+ }
50
57
  .kui-button[data-tone="danger"] {
51
58
  --_kui-button-fill: var(--kui-color-danger-fill-loud);
52
59
  --_kui-button-text: var(--kui-color-danger-on-loud);
@@ -75,14 +82,27 @@
75
82
  flex-shrink: 0;
76
83
  padding: 0;
77
84
  }
85
+ /* fill: the button spans its parent's available inline width, as a filled
86
+ SplitButton does. The label stays centered and ellipsizes once it no longer
87
+ fits; an icon-only button that fills spans too. */
88
+ .kui-button[data-fill="true"] {
89
+ display: flex;
90
+ width: 100%;
91
+ min-width: 0;
92
+ }
93
+ .kui-button[data-fill="true"] > .kui-button__label {
94
+ overflow: hidden;
95
+ text-overflow: ellipsis;
96
+ }
78
97
  /* A pill: fully round ends (a circle when icon-only). */
79
98
  .kui-button[data-shape="pill"] {
80
99
  border-radius: var(--kui-layout-pill-radius, calc(1px + 1.3125rem));
81
100
  }
82
101
  /* A pressed neutral toggle takes the brand accent, as a pressed toolbar group
83
- control and a selected chip do; brand and danger keep their own tone. */
102
+ control and a selected chip do; semantic tones keep their own color. */
84
103
  .kui-button[aria-pressed="true"]:not(
85
104
  [data-tone="brand"],
105
+ [data-tone="success"],
86
106
  [data-tone="danger"]
87
107
  ) {
88
108
  --_kui-button-fill: var(--kui-color-brand-fill-loud);
@@ -93,7 +113,7 @@
93
113
  }
94
114
  /* A pressed toggle draws on top of its tone and emphasis. Secondary and plain
95
115
  take the tone's quiet fill with a doubled tone outline; primary keeps its
96
- loud fill (darkened for brand and danger) with an inset ring. The second pixel of outline marks
116
+ loud fill (darkened for semantic tones) with an inset ring. The second pixel of outline marks
97
117
  the state without relying on hue. */
98
118
  .kui-button[aria-pressed="true"]:is(
99
119
  [data-emphasis="secondary"],
@@ -121,6 +141,16 @@
121
141
  light-dark(#000, #fff) 18%
122
142
  );
123
143
  }
144
+ .kui-button[data-tone="success"][aria-pressed="true"]:not(
145
+ [data-emphasis="secondary"],
146
+ [data-emphasis="plain"]
147
+ ) {
148
+ --_kui-button-fill: color-mix(
149
+ in oklab,
150
+ var(--kui-color-success-fill-loud),
151
+ light-dark(#000, #fff) 18%
152
+ );
153
+ }
124
154
  .kui-button[data-tone="danger"][aria-pressed="true"]:not(
125
155
  [data-emphasis="secondary"],
126
156
  [data-emphasis="plain"]
@@ -197,10 +227,35 @@
197
227
  outline: var(--kui-focus-ring);
198
228
  outline-offset: 1px;
199
229
  }
230
+ /* focusRingInset: inside an ancestor that clips overflow, the ring moves
231
+ inside the box. On a loud fill the ring can share the fill's hue (brand),
232
+ so a surface-colored line runs inside it: the ring then meets the surface
233
+ on both edges, as the outside ring does, whatever the fill. The line is an
234
+ inset shadow from the padding edge (inside the 1px border) to 3px past the
235
+ ring, wide enough to stay solid at a fractional position; a pressed
236
+ toggle's inset ring lies under the focus ring meanwhile. The line paints
237
+ the surface the button sits on: the surface context's opaque color with
238
+ its translucent tint (a sunken or quiet fill) layered over it
239
+ (foundation.css), so it reads as a cut through the fill, not a halo. */
240
+ .kui-button[data-focus-ring-inset="true"]:focus-visible {
241
+ outline-offset: -3px;
242
+ box-shadow:
243
+ inset 0 0 0 5px var(--kui-color-surface-current-tint, transparent),
244
+ inset 0 0 0 5px var(--kui-color-surface-current-region, transparent),
245
+ inset 0 0 0 5px var(--kui-color-surface-current, var(--kui-color-surface));
246
+ }
200
247
  .kui-button:is(:disabled, [aria-disabled="true"]) {
201
248
  cursor: not-allowed;
202
249
  opacity: 0.5;
203
250
  }
251
+ /* Keep a disabled positive action quiet without fading its label below text
252
+ contrast. The subdued fill and border mark it unavailable. */
253
+ .kui-button[data-tone="success"]:is(:disabled, [aria-disabled="true"]) {
254
+ --_kui-button-fill: var(--kui-color-success-fill-quiet);
255
+ --_kui-button-text: var(--kui-color-success-on-fill);
256
+ --_kui-button-border: var(--kui-color-success-border-quiet);
257
+ opacity: 1;
258
+ }
204
259
  .kui-button__icon {
205
260
  display: inline-flex;
206
261
  flex: none;
@@ -182,32 +182,69 @@
182
182
  }
183
183
  }
184
184
 
185
- /* Bare specimens use a small inset to align with the surrounding examples. */
186
- .kui-catalog-example[data-align="glyph"]
187
- > :not([data-catalog-example-label]):not([data-catalog-example-note]):not(
188
- :popover-open,
189
- :modal
190
- ) {
185
+ /* An aligned example insets its specimens so their visible edge lines up with
186
+ the label: 16px for a bare glyph, 8px for a control, and 8px for a text
187
+ trigger (whose own 8px inset plus 1px border then puts its text on the
188
+ label's). The inset is a grid column rather than a margin on each specimen:
189
+ the label and note span the full width while every specimen sits in the
190
+ inset column, so a percentage width — a full-width field, a fill-width
191
+ Select, a full-width or control-sized frame — resolves against that column
192
+ and ends on the example's inline-end edge instead of running past it by the
193
+ inset. Specimens keep their own width caps, and top-layer popovers and modal
194
+ dialogs ignore grid placement. */
195
+ .kui-catalog-example:is(
196
+ [data-align="glyph"],
197
+ [data-align="inline-control"],
198
+ [data-align="text-trigger"]
199
+ ) {
200
+ display: grid;
201
+ grid-template-columns: var(--kui-catalog-example-align) minmax(0, 1fr);
202
+ align-content: start;
203
+ align-items: start;
204
+ justify-items: start;
205
+ column-gap: 0;
206
+ }
207
+
208
+ .kui-catalog-example[data-align="glyph"] {
191
209
  --kui-catalog-example-align: 1rem;
192
- margin-inline-start: var(--kui-catalog-example-align);
193
210
  }
194
211
 
195
- .kui-catalog-example[data-align="inline-control"]
196
- > :not([data-catalog-example-label]):not([data-catalog-example-note]):not(
197
- :popover-open,
198
- :modal
199
- ) {
212
+ .kui-catalog-example:is(
213
+ [data-align="inline-control"],
214
+ [data-align="text-trigger"]
215
+ ) {
200
216
  --kui-catalog-example-align: 0.5rem;
201
- margin-inline-start: var(--kui-catalog-example-align);
202
217
  }
203
218
 
204
- /* A trigger's text lines up with the example label's: the trigger's own
205
- inset (8px plus its 1px border) follows this 8px offset. */
206
- .kui-catalog-example[data-align="text-trigger"]
219
+ .kui-catalog-example:is(
220
+ [data-align="glyph"],
221
+ [data-align="inline-control"],
222
+ [data-align="text-trigger"]
223
+ )
224
+ > * {
225
+ grid-column: 2;
226
+ }
227
+
228
+ /* The column is the whole inset: a specimen's own start margin (a ListItem's
229
+ 8px list inset) does not stack on it. Top-layer surfaces keep their
230
+ centering margins. */
231
+ .kui-catalog-example:is(
232
+ [data-align="glyph"],
233
+ [data-align="inline-control"],
234
+ [data-align="text-trigger"]
235
+ )
207
236
  > :not([data-catalog-example-label]):not([data-catalog-example-note]):not(
208
237
  :popover-open,
209
238
  :modal
210
239
  ) {
211
- --kui-catalog-example-align: 0.5rem;
212
- margin-inline-start: var(--kui-catalog-example-align);
240
+ margin-inline-start: 0;
241
+ }
242
+
243
+ .kui-catalog-example:is(
244
+ [data-align="glyph"],
245
+ [data-align="inline-control"],
246
+ [data-align="text-trigger"]
247
+ )
248
+ > :is([data-catalog-example-label], [data-catalog-example-note]) {
249
+ grid-column: 1 / -1;
213
250
  }
@@ -0,0 +1,63 @@
1
+ /* CheckboxGroup: the group label, the choices (each a Kerf Checkbox, which
2
+ draws its own box, label, and hint), and hint and error text below. It is
3
+ laid out exactly like a RadioGroup: each box sits on the group's
4
+ inline-start edge and stacked choices sit 8px apart, the 28px pitch
5
+ checkboxes and radios share. */
6
+ .kui-checkbox-group {
7
+ display: flex;
8
+ min-width: 0;
9
+ flex-direction: column;
10
+ margin: 0;
11
+ padding: 0;
12
+ border: none;
13
+ font-size: var(--kui-font-m, 1rem);
14
+ font-weight: 400;
15
+ line-height: 1.2;
16
+ }
17
+ .kui-checkbox-group[data-size="compact"] {
18
+ font-size: var(--kui-font-s, 0.875rem);
19
+ }
20
+ /* The label matches every Kerf form control's label (RadioGroup's too). */
21
+ .kui-checkbox-group__label {
22
+ display: block;
23
+ float: none;
24
+ margin-block-end: 0.375rem;
25
+ padding: 0;
26
+ padding-inline: calc(1px + var(--kui-layout-item-padding, 0.5rem));
27
+ color: var(--kui-color-neutral-on-quiet);
28
+ font-size: var(--kui-font-xs);
29
+ font-weight: 650;
30
+ letter-spacing: 0.04em;
31
+ line-height: 1.2;
32
+ text-transform: uppercase;
33
+ }
34
+ .kui-checkbox-group__choices {
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: var(--kui-space-xs);
38
+ }
39
+ .kui-checkbox-group[data-orientation="horizontal"]
40
+ .kui-checkbox-group__choices {
41
+ flex-direction: row;
42
+ flex-wrap: wrap;
43
+ column-gap: 1.5rem;
44
+ }
45
+ .kui-checkbox-group__hint,
46
+ .kui-checkbox-group__error {
47
+ display: block;
48
+ margin-block-start: 0.4375rem;
49
+ padding-inline: calc(1px + var(--kui-layout-item-padding, 0.5rem));
50
+ color: var(--kui-color-text-quiet);
51
+ font-size: var(--kui-font-s, 0.875rem);
52
+ line-height: 1.6;
53
+ }
54
+ .kui-checkbox-group[data-size="compact"]
55
+ :is(.kui-checkbox-group__hint, .kui-checkbox-group__error) {
56
+ font-size: var(--kui-font-xs, 0.75rem);
57
+ }
58
+ .kui-checkbox-group__error {
59
+ color: var(--kui-color-danger-on-quiet);
60
+ }
61
+ .kui-checkbox-group__hint + .kui-checkbox-group__error {
62
+ margin-block-start: 0;
63
+ }
@@ -1,6 +1,7 @@
1
- /* Checkbox: a drawn box beside its label, with hint and error text on the
2
- label's column. The native input sits invisibly over the box, so pointer,
3
- keyboard, touch exploration, and forms all reach the real control. */
1
+ /* Checkbox: a drawn box beside its label, with hint and error text directly
2
+ under the label on its column, as a grouped choice hint sits. The native
3
+ input sits invisibly over the box, so pointer, keyboard, touch
4
+ exploration, and forms all reach the real control. */
4
5
  .kui-checkbox {
5
6
  --_kui-checkbox-box: 1.25rem;
6
7
  --_kui-checkbox-gap: 0.5rem;
@@ -91,7 +92,6 @@
91
92
  .kui-checkbox__hint,
92
93
  .kui-checkbox__error {
93
94
  display: block;
94
- margin-block-start: 0.4375rem;
95
95
  padding-inline-start: calc(
96
96
  var(--_kui-checkbox-box) + var(--_kui-checkbox-gap)
97
97
  );
@@ -106,8 +106,9 @@
106
106
  .kui-checkbox__error {
107
107
  color: var(--kui-color-danger-on-quiet);
108
108
  }
109
- .kui-checkbox__hint + .kui-checkbox__error {
110
- margin-block-start: 0;
109
+ /* Inside a CheckboxGroup an invalid group marks every box. */
110
+ .kui-checkbox-group[data-invalid] .kui-checkbox__box {
111
+ border-color: var(--kui-color-danger-border-loud);
111
112
  }
112
113
  @media (forced-colors: active) {
113
114
  .kui-checkbox__box {
@@ -1,8 +1,10 @@
1
- /* ColorPicker: a saturation and brightness area, hue and opacity sliders, a
2
- color-model menu with its tools, channel fields, a hex and opacity row,
3
- then preset and sample swatches. The surface's custom properties
4
- (--_kui-color-picker-h/s/v/a and the opaque color) place the thumbs and
5
- paint the tracks; the wiring updates them while a person drags. */
1
+ /* ColorPicker: a saturation and brightness area, a slider per channel of the
2
+ color model plus an opacity slider, a color-model menu with its tools,
3
+ channel fields, a hex and opacity row, then preset and sample swatches.
4
+ The surface's custom properties (--_kui-color-picker-h/s/v/a and the
5
+ opaque color) place the area thumb and paint the opacity slider; each
6
+ channel slider carries its own track gradient and thumb color inline. The
7
+ wiring updates both while a person drags. */
6
8
  .kui-color-picker {
7
9
  display: grid;
8
10
  width: 100%;
@@ -18,7 +20,18 @@
18
20
  font-size: var(--kui-font-m, 1rem);
19
21
  }
20
22
 
23
+ /* The area and every slider track carry an inner edge halfway to the text
24
+ color, so an area or track as dark (or as light) as the surface behind it
25
+ keeps a visible boundary in either scheme. Every thumb draws a two-tone
26
+ ring, white inside a dark outline, so it keeps a 3:1 boundary over light
27
+ and dark colors alike. */
21
28
  .kui-color-picker__surface {
29
+ --_kui-color-picker-track-edge: color-mix(
30
+ in srgb,
31
+ var(--kui-color-text) 50%,
32
+ transparent
33
+ );
34
+ --_kui-color-picker-thumb-outline: rgb(0 0 0 / 0.6);
22
35
  --_kui-color-picker-checker: repeating-conic-gradient(
23
36
  var(--kui-color-neutral-fill-normal) 0% 25%,
24
37
  var(--kui-color-surface) 0% 50%
@@ -38,6 +51,7 @@
38
51
  background:
39
52
  linear-gradient(to top, #000, transparent),
40
53
  linear-gradient(to right, #fff, hsl(var(--_kui-color-picker-h) 100% 50%));
54
+ box-shadow: inset 0 0 0 1px var(--_kui-color-picker-track-edge);
41
55
  cursor: crosshair;
42
56
  touch-action: none;
43
57
  }
@@ -58,17 +72,28 @@
58
72
  border-radius: 50%;
59
73
  background: var(--_kui-color-picker-color);
60
74
  box-shadow:
61
- 0 0 0 1px rgb(0 0 0 / 0.3),
75
+ 0 0 0 1px var(--_kui-color-picker-thumb-outline),
62
76
  var(--kui-shadow-s);
63
77
  pointer-events: none;
64
78
  translate: -50% -50%;
65
79
  }
66
80
 
67
- /* The hue and opacity sliders: native ranges drawn as 12px tracks with a
68
- round thumb that shows the color at that point. */
69
- .kui-color-picker__hue,
81
+ /* The channel and opacity sliders, one group: native ranges drawn as 12px
82
+ tracks with a round thumb that shows the color at that point. A channel
83
+ slider's inline style carries its track (the colors its channel produces
84
+ while the others hold, or the full rainbow for hue) and its thumb color.
85
+ Every track runs in the writing direction, as the native range does, and
86
+ carries the surface's inner edge. */
87
+ .kui-color-picker__sliders {
88
+ display: grid;
89
+ min-width: 0;
90
+ gap: var(--kui-space-xs, 0.5rem);
91
+ }
92
+
93
+ .kui-color-picker__slider,
70
94
  .kui-color-picker__opacity {
71
95
  --_kui-color-picker-thumb: 1.25rem;
96
+ --_kui-color-picker-track-direction: to right;
72
97
 
73
98
  display: block;
74
99
  width: 100%;
@@ -81,23 +106,22 @@
81
106
  appearance: none;
82
107
  }
83
108
 
84
- .kui-color-picker__hue {
85
- --_kui-color-picker-track: linear-gradient(
86
- to right,
87
- #f00,
88
- #ff0,
89
- #0f0,
90
- #0ff,
91
- #00f,
92
- #f0f,
93
- #f00
94
- );
95
- --_kui-color-picker-thumb-color: hsl(var(--_kui-color-picker-h) 100% 50%);
109
+ .kui-color-picker__slider[hidden] {
110
+ display: none;
111
+ }
112
+
113
+ .kui-color-picker__slider:dir(rtl),
114
+ .kui-color-picker__opacity:dir(rtl) {
115
+ --_kui-color-picker-track-direction: to left;
96
116
  }
97
117
 
98
118
  .kui-color-picker__opacity {
99
119
  --_kui-color-picker-track:
100
- linear-gradient(to right, transparent, var(--_kui-color-picker-color)),
120
+ linear-gradient(
121
+ var(--_kui-color-picker-track-direction),
122
+ transparent,
123
+ var(--_kui-color-picker-color)
124
+ ),
101
125
  var(--_kui-color-picker-checker);
102
126
  --_kui-color-picker-thumb-color: color-mix(
103
127
  in srgb,
@@ -106,23 +130,23 @@
106
130
  );
107
131
  }
108
132
 
109
- .kui-color-picker__hue::-webkit-slider-runnable-track,
133
+ .kui-color-picker__slider::-webkit-slider-runnable-track,
110
134
  .kui-color-picker__opacity::-webkit-slider-runnable-track {
111
135
  height: 0.75rem;
112
136
  border-radius: var(--kui-radius-pill);
113
137
  background: var(--_kui-color-picker-track);
114
- box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1);
138
+ box-shadow: inset 0 0 0 1px var(--_kui-color-picker-track-edge);
115
139
  }
116
140
 
117
- .kui-color-picker__hue::-moz-range-track,
141
+ .kui-color-picker__slider::-moz-range-track,
118
142
  .kui-color-picker__opacity::-moz-range-track {
119
143
  height: 0.75rem;
120
144
  border-radius: var(--kui-radius-pill);
121
145
  background: var(--_kui-color-picker-track);
122
- box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1);
146
+ box-shadow: inset 0 0 0 1px var(--_kui-color-picker-track-edge);
123
147
  }
124
148
 
125
- .kui-color-picker__hue::-webkit-slider-thumb,
149
+ .kui-color-picker__slider::-webkit-slider-thumb,
126
150
  .kui-color-picker__opacity::-webkit-slider-thumb {
127
151
  width: var(--_kui-color-picker-thumb);
128
152
  height: var(--_kui-color-picker-thumb);
@@ -132,12 +156,12 @@
132
156
  border-radius: 50%;
133
157
  background: var(--_kui-color-picker-thumb-color);
134
158
  box-shadow:
135
- 0 0 0 1px rgb(0 0 0 / 0.2),
159
+ 0 0 0 1px var(--_kui-color-picker-thumb-outline),
136
160
  var(--kui-shadow-s);
137
161
  appearance: none;
138
162
  }
139
163
 
140
- .kui-color-picker__hue::-moz-range-thumb,
164
+ .kui-color-picker__slider::-moz-range-thumb,
141
165
  .kui-color-picker__opacity::-moz-range-thumb {
142
166
  width: var(--_kui-color-picker-thumb);
143
167
  height: var(--_kui-color-picker-thumb);
@@ -146,22 +170,22 @@
146
170
  border-radius: 50%;
147
171
  background: var(--_kui-color-picker-thumb-color);
148
172
  box-shadow:
149
- 0 0 0 1px rgb(0 0 0 / 0.2),
173
+ 0 0 0 1px var(--_kui-color-picker-thumb-outline),
150
174
  var(--kui-shadow-s);
151
175
  }
152
176
 
153
- .kui-color-picker__hue:focus-visible,
177
+ .kui-color-picker__slider:focus-visible,
154
178
  .kui-color-picker__opacity:focus-visible {
155
179
  outline: none;
156
180
  }
157
181
 
158
- .kui-color-picker__hue:focus-visible::-webkit-slider-thumb,
182
+ .kui-color-picker__slider:focus-visible::-webkit-slider-thumb,
159
183
  .kui-color-picker__opacity:focus-visible::-webkit-slider-thumb {
160
184
  outline: var(--kui-focus-ring);
161
185
  outline-offset: 1px;
162
186
  }
163
187
 
164
- .kui-color-picker__hue:focus-visible::-moz-range-thumb,
188
+ .kui-color-picker__slider:focus-visible::-moz-range-thumb,
165
189
  .kui-color-picker__opacity:focus-visible::-moz-range-thumb {
166
190
  outline: var(--kui-focus-ring);
167
191
  outline-offset: 1px;
@@ -317,10 +341,21 @@
317
341
  cursor: not-allowed;
318
342
  }
319
343
 
344
+ /* Increased contrast draws the area and track edge in the full text color. */
345
+ @media (prefers-contrast: more) {
346
+ .kui-color-picker__surface {
347
+ --_kui-color-picker-track-edge: var(--kui-color-text);
348
+ }
349
+ }
350
+
320
351
  @media (forced-colors: active) {
352
+ .kui-color-picker__surface {
353
+ --_kui-color-picker-track-edge: CanvasText;
354
+ }
355
+
321
356
  .kui-color-picker__area,
322
357
  .kui-color-picker__area-thumb,
323
- .kui-color-picker__hue,
358
+ .kui-color-picker__slider,
324
359
  .kui-color-picker__opacity {
325
360
  forced-color-adjust: none;
326
361
  }
@@ -47,6 +47,13 @@
47
47
  --_kui-button-on-quiet: var(--kui-color-brand-on-quiet);
48
48
  --_kui-button-outline: var(--kui-color-brand-border-loud);
49
49
  }
50
+ .kui-button[data-tone="success"] {
51
+ --_kui-button-fill: var(--kui-color-success-fill-loud);
52
+ --_kui-button-text: var(--kui-color-success-on-loud);
53
+ --_kui-button-quiet: var(--kui-color-success-fill-quiet);
54
+ --_kui-button-on-quiet: var(--kui-color-success-on-fill);
55
+ --_kui-button-outline: var(--kui-color-success-border-loud);
56
+ }
50
57
  .kui-button[data-tone="danger"] {
51
58
  --_kui-button-fill: var(--kui-color-danger-fill-loud);
52
59
  --_kui-button-text: var(--kui-color-danger-on-loud);
@@ -75,14 +82,27 @@
75
82
  flex-shrink: 0;
76
83
  padding: 0;
77
84
  }
85
+ /* fill: the button spans its parent's available inline width, as a filled
86
+ SplitButton does. The label stays centered and ellipsizes once it no longer
87
+ fits; an icon-only button that fills spans too. */
88
+ .kui-button[data-fill="true"] {
89
+ display: flex;
90
+ width: 100%;
91
+ min-width: 0;
92
+ }
93
+ .kui-button[data-fill="true"] > .kui-button__label {
94
+ overflow: hidden;
95
+ text-overflow: ellipsis;
96
+ }
78
97
  /* A pill: fully round ends (a circle when icon-only). */
79
98
  .kui-button[data-shape="pill"] {
80
99
  border-radius: var(--kui-layout-pill-radius, calc(1px + 1.3125rem));
81
100
  }
82
101
  /* A pressed neutral toggle takes the brand accent, as a pressed toolbar group
83
- control and a selected chip do; brand and danger keep their own tone. */
102
+ control and a selected chip do; semantic tones keep their own color. */
84
103
  .kui-button[aria-pressed="true"]:not(
85
104
  [data-tone="brand"],
105
+ [data-tone="success"],
86
106
  [data-tone="danger"]
87
107
  ) {
88
108
  --_kui-button-fill: var(--kui-color-brand-fill-loud);
@@ -93,7 +113,7 @@
93
113
  }
94
114
  /* A pressed toggle draws on top of its tone and emphasis. Secondary and plain
95
115
  take the tone's quiet fill with a doubled tone outline; primary keeps its
96
- loud fill (darkened for brand and danger) with an inset ring. The second pixel of outline marks
116
+ loud fill (darkened for semantic tones) with an inset ring. The second pixel of outline marks
97
117
  the state without relying on hue. */
98
118
  .kui-button[aria-pressed="true"]:is(
99
119
  [data-emphasis="secondary"],
@@ -121,6 +141,16 @@
121
141
  light-dark(#000, #fff) 18%
122
142
  );
123
143
  }
144
+ .kui-button[data-tone="success"][aria-pressed="true"]:not(
145
+ [data-emphasis="secondary"],
146
+ [data-emphasis="plain"]
147
+ ) {
148
+ --_kui-button-fill: color-mix(
149
+ in oklab,
150
+ var(--kui-color-success-fill-loud),
151
+ light-dark(#000, #fff) 18%
152
+ );
153
+ }
124
154
  .kui-button[data-tone="danger"][aria-pressed="true"]:not(
125
155
  [data-emphasis="secondary"],
126
156
  [data-emphasis="plain"]
@@ -197,10 +227,35 @@
197
227
  outline: var(--kui-focus-ring);
198
228
  outline-offset: 1px;
199
229
  }
230
+ /* focusRingInset: inside an ancestor that clips overflow, the ring moves
231
+ inside the box. On a loud fill the ring can share the fill's hue (brand),
232
+ so a surface-colored line runs inside it: the ring then meets the surface
233
+ on both edges, as the outside ring does, whatever the fill. The line is an
234
+ inset shadow from the padding edge (inside the 1px border) to 3px past the
235
+ ring, wide enough to stay solid at a fractional position; a pressed
236
+ toggle's inset ring lies under the focus ring meanwhile. The line paints
237
+ the surface the button sits on: the surface context's opaque color with
238
+ its translucent tint (a sunken or quiet fill) layered over it
239
+ (foundation.css), so it reads as a cut through the fill, not a halo. */
240
+ .kui-button[data-focus-ring-inset="true"]:focus-visible {
241
+ outline-offset: -3px;
242
+ box-shadow:
243
+ inset 0 0 0 5px var(--kui-color-surface-current-tint, transparent),
244
+ inset 0 0 0 5px var(--kui-color-surface-current-region, transparent),
245
+ inset 0 0 0 5px var(--kui-color-surface-current, var(--kui-color-surface));
246
+ }
200
247
  .kui-button:is(:disabled, [aria-disabled="true"]) {
201
248
  cursor: not-allowed;
202
249
  opacity: 0.5;
203
250
  }
251
+ /* Keep a disabled positive action quiet without fading its label below text
252
+ contrast. The subdued fill and border mark it unavailable. */
253
+ .kui-button[data-tone="success"]:is(:disabled, [aria-disabled="true"]) {
254
+ --_kui-button-fill: var(--kui-color-success-fill-quiet);
255
+ --_kui-button-text: var(--kui-color-success-on-fill);
256
+ --_kui-button-border: var(--kui-color-success-border-quiet);
257
+ opacity: 1;
258
+ }
204
259
  .kui-button__icon {
205
260
  display: inline-flex;
206
261
  flex: none;