@threadlabs/looma 0.14.8 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) 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-combobox/ui-combobox.html +46 -10
  14. package/components/ui-combobox/ui-combobox.js +5 -5
  15. package/components/ui-context-menu/ui-context-menu.html +33 -5
  16. package/components/ui-context-menu/ui-context-menu.js +26 -17
  17. package/components/ui-dialog/ui-dialog.html +51 -8
  18. package/components/ui-dialog/ui-dialog.js +28 -7
  19. package/components/ui-disclosure/ui-disclosure.html +14 -5
  20. package/components/ui-disclosure/ui-disclosure.js +51 -4
  21. package/components/ui-editable/ui-editable.html +17 -3
  22. package/components/ui-editable/ui-editable.js +7 -0
  23. package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +48 -14
  24. package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.js +40 -6
  25. package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +22 -9
  26. package/components/ui-editor-mention-menu/ui-editor-mention-menu.js +33 -11
  27. package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +67 -0
  28. package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +33 -30
  29. package/components/ui-editor-slash-menu/ui-editor-slash-menu.js +42 -8
  30. package/components/ui-editor-slash-menu-group/ui-editor-slash-menu-group.html +31 -0
  31. package/components/ui-editor-slash-menu-item/ui-editor-slash-menu-item.html +75 -0
  32. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +16 -5
  33. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.js +10 -2
  34. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +5 -5
  35. package/components/ui-editor-table-overlay/ui-editor-table-overlay.js +5 -2
  36. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +14 -4
  37. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.js +2 -2
  38. package/components/ui-editor-toolbar/ui-editor-toolbar.html +1 -1
  39. package/components/ui-editor-toolbar/ui-editor-toolbar.js +46 -0
  40. package/components/ui-floating-action-button/ui-floating-action-button.html +1 -1
  41. package/components/ui-form-field/ui-form-field.html +16 -3
  42. package/components/ui-form-field/ui-form-field.js +1 -1
  43. package/components/ui-grid/ui-grid.html +17 -2
  44. package/components/ui-icon/ui-icon.html +5 -0
  45. package/components/ui-icon-button/ui-icon-button.html +25 -6
  46. package/components/ui-icon-button/ui-icon-button.js +11 -1
  47. package/components/ui-input/ui-input.html +3 -3
  48. package/components/ui-input-group/ui-input-group.html +18 -4
  49. package/components/ui-listbox/ui-listbox.html +81 -0
  50. package/components/ui-listbox/ui-listbox.js +27 -0
  51. package/components/ui-menu/ui-menu.html +33 -5
  52. package/components/ui-menu/ui-menu.js +18 -12
  53. package/components/ui-menu-group/ui-menu-group.html +27 -0
  54. package/components/ui-menu-item/ui-menu-item.html +80 -8
  55. package/components/ui-menu-item/ui-menu-item.js +47 -0
  56. package/components/ui-popover/ui-popover.html +33 -5
  57. package/components/ui-popover/ui-popover.js +9 -1
  58. package/components/ui-radio-group/ui-radio-group.html +13 -1
  59. package/components/ui-search-shell/ui-search-shell.html +6 -6
  60. package/components/ui-search-shell/ui-search-shell.js +21 -5
  61. package/components/ui-select/ui-select.html +14 -4
  62. package/components/ui-switch/ui-switch.html +2 -2
  63. package/components/ui-switcher/ui-switcher.html +8 -1
  64. package/components/ui-switcher/ui-switcher.js +15 -0
  65. package/components/ui-tabs/ui-tabs.html +17 -12
  66. package/components/ui-tabs/ui-tabs.js +43 -7
  67. package/components/ui-textarea/ui-textarea.html +28 -5
  68. package/components/ui-toast/ui-toast.html +88 -0
  69. package/components/ui-toast/ui-toast.js +68 -0
  70. package/components/ui-toast-region/ui-toast-region.html +102 -19
  71. package/components/ui-toast-region/ui-toast-region.js +10 -18
  72. package/components/ui-tooltip/ui-tooltip.html +51 -7
  73. package/components/ui-tooltip/ui-tooltip.js +29 -3
  74. package/components/ui-tree/ui-tree.html +12 -0
  75. package/components/ui-tree/ui-tree.js +191 -12
  76. package/components/ui-tree-item/ui-tree-item.html +87 -8
  77. package/components/ui-tree-item/ui-tree-item.js +3 -1
  78. package/dist/index.js +38 -32
  79. package/editor/chunks/extensions.js +82 -2
  80. package/editor/extensions/table-commands.d.ts +8 -0
  81. package/editor/icons.d.ts +5 -0
  82. package/editor/index.js +7 -2
  83. package/editor/insert-table-grid.d.ts +1 -1
  84. package/editor/mention-menu.d.ts +2 -0
  85. package/editor/slash-menu.d.ts +3 -0
  86. package/editor/table-context-menu.d.ts +1 -1
  87. package/editor/table-overlay.d.ts +2 -2
  88. package/package.json +1 -1
  89. package/styles/ui-avatar-group.css +1 -2
  90. package/styles/ui-avatar.css +11 -1
  91. package/styles/ui-badge.css +73 -1
  92. package/styles/ui-button.css +9 -1
  93. package/styles/ui-callout.css +1 -1
  94. package/styles/ui-checkbox.css +9 -0
  95. package/styles/ui-combobox.css +38 -7
  96. package/styles/ui-context-menu.css +32 -4
  97. package/styles/ui-dialog.css +42 -5
  98. package/styles/ui-editor-insert-table-grid.css +48 -11
  99. package/styles/ui-editor-mention-menu-item.css +57 -0
  100. package/styles/ui-editor-mention-menu.css +11 -1
  101. package/styles/ui-editor-slash-menu-group.css +21 -0
  102. package/styles/ui-editor-slash-menu-item.css +62 -0
  103. package/styles/ui-editor-slash-menu.css +10 -21
  104. package/styles/ui-editor-table-context-menu.css +1 -1
  105. package/styles/ui-floating-action-button.css +1 -1
  106. package/styles/ui-form-field.css +14 -1
  107. package/styles/ui-grid.css +14 -1
  108. package/styles/ui-icon-button.css +17 -5
  109. package/styles/ui-input-group.css +18 -4
  110. package/styles/ui-input.css +3 -3
  111. package/styles/ui-listbox.css +69 -0
  112. package/styles/ui-menu-group.css +19 -0
  113. package/styles/ui-menu-item.css +48 -9
  114. package/styles/ui-menu.css +32 -4
  115. package/styles/ui-popover.css +28 -4
  116. package/styles/ui-radio-group.css +9 -0
  117. package/styles/ui-search-shell.css +5 -5
  118. package/styles/ui-select.css +14 -4
  119. package/styles/ui-switch.css +2 -2
  120. package/styles/ui-switcher.css +4 -0
  121. package/styles/ui-textarea.css +27 -4
  122. package/styles/ui-toast-region.css +88 -4
  123. package/styles/ui-toast.css +74 -0
  124. package/styles/ui-tooltip.css +46 -6
  125. package/styles/ui-tree-item.css +72 -4
  126. package/styles/ui-tree.css +8 -0
  127. package/tokens.css +3 -0
  128. package/vanilla/UiAvatar.d.ts +2 -0
  129. package/vanilla/UiAvatar.js +8 -1
  130. package/vanilla/UiAvatarGroup.d.ts +2 -0
  131. package/vanilla/UiAvatarGroup.js +1 -1
  132. package/vanilla/UiBadge.d.ts +1 -1
  133. package/vanilla/UiBadge.js +1 -1
  134. package/vanilla/UiButton.d.ts +1 -0
  135. package/vanilla/UiButton.js +22 -6
  136. package/vanilla/UiCallout.d.ts +1 -1
  137. package/vanilla/UiCallout.js +1 -1
  138. package/vanilla/UiCheckbox.d.ts +1 -0
  139. package/vanilla/UiCheckbox.js +12 -9
  140. package/vanilla/UiCombobox.d.ts +3 -0
  141. package/vanilla/UiCombobox.js +30 -15
  142. package/vanilla/UiContextMenu.d.ts +1 -1
  143. package/vanilla/UiContextMenu.js +1 -1
  144. package/vanilla/UiDialog.d.ts +5 -2
  145. package/vanilla/UiDialog.js +1 -1
  146. package/vanilla/UiDisclosure.d.ts +2 -0
  147. package/vanilla/UiDisclosure.js +32 -18
  148. package/vanilla/UiEditable.d.ts +5 -0
  149. package/vanilla/UiEditable.js +7 -3
  150. package/vanilla/UiEditorInsertTableGrid.js +1 -6
  151. package/vanilla/UiEditorMentionMenu.d.ts +4 -2
  152. package/vanilla/UiEditorMentionMenu.js +49 -31
  153. package/vanilla/UiEditorMentionMenuItem.d.ts +16 -0
  154. package/vanilla/UiEditorMentionMenuItem.js +56 -0
  155. package/vanilla/UiEditorSlashMenu.d.ts +4 -3
  156. package/vanilla/UiEditorSlashMenu.js +59 -46
  157. package/vanilla/UiEditorSlashMenuGroup.d.ts +14 -0
  158. package/vanilla/UiEditorSlashMenuGroup.js +48 -0
  159. package/vanilla/UiEditorSlashMenuItem.d.ts +18 -0
  160. package/vanilla/UiEditorSlashMenuItem.js +57 -0
  161. package/vanilla/UiEditorTableContextMenu.d.ts +5 -2
  162. package/vanilla/UiEditorTableContextMenu.js +1 -2
  163. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  164. package/vanilla/UiEditorTableOverlay.js +5 -5
  165. package/vanilla/UiEditorTableToolbar.d.ts +4 -2
  166. package/vanilla/UiEditorTableToolbar.js +1 -2
  167. package/vanilla/UiEditorToolbar.js +2 -0
  168. package/vanilla/UiGrid.d.ts +1 -0
  169. package/vanilla/UiGrid.js +8 -7
  170. package/vanilla/UiIcon.js +1 -1
  171. package/vanilla/UiIconButton.d.ts +1 -0
  172. package/vanilla/UiIconButton.js +11 -2
  173. package/vanilla/UiListbox.d.ts +20 -0
  174. package/vanilla/UiListbox.js +45 -0
  175. package/vanilla/UiMenu.d.ts +1 -1
  176. package/vanilla/UiMenu.js +1 -1
  177. package/vanilla/UiMenuGroup.d.ts +14 -0
  178. package/vanilla/UiMenuGroup.js +35 -0
  179. package/vanilla/UiMenuItem.d.ts +5 -1
  180. package/vanilla/UiMenuItem.js +91 -30
  181. package/vanilla/UiPopover.d.ts +1 -1
  182. package/vanilla/UiPopover.js +1 -1
  183. package/vanilla/UiRadioGroup.d.ts +1 -0
  184. package/vanilla/UiRadioGroup.js +6 -3
  185. package/vanilla/UiSwitcher.d.ts +1 -0
  186. package/vanilla/UiSwitcher.js +7 -9
  187. package/vanilla/UiTabs.d.ts +1 -0
  188. package/vanilla/UiTabs.js +9 -1
  189. package/vanilla/UiTextarea.d.ts +1 -0
  190. package/vanilla/UiTextarea.js +4 -1
  191. package/vanilla/UiToast.d.ts +16 -0
  192. package/vanilla/UiToast.js +53 -0
  193. package/vanilla/UiToastRegion.d.ts +1 -4
  194. package/vanilla/UiToastRegion.js +3 -11
  195. package/vanilla/UiTooltip.d.ts +1 -1
  196. package/vanilla/UiTooltip.js +1 -1
  197. package/vanilla/UiTree.d.ts +2 -0
  198. package/vanilla/UiTree.js +1 -1
  199. package/vanilla/UiTreeItem.d.ts +1 -0
  200. package/vanilla/UiTreeItem.js +45 -31
  201. package/vanilla/index.js +6 -0
  202. package/vue/UiAvatar.d.ts +4 -0
  203. package/vue/UiAvatar.vue +23 -3
  204. package/vue/UiAvatarGroup.d.ts +3 -0
  205. package/vue/UiAvatarGroup.vue +7 -4
  206. package/vue/UiBadge.d.ts +2 -2
  207. package/vue/UiBadge.vue +74 -2
  208. package/vue/UiButton.d.ts +5 -3
  209. package/vue/UiButton.vue +41 -7
  210. package/vue/UiCallout.d.ts +2 -2
  211. package/vue/UiCallout.vue +3 -2
  212. package/vue/UiCheckbox.d.ts +2 -0
  213. package/vue/UiCheckbox.vue +16 -0
  214. package/vue/UiCombobox.d.ts +11 -3
  215. package/vue/UiCombobox.vue +60 -11
  216. package/vue/UiContextMenu.d.ts +2 -0
  217. package/vue/UiContextMenu.vue +47 -6
  218. package/vue/UiDialog.d.ts +18 -4
  219. package/vue/UiDialog.vue +86 -11
  220. package/vue/UiDisclosure.d.ts +8 -2
  221. package/vue/UiDisclosure.vue +38 -14
  222. package/vue/UiEditable.d.ts +10 -0
  223. package/vue/UiEditable.vue +14 -2
  224. package/vue/UiEditorInsertTableGrid.vue +52 -15
  225. package/vue/UiEditorMentionMenu.d.ts +24 -2
  226. package/vue/UiEditorMentionMenu.vue +27 -11
  227. package/vue/UiEditorMentionMenuItem.d.ts +24 -0
  228. package/vue/UiEditorMentionMenuItem.js +2 -0
  229. package/vue/UiEditorMentionMenuItem.vue +88 -0
  230. package/vue/UiEditorSlashMenu.d.ts +24 -1
  231. package/vue/UiEditorSlashMenu.vue +33 -33
  232. package/vue/UiEditorSlashMenuGroup.d.ts +18 -0
  233. package/vue/UiEditorSlashMenuGroup.js +2 -0
  234. package/vue/UiEditorSlashMenuGroup.vue +43 -0
  235. package/vue/UiEditorSlashMenuItem.d.ts +26 -0
  236. package/vue/UiEditorSlashMenuItem.js +2 -0
  237. package/vue/UiEditorSlashMenuItem.vue +101 -0
  238. package/vue/UiEditorTableContextMenu.d.ts +9 -3
  239. package/vue/UiEditorTableContextMenu.vue +53 -3
  240. package/vue/UiEditorTableOverlay.d.ts +2 -2
  241. package/vue/UiEditorTableOverlay.vue +8 -6
  242. package/vue/UiEditorTableToolbar.d.ts +7 -3
  243. package/vue/UiEditorTableToolbar.vue +50 -2
  244. package/vue/UiEditorToolbar.vue +14 -1
  245. package/vue/UiFloatingActionButton.vue +1 -1
  246. package/vue/UiFormField.vue +28 -3
  247. package/vue/UiGrid.d.ts +1 -0
  248. package/vue/UiGrid.vue +26 -2
  249. package/vue/UiIcon.vue +16 -0
  250. package/vue/UiIconButton.d.ts +5 -3
  251. package/vue/UiIconButton.vue +40 -6
  252. package/vue/UiInput.vue +10 -3
  253. package/vue/UiInputGroup.vue +32 -11
  254. package/vue/UiListbox.d.ts +33 -0
  255. package/vue/UiListbox.js +2 -0
  256. package/vue/UiListbox.vue +131 -0
  257. package/vue/UiMenu.d.ts +2 -0
  258. package/vue/UiMenu.vue +43 -6
  259. package/vue/UiMenuGroup.d.ts +18 -0
  260. package/vue/UiMenuGroup.js +2 -0
  261. package/vue/UiMenuGroup.vue +39 -0
  262. package/vue/UiMenuItem.d.ts +34 -2
  263. package/vue/UiMenuItem.vue +145 -9
  264. package/vue/UiPopover.d.ts +2 -2
  265. package/vue/UiPopover.vue +44 -5
  266. package/vue/UiRadioGroup.d.ts +2 -0
  267. package/vue/UiRadioGroup.vue +17 -0
  268. package/vue/UiSearchShell.vue +12 -5
  269. package/vue/UiSelect.vue +18 -4
  270. package/vue/UiSwitch.vue +2 -2
  271. package/vue/UiSwitcher.d.ts +1 -0
  272. package/vue/UiSwitcher.vue +22 -1
  273. package/vue/UiTabs.d.ts +6 -2
  274. package/vue/UiTabs.vue +14 -12
  275. package/vue/UiTextarea.d.ts +2 -0
  276. package/vue/UiTextarea.vue +32 -4
  277. package/vue/UiToast.d.ts +34 -0
  278. package/vue/UiToast.js +2 -0
  279. package/vue/UiToast.vue +173 -0
  280. package/vue/UiToastRegion.d.ts +2 -18
  281. package/vue/UiToastRegion.vue +123 -48
  282. package/vue/UiTooltip.d.ts +2 -2
  283. package/vue/UiTooltip.vue +67 -12
  284. package/vue/UiTree.d.ts +10 -0
  285. package/vue/UiTree.vue +27 -0
  286. package/vue/UiTreeItem.d.ts +2 -0
  287. package/vue/UiTreeItem.vue +96 -4
  288. package/vue/chunks/UiAvatar.js +19 -5
  289. package/vue/chunks/UiAvatarGroup.js +10 -4
  290. package/vue/chunks/UiBadge.js +1 -1
  291. package/vue/chunks/UiButton.js +58 -11
  292. package/vue/chunks/UiCallout.js +2 -2
  293. package/vue/chunks/UiCheckbox.js +12 -2
  294. package/vue/chunks/UiCombobox.js +29 -13
  295. package/vue/chunks/UiContextMenu.js +6 -2
  296. package/vue/chunks/UiDialog.js +25 -8
  297. package/vue/chunks/UiDisclosure.js +36 -12
  298. package/vue/chunks/UiEditable.js +22 -8
  299. package/vue/chunks/UiEditorInsertTableGrid.js +11 -14
  300. package/vue/chunks/UiEditorMentionMenu.js +30 -19
  301. package/vue/chunks/UiEditorMentionMenuItem.js +36 -0
  302. package/vue/chunks/UiEditorSlashMenu.js +33 -35
  303. package/vue/chunks/UiEditorSlashMenuGroup.js +26 -0
  304. package/vue/chunks/UiEditorSlashMenuItem.js +51 -0
  305. package/vue/chunks/UiEditorTableContextMenu.js +39 -5
  306. package/vue/chunks/UiEditorTableOverlay.js +6 -6
  307. package/vue/chunks/UiEditorTableToolbar.js +37 -4
  308. package/vue/chunks/UiEditorToolbar.js +18 -4
  309. package/vue/chunks/UiFloatingActionButton.js +1 -1
  310. package/vue/chunks/UiFormField.js +13 -9
  311. package/vue/chunks/UiGrid.js +6 -2
  312. package/vue/chunks/UiIcon.js +40 -2
  313. package/vue/chunks/UiIconButton.js +35 -4
  314. package/vue/chunks/UiInput.js +1 -1
  315. package/vue/chunks/UiInputGroup.js +1 -1
  316. package/vue/chunks/UiListbox.js +70 -0
  317. package/vue/chunks/UiMenu.js +6 -2
  318. package/vue/chunks/UiMenuGroup.js +25 -0
  319. package/vue/chunks/UiMenuItem.js +128 -7
  320. package/vue/chunks/UiPopover.js +1 -1
  321. package/vue/chunks/UiRadioGroup.js +8 -2
  322. package/vue/chunks/UiSearchShell.js +1 -1
  323. package/vue/chunks/UiSelect.js +1 -1
  324. package/vue/chunks/UiSwitch.js +1 -1
  325. package/vue/chunks/UiSwitcher.js +20 -3
  326. package/vue/chunks/UiTabs.js +4 -3
  327. package/vue/chunks/UiTextarea.js +7 -2
  328. package/vue/chunks/UiToast.js +81 -0
  329. package/vue/chunks/UiToastRegion.js +25 -49
  330. package/vue/chunks/UiTooltip.js +3 -7
  331. package/vue/chunks/UiTree.js +8 -4
  332. package/vue/chunks/UiTreeItem.js +28 -10
  333. package/vue/components.css +1840 -851
  334. package/vue/editor/index.js +263 -2
  335. package/vue/index.d.ts +6 -0
  336. package/vue/index.js +9 -3
@@ -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 };
@@ -17,12 +17,14 @@ var UiTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
17
17
  type: Boolean,
18
18
  default: false
19
19
  },
20
- maxDepth: { default: 0 }
20
+ maxDepth: { default: 0 },
21
+ selection: { default: "none" }
21
22
  },
22
23
  emits: [
23
24
  "update:maxDepth",
24
25
  "reorder",
25
- "reorder-rejected"
26
+ "reorder-rejected",
27
+ "select"
26
28
  ],
27
29
  setup(__props, { emit: __emit }) {
28
30
  const props = __props;
@@ -49,10 +51,12 @@ var UiTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
49
51
  "resultingDepth",
50
52
  "trigger"
51
53
  ].includes(key));
54
+ const isSelectDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && Array.isArray(detail["ids"]) && detail["ids"].every((item) => typeof item === "string") && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => ["ids", "trigger"].includes(key));
52
55
  const dispatch = createDispatch(root, emit, {
53
56
  checks: {
54
57
  reorder: isReorderDetail,
55
- "reorder-rejected": isReorderRejectedDetail
58
+ "reorder-rejected": isReorderRejectedDetail,
59
+ select: isSelectDetail
56
60
  },
57
61
  modeled: ["maxDepth"]
58
62
  });
@@ -72,6 +76,6 @@ var UiTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
72
76
  }), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
73
77
  };
74
78
  }
75
- }), [["__scopeId", "data-v-549b3238"]]);
79
+ }), [["__scopeId", "data-v-3dab8614"]]);
76
80
  //#endregion
77
81
  export { UiTree_default as t };
@@ -22,23 +22,29 @@ var _hoisted_2 = {
22
22
  };
23
23
  var _hoisted_3 = ["aria-label"];
24
24
  var _hoisted_4 = ["disabled", "hidden"];
25
- var _hoisted_5 = {
25
+ var _hoisted_5 = { class: "selection-hit" };
26
+ var _hoisted_6 = [
27
+ "checked",
28
+ "disabled",
29
+ "aria-label"
30
+ ];
31
+ var _hoisted_7 = {
26
32
  class: "leading",
27
33
  ref: "leading"
28
34
  };
29
- var _hoisted_6 = {
35
+ var _hoisted_8 = {
30
36
  class: "label",
31
37
  ref: "label"
32
38
  };
33
- var _hoisted_7 = {
39
+ var _hoisted_9 = {
34
40
  class: "label-text",
35
41
  ref: "labelText"
36
42
  };
37
- var _hoisted_8 = {
43
+ var _hoisted_10 = {
38
44
  class: "actions",
39
45
  ref: "actions"
40
46
  };
41
- var _hoisted_9 = ["hidden"];
47
+ var _hoisted_11 = ["hidden"];
42
48
  //#endregion
43
49
  //#region .build/vue/UiTreeItem.vue
44
50
  var UiTreeItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -63,6 +69,10 @@ var UiTreeItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
63
69
  },
64
70
  itemId: { default: "" },
65
71
  label: { default: "" },
72
+ lazy: {
73
+ type: Boolean,
74
+ default: false
75
+ },
66
76
  marquee: {
67
77
  type: Boolean,
68
78
  default: false
@@ -213,9 +223,17 @@ var UiTreeItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
213
223
  class: "disclosure-icon",
214
224
  "aria-hidden": "true"
215
225
  }, null, -1)])], 8, _hoisted_4),
216
- createElementVNode("span", _hoisted_5, [renderSlot(_ctx.$slots, "leading")], 512),
217
- createElementVNode("span", _hoisted_6, [createElementVNode("span", _hoisted_7, [renderSlot(_ctx.$slots, "label", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 512)], 512),
218
- createElementVNode("span", _hoisted_8, [renderSlot(_ctx.$slots, "actions")], 512),
226
+ createElementVNode("label", _hoisted_5, [createElementVNode("input", {
227
+ class: "selection-checkbox",
228
+ type: "checkbox",
229
+ tabindex: "-1",
230
+ checked: __props.selected,
231
+ disabled: __props.disabled,
232
+ "aria-label": `Select ${__props.label}`
233
+ }, null, 8, _hoisted_6)]),
234
+ createElementVNode("span", _hoisted_7, [renderSlot(_ctx.$slots, "leading")], 512),
235
+ createElementVNode("span", _hoisted_8, [createElementVNode("span", _hoisted_9, [renderSlot(_ctx.$slots, "label", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 512)], 512),
236
+ createElementVNode("span", _hoisted_10, [renderSlot(_ctx.$slots, "actions")], 512),
219
237
  _cache[2] || (_cache[2] = createElementVNode("span", {
220
238
  class: "drop-indicator row-drop-indicator",
221
239
  "aria-hidden": "true"
@@ -226,7 +244,7 @@ var UiTreeItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
226
244
  role: "group",
227
245
  hidden: !(isContainer.value && internalExpanded.value),
228
246
  ref: "children"
229
- }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_9),
247
+ }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_11),
230
248
  _cache[3] || (_cache[3] = createElementVNode("span", {
231
249
  class: "drop-indicator subtree-drop-indicator",
232
250
  "aria-hidden": "true"
@@ -234,6 +252,6 @@ var UiTreeItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
234
252
  ], 16, _hoisted_1);
235
253
  };
236
254
  }
237
- }), [["__scopeId", "data-v-18b08b05"]]);
255
+ }), [["__scopeId", "data-v-ad0fbbba"]]);
238
256
  //#endregion
239
257
  export { UiTreeItem_default as t };