@threadlabs/looma 0.1.25 → 0.1.27

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 (191) hide show
  1. package/dist/{chunk-UY423IKN.js → chunk-RLELJVBL.js} +33 -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 +6 -6
  5. package/dist/cjs/ui-context-menu.cjs.entry.js +1 -1
  6. package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
  7. package/dist/cjs/ui-disclosure.cjs.entry.js +1 -1
  8. package/dist/cjs/ui-editable.cjs.entry.js +1 -1
  9. package/dist/cjs/ui-floating-action-button.cjs.entry.js +1 -1
  10. package/dist/cjs/ui-form-field.cjs.entry.js +1 -1
  11. package/dist/cjs/ui-icon-button.cjs.entry.js +1 -1
  12. package/dist/cjs/ui-input.cjs.entry.js +1 -1
  13. package/dist/cjs/ui-menu-item.cjs.entry.js +1 -1
  14. package/dist/cjs/ui-menu.cjs.entry.js +1 -1
  15. package/dist/cjs/ui-multi-combobox.cjs.entry.js +36 -4
  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-tooltip.cjs.entry.js +1 -1
  27. package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
  28. package/dist/cjs/ui-tree-item.cjs.entry.js +2 -2
  29. package/dist/cjs/ui-tree.cjs.entry.js +1 -1
  30. package/dist/collection/components/ui-chip/ui-chip.css +10 -0
  31. package/dist/collection/components/ui-chip/ui-chip.js +1 -1
  32. package/dist/collection/components/ui-combobox/ui-combobox.js +4 -4
  33. package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
  34. package/dist/collection/components/ui-dialog/ui-dialog.js +1 -1
  35. package/dist/collection/components/ui-disclosure/ui-disclosure.js +1 -1
  36. package/dist/collection/components/ui-editable/ui-editable.js +1 -1
  37. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
  38. package/dist/collection/components/ui-form-field/ui-form-field.js +1 -1
  39. package/dist/collection/components/ui-icon-button/ui-icon-button.js +1 -1
  40. package/dist/collection/components/ui-input/ui-input.js +1 -1
  41. package/dist/collection/components/ui-menu/ui-menu.js +1 -1
  42. package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
  43. package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.css +5 -1
  44. package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.js +53 -3
  45. package/dist/collection/components/ui-popover/ui-popover.js +1 -1
  46. package/dist/collection/components/ui-radio/ui-radio.js +1 -1
  47. package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
  48. package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
  49. package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
  50. package/dist/collection/components/ui-select/ui-select.js +1 -1
  51. package/dist/collection/components/ui-switch/ui-switch.js +2 -2
  52. package/dist/collection/components/ui-tabs/ui-tabs.js +1 -1
  53. package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
  54. package/dist/collection/components/ui-toast-region/ui-toast-region.js +1 -1
  55. package/dist/collection/components/ui-tooltip/ui-tooltip.js +1 -1
  56. package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
  57. package/dist/collection/components/ui-tree/ui-tree.js +1 -1
  58. package/dist/collection/components/ui-tree-item/ui-tree-item.js +2 -2
  59. package/dist/components/{p-BMgIcOh-.js → p-BKzrrab4.js} +1 -1
  60. package/dist/components/p-D0wBI-9r.js +1 -0
  61. package/dist/components/{p-C6p-ygxq.js → p-DZRtXH6j.js} +1 -1
  62. package/dist/components/p-Vc4ExHFc.js +1 -0
  63. package/dist/components/ui-chip.js +1 -1
  64. package/dist/components/ui-combobox.js +1 -1
  65. package/dist/components/ui-context-menu.js +1 -1
  66. package/dist/components/ui-dialog.js +1 -1
  67. package/dist/components/ui-disclosure.js +1 -1
  68. package/dist/components/ui-editable.js +1 -1
  69. package/dist/components/ui-floating-action-button.js +1 -1
  70. package/dist/components/ui-form-field.js +1 -1
  71. package/dist/components/ui-icon-button.js +1 -1
  72. package/dist/components/ui-input.js +1 -1
  73. package/dist/components/ui-menu-item.js +1 -1
  74. package/dist/components/ui-menu.js +1 -1
  75. package/dist/components/ui-multi-combobox.js +1 -1
  76. package/dist/components/ui-popover.js +1 -1
  77. package/dist/components/ui-radio-group.js +1 -1
  78. package/dist/components/ui-radio.js +1 -1
  79. package/dist/components/ui-search-result-row.js +1 -1
  80. package/dist/components/ui-search-shell.js +1 -1
  81. package/dist/components/ui-select.js +1 -1
  82. package/dist/components/ui-switch.js +1 -1
  83. package/dist/components/ui-tabs.js +1 -1
  84. package/dist/components/ui-textarea.js +1 -1
  85. package/dist/components/ui-toast-region.js +1 -1
  86. package/dist/components/ui-tooltip.js +1 -1
  87. package/dist/components/ui-top-bar.js +1 -1
  88. package/dist/components/ui-tree-item.js +1 -1
  89. package/dist/components/ui-tree.js +1 -1
  90. package/dist/esm/loader.js +1 -1
  91. package/dist/esm/looma.js +1 -1
  92. package/dist/esm/ui-chip_2.entry.js +6 -6
  93. package/dist/esm/ui-context-menu.entry.js +1 -1
  94. package/dist/esm/ui-dialog.entry.js +1 -1
  95. package/dist/esm/ui-disclosure.entry.js +1 -1
  96. package/dist/esm/ui-editable.entry.js +1 -1
  97. package/dist/esm/ui-floating-action-button.entry.js +1 -1
  98. package/dist/esm/ui-form-field.entry.js +1 -1
  99. package/dist/esm/ui-icon-button.entry.js +1 -1
  100. package/dist/esm/ui-input.entry.js +1 -1
  101. package/dist/esm/ui-menu-item.entry.js +1 -1
  102. package/dist/esm/ui-menu.entry.js +1 -1
  103. package/dist/esm/ui-multi-combobox.entry.js +36 -4
  104. package/dist/esm/ui-popover.entry.js +1 -1
  105. package/dist/esm/ui-radio-group.entry.js +1 -1
  106. package/dist/esm/ui-radio.entry.js +1 -1
  107. package/dist/esm/ui-search-result-row.entry.js +1 -1
  108. package/dist/esm/ui-search-shell.entry.js +1 -1
  109. package/dist/esm/ui-select.entry.js +1 -1
  110. package/dist/esm/ui-switch.entry.js +2 -2
  111. package/dist/esm/ui-tabs.entry.js +1 -1
  112. package/dist/esm/ui-textarea.entry.js +1 -1
  113. package/dist/esm/ui-toast-region.entry.js +1 -1
  114. package/dist/esm/ui-tooltip.entry.js +1 -1
  115. package/dist/esm/ui-top-bar.entry.js +1 -1
  116. package/dist/esm/ui-tree-item.entry.js +2 -2
  117. package/dist/esm/ui-tree.entry.js +1 -1
  118. package/dist/index.cjs +67 -38
  119. package/dist/index.js +2 -2
  120. package/dist/looma/looma.esm.js +1 -1
  121. package/dist/looma/{p-0e1741cb.entry.js → p-071c139c.entry.js} +1 -1
  122. package/dist/looma/{p-393e3e02.entry.js → p-0fd60103.entry.js} +1 -1
  123. package/dist/looma/{p-e14024bf.entry.js → p-1a12eb5c.entry.js} +1 -1
  124. package/dist/looma/{p-bcb1b47b.entry.js → p-1e1de77f.entry.js} +1 -1
  125. package/dist/looma/{p-0ef4bf13.entry.js → p-20387ffa.entry.js} +1 -1
  126. package/dist/looma/{p-30f01909.entry.js → p-2f3c1b57.entry.js} +1 -1
  127. package/dist/looma/{p-5a7261e1.entry.js → p-4fc9917f.entry.js} +1 -1
  128. package/dist/looma/{p-26d357ae.entry.js → p-607c3056.entry.js} +1 -1
  129. package/dist/looma/p-66c6b6dd.entry.js +1 -0
  130. package/dist/looma/{p-89e71bbb.entry.js → p-6cc3180b.entry.js} +1 -1
  131. package/dist/looma/{p-558d4f5b.entry.js → p-77dcfa6f.entry.js} +1 -1
  132. package/dist/looma/p-85a6716e.entry.js +1 -0
  133. package/dist/looma/{p-81c533f5.entry.js → p-8a5e3fe1.entry.js} +1 -1
  134. package/dist/looma/{p-7319c147.entry.js → p-8f102407.entry.js} +1 -1
  135. package/dist/looma/{p-87f501cf.entry.js → p-9551ebf6.entry.js} +1 -1
  136. package/dist/looma/{p-dbcb479c.entry.js → p-9a82c523.entry.js} +1 -1
  137. package/dist/looma/{p-78b7e466.entry.js → p-a939c00f.entry.js} +1 -1
  138. package/dist/looma/{p-7eb04f09.entry.js → p-b68762f2.entry.js} +1 -1
  139. package/dist/looma/{p-95eb3b58.entry.js → p-b75aff63.entry.js} +1 -1
  140. package/dist/looma/p-caa37be2.entry.js +1 -0
  141. package/dist/looma/{p-d62da01d.entry.js → p-da6e2d01.entry.js} +1 -1
  142. package/dist/looma/{p-fc180770.entry.js → p-df696cca.entry.js} +1 -1
  143. package/dist/looma/{p-92cd1841.entry.js → p-e07e6ac2.entry.js} +1 -1
  144. package/dist/looma/{p-96ec4d7a.entry.js → p-e406656e.entry.js} +1 -1
  145. package/dist/looma/{p-5780cefa.entry.js → p-e82f104c.entry.js} +1 -1
  146. package/dist/looma/{p-166f8593.entry.js → p-f431dc13.entry.js} +1 -1
  147. package/dist/types/components/ui-multi-combobox/ui-multi-combobox.d.ts +4 -0
  148. package/dist/types/components.d.ts +10 -0
  149. package/dist/{ui-affordance-scope.entry-VSSP52ZP.js → ui-affordance-scope.entry-7H6GIQEK.js} +1 -1
  150. package/dist/{ui-avatar-group.entry-JMCLL6FW.js → ui-avatar-group.entry-QB25IUWA.js} +1 -1
  151. package/dist/{ui-avatar.entry-X2YQ3QPG.js → ui-avatar.entry-L377CWPR.js} +1 -1
  152. package/dist/{ui-badge.entry-OJ6FJJKL.js → ui-badge.entry-QHC3KI5S.js} +1 -1
  153. package/dist/{ui-button.entry-ZN6JLND7.js → ui-button.entry-MZGTPU22.js} +1 -1
  154. package/dist/{ui-callout.entry-7K6NXQ7U.js → ui-callout.entry-2D4LO74K.js} +1 -1
  155. package/dist/{ui-checkbox.entry-GUYRVU6O.js → ui-checkbox.entry-B2O5DREC.js} +1 -1
  156. package/dist/{ui-chip_2.entry-M2DOTIGY.js → ui-chip_2.entry-OOSON72O.js} +8 -8
  157. package/dist/{ui-context-menu.entry-BM7FHOUJ.js → ui-context-menu.entry-UY76G7HM.js} +2 -2
  158. package/dist/{ui-dialog.entry-AZAD37CG.js → ui-dialog.entry-345V7IJ3.js} +2 -2
  159. package/dist/{ui-disclosure.entry-XDPGKMBK.js → ui-disclosure.entry-RUU7VNDN.js} +2 -2
  160. package/dist/{ui-editable.entry-S3TE6KFT.js → ui-editable.entry-WWFFHOMP.js} +2 -2
  161. package/dist/{ui-floating-action-button.entry-U7HGA3CS.js → ui-floating-action-button.entry-Y2TLDJO4.js} +2 -2
  162. package/dist/{ui-form-field.entry-C2ZSP3TM.js → ui-form-field.entry-C63GZMQR.js} +2 -2
  163. package/dist/{ui-icon-button.entry-P6H2LY7D.js → ui-icon-button.entry-35MJYYEI.js} +2 -2
  164. package/dist/{ui-input.entry-GTNQJCQ2.js → ui-input.entry-3FAXEH5M.js} +2 -2
  165. package/dist/{ui-menu-item.entry-2HWOGUO5.js → ui-menu-item.entry-3J42XLCJ.js} +2 -2
  166. package/dist/{ui-menu.entry-NZ7ER54K.js → ui-menu.entry-YDABO3OO.js} +2 -2
  167. package/dist/{ui-multi-combobox.entry-DZ5LLSVQ.js → ui-multi-combobox.entry-XXLS4V3I.js} +34 -5
  168. package/dist/{ui-popover.entry-ZOEQMUWG.js → ui-popover.entry-YP7R6FQO.js} +2 -2
  169. package/dist/{ui-radio-group.entry-QCQ46EK5.js → ui-radio-group.entry-TYXAN7G5.js} +2 -2
  170. package/dist/{ui-radio.entry-QAATWUYT.js → ui-radio.entry-JW7HX3LW.js} +2 -2
  171. package/dist/{ui-search-result-row.entry-2I3DH2OT.js → ui-search-result-row.entry-MKQYGNFO.js} +2 -2
  172. package/dist/{ui-search-shell.entry-7RS55ORF.js → ui-search-shell.entry-KHIQTT4J.js} +2 -2
  173. package/dist/{ui-select.entry-6O4KD4G7.js → ui-select.entry-R235Y3IL.js} +2 -2
  174. package/dist/{ui-switch.entry-DY5PSHCQ.js → ui-switch.entry-BJ6FIEPB.js} +3 -3
  175. package/dist/{ui-tabs.entry-6X56UOUE.js → ui-tabs.entry-ZBP3FLR2.js} +2 -2
  176. package/dist/{ui-textarea.entry-RDYP6O77.js → ui-textarea.entry-2YW7TCEU.js} +2 -2
  177. package/dist/{ui-toast-region.entry-EBY42KS5.js → ui-toast-region.entry-ZSCMMIKQ.js} +2 -2
  178. package/dist/{ui-tooltip.entry-PLXMPOKV.js → ui-tooltip.entry-VG4AWEBD.js} +2 -2
  179. package/dist/{ui-top-bar.entry-QKE2DLVD.js → ui-top-bar.entry-CZW3MLC6.js} +2 -2
  180. package/dist/{ui-tree-item.entry-TC6YWIC6.js → ui-tree-item.entry-CU2SWAOK.js} +3 -3
  181. package/dist/{ui-tree.entry-UL6UHCUT.js → ui-tree.entry-M6KXK7GJ.js} +2 -2
  182. package/package.json +1 -1
  183. package/vue/{chunk-GXQY27K2.js → chunk-2DDIBSFD.js} +4 -1
  184. package/vue/editor/index.js +1 -1
  185. package/vue/index.d.ts +9 -0
  186. package/vue/index.js +1 -1
  187. package/dist/components/p-B9CzOHvE.js +0 -1
  188. package/dist/components/p-BVteuP_d.js +0 -1
  189. package/dist/looma/p-262a542c.entry.js +0 -1
  190. package/dist/looma/p-3a44b9f9.entry.js +0 -1
  191. package/dist/looma/p-b6c776fb.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as e,g as o,h as t,H as s}from"./p-8BGiMGQ0.js";import{o as r,c as a,r as i}from"./p-C-0syqXZ.js";import{d as n}from"./p-JwSoedEO.js";import{i as p,c}from"./p-BnGhGgTH.js";import{a as h}from"./p-Bu0dmLBE.js";const d=class{constructor(o){e(this,o)}get host(){return o(this)}open;defaultOpen=!1;for;placement="bottom-start";internalOpen=!1;overlayId=`ui-popover-${Math.random().toString(36).slice(2,11)}`;anchor=null;surface=null;syncFromProp(){p(this.open)&&(this.internalOpen=this.open)}onOpenChange(){this.syncOverlay(),this.internalOpen?n(this.host,"open",{open:!0,reason:"programmatic",trigger:"programmatic"}):n(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"})}resetSurface(){this.setupSurface(),this.syncSurface()}setupSurface(){this.surface?.destroy(),this.surface=null,this.anchor=this.for?this.host.ownerDocument.getElementById(this.for):null,this.anchor&&(this.surface=h(this.host,{anchor:this.anchor,placement:this.placement}))}syncSurface(){this.surface&&(this.internalOpen?this.surface.show():this.surface.hide())}syncOverlay(){this.syncSurface(),this.internalOpen?r({id:this.overlayId,modal:!1,element:this.host,relatedElements:this.anchor?[this.anchor]:void 0,dismissible:!0,requestClose:(e,o)=>this.handleRequestClose(e,o)}):a(this.overlayId)}componentDidLoad(){this.internalOpen=c(this.open,this.defaultOpen),this.host.addEventListener("keydown",this.onKeydown),this.setupSurface(),this.syncOverlay()}disconnectedCallback(){this.host.removeEventListener("keydown",this.onKeydown),this.surface?.destroy(),this.surface=null,a(this.overlayId)}componentDidUpdate(){this.syncOverlay()}handleRequestClose(e,o){p(this.open)||(this.internalOpen=!1),n(this.host,"close",{open:!1,reason:e,trigger:o})}onKeydown=e=>{"Escape"===e.key&&i("escape","keyboard")};render(){return t(s,{key:"a4986ace0f3c586774a549cb844287b28ccd0531","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},t("div",{key:"8f2c589916d06138ef72bfe0d039893b3c59a7cc",class:"popover__surface"},t("slot",{key:"ee70e7dcc53a99b5c80e56862a6eb00edcfcf912"})))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{onOpenChange:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}]}}};d.style=":host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);box-sizing:border-box;max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:auto;padding:0;border:0;border-radius:0;background:transparent;box-shadow:var(--ui-shadow-lg)}.popover__surface{box-sizing:border-box;padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}";export{d as ui_popover}
@@ -1 +0,0 @@
1
- import{r as e,c as t,g as i,h as s,H as a}from"./p-8BGiMGQ0.js";const o=class{constructor(i){e(this,i),this.queryChange=t(this,"query-change"),this.addItem=t(this,"add-item"),this.removeItem=t(this,"remove-item"),this.createItem=t(this,"create-item"),this.optionsChange=t(this,"options-change")}get host(){return i(this)}label="";placeholder="";items=[];config={};query;defaultQuery="";disabled=!1;readOnly=!1;required=!1;name="";queryChange;addItem;removeItem;createItem;optionsChange;raw="";rows=[];combobox;filteredConfig;filteredConfigSource;filteredSelection="";componentWillLoad(){this.raw=this.query??this.defaultQuery}syncQuery(){void 0!==this.query&&(this.raw=this.query)}get selectedValues(){return new Set(this.items.map((e=>e.value)))}get comboboxConfig(){const e=this.items.map((e=>e.value)).join("\0");if(this.filteredConfig&&this.filteredConfigSource===this.config&&this.filteredSelection===e)return this.filteredConfig;const t=this.config.filter,i=this.selectedValues;return this.filteredConfigSource=this.config,this.filteredSelection=e,this.filteredConfig={...this.config,filter:(e,s,a)=>!i.has(e.value)&&(t?t(e,s,a):e.label.toLocaleLowerCase().includes(s.toLocaleLowerCase()))},this.filteredConfig}setQuery(e,t){void 0===this.query&&(this.raw=e),this.queryChange.emit({query:e,display:e,trigger:t})}onQueryChange=e=>{e.stopPropagation(),this.setQuery(e.detail.query,e.detail.trigger)};onOptionsChange=e=>{e.stopPropagation(),this.rows=e.detail,this.optionsChange.emit(e.detail)};onValueChange=e=>{e.stopPropagation(),"selection"===e.detail.kind&&e.detail.option&&(this.addItem.emit({item:e.detail.option,index:this.items.length,trigger:e.detail.trigger}),queueMicrotask((()=>this.setQuery("",e.detail.trigger))))};onCreateEntry=e=>{e.stopPropagation();const t=e.detail.query.trim();t&&(this.setQuery("",e.detail.trigger),this.createItem.emit({query:t,trigger:e.detail.trigger}))};remove(e,t){const i=this.items[e];!i||i.disabled||this.disabled||this.readOnly||(this.removeItem.emit({item:i,index:e,trigger:t}),requestAnimationFrame((()=>{const t=this.host.shadowRoot?.querySelectorAll('[part="item"]')??[],s=t[Math.min(e,t.length-1)]??t[e-1];s&&s.dataset.value!==i.value?s.focus():this.focusInput()})))}focusItem(e){this.host.shadowRoot?.querySelectorAll('[part="item"]')[e]?.focus()}onItemKeyDown=(e,t)=>{e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||("ArrowLeft"===e.key?(e.preventDefault(),e.stopPropagation(),this.focusItem(Math.max(0,t-1))):"ArrowRight"===e.key?(e.preventDefault(),e.stopPropagation(),t===this.items.length-1?this.focusInput():this.focusItem(t+1)):"Backspace"!==e.key&&"Delete"!==e.key||(e.preventDefault(),e.stopPropagation(),this.remove(t,"keyboard")))};onKeyDown=e=>{if(e.defaultPrevented||this.disabled||this.readOnly||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const t=e.composedPath().find((e=>e instanceof HTMLInputElement));!t||this.raw||(t.selectionStart??0)>0||("ArrowLeft"===e.key&&this.items.length?(e.preventDefault(),this.focusItem(this.items.length-1)):"Backspace"===e.key&&this.items.length&&(e.preventDefault(),this.remove(this.items.length-1,"keyboard")))};async focusInput(){await(this.combobox?.focusInput())}render(){return s(a,{key:"bdb03a28ea25b22340dc56381fa45031f0c47c27",onKeyDown:this.onKeyDown},s("ui-combobox",{key:"51ba1ab747af9f216223bd71f524db79ef57b8a9",ref:e=>this.combobox=e,label:this.label,"label-visibility":"sr-only",placeholder:this.placeholder,name:this.name,value:null,query:this.raw,config:this.comboboxConfig,size:"sm",disabled:this.disabled,readOnly:this.readOnly,required:this.required,"onQuery-change":this.onQueryChange,"onValue-change":this.onValueChange,"onCreate-entry":this.onCreateEntry,"onOptions-change":this.onOptionsChange},s("div",{key:"ebd8fd8e62db3c2e47b1bfc7558c01e7e1abb8ba",slot:"start",class:"items",role:"group","aria-label":`Selected ${this.label}`},this.items.map(((e,t)=>s("button",{type:"button",part:"item",class:"item","data-value":e.value,tabIndex:-1,disabled:this.disabled||this.readOnly||e.disabled,"aria-label":`${e.label}, press Delete or Backspace to remove`,onKeyDown:e=>this.onItemKeyDown(e,t)},s("slot",{name:`item-${e.id}`},s("ui-chip",{appearance:"pill"},e.label)))))),this.rows.map((e=>s("span",{slot:`option-${e.id}`},s("slot",{name:`option-${e.id}`},e.label)))),s("span",{key:"99cd9848130de37e52a4f735c95e3754dbc64691",slot:"create"},s("slot",{key:"84cc7c14716819bd968bdfcb9213fe3887a5c2b9",name:"create"},"Create “",this.raw,"”")),s("span",{key:"1660eb03425dea4d36797e416d91b051531a470d",slot:"loading"},s("slot",{key:"10c979403e89331e8bdf69ff2db3f5bc272b2685",name:"loading"},"Loading suggestions…")),s("span",{key:"1c862b6c5906aa3ec5fc874de5a5119e13ef9422",slot:"empty"},s("slot",{key:"1c70a1beb7321d3b2be888b3826a1dba2f6fcc70",name:"empty"},"No suggestions.")),s("span",{key:"4b4da5cb8b22543b90ff9230191bbb2e81d16408",slot:"error"},s("slot",{key:"a371a5ce50895562ebc6e55227e4a4834af37f3d",name:"error"},"Unable to load suggestions.")),s("div",{key:"f82e38165d90bdbfa8413c0a561abf7ab5da0183",slot:"footer"},s("slot",{key:"6c0bd2b89428832f4cb485f5d2e30a792859ba9e",name:"footer"}))))}static get watchers(){return{query:[{syncQuery:0}]}}};o.style=":host{display:block;min-inline-size:0;color:var(--ui-text-primary);font:inherit}ui-combobox::part(field){flex-wrap:wrap;align-items:center;gap:var(--ui-space-1);min-block-size:var(--ui-multi-combobox-min-block-size, 2.5rem);padding:var(--ui-space-1)}ui-combobox::part(input){flex:1 0 var(--ui-multi-combobox-input-min-inline-size, 5rem);width:auto;min-block-size:1.75rem;padding:var(--ui-space-0-5) var(--ui-space-1)}.items{display:contents}.item{appearance:none;display:inline-flex;max-inline-size:100%;padding:0;border:0;border-radius:var(--ui-radius-1);background:transparent;color:inherit;font:inherit;cursor:default}.item:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:1px}.item:disabled{opacity:.6}";export{o as ui_multi_combobox}