@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
@@ -0,0 +1,5 @@
1
+ export interface EditableChange {
2
+ edit: boolean;
3
+ reason: 'activate' | 'light-dismiss' | 'escape' | 'programmatic';
4
+ trigger: 'keyboard' | 'pointer' | 'programmatic';
5
+ }
@@ -0,0 +1,11 @@
1
+ import type { ComboboxOption } from './combobox';
2
+ export type MultiComboboxItem = ComboboxOption;
3
+ export interface MultiComboboxItemChange {
4
+ item: MultiComboboxItem;
5
+ index: number;
6
+ trigger: 'keyboard' | 'pointer' | 'programmatic';
7
+ }
8
+ export interface MultiComboboxCreate {
9
+ query: string;
10
+ trigger: 'keyboard' | 'pointer' | 'programmatic';
11
+ }
@@ -6,6 +6,8 @@ export declare const LOOMA_ICONS: {
6
6
  'align-right': IconNode;
7
7
  bold: IconNode;
8
8
  braces: IconNode;
9
+ 'circle-check': IconNode;
10
+ 'circle-x': IconNode;
9
11
  'chevron-down': IconNode;
10
12
  'chevron-left': IconNode;
11
13
  'code-xml': IconNode;
@@ -19,11 +21,13 @@ export declare const LOOMA_ICONS: {
19
21
  'heading-3': IconNode;
20
22
  highlighter: IconNode;
21
23
  image: IconNode;
24
+ info: IconNode;
22
25
  italic: IconNode;
23
26
  list: IconNode;
24
27
  'list-ordered': IconNode;
25
28
  'list-todo': IconNode;
26
29
  merge: IconNode;
30
+ 'notebook-pen': IconNode;
27
31
  minus: IconNode;
28
32
  'paint-bucket': IconNode;
29
33
  'panel-bottom': IconNode;
@@ -39,6 +43,7 @@ export declare const LOOMA_ICONS: {
39
43
  strikethrough: IconNode;
40
44
  table: IconNode;
41
45
  trash: IconNode;
46
+ 'triangle-alert': IconNode;
42
47
  underline: IconNode;
43
48
  undo: IconNode;
44
49
  };
@@ -0,0 +1,4 @@
1
+ /** A state prop is controlled only when the consumer supplies a value. */
2
+ export declare const isControlled: <T>(value: T | undefined) => value is T;
3
+ /** Defaults apply only when a corresponding controlled prop is omitted. */
4
+ export declare const controlledOrDefault: <T>(value: T | undefined, defaultValue: T) => T;
@@ -7,7 +7,7 @@ import {
7
7
  getElement,
8
8
  h,
9
9
  registerInstance
10
- } from "./chunk-GDMQKT5F.js";
10
+ } from "./chunk-UY423IKN.js";
11
11
 
12
12
  // dist/esm/ui-affordance-scope.entry.js
13
13
  var uiAffordanceScopeCss = () => `:host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}`;
@@ -38,7 +38,7 @@ var UIAffordanceScope = class {
38
38
  this.coordinator?.refresh();
39
39
  };
40
40
  render() {
41
- return h(Host, { key: "184b0a908494d480ed23aa14b75d4f7b94e5275b" }, h("slot", { key: "570e810db588c1514c6fd85985c9bc4532993a2b", onSlotchange: this.onSlotChange }));
41
+ return h(Host, { key: "f500fa48554ed6224efd2dbe9632880bf0a15a19" }, h("slot", { key: "37c5c5b7925b260ff8f9edd411ee6c90a12a4909", onSlotchange: this.onSlotChange }));
42
42
  }
43
43
  static get watchers() {
44
44
  return {
@@ -0,0 +1,51 @@
1
+ import {
2
+ Host,
3
+ getElement,
4
+ h,
5
+ registerInstance
6
+ } from "./chunk-UY423IKN.js";
7
+
8
+ // dist/esm/ui-avatar-group.entry.js
9
+ var 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}`;
10
+ var UIAvatarGroup = class {
11
+ constructor(hostRef) {
12
+ registerInstance(this, hostRef);
13
+ }
14
+ get host() {
15
+ return getElement(this);
16
+ }
17
+ max = 5;
18
+ label = "People";
19
+ overflowCount = 0;
20
+ syncOverflow() {
21
+ this.updateOverflow();
22
+ }
23
+ componentDidLoad() {
24
+ this.updateOverflow();
25
+ }
26
+ visibleLimit() {
27
+ return Number.isFinite(this.max) ? Math.max(0, Math.floor(this.max)) : 0;
28
+ }
29
+ updateOverflow() {
30
+ const children = Array.from(this.host.children);
31
+ const total = children.length;
32
+ const visibleLimit = this.visibleLimit();
33
+ const overflowCount = total > visibleLimit ? total - visibleLimit : 0;
34
+ if (this.overflowCount !== overflowCount)
35
+ this.overflowCount = overflowCount;
36
+ }
37
+ render() {
38
+ 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));
39
+ }
40
+ static get watchers() {
41
+ return {
42
+ "max": [{
43
+ "syncOverflow": 0
44
+ }]
45
+ };
46
+ }
47
+ };
48
+ UIAvatarGroup.style = uiAvatarGroupCss();
49
+ export {
50
+ UIAvatarGroup as ui_avatar_group
51
+ };
@@ -2,7 +2,7 @@ import {
2
2
  Host,
3
3
  h,
4
4
  registerInstance
5
- } from "./chunk-GDMQKT5F.js";
5
+ } from "./chunk-UY423IKN.js";
6
6
 
7
7
  // dist/esm/ui-avatar.entry.js
8
8
  function toInitials(value) {
@@ -13,7 +13,7 @@ function toInitials(value) {
13
13
  return tokens[0].slice(0, 2).toUpperCase();
14
14
  return `${tokens[0][0] ?? ""}${tokens[1][0] ?? ""}`.toUpperCase();
15
15
  }
16
- var 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%}`;
16
+ var 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%}`;
17
17
  var UIAvatar = class {
18
18
  constructor(hostRef) {
19
19
  registerInstance(this, hostRef);
@@ -35,7 +35,7 @@ var UIAvatar = class {
35
35
  render() {
36
36
  const fallbackText = this.fallback || toInitials(this.name || this.alt);
37
37
  const label = this.alt || this.name || "Avatar";
38
- 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)));
38
+ 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)));
39
39
  }
40
40
  static get watchers() {
41
41
  return {
@@ -0,0 +1,22 @@
1
+ import {
2
+ Host,
3
+ h,
4
+ registerInstance
5
+ } from "./chunk-UY423IKN.js";
6
+
7
+ // dist/esm/ui-badge.entry.js
8
+ var 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)}`;
9
+ var UIBadge = class {
10
+ constructor(hostRef) {
11
+ registerInstance(this, hostRef);
12
+ }
13
+ variant;
14
+ tone;
15
+ render() {
16
+ 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" })));
17
+ }
18
+ };
19
+ UIBadge.style = uiBadgeCss();
20
+ export {
21
+ UIBadge as ui_badge
22
+ };
@@ -6,7 +6,7 @@ import {
6
6
  getElement,
7
7
  h,
8
8
  registerInstance
9
- } from "./chunk-GDMQKT5F.js";
9
+ } from "./chunk-UY423IKN.js";
10
10
 
11
11
  // dist/esm/ui-button.entry.js
12
12
  var uiButtonCss = () => `:host{display:inline-flex;vertical-align:middle;color:var(--ui-action-secondary-text, var(--ui-text-primary))}:host([data-variant='solid']){color:var(--ui-action-primary-text, var(--ui-text-on-accent))}:host([data-variant='outline']) ::slotted(button),::slotted(button){appearance:none;min-block-size:var(--ui-button-min-block-size, 2.5rem);border:1px solid var(--ui-control-border, var(--ui-border-default));border-radius:var(--ui-button-radius, var(--ui-radius-2));background:var(--ui-action-secondary-surface, var(--ui-surface-default));color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm']) ::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg']) ::slotted(button){min-block-size:var(--ui-control-min-block-size, 2.75rem);padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-action-secondary-surface-hover, var(--ui-surface-muted));border-color:var(--ui-control-border-hover, var(--ui-border-strong))}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([data-variant='solid']) ::slotted(button){border-color:var(--ui-action-primary-surface, var(--ui-accent-solid));background:var(--ui-action-primary-surface, var(--ui-accent-solid));color:var(--ui-action-primary-text, var(--ui-text-on-accent));box-shadow:var(--ui-button-solid-shadow, inset 0 1px rgb(255 255 255 / 0.16), var(--ui-shadow-xs))}:host([data-variant='solid']) ::slotted(button:hover:enabled){background:var(--ui-action-primary-surface-hover, var(--ui-accent-hover));border-color:var(--ui-action-primary-surface-hover, var(--ui-accent-hover));box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([data-variant='solid']) ::slotted(button:active:enabled){background:var(--ui-action-primary-surface-active, var(--ui-accent-active));border-color:var(--ui-action-primary-surface-active, var(--ui-accent-active));box-shadow:none;transform:translateY(0)}:host([data-variant='destructive']) ::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-destructive-shadow, inset 0 1px rgb(255 255 255 / 0.14), var(--ui-shadow-xs))}:host([data-variant='destructive']) ::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([data-variant='destructive']) ::slotted(button:active:enabled){box-shadow:none;transform:translateY(0)}:host([data-variant='ghost']) ::slotted(button){border-color:transparent;background:transparent}:host([data-variant='ghost']) ::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([data-variant='ghost']) ::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}:host([data-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(button:disabled){cursor:not-allowed}`;
@@ -58,7 +58,7 @@ var UIButton = class {
58
58
  this.host.click();
59
59
  };
60
60
  render() {
61
- 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 }));
61
+ 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 }));
62
62
  }
63
63
  static get watchers() {
64
64
  return {
@@ -0,0 +1,32 @@
1
+ import {
2
+ loomaIconMarkup
3
+ } from "./chunk-NB6DBRXQ.js";
4
+ import {
5
+ Host,
6
+ h,
7
+ registerInstance
8
+ } from "./chunk-UY423IKN.js";
9
+
10
+ // dist/esm/ui-callout.entry.js
11
+ var 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)}`;
12
+ var toneIcons = {
13
+ info: "info",
14
+ note: "notebook-pen",
15
+ warning: "triangle-alert",
16
+ success: "circle-check",
17
+ error: "circle-x"
18
+ };
19
+ var UICallout = class {
20
+ constructor(hostRef) {
21
+ registerInstance(this, hostRef);
22
+ }
23
+ tone = "info";
24
+ render() {
25
+ const icon = toneIcons[this.tone] ?? toneIcons.info;
26
+ 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" }))));
27
+ }
28
+ };
29
+ UICallout.style = uiCalloutCss();
30
+ export {
31
+ UICallout as ui_callout
32
+ };
@@ -1,3 +1,7 @@
1
+ import {
2
+ controlledOrDefault,
3
+ isControlled
4
+ } from "./chunk-HNFCGIBP.js";
1
5
  import {
2
6
  dispatchDetail,
3
7
  eventToTrigger
@@ -7,7 +11,7 @@ import {
7
11
  getElement,
8
12
  h,
9
13
  registerInstance
10
- } from "./chunk-GDMQKT5F.js";
14
+ } from "./chunk-UY423IKN.js";
11
15
 
12
16
  // dist/esm/ui-checkbox.entry.js
13
17
  var 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}`;
@@ -18,7 +22,8 @@ var UICheckbox = class {
18
22
  get host() {
19
23
  return getElement(this);
20
24
  }
21
- checked = false;
25
+ /** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
26
+ checked;
22
27
  defaultChecked = false;
23
28
  disabled = false;
24
29
  indeterminate = false;
@@ -27,7 +32,8 @@ var UICheckbox = class {
27
32
  internalChecked = false;
28
33
  slotRef;
29
34
  syncFromProp() {
30
- this.internalChecked = this.checked;
35
+ if (isControlled(this.checked))
36
+ this.internalChecked = this.checked;
31
37
  }
32
38
  syncToInput() {
33
39
  const input = this.getInput();
@@ -42,8 +48,7 @@ var UICheckbox = class {
42
48
  input.value = this.value;
43
49
  }
44
50
  componentDidLoad() {
45
- this.syncFromProp();
46
- this.internalChecked = this.internalChecked || this.defaultChecked;
51
+ this.internalChecked = controlledOrDefault(this.checked, this.defaultChecked);
47
52
  this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
48
53
  this.syncToInput();
49
54
  const input = this.getInput();
@@ -65,16 +70,20 @@ var UICheckbox = class {
65
70
  const input = e.target;
66
71
  if (!input)
67
72
  return;
68
- this.internalChecked = input.checked;
73
+ const checked = input.checked;
74
+ if (!isControlled(this.checked))
75
+ this.internalChecked = checked;
76
+ else
77
+ this.syncToInput();
69
78
  this.indeterminate = input.indeterminate;
70
79
  dispatchDetail(this.host, "change", {
71
- checked: this.internalChecked,
80
+ checked,
72
81
  value: this.value,
73
82
  trigger: eventToTrigger(e)
74
83
  });
75
84
  };
76
85
  render() {
77
- 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 }));
86
+ 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 }));
78
87
  }
79
88
  static get watchers() {
80
89
  return {
@@ -11,9 +11,23 @@ import {
11
11
  getElement,
12
12
  h,
13
13
  registerInstance
14
- } from "./chunk-GDMQKT5F.js";
14
+ } from "./chunk-UY423IKN.js";
15
15
 
16
- // dist/esm/ui-combobox.entry.js
16
+ // dist/esm/ui-chip_2.entry.js
17
+ var 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%)}`;
18
+ var UIChip = class {
19
+ constructor(hostRef) {
20
+ registerInstance(this, hostRef);
21
+ }
22
+ /** `tag` has a square leading edge and an angled trailing edge; `pill` is fully rounded. */
23
+ appearance = "tag";
24
+ /** Compact typography size. */
25
+ size = "xs";
26
+ render() {
27
+ return h(Host, { key: "970cb48cf8d70c47feaab90fe428c09f0d052a03", "data-appearance": this.appearance, "data-size": this.size }, h("span", { key: "6d8c6104d2869520097a2a61bd2a887b363b4912", class: "chip__surface" }, h("slot", { key: "b61c50a8060d8a2684aed6f87dc859b1c9e99858" })));
28
+ }
29
+ };
30
+ UIChip.style = uiChipCss();
17
31
  function formatEditingValue(raw, selection, format) {
18
32
  const unchanged = { display: raw, selection };
19
33
  if (!format)
@@ -102,6 +116,8 @@ var UICombobox = class {
102
116
  readOnly = false;
103
117
  required = false;
104
118
  size = "md";
119
+ /** Keep the native label accessible while allowing compact composed controls. */
120
+ labelVisibility = "visible";
105
121
  disclosure = false;
106
122
  clearable = false;
107
123
  /** Optional description shown by the connected question-mark button. */
@@ -328,7 +344,8 @@ var UICombobox = class {
328
344
  }, reason === "disclosure" ? 0 : Math.max(0, config.debounce ?? 200));
329
345
  }
330
346
  get canCreate() {
331
- return Boolean(this.config.allowCreate && this.raw.trim() && !this.loading && !this.lookupError && !this.rows.some((row) => row.label.toLocaleLowerCase() === this.raw.toLocaleLowerCase()));
347
+ const candidates = this.config.options ? [...this.config.options, ...this.rows] : this.rows;
348
+ return Boolean(this.config.allowCreate && this.raw.trim() && !this.loading && !this.lookupError && !candidates.some((row) => row.label.toLocaleLowerCase() === this.raw.toLocaleLowerCase()));
332
349
  }
333
350
  format(timing) {
334
351
  if ((this.config.formatOn ?? "blur") !== timing || !this.input)
@@ -508,24 +525,31 @@ var UICombobox = class {
508
525
  }
509
526
  return this.validation;
510
527
  }
528
+ /** Focus the native editing input from a composed control. */
529
+ async focusInput() {
530
+ this.input?.focus();
531
+ }
511
532
  render() {
512
533
  const description = [this.helpOpen ? "help-text" : "", this.validation.issues.length ? "validation" : ""].filter(Boolean).join(" ") || void 0;
513
534
  const status = this.loading ? "Loading suggestions\u2026" : this.lookupError || (this.expanded ? `${this.rows.length} suggestions available.` : "");
514
535
  const groups = [...new Set(this.rows.map((row) => row.group ?? ""))];
515
- 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: () => {
536
+ 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) => {
537
+ if (!event.composedPath().some((node) => node instanceof HTMLButtonElement))
538
+ this.input?.focus();
539
+ } }, 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: () => {
516
540
  this.composing = false;
517
541
  this.onInput(new InputEvent("input"));
518
- } }), this.clearable && h("button", { key: "74e4f44836b751ab5e9f794a39b480602e0c106d", type: "button", part: "affordance", "aria-label": `Clear ${this.label}`, disabled: this.disabled || this.readOnly, onClick: () => {
542
+ } }), this.clearable && h("button", { key: "f9a49484ae9bcc4ace72a46d0c59202040ff39d8", type: "button", part: "affordance", "aria-label": `Clear ${this.label}`, disabled: this.disabled || this.readOnly, onClick: () => {
519
543
  this.commit(null, "", null, "clear", "pointer");
520
544
  this.close();
521
545
  this.input?.focus();
522
- } }, "\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: () => {
546
+ } }, "\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: () => {
523
547
  if (this.expanded)
524
548
  this.close();
525
549
  else
526
550
  this.open("disclosure");
527
551
  this.input?.focus();
528
- } }, 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(" ")));
552
+ } }, 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(" ")));
529
553
  }
530
554
  static get watchers() {
531
555
  return {
@@ -549,5 +573,6 @@ var UICombobox = class {
549
573
  };
550
574
  UICombobox.style = uiComboboxCss();
551
575
  export {
576
+ UIChip as ui_chip,
552
577
  UICombobox as ui_combobox
553
578
  };
@@ -1,6 +1,3 @@
1
- import {
2
- dispatchDetail
3
- } from "./chunk-UL7UIUJZ.js";
4
1
  import {
5
2
  closeOverlay,
6
3
  openOverlay,
@@ -9,12 +6,15 @@ import {
9
6
  import {
10
7
  createAnchoredSurface
11
8
  } from "./chunk-YHXJC5M5.js";
9
+ import {
10
+ dispatchDetail
11
+ } from "./chunk-UL7UIUJZ.js";
12
12
  import {
13
13
  Host,
14
14
  getElement,
15
15
  h,
16
16
  registerInstance
17
- } from "./chunk-GDMQKT5F.js";
17
+ } from "./chunk-UY423IKN.js";
18
18
 
19
19
  // dist/esm/ui-context-menu.entry.js
20
20
  var uiContextMenuCss = () => `:host{display:contents}:host([data-focus-trigger='pointer']) ::slotted(ui-menu-item:focus){outline:none}.menu{position:fixed;inset:auto;margin:0;z-index:var(--ui-z-overlay, 1000);min-width:12rem;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}.menu:popover-open{opacity:1;transform:translateY(0) scale(1)}@starting-style{.menu:popover-open{opacity:0;transform:translateY(-4px) scale(0.99)}}.menu[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){.menu{transition:none}}`;
@@ -226,7 +226,7 @@ var UIContextMenu = class {
226
226
  this.closeMenu("action", "pointer");
227
227
  };
228
228
  render() {
229
- return h(Host, { key: "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" }))));
229
+ 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" }))));
230
230
  }
231
231
  static get watchers() {
232
232
  return {
@@ -1,17 +1,21 @@
1
- import {
2
- dispatchDetail
3
- } from "./chunk-UL7UIUJZ.js";
4
1
  import {
5
2
  closeOverlay,
6
3
  openOverlay,
7
4
  requestTopOverlayClose
8
5
  } from "./chunk-TL4FIE7X.js";
6
+ import {
7
+ controlledOrDefault,
8
+ isControlled
9
+ } from "./chunk-HNFCGIBP.js";
10
+ import {
11
+ dispatchDetail
12
+ } from "./chunk-UL7UIUJZ.js";
9
13
  import {
10
14
  Host,
11
15
  getElement,
12
16
  h,
13
17
  registerInstance
14
- } from "./chunk-GDMQKT5F.js";
18
+ } from "./chunk-UY423IKN.js";
15
19
 
16
20
  // dist/esm/ui-dialog.entry.js
17
21
  var 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}}`;
@@ -22,17 +26,27 @@ var UIDialog = class {
22
26
  get host() {
23
27
  return getElement(this);
24
28
  }
25
- open = false;
29
+ /** Controlled open state. Omit it to use defaultOpen and local interaction state. */
30
+ open;
26
31
  defaultOpen = false;
27
32
  modal = true;
28
33
  dismissible = true;
29
34
  /** Accessible name forwarded to the native dialog surface. */
30
35
  label;
31
36
  internalOpen = false;
37
+ accessibleLabel = "Dialog";
32
38
  overlayId = `ui-dialog-${Math.random().toString(36).slice(2, 11)}`;
33
39
  dialogRef;
40
+ contentObserver = null;
34
41
  syncFromProp() {
35
- this.internalOpen = this.open;
42
+ if (isControlled(this.open))
43
+ this.internalOpen = this.open;
44
+ }
45
+ syncLabelFromProp() {
46
+ this.syncAccessibleLabel();
47
+ }
48
+ componentWillLoad() {
49
+ this.syncAccessibleLabel();
36
50
  }
37
51
  syncOpen() {
38
52
  if (this.dialogRef) {
@@ -52,20 +66,29 @@ var UIDialog = class {
52
66
  }
53
67
  }
54
68
  componentDidLoad() {
55
- this.syncFromProp();
56
- this.internalOpen = this.internalOpen || this.defaultOpen;
69
+ this.contentObserver = new MutationObserver(this.syncAccessibleLabel);
70
+ this.contentObserver.observe(this.host, {
71
+ childList: true,
72
+ subtree: true,
73
+ characterData: true
74
+ });
75
+ this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
57
76
  this.dialogRef?.addEventListener("close", this.onDialogClose);
77
+ this.syncAccessibleLabel();
58
78
  this.syncOpen();
59
79
  }
60
80
  disconnectedCallback() {
61
81
  this.dialogRef?.removeEventListener("close", this.onDialogClose);
82
+ this.contentObserver?.disconnect();
83
+ this.contentObserver = null;
62
84
  closeOverlay(this.overlayId);
63
85
  }
64
86
  componentDidUpdate() {
65
87
  this.syncOpen();
66
88
  }
67
89
  handleRequestClose(reason, trigger) {
68
- this.internalOpen = false;
90
+ if (!isControlled(this.open))
91
+ this.internalOpen = false;
69
92
  dispatchDetail(this.host, "close", {
70
93
  open: false,
71
94
  reason,
@@ -74,8 +97,12 @@ var UIDialog = class {
74
97
  }
75
98
  onDialogClose = () => {
76
99
  if (this.internalOpen) {
77
- this.internalOpen = false;
78
- closeOverlay(this.overlayId);
100
+ if (!isControlled(this.open)) {
101
+ this.internalOpen = false;
102
+ closeOverlay(this.overlayId);
103
+ } else {
104
+ requestAnimationFrame(() => this.syncOpen());
105
+ }
79
106
  dispatchDetail(this.host, "close", {
80
107
  open: false,
81
108
  reason: "programmatic",
@@ -88,14 +115,25 @@ var UIDialog = class {
88
115
  requestTopOverlayClose("escape", "keyboard");
89
116
  }
90
117
  };
118
+ syncAccessibleLabel = () => {
119
+ const explicitLabel = this.label?.trim();
120
+ const heading = this.host.querySelector('[slot="heading"], [data-ui-dialog-title], h1, h2, h3, h4, h5, h6');
121
+ const headingLabel = heading?.textContent?.trim();
122
+ const nextLabel = explicitLabel || headingLabel || "Dialog";
123
+ if (this.accessibleLabel !== nextLabel)
124
+ this.accessibleLabel = nextLabel;
125
+ };
91
126
  render() {
92
- 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" })));
127
+ 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" })));
93
128
  }
94
129
  static get watchers() {
95
130
  return {
96
131
  "open": [{
97
132
  "syncFromProp": 0
98
133
  }],
134
+ "label": [{
135
+ "syncLabelFromProp": 0
136
+ }],
99
137
  "internalOpen": [{
100
138
  "syncOpen": 0
101
139
  }]