@threadlabs/looma 0.1.22 → 0.1.24

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 (326) hide show
  1. package/dist/chunk-HNFCGIBP.js +8 -0
  2. package/dist/{chunk-NIPNHZ5W.js → chunk-IMHSPETJ.js} +65 -31
  3. package/dist/chunk-NB6DBRXQ.js +323 -0
  4. package/dist/{chunk-SZJQ3NPX.js → chunk-TL4FIE7X.js} +4 -8
  5. package/dist/cjs/controlled-state-BFya8rAX.js +9 -0
  6. package/dist/cjs/icons-BAdjrnhS.js +680 -0
  7. package/dist/cjs/{index-D07f6BOw.js → index-BHG9Rpil.js} +33 -0
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/cjs/looma.cjs.js +2 -2
  10. package/dist/cjs/{manager-C9j3HZay.js → manager-Ce25WRtl.js} +6 -7
  11. package/dist/cjs/ui-affordance-scope.cjs.entry.js +2 -2
  12. package/dist/cjs/ui-avatar-group.cjs.entry.js +10 -18
  13. package/dist/cjs/ui-avatar.cjs.entry.js +3 -3
  14. package/dist/cjs/ui-badge.cjs.entry.js +3 -3
  15. package/dist/cjs/ui-button.cjs.entry.js +16 -5
  16. package/dist/cjs/ui-callout.cjs.entry.js +27 -0
  17. package/dist/cjs/ui-checkbox.cjs.entry.js +14 -8
  18. package/dist/cjs/ui-chip.cjs.entry.js +19 -0
  19. package/dist/cjs/ui-combobox.cjs.entry.js +541 -0
  20. package/dist/cjs/ui-context-menu.cjs.entry.js +3 -3
  21. package/dist/cjs/ui-dialog.cjs.entry.js +46 -10
  22. package/dist/cjs/ui-disclosure.cjs.entry.js +10 -7
  23. package/dist/cjs/ui-floating-action-button.cjs.entry.js +2 -2
  24. package/dist/cjs/ui-form-field.cjs.entry.js +61 -6
  25. package/dist/cjs/ui-icon-button.cjs.entry.js +2 -2
  26. package/dist/cjs/ui-input.cjs.entry.js +11 -6
  27. package/dist/cjs/ui-menu-item.cjs.entry.js +3 -3
  28. package/dist/cjs/ui-menu.cjs.entry.js +16 -11
  29. package/dist/cjs/ui-popover.cjs.entry.js +12 -9
  30. package/dist/cjs/ui-radio-group.cjs.entry.js +2 -2
  31. package/dist/cjs/ui-radio.cjs.entry.js +18 -9
  32. package/dist/cjs/ui-search-result-row.cjs.entry.js +2 -2
  33. package/dist/cjs/ui-search-shell.cjs.entry.js +2 -2
  34. package/dist/cjs/ui-select.cjs.entry.js +15 -7
  35. package/dist/cjs/ui-switch.cjs.entry.js +20 -11
  36. package/dist/cjs/ui-tabs.cjs.entry.js +11 -10
  37. package/dist/cjs/ui-textarea.cjs.entry.js +10 -6
  38. package/dist/cjs/ui-toast-region.cjs.entry.js +31 -20
  39. package/dist/cjs/ui-tooltip.cjs.entry.js +63 -23
  40. package/dist/cjs/ui-top-bar.cjs.entry.js +2 -2
  41. package/dist/cjs/ui-tree-item.cjs.entry.js +57 -616
  42. package/dist/cjs/ui-tree.cjs.entry.js +198 -14
  43. package/dist/collection/collection-manifest.json +3 -0
  44. package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +1 -1
  45. package/dist/collection/components/ui-avatar/ui-avatar.css +4 -4
  46. package/dist/collection/components/ui-avatar/ui-avatar.js +1 -1
  47. package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +2 -2
  48. package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +8 -16
  49. package/dist/collection/components/ui-badge/ui-badge.css +64 -48
  50. package/dist/collection/components/ui-badge/ui-badge.js +1 -1
  51. package/dist/collection/components/ui-button/ui-button.css +36 -26
  52. package/dist/collection/components/ui-button/ui-button.js +14 -3
  53. package/dist/collection/components/ui-callout/ui-callout.css +74 -0
  54. package/dist/collection/components/ui-callout/ui-callout.js +59 -0
  55. package/dist/collection/components/ui-checkbox/ui-checkbox.js +16 -11
  56. package/dist/collection/components/ui-chip/ui-chip.css +43 -0
  57. package/dist/collection/components/ui-chip/ui-chip.js +45 -0
  58. package/dist/collection/components/ui-combobox/ui-combobox.css +24 -0
  59. package/dist/collection/components/ui-combobox/ui-combobox.js +973 -0
  60. package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
  61. package/dist/collection/components/ui-dialog/ui-dialog.js +49 -13
  62. package/dist/collection/components/ui-disclosure/ui-disclosure.js +12 -10
  63. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
  64. package/dist/collection/components/ui-form-field/ui-form-field.css +4 -0
  65. package/dist/collection/components/ui-form-field/ui-form-field.js +59 -4
  66. package/dist/collection/components/ui-icon-button/ui-icon-button.js +1 -1
  67. package/dist/collection/components/ui-input/ui-input.css +8 -6
  68. package/dist/collection/components/ui-input/ui-input.js +11 -7
  69. package/dist/collection/components/ui-menu/ui-menu.css +12 -23
  70. package/dist/collection/components/ui-menu/ui-menu.js +16 -12
  71. package/dist/collection/components/ui-menu-item/ui-menu-item.css +9 -3
  72. package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
  73. package/dist/collection/components/ui-popover/ui-popover.css +14 -5
  74. package/dist/collection/components/ui-popover/ui-popover.js +12 -10
  75. package/dist/collection/components/ui-radio/ui-radio.js +25 -12
  76. package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
  77. package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
  78. package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
  79. package/dist/collection/components/ui-select/ui-select.css +8 -6
  80. package/dist/collection/components/ui-select/ui-select.js +17 -11
  81. package/dist/collection/components/ui-switch/ui-switch.js +22 -14
  82. package/dist/collection/components/ui-tabs/ui-tabs.js +13 -13
  83. package/dist/collection/components/ui-textarea/ui-textarea.css +7 -6
  84. package/dist/collection/components/ui-textarea/ui-textarea.js +10 -7
  85. package/dist/collection/components/ui-toast-region/ui-toast-region.js +30 -19
  86. package/dist/collection/components/ui-tooltip/ui-tooltip.css +16 -7
  87. package/dist/collection/components/ui-tooltip/ui-tooltip.js +115 -25
  88. package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
  89. package/dist/collection/components/ui-tree/ui-tree.css +2 -1
  90. package/dist/collection/components/ui-tree/ui-tree.js +216 -12
  91. package/dist/collection/components/ui-tree-item/ui-tree-item.js +84 -25
  92. package/dist/collection/field/combobox.js +4 -0
  93. package/dist/collection/field/valibot.js +5 -0
  94. package/dist/collection/field/validation.js +62 -0
  95. package/dist/collection/icons.js +6 -1
  96. package/dist/collection/overlay/manager.js +6 -7
  97. package/dist/collection/utils/controlled-state.js +4 -0
  98. package/dist/components/index.d.ts +6 -0
  99. package/dist/components/index.js +1 -1
  100. package/dist/components/p-Bh_1GxOD.js +1 -0
  101. package/dist/components/p-Bk55QiUK.js +1 -0
  102. package/dist/components/p-BnGhGgTH.js +1 -0
  103. package/dist/components/p-C-0syqXZ.js +1 -0
  104. package/dist/components/p-CoFximGM.js +13 -0
  105. package/dist/components/p-DIGcRYAW.js +1 -0
  106. package/dist/components/ui-affordance-scope.js +1 -1
  107. package/dist/components/ui-avatar-group.js +1 -1
  108. package/dist/components/ui-avatar.js +1 -1
  109. package/dist/components/ui-badge.js +1 -1
  110. package/dist/components/ui-button.js +1 -1
  111. package/dist/components/ui-callout.d.ts +11 -0
  112. package/dist/components/ui-callout.js +1 -0
  113. package/dist/components/ui-checkbox.js +1 -1
  114. package/dist/components/ui-chip.d.ts +11 -0
  115. package/dist/components/ui-chip.js +1 -0
  116. package/dist/components/ui-combobox.d.ts +11 -0
  117. package/dist/components/ui-combobox.js +1 -0
  118. package/dist/components/ui-context-menu.js +1 -1
  119. package/dist/components/ui-dialog.js +1 -1
  120. package/dist/components/ui-disclosure.js +1 -1
  121. package/dist/components/ui-floating-action-button.js +1 -1
  122. package/dist/components/ui-form-field.js +1 -1
  123. package/dist/components/ui-icon-button.js +1 -1
  124. package/dist/components/ui-input.js +1 -1
  125. package/dist/components/ui-menu-item.js +1 -1
  126. package/dist/components/ui-menu.js +1 -1
  127. package/dist/components/ui-popover.js +1 -1
  128. package/dist/components/ui-radio-group.js +1 -1
  129. package/dist/components/ui-radio.js +1 -1
  130. package/dist/components/ui-search-result-row.js +1 -1
  131. package/dist/components/ui-search-shell.js +1 -1
  132. package/dist/components/ui-select.js +1 -1
  133. package/dist/components/ui-switch.js +1 -1
  134. package/dist/components/ui-tabs.js +1 -1
  135. package/dist/components/ui-textarea.js +1 -1
  136. package/dist/components/ui-toast-region.js +1 -1
  137. package/dist/components/ui-tooltip.js +1 -1
  138. package/dist/components/ui-top-bar.js +1 -1
  139. package/dist/components/ui-tree-item.js +1 -13
  140. package/dist/components/ui-tree.js +1 -1
  141. package/dist/esm/controlled-state-BnGhGgTH.js +6 -0
  142. package/dist/esm/icons-CoFximGM.js +678 -0
  143. package/dist/esm/{index-CEeiinfk.js → index-8BGiMGQ0.js} +33 -1
  144. package/dist/esm/loader.js +3 -3
  145. package/dist/esm/looma.js +3 -3
  146. package/dist/esm/{manager-PM9a74r7.js → manager-C-0syqXZ.js} +6 -7
  147. package/dist/esm/ui-affordance-scope.entry.js +2 -2
  148. package/dist/esm/ui-avatar-group.entry.js +10 -18
  149. package/dist/esm/ui-avatar.entry.js +3 -3
  150. package/dist/esm/ui-badge.entry.js +3 -3
  151. package/dist/esm/ui-button.entry.js +16 -5
  152. package/dist/esm/ui-callout.entry.js +25 -0
  153. package/dist/esm/ui-checkbox.entry.js +14 -8
  154. package/dist/esm/ui-chip.entry.js +17 -0
  155. package/dist/esm/ui-combobox.entry.js +539 -0
  156. package/dist/esm/ui-context-menu.entry.js +3 -3
  157. package/dist/esm/ui-dialog.entry.js +46 -10
  158. package/dist/esm/ui-disclosure.entry.js +10 -7
  159. package/dist/esm/ui-floating-action-button.entry.js +2 -2
  160. package/dist/esm/ui-form-field.entry.js +61 -6
  161. package/dist/esm/ui-icon-button.entry.js +2 -2
  162. package/dist/esm/ui-input.entry.js +11 -6
  163. package/dist/esm/ui-menu-item.entry.js +3 -3
  164. package/dist/esm/ui-menu.entry.js +16 -11
  165. package/dist/esm/ui-popover.entry.js +12 -9
  166. package/dist/esm/ui-radio-group.entry.js +2 -2
  167. package/dist/esm/ui-radio.entry.js +18 -9
  168. package/dist/esm/ui-search-result-row.entry.js +2 -2
  169. package/dist/esm/ui-search-shell.entry.js +2 -2
  170. package/dist/esm/ui-select.entry.js +15 -7
  171. package/dist/esm/ui-switch.entry.js +20 -11
  172. package/dist/esm/ui-tabs.entry.js +11 -10
  173. package/dist/esm/ui-textarea.entry.js +10 -6
  174. package/dist/esm/ui-toast-region.entry.js +31 -20
  175. package/dist/esm/ui-tooltip.entry.js +63 -23
  176. package/dist/esm/ui-top-bar.entry.js +2 -2
  177. package/dist/esm/ui-tree-item.entry.js +57 -616
  178. package/dist/esm/ui-tree.entry.js +198 -14
  179. package/dist/index.cjs +2012 -870
  180. package/dist/index.d.cts +109 -1
  181. package/dist/index.d.ts +109 -1
  182. package/dist/index.js +72 -8
  183. package/dist/looma/looma.esm.js +1 -1
  184. package/dist/looma/p-03f44c45.entry.js +1 -0
  185. package/dist/looma/p-08f80207.entry.js +1 -0
  186. package/dist/looma/p-13f8195a.entry.js +1 -0
  187. package/dist/looma/{p-d273b857.entry.js → p-25e18ad6.entry.js} +1 -1
  188. package/dist/looma/p-2c03fa73.entry.js +1 -0
  189. package/dist/looma/p-314d5c7c.entry.js +1 -0
  190. package/dist/looma/{p-2ed7e241.entry.js → p-3ef2a21b.entry.js} +1 -1
  191. package/dist/looma/{p-063f5a89.entry.js → p-5a900d89.entry.js} +1 -1
  192. package/dist/looma/p-5fdcee1d.entry.js +1 -0
  193. package/dist/looma/{p-0198bb21.entry.js → p-672e3d16.entry.js} +1 -1
  194. package/dist/looma/p-68430534.entry.js +1 -0
  195. package/dist/looma/{p-2e6f791e.entry.js → p-72338f53.entry.js} +1 -1
  196. package/dist/looma/p-7ab661ec.entry.js +1 -0
  197. package/dist/looma/p-7c4a225f.entry.js +1 -0
  198. package/dist/looma/p-82f2fa3d.entry.js +1 -0
  199. package/dist/looma/p-839faf55.entry.js +1 -0
  200. package/dist/looma/p-8BGiMGQ0.js +2 -0
  201. package/dist/looma/p-8e254bc4.entry.js +1 -0
  202. package/dist/looma/p-8e6b1001.entry.js +1 -0
  203. package/dist/looma/p-920656cf.entry.js +1 -0
  204. package/dist/looma/p-97e8cb0e.entry.js +1 -0
  205. package/dist/looma/p-9d2662ca.entry.js +1 -0
  206. package/dist/looma/p-9e1c4020.entry.js +1 -0
  207. package/dist/looma/p-BnGhGgTH.js +1 -0
  208. package/dist/looma/p-C-0syqXZ.js +1 -0
  209. package/dist/looma/p-CoFximGM.js +13 -0
  210. package/dist/looma/{p-051f578c.entry.js → p-a63e2561.entry.js} +1 -1
  211. package/dist/looma/p-add67e4c.entry.js +1 -0
  212. package/dist/looma/p-b63f6d4f.entry.js +1 -0
  213. package/dist/looma/p-bd00d4e8.entry.js +1 -0
  214. package/dist/looma/p-cc915913.entry.js +1 -0
  215. package/dist/looma/p-cfba8f7c.entry.js +1 -0
  216. package/dist/looma/p-d56571a2.entry.js +1 -0
  217. package/dist/looma/{p-7e94d90d.entry.js → p-e0f241ab.entry.js} +1 -1
  218. package/dist/looma/p-f1750fd7.entry.js +1 -0
  219. package/dist/looma/p-fd1e4d22.entry.js +1 -0
  220. package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +1 -2
  221. package/dist/types/components/ui-callout/ui-callout.d.ts +6 -0
  222. package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +2 -1
  223. package/dist/types/components/ui-chip/ui-chip.d.ts +6 -0
  224. package/dist/types/components/ui-combobox/ui-combobox.d.ts +93 -0
  225. package/dist/types/components/ui-dialog/ui-dialog.d.ts +7 -1
  226. package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +2 -1
  227. package/dist/types/components/ui-form-field/ui-form-field.d.ts +8 -0
  228. package/dist/types/components/ui-input/ui-input.d.ts +1 -1
  229. package/dist/types/components/ui-menu/ui-menu.d.ts +2 -1
  230. package/dist/types/components/ui-popover/ui-popover.d.ts +2 -1
  231. package/dist/types/components/ui-radio/ui-radio.d.ts +4 -1
  232. package/dist/types/components/ui-select/ui-select.d.ts +3 -2
  233. package/dist/types/components/ui-switch/ui-switch.d.ts +2 -1
  234. package/dist/types/components/ui-tabs/ui-tabs.d.ts +2 -1
  235. package/dist/types/components/ui-textarea/ui-textarea.d.ts +1 -1
  236. package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +3 -1
  237. package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +20 -2
  238. package/dist/types/components/ui-tree/ui-tree.d.ts +21 -1
  239. package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +13 -5
  240. package/dist/types/components.d.ts +366 -71
  241. package/dist/types/field/combobox.d.ts +46 -0
  242. package/dist/types/field/valibot.d.ts +7 -0
  243. package/dist/types/field/validation.d.ts +56 -0
  244. package/dist/types/icons.d.ts +5 -0
  245. package/dist/types/utils/controlled-state.d.ts +4 -0
  246. package/dist/{ui-affordance-scope.entry-L533MECG.js → ui-affordance-scope.entry-3TUZ6GLW.js} +2 -2
  247. package/dist/ui-avatar-group.entry-XGJKN25W.js +51 -0
  248. package/dist/{ui-avatar.entry-3INAY3XP.js → ui-avatar.entry-SN3G44HW.js} +3 -3
  249. package/dist/ui-badge.entry-B6WDCWJX.js +22 -0
  250. package/dist/ui-button.entry-AZYUELLV.js +80 -0
  251. package/dist/ui-callout.entry-QRPWRMPC.js +32 -0
  252. package/dist/{ui-checkbox.entry-2PTBHSCQ.js → ui-checkbox.entry-OB6GFC4M.js} +17 -8
  253. package/dist/ui-chip.entry-XSNPJXX3.js +22 -0
  254. package/dist/ui-combobox.entry-IIMMUJF7.js +553 -0
  255. package/dist/{ui-context-menu.entry-AYDDCIZS.js → ui-context-menu.entry-AIULIE5Y.js} +3 -3
  256. package/dist/{ui-dialog.entry-I2XI3ZTZ.js → ui-dialog.entry-QSYWYHLY.js} +48 -10
  257. package/dist/{ui-disclosure.entry-5LY2BT7B.js → ui-disclosure.entry-3BJEYU3U.js} +13 -7
  258. package/dist/{ui-floating-action-button.entry-EJAMR5AM.js → ui-floating-action-button.entry-JEVNV6FI.js} +2 -2
  259. package/dist/ui-form-field.entry-PKSY7UU4.js +120 -0
  260. package/dist/{ui-icon-button.entry-7SD2LVXE.js → ui-icon-button.entry-TPX7BE7R.js} +2 -2
  261. package/dist/{ui-input.entry-7MM7GEQW.js → ui-input.entry-6NCLNW4E.js} +8 -6
  262. package/dist/ui-menu-item.entry-KA2K3PKV.js +22 -0
  263. package/dist/{ui-menu.entry-R4WK5QSX.js → ui-menu.entry-7GDO5L2T.js} +19 -11
  264. package/dist/{ui-popover.entry-ZRJRTXA7.js → ui-popover.entry-FR6YRNK6.js} +15 -9
  265. package/dist/{ui-radio-group.entry-S6RXHFSN.js → ui-radio-group.entry-7QHXQSNO.js} +2 -2
  266. package/dist/{ui-radio.entry-B73QZK2M.js → ui-radio.entry-YNMXKLDW.js} +21 -9
  267. package/dist/{ui-search-result-row.entry-DR2Y5S7P.js → ui-search-result-row.entry-AHVVAAIO.js} +2 -2
  268. package/dist/{ui-search-shell.entry-ST5IKJBC.js → ui-search-shell.entry-CNBEAMEZ.js} +2 -2
  269. package/dist/{ui-select.entry-7GPRFV67.js → ui-select.entry-TUY6TCTC.js} +13 -7
  270. package/dist/{ui-switch.entry-XQ5IRJRH.js → ui-switch.entry-26LFI7B5.js} +23 -11
  271. package/dist/{ui-tabs.entry-HPW5L5CY.js → ui-tabs.entry-LXB62RJJ.js} +14 -10
  272. package/dist/{ui-textarea.entry-W2PSRYVS.js → ui-textarea.entry-JYGMGPX2.js} +8 -6
  273. package/dist/{ui-toast-region.entry-FJUHFXKZ.js → ui-toast-region.entry-TOW4KZLZ.js} +29 -20
  274. package/dist/{ui-tooltip.entry-G5WHQW7K.js → ui-tooltip.entry-SKFNYXPH.js} +68 -25
  275. package/dist/{ui-top-bar.entry-3NCHFC4Y.js → ui-top-bar.entry-S3YP52EA.js} +2 -2
  276. package/dist/ui-tree-item.entry-LWYIPYLC.js +145 -0
  277. package/dist/{ui-tree.entry-SZW4Q5PY.js → ui-tree.entry-LXKUQFRU.js} +184 -13
  278. package/dist/valibot.d.ts +52 -0
  279. package/dist/valibot.js +7 -0
  280. package/editor/{chunk-QCOYOVQL.js → chunk-B5WVJOPV.js} +113 -97
  281. package/editor/extensions/index.d.ts +14 -6
  282. package/editor/extensions/index.js +1 -1
  283. package/editor/index.js +1 -1
  284. package/editor.css +37 -20
  285. package/package.json +11 -3
  286. package/styles.css +46 -20
  287. package/theme-high-contrast.css +12 -0
  288. package/tokens.css +26 -0
  289. package/vue/{chunk-5KWCMTXB.js → chunk-D4AJULDE.js} +116 -17
  290. package/vue/editor/index.d.ts +5 -15
  291. package/vue/editor/index.js +1 -1
  292. package/vue/index.d.ts +447 -115
  293. package/vue/index.js +7 -1
  294. package/dist/components/p-CEYIKqYc.js +0 -1
  295. package/dist/components/p-CIA4RyEp.js +0 -1
  296. package/dist/components/p-PM9a74r7.js +0 -1
  297. package/dist/looma/p-0584a051.entry.js +0 -1
  298. package/dist/looma/p-078f9fb8.entry.js +0 -1
  299. package/dist/looma/p-0f45c5f0.entry.js +0 -1
  300. package/dist/looma/p-11083743.entry.js +0 -1
  301. package/dist/looma/p-1674cda4.entry.js +0 -1
  302. package/dist/looma/p-1681b218.entry.js +0 -1
  303. package/dist/looma/p-34417499.entry.js +0 -1
  304. package/dist/looma/p-4b422d40.entry.js +0 -1
  305. package/dist/looma/p-54722713.entry.js +0 -13
  306. package/dist/looma/p-54c41576.entry.js +0 -1
  307. package/dist/looma/p-5ba9d496.entry.js +0 -1
  308. package/dist/looma/p-5d4713a6.entry.js +0 -1
  309. package/dist/looma/p-624ba086.entry.js +0 -1
  310. package/dist/looma/p-8d5adb17.entry.js +0 -1
  311. package/dist/looma/p-9194a99d.entry.js +0 -1
  312. package/dist/looma/p-CEeiinfk.js +0 -2
  313. package/dist/looma/p-PM9a74r7.js +0 -1
  314. package/dist/looma/p-a33522a2.entry.js +0 -1
  315. package/dist/looma/p-a5127c7d.entry.js +0 -1
  316. package/dist/looma/p-a9f46811.entry.js +0 -1
  317. package/dist/looma/p-b7aa4488.entry.js +0 -1
  318. package/dist/looma/p-caa8fc7b.entry.js +0 -1
  319. package/dist/looma/p-e3f99a24.entry.js +0 -1
  320. package/dist/looma/p-ed5abf6d.entry.js +0 -1
  321. package/dist/ui-avatar-group.entry-BWS7E2CM.js +0 -59
  322. package/dist/ui-badge.entry-2WOBVOYP.js +0 -22
  323. package/dist/ui-button.entry-VCGSEONK.js +0 -71
  324. package/dist/ui-form-field.entry-SJ6NNFXB.js +0 -67
  325. package/dist/ui-menu-item.entry-V3HIMR75.js +0 -22
  326. package/dist/ui-tree-item.entry-45RR3CMP.js +0 -385
@@ -0,0 +1,553 @@
1
+ import {
2
+ closeOverlay,
3
+ openOverlay
4
+ } from "./chunk-TL4FIE7X.js";
5
+ import {
6
+ createAnchoredSurface
7
+ } from "./chunk-YHXJC5M5.js";
8
+ import {
9
+ Host,
10
+ createEvent,
11
+ getElement,
12
+ h,
13
+ registerInstance
14
+ } from "./chunk-IMHSPETJ.js";
15
+
16
+ // dist/esm/ui-combobox.entry.js
17
+ function formatEditingValue(raw, selection, format) {
18
+ const unchanged = { display: raw, selection };
19
+ if (!format)
20
+ return unchanged;
21
+ let result;
22
+ try {
23
+ result = format(raw, selection);
24
+ } catch {
25
+ return unchanged;
26
+ }
27
+ if (!result)
28
+ return unchanged;
29
+ const characters = Array.from(raw);
30
+ let cursor = 0;
31
+ for (const character of result.display)
32
+ if (character === characters[cursor])
33
+ cursor += 1;
34
+ if (!Number.isInteger(result.selection.start) || !Number.isInteger(result.selection.end) || cursor !== characters.length || result.selection.start < 0 || result.selection.end < result.selection.start || result.selection.end > result.display.length)
35
+ return unchanged;
36
+ return result;
37
+ }
38
+ async function validateField(request, config) {
39
+ let output = request.raw;
40
+ let issues = [];
41
+ const check = () => request.signal.throwIfAborted();
42
+ try {
43
+ check();
44
+ if (config.parse)
45
+ output = await config.parse(request.raw, request);
46
+ check();
47
+ if (config.schema) {
48
+ const result = await config.schema["~standard"].validate(output);
49
+ check();
50
+ if (result.issues)
51
+ issues = result.issues;
52
+ else if ("value" in result)
53
+ output = result.value;
54
+ }
55
+ if (!issues.some((issue) => issue.severity !== "warning")) {
56
+ if (config.normalize)
57
+ output = await config.normalize(output, request);
58
+ check();
59
+ if (config.validator) {
60
+ const result = await config.validator(output, request);
61
+ check();
62
+ issues = [...issues, ...result.issues ?? []];
63
+ if ("output" in result)
64
+ output = result.output;
65
+ }
66
+ }
67
+ } catch (error) {
68
+ check();
69
+ issues = [{ message: error instanceof Error ? error.message : "Unable to validate this value." }];
70
+ }
71
+ issues = [...issues, ...config.issues ?? []];
72
+ return { output: issues.some((issue) => issue.severity !== "warning") ? void 0 : output, issues };
73
+ }
74
+ var uiComboboxCss = () => `:host{display:grid;gap:var(--ui-space-1);min-inline-size:0;color:var(--ui-text-primary);font:inherit}label{color:var(--ui-field-label-color, var(--ui-text-primary));font-size:var(--ui-field-label-size, 0.875rem);font-weight:var(--ui-field-label-weight, 500)}.field{display:flex;min-inline-size:0;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))}.field:focus-within{border-color:var(--ui-control-focus, var(--ui-focus-ring));outline:2px solid var(--ui-control-focus, var(--ui-focus-ring));outline-offset:1px}input{appearance:none;width:100%;min-inline-size:0;min-block-size:var(--ui-control-min-block-size, 2.75rem);box-sizing:border-box;border:0;border-radius:inherit;background:transparent;color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding:var(--ui-space-2) var(--ui-space-3);margin:0;outline:none}:host([data-size='sm']) input{min-block-size:var(--ui-field-compact-size, 2rem);padding:var(--ui-space-1) var(--ui-space-2)}button{appearance:none;border:0;border-radius:var(--ui-radius-2);background:transparent;color:var(--ui-field-affordance-color, var(--ui-text-secondary));font:inherit;font-weight:var(--ui-field-affordance-weight, 400);min-inline-size:2rem;padding:var(--ui-space-1);cursor:pointer}button:hover:enabled{background:var(--ui-surface-muted);color:var(--ui-text-primary)}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:-3px}input:disabled,button:disabled{color:var(--ui-text-muted);cursor:not-allowed}.field:has(input:disabled){background:var(--ui-control-surface-disabled, var(--ui-surface-muted))}:host([data-validation='error']) .field{border-color:var(--ui-danger-solid, var(--ui-accent-active))}.popup{box-sizing:border-box;min-inline-size:12rem;max-inline-size:calc(100vw - 1rem);max-block-size:var(--ui-combobox-max-block-size, 18rem);overflow:auto;margin:0;padding:var(--ui-space-1);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-md)}[hidden]{display:none !important}.option{padding:var(--ui-space-2) var(--ui-space-3);border-radius:var(--ui-radius-1);cursor:pointer;overflow-wrap:anywhere}.option:hover,.option[data-active]{background:var(--ui-surface-muted);outline:1px solid var(--ui-focus-ring);outline-offset:-1px}.option[aria-disabled='true']{color:var(--ui-text-muted);cursor:not-allowed}.primary{display:block;color:var(--ui-option-primary-color, var(--ui-text-primary));font-weight:var(--ui-option-primary-weight, 500)}.secondary{display:block;color:var(--ui-option-secondary-color, var(--ui-text-secondary));font-weight:var(--ui-option-secondary-weight, 400);font-size:var(--ui-font-size-sm)}.message,.group{color:var(--ui-field-message-color, var(--ui-text-secondary));font-weight:var(--ui-field-message-weight, 400);font-size:var(--ui-font-size-sm);line-height:var(--ui-line-height-md);overflow-wrap:anywhere}.group,.popup .message{padding:var(--ui-space-2) var(--ui-space-3)}.sr-only{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media (pointer: coarse){button{min-inline-size:2.75rem;min-block-size:2.75rem}}@media (forced-colors: active){.field,.popup{border-color:CanvasText}.option[data-active]{outline-color:Highlight}}`;
75
+ var UICombobox = class {
76
+ constructor(hostRef) {
77
+ registerInstance(this, hostRef);
78
+ this.queryChange = createEvent(this, "query-change");
79
+ this.valueChange = createEvent(this, "value-change");
80
+ this.freeEntry = createEvent(this, "free-entry");
81
+ this.createEntry = createEvent(this, "create-entry");
82
+ this.dependencyInvalidate = createEvent(this, "dependency-invalidate");
83
+ this.validationChange = createEvent(this, "validation-change");
84
+ this.optionsChange = createEvent(this, "options-change");
85
+ }
86
+ get host() {
87
+ return getElement(this);
88
+ }
89
+ /** Accessible visible label, associated with the native text input. */
90
+ label = "";
91
+ placeholder = "";
92
+ name = "";
93
+ /** Controlled canonical value. Undefined selects uncontrolled mode; null means no selection. */
94
+ value;
95
+ defaultValue;
96
+ /** Controlled raw editing text; independent of canonical selection. */
97
+ query;
98
+ defaultQuery = "";
99
+ /** Immutable configuration; replace the object/context when dependencies change. */
100
+ config = {};
101
+ disabled = false;
102
+ readOnly = false;
103
+ required = false;
104
+ size = "md";
105
+ disclosure = false;
106
+ clearable = false;
107
+ /** Optional description shown by the connected question-mark button. */
108
+ help = "";
109
+ queryChange;
110
+ valueChange;
111
+ freeEntry;
112
+ createEntry;
113
+ dependencyInvalidate;
114
+ validationChange;
115
+ /** Supplies the current result rows for framework-owned rich slots. */
116
+ optionsChange;
117
+ raw = "";
118
+ display = "";
119
+ selected = null;
120
+ expanded = false;
121
+ rows = [];
122
+ active = -1;
123
+ loading = false;
124
+ helpOpen = false;
125
+ lookupError = "";
126
+ validation = { status: "pristine", touched: false, dirty: false, issues: [] };
127
+ input;
128
+ popup;
129
+ field;
130
+ surface;
131
+ lookup;
132
+ validationRun;
133
+ lookupTimer;
134
+ composing = false;
135
+ initialRaw = "";
136
+ overlayId = `ui-combobox-${Math.random().toString(36).slice(2)}`;
137
+ alive = false;
138
+ fullSet = false;
139
+ knownOptions = /* @__PURE__ */ new Map();
140
+ awaitingLabel = null;
141
+ proposedChange;
142
+ formattedRaw;
143
+ formattedWith;
144
+ componentWillLoad() {
145
+ this.selected = this.value !== void 0 ? this.value : this.defaultValue ?? null;
146
+ this.raw = this.query ?? this.defaultQuery;
147
+ if (this.query === void 0 && !this.raw && this.selected !== null) {
148
+ this.raw = this.config.options?.find((row) => row.value === this.selected)?.label ?? this.selected;
149
+ }
150
+ if (this.query === void 0 && this.selected !== null && this.raw === this.selected)
151
+ this.awaitingLabel = this.selected;
152
+ this.display = this.raw;
153
+ this.initialRaw = this.raw;
154
+ this.applyServerIssues();
155
+ }
156
+ connectedCallback() {
157
+ this.alive = true;
158
+ this.setupSurface();
159
+ }
160
+ componentDidLoad() {
161
+ this.setupSurface();
162
+ }
163
+ componentDidUpdate() {
164
+ if (this.input && !this.composing && this.input.value !== this.display)
165
+ this.input.value = this.display;
166
+ if (this.expanded)
167
+ this.surface?.refresh();
168
+ }
169
+ disconnectedCallback() {
170
+ this.alive = false;
171
+ this.close();
172
+ this.validationRun?.abort();
173
+ this.surface?.destroy();
174
+ this.surface = void 0;
175
+ }
176
+ setupSurface() {
177
+ if (!this.surface && this.popup && this.field)
178
+ this.surface = createAnchoredSurface(this.popup, { anchor: this.field, placement: "bottom-start" });
179
+ }
180
+ syncValue() {
181
+ if (this.value === void 0)
182
+ return;
183
+ this.selected = this.value;
184
+ if (this.query === void 0) {
185
+ const proposal = this.proposedChange;
186
+ const option = this.config.options?.find((row) => row.value === this.selected) ?? (this.selected === null ? void 0 : this.knownOptions.get(this.selected));
187
+ const nextRaw = proposal?.value === this.selected ? proposal.query : option?.label ?? this.selected ?? "";
188
+ if (proposal?.value !== this.selected || nextRaw !== this.raw) {
189
+ this.raw = nextRaw;
190
+ this.display = this.raw;
191
+ this.formattedRaw = void 0;
192
+ }
193
+ this.awaitingLabel = !option && this.selected !== null ? this.selected : null;
194
+ }
195
+ this.resetValidation();
196
+ }
197
+ syncQuery() {
198
+ if (this.query === void 0 || this.query === this.raw)
199
+ return;
200
+ if (this.value === void 0 && this.proposedChange?.query !== this.query)
201
+ this.selected = null;
202
+ this.awaitingLabel = null;
203
+ this.formattedRaw = void 0;
204
+ this.raw = this.query;
205
+ this.display = this.raw;
206
+ this.resetValidation();
207
+ if (this.expanded)
208
+ this.search("input");
209
+ }
210
+ syncDisabled() {
211
+ if (this.disabled || this.readOnly) {
212
+ this.close();
213
+ this.resetValidation();
214
+ }
215
+ }
216
+ syncConfig(next, previous) {
217
+ this.validationRun?.abort();
218
+ if (next.provider !== previous?.provider || next.context !== previous?.context)
219
+ this.knownOptions.clear();
220
+ if (next.context !== previous?.context) {
221
+ this.close();
222
+ const policy = next.invalidation ?? "retain-query";
223
+ const value = policy === "retain" ? this.selected : null;
224
+ const query = policy === "clear" ? "" : this.raw;
225
+ this.commit(value, query, null, "invalidation", "programmatic");
226
+ this.validation = { status: "pristine", touched: false, dirty: this.raw !== this.initialRaw, issues: [] };
227
+ }
228
+ this.applyServerIssues();
229
+ if (this.expanded)
230
+ this.search("context");
231
+ }
232
+ applyServerIssues() {
233
+ const issues = this.config.issues ?? [];
234
+ if (issues.length)
235
+ this.setValidation({ issues }, this.validation.touched);
236
+ else
237
+ this.resetValidation();
238
+ }
239
+ resetValidation() {
240
+ this.validationRun?.abort();
241
+ this.validation = { status: "pristine", touched: this.validation.touched, dirty: this.raw !== this.initialRaw, issues: [] };
242
+ this.validationChange?.emit(this.validation);
243
+ }
244
+ cancelLookup() {
245
+ clearTimeout(this.lookupTimer);
246
+ this.lookup?.abort();
247
+ this.lookup = void 0;
248
+ this.loading = false;
249
+ }
250
+ close() {
251
+ this.expanded = false;
252
+ this.active = -1;
253
+ this.cancelLookup();
254
+ this.surface?.hide();
255
+ closeOverlay(this.overlayId);
256
+ }
257
+ open(reason = "input") {
258
+ if (this.disabled || this.readOnly)
259
+ return;
260
+ this.expanded = true;
261
+ if (this.popup && this.field)
262
+ this.popup.style.minWidth = `${this.field.getBoundingClientRect().width}px`;
263
+ this.surface?.show();
264
+ openOverlay({
265
+ id: this.overlayId,
266
+ element: this.popup,
267
+ relatedElements: [this.host],
268
+ modal: false,
269
+ requestClose: () => this.close()
270
+ });
271
+ this.search(reason);
272
+ }
273
+ search(reason) {
274
+ this.cancelLookup();
275
+ this.fullSet = reason === "disclosure";
276
+ this.active = -1;
277
+ this.lookupError = "";
278
+ const config = this.config;
279
+ const query = this.fullSet ? "" : this.raw;
280
+ const controller = new AbortController();
281
+ this.lookup = controller;
282
+ const apply = (options) => {
283
+ if (controller.signal.aborted || !this.alive)
284
+ return;
285
+ for (const option of options)
286
+ this.knownOptions.set(option.value, option);
287
+ const selectedOption = this.selected === null ? void 0 : this.knownOptions.get(this.selected);
288
+ if (this.query === void 0 && this.awaitingLabel === this.selected && selectedOption) {
289
+ this.raw = selectedOption.label;
290
+ this.display = this.raw;
291
+ this.awaitingLabel = null;
292
+ this.formattedRaw = void 0;
293
+ this.resetValidation();
294
+ }
295
+ const ids = /* @__PURE__ */ new Set();
296
+ this.rows = options.filter((option) => {
297
+ if (ids.has(option.id))
298
+ return false;
299
+ ids.add(option.id);
300
+ return this.fullSet || (config.filter ? config.filter(option, query, config.context) : config.provider ? true : option.label.toLocaleLowerCase().includes(query.toLocaleLowerCase()));
301
+ });
302
+ const groups = /* @__PURE__ */ new Map();
303
+ for (const row of this.rows) {
304
+ const group = row.group ?? "";
305
+ if (!groups.has(group))
306
+ groups.set(group, []);
307
+ groups.get(group).push(row);
308
+ }
309
+ this.rows = [...groups.values()].flat();
310
+ this.loading = false;
311
+ this.optionsChange.emit(this.rows);
312
+ };
313
+ if (!config.provider) {
314
+ apply(config.options ?? []);
315
+ return;
316
+ }
317
+ this.rows = [];
318
+ this.loading = true;
319
+ this.lookupTimer = setTimeout(async () => {
320
+ try {
321
+ apply(await config.provider({ query, context: config.context, signal: controller.signal, reason }));
322
+ } catch (error) {
323
+ if (controller.signal.aborted || !this.alive)
324
+ return;
325
+ this.loading = false;
326
+ this.lookupError = error instanceof Error ? error.message : "Unable to load suggestions.";
327
+ }
328
+ }, reason === "disclosure" ? 0 : Math.max(0, config.debounce ?? 200));
329
+ }
330
+ get canCreate() {
331
+ return Boolean(this.config.allowCreate && this.raw.trim() && !this.loading && !this.lookupError && !this.rows.some((row) => row.label.toLocaleLowerCase() === this.raw.toLocaleLowerCase()));
332
+ }
333
+ format(timing) {
334
+ if ((this.config.formatOn ?? "blur") !== timing || !this.input)
335
+ return;
336
+ if (this.formattedRaw === this.raw && this.formattedWith === this.config.format)
337
+ return;
338
+ const result = formatEditingValue(this.raw, {
339
+ start: this.input.selectionStart ?? this.raw.length,
340
+ end: this.input.selectionEnd ?? this.raw.length,
341
+ direction: this.input.selectionDirection ?? "none"
342
+ }, this.config.format);
343
+ this.formattedRaw = this.raw;
344
+ this.formattedWith = this.config.format;
345
+ this.display = result.display;
346
+ if (this.input.value !== result.display) {
347
+ this.input.value = result.display;
348
+ this.input.setSelectionRange(result.selection.start, result.selection.end, result.selection.direction);
349
+ }
350
+ }
351
+ onInput = (event) => {
352
+ if (this.composing || event.isComposing)
353
+ return;
354
+ this.awaitingLabel = null;
355
+ this.formattedRaw = void 0;
356
+ this.raw = this.input.value;
357
+ this.display = this.raw;
358
+ this.resetValidation();
359
+ this.format("input");
360
+ this.queryChange.emit({ query: this.raw, display: this.display, trigger: "keyboard" });
361
+ if (this.selected !== null)
362
+ this.commit(null, this.raw, null, "clear", "keyboard");
363
+ this.open();
364
+ if (this.config.validateOn === "input")
365
+ void this.validate();
366
+ queueMicrotask(() => {
367
+ if (this.query !== void 0 && this.query !== this.raw)
368
+ this.syncQuery();
369
+ });
370
+ };
371
+ commit(value, query, option, kind, trigger) {
372
+ this.awaitingLabel = null;
373
+ const queryChanged = query !== this.raw;
374
+ if (this.value === void 0)
375
+ this.selected = value;
376
+ if (this.query === void 0 && queryChanged) {
377
+ this.raw = query;
378
+ this.display = query;
379
+ this.formattedRaw = void 0;
380
+ }
381
+ this.resetValidation();
382
+ const detail = { value, query, option, kind, trigger };
383
+ const proposal = { value, query };
384
+ this.proposedChange = proposal;
385
+ this.valueChange.emit(detail);
386
+ if (queryChanged)
387
+ this.queryChange.emit({ query, display: query, trigger });
388
+ if (kind === "create")
389
+ this.createEntry.emit(detail);
390
+ if (kind === "free-entry")
391
+ this.freeEntry.emit(detail);
392
+ if (kind === "invalidation")
393
+ this.dependencyInvalidate.emit(detail);
394
+ queueMicrotask(() => {
395
+ if (this.proposedChange !== proposal)
396
+ return;
397
+ if (this.value !== void 0 && this.value !== proposal.value)
398
+ this.syncValue();
399
+ if (this.query !== void 0 && this.query !== proposal.query) {
400
+ if (this.value === void 0) {
401
+ this.selected = null;
402
+ this.resetValidation();
403
+ }
404
+ this.syncQuery();
405
+ }
406
+ this.proposedChange = void 0;
407
+ });
408
+ }
409
+ choose(index, trigger) {
410
+ const option = this.rows[index];
411
+ if (option?.disabled)
412
+ return;
413
+ if (option)
414
+ this.commit(option.value, option.label, option, "selection", trigger);
415
+ else if (this.canCreate && index === this.rows.length)
416
+ this.commit(null, this.raw, null, "create", trigger);
417
+ else
418
+ return;
419
+ this.close();
420
+ this.input?.focus();
421
+ if (this.config.validateOn !== "submit")
422
+ queueMicrotask(() => void this.validate());
423
+ }
424
+ move(key) {
425
+ const indices = this.rows.flatMap((row, index) => row.disabled ? [] : [index]);
426
+ if (this.canCreate)
427
+ indices.push(this.rows.length);
428
+ if (!indices.length)
429
+ return;
430
+ const current = indices.indexOf(this.active);
431
+ const next = key === "Home" ? 0 : key === "End" ? indices.length - 1 : key === "ArrowDown" ? Math.min(current + 1, indices.length - 1) : current < 0 ? indices.length - 1 : Math.max(0, current - 1);
432
+ this.active = indices[next];
433
+ requestAnimationFrame(() => this.host.shadowRoot?.getElementById(`option-${this.active}`)?.scrollIntoView({ block: "nearest" }));
434
+ }
435
+ onKeydown = (event) => {
436
+ if (this.composing || event.isComposing || this.disabled || this.readOnly)
437
+ return;
438
+ if (event.key === "Escape" && this.expanded) {
439
+ event.preventDefault();
440
+ event.stopPropagation();
441
+ this.close();
442
+ return;
443
+ }
444
+ if (event.key === "Tab") {
445
+ this.close();
446
+ return;
447
+ }
448
+ if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
449
+ return;
450
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
451
+ event.preventDefault();
452
+ if (!this.expanded)
453
+ this.open("disclosure");
454
+ this.move(event.key);
455
+ } else if ((event.key === "Home" || event.key === "End") && this.expanded && this.active >= 0) {
456
+ event.preventDefault();
457
+ this.move(event.key);
458
+ } else if (event.key === "Enter" && this.expanded) {
459
+ if (this.active >= 0) {
460
+ event.preventDefault();
461
+ this.choose(this.active, "keyboard");
462
+ } else if (this.config.allowFreeText) {
463
+ event.preventDefault();
464
+ this.commit(null, this.raw, null, "free-entry", "keyboard");
465
+ this.close();
466
+ }
467
+ }
468
+ };
469
+ onFocusOut = (event) => {
470
+ if (event.relatedTarget instanceof Node && this.host.shadowRoot?.contains(event.relatedTarget))
471
+ return;
472
+ this.close();
473
+ this.format("blur");
474
+ this.validation = { ...this.validation, touched: true };
475
+ if (this.config.allowFreeText && this.selected === null)
476
+ this.commit(null, this.raw, null, "free-entry", "keyboard");
477
+ if ((this.config.validateOn ?? "blur") === "blur")
478
+ void this.validate();
479
+ };
480
+ setValidation(result, touched = this.validation.touched) {
481
+ const blocking = result.issues.some((issue) => issue.severity !== "warning");
482
+ this.validation = {
483
+ status: blocking ? "error" : result.issues.length ? "warning" : "valid",
484
+ touched,
485
+ dirty: this.raw !== this.initialRaw,
486
+ ...result
487
+ };
488
+ this.validationChange?.emit(this.validation);
489
+ }
490
+ /** Validate for submission. Caller submits only non-pending, non-error output. */
491
+ async validate() {
492
+ this.validationRun?.abort();
493
+ const run = new AbortController();
494
+ this.validationRun = run;
495
+ this.validation = { ...this.validation, status: "pending", output: void 0 };
496
+ this.validationChange.emit(this.validation);
497
+ try {
498
+ const result = await validateField({ raw: this.raw, value: this.selected, context: this.config.context, signal: run.signal }, this.config);
499
+ if (this.required && !this.raw.trim())
500
+ result.issues = [...result.issues, { message: "A value is required." }];
501
+ else if (this.raw && this.selected === null && !this.config.allowFreeText && !this.config.allowCreate)
502
+ result.issues = [...result.issues, { message: "Choose a suggestion." }];
503
+ if (result.issues.some((issue) => issue.severity !== "warning"))
504
+ result.output = void 0;
505
+ if (!run.signal.aborted && this.alive)
506
+ this.setValidation(result);
507
+ } catch {
508
+ }
509
+ return this.validation;
510
+ }
511
+ render() {
512
+ const description = [this.helpOpen ? "help-text" : "", this.validation.issues.length ? "validation" : ""].filter(Boolean).join(" ") || void 0;
513
+ const status = this.loading ? "Loading suggestions\u2026" : this.lookupError || (this.expanded ? `${this.rows.length} suggestions available.` : "");
514
+ const groups = [...new Set(this.rows.map((row) => row.group ?? ""))];
515
+ return h(Host, { key: "b485462943bef9e5cb0a4b42f82888024132ab3a", "data-size": this.size, "data-validation": this.validation.status, onFocusout: this.onFocusOut }, h("label", { key: "99db32d80b0a250ff4ebea8481dda94be53df2eb", htmlFor: "input", part: "label" }, this.label, this.required ? " *" : ""), h("div", { key: "922adddf41c07215d3ec73947e8e3fe801c7ef89", class: "field", part: "field", ref: (element) => this.field = element }, h("input", { key: "557780297c5afee8112a5085984c5dd4ea1a02be", id: "input", ref: (element) => this.input = element, role: "combobox", "aria-autocomplete": "list", "aria-expanded": String(this.expanded), "aria-controls": "listbox", "aria-activedescendant": this.expanded && this.active >= 0 ? `option-${this.active}` : void 0, "aria-describedby": description, "aria-invalid": String(this.validation.status === "error"), "aria-busy": String(this.validation.status === "pending"), value: this.display, placeholder: this.placeholder, name: this.name || void 0, disabled: this.disabled, readOnly: this.readOnly, required: this.required, autoComplete: "off", part: "input", onInput: this.onInput, onKeyDown: this.onKeydown, onCompositionstart: () => this.composing = true, onCompositionend: () => {
516
+ this.composing = false;
517
+ this.onInput(new InputEvent("input"));
518
+ } }), this.clearable && h("button", { key: "ab180bacc7f5232eb517b7fed9bee0d62a4b1156", type: "button", part: "affordance", "aria-label": `Clear ${this.label}`, disabled: this.disabled || this.readOnly, onClick: () => {
519
+ this.commit(null, "", null, "clear", "pointer");
520
+ this.close();
521
+ this.input?.focus();
522
+ } }, "\xD7"), this.help && h("button", { key: "b4ea9b44c9e22eb9ac259fb67b86368eede2b13f", id: "help", type: "button", part: "affordance", "aria-label": `Help for ${this.label}`, disabled: this.disabled }, h("span", { key: "36222d7a98a4f6abb12f785e9b4f28c2479a4e37", "aria-hidden": "true" }, "?")), this.disclosure && h("button", { key: "1d8757b7c817575b6915d0e8c164e20776df83e5", type: "button", part: "affordance", "aria-label": `Suggestions for ${this.label}`, "aria-controls": "listbox", "aria-expanded": String(this.expanded), disabled: this.disabled || this.readOnly, onClick: () => {
523
+ if (this.expanded)
524
+ this.close();
525
+ else
526
+ this.open("disclosure");
527
+ this.input?.focus();
528
+ } }, h("span", { key: "cd2dad7694dc24104521a58d4182d6e866f54095", "aria-hidden": "true" }, "\u2304"))), this.help && h("ui-tooltip", { key: "5e0eecd828a0e82d94b0be5b5f3233cddca4a87b", id: "help-text", for: "help", toggleOnClick: true, onOpen: () => this.helpOpen = true, onClose: () => this.helpOpen = false }, this.help), h("div", { key: "694902d8c8f58664838a943e0e2c14c856be9a08", class: "popup", part: "popup", hidden: !this.expanded, ref: (element) => this.popup = element }, h("div", { key: "81b18e296151afde18c47492aa997bdd13d553bc", id: "listbox", role: "listbox", "aria-label": `${this.label} suggestions`, "aria-busy": String(this.loading) }, groups.map((group) => h("div", { role: group ? "group" : "presentation", "aria-label": group || void 0 }, group && h("div", { class: "group", part: "group" }, group), this.rows.map((row, index) => (row.group ?? "") !== group ? null : h("div", { id: `option-${index}`, role: "option", "aria-selected": String(this.selected === row.value), "aria-disabled": String(Boolean(row.disabled)), "data-active": this.active === index ? "" : void 0, part: "option", class: "option", onPointerDown: (event) => event.preventDefault(), onClick: () => this.choose(index, "pointer") }, h("slot", { name: `option-${row.id}` }, h("span", { class: "primary", part: "option-primary" }, row.label), row.description && h("span", { class: "secondary", part: "option-secondary" }, row.description)))))), this.canCreate && h("div", { key: "dbf87523b5c6f17aedf15295d9703557f2d31524", id: `option-${this.rows.length}`, role: "option", "aria-selected": "false", class: "option", part: "option", "data-active": this.active === this.rows.length ? "" : void 0, onPointerDown: (event) => event.preventDefault(), onClick: () => this.choose(this.rows.length, "pointer") }, h("slot", { key: "bd4bdd2b132de7f72c1e5450fb0c0d16254aeedb", name: "create" }, "Create \u201C", this.raw, "\u201D"))), this.loading ? h("div", { class: "message" }, h("slot", { name: "loading" }, "Loading suggestions\u2026")) : this.lookupError ? h("div", { class: "message" }, h("slot", { name: "error" }, this.lookupError)) : !this.rows.length && !this.canCreate ? h("div", { class: "message" }, h("slot", { name: "empty" }, "No suggestions.")) : null), h("div", { key: "0d39fb1acb6d65307fabc3f502785a19710dc4af", id: "validation", class: "message", part: "validation", hidden: !this.validation.issues.length }, this.validation.issues.map((issue) => h("div", null, issue.message))), h("div", { key: "a83334d72b90ca0f411e6161a8bf5e2e8c2e33a8", class: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true" }, status, " ", this.validation.status === "pending" ? "Checking value\u2026" : this.validation.issues.map((issue) => issue.message).join(" ")));
529
+ }
530
+ static get watchers() {
531
+ return {
532
+ "value": [{
533
+ "syncValue": 0
534
+ }],
535
+ "query": [{
536
+ "syncQuery": 0
537
+ }],
538
+ "disabled": [{
539
+ "syncDisabled": 0
540
+ }],
541
+ "readOnly": [{
542
+ "syncDisabled": 0
543
+ }],
544
+ "config": [{
545
+ "syncConfig": 0
546
+ }]
547
+ };
548
+ }
549
+ };
550
+ UICombobox.style = uiComboboxCss();
551
+ export {
552
+ UICombobox as ui_combobox
553
+ };
@@ -2,7 +2,7 @@ import {
2
2
  closeOverlay,
3
3
  openOverlay,
4
4
  requestTopOverlayClose
5
- } from "./chunk-SZJQ3NPX.js";
5
+ } from "./chunk-TL4FIE7X.js";
6
6
  import {
7
7
  createAnchoredSurface
8
8
  } from "./chunk-YHXJC5M5.js";
@@ -14,7 +14,7 @@ import {
14
14
  getElement,
15
15
  h,
16
16
  registerInstance
17
- } from "./chunk-NIPNHZ5W.js";
17
+ } from "./chunk-IMHSPETJ.js";
18
18
 
19
19
  // dist/esm/ui-context-menu.entry.js
20
20
  var uiContextMenuCss = () => `:host{display:contents}:host([data-focus-trigger='pointer']) ::slotted(ui-menu-item:focus){outline:none}.menu{position:fixed;inset:auto;margin:0;z-index:var(--ui-z-overlay, 1000);min-width:12rem;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}.menu:popover-open{opacity:1;transform:translateY(0) scale(1)}@starting-style{.menu:popover-open{opacity:0;transform:translateY(-4px) scale(0.99)}}.menu[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){.menu{transition:none}}`;
@@ -226,7 +226,7 @@ var UIContextMenu = class {
226
226
  this.closeMenu("action", "pointer");
227
227
  };
228
228
  render() {
229
- return h(Host, { key: "4db0d5b55ead41925aa682b1e383b5735b49bf56", "data-open": this.internalOpen ? "" : void 0, "data-focus-trigger": this.internalOpen ? this.focusTrigger : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "462925d53db169c13e485789ae91e28b0abd3e40", name: "trigger" }), h("div", { key: "cac8f3b11c4872d38e976f210ce9a43fd854b335", class: "menu", "data-open": this.internalOpen ? "" : void 0 }, h("ui-menu", { key: "ba50f74e11466da2240f7568479d5d10a614b394", open: this.internalOpen }, h("slot", { key: "1fcb45bf124e2377ac6c7fc236d2babf0d9e3bae" }))));
229
+ return h(Host, { key: "5d927f41a72e680ad6d6d4a3fa0c913360cb8660", "data-open": this.internalOpen ? "" : void 0, "data-focus-trigger": this.internalOpen ? this.focusTrigger : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "e5b1ec05d96093671fb839e3b81ddefb730575e1", name: "trigger" }), h("div", { key: "a0c4a8ca50bcca2b7d3ee53b4c26db054af93151", class: "menu", "data-open": this.internalOpen ? "" : void 0 }, h("ui-menu", { key: "ac03b9dc3fa56d0cbb28115060726de4500a668b", open: this.internalOpen }, h("slot", { key: "f2d8484cb9fb3956a3a5979795633a74d423577d" }))));
230
230
  }
231
231
  static get watchers() {
232
232
  return {