@threadlabs/looma 0.32.0 → 0.33.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 (337) hide show
  1. package/components/shared/icons.js +1 -0
  2. package/components/shared/overlay.js +1 -1
  3. package/components/ui-action-bar/ui-action-bar.html +11 -11
  4. package/components/ui-affordance-scope/ui-affordance-scope.html +2 -2
  5. package/components/ui-avatar/ui-avatar.html +8 -8
  6. package/components/ui-avatar-group/ui-avatar-group.html +14 -14
  7. package/components/ui-avatar-group/ui-avatar-group.js +3 -2
  8. package/components/ui-badge/ui-badge.html +43 -43
  9. package/components/ui-breadcrumb-item/ui-breadcrumb-item.html +13 -13
  10. package/components/ui-breadcrumbs/ui-breadcrumbs.html +8 -8
  11. package/components/ui-button/ui-button.html +32 -29
  12. package/components/ui-callout/ui-callout.html +9 -9
  13. package/components/ui-card/ui-card.html +11 -11
  14. package/components/ui-checkbox/ui-checkbox.html +52 -33
  15. package/components/ui-cluster/ui-cluster.html +21 -21
  16. package/components/ui-color-picker/ui-color-picker.html +135 -0
  17. package/components/ui-color-picker/ui-color-picker.js +76 -0
  18. package/components/ui-combobox/ui-combobox.html +43 -43
  19. package/components/ui-container/ui-container.html +7 -7
  20. package/components/ui-context-menu/ui-context-menu.html +9 -9
  21. package/components/ui-cover/ui-cover.html +8 -8
  22. package/components/ui-description-item/ui-description-item.html +7 -7
  23. package/components/ui-description-list/ui-description-list.html +4 -4
  24. package/components/ui-dialog/ui-dialog.html +26 -26
  25. package/components/ui-disclosure/ui-disclosure.html +23 -23
  26. package/components/ui-editable/ui-editable.html +16 -16
  27. package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +9 -9
  28. package/components/ui-editor-link-form/ui-editor-link-form.html +1 -2
  29. package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +23 -23
  30. package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +10 -10
  31. package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +29 -29
  32. package/components/ui-editor-slash-menu-group/ui-editor-slash-menu-group.html +5 -5
  33. package/components/ui-editor-slash-menu-item/ui-editor-slash-menu-item.html +11 -11
  34. package/components/ui-editor-surface/ui-editor-surface.html +2 -2
  35. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +25 -25
  36. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +13 -13
  37. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +31 -31
  38. package/components/ui-editor-toolbar/ui-editor-toolbar.html +13 -13
  39. package/components/ui-floating-action-button/ui-floating-action-button.html +8 -8
  40. package/components/ui-form-field/ui-form-field.html +15 -15
  41. package/components/ui-form-field/ui-form-field.js +12 -4
  42. package/components/ui-grid/ui-grid.html +4 -4
  43. package/components/ui-icon/ui-icon.html +3 -2
  44. package/components/ui-icon-button/ui-icon-button.html +15 -14
  45. package/components/ui-image/ui-image.html +14 -14
  46. package/components/ui-input/ui-input.html +8 -8
  47. package/components/ui-input-group/ui-input-group.html +18 -18
  48. package/components/ui-list/ui-list.html +11 -11
  49. package/components/ui-list-item/ui-list-item.html +18 -18
  50. package/components/ui-listbox/ui-listbox.html +10 -10
  51. package/components/ui-menu/ui-menu.html +18 -17
  52. package/components/ui-menu-group/ui-menu-group.html +4 -4
  53. package/components/ui-menu-item/ui-menu-item.html +20 -20
  54. package/components/ui-meter/ui-meter.html +5 -5
  55. package/components/ui-nav-item/ui-nav-item.html +20 -20
  56. package/components/ui-page-header/ui-page-header.html +18 -17
  57. package/components/ui-popover/ui-popover.html +8 -8
  58. package/components/ui-radio/ui-radio.html +25 -17
  59. package/components/ui-radio-group/ui-radio-group.html +10 -10
  60. package/components/ui-reel/ui-reel.html +5 -5
  61. package/components/ui-scroll-area/ui-scroll-area.html +10 -10
  62. package/components/ui-search-result-row/ui-search-result-row.html +19 -19
  63. package/components/ui-search-shell/ui-search-shell.html +22 -22
  64. package/components/ui-section/ui-section.html +24 -23
  65. package/components/ui-select/ui-select.html +10 -10
  66. package/components/ui-separator/ui-separator.html +2 -2
  67. package/components/ui-sidebar/ui-sidebar.html +8 -8
  68. package/components/ui-spinner/ui-spinner.html +6 -6
  69. package/components/ui-stack/ui-stack.html +12 -12
  70. package/components/ui-status-message/ui-status-message.html +17 -17
  71. package/components/ui-swatch/ui-swatch.html +2 -2
  72. package/components/ui-switch/ui-switch.html +36 -26
  73. package/components/ui-switcher/ui-switcher.html +7 -7
  74. package/components/ui-table/ui-table.html +6 -6
  75. package/components/ui-tabs/ui-tabs.html +16 -15
  76. package/components/ui-text/ui-text.html +3 -2
  77. package/components/ui-textarea/ui-textarea.html +10 -10
  78. package/components/ui-toast/ui-toast.html +9 -9
  79. package/components/ui-toast-region/ui-toast-region.html +12 -12
  80. package/components/ui-tooltip/ui-tooltip.html +15 -15
  81. package/components/ui-top-bar/ui-top-bar.html +11 -11
  82. package/components/ui-tree/ui-tree.html +5 -5
  83. package/components/ui-tree-item/ui-tree-item.html +36 -36
  84. package/dist/index.js +46 -45
  85. package/editor/chunks/extensions.js +17 -1
  86. package/editor/extensions/slash-command.d.ts +1 -1
  87. package/editor/file-uploads.d.ts +31 -0
  88. package/editor/icons.d.ts +1 -0
  89. package/editor/index.js +2 -1
  90. package/package.json +3 -2
  91. package/styles/ui-action-bar.css +11 -11
  92. package/styles/ui-affordance-scope.css +2 -2
  93. package/styles/ui-avatar-group.css +14 -14
  94. package/styles/ui-avatar.css +8 -8
  95. package/styles/ui-badge.css +41 -41
  96. package/styles/ui-breadcrumb-item.css +13 -13
  97. package/styles/ui-breadcrumbs.css +8 -8
  98. package/styles/ui-button.css +30 -28
  99. package/styles/ui-callout.css +9 -9
  100. package/styles/ui-card.css +11 -11
  101. package/styles/ui-checkbox.css +52 -33
  102. package/styles/ui-cluster.css +21 -21
  103. package/styles/ui-color-picker.css +120 -0
  104. package/styles/ui-combobox.css +86 -86
  105. package/styles/ui-container.css +7 -7
  106. package/styles/ui-context-menu.css +9 -9
  107. package/styles/ui-cover.css +8 -8
  108. package/styles/ui-description-item.css +7 -7
  109. package/styles/ui-description-list.css +4 -4
  110. package/styles/ui-dialog.css +52 -52
  111. package/styles/ui-disclosure.css +23 -23
  112. package/styles/ui-editable.css +16 -16
  113. package/styles/ui-editor-insert-table-grid.css +9 -9
  114. package/styles/ui-editor-mention-menu-item.css +10 -10
  115. package/styles/ui-editor-mention-menu.css +23 -23
  116. package/styles/ui-editor-slash-menu-group.css +5 -5
  117. package/styles/ui-editor-slash-menu-item.css +11 -11
  118. package/styles/ui-editor-slash-menu.css +29 -29
  119. package/styles/ui-editor-surface.css +2 -2
  120. package/styles/ui-editor-table-context-menu.css +25 -25
  121. package/styles/ui-editor-table-overlay.css +13 -13
  122. package/styles/ui-editor-table-toolbar.css +31 -31
  123. package/styles/ui-editor-toolbar.css +13 -13
  124. package/styles/ui-floating-action-button.css +8 -8
  125. package/styles/ui-form-field.css +13 -13
  126. package/styles/ui-grid.css +4 -4
  127. package/styles/ui-icon-button.css +13 -13
  128. package/styles/ui-icon.css +2 -2
  129. package/styles/ui-image.css +14 -14
  130. package/styles/ui-input-group.css +18 -18
  131. package/styles/ui-input.css +8 -8
  132. package/styles/ui-list-item.css +18 -18
  133. package/styles/ui-list.css +11 -11
  134. package/styles/ui-listbox.css +20 -20
  135. package/styles/ui-menu-group.css +4 -4
  136. package/styles/ui-menu-item.css +20 -20
  137. package/styles/ui-menu.css +16 -16
  138. package/styles/ui-meter.css +5 -5
  139. package/styles/ui-nav-item.css +20 -20
  140. package/styles/ui-page-header.css +18 -17
  141. package/styles/ui-popover.css +8 -8
  142. package/styles/ui-radio-group.css +10 -10
  143. package/styles/ui-radio.css +26 -18
  144. package/styles/ui-reel.css +5 -5
  145. package/styles/ui-scroll-area.css +10 -10
  146. package/styles/ui-search-result-row.css +19 -19
  147. package/styles/ui-search-shell.css +22 -22
  148. package/styles/ui-section.css +24 -23
  149. package/styles/ui-select.css +10 -10
  150. package/styles/ui-separator.css +2 -2
  151. package/styles/ui-sidebar.css +8 -8
  152. package/styles/ui-spinner.css +6 -6
  153. package/styles/ui-stack.css +12 -12
  154. package/styles/ui-status-message.css +17 -17
  155. package/styles/ui-swatch.css +2 -2
  156. package/styles/ui-switch.css +36 -28
  157. package/styles/ui-switcher.css +7 -7
  158. package/styles/ui-table.css +6 -6
  159. package/styles/ui-tabs.css +11 -11
  160. package/styles/ui-text.css +3 -2
  161. package/styles/ui-textarea.css +10 -10
  162. package/styles/ui-toast-region.css +24 -24
  163. package/styles/ui-toast.css +18 -18
  164. package/styles/ui-tooltip.css +15 -15
  165. package/styles/ui-top-bar.css +11 -11
  166. package/styles/ui-tree-item.css +71 -71
  167. package/styles/ui-tree.css +5 -5
  168. package/theme-system.css +80 -0
  169. package/tokens.css +14 -3
  170. package/vanilla/UiColorPicker.d.ts +30 -0
  171. package/vanilla/UiColorPicker.js +77 -0
  172. package/vanilla/UiIcon.js +1 -1
  173. package/vanilla/index.js +1 -0
  174. package/vue/UiActionBar.vue +11 -11
  175. package/vue/UiAffordanceScope.vue +2 -2
  176. package/vue/UiAvatar.vue +8 -8
  177. package/vue/UiAvatarGroup.vue +14 -14
  178. package/vue/UiBadge.vue +43 -42
  179. package/vue/UiBreadcrumbItem.vue +13 -13
  180. package/vue/UiBreadcrumbs.vue +8 -8
  181. package/vue/UiButton.vue +34 -29
  182. package/vue/UiCallout.vue +9 -9
  183. package/vue/UiCard.vue +11 -11
  184. package/vue/UiCheckbox.vue +57 -34
  185. package/vue/UiCluster.vue +21 -21
  186. package/vue/UiColorPicker.d.ts +65 -0
  187. package/vue/UiColorPicker.js +2 -0
  188. package/vue/UiColorPicker.vue +422 -0
  189. package/vue/UiCombobox.vue +86 -86
  190. package/vue/UiContainer.vue +7 -7
  191. package/vue/UiContextMenu.vue +9 -9
  192. package/vue/UiCover.vue +8 -8
  193. package/vue/UiDescriptionItem.vue +7 -7
  194. package/vue/UiDescriptionList.vue +4 -4
  195. package/vue/UiDialog.vue +52 -52
  196. package/vue/UiDisclosure.vue +23 -23
  197. package/vue/UiEditable.vue +16 -16
  198. package/vue/UiEditorInsertTableGrid.vue +9 -9
  199. package/vue/UiEditorMentionMenu.vue +23 -23
  200. package/vue/UiEditorMentionMenuItem.vue +10 -10
  201. package/vue/UiEditorSlashMenu.vue +29 -29
  202. package/vue/UiEditorSlashMenuGroup.vue +5 -5
  203. package/vue/UiEditorSlashMenuItem.vue +11 -11
  204. package/vue/UiEditorSurface.vue +2 -2
  205. package/vue/UiEditorTableContextMenu.vue +25 -25
  206. package/vue/UiEditorTableOverlay.vue +13 -13
  207. package/vue/UiEditorTableToolbar.vue +31 -31
  208. package/vue/UiEditorToolbar.vue +13 -13
  209. package/vue/UiFloatingActionButton.vue +8 -8
  210. package/vue/UiFormField.vue +14 -14
  211. package/vue/UiGrid.vue +4 -4
  212. package/vue/UiIcon.vue +6 -2
  213. package/vue/UiIconButton.vue +14 -14
  214. package/vue/UiImage.vue +14 -14
  215. package/vue/UiInput.vue +9 -8
  216. package/vue/UiInputGroup.vue +18 -18
  217. package/vue/UiList.vue +11 -11
  218. package/vue/UiListItem.vue +18 -18
  219. package/vue/UiListbox.vue +20 -20
  220. package/vue/UiMenu.vue +16 -16
  221. package/vue/UiMenuGroup.vue +4 -4
  222. package/vue/UiMenuItem.vue +20 -20
  223. package/vue/UiMeter.vue +5 -5
  224. package/vue/UiNavItem.vue +20 -20
  225. package/vue/UiPageHeader.vue +18 -17
  226. package/vue/UiPopover.vue +8 -8
  227. package/vue/UiRadio.vue +28 -17
  228. package/vue/UiRadioGroup.vue +10 -10
  229. package/vue/UiReel.vue +5 -5
  230. package/vue/UiScrollArea.vue +10 -10
  231. package/vue/UiSearchResultRow.vue +19 -19
  232. package/vue/UiSearchShell.vue +22 -22
  233. package/vue/UiSection.vue +24 -23
  234. package/vue/UiSelect.vue +11 -10
  235. package/vue/UiSeparator.vue +2 -2
  236. package/vue/UiSidebar.vue +8 -8
  237. package/vue/UiSpinner.vue +6 -6
  238. package/vue/UiStack.vue +12 -12
  239. package/vue/UiStatusMessage.vue +17 -17
  240. package/vue/UiSwatch.vue +2 -2
  241. package/vue/UiSwitch.vue +38 -25
  242. package/vue/UiSwitcher.vue +7 -7
  243. package/vue/UiTable.vue +6 -6
  244. package/vue/UiTabs.vue +13 -13
  245. package/vue/UiText.vue +3 -2
  246. package/vue/UiTextarea.vue +10 -10
  247. package/vue/UiToast.vue +18 -18
  248. package/vue/UiToastRegion.vue +24 -24
  249. package/vue/UiTooltip.vue +15 -15
  250. package/vue/UiTopBar.vue +11 -11
  251. package/vue/UiTree.vue +5 -5
  252. package/vue/UiTreeItem.vue +73 -71
  253. package/vue/chunks/UiActionBar.js +1 -1
  254. package/vue/chunks/UiAffordanceScope.js +1 -1
  255. package/vue/chunks/UiAvatar.js +1 -1
  256. package/vue/chunks/UiAvatarGroup.js +1 -1
  257. package/vue/chunks/UiBadge.js +2 -2
  258. package/vue/chunks/UiBreadcrumbItem.js +1 -1
  259. package/vue/chunks/UiBreadcrumbs.js +1 -1
  260. package/vue/chunks/UiButton.js +2 -2
  261. package/vue/chunks/UiCallout.js +1 -1
  262. package/vue/chunks/UiCard.js +1 -1
  263. package/vue/chunks/UiCheckbox.js +1 -1
  264. package/vue/chunks/UiCluster.js +1 -1
  265. package/vue/chunks/UiColorPicker.js +326 -0
  266. package/vue/chunks/UiCombobox.js +1 -1
  267. package/vue/chunks/UiContainer.js +1 -1
  268. package/vue/chunks/UiContextMenu.js +1 -1
  269. package/vue/chunks/UiCover.js +1 -1
  270. package/vue/chunks/UiDescriptionItem.js +1 -1
  271. package/vue/chunks/UiDescriptionList.js +1 -1
  272. package/vue/chunks/UiDialog.js +1 -1
  273. package/vue/chunks/UiDisclosure.js +1 -1
  274. package/vue/chunks/UiEditable.js +1 -1
  275. package/vue/chunks/UiEditorImageToolbar.js +1 -1
  276. package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
  277. package/vue/chunks/UiEditorLinkForm.js +1 -1
  278. package/vue/chunks/UiEditorMentionMenu.js +1 -1
  279. package/vue/chunks/UiEditorMentionMenuItem.js +1 -1
  280. package/vue/chunks/UiEditorSlashMenu.js +1 -1
  281. package/vue/chunks/UiEditorSlashMenuGroup.js +1 -1
  282. package/vue/chunks/UiEditorSlashMenuItem.js +1 -1
  283. package/vue/chunks/UiEditorSurface.js +1 -1
  284. package/vue/chunks/UiEditorTableContextMenu.js +1 -1
  285. package/vue/chunks/UiEditorTableOverlay.js +1 -1
  286. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  287. package/vue/chunks/UiEditorToolbar.js +1 -1
  288. package/vue/chunks/UiFloatingActionButton.js +1 -1
  289. package/vue/chunks/UiFormField.js +2 -2
  290. package/vue/chunks/UiGrid.js +1 -1
  291. package/vue/chunks/UiIcon.js +5 -1
  292. package/vue/chunks/UiIconButton.js +2 -2
  293. package/vue/chunks/UiImage.js +1 -1
  294. package/vue/chunks/UiInput.js +1 -1
  295. package/vue/chunks/UiInputGroup.js +1 -1
  296. package/vue/chunks/UiList.js +1 -1
  297. package/vue/chunks/UiListItem.js +1 -1
  298. package/vue/chunks/UiListbox.js +1 -1
  299. package/vue/chunks/UiMenu.js +1 -1
  300. package/vue/chunks/UiMenuGroup.js +1 -1
  301. package/vue/chunks/UiMenuItem.js +1 -1
  302. package/vue/chunks/UiMeter.js +1 -1
  303. package/vue/chunks/UiNavItem.js +1 -1
  304. package/vue/chunks/UiPageHeader.js +1 -1
  305. package/vue/chunks/UiPopover.js +1 -1
  306. package/vue/chunks/UiRadio.js +1 -1
  307. package/vue/chunks/UiRadioGroup.js +1 -1
  308. package/vue/chunks/UiReel.js +1 -1
  309. package/vue/chunks/UiScrollArea.js +1 -1
  310. package/vue/chunks/UiSearchResultRow.js +1 -1
  311. package/vue/chunks/UiSearchShell.js +1 -1
  312. package/vue/chunks/UiSection.js +1 -1
  313. package/vue/chunks/UiSelect.js +1 -1
  314. package/vue/chunks/UiSeparator.js +1 -1
  315. package/vue/chunks/UiSidebar.js +1 -1
  316. package/vue/chunks/UiSpinner.js +1 -1
  317. package/vue/chunks/UiStack.js +1 -1
  318. package/vue/chunks/UiStatusMessage.js +1 -1
  319. package/vue/chunks/UiSwatch.js +1 -1
  320. package/vue/chunks/UiSwitch.js +1 -1
  321. package/vue/chunks/UiSwitcher.js +1 -1
  322. package/vue/chunks/UiTable.js +1 -1
  323. package/vue/chunks/UiTabs.js +3 -3
  324. package/vue/chunks/UiText.js +1 -1
  325. package/vue/chunks/UiTextarea.js +1 -1
  326. package/vue/chunks/UiToast.js +1 -1
  327. package/vue/chunks/UiToastRegion.js +1 -1
  328. package/vue/chunks/UiTooltip.js +1 -1
  329. package/vue/chunks/UiTopBar.js +1 -1
  330. package/vue/chunks/UiTree.js +1 -1
  331. package/vue/chunks/UiTreeItem.js +1 -1
  332. package/vue/components.css +1857 -1654
  333. package/vue/editor/LoomaEditor.d.ts +18 -2
  334. package/vue/editor/index.d.ts +2 -1
  335. package/vue/editor/index.js +147 -16
  336. package/vue/index.d.ts +1 -0
  337. package/vue/index.js +3 -2
@@ -83,42 +83,42 @@
83
83
  :host[popover] {
84
84
  position: fixed;
85
85
  inset: auto;
86
- margin: 0;
86
+ margin: 0 !important;
87
87
  }
88
88
 
89
89
  :host {
90
90
  /* The max-width is a promise about the menu's footprint, so it counts padding and border. */
91
- box-sizing: border-box;
91
+ box-sizing: border-box !important;
92
92
  min-width: min(14rem, calc(100vw - 24px));
93
93
  max-width: min(17rem, calc(100vw - 24px));
94
94
  max-height: min(28rem, calc(100vh - 24px));
95
- padding: var(--ui-space-2);
95
+ padding: var(--ui-space-2) !important;
96
96
  background: var(--ui-surface);
97
97
  border: var(--ui-border-width) solid var(--ui-border-strong);
98
98
  border-radius: var(--ui-radius-lg);
99
99
  box-shadow: var(--ui-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
100
- display: flex;
101
- flex-direction: column;
102
- gap: 2px;
100
+ display: flex !important;
101
+ flex-direction: column !important;
102
+ gap: 2px !important;
103
103
  overflow-y: auto;
104
104
  overscroll-behavior: contain;
105
105
  scrollbar-width: thin;
106
106
  }
107
107
 
108
108
  .section {
109
- display: flex;
110
- flex-direction: column;
111
- gap: 3px;
109
+ display: flex !important;
110
+ flex-direction: column !important;
111
+ gap: 3px !important;
112
112
  }
113
113
 
114
114
  :host button {
115
- display: flex;
116
- align-items: center;
117
- gap: var(--ui-space-2);
115
+ display: flex !important;
116
+ align-items: center !important;
117
+ gap: var(--ui-space-2) !important;
118
118
  width: 100%;
119
119
  text-align: left;
120
120
  min-height: 32px;
121
- padding: var(--ui-space-2) var(--ui-space-2);
121
+ padding: var(--ui-space-2) var(--ui-space-2) !important;
122
122
  border: none;
123
123
  border-radius: var(--ui-radius-sm);
124
124
  background: none;
@@ -146,24 +146,24 @@
146
146
 
147
147
  /* Swatches wrap like words: the row asks for the menu's full width, and a narrower menu fits fewer. */
148
148
  .swatches {
149
- display: flex;
150
- flex-wrap: wrap;
151
- gap: 3px;
149
+ display: flex !important;
150
+ flex-wrap: wrap !important;
151
+ gap: 3px !important;
152
152
  }
153
153
 
154
154
  /* Three to a row at the menu's full width; 5rem keeps the longest label, "Default", whole. */
155
155
  :host .swatch-button {
156
- display: inline-flex;
157
- align-items: center;
158
- gap: var(--ui-space-2);
156
+ display: inline-flex !important;
157
+ align-items: center !important;
158
+ gap: var(--ui-space-2) !important;
159
159
  flex: 1 0 5rem;
160
160
  min-width: 5rem;
161
161
  max-width: calc((100% - 6px) / 3);
162
- padding-inline-end: var(--ui-space-1);
162
+ padding-inline-end: var(--ui-space-1) !important;
163
163
  }
164
164
 
165
165
  .swatch {
166
- display: inline-flex;
166
+ display: inline-flex !important;
167
167
  width: 1rem;
168
168
  height: 1rem;
169
169
  border-radius: var(--ui-radius-round);
@@ -192,7 +192,7 @@
192
192
  }
193
193
 
194
194
  .heading {
195
- padding: var(--ui-space-1) var(--ui-space-2);
195
+ padding: var(--ui-space-1) var(--ui-space-2) !important;
196
196
  font-size: var(--ui-font-size-2xs);
197
197
  font-weight: 700;
198
198
  letter-spacing: 0.05em;
@@ -203,16 +203,16 @@
203
203
  .sep {
204
204
  height: 1px;
205
205
  background: var(--ui-border-divider);
206
- margin: var(--ui-space-1) 0;
206
+ margin: var(--ui-space-1) 0 !important;
207
207
  }
208
208
 
209
209
  /* Separators divide sections, so none sits above the first. */
210
210
  .sep:first-child {
211
- display: none;
211
+ display: none !important;
212
212
  }
213
213
 
214
214
  :host[hidden] {
215
- display: none;
215
+ display: none !important;
216
216
  }
217
217
  </style>
218
218
  </template>
@@ -199,7 +199,7 @@
199
199
  </div>
200
200
  <style>
201
201
  :host {
202
- display: block;
202
+ display: block !important;
203
203
  width: 100%;
204
204
  height: 100%;
205
205
  overflow: visible;
@@ -238,12 +238,12 @@
238
238
 
239
239
  .handle {
240
240
  position: absolute;
241
- display: inline-flex;
242
- align-items: center;
243
- justify-content: center;
241
+ display: inline-flex !important;
242
+ align-items: center !important;
243
+ justify-content: center !important;
244
244
  width: 24px;
245
245
  height: 24px;
246
- padding: 0;
246
+ padding: 0 !important;
247
247
  border: var(--ui-border-width) solid var(--ui-affordance-near-color, var(--ui-border-strong));
248
248
  border-radius: var(--ui-radius-round);
249
249
  background: color-mix(in srgb, var(--ui-surface-elevated) 96%, transparent);
@@ -366,7 +366,7 @@
366
366
  left: 50%;
367
367
  width: max-content;
368
368
  max-width: 14rem;
369
- padding: var(--ui-space-1) var(--ui-space-2);
369
+ padding: var(--ui-space-1) var(--ui-space-2) !important;
370
370
  border-radius: var(--ui-radius-sm);
371
371
  background: var(--ui-text-primary);
372
372
  color: var(--ui-surface-elevated);
@@ -395,10 +395,10 @@
395
395
  .cell-menu {
396
396
  position: absolute;
397
397
  z-index: 2;
398
- display: inline-flex;
399
- align-items: center;
400
- justify-content: center;
401
- padding: 0;
398
+ display: inline-flex !important;
399
+ align-items: center !important;
400
+ justify-content: center !important;
401
+ padding: 0 !important;
402
402
  border: var(--ui-border-width) solid transparent;
403
403
  background: transparent;
404
404
  color: var(--ui-text-secondary);
@@ -442,7 +442,7 @@
442
442
  }
443
443
 
444
444
  .selector .glyph {
445
- display: block;
445
+ display: block !important;
446
446
  width: 14px;
447
447
  height: 14px;
448
448
  --_ui-default-icon-size: 14px;
@@ -533,11 +533,11 @@
533
533
  }
534
534
 
535
535
  .drop-indicator[hidden] {
536
- display: none;
536
+ display: none !important;
537
537
  }
538
538
 
539
539
  :host[hidden] {
540
- display: none;
540
+ display: none !important;
541
541
  }
542
542
  </style>
543
543
  </template>
@@ -122,7 +122,7 @@
122
122
  .looma-editor__mobile-toolbar-shell :host {
123
123
  min-width: max-content;
124
124
  min-height: 100%;
125
- padding: 0;
125
+ padding: 0 !important;
126
126
  background: transparent;
127
127
  border: 0;
128
128
  border-radius: 0;
@@ -141,10 +141,10 @@
141
141
  }
142
142
 
143
143
  :host {
144
- display: inline-flex;
145
- align-items: center;
146
- gap: var(--ui-space-1);
147
- padding: var(--ui-space-1);
144
+ display: inline-flex !important;
145
+ align-items: center !important;
146
+ gap: var(--ui-space-1) !important;
147
+ padding: var(--ui-space-1) !important;
148
148
  background: color-mix(in srgb, var(--ui-surface) 94%, transparent);
149
149
  border: var(--ui-border-width) solid var(--ui-border-strong);
150
150
  border-radius: calc(var(--ui-radius-md) + 2 * var(--ui-border-width));
@@ -153,9 +153,9 @@
153
153
  }
154
154
 
155
155
  .group {
156
- display: inline-flex;
157
- align-items: center;
158
- gap: 2px;
156
+ display: inline-flex !important;
157
+ align-items: center !important;
158
+ gap: 2px !important;
159
159
  overflow: hidden;
160
160
  }
161
161
 
@@ -170,10 +170,10 @@
170
170
  }
171
171
 
172
172
  :host button {
173
- display: inline-flex;
174
- align-items: center;
175
- justify-content: center;
176
- gap: var(--ui-space-2);
173
+ display: inline-flex !important;
174
+ align-items: center !important;
175
+ justify-content: center !important;
176
+ gap: var(--ui-space-2) !important;
177
177
  min-height: 32px;
178
178
  border: 0;
179
179
  border-radius: var(--ui-radius-sm);
@@ -183,7 +183,7 @@
183
183
  font-size: var(--ui-font-size-sm);
184
184
  font-weight: 500;
185
185
  line-height: 1;
186
- padding: var(--ui-space-2) var(--ui-space-2);
186
+ padding: var(--ui-space-2) var(--ui-space-2) !important;
187
187
  white-space: nowrap;
188
188
  }
189
189
 
@@ -219,30 +219,30 @@
219
219
  }
220
220
 
221
221
  .chevron {
222
- display: inline-flex;
222
+ display: inline-flex !important;
223
223
  --_ui-default-icon-size: 0.875rem;
224
224
  }
225
225
 
226
226
  :host .icon-button {
227
227
  width: 32px;
228
- padding-inline: 0;
228
+ padding-inline: 0 !important;
229
229
  }
230
230
 
231
231
  .menu {
232
- box-sizing: border-box;
232
+ box-sizing: border-box !important;
233
233
  position: fixed;
234
234
  inset: auto;
235
- margin: 0;
235
+ margin: 0 !important;
236
236
  min-width: 12rem;
237
237
  max-width: min(17rem, calc(100vw - 24px));
238
- padding: var(--ui-space-1);
238
+ padding: var(--ui-space-1) !important;
239
239
  background: var(--ui-surface);
240
240
  border: var(--ui-border-width) solid var(--ui-border-strong);
241
241
  border-radius: var(--ui-radius-md);
242
242
  box-shadow: var(--ui-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
243
- display: flex;
244
- flex-direction: column;
245
- gap: 2px;
243
+ display: flex !important;
244
+ flex-direction: column !important;
245
+ gap: 2px !important;
246
246
  z-index: 2;
247
247
  overflow-y: auto;
248
248
  overscroll-behavior: contain;
@@ -250,13 +250,13 @@
250
250
  }
251
251
 
252
252
  .menu-section + .menu-section {
253
- margin-top: var(--ui-space-1);
254
- padding-top: var(--ui-space-1);
253
+ margin-top: var(--ui-space-1) !important;
254
+ padding-top: var(--ui-space-1) !important;
255
255
  border-top: var(--ui-border-width) solid var(--ui-border-divider);
256
256
  }
257
257
 
258
258
  .menu-heading {
259
- padding: var(--ui-space-1) var(--ui-space-2);
259
+ padding: var(--ui-space-1) var(--ui-space-2) !important;
260
260
  font-size: var(--ui-font-size-2xs);
261
261
  font-weight: 700;
262
262
  letter-spacing: 0.05em;
@@ -265,21 +265,21 @@
265
265
  }
266
266
 
267
267
  .menu button {
268
- display: flex;
269
- justify-content: flex-start;
268
+ display: flex !important;
269
+ justify-content: flex-start !important;
270
270
  width: 100%;
271
271
  text-align: left;
272
272
  }
273
273
 
274
274
  .swatches {
275
- display: grid;
275
+ display: grid !important;
276
276
  grid-template-columns: repeat(2, minmax(0, 1fr));
277
- gap: 2px;
277
+ gap: 2px !important;
278
278
  }
279
279
 
280
280
  :host .swatch-button {
281
- gap: var(--ui-space-1);
282
- justify-content: flex-start;
281
+ gap: var(--ui-space-1) !important;
282
+ justify-content: flex-start !important;
283
283
  }
284
284
 
285
285
  .swatch {
@@ -302,7 +302,7 @@
302
302
  }
303
303
 
304
304
  :host[hidden] {
305
- display: none;
305
+ display: none !important;
306
306
  }
307
307
  </style>
308
308
  </template>
@@ -8,9 +8,9 @@
8
8
  position: sticky;
9
9
  top: 0;
10
10
  z-index: var(--ui-editor-toolbar-z-index, 10);
11
- display: flex;
12
- align-items: center;
13
- padding: var(--ui-editor-toolbar-padding-block, 6px) var(--ui-editor-toolbar-padding-inline, 12px);
11
+ display: flex !important;
12
+ align-items: center !important;
13
+ padding: var(--ui-editor-toolbar-padding-block, 6px) var(--ui-editor-toolbar-padding-inline, 12px) !important;
14
14
  min-height: var(--ui-editor-toolbar-min-height, 48px);
15
15
  background: var(--ui-editor-toolbar-surface, var(--ui-surface));
16
16
  border-bottom: var(--ui-border-width) solid var(--ui-editor-toolbar-border, var(--ui-border-divider));
@@ -19,11 +19,11 @@
19
19
  /* One row, always. When the controls outgrow the space, the row scrolls sideways rather than
20
20
  wrapping into several lines, and a fade at each edge that has more to show says so. */
21
21
  .strip {
22
- display: flex;
22
+ display: flex !important;
23
23
  flex: 1 1 auto;
24
- align-items: center;
25
- justify-content: flex-start;
26
- gap: var(--ui-editor-toolbar-gap, 2px);
24
+ align-items: center !important;
25
+ justify-content: flex-start !important;
26
+ gap: var(--ui-editor-toolbar-gap, 2px) !important;
27
27
  min-width: 0;
28
28
  overflow-x: auto;
29
29
  overflow-y: hidden;
@@ -32,7 +32,7 @@
32
32
  }
33
33
 
34
34
  .strip::-webkit-scrollbar {
35
- display: none;
35
+ display: none !important;
36
36
  }
37
37
 
38
38
  .strip > :slotted(*) {
@@ -69,17 +69,17 @@
69
69
  height: 20px;
70
70
  background: var(--ui-editor-toolbar-divider, var(--ui-border-divider));
71
71
  flex-shrink: 0;
72
- margin: 0 var(--ui-editor-toolbar-divider-margin, 4px);
72
+ margin: 0 var(--ui-editor-toolbar-divider-margin, 4px) !important;
73
73
  }
74
74
 
75
75
  :host([floating]) {
76
- box-sizing: border-box;
76
+ box-sizing: border-box !important;
77
77
  position: relative;
78
78
  top: auto;
79
79
  width: max-content;
80
80
  max-width: min(calc(100vw - 24px), 100%);
81
81
  min-height: auto;
82
- padding: var(--ui-editor-toolbar-floating-padding, 4px);
82
+ padding: var(--ui-editor-toolbar-floating-padding, 4px) !important;
83
83
  background: color-mix(in srgb, var(--ui-editor-toolbar-surface, var(--ui-surface)) 96%, transparent);
84
84
  border: var(--ui-border-width) solid var(--ui-editor-toolbar-border, var(--ui-border-strong));
85
85
  border-radius: var(--ui-editor-toolbar-floating-radius, var(--ui-radius-lg));
@@ -124,7 +124,7 @@
124
124
  width: 100%;
125
125
  max-width: none;
126
126
  min-height: 100%;
127
- padding: 0;
127
+ padding: 0 !important;
128
128
  background: transparent;
129
129
  border: 0;
130
130
  border-radius: 0;
@@ -138,7 +138,7 @@
138
138
 
139
139
  /* A component that sets its display still honours the hidden attribute on its root. */
140
140
  :host[hidden] {
141
- display: none;
141
+ display: none !important;
142
142
  }
143
143
  </style>
144
144
  </template>
@@ -31,7 +31,7 @@
31
31
  );
32
32
  inline-size: var(--ui-control-min-block-size);
33
33
  block-size: var(--ui-control-min-block-size);
34
- display: inline-flex;
34
+ display: inline-flex !important;
35
35
  z-index: var(--ui-floating-action-button-z-index, 100);
36
36
  }
37
37
 
@@ -39,11 +39,11 @@
39
39
  appearance: none;
40
40
  border: none;
41
41
  border-radius: var(--ui-radius-round);
42
- margin: 0;
43
- padding: 0;
44
- display: inline-flex;
45
- align-items: center;
46
- justify-content: center;
42
+ margin: 0 !important;
43
+ padding: 0 !important;
44
+ display: inline-flex !important;
45
+ align-items: center !important;
46
+ justify-content: center !important;
47
47
  background: var(--ui-accent);
48
48
  color: var(--ui-on-accent);
49
49
  box-shadow: 0 4px 12px color-mix(in srgb, var(--ui-accent) 40%, transparent);
@@ -83,13 +83,13 @@
83
83
 
84
84
  @media (min-width: 768px) {
85
85
  :host([mobileOnly]) {
86
- display: none;
86
+ display: none !important;
87
87
  }
88
88
  }
89
89
 
90
90
  /* A component that sets its display still honours the hidden attribute on its root. */
91
91
  :host[hidden] {
92
- display: none;
92
+ display: none !important;
93
93
  }
94
94
  </style>
95
95
  </template>
@@ -4,8 +4,8 @@
4
4
  >Marks the field's control invalid by setting aria-invalid on it. Only while invalid, the error slot appears and becomes part of the control's
5
5
  description.</prop>
6
6
  <prop name="disabled" type="boolean" default="false"
7
- >Disables the field's control: the first input, textarea, or select inside it. The field writes this to the control whenever it updates, so set it here
8
- rather than on the control.</prop>
7
+ >Disables the control named by the label's for attribute, or the first field control inside it. Composite controls supply their focus target and form value.
8
+ The field writes this to the control whenever it updates, so set it here rather than on the control.</prop>
9
9
  <prop name="required" type="boolean" default="false"
10
10
  >Marks the field's control required, for native form validation. Like disabled, it is written to the control, so set it here rather than on the control. It
11
11
  adds no visual marker; show one in the label if the form needs it.</prop>
@@ -59,10 +59,10 @@
59
59
  --_ui-form-field-help-text: var(--ui-form-field-help-text);
60
60
  --_ui-form-field-help-font-size: var(--ui-form-field-help-font-size);
61
61
 
62
- display: grid;
63
- gap: var(--ui-space-2);
62
+ display: grid !important;
63
+ gap: var(--ui-space-2) !important;
64
64
  min-inline-size: var(--ui-form-field-min-inline-size, 0);
65
- align-content: start;
65
+ align-content: start !important;
66
66
  color: var(--ui-text-primary);
67
67
  }
68
68
 
@@ -71,7 +71,7 @@
71
71
  .label,
72
72
  .help,
73
73
  .error {
74
- display: contents;
74
+ display: contents !important;
75
75
  }
76
76
 
77
77
  .label {
@@ -83,19 +83,19 @@
83
83
  tall, centred on the first line and overflowing it. A button taller than a line of label
84
84
  text then never makes this field's label row taller than its neighbours' in a grid row. */
85
85
  .label:has(> .label-action > *) {
86
- display: flex;
87
- align-items: start;
88
- gap: var(--ui-space-1);
86
+ display: flex !important;
87
+ align-items: start !important;
88
+ gap: var(--ui-space-1) !important;
89
89
  }
90
90
 
91
91
  .label-action {
92
- display: flex;
93
- align-items: unsafe center;
92
+ display: flex !important;
93
+ align-items: unsafe center !important;
94
94
  block-size: 1lh;
95
95
  }
96
96
 
97
97
  .label-action:not(:has(> *)) {
98
- display: none;
98
+ display: none !important;
99
99
  }
100
100
 
101
101
  .help {
@@ -109,11 +109,11 @@
109
109
  }
110
110
 
111
111
  .error {
112
- display: none;
112
+ display: none !important;
113
113
  }
114
114
 
115
115
  :host([invalid]) .error {
116
- display: contents;
116
+ display: contents !important;
117
117
  }
118
118
 
119
119
  /* An error reads in the danger colour, the one the invalid control's border takes. */
@@ -125,7 +125,7 @@
125
125
 
126
126
  /* A component that sets its display still honours the hidden attribute on its root. */
127
127
  :host[hidden] {
128
- display: none;
128
+ display: none !important;
129
129
  }
130
130
  </style>
131
131
  </template>
@@ -25,10 +25,15 @@ export function connect(host) {
25
25
  };
26
26
  const wire = () => {
27
27
  const label = element.querySelector('[slot="label"], label');
28
- const input = element.querySelector("input, textarea, select");
28
+ const selector = "[data-ui-field-control], input:not([type=hidden]), textarea, select";
29
+ const target = label?.getAttribute("for") ? element.ownerDocument.getElementById(label.getAttribute("for")) : null;
30
+ const requested = target && element.contains(target) ? (target.matches(selector) ? target : target.querySelector(selector)) : null;
31
+ const input = requested ?? element.querySelector(selector);
29
32
  // A Vue named slot carries no slot attribute, so the help and error regions are read too.
30
- const help = element.querySelector(':scope > .help > *, [slot="help"]');
31
- const error = element.querySelector(':scope > .error > *, [slot="error"], [role="alert"]');
33
+ const helpRegion = element.querySelector(':scope > .help');
34
+ const help = element.querySelector(':scope > .help > *, [slot="help"]') ?? (helpRegion?.textContent.trim() ? helpRegion : null);
35
+ const errorRegion = element.querySelector(':scope > .error');
36
+ const error = element.querySelector(':scope > .error > *, [slot="error"], [role="alert"]') ?? (errorRegion?.textContent.trim() ? errorRegion : null);
32
37
  if (input !== activeInput) {
33
38
  removeOwned(activeInput);
34
39
  activeInput = input;
@@ -37,7 +42,7 @@ export function connect(host) {
37
42
  if (!input) return;
38
43
  if (DEV) warnOnce(warned, fieldProblems(label, input), element);
39
44
  if (!input.id) input.id = id("form-field-input");
40
- if (label && !label.getAttribute("for")) label.setAttribute("for", input.id);
45
+ if (label && (!label.getAttribute("for") || target && target !== input && target.contains(input))) label.setAttribute("for", input.id);
41
46
  const external = descriptionIds(input).filter((value) => !owned.has(value));
42
47
  const described = [];
43
48
  if (help) {
@@ -53,6 +58,9 @@ export function connect(host) {
53
58
  if (next && input.getAttribute("aria-describedby") !== next) input.setAttribute("aria-describedby", next);
54
59
  else if (!next && input.hasAttribute("aria-describedby")) input.removeAttribute("aria-describedby");
55
60
  input.disabled = Boolean(host.props.disabled.value);
61
+ if (input.matches("[data-ui-field-control]")) {
62
+ for (const value of element.querySelectorAll("[data-ui-field-value]")) value.disabled = input.disabled;
63
+ }
56
64
  input.required = Boolean(host.props.required.value);
57
65
  input.setAttribute("aria-invalid", String(Boolean(host.props.invalid.value)));
58
66
  };
@@ -24,8 +24,8 @@
24
24
  :host {
25
25
  --_grid-gap: var(--ui-space-4);
26
26
  --_grid-min: 12rem;
27
- display: grid;
28
- gap: var(--ui-grid-gap, var(--_grid-gap));
27
+ display: grid !important;
28
+ gap: var(--ui-grid-gap, var(--_grid-gap)) !important;
29
29
  grid-template-columns:
30
30
  repeat(
31
31
  auto-fit,
@@ -42,7 +42,7 @@
42
42
  );
43
43
  min-inline-size: 0;
44
44
  max-inline-size: 100%;
45
- margin: 0;
45
+ margin: 0 !important;
46
46
  }
47
47
 
48
48
  :host([gap="xs"]) {
@@ -69,7 +69,7 @@
69
69
 
70
70
  /* A component that sets its display still honours the hidden attribute on its root. */
71
71
  :host[hidden] {
72
- display: none;
72
+ display: none !important;
73
73
  }
74
74
  </style>
75
75
  </template>
@@ -61,6 +61,7 @@
61
61
  'panel-left': [{ tag: 'rect', width: '18', height: '18', x: '3', y: '3', rx: '2' }, { tag: 'path', d: 'M9 3v18' }],
62
62
  'panel-right': [{ tag: 'rect', width: '18', height: '18', x: '3', y: '3', rx: '2' }, { tag: 'path', d: 'M15 3v18' }],
63
63
  'panel-top': [{ tag: 'rect', width: '18', height: '18', x: '3', y: '3', rx: '2' }, { tag: 'path', d: 'M3 9h18' }],
64
+ 'paperclip': [{ tag: 'path', d: 'm16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551' }],
64
65
  'pencil': [{ tag: 'path', d: 'M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z' }, { tag: 'path', d: 'm15 5 4 4' }],
65
66
  'pilcrow': [{ tag: 'path', d: 'M13 4v16' }, { tag: 'path', d: 'M17 4v16' }, { tag: 'path', d: 'M19 4H9.5a4.5 4.5 0 0 0 0 9H13' }],
66
67
  'plus': [{ tag: 'path', d: 'M5 12h14' }, { tag: 'path', d: 'M12 5v14' }],
@@ -122,7 +123,7 @@
122
123
  sizes the icons it renders sets --_ui-default-icon-*, which the icon's own hooks override. */
123
124
  --_ui-icon-stroke-width: var(--ui-icon-stroke-width, var(--_ui-default-icon-stroke-width));
124
125
 
125
- display: inline-flex;
126
+ display: inline-flex !important;
126
127
  flex: none;
127
128
  inline-size: var(--ui-icon-size, var(--_ui-default-icon-size, 1em));
128
129
  block-size: var(--ui-icon-size, var(--_ui-default-icon-size, 1em));
@@ -144,7 +145,7 @@
144
145
 
145
146
  /* A component that sets its display still honours the hidden attribute on its root. */
146
147
  :host[hidden] {
147
- display: none;
148
+ display: none !important;
148
149
  }
149
150
  </style>
150
151
  </template>