@threadlabs/looma 0.19.0 → 0.20.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 (508) hide show
  1. package/components/shared/trigger.js +9 -4
  2. package/components/ui-affordance-scope/ui-affordance-scope.html +1 -1
  3. package/components/ui-avatar/ui-avatar.html +2 -2
  4. package/components/ui-avatar-group/ui-avatar-group.html +1 -1
  5. package/components/ui-avatar-group/ui-avatar-group.js +1 -1
  6. package/components/ui-badge/ui-badge.html +3 -3
  7. package/components/ui-button/ui-button.html +7 -6
  8. package/components/ui-callout/ui-callout.html +1 -1
  9. package/components/ui-card/ui-card.html +5 -4
  10. package/components/ui-checkbox/ui-checkbox.html +6 -2
  11. package/components/ui-cluster/ui-cluster.html +4 -4
  12. package/components/ui-combobox/ui-combobox.html +257 -34
  13. package/components/ui-combobox/ui-combobox.js +21 -20
  14. package/components/ui-container/ui-container.html +2 -2
  15. package/components/ui-context-menu/ui-context-menu.html +17 -5
  16. package/components/ui-cover/ui-cover.html +1 -1
  17. package/components/ui-description-list/ui-description-list.html +3 -3
  18. package/components/ui-dialog/ui-dialog.html +14 -6
  19. package/components/ui-disclosure/ui-disclosure.html +14 -5
  20. package/components/ui-editable/ui-editable.html +15 -4
  21. package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +1 -1
  22. package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +1 -1
  23. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +26 -6
  24. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +90 -12
  25. package/components/ui-editor-table-overlay/ui-editor-table-overlay.js +5 -5
  26. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +33 -7
  27. package/components/ui-grid/ui-grid.html +2 -2
  28. package/components/ui-icon-button/ui-icon-button.html +2 -2
  29. package/components/ui-input/ui-input.html +28 -6
  30. package/components/ui-list/ui-list.html +5 -4
  31. package/components/ui-list-item/ui-list-item.html +1 -1
  32. package/components/ui-listbox/ui-listbox.html +7 -1
  33. package/components/ui-menu/ui-menu.html +18 -5
  34. package/components/ui-menu-item/ui-menu-item.html +7 -2
  35. package/components/ui-meter/ui-meter.html +2 -2
  36. package/components/ui-nav-item/ui-nav-item.html +5 -4
  37. package/components/ui-page-header/ui-page-header.html +1 -1
  38. package/components/ui-popover/ui-popover.html +14 -5
  39. package/components/ui-radio/ui-radio.html +6 -2
  40. package/components/ui-radio-group/ui-radio-group.html +11 -3
  41. package/components/ui-reel/ui-reel.html +3 -3
  42. package/components/ui-scroll-area/ui-scroll-area.html +1 -1
  43. package/components/ui-search-shell/ui-search-shell.html +6 -2
  44. package/components/ui-section/ui-section.html +2 -2
  45. package/components/ui-select/ui-select.html +1 -1
  46. package/components/ui-separator/ui-separator.html +1 -1
  47. package/components/ui-sidebar/ui-sidebar.html +11 -4
  48. package/components/ui-spinner/ui-spinner.html +1 -1
  49. package/components/ui-stack/ui-stack.html +3 -3
  50. package/components/ui-status-message/ui-status-message.html +2 -2
  51. package/components/ui-switch/ui-switch.html +6 -2
  52. package/components/ui-switcher/ui-switcher.html +3 -3
  53. package/components/ui-table/ui-table.html +1 -1
  54. package/components/ui-tabs/ui-tabs.html +9 -4
  55. package/components/ui-text/ui-text.html +6 -6
  56. package/components/ui-textarea/ui-textarea.html +1 -1
  57. package/components/ui-toast/ui-toast.html +6 -2
  58. package/components/ui-toast-region/ui-toast-region.html +16 -4
  59. package/components/ui-tooltip/ui-tooltip.html +15 -6
  60. package/components/ui-tree/ui-tree.html +30 -7
  61. package/components/ui-tree-item/ui-tree-item.html +10 -6
  62. package/components/ui-tree-item/ui-tree-item.js +20 -3
  63. package/dist/index.js +1 -1
  64. package/editor/table-overlay.d.ts +1 -1
  65. package/package.json +3 -3
  66. package/styles/ui-action-bar.css +1 -1
  67. package/styles/ui-affordance-scope.css +1 -1
  68. package/styles/ui-avatar-group.css +1 -1
  69. package/styles/ui-avatar.css +1 -1
  70. package/styles/ui-badge.css +1 -1
  71. package/styles/ui-breadcrumb-item.css +1 -1
  72. package/styles/ui-breadcrumbs.css +1 -1
  73. package/styles/ui-button.css +1 -1
  74. package/styles/ui-callout.css +1 -1
  75. package/styles/ui-card.css +1 -1
  76. package/styles/ui-checkbox.css +1 -1
  77. package/styles/ui-cluster.css +1 -1
  78. package/styles/ui-combobox.css +1 -1
  79. package/styles/ui-container.css +1 -1
  80. package/styles/ui-context-menu.css +1 -1
  81. package/styles/ui-cover.css +1 -1
  82. package/styles/ui-description-item.css +1 -1
  83. package/styles/ui-description-list.css +1 -1
  84. package/styles/ui-dialog.css +1 -1
  85. package/styles/ui-disclosure.css +1 -1
  86. package/styles/ui-editable.css +1 -1
  87. package/styles/ui-editor-insert-table-grid.css +1 -1
  88. package/styles/ui-editor-mention-menu-item.css +1 -1
  89. package/styles/ui-editor-mention-menu.css +1 -1
  90. package/styles/ui-editor-slash-menu-group.css +1 -1
  91. package/styles/ui-editor-slash-menu-item.css +1 -1
  92. package/styles/ui-editor-slash-menu.css +1 -1
  93. package/styles/ui-editor-table-context-menu.css +1 -1
  94. package/styles/ui-editor-table-overlay.css +1 -1
  95. package/styles/ui-editor-table-toolbar.css +1 -1
  96. package/styles/ui-editor-toolbar.css +1 -1
  97. package/styles/ui-floating-action-button.css +1 -1
  98. package/styles/ui-form-field.css +1 -1
  99. package/styles/ui-grid.css +1 -1
  100. package/styles/ui-icon-button.css +1 -1
  101. package/styles/ui-icon.css +1 -1
  102. package/styles/ui-input-group.css +1 -1
  103. package/styles/ui-input.css +1 -1
  104. package/styles/ui-list-item.css +1 -1
  105. package/styles/ui-list.css +1 -1
  106. package/styles/ui-listbox.css +1 -1
  107. package/styles/ui-menu-group.css +1 -1
  108. package/styles/ui-menu-item.css +1 -1
  109. package/styles/ui-menu.css +1 -1
  110. package/styles/ui-meter.css +1 -1
  111. package/styles/ui-nav-item.css +1 -1
  112. package/styles/ui-page-header.css +1 -1
  113. package/styles/ui-popover.css +1 -1
  114. package/styles/ui-radio-group.css +1 -1
  115. package/styles/ui-radio.css +1 -1
  116. package/styles/ui-reel.css +1 -1
  117. package/styles/ui-scroll-area.css +1 -1
  118. package/styles/ui-search-result-row.css +1 -1
  119. package/styles/ui-search-shell.css +1 -1
  120. package/styles/ui-section.css +1 -1
  121. package/styles/ui-select.css +1 -1
  122. package/styles/ui-separator.css +1 -1
  123. package/styles/ui-sidebar.css +1 -1
  124. package/styles/ui-spinner.css +1 -1
  125. package/styles/ui-stack.css +1 -1
  126. package/styles/ui-status-message.css +1 -1
  127. package/styles/ui-switch.css +1 -1
  128. package/styles/ui-switcher.css +1 -1
  129. package/styles/ui-table.css +1 -1
  130. package/styles/ui-tabs.css +1 -1
  131. package/styles/ui-text.css +1 -1
  132. package/styles/ui-textarea.css +1 -1
  133. package/styles/ui-toast-region.css +1 -1
  134. package/styles/ui-toast.css +1 -1
  135. package/styles/ui-tooltip.css +1 -1
  136. package/styles/ui-top-bar.css +1 -1
  137. package/styles/ui-tree-item.css +6 -6
  138. package/styles/ui-tree.css +1 -1
  139. package/vanilla/UiActionBar.d.ts +1 -1
  140. package/vanilla/UiActionBar.js +5 -1
  141. package/vanilla/UiAffordanceScope.d.ts +1 -1
  142. package/vanilla/UiAffordanceScope.js +3 -2
  143. package/vanilla/UiAvatar.d.ts +1 -1
  144. package/vanilla/UiAvatar.js +4 -3
  145. package/vanilla/UiAvatarGroup.d.ts +1 -1
  146. package/vanilla/UiAvatarGroup.js +3 -2
  147. package/vanilla/UiBadge.d.ts +1 -1
  148. package/vanilla/UiBadge.js +2 -1
  149. package/vanilla/UiBreadcrumbItem.d.ts +1 -1
  150. package/vanilla/UiBreadcrumbItem.js +2 -1
  151. package/vanilla/UiBreadcrumbs.d.ts +1 -1
  152. package/vanilla/UiBreadcrumbs.js +4 -7
  153. package/vanilla/UiButton.d.ts +1 -1
  154. package/vanilla/UiButton.js +6 -4
  155. package/vanilla/UiCallout.d.ts +1 -1
  156. package/vanilla/UiCallout.js +3 -2
  157. package/vanilla/UiCard.d.ts +1 -1
  158. package/vanilla/UiCard.js +6 -2
  159. package/vanilla/UiCheckbox.d.ts +1 -1
  160. package/vanilla/UiCheckbox.js +4 -2
  161. package/vanilla/UiCluster.d.ts +1 -1
  162. package/vanilla/UiCluster.js +2 -1
  163. package/vanilla/UiCombobox.d.ts +3 -2
  164. package/vanilla/UiCombobox.js +8 -2
  165. package/vanilla/UiContainer.d.ts +1 -1
  166. package/vanilla/UiContainer.js +2 -1
  167. package/vanilla/UiContextMenu.d.ts +1 -1
  168. package/vanilla/UiContextMenu.js +3 -2
  169. package/vanilla/UiCover.d.ts +1 -1
  170. package/vanilla/UiCover.js +4 -5
  171. package/vanilla/UiDescriptionItem.d.ts +1 -1
  172. package/vanilla/UiDescriptionItem.js +4 -7
  173. package/vanilla/UiDescriptionList.d.ts +1 -1
  174. package/vanilla/UiDescriptionList.js +2 -1
  175. package/vanilla/UiDialog.d.ts +1 -1
  176. package/vanilla/UiDialog.js +4 -2
  177. package/vanilla/UiDisclosure.d.ts +1 -1
  178. package/vanilla/UiDisclosure.js +4 -2
  179. package/vanilla/UiEditable.d.ts +1 -1
  180. package/vanilla/UiEditable.js +2 -2
  181. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  182. package/vanilla/UiEditorInsertTableGrid.js +1 -1
  183. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  184. package/vanilla/UiEditorMentionMenu.js +5 -2
  185. package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
  186. package/vanilla/UiEditorMentionMenuItem.js +3 -1
  187. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  188. package/vanilla/UiEditorSlashMenu.js +6 -2
  189. package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
  190. package/vanilla/UiEditorSlashMenuGroup.js +4 -7
  191. package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
  192. package/vanilla/UiEditorSlashMenuItem.js +2 -1
  193. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  194. package/vanilla/UiEditorTableContextMenu.js +2 -2
  195. package/vanilla/UiEditorTableOverlay.d.ts +12 -2
  196. package/vanilla/UiEditorTableOverlay.js +2 -2
  197. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  198. package/vanilla/UiEditorTableToolbar.js +2 -2
  199. package/vanilla/UiEditorToolbar.d.ts +1 -1
  200. package/vanilla/UiEditorToolbar.js +2 -1
  201. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  202. package/vanilla/UiFloatingActionButton.js +2 -1
  203. package/vanilla/UiFormField.d.ts +1 -1
  204. package/vanilla/UiFormField.js +6 -1
  205. package/vanilla/UiGrid.d.ts +1 -1
  206. package/vanilla/UiGrid.js +4 -3
  207. package/vanilla/UiIcon.d.ts +1 -1
  208. package/vanilla/UiIcon.js +1 -1
  209. package/vanilla/UiIconButton.d.ts +1 -1
  210. package/vanilla/UiIconButton.js +4 -3
  211. package/vanilla/UiInput.d.ts +5 -4
  212. package/vanilla/UiInput.js +16 -13
  213. package/vanilla/UiInputGroup.d.ts +1 -1
  214. package/vanilla/UiInputGroup.js +5 -1
  215. package/vanilla/UiList.d.ts +1 -1
  216. package/vanilla/UiList.js +4 -2
  217. package/vanilla/UiListItem.d.ts +1 -1
  218. package/vanilla/UiListItem.js +5 -1
  219. package/vanilla/UiListbox.d.ts +1 -1
  220. package/vanilla/UiListbox.js +3 -2
  221. package/vanilla/UiMenu.d.ts +1 -1
  222. package/vanilla/UiMenu.js +3 -2
  223. package/vanilla/UiMenuGroup.d.ts +1 -1
  224. package/vanilla/UiMenuGroup.js +2 -1
  225. package/vanilla/UiMenuItem.d.ts +1 -1
  226. package/vanilla/UiMenuItem.js +6 -2
  227. package/vanilla/UiMeter.d.ts +1 -1
  228. package/vanilla/UiMeter.js +2 -2
  229. package/vanilla/UiNavItem.d.ts +2 -2
  230. package/vanilla/UiNavItem.js +11 -5
  231. package/vanilla/UiPageHeader.d.ts +1 -1
  232. package/vanilla/UiPageHeader.js +8 -5
  233. package/vanilla/UiPopover.d.ts +1 -1
  234. package/vanilla/UiPopover.js +3 -2
  235. package/vanilla/UiRadio.d.ts +1 -1
  236. package/vanilla/UiRadio.js +4 -2
  237. package/vanilla/UiRadioGroup.d.ts +1 -1
  238. package/vanilla/UiRadioGroup.js +3 -2
  239. package/vanilla/UiReel.d.ts +1 -1
  240. package/vanilla/UiReel.js +2 -1
  241. package/vanilla/UiScrollArea.d.ts +1 -1
  242. package/vanilla/UiScrollArea.js +3 -2
  243. package/vanilla/UiSearchResultRow.d.ts +1 -1
  244. package/vanilla/UiSearchResultRow.js +6 -1
  245. package/vanilla/UiSearchShell.d.ts +1 -1
  246. package/vanilla/UiSearchShell.js +6 -2
  247. package/vanilla/UiSection.d.ts +1 -1
  248. package/vanilla/UiSection.js +5 -2
  249. package/vanilla/UiSelect.d.ts +1 -1
  250. package/vanilla/UiSelect.js +3 -2
  251. package/vanilla/UiSeparator.d.ts +1 -1
  252. package/vanilla/UiSeparator.js +3 -7
  253. package/vanilla/UiSidebar.d.ts +1 -1
  254. package/vanilla/UiSidebar.js +3 -2
  255. package/vanilla/UiSpinner.d.ts +1 -1
  256. package/vanilla/UiSpinner.js +2 -2
  257. package/vanilla/UiStack.d.ts +1 -1
  258. package/vanilla/UiStack.js +2 -1
  259. package/vanilla/UiStatusMessage.d.ts +1 -1
  260. package/vanilla/UiStatusMessage.js +4 -2
  261. package/vanilla/UiSwitch.d.ts +1 -1
  262. package/vanilla/UiSwitch.js +4 -2
  263. package/vanilla/UiSwitcher.d.ts +1 -1
  264. package/vanilla/UiSwitcher.js +3 -2
  265. package/vanilla/UiTable.d.ts +1 -1
  266. package/vanilla/UiTable.js +3 -2
  267. package/vanilla/UiTabs.d.ts +1 -1
  268. package/vanilla/UiTabs.js +4 -2
  269. package/vanilla/UiText.d.ts +1 -1
  270. package/vanilla/UiText.js +13 -2
  271. package/vanilla/UiTextarea.d.ts +1 -1
  272. package/vanilla/UiTextarea.js +3 -3
  273. package/vanilla/UiToast.d.ts +1 -1
  274. package/vanilla/UiToast.js +4 -2
  275. package/vanilla/UiToastRegion.d.ts +1 -1
  276. package/vanilla/UiToastRegion.js +3 -2
  277. package/vanilla/UiTooltip.d.ts +1 -1
  278. package/vanilla/UiTooltip.js +3 -2
  279. package/vanilla/UiTopBar.d.ts +1 -1
  280. package/vanilla/UiTopBar.js +5 -1
  281. package/vanilla/UiTree.d.ts +1 -1
  282. package/vanilla/UiTree.js +3 -2
  283. package/vanilla/UiTreeItem.d.ts +1 -1
  284. package/vanilla/UiTreeItem.js +8 -4
  285. package/vue/UiActionBar.vue +33 -2
  286. package/vue/UiAffordanceScope.d.ts +23 -8
  287. package/vue/UiAffordanceScope.vue +90 -17
  288. package/vue/UiAvatar.d.ts +77 -19
  289. package/vue/UiAvatar.vue +151 -31
  290. package/vue/UiAvatarGroup.d.ts +50 -13
  291. package/vue/UiAvatarGroup.vue +121 -23
  292. package/vue/UiBadge.d.ts +32 -10
  293. package/vue/UiBadge.vue +104 -17
  294. package/vue/UiBreadcrumbItem.d.ts +14 -6
  295. package/vue/UiBreadcrumbItem.vue +82 -15
  296. package/vue/UiBreadcrumbs.d.ts +14 -6
  297. package/vue/UiBreadcrumbs.vue +78 -10
  298. package/vue/UiButton.d.ts +122 -27
  299. package/vue/UiButton.vue +288 -64
  300. package/vue/UiCallout.d.ts +14 -6
  301. package/vue/UiCallout.vue +84 -16
  302. package/vue/UiCard.d.ts +41 -12
  303. package/vue/UiCard.vue +149 -25
  304. package/vue/UiCheckbox.d.ts +85 -28
  305. package/vue/UiCheckbox.vue +173 -43
  306. package/vue/UiCluster.d.ts +41 -7
  307. package/vue/UiCluster.vue +122 -13
  308. package/vue/UiCombobox.d.ts +303 -110
  309. package/vue/UiCombobox.vue +723 -412
  310. package/vue/UiContainer.d.ts +23 -5
  311. package/vue/UiContainer.vue +89 -9
  312. package/vue/UiContextMenu.d.ts +38 -23
  313. package/vue/UiContextMenu.vue +113 -38
  314. package/vue/UiCover.d.ts +14 -6
  315. package/vue/UiCover.vue +76 -12
  316. package/vue/UiDescriptionItem.d.ts +14 -6
  317. package/vue/UiDescriptionItem.vue +78 -11
  318. package/vue/UiDescriptionList.d.ts +32 -9
  319. package/vue/UiDescriptionList.vue +106 -16
  320. package/vue/UiDialog.d.ts +89 -30
  321. package/vue/UiDialog.vue +168 -38
  322. package/vue/UiDisclosure.d.ts +70 -27
  323. package/vue/UiDisclosure.vue +149 -36
  324. package/vue/UiEditable.d.ts +119 -41
  325. package/vue/UiEditable.vue +220 -62
  326. package/vue/UiEditorInsertTableGrid.d.ts +46 -17
  327. package/vue/UiEditorInsertTableGrid.vue +215 -40
  328. package/vue/UiEditorMentionMenu.d.ts +128 -41
  329. package/vue/UiEditorMentionMenu.vue +211 -37
  330. package/vue/UiEditorMentionMenuItem.d.ts +32 -10
  331. package/vue/UiEditorMentionMenuItem.vue +98 -17
  332. package/vue/UiEditorSlashMenu.d.ts +110 -37
  333. package/vue/UiEditorSlashMenu.vue +189 -31
  334. package/vue/UiEditorSlashMenuGroup.d.ts +14 -6
  335. package/vue/UiEditorSlashMenuGroup.vue +80 -12
  336. package/vue/UiEditorSlashMenuItem.d.ts +50 -14
  337. package/vue/UiEditorSlashMenuItem.vue +120 -23
  338. package/vue/UiEditorTableContextMenu.d.ts +64 -20
  339. package/vue/UiEditorTableContextMenu.vue +326 -91
  340. package/vue/UiEditorTableOverlay.d.ts +170 -44
  341. package/vue/UiEditorTableOverlay.vue +420 -149
  342. package/vue/UiEditorTableToolbar.d.ts +64 -20
  343. package/vue/UiEditorTableToolbar.vue +344 -107
  344. package/vue/UiEditorToolbar.d.ts +14 -6
  345. package/vue/UiEditorToolbar.vue +79 -15
  346. package/vue/UiFloatingActionButton.d.ts +32 -10
  347. package/vue/UiFloatingActionButton.vue +96 -18
  348. package/vue/UiFormField.d.ts +32 -10
  349. package/vue/UiFormField.vue +99 -19
  350. package/vue/UiGrid.d.ts +32 -6
  351. package/vue/UiGrid.vue +95 -11
  352. package/vue/UiIcon.d.ts +14 -6
  353. package/vue/UiIcon.vue +99 -14
  354. package/vue/UiIconButton.d.ts +77 -19
  355. package/vue/UiIconButton.vue +176 -39
  356. package/vue/UiInput.d.ts +50 -19
  357. package/vue/UiInput.vue +326 -33
  358. package/vue/UiInputGroup.d.ts +14 -6
  359. package/vue/UiInputGroup.vue +79 -15
  360. package/vue/UiList.d.ts +41 -12
  361. package/vue/UiList.vue +125 -22
  362. package/vue/UiListItem.d.ts +23 -8
  363. package/vue/UiListItem.vue +88 -16
  364. package/vue/UiListbox.d.ts +86 -27
  365. package/vue/UiListbox.vue +272 -64
  366. package/vue/UiMenu.d.ts +69 -33
  367. package/vue/UiMenu.vue +142 -38
  368. package/vue/UiMenuGroup.d.ts +14 -6
  369. package/vue/UiMenuGroup.vue +80 -11
  370. package/vue/UiMenuItem.d.ts +61 -25
  371. package/vue/UiMenuItem.vue +174 -45
  372. package/vue/UiMeter.d.ts +68 -18
  373. package/vue/UiMeter.vue +215 -41
  374. package/vue/UiNavItem.d.ts +50 -11
  375. package/vue/UiNavItem.vue +163 -29
  376. package/vue/UiPageHeader.d.ts +14 -6
  377. package/vue/UiPageHeader.vue +75 -12
  378. package/vue/UiPopover.d.ts +43 -21
  379. package/vue/UiPopover.vue +147 -27
  380. package/vue/UiRadio.d.ts +67 -24
  381. package/vue/UiRadio.vue +147 -36
  382. package/vue/UiRadioGroup.d.ts +79 -29
  383. package/vue/UiRadioGroup.vue +162 -41
  384. package/vue/UiReel.d.ts +32 -6
  385. package/vue/UiReel.vue +97 -11
  386. package/vue/UiScrollArea.d.ts +14 -6
  387. package/vue/UiScrollArea.vue +83 -14
  388. package/vue/UiSearchResultRow.d.ts +23 -8
  389. package/vue/UiSearchResultRow.vue +86 -16
  390. package/vue/UiSearchShell.d.ts +48 -19
  391. package/vue/UiSearchShell.vue +120 -26
  392. package/vue/UiSection.d.ts +32 -10
  393. package/vue/UiSection.vue +103 -17
  394. package/vue/UiSelect.d.ts +59 -17
  395. package/vue/UiSelect.vue +140 -29
  396. package/vue/UiSeparator.d.ts +14 -6
  397. package/vue/UiSeparator.vue +80 -9
  398. package/vue/UiSidebar.d.ts +95 -31
  399. package/vue/UiSidebar.vue +172 -39
  400. package/vue/UiSpinner.d.ts +23 -8
  401. package/vue/UiSpinner.vue +115 -24
  402. package/vue/UiStack.d.ts +32 -6
  403. package/vue/UiStack.vue +107 -11
  404. package/vue/UiStatusMessage.d.ts +32 -10
  405. package/vue/UiStatusMessage.vue +109 -19
  406. package/vue/UiSwitch.d.ts +67 -24
  407. package/vue/UiSwitch.vue +147 -36
  408. package/vue/UiSwitcher.d.ts +41 -7
  409. package/vue/UiSwitcher.vue +118 -15
  410. package/vue/UiTable.d.ts +23 -8
  411. package/vue/UiTable.vue +91 -17
  412. package/vue/UiTabs.d.ts +66 -23
  413. package/vue/UiTabs.vue +230 -44
  414. package/vue/UiText.d.ts +68 -18
  415. package/vue/UiText.vue +308 -48
  416. package/vue/UiTextarea.d.ts +84 -21
  417. package/vue/UiTextarea.vue +172 -38
  418. package/vue/UiToast.d.ts +28 -13
  419. package/vue/UiToast.vue +103 -24
  420. package/vue/UiToastRegion.d.ts +29 -14
  421. package/vue/UiToastRegion.vue +202 -47
  422. package/vue/UiTooltip.d.ts +81 -31
  423. package/vue/UiTooltip.vue +192 -37
  424. package/vue/UiTopBar.vue +33 -2
  425. package/vue/UiTree.d.ts +72 -29
  426. package/vue/UiTree.vue +170 -49
  427. package/vue/UiTreeItem.d.ts +136 -35
  428. package/vue/UiTreeItem.vue +232 -66
  429. package/vue/chunks/UiActionBar.js +16 -3
  430. package/vue/chunks/UiAffordanceScope.js +66 -11
  431. package/vue/chunks/UiAvatar.js +121 -20
  432. package/vue/chunks/UiAvatarGroup.js +94 -15
  433. package/vue/chunks/UiBadge.js +82 -10
  434. package/vue/chunks/UiBreadcrumbItem.js +43 -9
  435. package/vue/chunks/UiBreadcrumbs.js +41 -5
  436. package/vue/chunks/UiButton.js +237 -51
  437. package/vue/chunks/UiCallout.js +53 -11
  438. package/vue/chunks/UiCard.js +145 -18
  439. package/vue/chunks/UiCheckbox.js +130 -30
  440. package/vue/chunks/UiCluster.js +99 -12
  441. package/vue/chunks/UiCombobox.js +545 -162
  442. package/vue/chunks/UiContainer.js +65 -7
  443. package/vue/chunks/UiContextMenu.js +56 -11
  444. package/vue/chunks/UiCover.js +41 -6
  445. package/vue/chunks/UiDescriptionItem.js +39 -4
  446. package/vue/chunks/UiDescriptionList.js +80 -10
  447. package/vue/chunks/UiDialog.js +125 -18
  448. package/vue/chunks/UiDisclosure.js +102 -17
  449. package/vue/chunks/UiEditable.js +154 -29
  450. package/vue/chunks/UiEditorInsertTableGrid.js +154 -31
  451. package/vue/chunks/UiEditorMentionMenu.js +221 -18
  452. package/vue/chunks/UiEditorMentionMenuItem.js +64 -7
  453. package/vue/chunks/UiEditorSlashMenu.js +201 -14
  454. package/vue/chunks/UiEditorSlashMenuGroup.js +43 -9
  455. package/vue/chunks/UiEditorSlashMenuItem.js +80 -14
  456. package/vue/chunks/UiEditorTableContextMenu.js +220 -49
  457. package/vue/chunks/UiEditorTableOverlay.js +390 -85
  458. package/vue/chunks/UiEditorTableToolbar.js +248 -71
  459. package/vue/chunks/UiEditorToolbar.js +44 -10
  460. package/vue/chunks/UiFloatingActionButton.js +57 -9
  461. package/vue/chunks/UiFormField.js +63 -12
  462. package/vue/chunks/UiGrid.js +80 -9
  463. package/vue/chunks/UiIcon.js +73 -16
  464. package/vue/chunks/UiIconButton.js +126 -28
  465. package/vue/chunks/UiInput.js +328 -22
  466. package/vue/chunks/UiInputGroup.js +44 -10
  467. package/vue/chunks/UiList.js +104 -15
  468. package/vue/chunks/UiListItem.js +57 -8
  469. package/vue/chunks/UiListbox.js +208 -49
  470. package/vue/chunks/UiMenu.js +88 -15
  471. package/vue/chunks/UiMenuGroup.js +41 -5
  472. package/vue/chunks/UiMenuItem.js +111 -32
  473. package/vue/chunks/UiMeter.js +166 -36
  474. package/vue/chunks/UiNavItem.js +133 -37
  475. package/vue/chunks/UiPageHeader.js +41 -6
  476. package/vue/chunks/UiPopover.js +81 -11
  477. package/vue/chunks/UiRadio.js +115 -24
  478. package/vue/chunks/UiRadioGroup.js +108 -19
  479. package/vue/chunks/UiReel.js +81 -10
  480. package/vue/chunks/UiScrollArea.js +47 -10
  481. package/vue/chunks/UiSearchResultRow.js +47 -8
  482. package/vue/chunks/UiSearchShell.js +84 -24
  483. package/vue/chunks/UiSection.js +77 -10
  484. package/vue/chunks/UiSelect.js +108 -20
  485. package/vue/chunks/UiSeparator.js +41 -5
  486. package/vue/chunks/UiSidebar.js +136 -20
  487. package/vue/chunks/UiSpinner.js +64 -19
  488. package/vue/chunks/UiStack.js +87 -10
  489. package/vue/chunks/UiStatusMessage.js +82 -12
  490. package/vue/chunks/UiSwitch.js +115 -24
  491. package/vue/chunks/UiSwitcher.js +103 -15
  492. package/vue/chunks/UiTable.js +63 -11
  493. package/vue/chunks/UiTabs.js +170 -30
  494. package/vue/chunks/UiText.js +365 -38
  495. package/vue/chunks/UiTextarea.js +132 -26
  496. package/vue/chunks/UiToast.js +70 -12
  497. package/vue/chunks/UiToastRegion.js +154 -33
  498. package/vue/chunks/UiTooltip.js +124 -16
  499. package/vue/chunks/UiTopBar.js +16 -3
  500. package/vue/chunks/UiTree.js +107 -15
  501. package/vue/chunks/UiTreeItem.js +167 -43
  502. package/vue/chunks/control.js +171 -0
  503. package/vue/chunks/host.js +170 -27
  504. package/vue/chunks/props.js +477 -0
  505. package/vue/components.css +1197 -1197
  506. package/vue/editor/index.js +58 -15
  507. package/vue/editor/primitives.d.ts +52 -2
  508. package/vue/host.ts +370 -39
@@ -10,11 +10,12 @@ let comboboxes = 0;
10
10
  function authoredOptions(container) {
11
11
  return Array.from(container.querySelectorAll("option")).map((option, index) => {
12
12
  const { description, tag, tagTone, tagColor } = option.dataset;
13
+ const group = option.closest("optgroup")?.label;
13
14
  return {
14
15
  id: option.id || option.value || `option-${index}`,
15
16
  value: option.value,
16
17
  label: option.label || option.textContent?.trim() || option.value,
17
- group: option.closest("optgroup")?.label || undefined,
18
+ ...(group ? { group } : {}),
18
19
  disabled: option.disabled,
19
20
  ...(description ? { description } : {}),
20
21
  ...(tag ? { tag: { label: tag, ...(tagTone ? { tone: tagTone } : {}), ...(tagColor ? { color: tagColor } : {}) } } : {}),
@@ -141,7 +142,7 @@ export default function controller(host) {
141
142
  if (controller.signal.aborted || !alive) return;
142
143
  for (const option of options) knownOptions.set(option.value, option);
143
144
  const selectedOption = host.state.selected == null ? undefined : knownOptions.get(host.state.selected);
144
- if (host.state.query === undefined && awaitingLabel === host.state.selected && selectedOption) {
145
+ if (host.state.query == null && awaitingLabel === host.state.selected && selectedOption) {
145
146
  host.state.raw = selectedOption.label;
146
147
  host.state.display = selectedOption.label;
147
148
  awaitingLabel = null;
@@ -193,8 +194,8 @@ export default function controller(host) {
193
194
  awaitingLabel = null;
194
195
  if (kind === "selection") lastSelection = option;
195
196
  const queryChanged = query !== host.state.raw;
196
- if (host.state.value === undefined) host.state.selected = value;
197
- if (host.state.query === undefined && queryChanged) {
197
+ if (host.state.value == null) host.state.selected = value;
198
+ if (host.state.query == null && queryChanged) {
198
199
  host.state.raw = query;
199
200
  host.state.display = query;
200
201
  }
@@ -208,20 +209,20 @@ export default function controller(host) {
208
209
  if (kind === "free-entry") host.dispatch("free-entry", detail);
209
210
  queueMicrotask(() => {
210
211
  if (proposedChange !== proposal) return;
211
- if (host.state.value !== undefined && host.state.value !== proposal.value) syncValue();
212
- if (host.state.query !== undefined && host.state.query !== proposal.query) syncQuery();
212
+ if (host.state.value != null && host.state.value !== proposal.value) syncValue();
213
+ if (host.state.query != null && host.state.query !== proposal.query) syncQuery();
213
214
  proposedChange = undefined;
214
215
  });
215
216
  };
216
217
  const emitItems = (next, trigger) => {
217
218
  if (!controlledValues()) host.state.internalItems = next;
218
- host.dispatch("value-change", next);
219
- // Not `values`: Vue's adapter reads a modeled prop with `in`, and every list-shaped detail (this
220
- // value-change, options-change) has Array.prototype.values, so it would emit update:values wrongly.
219
+ host.dispatch("items-change", next);
220
+ // Not `values`: Vue's adapter reads a modeled prop with `in`, and list-shaped details have
221
+ // Array.prototype.values, so it would emit update:values wrongly.
221
222
  host.dispatch("selected-values-change", { selectedValues: next.map((item) => item.value), trigger });
222
223
  };
223
224
  const setMultiQuery = (query, trigger) => {
224
- if (host.state.query === undefined) {
225
+ if (host.state.query == null) {
225
226
  host.state.raw = query;
226
227
  host.state.display = query;
227
228
  }
@@ -281,7 +282,7 @@ export default function controller(host) {
281
282
  ?? knownOptions.get(host.state.selected) ?? lastSelection;
282
283
  if (selectedOption && selectedOption.label === typed) return;
283
284
  const restoreDraft = (label) => {
284
- if (host.state.query !== undefined || label === host.state.raw) return;
285
+ if (host.state.query != null || label === host.state.raw) return;
285
286
  host.state.raw = label;
286
287
  host.state.display = label;
287
288
  resetValidation();
@@ -352,9 +353,9 @@ export default function controller(host) {
352
353
  return host.state.validation;
353
354
  };
354
355
  const syncValue = () => {
355
- if (host.state.multiple || host.state.value === undefined) return;
356
+ if (host.state.multiple || host.state.value == null) return;
356
357
  host.state.selected = host.state.value;
357
- if (host.state.query === undefined) {
358
+ if (host.state.query == null) {
358
359
  const proposal = proposedChange;
359
360
  const option = config().options?.find((row) => row.value === host.state.selected) ?? (host.state.selected == null ? undefined : knownOptions.get(host.state.selected));
360
361
  const nextRaw = proposal?.value === host.state.selected ? proposal.query : option?.label ?? host.state.selected ?? "";
@@ -367,8 +368,8 @@ export default function controller(host) {
367
368
  resetValidation();
368
369
  };
369
370
  const syncQuery = () => {
370
- if (host.state.query === undefined || host.state.query === host.state.raw) return;
371
- if (host.state.value === undefined && proposedChange?.query !== host.state.query) host.state.selected = null;
371
+ if (host.state.query == null || host.state.query === host.state.raw) return;
372
+ if (host.state.value == null && proposedChange?.query !== host.state.query) host.state.selected = null;
372
373
  awaitingLabel = null;
373
374
  host.state.raw = host.state.query;
374
375
  host.state.display = host.state.query;
@@ -421,7 +422,7 @@ export default function controller(host) {
421
422
  commit(null, host.state.raw, null, "clear", "keyboard");
422
423
  }
423
424
  open();
424
- queueMicrotask(() => { if (host.state.query !== undefined && host.state.query !== host.state.raw) syncQuery(); });
425
+ queueMicrotask(() => { if (host.state.query != null && host.state.query !== host.state.raw) syncQuery(); });
425
426
  };
426
427
  const onKeydown = (event) => {
427
428
  const item = event.target.closest?.(".item");
@@ -483,12 +484,12 @@ export default function controller(host) {
483
484
  host.state.selected = null;
484
485
  host.state.raw = host.state.query ?? "";
485
486
  } else {
486
- host.state.selected = host.state.value !== undefined ? host.state.value : authoredDefaults()[0]?.value ?? null;
487
+ host.state.selected = host.state.value != null ? host.state.value : authoredDefaults()[0]?.value ?? null;
487
488
  host.state.raw = host.state.query ?? "";
488
- if (host.state.query === undefined && !host.state.raw && host.state.selected !== null) {
489
+ if (host.state.query == null && !host.state.raw && host.state.selected !== null) {
489
490
  host.state.raw = config().options?.find((row) => row.value === host.state.selected)?.label ?? host.state.selected;
490
491
  }
491
- if (host.state.query === undefined && host.state.selected !== null && host.state.raw === host.state.selected) awaitingLabel = host.state.selected;
492
+ if (host.state.query == null && host.state.selected !== null && host.state.raw === host.state.selected) awaitingLabel = host.state.selected;
492
493
  }
493
494
  host.state.display = host.state.raw;
494
495
  };
@@ -504,7 +505,7 @@ export default function controller(host) {
504
505
  // Authored options can change after mount (renamed, replaced, or arriving late). A selected value
505
506
  // then shows its current label, unless the user is editing the text.
506
507
  const relabel = () => {
507
- if (host.state.multiple || host.state.query !== undefined || host.state.selected == null) return;
508
+ if (host.state.multiple || host.state.query != null || host.state.selected == null) return;
508
509
  if (element.ownerDocument.activeElement === input) return;
509
510
  const label = config().options?.find((row) => row.value === host.state.selected)?.label;
510
511
  if (label === undefined || label === host.state.raw) return;
@@ -1,10 +1,10 @@
1
1
  <template component="ui-container">
2
2
  <defs>
3
- <prop name="measure" type="narrow | wide"
3
+ <prop name="measure" type="keyword" values="narrow, wide"
4
4
  >The container's maximum width, in characters of the current font: narrow is 45ch, wide is 80ch, and unset is 65ch, a comfortable reading line. The
5
5
  container centres itself when its parent is wider. The --ui-container-measure custom property, set on the container itself, overrides it; set on an
6
6
  ancestor, it does nothing.</prop>
7
- <prop name="gutters" type="s | m | l"
7
+ <prop name="gutters" type="keyword" values="s, m, l"
8
8
  >Inline padding on both sides, which keeps content off the edges of a narrow screen: s is 0.75rem, m is 1rem (also the default), and l is 1.5rem.</prop>
9
9
  </defs>
10
10
  <div><slot></slot></div>
@@ -5,13 +5,25 @@
5
5
  <state name="internalOpen" :value="false"></state>
6
6
  <event
7
7
  name="open"
8
- type="object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })"
9
- ></event>
8
+ type="object"
9
+ >
10
+ <prop name="open" required type="boolean"></prop>
11
+ <prop name="reason" required type="keyword" values="action, programmatic, light-dismiss, escape"></prop>
12
+ <prop name="trigger" required type="keyword" values="keyboard, pointer, programmatic"></prop>
13
+ </event>
10
14
  <event
11
15
  name="close"
12
- type="object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })"
13
- ></event>
14
- <event name="select" type="object({ value: string, checked?: boolean, trigger: keyboard | pointer | programmatic })"></event>
16
+ type="object"
17
+ >
18
+ <prop name="open" required type="boolean"></prop>
19
+ <prop name="reason" required type="keyword" values="action, programmatic, light-dismiss, escape"></prop>
20
+ <prop name="trigger" required type="keyword" values="keyboard, pointer, programmatic"></prop>
21
+ </event>
22
+ <event name="select" type="object">
23
+ <prop name="value" required type="string"></prop>
24
+ <prop name="checked" type="boolean"></prop>
25
+ <prop name="trigger" required type="keyword" values="keyboard, pointer, programmatic"></prop>
26
+ </event>
15
27
  </defs>
16
28
  <span><div class="menu" $ref="menu" role="menu" aria-orientation="vertical"><slot></slot></div></span>
17
29
  <style>
@@ -1,6 +1,6 @@
1
1
  <template component="ui-cover">
2
2
  <defs>
3
- <prop name="size" type="screen | fill" default="screen"
3
+ <prop name="size" type="keyword" values="screen, fill" default="screen"
4
4
  >How tall the cover is. screen is at least the viewport's height, for a view that is one centred card, such as sign-in; fill takes the space its parent
5
5
  gives it.</prop>
6
6
  </defs>
@@ -1,12 +1,12 @@
1
1
  <template component="ui-description-list">
2
2
  <defs>
3
- <prop name="layout" type="rows | stacked | grid | tiles" default="rows"
3
+ <prop name="layout" type="keyword" values="rows, stacked, grid, tiles" default="rows"
4
4
  >rows sets each term beside its value, one per line, for a short summary; stacked sets every term above its value, one pair per line, for a narrow space;
5
5
  grid sets the pairs, term above value, in as many columns as fit, for facts to scan across; tiles sets each pair on its own bordered tile in a grid, for
6
6
  figures to compare.</prop>
7
- <prop name="columns" type="'2' | '3' | '4'"
7
+ <prop name="columns" type="keyword" values="2, 3, 4"
8
8
  >The most columns grid and tiles set on a wide list; a narrow list still drops to fewer. Left unset, they fit as many as the width allows.</prop>
9
- <prop name="density" type="comfortable | compact" default="comfortable"
9
+ <prop name="density" type="keyword" values="comfortable, compact" default="comfortable"
10
10
  >How much room each pair takes. comfortable spaces the pairs apart to read; compact sets them close together, for facts inside other content such as a card
11
11
  or a table's detail row.</prop>
12
12
  </defs>
@@ -8,24 +8,32 @@
8
8
  <prop name="modeless" type="boolean" default="false"
9
9
  >Deprecated: does nothing, since dialogs are non-modal unless modal is set. Accepted so markup written for 0.15 keeps working; modal wins when both are
10
10
  set.</prop>
11
- <prop name="closedby" type="any | closerequest | none"
11
+ <prop name="closedby" type="keyword" values="any, closerequest, none"
12
12
  >Which user close requests work: any includes outside presses, closerequest includes Escape, and none requires an action. Unset follows native dialog:
13
13
  closerequest when modal, none when not.</prop>
14
14
  <prop name="alert" type="boolean" default="false"
15
15
  >Use alert dialog semantics and require an explicit action instead of the header close button. An alert dialog is always modal.</prop>
16
- <prop name="size" type="sm | md | lg | fullscreen" default="md">Choose a compact, standard, wide, or viewport-filling dialog.</prop>
16
+ <prop name="size" type="keyword" values="sm, md, lg, fullscreen" default="md">Choose a compact, standard, wide, or viewport-filling dialog.</prop>
17
17
  <prop name="label" type="string">Visible title in the dialog header; also its accessible name.</prop>
18
18
  <prop name="for" type="string" default="">ID of the control that opens the dialog.</prop>
19
19
  <state name="internalOpen" :value="false"></state>
20
20
  <state name="accessibleLabel" :value="'Dialog'"></state>
21
21
  <event
22
22
  name="open"
23
- type="object({ open: boolean, reason: action | programmatic, trigger: keyboard | pointer | programmatic })"
24
- ></event>
23
+ type="object"
24
+ >
25
+ <prop name="open" required type="boolean"></prop>
26
+ <prop name="reason" required type="keyword" values="action, programmatic"></prop>
27
+ <prop name="trigger" required type="keyword" values="keyboard, pointer, programmatic"></prop>
28
+ </event>
25
29
  <event
26
30
  name="close"
27
- type="object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })"
28
- ></event>
31
+ type="object"
32
+ >
33
+ <prop name="open" required type="boolean"></prop>
34
+ <prop name="reason" required type="keyword" values="action, programmatic, light-dismiss, escape"></prop>
35
+ <prop name="trigger" required type="keyword" values="keyboard, pointer, programmatic"></prop>
36
+ </event>
29
37
  </defs>
30
38
  <dialog :aria-label="accessibleLabel">
31
39
  <header>
@@ -1,6 +1,7 @@
1
1
  <template component="ui-disclosure" controller="./ui-disclosure.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
+ <prop name="density" type="keyword" values="comfortable, compact" default="comfortable"
4
+ >Compact trades padding and type size for rows that fit more on screen.</prop>
4
5
  <prop name="summary" type="string" default="Details"
5
6
  >The text of the trigger row that opens and closes the disclosure. It is the trigger button's accessible name, so name what the content is.</prop>
6
7
  <prop name="open" type="boolean" default="false"
@@ -18,12 +19,20 @@
18
19
  <state name="headingAriaLevel" :value="null"></state>
19
20
  <event
20
21
  name="open"
21
- type="object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })"
22
- ></event>
22
+ type="object"
23
+ >
24
+ <prop name="open" required type="boolean"></prop>
25
+ <prop name="reason" required type="keyword" values="action, programmatic, light-dismiss, escape"></prop>
26
+ <prop name="trigger" required type="keyword" values="keyboard, pointer, programmatic"></prop>
27
+ </event>
23
28
  <event
24
29
  name="close"
25
- type="object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })"
26
- ></event>
30
+ type="object"
31
+ >
32
+ <prop name="open" required type="boolean"></prop>
33
+ <prop name="reason" required type="keyword" values="action, programmatic, light-dismiss, escape"></prop>
34
+ <prop name="trigger" required type="keyword" values="keyboard, pointer, programmatic"></prop>
35
+ </event>
27
36
  </defs>
28
37
  <div>
29
38
  <div class="heading" :role="headingRole" :aria-level="headingAriaLevel">
@@ -17,12 +17,23 @@
17
17
  <state name="internalEdit" :value="false"></state>
18
18
  <state name="internalValue" :value="''"></state>
19
19
  <state name="draft" :value="''"></state>
20
- <event name="input" type="object({ value: string, trigger: keyboard | pointer | programmatic })"></event>
21
- <event name="change" type="object({ value: string, previousValue: string, trigger: keyboard | pointer | programmatic })"></event>
20
+ <event name="input" type="object">
21
+ <prop name="value" required type="string"></prop>
22
+ <prop name="trigger" required type="keyword" values="keyboard, pointer, programmatic"></prop>
23
+ </event>
24
+ <event name="change" type="object">
25
+ <prop name="value" required type="string"></prop>
26
+ <prop name="previousValue" required type="string"></prop>
27
+ <prop name="trigger" required type="keyword" values="keyboard, pointer, programmatic"></prop>
28
+ </event>
22
29
  <event
23
30
  name="edit-change"
24
- type="object({ edit: boolean, reason: activate | commit | cancel | light-dismiss | escape | programmatic, trigger: keyboard | pointer | programmatic })"
25
- ></event>
31
+ type="object"
32
+ >
33
+ <prop name="edit" required type="boolean"></prop>
34
+ <prop name="reason" required type="keyword" values="activate, commit, cancel, light-dismiss, escape, programmatic"></prop>
35
+ <prop name="trigger" required type="keyword" values="keyboard, pointer, programmatic"></prop>
36
+ </event>
26
37
  </defs>
27
38
  <div>
28
39
  <div class="field">
@@ -12,7 +12,7 @@
12
12
  <prop name="loadingLabel" type="string" default="Searching…">Status text shown while loading an empty result list.</prop>
13
13
  <prop
14
14
  name="anchorRect"
15
- type="object({ left?: number, top?: number, right?: number, bottom?: number, x?: number, y?: number, width?: number, height?: number }) | null"
15
+ type="object({ left?: number, top?: number, right?: number, bottom?: number, x?: number, y?: number, width?: number, height?: number })"
16
16
  >Where the @ was typed, in viewport coordinates.</prop>
17
17
  <state name="visible" :value="false"></state>
18
18
  <state name="rows" type="list(object({ id: string, label: string, detail?: string, initials: string }))" :value="[]"></state>
@@ -14,7 +14,7 @@
14
14
  highlights it and reports a highlight event.</prop>
15
15
  <prop
16
16
  name="anchorRect"
17
- type="object({ left?: number, top?: number, right?: number, bottom?: number, x?: number, y?: number, width?: number, height?: number }) | null"
17
+ type="object({ left?: number, top?: number, right?: number, bottom?: number, x?: number, y?: number, width?: number, height?: number })"
18
18
  >Where the slash was typed, in viewport coordinates.</prop>
19
19
  <state name="visible" :value="false"></state>
20
20
  <state name="active" :value="0"></state>
@@ -2,15 +2,28 @@
2
2
  <template component="ui-editor-table-context-menu" controller="./ui-editor-table-context-menu.js">
3
3
  <defs>
4
4
  <prop name="open" type="boolean" default="false">Shows the menu at the position owned by the editor integration.</prop>
5
- <prop name="scope" type="cell | row | column" default="cell">Keeps structure actions relevant to a cell, row handle, or column handle.</prop>
5
+ <prop name="scope" type="keyword" values="cell, row, column" default="cell">Keeps structure actions relevant to a cell, row handle, or column handle.</prop>
6
6
  <prop name="cellBackground" type="string" default="">Identifies the background choice that is active for the current cell.</prop>
7
7
  <prop name="headerRow" type="boolean" default="false">Whether the table's first row currently uses header cells.</prop>
8
8
  <prop name="headerColumn" type="boolean" default="false">Whether the table's first column currently uses header cells.</prop>
9
9
  <prop
10
10
  name="actions"
11
- 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 | toggle-header-row | toggle-header-column | move-row-up | move-row-down | move-column-left | move-column-right | clear-cells | merge-cells | split-cell | delete-row | delete-column | delete-table)"
12
- >The complete set of commands the current selection permits.</prop>
13
- <state name="swatches" type="list(object({ action: string, label: string, color: string, selected: boolean })) | null" :value="[]"></state>
11
+ type="array"
12
+ >
13
+ <prop
14
+ type="keyword"
15
+ values="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, toggle-header-row, toggle-header-column, move-row-up, move-row-down, move-column-left, move-column-right, clear-cells, merge-cells, split-cell, delete-row, delete-column, delete-table"
16
+ ></prop>
17
+ The complete set of commands the current selection permits.
18
+ </prop>
19
+ <state name="swatches" type="array" :value="[]" nullable>
20
+ <prop type="object">
21
+ <prop name="action" required type="string"></prop>
22
+ <prop name="label" required type="string"></prop>
23
+ <prop name="color" required type="string"></prop>
24
+ <prop name="selected" required type="boolean"></prop>
25
+ </prop>
26
+ </state>
14
27
  <state
15
28
  name="sections"
16
29
  type="list(object({ heading: string, items: list(object({ action: string, label: string, icon: string, danger: boolean, checkable: boolean, checked: boolean })) }))"
@@ -18,8 +31,15 @@
18
31
  ></state>
19
32
  <event
20
33
  name="action"
21
- type="object({ action: 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 | toggle-header-row | toggle-header-column | move-row-up | move-row-down | move-column-left | move-column-right | clear-cells | merge-cells | split-cell | delete-row | delete-column | delete-table })"
22
- ></event>
34
+ type="object"
35
+ >
36
+ <prop
37
+ name="action"
38
+ required
39
+ type="keyword"
40
+ values="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, toggle-header-row, toggle-header-column, move-row-up, move-row-down, move-column-left, move-column-right, clear-cells, merge-cells, split-cell, delete-row, delete-column, delete-table"
41
+ ></prop>
42
+ </event>
23
43
  </defs>
24
44
  <div role="menu" :hidden="not open">
25
45
  <div $if="swatches" class="section" role="none">
@@ -4,32 +4,110 @@
4
4
  <prop name="open" type="boolean" default="false">Shows the controls after the editor has supplied current geometry.</prop>
5
5
  <prop
6
6
  name="geometry"
7
- type="object({ rowBoundaries: list(number), columnBoundaries: list(number), activeCell: object({ left: number, top: number, width: number, height: number, rowIndex: integer, columnIndex: integer }) | null, hoveredCell?: object({ left: number, top: number, width: number, height: number, rowIndex: integer, columnIndex: integer }) | null }) | null"
8
- >The authoritative editor-measured table boundaries and active or hovered cell rectangles.</prop>
7
+ type="object"
8
+ >
9
+ <prop name="rowBoundaries" required type="array">
10
+ <prop type="number"></prop>
11
+ </prop>
12
+ <prop name="columnBoundaries" required type="array">
13
+ <prop type="number"></prop>
14
+ </prop>
15
+ <prop name="activeCell" required nullable type="object">
16
+ <prop name="left" required type="number"></prop>
17
+ <prop name="top" required type="number"></prop>
18
+ <prop name="width" required type="number"></prop>
19
+ <prop name="height" required type="number"></prop>
20
+ <prop name="rowIndex" required type="integer"></prop>
21
+ <prop name="columnIndex" required type="integer"></prop>
22
+ </prop>
23
+ <prop name="hoveredCell" nullable type="object">
24
+ <prop name="left" required type="number"></prop>
25
+ <prop name="top" required type="number"></prop>
26
+ <prop name="width" required type="number"></prop>
27
+ <prop name="height" required type="number"></prop>
28
+ <prop name="rowIndex" required type="integer"></prop>
29
+ <prop name="columnIndex" required type="integer"></prop>
30
+ </prop>
31
+ The authoritative editor-measured table boundaries and active or hovered cell rectangles.
32
+ </prop>
9
33
  <state
10
34
  name="rows"
11
- type="list(object({ key: string, index: integer, offset: string, affordance: insert-row | insert-column, action: add-row-before | add-row-after | add-column-before | add-column-after, label: string }))"
35
+ type="array"
12
36
  :value="[]"
13
- ></state>
37
+ >
38
+ <prop type="object">
39
+ <prop name="key" required type="string"></prop>
40
+ <prop name="index" required type="integer"></prop>
41
+ <prop name="offset" required type="string"></prop>
42
+ <prop name="affordance" required type="keyword" values="insert-row, insert-column"></prop>
43
+ <prop name="action" required type="keyword" values="add-row-before, add-row-after, add-column-before, add-column-after"></prop>
44
+ <prop name="label" required type="string"></prop>
45
+ </prop>
46
+ </state>
14
47
  <state
15
48
  name="cols"
16
- type="list(object({ key: string, index: integer, offset: string, affordance: insert-row | insert-column, action: add-row-before | add-row-after | add-column-before | add-column-after, label: string }))"
49
+ type="array"
17
50
  :value="[]"
18
- ></state>
51
+ >
52
+ <prop type="object">
53
+ <prop name="key" required type="string"></prop>
54
+ <prop name="index" required type="integer"></prop>
55
+ <prop name="offset" required type="string"></prop>
56
+ <prop name="affordance" required type="keyword" values="insert-row, insert-column"></prop>
57
+ <prop name="action" required type="keyword" values="add-row-before, add-row-after, add-column-before, add-column-after"></prop>
58
+ <prop name="label" required type="string"></prop>
59
+ </prop>
60
+ </state>
19
61
  <state
20
62
  name="hovered"
21
- type="object({ left: number, top: number, width: number, height: number, rowIndex: integer, columnIndex: integer, rowOffset: string, columnOffset: string }) | null"
63
+ type="object"
22
64
  :value="null"
23
- ></state>
65
+ nullable
66
+ >
67
+ <prop name="left" required type="number"></prop>
68
+ <prop name="top" required type="number"></prop>
69
+ <prop name="width" required type="number"></prop>
70
+ <prop name="height" required type="number"></prop>
71
+ <prop name="rowIndex" required type="integer"></prop>
72
+ <prop name="columnIndex" required type="integer"></prop>
73
+ <prop name="rowOffset" required type="string"></prop>
74
+ <prop name="columnOffset" required type="string"></prop>
75
+ </state>
24
76
  <state
25
77
  name="active"
26
- type="object({ left: number, top: number, width: number, height: number, rowIndex: integer, columnIndex: integer, menuLeft: string, menuTop: string }) | null"
78
+ type="object"
27
79
  :value="null"
28
- ></state>
80
+ nullable
81
+ >
82
+ <prop name="left" required type="number"></prop>
83
+ <prop name="top" required type="number"></prop>
84
+ <prop name="width" required type="number"></prop>
85
+ <prop name="height" required type="number"></prop>
86
+ <prop name="rowIndex" required type="integer"></prop>
87
+ <prop name="columnIndex" required type="integer"></prop>
88
+ <prop name="menuLeft" required type="string"></prop>
89
+ <prop name="menuTop" required type="string"></prop>
90
+ </state>
29
91
  <state name="activeKey" :value="''"></state>
92
+ <event name="add-row-before" type="object({ boundaryIndex: integer })"></event>
93
+ <event name="add-row-after" type="object({ boundaryIndex: integer })"></event>
94
+ <event name="add-column-before" type="object({ boundaryIndex: integer })"></event>
95
+ <event name="add-column-after" type="object({ boundaryIndex: integer })"></event>
96
+ <event name="select-row" type="object({ rowIndex: integer, columnIndex: integer })"></event>
97
+ <event name="select-column" type="object({ rowIndex: integer, columnIndex: integer })"></event>
98
+ <event name="reorder-row" type="object({ fromIndex: integer, toIndex: integer })"></event>
99
+ <event name="reorder-column" type="object({ fromIndex: integer, toIndex: integer })"></event>
100
+ <event
101
+ name="open-cell-menu"
102
+ type="object({ rowIndex: integer, columnIndex: integer, anchor: object({ left: number, top: number, right: number, bottom: number }) })"
103
+ ></event>
104
+ <event
105
+ name="open-row-menu"
106
+ type="object({ rowIndex: integer, columnIndex: integer, anchor: object({ left: number, top: number, right: number, bottom: number }) })"
107
+ ></event>
30
108
  <event
31
- name="action"
32
- type="object({ action: add-row-before | add-row-after | add-column-before | add-column-after, boundaryIndex: integer }) | object({ action: select-row | select-column, rowIndex: integer, columnIndex: integer }) | object({ action: reorder-row | reorder-column, fromIndex: integer, toIndex: integer }) | object({ action: open-cell-menu | open-row-menu | open-column-menu, rowIndex: integer, columnIndex: integer, anchor: object({ left: number, top: number, right: number, bottom: number }) })"
109
+ name="open-column-menu"
110
+ type="object({ rowIndex: integer, columnIndex: integer, anchor: object({ left: number, top: number, right: number, bottom: number }) })"
33
111
  ></event>
34
112
  </defs>
35
113
  <div aria-label="Table controls" :hidden="not open">
@@ -96,7 +96,7 @@ export default function controller(host) {
96
96
  if (to === null) return;
97
97
  suppressClick = true;
98
98
  setTimeout(() => { suppressClick = false; }, 0);
99
- if (to !== from) host.dispatch("action", { action: axis === "row" ? "reorder-row" : "reorder-column", fromIndex: from, toIndex: to });
99
+ if (to !== from) host.dispatch(axis === "row" ? "reorder-row" : "reorder-column", { fromIndex: from, toIndex: to });
100
100
  };
101
101
  const boundaries = (axis) => {
102
102
  const values = host.state.geometry?.[axis === "row" ? "rowBoundaries" : "columnBoundaries"];
@@ -141,13 +141,13 @@ export default function controller(host) {
141
141
  const action = button.dataset.action;
142
142
  const cell = { rowIndex: Number(button.dataset.rowIndex), columnIndex: Number(button.dataset.columnIndex) };
143
143
  if (action === "select-row" || action === "select-column") {
144
- host.dispatch("action", { action, ...cell });
144
+ host.dispatch(action, cell);
145
145
  const rect = button.getBoundingClientRect();
146
- host.dispatch("action", { action: action === "select-row" ? "open-row-menu" : "open-column-menu", ...cell, anchor: { left: rect.left, top: rect.top, right: rect.right, bottom: rect.bottom } });
146
+ host.dispatch(action === "select-row" ? "open-row-menu" : "open-column-menu", { ...cell, anchor: { left: rect.left, top: rect.top, right: rect.right, bottom: rect.bottom } });
147
147
  } else if (action === "open-cell-menu") {
148
148
  const rect = button.getBoundingClientRect();
149
- host.dispatch("action", { action, ...cell, anchor: { left: rect.left, top: rect.top, right: rect.right, bottom: rect.bottom } });
150
- } else host.dispatch("action", { action, boundaryIndex: Number(button.dataset.boundaryIndex) });
149
+ host.dispatch(action, { ...cell, anchor: { left: rect.left, top: rect.top, right: rect.right, bottom: rect.bottom } });
150
+ } else host.dispatch(action, { boundaryIndex: Number(button.dataset.boundaryIndex) });
151
151
  };
152
152
  const keyOf = (target) => target instanceof Element ? target.closest("[data-control-key]")?.dataset.controlKey ?? "" : "";
153
153
  const enter = (event) => { host.state.activeKey = keyOf(event.target); };
@@ -2,16 +2,35 @@
2
2
  <template component="ui-editor-table-toolbar" controller="./ui-editor-table-toolbar.js">
3
3
  <defs>
4
4
  <prop name="open" type="boolean" default="false">Shows the toolbar while a table selection is active.</prop>
5
- <prop name="cellAlignment" type="left | center | right" default="left">Marks the alignment command that is active for the current cell.</prop>
5
+ <prop name="cellAlignment" type="keyword" values="left, center, right" default="left"
6
+ >Marks the alignment command that is active for the current cell.</prop>
6
7
  <prop name="cellBackground" type="string" default="">Identifies the background choice that is active for the current cell.</prop>
7
8
  <prop name="headerRow" type="boolean" default="false">Whether the table's first row currently uses header cells.</prop>
8
9
  <prop name="headerColumn" type="boolean" default="false">Whether the table's first column currently uses header cells.</prop>
9
10
  <prop
10
11
  name="actions"
11
- 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 | toggle-header-row | toggle-header-column | move-row-up | move-row-down | move-column-left | move-column-right | clear-cells | merge-cells | split-cell | delete-row | delete-column | delete-table)"
12
- >The complete set of commands the current selection permits.</prop>
13
- <state name="alignments" type="list(object({ action: align-left | align-center | align-right, label: string, active: boolean }))" :value="[]"></state>
14
- <state name="structure" type="list(object({ action: add-row-after | add-column-after, label: string, icon: string }))" :value="[]"></state>
12
+ type="array"
13
+ >
14
+ <prop
15
+ type="keyword"
16
+ values="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, toggle-header-row, toggle-header-column, move-row-up, move-row-down, move-column-left, move-column-right, clear-cells, merge-cells, split-cell, delete-row, delete-column, delete-table"
17
+ ></prop>
18
+ The complete set of commands the current selection permits.
19
+ </prop>
20
+ <state name="alignments" type="array" :value="[]">
21
+ <prop type="object">
22
+ <prop name="action" required type="keyword" values="align-left, align-center, align-right"></prop>
23
+ <prop name="label" required type="string"></prop>
24
+ <prop name="active" required type="boolean"></prop>
25
+ </prop>
26
+ </state>
27
+ <state name="structure" type="array" :value="[]">
28
+ <prop type="object">
29
+ <prop name="action" required type="keyword" values="add-row-after, add-column-after"></prop>
30
+ <prop name="label" required type="string"></prop>
31
+ <prop name="icon" required type="string"></prop>
32
+ </prop>
33
+ </state>
15
34
  <state name="swatches" type="list(object({ action: string, label: string, color: string, selected: boolean }))" :value="[]"></state>
16
35
  <state
17
36
  name="sections"
@@ -22,8 +41,15 @@
22
41
  <state name="overflowOpen" :value="false"></state>
23
42
  <event
24
43
  name="action"
25
- type="object({ action: 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 | toggle-header-row | toggle-header-column | move-row-up | move-row-down | move-column-left | move-column-right | clear-cells | merge-cells | split-cell | delete-row | delete-column | delete-table })"
26
- ></event>
44
+ type="object"
45
+ >
46
+ <prop
47
+ name="action"
48
+ required
49
+ type="keyword"
50
+ values="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, toggle-header-row, toggle-header-column, move-row-up, move-row-down, move-column-left, move-column-right, clear-cells, merge-cells, split-cell, delete-row, delete-column, delete-table"
51
+ ></prop>
52
+ </event>
27
53
  </defs>
28
54
  <div role="toolbar" aria-label="Table actions" :hidden="not open">
29
55
  <div $if="alignments" class="group" role="group" aria-label="Cell alignment">
@@ -1,9 +1,9 @@
1
1
  <template component="ui-grid">
2
2
  <defs>
3
- <prop name="gap" type="xs | s | m | l | xl"
3
+ <prop name="gap" type="keyword" values="xs, s, m, l, xl"
4
4
  >Space between cells, on the spacing scale: xs is 0.5rem, s 0.75rem, m 1rem (also the default), l 1.5rem, and xl 2rem. The --ui-grid-gap custom property,
5
5
  set on the grid itself, overrides it; set on an ancestor, it does nothing.</prop>
6
- <prop name="min" type="sm | md | lg"
6
+ <prop name="min" type="keyword" values="sm, md, lg"
7
7
  >The narrowest a column may get before the grid drops to fewer columns: sm is 12rem (also the default), md is 16rem, and lg is 20rem. The grid fits as many
8
8
  equal columns as its width allows, and a single column never overflows a narrower container.</prop>
9
9
  <prop name="columns" type="integer"