@threadlabs/looma 0.5.1 → 0.6.0-rc.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 (341) hide show
  1. package/README.md +1 -1
  2. package/components/shared/overlay.js +3 -0
  3. package/components/ui-button/ui-button.html +27 -14
  4. package/components/ui-callout/ui-callout.html +1 -1
  5. package/components/ui-checkbox/ui-checkbox.html +1 -1
  6. package/components/ui-cluster/ui-cluster.html +6 -6
  7. package/components/ui-combobox/ui-combobox.html +35 -27
  8. package/components/ui-container/ui-container.html +4 -4
  9. package/components/ui-context-menu/ui-context-menu.html +2 -2
  10. package/components/ui-dialog/ui-dialog.html +21 -8
  11. package/components/ui-disclosure/ui-disclosure.html +19 -4
  12. package/components/ui-editable/ui-editable.html +6 -6
  13. package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +21 -21
  14. package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +26 -26
  15. package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +39 -39
  16. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +26 -22
  17. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +68 -52
  18. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +42 -38
  19. package/components/ui-editor-toolbar/ui-editor-toolbar.html +9 -9
  20. package/components/ui-floating-action-button/ui-floating-action-button.html +16 -22
  21. package/components/ui-form-field/ui-form-field.html +18 -7
  22. package/components/ui-grid/ui-grid.html +6 -6
  23. package/components/ui-icon/ui-icon.html +5 -1
  24. package/components/ui-icon-button/ui-icon-button.html +68 -34
  25. package/components/ui-input/ui-input.html +2 -2
  26. package/components/ui-menu/ui-menu.html +15 -4
  27. package/components/ui-menu-item/ui-menu-item.html +5 -5
  28. package/components/ui-popover/ui-popover.html +3 -3
  29. package/components/ui-popover/ui-popover.js +10 -2
  30. package/components/ui-reel/ui-reel.html +6 -6
  31. package/components/ui-search-result-row/ui-search-result-row.html +9 -9
  32. package/components/ui-search-shell/ui-search-shell.html +10 -3
  33. package/components/ui-search-shell/ui-search-shell.js +9 -0
  34. package/components/ui-select/ui-select.html +2 -2
  35. package/components/ui-sidebar/ui-sidebar.html +11 -11
  36. package/components/ui-stack/ui-stack.html +6 -6
  37. package/components/ui-switcher/ui-switcher.html +6 -6
  38. package/components/ui-tabs/ui-tabs.html +19 -5
  39. package/components/ui-textarea/ui-textarea.html +2 -2
  40. package/components/ui-toast-region/ui-toast-region.html +3 -3
  41. package/components/ui-tooltip/ui-tooltip.html +1 -1
  42. package/components/ui-top-bar/ui-top-bar.html +5 -5
  43. package/components/ui-tree/ui-tree.html +7 -0
  44. package/components/ui-tree-item/ui-tree-item.html +20 -7
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.js +2 -2
  47. package/package.json +2 -2
  48. package/styles/ui-affordance-scope.css +1 -1
  49. package/styles/ui-avatar-group.css +1 -1
  50. package/styles/ui-avatar.css +1 -1
  51. package/styles/ui-badge.css +1 -1
  52. package/styles/ui-button.css +25 -15
  53. package/styles/ui-callout.css +2 -2
  54. package/styles/ui-checkbox.css +2 -2
  55. package/styles/ui-cluster.css +7 -7
  56. package/styles/ui-combobox.css +24 -24
  57. package/styles/ui-container.css +5 -5
  58. package/styles/ui-context-menu.css +3 -3
  59. package/styles/ui-dialog.css +26 -9
  60. package/styles/ui-disclosure.css +23 -7
  61. package/styles/ui-editable.css +7 -7
  62. package/styles/ui-editor-insert-table-grid.css +21 -21
  63. package/styles/ui-editor-mention-menu.css +26 -26
  64. package/styles/ui-editor-slash-menu.css +40 -40
  65. package/styles/ui-editor-table-context-menu.css +21 -21
  66. package/styles/ui-editor-table-overlay.css +49 -49
  67. package/styles/ui-editor-table-toolbar.css +35 -35
  68. package/styles/ui-editor-toolbar.css +10 -10
  69. package/styles/ui-floating-action-button.css +17 -23
  70. package/styles/ui-form-field.css +24 -10
  71. package/styles/ui-grid.css +7 -7
  72. package/styles/ui-icon-button.css +74 -35
  73. package/styles/ui-icon.css +1 -1
  74. package/styles/ui-input.css +3 -3
  75. package/styles/ui-menu-item.css +6 -6
  76. package/styles/ui-menu.css +19 -7
  77. package/styles/ui-popover.css +4 -4
  78. package/styles/ui-radio-group.css +1 -1
  79. package/styles/ui-radio.css +1 -1
  80. package/styles/ui-reel.css +7 -7
  81. package/styles/ui-search-result-row.css +10 -10
  82. package/styles/ui-search-shell.css +14 -5
  83. package/styles/ui-select.css +3 -3
  84. package/styles/ui-separator.css +1 -1
  85. package/styles/ui-sidebar.css +12 -12
  86. package/styles/ui-stack.css +7 -7
  87. package/styles/ui-switch.css +1 -1
  88. package/styles/ui-switcher.css +7 -7
  89. package/styles/ui-tabs.css +21 -7
  90. package/styles/ui-textarea.css +3 -3
  91. package/styles/ui-toast-region.css +3 -3
  92. package/styles/ui-tooltip.css +2 -2
  93. package/styles/ui-top-bar.css +6 -6
  94. package/styles/ui-tree-item.css +30 -9
  95. package/styles/ui-tree.css +8 -2
  96. package/theme-dark.css +42 -103
  97. package/theme-high-contrast.css +18 -22
  98. package/theme-light.css +15 -41
  99. package/tokens.css +149 -201
  100. package/vanilla/UiAffordanceScope.d.ts +1 -1
  101. package/vanilla/UiAffordanceScope.js +2 -2
  102. package/vanilla/UiAvatar.d.ts +1 -1
  103. package/vanilla/UiAvatar.js +2 -2
  104. package/vanilla/UiAvatarGroup.d.ts +1 -1
  105. package/vanilla/UiAvatarGroup.js +2 -2
  106. package/vanilla/UiBadge.d.ts +1 -1
  107. package/vanilla/UiBadge.js +2 -2
  108. package/vanilla/UiButton.d.ts +3 -1
  109. package/vanilla/UiButton.js +3 -3
  110. package/vanilla/UiCallout.d.ts +1 -1
  111. package/vanilla/UiCallout.js +2 -2
  112. package/vanilla/UiCheckbox.d.ts +1 -1
  113. package/vanilla/UiCheckbox.js +2 -2
  114. package/vanilla/UiCluster.d.ts +1 -1
  115. package/vanilla/UiCluster.js +2 -2
  116. package/vanilla/UiCombobox.d.ts +1 -1
  117. package/vanilla/UiCombobox.js +3 -3
  118. package/vanilla/UiContainer.d.ts +1 -1
  119. package/vanilla/UiContainer.js +2 -2
  120. package/vanilla/UiContextMenu.d.ts +1 -1
  121. package/vanilla/UiContextMenu.js +2 -2
  122. package/vanilla/UiDialog.d.ts +1 -1
  123. package/vanilla/UiDialog.js +2 -2
  124. package/vanilla/UiDisclosure.d.ts +2 -1
  125. package/vanilla/UiDisclosure.js +3 -3
  126. package/vanilla/UiEditable.d.ts +1 -1
  127. package/vanilla/UiEditable.js +2 -2
  128. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  129. package/vanilla/UiEditorInsertTableGrid.js +3 -3
  130. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  131. package/vanilla/UiEditorMentionMenu.js +3 -3
  132. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  133. package/vanilla/UiEditorSlashMenu.js +2 -2
  134. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  135. package/vanilla/UiEditorTableContextMenu.js +3 -3
  136. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  137. package/vanilla/UiEditorTableOverlay.js +3 -3
  138. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  139. package/vanilla/UiEditorTableToolbar.js +3 -3
  140. package/vanilla/UiEditorToolbar.d.ts +1 -1
  141. package/vanilla/UiEditorToolbar.js +2 -2
  142. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  143. package/vanilla/UiFloatingActionButton.js +2 -2
  144. package/vanilla/UiFormField.d.ts +1 -1
  145. package/vanilla/UiFormField.js +15 -6
  146. package/vanilla/UiGrid.d.ts +1 -1
  147. package/vanilla/UiGrid.js +2 -2
  148. package/vanilla/UiIcon.d.ts +1 -1
  149. package/vanilla/UiIcon.js +3 -3
  150. package/vanilla/UiIconButton.d.ts +1 -1
  151. package/vanilla/UiIconButton.js +2 -2
  152. package/vanilla/UiInput.d.ts +1 -1
  153. package/vanilla/UiInput.js +2 -2
  154. package/vanilla/UiMenu.d.ts +2 -1
  155. package/vanilla/UiMenu.js +3 -3
  156. package/vanilla/UiMenuItem.d.ts +1 -1
  157. package/vanilla/UiMenuItem.js +2 -2
  158. package/vanilla/UiPopover.d.ts +1 -1
  159. package/vanilla/UiPopover.js +2 -2
  160. package/vanilla/UiRadio.d.ts +1 -1
  161. package/vanilla/UiRadio.js +2 -2
  162. package/vanilla/UiRadioGroup.d.ts +1 -1
  163. package/vanilla/UiRadioGroup.js +2 -2
  164. package/vanilla/UiReel.d.ts +1 -1
  165. package/vanilla/UiReel.js +2 -2
  166. package/vanilla/UiSearchResultRow.d.ts +1 -1
  167. package/vanilla/UiSearchResultRow.js +2 -2
  168. package/vanilla/UiSearchShell.d.ts +1 -1
  169. package/vanilla/UiSearchShell.js +2 -2
  170. package/vanilla/UiSelect.d.ts +1 -1
  171. package/vanilla/UiSelect.js +2 -2
  172. package/vanilla/UiSeparator.d.ts +1 -1
  173. package/vanilla/UiSeparator.js +2 -2
  174. package/vanilla/UiSidebar.d.ts +1 -1
  175. package/vanilla/UiSidebar.js +2 -2
  176. package/vanilla/UiStack.d.ts +1 -1
  177. package/vanilla/UiStack.js +2 -2
  178. package/vanilla/UiSwitch.d.ts +1 -1
  179. package/vanilla/UiSwitch.js +2 -2
  180. package/vanilla/UiSwitcher.d.ts +1 -1
  181. package/vanilla/UiSwitcher.js +2 -2
  182. package/vanilla/UiTabs.d.ts +2 -1
  183. package/vanilla/UiTabs.js +3 -3
  184. package/vanilla/UiTextarea.d.ts +1 -1
  185. package/vanilla/UiTextarea.js +2 -2
  186. package/vanilla/UiToastRegion.d.ts +1 -1
  187. package/vanilla/UiToastRegion.js +3 -3
  188. package/vanilla/UiTooltip.d.ts +1 -1
  189. package/vanilla/UiTooltip.js +2 -2
  190. package/vanilla/UiTopBar.d.ts +1 -1
  191. package/vanilla/UiTopBar.js +1 -1
  192. package/vanilla/UiTree.d.ts +2 -1
  193. package/vanilla/UiTree.js +3 -3
  194. package/vanilla/UiTreeItem.d.ts +1 -1
  195. package/vanilla/UiTreeItem.js +2 -2
  196. package/vue/UiAffordanceScope.d.ts +2 -2
  197. package/vue/UiAffordanceScope.vue +92 -73
  198. package/vue/UiAvatar.d.ts +7 -7
  199. package/vue/UiAvatar.vue +145 -105
  200. package/vue/UiAvatarGroup.d.ts +4 -4
  201. package/vue/UiAvatarGroup.vue +134 -118
  202. package/vue/UiBadge.d.ts +4 -4
  203. package/vue/UiBadge.vue +113 -114
  204. package/vue/UiButton.d.ts +10 -6
  205. package/vue/UiButton.vue +295 -248
  206. package/vue/UiCallout.d.ts +2 -2
  207. package/vue/UiCallout.vue +154 -87
  208. package/vue/UiCheckbox.d.ts +14 -10
  209. package/vue/UiCheckbox.vue +228 -162
  210. package/vue/UiCluster.d.ts +2 -2
  211. package/vue/UiCluster.vue +53 -60
  212. package/vue/UiCombobox.d.ts +36 -32
  213. package/vue/UiCombobox.vue +1005 -416
  214. package/vue/UiContainer.d.ts +2 -2
  215. package/vue/UiContainer.vue +48 -51
  216. package/vue/UiContextMenu.d.ts +6 -4
  217. package/vue/UiContextMenu.vue +205 -116
  218. package/vue/UiDialog.d.ts +11 -9
  219. package/vue/UiDialog.vue +287 -212
  220. package/vue/UiDisclosure.d.ts +10 -6
  221. package/vue/UiDisclosure.vue +265 -159
  222. package/vue/UiEditable.d.ts +16 -12
  223. package/vue/UiEditable.vue +325 -205
  224. package/vue/UiEditorInsertTableGrid.d.ts +8 -8
  225. package/vue/UiEditorInsertTableGrid.vue +216 -157
  226. package/vue/UiEditorMentionMenu.d.ts +9 -9
  227. package/vue/UiEditorMentionMenu.vue +265 -222
  228. package/vue/UiEditorSlashMenu.d.ts +7 -7
  229. package/vue/UiEditorSlashMenu.vue +286 -240
  230. package/vue/UiEditorTableContextMenu.d.ts +5 -5
  231. package/vue/UiEditorTableContextMenu.vue +306 -193
  232. package/vue/UiEditorTableOverlay.d.ts +2 -2
  233. package/vue/UiEditorTableOverlay.vue +600 -369
  234. package/vue/UiEditorTableToolbar.d.ts +7 -7
  235. package/vue/UiEditorTableToolbar.vue +443 -268
  236. package/vue/UiEditorToolbar.d.ts +2 -2
  237. package/vue/UiEditorToolbar.vue +134 -121
  238. package/vue/UiFloatingActionButton.d.ts +6 -6
  239. package/vue/UiFloatingActionButton.vue +95 -99
  240. package/vue/UiFormField.d.ts +6 -6
  241. package/vue/UiFormField.vue +112 -80
  242. package/vue/UiGrid.d.ts +2 -2
  243. package/vue/UiGrid.vue +51 -57
  244. package/vue/UiIcon.d.ts +2 -2
  245. package/vue/UiIcon.vue +118 -89
  246. package/vue/UiIconButton.d.ts +11 -11
  247. package/vue/UiIconButton.vue +287 -217
  248. package/vue/UiInput.d.ts +9 -9
  249. package/vue/UiInput.vue +153 -127
  250. package/vue/UiMenu.d.ts +10 -6
  251. package/vue/UiMenu.vue +227 -143
  252. package/vue/UiMenuItem.d.ts +4 -4
  253. package/vue/UiMenuItem.vue +53 -46
  254. package/vue/UiPopover.d.ts +8 -6
  255. package/vue/UiPopover.vue +197 -137
  256. package/vue/UiRadio.d.ts +14 -10
  257. package/vue/UiRadio.vue +183 -117
  258. package/vue/UiRadioGroup.d.ts +14 -12
  259. package/vue/UiRadioGroup.vue +172 -111
  260. package/vue/UiReel.d.ts +3 -3
  261. package/vue/UiReel.vue +77 -77
  262. package/vue/UiSearchResultRow.d.ts +4 -4
  263. package/vue/UiSearchResultRow.vue +121 -115
  264. package/vue/UiSearchShell.d.ts +10 -8
  265. package/vue/UiSearchShell.vue +245 -176
  266. package/vue/UiSelect.d.ts +9 -9
  267. package/vue/UiSelect.vue +162 -134
  268. package/vue/UiSeparator.d.ts +2 -2
  269. package/vue/UiSeparator.vue +22 -27
  270. package/vue/UiSidebar.d.ts +20 -18
  271. package/vue/UiSidebar.vue +307 -224
  272. package/vue/UiStack.d.ts +3 -3
  273. package/vue/UiStack.vue +64 -70
  274. package/vue/UiSwitch.d.ts +12 -8
  275. package/vue/UiSwitch.vue +218 -150
  276. package/vue/UiSwitcher.d.ts +3 -3
  277. package/vue/UiSwitcher.vue +73 -75
  278. package/vue/UiTabs.d.ts +12 -8
  279. package/vue/UiTabs.vue +268 -210
  280. package/vue/UiTextarea.d.ts +11 -11
  281. package/vue/UiTextarea.vue +155 -128
  282. package/vue/UiToastRegion.d.ts +10 -8
  283. package/vue/UiToastRegion.vue +261 -198
  284. package/vue/UiTooltip.d.ts +14 -12
  285. package/vue/UiTooltip.vue +241 -177
  286. package/vue/UiTopBar.vue +51 -42
  287. package/vue/UiTree.d.ts +10 -6
  288. package/vue/UiTree.vue +180 -70
  289. package/vue/UiTreeItem.d.ts +24 -22
  290. package/vue/UiTreeItem.vue +464 -339
  291. package/vue/chunks/UiAffordanceScope.js +9 -16
  292. package/vue/chunks/UiAvatar.js +23 -29
  293. package/vue/chunks/UiAvatarGroup.js +16 -39
  294. package/vue/chunks/UiBadge.js +3 -12
  295. package/vue/chunks/UiButton.js +15 -18
  296. package/vue/chunks/UiCallout.js +8 -17
  297. package/vue/chunks/UiCheckbox.js +37 -40
  298. package/vue/chunks/UiCluster.js +3 -12
  299. package/vue/chunks/UiCombobox.js +224 -266
  300. package/vue/chunks/UiContainer.js +3 -12
  301. package/vue/chunks/UiContextMenu.js +39 -34
  302. package/vue/chunks/UiDialog.js +36 -39
  303. package/vue/chunks/UiDisclosure.js +44 -48
  304. package/vue/chunks/UiEditable.js +55 -57
  305. package/vue/chunks/UiEditorInsertTableGrid.js +55 -73
  306. package/vue/chunks/UiEditorMentionMenu.js +40 -81
  307. package/vue/chunks/UiEditorSlashMenu.js +28 -52
  308. package/vue/chunks/UiEditorTableContextMenu.js +32 -56
  309. package/vue/chunks/UiEditorTableOverlay.js +58 -82
  310. package/vue/chunks/UiEditorTableToolbar.js +61 -85
  311. package/vue/chunks/UiEditorToolbar.js +4 -13
  312. package/vue/chunks/UiFloatingActionButton.js +7 -21
  313. package/vue/chunks/UiFormField.js +15 -12
  314. package/vue/chunks/UiGrid.js +3 -12
  315. package/vue/chunks/UiIcon.js +20 -43
  316. package/vue/chunks/UiIconButton.js +16 -28
  317. package/vue/chunks/UiInput.js +20 -25
  318. package/vue/chunks/UiMenu.js +30 -33
  319. package/vue/chunks/UiMenuItem.js +4 -10
  320. package/vue/chunks/UiPopover.js +28 -29
  321. package/vue/chunks/UiRadio.js +36 -39
  322. package/vue/chunks/UiRadioGroup.js +30 -34
  323. package/vue/chunks/UiReel.js +6 -15
  324. package/vue/chunks/UiSearchResultRow.js +6 -19
  325. package/vue/chunks/UiSearchShell.js +25 -28
  326. package/vue/chunks/UiSelect.js +20 -23
  327. package/vue/chunks/UiSeparator.js +2 -8
  328. package/vue/chunks/UiSidebar.js +39 -44
  329. package/vue/chunks/UiStack.js +6 -15
  330. package/vue/chunks/UiSwitch.js +35 -38
  331. package/vue/chunks/UiSwitcher.js +6 -15
  332. package/vue/chunks/UiTabs.js +52 -85
  333. package/vue/chunks/UiTextarea.js +21 -26
  334. package/vue/chunks/UiToastRegion.js +38 -72
  335. package/vue/chunks/UiTooltip.js +34 -35
  336. package/vue/chunks/UiTopBar.js +1 -1
  337. package/vue/chunks/UiTree.js +27 -16
  338. package/vue/chunks/UiTreeItem.js +85 -102
  339. package/vue/components.css +4027 -3800
  340. package/vue/editor/LoomaEditor.d.ts +11 -0
  341. package/vue/editor/index.js +9 -0
@@ -8,10 +8,14 @@
8
8
  name="actions"
9
9
  type="list(align-left | align-center | align-right | background-none | background-gray | background-yellow | background-blue | background-green | background-red | add-row-before | add-row-after | add-column-before | add-column-after | clear-cells | merge-cells | split-cell | delete-row | delete-column | delete-table)"
10
10
  >The complete set of commands the current selection permits.</prop>
11
- <state name="alignments" :value="[]"></state>
12
- <state name="structure" :value="[]"></state>
13
- <state name="swatches" :value="[]"></state>
14
- <state name="sections" :value="[]"></state>
11
+ <state name="alignments" type="list(object({ action: align-left | align-center | align-right, label: string, active: boolean }))" :value="[]"></state>
12
+ <state name="structure" type="list(object({ action: add-row-after | add-column-after, label: string, icon: string }))" :value="[]"></state>
13
+ <state name="swatches" type="list(object({ action: string, label: string, color: string, selected: boolean }))" :value="[]"></state>
14
+ <state
15
+ name="sections"
16
+ type="list(object({ heading: string, items: list(object({ action: string, label: string, icon: string, danger: boolean })) }))"
17
+ :value="[]"
18
+ ></state>
15
19
  <state name="hasOverflow" :value="false"></state>
16
20
  <state name="overflowOpen" :value="false"></state>
17
21
  <event
@@ -97,13 +101,13 @@
97
101
 
98
102
  .looma-editor__mobile-toolbar-shell :host button.active,
99
103
  .looma-editor__mobile-toolbar-shell :host button.selected {
100
- background: var(--ui-accent-soft, var(--ui-accent-subtle, #e8f0fb));
104
+ background: var(--ui-accent-soft, var(--ui-accent-subtle));
101
105
  }
102
106
 
103
107
  .looma-editor__mobile-toolbar-shell :host .menu {
104
108
  top: auto;
105
109
  right: 0;
106
- bottom: calc(100% + var(--ui-space-2, 8px));
110
+ bottom: calc(100% + var(--ui-space-2));
107
111
  max-height: min(50dvh, 22rem);
108
112
  overflow-y: auto;
109
113
  overscroll-behavior: contain;
@@ -111,11 +115,11 @@
111
115
  :host {
112
116
  display: inline-flex;
113
117
  align-items: center;
114
- gap: var(--ui-space-1, 4px);
115
- padding: var(--ui-space-1, 4px);
116
- background: color-mix(in srgb, var(--ui-surface, #fff) 94%, transparent);
117
- border: 1px solid var(--ui-border, #e5e7eb);
118
- border-radius: calc(var(--ui-radius-md, 6px) + 2px);
118
+ gap: var(--ui-space-1);
119
+ padding: var(--ui-space-1);
120
+ background: color-mix(in srgb, var(--ui-surface) 94%, transparent);
121
+ border: 1px solid var(--ui-border);
122
+ border-radius: calc(var(--ui-radius-md) + 2px);
119
123
  box-shadow: var(--ui-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
120
124
  backdrop-filter: blur(10px);
121
125
  }
@@ -130,7 +134,7 @@
130
134
  .sep {
131
135
  width: 1px;
132
136
  align-self: stretch;
133
- background: var(--ui-border, #e5e7eb);
137
+ background: var(--ui-border);
134
138
  }
135
139
 
136
140
  .overflow {
@@ -141,31 +145,31 @@
141
145
  display: inline-flex;
142
146
  align-items: center;
143
147
  justify-content: center;
144
- gap: var(--ui-space-1-5, 6px);
148
+ gap: var(--ui-space-2);
145
149
  min-height: 32px;
146
150
  border: 0;
147
- border-radius: var(--ui-radius-sm, 4px);
151
+ border-radius: var(--ui-radius-sm);
148
152
  background: transparent;
149
- color: var(--ui-text-primary, #111827);
153
+ color: var(--ui-text-primary);
150
154
  cursor: pointer;
151
- font-size: var(--ui-text-sm, 0.875rem);
155
+ font-size: var(--ui-font-size-sm);
152
156
  font-weight: 500;
153
157
  line-height: 1;
154
- padding: var(--ui-space-1-5, 6px) var(--ui-space-2, 8px);
158
+ padding: var(--ui-space-2) var(--ui-space-2);
155
159
  white-space: nowrap;
156
160
  }
157
161
 
158
162
  :host button:hover {
159
- background: var(--ui-surface-hover, #f3f4f6);
163
+ background: var(--ui-surface-hover);
160
164
  }
161
165
 
162
166
  :host button.active {
163
- background: var(--ui-accent-soft, var(--ui-accent-subtle, #e8f0fb));
164
- color: var(--ui-accent-active, #003d7a);
167
+ background: var(--ui-accent-soft, var(--ui-accent-subtle));
168
+ color: var(--ui-accent-active);
165
169
  }
166
170
 
167
171
  .group button {
168
- border-radius: var(--ui-radius-sm, 4px);
172
+ border-radius: var(--ui-radius-sm);
169
173
  }
170
174
 
171
175
  .group button + button {
@@ -174,11 +178,11 @@
174
178
 
175
179
  :host .more {
176
180
  border: 0;
177
- border-radius: var(--ui-radius-sm, 4px);
181
+ border-radius: var(--ui-radius-sm);
178
182
  }
179
183
 
180
184
  :host button.danger {
181
- color: var(--ui-danger, #dc2626);
185
+ color: var(--ui-danger);
182
186
  }
183
187
 
184
188
  :host {
@@ -198,13 +202,13 @@
198
202
 
199
203
  .menu {
200
204
  position: absolute;
201
- top: calc(100% + var(--ui-space-2, 8px));
205
+ top: calc(100% + var(--ui-space-2));
202
206
  right: 0;
203
207
  min-width: 12rem;
204
- padding: var(--ui-space-1, 4px);
205
- background: var(--ui-surface, #fff);
206
- border: 1px solid var(--ui-border, #e5e7eb);
207
- border-radius: var(--ui-radius-md, 6px);
208
+ padding: var(--ui-space-1);
209
+ background: var(--ui-surface);
210
+ border: 1px solid var(--ui-border);
211
+ border-radius: var(--ui-radius-md);
208
212
  box-shadow: var(--ui-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
209
213
  display: flex;
210
214
  flex-direction: column;
@@ -213,18 +217,18 @@
213
217
  }
214
218
 
215
219
  .menu-section + .menu-section {
216
- margin-top: var(--ui-space-1, 4px);
217
- padding-top: var(--ui-space-1, 4px);
218
- border-top: 1px solid color-mix(in srgb, var(--ui-border, #e5e7eb) 80%, transparent);
220
+ margin-top: var(--ui-space-1);
221
+ padding-top: var(--ui-space-1);
222
+ border-top: 1px solid color-mix(in srgb, var(--ui-border) 80%, transparent);
219
223
  }
220
224
 
221
225
  .menu-heading {
222
- padding: var(--ui-space-1, 4px) var(--ui-space-2, 8px);
226
+ padding: var(--ui-space-1) var(--ui-space-2);
223
227
  font-size: 0.6875rem;
224
228
  font-weight: 700;
225
229
  letter-spacing: 0.05em;
226
230
  text-transform: uppercase;
227
- color: var(--ui-text-muted, #6b7280);
231
+ color: var(--ui-text-muted);
228
232
  }
229
233
 
230
234
  .menu button {
@@ -241,7 +245,7 @@
241
245
  }
242
246
 
243
247
  :host .swatch-button {
244
- gap: var(--ui-space-1, 4px);
248
+ gap: var(--ui-space-1);
245
249
  justify-content: flex-start;
246
250
  }
247
251
 
@@ -249,19 +253,19 @@
249
253
  width: 14px;
250
254
  height: 14px;
251
255
  flex: 0 0 14px;
252
- border: 1px solid color-mix(in srgb, var(--ui-border, #e5e7eb) 80%, #000);
256
+ border: 1px solid color-mix(in srgb, var(--ui-border) 80%, #000);
253
257
  border-radius: 3px;
254
258
  background: var(--ui-editor-table-toolbar-swatch);
255
259
  }
256
260
 
257
261
  .swatch.default {
258
262
  background:
259
- linear-gradient(135deg, transparent 44%, var(--ui-danger, #dc2626) 46% 54%, transparent 56%),
260
- var(--ui-surface, #fff);
263
+ linear-gradient(135deg, transparent 44%, var(--ui-danger) 46% 54%, transparent 56%),
264
+ var(--ui-surface);
261
265
  }
262
266
 
263
267
  .swatch-button.selected {
264
- background: var(--ui-accent-soft, var(--ui-accent-subtle, #e8f0fb));
268
+ background: var(--ui-accent-soft, var(--ui-accent-subtle));
265
269
  }
266
270
 
267
271
  :host[hidden] {
@@ -17,8 +17,8 @@
17
17
  overflow-x: auto;
18
18
  scrollbar-width: none;
19
19
  white-space: nowrap;
20
- background: var(--ui-editor-toolbar-bg, var(--ui-surface, #fff));
21
- border-bottom: 1px solid var(--ui-editor-toolbar-border, var(--ui-border, #e5e7eb));
20
+ background: var(--ui-editor-toolbar-surface, var(--ui-surface));
21
+ border-bottom: 1px solid var(--ui-editor-toolbar-border, var(--ui-border));
22
22
  }
23
23
 
24
24
  :host::-webkit-scrollbar {
@@ -32,7 +32,7 @@
32
32
  :slotted(.divider) {
33
33
  width: 1px;
34
34
  height: 20px;
35
- background: var(--ui-editor-toolbar-divider, var(--ui-border, #e5e7eb));
35
+ background: var(--ui-editor-toolbar-divider, var(--ui-border));
36
36
  flex-shrink: 0;
37
37
  margin: 0 var(--ui-editor-toolbar-divider-margin, 4px);
38
38
  }
@@ -45,9 +45,9 @@
45
45
  min-height: auto;
46
46
  padding: var(--ui-editor-toolbar-floating-padding, 4px);
47
47
  overflow-x: visible;
48
- background: color-mix(in srgb, var(--ui-editor-toolbar-bg, var(--ui-surface, #fff)) 96%, transparent);
49
- border: 1px solid var(--ui-editor-toolbar-border, var(--ui-border, #e5e7eb));
50
- border-radius: var(--ui-editor-toolbar-floating-radius, var(--ui-radius-lg, 10px));
48
+ background: color-mix(in srgb, var(--ui-editor-toolbar-surface, var(--ui-surface)) 96%, transparent);
49
+ border: 1px solid var(--ui-editor-toolbar-border, var(--ui-border));
50
+ border-radius: var(--ui-editor-toolbar-floating-radius, var(--ui-radius-lg));
51
51
  box-shadow: var(--ui-editor-toolbar-floating-shadow, var(--ui-shadow-lg, 0 10px 24px rgb(0 0 0 / 0.12)));
52
52
  backdrop-filter: blur(10px);
53
53
  }
@@ -60,7 +60,7 @@
60
60
  left: 0;
61
61
  right: 0;
62
62
  min-height: var(--ui-editor-toolbar-mobile-min-height, 56px);
63
- border-top: 1px solid var(--ui-editor-toolbar-border, var(--ui-border, #e5e7eb));
63
+ border-top: 1px solid var(--ui-editor-toolbar-border, var(--ui-border));
64
64
  border-bottom: none;
65
65
  box-shadow: var(--ui-editor-toolbar-mobile-shadow, 0 -2px 8px rgb(0 0 0 / 0.06));
66
66
  }
@@ -69,8 +69,8 @@
69
69
  position: static;
70
70
  inset: auto;
71
71
  min-height: auto;
72
- border: 1px solid var(--ui-editor-toolbar-border, var(--ui-border, #e5e7eb));
73
- border-radius: var(--ui-editor-toolbar-floating-radius, var(--ui-radius-lg, 10px));
72
+ border: 1px solid var(--ui-editor-toolbar-border, var(--ui-border));
73
+ border-radius: var(--ui-editor-toolbar-floating-radius, var(--ui-radius-lg));
74
74
  box-shadow: var(--ui-editor-toolbar-floating-shadow, var(--ui-shadow-lg, 0 10px 24px rgb(0 0 0 / 0.12)));
75
75
  }
76
76
  }
@@ -8,13 +8,13 @@
8
8
  <style>
9
9
  :host {
10
10
  position: fixed;
11
- inset-block-end: calc(var(--ui-floating-action-button-bottom, var(--ui-space-6, 1.5rem)) + env(safe-area-inset-bottom));
11
+ inset-block-end: calc(var(--ui-floating-action-button-inset-block-end, var(--ui-space-6)) + env(safe-area-inset-bottom));
12
12
  inset-inline-end: max(
13
- var(--ui-floating-action-button-inline-end, var(--ui-space-5, 1.25rem)),
13
+ var(--ui-floating-action-button-inset-inline-end, var(--ui-space-5)),
14
14
  env(safe-area-inset-right)
15
15
  );
16
- inline-size: var(--ui-floating-action-button-size, 56px);
17
- block-size: var(--ui-floating-action-button-size, 56px);
16
+ inline-size: var(--ui-control-min-block-size);
17
+ block-size: var(--ui-control-min-block-size);
18
18
  display: inline-flex;
19
19
  z-index: var(--ui-floating-action-button-z-index, 100);
20
20
  }
@@ -28,33 +28,27 @@
28
28
  display: inline-flex;
29
29
  align-items: center;
30
30
  justify-content: center;
31
- background: var(--ui-floating-action-button-bg, var(--ui-accent-solid));
32
- color: var(--ui-floating-action-button-color, var(--ui-text-on-accent));
33
- box-shadow: var(
34
- --ui-floating-action-button-shadow,
35
- 0 4px 12px color-mix(in srgb, var(--ui-accent-solid) 40%, transparent)
36
- );
31
+ background: var(--ui-accent);
32
+ color: var(--ui-on-accent);
33
+ box-shadow: 0 4px 12px color-mix(in srgb, var(--ui-accent) 40%, transparent);
37
34
  cursor: pointer;
38
35
  transition:
39
- background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease),
40
- transform var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease),
41
- box-shadow var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease);
36
+ background-color var(--ui-motion-fast) var(--ui-motion-ease),
37
+ transform var(--ui-motion-fast) var(--ui-motion-ease),
38
+ box-shadow var(--ui-motion-fast) var(--ui-motion-ease);
42
39
  }
43
40
 
44
41
  :host:hover:enabled {
45
- background: var(--ui-floating-action-button-hover-bg, var(--ui-accent-hover));
46
- box-shadow: var(
47
- --ui-floating-action-button-hover-shadow,
48
- 0 6px 16px color-mix(in srgb, var(--ui-accent-solid) 50%, transparent)
49
- );
42
+ background: var(--ui-accent-hover);
43
+ box-shadow: 0 6px 16px color-mix(in srgb, var(--ui-accent) 50%, transparent);
50
44
  }
51
45
 
52
46
  :host:active:enabled {
53
- transform: scale(var(--ui-floating-action-button-active-scale, 0.94));
47
+ transform: scale(0.94);
54
48
  }
55
49
 
56
50
  :host:focus-visible {
57
- outline: 2px solid var(--ui-focus-ring, currentColor);
51
+ outline: 2px solid var(--ui-focus-ring);
58
52
  outline-offset: 2px;
59
53
  }
60
54
 
@@ -64,8 +58,8 @@
64
58
  }
65
59
 
66
60
  :slotted(svg) {
67
- inline-size: var(--ui-floating-action-button-icon-size, 24px);
68
- block-size: var(--ui-floating-action-button-icon-size, 24px);
61
+ inline-size: var(--ui-icon-size-lg);
62
+ block-size: var(--ui-icon-size-lg);
69
63
  flex-shrink: 0;
70
64
  }
71
65
 
@@ -5,10 +5,10 @@
5
5
  <prop name="required" type="boolean" default="false">required token.</prop>
6
6
  </defs>
7
7
  <div>
8
- <slot name="label"></slot>
8
+ <div class="label"><slot name="label"></slot></div>
9
9
  <slot></slot>
10
- <slot name="help"></slot>
11
- <slot name="error"></slot>
10
+ <div class="help"><slot name="help"></slot></div>
11
+ <div class="error"><slot name="error"></slot></div>
12
12
  </div>
13
13
  <style>
14
14
  :host {
@@ -19,19 +19,30 @@
19
19
  color: var(--ui-text-primary);
20
20
  }
21
21
 
22
- :slotted([slot="label"]) {
22
+ /* Each named region styles whatever fills it, however it was slotted (slot="…" in HTML, #label
23
+ in Vue), and generates no box of its own, so an empty region adds no gap. */
24
+ .label,
25
+ .help,
26
+ .error {
27
+ display: contents;
28
+ }
29
+
30
+ .label {
23
31
  color: var(--ui-text-secondary);
24
32
  font-size: 0.95rem;
25
33
  }
26
34
 
27
- :slotted([slot="help"]) {
28
- min-block-size: var(--ui-form-field-help-min-block-size, 0);
35
+ .help {
29
36
  color: var(--ui-text-muted);
30
37
  font-size: 0.875rem;
31
38
  line-height: var(--ui-line-height-md);
32
39
  }
33
40
 
34
- :slotted([slot="error"]),
41
+ .help > :slotted(*) {
42
+ min-block-size: var(--ui-form-field-help-min-block-size, 0);
43
+ }
44
+
45
+ .error,
35
46
  :slotted([role="alert"]) {
36
47
  color: var(--ui-accent-active);
37
48
  font-size: 0.875rem;
@@ -6,7 +6,7 @@
6
6
  <div><slot></slot></div>
7
7
  <style>
8
8
  :host {
9
- --_grid-gap: var(--ui-space-4, 1rem);
9
+ --_grid-gap: var(--ui-space-4);
10
10
  --_grid-min: 12rem;
11
11
  display: grid;
12
12
  gap: var(--ui-grid-gap, var(--_grid-gap));
@@ -17,19 +17,19 @@
17
17
  }
18
18
 
19
19
  :host-state([gap="xs"]) {
20
- --_grid-gap: var(--ui-space-2, 0.5rem);
20
+ --_grid-gap: var(--ui-space-2);
21
21
  }
22
22
  :host-state([gap="s"]) {
23
- --_grid-gap: var(--ui-space-3, 0.75rem);
23
+ --_grid-gap: var(--ui-space-3);
24
24
  }
25
25
  :host-state([gap="m"]) {
26
- --_grid-gap: var(--ui-space-4, 1rem);
26
+ --_grid-gap: var(--ui-space-4);
27
27
  }
28
28
  :host-state([gap="l"]) {
29
- --_grid-gap: var(--ui-space-5, 1.5rem);
29
+ --_grid-gap: var(--ui-space-5);
30
30
  }
31
31
  :host-state([gap="xl"]) {
32
- --_grid-gap: var(--ui-space-6, 2rem);
32
+ --_grid-gap: var(--ui-space-6);
33
33
  }
34
34
  :host-state([min="md"]) {
35
35
  --_grid-min: 16rem;
@@ -1,7 +1,11 @@
1
1
  <template component="ui-icon" controller="./ui-icon.js">
2
2
  <defs>
3
3
  <prop name="name" type="string" default="">The icon's name.</prop>
4
- <state name="shapes" :value="[]"></state>
4
+ <state
5
+ name="shapes"
6
+ type="list(object({ tag: path | circle | rect, d?: string, cx?: string, cy?: string, r?: string, x?: string, y?: string, width?: string, height?: string, rx?: string }))"
7
+ :value="[]"
8
+ ></state>
5
9
  </defs>
6
10
  <span aria-hidden="true">
7
11
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" focusable="false">
@@ -23,11 +23,11 @@
23
23
  position: absolute;
24
24
  inset: 50% auto auto 50%;
25
25
  z-index: 1;
26
- inline-size: var(--ui-affordance-guide-size, 0.25rem);
27
- block-size: var(--ui-affordance-guide-size, 0.25rem);
28
- border-radius: var(--ui-radius-round, 999px);
26
+ inline-size: var(--ui-affordance-guide-size);
27
+ block-size: var(--ui-affordance-guide-size);
28
+ border-radius: var(--ui-radius-round);
29
29
  background: var(--ui-affordance-guide-color, var(--ui-border-strong));
30
- opacity: var(--ui-affordance-guide-opacity, 0.42);
30
+ opacity: var(--ui-affordance-guide-opacity);
31
31
  transform: translate(-50%, -50%);
32
32
  transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
33
33
  pointer-events: none;
@@ -50,16 +50,18 @@
50
50
  }
51
51
 
52
52
  :host {
53
+ /* The size prop resolves here; --ui-icon-button-size overrides it on an element. */
54
+ --_size: 2rem;
53
55
  appearance: none;
54
- inline-size: var(--ui-icon-button-size, 2rem);
55
- block-size: var(--ui-icon-button-size, 2rem);
56
- min-inline-size: var(--ui-icon-button-size, 2rem);
57
- min-block-size: var(--ui-icon-button-size, 2rem);
56
+ inline-size: var(--ui-icon-button-size, var(--_size));
57
+ block-size: var(--ui-icon-button-size, var(--_size));
58
+ min-inline-size: var(--ui-icon-button-size, var(--_size));
59
+ min-block-size: var(--ui-icon-button-size, var(--_size));
58
60
  padding: 0;
59
61
  margin: 0;
60
62
  border: 1px solid transparent;
61
- border-radius: var(--ui-icon-button-radius, var(--ui-radius-2));
62
- background: var(--ui-icon-button-bg, transparent);
63
+ border-radius: var(--ui-icon-button-radius, var(--ui-radius-md));
64
+ background: var(--ui-icon-button-surface, transparent);
63
65
  color: inherit;
64
66
  display: inline-flex;
65
67
  align-items: center;
@@ -79,33 +81,65 @@
79
81
  }
80
82
  }
81
83
 
84
+ /* A touch target without a bigger button: an invisible hit area, at least the control
85
+ minimum, centred on the button (::before is the anticipatory guide). */
86
+ @media (pointer: coarse) {
87
+ :host {
88
+ position: relative;
89
+ }
90
+
91
+ :host::after {
92
+ content: "";
93
+ position: absolute;
94
+ inset: 50% auto auto 50%;
95
+ inline-size: max(100%, var(--ui-control-min-block-size));
96
+ block-size: max(100%, var(--ui-control-min-block-size));
97
+ transform: translate(-50%, -50%);
98
+ }
99
+ }
100
+
101
+ html[data-ui-input-modality="touch"] :host {
102
+ position: relative;
103
+ }
104
+
105
+ html[data-ui-input-modality="touch"] :host::after {
106
+ content: "";
107
+ position: absolute;
108
+ inset: 50% auto auto 50%;
109
+ inline-size: max(100%, var(--ui-control-min-block-size));
110
+ block-size: max(100%, var(--ui-control-min-block-size));
111
+ transform: translate(-50%, -50%);
112
+ }
113
+
82
114
  :host-state([size="sm"]) {
83
- inline-size: var(--ui-icon-button-size-sm, 1.75rem);
84
- block-size: var(--ui-icon-button-size-sm, 1.75rem);
85
- min-inline-size: var(--ui-icon-button-size-sm, 1.75rem);
86
- min-block-size: var(--ui-icon-button-size-sm, 1.75rem);
115
+ --_size: 1.75rem;
116
+ inline-size: var(--ui-icon-button-size, var(--_size));
117
+ block-size: var(--ui-icon-button-size, var(--_size));
118
+ min-inline-size: var(--ui-icon-button-size, var(--_size));
119
+ min-block-size: var(--ui-icon-button-size, var(--_size));
87
120
  }
88
121
 
89
122
  :host-state([size="lg"]) {
90
- inline-size: var(--ui-icon-button-size-lg, 2.5rem);
91
- block-size: var(--ui-icon-button-size-lg, 2.5rem);
92
- min-inline-size: var(--ui-icon-button-size-lg, 2.5rem);
93
- min-block-size: var(--ui-icon-button-size-lg, 2.5rem);
123
+ --_size: 2.5rem;
124
+ inline-size: var(--ui-icon-button-size, var(--_size));
125
+ block-size: var(--ui-icon-button-size, var(--_size));
126
+ min-inline-size: var(--ui-icon-button-size, var(--_size));
127
+ min-block-size: var(--ui-icon-button-size, var(--_size));
94
128
  }
95
129
 
96
130
  :host-state([round]) {
97
- border-radius: var(--ui-radius-round, 999px);
131
+ border-radius: var(--ui-radius-round);
98
132
  }
99
133
 
100
134
  :host-state([variant="outline"]) {
101
135
  border-color: var(--ui-icon-button-border, var(--ui-border-default));
102
- background: var(--ui-icon-button-outline-bg, var(--ui-surface-default));
103
- color: var(--ui-icon-button-outline-color, var(--ui-text-primary));
136
+ background: var(--ui-icon-button-outline-surface, var(--ui-surface-default));
137
+ color: var(--ui-icon-button-outline-text, var(--ui-text-primary));
104
138
  }
105
139
 
106
140
  :host-state([variant="solid"]) {
107
- background: var(--ui-icon-button-solid-bg, var(--ui-accent-solid));
108
- color: var(--ui-icon-button-solid-color, var(--ui-text-on-accent));
141
+ background: var(--ui-icon-button-solid-surface, var(--ui-accent-solid));
142
+ color: var(--ui-icon-button-solid-text, var(--ui-text-on-accent));
109
143
  box-shadow: var(
110
144
  --ui-icon-button-solid-shadow,
111
145
  0 1px 2px color-mix(in srgb, var(--ui-accent-solid) 18%, transparent)
@@ -114,8 +148,8 @@
114
148
 
115
149
  :host:hover:enabled {
116
150
  /* Derived from the text colour so the ghost hover shows on any background. */
117
- background: var(--ui-icon-button-hover-bg, color-mix(in srgb, currentColor 8%, transparent));
118
- color: var(--ui-icon-button-hover-color, var(--ui-text-primary));
151
+ background: var(--ui-icon-button-hover-surface, color-mix(in srgb, currentColor 8%, transparent));
152
+ color: var(--ui-icon-button-hover-text, var(--ui-text-primary));
119
153
  }
120
154
 
121
155
  :host-state([variant="outline"]):hover:enabled {
@@ -123,7 +157,7 @@
123
157
  }
124
158
 
125
159
  :host-state([variant="solid"]):hover:enabled {
126
- background: var(--ui-icon-button-solid-hover-bg, var(--ui-accent-hover));
160
+ background: var(--ui-icon-button-solid-hover-surface, var(--ui-accent-hover));
127
161
  }
128
162
 
129
163
  :host:active:enabled {
@@ -138,31 +172,31 @@
138
172
  /* Disabled colours fall back to each variant's own; ghost takes only the icon colour. */
139
173
  :host:disabled {
140
174
  opacity: var(--ui-icon-button-disabled-opacity, 0.6);
141
- color: var(--ui-icon-button-disabled-color, inherit);
175
+ color: var(--ui-icon-button-disabled-text, inherit);
142
176
  cursor: not-allowed;
143
177
  }
144
178
 
145
179
  :host-state([variant="outline"]):disabled {
146
180
  border-color: var(--ui-icon-button-disabled-border, var(--ui-icon-button-border, var(--ui-border-default)));
147
- background-color: var(--ui-icon-button-disabled-bg, var(--ui-icon-button-outline-bg, var(--ui-surface-default)));
148
- color: var(--ui-icon-button-disabled-color, var(--ui-icon-button-outline-color, var(--ui-text-primary)));
181
+ background-color: var(--ui-icon-button-disabled-surface, var(--ui-icon-button-outline-surface, var(--ui-surface-default)));
182
+ color: var(--ui-icon-button-disabled-text, var(--ui-icon-button-outline-text, var(--ui-text-primary)));
149
183
  }
150
184
 
151
185
  :host-state([variant="solid"]):disabled {
152
- background-color: var(--ui-icon-button-disabled-bg, var(--ui-icon-button-solid-bg, var(--ui-accent-solid)));
153
- color: var(--ui-icon-button-disabled-color, var(--ui-icon-button-solid-color, var(--ui-text-on-accent)));
186
+ background-color: var(--ui-icon-button-disabled-surface, var(--ui-icon-button-solid-surface, var(--ui-accent-solid)));
187
+ color: var(--ui-icon-button-disabled-text, var(--ui-icon-button-solid-text, var(--ui-text-on-accent)));
154
188
  }
155
189
 
156
190
  :host {
157
- --_icon-button-icon-default: var(--ui-icon-size-md, 1.25rem);
191
+ --_icon-button-icon-default: var(--ui-icon-size-md);
158
192
  }
159
193
 
160
194
  :host-state([size="sm"]) {
161
- --_icon-button-icon-default: var(--ui-icon-size-sm, 1rem);
195
+ --_icon-button-icon-default: var(--ui-icon-size-sm);
162
196
  }
163
197
 
164
198
  :host-state([size="lg"]) {
165
- --_icon-button-icon-default: var(--ui-icon-size-lg, 1.5rem);
199
+ --_icon-button-icon-default: var(--ui-icon-size-lg);
166
200
  }
167
201
 
168
202
  :slotted(svg) {
@@ -13,12 +13,12 @@
13
13
  display: inline-block;
14
14
  inline-size: 100%;
15
15
  min-inline-size: 0;
16
- min-block-size: var(--ui-control-size-md, 2.5rem);
16
+ min-block-size: var(--ui-control-size-md);
17
17
  margin: 0;
18
18
  padding: var(--ui-space-2) var(--ui-space-3);
19
19
  appearance: none;
20
20
  border: 1px solid var(--ui-control-border, var(--ui-border-strong));
21
- border-radius: var(--ui-input-radius, var(--ui-radius-2));
21
+ border-radius: var(--ui-input-radius, var(--ui-radius-md));
22
22
  background: var(--ui-control-surface, var(--ui-surface-elevated));
23
23
  color: var(--ui-text-primary);
24
24
  font: inherit;
@@ -1,5 +1,6 @@
1
1
  <template component="ui-menu" controller="./ui-menu.js">
2
2
  <defs>
3
+ <prop name="density" type="comfortable | compact" default="comfortable">Compact trades padding and type size for rows that fit more on screen.</prop>
3
4
  <prop name="open" type="boolean" default="false">Whether the menu is open initially or when set externally.</prop>
4
5
  <prop name="for" type="string" default="">ID of the control that toggles and anchors the menu.</prop>
5
6
  <prop name="placement" type="string" default="bottom-start">Positions an associated menu relative to its trigger.</prop>
@@ -13,13 +14,23 @@
13
14
  </defs>
14
15
  <div role="menu" aria-orientation="vertical"><div class="surface"><slot></slot></div></div>
15
16
  <style>
17
+ /* Compact sets the part tokens its items read, so nothing has to rescale a global. */
18
+ :host-state([density="compact"]) {
19
+ --ui-menu-item-padding-block: var(--ui-space-1);
20
+ --ui-menu-item-padding-inline: var(--ui-space-2);
21
+ --ui-menu-item-font-size: var(--ui-font-size-sm);
22
+ --ui-menu-item-radius: var(--ui-radius-sm);
23
+ padding: var(--ui-space-1);
24
+ gap: 0;
25
+ }
26
+
16
27
  :host {
17
28
  display: flex;
18
29
  flex-direction: column;
19
30
  box-sizing: border-box;
20
31
  inline-size: max-content;
21
- min-inline-size: min(12rem, calc(100vw - var(--ui-menu-viewport-gap, var(--ui-space-2, 0.5rem)) * 2));
22
- max-inline-size: calc(100vw - var(--ui-menu-viewport-gap, var(--ui-space-2, 0.5rem)) * 2);
32
+ min-inline-size: min(12rem, calc(100vw - var(--ui-menu-viewport-gap, var(--ui-space-2)) * 2));
33
+ max-inline-size: calc(100vw - var(--ui-menu-viewport-gap, var(--ui-space-2)) * 2);
23
34
  padding: 0;
24
35
  border: 0;
25
36
  outline: 0;
@@ -37,7 +48,7 @@
37
48
  padding: var(--ui-space-1);
38
49
  background: var(--ui-surface-elevated);
39
50
  border: 1px solid var(--ui-border-default);
40
- border-radius: var(--ui-radius-3);
51
+ border-radius: var(--ui-radius-lg);
41
52
  box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
42
53
  max-block-size: inherit;
43
54
  overflow: auto;
@@ -52,7 +63,7 @@
52
63
  inset: auto;
53
64
  margin: 0;
54
65
  overflow: visible;
55
- max-block-size: calc(100dvh - var(--ui-menu-viewport-gap, var(--ui-space-2, 0.5rem)) * 2);
66
+ max-block-size: calc(100dvh - var(--ui-menu-viewport-gap, var(--ui-space-2)) * 2);
56
67
  opacity: 0;
57
68
  transform: translateY(-4px) scale(0.99);
58
69
  transition: