@solid-design-system/components 7.0.0-next.6 → 7.0.0-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/cdn/chunks/chunk.NB6QF25Q.js +2 -0
  2. package/cdn/components/header/header.d.ts +1 -0
  3. package/cdn/components/header/header.js +1 -1
  4. package/cdn/custom-elements.json +24 -4
  5. package/cdn/solid-components.bundle.js +33 -33
  6. package/cdn/solid-components.iife.js +31 -31
  7. package/cdn/solid-components.js +1 -1
  8. package/cdn/vscode.html-custom-data.json +7 -2
  9. package/cdn/web-types.json +14 -4
  10. package/cdn-versioned/chunks/chunk.2G3IPD56.js +2 -2
  11. package/cdn-versioned/chunks/chunk.3NQGT32X.js +2 -2
  12. package/cdn-versioned/chunks/chunk.3TH3ZR3I.js +2 -2
  13. package/cdn-versioned/chunks/chunk.43BVYRG3.js +2 -2
  14. package/cdn-versioned/chunks/chunk.4D6X7ON2.js +2 -2
  15. package/cdn-versioned/chunks/chunk.4RJE4TI4.js +2 -2
  16. package/cdn-versioned/chunks/chunk.4SDWX3GC.js +1 -1
  17. package/cdn-versioned/chunks/chunk.4UZPAOHT.js +2 -2
  18. package/cdn-versioned/chunks/chunk.4V7ZA4G4.js +2 -2
  19. package/cdn-versioned/chunks/chunk.4VWHE6IJ.js +2 -2
  20. package/cdn-versioned/chunks/chunk.5GCVGJ23.js +2 -2
  21. package/cdn-versioned/chunks/chunk.626XPPWD.js +2 -2
  22. package/cdn-versioned/chunks/chunk.64ZBR7T2.js +2 -2
  23. package/cdn-versioned/chunks/chunk.7HGJUXD2.js +2 -2
  24. package/cdn-versioned/chunks/chunk.7X2WZGVP.js +3 -3
  25. package/cdn-versioned/chunks/chunk.AFIMLGBS.js +3 -3
  26. package/cdn-versioned/chunks/chunk.B5TIWX7C.js +2 -2
  27. package/cdn-versioned/chunks/chunk.C45254AN.js +2 -2
  28. package/cdn-versioned/chunks/chunk.C4BSOGLY.js +1 -1
  29. package/cdn-versioned/chunks/chunk.D6JILLMB.js +3 -3
  30. package/cdn-versioned/chunks/chunk.DK2NRNHC.js +2 -2
  31. package/cdn-versioned/chunks/chunk.DSKB3SEU.js +1 -1
  32. package/cdn-versioned/chunks/chunk.EDB7WM3C.js +2 -2
  33. package/cdn-versioned/chunks/chunk.EW3C6EAI.js +1 -1
  34. package/cdn-versioned/chunks/chunk.GTAM35BO.js +2 -2
  35. package/cdn-versioned/chunks/chunk.H6DSYZZ5.js +2 -2
  36. package/cdn-versioned/chunks/chunk.HPSXEVMH.js +2 -2
  37. package/cdn-versioned/chunks/chunk.IHNJ7SE7.js +2 -2
  38. package/cdn-versioned/chunks/chunk.INUOCLNI.js +1 -1
  39. package/cdn-versioned/chunks/chunk.IPT2IS3C.js +2 -2
  40. package/cdn-versioned/chunks/chunk.IUTTUDYG.js +2 -2
  41. package/cdn-versioned/chunks/chunk.KFO7GTE5.js +2 -2
  42. package/cdn-versioned/chunks/chunk.KGIRFMVB.js +2 -2
  43. package/cdn-versioned/chunks/chunk.KIKLU2QF.js +2 -2
  44. package/cdn-versioned/chunks/chunk.LZRL7OLU.js +1 -1
  45. package/cdn-versioned/chunks/chunk.MCV2O2DW.js +2 -2
  46. package/cdn-versioned/chunks/chunk.MMSVMSOT.js +1 -1
  47. package/cdn-versioned/chunks/chunk.NB6QF25Q.js +2 -0
  48. package/cdn-versioned/chunks/chunk.NIP2E7XF.js +2 -2
  49. package/cdn-versioned/chunks/chunk.O45L6PM3.js +5 -5
  50. package/cdn-versioned/chunks/chunk.ONEC2JGA.js +2 -2
  51. package/cdn-versioned/chunks/chunk.OR425KE3.js +2 -2
  52. package/cdn-versioned/chunks/chunk.PINAEP5F.js +2 -2
  53. package/cdn-versioned/chunks/chunk.Q235YK2W.js +2 -2
  54. package/cdn-versioned/chunks/chunk.Q7MQTMXO.js +2 -2
  55. package/cdn-versioned/chunks/chunk.RHWN47DZ.js +2 -2
  56. package/cdn-versioned/chunks/chunk.SDWSZX52.js +10 -10
  57. package/cdn-versioned/chunks/chunk.SPIJDZMD.js +2 -2
  58. package/cdn-versioned/chunks/chunk.SS7M4TZ3.js +2 -2
  59. package/cdn-versioned/chunks/chunk.SXCJQBLJ.js +2 -2
  60. package/cdn-versioned/chunks/chunk.TEZ5ERKR.js +5 -5
  61. package/cdn-versioned/chunks/chunk.TQIQNEOY.js +1 -1
  62. package/cdn-versioned/chunks/chunk.UQD7EJTJ.js +2 -2
  63. package/cdn-versioned/chunks/chunk.V65AWGU4.js +1 -1
  64. package/cdn-versioned/chunks/chunk.VGGACO4K.js +2 -2
  65. package/cdn-versioned/chunks/chunk.VUEVAYFK.js +2 -2
  66. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  67. package/cdn-versioned/chunks/chunk.WUMIGCKG.js +2 -2
  68. package/cdn-versioned/chunks/chunk.X66Q6CFQ.js +2 -2
  69. package/cdn-versioned/chunks/chunk.XYOC42VA.js +2 -2
  70. package/cdn-versioned/chunks/chunk.Y22AL5IU.js +2 -2
  71. package/cdn-versioned/chunks/chunk.Z4LHGWSU.js +1 -1
  72. package/cdn-versioned/chunks/chunk.ZDVA3JMZ.js +1 -1
  73. package/cdn-versioned/chunks/chunk.ZHYZWUO3.js +2 -2
  74. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  75. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  76. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  77. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  78. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  79. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  80. package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  81. package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  82. package/cdn-versioned/components/button/button.d.ts +1 -1
  83. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  84. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  85. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  86. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  87. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  88. package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
  89. package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
  90. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  91. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  92. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  93. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  94. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  95. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  96. package/cdn-versioned/components/header/header.d.ts +2 -1
  97. package/cdn-versioned/components/header/header.js +1 -1
  98. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  99. package/cdn-versioned/components/include/include.d.ts +1 -1
  100. package/cdn-versioned/components/input/input.d.ts +1 -1
  101. package/cdn-versioned/components/link/link.d.ts +1 -1
  102. package/cdn-versioned/components/loader/loader.d.ts +1 -1
  103. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  104. package/cdn-versioned/components/menu/menu.d.ts +1 -1
  105. package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
  106. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  107. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  108. package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
  109. package/cdn-versioned/components/option/option.d.ts +1 -1
  110. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  111. package/cdn-versioned/components/progress-bar/progress-bar.d.ts +1 -1
  112. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  113. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  114. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  115. package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
  116. package/cdn-versioned/components/range/range.d.ts +1 -1
  117. package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
  118. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  119. package/cdn-versioned/components/select/select.d.ts +1 -1
  120. package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
  121. package/cdn-versioned/components/step/step.d.ts +1 -1
  122. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  123. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  124. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  125. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  126. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  127. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  128. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  129. package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
  130. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  131. package/cdn-versioned/components/video/video.d.ts +1 -1
  132. package/cdn-versioned/custom-elements.json +283 -263
  133. package/cdn-versioned/internal/form.js +2 -2
  134. package/cdn-versioned/solid-components.bundle.js +84 -84
  135. package/cdn-versioned/solid-components.css +3 -3
  136. package/cdn-versioned/solid-components.iife.js +84 -84
  137. package/cdn-versioned/solid-components.js +1 -1
  138. package/cdn-versioned/vscode.html-custom-data.json +120 -115
  139. package/cdn-versioned/web-types.json +182 -172
  140. package/dist/chunks/{chunk.4KUVWN2I.js → chunk.5HSSTHMW.js} +5 -1
  141. package/dist/components/header/header.d.ts +1 -0
  142. package/dist/components/header/header.js +1 -1
  143. package/dist/custom-elements.json +24 -4
  144. package/dist/solid-components.js +6 -6
  145. package/dist/vscode.html-custom-data.json +7 -2
  146. package/dist/web-types.json +14 -4
  147. package/dist-versioned/chunks/{chunk.4KUVWN2I.js → chunk.5HSSTHMW.js} +7 -3
  148. package/dist-versioned/chunks/chunk.6ETKGDC3.js +13 -13
  149. package/dist-versioned/chunks/chunk.6O4N7F3K.js +3 -3
  150. package/dist-versioned/chunks/chunk.6UABH73N.js +23 -23
  151. package/dist-versioned/chunks/chunk.742523X2.js +6 -6
  152. package/dist-versioned/chunks/chunk.7MHQG3BX.js +1 -1
  153. package/dist-versioned/chunks/chunk.7PKQECKN.js +5 -5
  154. package/dist-versioned/chunks/chunk.7QL6Y47O.js +3 -3
  155. package/dist-versioned/chunks/chunk.7WPBGXB4.js +1 -1
  156. package/dist-versioned/chunks/chunk.AMARMKJU.js +3 -3
  157. package/dist-versioned/chunks/chunk.BDDLMKAK.js +1 -1
  158. package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
  159. package/dist-versioned/chunks/chunk.D3Q6NREV.js +1 -1
  160. package/dist-versioned/chunks/chunk.DC2F6ZIN.js +12 -12
  161. package/dist-versioned/chunks/chunk.DCUIQILU.js +7 -7
  162. package/dist-versioned/chunks/chunk.DMQ52GO3.js +2 -2
  163. package/dist-versioned/chunks/chunk.DZ77XUG2.js +11 -11
  164. package/dist-versioned/chunks/chunk.E7RWXJJE.js +11 -11
  165. package/dist-versioned/chunks/chunk.EH7PG7IH.js +2 -2
  166. package/dist-versioned/chunks/chunk.EKH7JJ3U.js +25 -25
  167. package/dist-versioned/chunks/chunk.GVPPHUUS.js +5 -5
  168. package/dist-versioned/chunks/chunk.GWWM46XG.js +7 -7
  169. package/dist-versioned/chunks/chunk.HB3VBJFC.js +10 -10
  170. package/dist-versioned/chunks/chunk.K22CCY63.js +3 -3
  171. package/dist-versioned/chunks/chunk.K4ZSZPTN.js +2 -2
  172. package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
  173. package/dist-versioned/chunks/chunk.KYX4HLN2.js +7 -7
  174. package/dist-versioned/chunks/chunk.LDTZNWTZ.js +6 -6
  175. package/dist-versioned/chunks/chunk.LUR5ATJB.js +6 -6
  176. package/dist-versioned/chunks/chunk.MEMOQ3W7.js +5 -5
  177. package/dist-versioned/chunks/chunk.MJ6KXGSO.js +5 -5
  178. package/dist-versioned/chunks/chunk.N5OTEAT2.js +6 -6
  179. package/dist-versioned/chunks/chunk.NPYCKWWW.js +10 -10
  180. package/dist-versioned/chunks/chunk.NXG4DNKU.js +12 -12
  181. package/dist-versioned/chunks/chunk.PUT4P7PK.js +2 -2
  182. package/dist-versioned/chunks/chunk.QGERTGJH.js +4 -4
  183. package/dist-versioned/chunks/chunk.RZXU2X5Z.js +2 -2
  184. package/dist-versioned/chunks/chunk.S3DD4YSN.js +4 -4
  185. package/dist-versioned/chunks/chunk.SCWFNFSN.js +4 -4
  186. package/dist-versioned/chunks/chunk.SOX43MJ5.js +4 -4
  187. package/dist-versioned/chunks/chunk.T2ZFQMV6.js +8 -8
  188. package/dist-versioned/chunks/chunk.TNLAM4ZT.js +3 -3
  189. package/dist-versioned/chunks/chunk.UGIF26DH.js +2 -2
  190. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  191. package/dist-versioned/chunks/chunk.V4ILSVMF.js +4 -4
  192. package/dist-versioned/chunks/chunk.V54VIV3V.js +1 -1
  193. package/dist-versioned/chunks/chunk.VDQBK7ZK.js +2 -2
  194. package/dist-versioned/chunks/chunk.VLMSLPLL.js +10 -10
  195. package/dist-versioned/chunks/chunk.VWGMR2Y5.js +5 -5
  196. package/dist-versioned/chunks/chunk.VYBHDB7F.js +11 -11
  197. package/dist-versioned/chunks/chunk.WIKRI7YB.js +5 -5
  198. package/dist-versioned/chunks/chunk.WKUNYCQZ.js +3 -3
  199. package/dist-versioned/chunks/chunk.X32Z3OP3.js +14 -14
  200. package/dist-versioned/chunks/chunk.XQBLC5E4.js +5 -5
  201. package/dist-versioned/chunks/chunk.Y6MMHW4A.js +1 -1
  202. package/dist-versioned/chunks/chunk.YAI4GVXU.js +6 -6
  203. package/dist-versioned/chunks/chunk.YFUYD54K.js +42 -42
  204. package/dist-versioned/chunks/chunk.YVAYTWVV.js +1 -1
  205. package/dist-versioned/chunks/chunk.Z4X2ORYU.js +5 -5
  206. package/dist-versioned/chunks/chunk.Z7VTXC25.js +2 -2
  207. package/dist-versioned/chunks/chunk.ZMCHJLGT.js +10 -10
  208. package/dist-versioned/chunks/chunk.ZWSPJTPP.js +5 -5
  209. package/dist-versioned/chunks/chunk.ZXPU2CGW.js +3 -3
  210. package/dist-versioned/chunks/chunk.ZXTMNMQT.js +2 -2
  211. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  212. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  213. package/dist-versioned/components/animation/animation.d.ts +1 -1
  214. package/dist-versioned/components/audio/audio.d.ts +1 -1
  215. package/dist-versioned/components/badge/badge.d.ts +1 -1
  216. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  217. package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  218. package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  219. package/dist-versioned/components/button/button.d.ts +1 -1
  220. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  221. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  222. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  223. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  224. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  225. package/dist-versioned/components/combobox/combobox.d.ts +1 -1
  226. package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
  227. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  228. package/dist-versioned/components/divider/divider.d.ts +1 -1
  229. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  230. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  231. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  232. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  233. package/dist-versioned/components/header/header.d.ts +2 -1
  234. package/dist-versioned/components/header/header.js +1 -1
  235. package/dist-versioned/components/icon/icon.d.ts +1 -1
  236. package/dist-versioned/components/include/include.d.ts +1 -1
  237. package/dist-versioned/components/input/input.d.ts +1 -1
  238. package/dist-versioned/components/link/link.d.ts +1 -1
  239. package/dist-versioned/components/loader/loader.d.ts +1 -1
  240. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  241. package/dist-versioned/components/menu/menu.d.ts +1 -1
  242. package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
  243. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  244. package/dist-versioned/components/notification/notification.d.ts +1 -1
  245. package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
  246. package/dist-versioned/components/option/option.d.ts +1 -1
  247. package/dist-versioned/components/popup/popup.d.ts +1 -1
  248. package/dist-versioned/components/progress-bar/progress-bar.d.ts +1 -1
  249. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  250. package/dist-versioned/components/radio/radio.d.ts +1 -1
  251. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  252. package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
  253. package/dist-versioned/components/range/range.d.ts +1 -1
  254. package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
  255. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  256. package/dist-versioned/components/select/select.d.ts +1 -1
  257. package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
  258. package/dist-versioned/components/step/step.d.ts +1 -1
  259. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  260. package/dist-versioned/components/switch/switch.d.ts +1 -1
  261. package/dist-versioned/components/tab/tab.d.ts +1 -1
  262. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  263. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  264. package/dist-versioned/components/tag/tag.d.ts +1 -1
  265. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  266. package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
  267. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  268. package/dist-versioned/components/video/video.d.ts +1 -1
  269. package/dist-versioned/custom-elements.json +283 -263
  270. package/dist-versioned/internal/form.js +2 -2
  271. package/dist-versioned/solid-components.css +3 -3
  272. package/dist-versioned/solid-components.js +6 -6
  273. package/dist-versioned/vscode.html-custom-data.json +120 -115
  274. package/dist-versioned/web-types.json +182 -172
  275. package/package.json +1 -1
  276. package/cdn/chunks/chunk.YQHNJLIR.js +0 -2
  277. package/cdn-versioned/chunks/chunk.YQHNJLIR.js +0 -2
@@ -1,12 +1,12 @@
1
- import{b as f,c as k}from"./chunk.LZRL7OLU.js";import{a as i}from"./chunk.LHSR56PH.js";import{a as x}from"./chunk.CGQ2BPPZ.js";import{a as b,b as h}from"./chunk.NL7YFV4O.js";import{a as n}from"./chunk.4ZZFYCXX.js";import{a as y}from"./chunk.NYKJXI3Q.js";import{a as m,b as r,c,d as g,g as p,h as u}from"./chunk.4SDWX3GC.js";import{b as v}from"./chunk.OBAEIKIV.js";import{e as o}from"./chunk.6EV4YU6C.js";var t=class extends u{constructor(){super(...arguments);this.formControlController=new f(this,{form:e=>{if(e.hasAttribute("form")){let a=e.getRootNode(),s=e.getAttribute("form");return a.getElementById(s)}return e.closest("form")}});this.hasSlotController=new x(this,"[default]","icon-left","icon-right");this.invalid=!1;this.hasUiMotion=!1;this.title="";this.variant="primary";this.inverted=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.loading=!1;this.type="button";this.name="";this.value="";this.href=""}get validity(){return this.isButton()?this.button.validity:k}get validationMessage(){return this.isButton()?this.button.validationMessage:""}connectedCallback(){super.connectedCallback(),this.updateMotionTheme()}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}onThemeChange(){this.updateMotionTheme()}updateMotionTheme(){let e=getComputedStyle(this).getPropertyValue("--sd-theme").trim().replace(/['"]/g,"");this.hasUiMotion=e===""||e==="ui-light"||e==="ui-dark"}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(e){if(this.disabled||this.loading||this.visuallyDisabled){e.preventDefault(),e.stopPropagation();return}this.type==="submit"&&this.formControlController.submit(this),this.type==="reset"&&this.formControlController.reset(this)}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}checkValidity(){return this.isButton()?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.isButton()?this.button.reportValidity():!0}setCustomValidity(e){this.isButton()&&(this.button.setCustomValidity(e),this.formControlController.updateValidity())}render(){let e=this.isLink(),a=e?b`a`:b`button`,s={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right"),"icon-only":this._iconsInDefaultSlot.length>0},d=this.variant==="secondary",l={primary:this.inverted?{motionBackground:"sd-7-0-0-next-6-button--primary--inverted--hover-color-background group-active:sd-7-0-0-next-6-button--primary--inverted--active-color-background",baseBackground:"hover:sd-7-0-0-next-6-button--primary--inverted--hover-color-background active:sd-7-0-0-next-6-button--primary--inverted--active-color-background"}:{motionBackground:"sd-7-0-0-next-6-button--primary--hover-color-background group-active:sd-7-0-0-next-6-button--primary--active-color-background",baseBackground:"hover:sd-7-0-0-next-6-button--primary--hover-color-background active:sd-7-0-0-next-6-button--primary--active-color-background"},secondary:this.inverted?{motionBackground:"sd-7-0-0-next-6-button--secondary--inverted--hover-color-background group-active:sd-7-0-0-next-6-button--secondary--inverted--active-color-background group-active:sd-7-0-0-next-6-button--secondary--inverted--active-color-text",baseBackground:"hover:sd-7-0-0-next-6-button--secondary--inverted--hover-color-background active:sd-7-0-0-next-6-button--secondary--inverted--active-color-background"}:{motionBackground:"sd-7-0-0-next-6-button--secondary--hover-color-background group-active:sd-7-0-0-next-6-button--secondary--active-color-background",baseBackground:"hover:sd-7-0-0-next-6-button--secondary--hover-color-background active:sd-7-0-0-next-6-button--secondary--active-color-background"},tertiary:this.inverted?{motionBackground:"sd-7-0-0-next-6-button--tertiary--inverted--hover-color-background group-active:sd-7-0-0-next-6-button--tertiary--inverted--active-color-background group-active:sd-7-0-0-next-6-button--tertiary--inverted--active-color-text",baseBackground:"hover:sd-7-0-0-next-6-button--tertiary--inverted--hover-color-background active:sd-7-0-0-next-6-button--tertiary--inverted--active-color-background"}:{motionBackground:"sd-7-0-0-next-6-button--tertiary--hover-color-background group-active:sd-7-0-0-next-6-button--tertiary--active-color-background",baseBackground:"hover:sd-7-0-0-next-6-button--tertiary--hover-color-background active:sd-7-0-0-next-6-button--tertiary--active-color-background"},cta:this.inverted?{motionBackground:"sd-7-0-0-next-6-button--cta--inverted--hover-color-background group-active:sd-7-0-0-next-6-button--cta--inverted--active-color-background",baseBackground:"hover:sd-7-0-0-next-6-button--cta--inverted--hover-color-background active:sd-7-0-0-next-6-button--cta--inverted--active-color-background"}:{motionBackground:"bg-accent-500 group-active:bg-accent-700",baseBackground:"hover:bg-accent-500 active:bg-accent-700"}}[this.variant];return h`<sd-7-0-0-next-6-theme-listener></sd-7-0-0-next-6-theme-listener><${a} part="base" class="${n(`group relative z-10 font-md no-underline
1
+ import{b as f,c as k}from"./chunk.LZRL7OLU.js";import{a as i}from"./chunk.LHSR56PH.js";import{a as x}from"./chunk.CGQ2BPPZ.js";import{a as b,b as h}from"./chunk.NL7YFV4O.js";import{a as n}from"./chunk.4ZZFYCXX.js";import{a as y}from"./chunk.NYKJXI3Q.js";import{a as m,b as r,c,d as g,g as p,h as u}from"./chunk.4SDWX3GC.js";import{b as v}from"./chunk.OBAEIKIV.js";import{e as o}from"./chunk.6EV4YU6C.js";var t=class extends u{constructor(){super(...arguments);this.formControlController=new f(this,{form:e=>{if(e.hasAttribute("form")){let a=e.getRootNode(),s=e.getAttribute("form");return a.getElementById(s)}return e.closest("form")}});this.hasSlotController=new x(this,"[default]","icon-left","icon-right");this.invalid=!1;this.hasUiMotion=!1;this.title="";this.variant="primary";this.inverted=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.loading=!1;this.type="button";this.name="";this.value="";this.href=""}get validity(){return this.isButton()?this.button.validity:k}get validationMessage(){return this.isButton()?this.button.validationMessage:""}connectedCallback(){super.connectedCallback(),this.updateMotionTheme()}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}onThemeChange(){this.updateMotionTheme()}updateMotionTheme(){let e=getComputedStyle(this).getPropertyValue("--sd-theme").trim().replace(/['"]/g,"");this.hasUiMotion=e===""||e==="ui-light"||e==="ui-dark"}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(e){if(this.disabled||this.loading||this.visuallyDisabled){e.preventDefault(),e.stopPropagation();return}this.type==="submit"&&this.formControlController.submit(this),this.type==="reset"&&this.formControlController.reset(this)}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}checkValidity(){return this.isButton()?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.isButton()?this.button.reportValidity():!0}setCustomValidity(e){this.isButton()&&(this.button.setCustomValidity(e),this.formControlController.updateValidity())}render(){let e=this.isLink(),a=e?b`a`:b`button`,s={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right"),"icon-only":this._iconsInDefaultSlot.length>0},d=this.variant==="secondary",l={primary:this.inverted?{motionBackground:"sd-7-0-0-next-7-button--primary--inverted--hover-color-background group-active:sd-7-0-0-next-7-button--primary--inverted--active-color-background",baseBackground:"hover:sd-7-0-0-next-7-button--primary--inverted--hover-color-background active:sd-7-0-0-next-7-button--primary--inverted--active-color-background"}:{motionBackground:"sd-7-0-0-next-7-button--primary--hover-color-background group-active:sd-7-0-0-next-7-button--primary--active-color-background",baseBackground:"hover:sd-7-0-0-next-7-button--primary--hover-color-background active:sd-7-0-0-next-7-button--primary--active-color-background"},secondary:this.inverted?{motionBackground:"sd-7-0-0-next-7-button--secondary--inverted--hover-color-background group-active:sd-7-0-0-next-7-button--secondary--inverted--active-color-background group-active:sd-7-0-0-next-7-button--secondary--inverted--active-color-text",baseBackground:"hover:sd-7-0-0-next-7-button--secondary--inverted--hover-color-background active:sd-7-0-0-next-7-button--secondary--inverted--active-color-background"}:{motionBackground:"sd-7-0-0-next-7-button--secondary--hover-color-background group-active:sd-7-0-0-next-7-button--secondary--active-color-background",baseBackground:"hover:sd-7-0-0-next-7-button--secondary--hover-color-background active:sd-7-0-0-next-7-button--secondary--active-color-background"},tertiary:this.inverted?{motionBackground:"sd-7-0-0-next-7-button--tertiary--inverted--hover-color-background group-active:sd-7-0-0-next-7-button--tertiary--inverted--active-color-background group-active:sd-7-0-0-next-7-button--tertiary--inverted--active-color-text",baseBackground:"hover:sd-7-0-0-next-7-button--tertiary--inverted--hover-color-background active:sd-7-0-0-next-7-button--tertiary--inverted--active-color-background"}:{motionBackground:"sd-7-0-0-next-7-button--tertiary--hover-color-background group-active:sd-7-0-0-next-7-button--tertiary--active-color-background",baseBackground:"hover:sd-7-0-0-next-7-button--tertiary--hover-color-background active:sd-7-0-0-next-7-button--tertiary--active-color-background"},cta:this.inverted?{motionBackground:"sd-7-0-0-next-7-button--cta--inverted--hover-color-background group-active:sd-7-0-0-next-7-button--cta--inverted--active-color-background",baseBackground:"hover:sd-7-0-0-next-7-button--cta--inverted--hover-color-background active:sd-7-0-0-next-7-button--cta--inverted--active-color-background"}:{motionBackground:"bg-accent-500 group-active:bg-accent-700",baseBackground:"hover:bg-accent-500 active:bg-accent-700"}}[this.variant];return h`<sd-7-0-0-next-7-theme-listener></sd-7-0-0-next-7-theme-listener><${a} part="base" class="${n(`group relative z-10 font-md no-underline
2
2
  w-full align-middle inline-flex items-stretch justify-center
3
3
  transition-colors duration-fast ease-in-out
4
- select-none cursor-[inherit]`,!this.hasUiMotion&&"sd-7-0-0-next-6-button--simple-motion",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.loading&&"relative cursor-wait",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed",{sm:"varspacing-8 min-h-8 sd-7-0-0-next-6-button--size-sm-font-size sd-7-0-0-next-6-button-font-weight sd-7-0-0-next-6-button--secondary--size-sm-padding-block sd-7-0-0-next-6-button--size-sm-border-radius",md:"varspacing-10 sd-7-0-0-next-6-button--size-md-height sd-7-0-0-next-6-button--size-md-font-size sd-7-0-0-next-6-button--secondary--size-md-padding-block sd-7-0-0-next-6-button-font-weight sd-7-0-0-next-6-button--size-md-border-radius",lg:"varspacing-12 sd-7-0-0-next-6-button--size-lg-height sd-7-0-0-next-6-button--size-lg-font-size sd-7-0-0-next-6-button--secondary--size-lg-padding-block sd-7-0-0-next-6-button-font-weight sd-7-0-0-next-6-button--size-lg-border-radius"}[this.size],!s["icon-only"]&&{sm:`${d?"sd-7-0-0-next-6-button--secondary-padding-inline":"sd-7-0-0-next-6-button--size-sm-padding-block sd-7-0-0-next-6-button-padding-inline"}`,md:`${d?"sd-7-0-0-next-6-button--secondary-padding-inline":"sd-7-0-0-next-6-button--size-md-padding-block sd-7-0-0-next-6-button-padding-inline"}`,lg:`${d?"sd-7-0-0-next-6-button--secondary-padding-inline":"sd-7-0-0-next-6-button--size-lg-padding-block sd-7-0-0-next-6-button-padding-inline"}`}[this.size],s["icon-only"]&&{sm:"px-1 aspect-square",md:"sd-7-0-0-next-6-button--size-md--icon-only-padding-inline aspect-square",lg:"px-[12px] aspect-square"}[this.size],{primary:this.inverted?`${this.visuallyDisabled?"sd-7-0-0-next-6-button--inverted--disabled-color-background text-white border-neutral-500":"sd-7-0-0-next-6-button--primary--inverted--default-color-text sd-7-0-0-next-6-button--primary--inverted--default-color-background border-white hover:sd-7-0-0-next-6-button--primary--inverted--hover-color-text active:sd-7-0-0-next-6-button--primary--inverted--active-color-text"}
5
- disabled:sd-7-0-0-next-6-button--inverted--disabled-color-background disabled:text-white`:`${this.visuallyDisabled?"sd-7-0-0-next-6-button--primary--disabled-color-background border-neutral-500 text-white":"sd-7-0-0-next-6-button--primary--default-color-background border-transparent sd-7-0-0-next-6-button--primary--default-color-text hover:sd-7-0-0-next-6-button--primary--hover-color-text active:sd-7-0-0-next-6-button--primary--active-color-text"}
6
- disabled:sd-7-0-0-next-6-button--primary--disabled-color-background disabled:text-white`,secondary:this.inverted?`border sd-7-0-0-next-6-button-border-width ${this.visuallyDisabled?"text-neutral-600 border-neutral-600":"sd-7-0-0-next-6-button--secondary--inverted-color-text sd-7-0-0-next-6-button--secondary--inverted-color-border hover:sd-7-0-0-next-6-button--secondary--inverted-color-border hover:sd-7-0-0-next-6-button--secondary--inverted--hover-color-text active:sd-7-0-0-next-6-button--secondary--inverted--active-color-text active:border-primary-200"}
7
- disabled:sd-7-0-0-next-6-button--inverted--disabled-color-border disabled:sd-7-0-0-next-6-button--inverted--disabled-color-text`:`border sd-7-0-0-next-6-button-border-width ${this.visuallyDisabled?"sd-7-0-0-next-6-button--secondary--disabled-color-text sd-7-0-0-next-6-button--secondary--disabled-color-border":"sd-7-0-0-next-6-button--secondary--default-color-text sd-7-0-0-next-6-button--secondary--default-color-border hover:sd-7-0-0-next-6-button--secondary--hover-color-text hover:sd-7-0-0-next-6-button--secondary--hover-color-border active:sd-7-0-0-next-6-button--secondary--active-color-text active:sd-7-0-0-next-6-button--secondary--active-color-border"}
8
- disabled:sd-7-0-0-next-6-button--secondary--disabled-color-text disabled:sd-7-0-0-next-6-button--secondary--disabled-color-border`,tertiary:this.inverted?`border-transparent ${this.visuallyDisabled?"text-neutral-600":"sd-7-0-0-next-6-button--tertiary--inverted-color-text hover:sd-7-0-0-next-6-button--tertiary--inverted--hover-color-text active:sd-7-0-0-next-6-button--tertiary--inverted--active-color-text"}
9
- disabled:sd-7-0-0-next-6-button--inverted--disabled-color-text`:`border-transparent ${this.visuallyDisabled?"sd-7-0-0-next-6-button--tertiary--disabled-color-text":"sd-7-0-0-next-6-button--tertiary--default-color-text hover:sd-7-0-0-next-6-button--tertiary--hover-color-text active:sd-7-0-0-next-6-button--tertiary--active-color-text"}
10
- disabled:sd-7-0-0-next-6-button--tertiary--disabled-color-text`,cta:`${this.visuallyDisabled?"sd-7-0-0-next-6-button--primary--disabled-color-background border-neutral-500":"border-transparent"}
11
- ${this.inverted?"sd-7-0-0-next-6-button--cta--inverted--default-color-background sd-7-0-0-next-6-button--cta--inverted--default-color-text hover:sd-7-0-0-next-6-button--cta--inverted--hover-color-text active:sd-7-0-0-next-6-button--cta--inverted--active-color-text disabled:sd-7-0-0-next-6-button--inverted--disabled-color-background disabled:text-white":"text-white bg-accent disabled:sd-7-0-0-next-6-button--primary--disabled-color-background disabled:border-neutral-500 disabled:text-white"}`}[this.variant],!this.hasUiMotion&&!this.disabled&&!this.visuallyDisabled&&l.baseBackground)}" ?disabled="${i(e?void 0:this.disabled)}" type="${i(e?void 0:this.type)}" title="${this.title}" name="${i(e?void 0:this.name)}" value="${i(e?void 0:this.value)}" href="${i(e?this.href:void 0)}" target="${i(e?this.target:void 0)}" download="${i(e?this.download:void 0)}" rel="${i(e&&this.target?"noreferrer noopener":void 0)}" role="${i(e?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><div part="motion-wrapper" class="${n("absolute inset-0 -z-10 overflow-hidden pointer-events-none ",(!this.hasUiMotion||this.disabled||this.visuallyDisabled)&&"hidden",{sm:"sd-7-0-0-next-6-button-border-radius",md:"sd-7-0-0-next-6-button-border-radius",lg:"sd-7-0-0-next-6-button-border-radius"}[this.size])}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${n("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",l.motionBackground)}"></div><div class="${n("absolute w-full h-full mt-[22%]",l.motionBackground,this.variant==="secondary"&&this.inverted&&"group-active:sd-7-0-0-next-6-button--secondary--active-color-border")}"></div></div></div><slot name="icon-left" part="icon-left" class="${n("flex flex-auto items-center justify-end pointer-events-none",s["icon-only"]&&"hidden",this.loading&&"invisible",s["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${n("inline-flex items-center justify-center",{sm:"leading-5",md:"leading-6",lg:"leading-6"}[this.size],s["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${n("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",s["icon-only"]&&"hidden",s["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?h`<sd-7-0-0-next-6-loader class="${n("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-7-0-0-next-6-loader>`:""}</${a}>`}};t.styles=[...u.styles,v`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
12
- :host{position:relative;z-index:0;display:inline-block;width:auto;cursor:pointer}.sd-7-0-0-next-6-button--simple-motion{transition:background-color 150ms ease,color 150ms ease,border-color 150ms ease,box-shadow 150ms ease}::slotted(sd-7-0-0-next-6-badge){pointer-events:none;position:absolute;top:0;right:0;--tw-translate-x:calc(1 / 2 * 100%)!important;--tw-translate-y:calc(calc(1 / 2 * 100%) * -1)!important;translate:var(--tw-translate-x) var(--tw-translate-y)!important}::slotted(sd-7-0-0-next-6-icon),sd-7-0-0-next-6-loader{font-size:calc(var(--tw-varspacing)/ 2)}:host([size=lg]) ::slotted(sd-7-0-0-next-6-icon){font-size:var(--sd-button--size-lg-icon-height,var(--sd-spacing-6))}:host([size=sm]) .sd-7-0-0-next-6-button--size-sm-border-radius{border-radius:var(--sd-button--size-sm-border-radius,var(--sd-button-border-radius))}:host([size=md]) .sd-7-0-0-next-6-button--size-md-border-radius{border-radius:var(--sd-button--size-md-border-radius,var(--sd-button-border-radius))}:host([size=lg]) .sd-7-0-0-next-6-button--size-lg-border-radius{border-radius:var(--sd-button--size-lg-border-radius,var(--sd-button-border-radius))}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}`],o([g("a, button")],t.prototype,"button",2),o([p({selector:"sd-7-0-0-next-6-icon"})],t.prototype,"_iconsInDefaultSlot",2),o([c()],t.prototype,"invalid",2),o([c()],t.prototype,"hasUiMotion",2),o([r({type:String,reflect:!0})],t.prototype,"title",2),o([r({type:String,reflect:!0})],t.prototype,"variant",2),o([r({type:Boolean,reflect:!0})],t.prototype,"inverted",2),o([r({type:String,reflect:!0})],t.prototype,"size",2),o([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),o([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),o([r({type:Boolean,reflect:!0})],t.prototype,"loading",2),o([r({type:String,reflect:!0})],t.prototype,"type",2),o([r({type:String,reflect:!0})],t.prototype,"name",2),o([r()],t.prototype,"value",2),o([r({type:String,reflect:!0})],t.prototype,"href",2),o([r({type:String,reflect:!0})],t.prototype,"target",2),o([r({reflect:!0})],t.prototype,"download",2),o([r({reflect:!0})],t.prototype,"form",2),o([r({attribute:"formaction"})],t.prototype,"formAction",2),o([r({attribute:"formenctype"})],t.prototype,"formEnctype",2),o([r({attribute:"formmethod"})],t.prototype,"formMethod",2),o([r({attribute:"formnovalidate",type:Boolean})],t.prototype,"formNoValidate",2),o([r({attribute:"formtarget"})],t.prototype,"formTarget",2),o([y("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=o([m("sd-7-0-0-next-6-button")],t);export{t as a};
4
+ select-none cursor-[inherit]`,!this.hasUiMotion&&"sd-7-0-0-next-7-button--simple-motion",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.loading&&"relative cursor-wait",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed",{sm:"varspacing-8 min-h-8 sd-7-0-0-next-7-button--size-sm-font-size sd-7-0-0-next-7-button-font-weight sd-7-0-0-next-7-button--secondary--size-sm-padding-block sd-7-0-0-next-7-button--size-sm-border-radius",md:"varspacing-10 sd-7-0-0-next-7-button--size-md-height sd-7-0-0-next-7-button--size-md-font-size sd-7-0-0-next-7-button--secondary--size-md-padding-block sd-7-0-0-next-7-button-font-weight sd-7-0-0-next-7-button--size-md-border-radius",lg:"varspacing-12 sd-7-0-0-next-7-button--size-lg-height sd-7-0-0-next-7-button--size-lg-font-size sd-7-0-0-next-7-button--secondary--size-lg-padding-block sd-7-0-0-next-7-button-font-weight sd-7-0-0-next-7-button--size-lg-border-radius"}[this.size],!s["icon-only"]&&{sm:`${d?"sd-7-0-0-next-7-button--secondary-padding-inline":"sd-7-0-0-next-7-button--size-sm-padding-block sd-7-0-0-next-7-button-padding-inline"}`,md:`${d?"sd-7-0-0-next-7-button--secondary-padding-inline":"sd-7-0-0-next-7-button--size-md-padding-block sd-7-0-0-next-7-button-padding-inline"}`,lg:`${d?"sd-7-0-0-next-7-button--secondary-padding-inline":"sd-7-0-0-next-7-button--size-lg-padding-block sd-7-0-0-next-7-button-padding-inline"}`}[this.size],s["icon-only"]&&{sm:"px-1 aspect-square",md:"sd-7-0-0-next-7-button--size-md--icon-only-padding-inline aspect-square",lg:"px-[12px] aspect-square"}[this.size],{primary:this.inverted?`${this.visuallyDisabled?"sd-7-0-0-next-7-button--inverted--disabled-color-background text-white border-neutral-500":"sd-7-0-0-next-7-button--primary--inverted--default-color-text sd-7-0-0-next-7-button--primary--inverted--default-color-background border-white hover:sd-7-0-0-next-7-button--primary--inverted--hover-color-text active:sd-7-0-0-next-7-button--primary--inverted--active-color-text"}
5
+ disabled:sd-7-0-0-next-7-button--inverted--disabled-color-background disabled:text-white`:`${this.visuallyDisabled?"sd-7-0-0-next-7-button--primary--disabled-color-background border-neutral-500 text-white":"sd-7-0-0-next-7-button--primary--default-color-background border-transparent sd-7-0-0-next-7-button--primary--default-color-text hover:sd-7-0-0-next-7-button--primary--hover-color-text active:sd-7-0-0-next-7-button--primary--active-color-text"}
6
+ disabled:sd-7-0-0-next-7-button--primary--disabled-color-background disabled:text-white`,secondary:this.inverted?`border sd-7-0-0-next-7-button-border-width ${this.visuallyDisabled?"text-neutral-600 border-neutral-600":"sd-7-0-0-next-7-button--secondary--inverted-color-text sd-7-0-0-next-7-button--secondary--inverted-color-border hover:sd-7-0-0-next-7-button--secondary--inverted-color-border hover:sd-7-0-0-next-7-button--secondary--inverted--hover-color-text active:sd-7-0-0-next-7-button--secondary--inverted--active-color-text active:border-primary-200"}
7
+ disabled:sd-7-0-0-next-7-button--inverted--disabled-color-border disabled:sd-7-0-0-next-7-button--inverted--disabled-color-text`:`border sd-7-0-0-next-7-button-border-width ${this.visuallyDisabled?"sd-7-0-0-next-7-button--secondary--disabled-color-text sd-7-0-0-next-7-button--secondary--disabled-color-border":"sd-7-0-0-next-7-button--secondary--default-color-text sd-7-0-0-next-7-button--secondary--default-color-border hover:sd-7-0-0-next-7-button--secondary--hover-color-text hover:sd-7-0-0-next-7-button--secondary--hover-color-border active:sd-7-0-0-next-7-button--secondary--active-color-text active:sd-7-0-0-next-7-button--secondary--active-color-border"}
8
+ disabled:sd-7-0-0-next-7-button--secondary--disabled-color-text disabled:sd-7-0-0-next-7-button--secondary--disabled-color-border`,tertiary:this.inverted?`border-transparent ${this.visuallyDisabled?"text-neutral-600":"sd-7-0-0-next-7-button--tertiary--inverted-color-text hover:sd-7-0-0-next-7-button--tertiary--inverted--hover-color-text active:sd-7-0-0-next-7-button--tertiary--inverted--active-color-text"}
9
+ disabled:sd-7-0-0-next-7-button--inverted--disabled-color-text`:`border-transparent ${this.visuallyDisabled?"sd-7-0-0-next-7-button--tertiary--disabled-color-text":"sd-7-0-0-next-7-button--tertiary--default-color-text hover:sd-7-0-0-next-7-button--tertiary--hover-color-text active:sd-7-0-0-next-7-button--tertiary--active-color-text"}
10
+ disabled:sd-7-0-0-next-7-button--tertiary--disabled-color-text`,cta:`${this.visuallyDisabled?"sd-7-0-0-next-7-button--primary--disabled-color-background border-neutral-500":"border-transparent"}
11
+ ${this.inverted?"sd-7-0-0-next-7-button--cta--inverted--default-color-background sd-7-0-0-next-7-button--cta--inverted--default-color-text hover:sd-7-0-0-next-7-button--cta--inverted--hover-color-text active:sd-7-0-0-next-7-button--cta--inverted--active-color-text disabled:sd-7-0-0-next-7-button--inverted--disabled-color-background disabled:text-white":"text-white bg-accent disabled:sd-7-0-0-next-7-button--primary--disabled-color-background disabled:border-neutral-500 disabled:text-white"}`}[this.variant],!this.hasUiMotion&&!this.disabled&&!this.visuallyDisabled&&l.baseBackground)}" ?disabled="${i(e?void 0:this.disabled)}" type="${i(e?void 0:this.type)}" title="${this.title}" name="${i(e?void 0:this.name)}" value="${i(e?void 0:this.value)}" href="${i(e?this.href:void 0)}" target="${i(e?this.target:void 0)}" download="${i(e?this.download:void 0)}" rel="${i(e&&this.target?"noreferrer noopener":void 0)}" role="${i(e?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><div part="motion-wrapper" class="${n("absolute inset-0 -z-10 overflow-hidden pointer-events-none ",(!this.hasUiMotion||this.disabled||this.visuallyDisabled)&&"hidden",{sm:"sd-7-0-0-next-7-button-border-radius",md:"sd-7-0-0-next-7-button-border-radius",lg:"sd-7-0-0-next-7-button-border-radius"}[this.size])}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${n("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",l.motionBackground)}"></div><div class="${n("absolute w-full h-full mt-[22%]",l.motionBackground,this.variant==="secondary"&&this.inverted&&"group-active:sd-7-0-0-next-7-button--secondary--active-color-border")}"></div></div></div><slot name="icon-left" part="icon-left" class="${n("flex flex-auto items-center justify-end pointer-events-none",s["icon-only"]&&"hidden",this.loading&&"invisible",s["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${n("inline-flex items-center justify-center",{sm:"leading-5",md:"leading-6",lg:"leading-6"}[this.size],s["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${n("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",s["icon-only"]&&"hidden",s["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?h`<sd-7-0-0-next-7-loader class="${n("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-7-0-0-next-7-loader>`:""}</${a}>`}};t.styles=[...u.styles,v`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
12
+ :host{position:relative;z-index:0;display:inline-block;width:auto;cursor:pointer}.sd-7-0-0-next-7-button--simple-motion{transition:background-color 150ms ease,color 150ms ease,border-color 150ms ease,box-shadow 150ms ease}::slotted(sd-7-0-0-next-7-badge){pointer-events:none;position:absolute;top:0;right:0;--tw-translate-x:calc(1 / 2 * 100%)!important;--tw-translate-y:calc(calc(1 / 2 * 100%) * -1)!important;translate:var(--tw-translate-x) var(--tw-translate-y)!important}::slotted(sd-7-0-0-next-7-icon),sd-7-0-0-next-7-loader{font-size:calc(var(--tw-varspacing)/ 2)}:host([size=lg]) ::slotted(sd-7-0-0-next-7-icon){font-size:var(--sd-button--size-lg-icon-height,var(--sd-spacing-6))}:host([size=sm]) .sd-7-0-0-next-7-button--size-sm-border-radius{border-radius:var(--sd-button--size-sm-border-radius,var(--sd-button-border-radius))}:host([size=md]) .sd-7-0-0-next-7-button--size-md-border-radius{border-radius:var(--sd-button--size-md-border-radius,var(--sd-button-border-radius))}:host([size=lg]) .sd-7-0-0-next-7-button--size-lg-border-radius{border-radius:var(--sd-button--size-lg-border-radius,var(--sd-button-border-radius))}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}`],o([g("a, button")],t.prototype,"button",2),o([p({selector:"sd-7-0-0-next-7-icon"})],t.prototype,"_iconsInDefaultSlot",2),o([c()],t.prototype,"invalid",2),o([c()],t.prototype,"hasUiMotion",2),o([r({type:String,reflect:!0})],t.prototype,"title",2),o([r({type:String,reflect:!0})],t.prototype,"variant",2),o([r({type:Boolean,reflect:!0})],t.prototype,"inverted",2),o([r({type:String,reflect:!0})],t.prototype,"size",2),o([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),o([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),o([r({type:Boolean,reflect:!0})],t.prototype,"loading",2),o([r({type:String,reflect:!0})],t.prototype,"type",2),o([r({type:String,reflect:!0})],t.prototype,"name",2),o([r()],t.prototype,"value",2),o([r({type:String,reflect:!0})],t.prototype,"href",2),o([r({type:String,reflect:!0})],t.prototype,"target",2),o([r({reflect:!0})],t.prototype,"download",2),o([r({reflect:!0})],t.prototype,"form",2),o([r({attribute:"formaction"})],t.prototype,"formAction",2),o([r({attribute:"formenctype"})],t.prototype,"formEnctype",2),o([r({attribute:"formmethod"})],t.prototype,"formMethod",2),o([r({attribute:"formnovalidate",type:Boolean})],t.prototype,"formNoValidate",2),o([r({attribute:"formtarget"})],t.prototype,"formTarget",2),o([y("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=o([m("sd-7-0-0-next-7-button")],t);export{t as a};
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk.LHSR56PH.js";import{a as h}from"./chunk.VAM5SM3O.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as o,b as r,d as c,h as i}from"./chunk.4SDWX3GC.js";import{b as l,e as a}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends i{constructor(){super(...arguments);this.localize=new h(this);this.href="";this.current=!1}handleCurrentChange(){var s,n;!this.base||!this.current||(n=(s=this.base.shadowRoot)==null?void 0:s.querySelector("a"))==null||n.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return a`<sd-7-0-0-next-6-link part="base" href="${f(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-7-0-0-next-6-link>`}};t.styles=[...i.styles,l`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{display:inline-flex;align-items:center}sd-7-0-0-next-6-link::part(base){align-items:center}sd-7-0-0-next-6-link::part(icon-left){margin-right:0;display:inline-flex}:host([current]) sd-7-0-0-next-6-link::part(base){color:rgba(var(--sd-breadcrumb--current-color-text,rgba(var(--sd-color-neutral-700))))}:host([current]) sd-7-0-0-next-6-link::part(label){text-decoration-line:none}`],e([c('[part="base"]')],t.prototype,"base",2),e([r({type:String,reflect:!0})],t.prototype,"href",2),e([r({type:String,reflect:!0})],t.prototype,"target",2),e([r({type:Boolean,reflect:!0})],t.prototype,"current",2),e([p("current")],t.prototype,"handleCurrentChange",1),t=e([o("sd-7-0-0-next-6-breadcrumb-item")],t);export{t as a};
1
+ import{a as f}from"./chunk.LHSR56PH.js";import{a as h}from"./chunk.VAM5SM3O.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as o,b as r,d as c,h as i}from"./chunk.4SDWX3GC.js";import{b as l,e as a}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends i{constructor(){super(...arguments);this.localize=new h(this);this.href="";this.current=!1}handleCurrentChange(){var s,n;!this.base||!this.current||(n=(s=this.base.shadowRoot)==null?void 0:s.querySelector("a"))==null||n.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return a`<sd-7-0-0-next-7-link part="base" href="${f(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-7-0-0-next-7-link>`}};t.styles=[...i.styles,l`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{display:inline-flex;align-items:center}sd-7-0-0-next-7-link::part(base){align-items:center}sd-7-0-0-next-7-link::part(icon-left){margin-right:0;display:inline-flex}:host([current]) sd-7-0-0-next-7-link::part(base){color:rgba(var(--sd-breadcrumb--current-color-text,rgba(var(--sd-color-neutral-700))))}:host([current]) sd-7-0-0-next-7-link::part(label){text-decoration-line:none}`],e([c('[part="base"]')],t.prototype,"base",2),e([r({type:String,reflect:!0})],t.prototype,"href",2),e([r({type:String,reflect:!0})],t.prototype,"target",2),e([r({type:Boolean,reflect:!0})],t.prototype,"current",2),e([p("current")],t.prototype,"handleCurrentChange",1),t=e([o("sd-7-0-0-next-7-breadcrumb-item")],t);export{t as a};
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk.VAM5SM3O.js";import{a as p,d as f,h as m}from"./chunk.4SDWX3GC.js";import{b as u,e as h}from"./chunk.OBAEIKIV.js";import{e as c}from"./chunk.6EV4YU6C.js";var a=class extends m{constructor(){super(...arguments);this.localize=new w(this);this.handleOutsideClick=t=>{this.contains(t.target)||this.getAllItems().forEach(e=>e.classList.remove("menu-item-focus"))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu"),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}handleClick(t){let e=["menuitem","menuitemcheckbox"],n=t.composedPath(),i=n.find(s=>{var l;return e.includes(((l=s==null?void 0:s.getAttribute)==null?void 0:l.call(s,"role"))||"")});if(!i||n.find(s=>{var l;return((l=s==null?void 0:s.getAttribute)==null?void 0:l.call(s,"role"))==="menu"})!==this)return;let o=i;o.type==="checkbox"&&(o.checked=!o.checked),this.emit("sd-select",{detail:{item:o}})}handleKeyDown(t){if(t.key==="Escape"){let e=this.getCurrentItem();e==null||e.classList.remove("menu-item-focus")}else if(t.key==="Enter"||t.key===" "){let e=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),e==null||e.classList.remove("menu-item-focus"),e==null||e.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let e=this.getAllItems(),n=this.getCurrentItem(),i=n?e.indexOf(n):0;if(n==null||n.classList.remove("menu-item-focus"),e.length>0){t.preventDefault(),t.stopPropagation();let d=(r,o)=>{let s=r;for(let l of e)if(s=(s+o+e.length)%e.length,!e[s].disabled)return s;return r};if(t.key==="ArrowDown")i=d(i,1);else if(t.key==="ArrowUp")i=d(i,-1);else if(t.key==="Home")i=e.findIndex(r=>!r.disabled),i===-1&&(i=0);else if(t.key==="End"){i=e.length-1;for(let r=e.length-1;r>=0;r--)if(!e[r].disabled){i=r;break}}this.setCurrentItem(e[i]),e[i].focus(),e[i].classList.add("menu-item-focus")}}}handleMouseDown(t){let e=t.target;this.isMenuItem(e)&&this.setCurrentItem(e)}handleSlotChange(){let t=this.getAllItems();t.length>0&&this.setCurrentItem(t[0])}isMenuItem(t){var e;return t.tagName.toLowerCase()==="sd-7-0-0-next-6-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes((e=t.getAttribute("role"))!=null?e:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!!this.isMenuItem(t))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(n=>{n.setAttribute("tabindex",n===t?"0":"-1")})}render(){return h`<slot @slotchange="${this.handleSlotChange}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}" @mousedown="${this.handleMouseDown}"></slot>`}};a.styles=[...m.styles,u`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
- :host{position:relative;display:block;overflow:auto;overscroll-behavior:auto;border-radius:var(--sd-radius-md);padding-inline:var(--sd-spacing-2);padding-block:var(--sd-spacing-3);--tw-shadow:var(--sd-shadow)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}::slotted(sd-7-0-0-next-6-divider){padding-block:var(--sd-spacing-3)}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}`],c([f("slot")],a.prototype,"defaultSlot",2),a=c([p("sd-7-0-0-next-6-menu")],a);export{a};
1
+ import{a as w}from"./chunk.VAM5SM3O.js";import{a as p,d as f,h as m}from"./chunk.4SDWX3GC.js";import{b as u,e as h}from"./chunk.OBAEIKIV.js";import{e as c}from"./chunk.6EV4YU6C.js";var a=class extends m{constructor(){super(...arguments);this.localize=new w(this);this.handleOutsideClick=t=>{this.contains(t.target)||this.getAllItems().forEach(e=>e.classList.remove("menu-item-focus"))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu"),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}handleClick(t){let e=["menuitem","menuitemcheckbox"],n=t.composedPath(),i=n.find(s=>{var l;return e.includes(((l=s==null?void 0:s.getAttribute)==null?void 0:l.call(s,"role"))||"")});if(!i||n.find(s=>{var l;return((l=s==null?void 0:s.getAttribute)==null?void 0:l.call(s,"role"))==="menu"})!==this)return;let o=i;o.type==="checkbox"&&(o.checked=!o.checked),this.emit("sd-select",{detail:{item:o}})}handleKeyDown(t){if(t.key==="Escape"){let e=this.getCurrentItem();e==null||e.classList.remove("menu-item-focus")}else if(t.key==="Enter"||t.key===" "){let e=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),e==null||e.classList.remove("menu-item-focus"),e==null||e.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let e=this.getAllItems(),n=this.getCurrentItem(),i=n?e.indexOf(n):0;if(n==null||n.classList.remove("menu-item-focus"),e.length>0){t.preventDefault(),t.stopPropagation();let d=(r,o)=>{let s=r;for(let l of e)if(s=(s+o+e.length)%e.length,!e[s].disabled)return s;return r};if(t.key==="ArrowDown")i=d(i,1);else if(t.key==="ArrowUp")i=d(i,-1);else if(t.key==="Home")i=e.findIndex(r=>!r.disabled),i===-1&&(i=0);else if(t.key==="End"){i=e.length-1;for(let r=e.length-1;r>=0;r--)if(!e[r].disabled){i=r;break}}this.setCurrentItem(e[i]),e[i].focus(),e[i].classList.add("menu-item-focus")}}}handleMouseDown(t){let e=t.target;this.isMenuItem(e)&&this.setCurrentItem(e)}handleSlotChange(){let t=this.getAllItems();t.length>0&&this.setCurrentItem(t[0])}isMenuItem(t){var e;return t.tagName.toLowerCase()==="sd-7-0-0-next-7-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes((e=t.getAttribute("role"))!=null?e:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!!this.isMenuItem(t))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(n=>{n.setAttribute("tabindex",n===t?"0":"-1")})}render(){return h`<slot @slotchange="${this.handleSlotChange}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}" @mousedown="${this.handleMouseDown}"></slot>`}};a.styles=[...m.styles,u`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
+ :host{position:relative;display:block;overflow:auto;overscroll-behavior:auto;border-radius:var(--sd-radius-md);padding-inline:var(--sd-spacing-2);padding-block:var(--sd-spacing-3);--tw-shadow:var(--sd-shadow)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}::slotted(sd-7-0-0-next-7-divider){padding-block:var(--sd-spacing-3)}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}`],c([f("slot")],a.prototype,"defaultSlot",2),a=c([p("sd-7-0-0-next-7-menu")],a);export{a};
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk.WWGARXPI.js";import{a as z,b as K,c as G}from"./chunk.23WKPZET.js";import{b as N}from"./chunk.LZRL7OLU.js";import{a as U}from"./chunk.CGQ2BPPZ.js";import{a as W}from"./chunk.VAM5SM3O.js";import{a as S}from"./chunk.4ZZFYCXX.js";import{a as _}from"./chunk.NYKJXI3Q.js";import{a as H,b as v,c as O,d as Y,h as A}from"./chunk.4SDWX3GC.js";import{b as q,e as F,i as R}from"./chunk.OBAEIKIV.js";import{e as o}from"./chunk.6EV4YU6C.js";var r=class extends A{constructor(){super();this.localize=new W(this);this.hasSlotController=new U(this,"label","help-text","tooltip");this.formControlController=new N(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.viewMonth=null;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=a.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(n=>{var s,l;return n instanceof HTMLElement&&(((s=n.classList)==null?void 0:s.contains("nav"))||((l=n.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,h,p,y,g;if(this.disabled||this.visuallyDisabled||this.readonly){(l=t.preventDefault)==null||l.call(t),(h=t.stopPropagation)==null||h.call(t);return}let e=t.target,i=e.value,n=(p=e.selectionStart)!=null?p:i.length,s=(y=t.inputType)==null?void 0:y.startsWith("delete");if(this.range){let d=i.replace(/\D/g,""),u=d.slice(0,8),m=d.slice(8,16),c=this.buildDmyFromDigits(u),w=this.buildDmyFromDigits(m),f;u.length===0?f="":u.length<8?f=c:m.length>0?f=`${c} - ${w}`:f=s?c:`${c} -`;let I=this.countDigitsBeforeCaret(i,n),M;if(I<=8){let b=this.digitIndexToDmyCaretPos(Math.min(I,8));M=Math.min(b,c.length)}else{let b=u.length<8?c.length:c.length+3,D=Math.min(I-8,8),x=this.digitIndexToDmyCaretPos(D);M=b+Math.min(x,w.length)}this.inputValue=f;let E=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(c)){let b=this.dmyToIso(c),D=b?a.parseLocalISO(b):null;D&&!this.isDisabled(D)&&this.inMinMax(D)&&this.rangeStart!==b&&(this.rangeStart=b,this.previewEnd=null,this.viewMonth=new Date(D.getFullYear(),D.getMonth(),1),this.focusedDate=a.startOfDayLocal(D),E=!0)}else this.rangeStart&&(this.rangeStart=null,E=!0),this.rangeEnd&&(this.rangeEnd=null,E=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(w)&&this.rangeStart){let b=a.parseLocalISO(this.rangeStart),D=this.dmyToIso(w),x=D?a.parseLocalISO(D):null;if(!!x&&!this.isDisabled(x)&&this.inMinMax(x)){let[$,V]=a.compareDates(b,x)<=0?[b,x]:[x,b],P=a.isSameDay($,V);if((this.allowSameDayRange||!P)&&!this.wouldRangeContainDisabled($,V)){let T=a.toLocalISODate(a.startOfDayLocal($)),k=a.toLocalISODate(a.startOfDayLocal(V));(this.rangeStart!==T||this.rangeEnd!==k)&&(this.rangeStart=T,this.rangeEnd=k,this.viewMonth=new Date(V.getFullYear(),V.getMonth(),1),this.focusedDate=a.startOfDayLocal(V),E=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,E=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),E&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var D;let b=(D=this.input)!=null?D:e;b&&(b.value=this.inputValue,b.setSelectionRange(M,M))})})}else{let d=e,u=d.value,m=(g=d.selectionStart)!=null?g:u.length,c=u.replace(/\D/g,"").slice(0,8),w=c.slice(0,2),f=c.slice(2,4),I=c.slice(4,8),M="";w.length>0&&(M+=w,w.length===2&&(M+=".")),f.length>0&&w.length===2&&(M+=f,f.length===2&&(M+=".")),I.length>0&&w.length===2&&f.length===2&&(M+=I),M=M.replace(/\.\.+/g,".");let E=this.inputValue||"";this.inputValue=M;let b=m,D=L=>{let T=[];for(let k=0;k<L.length;k++)L[k]==="."&&T.push(k);return T},x=D(E),C=D(M),$=x.filter(L=>L<m).length,P=C.filter(L=>L<m).length-$;if(P>0?b+=P:!x.includes(m)&&C.includes(m)&&(b+=1),b=Math.min(Math.max(0,b),M.length),requestAnimationFrame(()=>{var T;let L=(T=this.input)!=null?T:d;L&&(L.value=this.inputValue,L.setSelectionRange(b,b))}),/^\d{2}\.\d{2}\.\d{4}$/.test(M)){let L=this.parseInputText(M);this.applyParsedInput(L)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let d=this.rangeStart?a.parseLocalISO(this.rangeStart):null,u=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;d&&!u?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}`):d&&u&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(u)}`)}else if(this.value){let d=a.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(d)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{let e=t.detail;e&&(this.currentPlacement=e)};this.handleHeaderKeyDown=(t,e,i,n)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Tab"&&!t.shiftKey){n&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(i):this.setYear(i))}};this.onKeyDown=t=>{var s,l;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}let e=t.key,i=!0,n=new Date(this.focusedDate);switch(e){case"ArrowLeft":n.setDate(n.getDate()-1);break;case"ArrowRight":n.setDate(n.getDate()+1);break;case"ArrowUp":n.setDate(n.getDate()-7);break;case"ArrowDown":n.setDate(n.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:i=!1}if(i){t.preventDefault();let h=(s=this.viewMonth)!=null?s:this.ensureViewMonth();if(n.getMonth()!==h.getMonth()||n.getFullYear()!==h.getFullYear()){let d=new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=d;let u=this.formatMonthYear(d);this.setNavStatus(u)}let y=a.startOfDayLocal(n);y.getTime()!==((l=this.focusedDate)==null?void 0:l.getTime())&&(this.focusedDate=y);let g=y.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(g),this.requestUpdate(),requestAnimationFrame(()=>{let d=this.shadowRoot,u=d==null?void 0:d.querySelector("button.day.focused");u==null||u.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){var l;super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?a.parseLocalISO(this.value):null,e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=a.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:i,s=(l=this.viewMonth)!=null?l:new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=s,this.focusedDate=a.clampDateToMonth(n,s),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}handleOpenChange(){this.popup&&(this.popup.active=this.open&&!this.disabled&&!this.visuallyDisabled)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleViewMonthChange(){var i;if(!this.viewMonth)return;let t=this.focusedDate||this.range&&this.rangeEnd&&a.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&a.parseLocalISO(this.rangeStart)||this.value&&a.parseLocalISO(this.value)||this.today;if(!t)return;let e=a.clampDateToMonth(t,this.viewMonth);e.getTime()!==((i=this.focusedDate)==null?void 0:i.getTime())&&(this.focusedDate=e)}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?a.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=a.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var i;let e=this.input;if(e){e.value=(i=this.inputValue)!=null?i:"";let n=e.value.length;e.setSelectionRange(n,n)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?a.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null,i=t!=null?t:e;i&&(this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1),this.focusedDate=a.startOfDayLocal(i)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let n=this.input;if(n){n.value=(s=this.inputValue)!=null?s:"";let l=n.value.length;n.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return a.parseLocalISO(t)}inMinMax(t){let e=s=>{if(s==null)return null;if(s instanceof Date)return a.startOfDayLocal(s);if(typeof s=="number")return a.startOfDayLocal(new Date(s));if(typeof s=="string"){let l=this.parseISO(s);return l?a.startOfDayLocal(l):null}return null},i=e(this.min),n=e(this.max);return!(i&&t<i||n&&t>n)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),s=`${e}-${i}-${n}`;return this.disabledDatesSet.has(s)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let i="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+i},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),i=this.ordinal(e),n=t.toLocaleDateString("en-US",{month:"long"}),s=t.getFullYear();return`${i} of ${n} ${s}`}ordinal(t){let e=["th","st","nd","rd"],i=t%100,n=e[(i-20)%10]||e[i]||e[0];return t+n}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let i=JSON.parse(e);Array.isArray(i)&&(t=i)}catch(i){t=[]}else e.length>0&&(t=e.split(",").map(i=>i.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let i=a.compareDates(t,e)<=0?a.startOfDayLocal(t):a.startOfDayLocal(e),n=a.compareDates(t,e)<=0?a.startOfDayLocal(e):a.startOfDayLocal(t),s=new Date(i);for(;a.compareDates(s,n)<=0;){if(this.isDisabled(s))return!0;s.setDate(s.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=a.parseLocalISO(t);if(e||(e=a.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let i=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getFullYear());return`${i}.${n}.${s}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let i=Number(e[1]),n=Number(e[2]),s=Number(e[3]),l=new Date(s,n-1,i);if(l.getFullYear()!==s||l.getMonth()!==n-1||l.getDate()!==i)return null;let h=a.startOfDayLocal(l);return a.toLocalISODate(h)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),n=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let s=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return s&&l?`${s} ${n} ${l}`:s&&!l?`${s} ${n}`:""}parseInputText(t){var n,s;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let h=l[0];if(!h)return{start:null,end:null,valid:!0};let p=this.dmyToIso(h);return p?{start:p,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let h=(n=l[0])!=null?n:"",p=(s=l[1])!=null?s:"",y=h?this.dmyToIso(h):null,g=p?this.dmyToIso(p):null;return h&&!y?{start:null,end:null,valid:!1}:p&&!g?{start:null,end:null,valid:!1}:{start:y,end:g,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let i=this.dmyToIso(e);return i?{single:i,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var h,p,y,g;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=d=>{if(!d)return!0;let u=a.parseLocalISO(d);return!(!this.inMinMax(u)||this.isDisabled(u))},i=!1;if(this.range){let d=(h=t.start)!=null?h:null,u=(p=t.end)!=null?p:null;if(!e(d)||u&&!e(u))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let m=d?a.parseLocalISO(d):null,c=u?a.parseLocalISO(u):null;if(m&&c){if(a.compareDates(m,c)>0){let I=m;m=c,c=I}if(!this.allowSameDayRange&&a.isSameDay(m,c))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(m,c))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let w=m?a.toLocalISODate(a.startOfDayLocal(m)):null,f=c?a.toLocalISODate(a.startOfDayLocal(c)):null;if(this.rangeStart!==w||this.rangeEnd!==f){this.rangeStart=w,this.rangeEnd=f,this.previewEnd=null,i=!0;let I=(y=m!=null?m:c)!=null?y:this.today;this.viewMonth=new Date(I.getFullYear(),I.getMonth(),1),this.focusedDate=a.startOfDayLocal(I),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let n=(g=t.single)!=null?g:null;if(!e(n))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let s=n?a.parseLocalISO(n):null,l=s?a.toLocalISODate(a.startOfDayLocal(s)):null;return this.value!==l&&(this.value=l,i=!0,s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.startOfDayLocal(s)),this.emit("sd-select",{detail:{value:this.value,date:s!=null?s:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),i}buildDmyFromDigits(t){let e=t.slice(0,8),i=e.slice(0,2),n=e.slice(2,4),s=e.slice(4,8),l=i;return n.length&&(l+="."+n),s.length&&(l+="."+s),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var i,n;((n=(i=t.composedPath)==null?void 0:i.call(t))!=null?n:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled||this.readonly){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled||this.readonly){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&this.show(),this.emit("sd-focus")}setMonth(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),i=new Date(e.getFullYear(),e.getMonth()+t,1);if(i.getMonth()===e.getMonth()&&i.getFullYear()===e.getFullYear())return;this.viewMonth=i;let n=this.formatMonthYear(i);this.setNavStatus(n),this.emit("sd-month-change",{detail:{month:i}})}setYear(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),i=new Date(e.getFullYear()+t,e.getMonth(),1);if(i.getFullYear()===e.getFullYear()&&i.getMonth()===e.getMonth())return;this.viewMonth=i;let n=this.formatMonthYear(i);this.setNavStatus(n),this.emit("sd-month-year",{detail:{month:i}})}focusInitialGridDay(){var n;let t=null;if(!this.range&&this.value){let s=a.parseLocalISO(this.value);s&&(t=a.startOfDayLocal(s))}if(this.range){let s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,l=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;l?t=a.startOfDayLocal(l):s&&(t=a.startOfDayLocal(s))}let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth();if(!(s=>s?s.getFullYear()===e.getFullYear()&&s.getMonth()===e.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(e),l=s.flat().find(h=>h.getMonth()===e.getMonth()&&a.isSameDay(h,this.today)&&!this.isDisabled(h));if(l)t=a.startOfDayLocal(l);else{let h=s.flat().find(p=>p.getMonth()===e.getMonth()&&!this.isDisabled(p));t=h?a.startOfDayLocal(h):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,l=(s==null?void 0:s.querySelector("button.day.selected"))||(s==null?void 0:s.querySelector("button.day.focused"))||(s==null?void 0:s.querySelector('button.day[tabindex="0"]'))||(s==null?void 0:s.querySelector("button.day"));l==null||l.focus({preventScroll:!0})})}selectSingleDate(t){if(this.readonly||this.isDisabled(t))return;let e=a.startOfDayLocal(t),i=a.toLocalISODate(e);if(this.value===i)return;this.value=i;let n=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(n),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let s=this.input;s&&(s.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let h=s.value.length;s.setSelectionRange(h,h)})}))})}selectRangeDate(t){if(this.readonly)return;let e=a.startOfDayLocal(t),i=this.rangeStart?a.parseLocalISO(this.rangeStart):null,n=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(!i&&!n){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=l.value.length;l.setSelectionRange(p,p)})}))});return}if(i&&!n){if(this.isDisabled(e))return;if(a.isSameDay(i,e)){if(!this.allowSameDayRange){this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let d=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${d}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var m;let u=this.input;u&&(u.value=(m=this.inputValue)!=null?m:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let c=u.value.length;u.setSelectionRange(c,c)})}))});return}this.rangeStart=a.toLocalISODate(e),this.rangeEnd=a.toLocalISODate(e),this.previewEnd=null;let g=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${g}`,40),this.announceSelect(`${this.termEndSelected()}: ${g}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let d=this.input;d&&(d.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let m=d.value.length;d.setSelectionRange(m,m)})}))});return}let s=a.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(s,e))return;let[l,h]=a.compareDates(s,e)<=0?[s,e]:[e,s];this.rangeStart=a.toLocalISODate(l),this.rangeEnd=a.toLocalISODate(h),this.previewEnd=null;let p=this.formatSelectionLabel(l),y=this.formatSelectionLabel(h);this.announceSelect(`${this.termStartSelected()}: ${p}`,40),this.announceSelect(`${this.termEndSelected()}: ${y}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var d;let g=this.input;g&&(g.value=(d=this.inputValue)!=null?d:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=g.value.length;g.setSelectionRange(u,u)})}))});return}if(i&&n){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=l.value.length;l.setSelectionRange(p,p)})}))})}}selectDate(t){this.readonly||(this.range?this.selectRangeDate(t):this.selectSingleDate(t))}ensureViewMonth(){if(this.viewMonth)return this.viewMonth;let t=this.value?a.parseLocalISO(this.value):null,e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=a.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:i,s=new Date(n.getFullYear(),n.getMonth(),1);return this.viewMonth=s,s}getMonthMatrix(t){var y;let e=(y=this.firstDayOfWeek)!=null?y:1,i=new Date(t.getFullYear(),t.getMonth(),1),n=new Date(i),s=(i.getDay()-e+7)%7;n.setDate(i.getDate()-s);let l=[],h=n;for(let g=0;g<6;g++){let d=[];for(let u=0;u<7;u++)d.push(new Date(h)),h.setDate(h.getDate()+1);l.push(d)}let p=g=>g.every(d=>d.getMonth()!==t.getMonth());for(;l.length>0&&p(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var n;let t=(n=this.firstDayOfWeek)!=null?n:1,e=new Date(2021,7,1),i=[];for(let s=0;s<7;s++){let l=new Date(e);l.setDate(e.getDate()+(t+s)%7);try{i.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(h){i.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return i}getTabTargetDayForCurrentView(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),i=t.flat().find(l=>l.getMonth()===e.getMonth()&&a.isSameDay(l,this.today)&&!this.isDisabled(l));if(i)return a.startOfDayLocal(i);let n=t.flat().find(l=>l.getMonth()===e.getMonth()&&!this.isDisabled(l));return n?a.startOfDayLocal(n):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(e&&!i){let n=a.startOfDayLocal(t);this.previewEnd=this.isDisabled(n)?null:n,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var u,m;let t=(u=this.viewMonth)!=null?u:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),i=this.formatMonthYear(t),n=this.weekdayLabels(),s=this.value?this.parseISO(this.value):null,l=this.rangeStart?this.parseISO(this.rangeStart):null,h=this.rangeEnd?this.parseISO(this.rangeEnd):null,p=this.previewEnd,y=c=>!this.range||!l||h||!p?!1:a.isBetweenInclusive(c,l,p),g=this.getTabTargetDayForCurrentView(e),d=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color";return F`<div part="datepicker" class="${S("w-[284px] z-50 bg-white py-3 px-4",this.open?"block shadow-listbox":"hidden",(m=this.currentPlacement)!=null&&m.startsWith("bottom")?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius","border-primary")}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="${S("nav prev w-6 h-6 hover:cursor-pointer",d)}" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-7-0-0-next-6-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-7-0-0-next-6-icon></button> <button type="button" tabindex="0" class="${S("nav prev w-6 h-6 hover:cursor-pointer",d)}" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-7-0-0-next-6-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-7-0-0-next-6-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base" part="month-label" aria-live="polite">${i}</div><div class="flex items-center"><button type="button" tabindex="0" class="${S("nav next w-6 h-6 hover:cursor-pointer",d)}" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-7-0-0-next-6-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-7-0-0-next-6-icon></button> <button type="button" tabindex="0" class="${S("nav next w-6 h-6 hover:cursor-pointer",d)}" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-7-0-0-next-6-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-7-0-0-next-6-icon></button></div></div><sd-7-0-0-next-6-divider></sd-7-0-0-next-6-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${i}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${n.map((c,w)=>F`<div role="columnheader" aria-colindex="${w+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${c}" title="${c}" id="${"col-"+(w+1)}">${c}</div>`)}</div>${e.map((c,w)=>F`<div class="grid-row grid grid-cols-7 ${w===0?"mt-2":""}" role="row" aria-rowindex="${w+2}">${c.map((f,I)=>{let M=f.getMonth()===t.getMonth(),E=this.isDisabled(f)||!this.inMinMax(f),b=a.isSameDay(f,this.focusedDate),D=a.isSameDay(f,this.today),x=!this.range&&s?a.isSameDay(f,s):!1,C=this.range&&l?a.isSameDay(f,l):!1,$=this.range&&h?a.isSameDay(f,h):!1,V=this.range&&l&&h?a.isBetweenInclusive(f,l,h):!1,P=y(f)&&!E,L=-1,T=g&&a.isSameDay(f,g);(this.tabbingIntoGrid&&T||!this.tabbingIntoGrid&&b)&&(L=0);let k=this.isWeekend(f),j=f.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),B=C?this.localize.term("startDateSelected"):$?this.localize.term("endDateSelected"):void 0;return F`<button type="button" part="day" class="${S("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",C||$?b?"outline-none sd-7-0-0-next-6-datepicker__date-item--selected--hover-color-background sd-7-0-0-next-6-datepicker__date-item--selected--hover-color-text":"outline-none sd-7-0-0-next-6-datepicker__date-item--selected-color-background sd-7-0-0-next-6-datepicker__date-item--selected-color-text hover:sd-7-0-0-next-6-datepicker__date-item--selected--hover-color-background hover:sd-7-0-0-next-6-datepicker__date-item--selected--hover-color-text":"hover:sd-7-0-0-next-6-datepicker__date-item--hover--default-color-text",!C&&!$&&!V&&"hover:sd-7-0-0-next-6-datepicker__date-item--hover--default-color-background",x?"selected outline-none border-primary sd-7-0-0-next-6-datepicker__date-item--selected-color-background sd-7-0-0-next-6-datepicker__date-item--selected-color-text hover:sd-7-0-0-next-6-datepicker__date-item--selected--hover-color-text hover:sd-7-0-0-next-6-datepicker__date-item--selected--hover-color-background":M?this.isInDisabledDates(f)||!this.inMinMax(f)?"out-month text-neutral-500":this.disabledWeekends&&k?"weekend-day text-neutral-500":"in-month sd-7-0-0-next-6-datepicker__date-item--default-color-text":this.disabledWeekends&&k?"out-month weekend-day text-neutral-500":k?"out-month weekend-day text-neutral-700":"out-month text-neutral-700 hover:sd-7-0-0-next-6-datepicker__date-item--hover--prev-next-color-text hover:sd-7-0-0-next-6-datepicker__date-item--hover--prev-next-color-background",C?"rounded-l-md rounded-r-none":"",$?"range-end rounded-r-md rounded-l-none":"",V&&!C&&!$?"in-range selected sd-7-0-0-next-6-datepicker__date-item--range-color-background rounded-none hover:sd-7-0-0-next-6-datepicker__date-item--selected--hover-color-background hover:sd-7-0-0-next-6-datepicker__date-item--selected--hover-color-text":"",!V&&P&&!C&&!$?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",D&&!x&&!C&&!$&&b?"today border-[1px] border-primary sd-7-0-0-next-6-datepicker__date-item--current-font-weight":"",E?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",b&&!D?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${I+1}" aria-labelledby="${"col-"+(I+1)}" .tabIndex="${L}" ?disabled="${E||this.disabled||this.readonly}" aria-disabled="${E||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${x||V||C||$?"true":"false"}" aria-current="${D?"date":R}" aria-label="${j}" aria-roledescription="${B!=null?B:R}" @focus="${()=>this.focusedDate=a.startOfDayLocal(f)}" @mouseenter="${()=>this.onDayMouseEnter(f)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=a.startOfDayLocal(f),this.selectDate(f)}}">${f.getDate()}</button>`})}</div>`)}</div></div>`}render(){var m,c;let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,i=this.helpText?!0:!!t.helpText,n=!!t.tooltip,s=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.floatingLabel&&e&&(this.hasFocus||this.open||s)&&!this.disabled&&!this.visuallyDisabled,h=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",p={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],y={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],g=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":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",d={disabled:"border-neutral-500",visuallyDisabled:"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:"form-control-color-border"}[g],u=this.size==="sm"?"text-sm":"text-base";return F`<div part="form-control" class="${S("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||n?F`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${S(e?"inline-block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"form-control-color-text",u)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?F`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${S("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${e&&this.floatingLabel?F`<label id="label" part="form-control-floating-label" class="${S("absolute left-4 z-20 pointer-events-none transition-all duration-200 form-control--filled__floating-label-color-text",l?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",l&&"mt-1")}" for="input"><span class="${S("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",l&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${S("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",d,this.open&&((m=this.currentPlacement)!=null&&m.startsWith("bottom")?this.open&&this.alignment==="left"?"rounded-bl-none":"rounded-br-none":this.open&&this.alignment==="left"?"rounded-tl-none":"rounded-tr-none"))}"></div><sd-7-0-0-next-6-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${S("inline-flex relative w-full",(c=this.currentPlacement)!=null&&c.startsWith("bottom")?"origin-top":"origin-bottom")}" placement="${this.alignment==="left"?`${this.placement}-start`:`${this.placement}-end`}" flip shift auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${S("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",g==="disabled"||g==="visuallyDisabled"?"text-neutral-500":"text-black",g==="invalid"&&"form-control--invalid-color-background",g==="active"&&"shadow")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${i?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${S("min-w-0 grow focus:outline-none bg-transparent hover:cursor-pointer text-black",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],u,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||l?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?F`<sd-7-0-0-next-6-icon part="invalid-icon" class="${S("text-error",p,y)}" library="_internal" name="risk"></sd-7-0-0-next-6-icon>`:""} ${this.showValidStyle&&this.styleOnValid?F`<sd-7-0-0-next-6-icon class="${S("text-success shrink-0",p,y)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-7-0-0-next-6-icon>`:""}<sd-7-0-0-next-6-icon class="${S(h,p,y,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-7-0-0-next-6-icon></div>${this.renderCalendar()}</sd-7-0-0-next-6-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${S("text-sm mt-1",i?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!i}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};r.styles=[...A.styles,q`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}.today:hover{border-color:rgba(var(--sd-datepicker__date-item--hover--default-color-border,rgba(var(--sd-color-primary-500))))}.in-range,.today{color:rgba(var(--sd-datepicker__date-item--current-color-text,rgba(var(--sd-color-primary))))}.icon-color{color:rgba(var(--sd-form-control-color-icon-fill))}.month-label{color:rgba(var(--sd-color-border-primary))!important}`],o([v({type:String,reflect:!0})],r.prototype,"locale",2),o([v({type:String,converter:z,reflect:!0})],r.prototype,"value",2),o([v({type:Boolean,reflect:!0})],r.prototype,"range",2),o([v({attribute:"range-start",converter:z,reflect:!0})],r.prototype,"rangeStart",2),o([v({attribute:"range-end",converter:z,reflect:!0})],r.prototype,"rangeEnd",2),o([v({type:Boolean})],r.prototype,"allowSameDayRange",2),o([v({type:String,converter:z,reflect:!0})],r.prototype,"min",2),o([v({type:String,converter:z,reflect:!0})],r.prototype,"max",2),o([v({attribute:"view-month",converter:K})],r.prototype,"viewMonth",2),o([v({type:Number})],r.prototype,"firstDayOfWeek",2),o([v({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],r.prototype,"disabledWeekends",2),o([v({attribute:"disabled-dates",converter:G})],r.prototype,"disabledDates",2),o([v({attribute:!1})],r.prototype,"isDateDisabled",2),o([v({type:String,reflect:!0})],r.prototype,"size",2),o([v({type:String})],r.prototype,"alignment",2),o([v({type:String,reflect:!0})],r.prototype,"label",2),o([v({type:String,attribute:"help-text",reflect:!0})],r.prototype,"helpText",2),o([v({attribute:"floating-label",type:Boolean,reflect:!0})],r.prototype,"floatingLabel",2),o([v({type:Boolean,reflect:!0})],r.prototype,"disabled",2),o([v({type:Boolean,reflect:!0})],r.prototype,"required",2),o([v({type:Boolean,attribute:"visually-disabled"})],r.prototype,"visuallyDisabled",2),o([v({type:Boolean,reflect:!0,attribute:"style-on-valid"})],r.prototype,"styleOnValid",2),o([v({type:Boolean,reflect:!0})],r.prototype,"readonly",2),o([v({type:String,reflect:!0})],r.prototype,"placement",2),o([v({type:String,reflect:!0})],r.prototype,"placeholder",2),o([v({reflect:!0})],r.prototype,"name",2),o([v({type:String,reflect:!0})],r.prototype,"form",2),o([O()],r.prototype,"open",2),o([O()],r.prototype,"focusedDate",2),o([O()],r.prototype,"today",2),o([O()],r.prototype,"disabledDatesSet",2),o([O()],r.prototype,"previewEnd",2),o([O()],r.prototype,"statusNavText",2),o([O()],r.prototype,"statusSelectText",2),o([O()],r.prototype,"hasFocus",2),o([O()],r.prototype,"showValidStyle",2),o([O()],r.prototype,"showInvalidStyle",2),o([O()],r.prototype,"currentPlacement",2),o([O()],r.prototype,"inputValue",2),o([Y("sd-7-0-0-next-6-popup")],r.prototype,"popup",2),o([Y("#invalid-message")],r.prototype,"invalidMessage",2),o([Y("#input")],r.prototype,"input",2),o([_("open",{waitUntilFirstUpdate:!0})],r.prototype,"handleOpenChange",1),o([_("locale")],r.prototype,"handleLocaleChange",1),o([_("viewMonth")],r.prototype,"handleViewMonthChange",1),o([_("disabledDates")],r.prototype,"handleDisabledDatesChange",1),o([_("value")],r.prototype,"handleValueChange",1),o([_("rangeStart"),_("rangeEnd")],r.prototype,"handleRangeChange",1),o([_(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],r.prototype,"handleDisabledChange",1),o([_(["size","floatingLabel"])],r.prototype,"handleSizeChange",1),r=o([H("sd-7-0-0-next-6-datepicker")],r);export{r as a};
1
+ import{a}from"./chunk.WWGARXPI.js";import{a as z,b as K,c as G}from"./chunk.23WKPZET.js";import{b as N}from"./chunk.LZRL7OLU.js";import{a as U}from"./chunk.CGQ2BPPZ.js";import{a as W}from"./chunk.VAM5SM3O.js";import{a as S}from"./chunk.4ZZFYCXX.js";import{a as _}from"./chunk.NYKJXI3Q.js";import{a as H,b as v,c as O,d as Y,h as A}from"./chunk.4SDWX3GC.js";import{b as q,e as F,i as R}from"./chunk.OBAEIKIV.js";import{e as o}from"./chunk.6EV4YU6C.js";var r=class extends A{constructor(){super();this.localize=new W(this);this.hasSlotController=new U(this,"label","help-text","tooltip");this.formControlController=new N(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.viewMonth=null;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=a.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(n=>{var s,l;return n instanceof HTMLElement&&(((s=n.classList)==null?void 0:s.contains("nav"))||((l=n.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,h,p,y,g;if(this.disabled||this.visuallyDisabled||this.readonly){(l=t.preventDefault)==null||l.call(t),(h=t.stopPropagation)==null||h.call(t);return}let e=t.target,i=e.value,n=(p=e.selectionStart)!=null?p:i.length,s=(y=t.inputType)==null?void 0:y.startsWith("delete");if(this.range){let d=i.replace(/\D/g,""),u=d.slice(0,8),m=d.slice(8,16),c=this.buildDmyFromDigits(u),w=this.buildDmyFromDigits(m),f;u.length===0?f="":u.length<8?f=c:m.length>0?f=`${c} - ${w}`:f=s?c:`${c} -`;let I=this.countDigitsBeforeCaret(i,n),M;if(I<=8){let b=this.digitIndexToDmyCaretPos(Math.min(I,8));M=Math.min(b,c.length)}else{let b=u.length<8?c.length:c.length+3,D=Math.min(I-8,8),x=this.digitIndexToDmyCaretPos(D);M=b+Math.min(x,w.length)}this.inputValue=f;let E=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(c)){let b=this.dmyToIso(c),D=b?a.parseLocalISO(b):null;D&&!this.isDisabled(D)&&this.inMinMax(D)&&this.rangeStart!==b&&(this.rangeStart=b,this.previewEnd=null,this.viewMonth=new Date(D.getFullYear(),D.getMonth(),1),this.focusedDate=a.startOfDayLocal(D),E=!0)}else this.rangeStart&&(this.rangeStart=null,E=!0),this.rangeEnd&&(this.rangeEnd=null,E=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(w)&&this.rangeStart){let b=a.parseLocalISO(this.rangeStart),D=this.dmyToIso(w),x=D?a.parseLocalISO(D):null;if(!!x&&!this.isDisabled(x)&&this.inMinMax(x)){let[$,V]=a.compareDates(b,x)<=0?[b,x]:[x,b],P=a.isSameDay($,V);if((this.allowSameDayRange||!P)&&!this.wouldRangeContainDisabled($,V)){let T=a.toLocalISODate(a.startOfDayLocal($)),k=a.toLocalISODate(a.startOfDayLocal(V));(this.rangeStart!==T||this.rangeEnd!==k)&&(this.rangeStart=T,this.rangeEnd=k,this.viewMonth=new Date(V.getFullYear(),V.getMonth(),1),this.focusedDate=a.startOfDayLocal(V),E=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,E=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),E&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var D;let b=(D=this.input)!=null?D:e;b&&(b.value=this.inputValue,b.setSelectionRange(M,M))})})}else{let d=e,u=d.value,m=(g=d.selectionStart)!=null?g:u.length,c=u.replace(/\D/g,"").slice(0,8),w=c.slice(0,2),f=c.slice(2,4),I=c.slice(4,8),M="";w.length>0&&(M+=w,w.length===2&&(M+=".")),f.length>0&&w.length===2&&(M+=f,f.length===2&&(M+=".")),I.length>0&&w.length===2&&f.length===2&&(M+=I),M=M.replace(/\.\.+/g,".");let E=this.inputValue||"";this.inputValue=M;let b=m,D=L=>{let T=[];for(let k=0;k<L.length;k++)L[k]==="."&&T.push(k);return T},x=D(E),C=D(M),$=x.filter(L=>L<m).length,P=C.filter(L=>L<m).length-$;if(P>0?b+=P:!x.includes(m)&&C.includes(m)&&(b+=1),b=Math.min(Math.max(0,b),M.length),requestAnimationFrame(()=>{var T;let L=(T=this.input)!=null?T:d;L&&(L.value=this.inputValue,L.setSelectionRange(b,b))}),/^\d{2}\.\d{2}\.\d{4}$/.test(M)){let L=this.parseInputText(M);this.applyParsedInput(L)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let d=this.rangeStart?a.parseLocalISO(this.rangeStart):null,u=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;d&&!u?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}`):d&&u&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(u)}`)}else if(this.value){let d=a.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(d)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{let e=t.detail;e&&(this.currentPlacement=e)};this.handleHeaderKeyDown=(t,e,i,n)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Tab"&&!t.shiftKey){n&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(i):this.setYear(i))}};this.onKeyDown=t=>{var s,l;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}let e=t.key,i=!0,n=new Date(this.focusedDate);switch(e){case"ArrowLeft":n.setDate(n.getDate()-1);break;case"ArrowRight":n.setDate(n.getDate()+1);break;case"ArrowUp":n.setDate(n.getDate()-7);break;case"ArrowDown":n.setDate(n.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:i=!1}if(i){t.preventDefault();let h=(s=this.viewMonth)!=null?s:this.ensureViewMonth();if(n.getMonth()!==h.getMonth()||n.getFullYear()!==h.getFullYear()){let d=new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=d;let u=this.formatMonthYear(d);this.setNavStatus(u)}let y=a.startOfDayLocal(n);y.getTime()!==((l=this.focusedDate)==null?void 0:l.getTime())&&(this.focusedDate=y);let g=y.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(g),this.requestUpdate(),requestAnimationFrame(()=>{let d=this.shadowRoot,u=d==null?void 0:d.querySelector("button.day.focused");u==null||u.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){var l;super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?a.parseLocalISO(this.value):null,e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=a.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:i,s=(l=this.viewMonth)!=null?l:new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=s,this.focusedDate=a.clampDateToMonth(n,s),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}handleOpenChange(){this.popup&&(this.popup.active=this.open&&!this.disabled&&!this.visuallyDisabled)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleViewMonthChange(){var i;if(!this.viewMonth)return;let t=this.focusedDate||this.range&&this.rangeEnd&&a.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&a.parseLocalISO(this.rangeStart)||this.value&&a.parseLocalISO(this.value)||this.today;if(!t)return;let e=a.clampDateToMonth(t,this.viewMonth);e.getTime()!==((i=this.focusedDate)==null?void 0:i.getTime())&&(this.focusedDate=e)}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?a.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=a.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var i;let e=this.input;if(e){e.value=(i=this.inputValue)!=null?i:"";let n=e.value.length;e.setSelectionRange(n,n)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?a.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null,i=t!=null?t:e;i&&(this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1),this.focusedDate=a.startOfDayLocal(i)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let n=this.input;if(n){n.value=(s=this.inputValue)!=null?s:"";let l=n.value.length;n.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return a.parseLocalISO(t)}inMinMax(t){let e=s=>{if(s==null)return null;if(s instanceof Date)return a.startOfDayLocal(s);if(typeof s=="number")return a.startOfDayLocal(new Date(s));if(typeof s=="string"){let l=this.parseISO(s);return l?a.startOfDayLocal(l):null}return null},i=e(this.min),n=e(this.max);return!(i&&t<i||n&&t>n)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),s=`${e}-${i}-${n}`;return this.disabledDatesSet.has(s)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let i="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+i},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),i=this.ordinal(e),n=t.toLocaleDateString("en-US",{month:"long"}),s=t.getFullYear();return`${i} of ${n} ${s}`}ordinal(t){let e=["th","st","nd","rd"],i=t%100,n=e[(i-20)%10]||e[i]||e[0];return t+n}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let i=JSON.parse(e);Array.isArray(i)&&(t=i)}catch(i){t=[]}else e.length>0&&(t=e.split(",").map(i=>i.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let i=a.compareDates(t,e)<=0?a.startOfDayLocal(t):a.startOfDayLocal(e),n=a.compareDates(t,e)<=0?a.startOfDayLocal(e):a.startOfDayLocal(t),s=new Date(i);for(;a.compareDates(s,n)<=0;){if(this.isDisabled(s))return!0;s.setDate(s.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=a.parseLocalISO(t);if(e||(e=a.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let i=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getFullYear());return`${i}.${n}.${s}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let i=Number(e[1]),n=Number(e[2]),s=Number(e[3]),l=new Date(s,n-1,i);if(l.getFullYear()!==s||l.getMonth()!==n-1||l.getDate()!==i)return null;let h=a.startOfDayLocal(l);return a.toLocalISODate(h)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),n=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let s=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return s&&l?`${s} ${n} ${l}`:s&&!l?`${s} ${n}`:""}parseInputText(t){var n,s;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let h=l[0];if(!h)return{start:null,end:null,valid:!0};let p=this.dmyToIso(h);return p?{start:p,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let h=(n=l[0])!=null?n:"",p=(s=l[1])!=null?s:"",y=h?this.dmyToIso(h):null,g=p?this.dmyToIso(p):null;return h&&!y?{start:null,end:null,valid:!1}:p&&!g?{start:null,end:null,valid:!1}:{start:y,end:g,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let i=this.dmyToIso(e);return i?{single:i,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var h,p,y,g;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=d=>{if(!d)return!0;let u=a.parseLocalISO(d);return!(!this.inMinMax(u)||this.isDisabled(u))},i=!1;if(this.range){let d=(h=t.start)!=null?h:null,u=(p=t.end)!=null?p:null;if(!e(d)||u&&!e(u))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let m=d?a.parseLocalISO(d):null,c=u?a.parseLocalISO(u):null;if(m&&c){if(a.compareDates(m,c)>0){let I=m;m=c,c=I}if(!this.allowSameDayRange&&a.isSameDay(m,c))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(m,c))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let w=m?a.toLocalISODate(a.startOfDayLocal(m)):null,f=c?a.toLocalISODate(a.startOfDayLocal(c)):null;if(this.rangeStart!==w||this.rangeEnd!==f){this.rangeStart=w,this.rangeEnd=f,this.previewEnd=null,i=!0;let I=(y=m!=null?m:c)!=null?y:this.today;this.viewMonth=new Date(I.getFullYear(),I.getMonth(),1),this.focusedDate=a.startOfDayLocal(I),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let n=(g=t.single)!=null?g:null;if(!e(n))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let s=n?a.parseLocalISO(n):null,l=s?a.toLocalISODate(a.startOfDayLocal(s)):null;return this.value!==l&&(this.value=l,i=!0,s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.startOfDayLocal(s)),this.emit("sd-select",{detail:{value:this.value,date:s!=null?s:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),i}buildDmyFromDigits(t){let e=t.slice(0,8),i=e.slice(0,2),n=e.slice(2,4),s=e.slice(4,8),l=i;return n.length&&(l+="."+n),s.length&&(l+="."+s),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var i,n;((n=(i=t.composedPath)==null?void 0:i.call(t))!=null?n:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled||this.readonly){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled||this.readonly){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&this.show(),this.emit("sd-focus")}setMonth(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),i=new Date(e.getFullYear(),e.getMonth()+t,1);if(i.getMonth()===e.getMonth()&&i.getFullYear()===e.getFullYear())return;this.viewMonth=i;let n=this.formatMonthYear(i);this.setNavStatus(n),this.emit("sd-month-change",{detail:{month:i}})}setYear(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),i=new Date(e.getFullYear()+t,e.getMonth(),1);if(i.getFullYear()===e.getFullYear()&&i.getMonth()===e.getMonth())return;this.viewMonth=i;let n=this.formatMonthYear(i);this.setNavStatus(n),this.emit("sd-month-year",{detail:{month:i}})}focusInitialGridDay(){var n;let t=null;if(!this.range&&this.value){let s=a.parseLocalISO(this.value);s&&(t=a.startOfDayLocal(s))}if(this.range){let s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,l=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;l?t=a.startOfDayLocal(l):s&&(t=a.startOfDayLocal(s))}let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth();if(!(s=>s?s.getFullYear()===e.getFullYear()&&s.getMonth()===e.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(e),l=s.flat().find(h=>h.getMonth()===e.getMonth()&&a.isSameDay(h,this.today)&&!this.isDisabled(h));if(l)t=a.startOfDayLocal(l);else{let h=s.flat().find(p=>p.getMonth()===e.getMonth()&&!this.isDisabled(p));t=h?a.startOfDayLocal(h):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,l=(s==null?void 0:s.querySelector("button.day.selected"))||(s==null?void 0:s.querySelector("button.day.focused"))||(s==null?void 0:s.querySelector('button.day[tabindex="0"]'))||(s==null?void 0:s.querySelector("button.day"));l==null||l.focus({preventScroll:!0})})}selectSingleDate(t){if(this.readonly||this.isDisabled(t))return;let e=a.startOfDayLocal(t),i=a.toLocalISODate(e);if(this.value===i)return;this.value=i;let n=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(n),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let s=this.input;s&&(s.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let h=s.value.length;s.setSelectionRange(h,h)})}))})}selectRangeDate(t){if(this.readonly)return;let e=a.startOfDayLocal(t),i=this.rangeStart?a.parseLocalISO(this.rangeStart):null,n=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(!i&&!n){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=l.value.length;l.setSelectionRange(p,p)})}))});return}if(i&&!n){if(this.isDisabled(e))return;if(a.isSameDay(i,e)){if(!this.allowSameDayRange){this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let d=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${d}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var m;let u=this.input;u&&(u.value=(m=this.inputValue)!=null?m:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let c=u.value.length;u.setSelectionRange(c,c)})}))});return}this.rangeStart=a.toLocalISODate(e),this.rangeEnd=a.toLocalISODate(e),this.previewEnd=null;let g=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${g}`,40),this.announceSelect(`${this.termEndSelected()}: ${g}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let d=this.input;d&&(d.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let m=d.value.length;d.setSelectionRange(m,m)})}))});return}let s=a.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(s,e))return;let[l,h]=a.compareDates(s,e)<=0?[s,e]:[e,s];this.rangeStart=a.toLocalISODate(l),this.rangeEnd=a.toLocalISODate(h),this.previewEnd=null;let p=this.formatSelectionLabel(l),y=this.formatSelectionLabel(h);this.announceSelect(`${this.termStartSelected()}: ${p}`,40),this.announceSelect(`${this.termEndSelected()}: ${y}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var d;let g=this.input;g&&(g.value=(d=this.inputValue)!=null?d:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=g.value.length;g.setSelectionRange(u,u)})}))});return}if(i&&n){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=l.value.length;l.setSelectionRange(p,p)})}))})}}selectDate(t){this.readonly||(this.range?this.selectRangeDate(t):this.selectSingleDate(t))}ensureViewMonth(){if(this.viewMonth)return this.viewMonth;let t=this.value?a.parseLocalISO(this.value):null,e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=a.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:i,s=new Date(n.getFullYear(),n.getMonth(),1);return this.viewMonth=s,s}getMonthMatrix(t){var y;let e=(y=this.firstDayOfWeek)!=null?y:1,i=new Date(t.getFullYear(),t.getMonth(),1),n=new Date(i),s=(i.getDay()-e+7)%7;n.setDate(i.getDate()-s);let l=[],h=n;for(let g=0;g<6;g++){let d=[];for(let u=0;u<7;u++)d.push(new Date(h)),h.setDate(h.getDate()+1);l.push(d)}let p=g=>g.every(d=>d.getMonth()!==t.getMonth());for(;l.length>0&&p(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var n;let t=(n=this.firstDayOfWeek)!=null?n:1,e=new Date(2021,7,1),i=[];for(let s=0;s<7;s++){let l=new Date(e);l.setDate(e.getDate()+(t+s)%7);try{i.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(h){i.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return i}getTabTargetDayForCurrentView(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),i=t.flat().find(l=>l.getMonth()===e.getMonth()&&a.isSameDay(l,this.today)&&!this.isDisabled(l));if(i)return a.startOfDayLocal(i);let n=t.flat().find(l=>l.getMonth()===e.getMonth()&&!this.isDisabled(l));return n?a.startOfDayLocal(n):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(e&&!i){let n=a.startOfDayLocal(t);this.previewEnd=this.isDisabled(n)?null:n,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var u,m;let t=(u=this.viewMonth)!=null?u:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),i=this.formatMonthYear(t),n=this.weekdayLabels(),s=this.value?this.parseISO(this.value):null,l=this.rangeStart?this.parseISO(this.rangeStart):null,h=this.rangeEnd?this.parseISO(this.rangeEnd):null,p=this.previewEnd,y=c=>!this.range||!l||h||!p?!1:a.isBetweenInclusive(c,l,p),g=this.getTabTargetDayForCurrentView(e),d=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color";return F`<div part="datepicker" class="${S("w-[284px] z-50 bg-white py-3 px-4",this.open?"block shadow-listbox":"hidden",(m=this.currentPlacement)!=null&&m.startsWith("bottom")?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius","border-primary")}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="${S("nav prev w-6 h-6 hover:cursor-pointer",d)}" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-7-0-0-next-7-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-7-0-0-next-7-icon></button> <button type="button" tabindex="0" class="${S("nav prev w-6 h-6 hover:cursor-pointer",d)}" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-7-0-0-next-7-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-7-0-0-next-7-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base" part="month-label" aria-live="polite">${i}</div><div class="flex items-center"><button type="button" tabindex="0" class="${S("nav next w-6 h-6 hover:cursor-pointer",d)}" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-7-0-0-next-7-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-7-0-0-next-7-icon></button> <button type="button" tabindex="0" class="${S("nav next w-6 h-6 hover:cursor-pointer",d)}" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-7-0-0-next-7-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-7-0-0-next-7-icon></button></div></div><sd-7-0-0-next-7-divider></sd-7-0-0-next-7-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${i}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${n.map((c,w)=>F`<div role="columnheader" aria-colindex="${w+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${c}" title="${c}" id="${"col-"+(w+1)}">${c}</div>`)}</div>${e.map((c,w)=>F`<div class="grid-row grid grid-cols-7 ${w===0?"mt-2":""}" role="row" aria-rowindex="${w+2}">${c.map((f,I)=>{let M=f.getMonth()===t.getMonth(),E=this.isDisabled(f)||!this.inMinMax(f),b=a.isSameDay(f,this.focusedDate),D=a.isSameDay(f,this.today),x=!this.range&&s?a.isSameDay(f,s):!1,C=this.range&&l?a.isSameDay(f,l):!1,$=this.range&&h?a.isSameDay(f,h):!1,V=this.range&&l&&h?a.isBetweenInclusive(f,l,h):!1,P=y(f)&&!E,L=-1,T=g&&a.isSameDay(f,g);(this.tabbingIntoGrid&&T||!this.tabbingIntoGrid&&b)&&(L=0);let k=this.isWeekend(f),j=f.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),B=C?this.localize.term("startDateSelected"):$?this.localize.term("endDateSelected"):void 0;return F`<button type="button" part="day" class="${S("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",C||$?b?"outline-none sd-7-0-0-next-7-datepicker__date-item--selected--hover-color-background sd-7-0-0-next-7-datepicker__date-item--selected--hover-color-text":"outline-none sd-7-0-0-next-7-datepicker__date-item--selected-color-background sd-7-0-0-next-7-datepicker__date-item--selected-color-text hover:sd-7-0-0-next-7-datepicker__date-item--selected--hover-color-background hover:sd-7-0-0-next-7-datepicker__date-item--selected--hover-color-text":"hover:sd-7-0-0-next-7-datepicker__date-item--hover--default-color-text",!C&&!$&&!V&&"hover:sd-7-0-0-next-7-datepicker__date-item--hover--default-color-background",x?"selected outline-none border-primary sd-7-0-0-next-7-datepicker__date-item--selected-color-background sd-7-0-0-next-7-datepicker__date-item--selected-color-text hover:sd-7-0-0-next-7-datepicker__date-item--selected--hover-color-text hover:sd-7-0-0-next-7-datepicker__date-item--selected--hover-color-background":M?this.isInDisabledDates(f)||!this.inMinMax(f)?"out-month text-neutral-500":this.disabledWeekends&&k?"weekend-day text-neutral-500":"in-month sd-7-0-0-next-7-datepicker__date-item--default-color-text":this.disabledWeekends&&k?"out-month weekend-day text-neutral-500":k?"out-month weekend-day text-neutral-700":"out-month text-neutral-700 hover:sd-7-0-0-next-7-datepicker__date-item--hover--prev-next-color-text hover:sd-7-0-0-next-7-datepicker__date-item--hover--prev-next-color-background",C?"rounded-l-md rounded-r-none":"",$?"range-end rounded-r-md rounded-l-none":"",V&&!C&&!$?"in-range selected sd-7-0-0-next-7-datepicker__date-item--range-color-background rounded-none hover:sd-7-0-0-next-7-datepicker__date-item--selected--hover-color-background hover:sd-7-0-0-next-7-datepicker__date-item--selected--hover-color-text":"",!V&&P&&!C&&!$?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",D&&!x&&!C&&!$&&b?"today border-[1px] border-primary sd-7-0-0-next-7-datepicker__date-item--current-font-weight":"",E?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",b&&!D?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${I+1}" aria-labelledby="${"col-"+(I+1)}" .tabIndex="${L}" ?disabled="${E||this.disabled||this.readonly}" aria-disabled="${E||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${x||V||C||$?"true":"false"}" aria-current="${D?"date":R}" aria-label="${j}" aria-roledescription="${B!=null?B:R}" @focus="${()=>this.focusedDate=a.startOfDayLocal(f)}" @mouseenter="${()=>this.onDayMouseEnter(f)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=a.startOfDayLocal(f),this.selectDate(f)}}">${f.getDate()}</button>`})}</div>`)}</div></div>`}render(){var m,c;let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,i=this.helpText?!0:!!t.helpText,n=!!t.tooltip,s=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.floatingLabel&&e&&(this.hasFocus||this.open||s)&&!this.disabled&&!this.visuallyDisabled,h=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",p={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],y={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],g=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":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",d={disabled:"border-neutral-500",visuallyDisabled:"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:"form-control-color-border"}[g],u=this.size==="sm"?"text-sm":"text-base";return F`<div part="form-control" class="${S("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||n?F`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${S(e?"inline-block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"form-control-color-text",u)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?F`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${S("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${e&&this.floatingLabel?F`<label id="label" part="form-control-floating-label" class="${S("absolute left-4 z-20 pointer-events-none transition-all duration-200 form-control--filled__floating-label-color-text",l?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",l&&"mt-1")}" for="input"><span class="${S("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",l&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${S("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",d,this.open&&((m=this.currentPlacement)!=null&&m.startsWith("bottom")?this.open&&this.alignment==="left"?"rounded-bl-none":"rounded-br-none":this.open&&this.alignment==="left"?"rounded-tl-none":"rounded-tr-none"))}"></div><sd-7-0-0-next-7-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${S("inline-flex relative w-full",(c=this.currentPlacement)!=null&&c.startsWith("bottom")?"origin-top":"origin-bottom")}" placement="${this.alignment==="left"?`${this.placement}-start`:`${this.placement}-end`}" flip shift auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${S("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",g==="disabled"||g==="visuallyDisabled"?"text-neutral-500":"text-black",g==="invalid"&&"form-control--invalid-color-background",g==="active"&&"shadow")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${i?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${S("min-w-0 grow focus:outline-none bg-transparent hover:cursor-pointer text-black",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],u,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||l?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?F`<sd-7-0-0-next-7-icon part="invalid-icon" class="${S("text-error",p,y)}" library="_internal" name="risk"></sd-7-0-0-next-7-icon>`:""} ${this.showValidStyle&&this.styleOnValid?F`<sd-7-0-0-next-7-icon class="${S("text-success shrink-0",p,y)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-7-0-0-next-7-icon>`:""}<sd-7-0-0-next-7-icon class="${S(h,p,y,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-7-0-0-next-7-icon></div>${this.renderCalendar()}</sd-7-0-0-next-7-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${S("text-sm mt-1",i?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!i}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};r.styles=[...A.styles,q`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}.today:hover{border-color:rgba(var(--sd-datepicker__date-item--hover--default-color-border,rgba(var(--sd-color-primary-500))))}.in-range,.today{color:rgba(var(--sd-datepicker__date-item--current-color-text,rgba(var(--sd-color-primary))))}.icon-color{color:rgba(var(--sd-form-control-color-icon-fill))}.month-label{color:rgba(var(--sd-color-border-primary))!important}`],o([v({type:String,reflect:!0})],r.prototype,"locale",2),o([v({type:String,converter:z,reflect:!0})],r.prototype,"value",2),o([v({type:Boolean,reflect:!0})],r.prototype,"range",2),o([v({attribute:"range-start",converter:z,reflect:!0})],r.prototype,"rangeStart",2),o([v({attribute:"range-end",converter:z,reflect:!0})],r.prototype,"rangeEnd",2),o([v({type:Boolean})],r.prototype,"allowSameDayRange",2),o([v({type:String,converter:z,reflect:!0})],r.prototype,"min",2),o([v({type:String,converter:z,reflect:!0})],r.prototype,"max",2),o([v({attribute:"view-month",converter:K})],r.prototype,"viewMonth",2),o([v({type:Number})],r.prototype,"firstDayOfWeek",2),o([v({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],r.prototype,"disabledWeekends",2),o([v({attribute:"disabled-dates",converter:G})],r.prototype,"disabledDates",2),o([v({attribute:!1})],r.prototype,"isDateDisabled",2),o([v({type:String,reflect:!0})],r.prototype,"size",2),o([v({type:String})],r.prototype,"alignment",2),o([v({type:String,reflect:!0})],r.prototype,"label",2),o([v({type:String,attribute:"help-text",reflect:!0})],r.prototype,"helpText",2),o([v({attribute:"floating-label",type:Boolean,reflect:!0})],r.prototype,"floatingLabel",2),o([v({type:Boolean,reflect:!0})],r.prototype,"disabled",2),o([v({type:Boolean,reflect:!0})],r.prototype,"required",2),o([v({type:Boolean,attribute:"visually-disabled"})],r.prototype,"visuallyDisabled",2),o([v({type:Boolean,reflect:!0,attribute:"style-on-valid"})],r.prototype,"styleOnValid",2),o([v({type:Boolean,reflect:!0})],r.prototype,"readonly",2),o([v({type:String,reflect:!0})],r.prototype,"placement",2),o([v({type:String,reflect:!0})],r.prototype,"placeholder",2),o([v({reflect:!0})],r.prototype,"name",2),o([v({type:String,reflect:!0})],r.prototype,"form",2),o([O()],r.prototype,"open",2),o([O()],r.prototype,"focusedDate",2),o([O()],r.prototype,"today",2),o([O()],r.prototype,"disabledDatesSet",2),o([O()],r.prototype,"previewEnd",2),o([O()],r.prototype,"statusNavText",2),o([O()],r.prototype,"statusSelectText",2),o([O()],r.prototype,"hasFocus",2),o([O()],r.prototype,"showValidStyle",2),o([O()],r.prototype,"showInvalidStyle",2),o([O()],r.prototype,"currentPlacement",2),o([O()],r.prototype,"inputValue",2),o([Y("sd-7-0-0-next-7-popup")],r.prototype,"popup",2),o([Y("#invalid-message")],r.prototype,"invalidMessage",2),o([Y("#input")],r.prototype,"input",2),o([_("open",{waitUntilFirstUpdate:!0})],r.prototype,"handleOpenChange",1),o([_("locale")],r.prototype,"handleLocaleChange",1),o([_("viewMonth")],r.prototype,"handleViewMonthChange",1),o([_("disabledDates")],r.prototype,"handleDisabledDatesChange",1),o([_("value")],r.prototype,"handleValueChange",1),o([_("rangeStart"),_("rangeEnd")],r.prototype,"handleRangeChange",1),o([_(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],r.prototype,"handleDisabledChange",1),o([_(["size","floatingLabel"])],r.prototype,"handleSizeChange",1),r=o([H("sd-7-0-0-next-7-datepicker")],r);export{r as a};
@@ -1,12 +1,12 @@
1
- import{a as F}from"./chunk.ERP45OHF.js";import{a as A}from"./chunk.OKNJ5BPS.js";import{b as I}from"./chunk.LZRL7OLU.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as C,c as $}from"./chunk.B2NUKX6G.js";import{a as T}from"./chunk.KLRPP4NQ.js";import{a as L}from"./chunk.W5O4FM6B.js";import{a as z}from"./chunk.VAM5SM3O.js";import{a as h}from"./chunk.4ZZFYCXX.js";import{a as m}from"./chunk.NYKJXI3Q.js";import{a as D,b as n,c as u,d as c,g as k,h as O}from"./chunk.4SDWX3GC.js";import{b as E,e as p}from"./chunk.OBAEIKIV.js";import{b as x,e as w}from"./chunk.W4QBFD6E.js";import{e as s}from"./chunk.6EV4YU6C.js";var i=class extends O{constructor(){super(...arguments);this.formControlController=new I(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new M(this,"help-text","label");this.localize=new z(this);this.typeToSelectString="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=t=>p`<sd-7-0-0-next-6-tag class="relative z-10 min-w-0 max-w-full" ?disabled="${this.disabled}" part="tag" exportparts="
1
+ import{a as F}from"./chunk.ERP45OHF.js";import{a as A}from"./chunk.OKNJ5BPS.js";import{b as I}from"./chunk.LZRL7OLU.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as C,c as $}from"./chunk.B2NUKX6G.js";import{a as T}from"./chunk.KLRPP4NQ.js";import{a as L}from"./chunk.W5O4FM6B.js";import{a as z}from"./chunk.VAM5SM3O.js";import{a as h}from"./chunk.4ZZFYCXX.js";import{a as m}from"./chunk.NYKJXI3Q.js";import{a as D,b as n,c as u,d as c,g as k,h as O}from"./chunk.4SDWX3GC.js";import{b as E,e as p}from"./chunk.OBAEIKIV.js";import{b as x,e as w}from"./chunk.W4QBFD6E.js";import{e as s}from"./chunk.6EV4YU6C.js";var i=class extends O{constructor(){super(...arguments);this.formControlController=new I(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new M(this,"help-text","label");this.localize=new z(this);this.typeToSelectString="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=t=>p`<sd-7-0-0-next-7-tag class="relative z-10 min-w-0 max-w-full" ?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-7-0-0-next-6-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{let e=t.target,o=e.closest(".select__clear")!==null,l=e.closest("sd-7-0-0-next-6-icon-button")!==null;if(!(o||l)){if(t.key==="Escape"&&this.open&&(t.preventDefault(),t.stopPropagation(),this.hide(),this.combobox.focus({preventScroll:!0})),t.key==="Enter"||t.key===" "&&this.typeToSelectString===""){if(t.preventDefault(),t.stopImmediatePropagation(),!this.open){this.show(),this.setCurrentOption(this.currentOption||this.getFirstOption(),t);return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){let d=this.getAllOptions(),r=d.indexOf(this.currentOption),a=Math.max(0,r);if(t.preventDefault(),!this.open&&(this.show(),this.currentOption))return;t.key==="ArrowDown"?(a=r+1,a>d.length-1&&(a=0)):t.key==="ArrowUp"?(a=r-1,a<0&&(a=d.length-1)):t.key==="Home"?a=0:t.key==="End"&&(a=d.length-1),this.setCurrentOption(d[a],t)}if(t.key.length===1||t.key==="Backspace"){let d=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if(t.key==="Backspace")return;this.show()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),t.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(let r of d)if(r.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(r);break}}}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){var o,l,d;if((t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple){t.preventDefault(),t.stopPropagation();let r=(o=t.currentTarget)==null?void 0:o.parentElement,a=(l=r==null?void 0:r.previousElementSibling)==null?void 0:l.querySelector("sd-7-0-0-next-6-tag"),b=(d=r==null?void 0:r.nextElementSibling)==null?void 0:d.querySelector("sd-7-0-0-next-6-tag");this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>{b?b.focus():a?a.focus():this.focus({preventScroll:!0})})}}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>{var o;let e=(o=this.shadowRoot)==null?void 0:o.querySelectorAll("sd-7-0-0-next-6-tag");e&&e.length>0?e==null||e[(e==null?void 0:e.length)-1].focus():this.focus({preventScroll:!0})}))}handleLabelClick(){this.combobox.focus()}handleComboboxMouseDown(t){let o=t.composedPath().some(l=>l instanceof HTMLSlotElement&&l.name==="removable-indicator");this.disabled||o||this.visuallyDisabled||(t.preventDefault(),this.combobox.focus({preventScroll:!0}),this.open=!this.open,this.setCurrentOption(this.currentOption||this.getFirstOption(),t))}handleComboboxKeyDown(t){t.stopPropagation(),this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearSelect()}clearSelect(){this.setSelectedOptions([]),this.combobox.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let o=t.target.closest("sd-7-0-0-next-6-option"),l=this.value;o&&!o.disabled&&(this.multiple?this.toggleOptionSelection(o):this.setSelectedOptions(o),this.updateComplete.then(()=>this.combobox.focus({preventScroll:!0})),this.value!==l&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})))}handleDefaultSlotChange(){let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value],o=[];customElements.get("sd-7-0-0-next-6-option")?(t.forEach(l=>{this.multiple&&(l.checkbox=!0),o.push(l.value)}),this.setSelectedOptions(t.filter(l=>e.includes(l.value)))):customElements.whenDefined("sd-7-0-0-next-6-option").then(()=>this.handleDefaultSlotChange())}handleTagRemove(t,e){t.stopPropagation(),e||this.clearSelect(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}))}getAllOptions(){return[...this.querySelectorAll("sd-7-0-0-next-6-option")]}getFirstOption(){return this.querySelector("sd-7-0-0-next-6-option")}setCurrentOption(t,e){this.getAllOptions().forEach(l=>{l.current=!1,l.tabIndex=-1,((e==null?void 0:e.type)==="keydown"||(e==null?void 0:e.type)==="mousedown")&&(l.isKeyboardFocus=!1)}),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,t.focus()),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}setSelectedOptions(t){let e=this.getAllOptions(),o=Array.isArray(t)?t:[t];e.forEach(l=>l.selected=!1),o.length&&o.forEach(l=>l.selected=!0),Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}toggleOptionSelection(t,e){e===!0||e===!1?t.selected=e:t.selected=!t.selected,Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}get displayLabel(){var t,e;return this.multiple?this.useTags||this.value.length===0?"":this.localize.term("numOptionsSelected",this.selectedOptions.length):(e=(t=this.selectedOptions[0])==null?void 0:t.getTextLabel())!=null?e:""}selectionChanged(t){var e,o;t&&this.multiple?this.selectedOptions.find(l=>l.value===t.value)?this.selectedOptions=this.selectedOptions.filter(l=>l.value!==t.value):this.selectedOptions=[...this.selectedOptions,t]:this.selectedOptions=this.getAllOptions().filter(l=>l.selected),this.multiple?this.value=this.selectedOptions.map(l=>l.value):this.value=(o=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?o:"",this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let o=this.getTag(t,e);return p`<div @sd-remove="${l=>this.handleTagRemove(l,t)}" class="max-w-full">${typeof o=="string"?L(o):o}</div>`}return[p``]}):[p`<sd-7-0-0-next-6-tag class="z-10 min-w-0 max-w-full" ?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-7-0-0-next-7-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{let e=t.target,o=e.closest(".select__clear")!==null,l=e.closest("sd-7-0-0-next-7-icon-button")!==null;if(!(o||l)){if(t.key==="Escape"&&this.open&&(t.preventDefault(),t.stopPropagation(),this.hide(),this.combobox.focus({preventScroll:!0})),t.key==="Enter"||t.key===" "&&this.typeToSelectString===""){if(t.preventDefault(),t.stopImmediatePropagation(),!this.open){this.show(),this.setCurrentOption(this.currentOption||this.getFirstOption(),t);return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){let d=this.getAllOptions(),r=d.indexOf(this.currentOption),a=Math.max(0,r);if(t.preventDefault(),!this.open&&(this.show(),this.currentOption))return;t.key==="ArrowDown"?(a=r+1,a>d.length-1&&(a=0)):t.key==="ArrowUp"?(a=r-1,a<0&&(a=d.length-1)):t.key==="Home"?a=0:t.key==="End"&&(a=d.length-1),this.setCurrentOption(d[a],t)}if(t.key.length===1||t.key==="Backspace"){let d=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if(t.key==="Backspace")return;this.show()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),t.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(let r of d)if(r.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(r);break}}}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){var o,l,d;if((t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple){t.preventDefault(),t.stopPropagation();let r=(o=t.currentTarget)==null?void 0:o.parentElement,a=(l=r==null?void 0:r.previousElementSibling)==null?void 0:l.querySelector("sd-7-0-0-next-7-tag"),b=(d=r==null?void 0:r.nextElementSibling)==null?void 0:d.querySelector("sd-7-0-0-next-7-tag");this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>{b?b.focus():a?a.focus():this.focus({preventScroll:!0})})}}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>{var o;let e=(o=this.shadowRoot)==null?void 0:o.querySelectorAll("sd-7-0-0-next-7-tag");e&&e.length>0?e==null||e[(e==null?void 0:e.length)-1].focus():this.focus({preventScroll:!0})}))}handleLabelClick(){this.combobox.focus()}handleComboboxMouseDown(t){let o=t.composedPath().some(l=>l instanceof HTMLSlotElement&&l.name==="removable-indicator");this.disabled||o||this.visuallyDisabled||(t.preventDefault(),this.combobox.focus({preventScroll:!0}),this.open=!this.open,this.setCurrentOption(this.currentOption||this.getFirstOption(),t))}handleComboboxKeyDown(t){t.stopPropagation(),this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearSelect()}clearSelect(){this.setSelectedOptions([]),this.combobox.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let o=t.target.closest("sd-7-0-0-next-7-option"),l=this.value;o&&!o.disabled&&(this.multiple?this.toggleOptionSelection(o):this.setSelectedOptions(o),this.updateComplete.then(()=>this.combobox.focus({preventScroll:!0})),this.value!==l&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})))}handleDefaultSlotChange(){let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value],o=[];customElements.get("sd-7-0-0-next-7-option")?(t.forEach(l=>{this.multiple&&(l.checkbox=!0),o.push(l.value)}),this.setSelectedOptions(t.filter(l=>e.includes(l.value)))):customElements.whenDefined("sd-7-0-0-next-7-option").then(()=>this.handleDefaultSlotChange())}handleTagRemove(t,e){t.stopPropagation(),e||this.clearSelect(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}))}getAllOptions(){return[...this.querySelectorAll("sd-7-0-0-next-7-option")]}getFirstOption(){return this.querySelector("sd-7-0-0-next-7-option")}setCurrentOption(t,e){this.getAllOptions().forEach(l=>{l.current=!1,l.tabIndex=-1,((e==null?void 0:e.type)==="keydown"||(e==null?void 0:e.type)==="mousedown")&&(l.isKeyboardFocus=!1)}),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,t.focus()),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}setSelectedOptions(t){let e=this.getAllOptions(),o=Array.isArray(t)?t:[t];e.forEach(l=>l.selected=!1),o.length&&o.forEach(l=>l.selected=!0),Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}toggleOptionSelection(t,e){e===!0||e===!1?t.selected=e:t.selected=!t.selected,Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}get displayLabel(){var t,e;return this.multiple?this.useTags||this.value.length===0?"":this.localize.term("numOptionsSelected",this.selectedOptions.length):(e=(t=this.selectedOptions[0])==null?void 0:t.getTextLabel())!=null?e:""}selectionChanged(t){var e,o;t&&this.multiple?this.selectedOptions.find(l=>l.value===t.value)?this.selectedOptions=this.selectedOptions.filter(l=>l.value!==t.value):this.selectedOptions=[...this.selectedOptions,t]:this.selectedOptions=this.getAllOptions().filter(l=>l.selected),this.multiple?this.value=this.selectedOptions.map(l=>l.value):this.value=(o=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?o:"",this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let o=this.getTag(t,e);return p`<div @sd-remove="${l=>this.handleTagRemove(l,t)}" class="max-w-full">${typeof o=="string"?L(o):o}</div>`}return[p``]}):[p`<sd-7-0-0-next-7-tag class="z-10 min-w-0 max-w-full" ?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-7-0-0-next-6-tag>`]}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleUseTagsChange(){let t=this.getAllOptions();customElements.get("sd-7-0-0-next-6-option")&&t.forEach(e=>{e.checkbox=this.multiple})}handleDisabledChange(){(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await w(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:t,options:e}=$(this,"select.show",{dir:this.localize.dir()});await x(this.popup.popup,t,e),this.currentOption&&A(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await w(this);let{keyframes:t,options:e}=$(this,"select.hide",{dir:this.localize.dir()});await x(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(t=>{t.size=this.size})}handleValueChange(){let t=this.value,e=Array.isArray(t)?t:[t],o=this.selectedOptions.map(r=>r.value);if(e.length===o.length&&e.every(r=>o.includes(r)))return;let l=this.getAllOptions(),d=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(l.filter(r=>d.includes(r.value))),this.value=t}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,T(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,T(this,"sd-after-hide")}checkValidity(){var t;return(t=this.valueInput)==null?void 0:t.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.combobox.focus(t)}blur(){this.combobox.blur()}render(){let t={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,o=this.helpText?!0:!!t.helpText,l=this.clearable&&!this.disabled,d=!!t.tooltip,r=this.value!==null&&String(this.value).length>0,a=this.floatingLabel&&e&&(this.hasFocus&&!this.visuallyDisabled||this.open||r)&&!(this.disabled&&!r),b=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":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",f=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",v={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],g={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],_=this.size==="lg"?this.floatingLabel?a?"py-3":"py-4":"py-2":this.floatingLabel?a?"py-2":"py-3":"py-1";return p`<div part="form-control" class="${h("relative text-left",f,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" aria-live="polite">${this.deletedTagLabel}</span> ${e&&!this.floatingLabel||d?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${h(e&&"inline-block",this.visuallyDisabled||this.disabled?"text-neutral-500":" form-control-color-text")}" aria-hidden="${e?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> ${t.tooltip?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${h("relative w-full bg-white",b==="disabled"?"text-neutral-500":"text-black")}">${e&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${h("absolute left-4 z-20 pointer-events-none transition-all duration-200",a?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",a&&"mt-1")}" for="input"><span class="${h("leading-none",a&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${h("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[b],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-7-0-0-next-6-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${h("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip 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-7-0-0-next-7-tag>`]}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleUseTagsChange(){let t=this.getAllOptions();customElements.get("sd-7-0-0-next-7-option")&&t.forEach(e=>{e.checkbox=this.multiple})}handleDisabledChange(){(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await w(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:t,options:e}=$(this,"select.show",{dir:this.localize.dir()});await x(this.popup.popup,t,e),this.currentOption&&A(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await w(this);let{keyframes:t,options:e}=$(this,"select.hide",{dir:this.localize.dir()});await x(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(t=>{t.size=this.size})}handleValueChange(){let t=this.value,e=Array.isArray(t)?t:[t],o=this.selectedOptions.map(r=>r.value);if(e.length===o.length&&e.every(r=>o.includes(r)))return;let l=this.getAllOptions(),d=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(l.filter(r=>d.includes(r.value))),this.value=t}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,T(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,T(this,"sd-after-hide")}checkValidity(){var t;return(t=this.valueInput)==null?void 0:t.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.combobox.focus(t)}blur(){this.combobox.blur()}render(){let t={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,o=this.helpText?!0:!!t.helpText,l=this.clearable&&!this.disabled,d=!!t.tooltip,r=this.value!==null&&String(this.value).length>0,a=this.floatingLabel&&e&&(this.hasFocus&&!this.visuallyDisabled||this.open||r)&&!(this.disabled&&!r),b=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":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",f=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",v={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],g={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],_=this.size==="lg"?this.floatingLabel?a?"py-3":"py-4":"py-2":this.floatingLabel?a?"py-2":"py-3":"py-1";return p`<div part="form-control" class="${h("relative text-left",f,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" aria-live="polite">${this.deletedTagLabel}</span> ${e&&!this.floatingLabel||d?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${h(e&&"inline-block",this.visuallyDisabled||this.disabled?"text-neutral-500":" form-control-color-text")}" aria-hidden="${e?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> ${t.tooltip?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${h("relative w-full bg-white",b==="disabled"?"text-neutral-500":"text-black")}">${e&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${h("absolute left-4 z-20 pointer-events-none transition-all duration-200",a?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",a&&"mt-1")}" for="input"><span class="${h("leading-none",a&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${h("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[b],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-7-0-0-next-7-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${h("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
10
10
  popup:popup__content,
11
- "><div class="${h("relative w-full h-full grid rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:[@media(hover:hover)]:form-control--hover-color-background",["invalid","activeInvalid"].includes(b)&&"form-control--invalid-color-background")}" slot="anchor"><div class="${h("input-container items-center w-full h-full px-4 flex min-w-0",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],_)}"><input name="${this.name}" form="${this.form}" part="display-input" class="${h("top-0 left-0 appearance-none outline-none flex-grow bg-transparent flex-1 placeholder:text-neutral-700 min-w-0",f,this.multiple&&this.useTags&&this.value.length>0?"hidden":"",this.size==="sm"?a?"h-4":"h-6":a?"h-6":"h-8",a&&"leading-none mt-4")}" type="text" .disabled="${this.disabled}" placeholder="${!this.floatingLabel||a?this.placeholder||this.localize.term("selectDefaultPlaceholder"):""}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="-1"> ${this.multiple&&this.useTags&&this.tags&&this.tags.length>0?p`<div part="tags" class="${h("flex-grow flex flex-wrap items-center gap-1 min-w-0",this.floatingLabel&&"pt-4")}">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(y=>y==null?void 0:y.getTextLabel()).join(", ")}</div><input class="${h("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",f)}" 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}"> ${l?p`<button part="clear-button" class="${h("select__clear flex justify-center",v,this.value.length>0?"visible":"hidden")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-7-0-0-next-6-icon class="${h("text-neutral-700 z-10",g)}" library="_internal" name="closing-round"></sd-7-0-0-next-6-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-7-0-0-next-6-icon part="invalid-icon" class="${h(v,g)}" library="_internal" name="risk"></sd-7-0-0-next-6-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-7-0-0-next-6-icon part="valid-icon" class="${h("flex-shrink-0 text-success",v,g)}" library="_internal" name="confirm-circle"></sd-7-0-0-next-6-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${h("inline-flex ml-2 items-center transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0",this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",g)}"><sd-7-0-0-next-6-icon name="chevron-down" part="chevron" library="_internal" color="currentColor"></sd-7-0-0-next-6-icon></slot></div><button part="combobox" class="${h("relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",f,this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"min-h-[32px]",md:"min-h-[40px]",lg:"min-h-[48px]"}[this.size])}" type="button" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-labelledby="label"></button></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${h("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow-listbox transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-7-0-0-next-6-popup></div><div class="${h("text-sm mt-1",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" part="form-control-help-text" id="help-text" aria-hidden="${o?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage(this.size)}`}};i.styles=[...O.styles,E`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
12
- :host{position:relative;display:block;width:auto}[part=invalid-icon]{color:rgb(var(--sd-color-icon-fill-error,--sd-color-error))}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-7-0-0-next-6-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-7-0-0-next-6-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-7-0-0-next-6-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-7-0-0-next-6-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-7-0-0-next-6-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}.icon-color{color:rgb(var(--sd-form-control-color-icon-fill))}`],s([k({selector:"sd-7-0-0-next-6-option"})],i.prototype,"_optionsInDefaultSlot",2),s([c("sd-7-0-0-next-6-popup")],i.prototype,"popup",2),s([c('[part="combobox"]')],i.prototype,"combobox",2),s([c('[part="display-input"]')],i.prototype,"displayInput",2),s([c(".value-input")],i.prototype,"valueInput",2),s([c('[part="listbox"]')],i.prototype,"listbox",2),s([c("#invalid-message")],i.prototype,"invalidMessage",2),s([u()],i.prototype,"deletedTagLabel",2),s([u()],i.prototype,"hasFocus",2),s([u()],i.prototype,"currentOption",2),s([u()],i.prototype,"selectedOptions",2),s([u()],i.prototype,"showValidStyle",2),s([u()],i.prototype,"showInvalidStyle",2),s([F()],i.prototype,"defaultValue",2),s([n({type:Boolean,reflect:!0})],i.prototype,"open",2),s([n({type:String,reflect:!0})],i.prototype,"size",2),s([n({type:String,reflect:!0})],i.prototype,"placement",2),s([n({type:String,reflect:!0})],i.prototype,"label",2),s([n({type:String,reflect:!0})],i.prototype,"placeholder",2),s([n({type:String,attribute:"max-options-tag-label",reflect:!0})],i.prototype,"maxOptionsTagLabel",2),s([n({type:Boolean,reflect:!0})],i.prototype,"disabled",2),s([n({type:Boolean,reflect:!0,attribute:"visually-disabled"})],i.prototype,"visuallyDisabled",2),s([n({type:String,attribute:"help-text",reflect:!0})],i.prototype,"helpText",2),s([u()],i.prototype,"currentPlacement",2),s([n({type:Boolean,reflect:!0})],i.prototype,"clearable",2),s([n({type:Boolean,reflect:!0})],i.prototype,"multiple",2),s([n({type:Boolean,reflect:!0})],i.prototype,"useTags",2),s([n({attribute:"max-options-visible",type:Number,reflect:!0})],i.prototype,"maxOptionsVisible",2),s([n({reflect:!0})],i.prototype,"form",2),s([n({reflect:!0})],i.prototype,"name",2),s([n({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],i.prototype,"value",2),s([n({type:Boolean,reflect:!0})],i.prototype,"required",2),s([n({attribute:"floating-label",type:Boolean,reflect:!0})],i.prototype,"floatingLabel",2),s([n({type:Boolean,reflect:!0,attribute:"style-on-valid"})],i.prototype,"styleOnValid",2),s([n({type:Boolean,reflect:!0})],i.prototype,"hoist",2),s([n()],i.prototype,"getTag",2),s([m("useTags",{waitUntilFirstUpdate:!0})],i.prototype,"handleUseTagsChange",1),s([m(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],i.prototype,"handleDisabledChange",1),s([m("open",{waitUntilFirstUpdate:!0})],i.prototype,"handleOpenChange",1),s([m("size",{waitUntilFirstUpdate:!0})],i.prototype,"applySizeToOptions",1),s([m("value",{waitUntilFirstUpdate:!0})],i.prototype,"handleValueChange",1),s([m(["size","floatingLabel"])],i.prototype,"handleSizeChange",1),i=s([D("sd-7-0-0-next-6-select")],i);C("select.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});C("select.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{i as a};
11
+ "><div class="${h("relative w-full h-full grid rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:[@media(hover:hover)]:form-control--hover-color-background",["invalid","activeInvalid"].includes(b)&&"form-control--invalid-color-background")}" slot="anchor"><div class="${h("input-container items-center w-full h-full px-4 flex min-w-0",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],_)}"><input name="${this.name}" form="${this.form}" part="display-input" class="${h("top-0 left-0 appearance-none outline-none flex-grow bg-transparent flex-1 placeholder:text-neutral-700 min-w-0",f,this.multiple&&this.useTags&&this.value.length>0?"hidden":"",this.size==="sm"?a?"h-4":"h-6":a?"h-6":"h-8",a&&"leading-none mt-4")}" type="text" .disabled="${this.disabled}" placeholder="${!this.floatingLabel||a?this.placeholder||this.localize.term("selectDefaultPlaceholder"):""}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="-1"> ${this.multiple&&this.useTags&&this.tags&&this.tags.length>0?p`<div part="tags" class="${h("flex-grow flex flex-wrap items-center gap-1 min-w-0",this.floatingLabel&&"pt-4")}">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(y=>y==null?void 0:y.getTextLabel()).join(", ")}</div><input class="${h("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",f)}" 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}"> ${l?p`<button part="clear-button" class="${h("select__clear flex justify-center",v,this.value.length>0?"visible":"hidden")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-7-0-0-next-7-icon class="${h("text-neutral-700 z-10",g)}" library="_internal" name="closing-round"></sd-7-0-0-next-7-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-7-0-0-next-7-icon part="invalid-icon" class="${h(v,g)}" library="_internal" name="risk"></sd-7-0-0-next-7-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-7-0-0-next-7-icon part="valid-icon" class="${h("flex-shrink-0 text-success",v,g)}" library="_internal" name="confirm-circle"></sd-7-0-0-next-7-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${h("inline-flex ml-2 items-center transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0",this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",g)}"><sd-7-0-0-next-7-icon name="chevron-down" part="chevron" library="_internal" color="currentColor"></sd-7-0-0-next-7-icon></slot></div><button part="combobox" class="${h("relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",f,this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"min-h-[32px]",md:"min-h-[40px]",lg:"min-h-[48px]"}[this.size])}" type="button" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-labelledby="label"></button></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${h("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow-listbox transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-7-0-0-next-7-popup></div><div class="${h("text-sm mt-1",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" part="form-control-help-text" id="help-text" aria-hidden="${o?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage(this.size)}`}};i.styles=[...O.styles,E`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
12
+ :host{position:relative;display:block;width:auto}[part=invalid-icon]{color:rgb(var(--sd-color-icon-fill-error,--sd-color-error))}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-7-0-0-next-7-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-7-0-0-next-7-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-7-0-0-next-7-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-7-0-0-next-7-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-7-0-0-next-7-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}.icon-color{color:rgb(var(--sd-form-control-color-icon-fill))}`],s([k({selector:"sd-7-0-0-next-7-option"})],i.prototype,"_optionsInDefaultSlot",2),s([c("sd-7-0-0-next-7-popup")],i.prototype,"popup",2),s([c('[part="combobox"]')],i.prototype,"combobox",2),s([c('[part="display-input"]')],i.prototype,"displayInput",2),s([c(".value-input")],i.prototype,"valueInput",2),s([c('[part="listbox"]')],i.prototype,"listbox",2),s([c("#invalid-message")],i.prototype,"invalidMessage",2),s([u()],i.prototype,"deletedTagLabel",2),s([u()],i.prototype,"hasFocus",2),s([u()],i.prototype,"currentOption",2),s([u()],i.prototype,"selectedOptions",2),s([u()],i.prototype,"showValidStyle",2),s([u()],i.prototype,"showInvalidStyle",2),s([F()],i.prototype,"defaultValue",2),s([n({type:Boolean,reflect:!0})],i.prototype,"open",2),s([n({type:String,reflect:!0})],i.prototype,"size",2),s([n({type:String,reflect:!0})],i.prototype,"placement",2),s([n({type:String,reflect:!0})],i.prototype,"label",2),s([n({type:String,reflect:!0})],i.prototype,"placeholder",2),s([n({type:String,attribute:"max-options-tag-label",reflect:!0})],i.prototype,"maxOptionsTagLabel",2),s([n({type:Boolean,reflect:!0})],i.prototype,"disabled",2),s([n({type:Boolean,reflect:!0,attribute:"visually-disabled"})],i.prototype,"visuallyDisabled",2),s([n({type:String,attribute:"help-text",reflect:!0})],i.prototype,"helpText",2),s([u()],i.prototype,"currentPlacement",2),s([n({type:Boolean,reflect:!0})],i.prototype,"clearable",2),s([n({type:Boolean,reflect:!0})],i.prototype,"multiple",2),s([n({type:Boolean,reflect:!0})],i.prototype,"useTags",2),s([n({attribute:"max-options-visible",type:Number,reflect:!0})],i.prototype,"maxOptionsVisible",2),s([n({reflect:!0})],i.prototype,"form",2),s([n({reflect:!0})],i.prototype,"name",2),s([n({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],i.prototype,"value",2),s([n({type:Boolean,reflect:!0})],i.prototype,"required",2),s([n({attribute:"floating-label",type:Boolean,reflect:!0})],i.prototype,"floatingLabel",2),s([n({type:Boolean,reflect:!0,attribute:"style-on-valid"})],i.prototype,"styleOnValid",2),s([n({type:Boolean,reflect:!0})],i.prototype,"hoist",2),s([n()],i.prototype,"getTag",2),s([m("useTags",{waitUntilFirstUpdate:!0})],i.prototype,"handleUseTagsChange",1),s([m(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],i.prototype,"handleDisabledChange",1),s([m("open",{waitUntilFirstUpdate:!0})],i.prototype,"handleOpenChange",1),s([m("size",{waitUntilFirstUpdate:!0})],i.prototype,"applySizeToOptions",1),s([m("value",{waitUntilFirstUpdate:!0})],i.prototype,"handleValueChange",1),s([m(["size","floatingLabel"])],i.prototype,"handleSizeChange",1),i=s([D("sd-7-0-0-next-7-select")],i);C("select.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});C("select.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{i as a};
@@ -1,2 +1,2 @@
1
1
  import{a as m}from"./chunk.MWDEA25W.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as n,b as o,h as a}from"./chunk.4SDWX3GC.js";import{b as c,e as l}from"./chunk.OBAEIKIV.js";import{e as s}from"./chunk.6EV4YU6C.js";var t=class extends a{constructor(){super(...arguments);this.mode="cors";this.allowScripts=!1}executeScript(e){let r=document.createElement("script");[...e.attributes].forEach(i=>r.setAttribute(i.name,i.value)),r.textContent=e.textContent,e.parentNode.replaceChild(r,e)}async handleSrcChange(){try{let e=this.src,r=await m(e,this.mode);if(e!==this.src)return;if(!r.ok){this.emit("sd-error",{detail:{status:r.status}});return}this.innerHTML=r.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(i=>this.executeScript(i)),this.emit("sd-load")}catch(e){this.emit("sd-error",{detail:{status:-1}})}}render(){return l`<slot></slot>`}};t.styles=[...a.styles,c`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{display:block}`],s([o({reflect:!0})],t.prototype,"src",2),s([o({type:String,reflect:!0})],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean,reflect:!0})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([n("sd-7-0-0-next-6-include")],t);export{t as a};
2
+ :host{display:block}`],s([o({reflect:!0})],t.prototype,"src",2),s([o({type:String,reflect:!0})],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean,reflect:!0})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([n("sd-7-0-0-next-7-include")],t);export{t as a};