@threadlabs/looma 0.2.5 → 0.2.7

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 (427) hide show
  1. package/dist/chunk-3HMMDK27.js +2914 -0
  2. package/dist/chunk-3K45IWIJ.js +4733 -0
  3. package/dist/chunk-MLKGABMK.js +9 -0
  4. package/dist/declarative-generated.cjs +135 -0
  5. package/dist/declarative-generated.d.cts +10 -0
  6. package/dist/declarative-generated.d.ts +10 -0
  7. package/dist/declarative-generated.js +111 -0
  8. package/dist/declarative.cjs +2942 -0
  9. package/dist/declarative.d.cts +27 -0
  10. package/dist/declarative.d.ts +27 -0
  11. package/dist/declarative.js +13 -0
  12. package/dist/index.cjs +7478 -6457
  13. package/dist/index.d.cts +4 -58
  14. package/dist/index.d.ts +4 -58
  15. package/dist/index.js +15 -27
  16. package/dist/loader.cjs +7652 -0
  17. package/dist/loader.d.cts +4 -0
  18. package/dist/loader.d.ts +4 -0
  19. package/dist/loader.js +16 -0
  20. package/dist/valibot.cjs +31 -0
  21. package/dist/valibot.d.cts +10 -0
  22. package/dist/valibot.d.ts +1 -43
  23. package/dist/valibot.js +2 -0
  24. package/dist/{types/field/validation.d.ts → validation-bxcou-l-.d.cts} +13 -11
  25. package/dist/validation-bxcou-l-.d.ts +58 -0
  26. package/editor/{chunk-B5WVJOPV.js → chunk-BXICJBWS.js} +118 -8
  27. package/editor/{chunk-ZOUKEZ77.js → chunk-JK53ENSG.js} +8 -21
  28. package/editor/chunk-WI7ZA44X.js +2558 -0
  29. package/editor/extensions/index.d.ts +11 -2
  30. package/editor/extensions/index.js +9 -7
  31. package/editor/index.d.ts +1 -1
  32. package/editor/index.js +10 -8
  33. package/editor/ui.js +2 -2
  34. package/editor.css +32 -0
  35. package/layout/index.cjs +466 -400
  36. package/layout/index.d.cts +1 -2
  37. package/layout/index.d.ts +1 -2
  38. package/layout/index.js +471 -395
  39. package/package.json +14 -5
  40. package/vue/chunk-4DPYH3IT.js +3538 -0
  41. package/vue/editor/index.d.ts +17 -7
  42. package/vue/editor/index.js +53 -35
  43. package/vue/index.d.ts +48 -31
  44. package/vue/index.js +1 -1
  45. package/dist/chunk-24OTMNIU.js +0 -1617
  46. package/dist/chunk-D5WRORG6.js +0 -366
  47. package/dist/chunk-HNFCGIBP.js +0 -8
  48. package/dist/chunk-NB6DBRXQ.js +0 -323
  49. package/dist/chunk-OF57X5AR.js +0 -10
  50. package/dist/chunk-TL4FIE7X.js +0 -93
  51. package/dist/chunk-UL7UIUJZ.js +0 -20
  52. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
  53. package/dist/cjs/controlled-state-BFya8rAX.js +0 -9
  54. package/dist/cjs/events-TcQIzpNv.js +0 -19
  55. package/dist/cjs/icons-BAdjrnhS.js +0 -680
  56. package/dist/cjs/id-CYbKpaYr.js +0 -9
  57. package/dist/cjs/index-BHG9Rpil.js +0 -1602
  58. package/dist/cjs/index.cjs.js +0 -2
  59. package/dist/cjs/loader.cjs.js +0 -13
  60. package/dist/cjs/looma.cjs.js +0 -25
  61. package/dist/cjs/manager-Ce25WRtl.js +0 -95
  62. package/dist/cjs/positioning-CCR6ifPj.js +0 -426
  63. package/dist/cjs/ui-affordance-scope.cjs.entry.js +0 -43
  64. package/dist/cjs/ui-avatar-group.cjs.entry.js +0 -43
  65. package/dist/cjs/ui-avatar.cjs.entry.js +0 -50
  66. package/dist/cjs/ui-badge.cjs.entry.js +0 -19
  67. package/dist/cjs/ui-button.cjs.entry.js +0 -75
  68. package/dist/cjs/ui-callout.cjs.entry.js +0 -27
  69. package/dist/cjs/ui-checkbox.cjs.entry.js +0 -97
  70. package/dist/cjs/ui-chip_2.cjs.entry.js +0 -258
  71. package/dist/cjs/ui-combobox.cjs.entry.js +0 -708
  72. package/dist/cjs/ui-context-menu.cjs.entry.js +0 -239
  73. package/dist/cjs/ui-dialog.cjs.entry.js +0 -131
  74. package/dist/cjs/ui-disclosure.cjs.entry.js +0 -112
  75. package/dist/cjs/ui-editable.cjs.entry.js +0 -100
  76. package/dist/cjs/ui-floating-action-button.cjs.entry.js +0 -20
  77. package/dist/cjs/ui-form-field.cjs.entry.js +0 -114
  78. package/dist/cjs/ui-icon-button.cjs.entry.js +0 -23
  79. package/dist/cjs/ui-input.cjs.entry.js +0 -106
  80. package/dist/cjs/ui-menu-item.cjs.entry.js +0 -19
  81. package/dist/cjs/ui-menu.cjs.entry.js +0 -182
  82. package/dist/cjs/ui-popover.cjs.entry.js +0 -135
  83. package/dist/cjs/ui-radio-group.cjs.entry.js +0 -134
  84. package/dist/cjs/ui-radio.cjs.entry.js +0 -94
  85. package/dist/cjs/ui-search-result-row.cjs.entry.js +0 -47
  86. package/dist/cjs/ui-search-shell.cjs.entry.js +0 -39
  87. package/dist/cjs/ui-select.cjs.entry.js +0 -108
  88. package/dist/cjs/ui-switch.cjs.entry.js +0 -74
  89. package/dist/cjs/ui-tabs.cjs.entry.js +0 -118
  90. package/dist/cjs/ui-textarea.cjs.entry.js +0 -110
  91. package/dist/cjs/ui-toast-region.cjs.entry.js +0 -93
  92. package/dist/cjs/ui-top-bar.cjs.entry.js +0 -43
  93. package/dist/cjs/ui-tree-item.cjs.entry.js +0 -135
  94. package/dist/cjs/ui-tree.cjs.entry.js +0 -500
  95. package/dist/collection/collection-manifest.json +0 -45
  96. package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.css +0 -8
  97. package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +0 -70
  98. package/dist/collection/components/ui-avatar/ui-avatar.css +0 -35
  99. package/dist/collection/components/ui-avatar/ui-avatar.js +0 -130
  100. package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +0 -32
  101. package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +0 -95
  102. package/dist/collection/components/ui-badge/ui-badge.css +0 -90
  103. package/dist/collection/components/ui-badge/ui-badge.js +0 -62
  104. package/dist/collection/components/ui-button/ui-button.css +0 -121
  105. package/dist/collection/components/ui-button/ui-button.js +0 -141
  106. package/dist/collection/components/ui-callout/ui-callout.css +0 -74
  107. package/dist/collection/components/ui-callout/ui-callout.js +0 -59
  108. package/dist/collection/components/ui-checkbox/ui-checkbox.css +0 -24
  109. package/dist/collection/components/ui-checkbox/ui-checkbox.js +0 -228
  110. package/dist/collection/components/ui-chip/ui-chip.css +0 -57
  111. package/dist/collection/components/ui-chip/ui-chip.js +0 -67
  112. package/dist/collection/components/ui-combobox/ui-combobox.css +0 -47
  113. package/dist/collection/components/ui-combobox/ui-combobox.js +0 -1295
  114. package/dist/collection/components/ui-context-menu/ui-context-menu.css +0 -34
  115. package/dist/collection/components/ui-context-menu/ui-context-menu.js +0 -311
  116. package/dist/collection/components/ui-dialog/ui-dialog.css +0 -72
  117. package/dist/collection/components/ui-dialog/ui-dialog.js +0 -242
  118. package/dist/collection/components/ui-disclosure/ui-disclosure.css +0 -7
  119. package/dist/collection/components/ui-disclosure/ui-disclosure.js +0 -184
  120. package/dist/collection/components/ui-editable/ui-editable.css +0 -2
  121. package/dist/collection/components/ui-editable/ui-editable.js +0 -196
  122. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.css +0 -73
  123. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +0 -85
  124. package/dist/collection/components/ui-form-field/ui-form-field.css +0 -25
  125. package/dist/collection/components/ui-form-field/ui-form-field.js +0 -180
  126. package/dist/collection/components/ui-icon-button/ui-icon-button.css +0 -145
  127. package/dist/collection/components/ui-icon-button/ui-icon-button.js +0 -128
  128. package/dist/collection/components/ui-input/ui-input.css +0 -48
  129. package/dist/collection/components/ui-input/ui-input.js +0 -217
  130. package/dist/collection/components/ui-menu/ui-menu.css +0 -73
  131. package/dist/collection/components/ui-menu/ui-menu.js +0 -280
  132. package/dist/collection/components/ui-menu-item/ui-menu-item.css +0 -32
  133. package/dist/collection/components/ui-menu-item/ui-menu-item.js +0 -64
  134. package/dist/collection/components/ui-popover/ui-popover.css +0 -58
  135. package/dist/collection/components/ui-popover/ui-popover.js +0 -232
  136. package/dist/collection/components/ui-radio/ui-radio.css +0 -22
  137. package/dist/collection/components/ui-radio/ui-radio.js +0 -226
  138. package/dist/collection/components/ui-radio-group/ui-radio-group.css +0 -10
  139. package/dist/collection/components/ui-radio-group/ui-radio-group.js +0 -247
  140. package/dist/collection/components/ui-search-result-row/ui-search-result-row.css +0 -80
  141. package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +0 -100
  142. package/dist/collection/components/ui-search-shell/ui-search-shell.css +0 -63
  143. package/dist/collection/components/ui-search-shell/ui-search-shell.js +0 -46
  144. package/dist/collection/components/ui-select/ui-select.css +0 -64
  145. package/dist/collection/components/ui-select/ui-select.js +0 -218
  146. package/dist/collection/components/ui-switch/ui-switch.css +0 -63
  147. package/dist/collection/components/ui-switch/ui-switch.js +0 -185
  148. package/dist/collection/components/ui-tabs/ui-tabs.css +0 -68
  149. package/dist/collection/components/ui-tabs/ui-tabs.js +0 -190
  150. package/dist/collection/components/ui-textarea/ui-textarea.css +0 -49
  151. package/dist/collection/components/ui-textarea/ui-textarea.js +0 -241
  152. package/dist/collection/components/ui-toast-region/ui-toast-region.css +0 -59
  153. package/dist/collection/components/ui-toast-region/ui-toast-region.js +0 -126
  154. package/dist/collection/components/ui-tooltip/ui-tooltip.css +0 -43
  155. package/dist/collection/components/ui-tooltip/ui-tooltip.js +0 -430
  156. package/dist/collection/components/ui-top-bar/ui-top-bar.css +0 -51
  157. package/dist/collection/components/ui-top-bar/ui-top-bar.js +0 -52
  158. package/dist/collection/components/ui-tree/ui-tree.css +0 -12
  159. package/dist/collection/components/ui-tree/ui-tree.js +0 -515
  160. package/dist/collection/components/ui-tree-item/ui-tree-item.css +0 -217
  161. package/dist/collection/components/ui-tree-item/ui-tree-item.js +0 -406
  162. package/dist/collection/field/combobox.js +0 -4
  163. package/dist/collection/field/editable.js +0 -1
  164. package/dist/collection/field/multi-combobox.js +0 -1
  165. package/dist/collection/field/valibot.js +0 -5
  166. package/dist/collection/field/validation.js +0 -62
  167. package/dist/collection/icons.js +0 -71
  168. package/dist/collection/input-modality.js +0 -24
  169. package/dist/collection/overlay/manager.js +0 -92
  170. package/dist/collection/overlay/positioning.js +0 -424
  171. package/dist/collection/utils/controlled-state.js +0 -4
  172. package/dist/collection/utils/drag-drop.js +0 -51
  173. package/dist/collection/utils/events.js +0 -13
  174. package/dist/collection/utils/id.js +0 -5
  175. package/dist/collection/utils/initials.js +0 -11
  176. package/dist/components/index.d.ts +0 -102
  177. package/dist/components/index.js +0 -1
  178. package/dist/components/p-6SWSrfmW.js +0 -1
  179. package/dist/components/p-B_DaIVEY.js +0 -1
  180. package/dist/components/p-Bh_1GxOD.js +0 -1
  181. package/dist/components/p-BnGhGgTH.js +0 -1
  182. package/dist/components/p-BzaB_bXo.js +0 -1
  183. package/dist/components/p-C-0syqXZ.js +0 -1
  184. package/dist/components/p-CoFximGM.js +0 -13
  185. package/dist/components/p-JwSoedEO.js +0 -1
  186. package/dist/components/p-Vc4ExHFc.js +0 -1
  187. package/dist/components/p-hgBUJRDa.js +0 -1
  188. package/dist/components/ui-affordance-scope.d.ts +0 -11
  189. package/dist/components/ui-affordance-scope.js +0 -1
  190. package/dist/components/ui-avatar-group.d.ts +0 -11
  191. package/dist/components/ui-avatar-group.js +0 -1
  192. package/dist/components/ui-avatar.d.ts +0 -11
  193. package/dist/components/ui-avatar.js +0 -1
  194. package/dist/components/ui-badge.d.ts +0 -11
  195. package/dist/components/ui-badge.js +0 -1
  196. package/dist/components/ui-button.d.ts +0 -11
  197. package/dist/components/ui-button.js +0 -1
  198. package/dist/components/ui-callout.d.ts +0 -11
  199. package/dist/components/ui-callout.js +0 -1
  200. package/dist/components/ui-checkbox.d.ts +0 -11
  201. package/dist/components/ui-checkbox.js +0 -1
  202. package/dist/components/ui-chip.d.ts +0 -11
  203. package/dist/components/ui-chip.js +0 -1
  204. package/dist/components/ui-combobox.d.ts +0 -11
  205. package/dist/components/ui-combobox.js +0 -1
  206. package/dist/components/ui-context-menu.d.ts +0 -11
  207. package/dist/components/ui-context-menu.js +0 -1
  208. package/dist/components/ui-dialog.d.ts +0 -11
  209. package/dist/components/ui-dialog.js +0 -1
  210. package/dist/components/ui-disclosure.d.ts +0 -11
  211. package/dist/components/ui-disclosure.js +0 -1
  212. package/dist/components/ui-editable.d.ts +0 -11
  213. package/dist/components/ui-editable.js +0 -1
  214. package/dist/components/ui-floating-action-button.d.ts +0 -11
  215. package/dist/components/ui-floating-action-button.js +0 -1
  216. package/dist/components/ui-form-field.d.ts +0 -11
  217. package/dist/components/ui-form-field.js +0 -1
  218. package/dist/components/ui-icon-button.d.ts +0 -11
  219. package/dist/components/ui-icon-button.js +0 -1
  220. package/dist/components/ui-input.d.ts +0 -11
  221. package/dist/components/ui-input.js +0 -1
  222. package/dist/components/ui-menu-item.d.ts +0 -11
  223. package/dist/components/ui-menu-item.js +0 -1
  224. package/dist/components/ui-menu.d.ts +0 -11
  225. package/dist/components/ui-menu.js +0 -1
  226. package/dist/components/ui-popover.d.ts +0 -11
  227. package/dist/components/ui-popover.js +0 -1
  228. package/dist/components/ui-radio-group.d.ts +0 -11
  229. package/dist/components/ui-radio-group.js +0 -1
  230. package/dist/components/ui-radio.d.ts +0 -11
  231. package/dist/components/ui-radio.js +0 -1
  232. package/dist/components/ui-search-result-row.d.ts +0 -11
  233. package/dist/components/ui-search-result-row.js +0 -1
  234. package/dist/components/ui-search-shell.d.ts +0 -11
  235. package/dist/components/ui-search-shell.js +0 -1
  236. package/dist/components/ui-select.d.ts +0 -11
  237. package/dist/components/ui-select.js +0 -1
  238. package/dist/components/ui-switch.d.ts +0 -11
  239. package/dist/components/ui-switch.js +0 -1
  240. package/dist/components/ui-tabs.d.ts +0 -11
  241. package/dist/components/ui-tabs.js +0 -1
  242. package/dist/components/ui-textarea.d.ts +0 -11
  243. package/dist/components/ui-textarea.js +0 -1
  244. package/dist/components/ui-toast-region.d.ts +0 -11
  245. package/dist/components/ui-toast-region.js +0 -1
  246. package/dist/components/ui-tooltip.d.ts +0 -11
  247. package/dist/components/ui-tooltip.js +0 -1
  248. package/dist/components/ui-top-bar.d.ts +0 -11
  249. package/dist/components/ui-top-bar.js +0 -1
  250. package/dist/components/ui-tree-item.d.ts +0 -11
  251. package/dist/components/ui-tree-item.js +0 -1
  252. package/dist/components/ui-tree.d.ts +0 -11
  253. package/dist/components/ui-tree.js +0 -1
  254. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  255. package/dist/esm/controlled-state-BnGhGgTH.js +0 -6
  256. package/dist/esm/events-JwSoedEO.js +0 -15
  257. package/dist/esm/icons-CoFximGM.js +0 -678
  258. package/dist/esm/id-hgBUJRDa.js +0 -7
  259. package/dist/esm/index-8BGiMGQ0.js +0 -1593
  260. package/dist/esm/index.js +0 -1
  261. package/dist/esm/loader.js +0 -11
  262. package/dist/esm/looma.js +0 -21
  263. package/dist/esm/manager-C-0syqXZ.js +0 -91
  264. package/dist/esm/positioning-ZOr-2PSe.js +0 -421
  265. package/dist/esm/ui-affordance-scope.entry.js +0 -41
  266. package/dist/esm/ui-avatar-group.entry.js +0 -41
  267. package/dist/esm/ui-avatar.entry.js +0 -48
  268. package/dist/esm/ui-badge.entry.js +0 -17
  269. package/dist/esm/ui-button.entry.js +0 -73
  270. package/dist/esm/ui-callout.entry.js +0 -25
  271. package/dist/esm/ui-checkbox.entry.js +0 -95
  272. package/dist/esm/ui-chip_2.entry.js +0 -255
  273. package/dist/esm/ui-combobox.entry.js +0 -706
  274. package/dist/esm/ui-context-menu.entry.js +0 -237
  275. package/dist/esm/ui-dialog.entry.js +0 -129
  276. package/dist/esm/ui-disclosure.entry.js +0 -110
  277. package/dist/esm/ui-editable.entry.js +0 -98
  278. package/dist/esm/ui-floating-action-button.entry.js +0 -18
  279. package/dist/esm/ui-form-field.entry.js +0 -112
  280. package/dist/esm/ui-icon-button.entry.js +0 -21
  281. package/dist/esm/ui-input.entry.js +0 -104
  282. package/dist/esm/ui-menu-item.entry.js +0 -17
  283. package/dist/esm/ui-menu.entry.js +0 -180
  284. package/dist/esm/ui-popover.entry.js +0 -133
  285. package/dist/esm/ui-radio-group.entry.js +0 -132
  286. package/dist/esm/ui-radio.entry.js +0 -92
  287. package/dist/esm/ui-search-result-row.entry.js +0 -45
  288. package/dist/esm/ui-search-shell.entry.js +0 -37
  289. package/dist/esm/ui-select.entry.js +0 -106
  290. package/dist/esm/ui-switch.entry.js +0 -72
  291. package/dist/esm/ui-tabs.entry.js +0 -116
  292. package/dist/esm/ui-textarea.entry.js +0 -108
  293. package/dist/esm/ui-toast-region.entry.js +0 -91
  294. package/dist/esm/ui-top-bar.entry.js +0 -41
  295. package/dist/esm/ui-tree-item.entry.js +0 -133
  296. package/dist/esm/ui-tree.entry.js +0 -498
  297. package/dist/index.cjs.js +0 -1
  298. package/dist/looma/index.esm.js +0 -0
  299. package/dist/looma/looma.esm.js +0 -1
  300. package/dist/looma/p-08f80207.entry.js +0 -1
  301. package/dist/looma/p-0b5b8d9e.entry.js +0 -1
  302. package/dist/looma/p-1249a806.entry.js +0 -1
  303. package/dist/looma/p-16e0669d.entry.js +0 -1
  304. package/dist/looma/p-1c00670f.entry.js +0 -1
  305. package/dist/looma/p-1c5a7522.entry.js +0 -1
  306. package/dist/looma/p-22842f8c.entry.js +0 -1
  307. package/dist/looma/p-2915d5c0.entry.js +0 -1
  308. package/dist/looma/p-3b2961a6.entry.js +0 -1
  309. package/dist/looma/p-3f60f4c8.entry.js +0 -1
  310. package/dist/looma/p-424d6719.entry.js +0 -1
  311. package/dist/looma/p-4caccfce.entry.js +0 -1
  312. package/dist/looma/p-5fdcee1d.entry.js +0 -1
  313. package/dist/looma/p-6d8b99ee.entry.js +0 -1
  314. package/dist/looma/p-6f20d470.entry.js +0 -1
  315. package/dist/looma/p-7c0b5364.entry.js +0 -1
  316. package/dist/looma/p-8BGiMGQ0.js +0 -2
  317. package/dist/looma/p-8bdd9495.entry.js +0 -1
  318. package/dist/looma/p-99116a72.entry.js +0 -1
  319. package/dist/looma/p-9cfbf722.entry.js +0 -1
  320. package/dist/looma/p-9d2662ca.entry.js +0 -1
  321. package/dist/looma/p-9ff2fa19.entry.js +0 -1
  322. package/dist/looma/p-BnGhGgTH.js +0 -1
  323. package/dist/looma/p-C-0syqXZ.js +0 -1
  324. package/dist/looma/p-CoFximGM.js +0 -13
  325. package/dist/looma/p-DQuL1Twl.js +0 -1
  326. package/dist/looma/p-JwSoedEO.js +0 -1
  327. package/dist/looma/p-ZOr-2PSe.js +0 -1
  328. package/dist/looma/p-a2dd4c6c.entry.js +0 -1
  329. package/dist/looma/p-add67e4c.entry.js +0 -1
  330. package/dist/looma/p-b6ede6bb.entry.js +0 -1
  331. package/dist/looma/p-b76e2111.entry.js +0 -1
  332. package/dist/looma/p-ca2a54fd.entry.js +0 -1
  333. package/dist/looma/p-d372b0db.entry.js +0 -1
  334. package/dist/looma/p-d4825822.entry.js +0 -1
  335. package/dist/looma/p-d56571a2.entry.js +0 -1
  336. package/dist/looma/p-d5c3954f.entry.js +0 -1
  337. package/dist/looma/p-e604e906.entry.js +0 -1
  338. package/dist/looma/p-f1f7c5cb.entry.js +0 -1
  339. package/dist/looma/p-hgBUJRDa.js +0 -1
  340. package/dist/types/components/ui-affordance-scope/ui-affordance-scope.d.ts +0 -11
  341. package/dist/types/components/ui-avatar/ui-avatar.d.ts +0 -11
  342. package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +0 -11
  343. package/dist/types/components/ui-badge/ui-badge.d.ts +0 -5
  344. package/dist/types/components/ui-button/ui-button.d.ts +0 -13
  345. package/dist/types/components/ui-callout/ui-callout.d.ts +0 -6
  346. package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +0 -20
  347. package/dist/types/components/ui-chip/ui-chip.d.ts +0 -8
  348. package/dist/types/components/ui-combobox/ui-combobox.d.ts +0 -128
  349. package/dist/types/components/ui-context-menu/ui-context-menu.d.ts +0 -43
  350. package/dist/types/components/ui-dialog/ui-dialog.d.ts +0 -27
  351. package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +0 -21
  352. package/dist/types/components/ui-editable/ui-editable.d.ts +0 -24
  353. package/dist/types/components/ui-floating-action-button/ui-floating-action-button.d.ts +0 -6
  354. package/dist/types/components/ui-form-field/ui-form-field.d.ts +0 -18
  355. package/dist/types/components/ui-icon-button/ui-icon-button.d.ts +0 -9
  356. package/dist/types/components/ui-input/ui-input.d.ts +0 -19
  357. package/dist/types/components/ui-menu/ui-menu.d.ts +0 -28
  358. package/dist/types/components/ui-menu-item/ui-menu-item.d.ts +0 -5
  359. package/dist/types/components/ui-popover/ui-popover.d.ts +0 -26
  360. package/dist/types/components/ui-radio/ui-radio.d.ts +0 -20
  361. package/dist/types/components/ui-radio-group/ui-radio-group.d.ts +0 -21
  362. package/dist/types/components/ui-search-result-row/ui-search-result-row.d.ts +0 -15
  363. package/dist/types/components/ui-search-shell/ui-search-shell.d.ts +0 -9
  364. package/dist/types/components/ui-select/ui-select.d.ts +0 -20
  365. package/dist/types/components/ui-switch/ui-switch.d.ts +0 -16
  366. package/dist/types/components/ui-tabs/ui-tabs.d.ts +0 -18
  367. package/dist/types/components/ui-textarea/ui-textarea.d.ts +0 -20
  368. package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +0 -16
  369. package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +0 -57
  370. package/dist/types/components/ui-top-bar/ui-top-bar.d.ts +0 -12
  371. package/dist/types/components/ui-tree/ui-tree.d.ts +0 -53
  372. package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +0 -44
  373. package/dist/types/components.d.ts +0 -1889
  374. package/dist/types/field/combobox.d.ts +0 -46
  375. package/dist/types/field/editable.d.ts +0 -5
  376. package/dist/types/field/multi-combobox.d.ts +0 -11
  377. package/dist/types/field/valibot.d.ts +0 -7
  378. package/dist/types/icons.d.ts +0 -53
  379. package/dist/types/input-modality.d.ts +0 -6
  380. package/dist/types/overlay/manager.d.ts +0 -17
  381. package/dist/types/overlay/positioning.d.ts +0 -74
  382. package/dist/types/stencil-public-runtime.d.ts +0 -1860
  383. package/dist/types/utils/controlled-state.d.ts +0 -4
  384. package/dist/types/utils/drag-drop.d.ts +0 -15
  385. package/dist/types/utils/events.d.ts +0 -4
  386. package/dist/types/utils/id.d.ts +0 -1
  387. package/dist/types/utils/initials.d.ts +0 -1
  388. package/dist/ui-affordance-scope.entry-L6TIXYOP.js +0 -54
  389. package/dist/ui-avatar-group.entry-TCAA6P72.js +0 -51
  390. package/dist/ui-avatar.entry-52DQ7VXA.js +0 -51
  391. package/dist/ui-badge.entry-2XCAA6LL.js +0 -22
  392. package/dist/ui-button.entry-MNFBMNSX.js +0 -83
  393. package/dist/ui-callout.entry-SSHT5TH2.js +0 -32
  394. package/dist/ui-checkbox.entry-LOWIWIWI.js +0 -111
  395. package/dist/ui-chip_2.entry-BIMTSF6C.js +0 -272
  396. package/dist/ui-combobox.entry-25Z4MN7N.js +0 -717
  397. package/dist/ui-context-menu.entry-YZDL5Y4M.js +0 -248
  398. package/dist/ui-dialog.entry-HIXZX5AB.js +0 -146
  399. package/dist/ui-disclosure.entry-2JZHZNDQ.js +0 -126
  400. package/dist/ui-editable.entry-U3VR3XPT.js +0 -110
  401. package/dist/ui-floating-action-button.entry-6S3QN3KJ.js +0 -23
  402. package/dist/ui-form-field.entry-GQOSMLHT.js +0 -120
  403. package/dist/ui-icon-button.entry-QJXKVDM6.js +0 -26
  404. package/dist/ui-input.entry-UWMQ6JMP.js +0 -114
  405. package/dist/ui-menu-item.entry-NHNZKKJS.js +0 -22
  406. package/dist/ui-menu.entry-D53RUJND.js +0 -192
  407. package/dist/ui-popover.entry-7ZSIWCFQ.js +0 -152
  408. package/dist/ui-radio-group.entry-37MSYIH4.js +0 -142
  409. package/dist/ui-radio.entry-7YGCDHXT.js +0 -108
  410. package/dist/ui-search-result-row.entry-6FCCLGAS.js +0 -50
  411. package/dist/ui-search-shell.entry-HSBEXPER.js +0 -41
  412. package/dist/ui-select.entry-GIDIAYRD.js +0 -117
  413. package/dist/ui-switch.entry-MYAL6XPC.js +0 -87
  414. package/dist/ui-tabs.entry-R4TEXQSD.js +0 -128
  415. package/dist/ui-textarea.entry-FW32JNDV.js +0 -119
  416. package/dist/ui-toast-region.entry-BTMFPKZF.js +0 -104
  417. package/dist/ui-top-bar.entry-5DQGJF3B.js +0 -49
  418. package/dist/ui-tree-item.entry-ADT7DSOS.js +0 -145
  419. package/dist/ui-tree.entry-7PYQ5RIN.js +0 -470
  420. package/editor/chunk-64GLF274.js +0 -1271
  421. package/layout/index.css +0 -387
  422. package/loader/cdn.js +0 -1
  423. package/loader/index.cjs.js +0 -1
  424. package/loader/index.d.ts +0 -24
  425. package/loader/index.es2017.js +0 -1
  426. package/loader/index.js +0 -2
  427. package/vue/chunk-ROMBQS2L.js +0 -352
@@ -1,108 +0,0 @@
1
- import { r as registerInstance, g as getElement, h, H as Host } from './index-8BGiMGQ0.js';
2
- import { d as dispatchDetail, e as eventToTrigger } from './events-JwSoedEO.js';
3
-
4
- const uiTextareaCss = () => `:host{display:inline-flex;min-inline-size:0;color:var(--ui-text-primary)}::slotted(textarea){width:100%;appearance:none;border:1px solid var(--ui-control-border, var(--ui-border-default));border-radius:var(--ui-radius-2);background:var(--ui-control-surface, var(--ui-surface-default));color:inherit;font:inherit;line-height:var(--ui-line-height-md);min-block-size:calc(var(--ui-space-12, 3rem) * 2);padding:var(--ui-space-2) var(--ui-space-3);margin:0;resize:vertical;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(textarea:hover:not(:focus):not(:disabled)){border-color:var(--ui-control-border-hover, var(--ui-border-strong))}::slotted(textarea:focus){border-color:var(--ui-control-focus, var(--ui-focus-ring));box-shadow:0 0 0 3px var(--ui-control-focus-halo, var(--ui-accent-soft))}:host([data-invalid='true'])::slotted(textarea),::slotted(textarea[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(textarea:disabled){background:var(--ui-control-surface-disabled, var(--ui-surface-muted));color:var(--ui-text-muted);cursor:not-allowed}::slotted(textarea:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
5
-
6
- const UITextarea = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- }
10
- get host() { return getElement(this); }
11
- value;
12
- defaultValue = '';
13
- disabled = false;
14
- invalid = false;
15
- readOnly = false;
16
- rows = 4;
17
- internalValue = '';
18
- slotRef;
19
- syncFromProp() {
20
- if (this.value !== undefined)
21
- this.internalValue = this.value;
22
- }
23
- syncToTextarea() {
24
- const textarea = this.getTextarea();
25
- if (!textarea)
26
- return;
27
- this.host.dataset.invalid = this.invalid ? 'true' : '';
28
- // An omitted host value leaves the slotted textarea under framework or
29
- // native-form control instead of resetting it during component updates.
30
- if (this.value !== undefined)
31
- textarea.value = this.internalValue;
32
- textarea.defaultValue = this.defaultValue;
33
- textarea.disabled = this.disabled;
34
- textarea.readOnly = this.readOnly;
35
- textarea.rows = this.rows;
36
- textarea.setAttribute('aria-invalid', this.invalid ? 'true' : 'false');
37
- }
38
- componentDidLoad() {
39
- this.syncFromProp();
40
- this.slotRef?.addEventListener('slotchange', () => this.syncToTextarea());
41
- this.syncToTextarea();
42
- const textarea = this.getTextarea();
43
- textarea?.addEventListener('input', this.onInput);
44
- textarea?.addEventListener('change', this.onChange);
45
- }
46
- disconnectedCallback() {
47
- const textarea = this.getTextarea();
48
- textarea?.removeEventListener('input', this.onInput);
49
- textarea?.removeEventListener('change', this.onChange);
50
- }
51
- componentDidUpdate() {
52
- this.syncToTextarea();
53
- }
54
- getTextarea() {
55
- const slot = this.host.shadowRoot?.querySelector('slot');
56
- const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
57
- return nodes.find((el) => el.tagName === 'TEXTAREA') ?? null;
58
- }
59
- onInput = (e) => {
60
- const textarea = e.target;
61
- if (!textarea)
62
- return;
63
- this.internalValue = textarea.value;
64
- dispatchDetail(this.host, 'input', {
65
- value: this.internalValue,
66
- trigger: eventToTrigger(e),
67
- });
68
- };
69
- onChange = (e) => {
70
- const textarea = this.getTextarea();
71
- if (!textarea)
72
- return;
73
- this.internalValue = textarea.value;
74
- dispatchDetail(this.host, 'change', {
75
- value: this.internalValue,
76
- trigger: eventToTrigger(e),
77
- });
78
- };
79
- render() {
80
- return (h(Host, { key: 'a554edb1a0ef40a2c116e3064e52af7474e065e4', "data-invalid": this.invalid ? '' : undefined }, h("slot", { key: 'a4eb8034ec11f8b3b06ace7287410fd839004593', ref: (el) => (this.slotRef = el) })));
81
- }
82
- static get watchers() { return {
83
- "value": [{
84
- "syncFromProp": 0
85
- }],
86
- "internalValue": [{
87
- "syncToTextarea": 0
88
- }],
89
- "defaultValue": [{
90
- "syncToTextarea": 0
91
- }],
92
- "disabled": [{
93
- "syncToTextarea": 0
94
- }],
95
- "invalid": [{
96
- "syncToTextarea": 0
97
- }],
98
- "readOnly": [{
99
- "syncToTextarea": 0
100
- }],
101
- "rows": [{
102
- "syncToTextarea": 0
103
- }]
104
- }; }
105
- };
106
- UITextarea.style = uiTextareaCss();
107
-
108
- export { UITextarea as ui_textarea };
@@ -1,91 +0,0 @@
1
- import { r as registerInstance, g as getElement, h, H as Host } from './index-8BGiMGQ0.js';
2
- import { d as dispatchDetail, e as eventToTrigger } from './events-JwSoedEO.js';
3
- import { b as createViewportSurface } from './positioning-ZOr-2PSe.js';
4
-
5
- const uiToastRegionCss = () => `:host{position:fixed;top:calc(var(--ui-space-4) + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:9999;display:grid;gap:var(--ui-space-2);inline-size:min(24rem, calc(100vw - (var(--ui-space-4) * 2)));max-inline-size:100%;pointer-events:none}:host([popover]){right:auto;bottom:auto;margin:0}:host>*{pointer-events:auto}::slotted([data-ui-toast]){display:grid;grid-template-columns:1fr auto;gap:var(--ui-space-2);align-items:start;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);padding:var(--ui-space-3) var(--ui-space-4);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-lg);animation:ui-toast-enter 0.25s var(--ui-motion-ease) forwards}@keyframes ui-toast-enter{from{opacity:0;transform:translateY(-0.5rem)}to{opacity:1;transform:translateY(0)}}::slotted([data-ui-toast][aria-hidden='true']){display:none}::slotted([data-ui-toast-dismiss]){border:0;background:transparent;color:var(--ui-text-secondary);cursor:pointer;font:inherit}`;
6
-
7
- const UIToastRegion = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- }
11
- get host() { return getElement(this); }
12
- open = true;
13
- internalOpen = false;
14
- surface = null;
15
- contentObserver = null;
16
- pendingDismiss = null;
17
- syncFromProp() {
18
- this.syncContents();
19
- }
20
- syncSurface() {
21
- if (this.internalOpen)
22
- this.surface?.show();
23
- else
24
- this.surface?.hide();
25
- }
26
- componentDidLoad() {
27
- this.surface = createViewportSurface(this.host);
28
- this.contentObserver = new MutationObserver(this.syncContents);
29
- this.contentObserver.observe(this.host, { childList: true, subtree: true });
30
- this.syncContents();
31
- this.syncSurface();
32
- this.host.addEventListener('click', this.onClick);
33
- }
34
- disconnectedCallback() {
35
- this.host.removeEventListener('click', this.onClick);
36
- this.contentObserver?.disconnect();
37
- this.contentObserver = null;
38
- this.surface?.destroy();
39
- this.surface = null;
40
- }
41
- getToasts() {
42
- return Array.from(this.host.querySelectorAll('[data-ui-toast]'));
43
- }
44
- syncContents = () => {
45
- const nextOpen = this.open && this.getToasts().length > 0;
46
- const wasOpen = this.internalOpen;
47
- const completedDismiss = this.pendingDismiss && !this.host.contains(this.pendingDismiss.toast)
48
- ? this.pendingDismiss
49
- : null;
50
- this.internalOpen = nextOpen;
51
- if (wasOpen && !nextOpen && completedDismiss) {
52
- dispatchDetail(this.host, 'close', {
53
- open: false,
54
- reason: 'action',
55
- trigger: completedDismiss.trigger,
56
- });
57
- }
58
- if (completedDismiss || !this.open)
59
- this.pendingDismiss = null;
60
- };
61
- onClick = (e) => {
62
- const dismissBtn = e.target.closest?.('[data-ui-toast-dismiss]');
63
- if (!dismissBtn)
64
- return;
65
- const toast = dismissBtn.closest?.('[data-ui-toast]');
66
- if (!toast)
67
- return;
68
- const id = toast.id ?? '';
69
- const trigger = eventToTrigger(e);
70
- this.pendingDismiss = { toast: toast, trigger };
71
- dispatchDetail(this.host, 'dismiss', {
72
- id,
73
- reason: 'action',
74
- trigger,
75
- });
76
- };
77
- render() {
78
- return (h(Host, { key: '9f9c2e14150c631c0f7cb427c693dcd52c20897d', role: "region", "aria-label": "Notifications", "aria-live": "polite", "data-open": this.internalOpen ? '' : undefined }, h("slot", { key: '9e1d9ebb6b587afab2c4302241cecb03a321cee1' })));
79
- }
80
- static get watchers() { return {
81
- "open": [{
82
- "syncFromProp": 0
83
- }],
84
- "internalOpen": [{
85
- "syncSurface": 0
86
- }]
87
- }; }
88
- };
89
- UIToastRegion.style = uiToastRegionCss();
90
-
91
- export { UIToastRegion as ui_toast_region };
@@ -1,41 +0,0 @@
1
- import { r as registerInstance, g as getElement, h, H as Host } from './index-8BGiMGQ0.js';
2
-
3
- const uiTopBarCss = () => `:host{position:sticky;inset-block-start:0;z-index:var(--ui-top-bar-z-index, 100);display:block}.top-bar{min-block-size:calc(var(--ui-top-bar-height, 56px) + env(safe-area-inset-top));display:flex;align-items:center;gap:var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));padding-block-start:env(safe-area-inset-top);padding-inline-start:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-left) );padding-inline-end:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-right) );background:var(--ui-top-bar-bg, var(--ui-surface, #ffffff));border-block-end:1px solid var(--ui-top-bar-border, var(--ui-border, #e5e7eb))}.top-bar__leading,.top-bar__search,.top-bar__actions{display:flex;align-items:center;flex-shrink:0}.top-bar__actions{gap:var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem))}.top-bar__title{min-inline-size:0;flex:1}[hidden]{display:none}@media (min-width: 768px){:host{display:none}}`;
4
-
5
- function slotHasContent(slot) {
6
- if (!slot) {
7
- return false;
8
- }
9
- return slot.assignedNodes({ flatten: true }).some((node) => {
10
- if (node.nodeType === Node.TEXT_NODE) {
11
- return Boolean(node.textContent?.trim());
12
- }
13
- return true;
14
- });
15
- }
16
- const UITopBar = class {
17
- constructor(hostRef) {
18
- registerInstance(this, hostRef);
19
- }
20
- get host() { return getElement(this); }
21
- hasLeading = false;
22
- hasSearch = false;
23
- hasActions = false;
24
- leadingSlot;
25
- searchSlot;
26
- actionsSlot;
27
- componentDidLoad() {
28
- this.syncSlots();
29
- }
30
- syncSlots = () => {
31
- this.hasLeading = slotHasContent(this.leadingSlot);
32
- this.hasSearch = slotHasContent(this.searchSlot);
33
- this.hasActions = slotHasContent(this.actionsSlot);
34
- };
35
- render() {
36
- return (h(Host, { key: '1ef941e211c9536c034a40c0f7a255068595de10' }, h("header", { key: 'f1ea465d17753224d72971d26f70b546b93de8ba', class: "top-bar", part: "base" }, h("div", { key: '4eab975109467ad41e16527102b31e6e6d7421c8', class: "top-bar__leading", hidden: !this.hasLeading }, h("slot", { key: '3388d0e2346de4c08d85dd4c3a998e5f668a05f6', name: "leading", ref: (el) => (this.leadingSlot = el), onSlotchange: this.syncSlots })), h("div", { key: '7b176d6e82da08eb495f3ca2c83505327c21f525', class: "top-bar__title" }, h("slot", { key: '8196e5489d2f43a72f794aad8ceaa44c358810e9' })), h("div", { key: '2b29c72174559865fb01b99cfab830f74640a8a5', class: "top-bar__search", hidden: !this.hasSearch }, h("slot", { key: '9597fde0cf05821e641471343a38dd3190f1e18f', name: "search", ref: (el) => (this.searchSlot = el), onSlotchange: this.syncSlots })), h("div", { key: '1f19003e43fb28ac4ff4debd27e1a0fa9f342275', class: "top-bar__actions", hidden: !this.hasActions }, h("slot", { key: 'f6a84824d2806dc16b5fa82cc25dc1247a6a8ad1', name: "actions", ref: (el) => (this.actionsSlot = el), onSlotchange: this.syncSlots })))));
37
- }
38
- };
39
- UITopBar.style = uiTopBarCss();
40
-
41
- export { UITopBar as ui_top_bar };
@@ -1,133 +0,0 @@
1
- import { r as registerInstance, g as getElement, h, H as Host } from './index-8BGiMGQ0.js';
2
- import { d as dispatchDetail, e as eventToTrigger } from './events-JwSoedEO.js';
3
- import { l as loomaIconMarkup } from './icons-CoFximGM.js';
4
-
5
- const uiTreeItemCss = () => `:host{--ui-tree-indent:16px;--ui-tree-row-min-height:32px;--ui-tree-drop-color:var(--ui-accent-solid);position:relative;display:block;min-inline-size:0;margin-inline-start:calc(var(--ui-tree-item-depth, 0) * var(--ui-tree-indent))}.row{position:relative;display:grid;grid-template-columns:20px auto minmax(0, 1fr) auto;align-items:center;min-block-size:var(--ui-tree-row-min-height);min-inline-size:0;font-size:var(--ui-tree-font-size, var(--ui-font-size-ui, 0.9375rem));border-radius:var(--ui-radius-md);color:var(--ui-text-secondary);transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), opacity var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), min-block-size var(--ui-motion-base) var(--ui-motion-ease)}.row:hover,:host([data-selected]) .row,.row:focus-within{color:var(--ui-text-primary);background:var(--ui-surface-muted)}:host([data-disabled]) .row{opacity:0.55}:host([data-dragging]) .row{opacity:0.42}:host(:focus){outline:none}:host(:focus-visible) .row{box-shadow:0 0 0 2px var(--ui-focus-ring)}:host([data-drop-position='inside']) .row{background:var(--ui-accent-subtle);box-shadow:inset 0 0 0 1px var(--ui-tree-drop-color)}.disclosure,.disclosure-spacer{grid-column:1;grid-row:1;inline-size:20px;block-size:28px}.disclosure{display:grid;place-items:center;padding:0;color:var(--ui-text-muted);background:transparent;border:0;border-radius:var(--ui-radius-sm);cursor:pointer}.disclosure:hover{color:var(--ui-text-primary);background:var(--ui-surface-elevated)}.disclosure-icon{display:block;inline-size:14px;block-size:14px;transform:rotate(-90deg);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}.disclosure-icon--expanded{transform:rotate(0deg)}.disclosure-icon :is(svg),.drag-handle :is(svg){display:block;inline-size:100%;block-size:100%}.leading{display:none}.leading:has(*){display:inline-grid;place-items:center;grid-column:2;grid-row:1;inline-size:16px;block-size:16px;margin-inline-start:var(--ui-space-1)}.label{grid-column:3;grid-row:1;min-inline-size:0;padding:var(--ui-space-1) var(--ui-space-2)}.actions{grid-column:4;grid-row:1;display:inline-flex;align-items:center;min-inline-size:0}.drag-handle{position:absolute;z-index:2;inset-block-start:50%;inset-inline-start:-22px;inline-size:20px;block-size:32px;display:grid;place-items:center;padding:7px 3px;color:var(--ui-text-muted);background:var(--ui-surface-elevated);border:1px solid transparent;border-radius:var(--ui-radius-sm);cursor:grab;opacity:0;pointer-events:none;transform:translateY(-50%);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease)}.row:hover .drag-handle,.drag-handle:focus-visible,:host([data-dragging]) .drag-handle{opacity:1;pointer-events:auto}.drag-handle:active{cursor:grabbing}.drop-indicator{position:absolute;z-index:3;inset-inline:1px;display:none;block-size:2px;border-radius:999px;background:var(--ui-tree-drop-color);pointer-events:none}.drop-indicator::before,.drop-indicator::after{content:'';position:absolute;inset-block-start:50%;inline-size:7px;block-size:7px;border:2px solid var(--ui-tree-drop-color);border-radius:999px;background:var(--ui-surface-elevated);transform:translateY(-50%)}.drop-indicator::before{inset-inline-start:-1px}.drop-indicator::after{inset-inline-end:-1px}:host([data-drop-position='before']) .row-drop-indicator{display:block;inset-block-start:-1px}:host([data-drop-position='after']) .subtree-drop-indicator{display:block;inset-block-end:-1px}.children[hidden]{display:none}:host-context(html[data-ui-input-modality='touch']){--ui-tree-row-min-height:44px}:host-context(html[data-ui-input-modality='touch']) .drag-handle{display:none}@media (prefers-reduced-motion: reduce){.row,.disclosure-icon,.drag-handle{transition:none}}`;
6
-
7
- const UITreeItem = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- }
11
- get host() { return getElement(this); }
12
- /** Stable application identifier emitted by tree interaction events. */
13
- itemId = '';
14
- /** Accessible name used by the disclosure and drag handle. */
15
- label = '';
16
- /** Application hierarchy depth override used for drop constraints. Defaults to structural nesting. */
17
- dropDepth;
18
- /** Virtualized-tree descendant-depth override for the tree's max-depth drop constraint. */
19
- subtreeDepth;
20
- /** Whether this item accepts children and exposes disclosure behavior. */
21
- container = false;
22
- /** Whether this item participates in pointer drag and drop. */
23
- sortable = false;
24
- /** Application-defined kind used to reject incompatible sibling drops. */
25
- dragType = 'item';
26
- /** Application-defined parent/list identity included with reorder events. */
27
- dropScope = '';
28
- /** Comma-separated drag kinds accepted as children. Empty accepts every kind. */
29
- accepts = '';
30
- /** Controlled expansion value. When omitted, `default-expanded` initializes uncontrolled state. */
31
- expanded;
32
- /** Initial uncontrolled expansion value. */
33
- defaultExpanded = false;
34
- selected = false;
35
- disabled = false;
36
- internalExpanded = false;
37
- structuralLevel = 1;
38
- tabStop = false;
39
- syncExpandedFromProp() {
40
- // A defined prop owns the rendered state; clearing it resumes the current
41
- // uncontrolled state instead of replaying the initial default.
42
- if (this.expanded !== undefined)
43
- this.internalExpanded = this.expanded;
44
- }
45
- componentWillLoad() {
46
- this.internalExpanded = this.expanded ?? this.defaultExpanded;
47
- this.updateStructuralLevel();
48
- }
49
- connectedCallback() {
50
- this.host.addEventListener('ui-tree-auto-expand', this.onAutoExpand);
51
- this.host.addEventListener('ui-tree-structure-sync', this.updateStructuralLevel);
52
- this.host.addEventListener('ui-tree-roving-tab-stop', this.onRovingTabStop);
53
- this.host.addEventListener('ui-tree-request-expanded', this.onExpansionRequest);
54
- }
55
- disconnectedCallback() {
56
- this.host.removeEventListener('ui-tree-auto-expand', this.onAutoExpand);
57
- this.host.removeEventListener('ui-tree-structure-sync', this.updateStructuralLevel);
58
- this.host.removeEventListener('ui-tree-roving-tab-stop', this.onRovingTabStop);
59
- this.host.removeEventListener('ui-tree-request-expanded', this.onExpansionRequest);
60
- }
61
- updateStructuralLevel = () => {
62
- const tree = this.host.closest('ui-tree');
63
- let ancestor = this.host.parentElement?.closest('ui-tree-item') ?? null;
64
- let level = 1;
65
- while (ancestor && tree?.contains(ancestor)) {
66
- level += 1;
67
- ancestor = ancestor.parentElement?.closest('ui-tree-item') ?? null;
68
- }
69
- if (this.structuralLevel !== level)
70
- this.structuralLevel = level;
71
- };
72
- setExpanded(expanded, trigger) {
73
- const current = this.isExpanded();
74
- if (!this.container || this.disabled || current === expanded)
75
- return;
76
- if (this.expanded === undefined)
77
- this.internalExpanded = expanded;
78
- dispatchDetail(this.host, 'expand', { id: this.itemId, expanded, trigger });
79
- this.host.dispatchEvent(new CustomEvent('ui-tree-expansion-change'));
80
- }
81
- isExpanded() {
82
- return this.expanded ?? this.internalExpanded;
83
- }
84
- onAutoExpand = () => {
85
- this.setExpanded(true, 'pointer');
86
- };
87
- onRovingTabStop = (event) => {
88
- this.tabStop = Boolean(event.detail?.active) && !this.disabled;
89
- };
90
- onExpansionRequest = (event) => {
91
- const detail = event.detail;
92
- if (typeof detail?.expanded === 'boolean')
93
- this.setExpanded(detail.expanded, detail.trigger ?? 'keyboard');
94
- };
95
- onDisclosureClick = (event) => {
96
- event.stopPropagation();
97
- this.setExpanded(!this.isExpanded(), eventToTrigger(event));
98
- };
99
- onDisclosureKeydown = (event) => {
100
- if (event.key !== 'ArrowRight' && event.key !== 'ArrowLeft')
101
- return;
102
- event.preventDefault();
103
- event.stopPropagation();
104
- this.setExpanded(event.key === 'ArrowRight', 'keyboard');
105
- };
106
- onRowClick = (event) => {
107
- if (!this.container || this.disabled)
108
- return;
109
- const path = event.composedPath();
110
- const interactive = path.some((node) => node instanceof HTMLElement && (node.matches('a, button, input, select, textarea, [role="button"], [role="link"]')
111
- || node.getAttribute('slot') === 'actions'));
112
- if (!interactive)
113
- this.setExpanded(!this.isExpanded(), eventToTrigger(event));
114
- };
115
- render() {
116
- const level = this.structuralLevel;
117
- const expanded = this.isExpanded();
118
- const disclosureLabel = `${expanded ? 'Collapse' : 'Expand'} ${this.label || 'item'}`;
119
- const dragLabel = `Drag ${this.label || 'item'} to reorder`;
120
- return (h(Host, { key: '0ce6384903be2181055c76808cd4664dcfa8de54', role: "treeitem", "aria-label": this.label || undefined, "aria-level": String(level), "aria-expanded": this.container ? String(expanded) : undefined, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "data-container": this.container ? '' : undefined, "data-selected": this.selected ? '' : undefined, "data-disabled": this.disabled ? '' : undefined, "data-drag-type": this.dragType || 'item', "data-drop-scope": this.dropScope || undefined, "data-accepts": this.accepts || undefined, tabIndex: this.disabled || !this.tabStop ? -1 : 0, style: {
121
- '--ui-tree-item-depth': String(level - 1),
122
- 'margin-inline-start': level > 1 ? 'var(--ui-tree-indent, 16px)' : '0px',
123
- } }, h("div", { key: '7d6923da8fd8be7fffc7cf345ac4d1211217c21a', class: "row", part: "row", onClick: this.onRowClick }, this.sortable && !this.disabled ? (h("button", { class: "drag-handle", part: "drag-handle", type: "button", draggable: true, "aria-label": dragLabel, title: dragLabel }, h("span", { innerHTML: loomaIconMarkup('grip-vertical') }))) : null, this.container ? (h("button", { class: "disclosure", part: "disclosure", type: "button", "aria-label": disclosureLabel, "aria-expanded": String(expanded), disabled: this.disabled, onClick: this.onDisclosureClick, onKeyDown: this.onDisclosureKeydown }, h("span", { class: { 'disclosure-icon': true, 'disclosure-icon--expanded': expanded }, innerHTML: loomaIconMarkup('chevron-down') }))) : h("span", { class: "disclosure-spacer", "aria-hidden": "true" }), h("span", { key: 'ef8959fc858b90c7ea26c8ff740cfe02fb372686', class: "leading", part: "leading" }, h("slot", { key: '1e00da2acd23ae6430e38b26502d9f3951461c93', name: "leading" })), h("span", { key: 'f37a63aa0c6e73f134442589314fae01e01cf782', class: "label", part: "label" }, h("slot", { key: 'f527d8a33927d72502d5cbbbe0cb5739d7bdbaf2' })), h("span", { key: 'de6492f81ac5747d913132c275abb9157d18deab', class: "actions", part: "actions" }, h("slot", { key: 'f5316e3a5fb67130ef1401253dc5ef6b7072840e', name: "actions" })), h("span", { key: '89da3b2bab7a953368810319148a644e62bc9a47', class: "drop-indicator row-drop-indicator", part: "drop-indicator", "aria-hidden": "true" })), this.container ? (h("div", { class: "children", part: "children", role: "group", hidden: !expanded }, h("slot", { name: "children" }))) : null, h("span", { key: '9a66f1ba72290a037ef02ccbd49243463ba34b67', class: "drop-indicator subtree-drop-indicator", part: "drop-indicator", "aria-hidden": "true" })));
124
- }
125
- static get watchers() { return {
126
- "expanded": [{
127
- "syncExpandedFromProp": 0
128
- }]
129
- }; }
130
- };
131
- UITreeItem.style = uiTreeItemCss();
132
-
133
- export { UITreeItem as ui_tree_item };