@threadlabs/looma 0.22.9 → 0.22.11

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 (417) hide show
  1. package/components/shared/overlay.js +33 -1
  2. package/components/ui-affordance-scope/ui-affordance-scope.js +2 -2
  3. package/components/ui-avatar/ui-avatar.js +5 -5
  4. package/components/ui-avatar-group/ui-avatar-group.js +5 -5
  5. package/components/ui-button/ui-button.js +1 -1
  6. package/components/ui-checkbox/ui-checkbox.js +5 -5
  7. package/components/ui-combobox/ui-combobox.js +61 -61
  8. package/components/ui-context-menu/ui-context-menu.js +6 -6
  9. package/components/ui-dialog/ui-dialog.html +6 -0
  10. package/components/ui-dialog/ui-dialog.js +11 -11
  11. package/components/ui-disclosure/ui-disclosure.js +6 -6
  12. package/components/ui-editable/ui-editable.js +6 -6
  13. package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.js +4 -4
  14. package/components/ui-editor-mention-menu/ui-editor-mention-menu.js +8 -8
  15. package/components/ui-editor-slash-menu/ui-editor-slash-menu.js +6 -6
  16. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.js +5 -5
  17. package/components/ui-editor-table-overlay/ui-editor-table-overlay.js +4 -4
  18. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.js +5 -5
  19. package/components/ui-form-field/ui-form-field.js +4 -4
  20. package/components/ui-icon-button/ui-icon-button.js +2 -2
  21. package/components/ui-input/ui-input.js +1 -1
  22. package/components/ui-input-group/ui-input-group.html +14 -0
  23. package/components/ui-input-group/ui-input-group.js +1 -1
  24. package/components/ui-listbox/ui-listbox.js +12 -12
  25. package/components/ui-menu/ui-menu.js +7 -7
  26. package/components/ui-menu-item/ui-menu-item.js +7 -7
  27. package/components/ui-popover/ui-popover.js +4 -4
  28. package/components/ui-radio/ui-radio.js +5 -5
  29. package/components/ui-radio-group/ui-radio-group.js +6 -6
  30. package/components/ui-scroll-area/ui-scroll-area.js +1 -1
  31. package/components/ui-search-shell/ui-search-shell.html +8 -0
  32. package/components/ui-search-shell/ui-search-shell.js +17 -7
  33. package/components/ui-select/ui-select.js +1 -1
  34. package/components/ui-sidebar/ui-sidebar.js +15 -12
  35. package/components/ui-switch/ui-switch.js +5 -5
  36. package/components/ui-switcher/ui-switcher.js +1 -1
  37. package/components/ui-tabs/ui-tabs.js +5 -5
  38. package/components/ui-textarea/ui-textarea.js +1 -1
  39. package/components/ui-toast/ui-toast.js +3 -3
  40. package/components/ui-toast-region/ui-toast-region.js +5 -1
  41. package/components/ui-tooltip/ui-tooltip.js +22 -11
  42. package/components/ui-tree/ui-tree.js +4 -4
  43. package/components/ui-tree-item/ui-tree-item.js +11 -11
  44. package/dist/index.js +1 -1
  45. package/package.json +2 -2
  46. package/styles/ui-action-bar.css +1 -1
  47. package/styles/ui-affordance-scope.css +1 -1
  48. package/styles/ui-avatar-group.css +1 -1
  49. package/styles/ui-avatar.css +1 -1
  50. package/styles/ui-badge.css +1 -1
  51. package/styles/ui-breadcrumb-item.css +1 -1
  52. package/styles/ui-breadcrumbs.css +1 -1
  53. package/styles/ui-button.css +1 -1
  54. package/styles/ui-callout.css +1 -1
  55. package/styles/ui-card.css +1 -1
  56. package/styles/ui-checkbox.css +1 -1
  57. package/styles/ui-cluster.css +1 -1
  58. package/styles/ui-combobox.css +1 -1
  59. package/styles/ui-container.css +1 -1
  60. package/styles/ui-context-menu.css +1 -1
  61. package/styles/ui-cover.css +1 -1
  62. package/styles/ui-description-item.css +1 -1
  63. package/styles/ui-description-list.css +1 -1
  64. package/styles/ui-dialog.css +7 -1
  65. package/styles/ui-disclosure.css +1 -1
  66. package/styles/ui-editable.css +1 -1
  67. package/styles/ui-editor-insert-table-grid.css +1 -1
  68. package/styles/ui-editor-mention-menu-item.css +1 -1
  69. package/styles/ui-editor-mention-menu.css +1 -1
  70. package/styles/ui-editor-slash-menu-group.css +1 -1
  71. package/styles/ui-editor-slash-menu-item.css +1 -1
  72. package/styles/ui-editor-slash-menu.css +1 -1
  73. package/styles/ui-editor-table-context-menu.css +1 -1
  74. package/styles/ui-editor-table-overlay.css +1 -1
  75. package/styles/ui-editor-table-toolbar.css +1 -1
  76. package/styles/ui-editor-toolbar.css +1 -1
  77. package/styles/ui-floating-action-button.css +1 -1
  78. package/styles/ui-form-field.css +1 -1
  79. package/styles/ui-grid.css +1 -1
  80. package/styles/ui-icon-button.css +1 -1
  81. package/styles/ui-icon.css +1 -1
  82. package/styles/ui-input-group.css +17 -1
  83. package/styles/ui-input.css +1 -1
  84. package/styles/ui-list-item.css +1 -1
  85. package/styles/ui-list.css +1 -1
  86. package/styles/ui-listbox.css +1 -1
  87. package/styles/ui-menu-group.css +1 -1
  88. package/styles/ui-menu-item.css +1 -1
  89. package/styles/ui-menu.css +1 -1
  90. package/styles/ui-meter.css +1 -1
  91. package/styles/ui-nav-item.css +1 -1
  92. package/styles/ui-page-header.css +1 -1
  93. package/styles/ui-popover.css +1 -1
  94. package/styles/ui-radio-group.css +1 -1
  95. package/styles/ui-radio.css +1 -1
  96. package/styles/ui-reel.css +1 -1
  97. package/styles/ui-scroll-area.css +1 -1
  98. package/styles/ui-search-result-row.css +1 -1
  99. package/styles/ui-search-shell.css +9 -1
  100. package/styles/ui-section.css +1 -1
  101. package/styles/ui-select.css +1 -1
  102. package/styles/ui-separator.css +1 -1
  103. package/styles/ui-sidebar.css +1 -1
  104. package/styles/ui-spinner.css +1 -1
  105. package/styles/ui-stack.css +1 -1
  106. package/styles/ui-status-message.css +1 -1
  107. package/styles/ui-switch.css +1 -1
  108. package/styles/ui-switcher.css +1 -1
  109. package/styles/ui-table.css +1 -1
  110. package/styles/ui-tabs.css +1 -1
  111. package/styles/ui-text.css +1 -1
  112. package/styles/ui-textarea.css +1 -1
  113. package/styles/ui-toast-region.css +1 -1
  114. package/styles/ui-toast.css +1 -1
  115. package/styles/ui-tooltip.css +1 -1
  116. package/styles/ui-top-bar.css +1 -1
  117. package/styles/ui-tree-item.css +1 -1
  118. package/styles/ui-tree.css +1 -1
  119. package/vanilla/UiActionBar.d.ts +1 -1
  120. package/vanilla/UiActionBar.js +1 -1
  121. package/vanilla/UiAffordanceScope.d.ts +1 -1
  122. package/vanilla/UiAffordanceScope.js +1 -1
  123. package/vanilla/UiAvatar.d.ts +1 -1
  124. package/vanilla/UiAvatar.js +1 -1
  125. package/vanilla/UiAvatarGroup.d.ts +1 -1
  126. package/vanilla/UiAvatarGroup.js +1 -1
  127. package/vanilla/UiBadge.d.ts +1 -1
  128. package/vanilla/UiBadge.js +1 -1
  129. package/vanilla/UiBreadcrumbItem.d.ts +1 -1
  130. package/vanilla/UiBreadcrumbItem.js +1 -1
  131. package/vanilla/UiBreadcrumbs.d.ts +1 -1
  132. package/vanilla/UiBreadcrumbs.js +1 -1
  133. package/vanilla/UiButton.d.ts +1 -1
  134. package/vanilla/UiButton.js +1 -1
  135. package/vanilla/UiCallout.d.ts +1 -1
  136. package/vanilla/UiCallout.js +1 -1
  137. package/vanilla/UiCard.d.ts +1 -1
  138. package/vanilla/UiCard.js +1 -1
  139. package/vanilla/UiCheckbox.d.ts +1 -1
  140. package/vanilla/UiCheckbox.js +1 -1
  141. package/vanilla/UiCluster.d.ts +1 -1
  142. package/vanilla/UiCluster.js +1 -1
  143. package/vanilla/UiCombobox.d.ts +1 -1
  144. package/vanilla/UiCombobox.js +1 -1
  145. package/vanilla/UiContainer.d.ts +1 -1
  146. package/vanilla/UiContainer.js +1 -1
  147. package/vanilla/UiContextMenu.d.ts +1 -1
  148. package/vanilla/UiContextMenu.js +1 -1
  149. package/vanilla/UiCover.d.ts +1 -1
  150. package/vanilla/UiCover.js +1 -1
  151. package/vanilla/UiDescriptionItem.d.ts +1 -1
  152. package/vanilla/UiDescriptionItem.js +1 -1
  153. package/vanilla/UiDescriptionList.d.ts +1 -1
  154. package/vanilla/UiDescriptionList.js +1 -1
  155. package/vanilla/UiDialog.d.ts +1 -1
  156. package/vanilla/UiDialog.js +1 -1
  157. package/vanilla/UiDisclosure.d.ts +1 -1
  158. package/vanilla/UiDisclosure.js +1 -1
  159. package/vanilla/UiEditable.d.ts +1 -1
  160. package/vanilla/UiEditable.js +1 -1
  161. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  162. package/vanilla/UiEditorInsertTableGrid.js +1 -1
  163. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  164. package/vanilla/UiEditorMentionMenu.js +1 -1
  165. package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
  166. package/vanilla/UiEditorMentionMenuItem.js +1 -1
  167. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  168. package/vanilla/UiEditorSlashMenu.js +1 -1
  169. package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
  170. package/vanilla/UiEditorSlashMenuGroup.js +1 -1
  171. package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
  172. package/vanilla/UiEditorSlashMenuItem.js +1 -1
  173. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  174. package/vanilla/UiEditorTableContextMenu.js +1 -1
  175. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  176. package/vanilla/UiEditorTableOverlay.js +1 -1
  177. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  178. package/vanilla/UiEditorTableToolbar.js +1 -1
  179. package/vanilla/UiEditorToolbar.d.ts +1 -1
  180. package/vanilla/UiEditorToolbar.js +1 -1
  181. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  182. package/vanilla/UiFloatingActionButton.js +1 -1
  183. package/vanilla/UiFormField.d.ts +1 -1
  184. package/vanilla/UiFormField.js +1 -1
  185. package/vanilla/UiGrid.d.ts +1 -1
  186. package/vanilla/UiGrid.js +1 -1
  187. package/vanilla/UiIcon.d.ts +1 -1
  188. package/vanilla/UiIcon.js +1 -1
  189. package/vanilla/UiIconButton.d.ts +1 -1
  190. package/vanilla/UiIconButton.js +1 -1
  191. package/vanilla/UiInput.d.ts +1 -1
  192. package/vanilla/UiInput.js +1 -1
  193. package/vanilla/UiInputGroup.d.ts +1 -1
  194. package/vanilla/UiInputGroup.js +1 -1
  195. package/vanilla/UiList.d.ts +1 -1
  196. package/vanilla/UiList.js +1 -1
  197. package/vanilla/UiListItem.d.ts +1 -1
  198. package/vanilla/UiListItem.js +1 -1
  199. package/vanilla/UiListbox.d.ts +1 -1
  200. package/vanilla/UiListbox.js +1 -1
  201. package/vanilla/UiMenu.d.ts +1 -1
  202. package/vanilla/UiMenu.js +1 -1
  203. package/vanilla/UiMenuGroup.d.ts +1 -1
  204. package/vanilla/UiMenuGroup.js +1 -1
  205. package/vanilla/UiMenuItem.d.ts +1 -1
  206. package/vanilla/UiMenuItem.js +1 -1
  207. package/vanilla/UiMeter.d.ts +1 -1
  208. package/vanilla/UiMeter.js +1 -1
  209. package/vanilla/UiNavItem.d.ts +1 -1
  210. package/vanilla/UiNavItem.js +1 -1
  211. package/vanilla/UiPageHeader.d.ts +1 -1
  212. package/vanilla/UiPageHeader.js +1 -1
  213. package/vanilla/UiPopover.d.ts +1 -1
  214. package/vanilla/UiPopover.js +1 -1
  215. package/vanilla/UiRadio.d.ts +1 -1
  216. package/vanilla/UiRadio.js +1 -1
  217. package/vanilla/UiRadioGroup.d.ts +1 -1
  218. package/vanilla/UiRadioGroup.js +1 -1
  219. package/vanilla/UiReel.d.ts +1 -1
  220. package/vanilla/UiReel.js +1 -1
  221. package/vanilla/UiScrollArea.d.ts +1 -1
  222. package/vanilla/UiScrollArea.js +1 -1
  223. package/vanilla/UiSearchResultRow.d.ts +1 -1
  224. package/vanilla/UiSearchResultRow.js +1 -1
  225. package/vanilla/UiSearchShell.d.ts +1 -1
  226. package/vanilla/UiSearchShell.js +1 -1
  227. package/vanilla/UiSection.d.ts +1 -1
  228. package/vanilla/UiSection.js +1 -1
  229. package/vanilla/UiSelect.d.ts +1 -1
  230. package/vanilla/UiSelect.js +1 -1
  231. package/vanilla/UiSeparator.d.ts +1 -1
  232. package/vanilla/UiSeparator.js +1 -1
  233. package/vanilla/UiSidebar.d.ts +1 -1
  234. package/vanilla/UiSidebar.js +1 -1
  235. package/vanilla/UiSpinner.d.ts +1 -1
  236. package/vanilla/UiSpinner.js +1 -1
  237. package/vanilla/UiStack.d.ts +1 -1
  238. package/vanilla/UiStack.js +1 -1
  239. package/vanilla/UiStatusMessage.d.ts +1 -1
  240. package/vanilla/UiStatusMessage.js +1 -1
  241. package/vanilla/UiSwitch.d.ts +1 -1
  242. package/vanilla/UiSwitch.js +1 -1
  243. package/vanilla/UiSwitcher.d.ts +1 -1
  244. package/vanilla/UiSwitcher.js +1 -1
  245. package/vanilla/UiTable.d.ts +1 -1
  246. package/vanilla/UiTable.js +1 -1
  247. package/vanilla/UiTabs.d.ts +1 -1
  248. package/vanilla/UiTabs.js +1 -1
  249. package/vanilla/UiText.d.ts +1 -1
  250. package/vanilla/UiText.js +1 -1
  251. package/vanilla/UiTextarea.d.ts +1 -1
  252. package/vanilla/UiTextarea.js +1 -1
  253. package/vanilla/UiToast.d.ts +1 -1
  254. package/vanilla/UiToast.js +1 -1
  255. package/vanilla/UiToastRegion.d.ts +1 -1
  256. package/vanilla/UiToastRegion.js +1 -1
  257. package/vanilla/UiTooltip.d.ts +1 -1
  258. package/vanilla/UiTooltip.js +1 -1
  259. package/vanilla/UiTopBar.d.ts +1 -1
  260. package/vanilla/UiTopBar.js +1 -1
  261. package/vanilla/UiTree.d.ts +1 -1
  262. package/vanilla/UiTree.js +1 -1
  263. package/vanilla/UiTreeItem.d.ts +1 -1
  264. package/vanilla/UiTreeItem.js +1 -1
  265. package/vue/UiActionBar.vue +1 -1
  266. package/vue/UiAffordanceScope.vue +17 -4
  267. package/vue/UiAvatar.vue +38 -5
  268. package/vue/UiAvatarGroup.vue +32 -5
  269. package/vue/UiBadge.vue +13 -3
  270. package/vue/UiBreadcrumbItem.vue +5 -3
  271. package/vue/UiBreadcrumbs.vue +5 -3
  272. package/vue/UiButton.vue +72 -7
  273. package/vue/UiCallout.vue +5 -3
  274. package/vue/UiCard.vue +16 -6
  275. package/vue/UiCheckbox.vue +41 -4
  276. package/vue/UiCluster.vue +8 -3
  277. package/vue/UiCombobox.vue +98 -6
  278. package/vue/UiContainer.vue +6 -3
  279. package/vue/UiContextMenu.vue +17 -4
  280. package/vue/UiCover.vue +5 -3
  281. package/vue/UiDescriptionItem.vue +5 -3
  282. package/vue/UiDescriptionList.vue +11 -3
  283. package/vue/UiDialog.vue +44 -5
  284. package/vue/UiDisclosure.vue +28 -4
  285. package/vue/UiEditable.vue +50 -4
  286. package/vue/UiEditorInsertTableGrid.vue +24 -4
  287. package/vue/UiEditorMentionMenu.vue +41 -4
  288. package/vue/UiEditorMentionMenuItem.vue +7 -3
  289. package/vue/UiEditorSlashMenu.vue +28 -4
  290. package/vue/UiEditorSlashMenuGroup.vue +5 -3
  291. package/vue/UiEditorSlashMenuItem.vue +15 -3
  292. package/vue/UiEditorTableContextMenu.vue +28 -4
  293. package/vue/UiEditorTableOverlay.vue +17 -4
  294. package/vue/UiEditorTableToolbar.vue +28 -4
  295. package/vue/UiEditorToolbar.vue +16 -4
  296. package/vue/UiFloatingActionButton.vue +7 -3
  297. package/vue/UiFormField.vue +18 -4
  298. package/vue/UiGrid.vue +7 -3
  299. package/vue/UiIcon.vue +5 -3
  300. package/vue/UiIconButton.vue +47 -5
  301. package/vue/UiInput.vue +90 -37
  302. package/vue/UiInputGroup.vue +30 -4
  303. package/vue/UiList.vue +20 -7
  304. package/vue/UiListItem.vue +6 -3
  305. package/vue/UiListbox.vue +38 -5
  306. package/vue/UiMenu.vue +28 -4
  307. package/vue/UiMenuGroup.vue +5 -3
  308. package/vue/UiMenuItem.vue +27 -5
  309. package/vue/UiMeter.vue +19 -3
  310. package/vue/UiNavItem.vue +28 -6
  311. package/vue/UiPageHeader.vue +5 -3
  312. package/vue/UiPopover.vue +18 -5
  313. package/vue/UiRadio.vue +28 -4
  314. package/vue/UiRadioGroup.vue +30 -4
  315. package/vue/UiReel.vue +7 -3
  316. package/vue/UiScrollArea.vue +16 -4
  317. package/vue/UiSearchResultRow.d.ts +1 -1
  318. package/vue/UiSearchResultRow.vue +6 -3
  319. package/vue/UiSearchShell.vue +32 -4
  320. package/vue/UiSection.vue +7 -3
  321. package/vue/UiSelect.vue +33 -5
  322. package/vue/UiSeparator.vue +5 -3
  323. package/vue/UiSidebar.vue +44 -4
  324. package/vue/UiSpinner.vue +6 -3
  325. package/vue/UiStack.vue +7 -3
  326. package/vue/UiStatusMessage.vue +7 -3
  327. package/vue/UiSwitch.vue +28 -4
  328. package/vue/UiSwitcher.vue +30 -5
  329. package/vue/UiTable.vue +17 -4
  330. package/vue/UiTabs.vue +28 -4
  331. package/vue/UiText.vue +29 -15
  332. package/vue/UiTextarea.vue +39 -5
  333. package/vue/UiToast.vue +17 -4
  334. package/vue/UiToastRegion.vue +17 -5
  335. package/vue/UiTooltip.vue +30 -5
  336. package/vue/UiTopBar.vue +1 -1
  337. package/vue/UiTree.vue +28 -4
  338. package/vue/UiTreeItem.d.ts +1 -1
  339. package/vue/UiTreeItem.vue +59 -4
  340. package/vue/chunks/UiActionBar.js +1 -1
  341. package/vue/chunks/UiAffordanceScope.js +19 -5
  342. package/vue/chunks/UiAvatar.js +40 -11
  343. package/vue/chunks/UiAvatarGroup.js +31 -8
  344. package/vue/chunks/UiBadge.js +13 -7
  345. package/vue/chunks/UiBreadcrumbItem.js +5 -4
  346. package/vue/chunks/UiBreadcrumbs.js +5 -4
  347. package/vue/chunks/UiButton.js +60 -19
  348. package/vue/chunks/UiCallout.js +5 -4
  349. package/vue/chunks/UiCard.js +16 -10
  350. package/vue/chunks/UiCheckbox.js +40 -11
  351. package/vue/chunks/UiCluster.js +13 -7
  352. package/vue/chunks/UiCombobox.js +85 -26
  353. package/vue/chunks/UiContainer.js +9 -5
  354. package/vue/chunks/UiContextMenu.js +19 -5
  355. package/vue/chunks/UiCover.js +5 -4
  356. package/vue/chunks/UiDescriptionItem.js +5 -4
  357. package/vue/chunks/UiDescriptionList.js +11 -6
  358. package/vue/chunks/UiDialog.js +40 -11
  359. package/vue/chunks/UiDisclosure.js +34 -9
  360. package/vue/chunks/UiEditable.js +49 -14
  361. package/vue/chunks/UiEditorInsertTableGrid.js +28 -7
  362. package/vue/chunks/UiEditorMentionMenu.js +40 -11
  363. package/vue/chunks/UiEditorMentionMenuItem.js +11 -6
  364. package/vue/chunks/UiEditorSlashMenu.js +34 -9
  365. package/vue/chunks/UiEditorSlashMenuGroup.js +5 -4
  366. package/vue/chunks/UiEditorSlashMenuItem.js +15 -8
  367. package/vue/chunks/UiEditorTableContextMenu.js +34 -9
  368. package/vue/chunks/UiEditorTableOverlay.js +19 -5
  369. package/vue/chunks/UiEditorTableToolbar.js +34 -9
  370. package/vue/chunks/UiEditorToolbar.js +15 -4
  371. package/vue/chunks/UiFloatingActionButton.js +11 -6
  372. package/vue/chunks/UiFormField.js +26 -7
  373. package/vue/chunks/UiGrid.js +11 -6
  374. package/vue/chunks/UiIcon.js +5 -4
  375. package/vue/chunks/UiIconButton.js +41 -12
  376. package/vue/chunks/UiInput.js +53 -14
  377. package/vue/chunks/UiInputGroup.js +16 -5
  378. package/vue/chunks/UiList.js +14 -8
  379. package/vue/chunks/UiListItem.js +9 -5
  380. package/vue/chunks/UiListbox.js +40 -11
  381. package/vue/chunks/UiMenu.js +34 -9
  382. package/vue/chunks/UiMenuGroup.js +5 -4
  383. package/vue/chunks/UiMenuItem.js +32 -9
  384. package/vue/chunks/UiMeter.js +19 -10
  385. package/vue/chunks/UiNavItem.js +16 -9
  386. package/vue/chunks/UiPageHeader.js +5 -4
  387. package/vue/chunks/UiPopover.js +25 -6
  388. package/vue/chunks/UiRadio.js +34 -9
  389. package/vue/chunks/UiRadioGroup.js +37 -10
  390. package/vue/chunks/UiReel.js +11 -6
  391. package/vue/chunks/UiScrollArea.js +15 -4
  392. package/vue/chunks/UiSearchResultRow.js +9 -5
  393. package/vue/chunks/UiSearchShell.js +28 -7
  394. package/vue/chunks/UiSection.js +11 -6
  395. package/vue/chunks/UiSelect.js +33 -10
  396. package/vue/chunks/UiSeparator.js +5 -4
  397. package/vue/chunks/UiSidebar.js +43 -12
  398. package/vue/chunks/UiSpinner.js +9 -5
  399. package/vue/chunks/UiStack.js +11 -6
  400. package/vue/chunks/UiStatusMessage.js +11 -6
  401. package/vue/chunks/UiSwitch.js +34 -9
  402. package/vue/chunks/UiSwitcher.js +28 -7
  403. package/vue/chunks/UiTable.js +20 -6
  404. package/vue/chunks/UiTabs.js +34 -9
  405. package/vue/chunks/UiText.js +29 -20
  406. package/vue/chunks/UiTextarea.js +42 -13
  407. package/vue/chunks/UiToast.js +19 -5
  408. package/vue/chunks/UiToastRegion.js +19 -5
  409. package/vue/chunks/UiTooltip.js +37 -10
  410. package/vue/chunks/UiTopBar.js +1 -1
  411. package/vue/chunks/UiTree.js +35 -10
  412. package/vue/chunks/UiTreeItem.js +58 -17
  413. package/vue/chunks/host.js +22 -4
  414. package/vue/chunks/props.js +20 -7
  415. package/vue/components.css +1228 -1205
  416. package/vue/editor/index.js +9 -2
  417. package/vue/host.ts +50 -6
@@ -12,7 +12,7 @@ export default function controller(host) {
12
12
  const overlayId = `ui-dialog-${Math.random().toString(36).slice(2, 11)}`;
13
13
  let trigger = null;
14
14
  let lastFor = "";
15
- let lastExternalOpen = Boolean(host.state.open);
15
+ let lastExternalOpen = Boolean(host.props.open.value);
16
16
  let lastOpen;
17
17
  host.state.internalOpen = lastExternalOpen;
18
18
 
@@ -34,7 +34,7 @@ export default function controller(host) {
34
34
  apply();
35
35
  });
36
36
  const syncTrigger = () => {
37
- const nextFor = String(host.state.for ?? "");
37
+ const nextFor = String(host.props.for.value ?? "");
38
38
  if (nextFor === lastFor) return;
39
39
  lastFor = nextFor;
40
40
  trigger?.removeEventListener("click", onTriggerClick);
@@ -47,22 +47,22 @@ export default function controller(host) {
47
47
  }
48
48
  };
49
49
  const apply = () => {
50
- const externalOpen = Boolean(host.state.open);
50
+ const externalOpen = Boolean(host.props.open.value);
51
51
  if (externalOpen !== lastExternalOpen) {
52
52
  lastExternalOpen = externalOpen;
53
53
  host.state.internalOpen = externalOpen;
54
54
  }
55
- host.state.accessibleLabel = inferredLabel(element, host.state.label);
55
+ host.state.accessibleLabel = inferredLabel(element, host.props.label.value);
56
56
  dialog?.setAttribute("aria-label", String(host.state.accessibleLabel));
57
- if (host.state.alert) dialog?.setAttribute("role", "alertdialog");
57
+ if (host.props.alert.value) dialog?.setAttribute("role", "alertdialog");
58
58
  else dialog?.removeAttribute("role");
59
59
  syncTrigger();
60
60
  const open = Boolean(host.state.internalOpen);
61
61
  // `modeless` is a deprecated no-op: non-modal is the default. An alert dialog is always modal (APG alertdialog).
62
- const modal = Boolean(host.state.modal || host.state.alert);
62
+ const modal = Boolean(host.props.modal.value || host.props.alert.value);
63
63
  // An unset or unknown closedby follows native <dialog>'s auto state: closerequest when modal, none otherwise.
64
- const requestedClosedBy = ["any", "closerequest", "none"].includes(host.state.closedby) ? host.state.closedby : modal ? "closerequest" : "none";
65
- const closedBy = host.state.alert && requestedClosedBy === "any" ? "closerequest" : requestedClosedBy;
64
+ const requestedClosedBy = ["any", "closerequest", "none"].includes(host.props.closedby.value) ? host.props.closedby.value : modal ? "closerequest" : "none";
65
+ const closedBy = host.props.alert.value && requestedClosedBy === "any" ? "closerequest" : requestedClosedBy;
66
66
  trigger?.setAttribute("aria-expanded", String(open));
67
67
  if (!dialog) return;
68
68
  dialog.setAttribute("closedby", closedBy);
@@ -72,7 +72,7 @@ export default function controller(host) {
72
72
  if (modal) dialog.showModal();
73
73
  else dialog.show();
74
74
  }
75
- openOverlay({ id: overlayId, modal, element, dismissible: true, canClose: (reason) => reason === "light-dismiss" ? closedBy === "any" : reason !== "escape" || closedBy !== "none", requestClose });
75
+ openOverlay({ id: overlayId, modal, element, modalElement: dialog, dismissible: true, canClose: (reason) => reason === "light-dismiss" ? closedBy === "any" : reason !== "escape" || closedBy !== "none", requestClose });
76
76
  } else {
77
77
  if (dialog.open) dialog.close();
78
78
  closeOverlay(document, overlayId);
@@ -83,7 +83,7 @@ export default function controller(host) {
83
83
  lastOpen = open;
84
84
  };
85
85
  const onClose = (event) => {
86
- if (event instanceof CustomEvent) return;
86
+ if (event instanceof CustomEvent || event.target !== dialog) return;
87
87
  // Consumers receive one Looma close event with a reason, not an additional native close event.
88
88
  event.stopImmediatePropagation();
89
89
  if (dialog.open || !host.state.internalOpen) return;
@@ -104,7 +104,7 @@ export default function controller(host) {
104
104
  requestTopOverlayClose(document, "escape", "keyboard");
105
105
  };
106
106
  const observer = new MutationObserver(() => {
107
- const label = inferredLabel(element, host.state.label);
107
+ const label = inferredLabel(element, host.props.label.value);
108
108
  if (label !== host.state.accessibleLabel) host.state.accessibleLabel = label;
109
109
  });
110
110
  observer.observe(element, { childList: true, subtree: true, characterData: true });
@@ -16,7 +16,7 @@ export default function controller(host) {
16
16
  const document = host.element.ownerDocument;
17
17
  const [trigger, stopTracking] = trackTrigger(host);
18
18
  host.state.contentId = `ui-disclosure-${++disclosures}`;
19
- let external = host.state.open;
19
+ let external = host.props.open.value;
20
20
  host.state.internalOpen = Boolean(external);
21
21
  let groupName = "";
22
22
  const member = {
@@ -27,7 +27,7 @@ export default function controller(host) {
27
27
  },
28
28
  };
29
29
  const syncGroup = (reason, how) => {
30
- const name = String(host.state.name || "");
30
+ const name = String(host.props.name.value || "");
31
31
  if (name !== groupName) {
32
32
  if (groupName) groupFor(document, groupName).delete(member);
33
33
  groupName = name;
@@ -38,11 +38,11 @@ export default function controller(host) {
38
38
  }
39
39
  };
40
40
  const stop = host.effect(() => {
41
- if (host.state.open !== external) {
42
- external = host.state.open;
41
+ if (host.props.open.value !== external) {
42
+ external = host.props.open.value;
43
43
  host.state.internalOpen = Boolean(external);
44
44
  }
45
- const level = Number(host.state.headingLevel);
45
+ const level = Number(host.props.headingLevel.value);
46
46
  host.state.headingRole = Number.isInteger(level) && level >= 2 && level <= 6 ? "heading" : null;
47
47
  host.state.headingAriaLevel = host.state.headingRole ? level : null;
48
48
  syncGroup("programmatic", "programmatic");
@@ -50,7 +50,7 @@ export default function controller(host) {
50
50
  else host.refs.panel.setAttribute("hidden", "until-found");
51
51
  });
52
52
  const onClick = () => {
53
- if (host.state.disabled) return;
53
+ if (host.props.disabled.value) return;
54
54
  const open = !host.state.internalOpen;
55
55
  const how = trigger();
56
56
  host.state.internalOpen = open;
@@ -8,15 +8,15 @@ export default function controller(host) {
8
8
  const document = element.ownerDocument;
9
9
  const { preview, input } = host.refs;
10
10
 
11
- let lastExternalEdit = Boolean(host.state.edit);
12
- let lastExternalValue = String(host.state.value ?? "");
11
+ let lastExternalEdit = Boolean(host.props.edit.value);
12
+ let lastExternalValue = String(host.props.value.value ?? "");
13
13
  host.state.internalEdit = lastExternalEdit;
14
14
  host.state.internalValue = lastExternalValue;
15
15
  host.state.draft = lastExternalValue;
16
16
 
17
17
  const apply = () => {
18
- const externalEdit = Boolean(host.state.edit);
19
- const externalValue = String(host.state.value ?? "");
18
+ const externalEdit = Boolean(host.props.edit.value);
19
+ const externalValue = String(host.props.value.value ?? "");
20
20
  if (externalEdit !== lastExternalEdit) {
21
21
  lastExternalEdit = externalEdit;
22
22
  host.state.internalEdit = externalEdit;
@@ -29,13 +29,13 @@ export default function controller(host) {
29
29
  }
30
30
  // The inactive input stays in layout (it shares the value's cell) but out of the tab order.
31
31
  input.tabIndex = host.state.internalEdit ? 0 : -1;
32
- const maxLength = Number(host.state.maxLength);
32
+ const maxLength = Number(host.props.maxLength.value);
33
33
  if (Number.isFinite(maxLength) && maxLength > 0) input.maxLength = Math.floor(maxLength);
34
34
  else input.removeAttribute("maxlength");
35
35
  };
36
36
 
37
37
  const setEditing = (next, reason, trigger, returnFocus = true) => {
38
- if (host.state.disabled || Boolean(host.state.internalEdit) === next) return;
38
+ if (host.props.disabled.value || Boolean(host.state.internalEdit) === next) return;
39
39
  // Measured before the input is disabled, which drops focus to the body. A press elsewhere has
40
40
  // not moved focus yet, so it says not to return it.
41
41
  const focusWasInside = returnFocus && element.contains(document.activeElement);
@@ -8,12 +8,12 @@ export default function controller(host) {
8
8
  const element = host.element;
9
9
  let selected = { rows: 3, cols: 3 };
10
10
  let preview = null;
11
- let lastHeaderRow = Boolean(host.state.headerRow);
11
+ let lastHeaderRow = Boolean(host.props.headerRow.value);
12
12
  host.state.withHeaderRow = lastHeaderRow;
13
13
 
14
14
  const update = () => {
15
- const rows = bounded(host.state.maxRows, 8);
16
- const cols = bounded(host.state.maxCols, 8);
15
+ const rows = bounded(host.props.maxRows.value, 8);
16
+ const cols = bounded(host.props.maxCols.value, 8);
17
17
  selected = { rows: Math.min(selected.rows, rows), cols: Math.min(selected.cols, cols) };
18
18
  const active = preview ?? selected;
19
19
  host.state.rows = rows;
@@ -26,7 +26,7 @@ export default function controller(host) {
26
26
  });
27
27
  };
28
28
  const stop = host.effect(() => {
29
- const headerRow = Boolean(host.state.headerRow);
29
+ const headerRow = Boolean(host.props.headerRow.value);
30
30
  if (headerRow !== lastHeaderRow) {
31
31
  lastHeaderRow = headerRow;
32
32
  host.state.withHeaderRow = headerRow;
@@ -5,7 +5,7 @@ export default function controller(host) {
5
5
  const element = host.element;
6
6
  const authoredLabel = element.hasAttribute("aria-label") || element.hasAttribute("aria-labelledby");
7
7
  const place = () => {
8
- if (host.state.visible) positionMenu(element, normalizeAnchor(host.state.anchorRect), 320);
8
+ if (host.state.visible) positionMenu(element, normalizeAnchor(host.props.anchorRect.value), 320);
9
9
  };
10
10
  const options = () => Array.from(element.querySelectorAll('[role="option"]'));
11
11
  const syncOptions = () => {
@@ -19,18 +19,18 @@ export default function controller(host) {
19
19
  if (rows.length) element.setAttribute("aria-activedescendant", rows[active].id);
20
20
  else element.removeAttribute("aria-activedescendant");
21
21
  const empty = Boolean(host.refs.empty.children.length);
22
- host.refs.empty.hidden = rows.length > 0 || host.state.loading;
23
- const visible = Boolean(host.state.open && normalizeAnchor(host.state.anchorRect)
24
- && (host.state.loading || rows.length > 0 || empty));
22
+ host.refs.empty.hidden = rows.length > 0 || host.props.loading.value;
23
+ const visible = Boolean(host.props.open.value && normalizeAnchor(host.props.anchorRect.value)
24
+ && (host.props.loading.value || rows.length > 0 || empty));
25
25
  if (host.state.visible !== visible) host.state.visible = visible;
26
26
  place();
27
27
  };
28
28
  const stop = host.effect(() => {
29
- if (!authoredLabel) element.setAttribute("aria-label", String(host.state.label || "Mentions"));
30
- const items = (Array.isArray(host.state.items) ? host.state.items : []).slice(0, 20);
29
+ if (!authoredLabel) element.setAttribute("aria-label", String(host.props.label.value || "Mentions"));
30
+ const items = (Array.isArray(host.props.items.value) ? host.props.items.value : []).slice(0, 20);
31
31
  host.state.rows = items.map((item) => ({ ...item, initials: item.initials ?? String(item.label).slice(0, 2).toUpperCase() }));
32
- host.state.searching = Boolean(host.state.loading && !items.length);
33
- host.state.active = Math.min(Number(host.state.selectedIndex ?? 0), Math.max(0, items.length - 1));
32
+ host.state.searching = Boolean(host.props.loading.value && !items.length);
33
+ host.state.active = Math.min(Number(host.props.selectedIndex.value ?? 0), Math.max(0, items.length - 1));
34
34
  host.state.prefix = element.id || "ui-editor-mention-menu";
35
35
  queueMicrotask(syncOptions);
36
36
  });
@@ -5,11 +5,11 @@ export default function controller(host) {
5
5
  const element = host.element;
6
6
  const authoredLabel = element.hasAttribute("aria-label") || element.hasAttribute("aria-labelledby");
7
7
  const place = () => {
8
- if (host.state.visible) positionMenu(element, normalizeAnchor(host.state.anchorRect), 280);
8
+ if (host.state.visible) positionMenu(element, normalizeAnchor(host.props.anchorRect.value), 280);
9
9
  };
10
10
  const options = () => Array.from(element.querySelectorAll('[role="option"]'));
11
11
  const syncOptions = () => {
12
- const query = String(host.state.query || "").trim().toLocaleLowerCase();
12
+ const query = String(host.props.query.value || "").trim().toLocaleLowerCase();
13
13
  const generated = host.state.rows.length > 0;
14
14
  for (const row of options()) {
15
15
  if (generated) break;
@@ -28,16 +28,16 @@ export default function controller(host) {
28
28
  row.setAttribute("aria-selected", String(index === active));
29
29
  });
30
30
  host.refs.empty.hidden = rows.length > 0;
31
- const visible = Boolean(host.state.open && normalizeAnchor(host.state.anchorRect)
31
+ const visible = Boolean(host.props.open.value && normalizeAnchor(host.props.anchorRect.value)
32
32
  && (rows.length > 0 || host.refs.empty.children.length));
33
33
  if (host.state.visible !== visible) host.state.visible = visible;
34
34
  place();
35
35
  };
36
36
  const stop = host.effect(() => {
37
- const items = Array.isArray(host.state.items) ? host.state.items : [];
38
- if (!authoredLabel) element.setAttribute("aria-label", String(host.state.label || "Insert block"));
37
+ const items = Array.isArray(host.props.items.value) ? host.props.items.value : [];
38
+ if (!authoredLabel) element.setAttribute("aria-label", String(host.props.label.value || "Insert block"));
39
39
  host.state.rows = items.map((item) => ({ ...item, value: String(item.value ?? item.title) }));
40
- host.state.active = Number(host.state.selectedIndex ?? 0);
40
+ host.state.active = Number(host.props.selectedIndex.value ?? 0);
41
41
  queueMicrotask(syncOptions);
42
42
  });
43
43
  const rowOf = (event) => event.target.closest?.('[role="option"]');
@@ -48,10 +48,10 @@ export default function controller(host) {
48
48
  frame = requestAnimationFrame(nudge);
49
49
  };
50
50
  const stop = host.effect(() => {
51
- const scope = String(host.state.scope || "cell");
52
- const enabled = new Set((Array.isArray(host.state.actions) ? host.state.actions : []).filter((action) =>
51
+ const scope = String(host.props.scope.value || "cell");
52
+ const enabled = new Set((Array.isArray(host.props.actions.value) ? host.props.actions.value : []).filter((action) =>
53
53
  scope === "cell" || (scope === "row" ? !action.includes("column") : !action.includes("row"))));
54
- const background = String(host.state.cellBackground ?? "");
54
+ const background = String(host.props.cellBackground.value ?? "");
55
55
  const swatches = backgrounds.filter(([action]) => enabled.has(action))
56
56
  .map(([action, label, color]) => ({ action, label, color, selected: color === background }));
57
57
  host.state.swatches = swatches.length ? swatches : null;
@@ -59,10 +59,10 @@ export default function controller(host) {
59
59
  .map(([heading, items]) => ({
60
60
  heading,
61
61
  items: items.filter(([action]) => enabled.has(action))
62
- .map(([action, label, icon, tone]) => ({ action, label, icon, danger: tone === "danger", checkable: action.startsWith("toggle-header-"), checked: action === "toggle-header-row" ? Boolean(host.state.headerRow) : action === "toggle-header-column" ? Boolean(host.state.headerColumn) : false })),
62
+ .map(([action, label, icon, tone]) => ({ action, label, icon, danger: tone === "danger", checkable: action.startsWith("toggle-header-"), checked: action === "toggle-header-row" ? Boolean(host.props.headerRow.value) : action === "toggle-header-column" ? Boolean(host.props.headerColumn.value) : false })),
63
63
  }))
64
64
  .filter((section) => section.items.length);
65
- if (host.state.open) schedule();
65
+ if (host.props.open.value) schedule();
66
66
  });
67
67
  const onClick = (event) => {
68
68
  const action = event.target.closest?.("[data-action]")?.dataset.action;
@@ -99,7 +99,7 @@ export default function controller(host) {
99
99
  if (to !== from) host.dispatch(axis === "row" ? "reorder-row" : "reorder-column", { fromIndex: from, toIndex: to });
100
100
  };
101
101
  const boundaries = (axis) => {
102
- const values = host.state.geometry?.[axis === "row" ? "rowBoundaries" : "columnBoundaries"];
102
+ const values = host.props.geometry.value?.[axis === "row" ? "rowBoundaries" : "columnBoundaries"];
103
103
  if (Array.isArray(values) && values.length >= 2 && values.every(Number.isFinite)) return values;
104
104
  const rect = element.getBoundingClientRect();
105
105
  return fallbackBoundaries(3, axis === "row" ? rect.height : rect.width);
@@ -118,19 +118,19 @@ export default function controller(host) {
118
118
  };
119
119
  });
120
120
  const stop = host.effect(() => {
121
- if (!host.state.open) {
121
+ if (!host.props.open.value) {
122
122
  host.state.activeKey = "";
123
123
  return;
124
124
  }
125
125
  host.state.rows = controls("row");
126
126
  host.state.cols = controls("col");
127
- const hovered = host.state.geometry?.hoveredCell ?? null;
127
+ const hovered = host.props.geometry.value?.hoveredCell ?? null;
128
128
  host.state.hovered = hovered && {
129
129
  ...hovered,
130
130
  rowOffset: `${hovered.top + hovered.height / 2}px`,
131
131
  columnOffset: `${hovered.left + hovered.width / 2}px`,
132
132
  };
133
- const active = host.state.geometry?.activeCell ?? null;
133
+ const active = host.props.geometry.value?.activeCell ?? null;
134
134
  host.state.active = active && { ...active, menuLeft: `${active.left + active.width - 30}px`, menuTop: `${active.top + 6}px` };
135
135
  queueMicrotask(proximity.refresh);
136
136
  });
@@ -24,26 +24,26 @@ export default function controller(host) {
24
24
  menu.style.bottom = below >= above ? "auto" : "calc(100% + var(--ui-space-2))";
25
25
  };
26
26
  const stop = host.effect(() => {
27
- const enabled = new Set(Array.isArray(host.state.actions) ? host.state.actions : []);
28
- const alignment = host.state.cellAlignment === "center" || host.state.cellAlignment === "right" ? host.state.cellAlignment : "left";
27
+ const enabled = new Set(Array.isArray(host.props.actions.value) ? host.props.actions.value : []);
28
+ const alignment = host.props.cellAlignment.value === "center" || host.props.cellAlignment.value === "right" ? host.props.cellAlignment.value : "left";
29
29
  host.state.alignments = [["align-left", "Align left"], ["align-center", "Align center"], ["align-right", "Align right"]]
30
30
  .filter(([action]) => enabled.has(action))
31
31
  .map(([action, label]) => ({ action, label, active: action === `align-${alignment}` }));
32
32
  host.state.structure = [["add-row-after", "Add row", "rows"], ["add-column-after", "Add column", "columns"]]
33
33
  .filter(([action]) => enabled.has(action))
34
34
  .map(([action, label, icon]) => ({ action, label, icon }));
35
- const background = String(host.state.cellBackground ?? "");
35
+ const background = String(host.props.cellBackground.value ?? "");
36
36
  host.state.swatches = backgrounds.filter(([action]) => enabled.has(action))
37
37
  .map(([action, label, color]) => ({ action, label, color, selected: color === background }));
38
38
  host.state.sections = overflowSections
39
39
  .map(([heading, items]) => ({
40
40
  heading,
41
41
  items: items.filter(([action]) => enabled.has(action))
42
- .map(([action, label, icon, tone]) => ({ action, label, icon, danger: tone === "danger", checkable: action.startsWith("toggle-header-"), checked: action === "toggle-header-row" ? Boolean(host.state.headerRow) : action === "toggle-header-column" ? Boolean(host.state.headerColumn) : false })),
42
+ .map(([action, label, icon, tone]) => ({ action, label, icon, danger: tone === "danger", checkable: action.startsWith("toggle-header-"), checked: action === "toggle-header-row" ? Boolean(host.props.headerRow.value) : action === "toggle-header-column" ? Boolean(host.props.headerColumn.value) : false })),
43
43
  }))
44
44
  .filter((section) => section.items.length);
45
45
  host.state.hasOverflow = host.state.swatches.length > 0 || host.state.sections.length > 0;
46
- if (!host.state.open || !host.state.hasOverflow) host.state.overflowOpen = false;
46
+ if (!host.props.open.value || !host.state.hasOverflow) host.state.overflowOpen = false;
47
47
  });
48
48
  const onClick = (event) => {
49
49
  const action = event.target.closest?.("[data-action]")?.dataset.action;
@@ -44,7 +44,7 @@ export default function controller(host) {
44
44
  if (!help.id) help.id = id("form-field-help");
45
45
  described.push(help.id);
46
46
  }
47
- if (error && host.state.invalid) {
47
+ if (error && host.props.invalid.value) {
48
48
  if (!error.id) error.id = id("form-field-error");
49
49
  described.push(error.id);
50
50
  }
@@ -52,9 +52,9 @@ export default function controller(host) {
52
52
  const next = Array.from(new Set([...external, ...described])).join(" ");
53
53
  if (next && input.getAttribute("aria-describedby") !== next) input.setAttribute("aria-describedby", next);
54
54
  else if (!next && input.hasAttribute("aria-describedby")) input.removeAttribute("aria-describedby");
55
- input.disabled = Boolean(host.state.disabled);
56
- input.required = Boolean(host.state.required);
57
- input.setAttribute("aria-invalid", String(Boolean(host.state.invalid)));
55
+ input.disabled = Boolean(host.props.disabled.value);
56
+ input.required = Boolean(host.props.required.value);
57
+ input.setAttribute("aria-invalid", String(Boolean(host.props.invalid.value)));
58
58
  };
59
59
  const schedule = () => {
60
60
  if (queued) return;
@@ -1,11 +1,11 @@
1
1
  // Marks an anticipatory button for the enclosing ui-affordance-scope, which reveals it on proximity.
2
2
  export default function controller(host) {
3
3
  const stop = host.effect(() => {
4
- if (host.state.anticipatory) host.element.setAttribute("data-ui-affordance", "button");
4
+ if (host.props.anticipatory.value) host.element.setAttribute("data-ui-affordance", "button");
5
5
  else host.element.removeAttribute("data-ui-affordance");
6
6
  });
7
7
  const onClick = (event) => {
8
- if (!host.state.loading && !host.state.pending) return;
8
+ if (!host.props.loading.value && !host.props.pending.value) return;
9
9
  event.preventDefault();
10
10
  event.stopImmediatePropagation();
11
11
  };
@@ -2,7 +2,7 @@
2
2
  // value is also made the native default, so a form reset returns to it.
3
3
  export default function controller(host) {
4
4
  return host.effect(() => {
5
- const value = host.state.value;
5
+ const value = host.props.value.value;
6
6
  if (value === undefined || value === null) return;
7
7
  const input = host.element;
8
8
  const text = String(value);
@@ -134,6 +134,20 @@
134
134
  white-space: nowrap;
135
135
  }
136
136
 
137
+ /* Fixed text is part of the value, but should not look editable. */
138
+ .affix:has([slot="prefix"]),
139
+ .affix:has([slot="suffix"]) {
140
+ background: var(--ui-surface-muted);
141
+ }
142
+
143
+ .affix:has([slot="prefix"]) {
144
+ border-inline-end: 1px solid var(--ui-border-divider);
145
+ }
146
+
147
+ .affix:has([slot="suffix"]) {
148
+ border-inline-start: 1px solid var(--ui-border-divider);
149
+ }
150
+
137
151
  /* Centred rather than padded above and below: the group is exactly a lone Input's height, so a
138
152
  small button sits inside it with the difference split evenly, and the field keeps its height. */
139
153
  .action {
@@ -50,7 +50,7 @@ export default function controller(host) {
50
50
  };
51
51
  // Click, not pointerdown: a tap's click is a user activation, so a touch keyboard opens.
52
52
  const onClick = (event) => {
53
- if (pressedAround(event) && !host.state.disabled) element.querySelector(".field input")?.focus();
53
+ if (pressedAround(event) && !host.props.disabled.value) element.querySelector(".field input")?.focus();
54
54
  };
55
55
  element.addEventListener("mousedown", onMousedown);
56
56
  element.addEventListener("click", onClick);
@@ -33,11 +33,11 @@ export default function controller(host) {
33
33
  let typeaheadTimer;
34
34
 
35
35
  const selected = () => Array.isArray(host.state.selection) ? host.state.selection : [];
36
- const externallySelected = () => host.state.multiple
37
- ? (Array.isArray(host.state.values) ? Array.from(new Set(host.state.values.map(String))) : null)
38
- : (host.state.value === undefined || host.state.value === null ? null : [String(host.state.value)]);
36
+ const externallySelected = () => host.props.multiple.value
37
+ ? (Array.isArray(host.props.values.value) ? Array.from(new Set(host.props.values.value.map(String))) : null)
38
+ : (host.props.value.value === undefined || host.props.value.value === null ? null : [String(host.props.value.value)]);
39
39
  const defaultSelection = () => externallySelected()
40
- ?? options.filter((option) => option.selected).map((option) => option.value).slice(0, host.state.multiple ? undefined : 1);
40
+ ?? options.filter((option) => option.selected).map((option) => option.value).slice(0, host.props.multiple.value ? undefined : 1);
41
41
  const enabledIndices = () => options.filter((option) => !option.disabled).map((option) => option.index);
42
42
  const render = () => {
43
43
  const set = new Set(selected());
@@ -83,9 +83,9 @@ export default function controller(host) {
83
83
  };
84
84
  const choose = (index, trigger) => {
85
85
  const option = options[index];
86
- if (!option || option.disabled || host.state.disabled) return;
86
+ if (!option || option.disabled || host.props.disabled.value) return;
87
87
  activate(index);
88
- if (host.state.multiple) {
88
+ if (host.props.multiple.value) {
89
89
  const current = selected();
90
90
  setSelection(current.includes(option.value)
91
91
  ? current.filter((value) => value !== option.value)
@@ -101,17 +101,17 @@ export default function controller(host) {
101
101
  : key === "ArrowDown" ? indices[(current + 1) % indices.length]
102
102
  : indices[(current <= 0 ? indices.length : current) - 1];
103
103
  activate(next);
104
- if (!host.state.multiple) choose(next, "keyboard");
104
+ if (!host.props.multiple.value) choose(next, "keyboard");
105
105
  };
106
106
  const onClick = (event) => {
107
- if (host.state.disabled) return;
107
+ if (host.props.disabled.value) return;
108
108
  const row = event.target.closest("[data-index]");
109
109
  if (!row || !element.contains(row)) return;
110
110
  element.focus();
111
111
  choose(Number(row.dataset.index), "pointer");
112
112
  };
113
113
  const onKeydown = (event) => {
114
- if (host.state.disabled || event.altKey || event.metaKey || event.ctrlKey) return;
114
+ if (host.props.disabled.value || event.altKey || event.metaKey || event.ctrlKey) return;
115
115
  if (["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) {
116
116
  event.preventDefault();
117
117
  move(event.key);
@@ -125,7 +125,7 @@ export default function controller(host) {
125
125
  const match = options.find((option) => !option.disabled && option.label.toLocaleLowerCase().startsWith(typeahead));
126
126
  if (match) {
127
127
  activate(match.index);
128
- if (!host.state.multiple) choose(match.index, "keyboard");
128
+ if (!host.props.multiple.value) choose(match.index, "keyboard");
129
129
  }
130
130
  }
131
131
  };
@@ -145,7 +145,7 @@ export default function controller(host) {
145
145
  authored.disabled = true;
146
146
  element.setAttribute("data-enhanced", "");
147
147
  const stop = host.effect(() => {
148
- const signature = JSON.stringify([host.state.multiple, host.state.value, host.state.values]);
148
+ const signature = JSON.stringify([host.props.multiple.value, host.props.value.value, host.props.values.value]);
149
149
  if (signature !== external) {
150
150
  external = signature;
151
151
  initial = defaultSelection();
@@ -160,7 +160,7 @@ export default function controller(host) {
160
160
  return () => {
161
161
  stop();
162
162
  observer.disconnect();
163
- authored.disabled = host.state.disabled;
163
+ authored.disabled = host.props.disabled.value;
164
164
  element.removeAttribute("data-enhanced");
165
165
  clearTimeout(typeaheadTimer);
166
166
  element.removeEventListener("click", onClick);
@@ -21,7 +21,7 @@ export default function controller(host) {
21
21
  let surface = null;
22
22
  let lastFor;
23
23
  let lastPlacement;
24
- let lastExternalOpen = Boolean(host.state.open);
24
+ let lastExternalOpen = Boolean(host.props.open.value);
25
25
  host.state.internalOpen = lastExternalOpen;
26
26
 
27
27
  const onAnchorClick = (event) => {
@@ -51,8 +51,8 @@ export default function controller(host) {
51
51
  anchorAria = null;
52
52
  };
53
53
  const setup = () => {
54
- const nextFor = host.state.inline ? "" : String(host.state.for ?? "");
55
- const nextPlacement = String(host.state.placement ?? "bottom-start");
54
+ const nextFor = host.props.inline.value ? "" : String(host.props.for.value ?? "");
55
+ const nextPlacement = String(host.props.placement.value ?? "bottom-start");
56
56
  if (nextFor === lastFor && nextPlacement === lastPlacement && surface) return;
57
57
  lastFor = nextFor;
58
58
  lastPlacement = nextPlacement;
@@ -64,8 +64,8 @@ export default function controller(host) {
64
64
  surface = anchor ? createAnchoredSurface(element, { anchor, placement: nextPlacement }) : null;
65
65
  };
66
66
  const apply = () => {
67
- const inline = Boolean(host.state.inline);
68
- const externalOpen = Boolean(host.state.open);
67
+ const inline = Boolean(host.props.inline.value);
68
+ const externalOpen = Boolean(host.props.open.value);
69
69
  if (externalOpen !== lastExternalOpen) {
70
70
  lastExternalOpen = externalOpen;
71
71
  host.state.internalOpen = externalOpen;
@@ -97,14 +97,14 @@ export default function controller(host) {
97
97
  return;
98
98
  }
99
99
  host.dispatch("select", { value, trigger });
100
- if (host.state.inline) return;
100
+ if (host.props.inline.value) return;
101
101
  host.dispatch("close", { open: false, reason: "action", trigger });
102
102
  host.state.internalOpen = false;
103
103
  };
104
104
  const onClick = (event) => select(menuItemFrom(event.target), triggerFor(event));
105
105
  const onKeydown = (event) => {
106
106
  if (event.key === "Escape") {
107
- if (host.state.inline) return;
107
+ if (host.props.inline.value) return;
108
108
  event.preventDefault();
109
109
  requestTopOverlayClose(document, "escape", "keyboard");
110
110
  return;
@@ -4,13 +4,13 @@ function radioScope(item) {
4
4
 
5
5
  export default function controller(host) {
6
6
  const item = host.element;
7
- let external = Boolean(host.state.checked);
7
+ let external = Boolean(host.props.checked.value);
8
8
  host.state.internalChecked = external;
9
9
 
10
10
  const setChecked = (checked, trigger, announce) => {
11
11
  if (Boolean(host.state.internalChecked) === checked) return;
12
12
  host.state.internalChecked = checked;
13
- if (announce) host.dispatch("change", { checked, value: String(host.state.value ?? ""), type: String(host.state.type), trigger });
13
+ if (announce) host.dispatch("change", { checked, value: String(host.props.value.value ?? ""), type: String(host.props.type.value), trigger });
14
14
  };
15
15
  const clearOtherRadios = (trigger, announce) => {
16
16
  const scope = radioScope(item);
@@ -21,8 +21,8 @@ export default function controller(host) {
21
21
  }
22
22
  };
23
23
  const onActivate = (event) => {
24
- const type = String(host.state.type);
25
- if (host.state.disabled || type === "action") return;
24
+ const type = String(host.props.type.value);
25
+ if (host.props.disabled.value || type === "action") return;
26
26
  const checked = type === "radio" ? true : !host.state.internalChecked;
27
27
  if (type === "radio") clearOtherRadios(event.detail.trigger, true);
28
28
  setChecked(checked, event.detail.trigger, true);
@@ -30,15 +30,15 @@ export default function controller(host) {
30
30
  };
31
31
  const onClear = (event) => setChecked(false, event.detail.trigger, event.detail.announce);
32
32
  const stop = host.effect(() => {
33
- const checked = Boolean(host.state.checked);
33
+ const checked = Boolean(host.props.checked.value);
34
34
  if (checked === external) return;
35
35
  external = checked;
36
- if (checked && host.state.type === "radio") clearOtherRadios("programmatic", false);
36
+ if (checked && host.props.type.value === "radio") clearOtherRadios("programmatic", false);
37
37
  setChecked(checked, "programmatic", false);
38
38
  });
39
39
  item.addEventListener("ui-menu-item-activate", onActivate);
40
40
  item.addEventListener("ui-menu-item-clear", onClear);
41
- if (external && host.state.type === "radio") queueMicrotask(() => clearOtherRadios("programmatic", false));
41
+ if (external && host.props.type.value === "radio") queueMicrotask(() => clearOtherRadios("programmatic", false));
42
42
  return () => {
43
43
  stop();
44
44
  item.removeEventListener("ui-menu-item-activate", onActivate);
@@ -18,7 +18,7 @@ export default function controller(host) {
18
18
  let lastFor;
19
19
  let lastPlacement;
20
20
  let lastOpen;
21
- let lastExternalOpen = Boolean(host.state.open);
21
+ let lastExternalOpen = Boolean(host.props.open.value);
22
22
  host.state.internalOpen = lastExternalOpen;
23
23
 
24
24
  const close = (reason, trigger) => {
@@ -47,8 +47,8 @@ export default function controller(host) {
47
47
  anchorExpanded = null;
48
48
  };
49
49
  const setup = () => {
50
- const nextFor = String(host.state.for ?? "");
51
- const nextPlacement = String(host.state.placement ?? "bottom-start");
50
+ const nextFor = String(host.props.for.value ?? "");
51
+ const nextPlacement = String(host.props.placement.value ?? "bottom-start");
52
52
  if (surface && nextFor === lastFor && nextPlacement === lastPlacement) return;
53
53
  lastFor = nextFor;
54
54
  lastPlacement = nextPlacement;
@@ -60,7 +60,7 @@ export default function controller(host) {
60
60
  surface = anchor ? createAnchoredSurface(element, { anchor, placement: nextPlacement, gap: offset }) : null;
61
61
  };
62
62
  const apply = () => {
63
- const externalOpen = Boolean(host.state.open);
63
+ const externalOpen = Boolean(host.props.open.value);
64
64
  if (externalOpen !== lastExternalOpen) {
65
65
  lastExternalOpen = externalOpen;
66
66
  host.state.internalOpen = externalOpen;