@threadlabs/looma 0.22.14 → 0.23.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 (217) hide show
  1. package/components/shared/icons.js +2 -0
  2. package/components/ui-avatar/ui-avatar.html +3 -3
  3. package/components/ui-avatar-group/ui-avatar-group.html +1 -1
  4. package/components/ui-badge/ui-badge.html +1 -1
  5. package/components/ui-button/ui-button.html +3 -3
  6. package/components/ui-callout/ui-callout.html +3 -2
  7. package/components/ui-card/ui-card.html +2 -2
  8. package/components/ui-checkbox/ui-checkbox.html +3 -3
  9. package/components/ui-combobox/ui-combobox.html +8 -8
  10. package/components/ui-context-menu/ui-context-menu.html +2 -2
  11. package/components/ui-description-list/ui-description-list.html +1 -1
  12. package/components/ui-dialog/ui-dialog.html +3 -3
  13. package/components/ui-disclosure/ui-disclosure.html +43 -3
  14. package/components/ui-editable/ui-editable.html +2 -2
  15. package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +5 -5
  16. package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +2 -2
  17. package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +6 -6
  18. package/components/ui-editor-slash-menu-item/ui-editor-slash-menu-item.html +1 -1
  19. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +2 -2
  20. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +11 -11
  21. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +5 -5
  22. package/components/ui-editor-toolbar/ui-editor-toolbar.html +4 -4
  23. package/components/ui-floating-action-button/ui-floating-action-button.html +2 -2
  24. package/components/ui-icon/ui-icon.html +2 -0
  25. package/components/ui-icon-button/ui-icon-button.html +1 -1
  26. package/components/ui-input/ui-input.html +8 -4
  27. package/components/ui-input-group/ui-input-group.html +10 -6
  28. package/components/ui-list/ui-list.html +1 -1
  29. package/components/ui-list-item/ui-list-item.html +20 -4
  30. package/components/ui-listbox/ui-listbox.html +3 -3
  31. package/components/ui-menu/ui-menu.html +2 -2
  32. package/components/ui-menu-item/ui-menu-item.html +4 -4
  33. package/components/ui-meter/ui-meter.html +1 -1
  34. package/components/ui-nav-item/ui-nav-item.html +46 -14
  35. package/components/ui-popover/ui-popover.html +1 -1
  36. package/components/ui-radio/ui-radio.html +2 -2
  37. package/components/ui-search-result-row/ui-search-result-row.html +13 -5
  38. package/components/ui-search-shell/ui-search-shell.html +4 -4
  39. package/components/ui-section/ui-section.html +3 -3
  40. package/components/ui-select/ui-select.html +6 -2
  41. package/components/ui-separator/ui-separator.html +2 -2
  42. package/components/ui-sidebar/ui-sidebar.html +3 -3
  43. package/components/ui-status-message/ui-status-message.html +1 -1
  44. package/components/ui-switch/ui-switch.html +3 -3
  45. package/components/ui-table/ui-table.html +3 -3
  46. package/components/ui-tabs/ui-tabs.html +7 -7
  47. package/components/ui-textarea/ui-textarea.html +6 -2
  48. package/components/ui-toast/ui-toast.html +2 -2
  49. package/components/ui-toast-region/ui-toast-region.html +5 -5
  50. package/components/ui-tooltip/ui-tooltip.html +15 -15
  51. package/components/ui-top-bar/ui-top-bar.html +1 -1
  52. package/components/ui-tree-item/ui-tree-item.html +27 -8
  53. package/dist/index.js +1 -1
  54. package/editor/icons.d.ts +2 -0
  55. package/editor/index.js +3 -1
  56. package/package.json +1 -1
  57. package/styles/ui-avatar-group.css +1 -1
  58. package/styles/ui-avatar.css +3 -3
  59. package/styles/ui-badge.css +1 -1
  60. package/styles/ui-button.css +3 -3
  61. package/styles/ui-callout.css +3 -2
  62. package/styles/ui-card.css +2 -2
  63. package/styles/ui-checkbox.css +3 -3
  64. package/styles/ui-combobox.css +8 -8
  65. package/styles/ui-context-menu.css +2 -2
  66. package/styles/ui-description-list.css +1 -1
  67. package/styles/ui-dialog.css +3 -3
  68. package/styles/ui-disclosure.css +42 -2
  69. package/styles/ui-editable.css +2 -2
  70. package/styles/ui-editor-insert-table-grid.css +5 -5
  71. package/styles/ui-editor-mention-menu.css +2 -2
  72. package/styles/ui-editor-slash-menu-item.css +1 -1
  73. package/styles/ui-editor-slash-menu.css +6 -6
  74. package/styles/ui-editor-table-context-menu.css +2 -2
  75. package/styles/ui-editor-table-overlay.css +11 -11
  76. package/styles/ui-editor-table-toolbar.css +5 -5
  77. package/styles/ui-editor-toolbar.css +4 -4
  78. package/styles/ui-floating-action-button.css +2 -2
  79. package/styles/ui-icon-button.css +1 -1
  80. package/styles/ui-input-group.css +10 -6
  81. package/styles/ui-input.css +8 -4
  82. package/styles/ui-list-item.css +23 -4
  83. package/styles/ui-list.css +1 -1
  84. package/styles/ui-listbox.css +3 -3
  85. package/styles/ui-menu-item.css +4 -4
  86. package/styles/ui-menu.css +2 -2
  87. package/styles/ui-meter.css +1 -1
  88. package/styles/ui-nav-item.css +46 -12
  89. package/styles/ui-popover.css +1 -1
  90. package/styles/ui-radio.css +2 -2
  91. package/styles/ui-search-result-row.css +16 -5
  92. package/styles/ui-search-shell.css +4 -4
  93. package/styles/ui-section.css +3 -3
  94. package/styles/ui-select.css +6 -2
  95. package/styles/ui-separator.css +2 -2
  96. package/styles/ui-sidebar.css +3 -3
  97. package/styles/ui-status-message.css +1 -1
  98. package/styles/ui-switch.css +3 -3
  99. package/styles/ui-table.css +3 -3
  100. package/styles/ui-tabs.css +7 -7
  101. package/styles/ui-textarea.css +6 -2
  102. package/styles/ui-toast-region.css +5 -5
  103. package/styles/ui-toast.css +2 -2
  104. package/styles/ui-tooltip.css +15 -15
  105. package/styles/ui-top-bar.css +1 -1
  106. package/styles/ui-tree-item.css +32 -8
  107. package/tokens.css +30 -9
  108. package/vanilla/UiDisclosure.d.ts +1 -0
  109. package/vanilla/UiDisclosure.js +10 -1
  110. package/vanilla/UiIcon.js +1 -1
  111. package/vanilla/UiNavItem.d.ts +2 -0
  112. package/vanilla/UiNavItem.js +1 -1
  113. package/vue/UiAvatar.vue +3 -3
  114. package/vue/UiAvatarGroup.vue +1 -1
  115. package/vue/UiBadge.vue +2 -1
  116. package/vue/UiButton.vue +3 -3
  117. package/vue/UiCallout.vue +2 -2
  118. package/vue/UiCard.vue +2 -2
  119. package/vue/UiCheckbox.vue +3 -3
  120. package/vue/UiCombobox.vue +11 -8
  121. package/vue/UiContextMenu.vue +2 -2
  122. package/vue/UiDescriptionList.vue +1 -1
  123. package/vue/UiDialog.vue +4 -3
  124. package/vue/UiDisclosure.d.ts +13 -2
  125. package/vue/UiDisclosure.vue +61 -4
  126. package/vue/UiEditable.vue +2 -2
  127. package/vue/UiEditorInsertTableGrid.vue +5 -5
  128. package/vue/UiEditorMentionMenu.vue +2 -2
  129. package/vue/UiEditorSlashMenu.vue +6 -6
  130. package/vue/UiEditorSlashMenuItem.vue +1 -1
  131. package/vue/UiEditorTableContextMenu.vue +2 -2
  132. package/vue/UiEditorTableOverlay.vue +11 -11
  133. package/vue/UiEditorTableToolbar.vue +5 -5
  134. package/vue/UiEditorToolbar.vue +6 -4
  135. package/vue/UiFloatingActionButton.vue +2 -2
  136. package/vue/UiIcon.vue +8 -0
  137. package/vue/UiIconButton.vue +1 -1
  138. package/vue/UiInput.vue +7 -4
  139. package/vue/UiInputGroup.vue +6 -6
  140. package/vue/UiList.vue +1 -1
  141. package/vue/UiListItem.vue +20 -4
  142. package/vue/UiListbox.vue +3 -3
  143. package/vue/UiMenu.vue +3 -2
  144. package/vue/UiMenuItem.vue +4 -4
  145. package/vue/UiMeter.vue +1 -1
  146. package/vue/UiNavItem.d.ts +18 -0
  147. package/vue/UiNavItem.vue +96 -12
  148. package/vue/UiPopover.vue +2 -1
  149. package/vue/UiRadio.vue +2 -2
  150. package/vue/UiSearchResultRow.vue +13 -5
  151. package/vue/UiSearchShell.vue +4 -4
  152. package/vue/UiSection.vue +3 -3
  153. package/vue/UiSelect.vue +3 -2
  154. package/vue/UiSeparator.vue +4 -2
  155. package/vue/UiSidebar.vue +5 -3
  156. package/vue/UiStatusMessage.vue +1 -1
  157. package/vue/UiSwitch.vue +3 -3
  158. package/vue/UiTable.vue +3 -3
  159. package/vue/UiTabs.vue +8 -7
  160. package/vue/UiTextarea.vue +2 -2
  161. package/vue/UiToast.vue +4 -2
  162. package/vue/UiToastRegion.vue +5 -5
  163. package/vue/UiTooltip.vue +19 -15
  164. package/vue/UiTopBar.vue +1 -1
  165. package/vue/UiTreeItem.vue +31 -8
  166. package/vue/chunks/UiAvatar.js +1 -1
  167. package/vue/chunks/UiAvatarGroup.js +1 -1
  168. package/vue/chunks/UiBadge.js +1 -1
  169. package/vue/chunks/UiButton.js +1 -1
  170. package/vue/chunks/UiCallout.js +1 -1
  171. package/vue/chunks/UiCard.js +1 -1
  172. package/vue/chunks/UiCheckbox.js +1 -1
  173. package/vue/chunks/UiCombobox.js +1 -1
  174. package/vue/chunks/UiContextMenu.js +1 -1
  175. package/vue/chunks/UiDescriptionList.js +1 -1
  176. package/vue/chunks/UiDialog.js +1 -1
  177. package/vue/chunks/UiDisclosure.js +27 -4
  178. package/vue/chunks/UiEditable.js +1 -1
  179. package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
  180. package/vue/chunks/UiEditorMentionMenu.js +1 -1
  181. package/vue/chunks/UiEditorSlashMenu.js +1 -1
  182. package/vue/chunks/UiEditorSlashMenuItem.js +1 -1
  183. package/vue/chunks/UiEditorTableContextMenu.js +1 -1
  184. package/vue/chunks/UiEditorTableOverlay.js +1 -1
  185. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  186. package/vue/chunks/UiEditorToolbar.js +1 -1
  187. package/vue/chunks/UiFloatingActionButton.js +1 -1
  188. package/vue/chunks/UiIcon.js +24 -1
  189. package/vue/chunks/UiIconButton.js +1 -1
  190. package/vue/chunks/UiInput.js +1 -1
  191. package/vue/chunks/UiInputGroup.js +1 -1
  192. package/vue/chunks/UiList.js +1 -1
  193. package/vue/chunks/UiListItem.js +1 -1
  194. package/vue/chunks/UiListbox.js +1 -1
  195. package/vue/chunks/UiMenu.js +1 -1
  196. package/vue/chunks/UiMenuItem.js +1 -1
  197. package/vue/chunks/UiMeter.js +1 -1
  198. package/vue/chunks/UiNavItem.js +65 -6
  199. package/vue/chunks/UiPopover.js +1 -1
  200. package/vue/chunks/UiRadio.js +1 -1
  201. package/vue/chunks/UiSearchResultRow.js +1 -1
  202. package/vue/chunks/UiSearchShell.js +1 -1
  203. package/vue/chunks/UiSection.js +1 -1
  204. package/vue/chunks/UiSelect.js +1 -1
  205. package/vue/chunks/UiSeparator.js +1 -1
  206. package/vue/chunks/UiSidebar.js +1 -1
  207. package/vue/chunks/UiStatusMessage.js +1 -1
  208. package/vue/chunks/UiSwitch.js +1 -1
  209. package/vue/chunks/UiTable.js +1 -1
  210. package/vue/chunks/UiTabs.js +1 -1
  211. package/vue/chunks/UiTextarea.js +1 -1
  212. package/vue/chunks/UiToast.js +1 -1
  213. package/vue/chunks/UiToastRegion.js +1 -1
  214. package/vue/chunks/UiTooltip.js +1 -1
  215. package/vue/chunks/UiTopBar.js +1 -1
  216. package/vue/chunks/UiTreeItem.js +1 -1
  217. package/vue/components.css +1337 -1208
@@ -177,7 +177,7 @@
177
177
  min-block-size: var(--ui-icon-button-size, var(--_size));
178
178
  padding: 0;
179
179
  margin: 0;
180
- border: 1px solid transparent;
180
+ border: var(--ui-border-width) solid transparent;
181
181
  border-radius: var(--ui-icon-button-radius, var(--ui-action-radius, var(--ui-radius-md)));
182
182
  background-color: var(--ui-icon-button-surface, transparent);
183
183
  color: inherit;
@@ -103,7 +103,7 @@
103
103
  padding: var(--ui-space-2) var(--ui-space-3);
104
104
  appearance: none;
105
105
  padding-inline-start: var(--_ui-default-input-padding-inline-start, var(--ui-space-3));
106
- border: var(--ui-input-border-width, var(--_ui-default-input-border-width, 1px)) solid
106
+ border: var(--ui-input-border-width, var(--_ui-default-input-border-width, var(--ui-border-width))) solid
107
107
  var(--ui-input-border, var(--_ui-default-input-border, var(--ui-control-border, var(--ui-border-strong))));
108
108
  border-radius: var(--ui-input-radius, var(--_ui-default-input-radius, var(--ui-field-radius, var(--ui-radius-md))));
109
109
  background: var(--ui-input-surface, var(--_ui-default-input-surface, var(--ui-control-surface, var(--ui-surface-elevated))));
@@ -172,7 +172,11 @@
172
172
  var(
173
173
  --_ui-default-input-invalid-focus-shadow,
174
174
  var(--ui-control-inset),
175
- 0 0 0 3px color-mix(in srgb, var(--ui-input-invalid-border, var(--ui-field-danger, var(--ui-danger-solid))) 22%, transparent)
175
+ 0 0 0 calc(var(--ui-focus-width) * 1.5) color-mix(
176
+ in srgb,
177
+ var(--ui-input-invalid-border, var(--ui-field-danger, var(--ui-danger-solid))) 22%,
178
+ transparent
179
+ )
176
180
  )
177
181
  );
178
182
  }
@@ -187,8 +191,8 @@
187
191
  /* Forced colors drop box shadows, so the focus ring becomes an outline. */
188
192
  @media (forced-colors: active) {
189
193
  :host:focus-visible {
190
- outline: var(--ui-input-focus-outline, var(--_ui-default-input-focus-outline, 2px solid Highlight));
191
- outline-offset: 1px;
194
+ outline: var(--ui-input-focus-outline, var(--_ui-default-input-focus-outline, var(--ui-focus-width) solid Highlight));
195
+ outline-offset: var(--ui-border-width);
192
196
  }
193
197
  }
194
198
 
@@ -54,7 +54,7 @@
54
54
  min-inline-size: 0;
55
55
  min-block-size: var(--ui-control-size-md);
56
56
  /* The frame reads the shared control tokens with a lone Input's fallbacks, so the two match. */
57
- border: 1px solid var(--ui-control-border, var(--ui-border-strong));
57
+ border: var(--ui-border-width) solid var(--ui-control-border, var(--ui-border-strong));
58
58
  border-radius: var(--ui-input-group-radius, var(--ui-field-radius, var(--ui-radius-md)));
59
59
  background: var(--ui-control-surface, var(--ui-surface-elevated));
60
60
  box-shadow: var(--ui-control-inset);
@@ -100,15 +100,19 @@
100
100
  box-shadow: var(
101
101
  --ui-input-group-invalid-focus-shadow,
102
102
  var(--ui-control-inset),
103
- 0 0 0 3px color-mix(in srgb, var(--ui-input-group-invalid-border, var(--ui-field-danger, var(--ui-danger-solid))) 22%, transparent)
103
+ 0 0 0 calc(var(--ui-focus-width) * 1.5) color-mix(
104
+ in srgb,
105
+ var(--ui-input-group-invalid-border, var(--ui-field-danger, var(--ui-danger-solid))) 22%,
106
+ transparent
107
+ )
104
108
  );
105
109
  }
106
110
 
107
111
  /* Forced colors drop box shadows, so the focus ring becomes an outline. */
108
112
  @media (forced-colors: active) {
109
113
  :host:has(input:focus-visible) {
110
- outline: 2px solid Highlight;
111
- outline-offset: 1px;
114
+ outline: var(--ui-focus-width) solid Highlight;
115
+ outline-offset: var(--ui-border-width);
112
116
  }
113
117
  }
114
118
 
@@ -143,11 +147,11 @@
143
147
  }
144
148
 
145
149
  .affix:has([slot="prefix"]) {
146
- border-inline-end: 1px solid var(--ui-border-divider);
150
+ border-inline-end: var(--ui-border-width) solid var(--ui-border-divider);
147
151
  }
148
152
 
149
153
  .affix:has([slot="suffix"]) {
150
- border-inline-start: 1px solid var(--ui-border-divider);
154
+ border-inline-start: var(--ui-border-width) solid var(--ui-border-divider);
151
155
  }
152
156
 
153
157
  :host-state([prefixKind="icon"]) {
@@ -65,7 +65,7 @@
65
65
 
66
66
  :host > :slotted(li.card) {
67
67
  padding: var(--_ui-list-native-padding-block, var(--ui-space-3)) var(--_ui-list-native-padding-inline, var(--ui-space-4));
68
- border: 1px solid var(--ui-border-strong);
68
+ border: var(--ui-border-width) solid var(--ui-border-strong);
69
69
  border-radius: var(--ui-radius-lg);
70
70
  background: var(--ui-surface-raised);
71
71
  list-style: none;
@@ -56,7 +56,7 @@
56
56
  min-block-size: var(--_ui-list-item-min-size, var(--ui-control-size, 2.5rem));
57
57
  padding-block: var(--ui-list-item-padding-block, var(--_ui-list-item-padding-block, var(--ui-space-2)));
58
58
  padding-inline: var(--ui-list-item-padding-inline, var(--_ui-list-item-padding-inline, var(--ui-space-3)));
59
- border-radius: var(--ui-radius-md);
59
+ border-radius: var(--ui-selection-radius);
60
60
  color: var(--ui-text-primary);
61
61
  transition: background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease);
62
62
  }
@@ -64,7 +64,7 @@
64
64
  :host-state([variant="card"]) {
65
65
  padding-block: var(--ui-list-item-padding-block, var(--ui-space-3));
66
66
  padding-inline: var(--ui-list-item-padding-inline, var(--ui-space-4));
67
- border: 1px solid var(--ui-border-strong);
67
+ border: var(--ui-border-width) solid var(--ui-border-strong);
68
68
  border-radius: var(--ui-radius-lg);
69
69
  background: var(--ui-surface-raised);
70
70
  }
@@ -78,11 +78,12 @@
78
78
  }
79
79
 
80
80
  :host-state([current]) {
81
- background: var(--ui-surface-hover);
81
+ background: var(--ui-selection-surface);
82
+ color: var(--ui-selection-text);
82
83
  }
83
84
 
84
85
  :host:has(.title a[href]:focus-visible) {
85
- box-shadow: 0 0 0 2px var(--ui-focus-ring);
86
+ box-shadow: 0 0 0 var(--ui-focus-width) var(--ui-focus-ring);
86
87
  }
87
88
 
88
89
  .leading,
@@ -98,6 +99,10 @@
98
99
  font-size: var(--_ui-list-item-icon-size, var(--ui-font-size-lg));
99
100
  }
100
101
 
102
+ :host-state([current]) .leading {
103
+ color: var(--ui-selection-text);
104
+ }
105
+
101
106
  /* Trailing controls take their own clicks, above the title link's stretched hit area. */
102
107
  .trailing {
103
108
  position: relative;
@@ -159,6 +164,17 @@
159
164
  display: none;
160
165
  }
161
166
 
167
+ @media (forced-colors: active) {
168
+ :host:has(a:focus-visible) {
169
+ outline: var(--ui-focus-width) solid Highlight;
170
+ outline-offset: calc(-1 * var(--ui-focus-width));
171
+ }
172
+ :host-state([current]):not(:has(a:focus-visible)) {
173
+ outline: var(--ui-border-width) solid Highlight;
174
+ outline-offset: calc(-1 * var(--ui-border-width));
175
+ }
176
+ }
177
+
162
178
  /* A component that sets its display still honours the hidden attribute on its root. */
163
179
  :host[hidden] {
164
180
  display: none;
@@ -105,7 +105,7 @@
105
105
  min-inline-size: 0;
106
106
  margin: 0;
107
107
  padding: var(--ui-space-1);
108
- border: 1px solid var(--ui-listbox-border, var(--ui-control-border));
108
+ border: var(--ui-border-width) solid var(--ui-listbox-border, var(--ui-control-border));
109
109
  border-radius: var(--ui-listbox-radius, var(--ui-field-radius, var(--ui-radius-md)));
110
110
  background: var(--ui-listbox-surface, var(--ui-control-surface));
111
111
  color: var(--ui-text-primary);
@@ -149,8 +149,8 @@
149
149
 
150
150
  :host:focus-visible {
151
151
  border-color: var(--ui-control-focus);
152
- outline: 2px solid var(--ui-focus-ring);
153
- outline-offset: 2px;
152
+ outline: var(--ui-focus-width) solid var(--ui-focus-ring);
153
+ outline-offset: var(--ui-focus-width);
154
154
  box-shadow: var(--ui-listbox-focus-shadow, var(--ui-focus-halo));
155
155
  }
156
156
 
@@ -111,7 +111,7 @@
111
111
  max-inline-size: inherit;
112
112
  padding: var(--ui-space-1);
113
113
  background: var(--_ui-menu-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
114
- border: 1px solid var(--_ui-menu-border, var(--ui-overlay-border, var(--ui-border-strong)));
114
+ border: var(--ui-border-width) solid var(--_ui-menu-border, var(--ui-overlay-border, var(--ui-border-strong)));
115
115
  border-radius: var(--_ui-menu-radius, var(--ui-overlay-radius, var(--ui-radius-lg)));
116
116
  box-shadow: var(--_ui-menu-shadow, var(--ui-overlay-shadow, var(--ui-elevation-overlay, var(--ui-shadow-lg))));
117
117
  max-block-size: inherit;
@@ -123,7 +123,7 @@
123
123
  block-size: 0;
124
124
  margin: var(--ui-space-1) 0;
125
125
  border: 0;
126
- border-block-start: 1px solid var(--ui-border-divider);
126
+ border-block-start: var(--ui-border-width) solid var(--ui-border-divider);
127
127
  }
128
128
 
129
129
  :host:not(:host-state([internalOpen])):not(:host-state([inline])) {
@@ -81,7 +81,7 @@
81
81
  padding: var(--ui-menu-item-padding-block, var(--_ui-default-menu-item-padding-block, var(--ui-space-2)))
82
82
  var(--ui-menu-item-padding-inline, var(--_ui-default-menu-item-padding-inline, var(--ui-space-3)));
83
83
  text-align: left;
84
- border-radius: var(--ui-menu-item-radius, var(--_ui-default-menu-item-radius, var(--ui-radius-md)));
84
+ border-radius: var(--ui-menu-item-radius, var(--_ui-default-menu-item-radius, var(--ui-selection-radius)));
85
85
  color: var(--ui-text-primary);
86
86
  font-size: var(--ui-menu-item-font-size, var(--_ui-default-menu-item-font-size, var(--ui-font-size-md)));
87
87
  font-weight: var(--ui-font-medium);
@@ -107,7 +107,7 @@
107
107
  box-sizing: border-box;
108
108
  inline-size: var(--_ui-default-menu-indicator-size, var(--ui-icon-size-sm));
109
109
  block-size: var(--_ui-default-menu-indicator-size, var(--ui-icon-size-sm));
110
- border: 1.5px solid var(--ui-control-border);
110
+ border: var(--ui-border-width) solid var(--ui-control-border);
111
111
  border-radius: var(--ui-radius-sm);
112
112
  color: var(--ui-surface);
113
113
  --_ui-default-icon-size: 0.75rem;
@@ -159,8 +159,8 @@
159
159
  }
160
160
 
161
161
  :host:focus-visible {
162
- outline: 2px solid var(--ui-focus-ring);
163
- outline-offset: -2px;
162
+ outline: var(--ui-focus-width) solid var(--ui-focus-ring);
163
+ outline-offset: calc(-1 * var(--ui-focus-width));
164
164
  }
165
165
 
166
166
  :host[aria-disabled="true"] {
@@ -59,7 +59,7 @@
59
59
  background: var(--ui-border);
60
60
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.1), inset 0 -1px rgb(255 255 255 / 0.22);
61
61
  /* Unseen until forced colours draw it, where the track's own colour is gone. */
62
- outline: 1px solid transparent;
62
+ outline: var(--ui-border-width) solid transparent;
63
63
  }
64
64
 
65
65
  :host-state([size="sm"]) {
@@ -1,9 +1,14 @@
1
1
  <template component="ui-nav-item">
2
2
  <defs>
3
+ <prop name="variant" type="keyword" values="surface, line" default="surface"
4
+ >surface marks the current row with a quiet filled surface and shared corners. line uses square corners and a continuous logical start edge. Both retain the
5
+ resting label weight and expose aria-current.</prop>
6
+ <prop name="density" type="keyword" values="comfortable, compact" default="comfortable"
7
+ >Compact uses smaller type and row spacing to sit alongside a compact tree; comfortable keeps the regular navigation row.</prop>
3
8
  <prop name="current" type="keyword" values="true, false, page, step, location" default="false"
4
- >Marks the item as where you are: it takes the selected surface, a stronger label, and a bar on its start edge, and states aria-current, which assistive
5
- technology announces. "true" means the current page (aria-current="page"); "step" marks the current step of a process, and "location" the current place in
6
- a set, such as a section of a record. Set it on one item at a time.</prop>
9
+ >Marks the item as where you are: it takes the selected surface, the selected text, and the chosen surface or line treatment, and states aria-current, which
10
+ assistive technology announces. "true" means the current page (aria-current="page"); "step" marks the current step of a process, and "location" the
11
+ current place in a set, such as a section of a record. Set it on one item at a time.</prop>
7
12
  <prop name="href" type="string"
8
13
  >The link's destination. Pair it with as="a" so the item renders as a real link: a router, a modified click, and "open in new tab" all work. Without it the
9
14
  item is a button, for switching views inside the app.</prop>
@@ -63,7 +68,7 @@
63
68
  belongs to. Label and description are one line each and end in an ellipsis, so every item in a
64
69
  navigation has the same height and the rail never grows sideways. */
65
70
  :host {
66
- --_indicator-width: var(--ui-nav-item-indicator-width, 3px);
71
+ --_indicator-width: var(--ui-nav-item-indicator-width, var(--ui-accent-line-width));
67
72
  --_indicator-color: var(--ui-nav-item-indicator-color, var(--ui-accent));
68
73
  position: relative;
69
74
  box-sizing: border-box;
@@ -77,11 +82,11 @@
77
82
  padding-block: var(--ui-space-2);
78
83
  padding-inline: var(--ui-space-3);
79
84
  border: 0;
80
- border-radius: var(--ui-radius-md);
85
+ border-radius: var(--ui-selection-radius);
81
86
  background: transparent;
82
87
  color: var(--ui-text-secondary);
83
88
  font: inherit;
84
- font-weight: var(--ui-font-medium);
89
+ font-weight: var(--ui-font-normal);
85
90
  text-align: start;
86
91
  text-decoration: none;
87
92
  cursor: pointer;
@@ -97,32 +102,43 @@
97
102
  /* The ring is an outline, drawn inside the item: forced colors keep an outline where they drop a
98
103
  box shadow, and a scrolling rail cannot clip a ring that stays within the item. */
99
104
  :host:focus-visible {
100
- outline: 2px solid var(--ui-focus-ring);
101
- outline-offset: -2px;
105
+ outline: var(--ui-focus-width) solid var(--ui-focus-ring);
106
+ outline-offset: calc(-1 * var(--ui-focus-width));
102
107
  }
103
108
 
104
109
  :host[aria-current] {
105
- background: var(--ui-nav-item-current-surface, var(--ui-accent-soft));
106
- color: var(--ui-accent-subtle-text, var(--ui-text-primary));
107
- font-weight: var(--ui-font-semibold);
110
+ background: var(--ui-nav-item-current-surface, var(--ui-selection-surface));
111
+ color: var(--ui-selection-text);
112
+ }
113
+
114
+ :host-state([variant="line"]) {
115
+ border-radius: 0;
108
116
  }
109
117
 
110
- /* The bar on the start edge is a border, not a fill: forced colors replace backgrounds but keep a
118
+ /* A line treatment has straight corners and a continuous edge. Surface treatment has
119
+ shared rounded corners and no edge marker; never combine the two geometries.
120
+ The line is a border, not a fill: forced colors replace backgrounds but keep a
111
121
  border, so the current item stays marked in high contrast. Logical edges mirror it in a
112
122
  right-to-left page. */
113
123
  .indicator {
114
124
  position: absolute;
115
- inset-block: var(--ui-space-2);
125
+ inset-block: 0;
116
126
  inset-inline-start: 0;
117
127
  display: none;
118
128
  border-inline-start: var(--_indicator-width) solid var(--_indicator-color);
119
129
  }
120
130
 
121
- :host[aria-current] .indicator {
131
+ :host-state([variant="line"])[aria-current] .indicator {
122
132
  display: block;
123
133
  }
124
134
 
125
135
  @media (forced-colors: active) {
136
+ /* System colors may erase the selected fill. Trace the complete surface, without
137
+ creating an edge stripe; the stronger keyboard focus outline keeps precedence. */
138
+ :host-state([variant="surface"])[aria-current]:not(:focus-visible) {
139
+ outline: var(--ui-border-width) solid Highlight;
140
+ outline-offset: calc(-1 * var(--ui-border-width));
141
+ }
126
142
  .indicator {
127
143
  border-inline-start-color: Highlight;
128
144
  }
@@ -165,6 +181,22 @@
165
181
  line-height: var(--ui-line-height-tight);
166
182
  }
167
183
 
184
+ :host-state([density="compact"]) {
185
+ min-block-size: var(--ui-control-size-sm);
186
+ padding-block: var(--ui-space-1);
187
+ padding-inline: var(--ui-space-2);
188
+ }
189
+ :host-state([density="compact"]) .leading,
190
+ :host-state([density="compact"]) .label {
191
+ font-size: var(--ui-font-size-sm);
192
+ }
193
+
194
+ @media (pointer: coarse) {
195
+ :host-state([density="compact"]) {
196
+ min-block-size: var(--ui-control-min-block-size);
197
+ }
198
+ }
199
+
168
200
  /* An unused region takes no space. */
169
201
  .leading:empty,
170
202
  .description:empty {
@@ -88,7 +88,7 @@
88
88
  overflow: auto;
89
89
  padding: var(--_ui-popover-padding, var(--ui-space-3));
90
90
  background: var(--_ui-popover-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
91
- border: 1px solid var(--_ui-popover-border, var(--ui-overlay-border, var(--ui-border-strong)));
91
+ border: var(--ui-border-width) solid var(--_ui-popover-border, var(--ui-overlay-border, var(--ui-border-strong)));
92
92
  border-radius: var(--_ui-popover-radius, var(--ui-overlay-radius, var(--ui-radius-lg)));
93
93
  box-shadow: var(--_ui-popover-shadow, var(--ui-overlay-shadow, var(--ui-elevation-overlay, var(--ui-shadow-lg))));
94
94
  }
@@ -86,8 +86,8 @@
86
86
  }
87
87
 
88
88
  input:focus-visible {
89
- outline: 2px solid var(--ui-focus-ring, var(--ui-accent-solid));
90
- outline-offset: 2px;
89
+ outline: var(--ui-focus-width) solid var(--ui-focus-ring, var(--ui-accent-solid));
90
+ outline-offset: var(--ui-focus-width);
91
91
  }
92
92
 
93
93
  :host-state([disabled]) {
@@ -63,8 +63,8 @@
63
63
  align-items: flex-start;
64
64
  gap: var(--ui-search-result-row-gap, var(--ui-space-3));
65
65
  background: var(--ui-search-result-row-surface, transparent);
66
- border: 1px solid var(--ui-search-result-row-border, transparent);
67
- border-radius: var(--ui-radius-md);
66
+ border: var(--ui-border-width) solid var(--ui-search-result-row-border, transparent);
67
+ border-radius: var(--ui-selection-radius);
68
68
  color: inherit;
69
69
  cursor: pointer;
70
70
  text-align: left;
@@ -87,13 +87,14 @@
87
87
  :host-state([selected]) {
88
88
  background: var(
89
89
  --ui-search-result-row-selected-bg,
90
- var(--ui-search-result-row-hover-surface, color-mix(in srgb, var(--ui-surface) 85%, black 3%))
90
+ var(--ui-selection-surface)
91
91
  );
92
+ color: var(--ui-selection-text);
92
93
  }
93
94
 
94
95
  :host:focus-visible {
95
- outline: 2px solid var(--ui-focus-ring);
96
- outline-offset: -2px;
96
+ outline: var(--ui-focus-width) solid var(--ui-focus-ring);
97
+ outline-offset: calc(-1 * var(--ui-focus-width));
97
98
  }
98
99
 
99
100
  :host:disabled {
@@ -138,6 +139,13 @@
138
139
  margin: 0;
139
140
  }
140
141
 
142
+ @media (forced-colors: active) {
143
+ :host-state([selected]):not(:focus-visible):not(:disabled) {
144
+ outline: var(--ui-border-width) solid Highlight;
145
+ outline-offset: calc(-1 * var(--ui-border-width));
146
+ }
147
+ }
148
+
141
149
  /* A component that sets its display still honours the hidden attribute on its root. */
142
150
  :host[hidden] {
143
151
  display: none;
@@ -122,7 +122,7 @@
122
122
  margin-inline: auto;
123
123
  overflow: hidden;
124
124
  background: var(--_ui-search-shell-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
125
- border: 1px solid var(--_ui-search-shell-border, var(--ui-overlay-border, var(--ui-border-strong)));
125
+ border: var(--ui-border-width) solid var(--_ui-search-shell-border, var(--ui-overlay-border, var(--ui-border-strong)));
126
126
  border-radius: var(--_ui-search-shell-radius, var(--ui-overlay-radius, var(--ui-radius-dialog)));
127
127
  box-shadow: var(--_ui-search-shell-shadow, var(--ui-overlay-shadow, var(--ui-elevation-dialog, var(--ui-shadow-xl))));
128
128
  }
@@ -136,7 +136,7 @@
136
136
  inline-size: 100%;
137
137
  min-block-size: var(--ui-control-min-block-size);
138
138
  padding: var(--ui-space-2) var(--ui-space-3);
139
- border: 1px solid var(--ui-control-border);
139
+ border: var(--ui-border-width) solid var(--ui-control-border);
140
140
  border-radius: var(--ui-field-radius, var(--ui-radius-md));
141
141
  background: var(--ui-control-surface);
142
142
  color: var(--ui-text-primary);
@@ -146,8 +146,8 @@
146
146
 
147
147
  :slotted(input[slot="search"]:focus-visible) {
148
148
  border-color: var(--_ui-search-shell-focus-color, var(--ui-control-focus));
149
- outline: 2px solid var(--ui-focus-ring);
150
- outline-offset: 2px;
149
+ outline: var(--ui-focus-width) solid var(--ui-focus-ring);
150
+ outline-offset: var(--ui-focus-width);
151
151
  }
152
152
 
153
153
  .status,
@@ -30,19 +30,19 @@
30
30
 
31
31
  :host-state([variant="card"]) {
32
32
  padding: var(--ui-space-5);
33
- border: 1px solid var(--ui-border-strong);
33
+ border: var(--ui-border-width) solid var(--ui-border-strong);
34
34
  border-radius: var(--ui-radius-lg);
35
35
  background: var(--ui-surface-raised);
36
36
  }
37
37
 
38
38
  :host-state([variant="divided"]) {
39
39
  padding-block-start: var(--ui-space-6);
40
- border-block-start: 1px solid var(--ui-border-divider);
40
+ border-block-start: var(--ui-border-width) solid var(--ui-border-divider);
41
41
  }
42
42
 
43
43
  :host-state([variant="card"][tone="danger"]) {
44
44
  border-color: color-mix(in srgb, var(--ui-danger) 45%, var(--ui-border-default));
45
- border-inline-start: 4px solid var(--ui-danger);
45
+ border-inline-start: var(--ui-accent-line-width) solid var(--ui-danger);
46
46
  background: var(--ui-danger-soft);
47
47
  }
48
48
 
@@ -64,7 +64,7 @@
64
64
  min-block-size: var(--ui-control-size-md);
65
65
  margin: 0;
66
66
  padding: var(--ui-space-2) var(--ui-space-3);
67
- border: 1px solid var(--ui-select-border, var(--ui-control-border, var(--ui-border-strong)));
67
+ border: var(--ui-border-width) solid var(--ui-select-border, var(--ui-control-border, var(--ui-border-strong)));
68
68
  border-radius: var(--ui-select-radius, var(--ui-field-radius, var(--ui-radius-md)));
69
69
  background-color: var(--ui-select-surface, var(--ui-control-surface, var(--ui-surface-elevated)));
70
70
  color: var(--ui-text-primary);
@@ -112,7 +112,11 @@
112
112
  box-shadow: var(
113
113
  --ui-select-invalid-focus-shadow,
114
114
  var(--ui-control-inset),
115
- 0 0 0 3px color-mix(in srgb, var(--ui-select-invalid-border, var(--ui-field-danger, var(--ui-danger-solid))) 22%, transparent)
115
+ 0 0 0 calc(var(--ui-focus-width) * 1.5) color-mix(
116
+ in srgb,
117
+ var(--ui-select-invalid-border, var(--ui-field-danger, var(--ui-danger-solid))) 22%,
118
+ transparent
119
+ )
116
120
  );
117
121
  }
118
122
 
@@ -17,13 +17,13 @@
17
17
  align-self: stretch;
18
18
  margin: 0;
19
19
  border: 0;
20
- border-block-start: 1px solid var(--ui-separator-color, var(--ui-border-divider));
20
+ border-block-start: var(--ui-border-width) solid var(--ui-separator-color, var(--ui-border-divider));
21
21
  }
22
22
 
23
23
  :host[aria-orientation="vertical"] {
24
24
  block-size: auto;
25
25
  border-block-start: 0;
26
- border-inline-start: 1px solid var(--ui-separator-color, var(--ui-border-divider));
26
+ border-inline-start: var(--ui-border-width) solid var(--ui-separator-color, var(--ui-border-divider));
27
27
  }
28
28
  </style>
29
29
  </template>
@@ -69,12 +69,12 @@
69
69
  max-inline-size: 100%;
70
70
  min-block-size: 0;
71
71
  background: var(--ui-sidebar-surface, var(--ui-surface-default));
72
- border-inline-end: 1px solid var(--ui-sidebar-border, var(--ui-border-divider));
72
+ border-inline-end: var(--ui-border-width) solid var(--ui-sidebar-border, var(--ui-border-divider));
73
73
  }
74
74
 
75
75
  :host-state([side="end"]) {
76
76
  border-inline-end: 0;
77
- border-inline-start: 1px solid var(--ui-sidebar-border, var(--ui-border-divider));
77
+ border-inline-start: var(--ui-border-width) solid var(--ui-sidebar-border, var(--ui-border-divider));
78
78
  }
79
79
 
80
80
  /* The panel's content scrolls, and each edge that hides content fades: the scroll fade every
@@ -149,7 +149,7 @@
149
149
  inset-inline-start: 50%;
150
150
  inline-size: 6px;
151
151
  block-size: 22px;
152
- border: 1px solid var(--ui-border-strong);
152
+ border: var(--ui-border-width) solid var(--ui-border-strong);
153
153
  border-radius: var(--ui-radius-round);
154
154
  background: var(--ui-surface-elevated);
155
155
  opacity: 0;
@@ -36,7 +36,7 @@
36
36
 
37
37
  :host-state([layout="panel"]) {
38
38
  padding: var(--ui-space-6);
39
- border: 1px dashed var(--ui-border-strong);
39
+ border: var(--ui-border-width) dashed var(--ui-border-strong);
40
40
  border-radius: var(--ui-radius-lg);
41
41
  }
42
42
 
@@ -95,7 +95,7 @@
95
95
  width: var(--_ui-switch-track-width, 2.5rem);
96
96
  height: var(--_ui-switch-track-height, 1.5rem);
97
97
  padding: 0;
98
- border: 1px solid var(--ui-control-border, var(--ui-border-strong));
98
+ border: var(--ui-border-width) solid var(--ui-control-border, var(--ui-border-strong));
99
99
  border-radius: var(--ui-radius-round);
100
100
  background-color: var(--ui-control-surface, var(--ui-surface-default));
101
101
  box-shadow: var(--ui-control-inset);
@@ -128,8 +128,8 @@
128
128
  }
129
129
 
130
130
  input:focus-visible {
131
- outline: 2px solid var(--ui-focus-ring, var(--ui-accent-solid));
132
- outline-offset: 2px;
131
+ outline: var(--ui-focus-width) solid var(--ui-focus-ring, var(--ui-accent-solid));
132
+ outline-offset: var(--ui-focus-width);
133
133
  }
134
134
 
135
135
  :host-state([disabled]) {
@@ -51,8 +51,8 @@
51
51
  }
52
52
 
53
53
  :host:focus-visible {
54
- outline: 2px solid var(--ui-focus-ring);
55
- outline-offset: -2px;
54
+ outline: var(--ui-focus-width) solid var(--ui-focus-ring);
55
+ outline-offset: calc(-1 * var(--ui-focus-width));
56
56
  }
57
57
 
58
58
  :host-state([density="compact"]) {
@@ -85,7 +85,7 @@
85
85
  :slotted(td) {
86
86
  block-size: var(--_row-size);
87
87
  padding: var(--_pad-block) var(--_pad-inline);
88
- border-block-end: 1px solid var(--ui-border-subtle);
88
+ border-block-end: var(--ui-border-width) solid var(--ui-border-subtle);
89
89
  text-align: start;
90
90
  vertical-align: middle;
91
91
  }
@@ -94,16 +94,16 @@
94
94
  overflow-y: hidden;
95
95
  overscroll-behavior: contain;
96
96
  scrollbar-width: thin;
97
- border-block-end: 1px solid var(--ui-border-divider);
97
+ border-block-end: var(--ui-border-width) solid var(--ui-border-divider);
98
98
  }
99
99
 
100
100
  .list button,
101
101
  .list > :slotted(button[slot="tab"]) {
102
102
  min-block-size: var(--_ui-tabs-tab-min-block-size, var(--_tab-min-block-size));
103
- margin: 0 0 -1px;
103
+ margin: 0 0 calc(-1 * var(--ui-border-width));
104
104
  padding: var(--_ui-tabs-tab-padding-block, var(--_tab-padding-block)) var(--_ui-tabs-tab-padding-inline, var(--_tab-padding-inline));
105
105
  border: 0;
106
- border-block-end: 2px solid transparent;
106
+ border-block-end: var(--ui-accent-line-width) solid transparent;
107
107
  background: transparent;
108
108
  color: var(--ui-text-secondary);
109
109
  font: inherit;
@@ -153,7 +153,7 @@
153
153
  .list > :slotted(button[slot="tab"]:focus-visible) {
154
154
  position: relative;
155
155
  outline: none;
156
- box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ui-focus-ring) 45%, transparent);
156
+ box-shadow: inset 0 0 0 var(--ui-focus-width) color-mix(in srgb, var(--ui-focus-ring) 45%, transparent);
157
157
  border-radius: var(--ui-radius-sm);
158
158
  }
159
159
 
@@ -173,14 +173,14 @@
173
173
  grid-auto-flow: row;
174
174
  grid-auto-columns: auto;
175
175
  border-block-end: 0;
176
- border-inline-end: 1px solid var(--ui-border-divider);
176
+ border-inline-end: var(--ui-border-width) solid var(--ui-border-divider);
177
177
  }
178
178
 
179
179
  :host-state([orientation="vertical"]) .list button,
180
180
  :host-state([orientation="vertical"]) .list > :slotted(button[slot="tab"]) {
181
- margin: 0 -1px 0 0;
181
+ margin: 0 calc(-1 * var(--ui-border-width)) 0 0;
182
182
  border-block-end: 0;
183
- border-inline-end: 2px solid transparent;
183
+ border-inline-end: var(--ui-accent-line-width) solid transparent;
184
184
  text-align: start;
185
185
  }
186
186