@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
@@ -32,7 +32,11 @@ var UiMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
32
32
  const internalOpen = ref(false);
33
33
  /** The values the styles' :host-state() rules test. */
34
34
  const hostState = computed(() => [props.density && `density density=${props.density}`, internalOpen.value && "internalOpen"].filter(Boolean).join(" "));
35
- const isSelectDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["value"] === "string" && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => ["value", "trigger"].includes(key));
35
+ const isSelectDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["value"] === "string" && (detail["checked"] === void 0 || typeof detail["checked"] === "boolean") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
36
+ "value",
37
+ "checked",
38
+ "trigger"
39
+ ].includes(key));
36
40
  const isOpenDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["open"] === "boolean" && (detail["reason"] === "action" || detail["reason"] === "programmatic") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
37
41
  "open",
38
42
  "reason",
@@ -69,6 +73,6 @@ var UiMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
69
73
  }), [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 16, _hoisted_1);
70
74
  };
71
75
  }
72
- }), [["__scopeId", "data-v-52848f2e"]]);
76
+ }), [["__scopeId", "data-v-2007b7d0"]]);
73
77
  //#endregion
74
78
  export { UiMenu_default as t };
@@ -0,0 +1,25 @@
1
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
2
+ import { createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, renderSlot, toDisplayString } from "vue";
3
+ //#region .build/vue/UiMenuGroup.vue?vue&type=script&setup=true&lang.ts
4
+ var _hoisted_1 = ["aria-label"];
5
+ var _hoisted_2 = {
6
+ key: 0,
7
+ class: "heading"
8
+ };
9
+ //#endregion
10
+ //#region .build/vue/UiMenuGroup.vue
11
+ var UiMenuGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
12
+ inheritAttrs: false,
13
+ __name: "UiMenuGroup",
14
+ props: { label: { default: "" } },
15
+ setup(__props) {
16
+ return (_ctx, _cache) => {
17
+ return openBlock(), createElementBlock("div", mergeProps({
18
+ "data-component": "ui-menu-group",
19
+ role: "group"
20
+ }, _ctx.$attrs, { "aria-label": __props.label }), [__props.label ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(__props.label), 1)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
21
+ };
22
+ }
23
+ }), [["__scopeId", "data-v-53e0d9bc"]]);
24
+ //#endregion
25
+ export { UiMenuGroup_default as t };
@@ -1,31 +1,152 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
2
- import { createElementBlock, defineComponent, mergeProps, openBlock, renderSlot } from "vue";
2
+ import { n as useComponentHost, t as createDispatch } from "./host.js";
3
+ import { t as UiIcon_default } from "./UiIcon.js";
4
+ import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, openBlock, ref, renderSlot } from "vue";
5
+ import * as controllerModule from "@threadlabs/looma/components/ui-menu-item/ui-menu-item.js";
3
6
  //#region .build/vue/UiMenuItem.vue?vue&type=script&setup=true&lang.ts
4
- var _hoisted_1 = ["aria-disabled", "data-value"];
7
+ var _hoisted_1 = [
8
+ "aria-disabled",
9
+ "data-value",
10
+ "href",
11
+ "data-ui-menu-item-state"
12
+ ];
13
+ var _hoisted_2 = { class: "label" };
14
+ var _hoisted_3 = {
15
+ class: "shortcut",
16
+ "aria-hidden": "true"
17
+ };
18
+ var _hoisted_4 = [
19
+ "role",
20
+ "aria-checked",
21
+ "aria-disabled",
22
+ "data-value",
23
+ "data-ui-menu-item-state"
24
+ ];
25
+ var _hoisted_5 = {
26
+ class: "indicator",
27
+ "aria-hidden": "true"
28
+ };
29
+ var _hoisted_6 = { class: "label" };
30
+ var _hoisted_7 = {
31
+ class: "shortcut",
32
+ "aria-hidden": "true"
33
+ };
5
34
  //#endregion
6
35
  //#region .build/vue/UiMenuItem.vue
7
36
  var UiMenuItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
8
37
  inheritAttrs: false,
9
38
  __name: "UiMenuItem",
10
39
  props: {
40
+ checked: {
41
+ type: Boolean,
42
+ default: false
43
+ },
11
44
  disabled: {
12
45
  type: Boolean,
13
46
  default: false
14
47
  },
48
+ href: { default: "" },
49
+ type: { default: "action" },
15
50
  value: { default: "" }
16
51
  },
17
- setup(__props) {
52
+ emits: [
53
+ "update:checked",
54
+ "update:type",
55
+ "update:value",
56
+ "change"
57
+ ],
58
+ setup(__props, { emit: __emit }) {
59
+ const props = __props;
60
+ const emit = __emit;
61
+ const root = ref(null);
62
+ const internalChecked = ref(false);
63
+ /** The values the styles' :host-state() rules test. */
64
+ const hostState = computed(() => [props.type && `type type=${props.type}`].filter(Boolean).join(" "));
65
+ const isChangeDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["checked"] === "boolean" && typeof detail["value"] === "string" && (detail["type"] === "checkbox" || detail["type"] === "radio") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
66
+ "checked",
67
+ "value",
68
+ "type",
69
+ "trigger"
70
+ ].includes(key));
71
+ const dispatch = createDispatch(root, emit, {
72
+ checks: { change: isChangeDetail },
73
+ modeled: [
74
+ "checked",
75
+ "type",
76
+ "value"
77
+ ]
78
+ });
79
+ useComponentHost(controllerModule.default, {
80
+ root,
81
+ dispatch,
82
+ props,
83
+ state: { internalChecked }
84
+ });
85
+ function text(value) {
86
+ if (Array.isArray(value)) return value.map(text).join(" ");
87
+ return value === null || value === void 0 || typeof value === "object" ? "" : String(value);
88
+ }
89
+ function attribute(value) {
90
+ if (value === null || value === void 0 || value === false || typeof value === "object" && !Array.isArray(value)) return void 0;
91
+ return value === true ? "" : text(value);
92
+ }
18
93
  return (_ctx, _cache) => {
19
- return openBlock(), createElementBlock("div", mergeProps({
94
+ return __props.href && __props.type === "action" ? (openBlock(), createElementBlock("a", mergeProps({
95
+ key: 0,
20
96
  "data-component": "ui-menu-item",
21
97
  role: "menuitem",
22
98
  tabindex: "-1"
23
99
  }, _ctx.$attrs, {
24
100
  "aria-disabled": __props.disabled,
25
- "data-value": __props.value
26
- }), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
101
+ "data-value": __props.value,
102
+ href: attribute({
103
+ true: null,
104
+ false: __props.href
105
+ }[`${__props.disabled}`]),
106
+ "data-ui-menu-item-state": hostState.value || void 0,
107
+ ref_key: "root",
108
+ ref: root
109
+ }), [createElementVNode("span", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]), createElementVNode("span", _hoisted_3, [renderSlot(_ctx.$slots, "shortcut", {}, void 0, true)])], 16, _hoisted_1)) : (openBlock(), createElementBlock("div", mergeProps({
110
+ key: 1,
111
+ "data-component": "ui-menu-item",
112
+ tabindex: "-1"
113
+ }, _ctx.$attrs, {
114
+ role: attribute({
115
+ action: "menuitem",
116
+ checkbox: "menuitemcheckbox",
117
+ radio: "menuitemradio"
118
+ }[__props.type]),
119
+ "aria-checked": typeof {
120
+ action: null,
121
+ checkbox: internalChecked.value,
122
+ radio: internalChecked.value
123
+ }[__props.type] === "boolean" ? String({
124
+ action: null,
125
+ checkbox: internalChecked.value,
126
+ radio: internalChecked.value
127
+ }[__props.type]) : attribute({
128
+ action: null,
129
+ checkbox: internalChecked.value,
130
+ radio: internalChecked.value
131
+ }[__props.type]),
132
+ "aria-disabled": __props.disabled,
133
+ "data-value": __props.value,
134
+ "data-ui-menu-item-state": hostState.value || void 0,
135
+ ref_key: "root",
136
+ ref: root
137
+ }), [
138
+ createElementVNode("span", _hoisted_5, [__props.type === "checkbox" && internalChecked.value ? (openBlock(), createBlock(UiIcon_default, {
139
+ key: 0,
140
+ name: "check"
141
+ })) : createCommentVNode("v-if", true), __props.type === "radio" && internalChecked.value ? (openBlock(), createBlock(UiIcon_default, {
142
+ key: 1,
143
+ name: "circle-dot"
144
+ })) : createCommentVNode("v-if", true)]),
145
+ createElementVNode("span", _hoisted_6, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
146
+ createElementVNode("span", _hoisted_7, [renderSlot(_ctx.$slots, "shortcut", {}, void 0, true)])
147
+ ], 16, _hoisted_4));
27
148
  };
28
149
  }
29
- }), [["__scopeId", "data-v-01e62ef9"]]);
150
+ }), [["__scopeId", "data-v-bbdeb8c5"]]);
30
151
  //#endregion
31
152
  export { UiMenuItem_default as t };
@@ -56,6 +56,6 @@ var UiPopover_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
56
56
  }), [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 16, _hoisted_1);
57
57
  };
58
58
  }
59
- }), [["__scopeId", "data-v-a66f6ec4"]]);
59
+ }), [["__scopeId", "data-v-bc4517c7"]]);
60
60
  //#endregion
61
61
  export { UiPopover_default as t };
@@ -5,6 +5,7 @@ import * as controllerModule from "@threadlabs/looma/components/ui-radio-group/u
5
5
  //#region .build/vue/UiRadioGroup.vue?vue&type=script&setup=true&lang.ts
6
6
  var _hoisted_1 = [
7
7
  "aria-required",
8
+ "aria-invalid",
8
9
  "disabled",
9
10
  "data-ui-radio-group-state"
10
11
  ];
@@ -18,6 +19,10 @@ var UiRadioGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
18
19
  type: Boolean,
19
20
  default: false
20
21
  },
22
+ invalid: {
23
+ type: Boolean,
24
+ default: false
25
+ },
21
26
  label: { default: "Options" },
22
27
  name: { default: "" },
23
28
  orientation: { default: "horizontal" },
@@ -38,7 +43,7 @@ var UiRadioGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
38
43
  const root = ref(null);
39
44
  const internalValue = ref("");
40
45
  /** The values the styles' :host-state() rules test. */
41
- const hostState = computed(() => [props.orientation && `orientation orientation=${props.orientation}`].filter(Boolean).join(" "));
46
+ const hostState = computed(() => [props.invalid && "invalid", props.orientation && `orientation orientation=${props.orientation}`].filter(Boolean).join(" "));
42
47
  const isSelectDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["value"] === "string" && typeof detail["previousValue"] === "string" && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
43
48
  "value",
44
49
  "previousValue",
@@ -68,6 +73,7 @@ var UiRadioGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
68
73
  role: "radiogroup"
69
74
  }, _ctx.$attrs, {
70
75
  "aria-required": __props.required,
76
+ "aria-invalid": __props.invalid,
71
77
  disabled: __props.disabled,
72
78
  "data-ui-radio-group-state": hostState.value || void 0,
73
79
  ref_key: "root",
@@ -75,6 +81,6 @@ var UiRadioGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
75
81
  }), [createElementVNode("legend", null, toDisplayString(__props.label), 1), renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
76
82
  };
77
83
  }
78
- }), [["__scopeId", "data-v-96877df0"]]);
84
+ }), [["__scopeId", "data-v-3a85bfdd"]]);
79
85
  //#endregion
80
86
  export { UiRadioGroup_default as t };
@@ -67,6 +67,6 @@ var UiSearchShell_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
67
67
  ])], 8, _hoisted_1)], 16);
68
68
  };
69
69
  }
70
- }), [["__scopeId", "data-v-40145d41"]]);
70
+ }), [["__scopeId", "data-v-20a7b8e3"]]);
71
71
  //#endregion
72
72
  export { UiSearchShell_default as t };
@@ -60,6 +60,6 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
60
60
  }), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1)), [[vModelSelect, model.value]]);
61
61
  };
62
62
  }
63
- }), [["__scopeId", "data-v-c81ec3d9"]]);
63
+ }), [["__scopeId", "data-v-981584d4"]]);
64
64
  //#endregion
65
65
  export { UiSelect_default as t };
@@ -90,6 +90,6 @@ var UiSwitch_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
90
90
  }, null, 40, _hoisted_2), createElementVNode("span", _hoisted_3, [createElementVNode("span", _hoisted_4, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]), createElementVNode("span", _hoisted_5, [renderSlot(_ctx.$slots, "description", {}, void 0, true)], 512)])], 16, _hoisted_1);
91
91
  };
92
92
  }
93
- }), [["__scopeId", "data-v-87fc218c"]]);
93
+ }), [["__scopeId", "data-v-66d4f1f1"]]);
94
94
  //#endregion
95
95
  export { UiSwitch_default as t };
@@ -1,5 +1,7 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
2
- import { computed, createElementBlock, defineComponent, mergeProps, openBlock, renderSlot } from "vue";
2
+ import { n as useComponentHost, t as createDispatch } from "./host.js";
3
+ import { computed, createElementBlock, defineComponent, mergeProps, openBlock, ref, renderSlot } from "vue";
4
+ import * as controllerModule from "@threadlabs/looma/components/ui-switcher/ui-switcher.js";
3
5
  //#region .build/vue/UiSwitcher.vue?vue&type=script&setup=true&lang.ts
4
6
  var _hoisted_1 = ["data-ui-switcher-state"];
5
7
  //#endregion
@@ -10,20 +12,35 @@ var UiSwitcher_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
10
12
  props: {
11
13
  align: {},
12
14
  gap: {},
15
+ limit: {},
13
16
  threshold: {}
14
17
  },
15
18
  setup(__props) {
16
19
  const props = __props;
20
+ const root = ref(null);
21
+ const overLimit = ref(false);
17
22
  /** The values the styles' :host-state() rules test. */
18
23
  const hostState = computed(() => [
24
+ overLimit.value && "overLimit",
19
25
  props.gap && `gap gap=${props.gap}`,
20
26
  props.threshold && `threshold threshold=${props.threshold}`,
21
27
  props.align && `align align=${props.align}`
22
28
  ].filter(Boolean).join(" "));
29
+ const dispatch = createDispatch(root);
30
+ useComponentHost(controllerModule.default, {
31
+ root,
32
+ dispatch,
33
+ props,
34
+ state: { overLimit }
35
+ });
23
36
  return (_ctx, _cache) => {
24
- return openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-switcher" }, _ctx.$attrs, { "data-ui-switcher-state": hostState.value || void 0 }), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1);
37
+ return openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-switcher" }, _ctx.$attrs, {
38
+ "data-ui-switcher-state": hostState.value || void 0,
39
+ ref_key: "root",
40
+ ref: root
41
+ }), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1);
25
42
  };
26
43
  }
27
- }), [["__scopeId", "data-v-8dc0b2a8"]]);
44
+ }), [["__scopeId", "data-v-be049fb8"]]);
28
45
  //#endregion
29
46
  export { UiSwitcher_default as t };
@@ -21,6 +21,7 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
21
21
  inheritAttrs: false,
22
22
  __name: "UiTabs",
23
23
  props: {
24
+ activation: { default: "auto" },
24
25
  density: { default: "comfortable" },
25
26
  label: { default: "Tabs" },
26
27
  orientation: { default: "horizontal" },
@@ -78,7 +79,7 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
78
79
  "aria-label": __props.label,
79
80
  "aria-orientation": __props.orientation,
80
81
  ref: "list"
81
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tab) => {
82
+ }, [renderSlot(_ctx.$slots, "tab", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tab) => {
82
83
  return openBlock(), createElementBlock("button", {
83
84
  key: tab.id,
84
85
  type: "button",
@@ -88,9 +89,9 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
88
89
  "aria-controls": tab.id,
89
90
  "aria-selected": tab.id === internalValue.value
90
91
  }, toDisplayString(tab.label), 9, _hoisted_3);
91
- }), 128))], 8, _hoisted_2), createElementVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "default")], 512)], 16, _hoisted_1);
92
+ }), 128))])], 8, _hoisted_2), createElementVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "default")], 512)], 16, _hoisted_1);
92
93
  };
93
94
  }
94
- }), [["__scopeId", "data-v-5babb4a8"]]);
95
+ }), [["__scopeId", "data-v-d1626838"]]);
95
96
  //#endregion
96
97
  export { UiTabs_default as t };
@@ -17,6 +17,10 @@ var UiTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
17
17
  inheritAttrs: false,
18
18
  __name: "UiTextarea",
19
19
  props: {
20
+ autosize: {
21
+ type: Boolean,
22
+ default: false
23
+ },
20
24
  disabled: {
21
25
  type: Boolean,
22
26
  default: false
@@ -48,7 +52,7 @@ var UiTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
48
52
  });
49
53
  const root = ref(null);
50
54
  /** The values the styles' :host-state() rules test. */
51
- const hostState = computed(() => [props.size && `size size=${props.size}`].filter(Boolean).join(" "));
55
+ const hostState = computed(() => [props.size && `size size=${props.size}`, props.autosize && "autosize"].filter(Boolean).join(" "));
52
56
  const dispatch = createDispatch(root);
53
57
  useComponentHost(controllerModule.default, {
54
58
  root,
@@ -62,6 +66,7 @@ var UiTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
62
66
  required: __props.required,
63
67
  "aria-invalid": __props.invalid,
64
68
  rows: __props.rows,
69
+ style: { "--_rows": __props.rows },
65
70
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
66
71
  "data-ui-textarea-state": hostState.value || void 0,
67
72
  ref_key: "root",
@@ -69,6 +74,6 @@ var UiTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
69
74
  }), null, 16, _hoisted_1)), [[vModelText, model.value]]);
70
75
  };
71
76
  }
72
- }), [["__scopeId", "data-v-00f7b2fd"]]);
77
+ }), [["__scopeId", "data-v-f371e58f"]]);
73
78
  //#endregion
74
79
  export { UiTextarea_default as t };
@@ -0,0 +1,81 @@
1
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
2
+ import { n as useComponentHost, t as createDispatch } from "./host.js";
3
+ import { t as UiIcon_default } from "./UiIcon.js";
4
+ import { t as UiIconButton_default } from "./UiIconButton.js";
5
+ import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, openBlock, ref, renderSlot, useTemplateRef, withCtx } from "vue";
6
+ import * as controllerModule from "@threadlabs/looma/components/ui-toast/ui-toast.js";
7
+ //#region .build/vue/UiToast.vue?vue&type=script&setup=true&lang.ts
8
+ var _hoisted_1 = ["role", "data-ui-toast-state"];
9
+ var _hoisted_2 = { class: "message" };
10
+ var _hoisted_3 = {
11
+ class: "action",
12
+ ref: "action"
13
+ };
14
+ //#endregion
15
+ //#region .build/vue/UiToast.vue
16
+ var UiToast_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
17
+ inheritAttrs: false,
18
+ __name: "UiToast",
19
+ props: {
20
+ duration: { default: 0 },
21
+ tone: { default: "neutral" }
22
+ },
23
+ emits: ["dismiss"],
24
+ setup(__props, { emit: __emit }) {
25
+ const props = __props;
26
+ const emit = __emit;
27
+ const root = ref(null);
28
+ const actionElement = useTemplateRef("action");
29
+ /** The values the styles' :host-state() rules test. */
30
+ const hostState = computed(() => [props.tone && `tone tone=${props.tone}`].filter(Boolean).join(" "));
31
+ const isDismissDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["id"] === "string" && (detail["reason"] === "action" || detail["reason"] === "timeout") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
32
+ "id",
33
+ "reason",
34
+ "trigger"
35
+ ].includes(key));
36
+ const dispatch = createDispatch(root, emit, { checks: { dismiss: isDismissDetail } });
37
+ useComponentHost(controllerModule.default, {
38
+ root,
39
+ dispatch,
40
+ props,
41
+ refs: { action: actionElement }
42
+ });
43
+ function text(value) {
44
+ if (Array.isArray(value)) return value.map(text).join(" ");
45
+ return value === null || value === void 0 || typeof value === "object" ? "" : String(value);
46
+ }
47
+ function attribute(value) {
48
+ if (value === null || value === void 0 || value === false || typeof value === "object" && !Array.isArray(value)) return void 0;
49
+ return value === true ? "" : text(value);
50
+ }
51
+ return (_ctx, _cache) => {
52
+ return openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-toast" }, _ctx.$attrs, {
53
+ role: attribute({
54
+ neutral: "status",
55
+ info: "status",
56
+ success: "status",
57
+ warning: "status",
58
+ danger: "alert"
59
+ }[__props.tone]),
60
+ "data-ui-toast-state": hostState.value || void 0,
61
+ ref_key: "root",
62
+ ref: root
63
+ }), [
64
+ createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
65
+ createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "action", {}, void 0, true)], 512),
66
+ createVNode(UiIconButton_default, {
67
+ class: "dismiss",
68
+ size: "sm",
69
+ variant: "ghost",
70
+ label: "Dismiss notification",
71
+ round: true
72
+ }, {
73
+ default: withCtx(() => [createVNode(UiIcon_default, { name: "x" })]),
74
+ _: 1
75
+ })
76
+ ], 16, _hoisted_1);
77
+ };
78
+ }
79
+ }), [["__scopeId", "data-v-fdef5729"]]);
80
+ //#endregion
81
+ export { UiToast_default as t };
@@ -1,65 +1,46 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
2
2
  import { n as useComponentHost, t as createDispatch } from "./host.js";
3
+ import { t as UiIcon_default } from "./UiIcon.js";
3
4
  import { t as UiIconButton_default } from "./UiIconButton.js";
4
- import { Fragment, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, withCtx } from "vue";
5
+ import { Fragment, computed, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, withCtx } from "vue";
5
6
  import * as controllerModule from "@threadlabs/looma/components/ui-toast-region/ui-toast-region.js";
6
7
  //#region .build/vue/UiToastRegion.vue?vue&type=script&setup=true&lang.ts
7
- var _hoisted_1 = ["id", "role"];
8
- var _hoisted_2 = { class: "message" };
9
- var _hoisted_3 = ["data-toast"];
8
+ var _hoisted_1 = ["data-ui-toast-region-state"];
9
+ var _hoisted_2 = [
10
+ "id",
11
+ "role",
12
+ "data-tone"
13
+ ];
14
+ var _hoisted_3 = { class: "message" };
15
+ var _hoisted_4 = ["data-toast"];
10
16
  //#endregion
11
17
  //#region .build/vue/UiToastRegion.vue
12
18
  var UiToastRegion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
13
19
  inheritAttrs: false,
14
20
  __name: "UiToastRegion",
15
21
  props: {
16
- auto: {
17
- type: Boolean,
18
- default: false
19
- },
20
- duration: { default: 5e3 },
21
- message: { default: "Notification" },
22
- open: {
23
- type: Boolean,
24
- default: false
25
- }
22
+ duration: { default: 0 },
23
+ placement: { default: "top" }
26
24
  },
27
- emits: [
28
- "update:open",
29
- "close",
30
- "dismiss"
31
- ],
25
+ emits: ["dismiss"],
32
26
  setup(__props, { expose: __expose, emit: __emit }) {
33
27
  const props = __props;
34
28
  const emit = __emit;
35
29
  const root = ref(null);
36
- const internalOpen = ref(false);
37
30
  const toasts = ref([]);
38
- const isCloseDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["open"] === "boolean" && (detail["reason"] === "action" || detail["reason"] === "timeout" || detail["reason"] === "programmatic" || detail["reason"] === "light-dismiss" || detail["reason"] === "escape") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
39
- "open",
40
- "reason",
41
- "trigger"
42
- ].includes(key));
31
+ /** The values the styles' :host-state() rules test. */
32
+ const hostState = computed(() => [props.placement && `placement placement=${props.placement}`].filter(Boolean).join(" "));
43
33
  const isDismissDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["id"] === "string" && (detail["reason"] === "action" || detail["reason"] === "timeout") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
44
34
  "id",
45
35
  "reason",
46
36
  "trigger"
47
37
  ].includes(key));
48
- const dispatch = createDispatch(root, emit, {
49
- checks: {
50
- close: isCloseDetail,
51
- dismiss: isDismissDetail
52
- },
53
- modeled: ["open"]
54
- });
38
+ const dispatch = createDispatch(root, emit, { checks: { dismiss: isDismissDetail } });
55
39
  const { host, ready } = useComponentHost(controllerModule.default, {
56
40
  root,
57
41
  dispatch,
58
42
  props,
59
- state: {
60
- internalOpen,
61
- toasts
62
- }
43
+ state: { toasts }
63
44
  });
64
45
  __expose({ show: async (...args) => {
65
46
  await ready();
@@ -73,6 +54,7 @@ var UiToastRegion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
73
54
  "aria-live": "polite",
74
55
  popover: "manual"
75
56
  }, _ctx.$attrs, {
57
+ "data-ui-toast-region-state": hostState.value || void 0,
76
58
  ref_key: "root",
77
59
  ref: root
78
60
  }), [renderSlot(_ctx.$slots, "default"), (openBlock(true), createElementBlock(Fragment, null, renderList(toasts.value, (toast) => {
@@ -80,8 +62,9 @@ var UiToastRegion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
80
62
  key: toast.id,
81
63
  class: normalizeClass(["toast", { closing: toast.closing }]),
82
64
  id: toast.id,
83
- role: toast.role
84
- }, [createElementVNode("span", _hoisted_2, toDisplayString(toast.message), 1), createElementVNode("span", {
65
+ role: toast.role,
66
+ "data-tone": toast.tone
67
+ }, [createElementVNode("span", _hoisted_3, toDisplayString(toast.message), 1), createElementVNode("span", {
85
68
  class: "dismiss",
86
69
  "data-toast": toast.id
87
70
  }, [createVNode(UiIconButton_default, {
@@ -90,19 +73,12 @@ var UiToastRegion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
90
73
  round: true,
91
74
  label: `Dismiss ${toast.message}`
92
75
  }, {
93
- default: withCtx(() => [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
94
- viewBox: "0 0 24 24",
95
- fill: "none",
96
- stroke: "currentColor",
97
- "stroke-width": "2",
98
- "stroke-linecap": "round",
99
- "aria-hidden": "true"
100
- }, [createElementVNode("path", { d: "M18 6 6 18M6 6l12 12" })], -1)])]),
76
+ default: withCtx(() => [createVNode(UiIcon_default, { name: "x" })]),
101
77
  _: 1
102
- }, 8, ["label"])], 8, _hoisted_3)], 10, _hoisted_1);
103
- }), 128))], 16);
78
+ }, 8, ["label"])], 8, _hoisted_4)], 10, _hoisted_2);
79
+ }), 128))], 16, _hoisted_1);
104
80
  };
105
81
  }
106
- }), [["__scopeId", "data-v-2b629142"]]);
82
+ }), [["__scopeId", "data-v-a4727935"]]);
107
83
  //#endregion
108
84
  export { UiToastRegion_default as t };
@@ -21,7 +21,7 @@ var UiTooltip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
21
21
  type: Boolean,
22
22
  default: false
23
23
  },
24
- placement: { default: "top-start" },
24
+ placement: { default: "top" },
25
25
  showDelay: { default: 500 },
26
26
  trigger: { default: "hover" }
27
27
  },
@@ -37,11 +37,7 @@ var UiTooltip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
37
37
  const root = ref(null);
38
38
  const internalOpen = ref(false);
39
39
  /** The values the styles' :host-state() rules test. */
40
- const hostState = computed(() => [
41
- props.inverse && "inverse",
42
- props.placement && "placement",
43
- `placement=${encodeURIComponent(props.placement)}`
44
- ].filter(Boolean).join(" "));
40
+ const hostState = computed(() => [props.inverse && "inverse"].filter(Boolean).join(" "));
45
41
  const isOpenDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["open"] === "boolean" && (detail["reason"] === "action" || detail["reason"] === "programmatic" || detail["reason"] === "light-dismiss" || detail["reason"] === "escape") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
46
42
  "open",
47
43
  "reason",
@@ -72,6 +68,6 @@ var UiTooltip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
72
68
  }), [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 16, _hoisted_1);
73
69
  };
74
70
  }
75
- }), [["__scopeId", "data-v-33cc4c66"]]);
71
+ }), [["__scopeId", "data-v-bb92970c"]]);
76
72
  //#endregion
77
73
  export { UiTooltip_default as t };