@threadlabs/looma 0.1.28 → 0.2.0

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 (197) hide show
  1. package/dist/{chunk-G5AWV77V.js → chunk-JXSHRMYW.js} +32 -33
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/looma.cjs.js +1 -1
  4. package/dist/cjs/ui-chip_2.cjs.entry.js +190 -498
  5. package/dist/cjs/ui-combobox.cjs.entry.js +708 -0
  6. package/dist/cjs/ui-context-menu.cjs.entry.js +1 -1
  7. package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
  8. package/dist/cjs/ui-disclosure.cjs.entry.js +1 -1
  9. package/dist/cjs/ui-editable.cjs.entry.js +3 -3
  10. package/dist/cjs/ui-floating-action-button.cjs.entry.js +1 -1
  11. package/dist/cjs/ui-form-field.cjs.entry.js +1 -1
  12. package/dist/cjs/ui-icon-button.cjs.entry.js +1 -1
  13. package/dist/cjs/ui-input.cjs.entry.js +1 -1
  14. package/dist/cjs/ui-menu-item.cjs.entry.js +1 -1
  15. package/dist/cjs/ui-menu.cjs.entry.js +1 -1
  16. package/dist/cjs/ui-popover.cjs.entry.js +1 -1
  17. package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
  18. package/dist/cjs/ui-radio.cjs.entry.js +1 -1
  19. package/dist/cjs/ui-search-result-row.cjs.entry.js +1 -1
  20. package/dist/cjs/ui-search-shell.cjs.entry.js +1 -1
  21. package/dist/cjs/ui-select.cjs.entry.js +1 -1
  22. package/dist/cjs/ui-switch.cjs.entry.js +2 -2
  23. package/dist/cjs/ui-tabs.cjs.entry.js +1 -1
  24. package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
  25. package/dist/cjs/ui-toast-region.cjs.entry.js +1 -1
  26. package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
  27. package/dist/cjs/ui-tree-item.cjs.entry.js +2 -2
  28. package/dist/cjs/ui-tree.cjs.entry.js +1 -1
  29. package/dist/collection/collection-manifest.json +0 -1
  30. package/dist/collection/components/ui-combobox/ui-combobox.css +23 -0
  31. package/dist/collection/components/ui-combobox/ui-combobox.js +298 -21
  32. package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
  33. package/dist/collection/components/ui-dialog/ui-dialog.js +1 -1
  34. package/dist/collection/components/ui-disclosure/ui-disclosure.js +1 -1
  35. package/dist/collection/components/ui-editable/ui-editable.js +3 -3
  36. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
  37. package/dist/collection/components/ui-form-field/ui-form-field.js +1 -1
  38. package/dist/collection/components/ui-icon-button/ui-icon-button.js +1 -1
  39. package/dist/collection/components/ui-input/ui-input.js +1 -1
  40. package/dist/collection/components/ui-menu/ui-menu.js +1 -1
  41. package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
  42. package/dist/collection/components/ui-popover/ui-popover.js +1 -1
  43. package/dist/collection/components/ui-radio/ui-radio.js +1 -1
  44. package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
  45. package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
  46. package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
  47. package/dist/collection/components/ui-select/ui-select.js +1 -1
  48. package/dist/collection/components/ui-switch/ui-switch.js +2 -2
  49. package/dist/collection/components/ui-tabs/ui-tabs.js +1 -1
  50. package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
  51. package/dist/collection/components/ui-toast-region/ui-toast-region.js +1 -1
  52. package/dist/collection/components/ui-tooltip/ui-tooltip.js +1 -1
  53. package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
  54. package/dist/collection/components/ui-tree/ui-tree.js +1 -1
  55. package/dist/collection/components/ui-tree-item/ui-tree-item.js +2 -2
  56. package/dist/components/index.d.ts +0 -2
  57. package/dist/components/index.js +1 -1
  58. package/dist/components/{p-B1macZOS.js → p-DWN2m6ta.js} +1 -1
  59. package/dist/components/p-DYiNETk6.js +1 -0
  60. package/dist/components/ui-combobox.js +1 -1
  61. package/dist/components/ui-context-menu.js +1 -1
  62. package/dist/components/ui-dialog.js +1 -1
  63. package/dist/components/ui-disclosure.js +1 -1
  64. package/dist/components/ui-editable.js +1 -1
  65. package/dist/components/ui-floating-action-button.js +1 -1
  66. package/dist/components/ui-form-field.js +1 -1
  67. package/dist/components/ui-icon-button.js +1 -1
  68. package/dist/components/ui-input.js +1 -1
  69. package/dist/components/ui-menu-item.js +1 -1
  70. package/dist/components/ui-menu.js +1 -1
  71. package/dist/components/ui-popover.js +1 -1
  72. package/dist/components/ui-radio-group.js +1 -1
  73. package/dist/components/ui-radio.js +1 -1
  74. package/dist/components/ui-search-result-row.js +1 -1
  75. package/dist/components/ui-search-shell.js +1 -1
  76. package/dist/components/ui-select.js +1 -1
  77. package/dist/components/ui-switch.js +1 -1
  78. package/dist/components/ui-tabs.js +1 -1
  79. package/dist/components/ui-textarea.js +1 -1
  80. package/dist/components/ui-toast-region.js +1 -1
  81. package/dist/components/ui-tooltip.js +1 -1
  82. package/dist/components/ui-top-bar.js +1 -1
  83. package/dist/components/ui-tree-item.js +1 -1
  84. package/dist/components/ui-tree.js +1 -1
  85. package/dist/esm/loader.js +1 -1
  86. package/dist/esm/looma.js +1 -1
  87. package/dist/esm/ui-chip_2.entry.js +192 -500
  88. package/dist/esm/ui-combobox.entry.js +706 -0
  89. package/dist/esm/ui-context-menu.entry.js +1 -1
  90. package/dist/esm/ui-dialog.entry.js +1 -1
  91. package/dist/esm/ui-disclosure.entry.js +1 -1
  92. package/dist/esm/ui-editable.entry.js +3 -3
  93. package/dist/esm/ui-floating-action-button.entry.js +1 -1
  94. package/dist/esm/ui-form-field.entry.js +1 -1
  95. package/dist/esm/ui-icon-button.entry.js +1 -1
  96. package/dist/esm/ui-input.entry.js +1 -1
  97. package/dist/esm/ui-menu-item.entry.js +1 -1
  98. package/dist/esm/ui-menu.entry.js +1 -1
  99. package/dist/esm/ui-popover.entry.js +1 -1
  100. package/dist/esm/ui-radio-group.entry.js +1 -1
  101. package/dist/esm/ui-radio.entry.js +1 -1
  102. package/dist/esm/ui-search-result-row.entry.js +1 -1
  103. package/dist/esm/ui-search-shell.entry.js +1 -1
  104. package/dist/esm/ui-select.entry.js +1 -1
  105. package/dist/esm/ui-switch.entry.js +2 -2
  106. package/dist/esm/ui-tabs.entry.js +1 -1
  107. package/dist/esm/ui-textarea.entry.js +1 -1
  108. package/dist/esm/ui-toast-region.entry.js +1 -1
  109. package/dist/esm/ui-top-bar.entry.js +1 -1
  110. package/dist/esm/ui-tree-item.entry.js +2 -2
  111. package/dist/esm/ui-tree.entry.js +1 -1
  112. package/dist/index.cjs +471 -514
  113. package/dist/index.js +2 -2
  114. package/dist/looma/looma.esm.js +1 -1
  115. package/dist/looma/{p-9a82c523.entry.js → p-1249a806.entry.js} +1 -1
  116. package/dist/looma/p-1c00670f.entry.js +1 -0
  117. package/dist/looma/p-22842f8c.entry.js +1 -0
  118. package/dist/looma/{p-1e1de77f.entry.js → p-2915d5c0.entry.js} +1 -1
  119. package/dist/looma/{p-88e61cab.entry.js → p-37ec2b4b.entry.js} +1 -1
  120. package/dist/looma/{p-2f3c1b57.entry.js → p-3b2961a6.entry.js} +1 -1
  121. package/dist/looma/{p-e07e6ac2.entry.js → p-3f60f4c8.entry.js} +1 -1
  122. package/dist/looma/{p-9551ebf6.entry.js → p-424d6719.entry.js} +1 -1
  123. package/dist/looma/{p-6cc3180b.entry.js → p-4caccfce.entry.js} +1 -1
  124. package/dist/looma/p-55e06e2e.entry.js +1 -0
  125. package/dist/looma/{p-3957f7ef.entry.js → p-56dac38a.entry.js} +1 -1
  126. package/dist/looma/p-5cbbf7a0.entry.js +1 -0
  127. package/dist/looma/{p-f431dc13.entry.js → p-6f20d470.entry.js} +1 -1
  128. package/dist/looma/{p-b68762f2.entry.js → p-7c0b5364.entry.js} +1 -1
  129. package/dist/looma/{p-e82f104c.entry.js → p-8bdd9495.entry.js} +1 -1
  130. package/dist/looma/{p-df696cca.entry.js → p-9cfbf722.entry.js} +1 -1
  131. package/dist/looma/{p-607c3056.entry.js → p-b6ede6bb.entry.js} +1 -1
  132. package/dist/looma/p-b6fb6ba3.entry.js +1 -0
  133. package/dist/looma/{p-da6e2d01.entry.js → p-b76e2111.entry.js} +1 -1
  134. package/dist/looma/{p-1a12eb5c.entry.js → p-d372b0db.entry.js} +1 -1
  135. package/dist/looma/p-d46317e0.entry.js +1 -0
  136. package/dist/looma/{p-20387ffa.entry.js → p-d4825822.entry.js} +1 -1
  137. package/dist/looma/{p-8a5e3fe1.entry.js → p-d5c3954f.entry.js} +1 -1
  138. package/dist/looma/{p-4f68f939.entry.js → p-e604e906.entry.js} +1 -1
  139. package/dist/looma/{p-e406656e.entry.js → p-f1f7c5cb.entry.js} +1 -1
  140. package/dist/types/components/ui-combobox/ui-combobox.d.ts +35 -4
  141. package/dist/types/components.d.ts +56 -153
  142. package/dist/{ui-affordance-scope.entry-X5526PRP.js → ui-affordance-scope.entry-VR7FLAWG.js} +1 -1
  143. package/dist/{ui-avatar-group.entry-U72MPB5K.js → ui-avatar-group.entry-L3UKOY3U.js} +1 -1
  144. package/dist/{ui-avatar.entry-OC4J3LTV.js → ui-avatar.entry-VM5OHEFQ.js} +1 -1
  145. package/dist/{ui-badge.entry-4MSUQRQV.js → ui-badge.entry-ZTM4OPUD.js} +1 -1
  146. package/dist/{ui-button.entry-22DESWN4.js → ui-button.entry-CIPUSV5B.js} +1 -1
  147. package/dist/{ui-callout.entry-LOGODDM5.js → ui-callout.entry-OBFCI2O7.js} +1 -1
  148. package/dist/{ui-checkbox.entry-XAGW3BW4.js → ui-checkbox.entry-XT6ET56H.js} +1 -1
  149. package/dist/{ui-tooltip.entry-AQ6UPBUP.js → ui-chip_2.entry-32SHCLV6.js} +18 -3
  150. package/dist/{ui-chip_2.entry-JCPHPXAG.js → ui-combobox.entry-ONBBPQ2C.js} +169 -30
  151. package/dist/{ui-context-menu.entry-24YOHF7L.js → ui-context-menu.entry-RXNUOK24.js} +2 -2
  152. package/dist/{ui-dialog.entry-XKNYDWOQ.js → ui-dialog.entry-IJXNUARC.js} +2 -2
  153. package/dist/{ui-disclosure.entry-2AWCGZ4C.js → ui-disclosure.entry-5QS7UDRH.js} +2 -2
  154. package/dist/{ui-editable.entry-HLEWO7BN.js → ui-editable.entry-D7LOQN2H.js} +3 -3
  155. package/dist/{ui-floating-action-button.entry-2NJDB4YN.js → ui-floating-action-button.entry-XQZCTZQT.js} +2 -2
  156. package/dist/{ui-form-field.entry-FJ5HYCTN.js → ui-form-field.entry-A654LJZE.js} +2 -2
  157. package/dist/{ui-icon-button.entry-YZHJQ5YR.js → ui-icon-button.entry-MJ7F7ZIH.js} +2 -2
  158. package/dist/{ui-input.entry-JMBLMNP6.js → ui-input.entry-B2XM7JQU.js} +2 -2
  159. package/dist/{ui-menu-item.entry-VBGXM66D.js → ui-menu-item.entry-JULYSFVW.js} +2 -2
  160. package/dist/{ui-menu.entry-I2N5H3YC.js → ui-menu.entry-ORRWW7HD.js} +2 -2
  161. package/dist/{ui-popover.entry-7JRSJM5S.js → ui-popover.entry-W67V4UPA.js} +2 -2
  162. package/dist/{ui-radio-group.entry-Q2XB7P3B.js → ui-radio-group.entry-KCFOR27M.js} +2 -2
  163. package/dist/{ui-radio.entry-NJO4NA4M.js → ui-radio.entry-I2P4V5E3.js} +2 -2
  164. package/dist/{ui-search-result-row.entry-RPMNDSRN.js → ui-search-result-row.entry-GHODLSLR.js} +2 -2
  165. package/dist/{ui-search-shell.entry-FMIMYD3B.js → ui-search-shell.entry-PDB5UN4B.js} +2 -2
  166. package/dist/{ui-select.entry-7NDBWNAU.js → ui-select.entry-D3CZHCKB.js} +2 -2
  167. package/dist/{ui-switch.entry-YUCPIZE4.js → ui-switch.entry-WUDRL4H5.js} +3 -3
  168. package/dist/{ui-tabs.entry-FXZWV665.js → ui-tabs.entry-MW64GKIJ.js} +2 -2
  169. package/dist/{ui-textarea.entry-HHLQR5GG.js → ui-textarea.entry-VHRBYY6G.js} +2 -2
  170. package/dist/{ui-toast-region.entry-PIIBHNYA.js → ui-toast-region.entry-ET75RWYP.js} +2 -2
  171. package/dist/{ui-top-bar.entry-S2L7ZM4U.js → ui-top-bar.entry-QIYA3LD3.js} +2 -2
  172. package/dist/{ui-tree-item.entry-UID7IJPA.js → ui-tree-item.entry-BDB7VEUS.js} +3 -3
  173. package/dist/{ui-tree.entry-UMD3DNG5.js → ui-tree.entry-GSC7BPRN.js} +2 -2
  174. package/package.json +1 -1
  175. package/vue/{chunk-2DDIBSFD.js → chunk-ROMBQS2L.js} +32 -89
  176. package/vue/editor/index.js +1 -1
  177. package/vue/index.d.ts +30 -107
  178. package/vue/index.js +1 -3
  179. package/dist/cjs/ui-multi-combobox.cjs.entry.js +0 -190
  180. package/dist/cjs/ui-tooltip.cjs.entry.js +0 -241
  181. package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.css +0 -33
  182. package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.js +0 -553
  183. package/dist/components/p-DiyiodGX.js +0 -1
  184. package/dist/components/p-d5fk1vBI.js +0 -1
  185. package/dist/components/ui-multi-combobox.d.ts +0 -11
  186. package/dist/components/ui-multi-combobox.js +0 -1
  187. package/dist/esm/ui-multi-combobox.entry.js +0 -188
  188. package/dist/esm/ui-tooltip.entry.js +0 -239
  189. package/dist/looma/p-071c139c.entry.js +0 -1
  190. package/dist/looma/p-311e54d4.entry.js +0 -1
  191. package/dist/looma/p-4a10a875.entry.js +0 -1
  192. package/dist/looma/p-4fc9917f.entry.js +0 -1
  193. package/dist/looma/p-63a9159f.entry.js +0 -1
  194. package/dist/looma/p-82de1112.entry.js +0 -1
  195. package/dist/looma/p-caa37be2.entry.js +0 -1
  196. package/dist/types/components/ui-multi-combobox/ui-multi-combobox.d.ts +0 -51
  197. package/dist/ui-multi-combobox.entry-MEX7MU7P.js +0 -196
@@ -0,0 +1 @@
1
+ import{r as e,g as i,h as t,H as s}from"./p-8BGiMGQ0.js";import{d as a,e as r}from"./p-JwSoedEO.js";import{o,c as n,r as c}from"./p-C-0syqXZ.js";import{i as l,c as h}from"./p-BnGhGgTH.js";import{a as u}from"./p-Drmwg-C1.js";const d=class{constructor(i){e(this,i)}get host(){return i(this)}open;defaultOpen=!1;for;placement="bottom-start";internalOpen=!1;overlayId=`ui-menu-${Math.random().toString(36).slice(2,11)}`;anchor=null;surface=null;syncFromProp(){l(this.open)&&(this.internalOpen=this.open)}resetSurface(){this.setupSurface(),this.syncSurface()}syncSurface(){this.syncAnchorState(),this.surface&&(this.internalOpen?(this.surface.show(),o({id:this.overlayId,modal:!1,element:this.host,relatedElements:this.anchor?[this.anchor]:void 0,dismissible:!0,requestClose:(e,i)=>this.closeMenu(e,i)})):(this.surface.hide(),n(this.overlayId)))}componentDidLoad(){this.internalOpen=h(this.open,this.defaultOpen),this.host.addEventListener("click",this.onItemClick),this.host.addEventListener("keydown",this.onKeydown),this.setupSurface(),this.syncSurface()}disconnectedCallback(){this.host.removeEventListener("click",this.onItemClick),this.host.removeEventListener("keydown",this.onKeydown),this.surface?.destroy(),this.surface=null,n(this.overlayId)}setupSurface(){this.surface?.destroy(),this.surface=null,this.anchor=this.for?this.host.ownerDocument.getElementById(this.for):null,this.anchor&&(this.surface=u(this.host,{anchor:this.anchor,placement:this.placement}))}syncAnchorState(){this.anchor&&(this.anchor.setAttribute("aria-haspopup","menu"),this.anchor.setAttribute("aria-expanded",this.internalOpen?"true":"false"))}closeMenu(e,i){this.internalOpen&&(l(this.open)||(this.internalOpen=!1),a(this.host,"close",{open:!1,reason:e,trigger:i}),"escape"===e&&this.anchor?.focus())}getItems(){return Array.from(this.host.querySelectorAll("ui-menu-item"))}isItemDisabled(e){return"true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||"true"===e.getAttribute("disabled")||!0===e.disabled}onItemClick=e=>{const i=e.target.closest?.("ui-menu-item");if(!i||i.getRootNode()!==this.host.getRootNode())return;if(this.isItemDisabled(i))return;const t=i.getAttribute("value")??i.getAttribute("data-value")??"";a(this.host,"select",{value:t,trigger:r(e)}),a(this.host,"close",{open:!1,reason:"action",trigger:r(e)}),l(this.open)||(this.internalOpen=!1)};onKeydown=e=>{if("Escape"===e.key)return e.preventDefault(),void c("escape","keyboard");const i=this.getItems().filter((e=>!this.isItemDisabled(e)));if(0===i.length)return;const t=e.target.closest?.("ui-menu-item"),s=t&&t instanceof HTMLElement?i.indexOf(t):-1;if("Enter"!==e.key&&" "!==e.key)"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),i["ArrowDown"===e.key?s<0?0:Math.min(s+1,i.length-1):s<=0?i.length-1:s-1].focus());else if(e.preventDefault(),t&&s>=0){const e=t.getAttribute("value")??t.getAttribute("data-value")??"";a(this.host,"select",{value:e,trigger:"keyboard"}),a(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),l(this.open)||(this.internalOpen=!1)}};render(){return t(s,{key:"5b64cc53ca56ea04a63013c8cb61231c9b1045cc",role:"menu","aria-orientation":"vertical","data-open":this.internalOpen?"":void 0},t("div",{key:"6410a56cc5efcffd0673c9abdf8f8aa45295c516",class:"menu__surface"},t("slot",{key:"7e7f9d3b19bbf3024d61ecf44cd8b103748ef966"})))}static get watchers(){return{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncSurface:0}]}}};d.style=":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:none;overflow:visible}.menu__surface{display:flex;flex-direction:column;box-sizing:border-box;max-inline-size:inherit;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);max-block-size:inherit;overflow:auto}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:visible;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%}";export{d as ui_menu}
@@ -1 +1 @@
1
- import{r as e,g as t,h as i,H as r}from"./p-8BGiMGQ0.js";import{d as o}from"./p-JwSoedEO.js";import{i as a,c as s}from"./p-BnGhGgTH.js";const c=class{constructor(t){e(this,t)}get host(){return t(this)}checked;defaultChecked=!1;disabled=!1;required=!1;value="on";internalChecked=!1;syncFromProp(){a(this.checked)&&(this.internalChecked=this.checked)}componentDidLoad(){this.internalChecked=s(this.checked,this.defaultChecked)}toggle=e=>{if(this.disabled)return;const t=!this.internalChecked;a(this.checked)||(this.internalChecked=t),o(this.host,"change",{checked:t,value:this.value,trigger:e})};onKeydown=e=>{" "!==e.key||this.disabled||(e.preventDefault(),this.toggle("keyboard"))};onClick=e=>{e.target!==this.host?.shadowRoot?.querySelector("input")&&this.toggle("pointer")};render(){return i(r,{key:"e5ec7f2f91e860dd679098f30b40cbe0e52ccb1f",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},i("input",{key:"c21462377a81d7242633e7d358f56fd7a276f584",type:"checkbox",checked:this.internalChecked,disabled:this.disabled,required:this.required,value:this.value,"aria-hidden":"true",tabIndex:-1,onChange:e=>{const t=e.target,i=t.checked;a(this.checked)||(this.internalChecked=i),o(this.host,"change",{checked:i,value:this.value,trigger:"pointer"}),a(this.checked)&&(t.checked=this.internalChecked)}}),i("slot",{key:"e3f4f032bc41784ed41591d4fd175b89a4162c49"}))}static get watchers(){return{checked:[{syncFromProp:0}]}}};c.style=":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}";export{c as ui_switch}
1
+ import{r as e,g as t,h as i,H as r}from"./p-8BGiMGQ0.js";import{d as o}from"./p-JwSoedEO.js";import{i as a,c as s}from"./p-BnGhGgTH.js";const c=class{constructor(t){e(this,t)}get host(){return t(this)}checked;defaultChecked=!1;disabled=!1;required=!1;value="on";internalChecked=!1;syncFromProp(){a(this.checked)&&(this.internalChecked=this.checked)}componentDidLoad(){this.internalChecked=s(this.checked,this.defaultChecked)}toggle=e=>{if(this.disabled)return;const t=!this.internalChecked;a(this.checked)||(this.internalChecked=t),o(this.host,"change",{checked:t,value:this.value,trigger:e})};onKeydown=e=>{" "!==e.key||this.disabled||(e.preventDefault(),this.toggle("keyboard"))};onClick=e=>{e.target!==this.host?.shadowRoot?.querySelector("input")&&this.toggle("pointer")};render(){return i(r,{key:"eaee279bbc787c844f2ad265da03fca608d9c429",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},i("input",{key:"2ebfa684bf08735a4e89a06001f6758885c40ffb",type:"checkbox",checked:this.internalChecked,disabled:this.disabled,required:this.required,value:this.value,"aria-hidden":"true",tabIndex:-1,onChange:e=>{const t=e.target,i=t.checked;a(this.checked)||(this.internalChecked=i),o(this.host,"change",{checked:i,value:this.value,trigger:"pointer"}),a(this.checked)&&(t.checked=this.internalChecked)}}),i("slot",{key:"ff9975d4ccbffbed2b97060eabf347653d5f5110"}))}static get watchers(){return{checked:[{syncFromProp:0}]}}};c.style=":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}";export{c as ui_switch}
@@ -1 +1 @@
1
- import{r as t,g as i,h as a,H as e}from"./p-8BGiMGQ0.js";import{d as s,e as o}from"./p-JwSoedEO.js";const r=class{constructor(i){t(this,i)}get host(){return i(this)}value="";name="";orientation="horizontal";disabled=!1;required=!1;internalValue="";syncFromProp(){this.internalValue=this.value}syncToRadios(){this.getRadios().forEach((t=>{t.checked=(t.getAttribute("value")??"")===this.internalValue,t.name=this.name||this.groupId,this.disabled?(t.setAttribute("aria-disabled","true"),t.setAttribute("data-disabled","true")):(t.removeAttribute("aria-disabled"),t.removeAttribute("data-disabled"))})),this.updateRovingTabindex()}groupId=`ui-radio-group-${Math.random().toString(36).slice(2,9)}`;componentDidLoad(){this.syncFromProp(),this.syncToRadios(),this.host.addEventListener("change",this.onRadioChange),this.host.addEventListener("keydown",this.onKeydown)}disconnectedCallback(){this.host.removeEventListener("change",this.onRadioChange),this.host.removeEventListener("keydown",this.onKeydown)}componentDidUpdate(){this.syncToRadios()}getRadios(){return Array.from(this.host.querySelectorAll("ui-radio"))}updateRovingTabindex(){const t=this.getRadios(),i=t.findIndex((t=>(t.getAttribute("value")??"")===this.internalValue));t.forEach(((t,a)=>{const e=t.querySelector('input[type="radio"]');e&&(e.tabIndex=a===(i>=0?i:0)?0:-1)}))}setValue(t,i){const a=this.internalValue;this.internalValue=t,this.syncToRadios(),s(this.host,"select",{value:t,previousValue:a,trigger:i}),s(this.host,"change",{checked:!0,value:t,trigger:i})}onRadioChange=t=>{const i=t.target.closest?.("ui-radio");if(!i||i.getRootNode()!==this.host.getRootNode())return;const a=i.getAttribute("value")??"";a&&a!==this.internalValue&&this.setValue(a,o(t))};onKeydown=t=>{const i=this.getRadios();if(0===i.length)return;const a=i.findIndex((t=>(t.getAttribute("value")??"")===this.internalValue)),e="vertical"===this.orientation?"vertical":"horizontal",s="horizontal"===e?"ArrowRight"===t.key:"ArrowDown"===t.key;if(!("horizontal"===e?"ArrowLeft"===t.key:"ArrowUp"===t.key)&&!s)return;let o;t.preventDefault(),o=s?a<0?0:Math.min(a+1,i.length-1):a<=0?i.length-1:a-1;const r=i[o],n=r?.getAttribute("value")??"";n&&(this.setValue(n,"keyboard"),r?.querySelector('input[type="radio"]')?.focus())};render(){return a(e,{key:"31d8dee04aad4ddbb0bfa617a4e6ed187eab6674",role:"radiogroup","aria-orientation":this.orientation,"data-orientation":this.orientation,"data-disabled":this.disabled?"":void 0},a("slot",{key:"7134bcfa6b11cbe0d0d55a6593ea3fca921a71ec"}))}static get watchers(){return{value:[{syncFromProp:0}],internalValue:[{syncToRadios:0}],name:[{syncToRadios:0}],orientation:[{syncToRadios:0}],disabled:[{syncToRadios:0}]}}};r.style=":host{display:inline-flex;align-items:center;gap:var(--ui-space-2)}:host([data-orientation='vertical']){display:inline-grid;justify-items:start}";export{r as ui_radio_group}
1
+ import{r as t,g as i,h as a,H as s}from"./p-8BGiMGQ0.js";import{d as e,e as o}from"./p-JwSoedEO.js";const r=class{constructor(i){t(this,i)}get host(){return i(this)}value="";name="";orientation="horizontal";disabled=!1;required=!1;internalValue="";syncFromProp(){this.internalValue=this.value}syncToRadios(){this.getRadios().forEach((t=>{t.checked=(t.getAttribute("value")??"")===this.internalValue,t.name=this.name||this.groupId,this.disabled?(t.setAttribute("aria-disabled","true"),t.setAttribute("data-disabled","true")):(t.removeAttribute("aria-disabled"),t.removeAttribute("data-disabled"))})),this.updateRovingTabindex()}groupId=`ui-radio-group-${Math.random().toString(36).slice(2,9)}`;componentDidLoad(){this.syncFromProp(),this.syncToRadios(),this.host.addEventListener("change",this.onRadioChange),this.host.addEventListener("keydown",this.onKeydown)}disconnectedCallback(){this.host.removeEventListener("change",this.onRadioChange),this.host.removeEventListener("keydown",this.onKeydown)}componentDidUpdate(){this.syncToRadios()}getRadios(){return Array.from(this.host.querySelectorAll("ui-radio"))}updateRovingTabindex(){const t=this.getRadios(),i=t.findIndex((t=>(t.getAttribute("value")??"")===this.internalValue));t.forEach(((t,a)=>{const s=t.querySelector('input[type="radio"]');s&&(s.tabIndex=a===(i>=0?i:0)?0:-1)}))}setValue(t,i){const a=this.internalValue;this.internalValue=t,this.syncToRadios(),e(this.host,"select",{value:t,previousValue:a,trigger:i}),e(this.host,"change",{checked:!0,value:t,trigger:i})}onRadioChange=t=>{const i=t.target.closest?.("ui-radio");if(!i||i.getRootNode()!==this.host.getRootNode())return;const a=i.getAttribute("value")??"";a&&a!==this.internalValue&&this.setValue(a,o(t))};onKeydown=t=>{const i=this.getRadios();if(0===i.length)return;const a=i.findIndex((t=>(t.getAttribute("value")??"")===this.internalValue)),s="vertical"===this.orientation?"vertical":"horizontal",e="horizontal"===s?"ArrowRight"===t.key:"ArrowDown"===t.key;if(!("horizontal"===s?"ArrowLeft"===t.key:"ArrowUp"===t.key)&&!e)return;let o;t.preventDefault(),o=e?a<0?0:Math.min(a+1,i.length-1):a<=0?i.length-1:a-1;const r=i[o],n=r?.getAttribute("value")??"";n&&(this.setValue(n,"keyboard"),r?.querySelector('input[type="radio"]')?.focus())};render(){return a(s,{key:"9bdfe6b5209b5444cb27dde3226ec33866999c25",role:"radiogroup","aria-orientation":this.orientation,"data-orientation":this.orientation,"data-disabled":this.disabled?"":void 0},a("slot",{key:"b81a2f1e4c49000cfb5357570b460564ced48d91"}))}static get watchers(){return{value:[{syncFromProp:0}],internalValue:[{syncToRadios:0}],name:[{syncToRadios:0}],orientation:[{syncToRadios:0}],disabled:[{syncToRadios:0}]}}};r.style=":host{display:inline-flex;align-items:center;gap:var(--ui-space-2)}:host([data-orientation='vertical']){display:inline-grid;justify-items:start}";export{r as ui_radio_group}
@@ -1 +1 @@
1
- import{r as i,g as a,h as o,H as e}from"./p-8BGiMGQ0.js";import{o as t,c as s,r}from"./p-C-0syqXZ.js";import{d as n}from"./p-JwSoedEO.js";import{i as d,c as l}from"./p-BnGhGgTH.js";const c=class{constructor(a){i(this,a)}get host(){return a(this)}open;defaultOpen=!1;modal=!0;dismissible=!0;label;internalOpen=!1;accessibleLabel="Dialog";overlayId=`ui-dialog-${Math.random().toString(36).slice(2,11)}`;dialogRef;contentObserver=null;syncFromProp(){d(this.open)&&(this.internalOpen=this.open)}syncLabelFromProp(){this.syncAccessibleLabel()}componentWillLoad(){this.syncAccessibleLabel()}syncOpen(){this.dialogRef&&(this.internalOpen?(this.dialogRef.showModal(),t({id:this.overlayId,modal:this.modal,element:this.host,dismissible:this.dismissible,requestClose:(i,a)=>this.handleRequestClose(i,a)})):(this.dialogRef.close(),s(this.overlayId)))}componentDidLoad(){this.contentObserver=new MutationObserver(this.syncAccessibleLabel),this.contentObserver.observe(this.host,{childList:!0,subtree:!0,characterData:!0}),this.internalOpen=l(this.open,this.defaultOpen),this.dialogRef?.addEventListener("close",this.onDialogClose),this.syncAccessibleLabel(),this.syncOpen()}disconnectedCallback(){this.dialogRef?.removeEventListener("close",this.onDialogClose),this.contentObserver?.disconnect(),this.contentObserver=null,s(this.overlayId)}componentDidUpdate(){this.syncOpen()}handleRequestClose(i,a){d(this.open)||(this.internalOpen=!1),n(this.host,"close",{open:!1,reason:i,trigger:a})}onDialogClose=()=>{this.internalOpen&&(d(this.open)?requestAnimationFrame((()=>this.syncOpen())):(this.internalOpen=!1,s(this.overlayId)),n(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"}))};onKeydown=i=>{"Escape"===i.key&&r("escape","keyboard")};syncAccessibleLabel=()=>{const i=this.label?.trim(),a=this.host.querySelector('[slot="heading"], [data-ui-dialog-title], h1, h2, h3, h4, h5, h6'),o=a?.textContent?.trim(),e=i||o||"Dialog";this.accessibleLabel!==e&&(this.accessibleLabel=e)};render(){return o(e,{key:"f5b4441f54505e40851dd239d12cf8ed09daabfe","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},o("dialog",{key:"6896de6166cc085d9bd581dc053705fbce6328d8",ref:i=>this.dialogRef=i,open:this.internalOpen,"aria-label":this.accessibleLabel},o("slot",{key:"07515a7b8da25ccbd18bcde226129a569c999af7"})))}static get watchers(){return{open:[{syncFromProp:0}],label:[{syncLabelFromProp:0}],internalOpen:[{syncOpen:0}]}}};c.style=":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;box-sizing:border-box;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}}";export{c as ui_dialog}
1
+ import{r as i,g as a,h as o,H as e}from"./p-8BGiMGQ0.js";import{o as t,c as s,r}from"./p-C-0syqXZ.js";import{d as n}from"./p-JwSoedEO.js";import{i as l,c as d}from"./p-BnGhGgTH.js";const c=class{constructor(a){i(this,a)}get host(){return a(this)}open;defaultOpen=!1;modal=!0;dismissible=!0;label;internalOpen=!1;accessibleLabel="Dialog";overlayId=`ui-dialog-${Math.random().toString(36).slice(2,11)}`;dialogRef;contentObserver=null;syncFromProp(){l(this.open)&&(this.internalOpen=this.open)}syncLabelFromProp(){this.syncAccessibleLabel()}componentWillLoad(){this.syncAccessibleLabel()}syncOpen(){this.dialogRef&&(this.internalOpen?(this.dialogRef.showModal(),t({id:this.overlayId,modal:this.modal,element:this.host,dismissible:this.dismissible,requestClose:(i,a)=>this.handleRequestClose(i,a)})):(this.dialogRef.close(),s(this.overlayId)))}componentDidLoad(){this.contentObserver=new MutationObserver(this.syncAccessibleLabel),this.contentObserver.observe(this.host,{childList:!0,subtree:!0,characterData:!0}),this.internalOpen=d(this.open,this.defaultOpen),this.dialogRef?.addEventListener("close",this.onDialogClose),this.syncAccessibleLabel(),this.syncOpen()}disconnectedCallback(){this.dialogRef?.removeEventListener("close",this.onDialogClose),this.contentObserver?.disconnect(),this.contentObserver=null,s(this.overlayId)}componentDidUpdate(){this.syncOpen()}handleRequestClose(i,a){l(this.open)||(this.internalOpen=!1),n(this.host,"close",{open:!1,reason:i,trigger:a})}onDialogClose=()=>{this.internalOpen&&(l(this.open)?requestAnimationFrame((()=>this.syncOpen())):(this.internalOpen=!1,s(this.overlayId)),n(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"}))};onKeydown=i=>{"Escape"===i.key&&r("escape","keyboard")};syncAccessibleLabel=()=>{const i=this.label?.trim(),a=this.host.querySelector('[slot="heading"], [data-ui-dialog-title], h1, h2, h3, h4, h5, h6'),o=a?.textContent?.trim(),e=i||o||"Dialog";this.accessibleLabel!==e&&(this.accessibleLabel=e)};render(){return o(e,{key:"b606ef8c95728b5538047a7134030455fedf69e4","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},o("dialog",{key:"85531d82c36e79230cbb22c105ff3821f1f35f58",ref:i=>this.dialogRef=i,open:this.internalOpen,"aria-label":this.accessibleLabel},o("slot",{key:"8216096bc94e8261680664398691b8ea877daa0f"})))}static get watchers(){return{open:[{syncFromProp:0}],label:[{syncLabelFromProp:0}],internalOpen:[{syncOpen:0}]}}};c.style=":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;box-sizing:border-box;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}}";export{c as ui_dialog}
@@ -1 +1 @@
1
- import{r as t,g as e,h as i,H as s}from"./p-8BGiMGQ0.js";import{d as r}from"./p-JwSoedEO.js";function n(t,e,i){const s=t.height>0?Math.min(1,Math.max(0,(e-t.top)/t.height)):.5;return i?s<.25?"before":s>.75?"after":"inside":s<.5?"before":"after"}const h=class{constructor(e){t(this,e)}get host(){return e(this)}label="Tree";hoverExpandDelay=700;maxDepth=0;source=null;target=null;position=null;rejectedTarget=null;rejectedPosition=null;rejection=null;hoverIntent=null;structureObserver=null;tabStop=null;componentDidLoad(){this.hoverIntent=function(t,e){let i,s;function r(){i&&clearTimeout(i),i=void 0,s=void 0}return{schedule(n){s===n&&i||(r(),s=n,i=setTimeout((()=>{i=void 0;const t=s;s=void 0,t&&e(t)}),Math.max(0,t)))},cancel:r,destroy:r}}(this.hoverExpandDelay,this.expandTarget),this.host.addEventListener("dragstart",this.onDragStart),this.host.addEventListener("drag",this.onDrag),this.host.addEventListener("dragenter",this.onDragOver),this.host.addEventListener("dragover",this.onDragOver),this.host.addEventListener("dragleave",this.onDragLeave),this.host.addEventListener("drop",this.onDrop),this.host.addEventListener("dragend",this.onDragEnd),this.host.addEventListener("keydown",this.onKeyDown),this.host.addEventListener("focusin",this.onFocusIn),this.host.addEventListener("ui-tree-expansion-change",this.onExpansionChange),this.syncStructuralLevels(),this.structureObserver=new MutationObserver(this.syncStructuralLevels),this.structureObserver.observe(this.host,{childList:!0,subtree:!0})}disconnectedCallback(){this.hoverIntent?.destroy(),this.host.removeEventListener("dragstart",this.onDragStart),this.host.removeEventListener("drag",this.onDrag),this.host.removeEventListener("dragenter",this.onDragOver),this.host.removeEventListener("dragover",this.onDragOver),this.host.removeEventListener("dragleave",this.onDragLeave),this.host.removeEventListener("drop",this.onDrop),this.host.removeEventListener("dragend",this.onDragEnd),this.host.removeEventListener("keydown",this.onKeyDown),this.host.removeEventListener("focusin",this.onFocusIn),this.host.removeEventListener("ui-tree-expansion-change",this.onExpansionChange),this.structureObserver?.disconnect(),this.structureObserver=null}syncStructuralLevels=()=>{for(const t of Array.from(this.host.querySelectorAll("ui-tree-item")))t.dispatchEvent(new CustomEvent("ui-tree-structure-sync"));this.syncTabStop()};syncTabStop(t){const e=this.visibleItems(),i=t&&e.includes(t)?t:this.tabStop&&e.includes(this.tabStop)?this.tabStop:e[0]??null;this.tabStop=i;for(const t of e)t.dispatchEvent(new CustomEvent("ui-tree-roving-tab-stop",{detail:{active:t===i}}))}itemFromEvent(t){return t.composedPath().find((t=>t instanceof HTMLElement&&"ui-tree-item"===t.localName))??null}eventTargetsInteractiveContent(t){for(const e of t.composedPath()){if(e instanceof HTMLElement&&"ui-tree-item"===e.localName)break;if(e instanceof HTMLElement&&e.matches('a, button, input, select, textarea, [role="button"], [role="link"]'))return!0}return!1}itemId(t){return t.itemId||t.getAttribute("item-id")||""}rowFor(t){return t.shadowRoot?.querySelector('[part="row"]')??null}itemAtPoint(t,e){let i=this.host.ownerDocument.elementFromPoint(t,e);for(;i;){if("ui-tree-item"===i.localName&&this.host.contains(i))return i;const t=i.getRootNode();i=t instanceof ShadowRoot?t.host:i.parentElement}return null}isWithinTree(t){let e=t instanceof HTMLElement?t:null;for(;e;){if(e===this.host||this.host.contains(e))return!0;const t=e.getRootNode();e=t instanceof ShadowRoot?t.host:e.parentElement}return!1}acceptsChildren(t){return Boolean(t.container??t.hasAttribute("container"))&&!Boolean(t.disabled??t.hasAttribute("disabled"))}itemMetadata(t){return{type:t.getAttribute("data-drag-type")||t.getAttribute("drag-type")||"item",scope:t.getAttribute("data-drop-scope")||t.getAttribute("drop-scope")||"",accepts:(t.getAttribute("data-accepts")||t.getAttribute("accepts")||"").split(",").map((t=>t.trim())).filter(Boolean)}}constraintDepth(t){if(void 0!==t.dropDepth)return t.dropDepth;const e=t.getAttribute("drop-depth");return null!==e?Number(e):Number(t.getAttribute("aria-level"))||1}subtreeDepth(t){if(void 0!==t.subtreeDepth)return Math.max(0,Math.floor(t.subtreeDepth));const e=t.getAttribute("subtree-depth");return null!==e?Math.max(0,Math.floor(Number(e))):Array.from(t.querySelectorAll("ui-tree-item")).reduce(((e,i)=>{let s=0,r=i.parentElement?.closest("ui-tree-item")??null;for(;r&&r!==t;)s+=1,r=r.parentElement?.closest("ui-tree-item")??null;return r===t?Math.max(e,s+1):e}),0)}dropRejection(t,e,i){if(t.contains(e))return{reason:"descendant"};const s=this.itemMetadata(t),r=this.itemMetadata(e);if("inside"===i){if(!this.acceptsChildren(e)||r.accepts.length>0&&!r.accepts.includes(s.type))return{reason:"incompatible"}}else if(s.type!==r.type)return{reason:"incompatible"};const n=Math.max(0,Math.floor(this.maxDepth));if(n>0){const s=Math.max(0,Math.floor(this.constraintDepth(e)))+("inside"===i?1:0)+this.subtreeDepth(t);if(s>n)return{reason:"max-depth",maxDepth:n,resultingDepth:s}}return null}clearTarget(){this.target?.removeAttribute("data-drop-position"),this.target=null,this.position=null,this.hoverIntent?.cancel()}clearRejection(){this.rejectedTarget=null,this.rejectedPosition=null,this.rejection=null}finishDrag(){this.source?.removeAttribute("data-dragging"),this.source=null,this.clearTarget(),this.clearRejection()}expandTarget=t=>{const e=Array.from(this.host.querySelectorAll("ui-tree-item")).find((e=>this.itemId(e)===t));e&&"false"===e.getAttribute("aria-expanded")&&e.dispatchEvent(new CustomEvent("ui-tree-auto-expand"))};onDragStart=t=>{const e=this.itemFromEvent(t);if(!e||!Boolean(e.sortable??e.hasAttribute("sortable"))||Boolean(e.disabled??e.hasAttribute("disabled")))return;if(!t.composedPath().some((t=>t instanceof HTMLElement&&"drag-handle"===t.getAttribute("part"))))return void t.preventDefault();const i=this.itemId(e),s=this.rowFor(e);i&&s?(this.source=e,e.setAttribute("data-dragging","true"),t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",i)),function(t,e){if(!t||"function"!=typeof t.setDragImage)return;const{height:i}=e.getBoundingClientRect();t.setDragImage(e,16,Math.max(0,i/2))}(t.dataTransfer,s)):t.preventDefault()};updateTarget(t,e,i){if(!this.source)return!1;if(!t||t===this.source)return this.clearTarget(),this.clearRejection(),!1;const s=this.rowFor(t);if(!s)return!1;const r=n(s.getBoundingClientRect(),e,this.acceptsChildren(t)),h=this.dropRejection(this.source,t,r);return h?(i&&(i.dropEffect="none"),this.clearTarget(),"max-depth"===h.reason?(this.rejectedTarget=t,this.rejectedPosition=r,this.rejection=h):this.clearRejection(),!1):(this.clearRejection(),i&&(i.dropEffect="move"),this.target===t&&this.position===r||(this.clearTarget(),this.target=t,this.position=r,t.setAttribute("data-drop-position",r)),"inside"===r&&"false"===t.getAttribute("aria-expanded")?this.hoverIntent?.schedule(this.itemId(t)):this.hoverIntent?.cancel(),!0)}onDrag=t=>{if(!this.source||0===t.clientX&&0===t.clientY)return;const e=this.itemAtPoint(t.clientX,t.clientY);e&&this.updateTarget(e,t.clientY,t.dataTransfer)};onDragOver=t=>{if(!this.source)return;const e=this.itemFromEvent(t);this.updateTarget(e,t.clientY,t.dataTransfer)&&t.preventDefault()};onDragLeave=t=>{this.isWithinTree(t.relatedTarget)||this.itemAtPoint(t.clientX,t.clientY)||(this.clearTarget(),this.clearRejection())};dispatchReorder(t,e,i){const s=this.itemId(t),n=this.itemId(e);if(!s||!n)return;"inside"===i&&this.expandTarget(n);const h=this.itemMetadata(t),o=this.itemMetadata(e);r(this.host,"reorder",{sourceId:s,targetId:n,position:i,sourceType:h.type,targetType:o.type,sourceScope:h.scope,targetScope:o.scope,trigger:"pointer"})}dispatchReorderRejected(t,e,i,s){const n=this.itemId(t),h=this.itemId(e);n&&h&&r(this.host,"reorder-rejected",{sourceId:n,targetId:h,position:i,reason:"max-depth",maxDepth:s.maxDepth,resultingDepth:s.resultingDepth,trigger:"pointer"})}onDrop=t=>{this.source&&this.target&&this.position&&(t.preventDefault(),this.dispatchReorder(this.source,this.target,this.position),this.finishDrag())};onDragEnd=t=>{if(this.source){if(this.rejectedTarget&&this.rejectedPosition&&this.rejection)return this.dispatchReorderRejected(this.source,this.rejectedTarget,this.rejectedPosition,this.rejection),void this.finishDrag();const e=this.itemAtPoint(t.clientX,t.clientY);if(e&&e!==this.source){const i=this.rowFor(e);if(i){const s=n(i.getBoundingClientRect(),t.clientY,this.acceptsChildren(e)),r=this.dropRejection(this.source,e,s);r?"max-depth"===r.reason&&this.dispatchReorderRejected(this.source,e,s,r):this.dispatchReorder(this.source,e,s)}}}this.finishDrag()};visibleItems(){return Array.from(this.host.querySelectorAll("ui-tree-item")).filter((t=>t.getClientRects().length>0&&!t.hasAttribute("disabled")))}parentItem(t){const e=t.parentElement?.closest("ui-tree-item")??null;return e&&this.host.contains(e)?e:null}firstVisibleChild(t,e){return e.find((e=>this.parentItem(e)===t))??null}focusItem(t){this.syncTabStop(t),t.focus()}requestExpansion(t,e){t.dispatchEvent(new CustomEvent("ui-tree-request-expanded",{detail:{expanded:e,trigger:"keyboard"}}))}onFocusIn=t=>{if(this.eventTargetsInteractiveContent(t))return;const e=this.itemFromEvent(t);e&&this.syncTabStop(e)};onExpansionChange=()=>{requestAnimationFrame((()=>this.syncTabStop()))};onKeyDown=t=>{if(this.eventTargetsInteractiveContent(t))return;const e=this.itemFromEvent(t);if(!e)return;const i=this.visibleItems(),s=i.indexOf(e);if(s<0)return;const r="ArrowDown"===t.key?i[s+1]:"ArrowUp"===t.key?i[s-1]:"Home"===t.key?i[0]:"End"===t.key?i.at(-1):null;if(r)return t.preventDefault(),void this.focusItem(r);if("ArrowLeft"!==t.key){if("ArrowRight"===t.key)if("false"===e.getAttribute("aria-expanded"))t.preventDefault(),this.requestExpansion(e,!0);else if("true"===e.getAttribute("aria-expanded")){const s=this.firstVisibleChild(e,i);s&&(t.preventDefault(),this.focusItem(s))}}else"true"===e.getAttribute("aria-expanded")?(t.preventDefault(),this.requestExpansion(e,!1)):this.parentItem(e)&&(t.preventDefault(),this.focusItem(this.parentItem(e)))};render(){return i(s,{key:"81fe656b4a7cdf8683f53aeee94fb53838950383",role:"tree","aria-label":this.label||"Tree"},i("slot",{key:"941204b299eec2181228f536c017a17f026b2f3d"}))}};h.style=":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}";export{h as ui_tree}
1
+ import{r as t,g as e,h as i,H as s}from"./p-8BGiMGQ0.js";import{d as r}from"./p-JwSoedEO.js";function n(t,e,i){const s=t.height>0?Math.min(1,Math.max(0,(e-t.top)/t.height)):.5;return i?s<.25?"before":s>.75?"after":"inside":s<.5?"before":"after"}const h=class{constructor(e){t(this,e)}get host(){return e(this)}label="Tree";hoverExpandDelay=700;maxDepth=0;source=null;target=null;position=null;rejectedTarget=null;rejectedPosition=null;rejection=null;hoverIntent=null;structureObserver=null;tabStop=null;componentDidLoad(){this.hoverIntent=function(t,e){let i,s;function r(){i&&clearTimeout(i),i=void 0,s=void 0}return{schedule(n){s===n&&i||(r(),s=n,i=setTimeout((()=>{i=void 0;const t=s;s=void 0,t&&e(t)}),Math.max(0,t)))},cancel:r,destroy:r}}(this.hoverExpandDelay,this.expandTarget),this.host.addEventListener("dragstart",this.onDragStart),this.host.addEventListener("drag",this.onDrag),this.host.addEventListener("dragenter",this.onDragOver),this.host.addEventListener("dragover",this.onDragOver),this.host.addEventListener("dragleave",this.onDragLeave),this.host.addEventListener("drop",this.onDrop),this.host.addEventListener("dragend",this.onDragEnd),this.host.addEventListener("keydown",this.onKeyDown),this.host.addEventListener("focusin",this.onFocusIn),this.host.addEventListener("ui-tree-expansion-change",this.onExpansionChange),this.syncStructuralLevels(),this.structureObserver=new MutationObserver(this.syncStructuralLevels),this.structureObserver.observe(this.host,{childList:!0,subtree:!0})}disconnectedCallback(){this.hoverIntent?.destroy(),this.host.removeEventListener("dragstart",this.onDragStart),this.host.removeEventListener("drag",this.onDrag),this.host.removeEventListener("dragenter",this.onDragOver),this.host.removeEventListener("dragover",this.onDragOver),this.host.removeEventListener("dragleave",this.onDragLeave),this.host.removeEventListener("drop",this.onDrop),this.host.removeEventListener("dragend",this.onDragEnd),this.host.removeEventListener("keydown",this.onKeyDown),this.host.removeEventListener("focusin",this.onFocusIn),this.host.removeEventListener("ui-tree-expansion-change",this.onExpansionChange),this.structureObserver?.disconnect(),this.structureObserver=null}syncStructuralLevels=()=>{for(const t of Array.from(this.host.querySelectorAll("ui-tree-item")))t.dispatchEvent(new CustomEvent("ui-tree-structure-sync"));this.syncTabStop()};syncTabStop(t){const e=this.visibleItems(),i=t&&e.includes(t)?t:this.tabStop&&e.includes(this.tabStop)?this.tabStop:e[0]??null;this.tabStop=i;for(const t of e)t.dispatchEvent(new CustomEvent("ui-tree-roving-tab-stop",{detail:{active:t===i}}))}itemFromEvent(t){return t.composedPath().find((t=>t instanceof HTMLElement&&"ui-tree-item"===t.localName))??null}eventTargetsInteractiveContent(t){for(const e of t.composedPath()){if(e instanceof HTMLElement&&"ui-tree-item"===e.localName)break;if(e instanceof HTMLElement&&e.matches('a, button, input, select, textarea, [role="button"], [role="link"]'))return!0}return!1}itemId(t){return t.itemId||t.getAttribute("item-id")||""}rowFor(t){return t.shadowRoot?.querySelector('[part="row"]')??null}itemAtPoint(t,e){let i=this.host.ownerDocument.elementFromPoint(t,e);for(;i;){if("ui-tree-item"===i.localName&&this.host.contains(i))return i;const t=i.getRootNode();i=t instanceof ShadowRoot?t.host:i.parentElement}return null}isWithinTree(t){let e=t instanceof HTMLElement?t:null;for(;e;){if(e===this.host||this.host.contains(e))return!0;const t=e.getRootNode();e=t instanceof ShadowRoot?t.host:e.parentElement}return!1}acceptsChildren(t){return Boolean(t.container??t.hasAttribute("container"))&&!Boolean(t.disabled??t.hasAttribute("disabled"))}itemMetadata(t){return{type:t.getAttribute("data-drag-type")||t.getAttribute("drag-type")||"item",scope:t.getAttribute("data-drop-scope")||t.getAttribute("drop-scope")||"",accepts:(t.getAttribute("data-accepts")||t.getAttribute("accepts")||"").split(",").map((t=>t.trim())).filter(Boolean)}}constraintDepth(t){if(void 0!==t.dropDepth)return t.dropDepth;const e=t.getAttribute("drop-depth");return null!==e?Number(e):Number(t.getAttribute("aria-level"))||1}subtreeDepth(t){if(void 0!==t.subtreeDepth)return Math.max(0,Math.floor(t.subtreeDepth));const e=t.getAttribute("subtree-depth");return null!==e?Math.max(0,Math.floor(Number(e))):Array.from(t.querySelectorAll("ui-tree-item")).reduce(((e,i)=>{let s=0,r=i.parentElement?.closest("ui-tree-item")??null;for(;r&&r!==t;)s+=1,r=r.parentElement?.closest("ui-tree-item")??null;return r===t?Math.max(e,s+1):e}),0)}dropRejection(t,e,i){if(t.contains(e))return{reason:"descendant"};const s=this.itemMetadata(t),r=this.itemMetadata(e);if("inside"===i){if(!this.acceptsChildren(e)||r.accepts.length>0&&!r.accepts.includes(s.type))return{reason:"incompatible"}}else if(s.type!==r.type)return{reason:"incompatible"};const n=Math.max(0,Math.floor(this.maxDepth));if(n>0){const s=Math.max(0,Math.floor(this.constraintDepth(e)))+("inside"===i?1:0)+this.subtreeDepth(t);if(s>n)return{reason:"max-depth",maxDepth:n,resultingDepth:s}}return null}clearTarget(){this.target?.removeAttribute("data-drop-position"),this.target=null,this.position=null,this.hoverIntent?.cancel()}clearRejection(){this.rejectedTarget=null,this.rejectedPosition=null,this.rejection=null}finishDrag(){this.source?.removeAttribute("data-dragging"),this.source=null,this.clearTarget(),this.clearRejection()}expandTarget=t=>{const e=Array.from(this.host.querySelectorAll("ui-tree-item")).find((e=>this.itemId(e)===t));e&&"false"===e.getAttribute("aria-expanded")&&e.dispatchEvent(new CustomEvent("ui-tree-auto-expand"))};onDragStart=t=>{const e=this.itemFromEvent(t);if(!e||!Boolean(e.sortable??e.hasAttribute("sortable"))||Boolean(e.disabled??e.hasAttribute("disabled")))return;if(!t.composedPath().some((t=>t instanceof HTMLElement&&"drag-handle"===t.getAttribute("part"))))return void t.preventDefault();const i=this.itemId(e),s=this.rowFor(e);i&&s?(this.source=e,e.setAttribute("data-dragging","true"),t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",i)),function(t,e){if(!t||"function"!=typeof t.setDragImage)return;const{height:i}=e.getBoundingClientRect();t.setDragImage(e,16,Math.max(0,i/2))}(t.dataTransfer,s)):t.preventDefault()};updateTarget(t,e,i){if(!this.source)return!1;if(!t||t===this.source)return this.clearTarget(),this.clearRejection(),!1;const s=this.rowFor(t);if(!s)return!1;const r=n(s.getBoundingClientRect(),e,this.acceptsChildren(t)),h=this.dropRejection(this.source,t,r);return h?(i&&(i.dropEffect="none"),this.clearTarget(),"max-depth"===h.reason?(this.rejectedTarget=t,this.rejectedPosition=r,this.rejection=h):this.clearRejection(),!1):(this.clearRejection(),i&&(i.dropEffect="move"),this.target===t&&this.position===r||(this.clearTarget(),this.target=t,this.position=r,t.setAttribute("data-drop-position",r)),"inside"===r&&"false"===t.getAttribute("aria-expanded")?this.hoverIntent?.schedule(this.itemId(t)):this.hoverIntent?.cancel(),!0)}onDrag=t=>{if(!this.source||0===t.clientX&&0===t.clientY)return;const e=this.itemAtPoint(t.clientX,t.clientY);e&&this.updateTarget(e,t.clientY,t.dataTransfer)};onDragOver=t=>{if(!this.source)return;const e=this.itemFromEvent(t);this.updateTarget(e,t.clientY,t.dataTransfer)&&t.preventDefault()};onDragLeave=t=>{this.isWithinTree(t.relatedTarget)||this.itemAtPoint(t.clientX,t.clientY)||(this.clearTarget(),this.clearRejection())};dispatchReorder(t,e,i){const s=this.itemId(t),n=this.itemId(e);if(!s||!n)return;"inside"===i&&this.expandTarget(n);const h=this.itemMetadata(t),o=this.itemMetadata(e);r(this.host,"reorder",{sourceId:s,targetId:n,position:i,sourceType:h.type,targetType:o.type,sourceScope:h.scope,targetScope:o.scope,trigger:"pointer"})}dispatchReorderRejected(t,e,i,s){const n=this.itemId(t),h=this.itemId(e);n&&h&&r(this.host,"reorder-rejected",{sourceId:n,targetId:h,position:i,reason:"max-depth",maxDepth:s.maxDepth,resultingDepth:s.resultingDepth,trigger:"pointer"})}onDrop=t=>{this.source&&this.target&&this.position&&(t.preventDefault(),this.dispatchReorder(this.source,this.target,this.position),this.finishDrag())};onDragEnd=t=>{if(this.source){if(this.rejectedTarget&&this.rejectedPosition&&this.rejection)return this.dispatchReorderRejected(this.source,this.rejectedTarget,this.rejectedPosition,this.rejection),void this.finishDrag();const e=this.itemAtPoint(t.clientX,t.clientY);if(e&&e!==this.source){const i=this.rowFor(e);if(i){const s=n(i.getBoundingClientRect(),t.clientY,this.acceptsChildren(e)),r=this.dropRejection(this.source,e,s);r?"max-depth"===r.reason&&this.dispatchReorderRejected(this.source,e,s,r):this.dispatchReorder(this.source,e,s)}}}this.finishDrag()};visibleItems(){return Array.from(this.host.querySelectorAll("ui-tree-item")).filter((t=>t.getClientRects().length>0&&!t.hasAttribute("disabled")))}parentItem(t){const e=t.parentElement?.closest("ui-tree-item")??null;return e&&this.host.contains(e)?e:null}firstVisibleChild(t,e){return e.find((e=>this.parentItem(e)===t))??null}focusItem(t){this.syncTabStop(t),t.focus()}requestExpansion(t,e){t.dispatchEvent(new CustomEvent("ui-tree-request-expanded",{detail:{expanded:e,trigger:"keyboard"}}))}onFocusIn=t=>{if(this.eventTargetsInteractiveContent(t))return;const e=this.itemFromEvent(t);e&&this.syncTabStop(e)};onExpansionChange=()=>{requestAnimationFrame((()=>this.syncTabStop()))};onKeyDown=t=>{if(this.eventTargetsInteractiveContent(t))return;const e=this.itemFromEvent(t);if(!e)return;const i=this.visibleItems(),s=i.indexOf(e);if(s<0)return;const r="ArrowDown"===t.key?i[s+1]:"ArrowUp"===t.key?i[s-1]:"Home"===t.key?i[0]:"End"===t.key?i.at(-1):null;if(r)return t.preventDefault(),void this.focusItem(r);if("ArrowLeft"!==t.key){if("ArrowRight"===t.key)if("false"===e.getAttribute("aria-expanded"))t.preventDefault(),this.requestExpansion(e,!0);else if("true"===e.getAttribute("aria-expanded")){const s=this.firstVisibleChild(e,i);s&&(t.preventDefault(),this.focusItem(s))}}else"true"===e.getAttribute("aria-expanded")?(t.preventDefault(),this.requestExpansion(e,!1)):this.parentItem(e)&&(t.preventDefault(),this.focusItem(this.parentItem(e)))};render(){return i(s,{key:"bae06665078a67c59db2d9e72c7dea6ddeeb9e56",role:"tree","aria-label":this.label||"Tree"},i("slot",{key:"232cb02f1a50bc5e18a92c0d8677e917870ec75e"}))}};h.style=":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}";export{h as ui_tree}
@@ -1,15 +1,27 @@
1
1
  import { type EventEmitter } from '../../stencil-public-runtime';
2
2
  import type { ComboboxConfig, ComboboxOption, ComboboxChange, ComboboxValidationState } from '../../field/combobox';
3
- /** A single editable field with contextual suggestions, optional help and field validation. */
3
+ import type { MultiComboboxItem, MultiComboboxItemChange, MultiComboboxCreate } from '../../field/multi-combobox';
4
+ /**
5
+ * A single editable field with contextual suggestions, optional help and field validation.
6
+ * With `multiple`, it becomes a multi-value tag field: `value` holds the selected
7
+ * items, chips render before the cursor, and add/remove/create item events fire.
8
+ */
4
9
  export declare class UICombobox {
5
10
  host: HTMLElement;
6
11
  /** Accessible visible label, associated with the native text input. */
7
12
  label: string;
8
13
  placeholder: string;
9
14
  name: string;
10
- /** Controlled canonical value. Undefined selects uncontrolled mode; null means no selection. */
11
- value?: string | null;
15
+ /**
16
+ * Controlled canonical value. Undefined selects uncontrolled mode; null means no selection.
17
+ * With `multiple`, this is the controlled list of selected items instead.
18
+ */
19
+ value?: string | null | readonly MultiComboboxItem[];
12
20
  defaultValue?: string;
21
+ /** Render selected values as removable chips before the cursor. `value` becomes the item list. */
22
+ multiple: boolean;
23
+ /** Characters that commit the current query and leave the input ready for the next item (multiple only). */
24
+ tokenSeparators: readonly string[];
13
25
  /** Controlled raw editing text; independent of canonical selection. */
14
26
  query?: string;
15
27
  defaultQuery: string;
@@ -30,13 +42,20 @@ export declare class UICombobox {
30
42
  display: string;
31
43
  trigger: 'keyboard' | 'pointer' | 'programmatic';
32
44
  }>;
33
- valueChange: EventEmitter<ComboboxChange>;
45
+ /** Single mode: the ComboboxChange. Multiple mode: the full current item list on any change. */
46
+ valueChange: EventEmitter<ComboboxChange | readonly MultiComboboxItem[]>;
34
47
  freeEntry: EventEmitter<ComboboxChange>;
35
48
  createEntry: EventEmitter<ComboboxChange>;
36
49
  dependencyInvalidate: EventEmitter<ComboboxChange>;
37
50
  validationChange: EventEmitter<ComboboxValidationState>;
38
51
  /** Supplies the current result rows for framework-owned rich slots. */
39
52
  optionsChange: EventEmitter<readonly ComboboxOption[]>;
53
+ /** Multiple mode: a suggestion or exact-match token was committed as a new item. */
54
+ addItem: EventEmitter<MultiComboboxItemChange>;
55
+ /** Multiple mode: a selected item was removed via chip keyboard controls. */
56
+ removeItem: EventEmitter<MultiComboboxItemChange>;
57
+ /** Multiple mode: an unmatched query was submitted for creation. */
58
+ createItem: EventEmitter<MultiComboboxCreate>;
40
59
  raw: string;
41
60
  display: string;
42
61
  selected: string | null;
@@ -64,6 +83,9 @@ export declare class UICombobox {
64
83
  private proposedChange?;
65
84
  private formattedRaw?;
66
85
  private formattedWith?;
86
+ /** Multiple mode: the controlled selected items (from `value`). Empty otherwise. */
87
+ private get items();
88
+ private get selectedValues();
67
89
  componentWillLoad(): void;
68
90
  connectedCallback(): void;
69
91
  componentDidLoad(): void;
@@ -85,6 +107,15 @@ export declare class UICombobox {
85
107
  private onInput;
86
108
  private commit;
87
109
  private choose;
110
+ private emitItems;
111
+ private setMultiQuery;
112
+ private addSelectedItem;
113
+ private createSelectedItem;
114
+ private commitQuery;
115
+ private removeItemAt;
116
+ private focusItem;
117
+ private onItemKeyDown;
118
+ private handleMultipleKeydown;
88
119
  private move;
89
120
  private onKeydown;
90
121
  private onFocusOut;
@@ -6,15 +6,15 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { CalloutTone } from "./components/ui-callout/ui-callout";
9
+ import { MultiComboboxCreate, MultiComboboxItem, MultiComboboxItemChange } from "./field/multi-combobox";
9
10
  import { ComboboxChange, ComboboxConfig, ComboboxOption, ComboboxValidationState } from "./field/combobox";
10
11
  import { EditableChange } from "./field/editable";
11
12
  import { AnchoredPlacement } from "./overlay/positioning";
12
- import { MultiComboboxCreate, MultiComboboxItem, MultiComboboxItemChange } from "./field/multi-combobox";
13
13
  export { CalloutTone } from "./components/ui-callout/ui-callout";
14
+ export { MultiComboboxCreate, MultiComboboxItem, MultiComboboxItemChange } from "./field/multi-combobox";
14
15
  export { ComboboxChange, ComboboxConfig, ComboboxOption, ComboboxValidationState } from "./field/combobox";
15
16
  export { EditableChange } from "./field/editable";
16
17
  export { AnchoredPlacement } from "./overlay/positioning";
17
- export { MultiComboboxCreate, MultiComboboxItem, MultiComboboxItemChange } from "./field/multi-combobox";
18
18
  export namespace Components {
19
19
  interface UiAffordanceScope {
20
20
  /**
@@ -118,6 +118,8 @@ export namespace Components {
118
118
  }
119
119
  /**
120
120
  * A single editable field with contextual suggestions, optional help and field validation.
121
+ * With `multiple`, it becomes a multi-value tag field: `value` holds the selected
122
+ * items, chips render before the cursor, and add/remove/create item events fire.
121
123
  */
122
124
  interface UiCombobox {
123
125
  /**
@@ -161,6 +163,11 @@ export namespace Components {
161
163
  * @default 'visible'
162
164
  */
163
165
  "labelVisibility": 'visible' | 'sr-only';
166
+ /**
167
+ * Render selected values as removable chips before the cursor. `value` becomes the item list.
168
+ * @default false
169
+ */
170
+ "multiple": boolean;
164
171
  /**
165
172
  * @default ''
166
173
  */
@@ -185,14 +192,19 @@ export namespace Components {
185
192
  * @default 'md'
186
193
  */
187
194
  "size": 'sm' | 'md';
195
+ /**
196
+ * Characters that commit the current query and leave the input ready for the next item (multiple only).
197
+ * @default []
198
+ */
199
+ "tokenSeparators": readonly string[];
188
200
  /**
189
201
  * Validate for submission. Caller submits only non-pending, non-error output.
190
202
  */
191
203
  "validate": () => Promise<ComboboxValidationState>;
192
204
  /**
193
- * Controlled canonical value. Undefined selects uncontrolled mode; null means no selection.
205
+ * Controlled canonical value. Undefined selects uncontrolled mode; null means no selection. With `multiple`, this is the controlled list of selected items instead.
194
206
  */
195
- "value"?: string | null;
207
+ "value"?: string | null | readonly MultiComboboxItem[];
196
208
  }
197
209
  interface UiContextMenu {
198
210
  /**
@@ -362,54 +374,6 @@ export namespace Components {
362
374
  */
363
375
  "value": string;
364
376
  }
365
- /**
366
- * A multi-value combobox with removable, customizable selected items.
367
- */
368
- interface UiMultiCombobox {
369
- /**
370
- * @default {}
371
- */
372
- "config": ComboboxConfig;
373
- /**
374
- * @default ''
375
- */
376
- "defaultQuery": string;
377
- /**
378
- * @default false
379
- */
380
- "disabled": boolean;
381
- "focusInput": () => Promise<void>;
382
- /**
383
- * @default []
384
- */
385
- "items": readonly MultiComboboxItem[];
386
- /**
387
- * @default ''
388
- */
389
- "label": string;
390
- /**
391
- * @default ''
392
- */
393
- "name": string;
394
- /**
395
- * @default ''
396
- */
397
- "placeholder": string;
398
- "query"?: string;
399
- /**
400
- * @default false
401
- */
402
- "readOnly": boolean;
403
- /**
404
- * @default false
405
- */
406
- "required": boolean;
407
- /**
408
- * Characters that commit the current query and leave the input ready for the next item.
409
- * @default []
410
- */
411
- "tokenSeparators": readonly string[];
412
- }
413
377
  interface UiPopover {
414
378
  /**
415
379
  * @default false
@@ -690,10 +654,6 @@ export interface UiEditableCustomEvent<T> extends CustomEvent<T> {
690
654
  detail: T;
691
655
  target: HTMLUiEditableElement;
692
656
  }
693
- export interface UiMultiComboboxCustomEvent<T> extends CustomEvent<T> {
694
- detail: T;
695
- target: HTMLUiMultiComboboxElement;
696
- }
697
657
  export interface UiTooltipCustomEvent<T> extends CustomEvent<T> {
698
658
  detail: T;
699
659
  target: HTMLUiTooltipElement;
@@ -755,15 +715,20 @@ declare global {
755
715
  };
756
716
  interface HTMLUiComboboxElementEventMap {
757
717
  "query-change": { query: string; display: string; trigger: 'keyboard' | 'pointer' | 'programmatic' };
758
- "value-change": ComboboxChange;
718
+ "value-change": ComboboxChange | readonly MultiComboboxItem[];
759
719
  "free-entry": ComboboxChange;
760
720
  "create-entry": ComboboxChange;
761
721
  "dependency-invalidate": ComboboxChange;
762
722
  "validation-change": ComboboxValidationState;
763
723
  "options-change": readonly ComboboxOption[];
724
+ "add-item": MultiComboboxItemChange;
725
+ "remove-item": MultiComboboxItemChange;
726
+ "create-item": MultiComboboxCreate;
764
727
  }
765
728
  /**
766
729
  * A single editable field with contextual suggestions, optional help and field validation.
730
+ * With `multiple`, it becomes a multi-value tag field: `value` holds the selected
731
+ * items, chips render before the cursor, and add/remove/create item events fire.
767
732
  */
768
733
  interface HTMLUiComboboxElement extends Components.UiCombobox, HTMLStencilElement {
769
734
  addEventListener<K extends keyof HTMLUiComboboxElementEventMap>(type: K, listener: (this: HTMLUiComboboxElement, ev: UiComboboxCustomEvent<HTMLUiComboboxElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -853,30 +818,6 @@ declare global {
853
818
  prototype: HTMLUiMenuItemElement;
854
819
  new (): HTMLUiMenuItemElement;
855
820
  };
856
- interface HTMLUiMultiComboboxElementEventMap {
857
- "query-change": { query: string; display: string; trigger: 'keyboard' | 'pointer' | 'programmatic' };
858
- "add-item": MultiComboboxItemChange;
859
- "remove-item": MultiComboboxItemChange;
860
- "create-item": MultiComboboxCreate;
861
- "options-change": readonly ComboboxOption[];
862
- }
863
- /**
864
- * A multi-value combobox with removable, customizable selected items.
865
- */
866
- interface HTMLUiMultiComboboxElement extends Components.UiMultiCombobox, HTMLStencilElement {
867
- addEventListener<K extends keyof HTMLUiMultiComboboxElementEventMap>(type: K, listener: (this: HTMLUiMultiComboboxElement, ev: UiMultiComboboxCustomEvent<HTMLUiMultiComboboxElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
868
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
869
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
870
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
871
- removeEventListener<K extends keyof HTMLUiMultiComboboxElementEventMap>(type: K, listener: (this: HTMLUiMultiComboboxElement, ev: UiMultiComboboxCustomEvent<HTMLUiMultiComboboxElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
872
- removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
873
- removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
874
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
875
- }
876
- var HTMLUiMultiComboboxElement: {
877
- prototype: HTMLUiMultiComboboxElement;
878
- new (): HTMLUiMultiComboboxElement;
879
- };
880
821
  interface HTMLUiPopoverElement extends Components.UiPopover, HTMLStencilElement {
881
822
  }
882
823
  var HTMLUiPopoverElement: {
@@ -993,7 +934,6 @@ declare global {
993
934
  "ui-input": HTMLUiInputElement;
994
935
  "ui-menu": HTMLUiMenuElement;
995
936
  "ui-menu-item": HTMLUiMenuItemElement;
996
- "ui-multi-combobox": HTMLUiMultiComboboxElement;
997
937
  "ui-popover": HTMLUiPopoverElement;
998
938
  "ui-radio": HTMLUiRadioElement;
999
939
  "ui-radio-group": HTMLUiRadioGroupElement;
@@ -1113,6 +1053,8 @@ declare namespace LocalJSX {
1113
1053
  }
1114
1054
  /**
1115
1055
  * A single editable field with contextual suggestions, optional help and field validation.
1056
+ * With `multiple`, it becomes a multi-value tag field: `value` holds the selected
1057
+ * items, chips render before the cursor, and add/remove/create item events fire.
1116
1058
  */
1117
1059
  interface UiCombobox {
1118
1060
  /**
@@ -1152,11 +1094,24 @@ declare namespace LocalJSX {
1152
1094
  * @default 'visible'
1153
1095
  */
1154
1096
  "labelVisibility"?: 'visible' | 'sr-only';
1097
+ /**
1098
+ * Render selected values as removable chips before the cursor. `value` becomes the item list.
1099
+ * @default false
1100
+ */
1101
+ "multiple"?: boolean;
1155
1102
  /**
1156
1103
  * @default ''
1157
1104
  */
1158
1105
  "name"?: string;
1106
+ /**
1107
+ * Multiple mode: a suggestion or exact-match token was committed as a new item.
1108
+ */
1109
+ "onAdd-item"?: (event: UiComboboxCustomEvent<MultiComboboxItemChange>) => void;
1159
1110
  "onCreate-entry"?: (event: UiComboboxCustomEvent<ComboboxChange>) => void;
1111
+ /**
1112
+ * Multiple mode: an unmatched query was submitted for creation.
1113
+ */
1114
+ "onCreate-item"?: (event: UiComboboxCustomEvent<MultiComboboxCreate>) => void;
1160
1115
  "onDependency-invalidate"?: (event: UiComboboxCustomEvent<ComboboxChange>) => void;
1161
1116
  "onFree-entry"?: (event: UiComboboxCustomEvent<ComboboxChange>) => void;
1162
1117
  /**
@@ -1164,8 +1119,15 @@ declare namespace LocalJSX {
1164
1119
  */
1165
1120
  "onOptions-change"?: (event: UiComboboxCustomEvent<readonly ComboboxOption[]>) => void;
1166
1121
  "onQuery-change"?: (event: UiComboboxCustomEvent<{ query: string; display: string; trigger: 'keyboard' | 'pointer' | 'programmatic' }>) => void;
1122
+ /**
1123
+ * Multiple mode: a selected item was removed via chip keyboard controls.
1124
+ */
1125
+ "onRemove-item"?: (event: UiComboboxCustomEvent<MultiComboboxItemChange>) => void;
1167
1126
  "onValidation-change"?: (event: UiComboboxCustomEvent<ComboboxValidationState>) => void;
1168
- "onValue-change"?: (event: UiComboboxCustomEvent<ComboboxChange>) => void;
1127
+ /**
1128
+ * Single mode: the ComboboxChange. Multiple mode: the full current item list on any change.
1129
+ */
1130
+ "onValue-change"?: (event: UiComboboxCustomEvent<ComboboxChange | readonly MultiComboboxItem[]>) => void;
1169
1131
  /**
1170
1132
  * @default ''
1171
1133
  */
@@ -1187,9 +1149,14 @@ declare namespace LocalJSX {
1187
1149
  */
1188
1150
  "size"?: 'sm' | 'md';
1189
1151
  /**
1190
- * Controlled canonical value. Undefined selects uncontrolled mode; null means no selection.
1152
+ * Characters that commit the current query and leave the input ready for the next item (multiple only).
1153
+ * @default []
1154
+ */
1155
+ "tokenSeparators"?: readonly string[];
1156
+ /**
1157
+ * Controlled canonical value. Undefined selects uncontrolled mode; null means no selection. With `multiple`, this is the controlled list of selected items instead.
1191
1158
  */
1192
- "value"?: string | null;
1159
+ "value"?: string | null | readonly MultiComboboxItem[];
1193
1160
  }
1194
1161
  interface UiContextMenu {
1195
1162
  /**
@@ -1360,58 +1327,6 @@ declare namespace LocalJSX {
1360
1327
  */
1361
1328
  "value"?: string;
1362
1329
  }
1363
- /**
1364
- * A multi-value combobox with removable, customizable selected items.
1365
- */
1366
- interface UiMultiCombobox {
1367
- /**
1368
- * @default {}
1369
- */
1370
- "config"?: ComboboxConfig;
1371
- /**
1372
- * @default ''
1373
- */
1374
- "defaultQuery"?: string;
1375
- /**
1376
- * @default false
1377
- */
1378
- "disabled"?: boolean;
1379
- /**
1380
- * @default []
1381
- */
1382
- "items"?: readonly MultiComboboxItem[];
1383
- /**
1384
- * @default ''
1385
- */
1386
- "label"?: string;
1387
- /**
1388
- * @default ''
1389
- */
1390
- "name"?: string;
1391
- "onAdd-item"?: (event: UiMultiComboboxCustomEvent<MultiComboboxItemChange>) => void;
1392
- "onCreate-item"?: (event: UiMultiComboboxCustomEvent<MultiComboboxCreate>) => void;
1393
- "onOptions-change"?: (event: UiMultiComboboxCustomEvent<readonly ComboboxOption[]>) => void;
1394
- "onQuery-change"?: (event: UiMultiComboboxCustomEvent<{ query: string; display: string; trigger: 'keyboard' | 'pointer' | 'programmatic' }>) => void;
1395
- "onRemove-item"?: (event: UiMultiComboboxCustomEvent<MultiComboboxItemChange>) => void;
1396
- /**
1397
- * @default ''
1398
- */
1399
- "placeholder"?: string;
1400
- "query"?: string;
1401
- /**
1402
- * @default false
1403
- */
1404
- "readOnly"?: boolean;
1405
- /**
1406
- * @default false
1407
- */
1408
- "required"?: boolean;
1409
- /**
1410
- * Characters that commit the current query and leave the input ready for the next item.
1411
- * @default []
1412
- */
1413
- "tokenSeparators"?: readonly string[];
1414
- }
1415
1330
  interface UiPopover {
1416
1331
  /**
1417
1332
  * @default false
@@ -1727,8 +1642,9 @@ declare namespace LocalJSX {
1727
1642
  "label": string;
1728
1643
  "placeholder": string;
1729
1644
  "name": string;
1730
- "value": string | null;
1645
+ "value": string | null | readonly MultiComboboxItem[];
1731
1646
  "defaultValue": string;
1647
+ "multiple": boolean;
1732
1648
  "query": string;
1733
1649
  "defaultQuery": string;
1734
1650
  "disabled": boolean;
@@ -1796,16 +1712,6 @@ declare namespace LocalJSX {
1796
1712
  "disabled": boolean;
1797
1713
  "value": string;
1798
1714
  }
1799
- interface UiMultiComboboxAttributes {
1800
- "label": string;
1801
- "placeholder": string;
1802
- "query": string;
1803
- "defaultQuery": string;
1804
- "disabled": boolean;
1805
- "readOnly": boolean;
1806
- "required": boolean;
1807
- "name": string;
1808
- }
1809
1715
  interface UiPopoverAttributes {
1810
1716
  "open": boolean;
1811
1717
  "defaultOpen": boolean;
@@ -1911,7 +1817,6 @@ declare namespace LocalJSX {
1911
1817
  "ui-input": Omit<UiInput, keyof UiInputAttributes> & { [K in keyof UiInput & keyof UiInputAttributes]?: UiInput[K] } & { [K in keyof UiInput & keyof UiInputAttributes as `attr:${K}`]?: UiInputAttributes[K] } & { [K in keyof UiInput & keyof UiInputAttributes as `prop:${K}`]?: UiInput[K] };
1912
1818
  "ui-menu": Omit<UiMenu, keyof UiMenuAttributes> & { [K in keyof UiMenu & keyof UiMenuAttributes]?: UiMenu[K] } & { [K in keyof UiMenu & keyof UiMenuAttributes as `attr:${K}`]?: UiMenuAttributes[K] } & { [K in keyof UiMenu & keyof UiMenuAttributes as `prop:${K}`]?: UiMenu[K] };
1913
1819
  "ui-menu-item": Omit<UiMenuItem, keyof UiMenuItemAttributes> & { [K in keyof UiMenuItem & keyof UiMenuItemAttributes]?: UiMenuItem[K] } & { [K in keyof UiMenuItem & keyof UiMenuItemAttributes as `attr:${K}`]?: UiMenuItemAttributes[K] } & { [K in keyof UiMenuItem & keyof UiMenuItemAttributes as `prop:${K}`]?: UiMenuItem[K] };
1914
- "ui-multi-combobox": Omit<UiMultiCombobox, keyof UiMultiComboboxAttributes> & { [K in keyof UiMultiCombobox & keyof UiMultiComboboxAttributes]?: UiMultiCombobox[K] } & { [K in keyof UiMultiCombobox & keyof UiMultiComboboxAttributes as `attr:${K}`]?: UiMultiComboboxAttributes[K] } & { [K in keyof UiMultiCombobox & keyof UiMultiComboboxAttributes as `prop:${K}`]?: UiMultiCombobox[K] };
1915
1820
  "ui-popover": Omit<UiPopover, keyof UiPopoverAttributes> & { [K in keyof UiPopover & keyof UiPopoverAttributes]?: UiPopover[K] } & { [K in keyof UiPopover & keyof UiPopoverAttributes as `attr:${K}`]?: UiPopoverAttributes[K] } & { [K in keyof UiPopover & keyof UiPopoverAttributes as `prop:${K}`]?: UiPopover[K] };
1916
1821
  "ui-radio": Omit<UiRadio, keyof UiRadioAttributes> & { [K in keyof UiRadio & keyof UiRadioAttributes]?: UiRadio[K] } & { [K in keyof UiRadio & keyof UiRadioAttributes as `attr:${K}`]?: UiRadioAttributes[K] } & { [K in keyof UiRadio & keyof UiRadioAttributes as `prop:${K}`]?: UiRadio[K] };
1917
1822
  "ui-radio-group": Omit<UiRadioGroup, keyof UiRadioGroupAttributes> & { [K in keyof UiRadioGroup & keyof UiRadioGroupAttributes]?: UiRadioGroup[K] } & { [K in keyof UiRadioGroup & keyof UiRadioGroupAttributes as `attr:${K}`]?: UiRadioGroupAttributes[K] } & { [K in keyof UiRadioGroup & keyof UiRadioGroupAttributes as `prop:${K}`]?: UiRadioGroup[K] };
@@ -1948,6 +1853,8 @@ declare module "@stencil/core" {
1948
1853
  "ui-chip": LocalJSX.IntrinsicElements["ui-chip"] & JSXBase.HTMLAttributes<HTMLUiChipElement>;
1949
1854
  /**
1950
1855
  * A single editable field with contextual suggestions, optional help and field validation.
1856
+ * With `multiple`, it becomes a multi-value tag field: `value` holds the selected
1857
+ * items, chips render before the cursor, and add/remove/create item events fire.
1951
1858
  */
1952
1859
  "ui-combobox": LocalJSX.IntrinsicElements["ui-combobox"] & JSXBase.HTMLAttributes<HTMLUiComboboxElement>;
1953
1860
  "ui-context-menu": LocalJSX.IntrinsicElements["ui-context-menu"] & JSXBase.HTMLAttributes<HTMLUiContextMenuElement>;
@@ -1963,10 +1870,6 @@ declare module "@stencil/core" {
1963
1870
  "ui-input": LocalJSX.IntrinsicElements["ui-input"] & JSXBase.HTMLAttributes<HTMLUiInputElement>;
1964
1871
  "ui-menu": LocalJSX.IntrinsicElements["ui-menu"] & JSXBase.HTMLAttributes<HTMLUiMenuElement>;
1965
1872
  "ui-menu-item": LocalJSX.IntrinsicElements["ui-menu-item"] & JSXBase.HTMLAttributes<HTMLUiMenuItemElement>;
1966
- /**
1967
- * A multi-value combobox with removable, customizable selected items.
1968
- */
1969
- "ui-multi-combobox": LocalJSX.IntrinsicElements["ui-multi-combobox"] & JSXBase.HTMLAttributes<HTMLUiMultiComboboxElement>;
1970
1873
  "ui-popover": LocalJSX.IntrinsicElements["ui-popover"] & JSXBase.HTMLAttributes<HTMLUiPopoverElement>;
1971
1874
  "ui-radio": LocalJSX.IntrinsicElements["ui-radio"] & JSXBase.HTMLAttributes<HTMLUiRadioElement>;
1972
1875
  "ui-radio-group": LocalJSX.IntrinsicElements["ui-radio-group"] & JSXBase.HTMLAttributes<HTMLUiRadioGroupElement>;
@@ -7,7 +7,7 @@ import {
7
7
  getElement,
8
8
  h,
9
9
  registerInstance
10
- } from "./chunk-G5AWV77V.js";
10
+ } from "./chunk-JXSHRMYW.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}`;
@@ -3,7 +3,7 @@ import {
3
3
  getElement,
4
4
  h,
5
5
  registerInstance
6
- } from "./chunk-G5AWV77V.js";
6
+ } from "./chunk-JXSHRMYW.js";
7
7
 
8
8
  // dist/esm/ui-avatar-group.entry.js
9
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}`;
@@ -2,7 +2,7 @@ import {
2
2
  Host,
3
3
  h,
4
4
  registerInstance
5
- } from "./chunk-G5AWV77V.js";
5
+ } from "./chunk-JXSHRMYW.js";
6
6
 
7
7
  // dist/esm/ui-avatar.entry.js
8
8
  function toInitials(value) {
@@ -2,7 +2,7 @@ import {
2
2
  Host,
3
3
  h,
4
4
  registerInstance
5
- } from "./chunk-G5AWV77V.js";
5
+ } from "./chunk-JXSHRMYW.js";
6
6
 
7
7
  // dist/esm/ui-badge.entry.js
8
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)}`;