@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/UiCard.vue CHANGED
@@ -51,8 +51,17 @@ const propValidityContract = {
51
51
  required: false,
52
52
  target: { attribute: 'tone' },
53
53
  description:
54
- 'accent, info, success, warning and danger add a quiet semantic surface without changing card geometry. Row highlights follow the surface hue; action\n controls retain their own intent.',
55
- values: ['neutral', 'accent', 'info', 'success', 'warning', 'danger'],
54
+ 'accent, info, success, warning and danger add a quiet semantic surface without changing card geometry. Row highlights follow the surface hue; action\n controls retain their own intent. Supporting brand families use accent-secondary and accent-tertiary; their usable colors derive from the theme, and unset\n families follow the primary accent.',
55
+ values: [
56
+ 'neutral',
57
+ 'accent',
58
+ 'accent-secondary',
59
+ 'accent-tertiary',
60
+ 'info',
61
+ 'success',
62
+ 'warning',
63
+ 'danger',
64
+ ],
56
65
  default: 'neutral',
57
66
  },
58
67
  treatment: {
@@ -60,7 +69,7 @@ const propValidityContract = {
60
69
  required: false,
61
70
  target: { attribute: 'treatment' },
62
71
  description:
63
- 'How much of the theme\'s decorative material the surface expresses. standard preserves its restrained treatment; expressive uses the full material\n treatment. Its glass rim can transmit and frost the surrounding scene while content remains opaque. Surface separation controls the rim, independently of frosting. This does not add elevation or require glass.',
72
+ 'How much of the theme\'s decorative material the surface expresses. standard preserves its restrained treatment; expressive uses the full material\n treatment. Its glass rim can transmit and frost the surrounding scene while content remains opaque. Surface separation controls the rim, independently of\n frosting. This does not add elevation or require glass.',
64
73
  values: ['standard', 'expressive'],
65
74
  default: 'standard',
66
75
  },
@@ -81,7 +90,15 @@ const props = defineProps({
81
90
  size: { type: null as unknown as PropType<'content' | 'sm' | 'md' | 'lg' | null> },
82
91
  tone: {
83
92
  type: null as unknown as PropType<
84
- 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger' | null
93
+ | 'neutral'
94
+ | 'accent'
95
+ | 'accent-secondary'
96
+ | 'accent-tertiary'
97
+ | 'info'
98
+ | 'success'
99
+ | 'warning'
100
+ | 'danger'
101
+ | null
85
102
  >,
86
103
  },
87
104
  treatment: { type: null as unknown as PropType<'standard' | 'expressive' | null> },
@@ -142,11 +159,25 @@ const checkedProps = computed(() => {
142
159
  props['size'],
143
160
  props[BINDING_INPUTS_PROP],
144
161
  ) as 'content' | 'sm' | 'md' | 'lg',
145
- tone: propInputs.value<'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger' | null>(
146
- 'tone',
147
- props['tone'],
148
- props[BINDING_INPUTS_PROP],
149
- ) as 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger',
162
+ tone: propInputs.value<
163
+ | 'neutral'
164
+ | 'accent'
165
+ | 'accent-secondary'
166
+ | 'accent-tertiary'
167
+ | 'info'
168
+ | 'success'
169
+ | 'warning'
170
+ | 'danger'
171
+ | null
172
+ >('tone', props['tone'], props[BINDING_INPUTS_PROP]) as
173
+ | 'neutral'
174
+ | 'accent'
175
+ | 'accent-secondary'
176
+ | 'accent-tertiary'
177
+ | 'info'
178
+ | 'success'
179
+ | 'warning'
180
+ | 'danger',
150
181
  treatment: propInputs.value<'standard' | 'expressive' | null>(
151
182
  'treatment',
152
183
  props['treatment'],
@@ -288,6 +319,7 @@ const hostState = computed(() =>
288
319
  @scope (.ui-card) to ([data-hn]) {
289
320
  :global(:scope:where([data-hn-ui-card])) {
290
321
  --_ui-card-surface: var(--ui-surface-raised);
322
+ --_ui-surface-text: initial;
291
323
  --_ui-card-elevation: 0 0 0 transparent;
292
324
  --_ui-selection-context-surface: initial;
293
325
  --_ui-selection-context-border: initial;
@@ -301,7 +333,7 @@ const hostState = computed(() =>
301
333
  border: var(--ui-border-width) solid var(--ui-border-strong);
302
334
  border-radius: var(--ui-radius-lg);
303
335
  background: var(--_ui-card-surface);
304
- color: var(--ui-text-primary);
336
+ color: var(--_ui-surface-text, var(--ui-text-primary));
305
337
  }
306
338
 
307
339
  :global(:scope[data-ui-card-state~="padding=xs"]:where([data-hn-ui-card])) {
@@ -374,35 +406,54 @@ const hostState = computed(() =>
374
406
  }
375
407
  }
376
408
 
409
+ :global(:scope[data-ui-card-state~="tone=accent-secondary"]:where([data-hn-ui-card])) {
410
+ border-color: var(--ui-accent-secondary-soft-border);
411
+ --_ui-card-surface: var(--ui-accent-secondary-soft);
412
+ --_ui-surface-text: var(--ui-accent-secondary-subtle-text);
413
+ }
414
+
415
+ :global(:scope[data-ui-card-state~="tone=accent-tertiary"]:where([data-hn-ui-card])) {
416
+ border-color: var(--ui-accent-tertiary-soft-border);
417
+ --_ui-card-surface: var(--ui-accent-tertiary-soft);
418
+ --_ui-surface-text: var(--ui-accent-tertiary-subtle-text);
419
+ }
420
+
377
421
  :global(:scope[data-ui-card-state~="tone=accent"]:where([data-hn-ui-card])) {
378
- border-color: color-mix(in srgb, var(--ui-accent) 25%, var(--ui-border-default));
379
- --_ui-card-surface: color-mix(in srgb, var(--ui-accent) 6%, var(--ui-surface-default));
422
+ border-color: var(--ui-accent-soft-border);
423
+ --_ui-card-surface: var(--ui-accent-soft);
424
+ --_ui-surface-text: var(--ui-accent-subtle-text);
380
425
  }
381
426
 
382
427
  :global(:scope[data-ui-card-state~="tone=info"]:where([data-hn-ui-card])) {
383
- border-color: color-mix(in srgb, var(--ui-info) 25%, var(--ui-border-default));
384
- --_ui-card-surface: color-mix(in srgb, var(--ui-info) 6%, var(--ui-surface-default));
428
+ border-color: var(--ui-info-soft-border);
429
+ --_ui-card-surface: var(--ui-info-soft);
430
+ --_ui-surface-text: var(--ui-info-subtle-text);
385
431
  }
386
432
 
387
433
  :global(:scope[data-ui-card-state~="tone=success"]:where([data-hn-ui-card])) {
388
- border-color: color-mix(in srgb, var(--ui-success) 25%, var(--ui-border-default));
389
- --_ui-card-surface: color-mix(in srgb, var(--ui-success) 6%, var(--ui-surface-default));
434
+ border-color: var(--ui-success-soft-border);
435
+ --_ui-card-surface: var(--ui-success-soft);
436
+ --_ui-surface-text: var(--ui-success-subtle-text);
390
437
  }
391
438
 
392
439
  :global(:scope[data-ui-card-state~="tone=warning"]:where([data-hn-ui-card])) {
393
- border-color: color-mix(in srgb, var(--ui-warning) 25%, var(--ui-border-default));
394
- --_ui-card-surface: color-mix(in srgb, var(--ui-warning) 6%, var(--ui-surface-default));
440
+ border-color: var(--ui-warning-soft-border);
441
+ --_ui-card-surface: var(--ui-warning-soft);
442
+ --_ui-surface-text: var(--ui-warning-subtle-text);
395
443
  }
396
444
 
397
- :global(:scope[data-ui-card-state~="variant=subtle"]:is([data-ui-card-state~="tone=accent"], [data-ui-card-state~="tone=info"], [data-ui-card-state~="tone=success"], [data-ui-card-state~="tone=warning"]):where([data-hn-ui-card])) {
445
+ :global(:scope[data-ui-card-state~="variant=subtle"]:is([data-ui-card-state~="tone=accent"], [data-ui-card-state~="tone=accent-secondary"], [data-ui-card-state~="tone=accent-tertiary"], [data-ui-card-state~="tone=info"], [data-ui-card-state~="tone=success"], [data-ui-card-state~="tone=warning"]):where([data-hn-ui-card])) {
398
446
  border-color: transparent;
399
447
  }
400
448
 
401
449
  :global(:scope[data-ui-card-state~="tone=danger"]:where([data-hn-ui-card])) {
402
- border-color: color-mix(in srgb, var(--ui-danger) 45%, var(--ui-border-default));
450
+ border-color: var(--ui-danger-soft-border);
403
451
  --_ui-card-surface: var(--ui-danger-soft);
452
+ --_ui-surface-text: var(--ui-danger-subtle-text);
404
453
  }
405
454
  :global(:scope[data-ui-card-state~="tone=accent"]:where([data-hn-ui-card])),
455
+ :global(:scope[data-ui-card-state~="tone=accent-secondary"]:where([data-hn-ui-card])),
456
+ :global(:scope[data-ui-card-state~="tone=accent-tertiary"]:where([data-hn-ui-card])),
406
457
  :global(:scope[data-ui-card-state~="tone=info"]:where([data-hn-ui-card])),
407
458
  :global(:scope[data-ui-card-state~="tone=success"]:where([data-hn-ui-card])),
408
459
  :global(:scope[data-ui-card-state~="tone=warning"]:where([data-hn-ui-card])),
@@ -361,20 +361,6 @@ useComponentHost(() => import('../components/ui-checkbox/ui-checkbox.js'), {
361
361
  </template>
362
362
 
363
363
  <style scoped>
364
- /* This component's hooks style the element they are set on, and never a nested one. */
365
- @property --ui-checkbox-gap {
366
- syntax: "*";
367
- inherits: false;
368
- }
369
- @property --ui-checkbox-invalid-border {
370
- syntax: "*";
371
- inherits: false;
372
- }
373
- @property --ui-checkbox-size {
374
- syntax: "*";
375
- inherits: false;
376
- }
377
-
378
364
  /* The label, and under it an optional line saying what the choice means. */
379
365
 
380
366
  /* The SVG's painted bounds are centred in its viewBox, including its round stroke.
@@ -403,7 +389,7 @@ useComponentHost(() => import('../components/ui-checkbox/ui-checkbox.js'), {
403
389
 
404
390
  @scope (.ui-checkbox) to ([data-hn]) {
405
391
  :global(:scope:where([data-hn-ui-checkbox])) {
406
- /* Hooks do not inherit, so the parts below read them from the root. */
392
+ /* Resolve shared part values at the component root. */
407
393
  --_ui-checkbox-size: var(--ui-checkbox-size, var(--ui-choice-mark-size));
408
394
  --_ui-checkbox-invalid-border: var(
409
395
  --ui-checkbox-invalid-border,
package/vue/UiCluster.vue CHANGED
@@ -39,7 +39,7 @@ const propValidityContract = {
39
39
  required: false,
40
40
  target: { attribute: 'gap' },
41
41
  description:
42
- 'Space between items, on the spacing scale: xs is 0.5rem, s 0.75rem (also the default), m 1rem, l 1.5rem, and xl 2rem. The --ui-cluster-gap custom property,\n set on the cluster itself, overrides it; set on an ancestor, it does nothing.',
42
+ 'Space between items, on the spacing scale: xs is 0.5rem, s 0.75rem (also the default), m 1rem, l 1.5rem, and xl 2rem. The --ui-cluster-gap custom property,\n set on :root, an ancestor, or the component itself, overrides it.',
43
43
  values: ['xs', 's', 'm', 'l', 'xl'],
44
44
  },
45
45
  justify: {
@@ -222,14 +222,7 @@ const hostState = computed(() =>
222
222
  </template>
223
223
 
224
224
  <style scoped>
225
- /* This component's hooks style the element they are set on, and never a nested one. */
226
- @property --ui-cluster-gap {
227
- syntax: "*";
228
- inherits: false;
229
- }
230
-
231
225
  /* A component that sets its display still honours the hidden attribute on its root. */
232
-
233
226
  @scope (.ui-cluster) to ([data-hn]) {
234
227
  :global(:scope:where([data-hn-ui-cluster])) {
235
228
  --_layout-gap: var(--ui-space-3);
@@ -241,7 +234,6 @@ const hostState = computed(() =>
241
234
  max-inline-size: 100%;
242
235
  margin: 0 !important;
243
236
  }
244
-
245
237
  :global(:scope[data-ui-cluster-state~="fixed"]:where([data-hn-ui-cluster])) {
246
238
  flex: none;
247
239
  }
@@ -266,7 +258,6 @@ const hostState = computed(() =>
266
258
  :global(:scope[data-ui-cluster-state~="paddingEnd=xl"]:where([data-hn-ui-cluster])) {
267
259
  padding-inline-end: calc(var(--ui-space-4) * 4) !important;
268
260
  }
269
-
270
261
  :global(:scope[data-ui-cluster-state~="gap=xs"]:where([data-hn-ui-cluster])) {
271
262
  --_layout-gap: var(--ui-space-2);
272
263
  }
@@ -197,7 +197,7 @@ const propValidityContract = {
197
197
  required: false,
198
198
  target: { attribute: 'muted' },
199
199
  description:
200
- 'Shows the selected field value with supporting-text emphasis, for an inherited or default choice. Suggestions keep normal emphasis and the field stays interactive.',
200
+ 'Shows the selected field value with supporting-text emphasis, for an inherited or default choice. Suggestions keep normal emphasis and the field stays\n interactive.',
201
201
  default: false,
202
202
  },
203
203
  name: {
@@ -213,7 +213,7 @@ const propValidityContract = {
213
213
  required: false,
214
214
  target: { attribute: 'openonfocus' },
215
215
  description:
216
- 'Opens suggestions when the input receives focus or is clicked. A committed selection shows all choices until typing filters them; an explicitly supplied query keeps its filtering.',
216
+ 'Opens suggestions when the input receives focus or is clicked. A committed selection shows all choices until typing filters them; an explicitly supplied\n query keeps its filtering.',
217
217
  default: false,
218
218
  },
219
219
  placeholder: {
@@ -2071,73 +2071,8 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
2071
2071
  </template>
2072
2072
 
2073
2073
  <style scoped>
2074
- /* This component's hooks style the element they are set on, and never a nested one. */
2075
- @property --ui-combobox-affordance-text {
2076
- syntax: "*";
2077
- inherits: false;
2078
- }
2079
- @property --ui-combobox-item-input-min-inline-size {
2080
- syntax: "*";
2081
- inherits: false;
2082
- }
2083
- @property --ui-combobox-item-item-max-inline-size {
2084
- syntax: "*";
2085
- inherits: false;
2086
- }
2087
- @property --ui-combobox-item-min-block-size {
2088
- syntax: "*";
2089
- inherits: false;
2090
- }
2091
- @property --ui-combobox-label-font-size {
2092
- syntax: "*";
2093
- inherits: false;
2094
- }
2095
- @property --ui-combobox-label-text {
2096
- syntax: "*";
2097
- inherits: false;
2098
- }
2099
- @property --ui-combobox-max-block-size {
2100
- syntax: "*";
2101
- inherits: false;
2102
- }
2103
- @property --ui-combobox-message-text {
2104
- syntax: "*";
2105
- inherits: false;
2106
- }
2107
- @property --ui-combobox-option-check {
2108
- syntax: "*";
2109
- inherits: false;
2110
- }
2111
- @property --ui-combobox-option-text {
2112
- syntax: "*";
2113
- inherits: false;
2114
- }
2115
- @property --ui-combobox-radius {
2116
- syntax: "*";
2117
- inherits: false;
2118
- }
2119
- @property --ui-combobox-invalid-border {
2120
- syntax: "*";
2121
- inherits: false;
2122
- }
2123
- @property --ui-combobox-popup-surface {
2124
- syntax: "*";
2125
- inherits: false;
2126
- }
2127
- @property --ui-combobox-popup-border {
2128
- syntax: "*";
2129
- inherits: false;
2130
- }
2131
- @property --ui-combobox-popup-radius {
2132
- syntax: "*";
2133
- inherits: false;
2134
- }
2135
- @property --ui-combobox-popup-shadow {
2136
- syntax: "*";
2137
- inherits: false;
2138
- }
2139
2074
  /* The field and anything that annotates it sit on one row; the help button is beside the box,
2140
- not inside it, because a control's box holds its value. */
2075
+ not inside it, because a control's box holds its value. */
2141
2076
  /* A ghost icon button: the affordance is the mark, not a box around it. */
2142
2077
  /* A row with a tag or a description: the label and its tag on one line, the description under them. */
2143
2078
 
@@ -2150,7 +2085,7 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
2150
2085
 
2151
2086
  @scope (.ui-combobox) to ([data-hn]) {
2152
2087
  :global(:scope:where([data-hn-ui-combobox])) {
2153
- /* Hooks do not inherit, so the parts below read them from the root. */
2088
+ /* Resolve shared part values at the component root. */
2154
2089
  --_ui-combobox-label-text: var(--ui-combobox-label-text);
2155
2090
  --_ui-combobox-label-font-size: var(--ui-combobox-label-font-size);
2156
2091
  --_ui-combobox-affordance-text: var(--ui-combobox-affordance-text);
@@ -2177,7 +2112,10 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
2177
2112
  }
2178
2113
  :global(label:where([data-hn-ui-combobox])) {
2179
2114
  color: var(--_ui-combobox-label-text, var(--ui-text-primary));
2180
- font-size: var(--_ui-combobox-label-font-size, var(--ui-font-size-sm));
2115
+ font-size: var(
2116
+ --_ui-combobox-label-font-size,
2117
+ var(--ui-field-label-font-size, var(--ui-font-size-md))
2118
+ );
2181
2119
  font-weight: 500;
2182
2120
  }
2183
2121
  :global(.control:where([data-hn-ui-combobox])) {
@@ -2510,7 +2448,7 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
2510
2448
 
2511
2449
  @scope ([data-slotted~="ui-combobox"]:not([data-hn])) to ([data-hn], [data-slotted]) {
2512
2450
  :global(:where(.ui-combobox):where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-combobox"]))):where([data-hn-ui-combobox])) {
2513
- /* Hooks do not inherit, so the parts below read them from the root. */
2451
+ /* Resolve shared part values at the component root. */
2514
2452
  --_ui-combobox-label-text: var(--ui-combobox-label-text);
2515
2453
  --_ui-combobox-label-font-size: var(--ui-combobox-label-font-size);
2516
2454
  --_ui-combobox-affordance-text: var(--ui-combobox-affordance-text);
@@ -2537,7 +2475,10 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
2537
2475
  }
2538
2476
  :global(label:where(:scope, :scope *):where([data-hn-ui-combobox])) {
2539
2477
  color: var(--_ui-combobox-label-text, var(--ui-text-primary));
2540
- font-size: var(--_ui-combobox-label-font-size, var(--ui-font-size-sm));
2478
+ font-size: var(
2479
+ --_ui-combobox-label-font-size,
2480
+ var(--ui-field-label-font-size, var(--ui-font-size-md))
2481
+ );
2541
2482
  font-weight: 500;
2542
2483
  }
2543
2484
  :global(.control:where(:scope, :scope *):where([data-hn-ui-combobox])) {
@@ -40,7 +40,7 @@ const propValidityContract = {
40
40
  required: false,
41
41
  target: { attribute: 'measure' },
42
42
  description:
43
- 'The container\'s maximum width, in characters of the current font: narrow is 45ch, wide is 80ch, and unset is 65ch, a comfortable reading line. The\n container centres itself when its parent is wider. The --ui-container-measure custom property, set on the container itself, overrides it; set on an\n ancestor, it does nothing.',
43
+ 'The container\'s maximum width, in characters of the current font: narrow is 45ch, wide is 80ch, and unset is 65ch, a comfortable reading line. The\n container centres itself when its parent is wider. The --ui-container-measure custom property, set on :root, an ancestor, or the container itself,\n overrides it.',
44
44
  values: ['narrow', 'wide'],
45
45
  },
46
46
  },
@@ -136,18 +136,7 @@ const hostState = computed(() =>
136
136
  </template>
137
137
 
138
138
  <style scoped>
139
- /* This component's hooks style the element they are set on, and never a nested one. */
140
- @property --ui-container-gutters {
141
- syntax: "*";
142
- inherits: false;
143
- }
144
- @property --ui-container-measure {
145
- syntax: "*";
146
- inherits: false;
147
- }
148
-
149
139
  /* A component that sets its display still honours the hidden attribute on its root. */
150
-
151
140
  @scope (.ui-container) to ([data-hn]) {
152
141
  :global(:scope:where([data-hn-ui-container])) {
153
142
  --_container-measure: 65ch;
@@ -158,7 +147,6 @@ const hostState = computed(() =>
158
147
  margin-inline: auto !important;
159
148
  padding-inline: var(--ui-container-gutters, var(--_container-gutters)) !important;
160
149
  }
161
-
162
150
  :global(:scope[data-ui-container-state~="measure=narrow"]:where([data-hn-ui-container])) {
163
151
  --_container-measure: 45ch;
164
152
  }
@@ -213,33 +213,10 @@ useComponentHost(() => import('../components/ui-context-menu/ui-context-menu.js'
213
213
  </template>
214
214
 
215
215
  <style scoped>
216
- /* This component's hooks style the element they are set on, and never a nested one. */
217
- @property --ui-context-menu-surface {
218
- syntax: "*";
219
- inherits: false;
220
- }
221
- @property --ui-context-menu-border {
222
- syntax: "*";
223
- inherits: false;
224
- }
225
- @property --ui-context-menu-radius {
226
- syntax: "*";
227
- inherits: false;
228
- }
229
- @property --ui-context-menu-shadow {
230
- syntax: "*";
231
- inherits: false;
232
- }
233
- @property --ui-context-menu-z-index {
234
- syntax: "*";
235
- inherits: false;
236
- }
237
-
238
216
  /* A component that sets its display still honours the hidden attribute on its root. */
239
-
240
217
  @scope (.ui-context-menu) to ([data-hn]) {
241
218
  :global(:scope:where([data-hn-ui-context-menu])) {
242
- /* Hooks do not inherit, so the parts below read them from the root. */
219
+ /* Resolve shared part values at the component root. */
243
220
  --_ui-context-menu-surface: var(--ui-context-menu-surface);
244
221
  --_ui-context-menu-border: var(--ui-context-menu-border);
245
222
  --_ui-context-menu-radius: var(--ui-context-menu-radius);
@@ -248,7 +225,6 @@ useComponentHost(() => import('../components/ui-context-menu/ui-context-menu.js'
248
225
 
249
226
  display: contents !important;
250
227
  }
251
-
252
228
  :global(.menu:where([data-hn-ui-context-menu])) {
253
229
  position: fixed;
254
230
  inset: auto;
@@ -280,7 +256,6 @@ useComponentHost(() => import('../components/ui-context-menu/ui-context-menu.js'
280
256
  display var(--ui-motion-fast) allow-discrete,
281
257
  overlay var(--ui-motion-fast) allow-discrete;
282
258
  }
283
-
284
259
  :global(.menu hr:where([data-hn-ui-context-menu])) {
285
260
  align-self: stretch;
286
261
  block-size: 0;
@@ -288,24 +263,20 @@ useComponentHost(() => import('../components/ui-context-menu/ui-context-menu.js'
288
263
  border: 0;
289
264
  border-block-start: var(--ui-border-width) solid var(--ui-border-divider);
290
265
  }
291
-
292
266
  :global(.menu:popover-open:where([data-hn-ui-context-menu])) {
293
267
  opacity: 1;
294
268
  transform: translateY(0) scale(1);
295
269
  }
296
-
297
270
  @starting-style {
298
271
  :global(.menu:popover-open:where([data-hn-ui-context-menu])) {
299
272
  opacity: 0;
300
273
  transform: translateY(-4px) scale(0.99);
301
274
  }
302
275
  }
303
-
304
276
  :global(.menu[hidden]:where([data-hn-ui-context-menu])),
305
277
  :global(.menu[popover]:not(:popover-open):where([data-hn-ui-context-menu])) {
306
278
  display: none !important;
307
279
  }
308
-
309
280
  @media (prefers-reduced-motion: reduce) {
310
281
  :global(.menu:where([data-hn-ui-context-menu])) {
311
282
  transition: none;
package/vue/UiDialog.vue CHANGED
@@ -341,38 +341,8 @@ useComponentHost(() => import('../components/ui-dialog/ui-dialog.js'), {
341
341
  </template>
342
342
 
343
343
  <style scoped>
344
- /* This component's hooks style the element they are set on, and never a nested one. */
345
- @property --ui-dialog-duration {
346
- syntax: "*";
347
- inherits: false;
348
- }
349
- @property --ui-dialog-surface {
350
- syntax: "*";
351
- inherits: false;
352
- }
353
- @property --ui-dialog-border {
354
- syntax: "*";
355
- inherits: false;
356
- }
357
- @property --ui-dialog-radius {
358
- syntax: "*";
359
- inherits: false;
360
- }
361
- @property --ui-dialog-shadow {
362
- syntax: "*";
363
- inherits: false;
364
- }
365
- @property --ui-dialog-max-width {
366
- syntax: "*";
367
- inherits: false;
368
- }
369
- @property --ui-dialog-viewport-gap {
370
- syntax: "*";
371
- inherits: false;
372
- }
373
-
374
344
  /* Purpose and measured size shape one shared separation lever. The content plane stays opaque;
375
- transparency, frosting and edge light belong to the surrounding decorative material. */
345
+ transparency, frosting and edge light belong to the surrounding decorative material. */
376
346
 
377
347
  /* Own the layout wrapper; nested component roots are outside these scoped rules. */
378
348
 
@@ -396,7 +366,7 @@ useComponentHost(() => import('../components/ui-dialog/ui-dialog.js'), {
396
366
  @scope (.ui-dialog) to ([data-hn]) {
397
367
  :global(:scope:where([data-hn-ui-dialog])) {
398
368
  --_ui-material-scale: 1;
399
- /* Hooks do not inherit, so the parts below read them from the root. */
369
+ /* Resolve shared part values at the component root. */
400
370
  --_ui-dialog-duration: var(--ui-dialog-duration);
401
371
 
402
372
  position: fixed;
@@ -619,7 +589,7 @@ useComponentHost(() => import('../components/ui-dialog/ui-dialog.js'), {
619
589
  @scope ([data-slotted~="ui-dialog"]:not([data-hn])) to ([data-hn], [data-slotted]) {
620
590
  :global(:where(.ui-dialog):where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-dialog"]))):where([data-hn-ui-dialog])) {
621
591
  --_ui-material-scale: 1;
622
- /* Hooks do not inherit, so the parts below read them from the root. */
592
+ /* Resolve shared part values at the component root. */
623
593
  --_ui-dialog-duration: var(--ui-dialog-duration);
624
594
 
625
595
  position: fixed;
@@ -405,20 +405,6 @@ useComponentHost(() => import('../components/ui-disclosure/ui-disclosure.js'), {
405
405
  </template>
406
406
 
407
407
  <style scoped>
408
- /* This component's hooks style the element they are set on, and never a nested one. */
409
- @property --ui-disclosure-trigger-min-block-size {
410
- syntax: "*";
411
- inherits: false;
412
- }
413
- @property --ui-disclosure-trigger-padding-block {
414
- syntax: "*";
415
- inherits: false;
416
- }
417
- @property --ui-disclosure-trigger-padding-inline {
418
- syntax: "*";
419
- inherits: false;
420
- }
421
-
422
408
  /* Density resolves into the summary row's own values; the public tokens still override them. */
423
409
 
424
410
  /* An accordion row, not a field: no enclosing box, just a divider, so it never reads as a
@@ -431,7 +417,7 @@ useComponentHost(() => import('../components/ui-disclosure/ui-disclosure.js'), {
431
417
 
432
418
  @scope (.ui-disclosure) to ([data-hn]) {
433
419
  :global(:scope:where([data-hn-ui-disclosure])) {
434
- /* Hooks do not inherit, so the parts below read them from the root. */
420
+ /* Resolve shared part values at the component root. */
435
421
  --_ui-disclosure-trigger-min-block-size: var(--ui-disclosure-trigger-min-block-size);
436
422
  --_ui-disclosure-trigger-padding-block: var(--ui-disclosure-trigger-padding-block);
437
423
  --_ui-disclosure-trigger-padding-inline: var(--ui-disclosure-trigger-padding-inline);
@@ -893,7 +893,7 @@ useComponentHost(() => import('../components/ui-editor-table-overlay/ui-editor-t
893
893
  height: var(--ui-affordance-guide-size);
894
894
  border-radius: var(--ui-radius-round);
895
895
  background: var(--ui-affordance-guide-color, var(--ui-border-strong));
896
- opacity: calc(var(--ui-affordance-guide-opacity) * var(--ui-affordance-scope-guide, 1));
896
+ opacity: calc(var(--ui-affordance-guide-opacity) * var(--_ui-affordance-scope-guide, 1));
897
897
  transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
898
898
  }
899
899
  :global(.control.row .guide) {
@@ -973,7 +973,7 @@ useComponentHost(() => import('../components/ui-editor-table-overlay/ui-editor-t
973
973
  inset: 50% auto auto 50%;
974
974
  border-radius: var(--ui-radius-round);
975
975
  background: var(--ui-affordance-guide-color, var(--ui-border-strong));
976
- opacity: calc(var(--ui-affordance-guide-opacity) * var(--ui-affordance-scope-guide, 1));
976
+ opacity: calc(var(--ui-affordance-guide-opacity) * var(--_ui-affordance-scope-guide, 1));
977
977
  transform: translate(-50%, -50%);
978
978
  transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
979
979
  pointer-events: none;
@@ -132,22 +132,7 @@ const hostState = computed(() =>
132
132
  </template>
133
133
 
134
134
  <style scoped>
135
- /* This component's hooks style the element they are set on, and never a nested one. */
136
- @property --ui-floating-action-button-inset-block-end {
137
- syntax: "*";
138
- inherits: false;
139
- }
140
- @property --ui-floating-action-button-inset-inline-end {
141
- syntax: "*";
142
- inherits: false;
143
- }
144
- @property --ui-floating-action-button-z-index {
145
- syntax: "*";
146
- inherits: false;
147
- }
148
-
149
135
  /* A component that sets its display still honours the hidden attribute on its root. */
150
-
151
136
  @scope (.ui-floating-action-button) to ([data-hn]) {
152
137
  :global(:scope:where([data-hn-ui-floating-action-button])) {
153
138
  position: fixed;
@@ -164,7 +149,6 @@ const hostState = computed(() =>
164
149
  display: inline-flex !important;
165
150
  z-index: var(--ui-floating-action-button-z-index, 100);
166
151
  }
167
-
168
152
  :global(:scope:where([data-hn-ui-floating-action-button])) {
169
153
  appearance: none;
170
154
  border: none;
@@ -183,34 +167,28 @@ const hostState = computed(() =>
183
167
  transform var(--ui-motion-fast) var(--ui-motion-ease),
184
168
  box-shadow var(--ui-motion-fast) var(--ui-motion-ease);
185
169
  }
186
-
187
170
  :global(:scope:hover:enabled:where([data-hn-ui-floating-action-button])) {
188
171
  background: var(--ui-accent-hover);
189
172
  box-shadow: 0 6px 16px color-mix(in srgb, var(--ui-accent) 50%, transparent);
190
173
  }
191
-
192
174
  :global(:scope:active:enabled:where([data-hn-ui-floating-action-button])) {
193
175
  transform: scale(0.94);
194
176
  }
195
-
196
177
  :global(:scope:focus-visible:where([data-hn-ui-floating-action-button])) {
197
178
  outline: var(--ui-focus-width) solid var(--ui-focus-ring);
198
179
  outline-offset: var(--ui-focus-width);
199
180
  }
200
-
201
181
  :global(:scope:disabled:where([data-hn-ui-floating-action-button])) {
202
182
  background: var(--ui-disabled-surface);
203
183
  color: var(--ui-disabled-text);
204
184
  box-shadow: none;
205
185
  cursor: not-allowed;
206
186
  }
207
-
208
187
  :global(:where(:not([data-hn-ui-floating-action-button])):is(svg)) {
209
188
  inline-size: var(--ui-icon-size-lg);
210
189
  block-size: var(--ui-icon-size-lg);
211
190
  flex-shrink: 0;
212
191
  }
213
-
214
192
  @media (min-width: 768px) {
215
193
  :global(:scope[data-ui-floating-action-button-state~="mobileOnly"]:where([data-hn-ui-floating-action-button])) {
216
194
  display: none !important;