@solid-design-system/components 4.0.0-next.0 → 4.0.0-next.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (237) hide show
  1. package/cdn/chunks/chunk.O4UXOQEI.js +1 -0
  2. package/cdn/components/teaser/teaser.js +1 -1
  3. package/cdn/custom-elements.json +1 -1
  4. package/cdn/solid-components.bundle.js +1 -1
  5. package/cdn/solid-components.iife.js +1 -1
  6. package/cdn/solid-components.js +1 -1
  7. package/cdn/web-types.json +1 -1
  8. package/cdn-versioned/_components/menu/menu.js +1 -1
  9. package/cdn-versioned/_components/menu/menu.styles.js +1 -1
  10. package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
  11. package/cdn-versioned/chunks/chunk.24SF73MY.js +1 -1
  12. package/cdn-versioned/chunks/chunk.2UHPWLJE.js +1 -1
  13. package/cdn-versioned/chunks/chunk.36Z2VDHI.js +1 -1
  14. package/cdn-versioned/chunks/chunk.4W3WLVGR.js +1 -1
  15. package/cdn-versioned/chunks/chunk.5BROLR6V.js +4 -4
  16. package/cdn-versioned/chunks/chunk.5ZDWEJDB.js +1 -1
  17. package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
  18. package/cdn-versioned/chunks/chunk.6JBTCFHE.js +2 -2
  19. package/cdn-versioned/chunks/chunk.7M7VCE7R.js +1 -1
  20. package/cdn-versioned/chunks/chunk.7RJ3O2FV.js +1 -1
  21. package/cdn-versioned/chunks/chunk.APMDRZQD.js +1 -1
  22. package/cdn-versioned/chunks/chunk.BTRVMAGL.js +1 -1
  23. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  24. package/cdn-versioned/chunks/chunk.CZ3W7KBI.js +1 -1
  25. package/cdn-versioned/chunks/chunk.DVHKKAVM.js +1 -1
  26. package/cdn-versioned/chunks/chunk.E7HNNYP6.js +1 -1
  27. package/cdn-versioned/chunks/chunk.EWWGLHC5.js +1 -1
  28. package/cdn-versioned/chunks/chunk.FD54463O.js +1 -1
  29. package/cdn-versioned/chunks/chunk.FFNTXFC3.js +1 -1
  30. package/cdn-versioned/chunks/chunk.FREYGZDJ.js +1 -1
  31. package/cdn-versioned/chunks/chunk.FX3ED655.js +1 -1
  32. package/cdn-versioned/chunks/chunk.GOVNZSCO.js +1 -1
  33. package/cdn-versioned/chunks/chunk.GQSLHWQC.js +1 -1
  34. package/cdn-versioned/chunks/chunk.GUOHZTA7.js +1 -1
  35. package/cdn-versioned/chunks/chunk.ISEQUO4U.js +1 -1
  36. package/cdn-versioned/chunks/chunk.IVXFAQNG.js +4 -4
  37. package/cdn-versioned/chunks/chunk.IZKUI5WK.js +1 -1
  38. package/cdn-versioned/chunks/chunk.KFW32Q4Q.js +1 -1
  39. package/cdn-versioned/chunks/chunk.KMLMMBY4.js +1 -1
  40. package/cdn-versioned/chunks/chunk.LLXTYJXF.js +1 -1
  41. package/cdn-versioned/chunks/chunk.LZEFLOSA.js +1 -1
  42. package/cdn-versioned/chunks/chunk.MMRILMYU.js +1 -1
  43. package/cdn-versioned/chunks/chunk.MPP7HYX7.js +1 -1
  44. package/cdn-versioned/chunks/chunk.ND7BT52X.js +1 -1
  45. package/cdn-versioned/chunks/chunk.NUB5WHGD.js +1 -1
  46. package/cdn-versioned/chunks/chunk.O4UXOQEI.js +1 -0
  47. package/cdn-versioned/chunks/chunk.OVV7TNT2.js +1 -1
  48. package/cdn-versioned/chunks/chunk.QFNCQQ6S.js +1 -1
  49. package/cdn-versioned/chunks/chunk.QNZWJACC.js +2 -2
  50. package/cdn-versioned/chunks/chunk.R354E6ZD.js +1 -1
  51. package/cdn-versioned/chunks/chunk.SNUMAAEG.js +1 -1
  52. package/cdn-versioned/chunks/chunk.TA7CZCP3.js +1 -1
  53. package/cdn-versioned/chunks/chunk.UBFU6D5B.js +1 -1
  54. package/cdn-versioned/chunks/chunk.URB2K7JQ.js +1 -1
  55. package/cdn-versioned/chunks/chunk.VNKUGTKM.js +1 -1
  56. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  57. package/cdn-versioned/chunks/chunk.WENTMXB2.js +1 -1
  58. package/cdn-versioned/chunks/chunk.WGNXYONB.js +1 -1
  59. package/cdn-versioned/chunks/chunk.WMRFVNYU.js +1 -1
  60. package/cdn-versioned/chunks/chunk.WP6KSGSU.js +1 -1
  61. package/cdn-versioned/chunks/chunk.WQAPHFVM.js +1 -1
  62. package/cdn-versioned/chunks/chunk.YF5WEC4R.js +2 -2
  63. package/cdn-versioned/chunks/chunk.ZFA2VPUT.js +1 -1
  64. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  65. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  66. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  67. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  68. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  69. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  70. package/cdn-versioned/components/button/button.d.ts +1 -1
  71. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  72. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  73. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  74. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  75. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  76. package/cdn-versioned/components/combobox/combobox.d.ts +4 -4
  77. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  78. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  79. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  80. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  81. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  82. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  83. package/cdn-versioned/components/header/header.d.ts +1 -1
  84. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  85. package/cdn-versioned/components/include/include.d.ts +1 -1
  86. package/cdn-versioned/components/input/input.d.ts +1 -1
  87. package/cdn-versioned/components/link/link.d.ts +1 -1
  88. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  89. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  90. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  91. package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
  92. package/cdn-versioned/components/option/option.d.ts +1 -1
  93. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  94. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  95. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  96. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  97. package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
  98. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  99. package/cdn-versioned/components/select/select.d.ts +4 -4
  100. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  101. package/cdn-versioned/components/step/step.d.ts +1 -1
  102. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  103. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  104. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  105. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  106. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  107. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  108. package/cdn-versioned/components/teaser/teaser.js +1 -1
  109. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  110. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  111. package/cdn-versioned/components/video/video.d.ts +1 -1
  112. package/cdn-versioned/custom-elements.json +202 -202
  113. package/cdn-versioned/internal/form.js +3 -3
  114. package/cdn-versioned/solid-components.bundle.js +13 -13
  115. package/cdn-versioned/solid-components.css +2 -2
  116. package/cdn-versioned/solid-components.iife.js +13 -13
  117. package/cdn-versioned/solid-components.js +1 -1
  118. package/cdn-versioned/vscode.html-custom-data.json +80 -80
  119. package/cdn-versioned/web-types.json +137 -137
  120. package/dist/chunks/{chunk.KJFKVSZA.js → chunk.76ZNNLGN.js} +3 -3
  121. package/dist/components/teaser/teaser.js +1 -1
  122. package/dist/custom-elements.json +1 -1
  123. package/dist/solid-components.js +1 -1
  124. package/dist/web-types.json +1 -1
  125. package/dist-versioned/_components/menu/menu.js +1 -1
  126. package/dist-versioned/_components/menu/menu.styles.js +1 -1
  127. package/dist-versioned/_components/menu-item/menu-item.js +2 -2
  128. package/dist-versioned/chunks/chunk.2IBVAXOX.js +1 -1
  129. package/dist-versioned/chunks/chunk.3IT4HBTI.js +1 -1
  130. package/dist-versioned/chunks/chunk.3LGDUVS4.js +2 -2
  131. package/dist-versioned/chunks/chunk.4QKRGAOL.js +4 -4
  132. package/dist-versioned/chunks/chunk.4WYIZLVF.js +5 -5
  133. package/dist-versioned/chunks/chunk.56SNEGI4.js +13 -13
  134. package/dist-versioned/chunks/chunk.65BWRJEA.js +5 -5
  135. package/dist-versioned/chunks/chunk.6CUAQSFA.js +2 -2
  136. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  137. package/dist-versioned/chunks/chunk.6JI7NL3E.js +2 -2
  138. package/dist-versioned/chunks/chunk.727ERQ4F.js +2 -2
  139. package/dist-versioned/chunks/{chunk.KJFKVSZA.js → chunk.76ZNNLGN.js} +4 -4
  140. package/dist-versioned/chunks/chunk.7BEDTYS7.js +2 -2
  141. package/dist-versioned/chunks/chunk.7OHSCBBX.js +1 -1
  142. package/dist-versioned/chunks/chunk.BVC5FY4L.js +13 -13
  143. package/dist-versioned/chunks/chunk.BXB5WF23.js +5 -5
  144. package/dist-versioned/chunks/chunk.D6JZ4IKM.js +1 -1
  145. package/dist-versioned/chunks/chunk.DAM3ICHP.js +2 -2
  146. package/dist-versioned/chunks/chunk.DQPVSTUQ.js +3 -3
  147. package/dist-versioned/chunks/chunk.EFEBQQHC.js +26 -26
  148. package/dist-versioned/chunks/chunk.H655M7FD.js +1 -1
  149. package/dist-versioned/chunks/chunk.HPR3PWAE.js +3 -3
  150. package/dist-versioned/chunks/chunk.I3PY3VYP.js +29 -29
  151. package/dist-versioned/chunks/chunk.IN3GJ5QL.js +3 -3
  152. package/dist-versioned/chunks/chunk.J2XBUIBC.js +2 -2
  153. package/dist-versioned/chunks/chunk.J7MMF6WJ.js +2 -2
  154. package/dist-versioned/chunks/chunk.JIKTGTDS.js +2 -2
  155. package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
  156. package/dist-versioned/chunks/chunk.MTSAWJLV.js +2 -2
  157. package/dist-versioned/chunks/chunk.NM6QP6RJ.js +2 -2
  158. package/dist-versioned/chunks/chunk.PDRECIYA.js +1 -1
  159. package/dist-versioned/chunks/chunk.PGZ5AWZ2.js +9 -9
  160. package/dist-versioned/chunks/chunk.PIR4YJUS.js +2 -2
  161. package/dist-versioned/chunks/chunk.QAZYUCBK.js +6 -6
  162. package/dist-versioned/chunks/chunk.QCICV36Z.js +6 -6
  163. package/dist-versioned/chunks/chunk.QP3SM2LZ.js +3 -3
  164. package/dist-versioned/chunks/chunk.R4BETATX.js +1 -1
  165. package/dist-versioned/chunks/chunk.RNSJAVQE.js +1 -1
  166. package/dist-versioned/chunks/chunk.RZRTIYXA.js +1 -1
  167. package/dist-versioned/chunks/chunk.SPBPHTSS.js +2 -2
  168. package/dist-versioned/chunks/chunk.SSH6ATRK.js +2 -2
  169. package/dist-versioned/chunks/chunk.U5NFPAOX.js +2 -2
  170. package/dist-versioned/chunks/chunk.U6RY25TF.js +2 -2
  171. package/dist-versioned/chunks/chunk.UC5E3AEF.js +1 -1
  172. package/dist-versioned/chunks/chunk.UDZYWRPT.js +1 -1
  173. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  174. package/dist-versioned/chunks/chunk.V7TQ6VJU.js +1 -1
  175. package/dist-versioned/chunks/chunk.VHGHICFG.js +2 -2
  176. package/dist-versioned/chunks/chunk.WWS3CQ2Z.js +5 -5
  177. package/dist-versioned/chunks/chunk.XVFJS7VS.js +5 -5
  178. package/dist-versioned/chunks/chunk.Z2UY62T2.js +1 -1
  179. package/dist-versioned/chunks/chunk.ZGPGFEVP.js +5 -5
  180. package/dist-versioned/chunks/chunk.ZWJI7SLE.js +11 -11
  181. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  182. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  183. package/dist-versioned/components/animation/animation.d.ts +1 -1
  184. package/dist-versioned/components/audio/audio.d.ts +1 -1
  185. package/dist-versioned/components/badge/badge.d.ts +1 -1
  186. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  187. package/dist-versioned/components/button/button.d.ts +1 -1
  188. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  189. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  190. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  191. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  192. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  193. package/dist-versioned/components/combobox/combobox.d.ts +4 -4
  194. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  195. package/dist-versioned/components/divider/divider.d.ts +1 -1
  196. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  197. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  198. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  199. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  200. package/dist-versioned/components/header/header.d.ts +1 -1
  201. package/dist-versioned/components/icon/icon.d.ts +1 -1
  202. package/dist-versioned/components/include/include.d.ts +1 -1
  203. package/dist-versioned/components/input/input.d.ts +1 -1
  204. package/dist-versioned/components/link/link.d.ts +1 -1
  205. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  206. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  207. package/dist-versioned/components/notification/notification.d.ts +1 -1
  208. package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
  209. package/dist-versioned/components/option/option.d.ts +1 -1
  210. package/dist-versioned/components/popup/popup.d.ts +1 -1
  211. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  212. package/dist-versioned/components/radio/radio.d.ts +1 -1
  213. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  214. package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
  215. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  216. package/dist-versioned/components/select/select.d.ts +4 -4
  217. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  218. package/dist-versioned/components/step/step.d.ts +1 -1
  219. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  220. package/dist-versioned/components/switch/switch.d.ts +1 -1
  221. package/dist-versioned/components/tab/tab.d.ts +1 -1
  222. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  223. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  224. package/dist-versioned/components/tag/tag.d.ts +1 -1
  225. package/dist-versioned/components/teaser/teaser.js +1 -1
  226. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  227. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  228. package/dist-versioned/components/video/video.d.ts +1 -1
  229. package/dist-versioned/custom-elements.json +202 -202
  230. package/dist-versioned/internal/form.js +3 -3
  231. package/dist-versioned/solid-components.css +2 -2
  232. package/dist-versioned/solid-components.js +1 -1
  233. package/dist-versioned/vscode.html-custom-data.json +80 -80
  234. package/dist-versioned/web-types.json +137 -137
  235. package/package.json +1 -1
  236. package/cdn/chunks/chunk.CJDJTJIA.js +0 -1
  237. package/cdn-versioned/chunks/chunk.CJDJTJIA.js +0 -1
@@ -74,7 +74,7 @@ let SdMenuItem = class SdMenuItem extends SolidElement {
74
74
  })}
75
75
  >
76
76
  <span part="checked-icon" class="menu-item__check">
77
- <sd-4-0-0-next-0-icon name="check" library="system" aria-hidden="true"></sd-4-0-0-next-0-icon>
77
+ <sd-4-0-0-next-1-icon name="check" library="system" aria-hidden="true"></sd-4-0-0-next-1-icon>
78
78
  </span>
79
79
 
80
80
  <slot name="prefix" part="prefix" class="menu-item__prefix"></slot>
@@ -84,7 +84,7 @@ let SdMenuItem = class SdMenuItem extends SolidElement {
84
84
  <slot name="suffix" part="suffix" class="menu-item__suffix"></slot>
85
85
 
86
86
  <span class="menu-item__chevron">
87
- <sd-4-0-0-next-0-icon name="chevron-right" library="system" aria-hidden="true"></sd-4-0-0-next-0-icon>
87
+ <sd-4-0-0-next-1-icon name="chevron-right" library="system" aria-hidden="true"></sd-4-0-0-next-1-icon>
88
88
  </span>
89
89
  </div>
90
90
  `;
@@ -1,4 +1,4 @@
1
- import{a as k,b as l,c as H}from"./chunk.SPDB3L7V.js";import{a as M}from"./chunk.TWZDCIM2.js";import{a as T,b as L,c as u}from"./chunk.5YRTJVAZ.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as x,b as o,c as C,h as f}from"./chunk.APMDRZQD.js";import{b,e as y,h as w,i as m}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var i=class extends H{constructor(e){if(super(e),this.it=m,e.type!==k.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===m||e==null)return this._t=void 0,this.it=e;if(e===w)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};i.directiveName="unsafeHTML",i.resultType=1;var N=l(i);var a=class extends i{};a.directiveName="unsafeSVG",a.resultType=2;var A=l(a);var d,t=class extends f{constructor(){super(...arguments);this.svg="";this.label="";this.library="default";this.color="currentColor"}connectedCallback(){super.connectedCallback(),T(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),L(this)}getUrl(){let r=u(this.library);return this.name&&r?r.resolver(this.name):this.src}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var v;let r=u(this.library),n=this.getUrl();if(d||(d=new DOMParser),n)try{let c=await M(n);if(n===this.getUrl())if(c.ok){let h=d.parseFromString(c.svg,"text/html").body.querySelector("svg");h!==null?((v=r==null?void 0:r.mutator)==null||v.call(r,h),this.svg=h.outerHTML,this.emit("sd-load")):(this.svg="",this.emit("sd-error"))}else this.svg="",this.emit("sd-error")}catch(c){this.emit("sd-error")}else this.svg.length>0&&(this.svg="")}render(){return y`${A(this.svg)}`}};t.styles=[...f.styles,b`:host{box-sizing:content-box!important;display:inline-block;height:1em;width:1em}svg{display:block;height:100%;width:100%}:host([color=primary]) svg{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity,1))}:host([color=white]) svg{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity,1))}`],s([C()],t.prototype,"svg",2),s([o({reflect:!0})],t.prototype,"name",2),s([o()],t.prototype,"src",2),s([o()],t.prototype,"label",2),s([o({reflect:!0})],t.prototype,"library",2),s([o({reflect:!0})],t.prototype,"color",2),s([p("label")],t.prototype,"handleLabelChange",1),s([p(["name","src","library"])],t.prototype,"setIcon",1),t=s([x("sd-4-0-0-next-0-icon")],t);export{N as a,t as b};
1
+ import{a as k,b as l,c as H}from"./chunk.SPDB3L7V.js";import{a as M}from"./chunk.TWZDCIM2.js";import{a as T,b as L,c as u}from"./chunk.5YRTJVAZ.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as x,b as o,c as C,h as f}from"./chunk.APMDRZQD.js";import{b,e as y,h as w,i as m}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var i=class extends H{constructor(e){if(super(e),this.it=m,e.type!==k.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===m||e==null)return this._t=void 0,this.it=e;if(e===w)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};i.directiveName="unsafeHTML",i.resultType=1;var N=l(i);var a=class extends i{};a.directiveName="unsafeSVG",a.resultType=2;var A=l(a);var d,t=class extends f{constructor(){super(...arguments);this.svg="";this.label="";this.library="default";this.color="currentColor"}connectedCallback(){super.connectedCallback(),T(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),L(this)}getUrl(){let r=u(this.library);return this.name&&r?r.resolver(this.name):this.src}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var v;let r=u(this.library),n=this.getUrl();if(d||(d=new DOMParser),n)try{let c=await M(n);if(n===this.getUrl())if(c.ok){let h=d.parseFromString(c.svg,"text/html").body.querySelector("svg");h!==null?((v=r==null?void 0:r.mutator)==null||v.call(r,h),this.svg=h.outerHTML,this.emit("sd-load")):(this.svg="",this.emit("sd-error"))}else this.svg="",this.emit("sd-error")}catch(c){this.emit("sd-error")}else this.svg.length>0&&(this.svg="")}render(){return y`${A(this.svg)}`}};t.styles=[...f.styles,b`:host{box-sizing:content-box!important;display:inline-block;height:1em;width:1em}svg{display:block;height:100%;width:100%}:host([color=primary]) svg{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity,1))}:host([color=white]) svg{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity,1))}`],s([C()],t.prototype,"svg",2),s([o({reflect:!0})],t.prototype,"name",2),s([o()],t.prototype,"src",2),s([o()],t.prototype,"label",2),s([o({reflect:!0})],t.prototype,"library",2),s([o({reflect:!0})],t.prototype,"color",2),s([p("label")],t.prototype,"handleLabelChange",1),s([p(["name","src","library"])],t.prototype,"setIcon",1),t=s([x("sd-4-0-0-next-1-icon")],t);export{N as a,t as b};
2
2
  /*! Bundled license information:
3
3
 
4
4
  lit-html/directives/unsafe-html.js:
@@ -1 +1 @@
1
- import{a}from"./chunk.HE2LNCWW.js";import{a as i}from"./chunk.KFW32Q4Q.js";import{a as n}from"./chunk.A3DKF5BY.js";import{a as e}from"./chunk.DCOFYPWX.js";import{a as l,b as d}from"./chunk.APMDRZQD.js";import{b as o,e as r}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var t=class extends i{constructor(){super(...arguments);this.expandable=!1}render(){return r`<div part="base" class="sm:p-6"><header part="header" id="header" class="${e("text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",this.expandable&&"cursor-pointer select-none")}" role="${a(this.expandable?"button":void 0)}" aria-expanded="${a(this.expandable?this.open?"true":"false":void 0)}" aria-controls="${a(this.expandable?"content":void 0)}" tabindex="${this.expandable?"0":"-1"}" @click="${this.expandable?this.handleSummaryClick:null}" @keydown="${this.expandable?this.handleSummaryKeyDown:null}"><div part="icon" class="${e("flex flex-grow-0 flex-shrink-0 flex-auto items-center",!this.expandable&&"cursor-default")}"><slot name="icon"></slot></div><slot name="summary" part="summary" class="${e("flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",this.expandable?"text-primary":"text-black cursor-default")}">${this.summary}</slot><span part="summary-icon" class="${e("flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-all ease-in-out duration-300 text-xl sm:text-4xl sm:mt-2",this.open&&"rotate-180",!this.expandable&&"hidden")}"><slot name="expand-icon" class="${e(this.open&&"hidden")}"><sd-4-0-0-next-0-icon library="system" name="chevron-down"></sd-4-0-0-next-0-icon></slot><slot name="collapse-icon" class="${e(!this.open&&"hidden")}"><sd-4-0-0-next-0-icon library="system" name="chevron-down"></sd-4-0-0-next-0-icon></slot></span></header><div part="content" id="content" class="${e("overflow-hidden",!this.expandable&&"hidden")}"><slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot></div></div>`}};t.styles=[...i.styles,o`:host{display:block}@media (min-width:640px){[part=summary-icon]{font-size:var(--sd-spacing-12,3rem)}}[part=icon]{font-size:var(--sd-spacing-12,3rem)}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],s([d({type:Boolean,reflect:!0})],t.prototype,"expandable",2),t=s([l("sd-4-0-0-next-0-quickfact")],t);n("quickfact.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:300,easing:"ease"}});n("quickfact.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:300,easing:"ease"}});export{t as a};
1
+ import{a}from"./chunk.HE2LNCWW.js";import{a as i}from"./chunk.KFW32Q4Q.js";import{a as n}from"./chunk.A3DKF5BY.js";import{a as e}from"./chunk.DCOFYPWX.js";import{a as l,b as d}from"./chunk.APMDRZQD.js";import{b as o,e as r}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var t=class extends i{constructor(){super(...arguments);this.expandable=!1}render(){return r`<div part="base" class="sm:p-6"><header part="header" id="header" class="${e("text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",this.expandable&&"cursor-pointer select-none")}" role="${a(this.expandable?"button":void 0)}" aria-expanded="${a(this.expandable?this.open?"true":"false":void 0)}" aria-controls="${a(this.expandable?"content":void 0)}" tabindex="${this.expandable?"0":"-1"}" @click="${this.expandable?this.handleSummaryClick:null}" @keydown="${this.expandable?this.handleSummaryKeyDown:null}"><div part="icon" class="${e("flex flex-grow-0 flex-shrink-0 flex-auto items-center",!this.expandable&&"cursor-default")}"><slot name="icon"></slot></div><slot name="summary" part="summary" class="${e("flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",this.expandable?"text-primary":"text-black cursor-default")}">${this.summary}</slot><span part="summary-icon" class="${e("flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-all ease-in-out duration-300 text-xl sm:text-4xl sm:mt-2",this.open&&"rotate-180",!this.expandable&&"hidden")}"><slot name="expand-icon" class="${e(this.open&&"hidden")}"><sd-4-0-0-next-1-icon library="system" name="chevron-down"></sd-4-0-0-next-1-icon></slot><slot name="collapse-icon" class="${e(!this.open&&"hidden")}"><sd-4-0-0-next-1-icon library="system" name="chevron-down"></sd-4-0-0-next-1-icon></slot></span></header><div part="content" id="content" class="${e("overflow-hidden",!this.expandable&&"hidden")}"><slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot></div></div>`}};t.styles=[...i.styles,o`:host{display:block}@media (min-width:640px){[part=summary-icon]{font-size:var(--sd-spacing-12,3rem)}}[part=icon]{font-size:var(--sd-spacing-12,3rem)}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],s([d({type:Boolean,reflect:!0})],t.prototype,"expandable",2),t=s([l("sd-4-0-0-next-1-quickfact")],t);n("quickfact.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:300,easing:"ease"}});n("quickfact.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:300,easing:"ease"}});export{t as a};
@@ -1 +1 @@
1
- import{a as i}from"./chunk.HE2LNCWW.js";import{a as f}from"./chunk.6HO6CE4A.js";import{a as l}from"./chunk.DCOFYPWX.js";import{a as h,b as s,d as m,h as o}from"./chunk.APMDRZQD.js";import{b as n,e as a}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends o{constructor(){super(...arguments);this.hasSlotController=new f(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}focus(r){this.button.focus(r)}blur(){this.button.blur()}render(){let r={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return a`<a part="base" class="${l("inline",this.href?"cursor-pointer":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline"}[this.href?"enabled":"disabled"],this.standalone&&"flex items-start")}" href="${i(this.href||void 0)}" target="${i(this.target||void 0)}" download="${i(this.download)}" rel="${i(this.target?"noreferrer noopener":void 0)}" aria-disabled="${this.href?"false":"true"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"><slot name="icon-left" part="icon-left" class="${l("inline",r["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${l("inline",r["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};t.styles=[...o.styles,n`::slotted(sd-4-0-0-next-0-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-4-0-0-next-0-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-4-0-0-next-0-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],e([m("a")],t.prototype,"button",2),e([s({type:Boolean,reflect:!0})],t.prototype,"standalone",2),e([s({reflect:!0})],t.prototype,"size",2),e([s({type:Boolean,reflect:!0})],t.prototype,"inverted",2),e([s()],t.prototype,"href",2),e([s()],t.prototype,"target",2),e([s()],t.prototype,"download",2),t=e([h("sd-4-0-0-next-0-link")],t);export{t as a};
1
+ import{a as i}from"./chunk.HE2LNCWW.js";import{a as f}from"./chunk.6HO6CE4A.js";import{a as l}from"./chunk.DCOFYPWX.js";import{a as h,b as s,d as m,h as o}from"./chunk.APMDRZQD.js";import{b as n,e as a}from"./chunk.IRWHG2Q4.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends o{constructor(){super(...arguments);this.hasSlotController=new f(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}focus(r){this.button.focus(r)}blur(){this.button.blur()}render(){let r={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return a`<a part="base" class="${l("inline",this.href?"cursor-pointer":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline"}[this.href?"enabled":"disabled"],this.standalone&&"flex items-start")}" href="${i(this.href||void 0)}" target="${i(this.target||void 0)}" download="${i(this.download)}" rel="${i(this.target?"noreferrer noopener":void 0)}" aria-disabled="${this.href?"false":"true"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"><slot name="icon-left" part="icon-left" class="${l("inline",r["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${l("inline",r["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};t.styles=[...o.styles,n`::slotted(sd-4-0-0-next-1-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-4-0-0-next-1-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-4-0-0-next-1-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],e([m("a")],t.prototype,"button",2),e([s({type:Boolean,reflect:!0})],t.prototype,"standalone",2),e([s({reflect:!0})],t.prototype,"size",2),e([s({type:Boolean,reflect:!0})],t.prototype,"inverted",2),e([s()],t.prototype,"href",2),e([s()],t.prototype,"target",2),e([s()],t.prototype,"download",2),t=e([h("sd-4-0-0-next-1-link")],t);export{t as a};
@@ -1,4 +1,4 @@
1
- import{a as H,b as U}from"./chunk.5CK64GWQ.js";import{a as B}from"./chunk.D7TMPF3D.js";import{b as N}from"./chunk.65NSSTJE.js";import{a as d}from"./chunk.HE2LNCWW.js";import{a as v,b as x,c as F}from"./chunk.SPDB3L7V.js";import{a as y}from"./chunk.E2DRD2OX.js";import{a as z}from"./chunk.6HO6CE4A.js";import{a as L}from"./chunk.26YUWEYR.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as M,b as a,c as f,d as w,h as C}from"./chunk.APMDRZQD.js";import{b as T,e as h,h as V,i as _}from"./chunk.IRWHG2Q4.js";import{a as E,e as i}from"./chunk.TJOCV4DC.js";var b=(l,r)=>{var s;let e=l._$AN;if(e===void 0)return!1;for(let o of e)(s=o._$AO)==null||s.call(o,r,!1),b(o,r);return!0},g=l=>{let r,e;do{if((r=l._$AM)===void 0)break;e=r._$AN,e.delete(l),l=r}while((e==null?void 0:e.size)===0)},O=l=>{for(let r;r=l._$AM;l=r){let e=r._$AN;if(e===void 0)r._$AN=e=new Set;else if(e.has(l))break;e.add(l),j(r)}};function R(l){this._$AN!==void 0?(g(this),this._$AM=l,O(this)):this._$AM=l}function J(l,r=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(r)if(Array.isArray(s))for(let p=e;p<s.length;p++)b(s[p],!1),g(s[p]);else s!=null&&(b(s,!1),g(s));else b(this,l)}var j=l=>{var r,e;l.type==v.CHILD&&((r=l._$AP)!=null||(l._$AP=J),(e=l._$AQ)!=null||(l._$AQ=R))},$=class extends F{constructor(){super(...arguments),this._$AN=void 0}_$AT(r,e,s){super._$AT(r,e,s),O(this),this.isConnected=r._$AU}_$AO(r,e=!0){var s,o;r!==this.isConnected&&(this.isConnected=r,r?(s=this.reconnected)==null||s.call(this):(o=this.disconnected)==null||o.call(this)),e&&(b(this,r),g(this))}setValue(r){if(H(this._$Ct))this._$Ct._$AI(r,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=r,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var k=class extends ${constructor(e){super(e);this.handlePointerDown=e=>{e.button!==0||this.host.disabled||this.spinOnLongPressCallback(e)};this.handlePointerUp=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(e.type!==v.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return _}update(e,[s]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=E({},s),this.host.addEventListener("pointerdown",this.handlePointerDown)),V}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(e){var s;e.preventDefault(),e.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(s=this.observer)==null||s.disconnect(),this.observer=new MutationObserver(o=>{o.forEach(p=>{p.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var e;clearInterval(this.interval),clearTimeout(this.timeout),(e=this.observer)==null||e.disconnect()}},A=x(k);var K,Q=(K=navigator.userAgentData)==null?void 0:K.brands.some(l=>l.brand.includes("Chromium")),G=Q?!1:navigator.userAgent.includes("Firefox"),t=class extends C{constructor(){super(...arguments);this.formControlController=new N(this);this.hasSlotController=new z(this,"help-text","label","left","right","message","placeholder");this.localize=new L(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var e,s;return(s=(e=this.input)==null?void 0:e.valueAsDate)!=null?s:null}set valueAsDate(e){let s=document.createElement("input");s.type="date",s.valueAsDate=e,this.value=s.value}get valueAsNumber(){var e,s;return(s=(e=this.input)==null?void 0:e.valueAsNumber)!=null?s:parseFloat(this.value)}set valueAsNumber(e){let s=document.createElement("input");s.type="number",s.valueAsNumber=e,this.value=s.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(e){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleKeyDown(e){let s=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!s&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,s,o="none"){this.input.setSelectionRange(e,s,o)}setRangeText(e,s,o,p){this.input.setRangeText(e,s,o,p),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},s=this.label?!0:!!e.label,o=this.helpText?!0:!!e.helpText,p=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),D=this.disabled?"disabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",P=this.size==="sm"?"text-sm":"text-base",q={disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[D],m=this.disabled?"text-neutral-500":"text-primary",u={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],c={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return h`<div part="form-control" class="${n(this.disabled&&"pointer-events-none")}"><div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${n(s?"inline-block":"hidden",P)}" for="input" aria-hidden="${s?"false":"true"}"><slot name="label">${this.label}</slot></label><slot name="tooltip"></slot></div><div part="form-control-input" class="relative w-full"><div part="border" class="${n("absolute w-full h-full pointer-events-none border rounded-default",q)}"></div><div part="base" class="${n("px-4 flex flex-row items-center rounded-default transition-all",this.size==="lg"?"py-2":"py-1",!this.disabled&&!this.readonly?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",D==="disabled"?"text-neutral-500":"text-black")}">${e.left?h`<slot name="left" part="left" class="${n("inline-flex",this.size==="sm"?"mr-1":"mr-2",m,c)}"></slot>`:""} <input part="input" id="input" class="${n("min-w-0 flex-grow focus:outline-none bg-transparent placeholder-neutral-700",this.size==="sm"?"h-6":"h-8",P)}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${d(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${d(this.placeholder)}" minlength="${d(this.minlength)}" maxlength="${d(this.maxlength)}" min="${d(this.min)}" max="${d(this.max)}" step="${d(this.step)}" .value="${U(this.value)}" autocapitalize="${d(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${d(this.type==="password"?"off":this.autocomplete)}" autocorrect="${d(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${d(this.pattern)}" enterkeyhint="${d(this.enterkeyhint)}" inputmode="${d(this.inputmode)}" aria-describedby="help-text invalid-message" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${p?h`<button part="clear-button" class="${n("flex justify-center ",u)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-next-0-icon class="${n("icon-fill-neutral-800",c)}" library="system" name="closing-round"></sd-4-0-0-next-0-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?h`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="flex items-center" type="button" @click="${this.handlePasswordToggle}" tabindex="-1">${this.passwordVisible?h`<slot name="show-password-icon"><sd-4-0-0-next-0-icon class="${n(m,u,c)}" library="system" name="eye"></sd-4-0-0-next-0-icon></slot>`:h`<slot name="hide-password-icon"><sd-4-0-0-next-0-icon class="${n(m,u,c)}" library="system" name="eye-crossed-out"></sd-4-0-0-next-0-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!G?h`<sd-4-0-0-next-0-icon class="${n(m,u,c)}" library="system" name="calendar"></sd-4-0-0-next-0-icon>`:""} ${this.type==="time"?h`<sd-4-0-0-next-0-icon class="${n(m,u,c)}" library="system" name="clock"></sd-4-0-0-next-0-icon>`:""} ${this.type==="search"?h`<button class="flex items-center" type="button" tabindex="-1"><sd-4-0-0-next-0-icon class="${n(m,u,c)}" library="system" name="magnifying-glass"></sd-4-0-0-next-0-icon></button>`:""} ${this.showInvalidStyle?h`<sd-4-0-0-next-0-icon part="invalid-icon" class="${n("text-error",u,c)}" library="system" name="risk"></sd-4-0-0-next-0-icon>`:""} ${this.showValidStyle&&this.styleOnValid?h`<sd-4-0-0-next-0-icon class="${n("text-success flex-shrink-0",u,c)}" library="system" name="status-check" part="valid-icon"></sd-4-0-0-next-0-icon>`:""} ${e.right?h`<slot name="right" part="right" class="${n("inline-flex",m,u,c)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?h`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${A({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-4-0-0-next-0-icon name="system/minus-circle" label="Decrease value" class="${n(m,u,c)}"></sd-4-0-0-next-0-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${A({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-4-0-0-next-0-icon name="system/plus-circle" label="Decrease value" class="${n(m,u,c)}"></sd-4-0-0-next-0-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${n("text-sm text-neutral-700",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};t.styles=[...C.styles,T`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-4-0-0-next-0-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],i([w("#input")],t.prototype,"input",2),i([w("#invalid-message")],t.prototype,"invalidMessage",2),i([f()],t.prototype,"hasFocus",2),i([f()],t.prototype,"showValidStyle",2),i([f()],t.prototype,"showInvalidStyle",2),i([a({reflect:!0})],t.prototype,"type",2),i([a({reflect:!0})],t.prototype,"size",2),i([a()],t.prototype,"inputmode",2),i([a()],t.prototype,"value",2),i([B()],t.prototype,"defaultValue",2),i([a()],t.prototype,"placeholder",2),i([a()],t.prototype,"label",2),i([a({attribute:"help-text"})],t.prototype,"helpText",2),i([a({type:Boolean})],t.prototype,"clearable",2),i([a({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([a({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([a({attribute:"password-toggle",type:Boolean})],t.prototype,"passwordToggle",2),i([a({attribute:"password-visible",type:Boolean})],t.prototype,"passwordVisible",2),i([a({attribute:"spin-buttons",type:Boolean})],t.prototype,"spinButtons",2),i([a({type:Number})],t.prototype,"minlength",2),i([a({type:Number})],t.prototype,"maxlength",2),i([a()],t.prototype,"min",2),i([a()],t.prototype,"max",2),i([a({reflect:!0})],t.prototype,"form",2),i([a()],t.prototype,"name",2),i([a()],t.prototype,"title",2),i([a({type:Boolean,reflect:!0})],t.prototype,"required",2),i([a()],t.prototype,"pattern",2),i([a()],t.prototype,"step",2),i([a()],t.prototype,"autocapitalize",2),i([a()],t.prototype,"autocorrect",2),i([a()],t.prototype,"autocomplete",2),i([a({type:Boolean})],t.prototype,"autofocus",2),i([a()],t.prototype,"enterkeyhint",2),i([a({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),i([a({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],t.prototype,"spellcheck",2),i([y("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([y("step",{waitUntilFirstUpdate:!0})],t.prototype,"handleStepChange",1),i([y("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=i([M("sd-4-0-0-next-0-input")],t);export{t as a};
1
+ import{a as H,b as U}from"./chunk.5CK64GWQ.js";import{a as B}from"./chunk.D7TMPF3D.js";import{b as N}from"./chunk.65NSSTJE.js";import{a as d}from"./chunk.HE2LNCWW.js";import{a as v,b as x,c as F}from"./chunk.SPDB3L7V.js";import{a as y}from"./chunk.E2DRD2OX.js";import{a as z}from"./chunk.6HO6CE4A.js";import{a as L}from"./chunk.26YUWEYR.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as M,b as a,c as f,d as w,h as C}from"./chunk.APMDRZQD.js";import{b as T,e as h,h as V,i as _}from"./chunk.IRWHG2Q4.js";import{a as E,e as i}from"./chunk.TJOCV4DC.js";var b=(l,r)=>{var s;let e=l._$AN;if(e===void 0)return!1;for(let o of e)(s=o._$AO)==null||s.call(o,r,!1),b(o,r);return!0},g=l=>{let r,e;do{if((r=l._$AM)===void 0)break;e=r._$AN,e.delete(l),l=r}while((e==null?void 0:e.size)===0)},O=l=>{for(let r;r=l._$AM;l=r){let e=r._$AN;if(e===void 0)r._$AN=e=new Set;else if(e.has(l))break;e.add(l),j(r)}};function R(l){this._$AN!==void 0?(g(this),this._$AM=l,O(this)):this._$AM=l}function J(l,r=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(r)if(Array.isArray(s))for(let p=e;p<s.length;p++)b(s[p],!1),g(s[p]);else s!=null&&(b(s,!1),g(s));else b(this,l)}var j=l=>{var r,e;l.type==v.CHILD&&((r=l._$AP)!=null||(l._$AP=J),(e=l._$AQ)!=null||(l._$AQ=R))},$=class extends F{constructor(){super(...arguments),this._$AN=void 0}_$AT(r,e,s){super._$AT(r,e,s),O(this),this.isConnected=r._$AU}_$AO(r,e=!0){var s,o;r!==this.isConnected&&(this.isConnected=r,r?(s=this.reconnected)==null||s.call(this):(o=this.disconnected)==null||o.call(this)),e&&(b(this,r),g(this))}setValue(r){if(H(this._$Ct))this._$Ct._$AI(r,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=r,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var k=class extends ${constructor(e){super(e);this.handlePointerDown=e=>{e.button!==0||this.host.disabled||this.spinOnLongPressCallback(e)};this.handlePointerUp=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(e.type!==v.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return _}update(e,[s]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=E({},s),this.host.addEventListener("pointerdown",this.handlePointerDown)),V}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(e){var s;e.preventDefault(),e.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(s=this.observer)==null||s.disconnect(),this.observer=new MutationObserver(o=>{o.forEach(p=>{p.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var e;clearInterval(this.interval),clearTimeout(this.timeout),(e=this.observer)==null||e.disconnect()}},A=x(k);var K,Q=(K=navigator.userAgentData)==null?void 0:K.brands.some(l=>l.brand.includes("Chromium")),G=Q?!1:navigator.userAgent.includes("Firefox"),t=class extends C{constructor(){super(...arguments);this.formControlController=new N(this);this.hasSlotController=new z(this,"help-text","label","left","right","message","placeholder");this.localize=new L(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var e,s;return(s=(e=this.input)==null?void 0:e.valueAsDate)!=null?s:null}set valueAsDate(e){let s=document.createElement("input");s.type="date",s.valueAsDate=e,this.value=s.value}get valueAsNumber(){var e,s;return(s=(e=this.input)==null?void 0:e.valueAsNumber)!=null?s:parseFloat(this.value)}set valueAsNumber(e){let s=document.createElement("input");s.type="number",s.valueAsNumber=e,this.value=s.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(e){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleKeyDown(e){let s=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!s&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,s,o="none"){this.input.setSelectionRange(e,s,o)}setRangeText(e,s,o,p){this.input.setRangeText(e,s,o,p),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},s=this.label?!0:!!e.label,o=this.helpText?!0:!!e.helpText,p=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),D=this.disabled?"disabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",P=this.size==="sm"?"text-sm":"text-base",q={disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[D],m=this.disabled?"text-neutral-500":"text-primary",u={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],c={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return h`<div part="form-control" class="${n(this.disabled&&"pointer-events-none")}"><div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${n(s?"inline-block":"hidden",P)}" for="input" aria-hidden="${s?"false":"true"}"><slot name="label">${this.label}</slot></label><slot name="tooltip"></slot></div><div part="form-control-input" class="relative w-full"><div part="border" class="${n("absolute w-full h-full pointer-events-none border rounded-default",q)}"></div><div part="base" class="${n("px-4 flex flex-row items-center rounded-default transition-all",this.size==="lg"?"py-2":"py-1",!this.disabled&&!this.readonly?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",D==="disabled"?"text-neutral-500":"text-black")}">${e.left?h`<slot name="left" part="left" class="${n("inline-flex",this.size==="sm"?"mr-1":"mr-2",m,c)}"></slot>`:""} <input part="input" id="input" class="${n("min-w-0 flex-grow focus:outline-none bg-transparent placeholder-neutral-700",this.size==="sm"?"h-6":"h-8",P)}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${d(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${d(this.placeholder)}" minlength="${d(this.minlength)}" maxlength="${d(this.maxlength)}" min="${d(this.min)}" max="${d(this.max)}" step="${d(this.step)}" .value="${U(this.value)}" autocapitalize="${d(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${d(this.type==="password"?"off":this.autocomplete)}" autocorrect="${d(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${d(this.pattern)}" enterkeyhint="${d(this.enterkeyhint)}" inputmode="${d(this.inputmode)}" aria-describedby="help-text invalid-message" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${p?h`<button part="clear-button" class="${n("flex justify-center ",u)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-next-1-icon class="${n("icon-fill-neutral-800",c)}" library="system" name="closing-round"></sd-4-0-0-next-1-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?h`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="flex items-center" type="button" @click="${this.handlePasswordToggle}" tabindex="-1">${this.passwordVisible?h`<slot name="show-password-icon"><sd-4-0-0-next-1-icon class="${n(m,u,c)}" library="system" name="eye"></sd-4-0-0-next-1-icon></slot>`:h`<slot name="hide-password-icon"><sd-4-0-0-next-1-icon class="${n(m,u,c)}" library="system" name="eye-crossed-out"></sd-4-0-0-next-1-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!G?h`<sd-4-0-0-next-1-icon class="${n(m,u,c)}" library="system" name="calendar"></sd-4-0-0-next-1-icon>`:""} ${this.type==="time"?h`<sd-4-0-0-next-1-icon class="${n(m,u,c)}" library="system" name="clock"></sd-4-0-0-next-1-icon>`:""} ${this.type==="search"?h`<button class="flex items-center" type="button" tabindex="-1"><sd-4-0-0-next-1-icon class="${n(m,u,c)}" library="system" name="magnifying-glass"></sd-4-0-0-next-1-icon></button>`:""} ${this.showInvalidStyle?h`<sd-4-0-0-next-1-icon part="invalid-icon" class="${n("text-error",u,c)}" library="system" name="risk"></sd-4-0-0-next-1-icon>`:""} ${this.showValidStyle&&this.styleOnValid?h`<sd-4-0-0-next-1-icon class="${n("text-success flex-shrink-0",u,c)}" library="system" name="status-check" part="valid-icon"></sd-4-0-0-next-1-icon>`:""} ${e.right?h`<slot name="right" part="right" class="${n("inline-flex",m,u,c)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?h`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${A({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-4-0-0-next-1-icon name="system/minus-circle" label="Decrease value" class="${n(m,u,c)}"></sd-4-0-0-next-1-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${A({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-4-0-0-next-1-icon name="system/plus-circle" label="Decrease value" class="${n(m,u,c)}"></sd-4-0-0-next-1-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${n("text-sm text-neutral-700",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};t.styles=[...C.styles,T`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-4-0-0-next-1-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],i([w("#input")],t.prototype,"input",2),i([w("#invalid-message")],t.prototype,"invalidMessage",2),i([f()],t.prototype,"hasFocus",2),i([f()],t.prototype,"showValidStyle",2),i([f()],t.prototype,"showInvalidStyle",2),i([a({reflect:!0})],t.prototype,"type",2),i([a({reflect:!0})],t.prototype,"size",2),i([a()],t.prototype,"inputmode",2),i([a()],t.prototype,"value",2),i([B()],t.prototype,"defaultValue",2),i([a()],t.prototype,"placeholder",2),i([a()],t.prototype,"label",2),i([a({attribute:"help-text"})],t.prototype,"helpText",2),i([a({type:Boolean})],t.prototype,"clearable",2),i([a({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([a({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([a({attribute:"password-toggle",type:Boolean})],t.prototype,"passwordToggle",2),i([a({attribute:"password-visible",type:Boolean})],t.prototype,"passwordVisible",2),i([a({attribute:"spin-buttons",type:Boolean})],t.prototype,"spinButtons",2),i([a({type:Number})],t.prototype,"minlength",2),i([a({type:Number})],t.prototype,"maxlength",2),i([a()],t.prototype,"min",2),i([a()],t.prototype,"max",2),i([a({reflect:!0})],t.prototype,"form",2),i([a()],t.prototype,"name",2),i([a()],t.prototype,"title",2),i([a({type:Boolean,reflect:!0})],t.prototype,"required",2),i([a()],t.prototype,"pattern",2),i([a()],t.prototype,"step",2),i([a()],t.prototype,"autocapitalize",2),i([a()],t.prototype,"autocorrect",2),i([a()],t.prototype,"autocomplete",2),i([a({type:Boolean})],t.prototype,"autofocus",2),i([a()],t.prototype,"enterkeyhint",2),i([a({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),i([a({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],t.prototype,"spellcheck",2),i([y("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([y("step",{waitUntilFirstUpdate:!0})],t.prototype,"handleStepChange",1),i([y("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=i([M("sd-4-0-0-next-1-input")],t);export{t as a};
2
2
  /*! Bundled license information:
3
3
 
4
4
  lit-html/async-directive.js:
@@ -1,11 +1,11 @@
1
- import{a as U}from"./chunk.FREYGZDJ.js";import{a as B}from"./chunk.VNKUGTKM.js";import{a as A}from"./chunk.D7TMPF3D.js";import{a as H}from"./chunk.X2GM34WQ.js";import{a as L,d as P,e as R,f as w}from"./chunk.W7A3TU2Z.js";import{c as K}from"./chunk.3L472FD4.js";import{b as z}from"./chunk.65NSSTJE.js";import{a as E,c as T}from"./chunk.A3DKF5BY.js";import{a as $,b as F}from"./chunk.24SF73MY.js";import{a as C,d as S}from"./chunk.RQYP7MH5.js";import{a as x}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as M}from"./chunk.26YUWEYR.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as k,b as o,c as h,d as c,h as I}from"./chunk.APMDRZQD.js";import{b as V,e as d}from"./chunk.IRWHG2Q4.js";import{e as l}from"./chunk.TJOCV4DC.js";var s=class extends I{constructor(){super(...arguments);this.formControlController=new z(this,{assumeInteractionOn:["sd-blur","sd-4-0-0-next-0-input"]});this.hasSlotController=new D(this,"help-text","label");this.localize=new M(this);this.hasHover=!1;this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder=this.localize.term("comboboxDefaultPlaceholder");this.disabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.currentPlacement=this.placement;this.getOption=H;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=w(t.value),a=w(t.getTextLabel()),n=w(e);return i.includes(n)||a.includes(n)};this.getTag=t=>d`<sd-4-0-0-next-0-tag ?disabled="${this.disabled}" part="tag" exportparts="
1
+ import{a as U}from"./chunk.FREYGZDJ.js";import{a as B}from"./chunk.VNKUGTKM.js";import{a as A}from"./chunk.D7TMPF3D.js";import{a as H}from"./chunk.X2GM34WQ.js";import{a as L,d as P,e as R,f as w}from"./chunk.W7A3TU2Z.js";import{c as K}from"./chunk.3L472FD4.js";import{b as z}from"./chunk.65NSSTJE.js";import{a as E,c as T}from"./chunk.A3DKF5BY.js";import{a as $,b as F}from"./chunk.24SF73MY.js";import{a as C,d as S}from"./chunk.RQYP7MH5.js";import{a as x}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as M}from"./chunk.26YUWEYR.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as k,b as o,c as h,d as c,h as I}from"./chunk.APMDRZQD.js";import{b as V,e as d}from"./chunk.IRWHG2Q4.js";import{e as l}from"./chunk.TJOCV4DC.js";var s=class extends I{constructor(){super(...arguments);this.formControlController=new z(this,{assumeInteractionOn:["sd-blur","sd-4-0-0-next-1-input"]});this.hasSlotController=new D(this,"help-text","label");this.localize=new M(this);this.hasHover=!1;this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder=this.localize.term("comboboxDefaultPlaceholder");this.disabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.currentPlacement=this.placement;this.getOption=H;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=w(t.value),a=w(t.getTextLabel()),n=w(e);return i.includes(n)||a.includes(n)};this.getTag=t=>d`<sd-4-0-0-next-1-tag ?disabled="${this.disabled}" part="tag" exportparts="
2
2
  base:tag__base,
3
3
  content:tag__content,
4
4
  removable-indicator:tag__removable-indicator,
5
- " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-4-0-0-next-0-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{if(t.target.closest(".combobox__clear")===null){if(t.key==="Escape"&&(this.open?(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})):this.displayInputValue=""),t.key==="Backspace"&&this.multiple&&this.displayInput.value===""){this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0}));return}if(t.key==="Enter"){let a=this.getCurrentOption(),n=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;if(!this.open&&!n){setTimeout(()=>{t.defaultPrevented||this.formControlController.submit()});return}if(!this.open||a!=null&&a.disabled)return;if(a&&!a.disabled){let p=this.value;this.multiple?(this.toggleOptionSelection(a),this.lastOption=a,this.setOrderedSelectedOptions(a),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(a),this.setSelectedOptions(a)),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==p&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")})}this.displayInput.focus({preventScroll:!0}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}));return}["ArrowUp","ArrowDown"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.open||this.show(),this.selectNextOption(t.key==="ArrowDown")),["Home","End"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key==="Home"?this.displayInput.setSelectionRange(0,0):t.key==="End"&&this.displayInput.setSelectionRange(this.displayInput.value.length,this.displayInput.value.length))}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){if(!this.multiple){let t=this.findOptionByValue(this.getSlottedOptions(),this.value);this.selectedTextLabel=(t==null?void 0:t.getTextLabel())||""}this.formControlController.updateValidity(),this.applySizeToOptions()}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}get options(){let t=e=>{let i=this.displayInput.value,a=this.getOption(e,i);return d`${typeof a=="string"?$(a):a}`};return this.filteredOptions.map(e=>e.tagName.toLowerCase()==="sd-4-0-0-next-0-optgroup"?(Array.from(e.children).forEach(i=>{i.tagName.toLowerCase()==="sd-4-0-0-next-0-option"&&t(i)}),e):t(e))}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let i=this.getTag(t,e);return d`<div @sd-remove="${a=>this.handleTagRemove(a,t)}">${typeof i=="string"?$(i):i}</div>`}return[d``]}):[d`<sd-4-0-0-next-0-tag ?disabled="${this.disabled}" part="tag" exportparts="
5
+ " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-4-0-0-next-1-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{if(t.target.closest(".combobox__clear")===null){if(t.key==="Escape"&&(this.open?(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})):this.displayInputValue=""),t.key==="Backspace"&&this.multiple&&this.displayInput.value===""){this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0}));return}if(t.key==="Enter"){let a=this.getCurrentOption(),n=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;if(!this.open&&!n){setTimeout(()=>{t.defaultPrevented||this.formControlController.submit()});return}if(!this.open||a!=null&&a.disabled)return;if(a&&!a.disabled){let p=this.value;this.multiple?(this.toggleOptionSelection(a),this.lastOption=a,this.setOrderedSelectedOptions(a),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(a),this.setSelectedOptions(a)),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==p&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")})}this.displayInput.focus({preventScroll:!0}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}));return}["ArrowUp","ArrowDown"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.open||this.show(),this.selectNextOption(t.key==="ArrowDown")),["Home","End"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key==="Home"?this.displayInput.setSelectionRange(0,0):t.key==="End"&&this.displayInput.setSelectionRange(this.displayInput.value.length,this.displayInput.value.length))}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){if(!this.multiple){let t=this.findOptionByValue(this.getSlottedOptions(),this.value);this.selectedTextLabel=(t==null?void 0:t.getTextLabel())||""}this.formControlController.updateValidity(),this.applySizeToOptions()}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}get options(){let t=e=>{let i=this.displayInput.value,a=this.getOption(e,i);return d`${typeof a=="string"?$(a):a}`};return this.filteredOptions.map(e=>e.tagName.toLowerCase()==="sd-4-0-0-next-1-optgroup"?(Array.from(e.children).forEach(i=>{i.tagName.toLowerCase()==="sd-4-0-0-next-1-option"&&t(i)}),e):t(e))}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let i=this.getTag(t,e);return d`<div @sd-remove="${a=>this.handleTagRemove(a,t)}">${typeof i=="string"?$(i):i}</div>`}return[d``]}):[d`<sd-4-0-0-next-1-tag ?disabled="${this.disabled}" part="tag" exportparts="
6
6
  base:tag__base,
7
7
  content:tag__content,
8
8
  removable-indicator:tag__removable-indicator,
9
- " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-4-0-0-next-0-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){t.key==="Backspace"&&this.multiple&&(t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){t.key==="Backspace"&&this.multiple&&(t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-4-0-0-next-0-option"),a=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==a&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),a=e.indexOf(i),n=Math.max(0,a);if(t){let p=a+1;n=p>e.length-1?0:p}else{let p=a-1;n=p<0?e.length-1:p}this.setCurrentOption(e[n]),K(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-4-0-0-next-0-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t){let e=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),e.forEach(i=>{i.current=!1,i.setAttribute("aria-selected","false")}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id))}toggleOptionSelection(t,e){let a=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());a&&(a.selected=e!=null?e:!a.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,a;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((a=this.selectedOptions[0])==null?void 0:a.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var y,O,m;let a=i.cloneNode(!0);if(a.current=a.value===((y=this.lastOption)==null?void 0:y.value),a.selected=i.selected,!(((O=i.parentElement)==null?void 0:O.tagName.toLowerCase())==="sd-4-0-0-next-0-optgroup"))return a;let p=i.parentElement,g=(m=p.querySelector('[slot="label"]'))==null?void 0:m.cloneNode(!0),u=e.find(b=>b.id===p.id);if(u){u==null||u.appendChild(a),g&&(u==null||u.appendChild(g));return}let v=p.cloneNode();return v.appendChild(a),g&&v.appendChild(g),e.push(v),v}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-4-0-0-next-0-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&!this.disabled){this.emit("sd-show"),this.addOpenListeners(),await S(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:a}=T(this,"combobox.show",{dir:this.localize.dir()});await C(this.popup.popup,i,a),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await S(this);let{keyframes:t,options:e}=T(this,"combobox.hide",{dir:this.localize.dir()});await C(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,Promise.race([x(this,"sd-after-show"),x(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,x(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return P(L(this.defaultSlot)).flat()}getSlottedOptGroups(){return R(L(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-4-0-0-next-0-option")){customElements.whenDefined("sd-4-0-0-next-0-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();t.forEach((i,a)=>{this.multiple&&(i.checkbox=!0),i.id=i.id||`sd-4-0-0-next-0-combobox-option-${a}`}),e.forEach((i,a)=>{i.id=i.id||`sd-4-0-0-next-0-combobox-optgroup-${a}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery(""),this.hasFocus&&this.value.length>0&&!this.open&&await this.show()}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),a=this.label?!0:!!e,n=this.helpText?!0:!!i,p=this.clearable&&!this.disabled&&this.value.length>0,g=this.disabled?"disabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",u=this.disabled?"cursor-not-allowed":"cursor-pointer",v=this.disabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],O={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return d`<div part="form-control" class="${r("relative text-left",u,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${a&&"inline-block mb-2"}" aria-hidden="${!a}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${r("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[g],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-4-0-0-next-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${r("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
9
+ " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-4-0-0-next-1-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){t.key==="Backspace"&&this.multiple&&(t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){t.key==="Backspace"&&this.multiple&&(t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-4-0-0-next-1-option"),a=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==a&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),a=e.indexOf(i),n=Math.max(0,a);if(t){let p=a+1;n=p>e.length-1?0:p}else{let p=a-1;n=p<0?e.length-1:p}this.setCurrentOption(e[n]),K(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-4-0-0-next-1-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t){let e=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),e.forEach(i=>{i.current=!1,i.setAttribute("aria-selected","false")}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id))}toggleOptionSelection(t,e){let a=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());a&&(a.selected=e!=null?e:!a.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,a;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((a=this.selectedOptions[0])==null?void 0:a.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var y,O,m;let a=i.cloneNode(!0);if(a.current=a.value===((y=this.lastOption)==null?void 0:y.value),a.selected=i.selected,!(((O=i.parentElement)==null?void 0:O.tagName.toLowerCase())==="sd-4-0-0-next-1-optgroup"))return a;let p=i.parentElement,g=(m=p.querySelector('[slot="label"]'))==null?void 0:m.cloneNode(!0),u=e.find(b=>b.id===p.id);if(u){u==null||u.appendChild(a),g&&(u==null||u.appendChild(g));return}let v=p.cloneNode();return v.appendChild(a),g&&v.appendChild(g),e.push(v),v}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-4-0-0-next-1-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&!this.disabled){this.emit("sd-show"),this.addOpenListeners(),await S(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:a}=T(this,"combobox.show",{dir:this.localize.dir()});await C(this.popup.popup,i,a),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await S(this);let{keyframes:t,options:e}=T(this,"combobox.hide",{dir:this.localize.dir()});await C(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,Promise.race([x(this,"sd-after-show"),x(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,x(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return P(L(this.defaultSlot)).flat()}getSlottedOptGroups(){return R(L(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-4-0-0-next-1-option")){customElements.whenDefined("sd-4-0-0-next-1-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();t.forEach((i,a)=>{this.multiple&&(i.checkbox=!0),i.id=i.id||`sd-4-0-0-next-1-combobox-option-${a}`}),e.forEach((i,a)=>{i.id=i.id||`sd-4-0-0-next-1-combobox-optgroup-${a}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery(""),this.hasFocus&&this.value.length>0&&!this.open&&await this.show()}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),a=this.label?!0:!!e,n=this.helpText?!0:!!i,p=this.clearable&&!this.disabled&&this.value.length>0,g=this.disabled?"disabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",u=this.disabled?"cursor-not-allowed":"cursor-pointer",v=this.disabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],O={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return d`<div part="form-control" class="${r("relative text-left",u,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${a&&"inline-block mb-2"}" aria-hidden="${!a}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${r("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[g],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-4-0-0-next-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${r("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
10
10
  popup:popup__content,
11
- "><div part="combobox" class="${r("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}">${t.left?d`<slot part="left" name="left" class="${r("inline-flex",O,v,m)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?d`<div part="tags" class="${r("flex items-center gap-1",O)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${r("appearance-none outline-none bg-transparent flex-auto min-w-0",u,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${r("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",u)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${p?d`<button part="clear-button" class="${r("flex justify-center",y)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-next-0-icon class="${r("text-icon-fill-neutral-800",m)}" name="closing-round" library="system"></sd-4-0-0-next-0-icon></slot></button>`:""} ${this.showInvalidStyle?d`<sd-4-0-0-next-0-icon part="invalid-icon" class="${r(y,m,"text-error")}" library="system" name="risk"></sd-4-0-0-next-0-icon>`:""} ${this.styleOnValid&&this.showValidStyle?d`<sd-4-0-0-next-0-icon part="valid-icon" class="${r("flex-shrink-0 text-success",y,m)}" library="system" name="status-check"></sd-4-0-0-next-0-icon>`:""}<slot name="right" part="right" class="${r("inline-flex ml-2 leading-[0]",this.disabled?"text-neutral-500":"text-primary",m)}"><sd-4-0-0-next-0-icon class="${r("transition-all",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-0-0-next-0-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${r("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox" class="overflow-y-scroll">${this.filteredOptions.length===0?d`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-4-0-0-next-0-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-4-0-0-next-0-icon":F,"sd-4-0-0-next-0-popup":B,"sd-4-0-0-next-0-tag":U},s.styles=[...I.styles,V`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-0-0-next-0-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-0-0-next-0-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-4-0-0-next-0-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-4-0-0-next-0-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-0-0-next-0-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-4-0-0-next-0-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],l([c("sd-4-0-0-next-0-popup")],s.prototype,"popup",2),l([c('[part="combobox"]')],s.prototype,"combobox",2),l([c('[part="display-input"]')],s.prototype,"displayInput",2),l([c(".value-input")],s.prototype,"valueInput",2),l([c('[part="listbox"]')],s.prototype,"listbox",2),l([c('[part="tags"]')],s.prototype,"tagWrapper",2),l([c('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),l([c("slot:not([name])")],s.prototype,"defaultSlot",2),l([c("#invalid-message")],s.prototype,"invalidMessage",2),l([h()],s.prototype,"hasHover",2),l([h()],s.prototype,"hasFocus",2),l([h()],s.prototype,"displayInputValue",2),l([h()],s.prototype,"selectedTextLabel",2),l([h()],s.prototype,"selectedOptions",2),l([h()],s.prototype,"filteredOptions",2),l([h()],s.prototype,"allOptions",2),l([h()],s.prototype,"lastOption",2),l([h()],s.prototype,"showValidStyle",2),l([h()],s.prototype,"showInvalidStyle",2),l([o()],s.prototype,"name",2),l([o({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),l([A()],s.prototype,"defaultValue",2),l([o({reflect:!0})],s.prototype,"size",2),l([o()],s.prototype,"placeholder",2),l([o({reflect:!0,type:Boolean})],s.prototype,"disabled",2),l([o({type:Boolean})],s.prototype,"clearable",2),l([o({reflect:!0,type:Boolean})],s.prototype,"open",2),l([o({type:Boolean})],s.prototype,"hoist",2),l([o()],s.prototype,"label",2),l([o({reflect:!0})],s.prototype,"placement",2),l([o({attribute:"help-text"})],s.prototype,"helpText",2),l([o({reflect:!0})],s.prototype,"form",2),l([o({reflect:!0,type:Boolean})],s.prototype,"required",2),l([h()],s.prototype,"currentPlacement",2),l([o()],s.prototype,"getOption",2),l([o({type:Boolean,reflect:!0})],s.prototype,"multiple",2),l([o({type:Boolean,reflect:!0})],s.prototype,"useTags",2),l([o({attribute:"max-options-visible",type:Number})],s.prototype,"maxOptionsVisible",2),l([o({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),l([o()],s.prototype,"filter",2),l([o()],s.prototype,"getTag",2),l([f("filter",{waitUntilFirstUpdate:!0})],s.prototype,"handleFilterChange",1),l([f("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),l([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),l([f("disabled",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),l([f("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),l([f("displayInputValue",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisplayInputValueChange",1),l([f("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),s=l([k("sd-4-0-0-next-0-combobox")],s);E("combobox.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});E("combobox.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
11
+ "><div part="combobox" class="${r("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}">${t.left?d`<slot part="left" name="left" class="${r("inline-flex",O,v,m)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?d`<div part="tags" class="${r("flex items-center gap-1",O)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${r("appearance-none outline-none bg-transparent flex-auto min-w-0",u,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${r("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",u)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${p?d`<button part="clear-button" class="${r("flex justify-center",y)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-next-1-icon class="${r("text-icon-fill-neutral-800",m)}" name="closing-round" library="system"></sd-4-0-0-next-1-icon></slot></button>`:""} ${this.showInvalidStyle?d`<sd-4-0-0-next-1-icon part="invalid-icon" class="${r(y,m,"text-error")}" library="system" name="risk"></sd-4-0-0-next-1-icon>`:""} ${this.styleOnValid&&this.showValidStyle?d`<sd-4-0-0-next-1-icon part="valid-icon" class="${r("flex-shrink-0 text-success",y,m)}" library="system" name="status-check"></sd-4-0-0-next-1-icon>`:""}<slot name="right" part="right" class="${r("inline-flex ml-2 leading-[0]",this.disabled?"text-neutral-500":"text-primary",m)}"><sd-4-0-0-next-1-icon class="${r("transition-all",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-0-0-next-1-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${r("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox" class="overflow-y-scroll">${this.filteredOptions.length===0?d`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-4-0-0-next-1-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-4-0-0-next-1-icon":F,"sd-4-0-0-next-1-popup":B,"sd-4-0-0-next-1-tag":U},s.styles=[...I.styles,V`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-0-0-next-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-0-0-next-1-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-4-0-0-next-1-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-4-0-0-next-1-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-0-0-next-1-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-4-0-0-next-1-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],l([c("sd-4-0-0-next-1-popup")],s.prototype,"popup",2),l([c('[part="combobox"]')],s.prototype,"combobox",2),l([c('[part="display-input"]')],s.prototype,"displayInput",2),l([c(".value-input")],s.prototype,"valueInput",2),l([c('[part="listbox"]')],s.prototype,"listbox",2),l([c('[part="tags"]')],s.prototype,"tagWrapper",2),l([c('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),l([c("slot:not([name])")],s.prototype,"defaultSlot",2),l([c("#invalid-message")],s.prototype,"invalidMessage",2),l([h()],s.prototype,"hasHover",2),l([h()],s.prototype,"hasFocus",2),l([h()],s.prototype,"displayInputValue",2),l([h()],s.prototype,"selectedTextLabel",2),l([h()],s.prototype,"selectedOptions",2),l([h()],s.prototype,"filteredOptions",2),l([h()],s.prototype,"allOptions",2),l([h()],s.prototype,"lastOption",2),l([h()],s.prototype,"showValidStyle",2),l([h()],s.prototype,"showInvalidStyle",2),l([o()],s.prototype,"name",2),l([o({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),l([A()],s.prototype,"defaultValue",2),l([o({reflect:!0})],s.prototype,"size",2),l([o()],s.prototype,"placeholder",2),l([o({reflect:!0,type:Boolean})],s.prototype,"disabled",2),l([o({type:Boolean})],s.prototype,"clearable",2),l([o({reflect:!0,type:Boolean})],s.prototype,"open",2),l([o({type:Boolean})],s.prototype,"hoist",2),l([o()],s.prototype,"label",2),l([o({reflect:!0})],s.prototype,"placement",2),l([o({attribute:"help-text"})],s.prototype,"helpText",2),l([o({reflect:!0})],s.prototype,"form",2),l([o({reflect:!0,type:Boolean})],s.prototype,"required",2),l([h()],s.prototype,"currentPlacement",2),l([o()],s.prototype,"getOption",2),l([o({type:Boolean,reflect:!0})],s.prototype,"multiple",2),l([o({type:Boolean,reflect:!0})],s.prototype,"useTags",2),l([o({attribute:"max-options-visible",type:Number})],s.prototype,"maxOptionsVisible",2),l([o({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),l([o()],s.prototype,"filter",2),l([o()],s.prototype,"getTag",2),l([f("filter",{waitUntilFirstUpdate:!0})],s.prototype,"handleFilterChange",1),l([f("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),l([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),l([f("disabled",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),l([f("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),l([f("displayInputValue",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisplayInputValueChange",1),l([f("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),s=l([k("sd-4-0-0-next-1-combobox")],s);E("combobox.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});E("combobox.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
@@ -1 +1 @@
1
- import{a as m}from"./chunk.26YUWEYR.js";import{a as d}from"./chunk.DCOFYPWX.js";import{a as g,b as n,c as u,h as f}from"./chunk.APMDRZQD.js";import{b as v,e as l}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var e=class extends f{constructor(){super(...arguments);this.localize=new m(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1;this.isKeyboardNavigation=!1;this.scrollContainer=null}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollIndicatorVisibility()}),this.updateComplete.then(()=>{this.scrollContainer=this.renderRoot.querySelector(".scroll-container"),this.scrollContainer&&this.resizeObserver.observe(this.scrollContainer)})}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer&&this.resizeObserver.unobserve(this.scrollContainer)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.updateScrollIndicatorVisibility())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get container(){return this.renderRoot.querySelector(".scroll-container")}updateScrollIndicatorVisibility(){let t=this.container;if(!t)return;let r=this.isScrollHorizontalEnabled&&t.scrollLeft>0,o=this.isScrollHorizontalEnabled&&t.scrollLeft+t.clientWidth<t.scrollWidth-1,h=this.isScrollVerticalEnabled&&t.scrollTop>0,a=this.isScrollVerticalEnabled&&t.scrollTop+t.clientHeight<t.scrollHeight-1,c=this.renderRoot.querySelector('[part="button-start"]'),i=this.renderRoot.querySelector('[part="button-end"]');this.canScroll={left:this.isKeyboardNavigation?this.isScrollHorizontalEnabled:r,right:this.isKeyboardNavigation?this.isScrollHorizontalEnabled:o,up:this.isKeyboardNavigation?this.isScrollVerticalEnabled:h,down:this.isKeyboardNavigation?this.isScrollVerticalEnabled:a};let b=r||h,p=o||a;b&&this.dispatchEvent(new CustomEvent("start")),p&&this.dispatchEvent(new CustomEvent("end")),this.isKeyboardNavigation&&(c&&(c.hidden=!b),c&&b&&!(a||o)&&c.focus(),i&&(i.hidden=!p),i&&p&&!(h||r)&&i.focus())}handleScroll(t,r){var i;let o=t==="left"||t==="up"?-this.step:this.step,h=t==="left"||t==="right"?"left":"top";this.isKeyboardNavigation=(r==null?void 0:r.pointerType)!=="mouse";let a={behavior:"smooth"};a[h]=o,(i=this.scrollContainer)==null||i.scrollBy(a);let c=`button-${t}`;this.dispatchEvent(new CustomEvent(c,{bubbles:!0,composed:!0}))}render(){let t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",r="scroll-shadow absolute z-10 pointer-events-none";return l`<div part="base" class="${d("scroll-container flex overflow-hidden flex-1",this.orientation==="horizontal"&&"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden",this.orientation==="vertical"&&"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden",this.orientation==="auto"&&"scroll-auto overflow-auto",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset?"p-4":"")}" @scroll="${this.updateScrollIndicatorVisibility}" tabindex="0"><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?l`${this.isScrollHorizontalEnabled?l`${this.canScroll.left?l`<div part="button-left" class="absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8"><button part="button-start" class="${d(t)}" @click="${o=>this.handleScroll("left",o)}"><slot name="icon-start"><sd-4-0-0-next-0-icon library="system" name="chevron-up" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-4-0-0-next-0-icon></slot></button></div>`:null} ${this.canScroll.right?l`<div part="button-right" class="absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8"><button part="button-end" class="${d(t)}" @click="${o=>this.handleScroll("right",o)}"><slot name="icon-end"><sd-4-0-0-next-0-icon library="system" name="chevron-down" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-4-0-0-next-0-icon></slot></button></div>`:null}`:null} ${this.isScrollVerticalEnabled?l`${this.canScroll.up?l`<div part="button-top" class="absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8"><button part="button-start" class="${d(t)}" @click="${o=>this.handleScroll("up",o)}"><slot name="icon-start"><sd-4-0-0-next-0-icon library="system" name="chevron-up" label="${this.localize.term("scrollToStart")}"></sd-4-0-0-next-0-icon></slot></button></div>`:null} ${this.canScroll.down?l`<div part="button-bottom" class="absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8"><button part="button-end" class="${d(t)}" @click="${o=>this.handleScroll("down",o)}"><slot name="icon-end"><sd-4-0-0-next-0-icon library="system" name="chevron-down" label="${this.localize.term("scrollToEnd")}"></sd-4-0-0-next-0-icon></slot></button></div>`:null}`:null}`:null} ${this.shadows?l`${this.isScrollHorizontalEnabled?l`${this.canScroll.left?l`<div part="shadow-left" class="${r} left top-0 left-0 w-[6px] h-full"></div>`:null} ${this.canScroll.right?l`<div part="shadow-right" class="${r} right top-0 right-0 w-[6px] h-full"></div>`:null}`:null} ${this.isScrollVerticalEnabled?l`${this.canScroll.up?l`<div part="shadow-top" class="${r} top top-0 left-0 w-full h-[6px]"></div>`:null} ${this.canScroll.down?l`<div part="shadow-bottom" class="${r} bottom bottom-0 left-0 w-full h-[6px]"></div>`:null}`:null}`:null}`}};e.styles=[...f.styles,v`:host{--gradient-color:hsla(0,0%,100%,0);--gradient:var(--gradient-color) 0%,#fff 80%,#fff 100%;display:flex;overflow:hidden;position:relative}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-border-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-right]{background:linear-gradient(90deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-top]{background:linear-gradient(0deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-bottom]{background:linear-gradient(180deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}.sd-4-0-0-next-0-icon--top{align-self:flex-start}.sd-4-0-0-next-0-icon--down{align-self:flex-end}`],s([n({type:String,reflect:!0})],e.prototype,"orientation",2),s([n({type:Boolean,reflect:!0})],e.prototype,"scrollbars",2),s([n({type:Boolean,reflect:!0})],e.prototype,"buttons",2),s([n({type:Boolean,reflect:!0})],e.prototype,"shadows",2),s([n({type:Boolean,reflect:!0})],e.prototype,"inset",2),s([n({type:Number,reflect:!0})],e.prototype,"step",2),s([u()],e.prototype,"canScroll",2),s([u()],e.prototype,"isScrollHorizontalEnabled",2),s([u()],e.prototype,"isScrollVerticalEnabled",2),s([u()],e.prototype,"isKeyboardNavigation",2),e=s([g("sd-4-0-0-next-0-scrollable")],e);export{e as a};
1
+ import{a as m}from"./chunk.26YUWEYR.js";import{a as d}from"./chunk.DCOFYPWX.js";import{a as g,b as n,c as u,h as f}from"./chunk.APMDRZQD.js";import{b as v,e as l}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var e=class extends f{constructor(){super(...arguments);this.localize=new m(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1;this.isKeyboardNavigation=!1;this.scrollContainer=null}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollIndicatorVisibility()}),this.updateComplete.then(()=>{this.scrollContainer=this.renderRoot.querySelector(".scroll-container"),this.scrollContainer&&this.resizeObserver.observe(this.scrollContainer)})}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer&&this.resizeObserver.unobserve(this.scrollContainer)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.updateScrollIndicatorVisibility())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get container(){return this.renderRoot.querySelector(".scroll-container")}updateScrollIndicatorVisibility(){let t=this.container;if(!t)return;let r=this.isScrollHorizontalEnabled&&t.scrollLeft>0,o=this.isScrollHorizontalEnabled&&t.scrollLeft+t.clientWidth<t.scrollWidth-1,h=this.isScrollVerticalEnabled&&t.scrollTop>0,a=this.isScrollVerticalEnabled&&t.scrollTop+t.clientHeight<t.scrollHeight-1,c=this.renderRoot.querySelector('[part="button-start"]'),i=this.renderRoot.querySelector('[part="button-end"]');this.canScroll={left:this.isKeyboardNavigation?this.isScrollHorizontalEnabled:r,right:this.isKeyboardNavigation?this.isScrollHorizontalEnabled:o,up:this.isKeyboardNavigation?this.isScrollVerticalEnabled:h,down:this.isKeyboardNavigation?this.isScrollVerticalEnabled:a};let b=r||h,p=o||a;b&&this.dispatchEvent(new CustomEvent("start")),p&&this.dispatchEvent(new CustomEvent("end")),this.isKeyboardNavigation&&(c&&(c.hidden=!b),c&&b&&!(a||o)&&c.focus(),i&&(i.hidden=!p),i&&p&&!(h||r)&&i.focus())}handleScroll(t,r){var i;let o=t==="left"||t==="up"?-this.step:this.step,h=t==="left"||t==="right"?"left":"top";this.isKeyboardNavigation=(r==null?void 0:r.pointerType)!=="mouse";let a={behavior:"smooth"};a[h]=o,(i=this.scrollContainer)==null||i.scrollBy(a);let c=`button-${t}`;this.dispatchEvent(new CustomEvent(c,{bubbles:!0,composed:!0}))}render(){let t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",r="scroll-shadow absolute z-10 pointer-events-none";return l`<div part="base" class="${d("scroll-container flex overflow-hidden flex-1",this.orientation==="horizontal"&&"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden",this.orientation==="vertical"&&"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden",this.orientation==="auto"&&"scroll-auto overflow-auto",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset?"p-4":"")}" @scroll="${this.updateScrollIndicatorVisibility}" tabindex="0"><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?l`${this.isScrollHorizontalEnabled?l`${this.canScroll.left?l`<div part="button-left" class="absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8"><button part="button-start" class="${d(t)}" @click="${o=>this.handleScroll("left",o)}"><slot name="icon-start"><sd-4-0-0-next-1-icon library="system" name="chevron-up" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-4-0-0-next-1-icon></slot></button></div>`:null} ${this.canScroll.right?l`<div part="button-right" class="absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8"><button part="button-end" class="${d(t)}" @click="${o=>this.handleScroll("right",o)}"><slot name="icon-end"><sd-4-0-0-next-1-icon library="system" name="chevron-down" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-4-0-0-next-1-icon></slot></button></div>`:null}`:null} ${this.isScrollVerticalEnabled?l`${this.canScroll.up?l`<div part="button-top" class="absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8"><button part="button-start" class="${d(t)}" @click="${o=>this.handleScroll("up",o)}"><slot name="icon-start"><sd-4-0-0-next-1-icon library="system" name="chevron-up" label="${this.localize.term("scrollToStart")}"></sd-4-0-0-next-1-icon></slot></button></div>`:null} ${this.canScroll.down?l`<div part="button-bottom" class="absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8"><button part="button-end" class="${d(t)}" @click="${o=>this.handleScroll("down",o)}"><slot name="icon-end"><sd-4-0-0-next-1-icon library="system" name="chevron-down" label="${this.localize.term("scrollToEnd")}"></sd-4-0-0-next-1-icon></slot></button></div>`:null}`:null}`:null} ${this.shadows?l`${this.isScrollHorizontalEnabled?l`${this.canScroll.left?l`<div part="shadow-left" class="${r} left top-0 left-0 w-[6px] h-full"></div>`:null} ${this.canScroll.right?l`<div part="shadow-right" class="${r} right top-0 right-0 w-[6px] h-full"></div>`:null}`:null} ${this.isScrollVerticalEnabled?l`${this.canScroll.up?l`<div part="shadow-top" class="${r} top top-0 left-0 w-full h-[6px]"></div>`:null} ${this.canScroll.down?l`<div part="shadow-bottom" class="${r} bottom bottom-0 left-0 w-full h-[6px]"></div>`:null}`:null}`:null}`}};e.styles=[...f.styles,v`:host{--gradient-color:hsla(0,0%,100%,0);--gradient:var(--gradient-color) 0%,#fff 80%,#fff 100%;display:flex;overflow:hidden;position:relative}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-border-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-right]{background:linear-gradient(90deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-top]{background:linear-gradient(0deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-bottom]{background:linear-gradient(180deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}.sd-4-0-0-next-1-icon--top{align-self:flex-start}.sd-4-0-0-next-1-icon--down{align-self:flex-end}`],s([n({type:String,reflect:!0})],e.prototype,"orientation",2),s([n({type:Boolean,reflect:!0})],e.prototype,"scrollbars",2),s([n({type:Boolean,reflect:!0})],e.prototype,"buttons",2),s([n({type:Boolean,reflect:!0})],e.prototype,"shadows",2),s([n({type:Boolean,reflect:!0})],e.prototype,"inset",2),s([n({type:Number,reflect:!0})],e.prototype,"step",2),s([u()],e.prototype,"canScroll",2),s([u()],e.prototype,"isScrollHorizontalEnabled",2),s([u()],e.prototype,"isScrollVerticalEnabled",2),s([u()],e.prototype,"isKeyboardNavigation",2),e=s([g("sd-4-0-0-next-1-scrollable")],e);export{e as a};
@@ -1 +1 @@
1
- import{e as p}from"./chunk.IRWHG2Q4.js";import{a as l,b as m}from"./chunk.TJOCV4DC.js";var a=new WeakMap,n=new WeakMap,c=new WeakMap,d=new WeakMap,v=class{constructor(t,e){this.handleFormData=t=>{let e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),s=this.host.tagName.toLowerCase()==="sd-4-0-0-next-0-button";!e&&!s&&typeof o=="string"&&o.length>0&&typeof i!="undefined"&&(Array.isArray(i)?i.forEach(r=>{t.formData.append(o,r.toString())}):t.formData.append(o,i.toString()))};this.handleFormSubmit=t=>{var i,s;let e=this.options.disabled(this.host),o=this.options.reportValidity;if(this.form&&!this.form.noValidate&&((i=a.get(this.form))==null||i.forEach(r=>{this.setUserInteracted(r,!0)})),this.form&&!this.form.noValidate&&!e&&!o(this.host)){t.preventDefault(),t.stopImmediatePropagation();let r=(s=this.form)==null?void 0:s.querySelectorAll("[data-invalid]");Array.from(r).filter(h=>h.tagName.toLowerCase()==="sd-4-0-0-next-0-radio-group").forEach(h=>{var f,u;(u=(f=h.shadowRoot)==null?void 0:f.querySelector("input"))==null||u.dispatchEvent(new Event("invalid"))}),r!=null&&r.length&&r[0].focus()}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),d.set(this.host,[])};this.handleInteraction=t=>{let e=d.get(this.host);e.includes(t.type)||e.push(t.type),e.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)};this.fakeUserInteraction=()=>{this.setUserInteracted(this.host,!0)};(this.host=t).addController(this),this.options=l({form:o=>{if(o.hasAttribute("form")&&o.getAttribute("form")!==""){let i=o.getRootNode(),s=o.getAttribute("form");if(s)return i.getElementById(s)}return o.closest("form")},name:o=>o.name,value:o=>o.value,defaultValue:o=>o.defaultValue,disabled:o=>{var i;return(i=o.disabled)!=null?i:!1},reportValidity:o=>typeof o.reportValidity=="function"?o.reportValidity():!0,setValue:(o,i)=>o.value=i,assumeInteractionOn:["sd-4-0-0-next-0-input"]},e)}hostConnected(){let t=this.options.form(this.host);t&&this.attachForm(t),d.set(this.host,[]),this.options.assumeInteractionOn.forEach(e=>{this.host.addEventListener(e,this.handleInteraction)})}hostDisconnected(){this.detachForm(),d.delete(this.host),this.options.assumeInteractionOn.forEach(t=>{this.host.removeEventListener(t,this.handleInteraction)})}hostUpdated(){var e;let t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&(this.setValidity((e=this.host)==null?void 0:e.validity.valid),this.updateValidityStyle())}attachForm(t){t?(this.form=t,a.has(this.form)?a.get(this.form).add(this.host):a.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),n.has(this.form)||(n.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var t;this.form&&((t=a.get(this.form))==null||t.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),n.has(this.form)&&(this.form.reportValidity=n.get(this.form),n.delete(this.form))),this.form=void 0}reportFormValidity(){if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let e of t)if(typeof e.reportValidity=="function"&&!e.reportValidity())return!1}return!0}setUserInteracted(t,e){c.set(t,e),t.requestUpdate()}doAction(t,e){if(this.form){let o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(i=>{e.hasAttribute(i)&&o.setAttribute(i,e.getAttribute(i))})),this.form.append(o),o.click(),o.remove()}}updateValidityStyle(){this.host.hasAttribute("data-user-valid")&&this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!0),this.host.showInvalidStyle=!1):this.host.hasAttribute("data-user-invalid")&&!this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!0):(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!1)}getForm(){var t;return(t=this.form)!=null?t:null}renderInvalidMessage(){return p`<div id="invalid-message" class="text-error text-sm mt-2 text-left" part="invalid-message" aria-live="polite" ?hidden="${!this.host.showInvalidStyle}"></div>`}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){var s;let e=this.host,o=!!c.get(e),i=!!e.required;(s=this.form)!=null&&s.noValidate?(e.removeAttribute("data-required"),e.removeAttribute("data-optional"),e.removeAttribute("data-invalid"),e.removeAttribute("data-valid"),e.removeAttribute("data-user-invalid"),e.removeAttribute("data-user-valid"),e.removeAttribute("aria-invalid")):(e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o),e.setAttribute("aria-invalid",(!t).toString()))}updateValidity(){let t=this.host;this.setValidity(t==null?void 0:t.validity.valid)}emitInvalidEvent(t){t==null||t.preventDefault();let e=new CustomEvent("sd-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault()}},y=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),F=Object.freeze(m(l({},y),{valid:!1,valueMissing:!0})),V=Object.freeze(m(l({},y),{valid:!1,customError:!0}));export{a,v as b,y as c,F as d,V as e};
1
+ import{e as p}from"./chunk.IRWHG2Q4.js";import{a as l,b as m}from"./chunk.TJOCV4DC.js";var a=new WeakMap,n=new WeakMap,c=new WeakMap,d=new WeakMap,v=class{constructor(t,e){this.handleFormData=t=>{let e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),s=this.host.tagName.toLowerCase()==="sd-4-0-0-next-1-button";!e&&!s&&typeof o=="string"&&o.length>0&&typeof i!="undefined"&&(Array.isArray(i)?i.forEach(r=>{t.formData.append(o,r.toString())}):t.formData.append(o,i.toString()))};this.handleFormSubmit=t=>{var i,s;let e=this.options.disabled(this.host),o=this.options.reportValidity;if(this.form&&!this.form.noValidate&&((i=a.get(this.form))==null||i.forEach(r=>{this.setUserInteracted(r,!0)})),this.form&&!this.form.noValidate&&!e&&!o(this.host)){t.preventDefault(),t.stopImmediatePropagation();let r=(s=this.form)==null?void 0:s.querySelectorAll("[data-invalid]");Array.from(r).filter(h=>h.tagName.toLowerCase()==="sd-4-0-0-next-1-radio-group").forEach(h=>{var f,u;(u=(f=h.shadowRoot)==null?void 0:f.querySelector("input"))==null||u.dispatchEvent(new Event("invalid"))}),r!=null&&r.length&&r[0].focus()}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),d.set(this.host,[])};this.handleInteraction=t=>{let e=d.get(this.host);e.includes(t.type)||e.push(t.type),e.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)};this.fakeUserInteraction=()=>{this.setUserInteracted(this.host,!0)};(this.host=t).addController(this),this.options=l({form:o=>{if(o.hasAttribute("form")&&o.getAttribute("form")!==""){let i=o.getRootNode(),s=o.getAttribute("form");if(s)return i.getElementById(s)}return o.closest("form")},name:o=>o.name,value:o=>o.value,defaultValue:o=>o.defaultValue,disabled:o=>{var i;return(i=o.disabled)!=null?i:!1},reportValidity:o=>typeof o.reportValidity=="function"?o.reportValidity():!0,setValue:(o,i)=>o.value=i,assumeInteractionOn:["sd-4-0-0-next-1-input"]},e)}hostConnected(){let t=this.options.form(this.host);t&&this.attachForm(t),d.set(this.host,[]),this.options.assumeInteractionOn.forEach(e=>{this.host.addEventListener(e,this.handleInteraction)})}hostDisconnected(){this.detachForm(),d.delete(this.host),this.options.assumeInteractionOn.forEach(t=>{this.host.removeEventListener(t,this.handleInteraction)})}hostUpdated(){var e;let t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&(this.setValidity((e=this.host)==null?void 0:e.validity.valid),this.updateValidityStyle())}attachForm(t){t?(this.form=t,a.has(this.form)?a.get(this.form).add(this.host):a.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),n.has(this.form)||(n.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var t;this.form&&((t=a.get(this.form))==null||t.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),n.has(this.form)&&(this.form.reportValidity=n.get(this.form),n.delete(this.form))),this.form=void 0}reportFormValidity(){if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let e of t)if(typeof e.reportValidity=="function"&&!e.reportValidity())return!1}return!0}setUserInteracted(t,e){c.set(t,e),t.requestUpdate()}doAction(t,e){if(this.form){let o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(i=>{e.hasAttribute(i)&&o.setAttribute(i,e.getAttribute(i))})),this.form.append(o),o.click(),o.remove()}}updateValidityStyle(){this.host.hasAttribute("data-user-valid")&&this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!0),this.host.showInvalidStyle=!1):this.host.hasAttribute("data-user-invalid")&&!this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!0):(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!1)}getForm(){var t;return(t=this.form)!=null?t:null}renderInvalidMessage(){return p`<div id="invalid-message" class="text-error text-sm mt-2 text-left" part="invalid-message" aria-live="polite" ?hidden="${!this.host.showInvalidStyle}"></div>`}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){var s;let e=this.host,o=!!c.get(e),i=!!e.required;(s=this.form)!=null&&s.noValidate?(e.removeAttribute("data-required"),e.removeAttribute("data-optional"),e.removeAttribute("data-invalid"),e.removeAttribute("data-valid"),e.removeAttribute("data-user-invalid"),e.removeAttribute("data-user-valid"),e.removeAttribute("aria-invalid")):(e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o),e.setAttribute("aria-invalid",(!t).toString()))}updateValidity(){let t=this.host;this.setValidity(t==null?void 0:t.validity.valid)}emitInvalidEvent(t){t==null||t.preventDefault();let e=new CustomEvent("sd-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault()}},y=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),F=Object.freeze(m(l({},y),{valid:!1,valueMissing:!0})),V=Object.freeze(m(l({},y),{valid:!1,customError:!0}));export{a,v as b,y as c,F as d,V as e};
@@ -1,4 +1,4 @@
1
- import{a as u,c}from"./chunk.A3DKF5BY.js";import{a as p,b as d,d as l}from"./chunk.RQYP7MH5.js";import{a as m}from"./chunk.KLRPP4NQ.js";import{a as r}from"./chunk.E2DRD2OX.js";import{a as g}from"./chunk.26YUWEYR.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as v,b as i,d as a,h}from"./chunk.APMDRZQD.js";import{b as f,e as w}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends h{constructor(){super(...arguments);this.isFocusTriggered=!1;this.localize=new g(this);this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut)}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){if(this.hasTrigger("click")){if(this.isFocusTriggered){this.isFocusTriggered=!1;return}this.open?this.hide():this.show()}}handleFocus(){this.hasTrigger("focus")&&(this.isFocusTriggered=!0,this.show())}handleKeyDown(s){this.open&&s.key==="Escape"&&(s.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let s=d(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),s)}}handleMouseOut(){if(this.hasTrigger("hover")){let s=d(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),s)}}hasTrigger(s){return this.trigger.split(" ").includes(s)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await l(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:s,options:o}=c(this,"tooltip.show",{dir:this.localize.dir()});await p(this.popup.popup,s,o),this.emit("sd-after-show")}else{this.emit("sd-hide"),await l(this.body);let{keyframes:s,options:o}=c(this,"tooltip.hide",{dir:this.localize.dir()});await p(this.popup.popup,s,o),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,m(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,m(this,"sd-after-hide")}render(){let s=this.placement.endsWith("-start"),o=this.placement.endsWith("-end");return w`<sd-4-0-0-next-0-popup part="base" exportparts="
1
+ import{a as u,c}from"./chunk.A3DKF5BY.js";import{a as p,b as d,d as l}from"./chunk.RQYP7MH5.js";import{a as m}from"./chunk.KLRPP4NQ.js";import{a as r}from"./chunk.E2DRD2OX.js";import{a as g}from"./chunk.26YUWEYR.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as v,b as i,d as a,h}from"./chunk.APMDRZQD.js";import{b as f,e as w}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends h{constructor(){super(...arguments);this.isFocusTriggered=!1;this.localize=new g(this);this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut)}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){if(this.hasTrigger("click")){if(this.isFocusTriggered){this.isFocusTriggered=!1;return}this.open?this.hide():this.show()}}handleFocus(){this.hasTrigger("focus")&&(this.isFocusTriggered=!0,this.show())}handleKeyDown(s){this.open&&s.key==="Escape"&&(s.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let s=d(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),s)}}handleMouseOut(){if(this.hasTrigger("hover")){let s=d(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),s)}}hasTrigger(s){return this.trigger.split(" ").includes(s)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await l(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:s,options:o}=c(this,"tooltip.show",{dir:this.localize.dir()});await p(this.popup.popup,s,o),this.emit("sd-after-show")}else{this.emit("sd-hide"),await l(this.body);let{keyframes:s,options:o}=c(this,"tooltip.hide",{dir:this.localize.dir()});await p(this.popup.popup,s,o),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,m(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,m(this,"sd-after-hide")}render(){let s=this.placement.endsWith("-start"),o=this.placement.endsWith("-end");return w`<sd-4-0-0-next-1-popup part="base" exportparts="
2
2
  popup:base__popup,
3
3
  arrow:base__arrow
4
- " class="${n(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[s?"start":o?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0"><slot slot="anchor" aria-describedby="tooltip" class="${n(this.size==="lg"?"text-xl":"text-base")}"><button class="flex sd-interactive rounded-full"><sd-4-0-0-next-0-icon library="system" name="info-circle" class="${n(this.disabled&&"sd-interactive--disabled")}"></sd-4-0-0-next-0-icon></button></slot><slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="Tooltip" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-4-0-0-next-0-popup>`}};e.styles=[...h.styles,f`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-4-0-0-next-0-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-4-0-0-next-0-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-4-0-0-next-0-popup::part(arrow){--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-4-0-0-next-0-popup[placement^=top]::part(popup){transform-origin:bottom}sd-4-0-0-next-0-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],t([a("slot:not([name])")],e.prototype,"defaultSlot",2),t([a("#tooltip")],e.prototype,"body",2),t([a("sd-4-0-0-next-0-popup")],e.prototype,"popup",2),t([i()],e.prototype,"size",2),t([i()],e.prototype,"content",2),t([i({reflect:!0})],e.prototype,"placement",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"open",2),t([i()],e.prototype,"trigger",2),t([i({type:Boolean})],e.prototype,"hoist",2),t([r("open",{waitUntilFirstUpdate:!0})],e.prototype,"handleOpenChange",1),t([r(["content","hoist","placement"])],e.prototype,"handleOptionsChange",1),t([r("disabled")],e.prototype,"handleDisabledChange",1),e=t([v("sd-4-0-0-next-0-tooltip")],e);u("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}});u("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});export{e as a};
4
+ " class="${n(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[s?"start":o?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0"><slot slot="anchor" aria-describedby="tooltip" class="${n(this.size==="lg"?"text-xl":"text-base")}"><button class="flex sd-interactive rounded-full"><sd-4-0-0-next-1-icon library="system" name="info-circle" class="${n(this.disabled&&"sd-interactive--disabled")}"></sd-4-0-0-next-1-icon></button></slot><slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="Tooltip" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-4-0-0-next-1-popup>`}};e.styles=[...h.styles,f`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-4-0-0-next-1-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-4-0-0-next-1-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-4-0-0-next-1-popup::part(arrow){--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-4-0-0-next-1-popup[placement^=top]::part(popup){transform-origin:bottom}sd-4-0-0-next-1-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],t([a("slot:not([name])")],e.prototype,"defaultSlot",2),t([a("#tooltip")],e.prototype,"body",2),t([a("sd-4-0-0-next-1-popup")],e.prototype,"popup",2),t([i()],e.prototype,"size",2),t([i()],e.prototype,"content",2),t([i({reflect:!0})],e.prototype,"placement",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"open",2),t([i()],e.prototype,"trigger",2),t([i({type:Boolean})],e.prototype,"hoist",2),t([r("open",{waitUntilFirstUpdate:!0})],e.prototype,"handleOpenChange",1),t([r(["content","hoist","placement"])],e.prototype,"handleOptionsChange",1),t([r("disabled")],e.prototype,"handleDisabledChange",1),e=t([v("sd-4-0-0-next-1-tooltip")],e);u("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}});u("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});export{e as a};
@@ -1 +1 @@
1
- import{a as i}from"./chunk.DCOFYPWX.js";import{a as l,b as r,h as s}from"./chunk.APMDRZQD.js";import{b as n,e as o}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends s{constructor(){super(...arguments);this.size="lg";this.variant="default";this.inverted=!1}render(){return o`<span role="status" part="base" aria-labelledby="content" class="${i("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{default:this.inverted?"text-primary bg-primary-100 border-primary":"text-white bg-primary-500 border-white",success:this.inverted?"text-white bg-success border-primary":"text-white bg-success border-white",error:this.inverted?"text-white bg-error border-primary":"text-white bg-error border-white"}[this.variant],{sm:"h-2 min-w-2",md:"h-4 px-1 min-w-4",lg:"h-5 min-w-5"}[this.size])}"><span id="content" part="content" class="${i(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};e.styles=[...s.styles,n`:host{align-items:center;display:inline-flex;justify-content:center}:host([size=md]){font-size:.625rem}:host([size=lg]){font-size:.75rem}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({reflect:!0})],e.prototype,"size",2),t([r({reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([l("sd-4-0-0-next-0-badge")],e);export{e as a};
1
+ import{a as i}from"./chunk.DCOFYPWX.js";import{a as l,b as r,h as s}from"./chunk.APMDRZQD.js";import{b as n,e as o}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends s{constructor(){super(...arguments);this.size="lg";this.variant="default";this.inverted=!1}render(){return o`<span role="status" part="base" aria-labelledby="content" class="${i("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{default:this.inverted?"text-primary bg-primary-100 border-primary":"text-white bg-primary-500 border-white",success:this.inverted?"text-white bg-success border-primary":"text-white bg-success border-white",error:this.inverted?"text-white bg-error border-primary":"text-white bg-error border-white"}[this.variant],{sm:"h-2 min-w-2",md:"h-4 px-1 min-w-4",lg:"h-5 min-w-5"}[this.size])}"><span id="content" part="content" class="${i(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};e.styles=[...s.styles,n`:host{align-items:center;display:inline-flex;justify-content:center}:host([size=md]){font-size:.625rem}:host([size=lg]){font-size:.75rem}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({reflect:!0})],e.prototype,"size",2),t([r({reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([l("sd-4-0-0-next-1-badge")],e);export{e as a};
@@ -1 +1 @@
1
- import{a as r,h as e}from"./chunk.APMDRZQD.js";import{b as l,e as o}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends e{static isCarouselItem(s){return s instanceof Element&&s.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return o`<slot></slot>`}};t.styles=[...e.styles,l`:host{align-items:center;aspect-ratio:var(--aspect-ratio);display:flex;flex-direction:column;height:100%;justify-content:center;scroll-snap-align:start;scroll-snap-stop:always;width:100%}::slotted(img){height:100%;-o-object-fit:cover;object-fit:cover;width:100%}`],t=i([r("sd-4-0-0-next-0-carousel-item")],t);export{t as a};
1
+ import{a as r,h as e}from"./chunk.APMDRZQD.js";import{b as l,e as o}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends e{static isCarouselItem(s){return s instanceof Element&&s.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return o`<slot></slot>`}};t.styles=[...e.styles,l`:host{align-items:center;aspect-ratio:var(--aspect-ratio);display:flex;flex-direction:column;height:100%;justify-content:center;scroll-snap-align:start;scroll-snap-stop:always;width:100%}::slotted(img){height:100%;-o-object-fit:cover;object-fit:cover;width:100%}`],t=i([r("sd-4-0-0-next-1-carousel-item")],t);export{t as a};