@threadlabs/looma 0.14.8 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/components/shared/icons.js +5 -0
  2. package/components/shared/menu-navigation.js +49 -0
  3. package/components/shared/overlay.js +33 -60
  4. package/components/ui-avatar/ui-avatar.html +19 -2
  5. package/components/ui-avatar/ui-avatar.js +7 -1
  6. package/components/ui-avatar-group/ui-avatar-group.html +8 -3
  7. package/components/ui-avatar-group/ui-avatar-group.js +6 -2
  8. package/components/ui-badge/ui-badge.html +70 -4
  9. package/components/ui-button/ui-button.html +21 -5
  10. package/components/ui-button/ui-button.js +10 -0
  11. package/components/ui-callout/ui-callout.html +13 -5
  12. package/components/ui-checkbox/ui-checkbox.html +11 -0
  13. package/components/ui-cluster/ui-cluster.html +7 -0
  14. package/components/ui-combobox/ui-combobox.html +46 -10
  15. package/components/ui-combobox/ui-combobox.js +5 -5
  16. package/components/ui-context-menu/ui-context-menu.html +33 -5
  17. package/components/ui-context-menu/ui-context-menu.js +26 -17
  18. package/components/ui-dialog/ui-dialog.html +51 -8
  19. package/components/ui-dialog/ui-dialog.js +28 -7
  20. package/components/ui-disclosure/ui-disclosure.html +14 -5
  21. package/components/ui-disclosure/ui-disclosure.js +51 -4
  22. package/components/ui-editable/ui-editable.html +17 -3
  23. package/components/ui-editable/ui-editable.js +7 -0
  24. package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +48 -14
  25. package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.js +40 -6
  26. package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +22 -9
  27. package/components/ui-editor-mention-menu/ui-editor-mention-menu.js +33 -11
  28. package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +67 -0
  29. package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +33 -30
  30. package/components/ui-editor-slash-menu/ui-editor-slash-menu.js +42 -8
  31. package/components/ui-editor-slash-menu-group/ui-editor-slash-menu-group.html +31 -0
  32. package/components/ui-editor-slash-menu-item/ui-editor-slash-menu-item.html +75 -0
  33. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +16 -5
  34. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.js +10 -2
  35. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +5 -5
  36. package/components/ui-editor-table-overlay/ui-editor-table-overlay.js +5 -2
  37. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +14 -4
  38. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.js +2 -2
  39. package/components/ui-editor-toolbar/ui-editor-toolbar.html +1 -1
  40. package/components/ui-editor-toolbar/ui-editor-toolbar.js +46 -0
  41. package/components/ui-floating-action-button/ui-floating-action-button.html +1 -1
  42. package/components/ui-form-field/ui-form-field.html +16 -3
  43. package/components/ui-form-field/ui-form-field.js +1 -1
  44. package/components/ui-grid/ui-grid.html +17 -2
  45. package/components/ui-icon/ui-icon.html +5 -0
  46. package/components/ui-icon-button/ui-icon-button.html +25 -6
  47. package/components/ui-icon-button/ui-icon-button.js +11 -1
  48. package/components/ui-input/ui-input.html +3 -3
  49. package/components/ui-input-group/ui-input-group.html +18 -4
  50. package/components/ui-listbox/ui-listbox.html +81 -0
  51. package/components/ui-listbox/ui-listbox.js +27 -0
  52. package/components/ui-menu/ui-menu.html +33 -5
  53. package/components/ui-menu/ui-menu.js +18 -12
  54. package/components/ui-menu-group/ui-menu-group.html +27 -0
  55. package/components/ui-menu-item/ui-menu-item.html +80 -8
  56. package/components/ui-menu-item/ui-menu-item.js +47 -0
  57. package/components/ui-popover/ui-popover.html +33 -5
  58. package/components/ui-popover/ui-popover.js +9 -1
  59. package/components/ui-radio-group/ui-radio-group.html +13 -1
  60. package/components/ui-search-shell/ui-search-shell.html +6 -6
  61. package/components/ui-search-shell/ui-search-shell.js +21 -5
  62. package/components/ui-select/ui-select.html +14 -4
  63. package/components/ui-switch/ui-switch.html +2 -2
  64. package/components/ui-switcher/ui-switcher.html +8 -1
  65. package/components/ui-switcher/ui-switcher.js +15 -0
  66. package/components/ui-tabs/ui-tabs.html +17 -12
  67. package/components/ui-tabs/ui-tabs.js +43 -7
  68. package/components/ui-textarea/ui-textarea.html +28 -5
  69. package/components/ui-toast/ui-toast.html +88 -0
  70. package/components/ui-toast/ui-toast.js +68 -0
  71. package/components/ui-toast-region/ui-toast-region.html +102 -19
  72. package/components/ui-toast-region/ui-toast-region.js +10 -18
  73. package/components/ui-tooltip/ui-tooltip.html +51 -7
  74. package/components/ui-tooltip/ui-tooltip.js +29 -3
  75. package/components/ui-tree/ui-tree.html +12 -0
  76. package/components/ui-tree/ui-tree.js +191 -12
  77. package/components/ui-tree-item/ui-tree-item.html +87 -8
  78. package/components/ui-tree-item/ui-tree-item.js +3 -1
  79. package/dist/index.js +38 -32
  80. package/editor/chunks/extensions.js +82 -2
  81. package/editor/extensions/table-commands.d.ts +8 -0
  82. package/editor/icons.d.ts +5 -0
  83. package/editor/index.js +7 -2
  84. package/editor/insert-table-grid.d.ts +1 -1
  85. package/editor/mention-menu.d.ts +2 -0
  86. package/editor/slash-menu.d.ts +3 -0
  87. package/editor/table-context-menu.d.ts +1 -1
  88. package/editor/table-overlay.d.ts +2 -2
  89. package/package.json +1 -1
  90. package/styles/ui-avatar-group.css +1 -2
  91. package/styles/ui-avatar.css +11 -1
  92. package/styles/ui-badge.css +73 -1
  93. package/styles/ui-button.css +9 -1
  94. package/styles/ui-callout.css +1 -1
  95. package/styles/ui-checkbox.css +9 -0
  96. package/styles/ui-cluster.css +3 -0
  97. package/styles/ui-combobox.css +38 -7
  98. package/styles/ui-context-menu.css +32 -4
  99. package/styles/ui-dialog.css +42 -5
  100. package/styles/ui-editor-insert-table-grid.css +48 -11
  101. package/styles/ui-editor-mention-menu-item.css +57 -0
  102. package/styles/ui-editor-mention-menu.css +11 -1
  103. package/styles/ui-editor-slash-menu-group.css +21 -0
  104. package/styles/ui-editor-slash-menu-item.css +62 -0
  105. package/styles/ui-editor-slash-menu.css +10 -21
  106. package/styles/ui-editor-table-context-menu.css +1 -1
  107. package/styles/ui-floating-action-button.css +1 -1
  108. package/styles/ui-form-field.css +14 -1
  109. package/styles/ui-grid.css +14 -1
  110. package/styles/ui-icon-button.css +17 -5
  111. package/styles/ui-input-group.css +18 -4
  112. package/styles/ui-input.css +3 -3
  113. package/styles/ui-listbox.css +69 -0
  114. package/styles/ui-menu-group.css +19 -0
  115. package/styles/ui-menu-item.css +48 -9
  116. package/styles/ui-menu.css +32 -4
  117. package/styles/ui-popover.css +28 -4
  118. package/styles/ui-radio-group.css +9 -0
  119. package/styles/ui-search-shell.css +5 -5
  120. package/styles/ui-select.css +14 -4
  121. package/styles/ui-switch.css +2 -2
  122. package/styles/ui-switcher.css +4 -0
  123. package/styles/ui-textarea.css +27 -4
  124. package/styles/ui-toast-region.css +88 -4
  125. package/styles/ui-toast.css +74 -0
  126. package/styles/ui-tooltip.css +46 -6
  127. package/styles/ui-tree-item.css +72 -4
  128. package/styles/ui-tree.css +8 -0
  129. package/tokens.css +3 -0
  130. package/vanilla/UiAvatar.d.ts +2 -0
  131. package/vanilla/UiAvatar.js +8 -1
  132. package/vanilla/UiAvatarGroup.d.ts +2 -0
  133. package/vanilla/UiAvatarGroup.js +1 -1
  134. package/vanilla/UiBadge.d.ts +1 -1
  135. package/vanilla/UiBadge.js +1 -1
  136. package/vanilla/UiButton.d.ts +1 -0
  137. package/vanilla/UiButton.js +22 -6
  138. package/vanilla/UiCallout.d.ts +1 -1
  139. package/vanilla/UiCallout.js +1 -1
  140. package/vanilla/UiCheckbox.d.ts +1 -0
  141. package/vanilla/UiCheckbox.js +12 -9
  142. package/vanilla/UiCluster.d.ts +1 -0
  143. package/vanilla/UiCluster.js +2 -0
  144. package/vanilla/UiCombobox.d.ts +3 -0
  145. package/vanilla/UiCombobox.js +30 -15
  146. package/vanilla/UiContextMenu.d.ts +1 -1
  147. package/vanilla/UiContextMenu.js +1 -1
  148. package/vanilla/UiDialog.d.ts +5 -2
  149. package/vanilla/UiDialog.js +1 -1
  150. package/vanilla/UiDisclosure.d.ts +2 -0
  151. package/vanilla/UiDisclosure.js +32 -18
  152. package/vanilla/UiEditable.d.ts +5 -0
  153. package/vanilla/UiEditable.js +7 -3
  154. package/vanilla/UiEditorInsertTableGrid.js +1 -6
  155. package/vanilla/UiEditorMentionMenu.d.ts +4 -2
  156. package/vanilla/UiEditorMentionMenu.js +49 -31
  157. package/vanilla/UiEditorMentionMenuItem.d.ts +16 -0
  158. package/vanilla/UiEditorMentionMenuItem.js +56 -0
  159. package/vanilla/UiEditorSlashMenu.d.ts +4 -3
  160. package/vanilla/UiEditorSlashMenu.js +59 -46
  161. package/vanilla/UiEditorSlashMenuGroup.d.ts +14 -0
  162. package/vanilla/UiEditorSlashMenuGroup.js +48 -0
  163. package/vanilla/UiEditorSlashMenuItem.d.ts +18 -0
  164. package/vanilla/UiEditorSlashMenuItem.js +57 -0
  165. package/vanilla/UiEditorTableContextMenu.d.ts +5 -2
  166. package/vanilla/UiEditorTableContextMenu.js +1 -2
  167. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  168. package/vanilla/UiEditorTableOverlay.js +5 -5
  169. package/vanilla/UiEditorTableToolbar.d.ts +4 -2
  170. package/vanilla/UiEditorTableToolbar.js +1 -2
  171. package/vanilla/UiEditorToolbar.js +2 -0
  172. package/vanilla/UiGrid.d.ts +1 -0
  173. package/vanilla/UiGrid.js +8 -7
  174. package/vanilla/UiIcon.js +1 -1
  175. package/vanilla/UiIconButton.d.ts +1 -0
  176. package/vanilla/UiIconButton.js +11 -2
  177. package/vanilla/UiListbox.d.ts +20 -0
  178. package/vanilla/UiListbox.js +45 -0
  179. package/vanilla/UiMenu.d.ts +1 -1
  180. package/vanilla/UiMenu.js +1 -1
  181. package/vanilla/UiMenuGroup.d.ts +14 -0
  182. package/vanilla/UiMenuGroup.js +35 -0
  183. package/vanilla/UiMenuItem.d.ts +5 -1
  184. package/vanilla/UiMenuItem.js +91 -30
  185. package/vanilla/UiPopover.d.ts +1 -1
  186. package/vanilla/UiPopover.js +1 -1
  187. package/vanilla/UiRadioGroup.d.ts +1 -0
  188. package/vanilla/UiRadioGroup.js +6 -3
  189. package/vanilla/UiSwitcher.d.ts +1 -0
  190. package/vanilla/UiSwitcher.js +7 -9
  191. package/vanilla/UiTabs.d.ts +1 -0
  192. package/vanilla/UiTabs.js +9 -1
  193. package/vanilla/UiTextarea.d.ts +1 -0
  194. package/vanilla/UiTextarea.js +4 -1
  195. package/vanilla/UiToast.d.ts +16 -0
  196. package/vanilla/UiToast.js +53 -0
  197. package/vanilla/UiToastRegion.d.ts +1 -4
  198. package/vanilla/UiToastRegion.js +3 -11
  199. package/vanilla/UiTooltip.d.ts +1 -1
  200. package/vanilla/UiTooltip.js +1 -1
  201. package/vanilla/UiTree.d.ts +2 -0
  202. package/vanilla/UiTree.js +1 -1
  203. package/vanilla/UiTreeItem.d.ts +1 -0
  204. package/vanilla/UiTreeItem.js +45 -31
  205. package/vanilla/index.js +6 -0
  206. package/vue/UiAvatar.d.ts +4 -0
  207. package/vue/UiAvatar.vue +23 -3
  208. package/vue/UiAvatarGroup.d.ts +3 -0
  209. package/vue/UiAvatarGroup.vue +7 -4
  210. package/vue/UiBadge.d.ts +2 -2
  211. package/vue/UiBadge.vue +74 -2
  212. package/vue/UiButton.d.ts +5 -3
  213. package/vue/UiButton.vue +41 -7
  214. package/vue/UiCallout.d.ts +2 -2
  215. package/vue/UiCallout.vue +3 -2
  216. package/vue/UiCheckbox.d.ts +2 -0
  217. package/vue/UiCheckbox.vue +16 -0
  218. package/vue/UiCluster.d.ts +1 -0
  219. package/vue/UiCluster.vue +5 -0
  220. package/vue/UiCombobox.d.ts +11 -3
  221. package/vue/UiCombobox.vue +60 -11
  222. package/vue/UiContextMenu.d.ts +2 -0
  223. package/vue/UiContextMenu.vue +47 -6
  224. package/vue/UiDialog.d.ts +18 -4
  225. package/vue/UiDialog.vue +86 -11
  226. package/vue/UiDisclosure.d.ts +8 -2
  227. package/vue/UiDisclosure.vue +38 -14
  228. package/vue/UiEditable.d.ts +10 -0
  229. package/vue/UiEditable.vue +14 -2
  230. package/vue/UiEditorInsertTableGrid.vue +52 -15
  231. package/vue/UiEditorMentionMenu.d.ts +24 -2
  232. package/vue/UiEditorMentionMenu.vue +27 -11
  233. package/vue/UiEditorMentionMenuItem.d.ts +24 -0
  234. package/vue/UiEditorMentionMenuItem.js +2 -0
  235. package/vue/UiEditorMentionMenuItem.vue +88 -0
  236. package/vue/UiEditorSlashMenu.d.ts +24 -1
  237. package/vue/UiEditorSlashMenu.vue +33 -33
  238. package/vue/UiEditorSlashMenuGroup.d.ts +18 -0
  239. package/vue/UiEditorSlashMenuGroup.js +2 -0
  240. package/vue/UiEditorSlashMenuGroup.vue +43 -0
  241. package/vue/UiEditorSlashMenuItem.d.ts +26 -0
  242. package/vue/UiEditorSlashMenuItem.js +2 -0
  243. package/vue/UiEditorSlashMenuItem.vue +101 -0
  244. package/vue/UiEditorTableContextMenu.d.ts +9 -3
  245. package/vue/UiEditorTableContextMenu.vue +53 -3
  246. package/vue/UiEditorTableOverlay.d.ts +2 -2
  247. package/vue/UiEditorTableOverlay.vue +8 -6
  248. package/vue/UiEditorTableToolbar.d.ts +7 -3
  249. package/vue/UiEditorTableToolbar.vue +50 -2
  250. package/vue/UiEditorToolbar.vue +14 -1
  251. package/vue/UiFloatingActionButton.vue +1 -1
  252. package/vue/UiFormField.vue +28 -3
  253. package/vue/UiGrid.d.ts +1 -0
  254. package/vue/UiGrid.vue +26 -2
  255. package/vue/UiIcon.vue +16 -0
  256. package/vue/UiIconButton.d.ts +5 -3
  257. package/vue/UiIconButton.vue +40 -6
  258. package/vue/UiInput.vue +10 -3
  259. package/vue/UiInputGroup.vue +32 -11
  260. package/vue/UiListbox.d.ts +33 -0
  261. package/vue/UiListbox.js +2 -0
  262. package/vue/UiListbox.vue +131 -0
  263. package/vue/UiMenu.d.ts +2 -0
  264. package/vue/UiMenu.vue +43 -6
  265. package/vue/UiMenuGroup.d.ts +18 -0
  266. package/vue/UiMenuGroup.js +2 -0
  267. package/vue/UiMenuGroup.vue +39 -0
  268. package/vue/UiMenuItem.d.ts +34 -2
  269. package/vue/UiMenuItem.vue +145 -9
  270. package/vue/UiPopover.d.ts +2 -2
  271. package/vue/UiPopover.vue +44 -5
  272. package/vue/UiRadioGroup.d.ts +2 -0
  273. package/vue/UiRadioGroup.vue +17 -0
  274. package/vue/UiSearchShell.vue +12 -5
  275. package/vue/UiSelect.vue +18 -4
  276. package/vue/UiSwitch.vue +2 -2
  277. package/vue/UiSwitcher.d.ts +1 -0
  278. package/vue/UiSwitcher.vue +22 -1
  279. package/vue/UiTabs.d.ts +6 -2
  280. package/vue/UiTabs.vue +14 -12
  281. package/vue/UiTextarea.d.ts +2 -0
  282. package/vue/UiTextarea.vue +32 -4
  283. package/vue/UiToast.d.ts +34 -0
  284. package/vue/UiToast.js +2 -0
  285. package/vue/UiToast.vue +173 -0
  286. package/vue/UiToastRegion.d.ts +2 -18
  287. package/vue/UiToastRegion.vue +123 -48
  288. package/vue/UiTooltip.d.ts +2 -2
  289. package/vue/UiTooltip.vue +67 -12
  290. package/vue/UiTree.d.ts +10 -0
  291. package/vue/UiTree.vue +27 -0
  292. package/vue/UiTreeItem.d.ts +2 -0
  293. package/vue/UiTreeItem.vue +96 -4
  294. package/vue/chunks/UiAvatar.js +19 -5
  295. package/vue/chunks/UiAvatarGroup.js +10 -4
  296. package/vue/chunks/UiBadge.js +1 -1
  297. package/vue/chunks/UiButton.js +58 -11
  298. package/vue/chunks/UiCallout.js +2 -2
  299. package/vue/chunks/UiCheckbox.js +12 -2
  300. package/vue/chunks/UiCluster.js +5 -3
  301. package/vue/chunks/UiCombobox.js +29 -13
  302. package/vue/chunks/UiContextMenu.js +6 -2
  303. package/vue/chunks/UiDialog.js +25 -8
  304. package/vue/chunks/UiDisclosure.js +36 -12
  305. package/vue/chunks/UiEditable.js +22 -8
  306. package/vue/chunks/UiEditorInsertTableGrid.js +11 -14
  307. package/vue/chunks/UiEditorMentionMenu.js +30 -19
  308. package/vue/chunks/UiEditorMentionMenuItem.js +36 -0
  309. package/vue/chunks/UiEditorSlashMenu.js +33 -35
  310. package/vue/chunks/UiEditorSlashMenuGroup.js +26 -0
  311. package/vue/chunks/UiEditorSlashMenuItem.js +51 -0
  312. package/vue/chunks/UiEditorTableContextMenu.js +39 -5
  313. package/vue/chunks/UiEditorTableOverlay.js +6 -6
  314. package/vue/chunks/UiEditorTableToolbar.js +37 -4
  315. package/vue/chunks/UiEditorToolbar.js +18 -4
  316. package/vue/chunks/UiFloatingActionButton.js +1 -1
  317. package/vue/chunks/UiFormField.js +13 -9
  318. package/vue/chunks/UiGrid.js +6 -2
  319. package/vue/chunks/UiIcon.js +40 -2
  320. package/vue/chunks/UiIconButton.js +35 -4
  321. package/vue/chunks/UiInput.js +1 -1
  322. package/vue/chunks/UiInputGroup.js +1 -1
  323. package/vue/chunks/UiListbox.js +70 -0
  324. package/vue/chunks/UiMenu.js +6 -2
  325. package/vue/chunks/UiMenuGroup.js +25 -0
  326. package/vue/chunks/UiMenuItem.js +128 -7
  327. package/vue/chunks/UiPopover.js +1 -1
  328. package/vue/chunks/UiRadioGroup.js +8 -2
  329. package/vue/chunks/UiSearchShell.js +1 -1
  330. package/vue/chunks/UiSelect.js +1 -1
  331. package/vue/chunks/UiSwitch.js +1 -1
  332. package/vue/chunks/UiSwitcher.js +20 -3
  333. package/vue/chunks/UiTabs.js +4 -3
  334. package/vue/chunks/UiTextarea.js +7 -2
  335. package/vue/chunks/UiToast.js +81 -0
  336. package/vue/chunks/UiToastRegion.js +25 -49
  337. package/vue/chunks/UiTooltip.js +3 -7
  338. package/vue/chunks/UiTree.js +8 -4
  339. package/vue/chunks/UiTreeItem.js +28 -10
  340. package/vue/components.css +1856 -864
  341. package/vue/editor/index.js +263 -2
  342. package/vue/index.d.ts +6 -0
  343. package/vue/index.js +9 -3
@@ -17,6 +17,7 @@ const props = withDefaults(
17
17
  disclosure?: boolean
18
18
  filter?: 'label' | 'none'
19
19
  help?: string
20
+ invalid?: boolean
20
21
  items?:
21
22
  readonly ({
22
23
  readonly id: string
@@ -32,8 +33,10 @@ const props = withDefaults(
32
33
  })[]
33
34
  label?: string
34
35
  labelVisibility?: 'visible' | 'sr-only'
36
+ loading?: boolean
35
37
  multiple?: boolean
36
38
  name?: string
39
+ openOnFocus?: boolean
37
40
  placeholder?: string
38
41
  query?: string
39
42
  readonly?: boolean
@@ -51,10 +54,13 @@ const props = withDefaults(
51
54
  disclosure: false,
52
55
  filter: 'label',
53
56
  help: '',
57
+ invalid: false,
54
58
  label: '',
55
59
  labelVisibility: 'visible',
60
+ loading: false,
56
61
  multiple: false,
57
62
  name: '',
63
+ openOnFocus: false,
58
64
  placeholder: '',
59
65
  readonly: false,
60
66
  required: false,
@@ -255,7 +261,6 @@ const rows = ref<
255
261
  }[]
256
262
  >([])
257
263
  const active = ref<number | null>(-1)
258
- const loading = ref(false)
259
264
  const helpOpen = ref(false)
260
265
  const lookupError = ref('')
261
266
  const validation = ref<
@@ -304,6 +309,7 @@ const hostState = computed(() =>
304
309
  props.size && `size size=${props.size}`,
305
310
  validationStatus.value && 'validationStatus',
306
311
  `validationStatus=${encodeURIComponent(validationStatus.value)}`,
312
+ props.invalid && 'invalid',
307
313
  props.multiple && 'multiple',
308
314
  ].filter(Boolean).join(' ')
309
315
  )
@@ -709,7 +715,6 @@ const { host, ready } = useComponentHost(controllerModule.default, {
709
715
  expanded,
710
716
  rows,
711
717
  active,
712
- loading,
713
718
  helpOpen,
714
719
  lookupError,
715
720
  validation,
@@ -774,8 +779,8 @@ defineExpose({
774
779
  :id="`${uid}-input`"
775
780
  :aria-controls="`${uid}-listbox`"
776
781
  :aria-expanded="expanded"
777
- :aria-invalid="validationStatus === 'error'"
778
- :aria-busy="validationStatus === 'pending'"
782
+ :aria-invalid="invalid || validationStatus === 'error'"
783
+ :aria-busy="loading || validationStatus === 'pending'"
779
784
  :value.prop="display"
780
785
  :placeholder="placeholder"
781
786
  :disabled="disabled"
@@ -923,6 +928,9 @@ defineExpose({
923
928
  {{ `Create “${raw}”` }}
924
929
  </div>
925
930
  <div v-if="message" class="message">{{ message }}</div>
931
+ <div v-if="!loading && !(rows[0]) && !creatable && !lookupError" class="message">
932
+ <slot name="empty">No suggestions.</slot>
933
+ </div>
926
934
  </div>
927
935
  <slot name="footer" />
928
936
  </div>
@@ -976,6 +984,30 @@ defineExpose({
976
984
  syntax: "*";
977
985
  inherits: false;
978
986
  }
987
+ @property --ui-combobox-radius {
988
+ syntax: "*";
989
+ inherits: false;
990
+ }
991
+ @property --ui-combobox-invalid-border {
992
+ syntax: "*";
993
+ inherits: false;
994
+ }
995
+ @property --ui-combobox-popup-surface {
996
+ syntax: "*";
997
+ inherits: false;
998
+ }
999
+ @property --ui-combobox-popup-border {
1000
+ syntax: "*";
1001
+ inherits: false;
1002
+ }
1003
+ @property --ui-combobox-popup-radius {
1004
+ syntax: "*";
1005
+ inherits: false;
1006
+ }
1007
+ @property --ui-combobox-popup-shadow {
1008
+ syntax: "*";
1009
+ inherits: false;
1010
+ }
979
1011
 
980
1012
  [data-component~="ui-combobox"] {
981
1013
  /* Hooks do not inherit, so the parts below read them from the root. */
@@ -989,6 +1021,12 @@ defineExpose({
989
1021
  --_ui-combobox-item-min-block-size: var(--ui-combobox-item-min-block-size);
990
1022
  --_ui-combobox-item-input-min-inline-size: var(--ui-combobox-item-input-min-inline-size);
991
1023
  --_ui-combobox-item-item-max-inline-size: var(--ui-combobox-item-item-max-inline-size);
1024
+ --_ui-combobox-radius: var(--ui-combobox-radius);
1025
+ --_ui-combobox-invalid-border: var(--ui-combobox-invalid-border);
1026
+ --_ui-combobox-popup-surface: var(--ui-combobox-popup-surface);
1027
+ --_ui-combobox-popup-border: var(--ui-combobox-popup-border);
1028
+ --_ui-combobox-popup-radius: var(--ui-combobox-popup-radius);
1029
+ --_ui-combobox-popup-shadow: var(--ui-combobox-popup-shadow);
992
1030
 
993
1031
  display: grid;
994
1032
  gap: var(--ui-space-1);
@@ -1015,7 +1053,7 @@ label {
1015
1053
  display: flex;
1016
1054
  min-inline-size: 0;
1017
1055
  border: 1px solid var(--ui-control-border, var(--ui-border-default));
1018
- border-radius: var(--ui-radius-md);
1056
+ border-radius: var(--_ui-combobox-radius, var(--ui-field-radius, var(--ui-radius-md)));
1019
1057
  background: var(--ui-control-surface, var(--ui-surface-default));
1020
1058
  box-shadow: var(--ui-control-inset);
1021
1059
  transition:
@@ -1137,8 +1175,12 @@ input:disabled, button:disabled {
1137
1175
  .field:has(input:disabled) {
1138
1176
  background: var(--ui-control-surface-disabled, var(--ui-surface-muted));
1139
1177
  }
1140
- [data-component~="ui-combobox"][data-ui-combobox-state~="validationStatus=error"] .field {
1141
- border-color: var(--ui-danger-solid, var(--ui-accent-active));
1178
+ [data-component~="ui-combobox"][data-ui-combobox-state~="validationStatus=error"] .field,
1179
+ [data-component~="ui-combobox"][data-ui-combobox-state~="invalid"] .field {
1180
+ border-color: var(
1181
+ --_ui-combobox-invalid-border,
1182
+ var(--ui-field-danger, var(--ui-danger-solid, var(--ui-accent-active)))
1183
+ );
1142
1184
  }
1143
1185
  .popup {
1144
1186
  box-sizing: border-box;
@@ -1148,11 +1190,18 @@ input:disabled, button:disabled {
1148
1190
  overflow: auto;
1149
1191
  margin: 0;
1150
1192
  padding: var(--ui-space-1);
1151
- border: 1px solid var(--ui-border-default);
1152
- border-radius: var(--ui-radius-md);
1153
- background: var(--ui-surface-elevated);
1193
+ border: 1px solid
1194
+ var(--_ui-combobox-popup-border, var(--ui-overlay-border, var(--ui-border-default)));
1195
+ border-radius: var(--_ui-combobox-popup-radius, var(--ui-overlay-radius, var(--ui-radius-md)));
1196
+ background: var(
1197
+ --_ui-combobox-popup-surface,
1198
+ var(--ui-overlay-surface, var(--ui-surface-elevated))
1199
+ );
1154
1200
  color: var(--ui-text-primary);
1155
- box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
1201
+ box-shadow: var(
1202
+ --_ui-combobox-popup-shadow,
1203
+ var(--ui-overlay-shadow, var(--ui-elevation-overlay, var(--ui-shadow-lg)))
1204
+ );
1156
1205
  }
1157
1206
  [hidden] {
1158
1207
  display: none;
@@ -9,6 +9,7 @@ type __VLS_Slots = {} & {
9
9
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
10
  select: (detail: {
11
11
  readonly value: string;
12
+ readonly checked?: boolean;
12
13
  readonly trigger: "keyboard" | "pointer" | "programmatic";
13
14
  }) => any;
14
15
  close: (detail: {
@@ -25,6 +26,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
25
26
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
26
27
  onSelect?: ((detail: {
27
28
  readonly value: string;
29
+ readonly checked?: boolean;
28
30
  readonly trigger: "keyboard" | "pointer" | "programmatic";
29
31
  }) => any) | undefined;
30
32
  onClose?: ((detail: {
@@ -33,7 +33,11 @@ const emit = defineEmits<{
33
33
  },
34
34
  ]
35
35
  select: [
36
- detail: { readonly value: string; readonly trigger: 'keyboard' | 'pointer' | 'programmatic' },
36
+ detail: {
37
+ readonly value: string
38
+ readonly checked?: boolean
39
+ readonly trigger: 'keyboard' | 'pointer' | 'programmatic'
40
+ },
37
41
  ]
38
42
  }>()
39
43
 
@@ -55,10 +59,12 @@ const isOpenDetail = (detail: unknown): boolean =>
55
59
  const isSelectDetail = (detail: unknown): boolean =>
56
60
  detail !== null && typeof detail === 'object' && !Array.isArray(detail)
57
61
  && typeof (detail as Record<string, unknown>)['value'] === 'string'
62
+ && ((detail as Record<string, unknown>)['checked'] === undefined
63
+ || typeof (detail as Record<string, unknown>)['checked'] === 'boolean')
58
64
  && ((detail as Record<string, unknown>)['trigger'] === 'keyboard'
59
65
  || (detail as Record<string, unknown>)['trigger'] === 'pointer'
60
66
  || (detail as Record<string, unknown>)['trigger'] === 'programmatic')
61
- && Object.keys(detail as object).every((key) => ['value', 'trigger'].includes(key))
67
+ && Object.keys(detail as object).every((key) => ['value', 'checked', 'trigger'].includes(key))
62
68
  const dispatch = createDispatch(root, emit as (name: string, detail: unknown) => void, {
63
69
  checks: {
64
70
  open: isOpenDetail,
@@ -90,6 +96,22 @@ useComponentHost(controllerModule.default, {
90
96
 
91
97
  <style scoped>
92
98
  /* This component's hooks style the element they are set on, and never a nested one. */
99
+ @property --ui-context-menu-surface {
100
+ syntax: "*";
101
+ inherits: false;
102
+ }
103
+ @property --ui-context-menu-border {
104
+ syntax: "*";
105
+ inherits: false;
106
+ }
107
+ @property --ui-context-menu-radius {
108
+ syntax: "*";
109
+ inherits: false;
110
+ }
111
+ @property --ui-context-menu-shadow {
112
+ syntax: "*";
113
+ inherits: false;
114
+ }
93
115
  @property --ui-context-menu-z-index {
94
116
  syntax: "*";
95
117
  inherits: false;
@@ -97,6 +119,10 @@ useComponentHost(controllerModule.default, {
97
119
 
98
120
  [data-component~="ui-context-menu"] {
99
121
  /* Hooks do not inherit, so the parts below read them from the root. */
122
+ --_ui-context-menu-surface: var(--ui-context-menu-surface);
123
+ --_ui-context-menu-border: var(--ui-context-menu-border);
124
+ --_ui-context-menu-radius: var(--ui-context-menu-radius);
125
+ --_ui-context-menu-shadow: var(--ui-context-menu-shadow);
100
126
  --_ui-context-menu-z-index: var(--ui-context-menu-z-index);
101
127
 
102
128
  display: contents;
@@ -110,10 +136,17 @@ useComponentHost(controllerModule.default, {
110
136
  flex-direction: column;
111
137
  box-sizing: border-box;
112
138
  padding: var(--ui-space-1);
113
- background: var(--ui-surface-elevated);
114
- border: 1px solid var(--ui-border-default);
115
- border-radius: var(--ui-radius-lg);
116
- box-shadow: var(--ui-elevation-overlay, var(--ui-shadow-lg));
139
+ background: var(
140
+ --_ui-context-menu-surface,
141
+ var(--ui-overlay-surface, var(--ui-surface-elevated))
142
+ );
143
+ border: 1px solid
144
+ var(--_ui-context-menu-border, var(--ui-overlay-border, var(--ui-border-default)));
145
+ border-radius: var(--_ui-context-menu-radius, var(--ui-overlay-radius, var(--ui-radius-lg)));
146
+ box-shadow: var(
147
+ --_ui-context-menu-shadow,
148
+ var(--ui-overlay-shadow, var(--ui-elevation-overlay, var(--ui-shadow-lg)))
149
+ );
117
150
  outline: 0;
118
151
  overflow: auto;
119
152
  z-index: var(--_ui-context-menu-z-index, 1000);
@@ -127,6 +160,14 @@ useComponentHost(controllerModule.default, {
127
160
  overlay var(--ui-motion-fast) allow-discrete;
128
161
  }
129
162
 
163
+ .menu hr {
164
+ align-self: stretch;
165
+ block-size: 0;
166
+ margin: var(--ui-space-1) 0;
167
+ border: 0;
168
+ border-block-start: 1px solid var(--ui-border-default);
169
+ }
170
+
130
171
  .menu:popover-open {
131
172
  opacity: 1;
132
173
  transform: translateY(0) scale(1);
package/vue/UiDialog.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  type __VLS_Props = {
2
- dismissible?: boolean;
2
+ alert?: boolean;
3
+ closedby?: 'any' | 'closerequest' | 'none';
3
4
  for?: string;
4
5
  label?: string;
5
- modal?: boolean;
6
+ modeless?: boolean;
6
7
  open?: boolean;
8
+ size?: 'sm' | 'md' | 'lg' | 'fullscreen';
7
9
  };
8
10
  declare var __VLS_1: {}, __VLS_3: {};
9
11
  type __VLS_Slots = {} & {
@@ -17,6 +19,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
17
19
  readonly reason: "action" | "programmatic" | "light-dismiss" | "escape";
18
20
  readonly trigger: "keyboard" | "pointer" | "programmatic";
19
21
  }) => any;
22
+ open: (detail: {
23
+ readonly open: boolean;
24
+ readonly reason: "action" | "programmatic";
25
+ readonly trigger: "keyboard" | "pointer" | "programmatic";
26
+ }) => any;
20
27
  "update:open": (value: boolean) => any;
21
28
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
29
  onClose?: ((detail: {
@@ -24,12 +31,19 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
24
31
  readonly reason: "action" | "programmatic" | "light-dismiss" | "escape";
25
32
  readonly trigger: "keyboard" | "pointer" | "programmatic";
26
33
  }) => any) | undefined;
34
+ onOpen?: ((detail: {
35
+ readonly open: boolean;
36
+ readonly reason: "action" | "programmatic";
37
+ readonly trigger: "keyboard" | "pointer" | "programmatic";
38
+ }) => any) | undefined;
27
39
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
28
40
  }>, {
41
+ size: "sm" | "md" | "lg" | "fullscreen";
29
42
  for: string;
30
43
  open: boolean;
31
- dismissible: boolean;
32
- modal: boolean;
44
+ alert: boolean;
45
+ closedby: "any" | "closerequest" | "none";
46
+ modeless: boolean;
33
47
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
48
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
35
49
  declare const _default: typeof __VLS_export;
package/vue/UiDialog.vue CHANGED
@@ -1,6 +1,6 @@
1
1
  <!-- Generated by HTML Next 1.0.0-alpha.7 for Vue 3.5. Do not edit. -->
2
2
  <script setup lang="ts">
3
- import { ref, useTemplateRef } from 'vue'
3
+ import { computed, ref, useTemplateRef } from 'vue'
4
4
  import * as controllerModule from '../components/ui-dialog/ui-dialog.js'
5
5
  import { createDispatch, useComponentHost } from './host'
6
6
 
@@ -8,21 +8,32 @@ defineOptions({ inheritAttrs: false })
8
8
 
9
9
  const props = withDefaults(
10
10
  defineProps<{
11
- dismissible?: boolean
11
+ alert?: boolean
12
+ closedby?: 'any' | 'closerequest' | 'none'
12
13
  for?: string
13
14
  label?: string
14
- modal?: boolean
15
+ modeless?: boolean
15
16
  open?: boolean
17
+ size?: 'sm' | 'md' | 'lg' | 'fullscreen'
16
18
  }>(),
17
19
  {
18
- dismissible: false,
20
+ alert: false,
21
+ closedby: 'closerequest',
19
22
  for: '',
20
- modal: false,
23
+ modeless: false,
21
24
  open: false,
25
+ size: 'md',
22
26
  },
23
27
  )
24
28
  const emit = defineEmits<{
25
29
  'update:open': [value: boolean]
30
+ open: [
31
+ detail: {
32
+ readonly open: boolean
33
+ readonly reason: 'action' | 'programmatic'
34
+ readonly trigger: 'keyboard' | 'pointer' | 'programmatic'
35
+ },
36
+ ]
26
37
  close: [
27
38
  detail: {
28
39
  readonly open: boolean
@@ -37,6 +48,23 @@ const closeElement = useTemplateRef<HTMLElement>('close')
37
48
  const internalOpen = ref(false)
38
49
  const accessibleLabel = ref('Dialog')
39
50
 
51
+ /** The values the styles' :host-state() rules test. */
52
+ const hostState = computed(() =>
53
+ [
54
+ props.size && `size size=${props.size}`,
55
+ props.alert && 'alert',
56
+ ].filter(Boolean).join(' ')
57
+ )
58
+
59
+ const isOpenDetail = (detail: unknown): boolean =>
60
+ detail !== null && typeof detail === 'object' && !Array.isArray(detail)
61
+ && typeof (detail as Record<string, unknown>)['open'] === 'boolean'
62
+ && ((detail as Record<string, unknown>)['reason'] === 'action'
63
+ || (detail as Record<string, unknown>)['reason'] === 'programmatic')
64
+ && ((detail as Record<string, unknown>)['trigger'] === 'keyboard'
65
+ || (detail as Record<string, unknown>)['trigger'] === 'pointer'
66
+ || (detail as Record<string, unknown>)['trigger'] === 'programmatic')
67
+ && Object.keys(detail as object).every((key) => ['open', 'reason', 'trigger'].includes(key))
40
68
  const isCloseDetail = (detail: unknown): boolean =>
41
69
  detail !== null && typeof detail === 'object' && !Array.isArray(detail)
42
70
  && typeof (detail as Record<string, unknown>)['open'] === 'boolean'
@@ -50,6 +78,7 @@ const isCloseDetail = (detail: unknown): boolean =>
50
78
  && Object.keys(detail as object).every((key) => ['open', 'reason', 'trigger'].includes(key))
51
79
  const dispatch = createDispatch(root, emit as (name: string, detail: unknown) => void, {
52
80
  checks: {
81
+ open: isOpenDetail,
53
82
  close: isCloseDetail,
54
83
  },
55
84
  modeled: ['open'],
@@ -65,7 +94,13 @@ useComponentHost(controllerModule.default, {
65
94
  </script>
66
95
 
67
96
  <template>
68
- <dialog data-component="ui-dialog" v-bind="$attrs" :aria-label="accessibleLabel" ref="root">
97
+ <dialog
98
+ data-component="ui-dialog"
99
+ v-bind="$attrs"
100
+ :aria-label="accessibleLabel"
101
+ :data-ui-dialog-state="hostState || undefined"
102
+ ref="root"
103
+ >
69
104
  <header>
70
105
  <h2 v-if="label" class="title">{{ label }}</h2>
71
106
  <button class="close" type="button" aria-label="Close" ref="close"></button>
@@ -81,6 +116,22 @@ useComponentHost(controllerModule.default, {
81
116
  syntax: "*";
82
117
  inherits: false;
83
118
  }
119
+ @property --ui-dialog-surface {
120
+ syntax: "*";
121
+ inherits: false;
122
+ }
123
+ @property --ui-dialog-border {
124
+ syntax: "*";
125
+ inherits: false;
126
+ }
127
+ @property --ui-dialog-radius {
128
+ syntax: "*";
129
+ inherits: false;
130
+ }
131
+ @property --ui-dialog-shadow {
132
+ syntax: "*";
133
+ inherits: false;
134
+ }
84
135
  @property --ui-dialog-max-width {
85
136
  syntax: "*";
86
137
  inherits: false;
@@ -99,7 +150,7 @@ useComponentHost(controllerModule.default, {
99
150
  box-sizing: border-box;
100
151
  inline-size: min(
101
152
  calc(100% - var(--ui-dialog-viewport-gap, var(--ui-space-4)) * 2),
102
- var(--ui-dialog-max-width, 440px)
153
+ var(--ui-dialog-max-width, var(--_ui-dialog-size, 440px))
103
154
  );
104
155
  max-inline-size: none;
105
156
  max-block-size: calc(100dvh - var(--ui-dialog-viewport-gap, var(--ui-space-4)) * 2);
@@ -107,10 +158,13 @@ useComponentHost(controllerModule.default, {
107
158
  padding: 0;
108
159
  overflow: hidden;
109
160
  flex-direction: column;
110
- background: var(--ui-surface-elevated);
111
- border: 1px solid var(--ui-border-default);
112
- border-radius: var(--ui-radius-dialog);
113
- box-shadow: var(--ui-elevation-dialog, var(--ui-shadow-xl));
161
+ background: var(--ui-dialog-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
162
+ border: 1px solid var(--ui-dialog-border, var(--ui-overlay-border, var(--ui-border-default)));
163
+ border-radius: var(--ui-dialog-radius, var(--ui-overlay-radius, var(--ui-radius-dialog)));
164
+ box-shadow: var(
165
+ --ui-dialog-shadow,
166
+ var(--ui-overlay-shadow, var(--ui-elevation-dialog, var(--ui-shadow-xl)))
167
+ );
114
168
  visibility: hidden;
115
169
  pointer-events: none;
116
170
  opacity: 0;
@@ -132,6 +186,27 @@ useComponentHost(controllerModule.default, {
132
186
  animation: ui-dialog-enter var(--ui-dialog-duration, var(--ui-motion-base)) var(--ui-motion-ease);
133
187
  }
134
188
 
189
+ [data-component~="ui-dialog"][data-ui-dialog-state~="size=sm"] {
190
+ --_ui-dialog-size: 360px;
191
+ }
192
+
193
+ [data-component~="ui-dialog"][data-ui-dialog-state~="size=lg"] {
194
+ --_ui-dialog-size: 640px;
195
+ }
196
+
197
+ [data-component~="ui-dialog"][data-ui-dialog-state~="size=fullscreen"] {
198
+ inset: 0;
199
+ inline-size: 100%;
200
+ block-size: 100dvh;
201
+ max-block-size: none;
202
+ margin: 0;
203
+ border-radius: var(--ui-dialog-radius, 0);
204
+ }
205
+
206
+ [data-component~="ui-dialog"][data-ui-dialog-state~="alert"] .close {
207
+ display: none;
208
+ }
209
+
135
210
  /* Header and actions stay pinned; only the body scrolls when content is long. */
136
211
  header {
137
212
  display: flex;
@@ -1,12 +1,16 @@
1
1
  type __VLS_Props = {
2
2
  density?: 'comfortable' | 'compact';
3
3
  disabled?: boolean;
4
+ headingLevel?: number;
5
+ name?: string;
4
6
  open?: boolean;
5
7
  summary?: string;
6
8
  };
7
- declare var __VLS_1: {};
9
+ declare var __VLS_1: {}, __VLS_3: {};
8
10
  type __VLS_Slots = {} & {
9
- default?: (props: typeof __VLS_1) => any;
11
+ summary?: (props: typeof __VLS_1) => any;
12
+ } & {
13
+ default?: (props: typeof __VLS_3) => any;
10
14
  };
11
15
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
16
  close: (detail: {
@@ -34,9 +38,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
34
38
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
35
39
  }>, {
36
40
  summary: string;
41
+ name: string;
37
42
  disabled: boolean;
38
43
  open: boolean;
39
44
  density: "comfortable" | "compact";
45
+ headingLevel: number;
40
46
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
47
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
48
  declare const _default: typeof __VLS_export;
@@ -10,12 +10,16 @@ const props = withDefaults(
10
10
  defineProps<{
11
11
  density?: 'comfortable' | 'compact'
12
12
  disabled?: boolean
13
+ headingLevel?: number
14
+ name?: string
13
15
  open?: boolean
14
16
  summary?: string
15
17
  }>(),
16
18
  {
17
19
  density: 'comfortable',
18
20
  disabled: false,
21
+ headingLevel: 0,
22
+ name: '',
19
23
  open: false,
20
24
  summary: 'Details',
21
25
  },
@@ -40,8 +44,11 @@ const emit = defineEmits<{
40
44
 
41
45
  const root = ref<HTMLElement | null>(null)
42
46
  const triggerElement = useTemplateRef<HTMLElement>('trigger')
47
+ const panelElement = useTemplateRef<HTMLElement>('panel')
43
48
  const internalOpen = ref(false)
44
49
  const contentId = ref('')
50
+ const headingRole = ref<any>(null)
51
+ const headingAriaLevel = ref<any>(null)
45
52
 
46
53
  /** The values the styles' :host-state() rules test. */
47
54
  const hostState = computed(() =>
@@ -74,9 +81,22 @@ useComponentHost(controllerModule.default, {
74
81
  root,
75
82
  dispatch,
76
83
  props,
77
- refs: { trigger: triggerElement },
78
- state: { internalOpen, contentId },
84
+ refs: { trigger: triggerElement, panel: panelElement },
85
+ state: { internalOpen, contentId, headingRole, headingAriaLevel },
79
86
  })
87
+
88
+ function text(value: unknown): string {
89
+ if (Array.isArray(value)) return value.map(text).join(' ')
90
+ return value === null || value === undefined || typeof value === 'object' ? '' : String(value)
91
+ }
92
+
93
+ function attribute(value: unknown): any {
94
+ if (
95
+ value === null || value === undefined || value === false
96
+ || (typeof value === 'object' && !Array.isArray(value))
97
+ ) return undefined
98
+ return value === true ? '' : text(value)
99
+ }
80
100
  </script>
81
101
 
82
102
  <template>
@@ -86,20 +106,24 @@ useComponentHost(controllerModule.default, {
86
106
  :data-ui-disclosure-state="hostState || undefined"
87
107
  ref="root"
88
108
  >
89
- <button
90
- class="trigger"
91
- type="button"
92
- :aria-controls="contentId"
93
- :aria-expanded="internalOpen"
94
- :disabled="disabled"
95
- ref="trigger"
109
+ <div
110
+ class="heading"
111
+ :role="attribute(headingRole)"
112
+ :aria-level="typeof headingAriaLevel === 'boolean' ? String(headingAriaLevel) : attribute(headingAriaLevel)"
96
113
  >
97
- <span>{{ summary }}</span>
98
- <span class="chevron" aria-hidden="true"></span>
99
- </button>
100
- <div class="panel" :id="contentId" :inert="!internalOpen">
101
- <div class="panel-inner"><slot /></div>
114
+ <button
115
+ class="trigger"
116
+ type="button"
117
+ :aria-controls="contentId"
118
+ :aria-expanded="internalOpen"
119
+ :disabled="disabled"
120
+ ref="trigger"
121
+ >
122
+ <span class="summary"><slot name="summary">{{ summary }}</slot></span>
123
+ <span class="chevron" aria-hidden="true"></span>
124
+ </button>
102
125
  </div>
126
+ <div class="panel" :id="contentId" ref="panel"><div class="panel-inner"><slot /></div></div>
103
127
  </div>
104
128
  </template>
105
129
 
@@ -1,9 +1,14 @@
1
1
  type __VLS_Props = {
2
2
  actions?: boolean;
3
+ cancelLabel?: string;
3
4
  disabled?: boolean;
4
5
  edit?: boolean;
5
6
  hint?: string;
6
7
  label?: string;
8
+ maxLength?: number;
9
+ placeholder?: string;
10
+ required?: boolean;
11
+ saveLabel?: string;
7
12
  value?: string;
8
13
  };
9
14
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -44,9 +49,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
44
49
  label: string;
45
50
  value: string;
46
51
  disabled: boolean;
52
+ required: boolean;
53
+ placeholder: string;
47
54
  actions: boolean;
55
+ cancelLabel: string;
48
56
  edit: boolean;
49
57
  hint: string;
58
+ maxLength: number;
59
+ saveLabel: string;
50
60
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
51
61
  declare const _default: typeof __VLS_export;
52
62
  export default _default;