@threadlabs/looma 0.42.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/components/ui-action-bar/ui-action-bar.html +1 -7
  2. package/components/ui-affordance-scope/ui-affordance-scope.html +4 -4
  3. package/components/ui-avatar/ui-avatar.html +0 -22
  4. package/components/ui-avatar-group/ui-avatar-group.html +1 -11
  5. package/components/ui-badge/ui-badge.html +57 -78
  6. package/components/ui-button/ui-button.html +36 -81
  7. package/components/ui-callout/ui-callout.html +30 -68
  8. package/components/ui-card/ui-card.html +41 -15
  9. package/components/ui-checkbox/ui-checkbox.html +1 -15
  10. package/components/ui-cluster/ui-cluster.html +1 -7
  11. package/components/ui-combobox/ui-combobox.html +7 -70
  12. package/components/ui-container/ui-container.html +2 -12
  13. package/components/ui-context-menu/ui-context-menu.html +1 -23
  14. package/components/ui-dialog/ui-dialog.html +1 -31
  15. package/components/ui-disclosure/ui-disclosure.html +1 -15
  16. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +2 -2
  17. package/components/ui-floating-action-button/ui-floating-action-button.html +0 -14
  18. package/components/ui-form-field/ui-form-field.html +2 -32
  19. package/components/ui-grid/ui-grid.html +1 -11
  20. package/components/ui-icon/ui-icon.html +1 -12
  21. package/components/ui-icon-button/ui-icon-button.html +52 -87
  22. package/components/ui-input/ui-input.html +5 -55
  23. package/components/ui-input-group/ui-input-group.html +1 -13
  24. package/components/ui-list/ui-list.html +0 -10
  25. package/components/ui-list-item/ui-list-item.html +1 -19
  26. package/components/ui-listbox/ui-listbox.html +0 -21
  27. package/components/ui-menu/ui-menu.html +0 -22
  28. package/components/ui-menu-item/ui-menu-item.html +0 -26
  29. package/components/ui-meter/ui-meter.html +11 -6
  30. package/components/ui-nav-item/ui-nav-item.html +0 -18
  31. package/components/ui-popover/ui-popover.html +0 -30
  32. package/components/ui-radio/ui-radio.html +7 -13
  33. package/components/ui-radio-group/ui-radio-group.html +0 -5
  34. package/components/ui-reel/ui-reel.html +1 -11
  35. package/components/ui-search-result-row/ui-search-result-row.html +0 -34
  36. package/components/ui-search-shell/ui-search-shell.html +1 -43
  37. package/components/ui-select/ui-select.html +0 -42
  38. package/components/ui-separator/ui-separator.html +0 -6
  39. package/components/ui-sidebar/ui-sidebar.html +2 -24
  40. package/components/ui-site-header/ui-site-header.html +0 -25
  41. package/components/ui-skeleton/ui-skeleton.html +0 -9
  42. package/components/ui-stack/ui-stack.html +6 -11
  43. package/components/ui-swatch/ui-swatch.html +0 -5
  44. package/components/ui-switch/ui-switch.html +1 -15
  45. package/components/ui-switcher/ui-switcher.html +1 -11
  46. package/components/ui-tabs/ui-tabs.html +1 -19
  47. package/components/ui-text/ui-text.html +19 -6
  48. package/components/ui-textarea/ui-textarea.html +0 -50
  49. package/components/ui-toast/ui-toast.html +12 -27
  50. package/components/ui-toast-region/ui-toast-region.html +13 -34
  51. package/components/ui-tooltip/ui-tooltip.html +1 -43
  52. package/components/ui-top-bar/ui-top-bar.html +1 -31
  53. package/components/ui-tree/ui-tree.html +1 -16
  54. package/components/ui-tree-item/ui-tree-item.html +1 -23
  55. package/components/ui-tree-item/ui-tree-item.js +0 -1
  56. package/dist/index.js +1 -1
  57. package/docs/README.md +11 -9
  58. package/docs/catalog.json +606 -191
  59. package/docs/customizer-render.mjs +20 -8
  60. package/docs/customizer.js +40 -2
  61. package/docs/palette.mjs +5 -4
  62. package/docs/theme.mjs +97 -35
  63. package/docs/value-editors.mjs +2 -1
  64. package/package.json +2 -2
  65. package/styles/ui-action-bar.css +3 -11
  66. package/styles/ui-affordance-scope.css +4 -4
  67. package/styles/ui-avatar-group.css +3 -15
  68. package/styles/ui-avatar.css +2 -26
  69. package/styles/ui-badge.css +56 -80
  70. package/styles/ui-button.css +35 -83
  71. package/styles/ui-callout.css +32 -72
  72. package/styles/ui-card.css +36 -12
  73. package/styles/ui-checkbox.css +3 -19
  74. package/styles/ui-cluster.css +2 -10
  75. package/styles/ui-combobox.css +7 -140
  76. package/styles/ui-container.css +2 -14
  77. package/styles/ui-context-menu.css +3 -27
  78. package/styles/ui-dialog.css +5 -67
  79. package/styles/ui-disclosure.css +3 -19
  80. package/styles/ui-editor-table-overlay.css +2 -2
  81. package/styles/ui-floating-action-button.css +2 -18
  82. package/styles/ui-form-field.css +4 -36
  83. package/styles/ui-grid.css +2 -14
  84. package/styles/ui-icon-button.css +51 -89
  85. package/styles/ui-icon.css +3 -16
  86. package/styles/ui-input-group.css +2 -14
  87. package/styles/ui-input.css +6 -57
  88. package/styles/ui-list-item.css +3 -23
  89. package/styles/ui-list.css +2 -14
  90. package/styles/ui-listbox.css +2 -44
  91. package/styles/ui-menu-item.css +2 -30
  92. package/styles/ui-menu.css +2 -26
  93. package/styles/ui-meter.css +8 -4
  94. package/styles/ui-nav-item.css +2 -22
  95. package/styles/ui-popover.css +2 -34
  96. package/styles/ui-radio-group.css +1 -6
  97. package/styles/ui-radio.css +9 -17
  98. package/styles/ui-reel.css +2 -14
  99. package/styles/ui-search-result-row.css +2 -38
  100. package/styles/ui-search-shell.css +3 -47
  101. package/styles/ui-select.css +2 -46
  102. package/styles/ui-separator.css +2 -10
  103. package/styles/ui-sidebar.css +4 -28
  104. package/styles/ui-site-header.css +1 -26
  105. package/styles/ui-skeleton.css +2 -12
  106. package/styles/ui-stack.css +4 -12
  107. package/styles/ui-swatch.css +1 -6
  108. package/styles/ui-switch.css +3 -19
  109. package/styles/ui-switcher.css +2 -14
  110. package/styles/ui-tabs.css +3 -23
  111. package/styles/ui-text.css +10 -2
  112. package/styles/ui-textarea.css +2 -54
  113. package/styles/ui-toast-region.css +29 -73
  114. package/styles/ui-toast.css +24 -54
  115. package/styles/ui-tooltip.css +3 -47
  116. package/styles/ui-top-bar.css +3 -35
  117. package/styles/ui-tree-item.css +5 -51
  118. package/styles/ui-tree.css +3 -20
  119. package/theme-system.css +6 -2
  120. package/tokens.css +55 -21
  121. package/vanilla/UiBadge.d.ts +1 -1
  122. package/vanilla/UiBadge.js +1 -1
  123. package/vanilla/UiButton.d.ts +1 -1
  124. package/vanilla/UiButton.js +1 -1
  125. package/vanilla/UiCard.d.ts +1 -1
  126. package/vanilla/UiCard.js +1 -1
  127. package/vanilla/UiIconButton.d.ts +1 -1
  128. package/vanilla/UiIconButton.js +1 -1
  129. package/vanilla/UiMeter.d.ts +1 -1
  130. package/vanilla/UiMeter.js +1 -1
  131. package/vanilla/UiStack.js +1 -1
  132. package/vanilla/UiText.d.ts +1 -1
  133. package/vanilla/UiText.js +1 -1
  134. package/vue/UiActionBar.vue +3 -9
  135. package/vue/UiAffordanceScope.vue +4 -4
  136. package/vue/UiAvatar.vue +1 -28
  137. package/vue/UiAvatarGroup.vue +1 -11
  138. package/vue/UiBadge.d.ts +2 -2
  139. package/vue/UiBadge.vue +84 -81
  140. package/vue/UiButton.d.ts +2 -2
  141. package/vue/UiButton.vue +78 -97
  142. package/vue/UiCallout.vue +30 -71
  143. package/vue/UiCard.d.ts +2 -2
  144. package/vue/UiCard.vue +71 -20
  145. package/vue/UiCheckbox.vue +1 -15
  146. package/vue/UiCluster.vue +1 -10
  147. package/vue/UiCombobox.vue +13 -72
  148. package/vue/UiContainer.vue +1 -13
  149. package/vue/UiContextMenu.vue +1 -30
  150. package/vue/UiDialog.vue +3 -33
  151. package/vue/UiDisclosure.vue +1 -15
  152. package/vue/UiEditorTableOverlay.vue +2 -2
  153. package/vue/UiFloatingActionButton.vue +0 -22
  154. package/vue/UiFormField.vue +6 -33
  155. package/vue/UiGrid.vue +1 -13
  156. package/vue/UiIcon.vue +1 -16
  157. package/vue/UiIconButton.d.ts +2 -2
  158. package/vue/UiIconButton.vue +103 -99
  159. package/vue/UiInput.vue +1 -54
  160. package/vue/UiInputGroup.vue +8 -20
  161. package/vue/UiList.vue +2 -12
  162. package/vue/UiListItem.vue +8 -26
  163. package/vue/UiListbox.vue +0 -23
  164. package/vue/UiMenu.vue +1 -23
  165. package/vue/UiMenuItem.vue +0 -26
  166. package/vue/UiMeter.d.ts +2 -2
  167. package/vue/UiMeter.vue +47 -12
  168. package/vue/UiNavItem.vue +3 -21
  169. package/vue/UiPopover.vue +1 -32
  170. package/vue/UiRadio.vue +1 -11
  171. package/vue/UiRadioGroup.vue +0 -11
  172. package/vue/UiReel.vue +1 -11
  173. package/vue/UiSearchResultRow.vue +0 -35
  174. package/vue/UiSearchShell.vue +1 -53
  175. package/vue/UiSelect.vue +0 -42
  176. package/vue/UiSeparator.vue +0 -7
  177. package/vue/UiSidebar.vue +3 -26
  178. package/vue/UiSiteHeader.vue +0 -24
  179. package/vue/UiSkeleton.vue +0 -9
  180. package/vue/UiStack.vue +6 -11
  181. package/vue/UiSwatch.vue +1 -6
  182. package/vue/UiSwitch.vue +1 -15
  183. package/vue/UiSwitcher.vue +1 -14
  184. package/vue/UiTabs.vue +1 -19
  185. package/vue/UiText.d.ts +2 -2
  186. package/vue/UiText.vue +29 -4
  187. package/vue/UiTextarea.vue +0 -50
  188. package/vue/UiToast.vue +26 -34
  189. package/vue/UiToastRegion.vue +26 -55
  190. package/vue/UiTooltip.vue +1 -43
  191. package/vue/UiTopBar.vue +1 -34
  192. package/vue/UiTree.vue +2 -17
  193. package/vue/UiTreeItem.vue +2 -28
  194. package/vue/chunks/UiActionBar.js +1 -1
  195. package/vue/chunks/UiAffordanceScope.js +1 -1
  196. package/vue/chunks/UiAvatar.js +1 -1
  197. package/vue/chunks/UiAvatarGroup.js +1 -1
  198. package/vue/chunks/UiBadge.js +4 -2
  199. package/vue/chunks/UiButton.js +4 -2
  200. package/vue/chunks/UiCallout.js +1 -1
  201. package/vue/chunks/UiCard.js +5 -3
  202. package/vue/chunks/UiCheckbox.js +1 -1
  203. package/vue/chunks/UiCluster.js +2 -2
  204. package/vue/chunks/UiCombobox.js +3 -3
  205. package/vue/chunks/UiContainer.js +2 -2
  206. package/vue/chunks/UiContextMenu.js +1 -1
  207. package/vue/chunks/UiDialog.js +1 -1
  208. package/vue/chunks/UiDisclosure.js +1 -1
  209. package/vue/chunks/UiEditorTableOverlay.js +1 -1
  210. package/vue/chunks/UiFloatingActionButton.js +1 -1
  211. package/vue/chunks/UiFormField.js +1 -1
  212. package/vue/chunks/UiGrid.js +2 -2
  213. package/vue/chunks/UiIcon.js +1 -1
  214. package/vue/chunks/UiIconButton.js +4 -2
  215. package/vue/chunks/UiInput.js +1 -1
  216. package/vue/chunks/UiInputGroup.js +1 -1
  217. package/vue/chunks/UiList.js +1 -1
  218. package/vue/chunks/UiListItem.js +1 -1
  219. package/vue/chunks/UiListbox.js +1 -1
  220. package/vue/chunks/UiMenu.js +1 -1
  221. package/vue/chunks/UiMenuItem.js +1 -1
  222. package/vue/chunks/UiMeter.js +4 -2
  223. package/vue/chunks/UiNavItem.js +1 -1
  224. package/vue/chunks/UiPopover.js +1 -1
  225. package/vue/chunks/UiRadio.js +1 -1
  226. package/vue/chunks/UiRadioGroup.js +1 -1
  227. package/vue/chunks/UiReel.js +2 -2
  228. package/vue/chunks/UiSearchResultRow.js +1 -1
  229. package/vue/chunks/UiSearchShell.js +1 -1
  230. package/vue/chunks/UiSelect.js +1 -1
  231. package/vue/chunks/UiSeparator.js +1 -1
  232. package/vue/chunks/UiSidebar.js +1 -1
  233. package/vue/chunks/UiSiteHeader.js +1 -1
  234. package/vue/chunks/UiSkeleton.js +1 -1
  235. package/vue/chunks/UiStack.js +3 -3
  236. package/vue/chunks/UiSwatch.js +1 -1
  237. package/vue/chunks/UiSwitch.js +1 -1
  238. package/vue/chunks/UiSwitcher.js +2 -2
  239. package/vue/chunks/UiTabs.js +1 -1
  240. package/vue/chunks/UiText.js +4 -2
  241. package/vue/chunks/UiTextarea.js +1 -1
  242. package/vue/chunks/UiToast.js +1 -1
  243. package/vue/chunks/UiToastRegion.js +1 -1
  244. package/vue/chunks/UiTooltip.js +1 -1
  245. package/vue/chunks/UiTopBar.js +1 -1
  246. package/vue/chunks/UiTree.js +1 -1
  247. package/vue/chunks/UiTreeItem.js +1 -1
  248. package/vue/components.css +581 -2017
  249. package/vue/editor/index.js +7 -1
package/vue/UiBadge.vue CHANGED
@@ -42,8 +42,17 @@ const propValidityContract = {
42
42
  required: false,
43
43
  target: { attribute: 'tone' },
44
44
  description:
45
- 'Which colour the badge speaks in. neutral is a quiet grey for plain labels; accent draws the eye in the accent colour; info, success, warning, and danger\n mark a status, so match the tone to what the badge says. For a category rather than a status, set the --ui-badge-color hook on the badge instead: any CSS\n colour, which overrides the tone.',
46
- values: ['neutral', 'accent', 'info', 'success', 'warning', 'danger'],
45
+ 'Which colour the badge speaks in. neutral is a quiet grey for plain labels; accent draws the eye in the accent colour; info, success, warning, and danger\n mark a status, so match the tone to what the badge says. For a category rather than a status, set the --ui-badge-color hook on the badge instead: any CSS\n colour, which overrides the tone. Supporting brand families use accent-secondary and accent-tertiary; their usable colors derive from the theme, and unset\n families follow the primary accent.',
46
+ values: [
47
+ 'neutral',
48
+ 'accent',
49
+ 'accent-secondary',
50
+ 'accent-tertiary',
51
+ 'info',
52
+ 'success',
53
+ 'warning',
54
+ 'danger',
55
+ ],
47
56
  default: 'neutral',
48
57
  },
49
58
  variant: {
@@ -62,7 +71,15 @@ const props = defineProps({
62
71
  size: { type: null as unknown as PropType<'xs' | 'sm' | 'md' | 'lg' | null> },
63
72
  tone: {
64
73
  type: null as unknown as PropType<
65
- 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger' | null
74
+ | 'neutral'
75
+ | 'accent'
76
+ | 'accent-secondary'
77
+ | 'accent-tertiary'
78
+ | 'info'
79
+ | 'success'
80
+ | 'warning'
81
+ | 'danger'
82
+ | null
66
83
  >,
67
84
  },
68
85
  variant: {
@@ -113,11 +130,25 @@ const checkedProps = computed(() => {
113
130
  props['size'],
114
131
  props[BINDING_INPUTS_PROP],
115
132
  ) as 'xs' | 'sm' | 'md' | 'lg',
116
- tone: propInputs.value<'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger' | null>(
117
- 'tone',
118
- props['tone'],
119
- props[BINDING_INPUTS_PROP],
120
- ) as 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger',
133
+ tone: propInputs.value<
134
+ | 'neutral'
135
+ | 'accent'
136
+ | 'accent-secondary'
137
+ | 'accent-tertiary'
138
+ | 'info'
139
+ | 'success'
140
+ | 'warning'
141
+ | 'danger'
142
+ | null
143
+ >('tone', props['tone'], props[BINDING_INPUTS_PROP]) as
144
+ | 'neutral'
145
+ | 'accent'
146
+ | 'accent-secondary'
147
+ | 'accent-tertiary'
148
+ | 'info'
149
+ | 'success'
150
+ | 'warning'
151
+ | 'danger',
121
152
  variant: propInputs.value<'solid' | 'subtle' | 'outline' | 'inverse' | 'overlay' | null>(
122
153
  'variant',
123
154
  props['variant'],
@@ -173,70 +204,8 @@ const hostState = computed(() =>
173
204
  </template>
174
205
 
175
206
  <style scoped>
176
- /* This component's hooks style the element they are set on, and never a nested one. */
177
- @property --ui-badge-border {
178
- syntax: "*";
179
- inherits: false;
180
- }
181
- @property --ui-badge-square-size {
182
- syntax: "*";
183
- inherits: false;
184
- }
185
- @property --ui-badge-circle-size {
186
- syntax: "*";
187
- inherits: false;
188
- }
189
- @property --ui-badge-circle-opacity {
190
- syntax: "*";
191
- inherits: false;
192
- }
193
- @property --ui-badge-dot-size {
194
- syntax: "*";
195
- inherits: false;
196
- }
197
- @property --ui-badge-color {
198
- syntax: "*";
199
- inherits: false;
200
- }
201
- @property --ui-badge-font-size {
202
- syntax: "*";
203
- inherits: false;
204
- }
205
- @property --ui-badge-font-weight {
206
- syntax: "*";
207
- inherits: false;
208
- }
209
- @property --ui-badge-line-height {
210
- syntax: "*";
211
- inherits: false;
212
- }
213
- @property --ui-badge-min-block-size {
214
- syntax: "*";
215
- inherits: false;
216
- }
217
- @property --ui-badge-padding-block {
218
- syntax: "*";
219
- inherits: false;
220
- }
221
- @property --ui-badge-padding-inline {
222
- syntax: "*";
223
- inherits: false;
224
- }
225
- @property --ui-badge-point {
226
- syntax: "*";
227
- inherits: false;
228
- }
229
- @property --ui-badge-surface {
230
- syntax: "*";
231
- inherits: false;
232
- }
233
- @property --ui-badge-text {
234
- syntax: "*";
235
- inherits: false;
236
- }
237
-
238
207
  /* A constrained badge keeps its surface intact and ellipsizes only its label. The full
239
- text stays in the DOM for accessible names and consumers' selected values. */
208
+ text stays in the DOM for accessible names and consumers' selected values. */
240
209
 
241
210
  /* Icon content has its own flex item so label ellipsis never clips its strokes. */
242
211
 
@@ -390,6 +359,40 @@ const hostState = computed(() =>
390
359
  line-height: var(--ui-badge-line-height, 1);
391
360
  }
392
361
 
362
+ :global(:scope[data-ui-badge-state~="tone=accent-secondary"]:where([data-hn-ui-badge])) {
363
+ --_badge-surface: var(--ui-accent-secondary-strong-surface, var(--ui-accent-secondary-solid));
364
+ --_badge-border: var(--ui-accent-secondary-strong-surface, var(--ui-accent-secondary-solid));
365
+ --_badge-text: var(--ui-accent-secondary-on-strong, var(--ui-text-on-accent));
366
+ }
367
+
368
+ :global(:scope[data-ui-badge-state~="tone=accent-tertiary"]:where([data-hn-ui-badge])) {
369
+ --_badge-surface: var(--ui-accent-tertiary-strong-surface, var(--ui-accent-tertiary-solid));
370
+ --_badge-border: var(--ui-accent-tertiary-strong-surface, var(--ui-accent-tertiary-solid));
371
+ --_badge-text: var(--ui-accent-tertiary-on-strong, var(--ui-text-on-accent));
372
+ }
373
+
374
+ :global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=accent-secondary"]:where([data-hn-ui-badge])) {
375
+ --_badge-surface: var(--ui-accent-secondary-soft);
376
+ --_badge-border: var(--ui-accent-secondary-soft-border);
377
+ --_badge-text: var(--ui-accent-secondary-subtle-text, var(--ui-accent-secondary-solid));
378
+ }
379
+
380
+ :global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=accent-tertiary"]:where([data-hn-ui-badge])) {
381
+ --_badge-surface: var(--ui-accent-tertiary-soft);
382
+ --_badge-border: var(--ui-accent-tertiary-soft-border);
383
+ --_badge-text: var(--ui-accent-tertiary-subtle-text, var(--ui-accent-tertiary-solid));
384
+ }
385
+
386
+ :global(:scope[data-ui-badge-state~="variant=outline"][data-ui-badge-state~="tone=accent-secondary"]:where([data-hn-ui-badge])) {
387
+ --_badge-border: var(--ui-accent-secondary-solid);
388
+ --_badge-text: var(--ui-accent-secondary-subtle-text, var(--ui-accent-secondary-solid));
389
+ }
390
+
391
+ :global(:scope[data-ui-badge-state~="variant=outline"][data-ui-badge-state~="tone=accent-tertiary"]:where([data-hn-ui-badge])) {
392
+ --_badge-border: var(--ui-accent-tertiary-solid);
393
+ --_badge-text: var(--ui-accent-tertiary-subtle-text, var(--ui-accent-tertiary-solid));
394
+ }
395
+
393
396
  :global(:scope[data-ui-badge-state~="tone=accent"]:where([data-hn-ui-badge])) {
394
397
  --_badge-surface: var(--ui-accent-strong-surface, var(--ui-accent-solid));
395
398
  --_badge-border: var(--ui-accent-strong-surface, var(--ui-accent-solid));
@@ -421,32 +424,32 @@ const hostState = computed(() =>
421
424
  }
422
425
 
423
426
  :global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=accent"]:where([data-hn-ui-badge])) {
424
- --_badge-surface: color-mix(in srgb, var(--ui-accent-solid) 19%, var(--ui-surface-default));
425
- --_badge-border: color-mix(in srgb, var(--ui-accent-solid) 25%, var(--ui-surface-default));
427
+ --_badge-surface: var(--ui-accent-soft);
428
+ --_badge-border: var(--ui-accent-soft-border);
426
429
  --_badge-text: var(--ui-accent-subtle-text, var(--ui-accent-solid));
427
430
  }
428
431
 
429
432
  :global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=danger"]:where([data-hn-ui-badge])) {
430
- --_badge-surface: color-mix(in srgb, var(--ui-danger-solid) 19%, var(--ui-surface-default));
431
- --_badge-border: color-mix(in srgb, var(--ui-danger-solid) 25%, var(--ui-surface-default));
433
+ --_badge-surface: var(--ui-danger-soft);
434
+ --_badge-border: var(--ui-danger-soft-border);
432
435
  --_badge-text: var(--ui-danger-subtle-text, var(--ui-danger-solid));
433
436
  }
434
437
 
435
438
  :global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=success"]:where([data-hn-ui-badge])) {
436
- --_badge-surface: color-mix(in srgb, var(--ui-success-solid) 19%, var(--ui-surface-default));
437
- --_badge-border: color-mix(in srgb, var(--ui-success-solid) 25%, var(--ui-surface-default));
439
+ --_badge-surface: var(--ui-success-soft);
440
+ --_badge-border: var(--ui-success-soft-border);
438
441
  --_badge-text: var(--ui-success-subtle-text, var(--ui-success-solid));
439
442
  }
440
443
 
441
444
  :global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=warning"]:where([data-hn-ui-badge])) {
442
- --_badge-surface: color-mix(in srgb, var(--ui-warning-solid) 19%, var(--ui-surface-default));
443
- --_badge-border: color-mix(in srgb, var(--ui-warning-solid) 25%, var(--ui-surface-default));
445
+ --_badge-surface: var(--ui-warning-soft);
446
+ --_badge-border: var(--ui-warning-soft-border);
444
447
  --_badge-text: var(--ui-warning-subtle-text, var(--ui-warning-solid));
445
448
  }
446
449
 
447
450
  :global(:scope[data-ui-badge-state~="variant=subtle"][data-ui-badge-state~="tone=info"]:where([data-hn-ui-badge])) {
448
- --_badge-surface: color-mix(in srgb, var(--ui-info-solid) 19%, var(--ui-surface-default));
449
- --_badge-border: color-mix(in srgb, var(--ui-info-solid) 25%, var(--ui-surface-default));
451
+ --_badge-surface: var(--ui-info-soft);
452
+ --_badge-border: var(--ui-info-soft-border);
450
453
  --_badge-text: var(--ui-info-subtle-text, var(--ui-info-solid));
451
454
  }
452
455
  :global(:scope[data-ui-badge-state~="variant=solid"]:where([data-hn-ui-badge])) {
package/vue/UiButton.d.ts CHANGED
@@ -60,7 +60,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
60
60
  type: PropType<string | null>;
61
61
  };
62
62
  tone: {
63
- type: PropType<"accent" | "neutral" | "danger" | "success" | "warning" | "info" | null>;
63
+ type: PropType<"accent" | "accent-secondary" | "accent-tertiary" | "neutral" | "danger" | "success" | "warning" | "info" | null>;
64
64
  };
65
65
  type: {
66
66
  type: PropType<"button" | "submit" | "reset" | null>;
@@ -109,7 +109,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
109
109
  type: PropType<string | null>;
110
110
  };
111
111
  tone: {
112
- type: PropType<"accent" | "neutral" | "danger" | "success" | "warning" | "info" | null>;
112
+ type: PropType<"accent" | "accent-secondary" | "accent-tertiary" | "neutral" | "danger" | "success" | "warning" | "info" | null>;
113
113
  };
114
114
  type: {
115
115
  type: PropType<"button" | "submit" | "reset" | null>;
package/vue/UiButton.vue CHANGED
@@ -134,8 +134,17 @@ const propValidityContract = {
134
134
  required: false,
135
135
  target: { attribute: 'tone' },
136
136
  description:
137
- 'Which colour the button speaks in. It applies to every variant, so an outline, a ghost, and a solid in the same tone are the same action at three volumes:\n tone="danger" variant="outline" is a destructive secondary action. neutral is the quiet one, for a button that should not claim a colour. The field\n variant always uses neutral field colors.',
138
- values: ['accent', 'neutral', 'danger', 'success', 'warning', 'info'],
137
+ 'Which colour the button speaks in. It applies to every variant, so an outline, a ghost, and a solid in the same tone are the same action at three volumes:\n tone="danger" variant="outline" is a destructive secondary action. neutral is the quiet one, for a button that should not claim a colour. The field\n variant always uses neutral field colors. Supporting brand families use accent-secondary and accent-tertiary; their usable colors derive from the theme,\n and unset families follow the primary accent.',
138
+ values: [
139
+ 'accent',
140
+ 'accent-secondary',
141
+ 'accent-tertiary',
142
+ 'neutral',
143
+ 'danger',
144
+ 'success',
145
+ 'warning',
146
+ 'info',
147
+ ],
139
148
  default: 'neutral',
140
149
  },
141
150
  type: {
@@ -177,7 +186,15 @@ const props = defineProps({
177
186
  target: { type: null as unknown as PropType<string | null> },
178
187
  tone: {
179
188
  type: null as unknown as PropType<
180
- 'accent' | 'neutral' | 'danger' | 'success' | 'warning' | 'info' | null
189
+ | 'accent'
190
+ | 'accent-secondary'
191
+ | 'accent-tertiary'
192
+ | 'neutral'
193
+ | 'danger'
194
+ | 'success'
195
+ | 'warning'
196
+ | 'info'
197
+ | null
181
198
  >,
182
199
  },
183
200
  type: { type: null as unknown as PropType<'button' | 'submit' | 'reset' | null> },
@@ -308,11 +325,25 @@ const checkedProps = computed(() => {
308
325
  props[BINDING_INPUTS_PROP],
309
326
  ) as boolean,
310
327
  target: propInputs.value<string | null>('target', props['target'], props[BINDING_INPUTS_PROP]),
311
- tone: propInputs.value<'accent' | 'neutral' | 'danger' | 'success' | 'warning' | 'info' | null>(
312
- 'tone',
313
- props['tone'],
314
- props[BINDING_INPUTS_PROP],
315
- ) as 'accent' | 'neutral' | 'danger' | 'success' | 'warning' | 'info',
328
+ tone: propInputs.value<
329
+ | 'accent'
330
+ | 'accent-secondary'
331
+ | 'accent-tertiary'
332
+ | 'neutral'
333
+ | 'danger'
334
+ | 'success'
335
+ | 'warning'
336
+ | 'info'
337
+ | null
338
+ >('tone', props['tone'], props[BINDING_INPUTS_PROP]) as
339
+ | 'accent'
340
+ | 'accent-secondary'
341
+ | 'accent-tertiary'
342
+ | 'neutral'
343
+ | 'danger'
344
+ | 'success'
345
+ | 'warning'
346
+ | 'info',
316
347
  type: propInputs.value<'button' | 'submit' | 'reset' | null>(
317
348
  'type',
318
349
  props['type'],
@@ -930,80 +961,6 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
930
961
  </template>
931
962
 
932
963
  <style scoped>
933
- /* This component's hooks style the element they are set on, and never a nested one. */
934
- @property --ui-button-active-surface {
935
- syntax: "*";
936
- inherits: false;
937
- }
938
- @property --ui-button-border {
939
- syntax: "*";
940
- inherits: false;
941
- }
942
- @property --ui-button-disabled-filter {
943
- syntax: "*";
944
- inherits: false;
945
- }
946
- @property --ui-button-disabled-opacity {
947
- syntax: "*";
948
- inherits: false;
949
- }
950
- @property --ui-button-ghost-active-surface {
951
- syntax: "*";
952
- inherits: false;
953
- }
954
- @property --ui-button-ghost-hover-surface {
955
- syntax: "*";
956
- inherits: false;
957
- }
958
- @property --ui-button-ghost-text {
959
- syntax: "*";
960
- inherits: false;
961
- }
962
- @property --ui-button-hover-border {
963
- syntax: "*";
964
- inherits: false;
965
- }
966
- @property --ui-button-hover-surface {
967
- syntax: "*";
968
- inherits: false;
969
- }
970
- @property --ui-button-link-hover-text {
971
- syntax: "*";
972
- inherits: false;
973
- }
974
- @property --ui-button-link-text {
975
- syntax: "*";
976
- inherits: false;
977
- }
978
- @property --ui-button-min-block-size {
979
- syntax: "*";
980
- inherits: false;
981
- }
982
- @property --ui-button-radius {
983
- syntax: "*";
984
- inherits: false;
985
- }
986
- @property --ui-button-shadow {
987
- syntax: "*";
988
- inherits: false;
989
- }
990
- @property --ui-button-solid-shadow {
991
- syntax: "*";
992
- inherits: false;
993
- }
994
- @property --ui-button-surface {
995
- syntax: "*";
996
- inherits: false;
997
- }
998
- @property --ui-button-text {
999
- syntax: "*";
1000
- inherits: false;
1001
- }
1002
- @property --ui-button-white-space {
1003
- syntax: "*";
1004
- inherits: false;
1005
- }
1006
-
1007
964
  /* An anchor keeps the boxed button look even when an app styles ordinary links. */
1008
965
 
1009
966
  /* A count is an adornment, not another line of label text. Keep the standard control height
@@ -1091,21 +1048,17 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1091
1048
  vertical-align: middle;
1092
1049
  color: var(--_tone-text);
1093
1050
  }
1094
-
1095
1051
  :global(:scope:dir(rtl):where([data-hn-ui-button])) {
1096
1052
  --_ui-action-start: -1px;
1097
1053
  }
1098
-
1099
1054
  :global(:scope[data-ui-button-state~="align=start"]:where([data-hn-ui-button])) {
1100
1055
  justify-content: flex-start !important;
1101
1056
  text-align: start;
1102
1057
  }
1103
-
1104
1058
  :global(:scope[data-ui-button-state~="stretch"]:where([data-hn-ui-button])) {
1105
1059
  display: flex !important;
1106
1060
  inline-size: 100%;
1107
1061
  }
1108
-
1109
1062
  :global(:scope:where([data-hn-ui-button])) {
1110
1063
  --_button-square-size: var(--ui-button-min-block-size, var(--ui-control-size-md));
1111
1064
  box-sizing: border-box !important;
@@ -1302,10 +1255,42 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1302
1255
  background-image: none;
1303
1256
  box-shadow: var(--ui-pressed);
1304
1257
  }
1258
+ :global(:scope[data-tone="accent-secondary"]:where([data-hn-ui-button])) {
1259
+ --_tone-border: var(--ui-accent-secondary-border, var(--ui-accent-secondary));
1260
+ --_tone-hover-border: var(--ui-accent-secondary-hover-border, var(--ui-accent-secondary-hover));
1261
+ --_tone-active-border: var(
1262
+ --ui-accent-secondary-active-border,
1263
+ var(--ui-accent-secondary-active)
1264
+ );
1265
+ --_tone-highlight: var(--ui-accent-secondary-highlight, none);
1266
+ --_tone-glow: var(--ui-accent-secondary-glow, 0 0 transparent);
1267
+ --_hue: var(--ui-accent-secondary);
1268
+ --_hue-hover: var(--ui-accent-secondary-hover);
1269
+ --_hue-active: var(--ui-accent-secondary-active);
1270
+ --_hue-text: var(--ui-accent-secondary-subtle-text);
1271
+ --_on-hue: var(--ui-accent-secondary-on-strong);
1272
+ }
1273
+
1274
+ :global(:scope[data-tone="accent-tertiary"]:where([data-hn-ui-button])) {
1275
+ --_tone-border: var(--ui-accent-tertiary-border, var(--ui-accent-tertiary));
1276
+ --_tone-hover-border: var(--ui-accent-tertiary-hover-border, var(--ui-accent-tertiary-hover));
1277
+ --_tone-active-border: var(
1278
+ --ui-accent-tertiary-active-border,
1279
+ var(--ui-accent-tertiary-active)
1280
+ );
1281
+ --_tone-highlight: var(--ui-accent-tertiary-highlight, none);
1282
+ --_tone-glow: var(--ui-accent-tertiary-glow, 0 0 transparent);
1283
+ --_hue: var(--ui-accent-tertiary);
1284
+ --_hue-hover: var(--ui-accent-tertiary-hover);
1285
+ --_hue-active: var(--ui-accent-tertiary-active);
1286
+ --_hue-text: var(--ui-accent-tertiary-subtle-text);
1287
+ --_on-hue: var(--ui-accent-tertiary-on-strong);
1288
+ }
1289
+
1305
1290
  :global(:scope[data-tone="neutral"]:where([data-hn-ui-button])) {
1306
- --_tone-border: var(--ui-neutral-border, var(--ui-neutral-surface));
1307
- --_tone-hover-border: var(--ui-neutral-hover-border, var(--ui-neutral-hover));
1308
- --_tone-active-border: var(--ui-neutral-active-border, var(--ui-neutral-active));
1291
+ --_tone-border: var(--ui-control-border, var(--ui-neutral-surface));
1292
+ --_tone-hover-border: var(--ui-control-border-hover, var(--ui-neutral-hover));
1293
+ --_tone-active-border: var(--ui-control-border-hover, var(--ui-neutral-active));
1309
1294
  --_tone-highlight: var(--ui-neutral-highlight, none);
1310
1295
  --_tone-glow: var(--ui-neutral-glow, 0 0 transparent);
1311
1296
  --_hue: var(--ui-text);
@@ -1318,24 +1303,20 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
1318
1303
  :global(:scope[data-tone="neutral"][data-appearance="solid"]:where([data-hn-ui-button])) {
1319
1304
  border-color: var(--ui-button-border, var(--_tone-border));
1320
1305
  background-color: var(--ui-button-surface, var(--ui-neutral-surface));
1306
+ box-shadow: var(--ui-button-solid-shadow, var(--ui-button-shadow, var(--ui-neutral-shadow)));
1321
1307
  color: var(--ui-button-text, var(--ui-text));
1322
1308
  }
1323
1309
  :global(:scope[data-tone="neutral"][data-appearance="outline"]:where([data-hn-ui-button])) {
1324
1310
  border-color: var(--ui-button-border, var(--ui-control-border));
1325
1311
  background-color: var(--ui-button-surface, transparent);
1312
+ box-shadow: var(--ui-button-shadow, var(--ui-neutral-shadow));
1326
1313
  }
1327
1314
  :global(:scope[data-tone="neutral"][data-appearance="outline"]:hover:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button])) {
1328
- border-color: var(
1329
- --ui-button-hover-border,
1330
- var(--ui-control-border-hover, var(--ui-control-border))
1331
- );
1315
+ border-color: var(--ui-button-hover-border, var(--ui-control-border-hover));
1332
1316
  background-color: var(--ui-button-hover-surface, var(--ui-neutral-hover));
1333
1317
  }
1334
1318
  :global(:scope[data-tone="neutral"][data-appearance="outline"]:active:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button])) {
1335
- border-color: var(
1336
- --ui-button-hover-border,
1337
- var(--ui-control-border-hover, var(--ui-control-border))
1338
- );
1319
+ border-color: var(--ui-button-hover-border, var(--ui-control-border-hover));
1339
1320
  background-color: var(--ui-button-active-surface, var(--ui-neutral-active));
1340
1321
  }
1341
1322
  :global(:scope[data-tone="neutral"][data-appearance="solid"]:hover:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button])) {
package/vue/UiCallout.vue CHANGED
@@ -266,52 +266,6 @@ const hostState = computed(() =>
266
266
  </template>
267
267
 
268
268
  <style scoped>
269
- /* This component's hooks style the element they are set on, and never a nested one. */
270
- @property --ui-callout-border {
271
- syntax: "*";
272
- inherits: false;
273
- }
274
- @property --ui-callout-border-width {
275
- syntax: "*";
276
- inherits: false;
277
- }
278
- @property --ui-callout-gap {
279
- syntax: "*";
280
- inherits: false;
281
- }
282
- @property --ui-callout-icon {
283
- syntax: "*";
284
- inherits: false;
285
- }
286
- @property --ui-callout-icon-column {
287
- syntax: "*";
288
- inherits: false;
289
- }
290
- @property --ui-callout-icon-size {
291
- syntax: "*";
292
- inherits: false;
293
- }
294
- @property --ui-callout-leading-border-width {
295
- syntax: "*";
296
- inherits: false;
297
- }
298
- @property --ui-callout-padding-block {
299
- syntax: "*";
300
- inherits: false;
301
- }
302
- @property --ui-callout-padding-inline {
303
- syntax: "*";
304
- inherits: false;
305
- }
306
- @property --ui-callout-surface {
307
- syntax: "*";
308
- inherits: false;
309
- }
310
- @property --ui-callout-text {
311
- syntax: "*";
312
- inherits: false;
313
- }
314
-
315
269
  /* One line box tall, so the icon centres on the first line of text. */
316
270
 
317
271
  /* A link in the callout's text is underlined, so it reads as a link by more than colour. */
@@ -320,20 +274,14 @@ const hostState = computed(() =>
320
274
 
321
275
  @scope (.ui-callout) to ([data-hn]) {
322
276
  :global(:scope:where([data-hn-ui-callout])) {
323
- /* Hooks do not inherit, so the parts below read them from the root. */
277
+ /* Resolve shared part values at the component root. */
324
278
  --_ui-callout-icon-column: var(--ui-callout-icon-column);
325
279
  --_ui-callout-icon: var(--ui-callout-icon);
326
280
  --_ui-callout-icon-size: var(--ui-callout-icon-size);
327
281
 
328
- /* Near white, sRGB retains more green chroma than blue/red; bound chroma by hue to avoid clipping. */
329
- --_callout-surface: light-dark(
330
- oklch(
331
- from var(--_callout-border)
332
- 96% min(c, calc(0.02 + 0.03 * max(0, cos(calc((h - 140) * 1deg)))))
333
- h
334
- ),
335
- oklch(from var(--_callout-border) 25% min(c, 0.035) h)
336
- );
282
+ --_callout-surface: var(--ui-info-soft);
283
+ --_callout-tone-text: var(--ui-info-subtle-text);
284
+ --_ui-surface-text: var(--ui-callout-text, var(--_callout-tone-text));
337
285
  --_ui-selection-context-surface: light-dark(
338
286
  oklch(
339
287
  from var(--ui-callout-surface, var(--_callout-surface))
@@ -364,8 +312,8 @@ const hostState = computed(() =>
364
312
  );
365
313
  --_ui-selection-context-text: var(--ui-text-primary);
366
314
 
367
- --_callout-border: var(--ui-info-solid);
368
- --_callout-icon: var(--ui-info-solid);
315
+ --_callout-border: var(--ui-info-soft-border);
316
+ --_callout-icon: var(--ui-info-subtle-text);
369
317
 
370
318
  display: grid !important;
371
319
  grid-template-columns: var(--ui-callout-icon-column, 1.125rem) minmax(0, 1fr);
@@ -376,14 +324,14 @@ const hostState = computed(() =>
376
324
  padding-inline-start: var(--ui-callout-padding-inline, var(--ui-space-2)) !important;
377
325
  padding-inline-end: var(--ui-callout-padding-inline, var(--ui-space-3)) !important;
378
326
  border: var(--ui-callout-border-width, var(--ui-border-width)) solid
379
- color-mix(in srgb, var(--ui-callout-border, var(--_callout-border)) 35%, transparent);
327
+ var(--ui-callout-border, var(--_callout-border));
380
328
  border-inline-start: var(
381
329
  --ui-callout-leading-border-width,
382
330
  var(--ui-callout-border-width, var(--ui-border-width))
383
- ) solid color-mix(in srgb, var(--ui-callout-border, var(--_callout-border)) 35%, transparent);
331
+ ) solid var(--ui-callout-border, var(--_callout-border));
384
332
  border-radius: var(--ui-radius-md);
385
333
  background: var(--ui-callout-surface, var(--_callout-surface));
386
- color: var(--ui-callout-text, var(--ui-text-primary));
334
+ color: var(--ui-callout-text, var(--_ui-surface-text));
387
335
  font-family: var(--ui-font-family-sans);
388
336
  font-size: var(--ui-font-size-sm);
389
337
  font-weight: var(--ui-font-normal);
@@ -417,34 +365,45 @@ const hostState = computed(() =>
417
365
  --_ui-selection-context-border: initial;
418
366
  --_ui-selection-context-text: initial;
419
367
  --_callout-surface: var(--ui-surface-muted);
368
+ --_callout-tone-text: var(--ui-text-primary);
420
369
  --_callout-border: var(--ui-border-strong);
421
370
  --_callout-icon: var(--ui-text-secondary);
422
371
  }
423
372
 
424
373
  :global(:scope[data-ui-callout-state~="tone=tip"]:where([data-hn-ui-callout])) {
425
- --_callout-border: var(--ui-success-solid);
426
- --_callout-icon: var(--ui-success-solid);
374
+ --_callout-border: var(--ui-success-soft-border);
375
+ --_callout-surface: var(--ui-success-soft);
376
+ --_callout-tone-text: var(--ui-success-subtle-text);
377
+ --_callout-icon: var(--ui-success-subtle-text);
427
378
  }
428
379
 
429
380
  :global(:scope[data-ui-callout-state~="tone=important"]:where([data-hn-ui-callout])) {
430
- --_callout-border: var(--ui-accent-solid);
431
- --_callout-icon: var(--ui-accent-solid);
381
+ --_callout-border: var(--ui-accent-soft-border);
382
+ --_callout-surface: var(--ui-accent-soft);
383
+ --_callout-tone-text: var(--ui-accent-subtle-text);
384
+ --_callout-icon: var(--ui-accent-subtle-text);
432
385
  }
433
386
 
434
387
  :global(:scope[data-ui-callout-state~="tone=warning"]:where([data-hn-ui-callout])) {
435
- --_callout-border: var(--ui-warning-solid);
436
- --_callout-icon: var(--ui-warning-solid);
388
+ --_callout-border: var(--ui-warning-soft-border);
389
+ --_callout-surface: var(--ui-warning-soft);
390
+ --_callout-tone-text: var(--ui-warning-subtle-text);
391
+ --_callout-icon: var(--ui-warning-subtle-text);
437
392
  }
438
393
 
439
394
  :global(:scope[data-ui-callout-state~="tone=success"]:where([data-hn-ui-callout])) {
440
- --_callout-border: var(--ui-success-solid);
441
- --_callout-icon: var(--ui-success-solid);
395
+ --_callout-border: var(--ui-success-soft-border);
396
+ --_callout-surface: var(--ui-success-soft);
397
+ --_callout-tone-text: var(--ui-success-subtle-text);
398
+ --_callout-icon: var(--ui-success-subtle-text);
442
399
  }
443
400
 
444
401
  :global(:scope[data-ui-callout-state~="tone=danger"]:where([data-hn-ui-callout])),
445
402
  :global(:scope[data-ui-callout-state~="tone=caution"]:where([data-hn-ui-callout])) {
446
- --_callout-border: var(--ui-danger-solid);
447
- --_callout-icon: var(--ui-danger-solid);
403
+ --_callout-border: var(--ui-danger-soft-border);
404
+ --_callout-surface: var(--ui-danger-soft);
405
+ --_callout-tone-text: var(--ui-danger-subtle-text);
406
+ --_callout-icon: var(--ui-danger-subtle-text);
448
407
  }
449
408
  :global(.content :where(:not([data-hn-ui-callout])):is(a)) {
450
409
  color: var(--ui-accent-subtle-text);
package/vue/UiCard.d.ts CHANGED
@@ -21,7 +21,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
21
21
  type: PropType<"content" | "sm" | "md" | "lg" | null>;
22
22
  };
23
23
  tone: {
24
- type: PropType<"neutral" | "accent" | "info" | "success" | "warning" | "danger" | null>;
24
+ type: PropType<"neutral" | "accent" | "accent-secondary" | "accent-tertiary" | "info" | "success" | "warning" | "danger" | null>;
25
25
  };
26
26
  treatment: {
27
27
  type: PropType<"standard" | "expressive" | null>;
@@ -43,7 +43,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
43
43
  type: PropType<"content" | "sm" | "md" | "lg" | null>;
44
44
  };
45
45
  tone: {
46
- type: PropType<"neutral" | "accent" | "info" | "success" | "warning" | "danger" | null>;
46
+ type: PropType<"neutral" | "accent" | "accent-secondary" | "accent-tertiary" | "info" | "success" | "warning" | "danger" | null>;
47
47
  };
48
48
  treatment: {
49
49
  type: PropType<"standard" | "expressive" | null>;