@threadlabs/looma 0.42.0 → 0.43.1

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 (272) 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 +47 -21
  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-mention-menu/ui-editor-mention-menu.js +3 -0
  17. package/components/ui-editor-slash-menu/ui-editor-slash-menu.js +4 -0
  18. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +3 -2
  19. package/components/ui-floating-action-button/ui-floating-action-button.html +0 -14
  20. package/components/ui-form-field/ui-form-field.html +2 -32
  21. package/components/ui-grid/ui-grid.html +1 -11
  22. package/components/ui-icon/ui-icon.html +1 -12
  23. package/components/ui-icon-button/ui-icon-button.html +52 -87
  24. package/components/ui-input/ui-input.html +5 -55
  25. package/components/ui-input-group/ui-input-group.html +1 -13
  26. package/components/ui-list/ui-list.html +0 -10
  27. package/components/ui-list-item/ui-list-item.html +1 -19
  28. package/components/ui-listbox/ui-listbox.html +0 -21
  29. package/components/ui-menu/ui-menu.html +0 -22
  30. package/components/ui-menu-item/ui-menu-item.html +0 -26
  31. package/components/ui-meter/ui-meter.html +11 -6
  32. package/components/ui-nav-item/ui-nav-item.html +0 -18
  33. package/components/ui-popover/ui-popover.html +0 -30
  34. package/components/ui-radio/ui-radio.html +7 -13
  35. package/components/ui-radio-group/ui-radio-group.html +0 -5
  36. package/components/ui-reel/ui-reel.html +1 -11
  37. package/components/ui-search-result-row/ui-search-result-row.html +0 -34
  38. package/components/ui-search-shell/ui-search-shell.html +1 -43
  39. package/components/ui-select/ui-select.html +0 -42
  40. package/components/ui-separator/ui-separator.html +0 -6
  41. package/components/ui-sidebar/ui-sidebar.html +2 -24
  42. package/components/ui-site-header/ui-site-header.html +0 -25
  43. package/components/ui-skeleton/ui-skeleton.html +0 -9
  44. package/components/ui-stack/ui-stack.html +6 -11
  45. package/components/ui-swatch/ui-swatch.html +0 -5
  46. package/components/ui-switch/ui-switch.html +1 -15
  47. package/components/ui-switcher/ui-switcher.html +1 -11
  48. package/components/ui-tabs/ui-tabs.html +1 -19
  49. package/components/ui-text/ui-text.html +19 -6
  50. package/components/ui-textarea/ui-textarea.html +0 -50
  51. package/components/ui-toast/ui-toast.html +12 -27
  52. package/components/ui-toast-region/ui-toast-region.html +13 -34
  53. package/components/ui-tooltip/ui-tooltip.html +1 -43
  54. package/components/ui-top-bar/ui-top-bar.html +1 -31
  55. package/components/ui-tree/ui-tree.html +1 -16
  56. package/components/ui-tree-item/ui-tree-item.html +1 -23
  57. package/components/ui-tree-item/ui-tree-item.js +0 -1
  58. package/dist/index.js +1 -1
  59. package/docs/README.md +13 -11
  60. package/docs/card.html +2 -6
  61. package/docs/card.js +7 -37
  62. package/docs/catalog.json +821 -202
  63. package/docs/catalog.mjs +1 -1
  64. package/docs/customizer-render.mjs +27 -14
  65. package/docs/customizer.js +42 -9
  66. package/docs/documentation.css +3 -7
  67. package/docs/examples/ui-button/examples/08-loading.behavior.js +1 -1
  68. package/docs/examples/ui-checkbox/examples/02-checked-indeterminate-and-disabled.behavior.js +1 -1
  69. package/docs/examples/ui-editor-mention-menu/examples/00-preview.behavior.js +1 -0
  70. package/docs/examples/ui-editor-slash-menu/examples/00-preview.behavior.js +81 -0
  71. package/docs/examples/ui-editor-table-overlay/examples/00-preview.behavior.js +24 -0
  72. package/docs/examples/ui-search-shell/examples/00-preview.behavior.js +14 -0
  73. package/docs/examples/ui-search-shell/examples/02-label-dismissible-status-and-footer.behavior.js +7 -7
  74. package/docs/examples/ui-toast/examples/01-authored.behavior.js +2 -2
  75. package/docs/index.d.ts +1 -1
  76. package/docs/local-server.mjs +2 -5
  77. package/docs/palette.mjs +5 -4
  78. package/docs/pastoral.svg +54 -0
  79. package/docs/portrait.svg +15 -0
  80. package/docs/render.mjs +33 -3
  81. package/docs/site.mjs +22 -54
  82. package/docs/theme.mjs +97 -35
  83. package/docs/value-editors.mjs +2 -1
  84. package/package.json +2 -2
  85. package/styles/ui-action-bar.css +3 -11
  86. package/styles/ui-affordance-scope.css +4 -4
  87. package/styles/ui-avatar-group.css +3 -15
  88. package/styles/ui-avatar.css +2 -26
  89. package/styles/ui-badge.css +56 -80
  90. package/styles/ui-button.css +35 -83
  91. package/styles/ui-callout.css +32 -72
  92. package/styles/ui-card.css +42 -18
  93. package/styles/ui-checkbox.css +3 -19
  94. package/styles/ui-cluster.css +2 -10
  95. package/styles/ui-combobox.css +7 -140
  96. package/styles/ui-container.css +2 -14
  97. package/styles/ui-context-menu.css +3 -27
  98. package/styles/ui-dialog.css +5 -67
  99. package/styles/ui-disclosure.css +3 -19
  100. package/styles/ui-editor-table-overlay.css +2 -2
  101. package/styles/ui-floating-action-button.css +2 -18
  102. package/styles/ui-form-field.css +4 -36
  103. package/styles/ui-grid.css +2 -14
  104. package/styles/ui-icon-button.css +51 -89
  105. package/styles/ui-icon.css +3 -16
  106. package/styles/ui-input-group.css +2 -14
  107. package/styles/ui-input.css +6 -57
  108. package/styles/ui-list-item.css +3 -23
  109. package/styles/ui-list.css +2 -14
  110. package/styles/ui-listbox.css +2 -44
  111. package/styles/ui-menu-item.css +2 -30
  112. package/styles/ui-menu.css +2 -26
  113. package/styles/ui-meter.css +8 -4
  114. package/styles/ui-nav-item.css +2 -22
  115. package/styles/ui-popover.css +2 -34
  116. package/styles/ui-radio-group.css +1 -6
  117. package/styles/ui-radio.css +9 -17
  118. package/styles/ui-reel.css +2 -14
  119. package/styles/ui-search-result-row.css +2 -38
  120. package/styles/ui-search-shell.css +3 -47
  121. package/styles/ui-select.css +2 -46
  122. package/styles/ui-separator.css +2 -10
  123. package/styles/ui-sidebar.css +4 -28
  124. package/styles/ui-site-header.css +1 -26
  125. package/styles/ui-skeleton.css +2 -12
  126. package/styles/ui-stack.css +4 -12
  127. package/styles/ui-swatch.css +1 -6
  128. package/styles/ui-switch.css +3 -19
  129. package/styles/ui-switcher.css +2 -14
  130. package/styles/ui-tabs.css +3 -23
  131. package/styles/ui-text.css +10 -2
  132. package/styles/ui-textarea.css +2 -54
  133. package/styles/ui-toast-region.css +29 -73
  134. package/styles/ui-toast.css +24 -54
  135. package/styles/ui-tooltip.css +3 -47
  136. package/styles/ui-top-bar.css +3 -35
  137. package/styles/ui-tree-item.css +5 -51
  138. package/styles/ui-tree.css +3 -20
  139. package/theme-system.css +6 -2
  140. package/tokens.css +55 -21
  141. package/vanilla/UiBadge.d.ts +1 -1
  142. package/vanilla/UiBadge.js +1 -1
  143. package/vanilla/UiButton.d.ts +1 -1
  144. package/vanilla/UiButton.js +1 -1
  145. package/vanilla/UiCard.d.ts +1 -1
  146. package/vanilla/UiCard.js +1 -1
  147. package/vanilla/UiEditorTableOverlay.js +50 -36
  148. package/vanilla/UiIconButton.d.ts +1 -1
  149. package/vanilla/UiIconButton.js +1 -1
  150. package/vanilla/UiMeter.d.ts +1 -1
  151. package/vanilla/UiMeter.js +1 -1
  152. package/vanilla/UiStack.js +1 -1
  153. package/vanilla/UiText.d.ts +1 -1
  154. package/vanilla/UiText.js +1 -1
  155. package/vue/UiActionBar.vue +3 -9
  156. package/vue/UiAffordanceScope.vue +4 -4
  157. package/vue/UiAvatar.vue +1 -28
  158. package/vue/UiAvatarGroup.vue +1 -11
  159. package/vue/UiBadge.d.ts +2 -2
  160. package/vue/UiBadge.vue +84 -81
  161. package/vue/UiButton.d.ts +2 -2
  162. package/vue/UiButton.vue +78 -97
  163. package/vue/UiCallout.vue +30 -71
  164. package/vue/UiCard.d.ts +2 -2
  165. package/vue/UiCard.vue +77 -26
  166. package/vue/UiCheckbox.vue +1 -15
  167. package/vue/UiCluster.vue +1 -10
  168. package/vue/UiCombobox.vue +13 -72
  169. package/vue/UiContainer.vue +1 -13
  170. package/vue/UiContextMenu.vue +1 -30
  171. package/vue/UiDialog.vue +3 -33
  172. package/vue/UiDisclosure.vue +1 -15
  173. package/vue/UiEditorTableOverlay.d.ts +11 -1
  174. package/vue/UiEditorTableOverlay.vue +100 -65
  175. package/vue/UiFloatingActionButton.vue +0 -22
  176. package/vue/UiFormField.vue +6 -33
  177. package/vue/UiGrid.vue +1 -13
  178. package/vue/UiIcon.vue +1 -16
  179. package/vue/UiIconButton.d.ts +2 -2
  180. package/vue/UiIconButton.vue +103 -99
  181. package/vue/UiInput.vue +1 -54
  182. package/vue/UiInputGroup.vue +8 -20
  183. package/vue/UiList.vue +2 -12
  184. package/vue/UiListItem.vue +8 -26
  185. package/vue/UiListbox.vue +0 -23
  186. package/vue/UiMenu.vue +1 -23
  187. package/vue/UiMenuItem.vue +0 -26
  188. package/vue/UiMeter.d.ts +2 -2
  189. package/vue/UiMeter.vue +47 -12
  190. package/vue/UiNavItem.vue +3 -21
  191. package/vue/UiPopover.vue +1 -32
  192. package/vue/UiRadio.vue +1 -11
  193. package/vue/UiRadioGroup.vue +0 -11
  194. package/vue/UiReel.vue +1 -11
  195. package/vue/UiSearchResultRow.vue +0 -35
  196. package/vue/UiSearchShell.vue +1 -53
  197. package/vue/UiSelect.vue +0 -42
  198. package/vue/UiSeparator.vue +0 -7
  199. package/vue/UiSidebar.vue +3 -26
  200. package/vue/UiSiteHeader.vue +0 -24
  201. package/vue/UiSkeleton.vue +0 -9
  202. package/vue/UiStack.vue +6 -11
  203. package/vue/UiSwatch.vue +1 -6
  204. package/vue/UiSwitch.vue +1 -15
  205. package/vue/UiSwitcher.vue +1 -14
  206. package/vue/UiTabs.vue +1 -19
  207. package/vue/UiText.d.ts +2 -2
  208. package/vue/UiText.vue +29 -4
  209. package/vue/UiTextarea.vue +0 -50
  210. package/vue/UiToast.vue +26 -34
  211. package/vue/UiToastRegion.vue +26 -55
  212. package/vue/UiTooltip.vue +1 -43
  213. package/vue/UiTopBar.vue +1 -34
  214. package/vue/UiTree.vue +2 -17
  215. package/vue/UiTreeItem.vue +2 -28
  216. package/vue/chunks/UiActionBar.js +1 -1
  217. package/vue/chunks/UiAffordanceScope.js +1 -1
  218. package/vue/chunks/UiAvatar.js +1 -1
  219. package/vue/chunks/UiAvatarGroup.js +1 -1
  220. package/vue/chunks/UiBadge.js +4 -2
  221. package/vue/chunks/UiButton.js +4 -2
  222. package/vue/chunks/UiCallout.js +1 -1
  223. package/vue/chunks/UiCard.js +5 -3
  224. package/vue/chunks/UiCheckbox.js +1 -1
  225. package/vue/chunks/UiCluster.js +2 -2
  226. package/vue/chunks/UiCombobox.js +3 -3
  227. package/vue/chunks/UiContainer.js +2 -2
  228. package/vue/chunks/UiContextMenu.js +1 -1
  229. package/vue/chunks/UiDialog.js +1 -1
  230. package/vue/chunks/UiDisclosure.js +1 -1
  231. package/vue/chunks/UiEditorTableOverlay.js +41 -13
  232. package/vue/chunks/UiFloatingActionButton.js +1 -1
  233. package/vue/chunks/UiFormField.js +1 -1
  234. package/vue/chunks/UiGrid.js +2 -2
  235. package/vue/chunks/UiIcon.js +1 -1
  236. package/vue/chunks/UiIconButton.js +4 -2
  237. package/vue/chunks/UiInput.js +1 -1
  238. package/vue/chunks/UiInputGroup.js +1 -1
  239. package/vue/chunks/UiList.js +1 -1
  240. package/vue/chunks/UiListItem.js +1 -1
  241. package/vue/chunks/UiListbox.js +1 -1
  242. package/vue/chunks/UiMenu.js +1 -1
  243. package/vue/chunks/UiMenuItem.js +1 -1
  244. package/vue/chunks/UiMeter.js +4 -2
  245. package/vue/chunks/UiNavItem.js +1 -1
  246. package/vue/chunks/UiPopover.js +1 -1
  247. package/vue/chunks/UiRadio.js +1 -1
  248. package/vue/chunks/UiRadioGroup.js +1 -1
  249. package/vue/chunks/UiReel.js +2 -2
  250. package/vue/chunks/UiSearchResultRow.js +1 -1
  251. package/vue/chunks/UiSearchShell.js +1 -1
  252. package/vue/chunks/UiSelect.js +1 -1
  253. package/vue/chunks/UiSeparator.js +1 -1
  254. package/vue/chunks/UiSidebar.js +1 -1
  255. package/vue/chunks/UiSiteHeader.js +1 -1
  256. package/vue/chunks/UiSkeleton.js +1 -1
  257. package/vue/chunks/UiStack.js +3 -3
  258. package/vue/chunks/UiSwatch.js +1 -1
  259. package/vue/chunks/UiSwitch.js +1 -1
  260. package/vue/chunks/UiSwitcher.js +2 -2
  261. package/vue/chunks/UiTabs.js +1 -1
  262. package/vue/chunks/UiText.js +4 -2
  263. package/vue/chunks/UiTextarea.js +1 -1
  264. package/vue/chunks/UiToast.js +1 -1
  265. package/vue/chunks/UiToastRegion.js +1 -1
  266. package/vue/chunks/UiTooltip.js +1 -1
  267. package/vue/chunks/UiTopBar.js +1 -1
  268. package/vue/chunks/UiTree.js +1 -1
  269. package/vue/chunks/UiTreeItem.js +1 -1
  270. package/vue/components.css +633 -2068
  271. package/vue/editor/index.js +7 -1
  272. package/docs/preview.js +0 -22
@@ -22,10 +22,11 @@
22
22
  <prop name="variant" type="keyword" values="ghost, outline, solid" default="ghost"
23
23
  >Emphasis. ghost shows only the icon until it is hovered, for toolbars and dense rows; outline adds a border on the default surface; solid fills with its
24
24
  chosen tone.</prop>
25
- <prop name="tone" type="keyword" values="accent, neutral, danger, success, warning, info" default="neutral"
25
+ <prop name="tone" type="keyword" values="accent, accent-secondary, accent-tertiary, neutral, danger, success, warning, info" default="neutral"
26
26
  >Colour for every variant. The default neutral shares the quiet control family with fields and text buttons. Choose accent explicitly for a coloured action,
27
27
  or primary for solid accent. danger, success, warning and info share Button's intent colors. Native aria-pressed="true" keeps an outline toggle visibly
28
- pressed; the consumer owns that state.</prop>
28
+ pressed; the consumer owns that state. Supporting brand families use accent-secondary and accent-tertiary; their usable colors derive from the theme, and
29
+ unset families follow the primary accent.</prop>
29
30
  <prop name="anticipatory" type="boolean" default="false"
30
31
  >Keeps the button out of sight until it is wanted: at rest a fine pointer sees only a small guide dot, and the button appears on hover, on focus, or when
31
32
  the pointer comes near inside a ui-affordance-scope. Touch devices and the solid variant always show it.</prop>
@@ -51,84 +52,6 @@
51
52
  <span class="content"><slot></slot></span>
52
53
  </button>
53
54
  <style>
54
- /* This component's hooks style the element they are set on, and never a nested one. */
55
- @property --ui-icon-button-active-scale {
56
- syntax: "*";
57
- inherits: false;
58
- }
59
- @property --ui-icon-button-active-surface {
60
- syntax: "*";
61
- inherits: false;
62
- }
63
- @property --ui-icon-button-border {
64
- syntax: "*";
65
- inherits: false;
66
- }
67
- @property --ui-icon-button-disabled-filter {
68
- syntax: "*";
69
- inherits: false;
70
- }
71
- @property --ui-icon-button-disabled-opacity {
72
- syntax: "*";
73
- inherits: false;
74
- }
75
- @property --ui-icon-button-hover-border {
76
- syntax: "*";
77
- inherits: false;
78
- }
79
- @property --ui-icon-button-hover-surface {
80
- syntax: "*";
81
- inherits: false;
82
- }
83
- @property --ui-icon-button-hover-text {
84
- syntax: "*";
85
- inherits: false;
86
- }
87
- @property --ui-icon-button-icon-size {
88
- syntax: "*";
89
- inherits: false;
90
- }
91
- @property --ui-icon-button-icon-stroke-width {
92
- syntax: "*";
93
- inherits: false;
94
- }
95
- @property --ui-icon-button-outline-surface {
96
- syntax: "*";
97
- inherits: false;
98
- }
99
- @property --ui-icon-button-outline-text {
100
- syntax: "*";
101
- inherits: false;
102
- }
103
- @property --ui-icon-button-radius {
104
- syntax: "*";
105
- inherits: false;
106
- }
107
- @property --ui-icon-button-size {
108
- syntax: "*";
109
- inherits: false;
110
- }
111
- @property --ui-icon-button-solid-hover-surface {
112
- syntax: "*";
113
- inherits: false;
114
- }
115
- @property --ui-icon-button-solid-shadow {
116
- syntax: "*";
117
- inherits: false;
118
- }
119
- @property --ui-icon-button-solid-surface {
120
- syntax: "*";
121
- inherits: false;
122
- }
123
- @property --ui-icon-button-solid-text {
124
- syntax: "*";
125
- inherits: false;
126
- }
127
- @property --ui-icon-button-surface {
128
- syntax: "*";
129
- inherits: false;
130
- }
131
-
132
55
  :host {
133
56
  /* Optional inherited action-group values keep text and icon actions under the same light.
134
57
  One fine top/start highlight follows the bottom/end lowlight at a joined action seam.
@@ -146,7 +69,7 @@
146
69
  inset calc(-1 * var(--_ui-action-start)) -1px 0 light-dark(rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.08))
147
70
  );
148
71
  --_ui-action-shadow: var(--_ui-action-edge), 0 1px 2px light-dark(rgb(0 0 0 / 0.10), rgb(0 0 0 / 0.20));
149
- /* Hooks do not inherit, so the parts below read them from the root. */
72
+ /* Resolve shared part values at the component root. */
150
73
  --_ui-icon-button-icon-size: var(--ui-icon-button-icon-size);
151
74
  --_ui-icon-button-icon-stroke-width: var(--ui-icon-button-icon-stroke-width);
152
75
 
@@ -158,6 +81,40 @@
158
81
  --_ui-action-start: -1px;
159
82
  }
160
83
 
84
+ :host[data-tone="accent-secondary"] {
85
+ --_solid-border: var(--ui-accent-secondary-border, var(--ui-accent-secondary));
86
+ --_solid-hover-border: var(--ui-accent-secondary-hover-border, var(--ui-accent-secondary-hover));
87
+ --_solid-active-border: var(--ui-accent-secondary-active-border, var(--ui-accent-secondary-active));
88
+ --_solid-active-surface: var(--ui-accent-secondary-active, var(--ui-accent-secondary-hover));
89
+ --_tone-highlight: var(--ui-accent-secondary-highlight, none);
90
+ --_tone-glow: var(--ui-accent-secondary-glow, 0 0 transparent);
91
+ --_icon-button-border: var(--ui-accent-secondary-subtle-text);
92
+ --_icon-button-hover-border: var(--ui-accent-secondary-subtle-text);
93
+ --_icon-button-text: var(--ui-accent-secondary-subtle-text, var(--ui-accent-secondary-solid));
94
+ --_icon-button-outline-surface: color-mix(in srgb, var(--ui-accent-secondary-solid) 5%, var(--ui-surface-default));
95
+ --_icon-button-solid-surface: var(--ui-accent-secondary);
96
+ --_icon-button-solid-hover-surface: var(--ui-accent-secondary-hover);
97
+ --_icon-button-solid-text: var(--ui-on-accent-secondary);
98
+ color: var(--_icon-button-text);
99
+ }
100
+
101
+ :host[data-tone="accent-tertiary"] {
102
+ --_solid-border: var(--ui-accent-tertiary-border, var(--ui-accent-tertiary));
103
+ --_solid-hover-border: var(--ui-accent-tertiary-hover-border, var(--ui-accent-tertiary-hover));
104
+ --_solid-active-border: var(--ui-accent-tertiary-active-border, var(--ui-accent-tertiary-active));
105
+ --_solid-active-surface: var(--ui-accent-tertiary-active, var(--ui-accent-tertiary-hover));
106
+ --_tone-highlight: var(--ui-accent-tertiary-highlight, none);
107
+ --_tone-glow: var(--ui-accent-tertiary-glow, 0 0 transparent);
108
+ --_icon-button-border: var(--ui-accent-tertiary-subtle-text);
109
+ --_icon-button-hover-border: var(--ui-accent-tertiary-subtle-text);
110
+ --_icon-button-text: var(--ui-accent-tertiary-subtle-text, var(--ui-accent-tertiary-solid));
111
+ --_icon-button-outline-surface: color-mix(in srgb, var(--ui-accent-tertiary-solid) 5%, var(--ui-surface-default));
112
+ --_icon-button-solid-surface: var(--ui-accent-tertiary);
113
+ --_icon-button-solid-hover-surface: var(--ui-accent-tertiary-hover);
114
+ --_icon-button-solid-text: var(--ui-on-accent-tertiary);
115
+ color: var(--_icon-button-text);
116
+ }
117
+
161
118
  :host[data-tone="accent"] {
162
119
  --_solid-border: var(--ui-accent-border, var(--ui-accent));
163
120
  --_solid-hover-border: var(--ui-accent-hover-border, var(--ui-accent-hover));
@@ -240,17 +197,17 @@
240
197
  color: var(--_icon-button-text);
241
198
  }
242
199
 
243
- /* Neutral actions share the same quiet surface and border roles as fields. */
200
+ /* Neutral actions and form fields share the control boundary. */
244
201
  :host[data-tone="neutral"] {
245
- --_solid-border: var(--ui-neutral-border, var(--ui-neutral-surface));
246
- --_solid-hover-border: var(--ui-neutral-hover-border, var(--ui-neutral-hover));
247
- --_solid-active-border: var(--ui-neutral-active-border, var(--ui-neutral-active));
202
+ --_solid-border: var(--ui-control-border, var(--ui-neutral-surface));
203
+ --_solid-hover-border: var(--ui-control-border-hover, var(--ui-neutral-hover));
204
+ --_solid-active-border: var(--ui-control-border-hover, var(--ui-neutral-active));
248
205
  --_solid-active-surface: var(--ui-neutral-active, var(--ui-neutral-hover));
249
206
  --_tone-highlight: var(--ui-neutral-highlight, none);
250
207
  --_tone-glow: var(--ui-neutral-glow, 0 0 transparent);
251
208
  --_icon-button-outline-surface: transparent;
252
209
  --_icon-button-border: var(--ui-control-border);
253
- --_icon-button-hover-border: var(--ui-control-border-hover, var(--ui-control-border));
210
+ --_icon-button-hover-border: var(--ui-control-border-hover);
254
211
  --_icon-button-text: var(--ui-text);
255
212
  --_icon-button-solid-surface: var(--ui-neutral-surface);
256
213
  --_icon-button-solid-hover-surface: var(--ui-neutral-hover);
@@ -270,7 +227,7 @@
270
227
  block-size: var(--ui-affordance-guide-size);
271
228
  border-radius: var(--ui-radius-round);
272
229
  background: var(--ui-affordance-guide-color, var(--ui-border-strong));
273
- opacity: calc(var(--ui-affordance-guide-opacity) * var(--ui-affordance-scope-guide, 1));
230
+ opacity: calc(var(--ui-affordance-guide-opacity) * var(--_ui-affordance-scope-guide, 1));
274
231
  transform: translate(-50%, -50%);
275
232
  transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
276
233
  pointer-events: none;
@@ -431,6 +388,14 @@
431
388
  var(--_tone-glow);
432
389
  }
433
390
 
391
+ :host[data-tone="neutral"][data-appearance="outline"] {
392
+ box-shadow: var(--ui-neutral-shadow);
393
+ }
394
+ :host[data-tone="neutral"][data-appearance="solid"] {
395
+ border-color: var(--ui-icon-button-border, var(--ui-control-border));
396
+ box-shadow: var(--ui-icon-button-solid-shadow, var(--ui-neutral-shadow));
397
+ }
398
+
434
399
  :host:hover:enabled:not([aria-disabled="true"]) {
435
400
  /* Derived from the text colour so the ghost hover shows on any background. */
436
401
  background-color: var(--ui-icon-button-hover-surface, color-mix(in srgb, currentColor 8%, transparent));
@@ -40,60 +40,7 @@
40
40
  </defs>
41
41
  <input from:type="$type" from:value="$value" from:disabled="$disabled" from:readonly="$readonly" from:required="$required" from:aria-invalid="$invalid">
42
42
  <style>
43
- /* This component's hooks style the element they are set on, and never a nested one. An Input
44
- Group sets --_ui-default-input-* for the input inside it, below the input's own hooks. */
45
- @property --ui-input-border {
46
- syntax: "*";
47
- inherits: false;
48
- }
49
- @property --ui-input-border-hover {
50
- syntax: "*";
51
- inherits: false;
52
- }
53
- @property --ui-input-border-width {
54
- syntax: "*";
55
- inherits: false;
56
- }
57
- @property --ui-input-focus-border {
58
- syntax: "*";
59
- inherits: false;
60
- }
61
- @property --ui-input-focus-outline {
62
- syntax: "*";
63
- inherits: false;
64
- }
65
- @property --ui-input-focus-shadow {
66
- syntax: "*";
67
- inherits: false;
68
- }
69
- @property --ui-input-inline-size {
70
- syntax: "*";
71
- inherits: false;
72
- }
73
- @property --ui-input-invalid-border {
74
- syntax: "*";
75
- inherits: false;
76
- }
77
- @property --ui-input-invalid-focus-shadow {
78
- syntax: "*";
79
- inherits: false;
80
- }
81
- @property --ui-input-min-block-size {
82
- syntax: "*";
83
- inherits: false;
84
- }
85
- @property --ui-input-radius {
86
- syntax: "*";
87
- inherits: false;
88
- }
89
- @property --ui-input-shadow {
90
- syntax: "*";
91
- inherits: false;
92
- }
93
- @property --ui-input-surface {
94
- syntax: "*";
95
- inherits: false;
96
- }
43
+ /* An Input Group sets --_ui-default-input-* for the input inside it, below the input's own hooks. */
97
44
  /* Normalize a unitless zero border to a length before the box calculation. */
98
45
  @property --_ui-input-stroke {
99
46
  syntax: "<length>";
@@ -131,7 +78,10 @@
131
78
 
132
79
  /* Cap Safari's excess text metrics without changing native date, file, color or range widgets. */
133
80
  :host:is([type="text"], [type="search"], [type="tel"], [type="url"], [type="email"], [type="password"], [type="number"]) {
134
- max-block-size: max(calc(var(--_ui-input-size) - var(--_ui-default-input-frame-width, 0px)), calc(1em * var(--ui-line-height-tight) + 2 * var(--_ui-input-inset-block) + 2 * var(--_ui-input-stroke)));
81
+ max-block-size: max(
82
+ calc(var(--_ui-input-size) - var(--_ui-default-input-frame-width, 0px)),
83
+ calc(1em * var(--ui-line-height-tight) + 2 * var(--_ui-input-inset-block) + 2 * var(--_ui-input-stroke))
84
+ );
135
85
  }
136
86
 
137
87
  /* Each size reads the hook and then an Input Group's default first, so a group, which draws the frame, can zero it. */
@@ -18,18 +18,6 @@
18
18
  <span class="action"><slot name="action"></slot></span>
19
19
  </div>
20
20
  <style>
21
- @property --ui-input-group-radius {
22
- syntax: "*";
23
- inherits: false;
24
- }
25
- @property --ui-input-group-invalid-border {
26
- syntax: "*";
27
- inherits: false;
28
- }
29
- @property --ui-input-group-invalid-focus-shadow {
30
- syntax: "*";
31
- inherits: false;
32
- }
33
21
  /* An input with fixed text before or after it, such as a domain after a site's name
34
22
  ("acme" + ".example.com") or slashes around a path. The group draws the field's border and
35
23
  focus ring around the input and its affixes together; the input inside drops its own through
@@ -40,7 +28,7 @@
40
28
  and not the form's. */
41
29
  :host {
42
30
  /* The group's own border and height stand for the input's, so the group is a lone Input's height.
43
- Hooks do not inherit, so these are defaults for the input; its own hooks still win. */
31
+ These are defaults for the input; public hooks still win. */
44
32
  --_ui-default-input-border-width: 0;
45
33
  --_ui-default-input-min-block-size: 0;
46
34
  --_ui-default-input-frame-width: calc(2 * var(--ui-border-width));
@@ -15,16 +15,6 @@
15
15
  <ul $else role="list"><slot></slot></ul>
16
16
  </template>
17
17
  <style>
18
- /* This component's hooks style the element they are set on, and never a nested one. */
19
- @property --ui-list-gap {
20
- syntax: "*";
21
- inherits: false;
22
- }
23
- @property --ui-list-min-item-width {
24
- syntax: "*";
25
- inherits: false;
26
- }
27
-
28
18
  /* A list of native li elements or structured ui-list-item components. It owns the spacing between them, so a view never sets it. The
29
19
  explicit list role keeps the list announced as one: some browsers drop it from a list with no
30
20
  markers. */
@@ -27,24 +27,6 @@
27
27
  <span class="trailing"><slot name="trailing"></slot></span>
28
28
  </li>
29
29
  <style>
30
- /* This component's hooks style the element they are set on, and never a nested one. */
31
- @property --ui-list-item-gap {
32
- syntax: "*";
33
- inherits: false;
34
- }
35
- @property --ui-list-item-icon-size {
36
- syntax: "*";
37
- inherits: false;
38
- }
39
- @property --ui-list-item-padding-block {
40
- syntax: "*";
41
- inherits: false;
42
- }
43
- @property --ui-list-item-padding-inline {
44
- syntax: "*";
45
- inherits: false;
46
- }
47
-
48
30
  /* One entry in a list: something to recognise (leading, usually an icon), its name (the default
49
31
  slot), one line about it (description), and what it offers (trailing, such as a button or a
50
32
  badge). The title and description are one line each and end in an ellipsis, so every item in a
@@ -55,7 +37,7 @@
55
37
  a router, a modified click, and "open in new tab" all work. Trailing controls sit above it and
56
38
  stay their own. */
57
39
  :host {
58
- /* Hooks do not inherit, so the parts below read them from the root. */
40
+ /* Resolve shared part values at the component root. */
59
41
  --_ui-list-item-icon-size: var(--ui-list-item-icon-size);
60
42
 
61
43
  position: relative;
@@ -78,27 +78,6 @@
78
78
  >
79
79
  </div>
80
80
  <style>
81
- @property --ui-listbox-radius {
82
- syntax: "*";
83
- inherits: false;
84
- }
85
- @property --ui-listbox-border {
86
- syntax: "*";
87
- inherits: false;
88
- }
89
- @property --ui-listbox-surface {
90
- syntax: "*";
91
- inherits: false;
92
- }
93
- @property --ui-listbox-focus-shadow {
94
- syntax: "*";
95
- inherits: false;
96
- }
97
- @property --ui-listbox-invalid-border {
98
- syntax: "*";
99
- inherits: false;
100
- }
101
-
102
81
  :host {
103
82
  position: relative;
104
83
  box-sizing: border-box !important;
@@ -33,28 +33,6 @@
33
33
  </defs>
34
34
  <div role="menu" aria-orientation="vertical"><div class="surface"><slot></slot></div></div>
35
35
  <style>
36
- /* This component's hooks style the element they are set on, and never a nested one. */
37
- @property --ui-menu-surface {
38
- syntax: "*";
39
- inherits: false;
40
- }
41
- @property --ui-menu-border {
42
- syntax: "*";
43
- inherits: false;
44
- }
45
- @property --ui-menu-radius {
46
- syntax: "*";
47
- inherits: false;
48
- }
49
- @property --ui-menu-shadow {
50
- syntax: "*";
51
- inherits: false;
52
- }
53
- @property --ui-menu-viewport-gap {
54
- syntax: "*";
55
- inherits: false;
56
- }
57
-
58
36
  /* Compact sets its items' defaults, so nothing has to rescale a global; an item's own hooks
59
37
  still win. */
60
38
  :host([density="compact"]) {
@@ -49,32 +49,6 @@
49
49
  </div>
50
50
  </template>
51
51
  <style>
52
- /* This component's hooks style the element they are set on, and never a nested one. */
53
- @property --ui-menu-item-font-size {
54
- syntax: "*";
55
- inherits: false;
56
- }
57
- @property --ui-menu-item-hover-surface {
58
- syntax: "*";
59
- inherits: false;
60
- }
61
- @property --ui-menu-item-min-block-size {
62
- syntax: "*";
63
- inherits: false;
64
- }
65
- @property --ui-menu-item-padding-block {
66
- syntax: "*";
67
- inherits: false;
68
- }
69
- @property --ui-menu-item-padding-inline {
70
- syntax: "*";
71
- inherits: false;
72
- }
73
- @property --ui-menu-item-radius {
74
- syntax: "*";
75
- inherits: false;
76
- }
77
-
78
52
  :host {
79
53
  display: flex !important;
80
54
  align-items: center !important;
@@ -17,10 +17,11 @@
17
17
  <prop name="max" type="number" default="1"
18
18
  >The value of a full bar, as on a native meter: 1 for a fraction, or the whole amount (a total, a count of items) with value as the part of it. Must be
19
19
  above 0; otherwise the bar is empty.</prop>
20
- <prop name="tone" type="keyword" values="neutral, accent, info, success, warning, danger" default="neutral"
20
+ <prop name="tone" type="keyword" values="neutral, accent, accent-secondary, accent-tertiary, info, success, warning, danger" default="neutral"
21
21
  >Which colour the filled part speaks in, as on Badge: neutral is a quiet grey, accent draws the eye, and info, success, warning, and danger mark a state
22
22
  (such as nothing yet, partial, complete, or needs attention). Colour alone says nothing to assistive technology or in forced colours, so say the state in
23
- valueText or in text beside the meter too.</prop>
23
+ valueText or in text beside the meter too. Supporting brand families use accent-secondary and accent-tertiary; their usable colors derive from the theme,
24
+ and unset families follow the primary accent.</prop>
24
25
  <prop name="size" type="keyword" values="sm, md" default="md"
25
26
  >Thickness. sm is a thin bar that sits in a line of text, such as a table cell beside an amount; md stands on its own.</prop>
26
27
  <prop name="segments" type="number" default="0"
@@ -62,10 +63,6 @@
62
63
  /* How far along something is: a track, filled from the start in the tone's colour. The track is a
63
64
  quiet border colour, so an empty meter still shows; every tone's fill keeps 3:1 against the
64
65
  track and the page. */
65
- @property --ui-meter-inline-size {
66
- syntax: "*";
67
- inherits: false;
68
- }
69
66
 
70
67
  :host {
71
68
  --_meter-fill: var(--ui-text-muted);
@@ -97,6 +94,14 @@
97
94
  box-shadow: inset 0 1px rgb(255 255 255 / 0.26), inset 0 -1px rgb(0 0 0 / 0.1);
98
95
  }
99
96
 
97
+ :host([tone="accent-secondary"]) {
98
+ --_meter-fill: var(--ui-accent-secondary-solid);
99
+ }
100
+
101
+ :host([tone="accent-tertiary"]) {
102
+ --_meter-fill: var(--ui-accent-tertiary-solid);
103
+ }
104
+
100
105
  :host([tone="accent"]) {
101
106
  --_meter-fill: var(--ui-accent-solid);
102
107
  }
@@ -47,24 +47,6 @@
47
47
  </button>
48
48
  </template>
49
49
  <style>
50
- /* This component's hooks style the element they are set on, and never a nested one. */
51
- @property --ui-nav-item-current-surface {
52
- syntax: "*";
53
- inherits: false;
54
- }
55
- @property --ui-nav-item-indicator-color {
56
- syntax: "*";
57
- inherits: false;
58
- }
59
- @property --ui-nav-item-indicator-width {
60
- syntax: "*";
61
- inherits: false;
62
- }
63
- @property --ui-nav-item-inline-size {
64
- syntax: "*";
65
- inherits: false;
66
- }
67
-
68
50
  /* One destination in a side or rail navigation: an icon to find it by (leading), its name (the
69
51
  default slot), and an optional line under it (description), such as the record a section
70
52
  belongs to. Label and description are one line each and end in an ellipsis, so every item in a
@@ -33,36 +33,6 @@
33
33
  </defs>
34
34
  <span><div class="surface"><slot></slot></div></span>
35
35
  <style>
36
- /* This component's hooks style the element they are set on, and never a nested one. */
37
- @property --ui-popover-surface {
38
- syntax: "*";
39
- inherits: false;
40
- }
41
- @property --ui-popover-border {
42
- syntax: "*";
43
- inherits: false;
44
- }
45
- @property --ui-popover-radius {
46
- syntax: "*";
47
- inherits: false;
48
- }
49
- @property --ui-popover-shadow {
50
- syntax: "*";
51
- inherits: false;
52
- }
53
- @property --ui-popover-viewport-gap {
54
- syntax: "*";
55
- inherits: false;
56
- }
57
- @property --ui-popover-offset {
58
- syntax: "*";
59
- inherits: false;
60
- }
61
- @property --ui-popover-padding {
62
- syntax: "*";
63
- inherits: false;
64
- }
65
-
66
36
  :host {
67
37
  --_ui-material-scale: 0.55;
68
38
  --_ui-popover-surface: var(--ui-popover-surface);
@@ -31,18 +31,8 @@
31
31
  </span>
32
32
  </label>
33
33
  <style>
34
- /* This component's hooks style the element they are set on, and never a nested one. */
35
- @property --ui-radio-gap {
36
- syntax: "*";
37
- inherits: false;
38
- }
39
- @property --ui-radio-size {
40
- syntax: "*";
41
- inherits: false;
42
- }
43
-
44
34
  :host {
45
- /* Hooks do not inherit, so the parts below read them from the root. */
35
+ /* Resolve shared part values at the component root. */
46
36
  --_ui-radio-size: var(--ui-radio-size, var(--ui-choice-mark-size));
47
37
 
48
38
  display: inline-flex !important;
@@ -153,7 +143,9 @@
153
143
  }
154
144
 
155
145
  @media (prefers-reduced-motion: reduce) {
156
- input::after { transition: none; }
146
+ input::after {
147
+ transition: none;
148
+ }
157
149
  }
158
150
 
159
151
  @media (forced-colors: active) {
@@ -163,7 +155,9 @@
163
155
  background: none;
164
156
  box-shadow: none;
165
157
  }
166
- input::after { display: none !important; }
158
+ input::after {
159
+ display: none !important;
160
+ }
167
161
  }
168
162
 
169
163
  /* A sized choice keeps its box and aligns instead: the label takes that size's field type size,
@@ -38,11 +38,6 @@
38
38
  <slot></slot>
39
39
  </fieldset>
40
40
  <style>
41
- @property --ui-radio-group-invalid-text {
42
- syntax: "*";
43
- inherits: false;
44
- }
45
-
46
41
  :host {
47
42
  --_ui-radio-group-invalid-text: var(--ui-radio-group-invalid-text, var(--ui-field-danger, var(--ui-danger-solid)));
48
43
  display: inline-flex !important;
@@ -2,7 +2,7 @@
2
2
  <defs>
3
3
  <prop name="gap" type="keyword" values="xs, s, m, l, xl"
4
4
  >Space between items, on the spacing scale: xs is 0.5rem, s 0.75rem, m 1rem (also the default), l 1.5rem, and xl 2rem. The --ui-reel-gap custom property,
5
- set on the reel itself, overrides it; set on an ancestor, it does nothing.</prop>
5
+ set on :root, an ancestor, or the component itself, overrides it.</prop>
6
6
  <prop name="itemWidth" type="keyword" values="sm, md, lg"
7
7
  >A fixed width for every item: sm is 12rem, md is 16rem, and lg is 20rem. Unset, each item keeps its content's width. Items never shrink to fit, so the reel
8
8
  scrolls sideways once they overflow.</prop>
@@ -13,16 +13,6 @@
13
13
  </defs>
14
14
  <div role="region" tabindex="0"><slot></slot></div>
15
15
  <style>
16
- /* This component's hooks style the element they are set on, and never a nested one. */
17
- @property --ui-reel-gap {
18
- syntax: "*";
19
- inherits: false;
20
- }
21
- @property --ui-reel-item-width {
22
- syntax: "*";
23
- inherits: false;
24
- }
25
-
26
16
  :host {
27
17
  --_reel-gap: var(--ui-space-4);
28
18
  --_reel-item-width: max-content;
@@ -18,40 +18,6 @@
18
18
  <span class="trailing"><slot name="trailing"></slot></span>
19
19
  </button>
20
20
  <style>
21
- /* This component's hooks style the element they are set on, and never a nested one. */
22
- @property --ui-search-result-row-border {
23
- syntax: "*";
24
- inherits: false;
25
- }
26
- @property --ui-search-result-row-gap {
27
- syntax: "*";
28
- inherits: false;
29
- }
30
- @property --ui-search-result-row-hover-surface {
31
- syntax: "*";
32
- inherits: false;
33
- }
34
- @property --ui-search-result-row-min-height {
35
- syntax: "*";
36
- inherits: false;
37
- }
38
- @property --ui-search-result-row-padding-block {
39
- syntax: "*";
40
- inherits: false;
41
- }
42
- @property --ui-search-result-row-padding-inline {
43
- syntax: "*";
44
- inherits: false;
45
- }
46
- @property --ui-search-result-row-selected-bg {
47
- syntax: "*";
48
- inherits: false;
49
- }
50
- @property --ui-search-result-row-surface {
51
- syntax: "*";
52
- inherits: false;
53
- }
54
-
55
21
  :host {
56
22
  appearance: none;
57
23
  inline-size: 100%;