@solid-design-system/components 6.4.0 → 6.4.1

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 (259) hide show
  1. package/cdn/custom-elements.json +1 -1
  2. package/cdn/web-types.json +1 -1
  3. package/cdn-versioned/chunks/chunk.2DPSCPM4.js +2 -2
  4. package/cdn-versioned/chunks/chunk.2HJLVWCE.js +2 -2
  5. package/cdn-versioned/chunks/chunk.2KV3QDYA.js +2 -2
  6. package/cdn-versioned/chunks/chunk.3ETEQAPR.js +2 -2
  7. package/cdn-versioned/chunks/chunk.47H4SDKN.js +2 -2
  8. package/cdn-versioned/chunks/chunk.4LGCXG7D.js +2 -2
  9. package/cdn-versioned/chunks/chunk.4P5PT6MV.js +2 -2
  10. package/cdn-versioned/chunks/chunk.5M2K2EXR.js +2 -2
  11. package/cdn-versioned/chunks/chunk.5OE2GCRH.js +2 -2
  12. package/cdn-versioned/chunks/chunk.6GU6NFBF.js +1 -1
  13. package/cdn-versioned/chunks/chunk.745GDIND.js +2 -2
  14. package/cdn-versioned/chunks/chunk.ALCKOGA7.js +1 -1
  15. package/cdn-versioned/chunks/chunk.BZ3VHECJ.js +3 -3
  16. package/cdn-versioned/chunks/chunk.C44GZOLG.js +9 -9
  17. package/cdn-versioned/chunks/chunk.C4QT4K6T.js +2 -2
  18. package/cdn-versioned/chunks/chunk.CDP46OS4.js +1 -1
  19. package/cdn-versioned/chunks/chunk.CJ34NUTS.js +1 -1
  20. package/cdn-versioned/chunks/chunk.CMY3VPYA.js +2 -2
  21. package/cdn-versioned/chunks/chunk.D5FVDNYV.js +2 -2
  22. package/cdn-versioned/chunks/chunk.DC6UQXYF.js +2 -2
  23. package/cdn-versioned/chunks/chunk.DEEJ4ON7.js +2 -2
  24. package/cdn-versioned/chunks/chunk.DXGVZ3KG.js +1 -1
  25. package/cdn-versioned/chunks/chunk.E64WXH47.js +1 -1
  26. package/cdn-versioned/chunks/chunk.EASLRW3B.js +2 -2
  27. package/cdn-versioned/chunks/chunk.G42N3VHE.js +2 -2
  28. package/cdn-versioned/chunks/chunk.GP2QVZP5.js +1 -1
  29. package/cdn-versioned/chunks/chunk.H77CNSMK.js +2 -2
  30. package/cdn-versioned/chunks/chunk.HHASCDC2.js +5 -5
  31. package/cdn-versioned/chunks/chunk.I234MSSB.js +2 -2
  32. package/cdn-versioned/chunks/chunk.I3TTTGLW.js +1 -1
  33. package/cdn-versioned/chunks/chunk.IAEOXYGB.js +1 -1
  34. package/cdn-versioned/chunks/chunk.JRSX44R6.js +2 -2
  35. package/cdn-versioned/chunks/chunk.KKKGNXIR.js +2 -2
  36. package/cdn-versioned/chunks/chunk.KM5W4EDY.js +2 -2
  37. package/cdn-versioned/chunks/chunk.L6PAHLSN.js +2 -2
  38. package/cdn-versioned/chunks/chunk.MWO5B7BA.js +2 -2
  39. package/cdn-versioned/chunks/chunk.OAVVKKBJ.js +2 -2
  40. package/cdn-versioned/chunks/chunk.OG2BQH6T.js +2 -2
  41. package/cdn-versioned/chunks/chunk.PDHMAKVQ.js +2 -2
  42. package/cdn-versioned/chunks/chunk.PPIS2HQ5.js +1 -1
  43. package/cdn-versioned/chunks/chunk.PRGLNPUF.js +1 -1
  44. package/cdn-versioned/chunks/chunk.PT6G5HKE.js +1 -1
  45. package/cdn-versioned/chunks/chunk.Q6GEIXGA.js +2 -2
  46. package/cdn-versioned/chunks/chunk.QMKNC76J.js +2 -2
  47. package/cdn-versioned/chunks/chunk.QUGI3FMS.js +2 -2
  48. package/cdn-versioned/chunks/chunk.RBVWPWFK.js +2 -2
  49. package/cdn-versioned/chunks/chunk.S4II2NTI.js +2 -2
  50. package/cdn-versioned/chunks/chunk.S7VIPIYX.js +2 -2
  51. package/cdn-versioned/chunks/chunk.TWNEU4H4.js +3 -3
  52. package/cdn-versioned/chunks/chunk.TWTQHJPN.js +2 -2
  53. package/cdn-versioned/chunks/chunk.U44PXBV2.js +2 -2
  54. package/cdn-versioned/chunks/chunk.U5N7L5RI.js +2 -2
  55. package/cdn-versioned/chunks/chunk.UVRZTPOZ.js +2 -2
  56. package/cdn-versioned/chunks/chunk.VAUP57XZ.js +2 -2
  57. package/cdn-versioned/chunks/chunk.VMUNNUNV.js +1 -1
  58. package/cdn-versioned/chunks/chunk.VTDQOKJM.js +2 -2
  59. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  60. package/cdn-versioned/chunks/chunk.WOZKICWV.js +5 -5
  61. package/cdn-versioned/chunks/chunk.XAPH6XNH.js +2 -2
  62. package/cdn-versioned/chunks/chunk.XQWDDXL2.js +2 -2
  63. package/cdn-versioned/chunks/chunk.XTRMRKZ6.js +2 -2
  64. package/cdn-versioned/chunks/chunk.Z6TAAGCD.js +2 -2
  65. package/cdn-versioned/chunks/chunk.ZTELVJ34.js +1 -1
  66. package/cdn-versioned/chunks/chunk.ZVHLKL7F.js +2 -2
  67. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  68. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  69. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  70. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  71. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  72. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  73. package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  74. package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  75. package/cdn-versioned/components/button/button.d.ts +1 -1
  76. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  77. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  78. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  79. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  80. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  81. package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
  82. package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
  83. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  84. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  85. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  86. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  87. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  88. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  89. package/cdn-versioned/components/header/header.d.ts +1 -1
  90. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  91. package/cdn-versioned/components/include/include.d.ts +1 -1
  92. package/cdn-versioned/components/input/input.d.ts +1 -1
  93. package/cdn-versioned/components/link/link.d.ts +1 -1
  94. package/cdn-versioned/components/loader/loader.d.ts +1 -1
  95. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  96. package/cdn-versioned/components/menu/menu.d.ts +1 -1
  97. package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
  98. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  99. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  100. package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
  101. package/cdn-versioned/components/option/option.d.ts +1 -1
  102. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  103. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  104. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  105. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  106. package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
  107. package/cdn-versioned/components/range/range.d.ts +1 -1
  108. package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
  109. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  110. package/cdn-versioned/components/select/select.d.ts +1 -1
  111. package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
  112. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  113. package/cdn-versioned/components/step/step.d.ts +1 -1
  114. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  115. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  116. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  117. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  118. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  119. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  120. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  121. package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
  122. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  123. package/cdn-versioned/components/video/video.d.ts +1 -1
  124. package/cdn-versioned/custom-elements.json +244 -244
  125. package/cdn-versioned/internal/form.js +3 -3
  126. package/cdn-versioned/solid-components.bundle.js +80 -80
  127. package/cdn-versioned/solid-components.css +2 -2
  128. package/cdn-versioned/solid-components.iife.js +80 -80
  129. package/cdn-versioned/vscode.html-custom-data.json +94 -94
  130. package/cdn-versioned/web-types.json +157 -157
  131. package/dist/custom-elements.json +1 -1
  132. package/dist/web-types.json +1 -1
  133. package/dist-versioned/chunks/chunk.22PWID5B.js +2 -2
  134. package/dist-versioned/chunks/chunk.2EWH2DC2.js +1 -1
  135. package/dist-versioned/chunks/chunk.2HTII44Q.js +4 -4
  136. package/dist-versioned/chunks/chunk.2VPWVTT6.js +4 -4
  137. package/dist-versioned/chunks/chunk.3EJL5IKL.js +1 -1
  138. package/dist-versioned/chunks/chunk.3PTRIEGP.js +2 -2
  139. package/dist-versioned/chunks/chunk.4UT3FCHQ.js +2 -2
  140. package/dist-versioned/chunks/chunk.5XWO3USG.js +3 -3
  141. package/dist-versioned/chunks/chunk.75WDCMIC.js +24 -24
  142. package/dist-versioned/chunks/chunk.ASEJW6QN.js +5 -5
  143. package/dist-versioned/chunks/chunk.AUSBWPVD.js +7 -7
  144. package/dist-versioned/chunks/chunk.AZPOFDJP.js +4 -4
  145. package/dist-versioned/chunks/chunk.BBLAIT57.js +2 -2
  146. package/dist-versioned/chunks/chunk.BSP6J6R2.js +2 -2
  147. package/dist-versioned/chunks/chunk.BTNS6ZNO.js +4 -4
  148. package/dist-versioned/chunks/chunk.C3WIBDGG.js +3 -3
  149. package/dist-versioned/chunks/chunk.D4UC3BVQ.js +12 -12
  150. package/dist-versioned/chunks/chunk.D7CJJHHA.js +1 -1
  151. package/dist-versioned/chunks/chunk.DCHRUIDY.js +1 -1
  152. package/dist-versioned/chunks/chunk.DCOB6WLB.js +3 -3
  153. package/dist-versioned/chunks/chunk.DFHY67LW.js +5 -5
  154. package/dist-versioned/chunks/chunk.DTTVI7KT.js +11 -11
  155. package/dist-versioned/chunks/chunk.DXDDB6AB.js +1 -1
  156. package/dist-versioned/chunks/chunk.FKFGVTXH.js +3 -3
  157. package/dist-versioned/chunks/chunk.FSUOT4WC.js +12 -12
  158. package/dist-versioned/chunks/chunk.IJIPMNT2.js +3 -3
  159. package/dist-versioned/chunks/chunk.IYXPHPNO.js +1 -1
  160. package/dist-versioned/chunks/chunk.JGRI4R23.js +1 -1
  161. package/dist-versioned/chunks/chunk.K66JHYHC.js +2 -2
  162. package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
  163. package/dist-versioned/chunks/chunk.L2RS3IA6.js +8 -8
  164. package/dist-versioned/chunks/chunk.L3OEOSPQ.js +1 -1
  165. package/dist-versioned/chunks/chunk.L6ZE3RXX.js +14 -14
  166. package/dist-versioned/chunks/chunk.LBDV5GNR.js +4 -4
  167. package/dist-versioned/chunks/chunk.LZVVDTSP.js +26 -26
  168. package/dist-versioned/chunks/chunk.M2D3WWF3.js +8 -8
  169. package/dist-versioned/chunks/chunk.MH7JHBWP.js +2 -2
  170. package/dist-versioned/chunks/chunk.MLRNCOWA.js +3 -3
  171. package/dist-versioned/chunks/chunk.NEUULRS7.js +5 -5
  172. package/dist-versioned/chunks/chunk.OJXVBFUH.js +5 -5
  173. package/dist-versioned/chunks/chunk.P5FGSFP3.js +1 -1
  174. package/dist-versioned/chunks/chunk.PBXAIJQ4.js +5 -5
  175. package/dist-versioned/chunks/chunk.Q7ZMX7IB.js +3 -3
  176. package/dist-versioned/chunks/chunk.QM4E25CD.js +5 -5
  177. package/dist-versioned/chunks/chunk.R56JDQAF.js +2 -2
  178. package/dist-versioned/chunks/chunk.RFDAZXJG.js +3 -3
  179. package/dist-versioned/chunks/chunk.SCWR4Q4K.js +10 -10
  180. package/dist-versioned/chunks/chunk.SQYISG5I.js +4 -4
  181. package/dist-versioned/chunks/chunk.SVYFJMYF.js +3 -3
  182. package/dist-versioned/chunks/chunk.T46LX45D.js +6 -6
  183. package/dist-versioned/chunks/chunk.TNJNUASM.js +1 -1
  184. package/dist-versioned/chunks/chunk.TUMONDN4.js +4 -4
  185. package/dist-versioned/chunks/chunk.TVWV4PUH.js +2 -2
  186. package/dist-versioned/chunks/chunk.U2BN2DBY.js +4 -4
  187. package/dist-versioned/chunks/chunk.UDPSGKZL.js +4 -4
  188. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  189. package/dist-versioned/chunks/chunk.UPCVQSXM.js +3 -3
  190. package/dist-versioned/chunks/chunk.UWQPJU3Q.js +3 -3
  191. package/dist-versioned/chunks/chunk.XALPLS2Y.js +6 -6
  192. package/dist-versioned/chunks/chunk.XV2UO6TF.js +2 -2
  193. package/dist-versioned/chunks/chunk.YATRFNET.js +28 -28
  194. package/dist-versioned/chunks/chunk.YFRD2UEO.js +8 -8
  195. package/dist-versioned/chunks/chunk.YNBR5ZDU.js +4 -4
  196. package/dist-versioned/chunks/chunk.ZMEUQIVY.js +9 -9
  197. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  198. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  199. package/dist-versioned/components/animation/animation.d.ts +1 -1
  200. package/dist-versioned/components/audio/audio.d.ts +1 -1
  201. package/dist-versioned/components/badge/badge.d.ts +1 -1
  202. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  203. package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  204. package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  205. package/dist-versioned/components/button/button.d.ts +1 -1
  206. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  207. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  208. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  209. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  210. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  211. package/dist-versioned/components/combobox/combobox.d.ts +1 -1
  212. package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
  213. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  214. package/dist-versioned/components/divider/divider.d.ts +1 -1
  215. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  216. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  217. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  218. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  219. package/dist-versioned/components/header/header.d.ts +1 -1
  220. package/dist-versioned/components/icon/icon.d.ts +1 -1
  221. package/dist-versioned/components/include/include.d.ts +1 -1
  222. package/dist-versioned/components/input/input.d.ts +1 -1
  223. package/dist-versioned/components/link/link.d.ts +1 -1
  224. package/dist-versioned/components/loader/loader.d.ts +1 -1
  225. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  226. package/dist-versioned/components/menu/menu.d.ts +1 -1
  227. package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
  228. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  229. package/dist-versioned/components/notification/notification.d.ts +1 -1
  230. package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
  231. package/dist-versioned/components/option/option.d.ts +1 -1
  232. package/dist-versioned/components/popup/popup.d.ts +1 -1
  233. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  234. package/dist-versioned/components/radio/radio.d.ts +1 -1
  235. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  236. package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
  237. package/dist-versioned/components/range/range.d.ts +1 -1
  238. package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
  239. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  240. package/dist-versioned/components/select/select.d.ts +1 -1
  241. package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
  242. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  243. package/dist-versioned/components/step/step.d.ts +1 -1
  244. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  245. package/dist-versioned/components/switch/switch.d.ts +1 -1
  246. package/dist-versioned/components/tab/tab.d.ts +1 -1
  247. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  248. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  249. package/dist-versioned/components/tag/tag.d.ts +1 -1
  250. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  251. package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
  252. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  253. package/dist-versioned/components/video/video.d.ts +1 -1
  254. package/dist-versioned/custom-elements.json +244 -244
  255. package/dist-versioned/internal/form.js +3 -3
  256. package/dist-versioned/solid-components.css +2 -2
  257. package/dist-versioned/vscode.html-custom-data.json +94 -94
  258. package/dist-versioned/web-types.json +157 -157
  259. package/package.json +1 -1
@@ -7,5 +7,5 @@ import{a as s}from"./chunk.PV6UYBMY.js";import{a as n,b as l}from"./chunk.PJ7JCM
7
7
  </svg> `,place:`
8
8
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75">
9
9
  <path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd" />
10
- </svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let i=this.isLink(),c=this.notInteractive?n`div`:i?n`a`:n`button`,d=h(this.marker[this.variant]),p=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return l`<${c} part="base" class="${r("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${s(i?this.href:void 0)}" target="${s(i?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${s(this.notInteractive||i?void 0:"button")}" aria-label="${s(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${s(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${r("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 sd-6-4-0-map-marker-cluster--hovered-color-icon-fill",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"sd-6-4-0-map-marker-cluster-color-icon-fill",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${p};-webkit-mask-image:${p}"><div class="${r("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${r("min-w-full min-h-full skew-y-[-11deg]",{cluster:"",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?l`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${d} ${this.variant==="cluster"?l`<div id="cluster-border" class="${r("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${r("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${c}>`}};t.styles=[...o.styles,v`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
11
- :host{display:block}#motion-wrapper{mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem) * var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{margin-top:calc(var(--sd-spacing-2) * -1);font-size:calc(var(--sd-font-size-3xl,2rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=motion-wrapper]>div>div{background-color:rgba(var(--sd-map-marker-cluster--hovered-color-icon-fill))}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow-size:drop-shadow(var(--sd-drop-shadow));--tw-drop-shadow:drop-shadow(var(--sd-drop-shadow));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}:host([variant=main]) #marker-circle{width:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));height:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1))}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:String,reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a({type:String,reflect:!0})],t.prototype,"href",2),e([a({type:String,reflect:!0})],t.prototype,"target",2),e([a({reflect:!0})],t.prototype,"label",2),t=e([m("sd-6-4-0-map-marker")],t);export{t as a};
10
+ </svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let i=this.isLink(),c=this.notInteractive?n`div`:i?n`a`:n`button`,d=h(this.marker[this.variant]),p=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return l`<${c} part="base" class="${r("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${s(i?this.href:void 0)}" target="${s(i?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${s(this.notInteractive||i?void 0:"button")}" aria-label="${s(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${s(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${r("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 sd-6-4-1-map-marker-cluster--hovered-color-icon-fill",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"sd-6-4-1-map-marker-cluster-color-icon-fill",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${p};-webkit-mask-image:${p}"><div class="${r("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${r("min-w-full min-h-full skew-y-[-11deg]",{cluster:"",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?l`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${d} ${this.variant==="cluster"?l`<div id="cluster-border" class="${r("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${r("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${c}>`}};t.styles=[...o.styles,v`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
11
+ :host{display:block}#motion-wrapper{mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem) * var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem) * var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{margin-top:calc(var(--sd-spacing-2) * -1);font-size:calc(var(--sd-font-size-3xl,2rem) * var(--map-marker-scaling,1))}:host([variant=cluster]) [part=motion-wrapper]>div>div{background-color:rgba(var(--sd-map-marker-cluster--hovered-color-icon-fill))}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow-size:drop-shadow(var(--sd-drop-shadow));--tw-drop-shadow:drop-shadow(var(--sd-drop-shadow));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}:host([variant=main]) #marker-circle{width:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));height:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem) * var(--map-marker-scaling,1))}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:String,reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a({type:String,reflect:!0})],t.prototype,"href",2),e([a({type:String,reflect:!0})],t.prototype,"target",2),e([a({reflect:!0})],t.prototype,"label",2),t=e([m("sd-6-4-1-map-marker")],t);export{t as a};
@@ -1,4 +1,4 @@
1
- import{a as f}from"./chunk.CSLPZKLY.js";import{b as c}from"./chunk.D6LAH53B.js";import{e as l,i as u}from"./chunk.763RLJEK.js";var v=()=>new p,p=class{},h=new WeakMap,b=c(class extends f{render(i){return u}update(i,[e]){var t;let s=e!==this.G;return s&&this.G!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e,this.ht=(t=i.options)==null?void 0:t.host,this.rt(this.ct=i.element)),u}rt(i){var e;if(this.isConnected||(i=void 0),typeof this.G=="function"){let s=(e=this.ht)!=null?e:globalThis,t=h.get(s);t===void 0&&(t=new WeakMap,h.set(s,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,i),i!==void 0&&this.G.call(this.ht,i)}else this.G.value=i}get lt(){var i,e,s;return typeof this.G=="function"?(e=h.get((i=this.ht)!=null?i:globalThis))==null?void 0:e.get(this.G):(s=this.G)==null?void 0:s.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var g=class{constructor(e,s){this.popupRef=v();this.enableSubmenuTimer=-1;this.isConnected=!1;this.isPopupConnected=!1;this.skidding=0;this.submenuOpenDelay=100;this.handleMouseMove=e=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${e.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${e.clientY}px`)};this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()};this.handleKeyDown=e=>{switch(e.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":e.target!==this.host&&(e.preventDefault(),e.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(e);break;default:break}};this.handleClick=e=>{var s;e.target===this.host?(e.preventDefault(),e.stopPropagation()):e.target instanceof Element&&(e.target.tagName==="sd-6-4-0-menu-item"||(s=e.target.role)!=null&&s.startsWith("menuitem"))&&e.target.getAttribute("type")!=="checkbox"&&this.disableSubmenu()};this.handleFocusOut=e=>{e.relatedTarget&&e.relatedTarget instanceof Element&&this.host.contains(e.relatedTarget)||this.disableSubmenu()};this.handlePopupMouseover=e=>{e.stopPropagation()};this.handlePopupReposition=()=>{let e=this.host.renderRoot.querySelector("slot[name='submenu']"),s=e==null?void 0:e.assignedElements({flatten:!0}).filter(d=>d.localName==="sd-6-4-0-menu")[0],t=getComputedStyle(this.host).direction==="rtl";if(!s)return;let{left:o,top:n,width:r,height:a}=s.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${t?o+r:o}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${n}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${t?o+r:o}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${n+a}px`)};(this.host=e).addController(this),this.hasSlotController=s}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(e){let s=this.host.renderRoot.querySelector("slot[name='submenu']");if(!s){console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);return}let t=null;for(let o of s.assignedElements())if(t=o.querySelectorAll("sd-6-4-0-menu-item, [role^='menuitem']"),t.length!==0)break;if(!(!t||t.length===0)){t[0].setAttribute("tabindex","0");for(let o=1;o!==t.length;++o)t[o].setAttribute("tabindex","-1");this.popupRef.value&&(e.preventDefault(),e.stopPropagation(),this.popupRef.value.active?t[0]instanceof HTMLElement&&t[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then(()=>{t[0]instanceof HTMLElement&&t[0].focus()}),this.host.requestUpdate()))}}setSubmenuState(e){this.popupRef.value&&this.popupRef.value.active!==e&&(this.popupRef.value.active=e,this.host.requestUpdate())}enableSubmenu(e=!0){e?(window.clearTimeout(this.enableSubmenuTimer),this.enableSubmenuTimer=window.setTimeout(()=>{this.setSubmenuState(!0)},this.submenuOpenDelay)):this.setSubmenuState(!0)}disableSubmenu(){window.clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){var o;if(!((o=this.host.parentElement)!=null&&o.computedStyleMap))return;let e=this.host.parentElement.computedStyleMap(),t=["padding-top","border-top-width","margin-top"].reduce((n,r)=>{var m;let a=(m=e.get(r))!=null?m:new CSSUnitValue(0,"px"),S=(a instanceof CSSUnitValue?a:new CSSUnitValue(0,"px")).to("px");return n-S.value},0);this.skidding=t}isExpanded(){return this.popupRef.value?this.popupRef.value.active:!1}renderSubmenu(){let e=getComputedStyle(this.host).direction==="rtl";return this.isConnected?l`<sd-6-4-0-popup ${b(this.popupRef)} placement="${e?"left-start":"right-start"}" anchor="anchor" flip flip-fallback-strategy="best-fit" skidding="${this.skidding}" strategy="fixed" auto-size="vertical" auto-size-padding="10"><slot name="submenu"></slot></sd-6-4-0-popup>`:l`<slot name="submenu" hidden></slot>`}};export{g as a};
1
+ import{a as f}from"./chunk.CSLPZKLY.js";import{b as c}from"./chunk.D6LAH53B.js";import{e as l,i as u}from"./chunk.763RLJEK.js";var v=()=>new p,p=class{},h=new WeakMap,b=c(class extends f{render(i){return u}update(i,[e]){var t;let s=e!==this.G;return s&&this.G!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e,this.ht=(t=i.options)==null?void 0:t.host,this.rt(this.ct=i.element)),u}rt(i){var e;if(this.isConnected||(i=void 0),typeof this.G=="function"){let s=(e=this.ht)!=null?e:globalThis,t=h.get(s);t===void 0&&(t=new WeakMap,h.set(s,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,i),i!==void 0&&this.G.call(this.ht,i)}else this.G.value=i}get lt(){var i,e,s;return typeof this.G=="function"?(e=h.get((i=this.ht)!=null?i:globalThis))==null?void 0:e.get(this.G):(s=this.G)==null?void 0:s.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var g=class{constructor(e,s){this.popupRef=v();this.enableSubmenuTimer=-1;this.isConnected=!1;this.isPopupConnected=!1;this.skidding=0;this.submenuOpenDelay=100;this.handleMouseMove=e=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${e.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${e.clientY}px`)};this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()};this.handleKeyDown=e=>{switch(e.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":e.target!==this.host&&(e.preventDefault(),e.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(e);break;default:break}};this.handleClick=e=>{var s;e.target===this.host?(e.preventDefault(),e.stopPropagation()):e.target instanceof Element&&(e.target.tagName==="sd-6-4-1-menu-item"||(s=e.target.role)!=null&&s.startsWith("menuitem"))&&e.target.getAttribute("type")!=="checkbox"&&this.disableSubmenu()};this.handleFocusOut=e=>{e.relatedTarget&&e.relatedTarget instanceof Element&&this.host.contains(e.relatedTarget)||this.disableSubmenu()};this.handlePopupMouseover=e=>{e.stopPropagation()};this.handlePopupReposition=()=>{let e=this.host.renderRoot.querySelector("slot[name='submenu']"),s=e==null?void 0:e.assignedElements({flatten:!0}).filter(d=>d.localName==="sd-6-4-1-menu")[0],t=getComputedStyle(this.host).direction==="rtl";if(!s)return;let{left:o,top:n,width:r,height:a}=s.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${t?o+r:o}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${n}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${t?o+r:o}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${n+a}px`)};(this.host=e).addController(this),this.hasSlotController=s}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(e){let s=this.host.renderRoot.querySelector("slot[name='submenu']");if(!s){console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);return}let t=null;for(let o of s.assignedElements())if(t=o.querySelectorAll("sd-6-4-1-menu-item, [role^='menuitem']"),t.length!==0)break;if(!(!t||t.length===0)){t[0].setAttribute("tabindex","0");for(let o=1;o!==t.length;++o)t[o].setAttribute("tabindex","-1");this.popupRef.value&&(e.preventDefault(),e.stopPropagation(),this.popupRef.value.active?t[0]instanceof HTMLElement&&t[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then(()=>{t[0]instanceof HTMLElement&&t[0].focus()}),this.host.requestUpdate()))}}setSubmenuState(e){this.popupRef.value&&this.popupRef.value.active!==e&&(this.popupRef.value.active=e,this.host.requestUpdate())}enableSubmenu(e=!0){e?(window.clearTimeout(this.enableSubmenuTimer),this.enableSubmenuTimer=window.setTimeout(()=>{this.setSubmenuState(!0)},this.submenuOpenDelay)):this.setSubmenuState(!0)}disableSubmenu(){window.clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){var o;if(!((o=this.host.parentElement)!=null&&o.computedStyleMap))return;let e=this.host.parentElement.computedStyleMap(),t=["padding-top","border-top-width","margin-top"].reduce((n,r)=>{var m;let a=(m=e.get(r))!=null?m:new CSSUnitValue(0,"px"),S=(a instanceof CSSUnitValue?a:new CSSUnitValue(0,"px")).to("px");return n-S.value},0);this.skidding=t}isExpanded(){return this.popupRef.value?this.popupRef.value.active:!1}renderSubmenu(){let e=getComputedStyle(this.host).direction==="rtl";return this.isConnected?l`<sd-6-4-1-popup ${b(this.popupRef)} placement="${e?"left-start":"right-start"}" anchor="anchor" flip flip-fallback-strategy="best-fit" skidding="${this.skidding}" strategy="fixed" auto-size="vertical" auto-size-padding="10"><slot name="submenu"></slot></sd-6-4-1-popup>`:l`<slot name="submenu" hidden></slot>`}};export{g as a};
2
2
  /*! Bundled license information:
3
3
 
4
4
  lit-html/directives/ref.js:
@@ -1 +1 @@
1
- import{e as p}from"./chunk.763RLJEK.js";import{a as l,b as m}from"./chunk.6EV4YU6C.js";var a=new WeakMap,n=new WeakMap,c=new WeakMap,d=new WeakMap,v=class{constructor(t,e){this.handleFormData=t=>{let e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),s=this.host.tagName.toLowerCase()==="sd-6-4-0-button";!e&&!s&&typeof o=="string"&&o.length>0&&typeof i!="undefined"&&(Array.isArray(i)?i.forEach(r=>{t.formData.append(o,r.toString())}):t.formData.append(o,i.toString()))};this.handleFormSubmit=t=>{var i,s;let e=this.options.disabled(this.host),o=this.options.reportValidity;if(this.form&&!this.form.noValidate&&((i=a.get(this.form))==null||i.forEach(r=>{this.setUserInteracted(r,!0)})),this.form&&!this.form.noValidate&&!e&&!o(this.host)){t.preventDefault(),t.stopImmediatePropagation();let r=(s=this.form)==null?void 0:s.querySelectorAll("[data-invalid]");Array.from(r).filter(h=>h.tagName.toLowerCase()==="sd-6-4-0-radio-group").forEach(h=>{var f,u;(u=(f=h.shadowRoot)==null?void 0:f.querySelector("input"))==null||u.dispatchEvent(new Event("invalid"))}),r!=null&&r.length&&r[0].focus()}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),d.set(this.host,[])};this.handleInteraction=t=>{let e=d.get(this.host);e.includes(t.type)||e.push(t.type),e.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)};this.fakeUserInteraction=()=>{this.setUserInteracted(this.host,!0)};(this.host=t).addController(this),this.options=l({form:o=>{if(o.hasAttribute("form")&&o.getAttribute("form")!==""){let i=o.getRootNode(),s=o.getAttribute("form");if(s)return i.getElementById(s)}return o.closest("form")},name:o=>o.name,value:o=>o.value,defaultValue:o=>o.defaultValue,disabled:o=>{var i;return(i=o.disabled)!=null?i:!1},reportValidity:o=>typeof o.reportValidity=="function"?o.reportValidity():!0,setValue:(o,i)=>o.value=i,assumeInteractionOn:["sd-6-4-0-input"]},e)}hostConnected(){let t=this.options.form(this.host);t&&this.attachForm(t),d.set(this.host,[]),this.options.assumeInteractionOn.forEach(e=>{this.host.addEventListener(e,this.handleInteraction)})}hostDisconnected(){this.detachForm(),d.delete(this.host),this.options.assumeInteractionOn.forEach(t=>{this.host.removeEventListener(t,this.handleInteraction)})}hostUpdated(){var e;let t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&(this.setValidity((e=this.host)==null?void 0:e.validity.valid),this.updateValidityStyle())}attachForm(t){t?(this.form=t,a.has(this.form)?a.get(this.form).add(this.host):a.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),n.has(this.form)||(n.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var t;this.form&&((t=a.get(this.form))==null||t.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),n.has(this.form)&&(this.form.reportValidity=n.get(this.form),n.delete(this.form))),this.form=void 0}reportFormValidity(){if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let e of t)if(typeof e.reportValidity=="function"&&!e.reportValidity())return!1}return!0}setUserInteracted(t,e){c.set(t,e),t.requestUpdate()}doAction(t,e){if(this.form){let o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(i=>{e.hasAttribute(i)&&o.setAttribute(i,e.getAttribute(i))})),this.form.append(o),o.click(),o.remove()}}updateValidityStyle(){this.host.hasAttribute("data-user-valid")&&this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!0),this.host.showInvalidStyle=!1):this.host.hasAttribute("data-user-invalid")&&!this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!0):(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!1)}getForm(){var t;return(t=this.form)!=null?t:null}renderInvalidMessage(t){let e={sm:"text-sm",md:"text-base",lg:"text-base"}[t];return p`<div id="invalid-message" class="text-error text-left ${e}" part="invalid-message" aria-live="polite" ?hidden="${!this.host.showInvalidStyle}"></div>`}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){var s;let e=this.host,o=!!c.get(e),i=!!e.required;(s=this.form)!=null&&s.noValidate?(e.removeAttribute("data-required"),e.removeAttribute("data-optional"),e.removeAttribute("data-invalid"),e.removeAttribute("data-valid"),e.removeAttribute("data-user-invalid"),e.removeAttribute("data-user-valid"),e.removeAttribute("aria-invalid")):(e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o),e.setAttribute("aria-invalid",(!t).toString()))}updateValidity(){let t=this.host;this.setValidity(t==null?void 0:t.validity.valid)}emitInvalidEvent(t){t==null||t.preventDefault();let e=new CustomEvent("sd-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault()}},y=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),F=Object.freeze(m(l({},y),{valid:!1,valueMissing:!0})),V=Object.freeze(m(l({},y),{valid:!1,customError:!0}));export{a,v as b,y as c,F as d,V as e};
1
+ import{e as p}from"./chunk.763RLJEK.js";import{a as l,b as m}from"./chunk.6EV4YU6C.js";var a=new WeakMap,n=new WeakMap,c=new WeakMap,d=new WeakMap,v=class{constructor(t,e){this.handleFormData=t=>{let e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),s=this.host.tagName.toLowerCase()==="sd-6-4-1-button";!e&&!s&&typeof o=="string"&&o.length>0&&typeof i!="undefined"&&(Array.isArray(i)?i.forEach(r=>{t.formData.append(o,r.toString())}):t.formData.append(o,i.toString()))};this.handleFormSubmit=t=>{var i,s;let e=this.options.disabled(this.host),o=this.options.reportValidity;if(this.form&&!this.form.noValidate&&((i=a.get(this.form))==null||i.forEach(r=>{this.setUserInteracted(r,!0)})),this.form&&!this.form.noValidate&&!e&&!o(this.host)){t.preventDefault(),t.stopImmediatePropagation();let r=(s=this.form)==null?void 0:s.querySelectorAll("[data-invalid]");Array.from(r).filter(h=>h.tagName.toLowerCase()==="sd-6-4-1-radio-group").forEach(h=>{var f,u;(u=(f=h.shadowRoot)==null?void 0:f.querySelector("input"))==null||u.dispatchEvent(new Event("invalid"))}),r!=null&&r.length&&r[0].focus()}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),d.set(this.host,[])};this.handleInteraction=t=>{let e=d.get(this.host);e.includes(t.type)||e.push(t.type),e.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)};this.fakeUserInteraction=()=>{this.setUserInteracted(this.host,!0)};(this.host=t).addController(this),this.options=l({form:o=>{if(o.hasAttribute("form")&&o.getAttribute("form")!==""){let i=o.getRootNode(),s=o.getAttribute("form");if(s)return i.getElementById(s)}return o.closest("form")},name:o=>o.name,value:o=>o.value,defaultValue:o=>o.defaultValue,disabled:o=>{var i;return(i=o.disabled)!=null?i:!1},reportValidity:o=>typeof o.reportValidity=="function"?o.reportValidity():!0,setValue:(o,i)=>o.value=i,assumeInteractionOn:["sd-6-4-1-input"]},e)}hostConnected(){let t=this.options.form(this.host);t&&this.attachForm(t),d.set(this.host,[]),this.options.assumeInteractionOn.forEach(e=>{this.host.addEventListener(e,this.handleInteraction)})}hostDisconnected(){this.detachForm(),d.delete(this.host),this.options.assumeInteractionOn.forEach(t=>{this.host.removeEventListener(t,this.handleInteraction)})}hostUpdated(){var e;let t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&(this.setValidity((e=this.host)==null?void 0:e.validity.valid),this.updateValidityStyle())}attachForm(t){t?(this.form=t,a.has(this.form)?a.get(this.form).add(this.host):a.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),n.has(this.form)||(n.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var t;this.form&&((t=a.get(this.form))==null||t.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),n.has(this.form)&&(this.form.reportValidity=n.get(this.form),n.delete(this.form))),this.form=void 0}reportFormValidity(){if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let e of t)if(typeof e.reportValidity=="function"&&!e.reportValidity())return!1}return!0}setUserInteracted(t,e){c.set(t,e),t.requestUpdate()}doAction(t,e){if(this.form){let o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(i=>{e.hasAttribute(i)&&o.setAttribute(i,e.getAttribute(i))})),this.form.append(o),o.click(),o.remove()}}updateValidityStyle(){this.host.hasAttribute("data-user-valid")&&this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!0),this.host.showInvalidStyle=!1):this.host.hasAttribute("data-user-invalid")&&!this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!0):(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!1)}getForm(){var t;return(t=this.form)!=null?t:null}renderInvalidMessage(t){let e={sm:"text-sm",md:"text-base",lg:"text-base"}[t];return p`<div id="invalid-message" class="text-error text-left ${e}" part="invalid-message" aria-live="polite" ?hidden="${!this.host.showInvalidStyle}"></div>`}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){var s;let e=this.host,o=!!c.get(e),i=!!e.required;(s=this.form)!=null&&s.noValidate?(e.removeAttribute("data-required"),e.removeAttribute("data-optional"),e.removeAttribute("data-invalid"),e.removeAttribute("data-valid"),e.removeAttribute("data-user-invalid"),e.removeAttribute("data-user-valid"),e.removeAttribute("aria-invalid")):(e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o),e.setAttribute("aria-invalid",(!t).toString()))}updateValidity(){let t=this.host;this.setValidity(t==null?void 0:t.validity.valid)}emitInvalidEvent(t){t==null||t.preventDefault();let e=new CustomEvent("sd-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault()}},y=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),F=Object.freeze(m(l({},y),{valid:!1,valueMissing:!0})),V=Object.freeze(m(l({},y),{valid:!1,customError:!0}));export{a,v as b,y as c,F as d,V as e};
@@ -1,6 +1,6 @@
1
- import{a as b}from"./chunk.PV6UYBMY.js";import{a as h,c as p}from"./chunk.B2NUKX6G.js";import{a as m}from"./chunk.KLRPP4NQ.js";import{a as y}from"./chunk.IQPMMUES.js";import{a as o}from"./chunk.YFQFOIEM.js";import{a as f}from"./chunk.NYKJXI3Q.js";import{a as v,b as a,d as n,h as c}from"./chunk.ALCKOGA7.js";import{b as g,e as u}from"./chunk.763RLJEK.js";import{b as r,e as l,f as d}from"./chunk.W4QBFD6E.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends c{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new y(this)}updateMaxHeight(){var s;let e=(s=this.contentPreview)==null?void 0:s.scrollHeight.toString();this.style.setProperty("--max-height-pixel",`${e}px`),this.style.setProperty("--max-height",e)}onToggleClick(){this.updateMaxHeight(),this.open=!this.open}async onOpenChange(){if(this.body.classList.add("transitioning"),this.open){this.emit("sd-show"),await l(this.body);let{keyframes:e,options:s}=p(this,"expandable.show",{dir:this.localize.dir()});await r(this.body,d(e,this.body.scrollHeight),s),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-show")})}else{this.emit("sd-hide"),await l(this.body);let{keyframes:e,options:s}=p(this,"expandable.hide",{dir:this.localize.dir()});await r(this.body,d(e,this.body.scrollHeight),s),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-hide")})}this.details.setAttribute("open",this.open.toString()),this.body.classList.remove("transitioning")}async show(){if(!this.open)return this.onToggleClick(),m(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),m(this,"sd-after-hide")}render(){return u`<div part="base" class="flex flex-col-reverse gap-4"><button part="toggle" class="${o("sd-interactive sd-interactive--reset",this.inverted&&"sd-interactive--inverted",this.inverted?"!focus-visible:focus-outline-inverted":"!focus-visible:focus-outline")}" @click="${this.onToggleClick}" aria-expanded="${this.open}"><div class="${o("h-full justify-center w-full text-base flex items-center toggle")}"><span part="toggle-icon" class="${o("flex items-center mr-2 transition-transform duration-medium ease-in-out",this.open&&"rotate-180")}"><slot name="expand-icon" class="${o(this.open&&"hidden")}"><sd-6-4-0-icon library="_internal" name="chevron-down" class="text-xl"></sd-6-4-0-icon></slot><slot name="collapse-icon" class="${o(!this.open&&"hidden")}"><sd-6-4-0-icon library="_internal" name="chevron-down" class="text-xl"></sd-6-4-0-icon></slot></span><slot name="toggle-closed" class="${o(this.open&&"hidden")}">${this.localize.term("showMore")}</slot><slot name="toggle-open" class="${o(!this.open&&"hidden")}">${this.localize.term("showLess")}</slot></div></button><details part="details" ?inert="${b(!this.open)}"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details></div>`}firstUpdated(){this.cloneContentToLightDOM(),this.details.setAttribute("open",this.open.toString())}cloneContentToLightDOM(){let e=document.createElement("div");e.setAttribute("slot","clone"),Array.from(this.childNodes).forEach(w=>{let x=w.cloneNode(!0);e.appendChild(x)}),this.appendChild(e)}};t.styles=[...c.styles,g`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
1
+ import{a as b}from"./chunk.PV6UYBMY.js";import{a as h,c as p}from"./chunk.B2NUKX6G.js";import{a as m}from"./chunk.KLRPP4NQ.js";import{a as y}from"./chunk.IQPMMUES.js";import{a as o}from"./chunk.YFQFOIEM.js";import{a as f}from"./chunk.NYKJXI3Q.js";import{a as v,b as a,d as n,h as c}from"./chunk.ALCKOGA7.js";import{b as g,e as u}from"./chunk.763RLJEK.js";import{b as r,e as l,f as d}from"./chunk.W4QBFD6E.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends c{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new y(this)}updateMaxHeight(){var s;let e=(s=this.contentPreview)==null?void 0:s.scrollHeight.toString();this.style.setProperty("--max-height-pixel",`${e}px`),this.style.setProperty("--max-height",e)}onToggleClick(){this.updateMaxHeight(),this.open=!this.open}async onOpenChange(){if(this.body.classList.add("transitioning"),this.open){this.emit("sd-show"),await l(this.body);let{keyframes:e,options:s}=p(this,"expandable.show",{dir:this.localize.dir()});await r(this.body,d(e,this.body.scrollHeight),s),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-show")})}else{this.emit("sd-hide"),await l(this.body);let{keyframes:e,options:s}=p(this,"expandable.hide",{dir:this.localize.dir()});await r(this.body,d(e,this.body.scrollHeight),s),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-hide")})}this.details.setAttribute("open",this.open.toString()),this.body.classList.remove("transitioning")}async show(){if(!this.open)return this.onToggleClick(),m(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),m(this,"sd-after-hide")}render(){return u`<div part="base" class="flex flex-col-reverse gap-4"><button part="toggle" class="${o("sd-interactive sd-interactive--reset",this.inverted&&"sd-interactive--inverted",this.inverted?"!focus-visible:focus-outline-inverted":"!focus-visible:focus-outline")}" @click="${this.onToggleClick}" aria-expanded="${this.open}"><div class="${o("h-full justify-center w-full text-base flex items-center toggle")}"><span part="toggle-icon" class="${o("flex items-center mr-2 transition-transform duration-medium ease-in-out",this.open&&"rotate-180")}"><slot name="expand-icon" class="${o(this.open&&"hidden")}"><sd-6-4-1-icon library="_internal" name="chevron-down" class="text-xl"></sd-6-4-1-icon></slot><slot name="collapse-icon" class="${o(!this.open&&"hidden")}"><sd-6-4-1-icon library="_internal" name="chevron-down" class="text-xl"></sd-6-4-1-icon></slot></span><slot name="toggle-closed" class="${o(this.open&&"hidden")}">${this.localize.term("showMore")}</slot><slot name="toggle-open" class="${o(!this.open&&"hidden")}">${this.localize.term("showLess")}</slot></div></button><details part="details" ?inert="${b(!this.open)}"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details></div>`}firstUpdated(){this.cloneContentToLightDOM(),this.details.setAttribute("open",this.open.toString())}cloneContentToLightDOM(){let e=document.createElement("div");e.setAttribute("slot","clone"),Array.from(this.childNodes).forEach(w=>{let x=w.cloneNode(!0);e.appendChild(x)}),this.appendChild(e)}};t.styles=[...c.styles,g`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
2
  :host{--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(
3
3
  --gradient-color-start,
4
4
  transparent,
5
5
  var(--gradient-color-end, rgba(var(--sd-color-background-white, rgba(var(--sd-color-white)))))
6
- ) 80%,var(--gradient-color-end, rgba(var(--sd-color-background-white, rgba(var(--sd-color-white))))) 100%;position:relative;display:inline-block;width:100%}.toggle::-moz-focus-inner{--tw-border-style:none;border-style:none;padding:calc(var(--sd-spacing-1) * 0)}details>summary::-webkit-details-marker,details[open] summary{display:none}summary{max-block-size:var(--component-expandable-max-block-size)}:host([open]) summary{max-block-size:var(--max-height-pixel,1000vh)}.content{max-block-size:var(--component-expandable-max-block-size)}:host([open]) .content,:host:has(.transitioning) .content{max-block-size:var(--max-height-pixel,1000vh)}.content::after{position:absolute;bottom:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);display:block;width:100%;opacity:var(--sd-opacity-0);transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,150ms));--tw-duration:var(--sd-duration-medium, 300ms);transition-duration:var(--sd-duration-medium,300ms);--tw-ease:var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1));content:' ';height:var(--gradient-height);background:linear-gradient(180deg,var(--gradient))}:host([inverted]){--color-primary-rgb:0,53,142;--gradient-color-start:rgba(var(--color-primary-rgb), 0);--gradient-color-end:rgba(var(--color-primary-rgb), 1)}:host([inverted]) .content::after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,var(--gradient)))}:host(:not([open])) .content::after{opacity:var(--sd-opacity-100)}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}`],i([n(".content-preview")],t.prototype,"contentPreview",2),i([n("details")],t.prototype,"details",2),i([n('[part="content"]')],t.prototype,"body",2),i([a({type:Boolean,reflect:!0})],t.prototype,"open",2),i([a({type:Boolean,reflect:!0})],t.prototype,"inverted",2),i([f("open",{waitUntilFirstUpdate:!0})],t.prototype,"onOpenChange",1),t=i([v("sd-6-4-0-expandable")],t);h("expandable.show",{keyframes:[{height:"var(--component-expandable-max-block-size, 90px)"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});h("expandable.hide",{keyframes:[{height:"auto"},{height:"var(--component-expandable-max-block-size, 90px)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{t as a};
6
+ ) 80%,var(--gradient-color-end, rgba(var(--sd-color-background-white, rgba(var(--sd-color-white))))) 100%;position:relative;display:inline-block;width:100%}.toggle::-moz-focus-inner{--tw-border-style:none;border-style:none;padding:calc(var(--sd-spacing-1) * 0)}details>summary::-webkit-details-marker,details[open] summary{display:none}summary{max-block-size:var(--component-expandable-max-block-size)}:host([open]) summary{max-block-size:var(--max-height-pixel,1000vh)}.content{max-block-size:var(--component-expandable-max-block-size)}:host([open]) .content,:host:has(.transitioning) .content{max-block-size:var(--max-height-pixel,1000vh)}.content::after{position:absolute;bottom:calc(var(--sd-spacing-1) * 0);left:calc(var(--sd-spacing-1) * 0);display:block;width:100%;opacity:var(--sd-opacity-0);transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,150ms));--tw-duration:var(--sd-duration-medium, 300ms);transition-duration:var(--sd-duration-medium,300ms);--tw-ease:var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1));content:' ';height:var(--gradient-height);background:linear-gradient(180deg,var(--gradient))}:host([inverted]){--color-primary-rgb:0,53,142;--gradient-color-start:rgba(var(--color-primary-rgb), 0);--gradient-color-end:rgba(var(--color-primary-rgb), 1)}:host([inverted]) .content::after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,var(--gradient)))}:host(:not([open])) .content::after{opacity:var(--sd-opacity-100)}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}`],i([n(".content-preview")],t.prototype,"contentPreview",2),i([n("details")],t.prototype,"details",2),i([n('[part="content"]')],t.prototype,"body",2),i([a({type:Boolean,reflect:!0})],t.prototype,"open",2),i([a({type:Boolean,reflect:!0})],t.prototype,"inverted",2),i([f("open",{waitUntilFirstUpdate:!0})],t.prototype,"onOpenChange",1),t=i([v("sd-6-4-1-expandable")],t);h("expandable.show",{keyframes:[{height:"var(--component-expandable-max-block-size, 90px)"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});h("expandable.hide",{keyframes:[{height:"auto"},{height:"var(--component-expandable-max-block-size, 90px)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{t as a};
@@ -1,2 +1,2 @@
1
- import{a as N}from"./chunk.CSLPZKLY.js";import{a as B}from"./chunk.VYBQ3X2B.js";import{a as A}from"./chunk.N3WG3NAL.js";import{b as z}from"./chunk.CJ34NUTS.js";import{a as n}from"./chunk.PV6UYBMY.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as L,b as T}from"./chunk.D6LAH53B.js";import{a as F}from"./chunk.IQPMMUES.js";import{a}from"./chunk.YFQFOIEM.js";import{a as b}from"./chunk.NYKJXI3Q.js";import{a as V,b as s,c as m,d as g,h as x}from"./chunk.ALCKOGA7.js";import{b as D,e as r,h as E,i as P}from"./chunk.763RLJEK.js";import{a as k,e as i}from"./chunk.6EV4YU6C.js";var w=class extends N{constructor(e){super(e);this.handlePointerDown=e=>{e.button!==0||this.host.disabled||this.spinOnLongPressCallback(e)};this.handlePointerUp=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(e.type!==L.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return P}update(e,[l]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=k({},l),this.host.addEventListener("pointerdown",this.handlePointerDown)),E}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(e){var l;e.preventDefault(),e.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(l=this.observer)==null||l.disconnect(),this.observer=new MutationObserver(c=>{c.forEach(p=>{p.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var e;clearInterval(this.interval),clearTimeout(this.timeout),(e=this.observer)==null||e.disconnect()}},$=T(w);var S,R=(S=navigator.userAgentData)==null?void 0:S.brands.some(f=>f.brand.includes("Chromium")),J=R?!1:navigator.userAgent.includes("Firefox"),t=class extends x{constructor(){super(...arguments);this.formControlController=new z(this);this.hasSlotController=new M(this,"help-text","label","left","right","message","placeholder");this.localize=new F(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var e,l;return(l=(e=this.input)==null?void 0:e.valueAsDate)!=null?l:null}set valueAsDate(e){let l=document.createElement("input");l.type="date",l.valueAsDate=e,this.value=l.value}get valueAsNumber(){var e,l;return(l=(e=this.input)==null?void 0:e.valueAsNumber)!=null?l:parseFloat(this.value)}set valueAsNumber(e){let l=document.createElement("input");l.type="number",l.valueAsNumber=e,this.value=l.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(e){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),e.stopPropagation()}handleSearchClick(e){this.emit("sd-search"),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleKeyDown(e){let l=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!l&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,l,c="none"){this.input.setSelectionRange(e,l,c)}setRangeText(e,l,c,p){this.input.setRangeText(e,l,c,p),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},l=this.label?!0:!!e.label,c=this.helpText?!0:!!e.helpText,p=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),H=!!e.tooltip,U=e.left,v=this.value!==null&&String(this.value).length>0,d=this.floatingLabel&&l&&(this.hasFocus||v),y=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?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",C=this.size==="sm"?"text-sm":"text-base",O={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"}[y],u=this.disabled||this.visuallyDisabled?"text-neutral-500":"form-control-color-icon",h={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],o={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],K=this.size==="lg"?this.floatingLabel?d?"py-3":"py-4":"py-2":this.floatingLabel?d?"py-2":"py-3":"py-1",q={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return r`<div part="form-control" class="${a((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${(l||H)&&!this.floatingLabel?r`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${a(l?"inline-block form-control-color-text":"hidden",C)}" for="input" aria-hidden="${l?"false":"true"}"><slot name="label">${this.label}</slot></label> ${e.tooltip?r`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${a("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${a("absolute w-full h-full pointer-events-none border rounded-default transition-[border] ease-in-out duration-medium hover:duration-fast",O)}"></div><div part="base" class="${a("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",["disabled","visuallyDisabled"].includes(y)?"text-neutral-500":"form-control-color-text",["invalid","activeInvalid"].includes(y)&&"form-control--invalid-color-background",K)}">${e.left?r`<slot name="left" part="left" class="${a("inline-flex",this.size==="sm"?"mr-1":"mr-2",u,o)}"></slot>`:""} <input part="input" id="input" class="${a("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",this.size==="sm"?d?"h-4":"h-6":d?"h-6":"h-8",C,d&&"leading-none mt-4")}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${n(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${!this.floatingLabel||d?n(this.placeholder):""}" minlength="${n(this.minlength)}" maxlength="${n(this.maxlength)}" min="${n(this.min)}" max="${n(this.max)}" step="${n(this.step)}" .value="${B(this.value)}" autocapitalize="${n(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${n(this.autocomplete)}" autocorrect="${n(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${n(this.pattern)}" enterkeyhint="${n(this.enterkeyhint)}" inputmode="${n(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${l&&this.floatingLabel?r`<label part="form-control-floating-label" class="${a("pointer-events-none absolute",U?q:"left-4",!this.readonly&&"transition-all duration-medium ease-out",!d||!v&&(this.readonly||this.visuallyDisabled)?"top-1/2 -translate-y-1/2":this.size==="lg"?"top-2":"top-1")}" for="input" aria-hidden="${l?"false":"true"}"><span id="floating-label" class="${a("pointer-events-none leading-none",!this.readonly&&"transition-all duration-medium ease-out",!d||!v&&(this.readonly||this.visuallyDisabled)?"text-base":"text-xs",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",d&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null} ${p?r`<button part="clear-button" class="${a("flex justify-center",h)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-4-0-icon class="${a(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-neutral-700",o)}" library="_internal" name="closing-round"></sd-6-4-0-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?r`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="${a("flex items-center sd-interactive",h)}" type="button" @click="${this.handlePasswordToggle}">${this.passwordVisible?r`<slot name="show-password-icon"><sd-6-4-0-icon class="${a(u,o)}" library="_internal" name="eye"></sd-6-4-0-icon></slot>`:r`<slot name="hide-password-icon"><sd-6-4-0-icon class="${a(u,o)}" library="_internal" name="eye-crossed-out"></sd-6-4-0-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!J?r`<sd-6-4-0-icon class="${a(u,h,o)}" library="_internal" name="calendar"></sd-6-4-0-icon>`:""} ${this.type==="time"?r`<sd-6-4-0-icon class="${a(u,h,o)}" library="_internal" name="clock"></sd-6-4-0-icon>`:""} ${this.type==="search"?r`<button class="${a("flex items-center sd-interactive",h)}" type="button" @click="${this.handleSearchClick}"><sd-6-4-0-icon class="${a(u,o)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-6-4-0-icon></button>`:""} ${this.showInvalidStyle?r`<sd-6-4-0-icon part="invalid-icon" class="${a("text-error",h,o)}" library="_internal" name="risk"></sd-6-4-0-icon>`:""} ${this.showValidStyle&&this.styleOnValid?r`<sd-6-4-0-icon class="${a("text-success flex-shrink-0",h,o)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-4-0-icon>`:""} ${e.right?r`<slot name="right" part="right" class="${a("inline-flex",u,h,o)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?r`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${$({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-6-4-0-icon library="_internal" name="minus-circle" label="Decrease value" class="${a(u,h,o)}"></sd-6-4-0-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${$({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-6-4-0-icon library="_internal" name="plus-circle" label="Decrease value" class="${a(u,h,o)}"></sd-6-4-0-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${a("text-sm text-neutral-700 mt-1",c&&!this.showInvalidStyle?"block":"hidden")}" aria-hidden="${!c||this.showInvalidStyle}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};t.styles=[...x.styles,D`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{position:relative;box-sizing:border-box;display:inline-block;width:100%;text-align:left}:host([vertical]){display:block}:host([required]) :is(#label,#floating-label)::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-6-4-0-icon{color:rgba(var(--sd-color-text-neutral-500))}`],i([g("#input")],t.prototype,"input",2),i([g("#invalid-message")],t.prototype,"invalidMessage",2),i([m()],t.prototype,"hasFocus",2),i([m()],t.prototype,"showValidStyle",2),i([m()],t.prototype,"showInvalidStyle",2),i([s({type:String,reflect:!0})],t.prototype,"type",2),i([s({type:String,reflect:!0})],t.prototype,"size",2),i([s({type:String,reflect:!0})],t.prototype,"inputmode",2),i([s()],t.prototype,"value",2),i([A()],t.prototype,"defaultValue",2),i([s({type:String,reflect:!0})],t.prototype,"placeholder",2),i([s({type:String,reflect:!0})],t.prototype,"label",2),i([s({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),i([s({type:Boolean,reflect:!0})],t.prototype,"clearable",2),i([s({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([s({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),i([s({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([s({attribute:"password-toggle",type:Boolean,reflect:!0})],t.prototype,"passwordToggle",2),i([s({attribute:"password-visible",type:Boolean,reflect:!0})],t.prototype,"passwordVisible",2),i([s({attribute:"spin-buttons",type:Boolean,reflect:!0})],t.prototype,"spinButtons",2),i([s({type:Number,reflect:!0})],t.prototype,"minlength",2),i([s({type:Number,reflect:!0})],t.prototype,"maxlength",2),i([s({reflect:!0})],t.prototype,"min",2),i([s({reflect:!0})],t.prototype,"max",2),i([s({type:String,reflect:!0})],t.prototype,"form",2),i([s({type:String,reflect:!0})],t.prototype,"name",2),i([s({type:String,reflect:!0})],t.prototype,"title",2),i([s({type:Boolean,reflect:!0})],t.prototype,"required",2),i([s({attribute:"floating-label",type:Boolean,reflect:!0})],t.prototype,"floatingLabel",2),i([s()],t.prototype,"pattern",2),i([s({reflect:!0})],t.prototype,"step",2),i([s({type:String,reflect:!0})],t.prototype,"autocapitalize",2),i([s({type:String,reflect:!0})],t.prototype,"autocorrect",2),i([s({reflect:!0})],t.prototype,"autocomplete",2),i([s({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),i([s({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),i([s({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),i([s({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],t.prototype,"spellcheck",2),i([b("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([b("step",{waitUntilFirstUpdate:!0})],t.prototype,"handleStepChange",1),i([b("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=i([V("sd-6-4-0-input")],t);export{t as a};
1
+ import{a as N}from"./chunk.CSLPZKLY.js";import{a as B}from"./chunk.VYBQ3X2B.js";import{a as A}from"./chunk.N3WG3NAL.js";import{b as z}from"./chunk.CJ34NUTS.js";import{a as n}from"./chunk.PV6UYBMY.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as L,b as T}from"./chunk.D6LAH53B.js";import{a as F}from"./chunk.IQPMMUES.js";import{a}from"./chunk.YFQFOIEM.js";import{a as b}from"./chunk.NYKJXI3Q.js";import{a as V,b as s,c as m,d as g,h as x}from"./chunk.ALCKOGA7.js";import{b as D,e as r,h as E,i as P}from"./chunk.763RLJEK.js";import{a as k,e as i}from"./chunk.6EV4YU6C.js";var w=class extends N{constructor(e){super(e);this.handlePointerDown=e=>{e.button!==0||this.host.disabled||this.spinOnLongPressCallback(e)};this.handlePointerUp=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(e.type!==L.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return P}update(e,[l]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=k({},l),this.host.addEventListener("pointerdown",this.handlePointerDown)),E}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(e){var l;e.preventDefault(),e.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(l=this.observer)==null||l.disconnect(),this.observer=new MutationObserver(c=>{c.forEach(p=>{p.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var e;clearInterval(this.interval),clearTimeout(this.timeout),(e=this.observer)==null||e.disconnect()}},$=T(w);var S,R=(S=navigator.userAgentData)==null?void 0:S.brands.some(f=>f.brand.includes("Chromium")),J=R?!1:navigator.userAgent.includes("Firefox"),t=class extends x{constructor(){super(...arguments);this.formControlController=new z(this);this.hasSlotController=new M(this,"help-text","label","left","right","message","placeholder");this.localize=new F(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var e,l;return(l=(e=this.input)==null?void 0:e.valueAsDate)!=null?l:null}set valueAsDate(e){let l=document.createElement("input");l.type="date",l.valueAsDate=e,this.value=l.value}get valueAsNumber(){var e,l;return(l=(e=this.input)==null?void 0:e.valueAsNumber)!=null?l:parseFloat(this.value)}set valueAsNumber(e){let l=document.createElement("input");l.type="number",l.valueAsNumber=e,this.value=l.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(e){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),e.stopPropagation()}handleSearchClick(e){this.emit("sd-search"),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleKeyDown(e){let l=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!l&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,l,c="none"){this.input.setSelectionRange(e,l,c)}setRangeText(e,l,c,p){this.input.setRangeText(e,l,c,p),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},l=this.label?!0:!!e.label,c=this.helpText?!0:!!e.helpText,p=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),H=!!e.tooltip,U=e.left,v=this.value!==null&&String(this.value).length>0,d=this.floatingLabel&&l&&(this.hasFocus||v),y=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?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",C=this.size==="sm"?"text-sm":"text-base",O={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"}[y],u=this.disabled||this.visuallyDisabled?"text-neutral-500":"form-control-color-icon",h={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],o={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],K=this.size==="lg"?this.floatingLabel?d?"py-3":"py-4":"py-2":this.floatingLabel?d?"py-2":"py-3":"py-1",q={sm:"left-[36px]",md:"left-[44px]",lg:"left-12"}[this.size];return r`<div part="form-control" class="${a((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${(l||H)&&!this.floatingLabel?r`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${a(l?"inline-block form-control-color-text":"hidden",C)}" for="input" aria-hidden="${l?"false":"true"}"><slot name="label">${this.label}</slot></label> ${e.tooltip?r`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${a("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${a("absolute w-full h-full pointer-events-none border rounded-default transition-[border] ease-in-out duration-medium hover:duration-fast",O)}"></div><div part="base" class="${a("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",["disabled","visuallyDisabled"].includes(y)?"text-neutral-500":"form-control-color-text",["invalid","activeInvalid"].includes(y)&&"form-control--invalid-color-background",K)}">${e.left?r`<slot name="left" part="left" class="${a("inline-flex",this.size==="sm"?"mr-1":"mr-2",u,o)}"></slot>`:""} <input part="input" id="input" class="${a("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",this.size==="sm"?d?"h-4":"h-6":d?"h-6":"h-8",C,d&&"leading-none mt-4")}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${n(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${!this.floatingLabel||d?n(this.placeholder):""}" minlength="${n(this.minlength)}" maxlength="${n(this.maxlength)}" min="${n(this.min)}" max="${n(this.max)}" step="${n(this.step)}" .value="${B(this.value)}" autocapitalize="${n(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${n(this.autocomplete)}" autocorrect="${n(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${n(this.pattern)}" enterkeyhint="${n(this.enterkeyhint)}" inputmode="${n(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${l&&this.floatingLabel?r`<label part="form-control-floating-label" class="${a("pointer-events-none absolute",U?q:"left-4",!this.readonly&&"transition-all duration-medium ease-out",!d||!v&&(this.readonly||this.visuallyDisabled)?"top-1/2 -translate-y-1/2":this.size==="lg"?"top-2":"top-1")}" for="input" aria-hidden="${l?"false":"true"}"><span id="floating-label" class="${a("pointer-events-none leading-none",!this.readonly&&"transition-all duration-medium ease-out",!d||!v&&(this.readonly||this.visuallyDisabled)?"text-base":"text-xs",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",d&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null} ${p?r`<button part="clear-button" class="${a("flex justify-center",h)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-4-1-icon class="${a(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-neutral-700",o)}" library="_internal" name="closing-round"></sd-6-4-1-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?r`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="${a("flex items-center sd-interactive",h)}" type="button" @click="${this.handlePasswordToggle}">${this.passwordVisible?r`<slot name="show-password-icon"><sd-6-4-1-icon class="${a(u,o)}" library="_internal" name="eye"></sd-6-4-1-icon></slot>`:r`<slot name="hide-password-icon"><sd-6-4-1-icon class="${a(u,o)}" library="_internal" name="eye-crossed-out"></sd-6-4-1-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!J?r`<sd-6-4-1-icon class="${a(u,h,o)}" library="_internal" name="calendar"></sd-6-4-1-icon>`:""} ${this.type==="time"?r`<sd-6-4-1-icon class="${a(u,h,o)}" library="_internal" name="clock"></sd-6-4-1-icon>`:""} ${this.type==="search"?r`<button class="${a("flex items-center sd-interactive",h)}" type="button" @click="${this.handleSearchClick}"><sd-6-4-1-icon class="${a(u,o)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-6-4-1-icon></button>`:""} ${this.showInvalidStyle?r`<sd-6-4-1-icon part="invalid-icon" class="${a("text-error",h,o)}" library="_internal" name="risk"></sd-6-4-1-icon>`:""} ${this.showValidStyle&&this.styleOnValid?r`<sd-6-4-1-icon class="${a("text-success flex-shrink-0",h,o)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-4-1-icon>`:""} ${e.right?r`<slot name="right" part="right" class="${a("inline-flex",u,h,o)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?r`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${$({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-6-4-1-icon library="_internal" name="minus-circle" label="Decrease value" class="${a(u,h,o)}"></sd-6-4-1-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${$({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-6-4-1-icon library="_internal" name="plus-circle" label="Decrease value" class="${a(u,h,o)}"></sd-6-4-1-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${a("text-sm text-neutral-700 mt-1",c&&!this.showInvalidStyle?"block":"hidden")}" aria-hidden="${!c||this.showInvalidStyle}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};t.styles=[...x.styles,D`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{position:relative;box-sizing:border-box;display:inline-block;width:100%;text-align:left}:host([vertical]){display:block}:host([required]) :is(#label,#floating-label)::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-6-4-1-icon{color:rgba(var(--sd-color-text-neutral-500))}`],i([g("#input")],t.prototype,"input",2),i([g("#invalid-message")],t.prototype,"invalidMessage",2),i([m()],t.prototype,"hasFocus",2),i([m()],t.prototype,"showValidStyle",2),i([m()],t.prototype,"showInvalidStyle",2),i([s({type:String,reflect:!0})],t.prototype,"type",2),i([s({type:String,reflect:!0})],t.prototype,"size",2),i([s({type:String,reflect:!0})],t.prototype,"inputmode",2),i([s()],t.prototype,"value",2),i([A()],t.prototype,"defaultValue",2),i([s({type:String,reflect:!0})],t.prototype,"placeholder",2),i([s({type:String,reflect:!0})],t.prototype,"label",2),i([s({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),i([s({type:Boolean,reflect:!0})],t.prototype,"clearable",2),i([s({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([s({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),i([s({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([s({attribute:"password-toggle",type:Boolean,reflect:!0})],t.prototype,"passwordToggle",2),i([s({attribute:"password-visible",type:Boolean,reflect:!0})],t.prototype,"passwordVisible",2),i([s({attribute:"spin-buttons",type:Boolean,reflect:!0})],t.prototype,"spinButtons",2),i([s({type:Number,reflect:!0})],t.prototype,"minlength",2),i([s({type:Number,reflect:!0})],t.prototype,"maxlength",2),i([s({reflect:!0})],t.prototype,"min",2),i([s({reflect:!0})],t.prototype,"max",2),i([s({type:String,reflect:!0})],t.prototype,"form",2),i([s({type:String,reflect:!0})],t.prototype,"name",2),i([s({type:String,reflect:!0})],t.prototype,"title",2),i([s({type:Boolean,reflect:!0})],t.prototype,"required",2),i([s({attribute:"floating-label",type:Boolean,reflect:!0})],t.prototype,"floatingLabel",2),i([s()],t.prototype,"pattern",2),i([s({reflect:!0})],t.prototype,"step",2),i([s({type:String,reflect:!0})],t.prototype,"autocapitalize",2),i([s({type:String,reflect:!0})],t.prototype,"autocorrect",2),i([s({reflect:!0})],t.prototype,"autocomplete",2),i([s({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),i([s({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),i([s({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),i([s({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],t.prototype,"spellcheck",2),i([b("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([b("step",{waitUntilFirstUpdate:!0})],t.prototype,"handleStepChange",1),i([b("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=i([V("sd-6-4-1-input")],t);export{t as a};
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk.3MADQ6HK.js";import{b as U}from"./chunk.CJ34NUTS.js";import{a as G}from"./chunk.CGQ2BPPZ.js";import{a as K}from"./chunk.IQPMMUES.js";import{a as I}from"./chunk.YFQFOIEM.js";import{a as Y}from"./chunk.NYKJXI3Q.js";import{a as W,b as v,c as E,d as q,h as H}from"./chunk.ALCKOGA7.js";import{b as N,e as V,i as R}from"./chunk.763RLJEK.js";import{e as h}from"./chunk.6EV4YU6C.js";var B={fromAttribute(O){if(!O)return null;let t=O.trim().replace(/[./]/g,"-").match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;let e=`${t[1]}-${t[2]}-${t[3]}`,s=new Date(+t[1],+t[2]-1,+t[3]);return s.getFullYear()!==+t[1]||s.getMonth()!==+t[2]-1||s.getDate()!==+t[3]?null:e},toAttribute(O){return O!=null?O:""}},_={fromAttribute(O){if(!O)return[];let A=[],t=O.trim();if(t.startsWith("["))try{let s=JSON.parse(t);Array.isArray(s)&&(A=s.map(String))}catch(s){return[]}else A=t.split(/[\s,]+/).map(s=>s.trim()).filter(Boolean);let e=[];for(let s of A){let n=s.replace(/[-/]/g,".").split(".");if(n.length!==3)continue;let[l,u,f]=n.map(Number);if(!l||!u||!f)continue;let m=new Date(l,u-1,f);if(m.getFullYear()!==l||m.getMonth()!==u-1||m.getDate()!==f)continue;let d=`${l}-${String(u).padStart(2,"0")}-${String(f).padStart(2,"0")}`;e.push(d)}return e},toAttribute(O){return O?O.join(","):""}},o=class extends H{constructor(){super();this.localize=new K(this);this.hasSlotController=new G(this,"label","help-text","tooltip");this.formControlController=new U(this,{assumeInteractionOn:["sd-blur","sd-6-4-0-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.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(i=>{var n,l;return i instanceof HTMLElement&&(((n=i.classList)==null?void 0:n.contains("nav"))||((l=i.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,u,f,m,d;if(this.disabled||this.visuallyDisabled){(l=t.preventDefault)==null||l.call(t),(u=t.stopPropagation)==null||u.call(t);return}let e=t.target,s=e.value,i=(f=e.selectionStart)!=null?f:s.length,n=(m=t.inputType)==null?void 0:m.startsWith("delete");if(this.range){let c=s.replace(/\D/g,""),r=c.slice(0,8),p=c.slice(8,16),b=this.buildDmyFromDigits(r),S=this.buildDmyFromDigits(p),M;r.length===0?M="":r.length<8?M=b:p.length>0?M=`${b} - ${S}`:M=n?b:`${b} -`;let L=this.countDigitsBeforeCaret(s,i),y;if(L<=8){let g=this.digitIndexToDmyCaretPos(Math.min(L,8));y=Math.min(g,b.length)}else{let g=r.length<8?b.length:b.length+3,D=Math.min(L-8,8),x=this.digitIndexToDmyCaretPos(D);y=g+Math.min(x,S.length)}this.inputValue=M;let $=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(b)){let g=this.dmyToIso(b),D=g?a.parseLocalISO(g):null;!!D&&!this.isDisabled(D)&&this.inMinMax(D)&&this.rangeStart!==g&&(this.rangeStart=g,this.previewEnd=null,this.viewMonth=new Date(D.getFullYear(),D.getMonth(),1),this.focusedDate=a.startOfDayLocal(D),$=!0)}else this.rangeStart&&(this.rangeStart=null,$=!0),this.rangeEnd&&(this.rangeEnd=null,$=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(S)&&this.rangeStart){let g=a.parseLocalISO(this.rangeStart),D=this.dmyToIso(S),x=D?a.parseLocalISO(D):null;if(!!x&&!this.isDisabled(x)&&this.inMinMax(x)){let[k,C]=a.compareDates(g,x)<=0?[g,x]:[x,g],z=a.isSameDay(k,C);if((this.allowSameDayRange||!z)&&!this.wouldRangeContainDisabled(k,C)){let F=a.toLocalISODate(a.startOfDayLocal(k)),P=a.toLocalISODate(a.startOfDayLocal(C));(this.rangeStart!==F||this.rangeEnd!==P)&&(this.rangeStart=F,this.rangeEnd=P,this.viewMonth=new Date(C.getFullYear(),C.getMonth(),1),this.focusedDate=a.startOfDayLocal(C),$=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,$=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),$&&(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 g=(D=this.input)!=null?D:e;g&&(g.value=this.inputValue,g.setSelectionRange(y,y))})})}else{let c=e,r=c.value,p=(d=c.selectionStart)!=null?d:r.length,b=r.replace(/\D/g,"").slice(0,8),S=b.slice(0,2),M=b.slice(2,4),L=b.slice(4,8),y="";S.length>0&&(y+=S,S.length===2&&(y+=".")),M.length>0&&S.length===2&&(y+=M,M.length===2&&(y+=".")),L.length>0&&S.length===2&&M.length===2&&(y+=L),y=y.replace(/\.\.+/g,".");let $=this.inputValue||"";this.inputValue=y;let g=p,D=w=>{let F=[];for(let P=0;P<w.length;P++)w[P]==="."&&F.push(P);return F},x=D($),T=D(y),k=x.filter(w=>w<p).length,z=T.filter(w=>w<p).length-k;if(z>0?g+=z:!x.includes(p)&&T.includes(p)&&(g+=1),g=Math.min(Math.max(0,g),y.length),requestAnimationFrame(()=>{var F;let w=(F=this.input)!=null?F:c;w&&(w.value=this.inputValue,w.setSelectionRange(g,g))}),/^\d{2}\.\d{2}\.\d{4}$/.test(y)){let w=this.parseInputText(y);this.applyParsedInput(w)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let c=this.rangeStart?a.parseLocalISO(this.rangeStart):null,r=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;c&&!r?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}`):c&&r&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(r)}`)}else if(this.value){let c=a.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(c)}`)}};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=>{this.currentPlacement=t.detail.placement};this.handleHeaderKeyDown=(t,e,s,i)=>{if(t.key==="Tab"&&!t.shiftKey){i&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(s):this.setYear(s))};this.onKeyDown=t=>{if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let e=t.key,s=!0,i=new Date(this.focusedDate);switch(e){case"ArrowLeft":i.setDate(i.getDate()-1);break;case"ArrowRight":i.setDate(i.getDate()+1);break;case"ArrowUp":i.setDate(i.getDate()-7);break;case"ArrowDown":i.setDate(i.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:s=!1}if(s){if(t.preventDefault(),i.getMonth()!==this.viewMonth.getMonth()||i.getFullYear()!==this.viewMonth.getFullYear()){this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1);let f=this.formatMonthYear(this.viewMonth);this.setNavStatus(f)}let l=a.startOfDayLocal(i);(!this.focusedDate||l.getTime()!==this.focusedDate.getTime())&&(this.focusedDate=l);let u=l.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(u),this.requestUpdate(),requestAnimationFrame(()=>{let f=this.shadowRoot,m=f==null?void 0:f.querySelector("button.day.focused");m==null||m.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled)&&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&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){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,s=this.range&&e?e:t!=null?t:a.startOfDayLocal(new Date);this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.clampDateToMonth(s,this.viewMonth),(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()}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()}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 s;let e=this.input;if(e){e.value=(s=this.inputValue)!=null?s:"";let i=e.value.length;e.setSelectionRange(i,i)}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,s=t!=null?t:e;s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.startOfDayLocal(s)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let i=this.input;if(i){i.value=(n=this.inputValue)!=null?n:"";let l=i.value.length;i.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)}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=this.min===null?null:this.parseISO(String(this.min)),s=this.max===null?null:this.parseISO(String(this.max));return!(e&&t<e||s&&t>s)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),n=`${e}-${s}-${i}`;return this.disabledDatesSet.has(n)}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 s="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+s},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),s=this.ordinal(e),i=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${s} of ${i} ${n}`}ordinal(t){let e=["th","st","nd","rd"],s=t%100,i=e[(s-20)%10]||e[s]||e[0];return t+i}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 s=JSON.parse(e);Array.isArray(s)&&(t=s)}catch(s){t=[]}else e.length>0&&(t=e.split(",").map(s=>s.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let s=a.compareDates(t,e)<=0?a.startOfDayLocal(t):a.startOfDayLocal(e),i=a.compareDates(t,e)<=0?a.startOfDayLocal(e):a.startOfDayLocal(t),n=new Date(s);for(;a.compareDates(n,i)<=0;){if(this.isDisabled(n))return!0;n.setDate(n.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 s=String(e.getDate()).padStart(2,"0"),i=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${s}.${i}.${n}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let s=Number(e[1]),i=Number(e[2]),n=Number(e[3]),l=new Date(n,i-1,s);if(l.getFullYear()!==n||l.getMonth()!==i-1||l.getDate()!==s)return null;let u=a.startOfDayLocal(l);return a.toLocalISODate(u)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),i=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let n=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return n&&l?`${n} ${i} ${l}`:n&&!l?`${n} ${i}`:""}parseInputText(t){var i,n;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let u=l[0];if(!u)return{start:null,end:null,valid:!0};let f=this.dmyToIso(u);return f?{start:f,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let u=(i=l[0])!=null?i:"",f=(n=l[1])!=null?n:"",m=u?this.dmyToIso(u):null,d=f?this.dmyToIso(f):null;return u&&!m?{start:null,end:null,valid:!1}:f&&!d?{start:null,end:null,valid:!1}:{start:m,end:d,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let s=this.dmyToIso(e);return s?{single:s,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var u,f,m,d;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=c=>{if(!c)return!0;let r=a.parseLocalISO(c);return!(!this.inMinMax(r)||this.isDisabled(r))},s=!1;if(this.range){let c=(u=t.start)!=null?u:null,r=(f=t.end)!=null?f:null;if(!e(c)||r&&!e(r))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let p=c?a.parseLocalISO(c):null,b=r?a.parseLocalISO(r):null;if(p&&b){if(a.compareDates(p,b)>0){let L=p;p=b,b=L}if(!this.allowSameDayRange&&a.isSameDay(p,b))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(p,b))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let S=p?a.toLocalISODate(a.startOfDayLocal(p)):null,M=b?a.toLocalISODate(a.startOfDayLocal(b)):null;if(this.rangeStart!==S||this.rangeEnd!==M){this.rangeStart=S,this.rangeEnd=M,this.previewEnd=null,s=!0;let L=(m=p!=null?p:b)!=null?m:this.today;this.viewMonth=new Date(L.getFullYear(),L.getMonth(),1),this.focusedDate=a.startOfDayLocal(L),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 i=(d=t.single)!=null?d:null;if(!e(i))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=i?a.parseLocalISO(i):null,l=n?a.toLocalISODate(a.startOfDayLocal(n)):null;return this.value!==l&&(this.value=l,s=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=a.startOfDayLocal(n)),this.emit("sd-select",{detail:{value:this.value,date:n!=null?n:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),s}buildDmyFromDigits(t){let e=t.slice(0,8),s=e.slice(0,2),i=e.slice(2,4),n=e.slice(4,8),l=s;return i.length&&(l+="."+i),n.length&&(l+="."+n),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 s,i;((i=(s=t.composedPath)==null?void 0:s.call(t))!=null?i:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled){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){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.show(),this.emit("sd-focus")}setMonth(t){let e=new Date(this.viewMonth.getFullYear(),this.viewMonth.getMonth()+t,1);if(e.getMonth()===this.viewMonth.getMonth()&&e.getFullYear()===this.viewMonth.getFullYear())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-change",{detail:{month:this.viewMonth}})}setYear(t){let e=new Date(this.viewMonth.getFullYear()+t,this.viewMonth.getMonth(),1);if(e.getFullYear()===this.viewMonth.getFullYear()&&e.getMonth()===this.viewMonth.getMonth())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-year",{detail:{month:this.viewMonth}})}focusInitialGridDay(){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,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;i?t=a.startOfDayLocal(i):s&&(t=a.startOfDayLocal(s))}if(!(s=>s?s.getFullYear()===this.viewMonth.getFullYear()&&s.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(this.viewMonth),i=s.flat().find(n=>n.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(n,this.today)&&!this.isDisabled(n));if(i)t=a.startOfDayLocal(i);else{let n=s.flat().find(l=>l.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(l));t=n?a.startOfDayLocal(n):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,i=(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"));i==null||i.focus({preventScroll:!0})})}selectSingleDate(t){if(this.isDisabled(t))return;let e=a.startOfDayLocal(t),s=a.toLocalISODate(e);if(this.value===s)return;this.value=s;let i=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(i),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let n=this.input;n&&(n.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=n.value.length;n.setSelectionRange(u,u)})}))})}selectRangeDate(t){let e=a.startOfDayLocal(t),s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(!s&&!i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))});return}if(s&&!i){if(this.isDisabled(e))return;if(a.isSameDay(s,e)){if(!this.allowSameDayRange){this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let c=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${c}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var p;let r=this.input;r&&(r.value=(p=this.inputValue)!=null?p:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let b=r.value.length;r.setSelectionRange(b,b)})}))});return}this.rangeStart=a.toLocalISODate(e),this.rangeEnd=a.toLocalISODate(e),this.previewEnd=null;let d=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${d}`,40),this.announceSelect(`${this.termEndSelected()}: ${d}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var r;let c=this.input;c&&(c.value=(r=this.inputValue)!=null?r:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=c.value.length;c.setSelectionRange(p,p)})}))});return}let n=a.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[l,u]=a.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=a.toLocalISODate(l),this.rangeEnd=a.toLocalISODate(u),this.previewEnd=null;let f=this.formatSelectionLabel(l),m=this.formatSelectionLabel(u);this.announceSelect(`${this.termStartSelected()}: ${f}`,40),this.announceSelect(`${this.termEndSelected()}: ${m}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let d=this.input;d&&(d.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let r=d.value.length;d.setSelectionRange(r,r)})}))});return}if(s&&i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))})}}selectDate(t){this.range?this.selectRangeDate(t):this.selectSingleDate(t)}getMonthMatrix(t){var m;let e=(m=this.firstDayOfWeek)!=null?m:1,s=new Date(t.getFullYear(),t.getMonth(),1),i=new Date(s),n=(s.getDay()-e+7)%7;i.setDate(s.getDate()-n);let l=[],u=i;for(let d=0;d<6;d++){let c=[];for(let r=0;r<7;r++)c.push(new Date(u)),u.setDate(u.getDate()+1);l.push(c)}let f=d=>d.every(c=>c.getMonth()!==t.getMonth());for(;l.length>0&&f(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 i;let t=(i=this.firstDayOfWeek)!=null?i:1,e=new Date(2021,7,1),s=[];for(let n=0;n<7;n++){let l=new Date(e);l.setDate(e.getDate()+(t+n)%7);try{s.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(u){s.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return s}getTabTargetDayForCurrentView(t){let e=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(i,this.today)&&!this.isDisabled(i));if(e)return a.startOfDayLocal(e);let s=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(i));return s?a.startOfDayLocal(s):null}onDayMouseEnter(t){if(!this.range)return;let e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(e&&!s){let i=a.startOfDayLocal(t);this.previewEnd=this.isDisabled(i)?null:i,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){let{weeks:t}=this.getMonthMatrix(this.viewMonth),e=this.formatMonthYear(this.viewMonth),s=this.weekdayLabels(),i=this.value?this.parseISO(this.value):null,n=this.rangeStart?this.parseISO(this.rangeStart):null,l=this.rangeEnd?this.parseISO(this.rangeEnd):null,u=this.previewEnd,f=d=>!this.range||!n||l||!u?!1:a.isBetweenInclusive(d,n,u),m=this.getTabTargetDayForCurrentView(t);return V`<div part="datepicker" class="w-[284px] z-50 absolute top-full bg-white border-2 border-t-0 border-primary py-3 px-4 ${this.open?"block rounded-bl-default rounded-br-default":"hidden"} ${this.alignment==="left"?"left-0":"right-0"}"><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="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-6-4-0-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-6-4-0-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-6-4-0-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-6-4-0-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base !text-primary" part="month-label" aria-live="polite">${e}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-6-4-0-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-6-4-0-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-6-4-0-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-6-4-0-icon></button></div></div><sd-6-4-0-divider></sd-6-4-0-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="${e}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${s.map((d,c)=>V`<div role="columnheader" aria-colindex="${c+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${d}" title="${d}" id="${"col-"+(c+1)}">${d}</div>`)}</div>${t.map((d,c)=>V`<div class="grid-row grid grid-cols-7 ${c===0?"mt-2":""}" role="row" aria-rowindex="${c+2}">${d.map((r,p)=>{let b=r.getMonth()===this.viewMonth.getMonth(),S=this.isDisabled(r)||!this.inMinMax(r),M=a.isSameDay(r,this.focusedDate),L=a.isSameDay(r,this.today),y=!this.range&&i?a.isSameDay(r,i):!1,$=this.range&&n?a.isSameDay(r,n):!1,g=this.range&&l?a.isSameDay(r,l):!1,D=this.range&&n&&l?a.isBetweenInclusive(r,n,l):!1,x=f(r)&&!S,T=-1,k=m&&a.isSameDay(r,m);(this.tabbingIntoGrid&&k||!this.tabbingIntoGrid&&M)&&(T=0);let C=this.isWeekend(r),z=r.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),w=$?this.localize.term("startDateSelected"):g?this.localize.term("endDateSelected"):void 0;return V`<button type="button" part="day" class="${I("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded-md w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",$||g?"hover:bg-primary-500":"hover:bg-primary-100 hover:text-primary-500",b?this.isInDisabledDates(r)||!this.inMinMax(r)?"out-month text-neutral-500":this.disabledWeekends&&C?"weekend-day text-neutral-500":"in-month text-primary":this.disabledWeekends&&C?"out-month weekend-day text-neutral-500":C?"out-month weekend-day text-neutral-700":"out-month text-neutral-700",y?"selected border-primary bg-primary text-white hover:bg-primary-500 hover:text-white":"",$?"bg-primary text-white rounded-l-md rounded-r-none":"",g?"bg-primary text-white range-end rounded-r-md rounded-l-none":"",D&&!$&&!g?"in-range selected bg-primary-100 text-primary-500 rounded-none hover:bg-primary-500 hover:text-white":"",!D&&x&&!$&&!g?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",L&&!y&&!$&&!g&&M?"today border-[1px] border-primary font-bold":"",S?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",M&&!L?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${p+1}" aria-labelledby="${"col-"+(p+1)}" .tabIndex="${T}" ?disabled="${S||this.disabled}" aria-disabled="${S||this.visuallyDisabled||this.disabled?"true":"false"}" aria-selected="${y||D||$||g?"true":"false"}" aria-current="${L?"date":R}" aria-label="${z}" aria-roledescription="${w!=null?w:R}" @focus="${()=>this.focusedDate=a.startOfDayLocal(r)}" @mouseenter="${()=>this.onDayMouseEnter(r)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=a.startOfDayLocal(r),this.selectDate(r)}}">${r.getDate()}</button>`})}</div>`)}</div></div>`}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,s=this.helpText?!0:!!t.helpText,i=!!t.tooltip,n=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.floatingLabel&&e&&(this.hasFocus||this.open||n)&&!this.disabled&&!this.visuallyDisabled,u=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",f={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],d=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",c={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:"border-neutral-800"}[d],r=this.size==="sm"?"text-sm":"text-base";return V`<div part="form-control" class="${I("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||i?V`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${I(e?"inline-block form-control-color-text":"hidden",r)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?V`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${I("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${I("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",c,this.open&&this.alignment==="left"?"rounded-bl-none":"",this.open&&this.alignment==="right"?"rounded-br-none":"")}">${e&&this.floatingLabel?V`<label id="label" part="form-control-floating-label" class="${I("absolute left-4 z-20 pointer-events-none transition-all duration-200",l?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 text-base",l&&"mt-1")}" for="input"><span class="${I("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><sd-6-4-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${I("inline-flex relative w-full")}" sync="width" auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${I("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:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",d==="disabled"||d==="visuallyDisabled"?"text-neutral-500":"text-black")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${s?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${I("min-w-0 flex-grow focus:outline-none bg-transparent hover:cursor-pointer form-control-color-text",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],r,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?V`<sd-6-4-0-icon part="invalid-icon" class="${I("text-error",f,m)}" library="_internal" name="risk"></sd-6-4-0-icon>`:""} ${this.showValidStyle&&this.styleOnValid?V`<sd-6-4-0-icon class="${I("text-success flex-shrink-0",f,m)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-4-0-icon>`:""}<sd-6-4-0-icon class="${I(u,f,m,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-6-4-0-icon>${this.renderCalendar()}</div></sd-6-4-0-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${I("text-sm text-neutral-700 mt-1",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};o.styles=[...H.styles,N`/*! tailwindcss v4.1.17 | 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}`],h([v({type:String,reflect:!0})],o.prototype,"locale",2),h([v({type:String,converter:B,reflect:!0})],o.prototype,"value",2),h([v({type:Boolean,reflect:!0})],o.prototype,"range",2),h([v({attribute:"range-start",converter:B,reflect:!0})],o.prototype,"rangeStart",2),h([v({attribute:"range-end",converter:B,reflect:!0})],o.prototype,"rangeEnd",2),h([v({type:Boolean})],o.prototype,"allowSameDayRange",2),h([v({type:String,converter:B,reflect:!0})],o.prototype,"min",2),h([v({type:String,converter:B,reflect:!0})],o.prototype,"max",2),h([v({type:Number})],o.prototype,"firstDayOfWeek",2),h([v({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],o.prototype,"disabledWeekends",2),h([v({attribute:"disabled-dates",converter:_})],o.prototype,"disabledDates",2),h([v({attribute:!1})],o.prototype,"isDateDisabled",2),h([v({type:String,reflect:!0})],o.prototype,"size",2),h([v({type:String})],o.prototype,"alignment",2),h([v({type:String,reflect:!0})],o.prototype,"label",2),h([v({type:String,attribute:"help-text",reflect:!0})],o.prototype,"helpText",2),h([v({attribute:"floating-label",type:Boolean,reflect:!0})],o.prototype,"floatingLabel",2),h([v({type:Boolean,reflect:!0})],o.prototype,"disabled",2),h([v({type:Boolean,reflect:!0})],o.prototype,"required",2),h([v({type:Boolean,attribute:"visually-disabled"})],o.prototype,"visuallyDisabled",2),h([v({type:Boolean,reflect:!0,attribute:"style-on-valid"})],o.prototype,"styleOnValid",2),h([v({type:Boolean,reflect:!0})],o.prototype,"readonly",2),h([v({type:String,reflect:!0})],o.prototype,"placement",2),h([v({type:String,reflect:!0})],o.prototype,"placeholder",2),h([v({reflect:!0})],o.prototype,"name",2),h([v({type:String,reflect:!0})],o.prototype,"form",2),h([E()],o.prototype,"open",2),h([E()],o.prototype,"viewMonth",2),h([E()],o.prototype,"focusedDate",2),h([E()],o.prototype,"today",2),h([E()],o.prototype,"disabledDatesSet",2),h([E()],o.prototype,"previewEnd",2),h([E()],o.prototype,"statusNavText",2),h([E()],o.prototype,"statusSelectText",2),h([E()],o.prototype,"hasFocus",2),h([E()],o.prototype,"showValidStyle",2),h([E()],o.prototype,"showInvalidStyle",2),h([E()],o.prototype,"currentPlacement",2),h([E()],o.prototype,"inputValue",2),h([q("#invalid-message")],o.prototype,"invalidMessage",2),h([q("#input")],o.prototype,"input",2),h([Y("locale")],o.prototype,"handleLocaleChange",1),h([Y("disabledDates")],o.prototype,"handleDisabledDatesChange",1),h([Y("value")],o.prototype,"handleValueChange",1),h([Y("rangeStart"),Y("rangeEnd")],o.prototype,"handleRangeChange",1),h([Y(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],o.prototype,"handleDisabledChange",1),o=h([W("sd-6-4-0-datepicker")],o);export{o as a};
1
+ import{a}from"./chunk.3MADQ6HK.js";import{b as U}from"./chunk.CJ34NUTS.js";import{a as G}from"./chunk.CGQ2BPPZ.js";import{a as K}from"./chunk.IQPMMUES.js";import{a as I}from"./chunk.YFQFOIEM.js";import{a as Y}from"./chunk.NYKJXI3Q.js";import{a as W,b as v,c as E,d as q,h as H}from"./chunk.ALCKOGA7.js";import{b as N,e as V,i as R}from"./chunk.763RLJEK.js";import{e as h}from"./chunk.6EV4YU6C.js";var B={fromAttribute(O){if(!O)return null;let t=O.trim().replace(/[./]/g,"-").match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;let e=`${t[1]}-${t[2]}-${t[3]}`,s=new Date(+t[1],+t[2]-1,+t[3]);return s.getFullYear()!==+t[1]||s.getMonth()!==+t[2]-1||s.getDate()!==+t[3]?null:e},toAttribute(O){return O!=null?O:""}},_={fromAttribute(O){if(!O)return[];let A=[],t=O.trim();if(t.startsWith("["))try{let s=JSON.parse(t);Array.isArray(s)&&(A=s.map(String))}catch(s){return[]}else A=t.split(/[\s,]+/).map(s=>s.trim()).filter(Boolean);let e=[];for(let s of A){let n=s.replace(/[-/]/g,".").split(".");if(n.length!==3)continue;let[l,u,f]=n.map(Number);if(!l||!u||!f)continue;let m=new Date(l,u-1,f);if(m.getFullYear()!==l||m.getMonth()!==u-1||m.getDate()!==f)continue;let d=`${l}-${String(u).padStart(2,"0")}-${String(f).padStart(2,"0")}`;e.push(d)}return e},toAttribute(O){return O?O.join(","):""}},o=class extends H{constructor(){super();this.localize=new K(this);this.hasSlotController=new G(this,"label","help-text","tooltip");this.formControlController=new U(this,{assumeInteractionOn:["sd-blur","sd-6-4-1-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.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(i=>{var n,l;return i instanceof HTMLElement&&(((n=i.classList)==null?void 0:n.contains("nav"))||((l=i.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,u,f,m,d;if(this.disabled||this.visuallyDisabled){(l=t.preventDefault)==null||l.call(t),(u=t.stopPropagation)==null||u.call(t);return}let e=t.target,s=e.value,i=(f=e.selectionStart)!=null?f:s.length,n=(m=t.inputType)==null?void 0:m.startsWith("delete");if(this.range){let c=s.replace(/\D/g,""),r=c.slice(0,8),p=c.slice(8,16),b=this.buildDmyFromDigits(r),S=this.buildDmyFromDigits(p),M;r.length===0?M="":r.length<8?M=b:p.length>0?M=`${b} - ${S}`:M=n?b:`${b} -`;let L=this.countDigitsBeforeCaret(s,i),y;if(L<=8){let g=this.digitIndexToDmyCaretPos(Math.min(L,8));y=Math.min(g,b.length)}else{let g=r.length<8?b.length:b.length+3,D=Math.min(L-8,8),x=this.digitIndexToDmyCaretPos(D);y=g+Math.min(x,S.length)}this.inputValue=M;let $=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(b)){let g=this.dmyToIso(b),D=g?a.parseLocalISO(g):null;!!D&&!this.isDisabled(D)&&this.inMinMax(D)&&this.rangeStart!==g&&(this.rangeStart=g,this.previewEnd=null,this.viewMonth=new Date(D.getFullYear(),D.getMonth(),1),this.focusedDate=a.startOfDayLocal(D),$=!0)}else this.rangeStart&&(this.rangeStart=null,$=!0),this.rangeEnd&&(this.rangeEnd=null,$=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(S)&&this.rangeStart){let g=a.parseLocalISO(this.rangeStart),D=this.dmyToIso(S),x=D?a.parseLocalISO(D):null;if(!!x&&!this.isDisabled(x)&&this.inMinMax(x)){let[k,C]=a.compareDates(g,x)<=0?[g,x]:[x,g],z=a.isSameDay(k,C);if((this.allowSameDayRange||!z)&&!this.wouldRangeContainDisabled(k,C)){let F=a.toLocalISODate(a.startOfDayLocal(k)),P=a.toLocalISODate(a.startOfDayLocal(C));(this.rangeStart!==F||this.rangeEnd!==P)&&(this.rangeStart=F,this.rangeEnd=P,this.viewMonth=new Date(C.getFullYear(),C.getMonth(),1),this.focusedDate=a.startOfDayLocal(C),$=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,$=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),$&&(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 g=(D=this.input)!=null?D:e;g&&(g.value=this.inputValue,g.setSelectionRange(y,y))})})}else{let c=e,r=c.value,p=(d=c.selectionStart)!=null?d:r.length,b=r.replace(/\D/g,"").slice(0,8),S=b.slice(0,2),M=b.slice(2,4),L=b.slice(4,8),y="";S.length>0&&(y+=S,S.length===2&&(y+=".")),M.length>0&&S.length===2&&(y+=M,M.length===2&&(y+=".")),L.length>0&&S.length===2&&M.length===2&&(y+=L),y=y.replace(/\.\.+/g,".");let $=this.inputValue||"";this.inputValue=y;let g=p,D=w=>{let F=[];for(let P=0;P<w.length;P++)w[P]==="."&&F.push(P);return F},x=D($),T=D(y),k=x.filter(w=>w<p).length,z=T.filter(w=>w<p).length-k;if(z>0?g+=z:!x.includes(p)&&T.includes(p)&&(g+=1),g=Math.min(Math.max(0,g),y.length),requestAnimationFrame(()=>{var F;let w=(F=this.input)!=null?F:c;w&&(w.value=this.inputValue,w.setSelectionRange(g,g))}),/^\d{2}\.\d{2}\.\d{4}$/.test(y)){let w=this.parseInputText(y);this.applyParsedInput(w)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let c=this.rangeStart?a.parseLocalISO(this.rangeStart):null,r=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;c&&!r?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}`):c&&r&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(r)}`)}else if(this.value){let c=a.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(c)}`)}};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=>{this.currentPlacement=t.detail.placement};this.handleHeaderKeyDown=(t,e,s,i)=>{if(t.key==="Tab"&&!t.shiftKey){i&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(s):this.setYear(s))};this.onKeyDown=t=>{if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let e=t.key,s=!0,i=new Date(this.focusedDate);switch(e){case"ArrowLeft":i.setDate(i.getDate()-1);break;case"ArrowRight":i.setDate(i.getDate()+1);break;case"ArrowUp":i.setDate(i.getDate()-7);break;case"ArrowDown":i.setDate(i.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:s=!1}if(s){if(t.preventDefault(),i.getMonth()!==this.viewMonth.getMonth()||i.getFullYear()!==this.viewMonth.getFullYear()){this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1);let f=this.formatMonthYear(this.viewMonth);this.setNavStatus(f)}let l=a.startOfDayLocal(i);(!this.focusedDate||l.getTime()!==this.focusedDate.getTime())&&(this.focusedDate=l);let u=l.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(u),this.requestUpdate(),requestAnimationFrame(()=>{let f=this.shadowRoot,m=f==null?void 0:f.querySelector("button.day.focused");m==null||m.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled)&&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&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){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,s=this.range&&e?e:t!=null?t:a.startOfDayLocal(new Date);this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.clampDateToMonth(s,this.viewMonth),(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()}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()}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 s;let e=this.input;if(e){e.value=(s=this.inputValue)!=null?s:"";let i=e.value.length;e.setSelectionRange(i,i)}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,s=t!=null?t:e;s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.startOfDayLocal(s)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let i=this.input;if(i){i.value=(n=this.inputValue)!=null?n:"";let l=i.value.length;i.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)}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=this.min===null?null:this.parseISO(String(this.min)),s=this.max===null?null:this.parseISO(String(this.max));return!(e&&t<e||s&&t>s)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),n=`${e}-${s}-${i}`;return this.disabledDatesSet.has(n)}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 s="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+s},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),s=this.ordinal(e),i=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${s} of ${i} ${n}`}ordinal(t){let e=["th","st","nd","rd"],s=t%100,i=e[(s-20)%10]||e[s]||e[0];return t+i}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 s=JSON.parse(e);Array.isArray(s)&&(t=s)}catch(s){t=[]}else e.length>0&&(t=e.split(",").map(s=>s.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let s=a.compareDates(t,e)<=0?a.startOfDayLocal(t):a.startOfDayLocal(e),i=a.compareDates(t,e)<=0?a.startOfDayLocal(e):a.startOfDayLocal(t),n=new Date(s);for(;a.compareDates(n,i)<=0;){if(this.isDisabled(n))return!0;n.setDate(n.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 s=String(e.getDate()).padStart(2,"0"),i=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${s}.${i}.${n}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let s=Number(e[1]),i=Number(e[2]),n=Number(e[3]),l=new Date(n,i-1,s);if(l.getFullYear()!==n||l.getMonth()!==i-1||l.getDate()!==s)return null;let u=a.startOfDayLocal(l);return a.toLocalISODate(u)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),i=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let n=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return n&&l?`${n} ${i} ${l}`:n&&!l?`${n} ${i}`:""}parseInputText(t){var i,n;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let u=l[0];if(!u)return{start:null,end:null,valid:!0};let f=this.dmyToIso(u);return f?{start:f,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let u=(i=l[0])!=null?i:"",f=(n=l[1])!=null?n:"",m=u?this.dmyToIso(u):null,d=f?this.dmyToIso(f):null;return u&&!m?{start:null,end:null,valid:!1}:f&&!d?{start:null,end:null,valid:!1}:{start:m,end:d,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let s=this.dmyToIso(e);return s?{single:s,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var u,f,m,d;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=c=>{if(!c)return!0;let r=a.parseLocalISO(c);return!(!this.inMinMax(r)||this.isDisabled(r))},s=!1;if(this.range){let c=(u=t.start)!=null?u:null,r=(f=t.end)!=null?f:null;if(!e(c)||r&&!e(r))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let p=c?a.parseLocalISO(c):null,b=r?a.parseLocalISO(r):null;if(p&&b){if(a.compareDates(p,b)>0){let L=p;p=b,b=L}if(!this.allowSameDayRange&&a.isSameDay(p,b))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(p,b))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let S=p?a.toLocalISODate(a.startOfDayLocal(p)):null,M=b?a.toLocalISODate(a.startOfDayLocal(b)):null;if(this.rangeStart!==S||this.rangeEnd!==M){this.rangeStart=S,this.rangeEnd=M,this.previewEnd=null,s=!0;let L=(m=p!=null?p:b)!=null?m:this.today;this.viewMonth=new Date(L.getFullYear(),L.getMonth(),1),this.focusedDate=a.startOfDayLocal(L),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 i=(d=t.single)!=null?d:null;if(!e(i))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=i?a.parseLocalISO(i):null,l=n?a.toLocalISODate(a.startOfDayLocal(n)):null;return this.value!==l&&(this.value=l,s=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=a.startOfDayLocal(n)),this.emit("sd-select",{detail:{value:this.value,date:n!=null?n:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),s}buildDmyFromDigits(t){let e=t.slice(0,8),s=e.slice(0,2),i=e.slice(2,4),n=e.slice(4,8),l=s;return i.length&&(l+="."+i),n.length&&(l+="."+n),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 s,i;((i=(s=t.composedPath)==null?void 0:s.call(t))!=null?i:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled){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){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.show(),this.emit("sd-focus")}setMonth(t){let e=new Date(this.viewMonth.getFullYear(),this.viewMonth.getMonth()+t,1);if(e.getMonth()===this.viewMonth.getMonth()&&e.getFullYear()===this.viewMonth.getFullYear())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-change",{detail:{month:this.viewMonth}})}setYear(t){let e=new Date(this.viewMonth.getFullYear()+t,this.viewMonth.getMonth(),1);if(e.getFullYear()===this.viewMonth.getFullYear()&&e.getMonth()===this.viewMonth.getMonth())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-year",{detail:{month:this.viewMonth}})}focusInitialGridDay(){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,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;i?t=a.startOfDayLocal(i):s&&(t=a.startOfDayLocal(s))}if(!(s=>s?s.getFullYear()===this.viewMonth.getFullYear()&&s.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(this.viewMonth),i=s.flat().find(n=>n.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(n,this.today)&&!this.isDisabled(n));if(i)t=a.startOfDayLocal(i);else{let n=s.flat().find(l=>l.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(l));t=n?a.startOfDayLocal(n):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,i=(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"));i==null||i.focus({preventScroll:!0})})}selectSingleDate(t){if(this.isDisabled(t))return;let e=a.startOfDayLocal(t),s=a.toLocalISODate(e);if(this.value===s)return;this.value=s;let i=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(i),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let n=this.input;n&&(n.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=n.value.length;n.setSelectionRange(u,u)})}))})}selectRangeDate(t){let e=a.startOfDayLocal(t),s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(!s&&!i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))});return}if(s&&!i){if(this.isDisabled(e))return;if(a.isSameDay(s,e)){if(!this.allowSameDayRange){this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let c=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${c}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var p;let r=this.input;r&&(r.value=(p=this.inputValue)!=null?p:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let b=r.value.length;r.setSelectionRange(b,b)})}))});return}this.rangeStart=a.toLocalISODate(e),this.rangeEnd=a.toLocalISODate(e),this.previewEnd=null;let d=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${d}`,40),this.announceSelect(`${this.termEndSelected()}: ${d}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var r;let c=this.input;c&&(c.value=(r=this.inputValue)!=null?r:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=c.value.length;c.setSelectionRange(p,p)})}))});return}let n=a.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[l,u]=a.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=a.toLocalISODate(l),this.rangeEnd=a.toLocalISODate(u),this.previewEnd=null;let f=this.formatSelectionLabel(l),m=this.formatSelectionLabel(u);this.announceSelect(`${this.termStartSelected()}: ${f}`,40),this.announceSelect(`${this.termEndSelected()}: ${m}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let d=this.input;d&&(d.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let r=d.value.length;d.setSelectionRange(r,r)})}))});return}if(s&&i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))})}}selectDate(t){this.range?this.selectRangeDate(t):this.selectSingleDate(t)}getMonthMatrix(t){var m;let e=(m=this.firstDayOfWeek)!=null?m:1,s=new Date(t.getFullYear(),t.getMonth(),1),i=new Date(s),n=(s.getDay()-e+7)%7;i.setDate(s.getDate()-n);let l=[],u=i;for(let d=0;d<6;d++){let c=[];for(let r=0;r<7;r++)c.push(new Date(u)),u.setDate(u.getDate()+1);l.push(c)}let f=d=>d.every(c=>c.getMonth()!==t.getMonth());for(;l.length>0&&f(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 i;let t=(i=this.firstDayOfWeek)!=null?i:1,e=new Date(2021,7,1),s=[];for(let n=0;n<7;n++){let l=new Date(e);l.setDate(e.getDate()+(t+n)%7);try{s.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(u){s.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return s}getTabTargetDayForCurrentView(t){let e=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(i,this.today)&&!this.isDisabled(i));if(e)return a.startOfDayLocal(e);let s=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(i));return s?a.startOfDayLocal(s):null}onDayMouseEnter(t){if(!this.range)return;let e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(e&&!s){let i=a.startOfDayLocal(t);this.previewEnd=this.isDisabled(i)?null:i,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){let{weeks:t}=this.getMonthMatrix(this.viewMonth),e=this.formatMonthYear(this.viewMonth),s=this.weekdayLabels(),i=this.value?this.parseISO(this.value):null,n=this.rangeStart?this.parseISO(this.rangeStart):null,l=this.rangeEnd?this.parseISO(this.rangeEnd):null,u=this.previewEnd,f=d=>!this.range||!n||l||!u?!1:a.isBetweenInclusive(d,n,u),m=this.getTabTargetDayForCurrentView(t);return V`<div part="datepicker" class="w-[284px] z-50 absolute top-full bg-white border-2 border-t-0 border-primary py-3 px-4 ${this.open?"block rounded-bl-default rounded-br-default":"hidden"} ${this.alignment==="left"?"left-0":"right-0"}"><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="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-6-4-1-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-6-4-1-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-6-4-1-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-6-4-1-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base !text-primary" part="month-label" aria-live="polite">${e}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-6-4-1-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-6-4-1-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${d=>this.handleHeaderKeyDown(d,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-6-4-1-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-6-4-1-icon></button></div></div><sd-6-4-1-divider></sd-6-4-1-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="${e}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${s.map((d,c)=>V`<div role="columnheader" aria-colindex="${c+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${d}" title="${d}" id="${"col-"+(c+1)}">${d}</div>`)}</div>${t.map((d,c)=>V`<div class="grid-row grid grid-cols-7 ${c===0?"mt-2":""}" role="row" aria-rowindex="${c+2}">${d.map((r,p)=>{let b=r.getMonth()===this.viewMonth.getMonth(),S=this.isDisabled(r)||!this.inMinMax(r),M=a.isSameDay(r,this.focusedDate),L=a.isSameDay(r,this.today),y=!this.range&&i?a.isSameDay(r,i):!1,$=this.range&&n?a.isSameDay(r,n):!1,g=this.range&&l?a.isSameDay(r,l):!1,D=this.range&&n&&l?a.isBetweenInclusive(r,n,l):!1,x=f(r)&&!S,T=-1,k=m&&a.isSameDay(r,m);(this.tabbingIntoGrid&&k||!this.tabbingIntoGrid&&M)&&(T=0);let C=this.isWeekend(r),z=r.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),w=$?this.localize.term("startDateSelected"):g?this.localize.term("endDateSelected"):void 0;return V`<button type="button" part="day" class="${I("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded-md w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",$||g?"hover:bg-primary-500":"hover:bg-primary-100 hover:text-primary-500",b?this.isInDisabledDates(r)||!this.inMinMax(r)?"out-month text-neutral-500":this.disabledWeekends&&C?"weekend-day text-neutral-500":"in-month text-primary":this.disabledWeekends&&C?"out-month weekend-day text-neutral-500":C?"out-month weekend-day text-neutral-700":"out-month text-neutral-700",y?"selected border-primary bg-primary text-white hover:bg-primary-500 hover:text-white":"",$?"bg-primary text-white rounded-l-md rounded-r-none":"",g?"bg-primary text-white range-end rounded-r-md rounded-l-none":"",D&&!$&&!g?"in-range selected bg-primary-100 text-primary-500 rounded-none hover:bg-primary-500 hover:text-white":"",!D&&x&&!$&&!g?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",L&&!y&&!$&&!g&&M?"today border-[1px] border-primary font-bold":"",S?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",M&&!L?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${p+1}" aria-labelledby="${"col-"+(p+1)}" .tabIndex="${T}" ?disabled="${S||this.disabled}" aria-disabled="${S||this.visuallyDisabled||this.disabled?"true":"false"}" aria-selected="${y||D||$||g?"true":"false"}" aria-current="${L?"date":R}" aria-label="${z}" aria-roledescription="${w!=null?w:R}" @focus="${()=>this.focusedDate=a.startOfDayLocal(r)}" @mouseenter="${()=>this.onDayMouseEnter(r)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=a.startOfDayLocal(r),this.selectDate(r)}}">${r.getDate()}</button>`})}</div>`)}</div></div>`}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,s=this.helpText?!0:!!t.helpText,i=!!t.tooltip,n=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.floatingLabel&&e&&(this.hasFocus||this.open||n)&&!this.disabled&&!this.visuallyDisabled,u=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",f={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],d=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",c={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:"border-neutral-800"}[d],r=this.size==="sm"?"text-sm":"text-base";return V`<div part="form-control" class="${I("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||i?V`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${I(e?"inline-block form-control-color-text":"hidden",r)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?V`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${I("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${I("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",c,this.open&&this.alignment==="left"?"rounded-bl-none":"",this.open&&this.alignment==="right"?"rounded-br-none":"")}">${e&&this.floatingLabel?V`<label id="label" part="form-control-floating-label" class="${I("absolute left-4 z-20 pointer-events-none transition-all duration-200",l?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 text-base",l&&"mt-1")}" for="input"><span class="${I("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><sd-6-4-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${I("inline-flex relative w-full")}" sync="width" auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${I("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:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",d==="disabled"||d==="visuallyDisabled"?"text-neutral-500":"text-black")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${s?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${I("min-w-0 flex-grow focus:outline-none bg-transparent hover:cursor-pointer form-control-color-text",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],r,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?V`<sd-6-4-1-icon part="invalid-icon" class="${I("text-error",f,m)}" library="_internal" name="risk"></sd-6-4-1-icon>`:""} ${this.showValidStyle&&this.styleOnValid?V`<sd-6-4-1-icon class="${I("text-success flex-shrink-0",f,m)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-4-1-icon>`:""}<sd-6-4-1-icon class="${I(u,f,m,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-6-4-1-icon>${this.renderCalendar()}</div></sd-6-4-1-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${I("text-sm text-neutral-700 mt-1",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};o.styles=[...H.styles,N`/*! tailwindcss v4.1.17 | 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}`],h([v({type:String,reflect:!0})],o.prototype,"locale",2),h([v({type:String,converter:B,reflect:!0})],o.prototype,"value",2),h([v({type:Boolean,reflect:!0})],o.prototype,"range",2),h([v({attribute:"range-start",converter:B,reflect:!0})],o.prototype,"rangeStart",2),h([v({attribute:"range-end",converter:B,reflect:!0})],o.prototype,"rangeEnd",2),h([v({type:Boolean})],o.prototype,"allowSameDayRange",2),h([v({type:String,converter:B,reflect:!0})],o.prototype,"min",2),h([v({type:String,converter:B,reflect:!0})],o.prototype,"max",2),h([v({type:Number})],o.prototype,"firstDayOfWeek",2),h([v({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],o.prototype,"disabledWeekends",2),h([v({attribute:"disabled-dates",converter:_})],o.prototype,"disabledDates",2),h([v({attribute:!1})],o.prototype,"isDateDisabled",2),h([v({type:String,reflect:!0})],o.prototype,"size",2),h([v({type:String})],o.prototype,"alignment",2),h([v({type:String,reflect:!0})],o.prototype,"label",2),h([v({type:String,attribute:"help-text",reflect:!0})],o.prototype,"helpText",2),h([v({attribute:"floating-label",type:Boolean,reflect:!0})],o.prototype,"floatingLabel",2),h([v({type:Boolean,reflect:!0})],o.prototype,"disabled",2),h([v({type:Boolean,reflect:!0})],o.prototype,"required",2),h([v({type:Boolean,attribute:"visually-disabled"})],o.prototype,"visuallyDisabled",2),h([v({type:Boolean,reflect:!0,attribute:"style-on-valid"})],o.prototype,"styleOnValid",2),h([v({type:Boolean,reflect:!0})],o.prototype,"readonly",2),h([v({type:String,reflect:!0})],o.prototype,"placement",2),h([v({type:String,reflect:!0})],o.prototype,"placeholder",2),h([v({reflect:!0})],o.prototype,"name",2),h([v({type:String,reflect:!0})],o.prototype,"form",2),h([E()],o.prototype,"open",2),h([E()],o.prototype,"viewMonth",2),h([E()],o.prototype,"focusedDate",2),h([E()],o.prototype,"today",2),h([E()],o.prototype,"disabledDatesSet",2),h([E()],o.prototype,"previewEnd",2),h([E()],o.prototype,"statusNavText",2),h([E()],o.prototype,"statusSelectText",2),h([E()],o.prototype,"hasFocus",2),h([E()],o.prototype,"showValidStyle",2),h([E()],o.prototype,"showInvalidStyle",2),h([E()],o.prototype,"currentPlacement",2),h([E()],o.prototype,"inputValue",2),h([q("#invalid-message")],o.prototype,"invalidMessage",2),h([q("#input")],o.prototype,"input",2),h([Y("locale")],o.prototype,"handleLocaleChange",1),h([Y("disabledDates")],o.prototype,"handleDisabledDatesChange",1),h([Y("value")],o.prototype,"handleValueChange",1),h([Y("rangeStart"),Y("rangeEnd")],o.prototype,"handleRangeChange",1),h([Y(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],o.prototype,"handleDisabledChange",1),o=h([W("sd-6-4-1-datepicker")],o);export{o as a};
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk.PV6UYBMY.js";import{a as y}from"./chunk.CGQ2BPPZ.js";import{a as u,b as s}from"./chunk.PJ7JCMQF.js";import{a as b}from"./chunk.IQPMMUES.js";import{a as l}from"./chunk.YFQFOIEM.js";import{a as m,b as r,d as p,h as f}from"./chunk.ALCKOGA7.js";import{b as v}from"./chunk.763RLJEK.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends f{constructor(){super(...arguments);this.hasSlotController=new y(this,"[default]","description","children");this.localize=new b(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.separated&&!this.href&&this.hasSlotController.test("children")}get isIconOnly(){if(!this.defaultSlot)return!1;let e=this.defaultSlot.assignedNodes({flatten:!0});return e.length>0&&e.every(a=>{var d;return a.nodeType===Node.TEXT_NODE?!((d=a.textContent)!=null&&d.trim()):a.nodeType===Node.ELEMENT_NODE?a.tagName.toLowerCase()==="sd-6-4-0-icon":!1})}handleClickButton(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}handleClickSummary(e){e.preventDefault(),e.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.separated&&!this.isLink?u`div`:this.isAccordion&&!this.isLink?u`summary`:this.isLink?u`a`:u`button`}focus(){var e;this.disabled||(e=this.button)==null||e.focus()}blur(){var e;(e=this.button)==null||e.blur()}render(){let e=this.tag,a=this.isLink,d=this.isButton,n=this.isAccordion,g=this.isIconOnly,c={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},x=this.vertical?"py-3":"py-2",h=s`<${e} part="base" class="${l("flex items-center cursor-pointer relative focus-visible:focus-outline group hover:bg-neutral-200 transition-colors duration-fast ease-in-out min-h-[48px] navigable-border-radius",{md:"navigable-font-size",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"sd-6-4-0-navigation-item-color-text",this.current&&"font-bold sd-6-4-0-navigation-item--current-color-text",!n&&"w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px]",g?"justify-center aspect-square p-3":"px-4")}" aria-current="${o(this.current?"page":void 0)}" aria-disabled="${this.disabled}" aria-labelledby="content" aria-describedby="description" ?disabled="${o(d?this.disabled:void 0)}" href="${o(a?this.href:void 0)}" target="${o(a?this.target:void 0)}" download="${o(a?this.download:void 0)}" rel="${o(a&&this.target?"noreferrer noopener":void 0)}" tabindex="${this.disabled?"-1":"0"}" @click="${this.separated?void 0:n?this.handleClickSummary:d?this.handleClickButton:void 0}"><div part="current-indicator" class="${l("absolute bg-accent left-0 pointer-events-none navigable__current-indicator-border-radius",this.vertical?"navigable__current-indicator-width h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"navigable__current-indicator-height w-[calc(100%-16px)] bottom-0 left-2 group-hover:w-full group-hover:left-0 transition-all",this.disabled&&"bg-neutral-500")}"></div><div class="inline-flex flex-col justify-center gap-1 w-full h-full"><span part="content-area" class="${l("relative inline-flex justify-between items-center",n?"grow":"w-full",c.description&&"pt-3",!c.description&&!this.separated&&x,this.calculatePaddingX)}">${this.divider&&this.vertical?s`<sd-6-4-0-divider part="divider" class="${l("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-6-4-0-divider>`:""} <span id="content" part="content-container" class="inline-flex items-center flex-auto"><slot part="content" class="inline-flex text-start"></slot></span>${this.chevron||c.children&&this.vertical&&!this.separated?s`<sd-6-4-0-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${l("h-6 w-6 ml-2 transition-all",n?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-6-4-0-icon>`:""} </span>${c.description&&this.vertical?s`<slot id="description" name="description" part="description" class="${l("inline-block text-sm text-left font-normal text-black pb-3",n||this.separated?"grow":"w-full",this.calculatePaddingX)}"></slot>`:""}</div></${e}>`;return this.separated?s`<div part="details" id="navigation-item-details" class="relative flex flex-col"><div class="flex items-start">${h} ${c.children&&this.vertical?s`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset -mt-1" @click="${this.handleClickSummary}"><sd-6-4-0-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${l("m-4 h-6 w-6 transition-all",n||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-6-4-0-icon></button>`:""}</div>${this.open?s`<slot name="children"></slot>`:""}</div>`:n?s`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${h}<slot name="children"></slot></details>`:s`${h}`}};t.styles=[...f.styles,v`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
- :host{position:relative;box-sizing:border-box;display:inline-block}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}[part=current-indicator]{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-0);--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([current]) [part=current-indicator]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-100);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-duration{syntax:"*";inherits:false}`],i([p('[part="base"]')],t.prototype,"button",2),i([p("slot:not([name])")],t.prototype,"defaultSlot",2),i([r({type:Boolean,reflect:!0})],t.prototype,"vertical",2),i([r({type:String,reflect:!0})],t.prototype,"size",2),i([r({reflect:!0})],t.prototype,"href",2),i([r({type:String,reflect:!0})],t.prototype,"target",2),i([r({reflect:!0})],t.prototype,"download",2),i([r({type:Boolean,reflect:!0})],t.prototype,"current",2),i([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([r({type:Boolean,reflect:!0})],t.prototype,"chevron",2),i([r({type:Boolean,reflect:!0})],t.prototype,"relaxed",2),i([r({type:Boolean,reflect:!0})],t.prototype,"divider",2),i([r({type:Boolean,reflect:!0})],t.prototype,"indented",2),i([r({type:Boolean,reflect:!0})],t.prototype,"open",2),i([r({type:Boolean,reflect:!0})],t.prototype,"separated",2),t=i([m("sd-6-4-0-navigation-item")],t);export{t as a};
1
+ import{a as o}from"./chunk.PV6UYBMY.js";import{a as y}from"./chunk.CGQ2BPPZ.js";import{a as u,b as s}from"./chunk.PJ7JCMQF.js";import{a as b}from"./chunk.IQPMMUES.js";import{a as l}from"./chunk.YFQFOIEM.js";import{a as m,b as r,d as p,h as f}from"./chunk.ALCKOGA7.js";import{b as v}from"./chunk.763RLJEK.js";import{e as i}from"./chunk.6EV4YU6C.js";var t=class extends f{constructor(){super(...arguments);this.hasSlotController=new y(this,"[default]","description","children");this.localize=new b(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.separated&&!this.href&&this.hasSlotController.test("children")}get isIconOnly(){if(!this.defaultSlot)return!1;let e=this.defaultSlot.assignedNodes({flatten:!0});return e.length>0&&e.every(a=>{var d;return a.nodeType===Node.TEXT_NODE?!((d=a.textContent)!=null&&d.trim()):a.nodeType===Node.ELEMENT_NODE?a.tagName.toLowerCase()==="sd-6-4-1-icon":!1})}handleClickButton(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}handleClickSummary(e){e.preventDefault(),e.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.separated&&!this.isLink?u`div`:this.isAccordion&&!this.isLink?u`summary`:this.isLink?u`a`:u`button`}focus(){var e;this.disabled||(e=this.button)==null||e.focus()}blur(){var e;(e=this.button)==null||e.blur()}render(){let e=this.tag,a=this.isLink,d=this.isButton,n=this.isAccordion,g=this.isIconOnly,c={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},x=this.vertical?"py-3":"py-2",h=s`<${e} part="base" class="${l("flex items-center cursor-pointer relative focus-visible:focus-outline group hover:bg-neutral-200 transition-colors duration-fast ease-in-out min-h-[48px] navigable-border-radius",{md:"navigable-font-size",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"sd-6-4-1-navigation-item-color-text",this.current&&"font-bold sd-6-4-1-navigation-item--current-color-text",!n&&"w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px]",g?"justify-center aspect-square p-3":"px-4")}" aria-current="${o(this.current?"page":void 0)}" aria-disabled="${this.disabled}" aria-labelledby="content" aria-describedby="description" ?disabled="${o(d?this.disabled:void 0)}" href="${o(a?this.href:void 0)}" target="${o(a?this.target:void 0)}" download="${o(a?this.download:void 0)}" rel="${o(a&&this.target?"noreferrer noopener":void 0)}" tabindex="${this.disabled?"-1":"0"}" @click="${this.separated?void 0:n?this.handleClickSummary:d?this.handleClickButton:void 0}"><div part="current-indicator" class="${l("absolute bg-accent left-0 pointer-events-none navigable__current-indicator-border-radius",this.vertical?"navigable__current-indicator-width h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"navigable__current-indicator-height w-[calc(100%-16px)] bottom-0 left-2 group-hover:w-full group-hover:left-0 transition-all",this.disabled&&"bg-neutral-500")}"></div><div class="inline-flex flex-col justify-center gap-1 w-full h-full"><span part="content-area" class="${l("relative inline-flex justify-between items-center",n?"grow":"w-full",c.description&&"pt-3",!c.description&&!this.separated&&x,this.calculatePaddingX)}">${this.divider&&this.vertical?s`<sd-6-4-1-divider part="divider" class="${l("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-6-4-1-divider>`:""} <span id="content" part="content-container" class="inline-flex items-center flex-auto"><slot part="content" class="inline-flex text-start"></slot></span>${this.chevron||c.children&&this.vertical&&!this.separated?s`<sd-6-4-1-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${l("h-6 w-6 ml-2 transition-all",n?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-6-4-1-icon>`:""} </span>${c.description&&this.vertical?s`<slot id="description" name="description" part="description" class="${l("inline-block text-sm text-left font-normal text-black pb-3",n||this.separated?"grow":"w-full",this.calculatePaddingX)}"></slot>`:""}</div></${e}>`;return this.separated?s`<div part="details" id="navigation-item-details" class="relative flex flex-col"><div class="flex items-start">${h} ${c.children&&this.vertical?s`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset -mt-1" @click="${this.handleClickSummary}"><sd-6-4-1-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${l("m-4 h-6 w-6 transition-all",n||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-6-4-1-icon></button>`:""}</div>${this.open?s`<slot name="children"></slot>`:""}</div>`:n?s`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${h}<slot name="children"></slot></details>`:s`${h}`}};t.styles=[...f.styles,v`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
+ :host{position:relative;box-sizing:border-box;display:inline-block}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}[part=current-indicator]{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-0);--tw-duration:var(--sd-duration-fast, 150ms);transition-duration:var(--sd-duration-fast,150ms);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([current]) [part=current-indicator]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);opacity:var(--sd-opacity-100);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-duration{syntax:"*";inherits:false}`],i([p('[part="base"]')],t.prototype,"button",2),i([p("slot:not([name])")],t.prototype,"defaultSlot",2),i([r({type:Boolean,reflect:!0})],t.prototype,"vertical",2),i([r({type:String,reflect:!0})],t.prototype,"size",2),i([r({reflect:!0})],t.prototype,"href",2),i([r({type:String,reflect:!0})],t.prototype,"target",2),i([r({reflect:!0})],t.prototype,"download",2),i([r({type:Boolean,reflect:!0})],t.prototype,"current",2),i([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([r({type:Boolean,reflect:!0})],t.prototype,"chevron",2),i([r({type:Boolean,reflect:!0})],t.prototype,"relaxed",2),i([r({type:Boolean,reflect:!0})],t.prototype,"divider",2),i([r({type:Boolean,reflect:!0})],t.prototype,"indented",2),i([r({type:Boolean,reflect:!0})],t.prototype,"open",2),i([r({type:Boolean,reflect:!0})],t.prototype,"separated",2),t=i([m("sd-6-4-1-navigation-item")],t);export{t as a};
@@ -1,2 +1,2 @@
1
1
  import{a as s}from"./chunk.PV6UYBMY.js";import{a as d}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.YFQFOIEM.js";import{a as h,b as i,d as c,h as a}from"./chunk.ALCKOGA7.js";import{b as o,e as n}from"./chunk.763RLJEK.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends a{constructor(){super(...arguments);this.hasSlotController=new d(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href="";this.visuallyDisabled=!1}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(l){this.visuallyDisabled&&(l.preventDefault(),l.stopPropagation())}focus(l){this.button.focus(l)}blur(){this.button.blur()}render(){let l={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return n`<a part="base" class="${r(this.standalone?"flex items-start":"inline",this.href&&!this.visuallyDisabled?"cursor-pointer":"",this.visuallyDisabled?"cursor-not-allowed focus-visible:focus-outline":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:interactive--active-color-text focus-visible:focus-outline",visuallyDisabled:this.inverted?"text-neutral-600":"text-neutral-500"}[this.href&&!this.visuallyDisabled?"enabled":this.visuallyDisabled?"visuallyDisabled":"disabled"])}" href="${s(this.href||void 0)}" target="${s(this.target||void 0)}" download="${s(this.download)}" rel="${s(this.target?"noreferrer noopener":void 0)}" aria-disabled="${!this.href||this.visuallyDisabled?"true":"false"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${r("inline",l["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${r("inline",l["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};e.styles=[...a.styles,o`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- ::slotted(sd-6-4-0-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-6-4-0-icon){font-size:var(--sd-text-base);line-height:var(--tw-leading,var(--text-base--line-height,calc(1.5 / 1)))}:host([size=lg][standalone]) ::slotted(sd-6-4-0-icon){font-size:var(--sd-text-xl);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75 / 1.25)))}`],t([c("a")],e.prototype,"button",2),t([i({type:Boolean,reflect:!0})],e.prototype,"standalone",2),t([i({type:String,reflect:!0})],e.prototype,"size",2),t([i({type:Boolean,reflect:!0})],e.prototype,"inverted",2),t([i({type:String,reflect:!0})],e.prototype,"href",2),t([i({type:Boolean,attribute:"visually-disabled",reflect:!0})],e.prototype,"visuallyDisabled",2),t([i({type:String,reflect:!0})],e.prototype,"target",2),t([i({reflect:!0})],e.prototype,"download",2),e=t([h("sd-6-4-0-link")],e);export{e as a};
2
+ ::slotted(sd-6-4-1-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-6-4-1-icon){font-size:var(--sd-text-base);line-height:var(--tw-leading,var(--text-base--line-height,calc(1.5 / 1)))}:host([size=lg][standalone]) ::slotted(sd-6-4-1-icon){font-size:var(--sd-text-xl);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75 / 1.25)))}`],t([c("a")],e.prototype,"button",2),t([i({type:Boolean,reflect:!0})],e.prototype,"standalone",2),t([i({type:String,reflect:!0})],e.prototype,"size",2),t([i({type:Boolean,reflect:!0})],e.prototype,"inverted",2),t([i({type:String,reflect:!0})],e.prototype,"href",2),t([i({type:Boolean,attribute:"visually-disabled",reflect:!0})],e.prototype,"visuallyDisabled",2),t([i({type:String,reflect:!0})],e.prototype,"target",2),t([i({reflect:!0})],e.prototype,"download",2),e=t([h("sd-6-4-1-link")],e);export{e as a};