@threadlabs/looma 0.1.23 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/dist/chunk-HNFCGIBP.js +8 -0
  2. package/dist/chunk-NB6DBRXQ.js +323 -0
  3. package/dist/{chunk-GDMQKT5F.js → chunk-UY423IKN.js} +33 -30
  4. package/dist/cjs/controlled-state-BFya8rAX.js +9 -0
  5. package/dist/cjs/icons-BAdjrnhS.js +680 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/looma.cjs.js +1 -1
  8. package/dist/cjs/ui-affordance-scope.cjs.entry.js +1 -1
  9. package/dist/cjs/ui-avatar-group.cjs.entry.js +9 -17
  10. package/dist/cjs/ui-avatar.cjs.entry.js +2 -2
  11. package/dist/cjs/ui-badge.cjs.entry.js +2 -2
  12. package/dist/cjs/ui-button.cjs.entry.js +1 -1
  13. package/dist/cjs/ui-callout.cjs.entry.js +27 -0
  14. package/dist/cjs/ui-checkbox.cjs.entry.js +13 -7
  15. package/dist/cjs/{ui-combobox.cjs.entry.js → ui-chip_2.cjs.entry.js} +29 -4
  16. package/dist/cjs/ui-context-menu.cjs.entry.js +1 -1
  17. package/dist/cjs/ui-dialog.cjs.entry.js +44 -8
  18. package/dist/cjs/ui-disclosure.cjs.entry.js +9 -6
  19. package/dist/cjs/ui-editable.cjs.entry.js +100 -0
  20. package/dist/cjs/ui-floating-action-button.cjs.entry.js +1 -1
  21. package/dist/cjs/ui-form-field.cjs.entry.js +59 -4
  22. package/dist/cjs/ui-icon-button.cjs.entry.js +1 -1
  23. package/dist/cjs/ui-input.cjs.entry.js +1 -1
  24. package/dist/cjs/ui-menu-item.cjs.entry.js +2 -2
  25. package/dist/cjs/ui-menu.cjs.entry.js +14 -9
  26. package/dist/cjs/ui-multi-combobox.cjs.entry.js +158 -0
  27. package/dist/cjs/ui-popover.cjs.entry.js +10 -7
  28. package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
  29. package/dist/cjs/ui-radio.cjs.entry.js +16 -7
  30. package/dist/cjs/ui-search-result-row.cjs.entry.js +1 -1
  31. package/dist/cjs/ui-search-shell.cjs.entry.js +1 -1
  32. package/dist/cjs/ui-select.cjs.entry.js +1 -1
  33. package/dist/cjs/ui-switch.cjs.entry.js +19 -10
  34. package/dist/cjs/ui-tabs.cjs.entry.js +10 -9
  35. package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
  36. package/dist/cjs/ui-toast-region.cjs.entry.js +30 -19
  37. package/dist/cjs/ui-tooltip.cjs.entry.js +12 -8
  38. package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
  39. package/dist/cjs/ui-tree-item.cjs.entry.js +54 -617
  40. package/dist/cjs/ui-tree.cjs.entry.js +123 -11
  41. package/dist/collection/collection-manifest.json +4 -0
  42. package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +1 -1
  43. package/dist/collection/components/ui-avatar/ui-avatar.css +4 -4
  44. package/dist/collection/components/ui-avatar/ui-avatar.js +1 -1
  45. package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +2 -2
  46. package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +8 -16
  47. package/dist/collection/components/ui-badge/ui-badge.css +64 -48
  48. package/dist/collection/components/ui-badge/ui-badge.js +1 -1
  49. package/dist/collection/components/ui-button/ui-button.js +1 -1
  50. package/dist/collection/components/ui-callout/ui-callout.css +74 -0
  51. package/dist/collection/components/ui-callout/ui-callout.js +59 -0
  52. package/dist/collection/components/ui-checkbox/ui-checkbox.js +16 -11
  53. package/dist/collection/components/ui-chip/ui-chip.css +47 -0
  54. package/dist/collection/components/ui-chip/ui-chip.js +67 -0
  55. package/dist/collection/components/ui-combobox/ui-combobox.js +49 -4
  56. package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
  57. package/dist/collection/components/ui-dialog/ui-dialog.js +49 -13
  58. package/dist/collection/components/ui-disclosure/ui-disclosure.js +12 -10
  59. package/dist/collection/components/ui-editable/ui-editable.css +2 -0
  60. package/dist/collection/components/ui-editable/ui-editable.js +196 -0
  61. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
  62. package/dist/collection/components/ui-form-field/ui-form-field.js +59 -4
  63. package/dist/collection/components/ui-icon-button/ui-icon-button.js +1 -1
  64. package/dist/collection/components/ui-input/ui-input.js +1 -1
  65. package/dist/collection/components/ui-menu/ui-menu.css +12 -23
  66. package/dist/collection/components/ui-menu/ui-menu.js +16 -12
  67. package/dist/collection/components/ui-menu-item/ui-menu-item.css +9 -3
  68. package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
  69. package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.css +29 -0
  70. package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.js +503 -0
  71. package/dist/collection/components/ui-popover/ui-popover.css +14 -5
  72. package/dist/collection/components/ui-popover/ui-popover.js +12 -10
  73. package/dist/collection/components/ui-radio/ui-radio.js +24 -11
  74. package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
  75. package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
  76. package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
  77. package/dist/collection/components/ui-select/ui-select.js +1 -1
  78. package/dist/collection/components/ui-switch/ui-switch.js +22 -14
  79. package/dist/collection/components/ui-tabs/ui-tabs.js +13 -13
  80. package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
  81. package/dist/collection/components/ui-toast-region/ui-toast-region.js +30 -19
  82. package/dist/collection/components/ui-tooltip/ui-tooltip.css +16 -7
  83. package/dist/collection/components/ui-tooltip/ui-tooltip.js +14 -11
  84. package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
  85. package/dist/collection/components/ui-tree/ui-tree.css +2 -1
  86. package/dist/collection/components/ui-tree/ui-tree.js +122 -10
  87. package/dist/collection/components/ui-tree-item/ui-tree-item.js +61 -44
  88. package/dist/collection/field/editable.js +1 -0
  89. package/dist/collection/field/multi-combobox.js +1 -0
  90. package/dist/collection/icons.js +6 -1
  91. package/dist/collection/utils/controlled-state.js +4 -0
  92. package/dist/components/index.d.ts +8 -0
  93. package/dist/components/index.js +1 -1
  94. package/dist/components/p-B9CzOHvE.js +1 -0
  95. package/dist/components/p-BMgIcOh-.js +1 -0
  96. package/dist/components/p-BVteuP_d.js +1 -0
  97. package/dist/components/p-BnGhGgTH.js +1 -0
  98. package/dist/components/p-C6p-ygxq.js +1 -0
  99. package/dist/components/p-CoFximGM.js +13 -0
  100. package/dist/components/ui-affordance-scope.js +1 -1
  101. package/dist/components/ui-avatar-group.js +1 -1
  102. package/dist/components/ui-avatar.js +1 -1
  103. package/dist/components/ui-badge.js +1 -1
  104. package/dist/components/ui-button.js +1 -1
  105. package/dist/components/ui-callout.d.ts +11 -0
  106. package/dist/components/ui-callout.js +1 -0
  107. package/dist/components/ui-checkbox.js +1 -1
  108. package/dist/components/ui-chip.d.ts +11 -0
  109. package/dist/components/ui-chip.js +1 -0
  110. package/dist/components/ui-combobox.js +1 -1
  111. package/dist/components/ui-context-menu.js +1 -1
  112. package/dist/components/ui-dialog.js +1 -1
  113. package/dist/components/ui-disclosure.js +1 -1
  114. package/dist/components/ui-editable.d.ts +11 -0
  115. package/dist/components/ui-editable.js +1 -0
  116. package/dist/components/ui-floating-action-button.js +1 -1
  117. package/dist/components/ui-form-field.js +1 -1
  118. package/dist/components/ui-icon-button.js +1 -1
  119. package/dist/components/ui-input.js +1 -1
  120. package/dist/components/ui-menu-item.js +1 -1
  121. package/dist/components/ui-menu.js +1 -1
  122. package/dist/components/ui-multi-combobox.d.ts +11 -0
  123. package/dist/components/ui-multi-combobox.js +1 -0
  124. package/dist/components/ui-popover.js +1 -1
  125. package/dist/components/ui-radio-group.js +1 -1
  126. package/dist/components/ui-radio.js +1 -1
  127. package/dist/components/ui-search-result-row.js +1 -1
  128. package/dist/components/ui-search-shell.js +1 -1
  129. package/dist/components/ui-select.js +1 -1
  130. package/dist/components/ui-switch.js +1 -1
  131. package/dist/components/ui-tabs.js +1 -1
  132. package/dist/components/ui-textarea.js +1 -1
  133. package/dist/components/ui-toast-region.js +1 -1
  134. package/dist/components/ui-tooltip.js +1 -1
  135. package/dist/components/ui-top-bar.js +1 -1
  136. package/dist/components/ui-tree-item.js +1 -13
  137. package/dist/components/ui-tree.js +1 -1
  138. package/dist/esm/controlled-state-BnGhGgTH.js +6 -0
  139. package/dist/esm/icons-CoFximGM.js +678 -0
  140. package/dist/esm/loader.js +1 -1
  141. package/dist/esm/looma.js +1 -1
  142. package/dist/esm/ui-affordance-scope.entry.js +1 -1
  143. package/dist/esm/ui-avatar-group.entry.js +9 -17
  144. package/dist/esm/ui-avatar.entry.js +2 -2
  145. package/dist/esm/ui-badge.entry.js +2 -2
  146. package/dist/esm/ui-button.entry.js +1 -1
  147. package/dist/esm/ui-callout.entry.js +25 -0
  148. package/dist/esm/ui-checkbox.entry.js +13 -7
  149. package/dist/esm/{ui-combobox.entry.js → ui-chip_2.entry.js} +30 -6
  150. package/dist/esm/ui-context-menu.entry.js +1 -1
  151. package/dist/esm/ui-dialog.entry.js +44 -8
  152. package/dist/esm/ui-disclosure.entry.js +9 -6
  153. package/dist/esm/ui-editable.entry.js +98 -0
  154. package/dist/esm/ui-floating-action-button.entry.js +1 -1
  155. package/dist/esm/ui-form-field.entry.js +59 -4
  156. package/dist/esm/ui-icon-button.entry.js +1 -1
  157. package/dist/esm/ui-input.entry.js +1 -1
  158. package/dist/esm/ui-menu-item.entry.js +2 -2
  159. package/dist/esm/ui-menu.entry.js +14 -9
  160. package/dist/esm/ui-multi-combobox.entry.js +156 -0
  161. package/dist/esm/ui-popover.entry.js +10 -7
  162. package/dist/esm/ui-radio-group.entry.js +1 -1
  163. package/dist/esm/ui-radio.entry.js +16 -7
  164. package/dist/esm/ui-search-result-row.entry.js +1 -1
  165. package/dist/esm/ui-search-shell.entry.js +1 -1
  166. package/dist/esm/ui-select.entry.js +1 -1
  167. package/dist/esm/ui-switch.entry.js +19 -10
  168. package/dist/esm/ui-tabs.entry.js +10 -9
  169. package/dist/esm/ui-textarea.entry.js +1 -1
  170. package/dist/esm/ui-toast-region.entry.js +30 -19
  171. package/dist/esm/ui-tooltip.entry.js +12 -8
  172. package/dist/esm/ui-top-bar.entry.js +1 -1
  173. package/dist/esm/ui-tree-item.entry.js +54 -617
  174. package/dist/esm/ui-tree.entry.js +123 -11
  175. package/dist/index.cjs +1552 -894
  176. package/dist/index.d.cts +23 -1
  177. package/dist/index.d.ts +23 -1
  178. package/dist/index.js +12 -2
  179. package/dist/looma/looma.esm.js +1 -1
  180. package/dist/looma/p-08f80207.entry.js +1 -0
  181. package/dist/looma/{p-ed368426.entry.js → p-0e1741cb.entry.js} +1 -1
  182. package/dist/looma/p-0ef4bf13.entry.js +1 -0
  183. package/dist/looma/{p-7e0bb7f6.entry.js → p-166f8593.entry.js} +1 -1
  184. package/dist/looma/p-262a542c.entry.js +1 -0
  185. package/dist/looma/{p-13347631.entry.js → p-26d357ae.entry.js} +1 -1
  186. package/dist/looma/p-30f01909.entry.js +1 -0
  187. package/dist/looma/p-393e3e02.entry.js +1 -0
  188. package/dist/looma/p-3a44b9f9.entry.js +1 -0
  189. package/dist/looma/p-558d4f5b.entry.js +1 -0
  190. package/dist/looma/{p-5a87b59d.entry.js → p-5780cefa.entry.js} +1 -1
  191. package/dist/looma/p-5a7261e1.entry.js +1 -0
  192. package/dist/looma/p-5fdcee1d.entry.js +1 -0
  193. package/dist/looma/{p-add36e74.entry.js → p-72338f53.entry.js} +1 -1
  194. package/dist/looma/p-7319c147.entry.js +1 -0
  195. package/dist/looma/p-78b7e466.entry.js +1 -0
  196. package/dist/looma/{p-a90d2821.entry.js → p-7ab661ec.entry.js} +1 -1
  197. package/dist/looma/p-7eb04f09.entry.js +1 -0
  198. package/dist/looma/{p-69a5557b.entry.js → p-81c533f5.entry.js} +1 -1
  199. package/dist/looma/p-87f501cf.entry.js +1 -0
  200. package/dist/looma/p-89e71bbb.entry.js +1 -0
  201. package/dist/looma/{p-8b8840b8.entry.js → p-92cd1841.entry.js} +1 -1
  202. package/dist/looma/{p-f0487ff3.entry.js → p-95eb3b58.entry.js} +1 -1
  203. package/dist/looma/p-96ec4d7a.entry.js +1 -0
  204. package/dist/looma/p-9d2662ca.entry.js +1 -0
  205. package/dist/looma/p-BnGhGgTH.js +1 -0
  206. package/dist/looma/p-CoFximGM.js +13 -0
  207. package/dist/looma/p-add67e4c.entry.js +1 -0
  208. package/dist/looma/p-b6c776fb.entry.js +1 -0
  209. package/dist/looma/p-bcb1b47b.entry.js +1 -0
  210. package/dist/looma/p-d56571a2.entry.js +1 -0
  211. package/dist/looma/{p-582973b5.entry.js → p-d62da01d.entry.js} +1 -1
  212. package/dist/looma/{p-f74e5546.entry.js → p-dbcb479c.entry.js} +1 -1
  213. package/dist/looma/p-e14024bf.entry.js +1 -0
  214. package/dist/looma/{p-5da09f47.entry.js → p-fc180770.entry.js} +1 -1
  215. package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +1 -2
  216. package/dist/types/components/ui-callout/ui-callout.d.ts +6 -0
  217. package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +2 -1
  218. package/dist/types/components/ui-chip/ui-chip.d.ts +8 -0
  219. package/dist/types/components/ui-combobox/ui-combobox.d.ts +4 -0
  220. package/dist/types/components/ui-dialog/ui-dialog.d.ts +7 -1
  221. package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +2 -1
  222. package/dist/types/components/ui-editable/ui-editable.d.ts +24 -0
  223. package/dist/types/components/ui-form-field/ui-form-field.d.ts +8 -0
  224. package/dist/types/components/ui-menu/ui-menu.d.ts +2 -1
  225. package/dist/types/components/ui-multi-combobox/ui-multi-combobox.d.ts +47 -0
  226. package/dist/types/components/ui-popover/ui-popover.d.ts +2 -1
  227. package/dist/types/components/ui-radio/ui-radio.d.ts +4 -1
  228. package/dist/types/components/ui-switch/ui-switch.d.ts +2 -1
  229. package/dist/types/components/ui-tabs/ui-tabs.d.ts +2 -1
  230. package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +3 -1
  231. package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +2 -1
  232. package/dist/types/components/ui-tree/ui-tree.d.ts +12 -0
  233. package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +11 -7
  234. package/dist/types/components.d.ts +343 -46
  235. package/dist/types/field/editable.d.ts +5 -0
  236. package/dist/types/field/multi-combobox.d.ts +11 -0
  237. package/dist/types/icons.d.ts +5 -0
  238. package/dist/types/utils/controlled-state.d.ts +4 -0
  239. package/dist/{ui-affordance-scope.entry-VO4C2MZX.js → ui-affordance-scope.entry-VSSP52ZP.js} +2 -2
  240. package/dist/ui-avatar-group.entry-JMCLL6FW.js +51 -0
  241. package/dist/{ui-avatar.entry-T6FU6ZYM.js → ui-avatar.entry-X2YQ3QPG.js} +3 -3
  242. package/dist/ui-badge.entry-OJ6FJJKL.js +22 -0
  243. package/dist/{ui-button.entry-7UXMUGHN.js → ui-button.entry-ZN6JLND7.js} +2 -2
  244. package/dist/ui-callout.entry-7K6NXQ7U.js +32 -0
  245. package/dist/{ui-checkbox.entry-DMZJB3RE.js → ui-checkbox.entry-GUYRVU6O.js} +17 -8
  246. package/dist/{ui-combobox.entry-ZCTPXEES.js → ui-chip_2.entry-M2DOTIGY.js} +32 -7
  247. package/dist/{ui-context-menu.entry-2WMCBGCP.js → ui-context-menu.entry-BM7FHOUJ.js} +5 -5
  248. package/dist/{ui-dialog.entry-WO23XOSW.js → ui-dialog.entry-AZAD37CG.js} +50 -12
  249. package/dist/{ui-disclosure.entry-USX7OUEW.js → ui-disclosure.entry-XDPGKMBK.js} +13 -7
  250. package/dist/ui-editable.entry-S3TE6KFT.js +110 -0
  251. package/dist/{ui-floating-action-button.entry-MXDIN7MV.js → ui-floating-action-button.entry-U7HGA3CS.js} +2 -2
  252. package/dist/ui-form-field.entry-C2ZSP3TM.js +120 -0
  253. package/dist/{ui-icon-button.entry-MJUNXHBU.js → ui-icon-button.entry-P6H2LY7D.js} +2 -2
  254. package/dist/{ui-input.entry-AWG63YIG.js → ui-input.entry-GTNQJCQ2.js} +2 -2
  255. package/dist/ui-menu-item.entry-2HWOGUO5.js +22 -0
  256. package/dist/{ui-menu.entry-IT3GW5TL.js → ui-menu.entry-NZ7ER54K.js} +22 -14
  257. package/dist/ui-multi-combobox.entry-DZ5LLSVQ.js +167 -0
  258. package/dist/{ui-popover.entry-ZQQB4N6E.js → ui-popover.entry-ZOEQMUWG.js} +17 -11
  259. package/dist/{ui-radio-group.entry-V7PCTS7I.js → ui-radio-group.entry-QCQ46EK5.js} +2 -2
  260. package/dist/{ui-radio.entry-JYH6TQBI.js → ui-radio.entry-QAATWUYT.js} +20 -8
  261. package/dist/{ui-search-result-row.entry-JBNYXXUN.js → ui-search-result-row.entry-2I3DH2OT.js} +2 -2
  262. package/dist/{ui-search-shell.entry-TEAWE76O.js → ui-search-shell.entry-7RS55ORF.js} +2 -2
  263. package/dist/{ui-select.entry-F3A6TE2U.js → ui-select.entry-6O4KD4G7.js} +2 -2
  264. package/dist/{ui-switch.entry-MJIICMP2.js → ui-switch.entry-DY5PSHCQ.js} +23 -11
  265. package/dist/{ui-tabs.entry-6REFIUHV.js → ui-tabs.entry-6X56UOUE.js} +14 -10
  266. package/dist/{ui-textarea.entry-OJTXCED7.js → ui-textarea.entry-RDYP6O77.js} +2 -2
  267. package/dist/{ui-toast-region.entry-NOFXLKPS.js → ui-toast-region.entry-EBY42KS5.js} +32 -23
  268. package/dist/{ui-tooltip.entry-COWTWVHX.js → ui-tooltip.entry-PLXMPOKV.js} +19 -12
  269. package/dist/{ui-top-bar.entry-PIAWXJNV.js → ui-top-bar.entry-QKE2DLVD.js} +2 -2
  270. package/dist/ui-tree-item.entry-TC6YWIC6.js +145 -0
  271. package/dist/{ui-tree.entry-XYI3ZFAZ.js → ui-tree.entry-UL6UHCUT.js} +114 -12
  272. package/editor/{chunk-QCOYOVQL.js → chunk-B5WVJOPV.js} +113 -97
  273. package/editor/extensions/index.d.ts +14 -6
  274. package/editor/extensions/index.js +1 -1
  275. package/editor/index.js +1 -1
  276. package/editor.css +37 -20
  277. package/package.json +1 -1
  278. package/styles.css +10 -0
  279. package/tokens.css +3 -0
  280. package/vue/{chunk-JLW23USW.js → chunk-GXQY27K2.js} +112 -17
  281. package/vue/editor/index.d.ts +5 -15
  282. package/vue/editor/index.js +1 -1
  283. package/vue/index.d.ts +442 -116
  284. package/vue/index.js +9 -1
  285. package/dist/components/p-CaietZcq.js +0 -1
  286. package/dist/components/p-DHd18bK7.js +0 -1
  287. package/dist/looma/p-14c081cf.entry.js +0 -1
  288. package/dist/looma/p-25366205.entry.js +0 -1
  289. package/dist/looma/p-2e3aa869.entry.js +0 -1
  290. package/dist/looma/p-40fe7fee.entry.js +0 -1
  291. package/dist/looma/p-446cda76.entry.js +0 -1
  292. package/dist/looma/p-4fc1b005.entry.js +0 -13
  293. package/dist/looma/p-6a8a4736.entry.js +0 -1
  294. package/dist/looma/p-6bf4038b.entry.js +0 -1
  295. package/dist/looma/p-8204fee6.entry.js +0 -1
  296. package/dist/looma/p-8238e0dc.entry.js +0 -1
  297. package/dist/looma/p-99d88efb.entry.js +0 -1
  298. package/dist/looma/p-a27669b1.entry.js +0 -1
  299. package/dist/looma/p-a6ee76b7.entry.js +0 -1
  300. package/dist/looma/p-b6398a6b.entry.js +0 -1
  301. package/dist/looma/p-d50faaff.entry.js +0 -1
  302. package/dist/looma/p-d77278ce.entry.js +0 -1
  303. package/dist/looma/p-d9ec13b7.entry.js +0 -1
  304. package/dist/looma/p-ecf8005f.entry.js +0 -1
  305. package/dist/ui-avatar-group.entry-TAXJRIIU.js +0 -59
  306. package/dist/ui-badge.entry-MZFYNBMJ.js +0 -22
  307. package/dist/ui-form-field.entry-7ZCMEHPY.js +0 -67
  308. package/dist/ui-menu-item.entry-HFTWG62N.js +0 -22
  309. package/dist/ui-tree-item.entry-BSEWNL2O.js +0 -389
package/dist/index.cjs CHANGED
@@ -402,7 +402,7 @@ var init_ui_affordance_scope_entry = __esm({
402
402
  this.coordinator?.refresh();
403
403
  };
404
404
  render() {
405
- return h(Host, { key: "184b0a908494d480ed23aa14b75d4f7b94e5275b" }, h("slot", { key: "570e810db588c1514c6fd85985c9bc4532993a2b", onSlotchange: this.onSlotChange }));
405
+ return h(Host, { key: "f500fa48554ed6224efd2dbe9632880bf0a15a19" }, h("slot", { key: "37c5c5b7925b260ff8f9edd411ee6c90a12a4909", onSlotchange: this.onSlotChange }));
406
406
  }
407
407
  static get watchers() {
408
408
  return {
@@ -421,12 +421,11 @@ var ui_avatar_group_entry_exports = {};
421
421
  __export(ui_avatar_group_entry_exports, {
422
422
  ui_avatar_group: () => UIAvatarGroup
423
423
  });
424
- var uiAvatarGroupCss, OVERFLOW_ATTR, UIAvatarGroup;
424
+ var uiAvatarGroupCss, UIAvatarGroup;
425
425
  var init_ui_avatar_group_entry = __esm({
426
426
  "dist/esm/ui-avatar-group.entry.js"() {
427
427
  init_index_8BGiMGQ0();
428
- uiAvatarGroupCss = () => `:host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*:not([data-ui-avatar-group-overflow])){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type:not([data-ui-avatar-group-overflow])){margin-inline-end:0}.overflow{margin-inline-end:-0.5rem;display:inline-flex;align-items:center;justify-content:center;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;font-weight:600;flex-shrink:0}`;
429
- OVERFLOW_ATTR = "data-ui-avatar-group-overflow";
428
+ uiAvatarGroupCss = () => `:host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type){margin-inline-end:0}.overflow{margin-inline-end:-0.5rem;display:inline-flex;align-items:center;justify-content:center;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;font-weight:600;flex-shrink:0}`;
430
429
  UIAvatarGroup = class {
431
430
  constructor(hostRef) {
432
431
  registerInstance(this, hostRef);
@@ -437,32 +436,25 @@ var init_ui_avatar_group_entry = __esm({
437
436
  max = 5;
438
437
  label = "People";
439
438
  overflowCount = 0;
440
- slotRef;
441
439
  syncOverflow() {
442
440
  this.updateOverflow();
443
441
  }
444
442
  componentDidLoad() {
445
- this.slotRef?.addEventListener("slotchange", () => this.updateOverflow());
446
443
  this.updateOverflow();
447
444
  }
448
- componentDidUpdate() {
449
- this.updateOverflow();
445
+ visibleLimit() {
446
+ return Number.isFinite(this.max) ? Math.max(0, Math.floor(this.max)) : 0;
450
447
  }
451
448
  updateOverflow() {
452
- const slot = this.host.shadowRoot?.querySelector("slot");
453
- const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
454
- const children = nodes.filter((el) => !el.hasAttribute(OVERFLOW_ATTR));
449
+ const children = Array.from(this.host.children);
455
450
  const total = children.length;
456
- const visibleCount = Math.min(this.max, total);
457
- const overflowCount = total > this.max ? total - this.max : 0;
458
- children.forEach((el, i) => {
459
- el.hidden = i >= visibleCount;
460
- el.setAttribute("aria-hidden", String(i >= visibleCount));
461
- });
462
- this.overflowCount = overflowCount;
451
+ const visibleLimit = this.visibleLimit();
452
+ const overflowCount = total > visibleLimit ? total - visibleLimit : 0;
453
+ if (this.overflowCount !== overflowCount)
454
+ this.overflowCount = overflowCount;
463
455
  }
464
456
  render() {
465
- return h(Host, { key: "bef6efd3c80d29e47742412a497893789ea8790b", role: "list", "aria-label": this.label || void 0 }, h("slot", { key: "21585b11dcde36868c3e3bc7fbd0c216be6f011b" }), this.overflowCount > 0 && h("span", { key: "ede3b71945d379fe78d522a3346aa29c02d74b15", class: "overflow", role: "listitem", "aria-label": `${this.overflowCount} more`, "data-ui-avatar-group-overflow": true }, "+", this.overflowCount));
457
+ return h(Host, { key: "9ba6693cabc379bbbe6f5698160481f27fe02f31", role: "group", "aria-label": this.label || void 0 }, h("style", { key: "ed231fe96c16a3cdd5a66d4828664c75c6959a9e" }, `::slotted(:nth-child(n + ${this.visibleLimit() + 1})) { display: none !important; }`), h("slot", { key: "463005a7f3c498c80c768151ab32c873ff1abf86", onSlotchange: () => this.updateOverflow() }), this.overflowCount > 0 && h("span", { key: "dc1ba88fd97ca461e6518d223f00a93416e6d0f0", class: "overflow", role: "img", "aria-label": `${this.overflowCount} more ${this.overflowCount === 1 ? "person" : "people"}`, "data-ui-avatar-group-overflow": true }, "+", this.overflowCount));
466
458
  }
467
459
  static get watchers() {
468
460
  return {
@@ -493,7 +485,7 @@ var uiAvatarCss, UIAvatar;
493
485
  var init_ui_avatar_entry = __esm({
494
486
  "dist/esm/ui-avatar.entry.js"() {
495
487
  init_index_8BGiMGQ0();
496
- uiAvatarCss = () => `:host{display:inline-grid;place-items:center;overflow:hidden;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.875rem;font-weight:600;text-transform:uppercase}.avatar{display:contents}.avatar img{grid-area:1 / 1;inline-size:100%;block-size:100%;object-fit:cover}.avatar .fallback{grid-area:1 / 1;display:inline-flex;align-items:center;justify-content:center;inline-size:100%;block-size:100%}`;
488
+ uiAvatarCss = () => `:host{display:inline-flex}.avatar{display:inline-grid;place-items:center;overflow:hidden;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.875rem;font-weight:600;text-transform:uppercase}.avatar img{grid-area:1 / 1;inline-size:100%;block-size:100%;object-fit:cover}.avatar .fallback{grid-area:1 / 1;display:inline-flex;align-items:center;justify-content:center;inline-size:100%;block-size:100%}`;
497
489
  UIAvatar = class {
498
490
  constructor(hostRef) {
499
491
  registerInstance(this, hostRef);
@@ -515,7 +507,7 @@ var init_ui_avatar_entry = __esm({
515
507
  render() {
516
508
  const fallbackText = this.fallback || toInitials(this.name || this.alt);
517
509
  const label = this.alt || this.name || "Avatar";
518
- return h(Host, { key: "18214960ad2f1a0370907c0281102af924739de9", role: "img", "aria-label": label, "data-has-image": this.hasImage ? "" : void 0 }, h("div", { key: "c6d0a00de56b756f0e24fdc4b306d89cdae2a44f", class: "avatar" }, h("img", { key: "c5bfecb9d18797bc934ff087ce7ed8a4616ab347", src: this.src, alt: label, onLoad: this.onImageLoad, onError: this.onImageError, hidden: !this.hasImage, "aria-hidden": this.hasImage ? "false" : "true" }), h("span", { key: "1875a45a9c21de3e3a52924ef25b3f8429a788c4", class: "fallback", hidden: this.hasImage, "aria-hidden": this.hasImage ? "true" : "false" }, fallbackText)));
510
+ return h(Host, { key: "bbe6c3a775702022a19d819a6cc9d81d798cb3e1", role: "img", "aria-label": label, "data-has-image": this.hasImage ? "" : void 0 }, h("div", { key: "63402327ba5bde122bf5deaea09baf965ee9b047", class: "avatar" }, h("img", { key: "e52b86773684b80d76efa459cb03ae40881f959b", src: this.src, alt: label, onLoad: this.onImageLoad, onError: this.onImageError, hidden: !this.hasImage, "aria-hidden": this.hasImage ? "false" : "true" }), h("span", { key: "82a6d8f0d0c69ca52f81d092a2292fc80238265b", class: "fallback", hidden: this.hasImage, "aria-hidden": this.hasImage ? "true" : "false" }, fallbackText)));
519
511
  }
520
512
  static get watchers() {
521
513
  return {
@@ -538,7 +530,7 @@ var uiBadgeCss, UIBadge;
538
530
  var init_ui_badge_entry = __esm({
539
531
  "dist/esm/ui-badge.entry.js"() {
540
532
  init_index_8BGiMGQ0();
541
- uiBadgeCss = () => `:host{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;line-height:1;padding:0.25em 0.6em;white-space:nowrap}:host([data-tone='accent']){background:var(--ui-accent-solid);border-color:var(--ui-accent-solid);color:var(--ui-text-on-accent)}:host([data-tone='danger']){background:var(--ui-danger-solid);border-color:var(--ui-danger-solid);color:var(--ui-text-on-accent)}:host([data-tone='success']){background:var(--ui-success-solid);border-color:var(--ui-success-solid);color:var(--ui-text-on-accent)}:host([data-tone='warning']){background:var(--ui-warning-solid);border-color:var(--ui-warning-solid);color:var(--ui-text-primary)}:host([data-tone='info']){background:var(--ui-info-solid);border-color:var(--ui-info-solid);color:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']){background:var(--ui-accent-soft);border-color:var(--ui-accent-soft);color:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']){background:var(--ui-danger-soft);border-color:var(--ui-danger-soft);color:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']){background:var(--ui-success-soft);border-color:var(--ui-success-soft);color:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']){background:var(--ui-warning-soft);border-color:var(--ui-warning-soft);color:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']){background:var(--ui-info-soft);border-color:var(--ui-info-soft);color:var(--ui-info-solid)}`;
533
+ uiBadgeCss = () => `:host{--ui-badge-surface:var(--ui-surface-muted);--ui-badge-text:var(--ui-text-secondary);--ui-badge-border:var(--ui-border-default);--ui-badge-font-size:var(--ui-font-size-xs);--ui-badge-font-weight:var(--ui-font-normal);--ui-badge-line-height:var(--ui-line-height-tight);--ui-badge-padding-block:var(--ui-space-0-5);--ui-badge-padding-inline:var(--ui-space-2);display:inline-flex;max-width:100%}.badge__surface{display:inline-flex;align-items:center;justify-content:center;max-width:100%;padding:var(--ui-badge-padding-block) var(--ui-badge-padding-inline);border:1px solid var(--ui-badge-border);border-radius:var(--ui-radius-round);background:var(--ui-badge-surface);color:var(--ui-badge-text);font-family:var(--ui-font-family-sans);font-size:var(--ui-badge-font-size);font-weight:var(--ui-badge-font-weight);line-height:var(--ui-badge-line-height);white-space:nowrap}:host([data-tone='accent']) .badge__surface{--ui-badge-surface:var(--ui-accent-solid);--ui-badge-border:var(--ui-accent-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-tone='danger']) .badge__surface{--ui-badge-surface:var(--ui-danger-solid);--ui-badge-border:var(--ui-danger-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-tone='success']) .badge__surface{--ui-badge-surface:var(--ui-success-solid);--ui-badge-border:var(--ui-success-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-tone='warning']) .badge__surface{--ui-badge-surface:var(--ui-warning-solid);--ui-badge-border:var(--ui-warning-solid);--ui-badge-text:var(--ui-text-primary)}:host([data-tone='info']) .badge__surface{--ui-badge-surface:var(--ui-info-solid);--ui-badge-border:var(--ui-info-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']) .badge__surface{--ui-badge-surface:var(--ui-accent-soft);--ui-badge-border:var(--ui-accent-soft);--ui-badge-text:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']) .badge__surface{--ui-badge-surface:var(--ui-danger-soft);--ui-badge-border:var(--ui-danger-soft);--ui-badge-text:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']) .badge__surface{--ui-badge-surface:var(--ui-success-soft);--ui-badge-border:var(--ui-success-soft);--ui-badge-text:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']) .badge__surface{--ui-badge-surface:var(--ui-warning-soft);--ui-badge-border:var(--ui-warning-soft);--ui-badge-text:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']) .badge__surface{--ui-badge-surface:var(--ui-info-soft);--ui-badge-border:var(--ui-info-soft);--ui-badge-text:var(--ui-info-solid)}`;
542
534
  UIBadge = class {
543
535
  constructor(hostRef) {
544
536
  registerInstance(this, hostRef);
@@ -546,7 +538,7 @@ var init_ui_badge_entry = __esm({
546
538
  variant;
547
539
  tone;
548
540
  render() {
549
- return h(Host, { key: "8766c0331ac7fbd6409b604578e159ae093c844b", "data-variant": this.variant || void 0, "data-tone": this.tone || void 0 }, h("slot", { key: "65016ab530b850c82261e2da718622ff72567634" }));
541
+ return h(Host, { key: "ba96ade6d037a7ed9958e7eed540e62782f846f0", "data-variant": this.variant || void 0, "data-tone": this.tone || void 0 }, h("span", { key: "a1e9587f59de479c19b9ea7aec8c8e932b998369", class: "badge__surface" }, h("slot", { key: "5835ddcea5cda472e700557528fd3cbc9d572616" })));
550
542
  }
551
543
  };
552
544
  UIBadge.style = uiBadgeCss();
@@ -631,7 +623,7 @@ var init_ui_button_entry = __esm({
631
623
  this.host.click();
632
624
  };
633
625
  render() {
634
- return h(Host, { key: "9c8d479fe7f1873a447048944513648bac132d52", "data-size": this.size || void 0, "data-variant": this.variant, "data-disabled": this.disabled ? "true" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "741f48e7efd42262834992c07c4685d3e929d91c", ref: (el) => this.slotRef = el }));
626
+ return h(Host, { key: "58a90293e2ac169c8bc3c6cb3d15428cc73629b7", "data-size": this.size || void 0, "data-variant": this.variant, "data-disabled": this.disabled ? "true" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "05439bdc2af81bcabe9da11b4baf13f880e0a75f", ref: (el) => this.slotRef = el }));
635
627
  }
636
628
  static get watchers() {
637
629
  return {
@@ -651,254 +643,621 @@ var init_ui_button_entry = __esm({
651
643
  }
652
644
  });
653
645
 
654
- // dist/esm/ui-checkbox.entry.js
655
- var ui_checkbox_entry_exports = {};
656
- __export(ui_checkbox_entry_exports, {
657
- ui_checkbox: () => UICheckbox
658
- });
659
- var uiCheckboxCss, UICheckbox;
660
- var init_ui_checkbox_entry = __esm({
661
- "dist/esm/ui-checkbox.entry.js"() {
662
- init_index_8BGiMGQ0();
663
- init_events_JwSoedEO();
664
- uiCheckboxCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='checkbox']){accent-color:var(--ui-accent-solid);width:1.125em;height:1.125em;cursor:pointer}::slotted(input[type='checkbox']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
665
- UICheckbox = class {
666
- constructor(hostRef) {
667
- registerInstance(this, hostRef);
668
- }
669
- get host() {
670
- return getElement(this);
671
- }
672
- checked = false;
673
- defaultChecked = false;
674
- disabled = false;
675
- indeterminate = false;
676
- required = false;
677
- value = "on";
678
- internalChecked = false;
679
- slotRef;
680
- syncFromProp() {
681
- this.internalChecked = this.checked;
682
- }
683
- syncToInput() {
684
- const input = this.getInput();
685
- if (!input)
686
- return;
687
- this.host.dataset.disabled = this.disabled ? "true" : "";
688
- this.host.setAttribute("aria-disabled", String(this.disabled));
689
- input.checked = this.internalChecked;
690
- input.indeterminate = this.indeterminate;
691
- input.disabled = this.disabled;
692
- input.required = this.required;
693
- input.value = this.value;
694
- }
695
- componentDidLoad() {
696
- this.syncFromProp();
697
- this.internalChecked = this.internalChecked || this.defaultChecked;
698
- this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
699
- this.syncToInput();
700
- const input = this.getInput();
701
- input?.addEventListener("change", this.onInputChange);
702
- }
703
- disconnectedCallback() {
704
- const input = this.getInput();
705
- input?.removeEventListener("change", this.onInputChange);
706
- }
707
- componentDidUpdate() {
708
- this.syncToInput();
709
- }
710
- getInput() {
711
- const slot = this.host.shadowRoot?.querySelector("slot");
712
- const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
713
- return nodes.find((el) => el instanceof HTMLInputElement && el.type === "checkbox") ?? null;
714
- }
715
- onInputChange = (e) => {
716
- const input = e.target;
717
- if (!input)
718
- return;
719
- this.internalChecked = input.checked;
720
- this.indeterminate = input.indeterminate;
721
- dispatchDetail(this.host, "change", {
722
- checked: this.internalChecked,
723
- value: this.value,
724
- trigger: eventToTrigger(e)
725
- });
726
- };
727
- render() {
728
- return h(Host, { key: "66b6708ae71c9eca6c03c63891b590bd050c2506", role: "checkbox", "aria-checked": this.indeterminate ? "mixed" : String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "b5e168a9ff0c6e5e747fff6c6264c59744f10a56", ref: (el) => this.slotRef = el }));
729
- }
730
- static get watchers() {
731
- return {
732
- "checked": [{
733
- "syncFromProp": 0
734
- }],
735
- "internalChecked": [{
736
- "syncToInput": 0
737
- }],
738
- "indeterminate": [{
739
- "syncToInput": 0
740
- }],
741
- "disabled": [{
742
- "syncToInput": 0
743
- }],
744
- "required": [{
745
- "syncToInput": 0
746
- }]
747
- };
748
- }
749
- };
750
- UICheckbox.style = uiCheckboxCss();
751
- }
752
- });
753
-
754
- // dist/esm/manager-C-0syqXZ.js
755
- function syncScrollLock() {
756
- if (typeof document === "undefined") {
757
- return;
758
- }
759
- const root = document.documentElement;
760
- if (modalCount > 0) {
761
- root.setAttribute(scrollLockAttribute, "true");
762
- root.style.overflow = "hidden";
763
- return;
764
- }
765
- root.removeAttribute(scrollLockAttribute);
766
- root.style.removeProperty("overflow");
767
- }
768
- function getOverlayDismissible(record) {
769
- return record.dismissible ?? true;
770
- }
771
- function handleEscape(event) {
772
- if (event.key !== "Escape") {
773
- return;
774
- }
775
- requestTopOverlayClose("escape", "keyboard");
776
- }
777
- function handleLightDismiss(event) {
778
- const top = getTopOverlay();
779
- if (!top || !getOverlayDismissible(top)) {
780
- return;
781
- }
782
- const boundary = [top.element, ...top.relatedElements ?? []];
783
- if (event.composedPath().some((target) => target instanceof Node && boundary.some((element) => element.contains(target))))
784
- return;
785
- requestTopOverlayClose("light-dismiss", "pointer");
786
- }
787
- function ensureListeners() {
788
- if (listenersAttached || typeof document === "undefined") {
789
- return;
790
- }
791
- document.addEventListener("keydown", handleEscape);
792
- document.addEventListener("pointerdown", handleLightDismiss, { capture: true });
793
- listenersAttached = true;
794
- }
795
- function removeListenersIfIdle() {
796
- if (!listenersAttached || stack.length > 0 || typeof document === "undefined") {
797
- return;
798
- }
799
- document.removeEventListener("keydown", handleEscape);
800
- document.removeEventListener("pointerdown", handleLightDismiss, { capture: true });
801
- listenersAttached = false;
802
- }
803
- function openOverlay(record) {
804
- closeOverlay(record.id);
805
- stack.push(record);
806
- if (record.modal) {
807
- modalCount += 1;
808
- syncScrollLock();
809
- }
810
- ensureListeners();
811
- }
812
- function closeOverlay(id) {
813
- const index = stack.findIndex((record) => record.id === id);
814
- if (index >= 0) {
815
- const [record] = stack.splice(index, 1);
816
- if (record?.modal) {
817
- modalCount = Math.max(0, modalCount - 1);
818
- syncScrollLock();
819
- }
820
- }
821
- removeListenersIfIdle();
646
+ // dist/esm/icons-CoFximGM.js
647
+ function serializeAttributes(attributes) {
648
+ return Object.entries(attributes).map(([name, value]) => ` ${name}="${escapeAttribute(value)}"`).join("");
822
649
  }
823
- function getTopOverlay() {
824
- return stack.at(-1);
650
+ function escapeAttribute(value) {
651
+ return String(value).replaceAll("&", "&").replaceAll('"', """);
825
652
  }
826
- function requestTopOverlayClose(reason, trigger) {
827
- const top = getTopOverlay();
828
- if (!top) {
829
- return false;
830
- }
831
- if (!getOverlayDismissible(top) && (reason === "escape" || reason === "light-dismiss")) {
832
- return false;
833
- }
834
- top.requestClose(reason, trigger);
835
- return true;
653
+ function serializeIconNode(node) {
654
+ const [tag, attributes] = node;
655
+ return `<${tag}${serializeAttributes(attributes)}></${tag}>`;
836
656
  }
837
- var stack, scrollLockAttribute, modalCount, listenersAttached;
838
- var init_manager_C_0syqXZ = __esm({
839
- "dist/esm/manager-C-0syqXZ.js"() {
840
- stack = [];
841
- scrollLockAttribute = "data-ui-scroll-lock";
842
- modalCount = 0;
843
- listenersAttached = false;
844
- }
845
- });
846
-
847
- // dist/esm/ui-combobox.entry.js
848
- var ui_combobox_entry_exports = {};
849
- __export(ui_combobox_entry_exports, {
850
- ui_combobox: () => UICombobox
851
- });
852
- function formatEditingValue(raw, selection, format) {
853
- const unchanged = { display: raw, selection };
854
- if (!format)
855
- return unchanged;
856
- let result;
857
- try {
858
- result = format(raw, selection);
859
- } catch {
860
- return unchanged;
861
- }
862
- if (!result)
863
- return unchanged;
864
- const characters = Array.from(raw);
865
- let cursor = 0;
866
- for (const character of result.display)
867
- if (character === characters[cursor])
868
- cursor += 1;
869
- 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)
870
- return unchanged;
871
- return result;
657
+ function loomaIconMarkup(name, className = "looma-icon") {
658
+ return [
659
+ `<svg class="${escapeAttribute(className)}" data-looma-icon="${name}" aria-hidden="true" focusable="false"`,
660
+ ' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"',
661
+ ' stroke-linecap="round" stroke-linejoin="round">',
662
+ LOOMA_ICONS[name].map(serializeIconNode).join(""),
663
+ "</svg>"
664
+ ].join("");
872
665
  }
873
- async function validateField(request, config) {
874
- let output = request.raw;
875
- let issues = [];
876
- const check = () => request.signal.throwIfAborted();
877
- try {
878
- check();
879
- if (config.parse)
880
- output = await config.parse(request.raw, request);
881
- check();
882
- if (config.schema) {
883
- const result = await config.schema["~standard"].validate(output);
884
- check();
885
- if (result.issues)
886
- issues = result.issues;
887
- else if ("value" in result)
888
- output = result.value;
889
- }
890
- if (!issues.some((issue) => issue.severity !== "warning")) {
891
- if (config.normalize)
892
- output = await config.normalize(output, request);
893
- check();
894
- if (config.validator) {
895
- const result = await config.validator(output, request);
896
- check();
897
- issues = [...issues, ...result.issues ?? []];
898
- if ("output" in result)
899
- output = result.output;
900
- }
901
- }
666
+ var Bold, Braces, ChevronDown, ChevronLeft, CircleCheck, CircleX, CodeXml, Columns3, Ellipsis, Eraser, GripHorizontal, GripVertical, Heading1, Heading2, Heading3, Highlighter, Image, Info, Italic, ListOrdered, ListTodo, List, Merge, Minus, NotebookPen, PaintBucket, PanelBottom, PanelLeft, PanelRight, PanelTop, Pilcrow, Plus, Quote, Redo2, Rows3, Split, Strikethrough, Table2, TextAlignCenter, TextAlignEnd, TextAlignStart, Trash2, TriangleAlert, Underline, Undo2, LOOMA_ICONS;
667
+ var init_icons_CoFximGM = __esm({
668
+ "dist/esm/icons-CoFximGM.js"() {
669
+ Bold = [
670
+ ["path", { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" }]
671
+ ];
672
+ Braces = [
673
+ ["path", { d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1" }],
674
+ ["path", { d: "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1" }]
675
+ ];
676
+ ChevronDown = [["path", { d: "m6 9 6 6 6-6" }]];
677
+ ChevronLeft = [["path", { d: "m15 18-6-6 6-6" }]];
678
+ CircleCheck = [
679
+ ["circle", { cx: "12", cy: "12", r: "10" }],
680
+ ["path", { d: "m9 12 2 2 4-4" }]
681
+ ];
682
+ CircleX = [
683
+ ["circle", { cx: "12", cy: "12", r: "10" }],
684
+ ["path", { d: "m15 9-6 6" }],
685
+ ["path", { d: "m9 9 6 6" }]
686
+ ];
687
+ CodeXml = [
688
+ ["path", { d: "m18 16 4-4-4-4" }],
689
+ ["path", { d: "m6 8-4 4 4 4" }],
690
+ ["path", { d: "m14.5 4-5 16" }]
691
+ ];
692
+ Columns3 = [
693
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
694
+ ["path", { d: "M9 3v18" }],
695
+ ["path", { d: "M15 3v18" }]
696
+ ];
697
+ Ellipsis = [
698
+ ["circle", { cx: "12", cy: "12", r: "1" }],
699
+ ["circle", { cx: "19", cy: "12", r: "1" }],
700
+ ["circle", { cx: "5", cy: "12", r: "1" }]
701
+ ];
702
+ Eraser = [
703
+ [
704
+ "path",
705
+ {
706
+ d: "M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21"
707
+ }
708
+ ],
709
+ ["path", { d: "m5.082 11.09 8.828 8.828" }]
710
+ ];
711
+ GripHorizontal = [
712
+ ["circle", { cx: "12", cy: "9", r: "1" }],
713
+ ["circle", { cx: "19", cy: "9", r: "1" }],
714
+ ["circle", { cx: "5", cy: "9", r: "1" }],
715
+ ["circle", { cx: "12", cy: "15", r: "1" }],
716
+ ["circle", { cx: "19", cy: "15", r: "1" }],
717
+ ["circle", { cx: "5", cy: "15", r: "1" }]
718
+ ];
719
+ GripVertical = [
720
+ ["circle", { cx: "9", cy: "12", r: "1" }],
721
+ ["circle", { cx: "9", cy: "5", r: "1" }],
722
+ ["circle", { cx: "9", cy: "19", r: "1" }],
723
+ ["circle", { cx: "15", cy: "12", r: "1" }],
724
+ ["circle", { cx: "15", cy: "5", r: "1" }],
725
+ ["circle", { cx: "15", cy: "19", r: "1" }]
726
+ ];
727
+ Heading1 = [
728
+ ["path", { d: "M4 12h8" }],
729
+ ["path", { d: "M4 18V6" }],
730
+ ["path", { d: "M12 18V6" }],
731
+ ["path", { d: "m17 12 3-2v8" }]
732
+ ];
733
+ Heading2 = [
734
+ ["path", { d: "M4 12h8" }],
735
+ ["path", { d: "M4 18V6" }],
736
+ ["path", { d: "M12 18V6" }],
737
+ ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }]
738
+ ];
739
+ Heading3 = [
740
+ ["path", { d: "M4 12h8" }],
741
+ ["path", { d: "M4 18V6" }],
742
+ ["path", { d: "M12 18V6" }],
743
+ ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }],
744
+ ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }]
745
+ ];
746
+ Highlighter = [
747
+ ["path", { d: "m9 11-6 6v3h9l3-3" }],
748
+ ["path", { d: "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" }]
749
+ ];
750
+ Image = [
751
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }],
752
+ ["circle", { cx: "9", cy: "9", r: "2" }],
753
+ ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]
754
+ ];
755
+ Info = [
756
+ ["circle", { cx: "12", cy: "12", r: "10" }],
757
+ ["path", { d: "M12 16v-4" }],
758
+ ["path", { d: "M12 8h.01" }]
759
+ ];
760
+ Italic = [
761
+ ["line", { x1: "19", x2: "10", y1: "4", y2: "4" }],
762
+ ["line", { x1: "14", x2: "5", y1: "20", y2: "20" }],
763
+ ["line", { x1: "15", x2: "9", y1: "4", y2: "20" }]
764
+ ];
765
+ ListOrdered = [
766
+ ["path", { d: "M11 5h10" }],
767
+ ["path", { d: "M11 12h10" }],
768
+ ["path", { d: "M11 19h10" }],
769
+ ["path", { d: "M4 4h1v5" }],
770
+ ["path", { d: "M4 9h2" }],
771
+ ["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" }]
772
+ ];
773
+ ListTodo = [
774
+ ["path", { d: "M13 5h8" }],
775
+ ["path", { d: "M13 12h8" }],
776
+ ["path", { d: "M13 19h8" }],
777
+ ["path", { d: "m3 17 2 2 4-4" }],
778
+ ["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1" }]
779
+ ];
780
+ List = [
781
+ ["path", { d: "M3 5h.01" }],
782
+ ["path", { d: "M3 12h.01" }],
783
+ ["path", { d: "M3 19h.01" }],
784
+ ["path", { d: "M8 5h13" }],
785
+ ["path", { d: "M8 12h13" }],
786
+ ["path", { d: "M8 19h13" }]
787
+ ];
788
+ Merge = [
789
+ ["path", { d: "m8 6 4-4 4 4" }],
790
+ ["path", { d: "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }],
791
+ ["path", { d: "m20 22-5-5" }]
792
+ ];
793
+ Minus = [["path", { d: "M5 12h14" }]];
794
+ NotebookPen = [
795
+ ["path", { d: "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4" }],
796
+ ["path", { d: "M2 6h4" }],
797
+ ["path", { d: "M2 10h4" }],
798
+ ["path", { d: "M2 14h4" }],
799
+ ["path", { d: "M2 18h4" }],
800
+ [
801
+ "path",
802
+ {
803
+ d: "M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"
804
+ }
805
+ ]
806
+ ];
807
+ PaintBucket = [
808
+ ["path", { d: "m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z" }],
809
+ ["path", { d: "m5 2 5 5" }],
810
+ ["path", { d: "M2 13h15" }],
811
+ ["path", { d: "M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z" }]
812
+ ];
813
+ PanelBottom = [
814
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
815
+ ["path", { d: "M3 15h18" }]
816
+ ];
817
+ PanelLeft = [
818
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
819
+ ["path", { d: "M9 3v18" }]
820
+ ];
821
+ PanelRight = [
822
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
823
+ ["path", { d: "M15 3v18" }]
824
+ ];
825
+ PanelTop = [
826
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
827
+ ["path", { d: "M3 9h18" }]
828
+ ];
829
+ Pilcrow = [
830
+ ["path", { d: "M13 4v16" }],
831
+ ["path", { d: "M17 4v16" }],
832
+ ["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }]
833
+ ];
834
+ Plus = [
835
+ ["path", { d: "M5 12h14" }],
836
+ ["path", { d: "M12 5v14" }]
837
+ ];
838
+ Quote = [
839
+ [
840
+ "path",
841
+ {
842
+ d: "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
843
+ }
844
+ ],
845
+ [
846
+ "path",
847
+ {
848
+ d: "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
849
+ }
850
+ ]
851
+ ];
852
+ Redo2 = [
853
+ ["path", { d: "m15 14 5-5-5-5" }],
854
+ ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }]
855
+ ];
856
+ Rows3 = [
857
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
858
+ ["path", { d: "M21 9H3" }],
859
+ ["path", { d: "M21 15H3" }]
860
+ ];
861
+ Split = [
862
+ ["path", { d: "M16 3h5v5" }],
863
+ ["path", { d: "M8 3H3v5" }],
864
+ ["path", { d: "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" }],
865
+ ["path", { d: "m15 9 6-6" }]
866
+ ];
867
+ Strikethrough = [
868
+ ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4" }],
869
+ ["path", { d: "M14 12a4 4 0 0 1 0 8H6" }],
870
+ ["line", { x1: "4", x2: "20", y1: "12", y2: "12" }]
871
+ ];
872
+ Table2 = [
873
+ [
874
+ "path",
875
+ {
876
+ d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"
877
+ }
878
+ ]
879
+ ];
880
+ TextAlignCenter = [
881
+ ["path", { d: "M21 5H3" }],
882
+ ["path", { d: "M17 12H7" }],
883
+ ["path", { d: "M19 19H5" }]
884
+ ];
885
+ TextAlignEnd = [
886
+ ["path", { d: "M21 5H3" }],
887
+ ["path", { d: "M21 12H9" }],
888
+ ["path", { d: "M21 19H7" }]
889
+ ];
890
+ TextAlignStart = [
891
+ ["path", { d: "M21 5H3" }],
892
+ ["path", { d: "M15 12H3" }],
893
+ ["path", { d: "M17 19H3" }]
894
+ ];
895
+ Trash2 = [
896
+ ["path", { d: "M10 11v6" }],
897
+ ["path", { d: "M14 11v6" }],
898
+ ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }],
899
+ ["path", { d: "M3 6h18" }],
900
+ ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]
901
+ ];
902
+ TriangleAlert = [
903
+ ["path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }],
904
+ ["path", { d: "M12 9v4" }],
905
+ ["path", { d: "M12 17h.01" }]
906
+ ];
907
+ Underline = [
908
+ ["path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }],
909
+ ["line", { x1: "4", x2: "20", y1: "20", y2: "20" }]
910
+ ];
911
+ Undo2 = [
912
+ ["path", { d: "M9 14 4 9l5-5" }],
913
+ ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" }]
914
+ ];
915
+ LOOMA_ICONS = {
916
+ "align-center": TextAlignCenter,
917
+ "align-left": TextAlignStart,
918
+ "align-right": TextAlignEnd,
919
+ bold: Bold,
920
+ braces: Braces,
921
+ "circle-check": CircleCheck,
922
+ "circle-x": CircleX,
923
+ "chevron-down": ChevronDown,
924
+ "chevron-left": ChevronLeft,
925
+ "code-xml": CodeXml,
926
+ columns: Columns3,
927
+ ellipsis: Ellipsis,
928
+ eraser: Eraser,
929
+ "grip-horizontal": GripHorizontal,
930
+ "grip-vertical": GripVertical,
931
+ "heading-1": Heading1,
932
+ "heading-2": Heading2,
933
+ "heading-3": Heading3,
934
+ highlighter: Highlighter,
935
+ image: Image,
936
+ info: Info,
937
+ italic: Italic,
938
+ list: List,
939
+ "list-ordered": ListOrdered,
940
+ "list-todo": ListTodo,
941
+ merge: Merge,
942
+ "notebook-pen": NotebookPen,
943
+ minus: Minus,
944
+ "paint-bucket": PaintBucket,
945
+ "panel-bottom": PanelBottom,
946
+ "panel-left": PanelLeft,
947
+ "panel-right": PanelRight,
948
+ "panel-top": PanelTop,
949
+ pilcrow: Pilcrow,
950
+ plus: Plus,
951
+ quote: Quote,
952
+ redo: Redo2,
953
+ rows: Rows3,
954
+ split: Split,
955
+ strikethrough: Strikethrough,
956
+ table: Table2,
957
+ trash: Trash2,
958
+ "triangle-alert": TriangleAlert,
959
+ underline: Underline,
960
+ undo: Undo2
961
+ };
962
+ }
963
+ });
964
+
965
+ // dist/esm/ui-callout.entry.js
966
+ var ui_callout_entry_exports = {};
967
+ __export(ui_callout_entry_exports, {
968
+ ui_callout: () => UICallout
969
+ });
970
+ var uiCalloutCss, toneIcons, UICallout;
971
+ var init_ui_callout_entry = __esm({
972
+ "dist/esm/ui-callout.entry.js"() {
973
+ init_index_8BGiMGQ0();
974
+ init_icons_CoFximGM();
975
+ uiCalloutCss = () => `:host{--ui-callout-surface:var(--ui-info-soft);--ui-callout-text:var(--ui-text-primary);--ui-callout-border:var(--ui-info-solid);--ui-callout-icon:var(--ui-info-solid);--ui-callout-padding-block:var(--ui-space-2);--ui-callout-padding-inline:var(--ui-space-3);--ui-callout-icon-column:1rem;--ui-callout-gap:var(--ui-space-2);--ui-callout-icon-size:1rem;--ui-callout-border-width:1px;--ui-callout-leading-border-width:4px;display:block;max-width:100%}.callout__surface{display:grid;grid-template-columns:var(--ui-callout-icon-column) minmax(0, 1fr);gap:var(--ui-callout-gap);align-items:start;padding:var(--ui-callout-padding-block) var(--ui-callout-padding-inline);border:var(--ui-callout-border-width) solid color-mix(in srgb, var(--ui-callout-border) 35%, transparent);border-inline-start:var(--ui-callout-leading-border-width) solid var(--ui-callout-border);border-radius:var(--ui-radius-2);background:var(--ui-callout-surface);color:var(--ui-callout-text);font-family:var(--ui-font-family-sans);font-size:var(--ui-font-size-sm);font-weight:var(--ui-font-normal);line-height:var(--ui-line-height-md)}.icon{display:grid;place-items:center;inline-size:var(--ui-callout-icon-column);block-size:var(--ui-callout-icon-column);color:var(--ui-callout-icon)}.icon svg{inline-size:var(--ui-callout-icon-size);block-size:var(--ui-callout-icon-size)}.content{min-inline-size:0}:host([data-tone='note']){--ui-callout-surface:var(--ui-surface-muted);--ui-callout-border:var(--ui-border-strong);--ui-callout-icon:var(--ui-text-secondary)}:host([data-tone='warning']){--ui-callout-surface:var(--ui-warning-soft);--ui-callout-border:var(--ui-warning-solid);--ui-callout-icon:var(--ui-warning-solid)}:host([data-tone='success']){--ui-callout-surface:var(--ui-success-soft);--ui-callout-border:var(--ui-success-solid);--ui-callout-icon:var(--ui-success-solid)}:host([data-tone='error']){--ui-callout-surface:var(--ui-danger-soft);--ui-callout-border:var(--ui-danger-solid);--ui-callout-icon:var(--ui-danger-solid)}`;
976
+ toneIcons = {
977
+ info: "info",
978
+ note: "notebook-pen",
979
+ warning: "triangle-alert",
980
+ success: "circle-check",
981
+ error: "circle-x"
982
+ };
983
+ UICallout = class {
984
+ constructor(hostRef) {
985
+ registerInstance(this, hostRef);
986
+ }
987
+ tone = "info";
988
+ render() {
989
+ const icon = toneIcons[this.tone] ?? toneIcons.info;
990
+ return h(Host, { key: "94bae6fbb688e5c8da979a3bebc12c51b8689c8a", role: "note", "data-tone": this.tone }, h("div", { key: "8fe1a3dae5b7cd3679d187cef018fa0cd810fb76", class: "callout__surface" }, h("span", { key: "ed62ad8e29c30489e075631d83f1732d7a53a378", class: "icon", "aria-hidden": "true", innerHTML: loomaIconMarkup(icon) }), h("div", { key: "97638d28e3979f71913c17b2501a90e3a9251f0f", class: "content" }, h("slot", { key: "6a91a0d3f189eae28aabbe278924ba7f89015f34" }))));
991
+ }
992
+ };
993
+ UICallout.style = uiCalloutCss();
994
+ }
995
+ });
996
+
997
+ // dist/esm/controlled-state-BnGhGgTH.js
998
+ var isControlled, controlledOrDefault;
999
+ var init_controlled_state_BnGhGgTH = __esm({
1000
+ "dist/esm/controlled-state-BnGhGgTH.js"() {
1001
+ isControlled = (value) => value !== void 0;
1002
+ controlledOrDefault = (value, defaultValue) => value === void 0 ? defaultValue : value;
1003
+ }
1004
+ });
1005
+
1006
+ // dist/esm/ui-checkbox.entry.js
1007
+ var ui_checkbox_entry_exports = {};
1008
+ __export(ui_checkbox_entry_exports, {
1009
+ ui_checkbox: () => UICheckbox
1010
+ });
1011
+ var uiCheckboxCss, UICheckbox;
1012
+ var init_ui_checkbox_entry = __esm({
1013
+ "dist/esm/ui-checkbox.entry.js"() {
1014
+ init_index_8BGiMGQ0();
1015
+ init_events_JwSoedEO();
1016
+ init_controlled_state_BnGhGgTH();
1017
+ uiCheckboxCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='checkbox']){accent-color:var(--ui-accent-solid);width:1.125em;height:1.125em;cursor:pointer}::slotted(input[type='checkbox']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
1018
+ UICheckbox = class {
1019
+ constructor(hostRef) {
1020
+ registerInstance(this, hostRef);
1021
+ }
1022
+ get host() {
1023
+ return getElement(this);
1024
+ }
1025
+ /** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
1026
+ checked;
1027
+ defaultChecked = false;
1028
+ disabled = false;
1029
+ indeterminate = false;
1030
+ required = false;
1031
+ value = "on";
1032
+ internalChecked = false;
1033
+ slotRef;
1034
+ syncFromProp() {
1035
+ if (isControlled(this.checked))
1036
+ this.internalChecked = this.checked;
1037
+ }
1038
+ syncToInput() {
1039
+ const input = this.getInput();
1040
+ if (!input)
1041
+ return;
1042
+ this.host.dataset.disabled = this.disabled ? "true" : "";
1043
+ this.host.setAttribute("aria-disabled", String(this.disabled));
1044
+ input.checked = this.internalChecked;
1045
+ input.indeterminate = this.indeterminate;
1046
+ input.disabled = this.disabled;
1047
+ input.required = this.required;
1048
+ input.value = this.value;
1049
+ }
1050
+ componentDidLoad() {
1051
+ this.internalChecked = controlledOrDefault(this.checked, this.defaultChecked);
1052
+ this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
1053
+ this.syncToInput();
1054
+ const input = this.getInput();
1055
+ input?.addEventListener("change", this.onInputChange);
1056
+ }
1057
+ disconnectedCallback() {
1058
+ const input = this.getInput();
1059
+ input?.removeEventListener("change", this.onInputChange);
1060
+ }
1061
+ componentDidUpdate() {
1062
+ this.syncToInput();
1063
+ }
1064
+ getInput() {
1065
+ const slot = this.host.shadowRoot?.querySelector("slot");
1066
+ const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
1067
+ return nodes.find((el) => el instanceof HTMLInputElement && el.type === "checkbox") ?? null;
1068
+ }
1069
+ onInputChange = (e) => {
1070
+ const input = e.target;
1071
+ if (!input)
1072
+ return;
1073
+ const checked = input.checked;
1074
+ if (!isControlled(this.checked))
1075
+ this.internalChecked = checked;
1076
+ else
1077
+ this.syncToInput();
1078
+ this.indeterminate = input.indeterminate;
1079
+ dispatchDetail(this.host, "change", {
1080
+ checked,
1081
+ value: this.value,
1082
+ trigger: eventToTrigger(e)
1083
+ });
1084
+ };
1085
+ render() {
1086
+ return h(Host, { key: "eb46eb41a5ab871058960bd2aa1163a03144bc0f", role: "checkbox", "aria-checked": this.indeterminate ? "mixed" : String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "ce18b1f1b63efebf048cd67b87064641cf4d915c", ref: (el) => this.slotRef = el }));
1087
+ }
1088
+ static get watchers() {
1089
+ return {
1090
+ "checked": [{
1091
+ "syncFromProp": 0
1092
+ }],
1093
+ "internalChecked": [{
1094
+ "syncToInput": 0
1095
+ }],
1096
+ "indeterminate": [{
1097
+ "syncToInput": 0
1098
+ }],
1099
+ "disabled": [{
1100
+ "syncToInput": 0
1101
+ }],
1102
+ "required": [{
1103
+ "syncToInput": 0
1104
+ }]
1105
+ };
1106
+ }
1107
+ };
1108
+ UICheckbox.style = uiCheckboxCss();
1109
+ }
1110
+ });
1111
+
1112
+ // dist/esm/manager-C-0syqXZ.js
1113
+ function syncScrollLock() {
1114
+ if (typeof document === "undefined") {
1115
+ return;
1116
+ }
1117
+ const root = document.documentElement;
1118
+ if (modalCount > 0) {
1119
+ root.setAttribute(scrollLockAttribute, "true");
1120
+ root.style.overflow = "hidden";
1121
+ return;
1122
+ }
1123
+ root.removeAttribute(scrollLockAttribute);
1124
+ root.style.removeProperty("overflow");
1125
+ }
1126
+ function getOverlayDismissible(record) {
1127
+ return record.dismissible ?? true;
1128
+ }
1129
+ function handleEscape(event) {
1130
+ if (event.key !== "Escape") {
1131
+ return;
1132
+ }
1133
+ requestTopOverlayClose("escape", "keyboard");
1134
+ }
1135
+ function handleLightDismiss(event) {
1136
+ const top = getTopOverlay();
1137
+ if (!top || !getOverlayDismissible(top)) {
1138
+ return;
1139
+ }
1140
+ const boundary = [top.element, ...top.relatedElements ?? []];
1141
+ if (event.composedPath().some((target) => target instanceof Node && boundary.some((element) => element.contains(target))))
1142
+ return;
1143
+ requestTopOverlayClose("light-dismiss", "pointer");
1144
+ }
1145
+ function ensureListeners() {
1146
+ if (listenersAttached || typeof document === "undefined") {
1147
+ return;
1148
+ }
1149
+ document.addEventListener("keydown", handleEscape);
1150
+ document.addEventListener("pointerdown", handleLightDismiss, { capture: true });
1151
+ listenersAttached = true;
1152
+ }
1153
+ function removeListenersIfIdle() {
1154
+ if (!listenersAttached || stack.length > 0 || typeof document === "undefined") {
1155
+ return;
1156
+ }
1157
+ document.removeEventListener("keydown", handleEscape);
1158
+ document.removeEventListener("pointerdown", handleLightDismiss, { capture: true });
1159
+ listenersAttached = false;
1160
+ }
1161
+ function openOverlay(record) {
1162
+ closeOverlay(record.id);
1163
+ stack.push(record);
1164
+ if (record.modal) {
1165
+ modalCount += 1;
1166
+ syncScrollLock();
1167
+ }
1168
+ ensureListeners();
1169
+ }
1170
+ function closeOverlay(id) {
1171
+ const index = stack.findIndex((record) => record.id === id);
1172
+ if (index >= 0) {
1173
+ const [record] = stack.splice(index, 1);
1174
+ if (record?.modal) {
1175
+ modalCount = Math.max(0, modalCount - 1);
1176
+ syncScrollLock();
1177
+ }
1178
+ }
1179
+ removeListenersIfIdle();
1180
+ }
1181
+ function getTopOverlay() {
1182
+ return stack.at(-1);
1183
+ }
1184
+ function requestTopOverlayClose(reason, trigger) {
1185
+ const top = getTopOverlay();
1186
+ if (!top) {
1187
+ return false;
1188
+ }
1189
+ if (!getOverlayDismissible(top) && (reason === "escape" || reason === "light-dismiss")) {
1190
+ return false;
1191
+ }
1192
+ top.requestClose(reason, trigger);
1193
+ return true;
1194
+ }
1195
+ var stack, scrollLockAttribute, modalCount, listenersAttached;
1196
+ var init_manager_C_0syqXZ = __esm({
1197
+ "dist/esm/manager-C-0syqXZ.js"() {
1198
+ stack = [];
1199
+ scrollLockAttribute = "data-ui-scroll-lock";
1200
+ modalCount = 0;
1201
+ listenersAttached = false;
1202
+ }
1203
+ });
1204
+
1205
+ // dist/esm/ui-chip_2.entry.js
1206
+ var ui_chip_2_entry_exports = {};
1207
+ __export(ui_chip_2_entry_exports, {
1208
+ ui_chip: () => UIChip,
1209
+ ui_combobox: () => UICombobox
1210
+ });
1211
+ function formatEditingValue(raw, selection, format) {
1212
+ const unchanged = { display: raw, selection };
1213
+ if (!format)
1214
+ return unchanged;
1215
+ let result;
1216
+ try {
1217
+ result = format(raw, selection);
1218
+ } catch {
1219
+ return unchanged;
1220
+ }
1221
+ if (!result)
1222
+ return unchanged;
1223
+ const characters = Array.from(raw);
1224
+ let cursor = 0;
1225
+ for (const character of result.display)
1226
+ if (character === characters[cursor])
1227
+ cursor += 1;
1228
+ 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)
1229
+ return unchanged;
1230
+ return result;
1231
+ }
1232
+ async function validateField(request, config) {
1233
+ let output = request.raw;
1234
+ let issues = [];
1235
+ const check = () => request.signal.throwIfAborted();
1236
+ try {
1237
+ check();
1238
+ if (config.parse)
1239
+ output = await config.parse(request.raw, request);
1240
+ check();
1241
+ if (config.schema) {
1242
+ const result = await config.schema["~standard"].validate(output);
1243
+ check();
1244
+ if (result.issues)
1245
+ issues = result.issues;
1246
+ else if ("value" in result)
1247
+ output = result.value;
1248
+ }
1249
+ if (!issues.some((issue) => issue.severity !== "warning")) {
1250
+ if (config.normalize)
1251
+ output = await config.normalize(output, request);
1252
+ check();
1253
+ if (config.validator) {
1254
+ const result = await config.validator(output, request);
1255
+ check();
1256
+ issues = [...issues, ...result.issues ?? []];
1257
+ if ("output" in result)
1258
+ output = result.output;
1259
+ }
1260
+ }
902
1261
  } catch (error) {
903
1262
  check();
904
1263
  issues = [{ message: error instanceof Error ? error.message : "Unable to validate this value." }];
@@ -906,12 +1265,26 @@ async function validateField(request, config) {
906
1265
  issues = [...issues, ...config.issues ?? []];
907
1266
  return { output: issues.some((issue) => issue.severity !== "warning") ? void 0 : output, issues };
908
1267
  }
909
- var uiComboboxCss, UICombobox;
910
- var init_ui_combobox_entry = __esm({
911
- "dist/esm/ui-combobox.entry.js"() {
1268
+ var uiChipCss, UIChip, uiComboboxCss, UICombobox;
1269
+ var init_ui_chip_2_entry = __esm({
1270
+ "dist/esm/ui-chip_2.entry.js"() {
912
1271
  init_index_8BGiMGQ0();
913
1272
  init_positioning_Bu0dmLBE();
914
1273
  init_manager_C_0syqXZ();
1274
+ uiChipCss = () => `:host{--ui-chip-surface:var(--ui-surface-subtle);--ui-chip-text:var(--ui-text-secondary);--ui-chip-border:var(--ui-border-default);--ui-chip-font-size:var(--ui-font-size-xs);--ui-chip-font-weight:var(--ui-font-normal);--ui-chip-line-height:var(--ui-line-height-tight);--ui-chip-padding-block:var(--ui-space-0-5);--ui-chip-padding-inline:var(--ui-space-2);--ui-chip-notch:var(--ui-space-1);display:inline-flex;max-width:100%}:host([data-size='sm']){--ui-chip-font-size:var(--ui-font-size-sm)}.chip__surface{display:inline-flex;align-items:center;max-width:100%;padding:var(--ui-chip-padding-block) var(--ui-chip-padding-inline);border:1px solid var(--ui-chip-border);background:var(--ui-chip-surface);color:var(--ui-chip-text) !important;font-family:var(--ui-font-family-sans) !important;font-size:var(--ui-chip-font-size) !important;font-weight:var(--ui-chip-font-weight) !important;line-height:var(--ui-chip-line-height) !important;white-space:nowrap}:host([data-appearance='pill']) .chip__surface{border-radius:var(--ui-radius-round)}:host([data-appearance='tag']) .chip__surface{border:0;padding-inline-end:calc(var(--ui-chip-padding-inline) + var(--ui-chip-notch));clip-path:polygon(0 0, calc(100% - var(--ui-chip-notch)) 0, 100% 50%, calc(100% - var(--ui-chip-notch)) 100%, 0 100%)}`;
1275
+ UIChip = class {
1276
+ constructor(hostRef) {
1277
+ registerInstance(this, hostRef);
1278
+ }
1279
+ /** `tag` has a square leading edge and an angled trailing edge; `pill` is fully rounded. */
1280
+ appearance = "tag";
1281
+ /** Compact typography size. */
1282
+ size = "xs";
1283
+ render() {
1284
+ return h(Host, { key: "970cb48cf8d70c47feaab90fe428c09f0d052a03", "data-appearance": this.appearance, "data-size": this.size }, h("span", { key: "6d8c6104d2869520097a2a61bd2a887b363b4912", class: "chip__surface" }, h("slot", { key: "b61c50a8060d8a2684aed6f87dc859b1c9e99858" })));
1285
+ }
1286
+ };
1287
+ UIChip.style = uiChipCss();
915
1288
  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}}`;
916
1289
  UICombobox = class {
917
1290
  constructor(hostRef) {
@@ -943,6 +1316,8 @@ var init_ui_combobox_entry = __esm({
943
1316
  readOnly = false;
944
1317
  required = false;
945
1318
  size = "md";
1319
+ /** Keep the native label accessible while allowing compact composed controls. */
1320
+ labelVisibility = "visible";
946
1321
  disclosure = false;
947
1322
  clearable = false;
948
1323
  /** Optional description shown by the connected question-mark button. */
@@ -1169,7 +1544,8 @@ var init_ui_combobox_entry = __esm({
1169
1544
  }, reason === "disclosure" ? 0 : Math.max(0, config.debounce ?? 200));
1170
1545
  }
1171
1546
  get canCreate() {
1172
- return Boolean(this.config.allowCreate && this.raw.trim() && !this.loading && !this.lookupError && !this.rows.some((row) => row.label.toLocaleLowerCase() === this.raw.toLocaleLowerCase()));
1547
+ const candidates = this.config.options ? [...this.config.options, ...this.rows] : this.rows;
1548
+ return Boolean(this.config.allowCreate && this.raw.trim() && !this.loading && !this.lookupError && !candidates.some((row) => row.label.toLocaleLowerCase() === this.raw.toLocaleLowerCase()));
1173
1549
  }
1174
1550
  format(timing) {
1175
1551
  if ((this.config.formatOn ?? "blur") !== timing || !this.input)
@@ -1349,24 +1725,31 @@ var init_ui_combobox_entry = __esm({
1349
1725
  }
1350
1726
  return this.validation;
1351
1727
  }
1728
+ /** Focus the native editing input from a composed control. */
1729
+ async focusInput() {
1730
+ this.input?.focus();
1731
+ }
1352
1732
  render() {
1353
1733
  const description = [this.helpOpen ? "help-text" : "", this.validation.issues.length ? "validation" : ""].filter(Boolean).join(" ") || void 0;
1354
1734
  const status = this.loading ? "Loading suggestions\u2026" : this.lookupError || (this.expanded ? `${this.rows.length} suggestions available.` : "");
1355
1735
  const groups = [...new Set(this.rows.map((row) => row.group ?? ""))];
1356
- return h(Host, { key: "2378bfd8473852642fef21898f4a756eb3b092ba", "data-size": this.size, "data-validation": this.validation.status, onFocusout: this.onFocusOut }, h("label", { key: "7aba65aeb336d490ddeaf5db9bba9db8ab8b9dbb", htmlFor: "input", part: "label" }, this.label, this.required ? " *" : ""), h("div", { key: "ee87156259d0fe1e2e56c4b36667e8daf5e1e2c1", class: "field", part: "field", ref: (element) => this.field = element }, h("input", { key: "35c5b85ff9a4bcba9bddaf85ff1f118a94aa077b", 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: () => {
1736
+ return h(Host, { key: "a33890c2824f29dfea5e22edddca4480a6d1d032", "data-size": this.size, "data-validation": this.validation.status, onFocusout: this.onFocusOut }, h("label", { key: "c936530cf696c1d14245fd83895e9c58c908df12", htmlFor: "input", part: "label", class: this.labelVisibility === "sr-only" ? "sr-only" : void 0 }, this.label, this.required ? " *" : ""), h("div", { key: "0fe0ed9b15a3e256867e071ca7e4fa3abc66f27c", class: "field", part: "field", ref: (element) => this.field = element, onClick: (event) => {
1737
+ if (!event.composedPath().some((node) => node instanceof HTMLButtonElement))
1738
+ this.input?.focus();
1739
+ } }, h("slot", { key: "9cc4c22eb7776e415792fbdf3c17c962c7107f70", name: "start" }), h("input", { key: "0898e8ec5af57c7ba8ad227164f7955ef4011729", 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: () => {
1357
1740
  this.composing = false;
1358
1741
  this.onInput(new InputEvent("input"));
1359
- } }), this.clearable && h("button", { key: "74e4f44836b751ab5e9f794a39b480602e0c106d", type: "button", part: "affordance", "aria-label": `Clear ${this.label}`, disabled: this.disabled || this.readOnly, onClick: () => {
1742
+ } }), this.clearable && h("button", { key: "f9a49484ae9bcc4ace72a46d0c59202040ff39d8", type: "button", part: "affordance", "aria-label": `Clear ${this.label}`, disabled: this.disabled || this.readOnly, onClick: () => {
1360
1743
  this.commit(null, "", null, "clear", "pointer");
1361
1744
  this.close();
1362
1745
  this.input?.focus();
1363
- } }, "\xD7"), this.help && h("button", { key: "c870ced139fb22baa50a1795ab78f14c38647d34", id: "help", type: "button", part: "affordance", "aria-label": `Help for ${this.label}`, disabled: this.disabled }, h("span", { key: "ba3dc5128c1941b21b53a5ba78a27017b3df5ec8", "aria-hidden": "true" }, "?")), this.disclosure && h("button", { key: "eced588e3fa7958dd6185173faaef01219c30243", type: "button", part: "affordance", "aria-label": `Suggestions for ${this.label}`, "aria-controls": "listbox", "aria-expanded": String(this.expanded), disabled: this.disabled || this.readOnly, onClick: () => {
1746
+ } }, "\xD7"), this.help && h("button", { key: "597106eda4dcc68aa9fb2eaa99c1edad0d68a892", id: "help", type: "button", part: "affordance", "aria-label": `Help for ${this.label}`, disabled: this.disabled }, h("span", { key: "d26085a52b16d65e26dc20ef8afacb5defec5f7b", "aria-hidden": "true" }, "?")), this.disclosure && h("button", { key: "391d1c987eb8e868b2846eafd0627cfc78ab7478", type: "button", part: "affordance", "aria-label": `Suggestions for ${this.label}`, "aria-controls": "listbox", "aria-expanded": String(this.expanded), disabled: this.disabled || this.readOnly, onClick: () => {
1364
1747
  if (this.expanded)
1365
1748
  this.close();
1366
1749
  else
1367
1750
  this.open("disclosure");
1368
1751
  this.input?.focus();
1369
- } }, h("span", { key: "7cb9f7f2bb15246dcdd2348ea0ca656d1d0c8c33", "aria-hidden": "true" }, "\u2304"))), this.help && h("ui-tooltip", { key: "b1b5d42ca457f9b951758bb5e816c8dbbcd1087d", id: "help-text", for: "help", toggleOnClick: true, onOpen: () => this.helpOpen = true, onClose: () => this.helpOpen = false }, this.help), h("div", { key: "9eca2df66c72917e6bfda21205c2a4ef97dd91d5", class: "popup", part: "popup", hidden: !this.expanded, ref: (element) => this.popup = element }, h("div", { key: "641e1f137c9cfef5d08ec99f6178e59487a20bf1", 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: "38a3aa6b2ffae30e6f81e1f89d10c9966dd31b10", 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: "dd3e895ef363f6d30a0c25e4b5092a8feacc63e5", 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: "9cf12a8fde7d9cfb9e2d2a77669ac4708c7fded6", id: "validation", class: "message", part: "validation", hidden: !this.validation.issues.length }, this.validation.issues.map((issue) => h("div", null, issue.message))), h("div", { key: "1c7b1d3f658e500cbf5f5004a76a39511cc79c49", 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(" ")));
1752
+ } }, h("span", { key: "45678ce468fd7944306d4542e3c6af0fe211af14", "aria-hidden": "true" }, "\u2304"))), this.help && h("ui-tooltip", { key: "a8dc037639a60aff5a12b4651ffa10fc5ccd33eb", id: "help-text", for: "help", toggleOnClick: true, onOpen: () => this.helpOpen = true, onClose: () => this.helpOpen = false }, this.help), h("div", { key: "f13fc7a11c3d22995035b6701ea24637a048a5b8", class: "popup", part: "popup", hidden: !this.expanded, ref: (element) => this.popup = element }, h("div", { key: "9d2bdfcc558f8e7de87f2915ea5607a8f32c1762", 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: "9495fd43a721c84621b8083cb8eac776f843ab59", 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: "f0407c5622dcf3b325985c136657f8b9ac8a4ab5", 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("slot", { key: "efcaee3efb029a9e0bb4e033ab61b251331c1c93", name: "footer" })), h("div", { key: "b44ccb319f94ebc9e6ac3204a8c1771d49485a58", id: "validation", class: "message", part: "validation", hidden: !this.validation.issues.length }, this.validation.issues.map((issue) => h("div", null, issue.message))), h("div", { key: "c3cb51dd4603734af4c7a02d8fe0bb42ac69083a", 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(" ")));
1370
1753
  }
1371
1754
  static get watchers() {
1372
1755
  return {
@@ -1613,7 +1996,7 @@ var init_ui_context_menu_entry = __esm({
1613
1996
  this.closeMenu("action", "pointer");
1614
1997
  };
1615
1998
  render() {
1616
- return h(Host, { key: "641dd3aba6120cf4187f4503c64029eaf307dc4f", "data-open": this.internalOpen ? "" : void 0, "data-focus-trigger": this.internalOpen ? this.focusTrigger : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "3f550349f9537b951b50a8c291f1951dd5a3b723", name: "trigger" }), h("div", { key: "a612523f054986122638722340d8135c44a85399", class: "menu", "data-open": this.internalOpen ? "" : void 0 }, h("ui-menu", { key: "0711879d09900183e938d8942abb8b9032812a5f", open: this.internalOpen }, h("slot", { key: "8e088dd20a48d8fb81126f2dd020abb886e86e22" }))));
1999
+ return h(Host, { key: "171e647667bab4a9f905f2b531aa2db182fc426f", "data-open": this.internalOpen ? "" : void 0, "data-focus-trigger": this.internalOpen ? this.focusTrigger : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "f1a15e54ab3b14515553e05b4b3cf60ed7a99f8b", name: "trigger" }), h("div", { key: "450aaacf3f75a71ecce86300c0d824452ceec4a0", class: "menu", "data-open": this.internalOpen ? "" : void 0 }, h("ui-menu", { key: "667003b7c6ab3ccbaa888b25cb87d921036ab827", open: this.internalOpen }, h("slot", { key: "c0731115bc3dbd02c4125ef8208269dd97e124bf" }))));
1617
2000
  }
1618
2001
  static get watchers() {
1619
2002
  return {
@@ -1644,6 +2027,7 @@ var init_ui_dialog_entry = __esm({
1644
2027
  init_index_8BGiMGQ0();
1645
2028
  init_manager_C_0syqXZ();
1646
2029
  init_events_JwSoedEO();
2030
+ init_controlled_state_BnGhGgTH();
1647
2031
  uiDialogCss = () => `:host{display:block}:host:not([data-open]){display:none}:host dialog{--ui-dialog-duration:var(--ui-motion-base);--ui-dialog-viewport-gap:var(--ui-space-4, 1rem);position:fixed;inset:0;inline-size:min( calc(100% - (var(--ui-dialog-viewport-gap) * 2)), var(--ui-dialog-max-width, 440px) );max-inline-size:none;max-block-size:calc(100dvh - (var(--ui-dialog-viewport-gap) * 2));margin:auto;padding:var(--ui-space-4);overflow:auto;background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-dialog);box-shadow:var(--ui-shadow-dialog);visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-dialog-duration) var(--ui-motion-ease), transform var(--ui-dialog-duration) var(--ui-motion-ease), visibility var(--ui-dialog-duration), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1);animation:ui-dialog-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-enter{from{opacity:0;transform:scale(0.96)}}:host dialog::backdrop{background-color:transparent;transition:background-color var(--ui-dialog-duration) var(--ui-motion-ease), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]::backdrop{background-color:var(--ui-overlay-backdrop);animation:ui-dialog-backdrop-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-backdrop-enter{from{background-color:transparent}}`;
1648
2032
  UIDialog = class {
1649
2033
  constructor(hostRef) {
@@ -1652,17 +2036,27 @@ var init_ui_dialog_entry = __esm({
1652
2036
  get host() {
1653
2037
  return getElement(this);
1654
2038
  }
1655
- open = false;
2039
+ /** Controlled open state. Omit it to use defaultOpen and local interaction state. */
2040
+ open;
1656
2041
  defaultOpen = false;
1657
2042
  modal = true;
1658
2043
  dismissible = true;
1659
2044
  /** Accessible name forwarded to the native dialog surface. */
1660
2045
  label;
1661
2046
  internalOpen = false;
2047
+ accessibleLabel = "Dialog";
1662
2048
  overlayId = `ui-dialog-${Math.random().toString(36).slice(2, 11)}`;
1663
2049
  dialogRef;
2050
+ contentObserver = null;
1664
2051
  syncFromProp() {
1665
- this.internalOpen = this.open;
2052
+ if (isControlled(this.open))
2053
+ this.internalOpen = this.open;
2054
+ }
2055
+ syncLabelFromProp() {
2056
+ this.syncAccessibleLabel();
2057
+ }
2058
+ componentWillLoad() {
2059
+ this.syncAccessibleLabel();
1666
2060
  }
1667
2061
  syncOpen() {
1668
2062
  if (this.dialogRef) {
@@ -1682,20 +2076,29 @@ var init_ui_dialog_entry = __esm({
1682
2076
  }
1683
2077
  }
1684
2078
  componentDidLoad() {
1685
- this.syncFromProp();
1686
- this.internalOpen = this.internalOpen || this.defaultOpen;
2079
+ this.contentObserver = new MutationObserver(this.syncAccessibleLabel);
2080
+ this.contentObserver.observe(this.host, {
2081
+ childList: true,
2082
+ subtree: true,
2083
+ characterData: true
2084
+ });
2085
+ this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
1687
2086
  this.dialogRef?.addEventListener("close", this.onDialogClose);
2087
+ this.syncAccessibleLabel();
1688
2088
  this.syncOpen();
1689
2089
  }
1690
2090
  disconnectedCallback() {
1691
2091
  this.dialogRef?.removeEventListener("close", this.onDialogClose);
2092
+ this.contentObserver?.disconnect();
2093
+ this.contentObserver = null;
1692
2094
  closeOverlay(this.overlayId);
1693
2095
  }
1694
2096
  componentDidUpdate() {
1695
2097
  this.syncOpen();
1696
2098
  }
1697
2099
  handleRequestClose(reason, trigger) {
1698
- this.internalOpen = false;
2100
+ if (!isControlled(this.open))
2101
+ this.internalOpen = false;
1699
2102
  dispatchDetail(this.host, "close", {
1700
2103
  open: false,
1701
2104
  reason,
@@ -1704,8 +2107,12 @@ var init_ui_dialog_entry = __esm({
1704
2107
  }
1705
2108
  onDialogClose = () => {
1706
2109
  if (this.internalOpen) {
1707
- this.internalOpen = false;
1708
- closeOverlay(this.overlayId);
2110
+ if (!isControlled(this.open)) {
2111
+ this.internalOpen = false;
2112
+ closeOverlay(this.overlayId);
2113
+ } else {
2114
+ requestAnimationFrame(() => this.syncOpen());
2115
+ }
1709
2116
  dispatchDetail(this.host, "close", {
1710
2117
  open: false,
1711
2118
  reason: "programmatic",
@@ -1718,14 +2125,25 @@ var init_ui_dialog_entry = __esm({
1718
2125
  requestTopOverlayClose("escape", "keyboard");
1719
2126
  }
1720
2127
  };
2128
+ syncAccessibleLabel = () => {
2129
+ const explicitLabel = this.label?.trim();
2130
+ const heading = this.host.querySelector('[slot="heading"], [data-ui-dialog-title], h1, h2, h3, h4, h5, h6');
2131
+ const headingLabel = heading?.textContent?.trim();
2132
+ const nextLabel = explicitLabel || headingLabel || "Dialog";
2133
+ if (this.accessibleLabel !== nextLabel)
2134
+ this.accessibleLabel = nextLabel;
2135
+ };
1721
2136
  render() {
1722
- return h(Host, { key: "6e88afd3a595ab0eed3d82a046ffb15e1e167cdb", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("dialog", { key: "420e4d8de66245a5818a1284adb23a536ebcd907", ref: (el) => this.dialogRef = el, open: this.internalOpen, "aria-label": this.label }, h("slot", { key: "10604688504f013f79b7a6ed5f9ed36bc9c6b48b" })));
2137
+ return h(Host, { key: "6e12a287866c76305c791c0ae538dcde63da3044", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("dialog", { key: "99ba3815e8a8c70ce50ff08d9a8b162aa9c1011f", ref: (el) => this.dialogRef = el, open: this.internalOpen, "aria-label": this.accessibleLabel }, h("slot", { key: "e72b001877d2dfad1bcee9af87167c66d77fc952" })));
1723
2138
  }
1724
2139
  static get watchers() {
1725
2140
  return {
1726
2141
  "open": [{
1727
2142
  "syncFromProp": 0
1728
2143
  }],
2144
+ "label": [{
2145
+ "syncLabelFromProp": 0
2146
+ }],
1729
2147
  "internalOpen": [{
1730
2148
  "syncOpen": 0
1731
2149
  }]
@@ -1759,6 +2177,7 @@ var init_ui_disclosure_entry = __esm({
1759
2177
  init_index_8BGiMGQ0();
1760
2178
  init_id_hgBUJRDa();
1761
2179
  init_events_JwSoedEO();
2180
+ init_controlled_state_BnGhGgTH();
1762
2181
  uiDisclosureCss = () => `:host{display:block}::slotted([hidden]){display:none !important}`;
1763
2182
  UIDisclosure = class {
1764
2183
  constructor(hostRef) {
@@ -1767,7 +2186,8 @@ var init_ui_disclosure_entry = __esm({
1767
2186
  get host() {
1768
2187
  return getElement(this);
1769
2188
  }
1770
- open = false;
2189
+ /** Controlled open state. Omit it to use defaultOpen and local interaction state. */
2190
+ open;
1771
2191
  defaultOpen = false;
1772
2192
  disabled = false;
1773
2193
  internalOpen = false;
@@ -1775,7 +2195,8 @@ var init_ui_disclosure_entry = __esm({
1775
2195
  trigger = null;
1776
2196
  content = null;
1777
2197
  syncFromProp() {
1778
- this.internalOpen = this.open;
2198
+ if (isControlled(this.open))
2199
+ this.internalOpen = this.open;
1779
2200
  }
1780
2201
  syncState() {
1781
2202
  if (this.trigger) {
@@ -1787,8 +2208,7 @@ var init_ui_disclosure_entry = __esm({
1787
2208
  }
1788
2209
  componentDidLoad() {
1789
2210
  this.resolveParts();
1790
- this.syncFromProp();
1791
- this.internalOpen = this.internalOpen || this.defaultOpen;
2211
+ this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
1792
2212
  this.syncState();
1793
2213
  this.trigger?.addEventListener("click", this.onTriggerClick);
1794
2214
  this.trigger?.addEventListener("keydown", this.onTriggerKeydown);
@@ -1825,7 +2245,8 @@ var init_ui_disclosure_entry = __esm({
1825
2245
  setOpen(next, action) {
1826
2246
  if (this.internalOpen === next)
1827
2247
  return;
1828
- this.internalOpen = next;
2248
+ if (!isControlled(this.open))
2249
+ this.internalOpen = next;
1829
2250
  dispatchDetail(this.host, next ? "open" : "close", {
1830
2251
  open: next,
1831
2252
  reason: action.reason,
@@ -1846,7 +2267,7 @@ var init_ui_disclosure_entry = __esm({
1846
2267
  this.setOpen(!this.internalOpen, { reason: "action", trigger: "keyboard" });
1847
2268
  };
1848
2269
  render() {
1849
- return h(Host, { key: "3905d2d78a2d3d4ef36b582ba0f426be8e5e0f5e" }, h("slot", { key: "18547ff56457b73319264bba981f994fb947dffb" }));
2270
+ return h(Host, { key: "55f998f8e47ebe01fd5832d6c3dac310dda34b8d" }, h("slot", { key: "0d88728151901e1e412d7f5a3ae78b06aa7548fb" }));
1850
2271
  }
1851
2272
  static get watchers() {
1852
2273
  return {
@@ -1863,6 +2284,113 @@ var init_ui_disclosure_entry = __esm({
1863
2284
  }
1864
2285
  });
1865
2286
 
2287
+ // dist/esm/ui-editable.entry.js
2288
+ var ui_editable_entry_exports = {};
2289
+ __export(ui_editable_entry_exports, {
2290
+ ui_editable: () => UIEditable
2291
+ });
2292
+ var uiEditableCss, UIEditable;
2293
+ var init_ui_editable_entry = __esm({
2294
+ "dist/esm/ui-editable.entry.js"() {
2295
+ init_index_8BGiMGQ0();
2296
+ init_controlled_state_BnGhGgTH();
2297
+ uiEditableCss = () => `:host{display:block;min-inline-size:0}[hidden]{display:none !important}`;
2298
+ UIEditable = class {
2299
+ constructor(hostRef) {
2300
+ registerInstance(this, hostRef);
2301
+ this.editChange = createEvent(this, "edit-change");
2302
+ }
2303
+ get host() {
2304
+ return getElement(this);
2305
+ }
2306
+ /** Controlled edit state. Omit it to use defaultEdit and local interaction state. */
2307
+ edit;
2308
+ defaultEdit = false;
2309
+ disabled = false;
2310
+ editChange;
2311
+ internalEdit = false;
2312
+ trigger = null;
2313
+ syncFromProp() {
2314
+ if (isControlled(this.edit))
2315
+ this.internalEdit = this.edit;
2316
+ }
2317
+ componentWillLoad() {
2318
+ this.internalEdit = controlledOrDefault(this.edit, this.defaultEdit);
2319
+ }
2320
+ componentDidLoad() {
2321
+ this.host.ownerDocument.addEventListener("pointerdown", this.onDocumentPointerDown, true);
2322
+ }
2323
+ disconnectedCallback() {
2324
+ this.host.ownerDocument.removeEventListener("pointerdown", this.onDocumentPointerDown, true);
2325
+ }
2326
+ requestEdit(next, reason, trigger) {
2327
+ if (this.disabled || this.internalEdit === next)
2328
+ return;
2329
+ if (!isControlled(this.edit))
2330
+ this.internalEdit = next;
2331
+ this.editChange.emit({ edit: next, reason, trigger });
2332
+ if (next)
2333
+ requestAnimationFrame(() => this.focusEditor());
2334
+ else
2335
+ requestAnimationFrame(() => this.trigger?.focus());
2336
+ }
2337
+ focusEditor() {
2338
+ const editRoot = this.host.querySelector('[slot="edit"]');
2339
+ const candidate = editRoot?.matches("input, textarea, select, button, [tabindex], ui-combobox, ui-multi-combobox") ? editRoot : editRoot?.querySelector("input, textarea, select, button, [tabindex], ui-combobox, ui-multi-combobox");
2340
+ const focusInput = candidate?.focusInput;
2341
+ if (typeof focusInput === "function")
2342
+ void focusInput.call(candidate);
2343
+ else
2344
+ candidate?.focus();
2345
+ }
2346
+ eventTrigger(event) {
2347
+ return event.composedPath().find((node) => node instanceof HTMLElement && node.hasAttribute("data-ui-editable-trigger"));
2348
+ }
2349
+ onClick = (event) => {
2350
+ if (this.internalEdit || this.disabled)
2351
+ return;
2352
+ const trigger = this.eventTrigger(event);
2353
+ if (!trigger)
2354
+ return;
2355
+ this.trigger = trigger;
2356
+ this.requestEdit(true, "activate", "pointer");
2357
+ };
2358
+ onKeyDown = (event) => {
2359
+ if (this.internalEdit && event.key === "Escape") {
2360
+ event.preventDefault();
2361
+ event.stopPropagation();
2362
+ this.requestEdit(false, "escape", "keyboard");
2363
+ return;
2364
+ }
2365
+ if (this.internalEdit || !["Enter", " "].includes(event.key))
2366
+ return;
2367
+ const trigger = this.eventTrigger(event);
2368
+ if (!trigger)
2369
+ return;
2370
+ event.preventDefault();
2371
+ this.trigger = trigger;
2372
+ this.requestEdit(true, "activate", "keyboard");
2373
+ };
2374
+ onDocumentPointerDown = (event) => {
2375
+ if (!this.internalEdit || event.composedPath().includes(this.host))
2376
+ return;
2377
+ this.requestEdit(false, "light-dismiss", "pointer");
2378
+ };
2379
+ render() {
2380
+ return h(Host, { key: "f350400d4ebf897fb657b83b7cba9d309c5067bd", "data-edit": this.internalEdit ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, onClick: this.onClick, onKeyDown: this.onKeyDown }, h("div", { key: "f365ac61f59e9aaa1516121e3d6e2a42187e1d7b", part: "preview", hidden: this.internalEdit }, h("slot", { key: "ea234b437cc4eb530f2994d695429be91d874ef7", name: "preview" })), h("div", { key: "dacf0e74e72c47868986c80aaa60f55942fd9505", part: "edit", hidden: !this.internalEdit }, h("slot", { key: "54a943bc290335181a23b4cfa6055e4acfd8a62b", name: "edit" })));
2381
+ }
2382
+ static get watchers() {
2383
+ return {
2384
+ "edit": [{
2385
+ "syncFromProp": 0
2386
+ }]
2387
+ };
2388
+ }
2389
+ };
2390
+ UIEditable.style = uiEditableCss();
2391
+ }
2392
+ });
2393
+
1866
2394
  // dist/esm/ui-floating-action-button.entry.js
1867
2395
  var ui_floating_action_button_entry_exports = {};
1868
2396
  __export(ui_floating_action_button_entry_exports, {
@@ -1881,7 +2409,7 @@ var init_ui_floating_action_button_entry = __esm({
1881
2409
  mobileOnly = false;
1882
2410
  label = "";
1883
2411
  render() {
1884
- return h(Host, { key: "c9a7d8c9b6d6608566b21621a73d939f372c830d", "data-disabled": this.disabled ? "" : void 0 }, h("button", { key: "8eddccaf6be2f028bc02df967038843120045b84", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "0ea12efb9cb8ecec06238066827a734fb3b01e1e" })));
2412
+ return h(Host, { key: "9e917e07efcef5c0a96b8b09af8934f336a521bd", "data-disabled": this.disabled ? "" : void 0 }, h("button", { key: "940daac4c2ff1144d7e82b36727205f286325a8e", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "382c70aa4836f6e799f98e1f0e4bc6e3104430fc" })));
1885
2413
  }
1886
2414
  };
1887
2415
  UIFloatingActionButton.style = uiFloatingActionButtonCss();
@@ -1909,17 +2437,61 @@ var init_ui_form_field_entry = __esm({
1909
2437
  invalid = false;
1910
2438
  disabled = false;
1911
2439
  required = false;
2440
+ observer = null;
2441
+ activeInput = null;
2442
+ ownedDescriptionIds = /* @__PURE__ */ new Set();
2443
+ wireQueued = false;
1912
2444
  componentDidLoad() {
2445
+ this.observer = new MutationObserver(this.scheduleWire);
2446
+ this.observer.observe(this.host, {
2447
+ childList: true,
2448
+ subtree: true,
2449
+ attributes: true,
2450
+ attributeFilter: ["aria-describedby", "data-slot", "id", "role"]
2451
+ });
1913
2452
  this.wire();
1914
2453
  }
1915
2454
  componentDidUpdate() {
1916
- this.wire();
2455
+ this.scheduleWire();
2456
+ }
2457
+ disconnectedCallback() {
2458
+ this.observer?.disconnect();
2459
+ this.observer = null;
2460
+ this.removeOwnedDescriptions(this.activeInput);
2461
+ this.activeInput = null;
2462
+ this.ownedDescriptionIds.clear();
2463
+ }
2464
+ descriptionIds(input) {
2465
+ return Array.from(new Set((input.getAttribute("aria-describedby") ?? "").split(/\s+/).filter(Boolean)));
2466
+ }
2467
+ removeOwnedDescriptions(input) {
2468
+ if (!input || this.ownedDescriptionIds.size === 0)
2469
+ return;
2470
+ const remaining = this.descriptionIds(input).filter((id) => !this.ownedDescriptionIds.has(id));
2471
+ if (remaining.length > 0)
2472
+ input.setAttribute("aria-describedby", remaining.join(" "));
2473
+ else
2474
+ input.removeAttribute("aria-describedby");
1917
2475
  }
2476
+ scheduleWire = () => {
2477
+ if (this.wireQueued)
2478
+ return;
2479
+ this.wireQueued = true;
2480
+ queueMicrotask(() => {
2481
+ this.wireQueued = false;
2482
+ this.wire();
2483
+ });
2484
+ };
1918
2485
  wire() {
1919
2486
  const label = this.host.querySelector("label");
1920
2487
  const input = this.host.querySelector("input, textarea, select");
1921
2488
  const help = this.host.querySelector('[data-slot="help"]');
1922
2489
  const error = this.host.querySelector('[data-slot="error"], [role="alert"]');
2490
+ if (input !== this.activeInput) {
2491
+ this.removeOwnedDescriptions(this.activeInput);
2492
+ this.activeInput = input;
2493
+ this.ownedDescriptionIds.clear();
2494
+ }
1923
2495
  if (!input)
1924
2496
  return;
1925
2497
  if (!input.id) {
@@ -1928,6 +2500,8 @@ var init_ui_form_field_entry = __esm({
1928
2500
  if (label && !label.getAttribute("for")) {
1929
2501
  label.setAttribute("for", input.id);
1930
2502
  }
2503
+ const previousOwnedIds = this.ownedDescriptionIds;
2504
+ const externalIds = this.descriptionIds(input).filter((id) => !previousOwnedIds.has(id));
1931
2505
  const describedIds = [];
1932
2506
  if (help) {
1933
2507
  if (!help.id)
@@ -1939,15 +2513,22 @@ var init_ui_form_field_entry = __esm({
1939
2513
  error.id = createId("form-field-error");
1940
2514
  describedIds.push(error.id);
1941
2515
  }
1942
- if (describedIds.length) {
1943
- input.setAttribute("aria-describedby", describedIds.join(" "));
2516
+ const nextOwnedIds = describedIds.filter((id) => !externalIds.includes(id));
2517
+ const nextDescribedIds = Array.from(/* @__PURE__ */ new Set([...externalIds, ...describedIds]));
2518
+ const nextDescribedBy = nextDescribedIds.join(" ");
2519
+ if (input.getAttribute("aria-describedby") !== nextDescribedBy) {
2520
+ if (nextDescribedBy)
2521
+ input.setAttribute("aria-describedby", nextDescribedBy);
2522
+ else
2523
+ input.removeAttribute("aria-describedby");
1944
2524
  }
2525
+ this.ownedDescriptionIds = new Set(nextOwnedIds);
1945
2526
  input.disabled = this.disabled;
1946
2527
  input.required = this.required;
1947
2528
  input.setAttribute("aria-invalid", this.invalid ? "true" : "false");
1948
2529
  }
1949
2530
  render() {
1950
- return h(Host, { key: "cdd06c6b16ac56f3547e64e7888d8766243392db", "data-invalid": this.invalid ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-required": this.required ? "" : void 0 }, h("slot", { key: "7d545673a3485f8beee01b13ab56185b98ba8856" }));
2531
+ return h(Host, { key: "ac01e2be489b9c907169417dc5064061bd74ff7c", "data-invalid": this.invalid ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-required": this.required ? "" : void 0 }, h("slot", { key: "c739f9b2c948bc1d3db4316871c2293bf75cf520", onSlotchange: this.scheduleWire }));
1951
2532
  }
1952
2533
  };
1953
2534
  UIFormField.style = uiFormFieldCss();
@@ -1975,7 +2556,7 @@ var init_ui_icon_button_entry = __esm({
1975
2556
  /** Reveals this control through a surrounding ui-affordance-scope. */
1976
2557
  anticipatory = false;
1977
2558
  render() {
1978
- return h(Host, { key: "8616d7e52a03a7a42738b11f4cabed3eb38c8640", "data-disabled": this.disabled ? "" : void 0, "data-ui-affordance": this.anticipatory ? "button" : void 0 }, h("button", { key: "fae1362a50a0d80e2fcb3ab41f63ff21cf5d939a", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "e548fc504e3b26e85263fe3fc8faac0887fee16b" })));
2559
+ return h(Host, { key: "225e147d184109d39a2e6f9236ba3ba3c5864c31", "data-disabled": this.disabled ? "" : void 0, "data-ui-affordance": this.anticipatory ? "button" : void 0 }, h("button", { key: "7e54fab4520ae6641c974abf19e975e8eec7a3df", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "54f9ba27c5a2ca896267f07ad1055907e74a64bc" })));
1979
2560
  }
1980
2561
  };
1981
2562
  UIIconButton.style = uiIconButtonCss();
@@ -2065,7 +2646,7 @@ var init_ui_input_entry = __esm({
2065
2646
  });
2066
2647
  };
2067
2648
  render() {
2068
- return h(Host, { key: "a2f2c108144a7acae0dfb1bef6ea1f38a4dcca9c", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "04284765a12089a8a1045056d72551a3494f00fc", ref: (el) => this.slotRef = el }));
2649
+ return h(Host, { key: "0d8676e8458476681653ef4600dcb0f3b56d1ed1", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "d3585c07b6985d9090002f7a9c0eea1227517e0f", ref: (el) => this.slotRef = el }));
2069
2650
  }
2070
2651
  static get watchers() {
2071
2652
  return {
@@ -2103,7 +2684,7 @@ var uiMenuItemCss, UIMenuItem;
2103
2684
  var init_ui_menu_item_entry = __esm({
2104
2685
  "dist/esm/ui-menu-item.entry.js"() {
2105
2686
  init_index_8BGiMGQ0();
2106
- uiMenuItemCss = () => `:host{display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}:host(:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}:host([aria-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}`;
2687
+ uiMenuItemCss = () => `:host{display:block;width:100%}.menu-item__surface{display:block;box-sizing:border-box;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}:host(:hover:not([aria-disabled='true']):not([disabled])) .menu-item__surface{background:var(--ui-surface-subtle)}:host([aria-disabled='true']) .menu-item__surface,:host([disabled]) .menu-item__surface{opacity:0.6;cursor:not-allowed}`;
2107
2688
  UIMenuItem = class {
2108
2689
  constructor(hostRef) {
2109
2690
  registerInstance(this, hostRef);
@@ -2111,7 +2692,7 @@ var init_ui_menu_item_entry = __esm({
2111
2692
  disabled = false;
2112
2693
  value = "";
2113
2694
  render() {
2114
- return h(Host, { key: "ebd7c5aa5c8fdce2d2349aef7f1a4505b9190852", role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? "true" : void 0, "data-value": this.value || void 0 }, h("slot", { key: "7b55a8545034b055f8cbd047a0f16ea729af097e" }));
2695
+ return h(Host, { key: "711e7f70268d23969e40073cd47b065afadc22c9", role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? "true" : void 0, "data-value": this.value || void 0 }, h("span", { key: "d0c0aff983bdbc48666fcd652b39340bfd92c790", class: "menu-item__surface" }, h("slot", { key: "3fc6111848142b388529a9cdb5f6134bffe8fa42" })));
2115
2696
  }
2116
2697
  };
2117
2698
  UIMenuItem.style = uiMenuItemCss();
@@ -2129,8 +2710,9 @@ var init_ui_menu_entry = __esm({
2129
2710
  init_index_8BGiMGQ0();
2130
2711
  init_events_JwSoedEO();
2131
2712
  init_manager_C_0syqXZ();
2713
+ init_controlled_state_BnGhGgTH();
2132
2714
  init_positioning_Bu0dmLBE();
2133
- uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:auto;max-block-size:calc(100dvh - (var(--ui-menu-viewport-gap) * 2));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}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}::slotted(ui-menu-item){display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(ui-menu-item:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}::slotted(ui-menu-item[aria-disabled='true']),::slotted(ui-menu-item[disabled]){opacity:0.6;cursor:not-allowed}`;
2715
+ uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;box-sizing:border-box;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:0;border:0;border-radius:0;background:transparent;box-shadow:var(--ui-shadow-lg)}.menu__surface{display:flex;flex-direction:column;box-sizing:border-box;padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:auto;max-block-size:calc(100dvh - (var(--ui-menu-viewport-gap) * 2));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}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}::slotted(ui-menu-item){display:block;width:100%}`;
2134
2716
  UIMenu = class {
2135
2717
  constructor(hostRef) {
2136
2718
  registerInstance(this, hostRef);
@@ -2138,7 +2720,8 @@ var init_ui_menu_entry = __esm({
2138
2720
  get host() {
2139
2721
  return getElement(this);
2140
2722
  }
2141
- open = false;
2723
+ /** Controlled open state. Omit it to use defaultOpen and local interaction state. */
2724
+ open;
2142
2725
  defaultOpen = false;
2143
2726
  /** Id of the control that anchors this menu in the top layer. */
2144
2727
  for;
@@ -2149,7 +2732,8 @@ var init_ui_menu_entry = __esm({
2149
2732
  anchor = null;
2150
2733
  surface = null;
2151
2734
  syncFromProp() {
2152
- this.internalOpen = this.open;
2735
+ if (isControlled(this.open))
2736
+ this.internalOpen = this.open;
2153
2737
  }
2154
2738
  resetSurface() {
2155
2739
  this.setupSurface();
@@ -2175,8 +2759,7 @@ var init_ui_menu_entry = __esm({
2175
2759
  }
2176
2760
  }
2177
2761
  componentDidLoad() {
2178
- this.syncFromProp();
2179
- this.internalOpen = this.internalOpen || this.defaultOpen;
2762
+ this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
2180
2763
  this.host.addEventListener("click", this.onItemClick);
2181
2764
  this.host.addEventListener("keydown", this.onKeydown);
2182
2765
  this.setupSurface();
@@ -2209,7 +2792,8 @@ var init_ui_menu_entry = __esm({
2209
2792
  closeMenu(reason, trigger) {
2210
2793
  if (!this.internalOpen)
2211
2794
  return;
2212
- this.internalOpen = false;
2795
+ if (!isControlled(this.open))
2796
+ this.internalOpen = false;
2213
2797
  dispatchDetail(this.host, "close", {
2214
2798
  open: false,
2215
2799
  reason,
@@ -2228,69 +2812,238 @@ var init_ui_menu_entry = __esm({
2228
2812
  const item = e.target.closest?.("ui-menu-item");
2229
2813
  if (!item || item.getRootNode() !== this.host.getRootNode())
2230
2814
  return;
2231
- if (this.isItemDisabled(item))
2815
+ if (this.isItemDisabled(item))
2816
+ return;
2817
+ const value = item.getAttribute("value") ?? item.getAttribute("data-value") ?? "";
2818
+ dispatchDetail(this.host, "select", { value, trigger: eventToTrigger(e) });
2819
+ dispatchDetail(this.host, "close", {
2820
+ open: false,
2821
+ reason: "action",
2822
+ trigger: eventToTrigger(e)
2823
+ });
2824
+ if (!isControlled(this.open))
2825
+ this.internalOpen = false;
2826
+ };
2827
+ onKeydown = (e) => {
2828
+ if (e.key === "Escape") {
2829
+ e.preventDefault();
2830
+ requestTopOverlayClose("escape", "keyboard");
2831
+ return;
2832
+ }
2833
+ const items = this.getItems().filter((i) => !this.isItemDisabled(i));
2834
+ if (items.length === 0)
2835
+ return;
2836
+ const target = e.target.closest?.("ui-menu-item");
2837
+ const currentIndex = target && target instanceof HTMLElement ? items.indexOf(target) : -1;
2838
+ if (e.key === "Enter" || e.key === " ") {
2839
+ e.preventDefault();
2840
+ if (target && currentIndex >= 0) {
2841
+ const value = target.getAttribute("value") ?? target.getAttribute("data-value") ?? "";
2842
+ dispatchDetail(this.host, "select", { value, trigger: "keyboard" });
2843
+ dispatchDetail(this.host, "close", {
2844
+ open: false,
2845
+ reason: "action",
2846
+ trigger: "keyboard"
2847
+ });
2848
+ if (!isControlled(this.open))
2849
+ this.internalOpen = false;
2850
+ }
2851
+ return;
2852
+ }
2853
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
2854
+ e.preventDefault();
2855
+ const nextIndex = e.key === "ArrowDown" ? currentIndex < 0 ? 0 : Math.min(currentIndex + 1, items.length - 1) : currentIndex <= 0 ? items.length - 1 : currentIndex - 1;
2856
+ items[nextIndex].focus();
2857
+ }
2858
+ };
2859
+ render() {
2860
+ return h(Host, { key: "afba5a7f63238afdb6f71a3636c1f294d3e8ac6f", role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? "" : void 0 }, h("div", { key: "50d770efd27dddca436b804f10f1cc40bc604cb5", class: "menu__surface" }, h("slot", { key: "5014fc43a0ee2d66168bbcc1d52b20bd5120acb9" })));
2861
+ }
2862
+ static get watchers() {
2863
+ return {
2864
+ "open": [{
2865
+ "syncFromProp": 0
2866
+ }],
2867
+ "for": [{
2868
+ "resetSurface": 0
2869
+ }],
2870
+ "placement": [{
2871
+ "resetSurface": 0
2872
+ }],
2873
+ "internalOpen": [{
2874
+ "syncSurface": 0
2875
+ }]
2876
+ };
2877
+ }
2878
+ };
2879
+ UIMenu.style = uiMenuCss();
2880
+ }
2881
+ });
2882
+
2883
+ // dist/esm/ui-multi-combobox.entry.js
2884
+ var ui_multi_combobox_entry_exports = {};
2885
+ __export(ui_multi_combobox_entry_exports, {
2886
+ ui_multi_combobox: () => UIMultiCombobox
2887
+ });
2888
+ var uiMultiComboboxCss, UIMultiCombobox;
2889
+ var init_ui_multi_combobox_entry = __esm({
2890
+ "dist/esm/ui-multi-combobox.entry.js"() {
2891
+ init_index_8BGiMGQ0();
2892
+ uiMultiComboboxCss = () => `:host{display:block;min-inline-size:0;color:var(--ui-text-primary);font:inherit}ui-combobox::part(field){flex-wrap:wrap;align-items:center;gap:var(--ui-space-1);min-block-size:var(--ui-multi-combobox-min-block-size, 2.5rem);padding:var(--ui-space-1)}ui-combobox::part(input){flex:1 0 var(--ui-multi-combobox-input-min-inline-size, 5rem);width:auto;min-block-size:1.75rem;padding:var(--ui-space-0-5) var(--ui-space-1)}.items{display:contents}.item{appearance:none;display:inline-flex;max-inline-size:100%;padding:0;border:0;border-radius:var(--ui-radius-1);background:transparent;color:inherit;font:inherit;cursor:default}.item:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:1px}.item:disabled{opacity:.6}`;
2893
+ UIMultiCombobox = class {
2894
+ constructor(hostRef) {
2895
+ registerInstance(this, hostRef);
2896
+ this.queryChange = createEvent(this, "query-change");
2897
+ this.addItem = createEvent(this, "add-item");
2898
+ this.removeItem = createEvent(this, "remove-item");
2899
+ this.createItem = createEvent(this, "create-item");
2900
+ this.optionsChange = createEvent(this, "options-change");
2901
+ }
2902
+ get host() {
2903
+ return getElement(this);
2904
+ }
2905
+ label = "";
2906
+ placeholder = "";
2907
+ items = [];
2908
+ config = {};
2909
+ query;
2910
+ defaultQuery = "";
2911
+ disabled = false;
2912
+ readOnly = false;
2913
+ required = false;
2914
+ name = "";
2915
+ queryChange;
2916
+ addItem;
2917
+ removeItem;
2918
+ createItem;
2919
+ optionsChange;
2920
+ raw = "";
2921
+ rows = [];
2922
+ combobox;
2923
+ filteredConfig;
2924
+ filteredConfigSource;
2925
+ filteredSelection = "";
2926
+ componentWillLoad() {
2927
+ this.raw = this.query ?? this.defaultQuery;
2928
+ }
2929
+ syncQuery() {
2930
+ if (this.query !== void 0)
2931
+ this.raw = this.query;
2932
+ }
2933
+ get selectedValues() {
2934
+ return new Set(this.items.map((item) => item.value));
2935
+ }
2936
+ get comboboxConfig() {
2937
+ const selectionKey = this.items.map((item) => item.value).join("\0");
2938
+ if (this.filteredConfig && this.filteredConfigSource === this.config && this.filteredSelection === selectionKey) {
2939
+ return this.filteredConfig;
2940
+ }
2941
+ const ownerFilter = this.config.filter;
2942
+ const selected = this.selectedValues;
2943
+ this.filteredConfigSource = this.config;
2944
+ this.filteredSelection = selectionKey;
2945
+ this.filteredConfig = {
2946
+ ...this.config,
2947
+ filter: (option, query, context) => !selected.has(option.value) && (ownerFilter ? ownerFilter(option, query, context) : option.label.toLocaleLowerCase().includes(query.toLocaleLowerCase()))
2948
+ };
2949
+ return this.filteredConfig;
2950
+ }
2951
+ setQuery(query, trigger) {
2952
+ if (this.query === void 0)
2953
+ this.raw = query;
2954
+ this.queryChange.emit({ query, display: query, trigger });
2955
+ }
2956
+ onQueryChange = (event) => {
2957
+ event.stopPropagation();
2958
+ this.setQuery(event.detail.query, event.detail.trigger);
2959
+ };
2960
+ onOptionsChange = (event) => {
2961
+ event.stopPropagation();
2962
+ this.rows = event.detail;
2963
+ this.optionsChange.emit(event.detail);
2964
+ };
2965
+ onValueChange = (event) => {
2966
+ event.stopPropagation();
2967
+ if (event.detail.kind !== "selection" || !event.detail.option)
2968
+ return;
2969
+ const item = event.detail.option;
2970
+ this.addItem.emit({ item, index: this.items.length, trigger: event.detail.trigger });
2971
+ queueMicrotask(() => this.setQuery("", event.detail.trigger));
2972
+ };
2973
+ onCreateEntry = (event) => {
2974
+ event.stopPropagation();
2975
+ const query = event.detail.query.trim();
2976
+ if (!query)
2232
2977
  return;
2233
- const value = item.getAttribute("value") ?? item.getAttribute("data-value") ?? "";
2234
- dispatchDetail(this.host, "select", { value, trigger: eventToTrigger(e) });
2235
- dispatchDetail(this.host, "close", {
2236
- open: false,
2237
- reason: "action",
2238
- trigger: eventToTrigger(e)
2239
- });
2240
- this.internalOpen = false;
2978
+ this.setQuery("", event.detail.trigger);
2979
+ this.createItem.emit({ query, trigger: event.detail.trigger });
2241
2980
  };
2242
- onKeydown = (e) => {
2243
- if (e.key === "Escape") {
2244
- e.preventDefault();
2245
- requestTopOverlayClose("escape", "keyboard");
2981
+ remove(index, trigger) {
2982
+ const item = this.items[index];
2983
+ if (!item || item.disabled || this.disabled || this.readOnly)
2984
+ return;
2985
+ this.removeItem.emit({ item, index, trigger });
2986
+ requestAnimationFrame(() => {
2987
+ const buttons = this.host.shadowRoot?.querySelectorAll('[part="item"]') ?? [];
2988
+ const next = buttons[Math.min(index, buttons.length - 1)] ?? buttons[index - 1];
2989
+ if (next && next.dataset.value !== item.value)
2990
+ next.focus();
2991
+ else
2992
+ void this.focusInput();
2993
+ });
2994
+ }
2995
+ focusItem(index) {
2996
+ this.host.shadowRoot?.querySelectorAll('[part="item"]')[index]?.focus();
2997
+ }
2998
+ onItemKeyDown = (event, index) => {
2999
+ if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
2246
3000
  return;
3001
+ if (event.key === "ArrowLeft") {
3002
+ event.preventDefault();
3003
+ event.stopPropagation();
3004
+ this.focusItem(Math.max(0, index - 1));
3005
+ } else if (event.key === "ArrowRight") {
3006
+ event.preventDefault();
3007
+ event.stopPropagation();
3008
+ if (index === this.items.length - 1)
3009
+ void this.focusInput();
3010
+ else
3011
+ this.focusItem(index + 1);
3012
+ } else if (event.key === "Backspace" || event.key === "Delete") {
3013
+ event.preventDefault();
3014
+ event.stopPropagation();
3015
+ this.remove(index, "keyboard");
2247
3016
  }
2248
- const items = this.getItems().filter((i) => !this.isItemDisabled(i));
2249
- if (items.length === 0)
3017
+ };
3018
+ onKeyDown = (event) => {
3019
+ if (event.defaultPrevented || this.disabled || this.readOnly || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
2250
3020
  return;
2251
- const target = e.target.closest?.("ui-menu-item");
2252
- const currentIndex = target && target instanceof HTMLElement ? items.indexOf(target) : -1;
2253
- if (e.key === "Enter" || e.key === " ") {
2254
- e.preventDefault();
2255
- if (target && currentIndex >= 0) {
2256
- const value = target.getAttribute("value") ?? target.getAttribute("data-value") ?? "";
2257
- dispatchDetail(this.host, "select", { value, trigger: "keyboard" });
2258
- dispatchDetail(this.host, "close", {
2259
- open: false,
2260
- reason: "action",
2261
- trigger: "keyboard"
2262
- });
2263
- this.internalOpen = false;
2264
- }
3021
+ const input = event.composedPath().find((node) => node instanceof HTMLInputElement);
3022
+ if (!input || this.raw || (input.selectionStart ?? 0) > 0)
2265
3023
  return;
2266
- }
2267
- if (e.key === "ArrowDown" || e.key === "ArrowUp") {
2268
- e.preventDefault();
2269
- const nextIndex = e.key === "ArrowDown" ? currentIndex < 0 ? 0 : Math.min(currentIndex + 1, items.length - 1) : currentIndex <= 0 ? items.length - 1 : currentIndex - 1;
2270
- items[nextIndex].focus();
3024
+ if (event.key === "ArrowLeft" && this.items.length) {
3025
+ event.preventDefault();
3026
+ this.focusItem(this.items.length - 1);
3027
+ } else if (event.key === "Backspace" && this.items.length) {
3028
+ event.preventDefault();
3029
+ this.remove(this.items.length - 1, "keyboard");
2271
3030
  }
2272
3031
  };
3032
+ async focusInput() {
3033
+ await this.combobox?.focusInput();
3034
+ }
2273
3035
  render() {
2274
- return h(Host, { key: "25ae79e914820dfc470fa03d8c843646c3c060d9", role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "b3a8b130e55610d948bc3e4603dede59dd560d05" }));
3036
+ return h(Host, { key: "bdb03a28ea25b22340dc56381fa45031f0c47c27", onKeyDown: this.onKeyDown }, h("ui-combobox", { key: "51ba1ab747af9f216223bd71f524db79ef57b8a9", ref: (element) => this.combobox = element, label: this.label, "label-visibility": "sr-only", placeholder: this.placeholder, name: this.name, value: null, query: this.raw, config: this.comboboxConfig, size: "sm", disabled: this.disabled, readOnly: this.readOnly, required: this.required, "onQuery-change": this.onQueryChange, "onValue-change": this.onValueChange, "onCreate-entry": this.onCreateEntry, "onOptions-change": this.onOptionsChange }, h("div", { key: "ebd8fd8e62db3c2e47b1bfc7558c01e7e1abb8ba", slot: "start", class: "items", role: "group", "aria-label": `Selected ${this.label}` }, this.items.map((item, index) => h("button", { type: "button", part: "item", class: "item", "data-value": item.value, tabIndex: -1, disabled: this.disabled || this.readOnly || item.disabled, "aria-label": `${item.label}, press Delete or Backspace to remove`, onKeyDown: (event) => this.onItemKeyDown(event, index) }, h("slot", { name: `item-${item.id}` }, h("ui-chip", { appearance: "pill" }, item.label))))), this.rows.map((option) => h("span", { slot: `option-${option.id}` }, h("slot", { name: `option-${option.id}` }, option.label))), h("span", { key: "99cd9848130de37e52a4f735c95e3754dbc64691", slot: "create" }, h("slot", { key: "84cc7c14716819bd968bdfcb9213fe3887a5c2b9", name: "create" }, "Create \u201C", this.raw, "\u201D")), h("span", { key: "1660eb03425dea4d36797e416d91b051531a470d", slot: "loading" }, h("slot", { key: "10c979403e89331e8bdf69ff2db3f5bc272b2685", name: "loading" }, "Loading suggestions\u2026")), h("span", { key: "1c862b6c5906aa3ec5fc874de5a5119e13ef9422", slot: "empty" }, h("slot", { key: "1c70a1beb7321d3b2be888b3826a1dba2f6fcc70", name: "empty" }, "No suggestions.")), h("span", { key: "4b4da5cb8b22543b90ff9230191bbb2e81d16408", slot: "error" }, h("slot", { key: "a371a5ce50895562ebc6e55227e4a4834af37f3d", name: "error" }, "Unable to load suggestions.")), h("div", { key: "f82e38165d90bdbfa8413c0a561abf7ab5da0183", slot: "footer" }, h("slot", { key: "6c0bd2b89428832f4cb485f5d2e30a792859ba9e", name: "footer" }))));
2275
3037
  }
2276
3038
  static get watchers() {
2277
3039
  return {
2278
- "open": [{
2279
- "syncFromProp": 0
2280
- }],
2281
- "for": [{
2282
- "resetSurface": 0
2283
- }],
2284
- "placement": [{
2285
- "resetSurface": 0
2286
- }],
2287
- "internalOpen": [{
2288
- "syncSurface": 0
3040
+ "query": [{
3041
+ "syncQuery": 0
2289
3042
  }]
2290
3043
  };
2291
3044
  }
2292
3045
  };
2293
- UIMenu.style = uiMenuCss();
3046
+ UIMultiCombobox.style = uiMultiComboboxCss();
2294
3047
  }
2295
3048
  });
2296
3049
 
@@ -2305,8 +3058,9 @@ var init_ui_popover_entry = __esm({
2305
3058
  init_index_8BGiMGQ0();
2306
3059
  init_manager_C_0syqXZ();
2307
3060
  init_events_JwSoedEO();
3061
+ init_controlled_state_BnGhGgTH();
2308
3062
  init_positioning_Bu0dmLBE();
2309
- uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg);max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:auto}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;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}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}`;
3063
+ uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);box-sizing:border-box;max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:auto;padding:0;border:0;border-radius:0;background:transparent;box-shadow:var(--ui-shadow-lg)}.popover__surface{box-sizing:border-box;padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;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}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}`;
2310
3064
  UIPopover = class {
2311
3065
  constructor(hostRef) {
2312
3066
  registerInstance(this, hostRef);
@@ -2314,7 +3068,8 @@ var init_ui_popover_entry = __esm({
2314
3068
  get host() {
2315
3069
  return getElement(this);
2316
3070
  }
2317
- open = false;
3071
+ /** Controlled open state. Omit it to use defaultOpen and local interaction state. */
3072
+ open;
2318
3073
  defaultOpen = false;
2319
3074
  /** Optional id of the element this popover follows in the top layer. */
2320
3075
  for;
@@ -2324,7 +3079,8 @@ var init_ui_popover_entry = __esm({
2324
3079
  anchor = null;
2325
3080
  surface = null;
2326
3081
  syncFromProp() {
2327
- this.internalOpen = this.open;
3082
+ if (isControlled(this.open))
3083
+ this.internalOpen = this.open;
2328
3084
  }
2329
3085
  onOpenChange() {
2330
3086
  this.syncOverlay();
@@ -2381,8 +3137,7 @@ var init_ui_popover_entry = __esm({
2381
3137
  }
2382
3138
  }
2383
3139
  componentDidLoad() {
2384
- this.syncFromProp();
2385
- this.internalOpen = this.internalOpen || this.defaultOpen;
3140
+ this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
2386
3141
  this.host.addEventListener("keydown", this.onKeydown);
2387
3142
  this.setupSurface();
2388
3143
  this.syncOverlay();
@@ -2397,7 +3152,8 @@ var init_ui_popover_entry = __esm({
2397
3152
  this.syncOverlay();
2398
3153
  }
2399
3154
  handleRequestClose(reason, trigger) {
2400
- this.internalOpen = false;
3155
+ if (!isControlled(this.open))
3156
+ this.internalOpen = false;
2401
3157
  dispatchDetail(this.host, "close", {
2402
3158
  open: false,
2403
3159
  reason,
@@ -2410,7 +3166,7 @@ var init_ui_popover_entry = __esm({
2410
3166
  }
2411
3167
  };
2412
3168
  render() {
2413
- return h(Host, { key: "cd957cb9fd5d1c05da7729a16d4cb229bc1deffa", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "d14960a1471948120f7173e18adae8d86e4fabb7" }));
3169
+ return h(Host, { key: "a4986ace0f3c586774a549cb844287b28ccd0531", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("div", { key: "8f2c589916d06138ef72bfe0d039893b3c59a7cc", class: "popover__surface" }, h("slot", { key: "ee70e7dcc53a99b5c80e56862a6eb00edcfcf912" })));
2414
3170
  }
2415
3171
  static get watchers() {
2416
3172
  return {
@@ -2547,7 +3303,7 @@ var init_ui_radio_group_entry = __esm({
2547
3303
  }
2548
3304
  };
2549
3305
  render() {
2550
- return h(Host, { key: "e80e01600d499d1b8e3410060433dac2bb8cf38a", role: "radiogroup", "aria-orientation": this.orientation, "data-orientation": this.orientation, "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "e60dcfa1b174b1a4c9092567e6ec4d9f5bcd9ffe" }));
3306
+ return h(Host, { key: "1882ad7c092c6a138eab2a52c19beb9a950a8d5a", role: "radiogroup", "aria-orientation": this.orientation, "data-orientation": this.orientation, "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "d5abade3d23963410cfbac17e80aa16dd21ccc6e" }));
2551
3307
  }
2552
3308
  static get watchers() {
2553
3309
  return {
@@ -2583,6 +3339,7 @@ var init_ui_radio_entry = __esm({
2583
3339
  "dist/esm/ui-radio.entry.js"() {
2584
3340
  init_index_8BGiMGQ0();
2585
3341
  init_events_JwSoedEO();
3342
+ init_controlled_state_BnGhGgTH();
2586
3343
  uiRadioCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([data-disabled='true']),:host([aria-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='radio']){accent-color:var(--ui-accent-solid);cursor:pointer}::slotted(input[type='radio']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
2587
3344
  UIRadio = class {
2588
3345
  constructor(hostRef) {
@@ -2591,28 +3348,32 @@ var init_ui_radio_entry = __esm({
2591
3348
  get host() {
2592
3349
  return getElement(this);
2593
3350
  }
2594
- checked = false;
3351
+ /** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
3352
+ checked;
2595
3353
  defaultChecked = false;
2596
3354
  disabled = false;
2597
3355
  name = "";
2598
3356
  required = false;
2599
3357
  value = "on";
3358
+ internalChecked = false;
2600
3359
  slotRef;
3360
+ syncFromProp() {
3361
+ if (isControlled(this.checked))
3362
+ this.internalChecked = this.checked;
3363
+ }
2601
3364
  syncToInput() {
2602
3365
  const input = this.getInput();
2603
3366
  if (!input)
2604
3367
  return;
2605
3368
  this.host.toggleAttribute("data-disabled", this.disabled);
2606
- input.checked = this.checked;
3369
+ input.checked = this.internalChecked;
2607
3370
  input.disabled = this.disabled;
2608
3371
  input.name = this.name;
2609
3372
  input.required = this.required;
2610
3373
  input.value = this.value;
2611
3374
  }
2612
3375
  componentDidLoad() {
2613
- if (!this.checked && this.defaultChecked) {
2614
- this.checked = true;
2615
- }
3376
+ this.internalChecked = controlledOrDefault(this.checked, this.defaultChecked);
2616
3377
  this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
2617
3378
  this.syncToInput();
2618
3379
  const input = this.getInput();
@@ -2634,6 +3395,10 @@ var init_ui_radio_entry = __esm({
2634
3395
  const input = e.target;
2635
3396
  if (!input || !input.checked)
2636
3397
  return;
3398
+ if (!isControlled(this.checked))
3399
+ this.internalChecked = true;
3400
+ else
3401
+ this.syncToInput();
2637
3402
  dispatchDetail(this.host, "change", {
2638
3403
  checked: true,
2639
3404
  value: this.value,
@@ -2641,12 +3406,12 @@ var init_ui_radio_entry = __esm({
2641
3406
  });
2642
3407
  };
2643
3408
  render() {
2644
- return h(Host, { key: "898869b84429366e43c075723e884f34da6fc6df", role: "radio", "aria-checked": String(this.checked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "3f3b881175f25d439807ec9f8f0dd59a1acd6a90", ref: (el) => this.slotRef = el }));
3409
+ return h(Host, { key: "f4700b43790accd29a6bcc55fcc862072e29c335", role: "radio", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "ed32c35f8f68c662a8b95e58b74c8c76c959ea49", ref: (el) => this.slotRef = el }));
2645
3410
  }
2646
3411
  static get watchers() {
2647
3412
  return {
2648
3413
  "checked": [{
2649
- "syncToInput": 0
3414
+ "syncFromProp": 0
2650
3415
  }],
2651
3416
  "disabled": [{
2652
3417
  "syncToInput": 0
@@ -2712,7 +3477,7 @@ var init_ui_search_result_row_entry = __esm({
2712
3477
  this.hasTrailing = slotHasContent(this.trailingSlot);
2713
3478
  };
2714
3479
  render() {
2715
- return h(Host, { key: "8ef897782b50f1ecb129a51a25631d3d2bafe1e3" }, h("button", { key: "5b4fb4ac4968551a191e80bde7b991391d931220", class: "search-result-row", type: "button", disabled: this.disabled, part: "button" }, h("span", { key: "5f5988d87bcf754d8a521e19e0e2a490dd868bd2", class: "search-result-row__leading", part: "leading", hidden: !this.hasLeading }, h("slot", { key: "a7671c75c28d71ab843dcbb1fcdd9f4d0e0f7361", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "4ed60057e10ade9d7771812ad28aa25a017d34d8", class: "search-result-row__content", part: "content" }, h("span", { key: "37fa74ef4980ffd0b576ff824532d1267420461c", class: "search-result-row__title", part: "title" }, h("slot", { key: "187df950b39702723fa456b09e220e2b7587f00a", name: "title" })), h("span", { key: "6d2476c57d7c9c7530c3796a723f47f5f4859d71", class: "search-result-row__meta", part: "meta", hidden: !this.hasMeta }, h("slot", { key: "d53329dd6865bbda005b0d25a2b9bc7b7a597452", name: "meta", ref: (el) => this.metaSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "8846c9669c0f65a739b770f41a93ddd4bef3f6bd", class: "search-result-row__excerpt", part: "excerpt", hidden: !this.hasExcerpt }, h("slot", { key: "b63f70371538901aaff481a9e524bf817883cee6", name: "excerpt", ref: (el) => this.excerptSlot = el, onSlotchange: this.syncSlots }))), h("span", { key: "1e8f94c3d83c3f649595c2843522b0973590a8d5", class: "search-result-row__trailing", part: "trailing", hidden: !this.hasTrailing }, h("slot", { key: "cfba9301ad97c1130a01f78c16052fc26e249f4b", name: "trailing", ref: (el) => this.trailingSlot = el, onSlotchange: this.syncSlots }))));
3480
+ return h(Host, { key: "eeda041dbcf8841cd53be9c532df208eb3be3d3b" }, h("button", { key: "71d3db6d2eca4f8d7796429f68ef73bf2c7b62f7", class: "search-result-row", type: "button", disabled: this.disabled, part: "button" }, h("span", { key: "f2260cab9f654e7f5e96a5e7e2a1cbbb5a55fde3", class: "search-result-row__leading", part: "leading", hidden: !this.hasLeading }, h("slot", { key: "824fffc19c2b5712dae0c000f12cc36a0043a370", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "4e3728ea7d363f256f1b3283df6eb984cf3f570f", class: "search-result-row__content", part: "content" }, h("span", { key: "95009b1ce569fb4251df62334a5dd88f1de561af", class: "search-result-row__title", part: "title" }, h("slot", { key: "132beecf36471ae0db68d686829428225699c534", name: "title" })), h("span", { key: "0ad7c8d52aa40ccf62667d3ecca4d48b49917a9a", class: "search-result-row__meta", part: "meta", hidden: !this.hasMeta }, h("slot", { key: "4b97129504571a676839287bd87e68d803f8bc99", name: "meta", ref: (el) => this.metaSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "e6c73e653fb7dc213866a15870281f3f6d95a86b", class: "search-result-row__excerpt", part: "excerpt", hidden: !this.hasExcerpt }, h("slot", { key: "49deae8194485304380b8b4b3d4fe96cd6623f4d", name: "excerpt", ref: (el) => this.excerptSlot = el, onSlotchange: this.syncSlots }))), h("span", { key: "c7c6f0b57668644a28d3c4c981b4db79a0e3c42a", class: "search-result-row__trailing", part: "trailing", hidden: !this.hasTrailing }, h("slot", { key: "e6cbceeb41d23c9b7514f53663438069499d1a4d", name: "trailing", ref: (el) => this.trailingSlot = el, onSlotchange: this.syncSlots }))));
2716
3481
  }
2717
3482
  };
2718
3483
  UISearchResultRow.style = uiSearchResultRowCss();
@@ -2756,7 +3521,7 @@ var init_ui_search_shell_entry = __esm({
2756
3521
  this.hasFooter = slotHasContent2(this.footerSlot);
2757
3522
  };
2758
3523
  render() {
2759
- return h("div", { key: "2a09e1ee81d04c0af5420887a9fa0dfb8057040c", class: "search-shell", part: "base" }, h("slot", { key: "9124af2e3e73b686a73b11c7fe8c9d40986e98c1", name: "backdrop" }), h("div", { key: "cec39a8cbbfe99b7bbeb37ce32655a88cee2bec3", class: "search-shell__panel", part: "panel" }, h("div", { key: "8168eda720e031daf350800ac48dcf445be0c417", class: "search-shell__search", part: "search" }, h("slot", { key: "b220c9670a6a53cd93fa434dc97dc9d2582bec08", name: "search" })), h("div", { key: "24386da67dd8ab5e865519e5b0b70fe9c8924010", class: "search-shell__status", part: "status", hidden: !this.hasStatus }, h("slot", { key: "7a0dfada13aca3275961667dadc9623729fbf644", name: "status", ref: (el) => this.statusSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "e06b7da6219c7a71d69662c5bdcc24e6baa52aa9", class: "search-shell__body", part: "body" }, h("slot", { key: "fabdea16cf443b57a826fc748b24342ff214b918", name: "body" })), h("div", { key: "d38662a77f19fd59315b1882cda0a55680cc5a0b", class: "search-shell__footer", part: "footer", hidden: !this.hasFooter }, h("slot", { key: "56eb386e22ae033939cdbdf3c6b6edf68594ceb5", name: "footer", ref: (el) => this.footerSlot = el, onSlotchange: this.syncSlots }))));
3524
+ return h("div", { key: "ae5baf1fae88f3c0ff8c98e68e1c31d7f19d7b6a", class: "search-shell", part: "base" }, h("slot", { key: "192d10867902bc4618762ab3ce1ca8a44229ec11", name: "backdrop" }), h("div", { key: "72bafd3ba7aadebcb011fb27f56793a9079bb2e1", class: "search-shell__panel", part: "panel" }, h("div", { key: "c2d46c9099699cc1c2f357cb51d11ab0e6cf6c69", class: "search-shell__search", part: "search" }, h("slot", { key: "21f4ed690247fa794bd9322c75cee1721926087a", name: "search" })), h("div", { key: "84baba674456aa2a5878d5858d0e6531251440ce", class: "search-shell__status", part: "status", hidden: !this.hasStatus }, h("slot", { key: "6e7b6533a29231ebbcd41529d8120649ca4a1dd1", name: "status", ref: (el) => this.statusSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "710d51d450132ad0f528b2eb2cd6f0312dbced2f", class: "search-shell__body", part: "body" }, h("slot", { key: "2c380ff4ad33ead6ca8c2611ebc024f125f0da48", name: "body" })), h("div", { key: "6923984a31c7bc23bae3ecee08d7acad14703a02", class: "search-shell__footer", part: "footer", hidden: !this.hasFooter }, h("slot", { key: "57c2eab7a3f46558ada8d1aa70d64f434bb8cdd6", name: "footer", ref: (el) => this.footerSlot = el, onSlotchange: this.syncSlots }))));
2760
3525
  }
2761
3526
  };
2762
3527
  UISearchShell.style = uiSearchShellCss();
@@ -2849,7 +3614,7 @@ var init_ui_select_entry = __esm({
2849
3614
  });
2850
3615
  };
2851
3616
  render() {
2852
- return h(Host, { key: "5ac54353f467b70e94fce0ae661dc86c305befe7", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "1386f3e4912720ab597f4567112e9c8b4166bcc6", ref: (el) => this.slotRef = el }));
3617
+ return h(Host, { key: "74cbe4a76a23af415c202c61951ad513b0ed6cb8", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "e86eb0cfb0d379cb3f8b2ea5ce3c69639d0cdda4", ref: (el) => this.slotRef = el }));
2853
3618
  }
2854
3619
  static get watchers() {
2855
3620
  return {
@@ -2888,6 +3653,7 @@ var init_ui_switch_entry = __esm({
2888
3653
  "dist/esm/ui-switch.entry.js"() {
2889
3654
  init_index_8BGiMGQ0();
2890
3655
  init_events_JwSoedEO();
3656
+ init_controlled_state_BnGhGgTH();
2891
3657
  uiSwitchCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}:host([role='switch']){cursor:pointer}:host input[type='checkbox']{appearance:none;-webkit-appearance:none;display:block;position:relative;width:2.25rem;height:1.25rem;padding:0;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host input[type='checkbox']::after{content:'';position:absolute;top:2px;left:2px;width:0.875rem;height:0.875rem;border-radius:999px;background:var(--ui-surface-default);border:1px solid var(--ui-border-default);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}:host input[type='checkbox']:checked{background:var(--ui-accent-solid);border-color:var(--ui-accent-solid)}:host input[type='checkbox']:checked::after{transform:translateX(calc(2.25rem - 0.875rem - 4px));background:var(--ui-text-on-accent);border-color:var(--ui-text-on-accent)}:host input[type='checkbox']:focus-visible{outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
2892
3658
  UISwitch = class {
2893
3659
  constructor(hostRef) {
@@ -2896,25 +3662,28 @@ var init_ui_switch_entry = __esm({
2896
3662
  get host() {
2897
3663
  return getElement(this);
2898
3664
  }
2899
- checked = false;
3665
+ /** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
3666
+ checked;
2900
3667
  defaultChecked = false;
2901
3668
  disabled = false;
2902
3669
  required = false;
2903
3670
  value = "on";
2904
3671
  internalChecked = false;
2905
3672
  syncFromProp() {
2906
- this.internalChecked = this.checked;
3673
+ if (isControlled(this.checked))
3674
+ this.internalChecked = this.checked;
2907
3675
  }
2908
3676
  componentDidLoad() {
2909
- this.syncFromProp();
2910
- this.internalChecked = this.internalChecked || this.defaultChecked;
3677
+ this.internalChecked = controlledOrDefault(this.checked, this.defaultChecked);
2911
3678
  }
2912
3679
  toggle = (trigger) => {
2913
3680
  if (this.disabled)
2914
3681
  return;
2915
- this.internalChecked = !this.internalChecked;
3682
+ const checked = !this.internalChecked;
3683
+ if (!isControlled(this.checked))
3684
+ this.internalChecked = checked;
2916
3685
  dispatchDetail(this.host, "change", {
2917
- checked: this.internalChecked,
3686
+ checked,
2918
3687
  value: this.value,
2919
3688
  trigger
2920
3689
  });
@@ -2931,14 +3700,19 @@ var init_ui_switch_entry = __esm({
2931
3700
  this.toggle("pointer");
2932
3701
  };
2933
3702
  render() {
2934
- return h(Host, { key: "14205d2856f8fb49b72d69d40f10ac1473a80c04", role: "switch", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.onKeydown, onClick: this.onClick }, h("input", { key: "974f8e487c8bf9196c05420e1817139dd6b4138c", type: "checkbox", checked: this.internalChecked, disabled: this.disabled, required: this.required, value: this.value, "aria-hidden": "true", tabIndex: -1, onChange: (e) => {
2935
- this.internalChecked = e.target.checked;
3703
+ return h(Host, { key: "a37ded5259d71a57308cba6dd158ae4ae81e4e8b", role: "switch", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.onKeydown, onClick: this.onClick }, h("input", { key: "882f81f39d752430f1de1554a5d83176416f4617", type: "checkbox", checked: this.internalChecked, disabled: this.disabled, required: this.required, value: this.value, "aria-hidden": "true", tabIndex: -1, onChange: (e) => {
3704
+ const input = e.target;
3705
+ const checked = input.checked;
3706
+ if (!isControlled(this.checked))
3707
+ this.internalChecked = checked;
2936
3708
  dispatchDetail(this.host, "change", {
2937
- checked: this.internalChecked,
3709
+ checked,
2938
3710
  value: this.value,
2939
3711
  trigger: "pointer"
2940
3712
  });
2941
- } }), h("slot", { key: "d1cd89aa2d5312cff8845364cdee64821977cb44" }));
3713
+ if (isControlled(this.checked))
3714
+ input.checked = this.internalChecked;
3715
+ } }), h("slot", { key: "b3b2b5afae622d1ae79cadd84f60c6b6c2df55a4" }));
2942
3716
  }
2943
3717
  static get watchers() {
2944
3718
  return {
@@ -2962,6 +3736,7 @@ var init_ui_tabs_entry = __esm({
2962
3736
  "dist/esm/ui-tabs.entry.js"() {
2963
3737
  init_index_8BGiMGQ0();
2964
3738
  init_events_JwSoedEO();
3739
+ init_controlled_state_BnGhGgTH();
2965
3740
  uiTabsCss = () => `:host{display:flex;flex-direction:column;gap:0}:host([data-orientation='vertical']){flex-direction:row}::slotted([role='tablist']){display:flex;gap:0;max-inline-size:100%;overflow-x:auto;overscroll-behavior-inline:contain;border-bottom:1px solid var(--ui-border-default)}:host([data-orientation='vertical']) ::slotted([role='tablist']){flex-direction:column;border-bottom:none;border-inline-end:1px solid var(--ui-border-default)}::slotted(button[role='tab']),::slotted([role='tab']),::slotted(ui-button) button[role='tab']{padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);font-weight:var(--ui-font-medium, 500);color:var(--ui-text-secondary);background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;transition:color var(--ui-motion-fast) var(--ui-motion-ease);box-shadow:none}::slotted(button[role='tab']:hover),::slotted([role='tab']:hover){color:var(--ui-text-primary)}::slotted(button[role='tab'][aria-selected='true']),::slotted([role='tab'][aria-selected='true']){color:var(--ui-accent-solid);border-bottom-color:var(--ui-accent-solid)}:host([data-orientation='vertical']) ::slotted(button[role='tab']),:host([data-orientation='vertical']) ::slotted([role='tab']){border-bottom:none;border-inline-end:2px solid transparent;margin-bottom:0;margin-inline-end:-1px}:host([data-orientation='vertical']) ::slotted(button[role='tab'][aria-selected='true']),:host([data-orientation='vertical']) ::slotted([role='tab'][aria-selected='true']){border-inline-end-color:var(--ui-accent-solid)}::slotted([role='tabpanel']){padding:var(--ui-space-4)}`;
2966
3741
  UITabs = class {
2967
3742
  constructor(hostRef) {
@@ -2970,12 +3745,14 @@ var init_ui_tabs_entry = __esm({
2970
3745
  get host() {
2971
3746
  return getElement(this);
2972
3747
  }
2973
- value = "";
3748
+ /** Controlled selected tab value. Omit it to use defaultValue and local interaction state. */
3749
+ value;
2974
3750
  defaultValue = "";
2975
3751
  orientation = "horizontal";
2976
3752
  internalValue = "";
2977
3753
  syncFromProp() {
2978
- this.internalValue = this.value;
3754
+ if (isControlled(this.value))
3755
+ this.internalValue = this.value;
2979
3756
  }
2980
3757
  syncState() {
2981
3758
  const tabs = this.getTabs();
@@ -2996,11 +3773,8 @@ var init_ui_tabs_entry = __esm({
2996
3773
  });
2997
3774
  }
2998
3775
  componentDidLoad() {
2999
- this.syncFromProp();
3000
- if (!this.internalValue && this.defaultValue) {
3001
- this.internalValue = this.defaultValue;
3002
- }
3003
- if (!this.internalValue) {
3776
+ this.internalValue = controlledOrDefault(this.value, this.defaultValue);
3777
+ if (!isControlled(this.value) && !this.internalValue) {
3004
3778
  const tabs = this.getTabs();
3005
3779
  if (tabs.length > 0) {
3006
3780
  this.internalValue = tabs[0]?.id ?? tabs[0]?.getAttribute("aria-controls") ?? "";
@@ -3025,7 +3799,8 @@ var init_ui_tabs_entry = __esm({
3025
3799
  if (!newValue)
3026
3800
  return;
3027
3801
  const prev = this.internalValue;
3028
- this.internalValue = newValue;
3802
+ if (!isControlled(this.value))
3803
+ this.internalValue = newValue;
3029
3804
  this.syncState();
3030
3805
  dispatchDetail(this.host, "select", { value: newValue, previousValue: prev || void 0, trigger });
3031
3806
  }
@@ -3054,7 +3829,7 @@ var init_ui_tabs_entry = __esm({
3054
3829
  }
3055
3830
  };
3056
3831
  render() {
3057
- return h(Host, { key: "ca8671f06914de2bd6b412caf11e385d67ae722b", orientation: this.orientation, "data-orientation": this.orientation }, h("slot", { key: "49beb3783c8f6a330d25164c82933c2bf6345b1e" }));
3832
+ return h(Host, { key: "19207153c7b7a6ea5f5ffb50439e99af70984b44", orientation: this.orientation, "data-orientation": this.orientation }, h("slot", { key: "5045cd040eeccd028c00328206d47f7d17b622de" }));
3058
3833
  }
3059
3834
  static get watchers() {
3060
3835
  return {
@@ -3159,7 +3934,7 @@ var init_ui_textarea_entry = __esm({
3159
3934
  });
3160
3935
  };
3161
3936
  render() {
3162
- return h(Host, { key: "9ccc0464bca55b3364645ea90df3890f9ed9d697", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "81c4df31064d4dcd2b2e27dfcf3141cc9f18f54e", ref: (el) => this.slotRef = el }));
3937
+ return h(Host, { key: "020adfed4a177ef5d07852ff2e6ffb66b6f80742", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "2e9bd0e071e24fcf248eadf38f16484321359503", ref: (el) => this.slotRef = el }));
3163
3938
  }
3164
3939
  static get watchers() {
3165
3940
  return {
@@ -3211,10 +3986,12 @@ var init_ui_toast_region_entry = __esm({
3211
3986
  return getElement(this);
3212
3987
  }
3213
3988
  open = true;
3214
- internalOpen = true;
3989
+ internalOpen = false;
3215
3990
  surface = null;
3991
+ contentObserver = null;
3992
+ pendingDismiss = null;
3216
3993
  syncFromProp() {
3217
- this.internalOpen = this.open;
3994
+ this.syncContents();
3218
3995
  }
3219
3996
  syncSurface() {
3220
3997
  if (this.internalOpen)
@@ -3224,22 +4001,37 @@ var init_ui_toast_region_entry = __esm({
3224
4001
  }
3225
4002
  componentDidLoad() {
3226
4003
  this.surface = createViewportSurface(this.host);
3227
- this.syncFromProp();
4004
+ this.contentObserver = new MutationObserver(this.syncContents);
4005
+ this.contentObserver.observe(this.host, { childList: true, subtree: true });
4006
+ this.syncContents();
3228
4007
  this.syncSurface();
3229
4008
  this.host.addEventListener("click", this.onClick);
3230
4009
  }
3231
4010
  disconnectedCallback() {
3232
4011
  this.host.removeEventListener("click", this.onClick);
4012
+ this.contentObserver?.disconnect();
4013
+ this.contentObserver = null;
3233
4014
  this.surface?.destroy();
3234
4015
  this.surface = null;
3235
4016
  }
3236
4017
  getToasts() {
3237
4018
  return Array.from(this.host.querySelectorAll("[data-ui-toast]"));
3238
4019
  }
3239
- updateOpenState() {
3240
- const toasts = this.getToasts();
3241
- this.internalOpen = toasts.length > 0;
3242
- }
4020
+ syncContents = () => {
4021
+ const nextOpen = this.open && this.getToasts().length > 0;
4022
+ const wasOpen = this.internalOpen;
4023
+ const completedDismiss = this.pendingDismiss && !this.host.contains(this.pendingDismiss.toast) ? this.pendingDismiss : null;
4024
+ this.internalOpen = nextOpen;
4025
+ if (wasOpen && !nextOpen && completedDismiss) {
4026
+ dispatchDetail(this.host, "close", {
4027
+ open: false,
4028
+ reason: "action",
4029
+ trigger: completedDismiss.trigger
4030
+ });
4031
+ }
4032
+ if (completedDismiss || !this.open)
4033
+ this.pendingDismiss = null;
4034
+ };
3243
4035
  onClick = (e) => {
3244
4036
  const dismissBtn = e.target.closest?.("[data-ui-toast-dismiss]");
3245
4037
  if (!dismissBtn)
@@ -3248,24 +4040,16 @@ var init_ui_toast_region_entry = __esm({
3248
4040
  if (!toast)
3249
4041
  return;
3250
4042
  const id = toast.id ?? "";
3251
- toast.setAttribute("aria-hidden", "true");
3252
- toast.remove();
4043
+ const trigger = eventToTrigger(e);
4044
+ this.pendingDismiss = { toast, trigger };
3253
4045
  dispatchDetail(this.host, "dismiss", {
3254
4046
  id,
3255
4047
  reason: "action",
3256
- trigger: eventToTrigger(e)
4048
+ trigger
3257
4049
  });
3258
- this.updateOpenState();
3259
- if (this.getToasts().length === 0) {
3260
- dispatchDetail(this.host, "close", {
3261
- open: false,
3262
- reason: "action",
3263
- trigger: eventToTrigger(e)
3264
- });
3265
- }
3266
4050
  };
3267
4051
  render() {
3268
- return h(Host, { key: "9ec1cc51ecc4e7a256be5d89a09a10788e46db53", role: "region", "aria-label": "Notifications", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "7b08656f3745a02f8e9f0935e47d6f2cffd88f9b" }));
4052
+ return h(Host, { key: "8a3546bcd59e12f21393ea55fa4d232d3907a34e", role: "region", "aria-label": "Notifications", "aria-live": "polite", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "a4a4525a1ca768d65ff36b3889a821b8dda8b6f7" }));
3269
4053
  }
3270
4054
  static get watchers() {
3271
4055
  return {
@@ -3293,8 +4077,9 @@ var init_ui_tooltip_entry = __esm({
3293
4077
  init_index_8BGiMGQ0();
3294
4078
  init_manager_C_0syqXZ();
3295
4079
  init_events_JwSoedEO();
4080
+ init_controlled_state_BnGhGgTH();
3296
4081
  init_positioning_Bu0dmLBE();
3297
- uiTooltipCss = () => `:host{position:fixed;inset:auto;margin:0;display:inline-block;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md);opacity:0;transform:translateY(4px);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}:host(:popover-open){opacity:1;transform:translateY(0)}@starting-style{:host(:popover-open){opacity:0;transform:translateY(4px)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host{transition:none}}`;
4082
+ uiTooltipCss = () => `:host{position:fixed;inset:auto;margin:0;display:inline-block;box-sizing:border-box;padding:0;border:0;border-radius:0;background:transparent;opacity:0;transform:translateY(4px);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}.tooltip__surface{box-sizing:border-box;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md)}:host(:popover-open){opacity:1;transform:translateY(0)}@starting-style{:host(:popover-open){opacity:0;transform:translateY(4px)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host{transition:none}}`;
3298
4083
  UITooltip = class {
3299
4084
  constructor(hostRef) {
3300
4085
  registerInstance(this, hostRef);
@@ -3305,7 +4090,8 @@ var init_ui_tooltip_entry = __esm({
3305
4090
  return getElement(this);
3306
4091
  }
3307
4092
  for = "";
3308
- open = false;
4093
+ /** Controlled open state. Omit it to use defaultOpen and local interaction state. */
4094
+ open;
3309
4095
  defaultOpen = false;
3310
4096
  placement = "top-start";
3311
4097
  /** Pointer hover intent delay in milliseconds. Keyboard focus is immediate. */
@@ -3326,7 +4112,8 @@ var init_ui_tooltip_entry = __esm({
3326
4112
  hideTimer = null;
3327
4113
  syncFromProp() {
3328
4114
  this.clearTimers();
3329
- this.internalOpen = this.open;
4115
+ if (isControlled(this.open))
4116
+ this.internalOpen = this.open;
3330
4117
  }
3331
4118
  resetSurface() {
3332
4119
  this.syncTrigger();
@@ -3352,8 +4139,7 @@ var init_ui_tooltip_entry = __esm({
3352
4139
  componentDidLoad() {
3353
4140
  if (!this.host.id)
3354
4141
  this.host.id = this.overlayId;
3355
- this.syncFromProp();
3356
- this.internalOpen = this.internalOpen || this.defaultOpen;
4142
+ this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
3357
4143
  this.syncTrigger();
3358
4144
  this.setupSurface();
3359
4145
  this.host.addEventListener("pointerenter", this.onSurfaceEnter);
@@ -3406,460 +4192,188 @@ var init_ui_tooltip_entry = __esm({
3406
4192
  if (!this.trigger)
3407
4193
  return;
3408
4194
  const ids = (this.trigger.getAttribute("aria-describedby") || "").split(/\s+/).filter((id) => id && id !== this.host.id);
3409
- if (ids.length)
3410
- this.trigger.setAttribute("aria-describedby", ids.join(" "));
3411
- else
3412
- this.trigger.removeAttribute("aria-describedby");
3413
- this.trigger.removeEventListener("click", this.onTriggerClick);
3414
- this.trigger.removeEventListener("keydown", this.onTriggerKeydown);
3415
- this.trigger.removeEventListener("pointerenter", this.onTriggerEnter);
3416
- this.trigger.removeEventListener("pointerleave", this.onTriggerLeave);
3417
- this.trigger.removeEventListener("focusin", this.onTriggerFocusIn);
3418
- this.trigger.removeEventListener("focusout", this.onTriggerFocusOut);
3419
- }
3420
- clearShowTimer() {
3421
- if (this.showTimer === null)
3422
- return;
3423
- clearTimeout(this.showTimer);
3424
- this.showTimer = null;
3425
- }
3426
- clearHideTimer() {
3427
- if (this.hideTimer === null)
3428
- return;
3429
- clearTimeout(this.hideTimer);
3430
- this.hideTimer = null;
3431
- }
3432
- clearTimers() {
3433
- this.clearShowTimer();
3434
- this.clearHideTimer();
3435
- }
3436
- setInteractionOpen(nextOpen, trigger) {
3437
- if (this.internalOpen === nextOpen)
3438
- return;
3439
- this.internalOpen = nextOpen;
3440
- dispatchDetail(this.host, nextOpen ? "open" : "close", {
3441
- open: nextOpen,
3442
- reason: "action",
3443
- trigger
3444
- });
3445
- }
3446
- onSurfaceEnter = () => this.clearHideTimer();
3447
- onTriggerClick = (event) => {
3448
- if (!this.toggleOnClick)
3449
- return;
3450
- this.clearTimers();
3451
- this.pinned = !this.pinned;
3452
- this.setInteractionOpen(this.pinned, event.detail === 0 ? "keyboard" : "pointer");
3453
- };
3454
- onTriggerKeydown = (event) => {
3455
- if (event.key === "Escape")
3456
- this.clearTimers();
3457
- };
3458
- onTriggerEnter = (event) => {
3459
- if (event.pointerType === "touch")
3460
- return;
3461
- this.clearHideTimer();
3462
- if (this.internalOpen || this.showTimer !== null)
3463
- return;
3464
- this.showTimer = setTimeout(() => {
3465
- this.showTimer = null;
3466
- this.setInteractionOpen(true, "pointer");
3467
- }, Math.max(0, this.showDelay));
3468
- };
3469
- onTriggerLeave = () => {
3470
- this.clearShowTimer();
3471
- if (this.focused || this.pinned || !this.internalOpen || this.hideTimer !== null)
3472
- return;
3473
- this.hideTimer = setTimeout(() => {
3474
- this.hideTimer = null;
3475
- this.setInteractionOpen(false, "pointer");
3476
- }, Math.max(0, this.hideDelay));
3477
- };
3478
- onTriggerFocusIn = () => {
3479
- this.focused = true;
3480
- this.clearTimers();
3481
- this.setInteractionOpen(true, "keyboard");
3482
- };
3483
- onTriggerFocusOut = (e) => {
3484
- const related = e.relatedTarget;
3485
- if (related && this.host.contains(related))
3486
- return;
3487
- this.focused = false;
3488
- this.pinned = false;
3489
- this.clearTimers();
3490
- this.setInteractionOpen(false, "keyboard");
3491
- };
3492
- handleRequestClose(reason, trigger) {
3493
- if (reason === "escape" || reason === "light-dismiss" && this.toggleOnClick) {
3494
- this.pinned = false;
3495
- this.clearTimers();
3496
- this.internalOpen = false;
3497
- dispatchDetail(this.host, "close", {
3498
- open: false,
3499
- reason,
3500
- trigger
3501
- });
3502
- }
3503
- }
3504
- render() {
3505
- return h(Host, { key: "b0199c23316a707ae3e1e7c361f2838872f62221", role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "d0c7822f2f47848a509bf8e310806edbdb320f02" }));
3506
- }
3507
- static get watchers() {
3508
- return {
3509
- "open": [{
3510
- "syncFromProp": 0
3511
- }],
3512
- "for": [{
3513
- "resetSurface": 0
3514
- }],
3515
- "placement": [{
3516
- "resetSurface": 0
3517
- }],
3518
- "internalOpen": [{
3519
- "syncOverlay": 0
3520
- }]
3521
- };
3522
- }
3523
- };
3524
- UITooltip.style = uiTooltipCss();
3525
- }
3526
- });
3527
-
3528
- // dist/esm/ui-top-bar.entry.js
3529
- var ui_top_bar_entry_exports = {};
3530
- __export(ui_top_bar_entry_exports, {
3531
- ui_top_bar: () => UITopBar
3532
- });
3533
- function slotHasContent3(slot) {
3534
- if (!slot) {
3535
- return false;
3536
- }
3537
- return slot.assignedNodes({ flatten: true }).some((node) => {
3538
- if (node.nodeType === Node.TEXT_NODE) {
3539
- return Boolean(node.textContent?.trim());
3540
- }
3541
- return true;
3542
- });
3543
- }
3544
- var uiTopBarCss, UITopBar;
3545
- var init_ui_top_bar_entry = __esm({
3546
- "dist/esm/ui-top-bar.entry.js"() {
3547
- init_index_8BGiMGQ0();
3548
- 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}}`;
3549
- UITopBar = class {
3550
- constructor(hostRef) {
3551
- registerInstance(this, hostRef);
4195
+ if (ids.length)
4196
+ this.trigger.setAttribute("aria-describedby", ids.join(" "));
4197
+ else
4198
+ this.trigger.removeAttribute("aria-describedby");
4199
+ this.trigger.removeEventListener("click", this.onTriggerClick);
4200
+ this.trigger.removeEventListener("keydown", this.onTriggerKeydown);
4201
+ this.trigger.removeEventListener("pointerenter", this.onTriggerEnter);
4202
+ this.trigger.removeEventListener("pointerleave", this.onTriggerLeave);
4203
+ this.trigger.removeEventListener("focusin", this.onTriggerFocusIn);
4204
+ this.trigger.removeEventListener("focusout", this.onTriggerFocusOut);
3552
4205
  }
3553
- get host() {
3554
- return getElement(this);
4206
+ clearShowTimer() {
4207
+ if (this.showTimer === null)
4208
+ return;
4209
+ clearTimeout(this.showTimer);
4210
+ this.showTimer = null;
3555
4211
  }
3556
- hasLeading = false;
3557
- hasSearch = false;
3558
- hasActions = false;
3559
- leadingSlot;
3560
- searchSlot;
3561
- actionsSlot;
3562
- componentDidLoad() {
3563
- this.syncSlots();
4212
+ clearHideTimer() {
4213
+ if (this.hideTimer === null)
4214
+ return;
4215
+ clearTimeout(this.hideTimer);
4216
+ this.hideTimer = null;
3564
4217
  }
3565
- syncSlots = () => {
3566
- this.hasLeading = slotHasContent3(this.leadingSlot);
3567
- this.hasSearch = slotHasContent3(this.searchSlot);
3568
- this.hasActions = slotHasContent3(this.actionsSlot);
3569
- };
3570
- render() {
3571
- return h(Host, { key: "730e45232ab2b86c2ac99dba773f4ca15d7c3c51" }, h("header", { key: "f94f9b4f3f5930fda950895d2eec01d3ec175479", class: "top-bar", part: "base" }, h("div", { key: "038f6a404b0f159b4b826ada73d3c920266354c8", class: "top-bar__leading", hidden: !this.hasLeading }, h("slot", { key: "2d415368310c319eca3f3eb9b2c885ef79bb4107", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "dfd78b02066a91e9c610e4655a70da704ad65327", class: "top-bar__title" }, h("slot", { key: "499e24a864a31f6e400fd02aab4a3f960c87e572" })), h("div", { key: "5aa94952996487651dffecd2e351548631fa29b6", class: "top-bar__search", hidden: !this.hasSearch }, h("slot", { key: "eddad95f8acf787ee0cead2a46e7961a06375d5c", name: "search", ref: (el) => this.searchSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "dc69d492aa221a8beb888350bf101f8beeceede9", class: "top-bar__actions", hidden: !this.hasActions }, h("slot", { key: "7cde7e062f487da8209738a32415636c7a6b72f0", name: "actions", ref: (el) => this.actionsSlot = el, onSlotchange: this.syncSlots }))));
4218
+ clearTimers() {
4219
+ this.clearShowTimer();
4220
+ this.clearHideTimer();
3572
4221
  }
3573
- };
3574
- UITopBar.style = uiTopBarCss();
3575
- }
3576
- });
3577
-
3578
- // dist/esm/ui-tree-item.entry.js
3579
- var ui_tree_item_entry_exports = {};
3580
- __export(ui_tree_item_entry_exports, {
3581
- ui_tree_item: () => UITreeItem
3582
- });
3583
- function serializeAttributes(attributes) {
3584
- return Object.entries(attributes).map(([name, value]) => ` ${name}="${escapeAttribute(value)}"`).join("");
3585
- }
3586
- function escapeAttribute(value) {
3587
- return String(value).replaceAll("&", "&amp;").replaceAll('"', "&quot;");
3588
- }
3589
- function serializeIconNode(node) {
3590
- const [tag, attributes] = node;
3591
- return `<${tag}${serializeAttributes(attributes)}></${tag}>`;
3592
- }
3593
- function loomaIconMarkup(name, className = "looma-icon") {
3594
- return [
3595
- `<svg class="${escapeAttribute(className)}" data-looma-icon="${name}" aria-hidden="true" focusable="false"`,
3596
- ' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"',
3597
- ' stroke-linecap="round" stroke-linejoin="round">',
3598
- LOOMA_ICONS[name].map(serializeIconNode).join(""),
3599
- "</svg>"
3600
- ].join("");
3601
- }
3602
- var Bold, Braces, ChevronDown, ChevronLeft, CodeXml, Columns3, Ellipsis, Eraser, GripHorizontal, GripVertical, Heading1, Heading2, Heading3, Highlighter, Image, Italic, ListOrdered, ListTodo, List, Merge, Minus, PaintBucket, PanelBottom, PanelLeft, PanelRight, PanelTop, Pilcrow, Plus, Quote, Redo2, Rows3, Split, Strikethrough, Table2, TextAlignCenter, TextAlignEnd, TextAlignStart, Trash2, Underline, Undo2, LOOMA_ICONS, uiTreeItemCss, UITreeItem;
3603
- var init_ui_tree_item_entry = __esm({
3604
- "dist/esm/ui-tree-item.entry.js"() {
3605
- init_index_8BGiMGQ0();
3606
- init_events_JwSoedEO();
3607
- Bold = [
3608
- ["path", { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" }]
3609
- ];
3610
- Braces = [
3611
- ["path", { d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1" }],
3612
- ["path", { d: "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1" }]
3613
- ];
3614
- ChevronDown = [["path", { d: "m6 9 6 6 6-6" }]];
3615
- ChevronLeft = [["path", { d: "m15 18-6-6 6-6" }]];
3616
- CodeXml = [
3617
- ["path", { d: "m18 16 4-4-4-4" }],
3618
- ["path", { d: "m6 8-4 4 4 4" }],
3619
- ["path", { d: "m14.5 4-5 16" }]
3620
- ];
3621
- Columns3 = [
3622
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
3623
- ["path", { d: "M9 3v18" }],
3624
- ["path", { d: "M15 3v18" }]
3625
- ];
3626
- Ellipsis = [
3627
- ["circle", { cx: "12", cy: "12", r: "1" }],
3628
- ["circle", { cx: "19", cy: "12", r: "1" }],
3629
- ["circle", { cx: "5", cy: "12", r: "1" }]
3630
- ];
3631
- Eraser = [
3632
- [
3633
- "path",
3634
- {
3635
- d: "M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21"
3636
- }
3637
- ],
3638
- ["path", { d: "m5.082 11.09 8.828 8.828" }]
3639
- ];
3640
- GripHorizontal = [
3641
- ["circle", { cx: "12", cy: "9", r: "1" }],
3642
- ["circle", { cx: "19", cy: "9", r: "1" }],
3643
- ["circle", { cx: "5", cy: "9", r: "1" }],
3644
- ["circle", { cx: "12", cy: "15", r: "1" }],
3645
- ["circle", { cx: "19", cy: "15", r: "1" }],
3646
- ["circle", { cx: "5", cy: "15", r: "1" }]
3647
- ];
3648
- GripVertical = [
3649
- ["circle", { cx: "9", cy: "12", r: "1" }],
3650
- ["circle", { cx: "9", cy: "5", r: "1" }],
3651
- ["circle", { cx: "9", cy: "19", r: "1" }],
3652
- ["circle", { cx: "15", cy: "12", r: "1" }],
3653
- ["circle", { cx: "15", cy: "5", r: "1" }],
3654
- ["circle", { cx: "15", cy: "19", r: "1" }]
3655
- ];
3656
- Heading1 = [
3657
- ["path", { d: "M4 12h8" }],
3658
- ["path", { d: "M4 18V6" }],
3659
- ["path", { d: "M12 18V6" }],
3660
- ["path", { d: "m17 12 3-2v8" }]
3661
- ];
3662
- Heading2 = [
3663
- ["path", { d: "M4 12h8" }],
3664
- ["path", { d: "M4 18V6" }],
3665
- ["path", { d: "M12 18V6" }],
3666
- ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }]
3667
- ];
3668
- Heading3 = [
3669
- ["path", { d: "M4 12h8" }],
3670
- ["path", { d: "M4 18V6" }],
3671
- ["path", { d: "M12 18V6" }],
3672
- ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }],
3673
- ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }]
3674
- ];
3675
- Highlighter = [
3676
- ["path", { d: "m9 11-6 6v3h9l3-3" }],
3677
- ["path", { d: "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" }]
3678
- ];
3679
- Image = [
3680
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }],
3681
- ["circle", { cx: "9", cy: "9", r: "2" }],
3682
- ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]
3683
- ];
3684
- Italic = [
3685
- ["line", { x1: "19", x2: "10", y1: "4", y2: "4" }],
3686
- ["line", { x1: "14", x2: "5", y1: "20", y2: "20" }],
3687
- ["line", { x1: "15", x2: "9", y1: "4", y2: "20" }]
3688
- ];
3689
- ListOrdered = [
3690
- ["path", { d: "M11 5h10" }],
3691
- ["path", { d: "M11 12h10" }],
3692
- ["path", { d: "M11 19h10" }],
3693
- ["path", { d: "M4 4h1v5" }],
3694
- ["path", { d: "M4 9h2" }],
3695
- ["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" }]
3696
- ];
3697
- ListTodo = [
3698
- ["path", { d: "M13 5h8" }],
3699
- ["path", { d: "M13 12h8" }],
3700
- ["path", { d: "M13 19h8" }],
3701
- ["path", { d: "m3 17 2 2 4-4" }],
3702
- ["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1" }]
3703
- ];
3704
- List = [
3705
- ["path", { d: "M3 5h.01" }],
3706
- ["path", { d: "M3 12h.01" }],
3707
- ["path", { d: "M3 19h.01" }],
3708
- ["path", { d: "M8 5h13" }],
3709
- ["path", { d: "M8 12h13" }],
3710
- ["path", { d: "M8 19h13" }]
3711
- ];
3712
- Merge = [
3713
- ["path", { d: "m8 6 4-4 4 4" }],
3714
- ["path", { d: "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }],
3715
- ["path", { d: "m20 22-5-5" }]
3716
- ];
3717
- Minus = [["path", { d: "M5 12h14" }]];
3718
- PaintBucket = [
3719
- ["path", { d: "m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z" }],
3720
- ["path", { d: "m5 2 5 5" }],
3721
- ["path", { d: "M2 13h15" }],
3722
- ["path", { d: "M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z" }]
3723
- ];
3724
- PanelBottom = [
3725
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
3726
- ["path", { d: "M3 15h18" }]
3727
- ];
3728
- PanelLeft = [
3729
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
3730
- ["path", { d: "M9 3v18" }]
3731
- ];
3732
- PanelRight = [
3733
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
3734
- ["path", { d: "M15 3v18" }]
3735
- ];
3736
- PanelTop = [
3737
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
3738
- ["path", { d: "M3 9h18" }]
3739
- ];
3740
- Pilcrow = [
3741
- ["path", { d: "M13 4v16" }],
3742
- ["path", { d: "M17 4v16" }],
3743
- ["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }]
3744
- ];
3745
- Plus = [
3746
- ["path", { d: "M5 12h14" }],
3747
- ["path", { d: "M12 5v14" }]
3748
- ];
3749
- Quote = [
3750
- [
3751
- "path",
3752
- {
3753
- d: "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
3754
- }
3755
- ],
3756
- [
3757
- "path",
3758
- {
3759
- d: "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
3760
- }
3761
- ]
3762
- ];
3763
- Redo2 = [
3764
- ["path", { d: "m15 14 5-5-5-5" }],
3765
- ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }]
3766
- ];
3767
- Rows3 = [
3768
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
3769
- ["path", { d: "M21 9H3" }],
3770
- ["path", { d: "M21 15H3" }]
3771
- ];
3772
- Split = [
3773
- ["path", { d: "M16 3h5v5" }],
3774
- ["path", { d: "M8 3H3v5" }],
3775
- ["path", { d: "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" }],
3776
- ["path", { d: "m15 9 6-6" }]
3777
- ];
3778
- Strikethrough = [
3779
- ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4" }],
3780
- ["path", { d: "M14 12a4 4 0 0 1 0 8H6" }],
3781
- ["line", { x1: "4", x2: "20", y1: "12", y2: "12" }]
3782
- ];
3783
- Table2 = [
3784
- [
3785
- "path",
3786
- {
3787
- d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"
4222
+ setInteractionOpen(nextOpen, trigger) {
4223
+ if (this.internalOpen === nextOpen)
4224
+ return;
4225
+ if (!isControlled(this.open))
4226
+ this.internalOpen = nextOpen;
4227
+ dispatchDetail(this.host, nextOpen ? "open" : "close", {
4228
+ open: nextOpen,
4229
+ reason: "action",
4230
+ trigger
4231
+ });
4232
+ }
4233
+ onSurfaceEnter = () => this.clearHideTimer();
4234
+ onTriggerClick = (event) => {
4235
+ if (!this.toggleOnClick)
4236
+ return;
4237
+ this.clearTimers();
4238
+ this.pinned = !this.pinned;
4239
+ this.setInteractionOpen(this.pinned, event.detail === 0 ? "keyboard" : "pointer");
4240
+ };
4241
+ onTriggerKeydown = (event) => {
4242
+ if (event.key === "Escape")
4243
+ this.clearTimers();
4244
+ };
4245
+ onTriggerEnter = (event) => {
4246
+ if (event.pointerType === "touch")
4247
+ return;
4248
+ this.clearHideTimer();
4249
+ if (this.internalOpen || this.showTimer !== null)
4250
+ return;
4251
+ this.showTimer = setTimeout(() => {
4252
+ this.showTimer = null;
4253
+ this.setInteractionOpen(true, "pointer");
4254
+ }, Math.max(0, this.showDelay));
4255
+ };
4256
+ onTriggerLeave = () => {
4257
+ this.clearShowTimer();
4258
+ if (this.focused || this.pinned || !this.internalOpen || this.hideTimer !== null)
4259
+ return;
4260
+ this.hideTimer = setTimeout(() => {
4261
+ this.hideTimer = null;
4262
+ this.setInteractionOpen(false, "pointer");
4263
+ }, Math.max(0, this.hideDelay));
4264
+ };
4265
+ onTriggerFocusIn = () => {
4266
+ this.focused = true;
4267
+ this.clearTimers();
4268
+ this.setInteractionOpen(true, "keyboard");
4269
+ };
4270
+ onTriggerFocusOut = (e) => {
4271
+ const related = e.relatedTarget;
4272
+ if (related && this.host.contains(related))
4273
+ return;
4274
+ this.focused = false;
4275
+ this.pinned = false;
4276
+ this.clearTimers();
4277
+ this.setInteractionOpen(false, "keyboard");
4278
+ };
4279
+ handleRequestClose(reason, trigger) {
4280
+ if (reason === "escape" || reason === "light-dismiss" && this.toggleOnClick) {
4281
+ this.pinned = false;
4282
+ this.clearTimers();
4283
+ if (!isControlled(this.open))
4284
+ this.internalOpen = false;
4285
+ dispatchDetail(this.host, "close", {
4286
+ open: false,
4287
+ reason,
4288
+ trigger
4289
+ });
3788
4290
  }
3789
- ]
3790
- ];
3791
- TextAlignCenter = [
3792
- ["path", { d: "M21 5H3" }],
3793
- ["path", { d: "M17 12H7" }],
3794
- ["path", { d: "M19 19H5" }]
3795
- ];
3796
- TextAlignEnd = [
3797
- ["path", { d: "M21 5H3" }],
3798
- ["path", { d: "M21 12H9" }],
3799
- ["path", { d: "M21 19H7" }]
3800
- ];
3801
- TextAlignStart = [
3802
- ["path", { d: "M21 5H3" }],
3803
- ["path", { d: "M15 12H3" }],
3804
- ["path", { d: "M17 19H3" }]
3805
- ];
3806
- Trash2 = [
3807
- ["path", { d: "M10 11v6" }],
3808
- ["path", { d: "M14 11v6" }],
3809
- ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }],
3810
- ["path", { d: "M3 6h18" }],
3811
- ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]
3812
- ];
3813
- Underline = [
3814
- ["path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }],
3815
- ["line", { x1: "4", x2: "20", y1: "20", y2: "20" }]
3816
- ];
3817
- Undo2 = [
3818
- ["path", { d: "M9 14 4 9l5-5" }],
3819
- ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" }]
3820
- ];
3821
- LOOMA_ICONS = {
3822
- "align-center": TextAlignCenter,
3823
- "align-left": TextAlignStart,
3824
- "align-right": TextAlignEnd,
3825
- bold: Bold,
3826
- braces: Braces,
3827
- "chevron-down": ChevronDown,
3828
- "chevron-left": ChevronLeft,
3829
- "code-xml": CodeXml,
3830
- columns: Columns3,
3831
- ellipsis: Ellipsis,
3832
- eraser: Eraser,
3833
- "grip-horizontal": GripHorizontal,
3834
- "grip-vertical": GripVertical,
3835
- "heading-1": Heading1,
3836
- "heading-2": Heading2,
3837
- "heading-3": Heading3,
3838
- highlighter: Highlighter,
3839
- image: Image,
3840
- italic: Italic,
3841
- list: List,
3842
- "list-ordered": ListOrdered,
3843
- "list-todo": ListTodo,
3844
- merge: Merge,
3845
- minus: Minus,
3846
- "paint-bucket": PaintBucket,
3847
- "panel-bottom": PanelBottom,
3848
- "panel-left": PanelLeft,
3849
- "panel-right": PanelRight,
3850
- "panel-top": PanelTop,
3851
- pilcrow: Pilcrow,
3852
- plus: Plus,
3853
- quote: Quote,
3854
- redo: Redo2,
3855
- rows: Rows3,
3856
- split: Split,
3857
- strikethrough: Strikethrough,
3858
- table: Table2,
3859
- trash: Trash2,
3860
- underline: Underline,
3861
- undo: Undo2
4291
+ }
4292
+ render() {
4293
+ return h(Host, { key: "6c70f235889d6f1c425f0a51fcfc04e06a96dea4", role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? "" : void 0 }, h("div", { key: "5c4f1d264e32d308f5b26af4e967e13369c4238a", class: "tooltip__surface" }, h("slot", { key: "52b5900d67ffa7590b0ff97511f99718d2e8c311" })));
4294
+ }
4295
+ static get watchers() {
4296
+ return {
4297
+ "open": [{
4298
+ "syncFromProp": 0
4299
+ }],
4300
+ "for": [{
4301
+ "resetSurface": 0
4302
+ }],
4303
+ "placement": [{
4304
+ "resetSurface": 0
4305
+ }],
4306
+ "internalOpen": [{
4307
+ "syncOverlay": 0
4308
+ }]
4309
+ };
4310
+ }
4311
+ };
4312
+ UITooltip.style = uiTooltipCss();
4313
+ }
4314
+ });
4315
+
4316
+ // dist/esm/ui-top-bar.entry.js
4317
+ var ui_top_bar_entry_exports = {};
4318
+ __export(ui_top_bar_entry_exports, {
4319
+ ui_top_bar: () => UITopBar
4320
+ });
4321
+ function slotHasContent3(slot) {
4322
+ if (!slot) {
4323
+ return false;
4324
+ }
4325
+ return slot.assignedNodes({ flatten: true }).some((node) => {
4326
+ if (node.nodeType === Node.TEXT_NODE) {
4327
+ return Boolean(node.textContent?.trim());
4328
+ }
4329
+ return true;
4330
+ });
4331
+ }
4332
+ var uiTopBarCss, UITopBar;
4333
+ var init_ui_top_bar_entry = __esm({
4334
+ "dist/esm/ui-top-bar.entry.js"() {
4335
+ init_index_8BGiMGQ0();
4336
+ 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}}`;
4337
+ UITopBar = class {
4338
+ constructor(hostRef) {
4339
+ registerInstance(this, hostRef);
4340
+ }
4341
+ get host() {
4342
+ return getElement(this);
4343
+ }
4344
+ hasLeading = false;
4345
+ hasSearch = false;
4346
+ hasActions = false;
4347
+ leadingSlot;
4348
+ searchSlot;
4349
+ actionsSlot;
4350
+ componentDidLoad() {
4351
+ this.syncSlots();
4352
+ }
4353
+ syncSlots = () => {
4354
+ this.hasLeading = slotHasContent3(this.leadingSlot);
4355
+ this.hasSearch = slotHasContent3(this.searchSlot);
4356
+ this.hasActions = slotHasContent3(this.actionsSlot);
4357
+ };
4358
+ render() {
4359
+ return h(Host, { key: "ef7cf644a8e8381d7d1f8d093bcfefcdc4620682" }, h("header", { key: "5055594a179d86efefd43529e070a582c51cb1d8", class: "top-bar", part: "base" }, h("div", { key: "bd6ec069ae9d7820a6992250ba1aa997b4cc6754", class: "top-bar__leading", hidden: !this.hasLeading }, h("slot", { key: "3b9b1b73fb455ad720e1db46757555eb3713c0b8", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "e402cc0cb7ec4418460182f8f32cb161c6139221", class: "top-bar__title" }, h("slot", { key: "fce0cfc11da269167853f591742b1369023864ae" })), h("div", { key: "6861bb04f399076378aa1fa9be24b35db277106a", class: "top-bar__search", hidden: !this.hasSearch }, h("slot", { key: "3857f37d53ec99b36a52cb7830e634afdee29d2e", name: "search", ref: (el) => this.searchSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "538f6297078b6d5aa85906e902066e8809f52540", class: "top-bar__actions", hidden: !this.hasActions }, h("slot", { key: "3c45ff59c4b48673e796c6e93842cb11fceb652f", name: "actions", ref: (el) => this.actionsSlot = el, onSlotchange: this.syncSlots }))));
4360
+ }
3862
4361
  };
4362
+ UITopBar.style = uiTopBarCss();
4363
+ }
4364
+ });
4365
+
4366
+ // dist/esm/ui-tree-item.entry.js
4367
+ var ui_tree_item_entry_exports = {};
4368
+ __export(ui_tree_item_entry_exports, {
4369
+ ui_tree_item: () => UITreeItem
4370
+ });
4371
+ var uiTreeItemCss, UITreeItem;
4372
+ var init_ui_tree_item_entry = __esm({
4373
+ "dist/esm/ui-tree-item.entry.js"() {
4374
+ init_index_8BGiMGQ0();
4375
+ init_events_JwSoedEO();
4376
+ init_icons_CoFximGM();
3863
4377
  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}}`;
3864
4378
  UITreeItem = class {
3865
4379
  constructor(hostRef) {
@@ -3872,11 +4386,9 @@ var init_ui_tree_item_entry = __esm({
3872
4386
  itemId = "";
3873
4387
  /** Accessible name used by the disclosure and drag handle. */
3874
4388
  label = "";
3875
- /** One-based visual and semantic nesting level. */
3876
- depth = 1;
3877
- /** Application hierarchy depth used for drop constraints. Defaults to visual depth. */
4389
+ /** Application hierarchy depth override used for drop constraints. Defaults to structural nesting. */
3878
4390
  dropDepth;
3879
- /** Deepest descendant distance, used with the tree's max-depth drop constraint. */
4391
+ /** Virtualized-tree descendant-depth override for the tree's max-depth drop constraint. */
3880
4392
  subtreeDepth;
3881
4393
  /** Whether this item accepts children and exposes disclosure behavior. */
3882
4394
  container = false;
@@ -3888,37 +4400,72 @@ var init_ui_tree_item_entry = __esm({
3888
4400
  dropScope = "";
3889
4401
  /** Comma-separated drag kinds accepted as children. Empty accepts every kind. */
3890
4402
  accepts = "";
3891
- /** Initial controlled expansion value. */
3892
- expanded = false;
4403
+ /** Controlled expansion value. When omitted, `default-expanded` initializes uncontrolled state. */
4404
+ expanded;
3893
4405
  /** Initial uncontrolled expansion value. */
3894
4406
  defaultExpanded = false;
3895
4407
  selected = false;
3896
4408
  disabled = false;
3897
4409
  internalExpanded = false;
4410
+ structuralLevel = 1;
4411
+ tabStop = false;
3898
4412
  syncExpandedFromProp() {
3899
- this.internalExpanded = this.expanded;
4413
+ if (this.expanded !== void 0)
4414
+ this.internalExpanded = this.expanded;
3900
4415
  }
3901
4416
  componentWillLoad() {
3902
- this.internalExpanded = this.expanded || this.defaultExpanded;
4417
+ this.internalExpanded = this.expanded ?? this.defaultExpanded;
4418
+ this.updateStructuralLevel();
3903
4419
  }
3904
- componentDidLoad() {
4420
+ connectedCallback() {
3905
4421
  this.host.addEventListener("ui-tree-auto-expand", this.onAutoExpand);
4422
+ this.host.addEventListener("ui-tree-structure-sync", this.updateStructuralLevel);
4423
+ this.host.addEventListener("ui-tree-roving-tab-stop", this.onRovingTabStop);
4424
+ this.host.addEventListener("ui-tree-request-expanded", this.onExpansionRequest);
3906
4425
  }
3907
4426
  disconnectedCallback() {
3908
4427
  this.host.removeEventListener("ui-tree-auto-expand", this.onAutoExpand);
3909
- }
4428
+ this.host.removeEventListener("ui-tree-structure-sync", this.updateStructuralLevel);
4429
+ this.host.removeEventListener("ui-tree-roving-tab-stop", this.onRovingTabStop);
4430
+ this.host.removeEventListener("ui-tree-request-expanded", this.onExpansionRequest);
4431
+ }
4432
+ updateStructuralLevel = () => {
4433
+ const tree = this.host.closest("ui-tree");
4434
+ let ancestor = this.host.parentElement?.closest("ui-tree-item") ?? null;
4435
+ let level = 1;
4436
+ while (ancestor && tree?.contains(ancestor)) {
4437
+ level += 1;
4438
+ ancestor = ancestor.parentElement?.closest("ui-tree-item") ?? null;
4439
+ }
4440
+ if (this.structuralLevel !== level)
4441
+ this.structuralLevel = level;
4442
+ };
3910
4443
  setExpanded(expanded, trigger) {
3911
- if (!this.container || this.disabled || this.internalExpanded === expanded)
4444
+ const current = this.isExpanded();
4445
+ if (!this.container || this.disabled || current === expanded)
3912
4446
  return;
3913
- this.internalExpanded = expanded;
4447
+ if (this.expanded === void 0)
4448
+ this.internalExpanded = expanded;
3914
4449
  dispatchDetail(this.host, "expand", { id: this.itemId, expanded, trigger });
4450
+ this.host.dispatchEvent(new CustomEvent("ui-tree-expansion-change"));
4451
+ }
4452
+ isExpanded() {
4453
+ return this.expanded ?? this.internalExpanded;
3915
4454
  }
3916
4455
  onAutoExpand = () => {
3917
4456
  this.setExpanded(true, "pointer");
3918
4457
  };
4458
+ onRovingTabStop = (event) => {
4459
+ this.tabStop = Boolean(event.detail?.active) && !this.disabled;
4460
+ };
4461
+ onExpansionRequest = (event) => {
4462
+ const detail = event.detail;
4463
+ if (typeof detail?.expanded === "boolean")
4464
+ this.setExpanded(detail.expanded, detail.trigger ?? "keyboard");
4465
+ };
3919
4466
  onDisclosureClick = (event) => {
3920
4467
  event.stopPropagation();
3921
- this.setExpanded(!this.internalExpanded, eventToTrigger(event));
4468
+ this.setExpanded(!this.isExpanded(), eventToTrigger(event));
3922
4469
  };
3923
4470
  onDisclosureKeydown = (event) => {
3924
4471
  if (event.key !== "ArrowRight" && event.key !== "ArrowLeft")
@@ -3933,16 +4480,17 @@ var init_ui_tree_item_entry = __esm({
3933
4480
  const path = event.composedPath();
3934
4481
  const interactive = path.some((node) => node instanceof HTMLElement && (node.matches('a, button, input, select, textarea, [role="button"], [role="link"]') || node.getAttribute("slot") === "actions"));
3935
4482
  if (!interactive)
3936
- this.setExpanded(!this.internalExpanded, eventToTrigger(event));
4483
+ this.setExpanded(!this.isExpanded(), eventToTrigger(event));
3937
4484
  };
3938
4485
  render() {
3939
- const level = Math.max(1, Math.floor(this.depth));
3940
- const disclosureLabel = `${this.internalExpanded ? "Collapse" : "Expand"} ${this.label || "item"}`;
4486
+ const level = this.structuralLevel;
4487
+ const expanded = this.isExpanded();
4488
+ const disclosureLabel = `${expanded ? "Collapse" : "Expand"} ${this.label || "item"}`;
3941
4489
  const dragLabel = `Drag ${this.label || "item"} to reorder`;
3942
- return h(Host, { key: "606f5fdac8a95489d0c62cd7d4918c6d5d0c759e", role: "treeitem", "aria-level": String(level), "aria-expanded": this.container ? String(this.internalExpanded) : void 0, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? "true" : void 0, "data-container": this.container ? "" : void 0, "data-selected": this.selected ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-drag-type": this.dragType || "item", "data-drop-scope": this.dropScope || void 0, "data-accepts": this.accepts || void 0, tabIndex: this.disabled ? -1 : 0, style: {
4490
+ return h(Host, { key: "f092fa9586a39aba1a9629ba42e52f8fbc10de05", role: "treeitem", "aria-label": this.label || void 0, "aria-level": String(level), "aria-expanded": this.container ? String(expanded) : void 0, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? "true" : void 0, "data-container": this.container ? "" : void 0, "data-selected": this.selected ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-drag-type": this.dragType || "item", "data-drop-scope": this.dropScope || void 0, "data-accepts": this.accepts || void 0, tabIndex: this.disabled || !this.tabStop ? -1 : 0, style: {
3943
4491
  "--ui-tree-item-depth": String(level - 1),
3944
4492
  "margin-inline-start": level > 1 ? "var(--ui-tree-indent, 16px)" : "0px"
3945
- } }, h("div", { key: "2b4bb03d4b24ef668f22b08e803f7f43c2d63ae5", 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(this.internalExpanded), disabled: this.disabled, onClick: this.onDisclosureClick, onKeyDown: this.onDisclosureKeydown }, h("span", { class: { "disclosure-icon": true, "disclosure-icon--expanded": this.internalExpanded }, innerHTML: loomaIconMarkup("chevron-down") })) : h("span", { class: "disclosure-spacer", "aria-hidden": "true" }), h("span", { key: "e7b935158e35cdc6518bdd73d54c42dcfa211aee", class: "leading", part: "leading" }, h("slot", { key: "8448462349fd23b8be0fb673fc6e101bf94beaa7", name: "leading" })), h("span", { key: "e0b6338e1ec9ec043446e42c5f03724adf7e1862", class: "label", part: "label" }, h("slot", { key: "ed44e6f2ce3466c28d2b87fc7511399ecc339255" })), h("span", { key: "2aea78227904fe23cfc4b8e14852a4601e3cc34b", class: "actions", part: "actions" }, h("slot", { key: "7c6549008c2a54c3ea6fcdf9e0fdbe445d379922", name: "actions" })), h("span", { key: "05166ba04765bc518d6b95ca7ae5a67c4394d1bf", class: "drop-indicator row-drop-indicator", part: "drop-indicator", "aria-hidden": "true" })), this.container ? h("div", { class: "children", part: "children", role: "group", hidden: !this.internalExpanded }, h("slot", { name: "children" })) : null, h("span", { key: "7381d6e9e2a8f94695f29e73194b1603d79cefb9", class: "drop-indicator subtree-drop-indicator", part: "drop-indicator", "aria-hidden": "true" }));
4493
+ } }, h("div", { key: "2f16d97219ba9ec9e37688d97ad9144508aa1ed5", 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: "d984631c891df304edb3e1dc5bcd19af3ad8e20d", class: "leading", part: "leading" }, h("slot", { key: "81a0e055859df5d4daaa6dac39013b23dcc2831b", name: "leading" })), h("span", { key: "3ae295523d5a3b9feaa9bfaa16d807349e37d78b", class: "label", part: "label" }, h("slot", { key: "db8503a41d087d283074a41e76fa872ff4b2a707" })), h("span", { key: "ac5b5db7128b31a9263b912bd64cd90ac640eaeb", class: "actions", part: "actions" }, h("slot", { key: "c8842a5d80215ec297688c86f6bfe9b4d9bed333", name: "actions" })), h("span", { key: "b7f239bc16867678291850ad61a5cd752d6a7425", 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: "2a5f448db2f4f363a34a1a950785e0ee12cc9938", class: "drop-indicator subtree-drop-indicator", part: "drop-indicator", "aria-hidden": "true" }));
3946
4494
  }
3947
4495
  static get watchers() {
3948
4496
  return {
@@ -4009,7 +4557,7 @@ var init_ui_tree_entry = __esm({
4009
4557
  "dist/esm/ui-tree.entry.js"() {
4010
4558
  init_index_8BGiMGQ0();
4011
4559
  init_events_JwSoedEO();
4012
- uiTreeCss = () => `:host{--ui-tree-indent:16px;display:block;min-inline-size:0;padding-inline-start:var(--ui-tree-gutter, 22px)}::slotted(ui-tree-item){--ui-tree-indent:inherit}`;
4560
+ uiTreeCss = () => `:host{--ui-tree-indent:16px;--ui-tree-gutter:0px;display:block;min-inline-size:0;padding-inline-start:var(--ui-tree-gutter)}::slotted(ui-tree-item){--ui-tree-indent:inherit}`;
4013
4561
  UITree = class {
4014
4562
  constructor(hostRef) {
4015
4563
  registerInstance(this, hostRef);
@@ -4028,6 +4576,8 @@ var init_ui_tree_entry = __esm({
4028
4576
  rejectedPosition = null;
4029
4577
  rejection = null;
4030
4578
  hoverIntent = null;
4579
+ structureObserver = null;
4580
+ tabStop = null;
4031
4581
  componentDidLoad() {
4032
4582
  this.hoverIntent = createHoverIntent(this.hoverExpandDelay, this.expandTarget);
4033
4583
  this.host.addEventListener("dragstart", this.onDragStart);
@@ -4038,6 +4588,11 @@ var init_ui_tree_entry = __esm({
4038
4588
  this.host.addEventListener("drop", this.onDrop);
4039
4589
  this.host.addEventListener("dragend", this.onDragEnd);
4040
4590
  this.host.addEventListener("keydown", this.onKeyDown);
4591
+ this.host.addEventListener("focusin", this.onFocusIn);
4592
+ this.host.addEventListener("ui-tree-expansion-change", this.onExpansionChange);
4593
+ this.syncStructuralLevels();
4594
+ this.structureObserver = new MutationObserver(this.syncStructuralLevels);
4595
+ this.structureObserver.observe(this.host, { childList: true, subtree: true });
4041
4596
  }
4042
4597
  disconnectedCallback() {
4043
4598
  this.hoverIntent?.destroy();
@@ -4049,10 +4604,40 @@ var init_ui_tree_entry = __esm({
4049
4604
  this.host.removeEventListener("drop", this.onDrop);
4050
4605
  this.host.removeEventListener("dragend", this.onDragEnd);
4051
4606
  this.host.removeEventListener("keydown", this.onKeyDown);
4607
+ this.host.removeEventListener("focusin", this.onFocusIn);
4608
+ this.host.removeEventListener("ui-tree-expansion-change", this.onExpansionChange);
4609
+ this.structureObserver?.disconnect();
4610
+ this.structureObserver = null;
4611
+ }
4612
+ syncStructuralLevels = () => {
4613
+ for (const item of Array.from(this.host.querySelectorAll("ui-tree-item"))) {
4614
+ item.dispatchEvent(new CustomEvent("ui-tree-structure-sync"));
4615
+ }
4616
+ this.syncTabStop();
4617
+ };
4618
+ syncTabStop(preferred) {
4619
+ const items = this.visibleItems();
4620
+ const next = preferred && items.includes(preferred) ? preferred : this.tabStop && items.includes(this.tabStop) ? this.tabStop : items[0] ?? null;
4621
+ this.tabStop = next;
4622
+ for (const item of items) {
4623
+ item.dispatchEvent(new CustomEvent("ui-tree-roving-tab-stop", {
4624
+ detail: { active: item === next }
4625
+ }));
4626
+ }
4052
4627
  }
4053
4628
  itemFromEvent(event) {
4054
4629
  return event.composedPath().find((node) => node instanceof HTMLElement && node.localName === "ui-tree-item") ?? null;
4055
4630
  }
4631
+ eventTargetsInteractiveContent(event) {
4632
+ for (const node of event.composedPath()) {
4633
+ if (node instanceof HTMLElement && node.localName === "ui-tree-item")
4634
+ break;
4635
+ if (node instanceof HTMLElement && node.matches('a, button, input, select, textarea, [role="button"], [role="link"]')) {
4636
+ return true;
4637
+ }
4638
+ }
4639
+ return false;
4640
+ }
4056
4641
  itemId(item) {
4057
4642
  return item.itemId || item.getAttribute("item-id") || "";
4058
4643
  }
@@ -4096,9 +4681,23 @@ var init_ui_tree_entry = __esm({
4096
4681
  const dropDepth = item.getAttribute("drop-depth");
4097
4682
  if (dropDepth !== null)
4098
4683
  return Number(dropDepth);
4099
- if (item.depth !== void 0)
4100
- return item.depth;
4101
- return Number(item.getAttribute("depth")) || 1;
4684
+ return Number(item.getAttribute("aria-level")) || 1;
4685
+ }
4686
+ subtreeDepth(item) {
4687
+ if (item.subtreeDepth !== void 0)
4688
+ return Math.max(0, Math.floor(item.subtreeDepth));
4689
+ const override = item.getAttribute("subtree-depth");
4690
+ if (override !== null)
4691
+ return Math.max(0, Math.floor(Number(override)));
4692
+ return Array.from(item.querySelectorAll("ui-tree-item")).reduce((deepest, descendant) => {
4693
+ let nesting = 0;
4694
+ let ancestor = descendant.parentElement?.closest("ui-tree-item") ?? null;
4695
+ while (ancestor && ancestor !== item) {
4696
+ nesting += 1;
4697
+ ancestor = ancestor.parentElement?.closest("ui-tree-item") ?? null;
4698
+ }
4699
+ return ancestor === item ? Math.max(deepest, nesting + 1) : deepest;
4700
+ }, 0);
4102
4701
  }
4103
4702
  dropRejection(source, target, position) {
4104
4703
  if (source.contains(target))
@@ -4113,9 +4712,9 @@ var init_ui_tree_entry = __esm({
4113
4712
  return { reason: "incompatible" };
4114
4713
  }
4115
4714
  const maxDepth = Math.max(0, Math.floor(this.maxDepth));
4116
- if (maxDepth > 0 && source.subtreeDepth !== void 0) {
4715
+ if (maxDepth > 0) {
4117
4716
  const targetDepth = Math.max(0, Math.floor(this.constraintDepth(target)));
4118
- const subtreeDepth = Math.max(0, Math.floor(source.subtreeDepth));
4717
+ const subtreeDepth = this.subtreeDepth(source);
4119
4718
  const resultingDepth = targetDepth + (position === "inside" ? 1 : 0) + subtreeDepth;
4120
4719
  if (resultingDepth > maxDepth)
4121
4720
  return { reason: "max-depth", maxDepth, resultingDepth };
@@ -4301,7 +4900,35 @@ var init_ui_tree_entry = __esm({
4301
4900
  visibleItems() {
4302
4901
  return Array.from(this.host.querySelectorAll("ui-tree-item")).filter((item) => item.getClientRects().length > 0 && !item.hasAttribute("disabled"));
4303
4902
  }
4903
+ parentItem(item) {
4904
+ const parent = item.parentElement?.closest("ui-tree-item") ?? null;
4905
+ return parent && this.host.contains(parent) ? parent : null;
4906
+ }
4907
+ firstVisibleChild(item, items) {
4908
+ return items.find((candidate) => this.parentItem(candidate) === item) ?? null;
4909
+ }
4910
+ focusItem(item) {
4911
+ this.syncTabStop(item);
4912
+ item.focus();
4913
+ }
4914
+ requestExpansion(item, expanded) {
4915
+ item.dispatchEvent(new CustomEvent("ui-tree-request-expanded", {
4916
+ detail: { expanded, trigger: "keyboard" }
4917
+ }));
4918
+ }
4919
+ onFocusIn = (event) => {
4920
+ if (this.eventTargetsInteractiveContent(event))
4921
+ return;
4922
+ const item = this.itemFromEvent(event);
4923
+ if (item)
4924
+ this.syncTabStop(item);
4925
+ };
4926
+ onExpansionChange = () => {
4927
+ requestAnimationFrame(() => this.syncTabStop());
4928
+ };
4304
4929
  onKeyDown = (event) => {
4930
+ if (this.eventTargetsInteractiveContent(event))
4931
+ return;
4305
4932
  const current = this.itemFromEvent(event);
4306
4933
  if (!current)
4307
4934
  return;
@@ -4309,14 +4936,37 @@ var init_ui_tree_entry = __esm({
4309
4936
  const index = items.indexOf(current);
4310
4937
  if (index < 0)
4311
4938
  return;
4312
- const next = event.key === "ArrowDown" ? items[index + 1] : event.key === "ArrowUp" ? items[index - 1] : null;
4313
- if (!next)
4939
+ const next = event.key === "ArrowDown" ? items[index + 1] : event.key === "ArrowUp" ? items[index - 1] : event.key === "Home" ? items[0] : event.key === "End" ? items.at(-1) : null;
4940
+ if (next) {
4941
+ event.preventDefault();
4942
+ this.focusItem(next);
4314
4943
  return;
4315
- event.preventDefault();
4316
- next.focus();
4944
+ }
4945
+ if (event.key === "ArrowLeft") {
4946
+ if (current.getAttribute("aria-expanded") === "true") {
4947
+ event.preventDefault();
4948
+ this.requestExpansion(current, false);
4949
+ } else if (this.parentItem(current)) {
4950
+ event.preventDefault();
4951
+ this.focusItem(this.parentItem(current));
4952
+ }
4953
+ return;
4954
+ }
4955
+ if (event.key === "ArrowRight") {
4956
+ if (current.getAttribute("aria-expanded") === "false") {
4957
+ event.preventDefault();
4958
+ this.requestExpansion(current, true);
4959
+ } else if (current.getAttribute("aria-expanded") === "true") {
4960
+ const child = this.firstVisibleChild(current, items);
4961
+ if (child) {
4962
+ event.preventDefault();
4963
+ this.focusItem(child);
4964
+ }
4965
+ }
4966
+ }
4317
4967
  };
4318
4968
  render() {
4319
- return h(Host, { key: "474c2154d2abe3c76eee9c36bf552390089df6e8", role: "tree", "aria-label": this.label || "Tree" }, h("slot", { key: "93aedd02f984dd33b5efc811fef417d1199917bd" }));
4969
+ return h(Host, { key: "7efbf793fe63471006df57f0045a5fe995c81440", role: "tree", "aria-label": this.label || "Tree" }, h("slot", { key: "1804e391796e7451c93cb58258e0e23ec3ad98c7" }));
4320
4970
  }
4321
4971
  };
4322
4972
  UITree.style = uiTreeCss();
@@ -4333,17 +4983,20 @@ var init_ = __esm({
4333
4983
  "./ui-avatar.entry.js": () => Promise.resolve().then(() => (init_ui_avatar_entry(), ui_avatar_entry_exports)),
4334
4984
  "./ui-badge.entry.js": () => Promise.resolve().then(() => (init_ui_badge_entry(), ui_badge_entry_exports)),
4335
4985
  "./ui-button.entry.js": () => Promise.resolve().then(() => (init_ui_button_entry(), ui_button_entry_exports)),
4986
+ "./ui-callout.entry.js": () => Promise.resolve().then(() => (init_ui_callout_entry(), ui_callout_entry_exports)),
4336
4987
  "./ui-checkbox.entry.js": () => Promise.resolve().then(() => (init_ui_checkbox_entry(), ui_checkbox_entry_exports)),
4337
- "./ui-combobox.entry.js": () => Promise.resolve().then(() => (init_ui_combobox_entry(), ui_combobox_entry_exports)),
4988
+ "./ui-chip_2.entry.js": () => Promise.resolve().then(() => (init_ui_chip_2_entry(), ui_chip_2_entry_exports)),
4338
4989
  "./ui-context-menu.entry.js": () => Promise.resolve().then(() => (init_ui_context_menu_entry(), ui_context_menu_entry_exports)),
4339
4990
  "./ui-dialog.entry.js": () => Promise.resolve().then(() => (init_ui_dialog_entry(), ui_dialog_entry_exports)),
4340
4991
  "./ui-disclosure.entry.js": () => Promise.resolve().then(() => (init_ui_disclosure_entry(), ui_disclosure_entry_exports)),
4992
+ "./ui-editable.entry.js": () => Promise.resolve().then(() => (init_ui_editable_entry(), ui_editable_entry_exports)),
4341
4993
  "./ui-floating-action-button.entry.js": () => Promise.resolve().then(() => (init_ui_floating_action_button_entry(), ui_floating_action_button_entry_exports)),
4342
4994
  "./ui-form-field.entry.js": () => Promise.resolve().then(() => (init_ui_form_field_entry(), ui_form_field_entry_exports)),
4343
4995
  "./ui-icon-button.entry.js": () => Promise.resolve().then(() => (init_ui_icon_button_entry(), ui_icon_button_entry_exports)),
4344
4996
  "./ui-input.entry.js": () => Promise.resolve().then(() => (init_ui_input_entry(), ui_input_entry_exports)),
4345
4997
  "./ui-menu-item.entry.js": () => Promise.resolve().then(() => (init_ui_menu_item_entry(), ui_menu_item_entry_exports)),
4346
4998
  "./ui-menu.entry.js": () => Promise.resolve().then(() => (init_ui_menu_entry(), ui_menu_entry_exports)),
4999
+ "./ui-multi-combobox.entry.js": () => Promise.resolve().then(() => (init_ui_multi_combobox_entry(), ui_multi_combobox_entry_exports)),
4347
5000
  "./ui-popover.entry.js": () => Promise.resolve().then(() => (init_ui_popover_entry(), ui_popover_entry_exports)),
4348
5001
  "./ui-radio-group.entry.js": () => Promise.resolve().then(() => (init_ui_radio_group_entry(), ui_radio_group_entry_exports)),
4349
5002
  "./ui-radio.entry.js": () => Promise.resolve().then(() => (init_ui_radio_entry(), ui_radio_entry_exports)),
@@ -5973,7 +6626,7 @@ var globalScripts = () => {
5973
6626
  var defineCustomElements = async (win2, options) => {
5974
6627
  if (typeof window === "undefined") return void 0;
5975
6628
  await globalScripts();
5976
- return bootstrapLazy([["ui-combobox", [[769, "ui-combobox", { "label": [1], "placeholder": [1], "name": [1], "value": [1], "defaultValue": [1, "default-value"], "query": [1], "defaultQuery": [1, "default-query"], "config": [16], "disabled": [4], "readOnly": [4, "readonly"], "required": [4], "size": [1], "disclosure": [4], "clearable": [4], "help": [1], "raw": [32], "display": [32], "selected": [32], "expanded": [32], "rows": [32], "active": [32], "loading": [32], "helpOpen": [32], "lookupError": [32], "validation": [32], "validate": [64] }, null, { "value": [{ "syncValue": 0 }], "query": [{ "syncQuery": 0 }], "disabled": [{ "syncDisabled": 0 }], "readOnly": [{ "syncDisabled": 0 }], "config": [{ "syncConfig": 0 }] }]]], ["ui-context-menu", [[769, "ui-context-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "internalOpen": [32], "focusTrigger": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "syncTarget": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-affordance-scope", [[769, "ui-affordance-scope", { "nearRadius": [514, "near-radius"] }, null, { "nearRadius": [{ "connectCoordinator": 0 }] }]]], ["ui-avatar", [[513, "ui-avatar", { "src": [1], "alt": [1], "name": [1], "fallback": [1], "hasImage": [32] }, null, { "src": [{ "watchSrc": 0 }] }]]], ["ui-avatar-group", [[769, "ui-avatar-group", { "max": [2], "label": [1], "overflowCount": [32] }, null, { "max": [{ "syncOverflow": 0 }] }]]], ["ui-badge", [[769, "ui-badge", { "variant": [1], "tone": [1] }]]], ["ui-button", [[769, "ui-button", { "variant": [1], "size": [1], "disabled": [4] }, null, { "variant": [{ "syncToButton": 0 }], "size": [{ "syncToButton": 0 }], "disabled": [{ "syncToButton": 0 }] }]]], ["ui-checkbox", [[769, "ui-checkbox", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "indeterminate": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "internalChecked": [{ "syncToInput": 0 }], "indeterminate": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }] }]]], ["ui-dialog", [[769, "ui-dialog", { "open": [4], "defaultOpen": [4, "default-open"], "modal": [4], "dismissible": [4], "label": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOpen": 0 }] }]]], ["ui-disclosure", [[769, "ui-disclosure", { "open": [4], "defaultOpen": [4, "default-open"], "disabled": [4], "internalOpen": [32], "contentId": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncState": 0 }] }]]], ["ui-floating-action-button", [[769, "ui-floating-action-button", { "disabled": [516], "mobileOnly": [516, "mobile-only"], "label": [1] }]]], ["ui-form-field", [[769, "ui-form-field", { "invalid": [4], "disabled": [4], "required": [4] }]]], ["ui-icon-button", [[769, "ui-icon-button", { "disabled": [516], "label": [1], "size": [513], "variant": [513], "anticipatory": [516] }]]], ["ui-input", [[769, "ui-input", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToInput": 0 }], "defaultValue": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "invalid": [{ "syncToInput": 0 }], "readOnly": [{ "syncToInput": 0 }] }]]], ["ui-menu-item", [[769, "ui-menu-item", { "disabled": [516], "value": [1] }]]], ["ui-popover", [[769, "ui-popover", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "placement": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "onOpenChange": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }] }]]], ["ui-radio", [[769, "ui-radio", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "name": [1], "required": [4], "value": [1] }, null, { "checked": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "name": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }], "value": [{ "syncToInput": 0 }] }]]], ["ui-radio-group", [[769, "ui-radio-group", { "value": [1], "name": [1], "orientation": [1], "disabled": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToRadios": 0 }], "name": [{ "syncToRadios": 0 }], "orientation": [{ "syncToRadios": 0 }], "disabled": [{ "syncToRadios": 0 }] }]]], ["ui-search-result-row", [[769, "ui-search-result-row", { "disabled": [516], "selected": [516], "hasLeading": [32], "hasMeta": [32], "hasExcerpt": [32], "hasTrailing": [32] }]]], ["ui-search-shell", [[769, "ui-search-shell", { "hasStatus": [32], "hasFooter": [32] }]]], ["ui-select", [[769, "ui-select", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToSelect": 0 }], "defaultValue": [{ "syncToSelect": 0 }], "disabled": [{ "syncToSelect": 0 }], "invalid": [{ "syncToSelect": 0 }], "required": [{ "syncToSelect": 0 }] }]]], ["ui-switch", [[769, "ui-switch", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }] }]]], ["ui-tabs", [[769, "ui-tabs", { "value": [1], "defaultValue": [1, "default-value"], "orientation": [1], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncState": 0 }], "orientation": [{ "syncState": 0 }] }]]], ["ui-textarea", [[769, "ui-textarea", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "rows": [2], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToTextarea": 0 }], "defaultValue": [{ "syncToTextarea": 0 }], "disabled": [{ "syncToTextarea": 0 }], "invalid": [{ "syncToTextarea": 0 }], "readOnly": [{ "syncToTextarea": 0 }], "rows": [{ "syncToTextarea": 0 }] }]]], ["ui-toast-region", [[769, "ui-toast-region", { "open": [4], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncSurface": 0 }] }]]], ["ui-top-bar", [[769, "ui-top-bar", { "hasLeading": [32], "hasSearch": [32], "hasActions": [32] }]]], ["ui-tree", [[769, "ui-tree", { "label": [1], "hoverExpandDelay": [2, "hover-expand-delay"], "maxDepth": [2, "max-depth"] }]]], ["ui-tree-item", [[769, "ui-tree-item", { "itemId": [1, "item-id"], "label": [1], "depth": [2], "dropDepth": [2, "drop-depth"], "subtreeDepth": [2, "subtree-depth"], "container": [4], "sortable": [4], "dragType": [1, "drag-type"], "dropScope": [1, "drop-scope"], "accepts": [1], "expanded": [4], "defaultExpanded": [4, "default-expanded"], "selected": [4], "disabled": [4], "internalExpanded": [32] }, null, { "expanded": [{ "syncExpandedFromProp": 0 }] }]]], ["ui-menu", [[769, "ui-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "placement": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }], "internalOpen": [{ "syncSurface": 0 }] }]]], ["ui-tooltip", [[769, "ui-tooltip", { "for": [1], "open": [4], "defaultOpen": [4, "default-open"], "placement": [1], "showDelay": [2, "show-delay"], "hideDelay": [2, "hide-delay"], "toggleOnClick": [4, "toggle-on-click"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]]], options);
6629
+ return bootstrapLazy([["ui-multi-combobox", [[769, "ui-multi-combobox", { "label": [1], "placeholder": [1], "items": [16], "config": [16], "query": [1], "defaultQuery": [1, "default-query"], "disabled": [4], "readOnly": [4, "readonly"], "required": [4], "name": [1], "raw": [32], "rows": [32], "focusInput": [64] }, null, { "query": [{ "syncQuery": 0 }] }]]], ["ui-context-menu", [[769, "ui-context-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "internalOpen": [32], "focusTrigger": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "syncTarget": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-affordance-scope", [[769, "ui-affordance-scope", { "nearRadius": [514, "near-radius"] }, null, { "nearRadius": [{ "connectCoordinator": 0 }] }]]], ["ui-avatar", [[513, "ui-avatar", { "src": [1], "alt": [1], "name": [1], "fallback": [1], "hasImage": [32] }, null, { "src": [{ "watchSrc": 0 }] }]]], ["ui-avatar-group", [[769, "ui-avatar-group", { "max": [2], "label": [1], "overflowCount": [32] }, null, { "max": [{ "syncOverflow": 0 }] }]]], ["ui-badge", [[769, "ui-badge", { "variant": [1], "tone": [1] }]]], ["ui-button", [[769, "ui-button", { "variant": [1], "size": [1], "disabled": [4] }, null, { "variant": [{ "syncToButton": 0 }], "size": [{ "syncToButton": 0 }], "disabled": [{ "syncToButton": 0 }] }]]], ["ui-callout", [[769, "ui-callout", { "tone": [1] }]]], ["ui-checkbox", [[769, "ui-checkbox", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "indeterminate": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "internalChecked": [{ "syncToInput": 0 }], "indeterminate": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }] }]]], ["ui-dialog", [[769, "ui-dialog", { "open": [4], "defaultOpen": [4, "default-open"], "modal": [4], "dismissible": [4], "label": [1], "internalOpen": [32], "accessibleLabel": [32] }, null, { "open": [{ "syncFromProp": 0 }], "label": [{ "syncLabelFromProp": 0 }], "internalOpen": [{ "syncOpen": 0 }] }]]], ["ui-disclosure", [[769, "ui-disclosure", { "open": [4], "defaultOpen": [4, "default-open"], "disabled": [4], "internalOpen": [32], "contentId": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncState": 0 }] }]]], ["ui-editable", [[769, "ui-editable", { "edit": [4], "defaultEdit": [4, "default-edit"], "disabled": [4], "internalEdit": [32] }, null, { "edit": [{ "syncFromProp": 0 }] }]]], ["ui-floating-action-button", [[769, "ui-floating-action-button", { "disabled": [516], "mobileOnly": [516, "mobile-only"], "label": [1] }]]], ["ui-form-field", [[769, "ui-form-field", { "invalid": [4], "disabled": [4], "required": [4] }]]], ["ui-icon-button", [[769, "ui-icon-button", { "disabled": [516], "label": [1], "size": [513], "variant": [513], "anticipatory": [516] }]]], ["ui-input", [[769, "ui-input", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToInput": 0 }], "defaultValue": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "invalid": [{ "syncToInput": 0 }], "readOnly": [{ "syncToInput": 0 }] }]]], ["ui-menu-item", [[769, "ui-menu-item", { "disabled": [516], "value": [1] }]]], ["ui-popover", [[769, "ui-popover", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "placement": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "onOpenChange": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }] }]]], ["ui-radio", [[769, "ui-radio", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "name": [1], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "disabled": [{ "syncToInput": 0 }], "name": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }], "value": [{ "syncToInput": 0 }] }]]], ["ui-radio-group", [[769, "ui-radio-group", { "value": [1], "name": [1], "orientation": [1], "disabled": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToRadios": 0 }], "name": [{ "syncToRadios": 0 }], "orientation": [{ "syncToRadios": 0 }], "disabled": [{ "syncToRadios": 0 }] }]]], ["ui-search-result-row", [[769, "ui-search-result-row", { "disabled": [516], "selected": [516], "hasLeading": [32], "hasMeta": [32], "hasExcerpt": [32], "hasTrailing": [32] }]]], ["ui-search-shell", [[769, "ui-search-shell", { "hasStatus": [32], "hasFooter": [32] }]]], ["ui-select", [[769, "ui-select", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToSelect": 0 }], "defaultValue": [{ "syncToSelect": 0 }], "disabled": [{ "syncToSelect": 0 }], "invalid": [{ "syncToSelect": 0 }], "required": [{ "syncToSelect": 0 }] }]]], ["ui-switch", [[769, "ui-switch", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }] }]]], ["ui-tabs", [[769, "ui-tabs", { "value": [1], "defaultValue": [1, "default-value"], "orientation": [1], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncState": 0 }], "orientation": [{ "syncState": 0 }] }]]], ["ui-textarea", [[769, "ui-textarea", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "rows": [2], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToTextarea": 0 }], "defaultValue": [{ "syncToTextarea": 0 }], "disabled": [{ "syncToTextarea": 0 }], "invalid": [{ "syncToTextarea": 0 }], "readOnly": [{ "syncToTextarea": 0 }], "rows": [{ "syncToTextarea": 0 }] }]]], ["ui-toast-region", [[769, "ui-toast-region", { "open": [4], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncSurface": 0 }] }]]], ["ui-top-bar", [[769, "ui-top-bar", { "hasLeading": [32], "hasSearch": [32], "hasActions": [32] }]]], ["ui-tree", [[769, "ui-tree", { "label": [1], "hoverExpandDelay": [2, "hover-expand-delay"], "maxDepth": [2, "max-depth"] }]]], ["ui-tree-item", [[769, "ui-tree-item", { "itemId": [1, "item-id"], "label": [1], "dropDepth": [2, "drop-depth"], "subtreeDepth": [2, "subtree-depth"], "container": [4], "sortable": [4], "dragType": [1, "drag-type"], "dropScope": [1, "drop-scope"], "accepts": [1], "expanded": [4], "defaultExpanded": [4, "default-expanded"], "selected": [4], "disabled": [4], "internalExpanded": [32], "structuralLevel": [32], "tabStop": [32] }, null, { "expanded": [{ "syncExpandedFromProp": 0 }] }]]], ["ui-menu", [[769, "ui-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "placement": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }], "internalOpen": [{ "syncSurface": 0 }] }]]], ["ui-tooltip", [[769, "ui-tooltip", { "for": [1], "open": [4], "defaultOpen": [4, "default-open"], "placement": [1], "showDelay": [2, "show-delay"], "hideDelay": [2, "hide-delay"], "toggleOnClick": [4, "toggle-on-click"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-chip_2", [[769, "ui-combobox", { "label": [1], "placeholder": [1], "name": [1], "value": [1], "defaultValue": [1, "default-value"], "query": [1], "defaultQuery": [1, "default-query"], "config": [16], "disabled": [4], "readOnly": [4, "readonly"], "required": [4], "size": [1], "labelVisibility": [1, "label-visibility"], "disclosure": [4], "clearable": [4], "help": [1], "raw": [32], "display": [32], "selected": [32], "expanded": [32], "rows": [32], "active": [32], "loading": [32], "helpOpen": [32], "lookupError": [32], "validation": [32], "validate": [64], "focusInput": [64] }, null, { "value": [{ "syncValue": 0 }], "query": [{ "syncQuery": 0 }], "disabled": [{ "syncDisabled": 0 }], "readOnly": [{ "syncDisabled": 0 }], "config": [{ "syncConfig": 0 }] }], [769, "ui-chip", { "appearance": [1], "size": [1] }]]]], options);
5977
6630
  };
5978
6631
 
5979
6632
  // loader/index.js
@@ -6435,6 +7088,8 @@ var LOOMA_ICONS2 = {
6435
7088
  "align-right": import_lucide.AlignRight,
6436
7089
  bold: import_lucide.Bold,
6437
7090
  braces: import_lucide.Braces,
7091
+ "circle-check": import_lucide.CircleCheck,
7092
+ "circle-x": import_lucide.CircleX,
6438
7093
  "chevron-down": import_lucide.ChevronDown,
6439
7094
  "chevron-left": import_lucide.ChevronLeft,
6440
7095
  "code-xml": import_lucide.CodeXml,
@@ -6448,11 +7103,13 @@ var LOOMA_ICONS2 = {
6448
7103
  "heading-3": import_lucide.Heading3,
6449
7104
  highlighter: import_lucide.Highlighter,
6450
7105
  image: import_lucide.Image,
7106
+ info: import_lucide.Info,
6451
7107
  italic: import_lucide.Italic,
6452
7108
  list: import_lucide.List,
6453
7109
  "list-ordered": import_lucide.ListOrdered,
6454
7110
  "list-todo": import_lucide.ListTodo,
6455
7111
  merge: import_lucide.Merge,
7112
+ "notebook-pen": import_lucide.NotebookPen,
6456
7113
  minus: import_lucide.Minus,
6457
7114
  "paint-bucket": import_lucide.PaintBucket,
6458
7115
  "panel-bottom": import_lucide.PanelBottom,
@@ -6468,6 +7125,7 @@ var LOOMA_ICONS2 = {
6468
7125
  strikethrough: import_lucide.Strikethrough,
6469
7126
  table: import_lucide.Table2,
6470
7127
  trash: import_lucide.Trash2,
7128
+ "triangle-alert": import_lucide.TriangleAlert,
6471
7129
  underline: import_lucide.Underline,
6472
7130
  undo: import_lucide.Undo2
6473
7131
  };