@threadlabs/looma 0.5.1 → 0.5.2

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 (309) hide show
  1. package/README.md +1 -1
  2. package/components/ui-button/ui-button.html +13 -0
  3. package/components/ui-combobox/ui-combobox.html +12 -4
  4. package/components/ui-dialog/ui-dialog.html +13 -0
  5. package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +1 -1
  6. package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +1 -1
  7. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +6 -2
  8. package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +20 -4
  9. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +8 -4
  10. package/components/ui-form-field/ui-form-field.html +18 -7
  11. package/components/ui-icon/ui-icon.html +5 -1
  12. package/components/ui-icon-button/ui-icon-button.html +30 -0
  13. package/components/ui-popover/ui-popover.js +10 -2
  14. package/components/ui-search-shell/ui-search-shell.html +7 -0
  15. package/components/ui-search-shell/ui-search-shell.js +9 -0
  16. package/components/ui-tabs/ui-tabs.html +1 -1
  17. package/components/ui-toast-region/ui-toast-region.html +1 -1
  18. package/components/ui-tree-item/ui-tree-item.html +6 -1
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.js +2 -2
  21. package/package.json +2 -2
  22. package/styles/ui-affordance-scope.css +1 -1
  23. package/styles/ui-avatar-group.css +1 -1
  24. package/styles/ui-avatar.css +1 -1
  25. package/styles/ui-badge.css +1 -1
  26. package/styles/ui-button.css +11 -1
  27. package/styles/ui-callout.css +1 -1
  28. package/styles/ui-checkbox.css +1 -1
  29. package/styles/ui-cluster.css +1 -1
  30. package/styles/ui-combobox.css +1 -1
  31. package/styles/ui-container.css +1 -1
  32. package/styles/ui-context-menu.css +1 -1
  33. package/styles/ui-dialog.css +18 -1
  34. package/styles/ui-disclosure.css +1 -1
  35. package/styles/ui-editable.css +1 -1
  36. package/styles/ui-editor-insert-table-grid.css +1 -1
  37. package/styles/ui-editor-mention-menu.css +1 -1
  38. package/styles/ui-editor-slash-menu.css +1 -1
  39. package/styles/ui-editor-table-context-menu.css +1 -1
  40. package/styles/ui-editor-table-overlay.css +1 -1
  41. package/styles/ui-editor-table-toolbar.css +1 -1
  42. package/styles/ui-editor-toolbar.css +1 -1
  43. package/styles/ui-floating-action-button.css +1 -1
  44. package/styles/ui-form-field.css +24 -10
  45. package/styles/ui-grid.css +1 -1
  46. package/styles/ui-icon-button.css +36 -1
  47. package/styles/ui-icon.css +1 -1
  48. package/styles/ui-input.css +1 -1
  49. package/styles/ui-menu-item.css +1 -1
  50. package/styles/ui-menu.css +1 -1
  51. package/styles/ui-popover.css +1 -1
  52. package/styles/ui-radio-group.css +1 -1
  53. package/styles/ui-radio.css +1 -1
  54. package/styles/ui-reel.css +1 -1
  55. package/styles/ui-search-result-row.css +1 -1
  56. package/styles/ui-search-shell.css +11 -2
  57. package/styles/ui-select.css +1 -1
  58. package/styles/ui-separator.css +1 -1
  59. package/styles/ui-sidebar.css +1 -1
  60. package/styles/ui-stack.css +1 -1
  61. package/styles/ui-switch.css +1 -1
  62. package/styles/ui-switcher.css +1 -1
  63. package/styles/ui-tabs.css +1 -1
  64. package/styles/ui-textarea.css +1 -1
  65. package/styles/ui-toast-region.css +1 -1
  66. package/styles/ui-tooltip.css +1 -1
  67. package/styles/ui-top-bar.css +1 -1
  68. package/styles/ui-tree-item.css +10 -2
  69. package/styles/ui-tree.css +1 -1
  70. package/vanilla/UiAffordanceScope.d.ts +1 -1
  71. package/vanilla/UiAffordanceScope.js +2 -2
  72. package/vanilla/UiAvatar.d.ts +1 -1
  73. package/vanilla/UiAvatar.js +2 -2
  74. package/vanilla/UiAvatarGroup.d.ts +1 -1
  75. package/vanilla/UiAvatarGroup.js +2 -2
  76. package/vanilla/UiBadge.d.ts +1 -1
  77. package/vanilla/UiBadge.js +2 -2
  78. package/vanilla/UiButton.d.ts +3 -1
  79. package/vanilla/UiButton.js +3 -3
  80. package/vanilla/UiCallout.d.ts +1 -1
  81. package/vanilla/UiCallout.js +2 -2
  82. package/vanilla/UiCheckbox.d.ts +1 -1
  83. package/vanilla/UiCheckbox.js +2 -2
  84. package/vanilla/UiCluster.d.ts +1 -1
  85. package/vanilla/UiCluster.js +2 -2
  86. package/vanilla/UiCombobox.d.ts +1 -1
  87. package/vanilla/UiCombobox.js +3 -3
  88. package/vanilla/UiContainer.d.ts +1 -1
  89. package/vanilla/UiContainer.js +2 -2
  90. package/vanilla/UiContextMenu.d.ts +1 -1
  91. package/vanilla/UiContextMenu.js +2 -2
  92. package/vanilla/UiDialog.d.ts +1 -1
  93. package/vanilla/UiDialog.js +2 -2
  94. package/vanilla/UiDisclosure.d.ts +1 -1
  95. package/vanilla/UiDisclosure.js +2 -2
  96. package/vanilla/UiEditable.d.ts +1 -1
  97. package/vanilla/UiEditable.js +2 -2
  98. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  99. package/vanilla/UiEditorInsertTableGrid.js +3 -3
  100. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  101. package/vanilla/UiEditorMentionMenu.js +3 -3
  102. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  103. package/vanilla/UiEditorSlashMenu.js +2 -2
  104. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  105. package/vanilla/UiEditorTableContextMenu.js +3 -3
  106. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  107. package/vanilla/UiEditorTableOverlay.js +3 -3
  108. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  109. package/vanilla/UiEditorTableToolbar.js +3 -3
  110. package/vanilla/UiEditorToolbar.d.ts +1 -1
  111. package/vanilla/UiEditorToolbar.js +2 -2
  112. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  113. package/vanilla/UiFloatingActionButton.js +2 -2
  114. package/vanilla/UiFormField.d.ts +1 -1
  115. package/vanilla/UiFormField.js +15 -6
  116. package/vanilla/UiGrid.d.ts +1 -1
  117. package/vanilla/UiGrid.js +2 -2
  118. package/vanilla/UiIcon.d.ts +1 -1
  119. package/vanilla/UiIcon.js +3 -3
  120. package/vanilla/UiIconButton.d.ts +1 -1
  121. package/vanilla/UiIconButton.js +2 -2
  122. package/vanilla/UiInput.d.ts +1 -1
  123. package/vanilla/UiInput.js +2 -2
  124. package/vanilla/UiMenu.d.ts +1 -1
  125. package/vanilla/UiMenu.js +2 -2
  126. package/vanilla/UiMenuItem.d.ts +1 -1
  127. package/vanilla/UiMenuItem.js +2 -2
  128. package/vanilla/UiPopover.d.ts +1 -1
  129. package/vanilla/UiPopover.js +2 -2
  130. package/vanilla/UiRadio.d.ts +1 -1
  131. package/vanilla/UiRadio.js +2 -2
  132. package/vanilla/UiRadioGroup.d.ts +1 -1
  133. package/vanilla/UiRadioGroup.js +2 -2
  134. package/vanilla/UiReel.d.ts +1 -1
  135. package/vanilla/UiReel.js +2 -2
  136. package/vanilla/UiSearchResultRow.d.ts +1 -1
  137. package/vanilla/UiSearchResultRow.js +2 -2
  138. package/vanilla/UiSearchShell.d.ts +1 -1
  139. package/vanilla/UiSearchShell.js +2 -2
  140. package/vanilla/UiSelect.d.ts +1 -1
  141. package/vanilla/UiSelect.js +2 -2
  142. package/vanilla/UiSeparator.d.ts +1 -1
  143. package/vanilla/UiSeparator.js +2 -2
  144. package/vanilla/UiSidebar.d.ts +1 -1
  145. package/vanilla/UiSidebar.js +2 -2
  146. package/vanilla/UiStack.d.ts +1 -1
  147. package/vanilla/UiStack.js +2 -2
  148. package/vanilla/UiSwitch.d.ts +1 -1
  149. package/vanilla/UiSwitch.js +2 -2
  150. package/vanilla/UiSwitcher.d.ts +1 -1
  151. package/vanilla/UiSwitcher.js +2 -2
  152. package/vanilla/UiTabs.d.ts +1 -1
  153. package/vanilla/UiTabs.js +3 -3
  154. package/vanilla/UiTextarea.d.ts +1 -1
  155. package/vanilla/UiTextarea.js +2 -2
  156. package/vanilla/UiToastRegion.d.ts +1 -1
  157. package/vanilla/UiToastRegion.js +3 -3
  158. package/vanilla/UiTooltip.d.ts +1 -1
  159. package/vanilla/UiTooltip.js +2 -2
  160. package/vanilla/UiTopBar.d.ts +1 -1
  161. package/vanilla/UiTopBar.js +1 -1
  162. package/vanilla/UiTree.d.ts +1 -1
  163. package/vanilla/UiTree.js +2 -2
  164. package/vanilla/UiTreeItem.d.ts +1 -1
  165. package/vanilla/UiTreeItem.js +2 -2
  166. package/vue/UiAffordanceScope.d.ts +2 -2
  167. package/vue/UiAffordanceScope.vue +92 -73
  168. package/vue/UiAvatar.d.ts +7 -7
  169. package/vue/UiAvatar.vue +145 -105
  170. package/vue/UiAvatarGroup.d.ts +4 -4
  171. package/vue/UiAvatarGroup.vue +134 -118
  172. package/vue/UiBadge.d.ts +4 -4
  173. package/vue/UiBadge.vue +113 -114
  174. package/vue/UiButton.d.ts +10 -6
  175. package/vue/UiButton.vue +289 -248
  176. package/vue/UiCallout.d.ts +2 -2
  177. package/vue/UiCallout.vue +154 -87
  178. package/vue/UiCheckbox.d.ts +14 -10
  179. package/vue/UiCheckbox.vue +228 -162
  180. package/vue/UiCluster.d.ts +2 -2
  181. package/vue/UiCluster.vue +53 -60
  182. package/vue/UiCombobox.d.ts +36 -32
  183. package/vue/UiCombobox.vue +1005 -416
  184. package/vue/UiContainer.d.ts +2 -2
  185. package/vue/UiContainer.vue +48 -51
  186. package/vue/UiContextMenu.d.ts +6 -4
  187. package/vue/UiContextMenu.vue +205 -116
  188. package/vue/UiDialog.d.ts +11 -9
  189. package/vue/UiDialog.vue +287 -212
  190. package/vue/UiDisclosure.d.ts +8 -6
  191. package/vue/UiDisclosure.vue +248 -159
  192. package/vue/UiEditable.d.ts +16 -12
  193. package/vue/UiEditable.vue +325 -205
  194. package/vue/UiEditorInsertTableGrid.d.ts +8 -8
  195. package/vue/UiEditorInsertTableGrid.vue +216 -157
  196. package/vue/UiEditorMentionMenu.d.ts +9 -9
  197. package/vue/UiEditorMentionMenu.vue +265 -222
  198. package/vue/UiEditorSlashMenu.d.ts +7 -7
  199. package/vue/UiEditorSlashMenu.vue +286 -240
  200. package/vue/UiEditorTableContextMenu.d.ts +5 -5
  201. package/vue/UiEditorTableContextMenu.vue +306 -193
  202. package/vue/UiEditorTableOverlay.d.ts +2 -2
  203. package/vue/UiEditorTableOverlay.vue +609 -369
  204. package/vue/UiEditorTableToolbar.d.ts +7 -7
  205. package/vue/UiEditorTableToolbar.vue +443 -268
  206. package/vue/UiEditorToolbar.d.ts +2 -2
  207. package/vue/UiEditorToolbar.vue +134 -121
  208. package/vue/UiFloatingActionButton.d.ts +6 -6
  209. package/vue/UiFloatingActionButton.vue +100 -99
  210. package/vue/UiFormField.d.ts +6 -6
  211. package/vue/UiFormField.vue +112 -80
  212. package/vue/UiGrid.d.ts +2 -2
  213. package/vue/UiGrid.vue +51 -57
  214. package/vue/UiIcon.d.ts +2 -2
  215. package/vue/UiIcon.vue +118 -89
  216. package/vue/UiIconButton.d.ts +11 -11
  217. package/vue/UiIconButton.vue +283 -217
  218. package/vue/UiInput.d.ts +9 -9
  219. package/vue/UiInput.vue +153 -127
  220. package/vue/UiMenu.d.ts +8 -6
  221. package/vue/UiMenu.vue +217 -143
  222. package/vue/UiMenuItem.d.ts +4 -4
  223. package/vue/UiMenuItem.vue +52 -46
  224. package/vue/UiPopover.d.ts +8 -6
  225. package/vue/UiPopover.vue +197 -137
  226. package/vue/UiRadio.d.ts +14 -10
  227. package/vue/UiRadio.vue +183 -117
  228. package/vue/UiRadioGroup.d.ts +14 -12
  229. package/vue/UiRadioGroup.vue +172 -111
  230. package/vue/UiReel.d.ts +3 -3
  231. package/vue/UiReel.vue +77 -77
  232. package/vue/UiSearchResultRow.d.ts +4 -4
  233. package/vue/UiSearchResultRow.vue +124 -115
  234. package/vue/UiSearchShell.d.ts +10 -8
  235. package/vue/UiSearchShell.vue +245 -176
  236. package/vue/UiSelect.d.ts +9 -9
  237. package/vue/UiSelect.vue +162 -134
  238. package/vue/UiSeparator.d.ts +2 -2
  239. package/vue/UiSeparator.vue +22 -27
  240. package/vue/UiSidebar.d.ts +20 -18
  241. package/vue/UiSidebar.vue +312 -224
  242. package/vue/UiStack.d.ts +3 -3
  243. package/vue/UiStack.vue +64 -70
  244. package/vue/UiSwitch.d.ts +12 -8
  245. package/vue/UiSwitch.vue +218 -150
  246. package/vue/UiSwitcher.d.ts +3 -3
  247. package/vue/UiSwitcher.vue +73 -75
  248. package/vue/UiTabs.d.ts +10 -8
  249. package/vue/UiTabs.vue +251 -210
  250. package/vue/UiTextarea.d.ts +11 -11
  251. package/vue/UiTextarea.vue +155 -128
  252. package/vue/UiToastRegion.d.ts +10 -8
  253. package/vue/UiToastRegion.vue +261 -198
  254. package/vue/UiTooltip.d.ts +14 -12
  255. package/vue/UiTooltip.vue +241 -177
  256. package/vue/UiTopBar.vue +51 -42
  257. package/vue/UiTree.d.ts +8 -6
  258. package/vue/UiTree.vue +157 -70
  259. package/vue/UiTreeItem.d.ts +24 -22
  260. package/vue/UiTreeItem.vue +456 -339
  261. package/vue/chunks/UiAffordanceScope.js +9 -16
  262. package/vue/chunks/UiAvatar.js +23 -29
  263. package/vue/chunks/UiAvatarGroup.js +16 -39
  264. package/vue/chunks/UiBadge.js +3 -12
  265. package/vue/chunks/UiButton.js +15 -18
  266. package/vue/chunks/UiCallout.js +8 -17
  267. package/vue/chunks/UiCheckbox.js +37 -40
  268. package/vue/chunks/UiCluster.js +3 -12
  269. package/vue/chunks/UiCombobox.js +224 -266
  270. package/vue/chunks/UiContainer.js +3 -12
  271. package/vue/chunks/UiContextMenu.js +39 -34
  272. package/vue/chunks/UiDialog.js +36 -39
  273. package/vue/chunks/UiDisclosure.js +43 -48
  274. package/vue/chunks/UiEditable.js +55 -57
  275. package/vue/chunks/UiEditorInsertTableGrid.js +55 -73
  276. package/vue/chunks/UiEditorMentionMenu.js +40 -81
  277. package/vue/chunks/UiEditorSlashMenu.js +28 -52
  278. package/vue/chunks/UiEditorTableContextMenu.js +32 -56
  279. package/vue/chunks/UiEditorTableOverlay.js +58 -82
  280. package/vue/chunks/UiEditorTableToolbar.js +61 -85
  281. package/vue/chunks/UiEditorToolbar.js +4 -13
  282. package/vue/chunks/UiFloatingActionButton.js +7 -21
  283. package/vue/chunks/UiFormField.js +15 -12
  284. package/vue/chunks/UiGrid.js +3 -12
  285. package/vue/chunks/UiIcon.js +20 -43
  286. package/vue/chunks/UiIconButton.js +16 -28
  287. package/vue/chunks/UiInput.js +20 -25
  288. package/vue/chunks/UiMenu.js +29 -33
  289. package/vue/chunks/UiMenuItem.js +4 -10
  290. package/vue/chunks/UiPopover.js +28 -29
  291. package/vue/chunks/UiRadio.js +36 -39
  292. package/vue/chunks/UiRadioGroup.js +30 -34
  293. package/vue/chunks/UiReel.js +6 -15
  294. package/vue/chunks/UiSearchResultRow.js +6 -19
  295. package/vue/chunks/UiSearchShell.js +25 -28
  296. package/vue/chunks/UiSelect.js +20 -23
  297. package/vue/chunks/UiSeparator.js +2 -8
  298. package/vue/chunks/UiSidebar.js +39 -44
  299. package/vue/chunks/UiStack.js +6 -15
  300. package/vue/chunks/UiSwitch.js +35 -38
  301. package/vue/chunks/UiSwitcher.js +6 -15
  302. package/vue/chunks/UiTabs.js +47 -85
  303. package/vue/chunks/UiTextarea.js +21 -26
  304. package/vue/chunks/UiToastRegion.js +38 -72
  305. package/vue/chunks/UiTooltip.js +34 -35
  306. package/vue/chunks/UiTopBar.js +1 -1
  307. package/vue/chunks/UiTree.js +20 -15
  308. package/vue/chunks/UiTreeItem.js +85 -102
  309. package/vue/components.css +3994 -3801
@@ -71,53 +71,29 @@ var UiEditorTableToolbar_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
71
71
  cellAlignment: { default: "left" },
72
72
  cellBackground: { default: "" },
73
73
  open: {
74
- type: [Boolean, null],
74
+ type: Boolean,
75
75
  default: false
76
76
  }
77
77
  },
78
78
  emits: ["action"],
79
79
  setup(__props, { emit: __emit }) {
80
- const hn = {
81
- t: (v) => v === true || (typeof v === "string" ? v.length > 0 : typeof v === "number" ? v !== 0 && v === v : Array.isArray(v) ? v.length > 0 : v !== null && typeof v === "object" ? Object.keys(v).length > 0 : false),
82
- text: (v) => v === void 0 || v === null ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? "" : String(v),
83
- attr: (v) => v === void 0 || v === null || v === false ? void 0 : v === true ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? void 0 : String(v),
84
- enumerated: (v) => typeof v === "boolean" ? String(v) : hn.attr(v),
85
- shape: (items, where, sort, limit) => {
86
- let list = Array.isArray(items) ? items.slice() : [];
87
- if (where !== void 0) list = list.filter((item) => hn.t(where(item)));
88
- if (sort.length > 0) {
89
- const field = (item, path) => item !== null && typeof item === "object" && !Array.isArray(item) ? path.split(".").reduce((value, key) => value?.[key], item) : item;
90
- const compare = (a, b) => typeof a === "number" && typeof b === "number" ? a - b : hn.text(a).localeCompare(hn.text(b));
91
- list.sort((a, b) => {
92
- for (const key of sort) {
93
- const descending = key.startsWith("-");
94
- const order = compare(field(a, descending ? key.slice(1) : key), field(b, descending ? key.slice(1) : key));
95
- if (order !== 0) return descending ? -order : order;
96
- }
97
- return 0;
98
- });
99
- }
100
- return typeof limit === "number" ? list.slice(0, Math.max(0, Math.trunc(limit))) : list;
101
- }
102
- };
103
80
  const props = __props;
104
81
  const emit = __emit;
105
82
  const root = ref(null);
106
- const refs = {};
107
- const state_alignments = ref([]);
108
- const state_structure = ref([]);
109
- const state_swatches = ref([]);
110
- const state_sections = ref([]);
111
- const state_hasOverflow = ref(false);
112
- const state_overflowOpen = ref(false);
83
+ const alignments = ref([]);
84
+ const structure = ref([]);
85
+ const swatches = ref([]);
86
+ const sections = ref([]);
87
+ const hasOverflow = ref(false);
88
+ const overflowOpen = ref(false);
113
89
  /** Dispatches a component event to Vue listeners and, for controllers and page code, on the root. */
114
- const dispatch = (name, detail) => {
115
- const declared = { "action": {
116
- "bubbles": true,
117
- "composed": true,
118
- "cancelable": false
90
+ function dispatch(name, detail) {
91
+ const declared = { action: {
92
+ bubbles: true,
93
+ composed: true,
94
+ cancelable: false
119
95
  } };
120
- const checks = { "action": (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && (detail["action"] === "align-left" || detail["action"] === "align-center" || detail["action"] === "align-right" || detail["action"] === "background-none" || detail["action"] === "background-gray" || detail["action"] === "background-yellow" || detail["action"] === "background-blue" || detail["action"] === "background-green" || detail["action"] === "background-red" || detail["action"] === "add-row-before" || detail["action"] === "add-row-after" || detail["action"] === "add-column-before" || detail["action"] === "add-column-after" || detail["action"] === "clear-cells" || detail["action"] === "merge-cells" || detail["action"] === "split-cell" || detail["action"] === "delete-row" || detail["action"] === "delete-column" || detail["action"] === "delete-table") && Object.keys(detail).every((key) => ["action"].includes(key)) };
96
+ const checks = { action: (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && (detail["action"] === "align-left" || detail["action"] === "align-center" || detail["action"] === "align-right" || detail["action"] === "background-none" || detail["action"] === "background-gray" || detail["action"] === "background-yellow" || detail["action"] === "background-blue" || detail["action"] === "background-green" || detail["action"] === "background-red" || detail["action"] === "add-row-before" || detail["action"] === "add-row-after" || detail["action"] === "add-column-before" || detail["action"] === "add-column-after" || detail["action"] === "clear-cells" || detail["action"] === "merge-cells" || detail["action"] === "split-cell" || detail["action"] === "delete-row" || detail["action"] === "delete-column" || detail["action"] === "delete-table") && Object.keys(detail).every((key) => ["action"].includes(key)) };
121
97
  if (detail !== void 0 && checks[name] !== void 0 && !checks[name](detail)) throw new TypeError(`HR002: Event \`${name}\` detail does not satisfy its declared type.`);
122
98
  emit(name, detail);
123
99
  return root.value?.dispatchEvent(new CustomEvent(name, {
@@ -126,39 +102,39 @@ var UiEditorTableToolbar_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
126
102
  ...declared[name],
127
103
  detail
128
104
  })) ?? true;
129
- };
105
+ }
130
106
  function read(name) {
131
- if (name === "alignments") return state_alignments.value;
132
- if (name === "structure") return state_structure.value;
133
- if (name === "swatches") return state_swatches.value;
134
- if (name === "sections") return state_sections.value;
135
- if (name === "hasOverflow") return state_hasOverflow.value;
136
- if (name === "overflowOpen") return state_overflowOpen.value;
107
+ if (name === "alignments") return alignments.value;
108
+ if (name === "structure") return structure.value;
109
+ if (name === "swatches") return swatches.value;
110
+ if (name === "sections") return sections.value;
111
+ if (name === "hasOverflow") return hasOverflow.value;
112
+ if (name === "overflowOpen") return overflowOpen.value;
137
113
  return props[name];
138
114
  }
139
115
  function write(name, value) {
140
116
  if (name === "alignments") {
141
- state_alignments.value = value;
117
+ alignments.value = value;
142
118
  return true;
143
119
  }
144
120
  if (name === "structure") {
145
- state_structure.value = value;
121
+ structure.value = value;
146
122
  return true;
147
123
  }
148
124
  if (name === "swatches") {
149
- state_swatches.value = value;
125
+ swatches.value = value;
150
126
  return true;
151
127
  }
152
128
  if (name === "sections") {
153
- state_sections.value = value;
129
+ sections.value = value;
154
130
  return true;
155
131
  }
156
132
  if (name === "hasOverflow") {
157
- state_hasOverflow.value = value;
133
+ hasOverflow.value = value;
158
134
  return true;
159
135
  }
160
136
  if (name === "overflowOpen") {
161
- state_overflowOpen.value = value;
137
+ overflowOpen.value = value;
162
138
  return true;
163
139
  }
164
140
  throw new TypeError(`Only declared state is writable; \`${name}\` is not.`);
@@ -172,7 +148,7 @@ var UiEditorTableToolbar_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
172
148
  get: (_target, name) => typeof name === "string" ? read(name) : void 0,
173
149
  set: (_target, name, value) => typeof name === "string" && write(name, value)
174
150
  }),
175
- refs,
151
+ refs: {},
176
152
  elements: new Proxy({}, { get: (_target, name) => {
177
153
  if (typeof name !== "string" || root.value === null) return void 0;
178
154
  return (root.value instanceof HTMLFormElement ? root.value : root.value.querySelector("form"))?.elements.namedItem(name) ?? root.value.querySelector(`[name="${CSS.escape(name)}"]`) ?? void 0;
@@ -227,73 +203,73 @@ var UiEditorTableToolbar_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
227
203
  role: "toolbar",
228
204
  "aria-label": "Table actions"
229
205
  }, _ctx.$attrs, {
230
- hidden: hn.attr(!hn.t(props.open)),
206
+ hidden: !__props.open,
231
207
  ref_key: "root",
232
208
  ref: root
233
209
  }), [
234
- hn.t(state_alignments.value) ? (openBlock(), createElementBlock("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(hn.shape(state_alignments.value, void 0, [], void 0), (item, index) => {
210
+ alignments.value.length ? (openBlock(), createElementBlock("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(alignments.value, (item) => {
235
211
  return openBlock(), createElementBlock("button", {
236
- key: item?.action,
212
+ key: item.action,
237
213
  type: "button",
238
- class: normalizeClass(["icon-button", { "active": hn.t(item?.active) }]),
239
- "data-action": hn.attr(item?.action),
240
- "aria-label": hn.enumerated(item?.label),
241
- title: hn.attr(item?.label),
242
- "aria-pressed": hn.enumerated(item?.active)
243
- }, [createVNode(UiIcon_default, { name: item?.action }, null, 8, ["name"])], 10, _hoisted_3);
214
+ class: normalizeClass(["icon-button", { active: item.active }]),
215
+ "data-action": item.action,
216
+ "aria-label": item.label,
217
+ title: item.label,
218
+ "aria-pressed": item.active
219
+ }, [createVNode(UiIcon_default, { name: item.action }, null, 8, ["name"])], 10, _hoisted_3);
244
220
  }), 128))])) : createCommentVNode("v-if", true),
245
- hn.t(hn.t(state_alignments.value) && hn.t(state_structure.value)) ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("v-if", true),
246
- hn.t(state_structure.value) ? (openBlock(), createElementBlock("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(hn.shape(state_structure.value, void 0, [], void 0), (item, index) => {
221
+ alignments.value.length && structure.value.length ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("v-if", true),
222
+ structure.value.length ? (openBlock(), createElementBlock("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(structure.value, (item) => {
247
223
  return openBlock(), createElementBlock("button", {
248
- key: item?.action,
224
+ key: item.action,
249
225
  type: "button",
250
- "data-action": hn.attr(item?.action)
251
- }, [createVNode(UiIcon_default, { name: item?.icon }, null, 8, ["name"]), createElementVNode("span", null, toDisplayString(hn.text(item?.label)), 1)], 8, _hoisted_6);
226
+ "data-action": item.action
227
+ }, [createVNode(UiIcon_default, { name: item.icon }, null, 8, ["name"]), createElementVNode("span", null, toDisplayString(item.label), 1)], 8, _hoisted_6);
252
228
  }), 128))])) : createCommentVNode("v-if", true),
253
- hn.t(hn.t(hn.t(state_alignments.value) || hn.t(state_structure.value)) && hn.t(state_hasOverflow.value)) ? (openBlock(), createElementBlock("div", _hoisted_7)) : createCommentVNode("v-if", true),
254
- hn.t(state_hasOverflow.value) ? (openBlock(), createElementBlock("div", _hoisted_8, [createElementVNode("button", {
229
+ (alignments.value.length || structure.value.length) && hasOverflow.value ? (openBlock(), createElementBlock("div", _hoisted_7)) : createCommentVNode("v-if", true),
230
+ hasOverflow.value ? (openBlock(), createElementBlock("div", _hoisted_8, [createElementVNode("button", {
255
231
  type: "button",
256
232
  class: "more",
257
233
  "data-action": "toggle-overflow",
258
234
  "aria-haspopup": "menu",
259
- "aria-expanded": hn.enumerated(state_overflowOpen.value)
235
+ "aria-expanded": overflowOpen.value
260
236
  }, [
261
237
  createVNode(UiIcon_default, { name: "table" }),
262
238
  _cache[0] || (_cache[0] = createElementVNode("span", null, "Table options", -1)),
263
239
  createElementVNode("span", _hoisted_10, [createVNode(UiIcon_default, { name: "chevron-down" })])
264
- ], 8, _hoisted_9), hn.t(state_overflowOpen.value) ? (openBlock(), createElementBlock("div", _hoisted_11, [hn.t(state_swatches.value) ? (openBlock(), createElementBlock("div", _hoisted_12, [_cache[1] || (_cache[1] = createElementVNode("div", {
240
+ ], 8, _hoisted_9), overflowOpen.value ? (openBlock(), createElementBlock("div", _hoisted_11, [swatches.value.length ? (openBlock(), createElementBlock("div", _hoisted_12, [_cache[1] || (_cache[1] = createElementVNode("div", {
265
241
  class: "menu-heading",
266
242
  role: "presentation"
267
- }, "Background", -1)), createElementVNode("div", _hoisted_13, [(openBlock(true), createElementBlock(Fragment, null, renderList(hn.shape(state_swatches.value, void 0, [], void 0), (swatch, index) => {
243
+ }, "Background", -1)), createElementVNode("div", _hoisted_13, [(openBlock(true), createElementBlock(Fragment, null, renderList(swatches.value, (swatch) => {
268
244
  return openBlock(), createElementBlock("button", {
269
- key: swatch?.action,
245
+ key: swatch.action,
270
246
  type: "button",
271
- class: normalizeClass(["swatch-button", { "selected": hn.t(swatch?.selected) }]),
247
+ class: normalizeClass(["swatch-button", { selected: swatch.selected }]),
272
248
  role: "menuitemradio",
273
- "aria-checked": hn.enumerated(swatch?.selected),
274
- "data-action": hn.attr(swatch?.action)
249
+ "aria-checked": swatch.selected,
250
+ "data-action": swatch.action
275
251
  }, [createElementVNode("span", {
276
- class: normalizeClass(["swatch", { "default": hn.t(!hn.t(swatch?.color)) }]),
277
- style: normalizeStyle({ "--ui-editor-table-toolbar-swatch": hn.text(swatch?.color) })
278
- }, null, 6), createElementVNode("span", null, toDisplayString(hn.text(swatch?.label)), 1)], 10, _hoisted_14);
279
- }), 128))])])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(hn.shape(state_sections.value, void 0, [], void 0), (section, index) => {
252
+ class: normalizeClass(["swatch", { default: !swatch.color }]),
253
+ style: normalizeStyle({ "--ui-editor-table-toolbar-swatch": swatch.color })
254
+ }, null, 6), createElementVNode("span", null, toDisplayString(swatch.label), 1)], 10, _hoisted_14);
255
+ }), 128))])])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(sections.value, (section) => {
280
256
  return openBlock(), createElementBlock("div", {
281
- key: section?.heading,
257
+ key: section.heading,
282
258
  class: "menu-section divided",
283
259
  role: "none"
284
- }, [createElementVNode("div", _hoisted_15, toDisplayString(hn.text(section?.heading)), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(hn.shape(section?.items, void 0, [], void 0), (item, index) => {
260
+ }, [createElementVNode("div", _hoisted_15, toDisplayString(section.heading), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(section.items, (item) => {
285
261
  return openBlock(), createElementBlock("button", {
286
- key: item?.action,
262
+ key: item.action,
287
263
  type: "button",
288
264
  role: "menuitem",
289
- "data-action": hn.attr(item?.action),
290
- class: normalizeClass({ "danger": hn.t(item?.danger) })
291
- }, [createVNode(UiIcon_default, { name: item?.icon }, null, 8, ["name"]), createElementVNode("span", null, toDisplayString(hn.text(item?.label)), 1)], 10, _hoisted_16);
265
+ "data-action": item.action,
266
+ class: normalizeClass({ danger: item.danger })
267
+ }, [createVNode(UiIcon_default, { name: item.icon }, null, 8, ["name"]), createElementVNode("span", null, toDisplayString(item.label), 1)], 10, _hoisted_16);
292
268
  }), 128))]);
293
269
  }), 128))])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true)
294
270
  ], 16, _hoisted_1);
295
271
  };
296
272
  }
297
- }), [["__scopeId", "data-v-6f66c7f4"]]);
273
+ }), [["__scopeId", "data-v-b2b27930"]]);
298
274
  //#endregion
299
275
  export { UiEditorTableToolbar_default as t };
@@ -8,22 +8,13 @@ var UiEditorToolbar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
8
8
  inheritAttrs: false,
9
9
  __name: "UiEditorToolbar",
10
10
  props: { floating: {
11
- type: [Boolean, null],
11
+ type: Boolean,
12
12
  default: false
13
13
  } },
14
14
  setup(__props) {
15
- const hn = { t: (v) => v === true || (typeof v === "string" ? v.length > 0 : typeof v === "number" ? v !== 0 && v === v : Array.isArray(v) ? v.length > 0 : v !== null && typeof v === "object" ? Object.keys(v).length > 0 : false) };
16
15
  const props = __props;
17
- /** The resolved values the styles' :host-state() rules test. */
18
- const hostState = computed(() => ["floating"].flatMap((name) => {
19
- const value = read(name);
20
- const tokens = hn.t(value) ? [name] : [];
21
- if (typeof value === "string" || typeof value === "number") tokens.push(`${name}=${encodeURIComponent(String(value))}`);
22
- return tokens;
23
- }).join(" "));
24
- function read(name) {
25
- return props[name];
26
- }
16
+ /** The values the styles' :host-state() rules test. */
17
+ const hostState = computed(() => [props.floating && "floating"].filter(Boolean).join(" "));
27
18
  return (_ctx, _cache) => {
28
19
  return openBlock(), createElementBlock("div", mergeProps({
29
20
  "data-component": "ui-editor-toolbar",
@@ -32,6 +23,6 @@ var UiEditorToolbar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
32
23
  }, _ctx.$attrs, { "data-ui-editor-toolbar-state": hostState.value || void 0 }), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1);
33
24
  };
34
25
  }
35
- }), [["__scopeId", "data-v-2c94f261"]]);
26
+ }), [["__scopeId", "data-v-890a1e69"]]);
36
27
  //#endregion
37
28
  export { UiEditorToolbar_default as t };
@@ -13,44 +13,30 @@ var UiFloatingActionButton_default = /*#__PURE__*/ _plugin_vue_export_helper_def
13
13
  __name: "UiFloatingActionButton",
14
14
  props: {
15
15
  disabled: {
16
- type: [Boolean, null],
16
+ type: Boolean,
17
17
  default: false
18
18
  },
19
19
  label: { default: "" },
20
20
  mobileOnly: {
21
- type: [Boolean, null],
21
+ type: Boolean,
22
22
  default: false
23
23
  }
24
24
  },
25
25
  setup(__props) {
26
- const hn = {
27
- t: (v) => v === true || (typeof v === "string" ? v.length > 0 : typeof v === "number" ? v !== 0 && v === v : Array.isArray(v) ? v.length > 0 : v !== null && typeof v === "object" ? Object.keys(v).length > 0 : false),
28
- text: (v) => v === void 0 || v === null ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? "" : String(v),
29
- attr: (v) => v === void 0 || v === null || v === false ? void 0 : v === true ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? void 0 : String(v),
30
- enumerated: (v) => typeof v === "boolean" ? String(v) : hn.attr(v)
31
- };
32
26
  const props = __props;
33
- /** The resolved values the styles' :host-state() rules test. */
34
- const hostState = computed(() => ["mobileOnly"].flatMap((name) => {
35
- const value = read(name);
36
- const tokens = hn.t(value) ? [name] : [];
37
- if (typeof value === "string" || typeof value === "number") tokens.push(`${name}=${encodeURIComponent(String(value))}`);
38
- return tokens;
39
- }).join(" "));
40
- function read(name) {
41
- return props[name];
42
- }
27
+ /** The values the styles' :host-state() rules test. */
28
+ const hostState = computed(() => [props.mobileOnly && "mobileOnly"].filter(Boolean).join(" "));
43
29
  return (_ctx, _cache) => {
44
30
  return openBlock(), createElementBlock("button", mergeProps({
45
31
  "data-component": "ui-floating-action-button",
46
32
  type: "button"
47
33
  }, _ctx.$attrs, {
48
- "aria-label": hn.enumerated(props.label),
49
- disabled: hn.attr(props.disabled),
34
+ "aria-label": __props.label,
35
+ disabled: __props.disabled,
50
36
  "data-ui-floating-action-button-state": hostState.value || void 0
51
37
  }), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1);
52
38
  };
53
39
  }
54
- }), [["__scopeId", "data-v-b94e6e26"]]);
40
+ }), [["__scopeId", "data-v-a6b9e9ca"]]);
55
41
  //#endregion
56
42
  export { UiFloatingActionButton_default as t };
@@ -1,6 +1,10 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
2
- import { computed, createElementBlock, defineComponent, mergeProps, onBeforeUnmount, onMounted, openBlock, ref, renderSlot, shallowRef, watchEffect } from "vue";
2
+ import { computed, createElementBlock, createElementVNode, defineComponent, mergeProps, onBeforeUnmount, onMounted, openBlock, ref, renderSlot, shallowRef, watchEffect } from "vue";
3
3
  import * as controllerModule from "@threadlabs/looma/components/ui-form-field/ui-form-field.js";
4
+ //#region .build/vue/UiFormField.vue?vue&type=script&setup=true&lang.ts
5
+ var _hoisted_1 = { class: "label" };
6
+ var _hoisted_2 = { class: "help" };
7
+ var _hoisted_3 = { class: "error" };
4
8
  //#endregion
5
9
  //#region .build/vue/UiFormField.vue
6
10
  var UiFormField_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -8,30 +12,29 @@ var UiFormField_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
8
12
  __name: "UiFormField",
9
13
  props: {
10
14
  disabled: {
11
- type: [Boolean, null],
15
+ type: Boolean,
12
16
  default: false
13
17
  },
14
18
  invalid: {
15
- type: [Boolean, null],
19
+ type: Boolean,
16
20
  default: false
17
21
  },
18
22
  required: {
19
- type: [Boolean, null],
23
+ type: Boolean,
20
24
  default: false
21
25
  }
22
26
  },
23
27
  setup(__props) {
24
28
  const props = __props;
25
29
  const root = ref(null);
26
- const refs = {};
27
30
  /** Dispatches a component event to Vue listeners and, for controllers and page code, on the root. */
28
- const dispatch = (name, detail) => {
31
+ function dispatch(name, detail) {
29
32
  return root.value?.dispatchEvent(new CustomEvent(name, {
30
33
  bubbles: true,
31
34
  composed: true,
32
35
  detail
33
36
  })) ?? true;
34
- };
37
+ }
35
38
  function read(name) {
36
39
  return props[name];
37
40
  }
@@ -47,7 +50,7 @@ var UiFormField_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
47
50
  get: (_target, name) => typeof name === "string" ? read(name) : void 0,
48
51
  set: (_target, name, value) => typeof name === "string" && write(name, value)
49
52
  }),
50
- refs,
53
+ refs: {},
51
54
  elements: new Proxy({}, { get: (_target, name) => {
52
55
  if (typeof name !== "string" || root.value === null) return void 0;
53
56
  return (root.value instanceof HTMLFormElement ? root.value : root.value.querySelector("form"))?.elements.namedItem(name) ?? root.value.querySelector(`[name="${CSS.escape(name)}"]`) ?? void 0;
@@ -101,13 +104,13 @@ var UiFormField_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
101
104
  ref_key: "root",
102
105
  ref: root
103
106
  }), [
104
- renderSlot(_ctx.$slots, "label"),
107
+ createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "label")]),
105
108
  renderSlot(_ctx.$slots, "default"),
106
- renderSlot(_ctx.$slots, "help"),
107
- renderSlot(_ctx.$slots, "error")
109
+ createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "help")]),
110
+ createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "error")])
108
111
  ], 16);
109
112
  };
110
113
  }
111
- }), [["__scopeId", "data-v-31c8915e"]]);
114
+ }), [["__scopeId", "data-v-ae3bcdfb"]]);
112
115
  //#endregion
113
116
  export { UiFormField_default as t };
@@ -12,22 +12,13 @@ var UiGrid_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
12
12
  min: {}
13
13
  },
14
14
  setup(__props) {
15
- const hn = { t: (v) => v === true || (typeof v === "string" ? v.length > 0 : typeof v === "number" ? v !== 0 && v === v : Array.isArray(v) ? v.length > 0 : v !== null && typeof v === "object" ? Object.keys(v).length > 0 : false) };
16
15
  const props = __props;
17
- /** The resolved values the styles' :host-state() rules test. */
18
- const hostState = computed(() => ["gap", "min"].flatMap((name) => {
19
- const value = read(name);
20
- const tokens = hn.t(value) ? [name] : [];
21
- if (typeof value === "string" || typeof value === "number") tokens.push(`${name}=${encodeURIComponent(String(value))}`);
22
- return tokens;
23
- }).join(" "));
24
- function read(name) {
25
- return props[name];
26
- }
16
+ /** The values the styles' :host-state() rules test. */
17
+ const hostState = computed(() => [props.gap && `gap gap=${props.gap}`, props.min && `min min=${props.min}`].filter(Boolean).join(" "));
27
18
  return (_ctx, _cache) => {
28
19
  return openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-grid" }, _ctx.$attrs, { "data-ui-grid-state": hostState.value || void 0 }), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
29
20
  };
30
21
  }
31
- }), [["__scopeId", "data-v-60709c03"]]);
22
+ }), [["__scopeId", "data-v-c390a71d"]]);
32
23
  //#endregion
33
24
  export { UiGrid_default as t };
@@ -31,47 +31,24 @@ var UiIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
31
31
  __name: "UiIcon",
32
32
  props: { name: { default: "" } },
33
33
  setup(__props) {
34
- const hn = {
35
- t: (v) => v === true || (typeof v === "string" ? v.length > 0 : typeof v === "number" ? v !== 0 && v === v : Array.isArray(v) ? v.length > 0 : v !== null && typeof v === "object" ? Object.keys(v).length > 0 : false),
36
- text: (v) => v === void 0 || v === null ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? "" : String(v),
37
- attr: (v) => v === void 0 || v === null || v === false ? void 0 : v === true ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? void 0 : String(v),
38
- shape: (items, where, sort, limit) => {
39
- let list = Array.isArray(items) ? items.slice() : [];
40
- if (where !== void 0) list = list.filter((item) => hn.t(where(item)));
41
- if (sort.length > 0) {
42
- const field = (item, path) => item !== null && typeof item === "object" && !Array.isArray(item) ? path.split(".").reduce((value, key) => value?.[key], item) : item;
43
- const compare = (a, b) => typeof a === "number" && typeof b === "number" ? a - b : hn.text(a).localeCompare(hn.text(b));
44
- list.sort((a, b) => {
45
- for (const key of sort) {
46
- const descending = key.startsWith("-");
47
- const order = compare(field(a, descending ? key.slice(1) : key), field(b, descending ? key.slice(1) : key));
48
- if (order !== 0) return descending ? -order : order;
49
- }
50
- return 0;
51
- });
52
- }
53
- return typeof limit === "number" ? list.slice(0, Math.max(0, Math.trunc(limit))) : list;
54
- }
55
- };
56
34
  const props = __props;
57
35
  const root = ref(null);
58
- const refs = {};
59
- const state_shapes = ref([]);
36
+ const shapes = ref([]);
60
37
  /** Dispatches a component event to Vue listeners and, for controllers and page code, on the root. */
61
- const dispatch = (name, detail) => {
38
+ function dispatch(name, detail) {
62
39
  return root.value?.dispatchEvent(new CustomEvent(name, {
63
40
  bubbles: true,
64
41
  composed: true,
65
42
  detail
66
43
  })) ?? true;
67
- };
44
+ }
68
45
  function read(name) {
69
- if (name === "shapes") return state_shapes.value;
46
+ if (name === "shapes") return shapes.value;
70
47
  return props[name];
71
48
  }
72
49
  function write(name, value) {
73
50
  if (name === "shapes") {
74
- state_shapes.value = value;
51
+ shapes.value = value;
75
52
  return true;
76
53
  }
77
54
  throw new TypeError(`Only declared state is writable; \`${name}\` is not.`);
@@ -85,7 +62,7 @@ var UiIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
85
62
  get: (_target, name) => typeof name === "string" ? read(name) : void 0,
86
63
  set: (_target, name, value) => typeof name === "string" && write(name, value)
87
64
  }),
88
- refs,
65
+ refs: {},
89
66
  elements: new Proxy({}, { get: (_target, name) => {
90
67
  if (typeof name !== "string" || root.value === null) return void 0;
91
68
  return (root.value instanceof HTMLFormElement ? root.value : root.value.querySelector("form"))?.elements.namedItem(name) ?? root.value.querySelector(`[name="${CSS.escape(name)}"]`) ?? void 0;
@@ -141,30 +118,30 @@ var UiIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
141
118
  }, _ctx.$attrs, {
142
119
  ref_key: "root",
143
120
  ref: root
144
- }), [(openBlock(), createElementBlock("svg", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(hn.shape(state_shapes.value, void 0, [], void 0), (shape, index) => {
121
+ }), [(openBlock(), createElementBlock("svg", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(shapes.value, (shape, index) => {
145
122
  return openBlock(), createElementBlock("g", { key: index }, [
146
- hn.t(shape?.tag === "path") ? (openBlock(), createElementBlock("path", {
123
+ shape.tag === "path" ? (openBlock(), createElementBlock("path", {
147
124
  key: 0,
148
- d: hn.attr(shape?.d)
125
+ d: shape.d
149
126
  }, null, 8, _hoisted_2)) : createCommentVNode("v-if", true),
150
- hn.t(shape?.tag === "circle") ? (openBlock(), createElementBlock("circle", {
127
+ shape.tag === "circle" ? (openBlock(), createElementBlock("circle", {
151
128
  key: 1,
152
- cx: hn.attr(shape?.cx),
153
- cy: hn.attr(shape?.cy),
154
- r: hn.attr(shape?.r)
129
+ cx: shape.cx,
130
+ cy: shape.cy,
131
+ r: shape.r
155
132
  }, null, 8, _hoisted_3)) : createCommentVNode("v-if", true),
156
- hn.t(shape?.tag === "rect") ? (openBlock(), createElementBlock("rect", {
133
+ shape.tag === "rect" ? (openBlock(), createElementBlock("rect", {
157
134
  key: 2,
158
- x: hn.attr(shape?.x),
159
- y: hn.attr(shape?.y),
160
- width: hn.attr(shape?.width),
161
- height: hn.attr(shape?.height),
162
- rx: hn.attr(shape?.rx)
135
+ x: shape.x,
136
+ y: shape.y,
137
+ width: shape.width,
138
+ height: shape.height,
139
+ rx: shape.rx
163
140
  }, null, 8, _hoisted_4)) : createCommentVNode("v-if", true)
164
141
  ]);
165
142
  }), 128))]))], 16);
166
143
  };
167
144
  }
168
- }), [["__scopeId", "data-v-519add28"]]);
145
+ }), [["__scopeId", "data-v-b2b50d17"]]);
169
146
  //#endregion
170
147
  export { UiIcon_default as t };
@@ -14,51 +14,39 @@ var UiIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
14
14
  __name: "UiIconButton",
15
15
  props: {
16
16
  anticipatory: {
17
- type: [Boolean, null],
17
+ type: Boolean,
18
18
  default: false
19
19
  },
20
20
  disabled: {
21
- type: [Boolean, null],
21
+ type: Boolean,
22
22
  default: false
23
23
  },
24
24
  label: {},
25
25
  round: {
26
- type: [Boolean, null],
26
+ type: Boolean,
27
27
  default: false
28
28
  },
29
29
  size: { default: "md" },
30
30
  variant: { default: "ghost" }
31
31
  },
32
32
  setup(__props) {
33
- const hn = {
34
- t: (v) => v === true || (typeof v === "string" ? v.length > 0 : typeof v === "number" ? v !== 0 && v === v : Array.isArray(v) ? v.length > 0 : v !== null && typeof v === "object" ? Object.keys(v).length > 0 : false),
35
- text: (v) => v === void 0 || v === null ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? "" : String(v),
36
- attr: (v) => v === void 0 || v === null || v === false ? void 0 : v === true ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? void 0 : String(v),
37
- enumerated: (v) => typeof v === "boolean" ? String(v) : hn.attr(v)
38
- };
39
33
  const props = __props;
40
34
  const root = ref(null);
41
- const refs = {};
35
+ /** The values the styles' :host-state() rules test. */
36
+ const hostState = computed(() => [
37
+ props.anticipatory && "anticipatory",
38
+ props.variant && `variant variant=${props.variant}`,
39
+ props.size && `size size=${props.size}`,
40
+ props.round && "round"
41
+ ].filter(Boolean).join(" "));
42
42
  /** Dispatches a component event to Vue listeners and, for controllers and page code, on the root. */
43
- const dispatch = (name, detail) => {
43
+ function dispatch(name, detail) {
44
44
  return root.value?.dispatchEvent(new CustomEvent(name, {
45
45
  bubbles: true,
46
46
  composed: true,
47
47
  detail
48
48
  })) ?? true;
49
- };
50
- /** The resolved values the styles' :host-state() rules test. */
51
- const hostState = computed(() => [
52
- "anticipatory",
53
- "variant",
54
- "size",
55
- "round"
56
- ].flatMap((name) => {
57
- const value = read(name);
58
- const tokens = hn.t(value) ? [name] : [];
59
- if (typeof value === "string" || typeof value === "number") tokens.push(`${name}=${encodeURIComponent(String(value))}`);
60
- return tokens;
61
- }).join(" "));
49
+ }
62
50
  function read(name) {
63
51
  return props[name];
64
52
  }
@@ -74,7 +62,7 @@ var UiIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
74
62
  get: (_target, name) => typeof name === "string" ? read(name) : void 0,
75
63
  set: (_target, name, value) => typeof name === "string" && write(name, value)
76
64
  }),
77
- refs,
65
+ refs: {},
78
66
  elements: new Proxy({}, { get: (_target, name) => {
79
67
  if (typeof name !== "string" || root.value === null) return void 0;
80
68
  return (root.value instanceof HTMLFormElement ? root.value : root.value.querySelector("form"))?.elements.namedItem(name) ?? root.value.querySelector(`[name="${CSS.escape(name)}"]`) ?? void 0;
@@ -128,14 +116,14 @@ var UiIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
128
116
  "data-component": "ui-icon-button",
129
117
  type: "button"
130
118
  }, _ctx.$attrs, {
131
- disabled: hn.attr(props.disabled),
132
- "aria-label": hn.enumerated(props.label),
119
+ disabled: __props.disabled,
120
+ "aria-label": __props.label,
133
121
  "data-ui-icon-button-state": hostState.value || void 0,
134
122
  ref_key: "root",
135
123
  ref: root
136
124
  }), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1);
137
125
  };
138
126
  }
139
- }), [["__scopeId", "data-v-1326805b"]]);
127
+ }), [["__scopeId", "data-v-9ff7e192"]]);
140
128
  //#endregion
141
129
  export { UiIconButton_default as t };