@threadlabs/looma 0.23.19 → 0.23.21

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 (380) hide show
  1. package/components/shared/radio-group.js +27 -0
  2. package/components/ui-combobox/ui-combobox.html +7 -8
  3. package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +2 -2
  4. package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +1 -1
  5. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +3 -3
  6. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +2 -2
  7. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +4 -4
  8. package/components/ui-listbox/ui-listbox.html +1 -1
  9. package/components/ui-radio/ui-radio.js +8 -4
  10. package/components/ui-radio-group/ui-radio-group.js +12 -5
  11. package/components/ui-toast-region/ui-toast-region.html +1 -1
  12. package/dist/index.js +1 -1
  13. package/package.json +2 -2
  14. package/styles/ui-action-bar.css +1 -1
  15. package/styles/ui-affordance-scope.css +1 -1
  16. package/styles/ui-avatar-group.css +1 -1
  17. package/styles/ui-avatar.css +1 -1
  18. package/styles/ui-badge.css +1 -1
  19. package/styles/ui-breadcrumb-item.css +1 -1
  20. package/styles/ui-breadcrumbs.css +1 -1
  21. package/styles/ui-button.css +1 -1
  22. package/styles/ui-callout.css +1 -1
  23. package/styles/ui-card.css +1 -1
  24. package/styles/ui-checkbox.css +1 -1
  25. package/styles/ui-cluster.css +1 -1
  26. package/styles/ui-combobox.css +1 -1
  27. package/styles/ui-container.css +1 -1
  28. package/styles/ui-context-menu.css +1 -1
  29. package/styles/ui-cover.css +1 -1
  30. package/styles/ui-description-item.css +1 -1
  31. package/styles/ui-description-list.css +1 -1
  32. package/styles/ui-dialog.css +1 -1
  33. package/styles/ui-disclosure.css +1 -1
  34. package/styles/ui-editable.css +1 -1
  35. package/styles/ui-editor-insert-table-grid.css +1 -1
  36. package/styles/ui-editor-mention-menu-item.css +1 -1
  37. package/styles/ui-editor-mention-menu.css +1 -1
  38. package/styles/ui-editor-slash-menu-group.css +1 -1
  39. package/styles/ui-editor-slash-menu-item.css +1 -1
  40. package/styles/ui-editor-slash-menu.css +1 -1
  41. package/styles/ui-editor-table-context-menu.css +1 -1
  42. package/styles/ui-editor-table-overlay.css +1 -1
  43. package/styles/ui-editor-table-toolbar.css +1 -1
  44. package/styles/ui-editor-toolbar.css +1 -1
  45. package/styles/ui-floating-action-button.css +1 -1
  46. package/styles/ui-form-field.css +1 -1
  47. package/styles/ui-grid.css +1 -1
  48. package/styles/ui-icon-button.css +1 -1
  49. package/styles/ui-icon.css +1 -1
  50. package/styles/ui-input-group.css +1 -1
  51. package/styles/ui-input.css +1 -1
  52. package/styles/ui-list-item.css +1 -1
  53. package/styles/ui-list.css +1 -1
  54. package/styles/ui-listbox.css +1 -1
  55. package/styles/ui-menu-group.css +1 -1
  56. package/styles/ui-menu-item.css +1 -1
  57. package/styles/ui-menu.css +1 -1
  58. package/styles/ui-meter.css +1 -1
  59. package/styles/ui-nav-item.css +1 -1
  60. package/styles/ui-page-header.css +1 -1
  61. package/styles/ui-popover.css +1 -1
  62. package/styles/ui-radio-group.css +1 -1
  63. package/styles/ui-radio.css +1 -1
  64. package/styles/ui-reel.css +1 -1
  65. package/styles/ui-scroll-area.css +1 -1
  66. package/styles/ui-search-result-row.css +1 -1
  67. package/styles/ui-search-shell.css +1 -1
  68. package/styles/ui-section.css +1 -1
  69. package/styles/ui-select.css +1 -1
  70. package/styles/ui-separator.css +1 -1
  71. package/styles/ui-sidebar.css +1 -1
  72. package/styles/ui-spinner.css +1 -1
  73. package/styles/ui-stack.css +1 -1
  74. package/styles/ui-status-message.css +1 -1
  75. package/styles/ui-switch.css +1 -1
  76. package/styles/ui-switcher.css +1 -1
  77. package/styles/ui-table.css +1 -1
  78. package/styles/ui-tabs.css +1 -1
  79. package/styles/ui-text.css +1 -1
  80. package/styles/ui-textarea.css +1 -1
  81. package/styles/ui-toast-region.css +1 -1
  82. package/styles/ui-toast.css +1 -1
  83. package/styles/ui-tooltip.css +1 -1
  84. package/styles/ui-top-bar.css +1 -1
  85. package/styles/ui-tree-item.css +1 -1
  86. package/styles/ui-tree.css +1 -1
  87. package/vanilla/UiActionBar.d.ts +1 -1
  88. package/vanilla/UiActionBar.js +1 -1
  89. package/vanilla/UiAffordanceScope.d.ts +1 -1
  90. package/vanilla/UiAffordanceScope.js +1 -1
  91. package/vanilla/UiAvatar.d.ts +1 -1
  92. package/vanilla/UiAvatar.js +1 -1
  93. package/vanilla/UiAvatarGroup.d.ts +1 -1
  94. package/vanilla/UiAvatarGroup.js +1 -1
  95. package/vanilla/UiBadge.d.ts +1 -1
  96. package/vanilla/UiBadge.js +1 -1
  97. package/vanilla/UiBreadcrumbItem.d.ts +1 -1
  98. package/vanilla/UiBreadcrumbItem.js +1 -1
  99. package/vanilla/UiBreadcrumbs.d.ts +1 -1
  100. package/vanilla/UiBreadcrumbs.js +1 -1
  101. package/vanilla/UiButton.d.ts +1 -1
  102. package/vanilla/UiButton.js +1 -1
  103. package/vanilla/UiCallout.d.ts +1 -1
  104. package/vanilla/UiCallout.js +1 -1
  105. package/vanilla/UiCard.d.ts +1 -1
  106. package/vanilla/UiCard.js +1 -1
  107. package/vanilla/UiCheckbox.d.ts +1 -1
  108. package/vanilla/UiCheckbox.js +1 -1
  109. package/vanilla/UiCluster.d.ts +1 -1
  110. package/vanilla/UiCluster.js +1 -1
  111. package/vanilla/UiCombobox.d.ts +1 -1
  112. package/vanilla/UiCombobox.js +181 -167
  113. package/vanilla/UiContainer.d.ts +1 -1
  114. package/vanilla/UiContainer.js +1 -1
  115. package/vanilla/UiContextMenu.d.ts +1 -1
  116. package/vanilla/UiContextMenu.js +1 -1
  117. package/vanilla/UiCover.d.ts +1 -1
  118. package/vanilla/UiCover.js +1 -1
  119. package/vanilla/UiDescriptionItem.d.ts +1 -1
  120. package/vanilla/UiDescriptionItem.js +1 -1
  121. package/vanilla/UiDescriptionList.d.ts +1 -1
  122. package/vanilla/UiDescriptionList.js +1 -1
  123. package/vanilla/UiDialog.d.ts +1 -1
  124. package/vanilla/UiDialog.js +1 -1
  125. package/vanilla/UiDisclosure.d.ts +1 -1
  126. package/vanilla/UiDisclosure.js +1 -1
  127. package/vanilla/UiEditable.d.ts +1 -1
  128. package/vanilla/UiEditable.js +1 -1
  129. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  130. package/vanilla/UiEditorInsertTableGrid.js +1 -1
  131. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  132. package/vanilla/UiEditorMentionMenu.js +19 -13
  133. package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
  134. package/vanilla/UiEditorMentionMenuItem.js +1 -1
  135. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  136. package/vanilla/UiEditorSlashMenu.js +17 -13
  137. package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
  138. package/vanilla/UiEditorSlashMenuGroup.js +1 -1
  139. package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
  140. package/vanilla/UiEditorSlashMenuItem.js +1 -1
  141. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  142. package/vanilla/UiEditorTableContextMenu.js +26 -20
  143. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  144. package/vanilla/UiEditorTableOverlay.js +69 -65
  145. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  146. package/vanilla/UiEditorTableToolbar.js +72 -64
  147. package/vanilla/UiEditorToolbar.d.ts +1 -1
  148. package/vanilla/UiEditorToolbar.js +1 -1
  149. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  150. package/vanilla/UiFloatingActionButton.js +1 -1
  151. package/vanilla/UiFormField.d.ts +1 -1
  152. package/vanilla/UiFormField.js +1 -1
  153. package/vanilla/UiGrid.d.ts +1 -1
  154. package/vanilla/UiGrid.js +1 -1
  155. package/vanilla/UiIcon.d.ts +1 -1
  156. package/vanilla/UiIcon.js +1 -1
  157. package/vanilla/UiIconButton.d.ts +1 -1
  158. package/vanilla/UiIconButton.js +1 -1
  159. package/vanilla/UiInput.d.ts +1 -1
  160. package/vanilla/UiInput.js +1 -1
  161. package/vanilla/UiInputGroup.d.ts +1 -1
  162. package/vanilla/UiInputGroup.js +1 -1
  163. package/vanilla/UiList.d.ts +1 -1
  164. package/vanilla/UiList.js +1 -1
  165. package/vanilla/UiListItem.d.ts +1 -1
  166. package/vanilla/UiListItem.js +1 -1
  167. package/vanilla/UiListbox.d.ts +1 -1
  168. package/vanilla/UiListbox.js +33 -31
  169. package/vanilla/UiMenu.d.ts +1 -1
  170. package/vanilla/UiMenu.js +1 -1
  171. package/vanilla/UiMenuGroup.d.ts +1 -1
  172. package/vanilla/UiMenuGroup.js +1 -1
  173. package/vanilla/UiMenuItem.d.ts +1 -1
  174. package/vanilla/UiMenuItem.js +1 -1
  175. package/vanilla/UiMeter.d.ts +1 -1
  176. package/vanilla/UiMeter.js +1 -1
  177. package/vanilla/UiNavItem.d.ts +1 -1
  178. package/vanilla/UiNavItem.js +1 -1
  179. package/vanilla/UiPageHeader.d.ts +1 -1
  180. package/vanilla/UiPageHeader.js +1 -1
  181. package/vanilla/UiPopover.d.ts +1 -1
  182. package/vanilla/UiPopover.js +1 -1
  183. package/vanilla/UiRadio.d.ts +1 -1
  184. package/vanilla/UiRadio.js +1 -1
  185. package/vanilla/UiRadioGroup.d.ts +1 -1
  186. package/vanilla/UiRadioGroup.js +1 -1
  187. package/vanilla/UiReel.d.ts +1 -1
  188. package/vanilla/UiReel.js +1 -1
  189. package/vanilla/UiScrollArea.d.ts +1 -1
  190. package/vanilla/UiScrollArea.js +1 -1
  191. package/vanilla/UiSearchResultRow.d.ts +1 -1
  192. package/vanilla/UiSearchResultRow.js +1 -1
  193. package/vanilla/UiSearchShell.d.ts +1 -1
  194. package/vanilla/UiSearchShell.js +1 -1
  195. package/vanilla/UiSection.d.ts +1 -1
  196. package/vanilla/UiSection.js +1 -1
  197. package/vanilla/UiSelect.d.ts +1 -1
  198. package/vanilla/UiSelect.js +1 -1
  199. package/vanilla/UiSeparator.d.ts +1 -1
  200. package/vanilla/UiSeparator.js +1 -1
  201. package/vanilla/UiSidebar.d.ts +1 -1
  202. package/vanilla/UiSidebar.js +1 -1
  203. package/vanilla/UiSpinner.d.ts +1 -1
  204. package/vanilla/UiSpinner.js +1 -1
  205. package/vanilla/UiStack.d.ts +1 -1
  206. package/vanilla/UiStack.js +1 -1
  207. package/vanilla/UiStatusMessage.d.ts +1 -1
  208. package/vanilla/UiStatusMessage.js +1 -1
  209. package/vanilla/UiSwitch.d.ts +1 -1
  210. package/vanilla/UiSwitch.js +1 -1
  211. package/vanilla/UiSwitcher.d.ts +1 -1
  212. package/vanilla/UiSwitcher.js +1 -1
  213. package/vanilla/UiTable.d.ts +1 -1
  214. package/vanilla/UiTable.js +1 -1
  215. package/vanilla/UiTabs.d.ts +1 -1
  216. package/vanilla/UiTabs.js +1 -1
  217. package/vanilla/UiText.d.ts +1 -1
  218. package/vanilla/UiText.js +1 -1
  219. package/vanilla/UiTextarea.d.ts +1 -1
  220. package/vanilla/UiTextarea.js +1 -1
  221. package/vanilla/UiToast.d.ts +1 -1
  222. package/vanilla/UiToast.js +1 -1
  223. package/vanilla/UiToastRegion.d.ts +1 -1
  224. package/vanilla/UiToastRegion.js +13 -11
  225. package/vanilla/UiTooltip.d.ts +1 -1
  226. package/vanilla/UiTooltip.js +1 -1
  227. package/vanilla/UiTopBar.d.ts +1 -1
  228. package/vanilla/UiTopBar.js +1 -1
  229. package/vanilla/UiTree.d.ts +1 -1
  230. package/vanilla/UiTree.js +1 -1
  231. package/vanilla/UiTreeItem.d.ts +1 -1
  232. package/vanilla/UiTreeItem.js +1 -1
  233. package/vue/UiActionBar.vue +1 -1
  234. package/vue/UiAffordanceScope.vue +1 -1
  235. package/vue/UiAvatar.vue +1 -1
  236. package/vue/UiAvatarGroup.vue +2 -2
  237. package/vue/UiBadge.vue +1 -1
  238. package/vue/UiBreadcrumbItem.vue +1 -1
  239. package/vue/UiBreadcrumbs.vue +1 -1
  240. package/vue/UiButton.vue +1 -1
  241. package/vue/UiCallout.vue +1 -1
  242. package/vue/UiCard.vue +1 -1
  243. package/vue/UiCheckbox.vue +1 -1
  244. package/vue/UiCluster.vue +1 -1
  245. package/vue/UiCombobox.vue +1 -1
  246. package/vue/UiContainer.vue +1 -1
  247. package/vue/UiContextMenu.vue +1 -1
  248. package/vue/UiCover.vue +1 -1
  249. package/vue/UiDescriptionItem.vue +1 -1
  250. package/vue/UiDescriptionList.vue +1 -1
  251. package/vue/UiDialog.vue +1 -1
  252. package/vue/UiDisclosure.vue +1 -1
  253. package/vue/UiEditable.vue +1 -1
  254. package/vue/UiEditorInsertTableGrid.vue +1 -1
  255. package/vue/UiEditorMentionMenu.vue +1 -1
  256. package/vue/UiEditorMentionMenuItem.vue +1 -1
  257. package/vue/UiEditorSlashMenu.vue +1 -1
  258. package/vue/UiEditorSlashMenuGroup.vue +1 -1
  259. package/vue/UiEditorSlashMenuItem.vue +1 -1
  260. package/vue/UiEditorTableContextMenu.vue +1 -1
  261. package/vue/UiEditorTableOverlay.vue +1 -1
  262. package/vue/UiEditorTableToolbar.vue +1 -1
  263. package/vue/UiEditorToolbar.vue +1 -1
  264. package/vue/UiFloatingActionButton.vue +1 -1
  265. package/vue/UiFormField.vue +1 -1
  266. package/vue/UiGrid.vue +1 -1
  267. package/vue/UiIcon.vue +1 -1
  268. package/vue/UiIconButton.vue +1 -1
  269. package/vue/UiInput.vue +1 -1
  270. package/vue/UiInputGroup.vue +1 -1
  271. package/vue/UiList.vue +1 -1
  272. package/vue/UiListItem.vue +1 -1
  273. package/vue/UiListbox.vue +1 -1
  274. package/vue/UiMenu.vue +1 -1
  275. package/vue/UiMenuGroup.vue +1 -1
  276. package/vue/UiMenuItem.vue +1 -1
  277. package/vue/UiMeter.vue +1 -1
  278. package/vue/UiNavItem.vue +1 -1
  279. package/vue/UiPageHeader.vue +1 -1
  280. package/vue/UiPopover.vue +1 -1
  281. package/vue/UiRadio.vue +1 -1
  282. package/vue/UiRadioGroup.vue +1 -1
  283. package/vue/UiReel.vue +1 -1
  284. package/vue/UiScrollArea.vue +1 -1
  285. package/vue/UiSearchResultRow.vue +1 -1
  286. package/vue/UiSearchShell.vue +1 -1
  287. package/vue/UiSection.vue +1 -1
  288. package/vue/UiSelect.vue +1 -1
  289. package/vue/UiSeparator.vue +1 -1
  290. package/vue/UiSidebar.vue +1 -1
  291. package/vue/UiSpinner.vue +1 -1
  292. package/vue/UiStack.vue +1 -1
  293. package/vue/UiStatusMessage.vue +1 -1
  294. package/vue/UiSwitch.vue +1 -1
  295. package/vue/UiSwitcher.vue +1 -1
  296. package/vue/UiTable.vue +1 -1
  297. package/vue/UiTabs.vue +1 -1
  298. package/vue/UiText.vue +1 -1
  299. package/vue/UiTextarea.vue +1 -1
  300. package/vue/UiToast.vue +1 -1
  301. package/vue/UiToastRegion.vue +1 -1
  302. package/vue/UiTooltip.vue +1 -1
  303. package/vue/UiTopBar.vue +1 -1
  304. package/vue/UiTree.vue +1 -1
  305. package/vue/UiTreeItem.vue +1 -1
  306. package/vue/chunks/UiActionBar.js +1 -1
  307. package/vue/chunks/UiAffordanceScope.js +1 -1
  308. package/vue/chunks/UiAvatar.js +1 -1
  309. package/vue/chunks/UiAvatarGroup.js +2 -2
  310. package/vue/chunks/UiBadge.js +1 -1
  311. package/vue/chunks/UiBreadcrumbItem.js +1 -1
  312. package/vue/chunks/UiBreadcrumbs.js +1 -1
  313. package/vue/chunks/UiButton.js +1 -1
  314. package/vue/chunks/UiCallout.js +1 -1
  315. package/vue/chunks/UiCard.js +1 -1
  316. package/vue/chunks/UiCheckbox.js +1 -1
  317. package/vue/chunks/UiCluster.js +1 -1
  318. package/vue/chunks/UiCombobox.js +1 -1
  319. package/vue/chunks/UiContainer.js +1 -1
  320. package/vue/chunks/UiContextMenu.js +1 -1
  321. package/vue/chunks/UiCover.js +1 -1
  322. package/vue/chunks/UiDescriptionItem.js +1 -1
  323. package/vue/chunks/UiDescriptionList.js +1 -1
  324. package/vue/chunks/UiDialog.js +1 -1
  325. package/vue/chunks/UiDisclosure.js +1 -1
  326. package/vue/chunks/UiEditable.js +1 -1
  327. package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
  328. package/vue/chunks/UiEditorMentionMenu.js +1 -1
  329. package/vue/chunks/UiEditorMentionMenuItem.js +1 -1
  330. package/vue/chunks/UiEditorSlashMenu.js +1 -1
  331. package/vue/chunks/UiEditorSlashMenuGroup.js +1 -1
  332. package/vue/chunks/UiEditorSlashMenuItem.js +1 -1
  333. package/vue/chunks/UiEditorTableContextMenu.js +1 -1
  334. package/vue/chunks/UiEditorTableOverlay.js +1 -1
  335. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  336. package/vue/chunks/UiEditorToolbar.js +1 -1
  337. package/vue/chunks/UiFloatingActionButton.js +1 -1
  338. package/vue/chunks/UiFormField.js +1 -1
  339. package/vue/chunks/UiGrid.js +1 -1
  340. package/vue/chunks/UiIcon.js +1 -1
  341. package/vue/chunks/UiIconButton.js +1 -1
  342. package/vue/chunks/UiInput.js +1 -1
  343. package/vue/chunks/UiInputGroup.js +1 -1
  344. package/vue/chunks/UiList.js +1 -1
  345. package/vue/chunks/UiListItem.js +1 -1
  346. package/vue/chunks/UiListbox.js +1 -1
  347. package/vue/chunks/UiMenu.js +1 -1
  348. package/vue/chunks/UiMenuGroup.js +1 -1
  349. package/vue/chunks/UiMenuItem.js +1 -1
  350. package/vue/chunks/UiMeter.js +1 -1
  351. package/vue/chunks/UiNavItem.js +1 -1
  352. package/vue/chunks/UiPageHeader.js +1 -1
  353. package/vue/chunks/UiPopover.js +1 -1
  354. package/vue/chunks/UiRadio.js +1 -1
  355. package/vue/chunks/UiRadioGroup.js +1 -1
  356. package/vue/chunks/UiReel.js +1 -1
  357. package/vue/chunks/UiScrollArea.js +1 -1
  358. package/vue/chunks/UiSearchResultRow.js +1 -1
  359. package/vue/chunks/UiSearchShell.js +1 -1
  360. package/vue/chunks/UiSection.js +1 -1
  361. package/vue/chunks/UiSelect.js +1 -1
  362. package/vue/chunks/UiSeparator.js +1 -1
  363. package/vue/chunks/UiSidebar.js +1 -1
  364. package/vue/chunks/UiSpinner.js +1 -1
  365. package/vue/chunks/UiStack.js +1 -1
  366. package/vue/chunks/UiStatusMessage.js +1 -1
  367. package/vue/chunks/UiSwitch.js +1 -1
  368. package/vue/chunks/UiSwitcher.js +1 -1
  369. package/vue/chunks/UiTable.js +1 -1
  370. package/vue/chunks/UiTabs.js +1 -1
  371. package/vue/chunks/UiText.js +1 -1
  372. package/vue/chunks/UiTextarea.js +1 -1
  373. package/vue/chunks/UiToast.js +1 -1
  374. package/vue/chunks/UiToastRegion.js +1 -1
  375. package/vue/chunks/UiTooltip.js +1 -1
  376. package/vue/chunks/UiTopBar.js +1 -1
  377. package/vue/chunks/UiTree.js +1 -1
  378. package/vue/chunks/UiTreeItem.js +1 -1
  379. package/vue/components.css +1302 -1302
  380. package/vue/host.ts +1 -1
@@ -0,0 +1,27 @@
1
+ const groups = new WeakMap();
2
+ const radios = new WeakMap();
3
+
4
+ // Native names own exclusivity and defaultChecked owns form reset. A group's model also has to
5
+ // update a child's reactive checked binding, which otherwise can overwrite the native property
6
+ // after controller startup. Coordinate through native elements, independently of the adapter.
7
+ export function checkRadio(input, checked) {
8
+ radios.get(input)?.(checked);
9
+ input.checked = checked;
10
+ }
11
+
12
+ export function radioGroupOwns(input) {
13
+ return groups.has(input.closest('[role="radiogroup"]'));
14
+ }
15
+
16
+ /** Register a group's selection callback until its controller disconnects. */
17
+ export function connectRadioGroup(element, apply) {
18
+ groups.set(element, apply);
19
+ return () => groups.delete(element);
20
+ }
21
+
22
+ /** Join a live group, or let its later startup find this control's checked binding. */
23
+ export function connectRadio(input, update) {
24
+ radios.set(input, update);
25
+ groups.get(input.closest('[role="radiogroup"]'))?.(input);
26
+ return () => radios.delete(input);
27
+ }
@@ -388,7 +388,7 @@
388
388
  from:disabled="disabled or readonly or item.disabled"
389
389
  from:aria-label="concat(item.label, ', press Delete or Backspace to remove')"
390
390
  >
391
- <slot from:name="concat('item-', item.id)"><ui-badge $value="item.label"></ui-badge></slot>
391
+ <slot from:name="concat('item-', item.id)"><ui-badge>{$item.label}</ui-badge></slot>
392
392
  </button>
393
393
  </template>
394
394
  <input
@@ -467,7 +467,7 @@
467
467
  <div class="popup" $ref="popup" from:hidden="not expanded">
468
468
  <div role="listbox" $ref="listbox" from:id="concat(uid, '-listbox')" from:aria-label="concat(label, ' suggestions')" from:aria-busy="loading">
469
469
  <div $each="group of groups" $key="group.name" from:role="group.role" from:aria-label="group.label">
470
- <div $if="group.name" class="group" $value="group.name"></div>
470
+ <div $if="group.name" class="group">{$group.name}</div>
471
471
  <div
472
472
  $each="row of group.rows"
473
473
  $key="row.id"
@@ -486,15 +486,14 @@
486
486
  <slot from:name="concat('option-', row.id)">
487
487
  <span $if="row.detail" class="detail">
488
488
  <span class="line">
489
- <span class="primary" from:id="concat(uid, '-option-', row.index, '-label')" $value="row.label"></span>
489
+ <span class="primary" from:id="concat(uid, '-option-', row.index, '-label')">{$row.label}</span>
490
490
  <ui-badge $if="row.tag" from:tone="row.tag.tone" style:--ui-badge-color="row.tag.color"><span
491
491
  from:id="concat(uid, '-option-', row.index, '-tag')"
492
- $value="row.tag.label"
493
- ></span></ui-badge>
492
+ >{$row.tag.label}</span></ui-badge>
494
493
  </span>
495
- <span $if="row.description" class="description" from:id="concat(uid, '-option-', row.index, '-description')" $value="row.description"></span>
494
+ <span $if="row.description" class="description" from:id="concat(uid, '-option-', row.index, '-description')">{$row.description}</span>
496
495
  </span>
497
- <span $if="not row.detail" class="primary" $value="row.label"></span>
496
+ <span $if="not row.detail" class="primary">{$row.label}</span>
498
497
  </slot>
499
498
  </div>
500
499
  </div>
@@ -517,7 +516,7 @@
517
516
  <slot name="footer"></slot>
518
517
  </div>
519
518
  <div class="message" from:id="concat(uid, '-validation')" from:hidden="not validation.issues.length">
520
- <div $each="issue of validation.issues" $value="issue.message"></div>
519
+ <div $each="issue of validation.issues">{$issue.message}</div>
521
520
  </div>
522
521
  <div class="sr-only" role="status" aria-live="polite" aria-atomic="true">{$statusText}</div>
523
522
  <div class="authored-options" $ref="options" hidden aria-hidden="true"><slot></slot></div>
@@ -36,8 +36,8 @@
36
36
  from:data-index="index"
37
37
  from:data-value="row.id"
38
38
  >
39
- <span class="avatar" aria-hidden="true" $value="row.initials"></span>
40
- <span class="body"><span class="label" $value="row.label"></span><span $if="row.detail" class="detail" $value="row.detail"></span></span>
39
+ <span class="avatar" aria-hidden="true">{$row.initials}</span>
40
+ <span class="body"><span class="label">{$row.label}</span><span $if="row.detail" class="detail">{$row.detail}</span></span>
41
41
  </li>
42
42
  <slot></slot>
43
43
  </ul>
@@ -35,7 +35,7 @@
35
35
  from:data-value="item.value"
36
36
  >
37
37
  <span class="icon" aria-hidden="true"><ui-icon from:name="item.icon"></ui-icon></span>
38
- <span class="body"><span class="title" $value="item.title"></span><span class="description" $value="item.description"></span></span>
38
+ <span class="body"><span class="title">{$item.title}</span><span class="description">{$item.description}</span></span>
39
39
  </li>
40
40
  <slot></slot>
41
41
  </ul>
@@ -56,14 +56,14 @@
56
56
  from:data-action="swatch.action"
57
57
  >
58
58
  <span class="swatch" class:default="not swatch.color" style:--_swatch="swatch.color"></span>
59
- <span class="swatch-label" $value="swatch.label"></span>
59
+ <span class="swatch-label">{$swatch.label}</span>
60
60
  </button>
61
61
  </div>
62
62
  </div>
63
63
  <template $each="section of sections" $key="section.heading">
64
64
  <div class="sep"></div>
65
65
  <div class="section" role="none">
66
- <div class="heading" role="presentation" $value="section.heading"></div>
66
+ <div class="heading" role="presentation">{$section.heading}</div>
67
67
  <button
68
68
  $each="item of section.items"
69
69
  $key="item.action"
@@ -74,7 +74,7 @@
74
74
  from:data-action="item.action"
75
75
  >
76
76
  <ui-icon from:name="item.icon"></ui-icon>
77
- <span $value="item.label"></span>
77
+ <span>{$item.label}</span>
78
78
  </button>
79
79
  </div>
80
80
  </template>
@@ -127,7 +127,7 @@
127
127
  from:aria-label="control.label"
128
128
  >
129
129
  <ui-icon name="plus"></ui-icon>
130
- <span class="tooltip" role="tooltip" $value="control.label"></span>
130
+ <span class="tooltip" role="tooltip">{$control.label}</span>
131
131
  </button>
132
132
  </div>
133
133
  </div>
@@ -151,7 +151,7 @@
151
151
  from:aria-label="control.label"
152
152
  >
153
153
  <ui-icon name="plus"></ui-icon>
154
- <span class="tooltip" role="tooltip" $value="control.label"></span>
154
+ <span class="tooltip" role="tooltip">{$control.label}</span>
155
155
  </button>
156
156
  </div>
157
157
  </div>
@@ -71,7 +71,7 @@
71
71
  <div $if="structure" class="group" role="group" aria-label="Table structure">
72
72
  <button $each="item of structure" $key="item.action" type="button" from:data-action="item.action">
73
73
  <ui-icon from:name="item.icon"></ui-icon>
74
- <span $value="item.label"></span>
74
+ <span>{$item.label}</span>
75
75
  </button>
76
76
  </div>
77
77
  <div $if="(alignments or structure) and hasOverflow" class="sep" aria-hidden="true"></div>
@@ -96,12 +96,12 @@
96
96
  from:data-action="swatch.action"
97
97
  >
98
98
  <span class="swatch" class:default="not swatch.color" style:--_swatch="swatch.color"></span>
99
- <span $value="swatch.label"></span>
99
+ <span>{$swatch.label}</span>
100
100
  </button>
101
101
  </div>
102
102
  </div>
103
103
  <div $each="section of sections" $key="section.heading" class="menu-section divided" role="none">
104
- <div class="menu-heading" role="presentation" $value="section.heading"></div>
104
+ <div class="menu-heading" role="presentation">{$section.heading}</div>
105
105
  <button
106
106
  $each="item of section.items"
107
107
  $key="item.action"
@@ -112,7 +112,7 @@
112
112
  from:data-action="item.action"
113
113
  >
114
114
  <ui-icon from:name="item.icon"></ui-icon>
115
- <span $value="item.label"></span>
115
+ <span>{$item.label}</span>
116
116
  </button>
117
117
  </div>
118
118
  </div>
@@ -46,7 +46,7 @@
46
46
  from:aria-selected="choice.selected"
47
47
  from:aria-disabled="choice.disabled"
48
48
  >
49
- <span $value="choice.label"></span>
49
+ <span>{$choice.label}</span>
50
50
  </div>
51
51
  </ui-scroll-area>
52
52
  <select
@@ -1,5 +1,6 @@
1
1
  import { afterFormReset } from "../shared/form-reset.js";
2
2
  import { describeInput } from "../shared/describe.js";
3
+ import { connectRadio, radioGroupOwns } from "../shared/radio-group.js";
3
4
  import { trackTrigger } from "../shared/trigger.js";
4
5
 
5
6
  // `checked` sets the control initially and whenever it changes; the user's changes update the state.
@@ -9,13 +10,15 @@ export default function controller(host) {
9
10
  const input = host.refs.input;
10
11
  describeInput(input, host.refs.description);
11
12
  const [trigger, stopTracking] = trackTrigger(host);
13
+ const stopRadio = connectRadio(input, (checked) => { host.state.internalChecked = checked; });
12
14
  let external = host.props.checked.value;
13
- host.state.internalChecked = Boolean(external);
15
+ if (!radioGroupOwns(input)) host.state.internalChecked = Boolean(external);
14
16
  const stop = host.effect(() => {
15
- input.defaultChecked = Boolean(host.props.checked.value);
17
+ const grouped = radioGroupOwns(input);
18
+ if (!grouped) input.defaultChecked = Boolean(host.props.checked.value);
16
19
  if (host.props.checked.value === external) return;
17
20
  external = host.props.checked.value;
18
- host.state.internalChecked = Boolean(external);
21
+ if (!grouped) host.state.internalChecked = Boolean(external);
19
22
  });
20
23
  const onChange = () => {
21
24
  host.state.internalChecked = input.checked;
@@ -25,12 +28,13 @@ export default function controller(host) {
25
28
  input.addEventListener("change", onChange);
26
29
  const stopReset = afterFormReset(input, () => {
27
30
  // Inside a ui-radio-group the group's value decides, whichever reset runs first.
28
- if (input.closest('[role="radiogroup"]')) return;
31
+ if (radioGroupOwns(input)) return;
29
32
  host.state.internalChecked = Boolean(external);
30
33
  input.checked = Boolean(external);
31
34
  });
32
35
  return () => {
33
36
  stop();
37
+ stopRadio();
34
38
  stopReset();
35
39
  stopTracking();
36
40
  input.removeEventListener("change", onChange);
@@ -1,4 +1,5 @@
1
1
  import { afterFormReset } from "../shared/form-reset.js";
2
+ import { checkRadio, connectRadioGroup } from "../shared/radio-group.js";
2
3
  import { trackTrigger } from "../shared/trigger.js";
3
4
 
4
5
  let groups = 0;
@@ -15,6 +16,14 @@ export default function controller(host) {
15
16
  // A radio's own required survives until the group's required changes, since either one makes the
16
17
  // whole name group required.
17
18
  let required = false;
19
+ const apply = (input, value = host.state.internalValue) => {
20
+ if (required) input.required = true;
21
+ input.name = name;
22
+ checkRadio(input, input.value === value);
23
+ // The value prop is the choice a native form reset returns to.
24
+ input.defaultChecked = input.value === String(external ?? "");
25
+ };
26
+ const stopGroup = connectRadioGroup(element, apply);
18
27
  host.state.internalValue = String(external ?? "");
19
28
  const stop = host.effect(() => {
20
29
  if (host.props.value.value !== external) {
@@ -26,10 +35,7 @@ export default function controller(host) {
26
35
  required = Boolean(host.props.required.value);
27
36
  for (const input of inputs()) {
28
37
  if (applyRequired) input.required = required;
29
- input.name = name;
30
- input.checked = input.value === value;
31
- // The value prop is the choice a form reset returns to.
32
- input.defaultChecked = input.value === String(external ?? "");
38
+ apply(input, value);
33
39
  }
34
40
  });
35
41
  const onChange = (event) => {
@@ -44,10 +50,11 @@ export default function controller(host) {
44
50
  element.addEventListener("change", onChange);
45
51
  const stopReset = afterFormReset(element, () => {
46
52
  host.state.internalValue = String(external ?? "");
47
- for (const input of inputs()) input.checked = input.value === host.state.internalValue;
53
+ for (const input of inputs()) checkRadio(input, input.value === host.state.internalValue);
48
54
  });
49
55
  return () => {
50
56
  stop();
57
+ stopGroup();
51
58
  stopReset();
52
59
  stopTracking();
53
60
  element.removeEventListener("change", onChange);
@@ -37,7 +37,7 @@
37
37
  from:role="toast.role"
38
38
  from:data-tone="toast.tone"
39
39
  >
40
- <span class="message" $value="toast.message"></span>
40
+ <span class="message">{$toast.message}</span>
41
41
  <span class="dismiss" from:data-toast="toast.id">
42
42
  <ui-icon-button size="sm" variant="ghost" from:round="true" from:label="concat('Dismiss ', toast.message)">
43
43
  <ui-icon name="x"></ui-icon>