@solid-design-system/components 7.0.1 → 7.0.3

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 (290) hide show
  1. package/cdn/chunks/{chunk.Q3DFVGEW.js → chunk.37JCS2XH.js} +1 -1
  2. package/cdn/chunks/{chunk.HWX5X5EX.js → chunk.7OG7ICBB.js} +1 -1
  3. package/cdn/chunks/chunk.JQV2BZ2E.js +12 -0
  4. package/cdn/components/carousel/carousel.js +1 -1
  5. package/cdn/components/combobox/combobox.js +1 -1
  6. package/cdn/components/datepicker/datepicker.js +1 -1
  7. package/cdn/custom-elements.json +458 -458
  8. package/cdn/solid-components.bundle.js +3 -3
  9. package/cdn/solid-components.iife.js +3 -3
  10. package/cdn/solid-components.js +1 -1
  11. package/cdn/vscode.html-custom-data.json +52 -52
  12. package/cdn/web-types.json +109 -109
  13. package/cdn-versioned/chunks/chunk.2C3UQTSS.js +2 -2
  14. package/cdn-versioned/chunks/chunk.2O3FM7UB.js +2 -2
  15. package/cdn-versioned/chunks/chunk.35XPUMS2.js +1 -1
  16. package/cdn-versioned/chunks/{chunk.Q3DFVGEW.js → chunk.37JCS2XH.js} +5 -5
  17. package/cdn-versioned/chunks/chunk.3IZUMERL.js +2 -2
  18. package/cdn-versioned/chunks/chunk.3RIAU3TH.js +3 -3
  19. package/cdn-versioned/chunks/chunk.4GA43M6X.js +2 -2
  20. package/cdn-versioned/chunks/chunk.4QTJXGRR.js +2 -2
  21. package/cdn-versioned/chunks/{chunk.HWX5X5EX.js → chunk.7OG7ICBB.js} +2 -2
  22. package/cdn-versioned/chunks/chunk.ADVB3FPU.js +2 -2
  23. package/cdn-versioned/chunks/chunk.AJGTKHU5.js +2 -2
  24. package/cdn-versioned/chunks/chunk.C37LGAL3.js +2 -2
  25. package/cdn-versioned/chunks/chunk.CGMKBGJU.js +2 -2
  26. package/cdn-versioned/chunks/chunk.CQNFI34K.js +2 -2
  27. package/cdn-versioned/chunks/chunk.DCAJAXUP.js +2 -2
  28. package/cdn-versioned/chunks/chunk.DS2MKMMN.js +3 -3
  29. package/cdn-versioned/chunks/chunk.DSKB3SEU.js +1 -1
  30. package/cdn-versioned/chunks/chunk.GA3PWYR4.js +2 -2
  31. package/cdn-versioned/chunks/chunk.HNBY226D.js +1 -1
  32. package/cdn-versioned/chunks/chunk.HY624TPC.js +2 -2
  33. package/cdn-versioned/chunks/chunk.I7OVY27Y.js +10 -10
  34. package/cdn-versioned/chunks/chunk.IFLRUJCI.js +2 -2
  35. package/cdn-versioned/chunks/chunk.IQBZ7GRB.js +2 -2
  36. package/cdn-versioned/chunks/chunk.J45556RK.js +1 -1
  37. package/cdn-versioned/chunks/chunk.JMX6KLDZ.js +2 -2
  38. package/cdn-versioned/chunks/chunk.JQV2BZ2E.js +12 -0
  39. package/cdn-versioned/chunks/chunk.KE2YEQDL.js +2 -2
  40. package/cdn-versioned/chunks/chunk.LZRL7OLU.js +1 -1
  41. package/cdn-versioned/chunks/chunk.MR54F6CV.js +2 -2
  42. package/cdn-versioned/chunks/chunk.MYPRMCUO.js +1 -1
  43. package/cdn-versioned/chunks/chunk.N4L76IWF.js +1 -1
  44. package/cdn-versioned/chunks/chunk.NGU7NO3O.js +5 -5
  45. package/cdn-versioned/chunks/chunk.NJKSWXOS.js +2 -2
  46. package/cdn-versioned/chunks/chunk.NOP4DTP2.js +2 -2
  47. package/cdn-versioned/chunks/chunk.OOIX4OAP.js +2 -2
  48. package/cdn-versioned/chunks/chunk.P7GMFHO5.js +1 -1
  49. package/cdn-versioned/chunks/chunk.PCXVXYU2.js +2 -2
  50. package/cdn-versioned/chunks/chunk.PFPUD5HR.js +2 -2
  51. package/cdn-versioned/chunks/chunk.PKCNX4R2.js +2 -2
  52. package/cdn-versioned/chunks/chunk.PQW77KHE.js +2 -2
  53. package/cdn-versioned/chunks/chunk.PURR56D5.js +2 -2
  54. package/cdn-versioned/chunks/chunk.Q63S2Z2M.js +2 -2
  55. package/cdn-versioned/chunks/chunk.QK3WCIP5.js +2 -2
  56. package/cdn-versioned/chunks/chunk.RHC6WZ6V.js +2 -2
  57. package/cdn-versioned/chunks/chunk.RRJCCIDH.js +1 -1
  58. package/cdn-versioned/chunks/chunk.SPL6VR5S.js +2 -2
  59. package/cdn-versioned/chunks/chunk.SSE7T5OF.js +2 -2
  60. package/cdn-versioned/chunks/chunk.SZNU4NHI.js +1 -1
  61. package/cdn-versioned/chunks/chunk.T7I5MFNS.js +2 -2
  62. package/cdn-versioned/chunks/chunk.TIMZJKMF.js +2 -2
  63. package/cdn-versioned/chunks/chunk.TX5WPWH2.js +2 -2
  64. package/cdn-versioned/chunks/chunk.UI3ZVKSU.js +2 -2
  65. package/cdn-versioned/chunks/chunk.V6IM4GAA.js +2 -2
  66. package/cdn-versioned/chunks/chunk.VPBXFCBA.js +2 -2
  67. package/cdn-versioned/chunks/chunk.VSX5LY2D.js +2 -2
  68. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  69. package/cdn-versioned/chunks/chunk.WL6NNNG5.js +2 -2
  70. package/cdn-versioned/chunks/chunk.WQZWYMH3.js +1 -1
  71. package/cdn-versioned/chunks/chunk.WUXX2P2S.js +2 -2
  72. package/cdn-versioned/chunks/chunk.XGVG7F7T.js +2 -2
  73. package/cdn-versioned/chunks/chunk.XHYIXZF4.js +2 -2
  74. package/cdn-versioned/chunks/chunk.XZ5JTM6K.js +2 -2
  75. package/cdn-versioned/chunks/chunk.Y4ZS3BWH.js +2 -2
  76. package/cdn-versioned/chunks/chunk.YUDSN6HJ.js +3 -3
  77. package/cdn-versioned/chunks/chunk.Z2M7BQV5.js +2 -2
  78. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  79. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  80. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  81. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  82. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  83. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  84. package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  85. package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  86. package/cdn-versioned/components/button/button.d.ts +1 -1
  87. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  88. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  89. package/cdn-versioned/components/carousel/carousel.js +1 -1
  90. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  91. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  92. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  93. package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
  94. package/cdn-versioned/components/combobox/combobox.js +1 -1
  95. package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
  96. package/cdn-versioned/components/datepicker/datepicker.js +1 -1
  97. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  98. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  99. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  100. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  101. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  102. package/cdn-versioned/components/file-selector/file-selector.d.ts +1 -1
  103. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  104. package/cdn-versioned/components/header/header.d.ts +1 -1
  105. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  106. package/cdn-versioned/components/include/include.d.ts +1 -1
  107. package/cdn-versioned/components/input/input.d.ts +1 -1
  108. package/cdn-versioned/components/link/link.d.ts +1 -1
  109. package/cdn-versioned/components/loader/loader.d.ts +1 -1
  110. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  111. package/cdn-versioned/components/menu/menu.d.ts +1 -1
  112. package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
  113. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  114. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  115. package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
  116. package/cdn-versioned/components/option/option.d.ts +1 -1
  117. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  118. package/cdn-versioned/components/progress-bar/progress-bar.d.ts +1 -1
  119. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  120. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  121. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  122. package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
  123. package/cdn-versioned/components/range/range.d.ts +1 -1
  124. package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
  125. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  126. package/cdn-versioned/components/select/select.d.ts +1 -1
  127. package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
  128. package/cdn-versioned/components/step/step.d.ts +1 -1
  129. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  130. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  131. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  132. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  133. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  134. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  135. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  136. package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
  137. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  138. package/cdn-versioned/components/video/video.d.ts +1 -1
  139. package/cdn-versioned/custom-elements.json +721 -721
  140. package/cdn-versioned/internal/form.js +2 -2
  141. package/cdn-versioned/solid-components.bundle.js +81 -81
  142. package/cdn-versioned/solid-components.css +3 -3
  143. package/cdn-versioned/solid-components.iife.js +81 -81
  144. package/cdn-versioned/solid-components.js +1 -1
  145. package/cdn-versioned/vscode.html-custom-data.json +166 -166
  146. package/cdn-versioned/web-types.json +280 -280
  147. package/dist/chunks/{chunk.LCQBGEHF.js → chunk.UDTZN5OG.js} +1 -1
  148. package/dist/chunks/{chunk.HCADZIES.js → chunk.YKGIJFJM.js} +1 -1
  149. package/dist/chunks/{chunk.I46TZJHO.js → chunk.Z4IULIBO.js} +5 -5
  150. package/dist/components/carousel/carousel.js +1 -1
  151. package/dist/components/combobox/combobox.js +1 -1
  152. package/dist/components/datepicker/datepicker.js +1 -1
  153. package/dist/custom-elements.json +1 -1
  154. package/dist/solid-components.js +6 -6
  155. package/dist/web-types.json +1 -1
  156. package/dist-versioned/chunks/chunk.2EXNVXP2.js +2 -2
  157. package/dist-versioned/chunks/chunk.2M6Y3YHU.js +4 -4
  158. package/dist-versioned/chunks/chunk.2NXJZVSN.js +11 -11
  159. package/dist-versioned/chunks/chunk.2OT7JZJP.js +10 -10
  160. package/dist-versioned/chunks/chunk.2Y2MTVGF.js +3 -3
  161. package/dist-versioned/chunks/chunk.3PHACHZ2.js +7 -7
  162. package/dist-versioned/chunks/chunk.42XKKRQ2.js +6 -6
  163. package/dist-versioned/chunks/chunk.4FXMBMSY.js +3 -3
  164. package/dist-versioned/chunks/chunk.4JC6XNQW.js +4 -4
  165. package/dist-versioned/chunks/chunk.4VWOZ477.js +4 -4
  166. package/dist-versioned/chunks/chunk.5JPFIM5W.js +3 -3
  167. package/dist-versioned/chunks/chunk.5TU4CAN7.js +6 -6
  168. package/dist-versioned/chunks/chunk.65FELEDA.js +3 -3
  169. package/dist-versioned/chunks/chunk.67LY7Y75.js +4 -4
  170. package/dist-versioned/chunks/chunk.6F52A4JB.js +3 -3
  171. package/dist-versioned/chunks/chunk.72LCNWVE.js +3 -3
  172. package/dist-versioned/chunks/chunk.7DQB3MN6.js +7 -7
  173. package/dist-versioned/chunks/chunk.7EXDALNL.js +5 -5
  174. package/dist-versioned/chunks/chunk.AHIYNPL4.js +1 -1
  175. package/dist-versioned/chunks/chunk.ALJ34SPY.js +4 -4
  176. package/dist-versioned/chunks/chunk.B5BWUIZC.js +2 -2
  177. package/dist-versioned/chunks/chunk.BW5BXFWA.js +5 -5
  178. package/dist-versioned/chunks/chunk.C3L34J75.js +1 -1
  179. package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
  180. package/dist-versioned/chunks/chunk.C4HDZU75.js +2 -2
  181. package/dist-versioned/chunks/chunk.CB7PF3MZ.js +6 -6
  182. package/dist-versioned/chunks/chunk.CXFXIMXV.js +13 -13
  183. package/dist-versioned/chunks/chunk.DF2LZ65H.js +2 -2
  184. package/dist-versioned/chunks/chunk.DGLSKBZE.js +3 -3
  185. package/dist-versioned/chunks/chunk.DZED227Y.js +1 -1
  186. package/dist-versioned/chunks/chunk.EQIZ7J5Z.js +25 -25
  187. package/dist-versioned/chunks/chunk.ES5DW7MC.js +2 -2
  188. package/dist-versioned/chunks/chunk.HFRDUE6W.js +11 -11
  189. package/dist-versioned/chunks/chunk.I3DVEGNB.js +11 -11
  190. package/dist-versioned/chunks/chunk.JKJXDDJU.js +3 -3
  191. package/dist-versioned/chunks/chunk.JPGYEMXS.js +2 -2
  192. package/dist-versioned/chunks/chunk.JXDY64LH.js +10 -10
  193. package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
  194. package/dist-versioned/chunks/chunk.KSU44YSO.js +7 -7
  195. package/dist-versioned/chunks/chunk.KXUT6UJL.js +2 -2
  196. package/dist-versioned/chunks/chunk.MPHRXV2B.js +1 -1
  197. package/dist-versioned/chunks/chunk.N5RQE7OC.js +1 -1
  198. package/dist-versioned/chunks/chunk.PAXRRXRW.js +4 -4
  199. package/dist-versioned/chunks/chunk.PGECK7YI.js +1 -1
  200. package/dist-versioned/chunks/chunk.QGCJ4WUV.js +5 -5
  201. package/dist-versioned/chunks/chunk.QIYLIH7P.js +5 -5
  202. package/dist-versioned/chunks/chunk.QNHUD2SQ.js +42 -42
  203. package/dist-versioned/chunks/chunk.S2ZVBJYN.js +5 -5
  204. package/dist-versioned/chunks/chunk.SEWHXNAY.js +5 -5
  205. package/dist-versioned/chunks/chunk.SG7H3CVK.js +12 -12
  206. package/dist-versioned/chunks/chunk.SMRP2JEM.js +1 -1
  207. package/dist-versioned/chunks/chunk.TFAIMBF7.js +11 -11
  208. package/dist-versioned/chunks/chunk.TLAI6IVF.js +2 -2
  209. package/dist-versioned/chunks/{chunk.LCQBGEHF.js → chunk.UDTZN5OG.js} +11 -11
  210. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  211. package/dist-versioned/chunks/chunk.UORTR6WB.js +5 -5
  212. package/dist-versioned/chunks/chunk.VX7JXCCH.js +2 -2
  213. package/dist-versioned/chunks/chunk.XAU2YS2A.js +5 -5
  214. package/dist-versioned/chunks/chunk.XQMBT64Z.js +8 -8
  215. package/dist-versioned/chunks/chunk.YJ46MX3X.js +6 -6
  216. package/dist-versioned/chunks/{chunk.HCADZIES.js → chunk.YKGIJFJM.js} +24 -24
  217. package/dist-versioned/chunks/chunk.YRKHHYV5.js +2 -2
  218. package/dist-versioned/chunks/{chunk.I46TZJHO.js → chunk.Z4IULIBO.js} +15 -15
  219. package/dist-versioned/chunks/chunk.ZLPWCNY6.js +14 -14
  220. package/dist-versioned/chunks/chunk.ZQ6CXL6H.js +5 -5
  221. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  222. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  223. package/dist-versioned/components/animation/animation.d.ts +1 -1
  224. package/dist-versioned/components/audio/audio.d.ts +1 -1
  225. package/dist-versioned/components/badge/badge.d.ts +1 -1
  226. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  227. package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  228. package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  229. package/dist-versioned/components/button/button.d.ts +1 -1
  230. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  231. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  232. package/dist-versioned/components/carousel/carousel.js +1 -1
  233. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  234. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  235. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  236. package/dist-versioned/components/combobox/combobox.d.ts +1 -1
  237. package/dist-versioned/components/combobox/combobox.js +1 -1
  238. package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
  239. package/dist-versioned/components/datepicker/datepicker.js +1 -1
  240. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  241. package/dist-versioned/components/divider/divider.d.ts +1 -1
  242. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  243. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  244. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  245. package/dist-versioned/components/file-selector/file-selector.d.ts +1 -1
  246. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  247. package/dist-versioned/components/header/header.d.ts +1 -1
  248. package/dist-versioned/components/icon/icon.d.ts +1 -1
  249. package/dist-versioned/components/include/include.d.ts +1 -1
  250. package/dist-versioned/components/input/input.d.ts +1 -1
  251. package/dist-versioned/components/link/link.d.ts +1 -1
  252. package/dist-versioned/components/loader/loader.d.ts +1 -1
  253. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  254. package/dist-versioned/components/menu/menu.d.ts +1 -1
  255. package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
  256. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  257. package/dist-versioned/components/notification/notification.d.ts +1 -1
  258. package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
  259. package/dist-versioned/components/option/option.d.ts +1 -1
  260. package/dist-versioned/components/popup/popup.d.ts +1 -1
  261. package/dist-versioned/components/progress-bar/progress-bar.d.ts +1 -1
  262. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  263. package/dist-versioned/components/radio/radio.d.ts +1 -1
  264. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  265. package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
  266. package/dist-versioned/components/range/range.d.ts +1 -1
  267. package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
  268. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  269. package/dist-versioned/components/select/select.d.ts +1 -1
  270. package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
  271. package/dist-versioned/components/step/step.d.ts +1 -1
  272. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  273. package/dist-versioned/components/switch/switch.d.ts +1 -1
  274. package/dist-versioned/components/tab/tab.d.ts +1 -1
  275. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  276. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  277. package/dist-versioned/components/tag/tag.d.ts +1 -1
  278. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  279. package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
  280. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  281. package/dist-versioned/components/video/video.d.ts +1 -1
  282. package/dist-versioned/custom-elements.json +721 -721
  283. package/dist-versioned/internal/form.js +2 -2
  284. package/dist-versioned/solid-components.css +3 -3
  285. package/dist-versioned/solid-components.js +6 -6
  286. package/dist-versioned/vscode.html-custom-data.json +166 -166
  287. package/dist-versioned/web-types.json +280 -280
  288. package/package.json +1 -1
  289. package/cdn/chunks/chunk.5SQTIWWY.js +0 -12
  290. package/cdn-versioned/chunks/chunk.5SQTIWWY.js +0 -12
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk.WWGARXPI.js";import{a as z,b as U,c as G}from"./chunk.23WKPZET.js";import{b as N}from"./chunk.LZRL7OLU.js";import{a as K}from"./chunk.CGQ2BPPZ.js";import{a as W}from"./chunk.MEDJPDBB.js";import{a as w}from"./chunk.4ZZFYCXX.js";import{a as _}from"./chunk.NYKJXI3Q.js";import{a as H,b,c as O,d as Y,h as A}from"./chunk.J45556RK.js";import{b as q,e as F,i as R}from"./chunk.OBAEIKIV.js";import{e as d}from"./chunk.6EV4YU6C.js";var r=class extends A{constructor(){super();this.localize=new W(this);this.hasSlotController=new K(this,"label","help-text","tooltip");this.formControlController=new N(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.viewMonth=null;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=i.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(n=>{var s,l;return n instanceof HTMLElement&&(((s=n.classList)==null?void 0:s.contains("nav"))||((l=n.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleCalendarIconClick=t=>{if(t.preventDefault(),t.stopPropagation(),!(this.disabled||this.visuallyDisabled||this.readonly)){if(this.open){this.hide(),this.emit("sd-datepicker-close");return}this.show(),this.updateComplete.then(()=>{var e;return(e=this.input)==null?void 0:e.focus({preventScroll:!0})})}};this.handleInput=t=>{var l,h,o,y,m;if(this.disabled||this.visuallyDisabled||this.readonly){(l=t.preventDefault)==null||l.call(t),(h=t.stopPropagation)==null||h.call(t);return}let e=t.target,a=e.value,n=(o=e.selectionStart)!=null?o:a.length,s=(y=t.inputType)==null?void 0:y.startsWith("delete");if(this.range){let c=a.replace(/\D/g,""),f=c.slice(0,8),p=c.slice(8,16),u=this.buildDmyFromDigits(f),M=this.buildDmyFromDigits(p),g;f.length===0?g="":f.length<8?g=u:p.length>0?g=`${u} - ${M}`:g=s?u:`${u} -`;let x=this.countDigitsBeforeCaret(a,n),D;if(x<=8){let v=this.digitIndexToDmyCaretPos(Math.min(x,8));D=Math.min(v,u.length)}else{let v=f.length<8?u.length:u.length+3,S=Math.min(x-8,8),I=this.digitIndexToDmyCaretPos(S);D=v+Math.min(I,M.length)}this.inputValue=g;let C=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(u)){let v=this.dmyToIso(u),S=v?i.parseLocalISO(v):null;S&&!this.isDisabled(S)&&this.inMinMax(S)&&this.rangeStart!==v&&(this.rangeStart=v,this.previewEnd=null,this.viewMonth=new Date(S.getFullYear(),S.getMonth(),1),this.focusedDate=i.startOfDayLocal(S),C=!0)}else this.rangeStart&&(this.rangeStart=null,C=!0),this.rangeEnd&&(this.rangeEnd=null,C=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(M)&&this.rangeStart){let v=i.parseLocalISO(this.rangeStart),S=this.dmyToIso(M),I=S?i.parseLocalISO(S):null;if(!!I&&!this.isDisabled(I)&&this.inMinMax(I)){let[$,V]=i.compareDates(v,I)<=0?[v,I]:[I,v],P=i.isSameDay($,V);if((this.allowSameDayRange||!P)&&!this.wouldRangeContainDisabled($,V)){let T=i.toLocalISODate(i.startOfDayLocal($)),k=i.toLocalISODate(i.startOfDayLocal(V));(this.rangeStart!==T||this.rangeEnd!==k)&&(this.rangeStart=T,this.rangeEnd=k,this.viewMonth=new Date(V.getFullYear(),V.getMonth(),1),this.focusedDate=i.startOfDayLocal(V),C=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,C=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),C&&(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 S;let v=(S=this.input)!=null?S:e;v&&(v.value=this.inputValue,v.setSelectionRange(D,D))})})}else{let c=e,f=c.value,p=(m=c.selectionStart)!=null?m:f.length,u=f.replace(/\D/g,"").slice(0,8),M=u.slice(0,2),g=u.slice(2,4),x=u.slice(4,8),D="";M.length>0&&(D+=M,M.length===2&&(D+=".")),g.length>0&&M.length===2&&(D+=g,g.length===2&&(D+=".")),x.length>0&&M.length===2&&g.length===2&&(D+=x),D=D.replace(/\.\.+/g,".");let C=this.inputValue||"";this.inputValue=D;let v=p,S=L=>{let T=[];for(let k=0;k<L.length;k++)L[k]==="."&&T.push(k);return T},I=S(C),E=S(D),$=I.filter(L=>L<p).length,P=E.filter(L=>L<p).length-$;if(P>0?v+=P:!I.includes(p)&&E.includes(p)&&(v+=1),v=Math.min(Math.max(0,v),D.length),requestAnimationFrame(()=>{var T;let L=(T=this.input)!=null?T:c;L&&(L.value=this.inputValue,L.setSelectionRange(v,v))}),/^\d{2}\.\d{2}\.\d{4}$/.test(D)){let L=this.parseInputText(D);this.applyParsedInput(L)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let c=this.rangeStart?i.parseLocalISO(this.rangeStart):null,f=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;c&&!f?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}`):c&&f&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(f)}`)}else if(this.value){let c=i.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=>{let e=t.detail;e&&(this.currentPlacement=e)};this.handleHeaderKeyDown=(t,e,a,n)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Escape"&&this.open){t.preventDefault(),t.stopPropagation(),this.hide(),this.emit("sd-datepicker-close");return}if(t.key==="Tab"&&!t.shiftKey){n&&(this.hide(),this.emit("sd-datepicker-close"));return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(a):this.setYear(a))}};this.onKeyDown=t=>{var s,l,h,o;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}if(t.key==="Tab"&&!t.shiftKey){t.preventDefault(),t.stopPropagation(),(l=(s=this.shadowRoot)==null?void 0:s.querySelector('button[part="prev-year-button"]'))==null||l.focus({preventScroll:!0});return}let e=t.key,a=!0,n=new Date(this.focusedDate);switch(e){case"ArrowLeft":n.setDate(n.getDate()-1);break;case"ArrowRight":n.setDate(n.getDate()+1);break;case"ArrowUp":n.setDate(n.getDate()-7);break;case"ArrowDown":n.setDate(n.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:a=!1}if(a){t.preventDefault();let y=(h=this.viewMonth)!=null?h:this.ensureViewMonth();if(n.getMonth()!==y.getMonth()||n.getFullYear()!==y.getFullYear()){let p=new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=p;let u=this.formatMonthYear(p);this.setNavStatus(u)}let c=i.startOfDayLocal(n);c.getTime()!==((o=this.focusedDate)==null?void 0:o.getTime())&&(this.focusedDate=c);let f=c.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(f),this.requestUpdate(),requestAnimationFrame(()=>{let p=this.shadowRoot,u=p==null?void 0:p.querySelector("button.day.focused");u==null||u.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(t.key==="Tab"&&!t.shiftKey&&this.open){t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){var l;super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?i.parseLocalISO(this.value):null,e=this.rangeStart?i.parseLocalISO(this.rangeStart):null,a=i.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:a,s=(l=this.viewMonth)!=null?l:new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=s,this.focusedDate=i.clampDateToMonth(n,s),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}handleOpenChange(){this.popup&&(this.popup.active=this.open&&!this.disabled&&!this.visuallyDisabled)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleViewMonthChange(){var a;if(!this.viewMonth)return;let t=this.focusedDate||this.range&&this.rangeEnd&&i.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&i.parseLocalISO(this.rangeStart)||this.value&&i.parseLocalISO(this.value)||this.today;if(!t)return;let e=i.clampDateToMonth(t,this.viewMonth);e.getTime()!==((a=this.focusedDate)==null?void 0:a.getTime())&&(this.focusedDate=e)}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?i.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=i.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var a;let e=this.input;if(e){e.value=(a=this.inputValue)!=null?a:"";let n=e.value.length;e.setSelectionRange(n,n)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?i.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null,a=t!=null?t:e;a&&(this.viewMonth=new Date(a.getFullYear(),a.getMonth(),1),this.focusedDate=i.startOfDayLocal(a)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let n=this.input;if(n){n.value=(s=this.inputValue)!=null?s:"";let l=n.value.length;n.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return i.parseLocalISO(t)}inMinMax(t){let e=s=>{if(s==null)return null;if(s instanceof Date)return i.startOfDayLocal(s);if(typeof s=="number")return i.startOfDayLocal(new Date(s));if(typeof s=="string"){let l=this.parseISO(s);return l?i.startOfDayLocal(l):null}return null},a=e(this.min),n=e(this.max);return!(a&&t<a||n&&t>n)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),s=`${e}-${a}-${n}`;return this.disabledDatesSet.has(s)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let a="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+a},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),a=this.ordinal(e),n=t.toLocaleDateString("en-US",{month:"long"}),s=t.getFullYear();return`${a} of ${n} ${s}`}ordinal(t){let e=["th","st","nd","rd"],a=t%100,n=e[(a-20)%10]||e[a]||e[0];return t+n}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let a=JSON.parse(e);Array.isArray(a)&&(t=a)}catch(a){t=[]}else e.length>0&&(t=e.split(",").map(a=>a.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let a=i.compareDates(t,e)<=0?i.startOfDayLocal(t):i.startOfDayLocal(e),n=i.compareDates(t,e)<=0?i.startOfDayLocal(e):i.startOfDayLocal(t),s=new Date(a);for(;i.compareDates(s,n)<=0;){if(this.isDisabled(s))return!0;s.setDate(s.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=i.parseLocalISO(t);if(e||(e=i.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let a=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getFullYear());return`${a}.${n}.${s}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let a=Number(e[1]),n=Number(e[2]),s=Number(e[3]),l=new Date(s,n-1,a);if(l.getFullYear()!==s||l.getMonth()!==n-1||l.getDate()!==a)return null;let h=i.startOfDayLocal(l);return i.toLocalISODate(h)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),n=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let s=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return s&&l?`${s} ${n} ${l}`:s&&!l?`${s} ${n}`:""}parseInputText(t){var n,s;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let h=l[0];if(!h)return{start:null,end:null,valid:!0};let o=this.dmyToIso(h);return o?{start:o,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let h=(n=l[0])!=null?n:"",o=(s=l[1])!=null?s:"",y=h?this.dmyToIso(h):null,m=o?this.dmyToIso(o):null;return h&&!y?{start:null,end:null,valid:!1}:o&&!m?{start:null,end:null,valid:!1}:{start:y,end:m,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let a=this.dmyToIso(e);return a?{single:a,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var h,o,y,m;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=c=>{if(!c)return!0;let f=i.parseLocalISO(c);return!(!this.inMinMax(f)||this.isDisabled(f))},a=!1;if(this.range){let c=(h=t.start)!=null?h:null,f=(o=t.end)!=null?o:null;if(!e(c)||f&&!e(f))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let p=c?i.parseLocalISO(c):null,u=f?i.parseLocalISO(f):null;if(p&&u){if(i.compareDates(p,u)>0){let x=p;p=u,u=x}if(!this.allowSameDayRange&&i.isSameDay(p,u))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(p,u))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let M=p?i.toLocalISODate(i.startOfDayLocal(p)):null,g=u?i.toLocalISODate(i.startOfDayLocal(u)):null;if(this.rangeStart!==M||this.rangeEnd!==g){this.rangeStart=M,this.rangeEnd=g,this.previewEnd=null,a=!0;let x=(y=p!=null?p:u)!=null?y:this.today;this.viewMonth=new Date(x.getFullYear(),x.getMonth(),1),this.focusedDate=i.startOfDayLocal(x),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let n=(m=t.single)!=null?m:null;if(!e(n))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let s=n?i.parseLocalISO(n):null,l=s?i.toLocalISODate(i.startOfDayLocal(s)):null;return this.value!==l&&(this.value=l,a=!0,s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=i.startOfDayLocal(s)),this.emit("sd-select",{detail:{value:this.value,date:s!=null?s:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),a}buildDmyFromDigits(t){let e=t.slice(0,8),a=e.slice(0,2),n=e.slice(2,4),s=e.slice(4,8),l=a;return n.length&&(l+="."+n),s.length&&(l+="."+s),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var a,n;((n=(a=t.composedPath)==null?void 0:a.call(t))!=null?n:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled||this.readonly){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled||this.readonly){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&this.show(),this.emit("sd-focus")}setMonth(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),a=new Date(e.getFullYear(),e.getMonth()+t,1);if(a.getMonth()===e.getMonth()&&a.getFullYear()===e.getFullYear())return;this.viewMonth=a;let n=this.formatMonthYear(a);this.setNavStatus(n),this.emit("sd-month-change",{detail:{month:a}})}setYear(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),a=new Date(e.getFullYear()+t,e.getMonth(),1);if(a.getFullYear()===e.getFullYear()&&a.getMonth()===e.getMonth())return;this.viewMonth=a;let n=this.formatMonthYear(a);this.setNavStatus(n),this.emit("sd-month-year",{detail:{month:a}})}focusInitialGridDay(){var n;let t=null;if(!this.range&&this.value){let s=i.parseLocalISO(this.value);s&&(t=i.startOfDayLocal(s))}if(this.range){let s=this.rangeStart?i.parseLocalISO(this.rangeStart):null,l=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;s?t=i.startOfDayLocal(s):l&&(t=i.startOfDayLocal(l))}let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth();if(!(s=>s?s.getFullYear()===e.getFullYear()&&s.getMonth()===e.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(e),l=s.flat().find(h=>h.getMonth()===e.getMonth()&&i.isSameDay(h,this.today)&&!this.isDisabled(h));if(l)t=i.startOfDayLocal(l);else{let h=s.flat().find(o=>o.getMonth()===e.getMonth()&&!this.isDisabled(o));t=h?i.startOfDayLocal(h):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,l=(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.selected"))||(s==null?void 0:s.querySelector("button.day"));l==null||l.focus({preventScroll:!0})})}selectSingleDate(t){if(this.readonly||this.isDisabled(t))return;let e=i.startOfDayLocal(t),a=i.toLocalISODate(e);if(this.value===a)return;this.value=a;let n=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(n),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let s=this.input;s&&(s.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let h=s.value.length;s.setSelectionRange(h,h)})}))})}selectRangeDate(t){if(this.readonly)return;let e=i.startOfDayLocal(t),a=this.rangeStart?i.parseLocalISO(this.rangeStart):null,n=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;if(!a&&!n){if(this.isDisabled(e))return;this.rangeStart=i.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let o=l.value.length;l.setSelectionRange(o,o)})}))});return}if(a&&!n){if(this.isDisabled(e))return;if(i.isSameDay(a,e)){if(!this.allowSameDayRange){this.rangeStart=i.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 f=this.input;f&&(f.value=(p=this.inputValue)!=null?p:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=f.value.length;f.setSelectionRange(u,u)})}))});return}this.rangeStart=i.toLocalISODate(e),this.rangeEnd=i.toLocalISODate(e),this.previewEnd=null;let m=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${m}`,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 f;let c=this.input;c&&(c.value=(f=this.inputValue)!=null?f:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=c.value.length;c.setSelectionRange(p,p)})}))});return}let s=i.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(s,e))return;let[l,h]=i.compareDates(s,e)<=0?[s,e]:[e,s];this.rangeStart=i.toLocalISODate(l),this.rangeEnd=i.toLocalISODate(h),this.previewEnd=null;let o=this.formatSelectionLabel(l),y=this.formatSelectionLabel(h);this.announceSelect(`${this.termStartSelected()}: ${o}`,40),this.announceSelect(`${this.termEndSelected()}: ${y}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let m=this.input;m&&(m.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=m.value.length;m.setSelectionRange(f,f)})}))});return}if(a&&n){if(this.isDisabled(e))return;this.rangeStart=i.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let o=l.value.length;l.setSelectionRange(o,o)})}))})}}selectDate(t){this.readonly||(this.range?this.selectRangeDate(t):this.selectSingleDate(t))}ensureViewMonth(){if(this.viewMonth)return this.viewMonth;let t=this.value?i.parseLocalISO(this.value):null,e=this.rangeStart?i.parseLocalISO(this.rangeStart):null,a=i.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:a,s=new Date(n.getFullYear(),n.getMonth(),1);return this.viewMonth=s,s}getMonthMatrix(t){var y;let e=(y=this.firstDayOfWeek)!=null?y:1,a=new Date(t.getFullYear(),t.getMonth(),1),n=new Date(a),s=(a.getDay()-e+7)%7;n.setDate(a.getDate()-s);let l=[],h=n;for(let m=0;m<6;m++){let c=[];for(let f=0;f<7;f++)c.push(new Date(h)),h.setDate(h.getDate()+1);l.push(c)}let o=m=>m.every(c=>c.getMonth()!==t.getMonth());for(;l.length>0&&o(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var n;let t=(n=this.firstDayOfWeek)!=null?n:1,e=new Date(2021,7,1),a=[];for(let s=0;s<7;s++){let l=new Date(e);l.setDate(e.getDate()+(t+s)%7);try{a.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(h){a.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return a}getTabTargetDayForCurrentView(t){var h;let e=(h=this.viewMonth)!=null?h:this.ensureViewMonth(),a=null;if(!this.range&&this.value){let o=i.parseLocalISO(this.value);o&&(a=i.startOfDayLocal(o))}if(this.range){let o=this.rangeStart?i.parseLocalISO(this.rangeStart):null,y=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;o?a=i.startOfDayLocal(o):y&&(a=i.startOfDayLocal(y))}if((o=>o?o.getFullYear()===e.getFullYear()&&o.getMonth()===e.getMonth()&&!this.isDisabled(o):!1)(a))return a;let s=t.flat().find(o=>o.getMonth()===e.getMonth()&&i.isSameDay(o,this.today)&&!this.isDisabled(o));if(s)return i.startOfDayLocal(s);let l=t.flat().find(o=>o.getMonth()===e.getMonth()&&!this.isDisabled(o));return l?i.startOfDayLocal(l):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?i.parseLocalISO(this.rangeStart):null,a=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;if(e&&!a){let n=i.startOfDayLocal(t);this.previewEnd=this.isDisabled(n)?null:n,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var f,p;let t=(f=this.viewMonth)!=null?f:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),a=this.formatMonthYear(t),n=this.weekdayLabels(),s=this.value?this.parseISO(this.value):null,l=this.rangeStart?this.parseISO(this.rangeStart):null,h=this.rangeEnd?this.parseISO(this.rangeEnd):null,o=this.previewEnd,y=u=>!this.range||!l||h||!o?!1:i.isBetweenInclusive(u,l,o),m=this.getTabTargetDayForCurrentView(e),c=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color";return F`<div part="datepicker" id="calendar" role="dialog" aria-label="${this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")}" class="${w("w-[284px] z-50 bg-white py-3 px-4",this.open?"block shadow-listbox":"hidden",(p=this.currentPlacement)!=null&&p.startsWith("bottom")?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius","border-primary")}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="${w("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",c)}" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${u=>this.handleHeaderKeyDown(u,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-7-0-1-icon library="_internal" name="chevrons-small-left" class="h-6 w-6"></sd-7-0-1-icon></button> <button type="button" tabindex="0" class="${w("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",c)}" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${u=>this.handleHeaderKeyDown(u,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-7-0-1-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-7-0-1-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base" part="month-label" aria-live="polite">${a}</div><div class="flex items-center"><button type="button" tabindex="0" class="${w("nav next w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",c)}" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${u=>this.handleHeaderKeyDown(u,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-7-0-1-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-7-0-1-icon></button> <button type="button" tabindex="0" class="${w("nav next w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",c)}" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${u=>this.handleHeaderKeyDown(u,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-7-0-1-icon library="_internal" name="chevrons-small-right" class="h-6 w-6"></sd-7-0-1-icon></button></div></div><sd-7-0-1-divider></sd-7-0-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="${a}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${n.map((u,M)=>F`<div role="columnheader" aria-colindex="${M+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${u}" title="${u}" id="${"col-"+(M+1)}">${u}</div>`)}</div>${e.map((u,M)=>F`<div class="grid-row grid grid-cols-7 ${M===0?"mt-2":""}" role="row" aria-rowindex="${M+2}">${u.map((g,x)=>{let D=g.getMonth()===t.getMonth(),C=this.isDisabled(g)||!this.inMinMax(g),v=i.isSameDay(g,this.focusedDate),S=i.isSameDay(g,this.today),I=!this.range&&s?i.isSameDay(g,s):!1,E=this.range&&l?i.isSameDay(g,l):!1,$=this.range&&h?i.isSameDay(g,h):!1,V=this.range&&l&&h?i.isBetweenInclusive(g,l,h):!1,P=y(g)&&!C,L=-1,T=m&&i.isSameDay(g,m);(this.tabbingIntoGrid&&T||!this.tabbingIntoGrid&&v)&&(L=0);let k=this.isWeekend(g),j=g.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),B=E?this.localize.term("startDateSelected"):$?this.localize.term("endDateSelected"):void 0;return F`<button type="button" part="day" class="${w("cell day relative flex items-center justify-center rounded w-[36px] focus-visible:focus-outline focus-visible:z-10",this.size==="sm"?"text-sm h-6":"text-base h-8",E||$?"sd-7-0-1-datepicker__date-item--selected-color-background sd-7-0-1-datepicker__date-item--selected-color-text hover:sd-7-0-1-datepicker__date-item--selected--hover-color-background hover:sd-7-0-1-datepicker__date-item--selected--hover-color-text":"hover:sd-7-0-1-datepicker__date-item--hover--default-color-text",!E&&!$&&!V&&"hover:sd-7-0-1-datepicker__date-item--hover--default-color-background",I?"selected border-primary sd-7-0-1-datepicker__date-item--selected-color-background sd-7-0-1-datepicker__date-item--selected-color-text hover:sd-7-0-1-datepicker__date-item--selected--hover-color-text hover:sd-7-0-1-datepicker__date-item--selected--hover-color-background":(E||$)&&!D?"out-month":D?this.isInDisabledDates(g)||!this.inMinMax(g)?"out-month text-neutral-500":this.disabledWeekends&&k?"weekend-day text-neutral-500":"in-month sd-7-0-1-datepicker__date-item--default-color-text":this.disabledWeekends&&k?"out-month weekend-day text-neutral-500":k?"out-month weekend-day text-neutral-700":"out-month text-neutral-700 hover:sd-7-0-1-datepicker__date-item--hover--prev-next-color-text hover:sd-7-0-1-datepicker__date-item--hover--prev-next-color-background",E?"rounded-l-md rounded-r-none":"",$?"range-end rounded-r-md rounded-l-none":"",V&&!E&&!$?"in-range selected sd-7-0-1-datepicker__date-item--range-color-background rounded-none hover:sd-7-0-1-datepicker__date-item--selected--hover-color-background hover:sd-7-0-1-datepicker__date-item--selected--hover-color-text":"",!V&&P&&!E&&!$?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",S&&!I&&!E&&!$&&v?"today border-[1px] border-primary focus-visible:border-transparent sd-7-0-1-datepicker__date-item--current-font-weight":"",C?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",v?"focused":"")}" role="gridcell" aria-colindex="${x+1}" aria-labelledby="${"col-"+(x+1)}" .tabIndex="${L}" ?disabled="${this.disabled||this.readonly}" aria-disabled="${C||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${I||V||E||$?"true":"false"}" aria-current="${S?"date":R}" aria-label="${j}" aria-roledescription="${B!=null?B:R}" @focus="${()=>this.focusedDate=i.startOfDayLocal(g)}" @mouseenter="${()=>this.onDayMouseEnter(g)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=i.startOfDayLocal(g),this.selectDate(g)}}">${g.getDate()}</button>`})}</div>`)}</div></div>`}render(){var p,u;let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,a=this.helpText?!0:!!t.helpText,n=!!t.tooltip,s=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.floatingLabel&&e&&(this.hasFocus||this.open||s)&&!this.disabled&&!this.visuallyDisabled,h=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",o={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],y={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],m=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:"form-control-color-border"}[m],f=this.size==="sm"?"text-sm":"text-base";return F`<div part="form-control" class="${w("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||n?F`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${w(e?"inline-block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"form-control-color-text",f)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?F`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${w("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${e&&this.floatingLabel?F`<label id="label" part="form-control-floating-label" class="${w("absolute left-4 z-20 pointer-events-none transition-all duration-200 form-control--filled__floating-label-color-text",l?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",l&&"mt-1")}" for="input"><span class="${w("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",l&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${w("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",c,this.open&&((p=this.currentPlacement)!=null&&p.startsWith("bottom")?this.open&&this.alignment==="left"?"rounded-bl-none":"rounded-br-none":this.open&&this.alignment==="left"?"rounded-tl-none":"rounded-tr-none"))}"></div><sd-7-0-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${w("inline-flex relative w-full",(u=this.currentPlacement)!=null&&u.startsWith("bottom")?"origin-top":"origin-bottom")}" placement="${this.alignment==="left"?`${this.placement}-start`:`${this.placement}-end`}" flip shift auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${w("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",m==="disabled"||m==="visuallyDisabled"?"text-neutral-500":"text-black",m==="invalid"&&"form-control--invalid-color-background",m==="active"&&"shadow")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar" aria-describedby="${a?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${w("min-w-0 grow focus:outline-none bg-transparent hover:cursor-pointer text-black",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],f,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||l?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?F`<sd-7-0-1-icon part="invalid-icon" class="${w("text-error",o,y)}" library="_internal" name="risk"></sd-7-0-1-icon>`:""} ${this.showValidStyle&&this.styleOnValid?F`<sd-7-0-1-icon class="${w("text-success shrink-0",o,y)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-7-0-1-icon>`:""}<sd-7-0-1-icon class="${w(h,o,y,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.handleCalendarIconClick}"></sd-7-0-1-icon></div>${this.renderCalendar()}</sd-7-0-1-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${w("text-sm mt-1",a?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!a}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};r.styles=[...A.styles,q`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}.today:hover{border-color:rgba(var(--sd-datepicker__date-item--hover--default-color-border,70 109 175))}.in-range,.today{color:rgba(var(--sd-datepicker__date-item--current-color-text,0 53 142))}.icon-color{color:rgba(var(--sd-form-control-color-icon-fill))}.month-label{color:rgba(var(--sd-color-border-primary))!important}`],d([b({type:String,reflect:!0})],r.prototype,"locale",2),d([b({type:String,converter:z,reflect:!0})],r.prototype,"value",2),d([b({type:Boolean,reflect:!0})],r.prototype,"range",2),d([b({attribute:"range-start",converter:z,reflect:!0})],r.prototype,"rangeStart",2),d([b({attribute:"range-end",converter:z,reflect:!0})],r.prototype,"rangeEnd",2),d([b({type:Boolean})],r.prototype,"allowSameDayRange",2),d([b({type:String,converter:z,reflect:!0})],r.prototype,"min",2),d([b({type:String,converter:z,reflect:!0})],r.prototype,"max",2),d([b({attribute:"view-month",converter:U})],r.prototype,"viewMonth",2),d([b({type:Number})],r.prototype,"firstDayOfWeek",2),d([b({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],r.prototype,"disabledWeekends",2),d([b({attribute:"disabled-dates",converter:G})],r.prototype,"disabledDates",2),d([b({attribute:!1})],r.prototype,"isDateDisabled",2),d([b({type:String,reflect:!0})],r.prototype,"size",2),d([b({type:String})],r.prototype,"alignment",2),d([b({type:String,reflect:!0})],r.prototype,"label",2),d([b({type:String,attribute:"help-text",reflect:!0})],r.prototype,"helpText",2),d([b({attribute:"floating-label",type:Boolean,reflect:!0})],r.prototype,"floatingLabel",2),d([b({type:Boolean,reflect:!0})],r.prototype,"disabled",2),d([b({type:Boolean,reflect:!0})],r.prototype,"required",2),d([b({type:Boolean,attribute:"visually-disabled"})],r.prototype,"visuallyDisabled",2),d([b({type:Boolean,reflect:!0,attribute:"style-on-valid"})],r.prototype,"styleOnValid",2),d([b({type:Boolean,reflect:!0})],r.prototype,"readonly",2),d([b({type:String,reflect:!0})],r.prototype,"placement",2),d([b({type:String,reflect:!0})],r.prototype,"placeholder",2),d([b({reflect:!0})],r.prototype,"name",2),d([b({type:String,reflect:!0})],r.prototype,"form",2),d([O()],r.prototype,"open",2),d([O()],r.prototype,"focusedDate",2),d([O()],r.prototype,"today",2),d([O()],r.prototype,"disabledDatesSet",2),d([O()],r.prototype,"previewEnd",2),d([O()],r.prototype,"statusNavText",2),d([O()],r.prototype,"statusSelectText",2),d([O()],r.prototype,"hasFocus",2),d([O()],r.prototype,"showValidStyle",2),d([O()],r.prototype,"showInvalidStyle",2),d([O()],r.prototype,"currentPlacement",2),d([O()],r.prototype,"inputValue",2),d([Y("sd-7-0-1-popup")],r.prototype,"popup",2),d([Y("#invalid-message")],r.prototype,"invalidMessage",2),d([Y("#input")],r.prototype,"input",2),d([_("open",{waitUntilFirstUpdate:!0})],r.prototype,"handleOpenChange",1),d([_("locale")],r.prototype,"handleLocaleChange",1),d([_("viewMonth")],r.prototype,"handleViewMonthChange",1),d([_("disabledDates")],r.prototype,"handleDisabledDatesChange",1),d([_("value")],r.prototype,"handleValueChange",1),d([_("rangeStart"),_("rangeEnd")],r.prototype,"handleRangeChange",1),d([_(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],r.prototype,"handleDisabledChange",1),d([_(["size","floatingLabel"])],r.prototype,"handleSizeChange",1),r=d([H("sd-7-0-1-datepicker")],r);export{r as a};
1
+ import{a as i}from"./chunk.WWGARXPI.js";import{a as z,b as U,c as G}from"./chunk.23WKPZET.js";import{b as N}from"./chunk.LZRL7OLU.js";import{a as K}from"./chunk.CGQ2BPPZ.js";import{a as W}from"./chunk.MEDJPDBB.js";import{a as w}from"./chunk.4ZZFYCXX.js";import{a as _}from"./chunk.NYKJXI3Q.js";import{a as H,b,c as O,d as Y,h as A}from"./chunk.J45556RK.js";import{b as q,e as F,i as R}from"./chunk.OBAEIKIV.js";import{e as d}from"./chunk.6EV4YU6C.js";var r=class extends A{constructor(){super();this.localize=new W(this);this.hasSlotController=new K(this,"label","help-text","tooltip");this.formControlController=new N(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.viewMonth=null;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=i.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(n=>{var s,l;return n instanceof HTMLElement&&(((s=n.classList)==null?void 0:s.contains("nav"))||((l=n.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleCalendarIconClick=t=>{if(t.preventDefault(),t.stopPropagation(),!(this.disabled||this.visuallyDisabled||this.readonly)){if(this.open){this.hide(),this.emit("sd-datepicker-close");return}this.show(),this.updateComplete.then(()=>{var e;return(e=this.input)==null?void 0:e.focus({preventScroll:!0})})}};this.handleInput=t=>{var l,h,o,y,m;if(this.disabled||this.visuallyDisabled||this.readonly){(l=t.preventDefault)==null||l.call(t),(h=t.stopPropagation)==null||h.call(t);return}let e=t.target,a=e.value,n=(o=e.selectionStart)!=null?o:a.length,s=(y=t.inputType)==null?void 0:y.startsWith("delete");if(this.range){let c=a.replace(/\D/g,""),f=c.slice(0,8),p=c.slice(8,16),u=this.buildDmyFromDigits(f),M=this.buildDmyFromDigits(p),g;f.length===0?g="":f.length<8?g=u:p.length>0?g=`${u} - ${M}`:g=s?u:`${u} -`;let x=this.countDigitsBeforeCaret(a,n),D;if(x<=8){let v=this.digitIndexToDmyCaretPos(Math.min(x,8));D=Math.min(v,u.length)}else{let v=f.length<8?u.length:u.length+3,S=Math.min(x-8,8),I=this.digitIndexToDmyCaretPos(S);D=v+Math.min(I,M.length)}this.inputValue=g;let C=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(u)){let v=this.dmyToIso(u),S=v?i.parseLocalISO(v):null;S&&!this.isDisabled(S)&&this.inMinMax(S)&&this.rangeStart!==v&&(this.rangeStart=v,this.previewEnd=null,this.viewMonth=new Date(S.getFullYear(),S.getMonth(),1),this.focusedDate=i.startOfDayLocal(S),C=!0)}else this.rangeStart&&(this.rangeStart=null,C=!0),this.rangeEnd&&(this.rangeEnd=null,C=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(M)&&this.rangeStart){let v=i.parseLocalISO(this.rangeStart),S=this.dmyToIso(M),I=S?i.parseLocalISO(S):null;if(!!I&&!this.isDisabled(I)&&this.inMinMax(I)){let[$,V]=i.compareDates(v,I)<=0?[v,I]:[I,v],P=i.isSameDay($,V);if((this.allowSameDayRange||!P)&&!this.wouldRangeContainDisabled($,V)){let T=i.toLocalISODate(i.startOfDayLocal($)),k=i.toLocalISODate(i.startOfDayLocal(V));(this.rangeStart!==T||this.rangeEnd!==k)&&(this.rangeStart=T,this.rangeEnd=k,this.viewMonth=new Date(V.getFullYear(),V.getMonth(),1),this.focusedDate=i.startOfDayLocal(V),C=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,C=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),C&&(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 S;let v=(S=this.input)!=null?S:e;v&&(v.value=this.inputValue,v.setSelectionRange(D,D))})})}else{let c=e,f=c.value,p=(m=c.selectionStart)!=null?m:f.length,u=f.replace(/\D/g,"").slice(0,8),M=u.slice(0,2),g=u.slice(2,4),x=u.slice(4,8),D="";M.length>0&&(D+=M,M.length===2&&(D+=".")),g.length>0&&M.length===2&&(D+=g,g.length===2&&(D+=".")),x.length>0&&M.length===2&&g.length===2&&(D+=x),D=D.replace(/\.\.+/g,".");let C=this.inputValue||"";this.inputValue=D;let v=p,S=L=>{let T=[];for(let k=0;k<L.length;k++)L[k]==="."&&T.push(k);return T},I=S(C),E=S(D),$=I.filter(L=>L<p).length,P=E.filter(L=>L<p).length-$;if(P>0?v+=P:!I.includes(p)&&E.includes(p)&&(v+=1),v=Math.min(Math.max(0,v),D.length),requestAnimationFrame(()=>{var T;let L=(T=this.input)!=null?T:c;L&&(L.value=this.inputValue,L.setSelectionRange(v,v))}),/^\d{2}\.\d{2}\.\d{4}$/.test(D)){let L=this.parseInputText(D);this.applyParsedInput(L)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let c=this.rangeStart?i.parseLocalISO(this.rangeStart):null,f=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;c&&!f?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}`):c&&f&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(c)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(f)}`)}else if(this.value){let c=i.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=>{let e=t.detail;e&&(this.currentPlacement=e)};this.handleHeaderKeyDown=(t,e,a,n)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Escape"&&this.open){t.preventDefault(),t.stopPropagation(),this.hide(),this.emit("sd-datepicker-close");return}if(t.key==="Tab"&&!t.shiftKey){n&&(this.hide(),this.emit("sd-datepicker-close"));return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(a):this.setYear(a))}};this.onKeyDown=t=>{var s,l,h,o;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}if(t.key==="Tab"&&!t.shiftKey){t.preventDefault(),t.stopPropagation(),(l=(s=this.shadowRoot)==null?void 0:s.querySelector('button[part="prev-year-button"]'))==null||l.focus({preventScroll:!0});return}let e=t.key,a=!0,n=new Date(this.focusedDate);switch(e){case"ArrowLeft":n.setDate(n.getDate()-1);break;case"ArrowRight":n.setDate(n.getDate()+1);break;case"ArrowUp":n.setDate(n.getDate()-7);break;case"ArrowDown":n.setDate(n.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:a=!1}if(a){t.preventDefault();let y=(h=this.viewMonth)!=null?h:this.ensureViewMonth();if(n.getMonth()!==y.getMonth()||n.getFullYear()!==y.getFullYear()){let p=new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=p;let u=this.formatMonthYear(p);this.setNavStatus(u)}let c=i.startOfDayLocal(n);c.getTime()!==((o=this.focusedDate)==null?void 0:o.getTime())&&(this.focusedDate=c);let f=c.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(f),this.requestUpdate(),requestAnimationFrame(()=>{let p=this.shadowRoot,u=p==null?void 0:p.querySelector("button.day.focused");u==null||u.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(t.key==="Tab"&&!t.shiftKey&&this.open){t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){var l;super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?i.parseLocalISO(this.value):null,e=this.rangeStart?i.parseLocalISO(this.rangeStart):null,a=i.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:a,s=(l=this.viewMonth)!=null?l:new Date(n.getFullYear(),n.getMonth(),1);this.viewMonth=s,this.focusedDate=i.clampDateToMonth(n,s),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}handleOpenChange(){this.popup&&(this.popup.active=this.open&&!this.disabled&&!this.visuallyDisabled)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleViewMonthChange(){var a;if(!this.viewMonth)return;let t=this.focusedDate||this.range&&this.rangeEnd&&i.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&i.parseLocalISO(this.rangeStart)||this.value&&i.parseLocalISO(this.value)||this.today;if(!t)return;let e=i.clampDateToMonth(t,this.viewMonth);e.getTime()!==((a=this.focusedDate)==null?void 0:a.getTime())&&(this.focusedDate=e)}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?i.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=i.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var a;let e=this.input;if(e){e.value=(a=this.inputValue)!=null?a:"";let n=e.value.length;e.setSelectionRange(n,n)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?i.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null,a=t!=null?t:e;a&&(this.viewMonth=new Date(a.getFullYear(),a.getMonth(),1),this.focusedDate=i.startOfDayLocal(a)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let n=this.input;if(n){n.value=(s=this.inputValue)!=null?s:"";let l=n.value.length;n.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return i.parseLocalISO(t)}inMinMax(t){let e=s=>{if(s==null)return null;if(s instanceof Date)return i.startOfDayLocal(s);if(typeof s=="number")return i.startOfDayLocal(new Date(s));if(typeof s=="string"){let l=this.parseISO(s);return l?i.startOfDayLocal(l):null}return null},a=e(this.min),n=e(this.max);return!(a&&t<a||n&&t>n)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),s=`${e}-${a}-${n}`;return this.disabledDatesSet.has(s)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let a="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+a},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),a=this.ordinal(e),n=t.toLocaleDateString("en-US",{month:"long"}),s=t.getFullYear();return`${a} of ${n} ${s}`}ordinal(t){let e=["th","st","nd","rd"],a=t%100,n=e[(a-20)%10]||e[a]||e[0];return t+n}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let a=JSON.parse(e);Array.isArray(a)&&(t=a)}catch(a){t=[]}else e.length>0&&(t=e.split(",").map(a=>a.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let a=i.compareDates(t,e)<=0?i.startOfDayLocal(t):i.startOfDayLocal(e),n=i.compareDates(t,e)<=0?i.startOfDayLocal(e):i.startOfDayLocal(t),s=new Date(a);for(;i.compareDates(s,n)<=0;){if(this.isDisabled(s))return!0;s.setDate(s.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=i.parseLocalISO(t);if(e||(e=i.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let a=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getFullYear());return`${a}.${n}.${s}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let a=Number(e[1]),n=Number(e[2]),s=Number(e[3]),l=new Date(s,n-1,a);if(l.getFullYear()!==s||l.getMonth()!==n-1||l.getDate()!==a)return null;let h=i.startOfDayLocal(l);return i.toLocalISODate(h)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),n=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let s=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return s&&l?`${s} ${n} ${l}`:s&&!l?`${s} ${n}`:""}parseInputText(t){var n,s;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let h=l[0];if(!h)return{start:null,end:null,valid:!0};let o=this.dmyToIso(h);return o?{start:o,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let h=(n=l[0])!=null?n:"",o=(s=l[1])!=null?s:"",y=h?this.dmyToIso(h):null,m=o?this.dmyToIso(o):null;return h&&!y?{start:null,end:null,valid:!1}:o&&!m?{start:null,end:null,valid:!1}:{start:y,end:m,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let a=this.dmyToIso(e);return a?{single:a,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var h,o,y,m;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=c=>{if(!c)return!0;let f=i.parseLocalISO(c);return!(!this.inMinMax(f)||this.isDisabled(f))},a=!1;if(this.range){let c=(h=t.start)!=null?h:null,f=(o=t.end)!=null?o:null;if(!e(c)||f&&!e(f))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let p=c?i.parseLocalISO(c):null,u=f?i.parseLocalISO(f):null;if(p&&u){if(i.compareDates(p,u)>0){let x=p;p=u,u=x}if(!this.allowSameDayRange&&i.isSameDay(p,u))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(p,u))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let M=p?i.toLocalISODate(i.startOfDayLocal(p)):null,g=u?i.toLocalISODate(i.startOfDayLocal(u)):null;if(this.rangeStart!==M||this.rangeEnd!==g){this.rangeStart=M,this.rangeEnd=g,this.previewEnd=null,a=!0;let x=(y=p!=null?p:u)!=null?y:this.today;this.viewMonth=new Date(x.getFullYear(),x.getMonth(),1),this.focusedDate=i.startOfDayLocal(x),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let n=(m=t.single)!=null?m:null;if(!e(n))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let s=n?i.parseLocalISO(n):null,l=s?i.toLocalISODate(i.startOfDayLocal(s)):null;return this.value!==l&&(this.value=l,a=!0,s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=i.startOfDayLocal(s)),this.emit("sd-select",{detail:{value:this.value,date:s!=null?s:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),a}buildDmyFromDigits(t){let e=t.slice(0,8),a=e.slice(0,2),n=e.slice(2,4),s=e.slice(4,8),l=a;return n.length&&(l+="."+n),s.length&&(l+="."+s),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var a,n;((n=(a=t.composedPath)==null?void 0:a.call(t))!=null?n:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled||this.readonly){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled||this.readonly){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&this.show(),this.emit("sd-focus")}setMonth(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),a=new Date(e.getFullYear(),e.getMonth()+t,1);if(a.getMonth()===e.getMonth()&&a.getFullYear()===e.getFullYear())return;this.viewMonth=a;let n=this.formatMonthYear(a);this.setNavStatus(n),this.emit("sd-month-change",{detail:{month:a}})}setYear(t){var s;let e=(s=this.viewMonth)!=null?s:this.ensureViewMonth(),a=new Date(e.getFullYear()+t,e.getMonth(),1);if(a.getFullYear()===e.getFullYear()&&a.getMonth()===e.getMonth())return;this.viewMonth=a;let n=this.formatMonthYear(a);this.setNavStatus(n),this.emit("sd-month-year",{detail:{month:a}})}focusInitialGridDay(){var n;let t=null;if(!this.range&&this.value){let s=i.parseLocalISO(this.value);s&&(t=i.startOfDayLocal(s))}if(this.range){let s=this.rangeStart?i.parseLocalISO(this.rangeStart):null,l=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;s?t=i.startOfDayLocal(s):l&&(t=i.startOfDayLocal(l))}let e=(n=this.viewMonth)!=null?n:this.ensureViewMonth();if(!(s=>s?s.getFullYear()===e.getFullYear()&&s.getMonth()===e.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(e),l=s.flat().find(h=>h.getMonth()===e.getMonth()&&i.isSameDay(h,this.today)&&!this.isDisabled(h));if(l)t=i.startOfDayLocal(l);else{let h=s.flat().find(o=>o.getMonth()===e.getMonth()&&!this.isDisabled(o));t=h?i.startOfDayLocal(h):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,l=(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.selected"))||(s==null?void 0:s.querySelector("button.day"));l==null||l.focus({preventScroll:!0})})}selectSingleDate(t){if(this.readonly||this.isDisabled(t))return;let e=i.startOfDayLocal(t),a=i.toLocalISODate(e);if(this.value===a)return;this.value=a;let n=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(n),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let s=this.input;s&&(s.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let h=s.value.length;s.setSelectionRange(h,h)})}))})}selectRangeDate(t){if(this.readonly)return;let e=i.startOfDayLocal(t),a=this.rangeStart?i.parseLocalISO(this.rangeStart):null,n=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;if(!a&&!n){if(this.isDisabled(e))return;this.rangeStart=i.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let o=l.value.length;l.setSelectionRange(o,o)})}))});return}if(a&&!n){if(this.isDisabled(e))return;if(i.isSameDay(a,e)){if(!this.allowSameDayRange){this.rangeStart=i.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 f=this.input;f&&(f.value=(p=this.inputValue)!=null?p:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=f.value.length;f.setSelectionRange(u,u)})}))});return}this.rangeStart=i.toLocalISODate(e),this.rangeEnd=i.toLocalISODate(e),this.previewEnd=null;let m=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${m}`,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 f;let c=this.input;c&&(c.value=(f=this.inputValue)!=null?f:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=c.value.length;c.setSelectionRange(p,p)})}))});return}let s=i.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(s,e))return;let[l,h]=i.compareDates(s,e)<=0?[s,e]:[e,s];this.rangeStart=i.toLocalISODate(l),this.rangeEnd=i.toLocalISODate(h),this.previewEnd=null;let o=this.formatSelectionLabel(l),y=this.formatSelectionLabel(h);this.announceSelect(`${this.termStartSelected()}: ${o}`,40),this.announceSelect(`${this.termEndSelected()}: ${y}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let m=this.input;m&&(m.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=m.value.length;m.setSelectionRange(f,f)})}))});return}if(a&&n){if(this.isDisabled(e))return;this.rangeStart=i.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let s=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${s}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var h;let l=this.input;l&&(l.value=(h=this.inputValue)!=null?h:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let o=l.value.length;l.setSelectionRange(o,o)})}))})}}selectDate(t){this.readonly||(this.range?this.selectRangeDate(t):this.selectSingleDate(t))}ensureViewMonth(){if(this.viewMonth)return this.viewMonth;let t=this.value?i.parseLocalISO(this.value):null,e=this.rangeStart?i.parseLocalISO(this.rangeStart):null,a=i.startOfDayLocal(new Date),n=this.range&&e?e:t!=null?t:a,s=new Date(n.getFullYear(),n.getMonth(),1);return this.viewMonth=s,s}getMonthMatrix(t){var y;let e=(y=this.firstDayOfWeek)!=null?y:1,a=new Date(t.getFullYear(),t.getMonth(),1),n=new Date(a),s=(a.getDay()-e+7)%7;n.setDate(a.getDate()-s);let l=[],h=n;for(let m=0;m<6;m++){let c=[];for(let f=0;f<7;f++)c.push(new Date(h)),h.setDate(h.getDate()+1);l.push(c)}let o=m=>m.every(c=>c.getMonth()!==t.getMonth());for(;l.length>0&&o(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var n;let t=(n=this.firstDayOfWeek)!=null?n:1,e=new Date(2021,7,1),a=[];for(let s=0;s<7;s++){let l=new Date(e);l.setDate(e.getDate()+(t+s)%7);try{a.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(h){a.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return a}getTabTargetDayForCurrentView(t){var h;let e=(h=this.viewMonth)!=null?h:this.ensureViewMonth(),a=null;if(!this.range&&this.value){let o=i.parseLocalISO(this.value);o&&(a=i.startOfDayLocal(o))}if(this.range){let o=this.rangeStart?i.parseLocalISO(this.rangeStart):null,y=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;o?a=i.startOfDayLocal(o):y&&(a=i.startOfDayLocal(y))}if((o=>o?o.getFullYear()===e.getFullYear()&&o.getMonth()===e.getMonth()&&!this.isDisabled(o):!1)(a))return a;let s=t.flat().find(o=>o.getMonth()===e.getMonth()&&i.isSameDay(o,this.today)&&!this.isDisabled(o));if(s)return i.startOfDayLocal(s);let l=t.flat().find(o=>o.getMonth()===e.getMonth()&&!this.isDisabled(o));return l?i.startOfDayLocal(l):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?i.parseLocalISO(this.rangeStart):null,a=this.rangeEnd?i.parseLocalISO(this.rangeEnd):null;if(e&&!a){let n=i.startOfDayLocal(t);this.previewEnd=this.isDisabled(n)?null:n,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var f,p;let t=(f=this.viewMonth)!=null?f:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),a=this.formatMonthYear(t),n=this.weekdayLabels(),s=this.value?this.parseISO(this.value):null,l=this.rangeStart?this.parseISO(this.rangeStart):null,h=this.rangeEnd?this.parseISO(this.rangeEnd):null,o=this.previewEnd,y=u=>!this.range||!l||h||!o?!1:i.isBetweenInclusive(u,l,o),m=this.getTabTargetDayForCurrentView(e),c=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color";return F`<div part="datepicker" id="calendar" role="dialog" aria-label="${this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")}" class="${w("w-[284px] z-50 bg-white py-3 px-4",this.open?"block shadow-listbox":"hidden",(p=this.currentPlacement)!=null&&p.startsWith("bottom")?"border-r-2 border-b-2 border-l-2 form-control__listbox-border-bottom-right-radius form-control__listbox-border-bottom-left-radius":"border-r-2 border-t-2 border-l-2 form-control__listbox-border-top-right-radius form-control__listbox-border-top-left-radius","border-primary")}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="${w("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",c)}" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${u=>this.handleHeaderKeyDown(u,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-7-0-3-icon library="_internal" name="chevrons-small-left" class="h-6 w-6"></sd-7-0-3-icon></button> <button type="button" tabindex="0" class="${w("nav prev w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",c)}" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${u=>this.handleHeaderKeyDown(u,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-7-0-3-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-7-0-3-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base" part="month-label" aria-live="polite">${a}</div><div class="flex items-center"><button type="button" tabindex="0" class="${w("nav next w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",c)}" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${u=>this.handleHeaderKeyDown(u,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-7-0-3-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-7-0-3-icon></button> <button type="button" tabindex="0" class="${w("nav next w-6 h-6 hover:cursor-pointer focus-visible:focus-outline",c)}" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${u=>this.handleHeaderKeyDown(u,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-7-0-3-icon library="_internal" name="chevrons-small-right" class="h-6 w-6"></sd-7-0-3-icon></button></div></div><sd-7-0-3-divider></sd-7-0-3-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="${a}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${n.map((u,M)=>F`<div role="columnheader" aria-colindex="${M+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${u}" title="${u}" id="${"col-"+(M+1)}">${u}</div>`)}</div>${e.map((u,M)=>F`<div class="grid-row grid grid-cols-7 ${M===0?"mt-2":""}" role="row" aria-rowindex="${M+2}">${u.map((g,x)=>{let D=g.getMonth()===t.getMonth(),C=this.isDisabled(g)||!this.inMinMax(g),v=i.isSameDay(g,this.focusedDate),S=i.isSameDay(g,this.today),I=!this.range&&s?i.isSameDay(g,s):!1,E=this.range&&l?i.isSameDay(g,l):!1,$=this.range&&h?i.isSameDay(g,h):!1,V=this.range&&l&&h?i.isBetweenInclusive(g,l,h):!1,P=y(g)&&!C,L=-1,T=m&&i.isSameDay(g,m);(this.tabbingIntoGrid&&T||!this.tabbingIntoGrid&&v)&&(L=0);let k=this.isWeekend(g),j=g.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),B=E?this.localize.term("startDateSelected"):$?this.localize.term("endDateSelected"):void 0;return F`<button type="button" part="day" class="${w("cell day relative flex items-center justify-center rounded w-[36px] focus-visible:focus-outline focus-visible:z-10",this.size==="sm"?"text-sm h-6":"text-base h-8",E||$?"sd-7-0-3-datepicker__date-item--selected-color-background sd-7-0-3-datepicker__date-item--selected-color-text hover:sd-7-0-3-datepicker__date-item--selected--hover-color-background hover:sd-7-0-3-datepicker__date-item--selected--hover-color-text":"hover:sd-7-0-3-datepicker__date-item--hover--default-color-text",!E&&!$&&!V&&"hover:sd-7-0-3-datepicker__date-item--hover--default-color-background",I?"selected border-primary sd-7-0-3-datepicker__date-item--selected-color-background sd-7-0-3-datepicker__date-item--selected-color-text hover:sd-7-0-3-datepicker__date-item--selected--hover-color-text hover:sd-7-0-3-datepicker__date-item--selected--hover-color-background":(E||$)&&!D?"out-month":D?this.isInDisabledDates(g)||!this.inMinMax(g)?"out-month text-neutral-500":this.disabledWeekends&&k?"weekend-day text-neutral-500":"in-month sd-7-0-3-datepicker__date-item--default-color-text":this.disabledWeekends&&k?"out-month weekend-day text-neutral-500":k?"out-month weekend-day text-neutral-700":"out-month text-neutral-700 hover:sd-7-0-3-datepicker__date-item--hover--prev-next-color-text hover:sd-7-0-3-datepicker__date-item--hover--prev-next-color-background",E?"rounded-l-md rounded-r-none":"",$?"range-end rounded-r-md rounded-l-none":"",V&&!E&&!$?"in-range selected sd-7-0-3-datepicker__date-item--range-color-background rounded-none hover:sd-7-0-3-datepicker__date-item--selected--hover-color-background hover:sd-7-0-3-datepicker__date-item--selected--hover-color-text":"",!V&&P&&!E&&!$?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",S&&!I&&!E&&!$&&v?"today border-[1px] border-primary focus-visible:border-transparent sd-7-0-3-datepicker__date-item--current-font-weight":"",C?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",v?"focused":"")}" role="gridcell" aria-colindex="${x+1}" aria-labelledby="${"col-"+(x+1)}" .tabIndex="${L}" ?disabled="${this.disabled||this.readonly}" aria-disabled="${C||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${I||V||E||$?"true":"false"}" aria-current="${S?"date":R}" aria-label="${j}" aria-roledescription="${B!=null?B:R}" @focus="${()=>this.focusedDate=i.startOfDayLocal(g)}" @mouseenter="${()=>this.onDayMouseEnter(g)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=i.startOfDayLocal(g),this.selectDate(g)}}">${g.getDate()}</button>`})}</div>`)}</div></div>`}render(){var p,u;let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,a=this.helpText?!0:!!t.helpText,n=!!t.tooltip,s=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,l=this.floatingLabel&&e&&(this.hasFocus||this.open||s)&&!this.disabled&&!this.visuallyDisabled,h=this.disabled||this.visuallyDisabled?"text-neutral-500":"icon-color",o={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],y={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],m=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle&&!this.open?"activeInvalid":this.hasFocus&&!this.open&&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:"form-control-color-border"}[m],f=this.size==="sm"?"text-sm":"text-base";return F`<div part="form-control" class="${w("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||n?F`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${w(e?"inline-block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"form-control-color-text",f)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?F`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${w("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${e&&this.floatingLabel?F`<label id="label" part="form-control-floating-label" class="${w("absolute left-4 z-20 pointer-events-none transition-all duration-200 form-control--filled__floating-label-color-text",l?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2 form-control-color-text",l&&"mt-1")}" for="input"><span class="${w("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",l&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${w("absolute top-0 w-full h-full pointer-events-none border form-control-border-radius z-10 transition-[border] duration-medium ease-in-out",c,this.open&&((p=this.currentPlacement)!=null&&p.startsWith("bottom")?this.open&&this.alignment==="left"?"rounded-bl-none":"rounded-br-none":this.open&&this.alignment==="left"?"rounded-tl-none":"rounded-tr-none"))}"></div><sd-7-0-3-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${w("inline-flex relative w-full",(u=this.currentPlacement)!=null&&u.startsWith("bottom")?"origin-top":"origin-bottom")}" placement="${this.alignment==="left"?`${this.placement}-start`:`${this.placement}-end`}" flip shift auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${w("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:[@media(hover:hover)]:form-control--hover-color-background":"",this.readonly?"form-control--read-only-color-background":"bg-white",m==="disabled"||m==="visuallyDisabled"?"text-neutral-500":"text-black",m==="invalid"&&"form-control--invalid-color-background",m==="active"&&"shadow")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar" aria-describedby="${a?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${w("min-w-0 grow focus:outline-none bg-transparent hover:cursor-pointer text-black",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],f,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||l?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?F`<sd-7-0-3-icon part="invalid-icon" class="${w("text-error",o,y)}" library="_internal" name="risk"></sd-7-0-3-icon>`:""} ${this.showValidStyle&&this.styleOnValid?F`<sd-7-0-3-icon class="${w("text-success shrink-0",o,y)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-7-0-3-icon>`:""}<sd-7-0-3-icon class="${w(h,o,y,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.handleCalendarIconClick}"></sd-7-0-3-icon></div>${this.renderCalendar()}</sd-7-0-3-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${w("text-sm mt-1",a?"block":"hidden",this.visuallyDisabled||this.disabled?"text-neutral-500":"text-neutral-700")}" aria-hidden="${!a}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};r.styles=[...A.styles,q`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}.today:hover{border-color:rgba(var(--sd-datepicker__date-item--hover--default-color-border,70 109 175))}.in-range,.today{color:rgba(var(--sd-datepicker__date-item--current-color-text,0 53 142))}.icon-color{color:rgba(var(--sd-form-control-color-icon-fill))}.month-label{color:rgba(var(--sd-color-border-primary))!important}`],d([b({type:String,reflect:!0})],r.prototype,"locale",2),d([b({type:String,converter:z,reflect:!0})],r.prototype,"value",2),d([b({type:Boolean,reflect:!0})],r.prototype,"range",2),d([b({attribute:"range-start",converter:z,reflect:!0})],r.prototype,"rangeStart",2),d([b({attribute:"range-end",converter:z,reflect:!0})],r.prototype,"rangeEnd",2),d([b({type:Boolean})],r.prototype,"allowSameDayRange",2),d([b({type:String,converter:z,reflect:!0})],r.prototype,"min",2),d([b({type:String,converter:z,reflect:!0})],r.prototype,"max",2),d([b({attribute:"view-month",converter:U})],r.prototype,"viewMonth",2),d([b({type:Number})],r.prototype,"firstDayOfWeek",2),d([b({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],r.prototype,"disabledWeekends",2),d([b({attribute:"disabled-dates",converter:G})],r.prototype,"disabledDates",2),d([b({attribute:!1})],r.prototype,"isDateDisabled",2),d([b({type:String,reflect:!0})],r.prototype,"size",2),d([b({type:String})],r.prototype,"alignment",2),d([b({type:String,reflect:!0})],r.prototype,"label",2),d([b({type:String,attribute:"help-text",reflect:!0})],r.prototype,"helpText",2),d([b({attribute:"floating-label",type:Boolean,reflect:!0})],r.prototype,"floatingLabel",2),d([b({type:Boolean,reflect:!0})],r.prototype,"disabled",2),d([b({type:Boolean,reflect:!0})],r.prototype,"required",2),d([b({type:Boolean,attribute:"visually-disabled"})],r.prototype,"visuallyDisabled",2),d([b({type:Boolean,reflect:!0,attribute:"style-on-valid"})],r.prototype,"styleOnValid",2),d([b({type:Boolean,reflect:!0})],r.prototype,"readonly",2),d([b({type:String,reflect:!0})],r.prototype,"placement",2),d([b({type:String,reflect:!0})],r.prototype,"placeholder",2),d([b({reflect:!0})],r.prototype,"name",2),d([b({type:String,reflect:!0})],r.prototype,"form",2),d([O()],r.prototype,"open",2),d([O()],r.prototype,"focusedDate",2),d([O()],r.prototype,"today",2),d([O()],r.prototype,"disabledDatesSet",2),d([O()],r.prototype,"previewEnd",2),d([O()],r.prototype,"statusNavText",2),d([O()],r.prototype,"statusSelectText",2),d([O()],r.prototype,"hasFocus",2),d([O()],r.prototype,"showValidStyle",2),d([O()],r.prototype,"showInvalidStyle",2),d([O()],r.prototype,"currentPlacement",2),d([O()],r.prototype,"inputValue",2),d([Y("sd-7-0-3-popup")],r.prototype,"popup",2),d([Y("#invalid-message")],r.prototype,"invalidMessage",2),d([Y("#input")],r.prototype,"input",2),d([_("open",{waitUntilFirstUpdate:!0})],r.prototype,"handleOpenChange",1),d([_("locale")],r.prototype,"handleLocaleChange",1),d([_("viewMonth")],r.prototype,"handleViewMonthChange",1),d([_("disabledDates")],r.prototype,"handleDisabledDatesChange",1),d([_("value")],r.prototype,"handleValueChange",1),d([_("rangeStart"),_("rangeEnd")],r.prototype,"handleRangeChange",1),d([_(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],r.prototype,"handleDisabledChange",1),d([_(["size","floatingLabel"])],r.prototype,"handleSizeChange",1),r=d([H("sd-7-0-3-datepicker")],r);export{r as a};
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk.LHSR56PH.js";import{a as h}from"./chunk.MEDJPDBB.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as o,b as r,d as c,h as i}from"./chunk.J45556RK.js";import{b as l,e as a}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends i{constructor(){super(...arguments);this.localize=new h(this);this.href="";this.current=!1}handleCurrentChange(){var s,n;!this.base||!this.current||(n=(s=this.base.shadowRoot)==null?void 0:s.querySelector("a"))==null||n.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return a`<sd-7-0-1-link part="base" href="${f(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-7-0-1-link>`}};t.styles=[...i.styles,l`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{display:inline-flex;align-items:center}sd-7-0-1-link::part(base){align-items:center}sd-7-0-1-link::part(icon-left){margin-right:0;display:inline-flex}:host([current]) sd-7-0-1-link::part(base){color:rgba(var(--sd-breadcrumb--current-color-text,104 104 104))}:host([current]) sd-7-0-1-link::part(label){text-decoration-line:none}`],e([c('[part="base"]')],t.prototype,"base",2),e([r({type:String,reflect:!0})],t.prototype,"href",2),e([r({type:String,reflect:!0})],t.prototype,"target",2),e([r({type:Boolean,reflect:!0})],t.prototype,"current",2),e([p("current")],t.prototype,"handleCurrentChange",1),t=e([o("sd-7-0-1-breadcrumb-item")],t);export{t as a};
1
+ import{a as f}from"./chunk.LHSR56PH.js";import{a as h}from"./chunk.MEDJPDBB.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as o,b as r,d as c,h as i}from"./chunk.J45556RK.js";import{b as l,e as a}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends i{constructor(){super(...arguments);this.localize=new h(this);this.href="";this.current=!1}handleCurrentChange(){var s,n;!this.base||!this.current||(n=(s=this.base.shadowRoot)==null?void 0:s.querySelector("a"))==null||n.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return a`<sd-7-0-3-link part="base" href="${f(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-7-0-3-link>`}};t.styles=[...i.styles,l`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{display:inline-flex;align-items:center}sd-7-0-3-link::part(base){align-items:center}sd-7-0-3-link::part(icon-left){margin-right:0;display:inline-flex}:host([current]) sd-7-0-3-link::part(base){color:rgba(var(--sd-breadcrumb--current-color-text,104 104 104))}:host([current]) sd-7-0-3-link::part(label){text-decoration-line:none}`],e([c('[part="base"]')],t.prototype,"base",2),e([r({type:String,reflect:!0})],t.prototype,"href",2),e([r({type:String,reflect:!0})],t.prototype,"target",2),e([r({type:Boolean,reflect:!0})],t.prototype,"current",2),e([p("current")],t.prototype,"handleCurrentChange",1),t=e([o("sd-7-0-3-breadcrumb-item")],t);export{t as a};
@@ -1,2 +1,2 @@
1
- import{a as v}from"./chunk.4ZZFYCXX.js";import{a as n}from"./chunk.NYKJXI3Q.js";import{a as f,b as a,d as m,h as l}from"./chunk.J45556RK.js";import{b as o,e as c,i as h}from"./chunk.OBAEIKIV.js";import{e as s}from"./chunk.6EV4YU6C.js";var e=class extends l{constructor(){super(...arguments);this.steps=[];this.size="lg";this.orientation="horizontal";this.activeStep=0;this.notInteractive=!1;this.label=""}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.steps=this.getAllSteps(),this.steps[this.steps.length-1].noTail=!0;let t;this.steps.forEach((i,r)=>{i.index=r+1,i.size=this.size,i.orientation=this.orientation,this.notInteractive?(i.current=!1,i.disabled=!1,i.notInteractive=!0):i.current&&(t=r)}),this.activeStep!==-1&&this.setActiveStep(t||this.activeStep)})}handleActiveStepChange(){let t=Number(this.activeStep);Number.isNaN(t)||this.setActiveStep(t)}updateSize(){this.steps.forEach(t=>{t.size=this.size})}updateOrientation(){this.steps.forEach(t=>{t.orientation=this.orientation})}getAllSteps(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-7-0-1-step")}setActiveStep(t){t>=0&&t<this.steps.length&&!this.notInteractive&&(this.activeStep=t,this.steps.forEach((i,r)=>{r===t?i.current=!0:r>t?(i.waiting=!0,i.current=!1):(i.current=!1,i.waiting=!1)}))}handleInteractivityChange(){this.notInteractive&&this.steps.forEach(t=>{t.current=!1,t.disabled=!1,t.notInteractive=!0})}render(){return this.size==="xs"&&this.orientation!=="vertical"?(console.warn('Size "xs" is only supported when orientation is "vertical". The element will not be rendered.'),h):c`<div role="${this.notInteractive?"group":"navigation"}" class="h-full" aria-label="${this.label}"><div role="list" part="base" class="${v("flex",this.orientation==="vertical"&&"flex-col h-full")}"><slot part="body"></slot></div></div>`}};e.styles=[...l.styles,o`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{width:-moz-max-content;width:max-content}`],s([m("[part=body]")],e.prototype,"body",2),s([a({type:String,reflect:!0})],e.prototype,"size",2),s([a({type:String,reflect:!0})],e.prototype,"orientation",2),s([a({type:Number,reflect:!0,attribute:"active-step"})],e.prototype,"activeStep",2),s([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],e.prototype,"notInteractive",2),s([a({type:String,reflect:!0})],e.prototype,"label",2),s([n("activeStep",{waitUntilFirstUpdate:!0})],e.prototype,"handleActiveStepChange",1),s([n("size",{waitUntilFirstUpdate:!0})],e.prototype,"updateSize",1),s([n("orientation",{waitUntilFirstUpdate:!0})],e.prototype,"updateOrientation",1),s([n("notInteractive")],e.prototype,"handleInteractivityChange",1),e=s([f("sd-7-0-1-step-group")],e);export{e as a};
1
+ import{a as v}from"./chunk.4ZZFYCXX.js";import{a as n}from"./chunk.NYKJXI3Q.js";import{a as f,b as a,d as m,h as l}from"./chunk.J45556RK.js";import{b as o,e as c,i as h}from"./chunk.OBAEIKIV.js";import{e as s}from"./chunk.6EV4YU6C.js";var e=class extends l{constructor(){super(...arguments);this.steps=[];this.size="lg";this.orientation="horizontal";this.activeStep=0;this.notInteractive=!1;this.label=""}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.steps=this.getAllSteps(),this.steps[this.steps.length-1].noTail=!0;let t;this.steps.forEach((i,r)=>{i.index=r+1,i.size=this.size,i.orientation=this.orientation,this.notInteractive?(i.current=!1,i.disabled=!1,i.notInteractive=!0):i.current&&(t=r)}),this.activeStep!==-1&&this.setActiveStep(t||this.activeStep)})}handleActiveStepChange(){let t=Number(this.activeStep);Number.isNaN(t)||this.setActiveStep(t)}updateSize(){this.steps.forEach(t=>{t.size=this.size})}updateOrientation(){this.steps.forEach(t=>{t.orientation=this.orientation})}getAllSteps(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-7-0-3-step")}setActiveStep(t){t>=0&&t<this.steps.length&&!this.notInteractive&&(this.activeStep=t,this.steps.forEach((i,r)=>{r===t?i.current=!0:r>t?(i.waiting=!0,i.current=!1):(i.current=!1,i.waiting=!1)}))}handleInteractivityChange(){this.notInteractive&&this.steps.forEach(t=>{t.current=!1,t.disabled=!1,t.notInteractive=!0})}render(){return this.size==="xs"&&this.orientation!=="vertical"?(console.warn('Size "xs" is only supported when orientation is "vertical". The element will not be rendered.'),h):c`<div role="${this.notInteractive?"group":"navigation"}" class="h-full" aria-label="${this.label}"><div role="list" part="base" class="${v("flex",this.orientation==="vertical"&&"flex-col h-full")}"><slot part="body"></slot></div></div>`}};e.styles=[...l.styles,o`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{width:-moz-max-content;width:max-content}`],s([m("[part=body]")],e.prototype,"body",2),s([a({type:String,reflect:!0})],e.prototype,"size",2),s([a({type:String,reflect:!0})],e.prototype,"orientation",2),s([a({type:Number,reflect:!0,attribute:"active-step"})],e.prototype,"activeStep",2),s([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],e.prototype,"notInteractive",2),s([a({type:String,reflect:!0})],e.prototype,"label",2),s([n("activeStep",{waitUntilFirstUpdate:!0})],e.prototype,"handleActiveStepChange",1),s([n("size",{waitUntilFirstUpdate:!0})],e.prototype,"updateSize",1),s([n("orientation",{waitUntilFirstUpdate:!0})],e.prototype,"updateOrientation",1),s([n("notInteractive")],e.prototype,"handleInteractivityChange",1),e=s([f("sd-7-0-3-step-group")],e);export{e as a};
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk.CGQ2BPPZ.js";import{a as i}from"./chunk.4ZZFYCXX.js";import{a as o}from"./chunk.NYKJXI3Q.js";import{a as h,b as a,c as r,d,h as n}from"./chunk.J45556RK.js";import{b as c,e as l}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends n{constructor(){super(...arguments);this.hasSlotController=new u(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.isKeyboardFocus=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let s=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=s;return}s!==this.cachedTextLabel&&(this.cachedTextLabel=s,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var s;return((s=this.textContent)!=null?s:"").trim()}render(){let s={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return l`<div part="base" style="word-break:break-word" class="${i("px-4 flex items-start w-full transition-colors duration-fast ease-in-out text-left text-base relative",{sm:"text-base py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"text-black cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.isKeyboardFocus?"focus-outline focus-outline-offset":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${i("absolute w-full left-0 top-0 pointer-events-none transition-[height,top] duration-fast ease-in-out border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?l`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${i("relative flex flex-shrink-0 items-center justify-center border sd-7-0-1-checkbox-border-width rounded-sm h-4 w-4 mr-2",{sm:"mt-0.5",md:"mt-1",lg:"mt-1"}[this.size],this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"bg-white form-control-color-border")}">${this.selected?l`<sd-7-0-1-icon part="checked-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-check"></sd-7-0-1-icon>`:""}</span>`:""} ${s.left?l`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${s.right?l`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};e.styles=[...n.styles,c`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{position:relative;display:block;width:100%;--tw-outline-style:none!important;outline-style:none!important}.focus-outline-offset{outline-offset:-2px}`],t([d('[part="base"]')],e.prototype,"defaultSlot",2),t([r()],e.prototype,"current",2),t([r()],e.prototype,"selected",2),t([r()],e.prototype,"hasHover",2),t([r()],e.prototype,"isKeyboardFocus",2),t([a({type:String,reflect:!0})],e.prototype,"size",2),t([a({type:Boolean,reflect:!0})],e.prototype,"checkbox",2),t([a({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([a({type:String,reflect:!0})],e.prototype,"value",2),t([o("disabled")],e.prototype,"handleDisabledChange",1),t([o("selected")],e.prototype,"handleSelectedChange",1),t([o("value")],e.prototype,"handleValueChange",1),e=t([h("sd-7-0-1-option")],e);export{e as a};
1
+ import{a as u}from"./chunk.CGQ2BPPZ.js";import{a as i}from"./chunk.4ZZFYCXX.js";import{a as o}from"./chunk.NYKJXI3Q.js";import{a as h,b as a,c as r,d,h as n}from"./chunk.J45556RK.js";import{b as c,e as l}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends n{constructor(){super(...arguments);this.hasSlotController=new u(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.isKeyboardFocus=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let s=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=s;return}s!==this.cachedTextLabel&&(this.cachedTextLabel=s,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var s;return((s=this.textContent)!=null?s:"").trim()}render(){let s={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return l`<div part="base" style="word-break:break-word" class="${i("px-4 flex items-start w-full transition-colors duration-fast ease-in-out text-left text-base relative",{sm:"text-base py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"text-black cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.isKeyboardFocus?"focus-outline focus-outline-offset":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${i("absolute w-full left-0 top-0 pointer-events-none transition-[height,top] duration-fast ease-in-out border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?l`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${i("relative flex flex-shrink-0 items-center justify-center border sd-7-0-3-checkbox-border-width rounded-sm h-4 w-4 mr-2",{sm:"mt-0.5",md:"mt-1",lg:"mt-1"}[this.size],this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"bg-white form-control-color-border")}">${this.selected?l`<sd-7-0-3-icon part="checked-icon" class="text-white w-3 h-3" library="sd-status-assets" name="status-check"></sd-7-0-3-icon>`:""}</span>`:""} ${s.left?l`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${s.right?l`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};e.styles=[...n.styles,c`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{position:relative;display:block;width:100%;--tw-outline-style:none!important;outline-style:none!important}.focus-outline-offset{outline-offset:-2px}`],t([d('[part="base"]')],e.prototype,"defaultSlot",2),t([r()],e.prototype,"current",2),t([r()],e.prototype,"selected",2),t([r()],e.prototype,"hasHover",2),t([r()],e.prototype,"isKeyboardFocus",2),t([a({type:String,reflect:!0})],e.prototype,"size",2),t([a({type:Boolean,reflect:!0})],e.prototype,"checkbox",2),t([a({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([a({type:String,reflect:!0})],e.prototype,"value",2),t([o("disabled")],e.prototype,"handleDisabledChange",1),t([o("selected")],e.prototype,"handleSelectedChange",1),t([o("value")],e.prototype,"handleValueChange",1),e=t([h("sd-7-0-3-option")],e);export{e as a};
@@ -1,2 +1,2 @@
1
- import{a as m,b as g,c as b,d as h,h as u}from"./chunk.J45556RK.js";import{b as d,e as c}from"./chunk.OBAEIKIV.js";import{e as l}from"./chunk.6EV4YU6C.js";var s=class extends u{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(e){let t=a(e.target);t==null||t.classList.add("sd-7-0-1-button-group__button--focus")}handleBlur(e){let t=a(e.target);t==null||t.classList.remove("sd-7-0-1-button-group__button--focus")}handleMouseOver(e){let t=a(e.target);t==null||t.classList.add("sd-7-0-1-button-group__button--hover")}handleMouseOut(e){let t=a(e.target);t==null||t.classList.remove("sd-7-0-1-button-group__button--hover")}handleSlotChange(){let e=[...this.defaultSlot.assignedElements({flatten:!0})];e.forEach(t=>{let n=e.indexOf(t),o=a(t);o!==null&&(o.classList.add("sd-7-0-1-button-group__button"),o.classList.toggle("sd-7-0-1-button-group__button--first",n===0),o.classList.toggle("sd-7-0-1-button-group__button--inner",n>0&&n<e.length-1),o.classList.toggle("sd-7-0-1-button-group__button--last",n===e.length-1),o.classList.toggle("sd-7-0-1-button-group__button--radio",o.tagName.toLowerCase()==="sd-7-0-1-radio-button"))})}render(){return c`<slot part="base" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};s.styles=[...u.styles,d`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],l([h("slot")],s.prototype,"defaultSlot",2),l([b()],s.prototype,"disableRole",2),l([g({type:String,reflect:!0})],s.prototype,"label",2),s=l([m("sd-7-0-1-button-group")],s);function a(r){var e;let i="sd-7-0-1-button, sd-7-0-1-radio-button";return(e=r.closest(i))!=null?e:r.querySelector(i)}export{s as a};
1
+ import{a as m,b as g,c as b,d as h,h as u}from"./chunk.J45556RK.js";import{b as d,e as c}from"./chunk.OBAEIKIV.js";import{e as l}from"./chunk.6EV4YU6C.js";var s=class extends u{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(e){let t=a(e.target);t==null||t.classList.add("sd-7-0-3-button-group__button--focus")}handleBlur(e){let t=a(e.target);t==null||t.classList.remove("sd-7-0-3-button-group__button--focus")}handleMouseOver(e){let t=a(e.target);t==null||t.classList.add("sd-7-0-3-button-group__button--hover")}handleMouseOut(e){let t=a(e.target);t==null||t.classList.remove("sd-7-0-3-button-group__button--hover")}handleSlotChange(){let e=[...this.defaultSlot.assignedElements({flatten:!0})];e.forEach(t=>{let n=e.indexOf(t),o=a(t);o!==null&&(o.classList.add("sd-7-0-3-button-group__button"),o.classList.toggle("sd-7-0-3-button-group__button--first",n===0),o.classList.toggle("sd-7-0-3-button-group__button--inner",n>0&&n<e.length-1),o.classList.toggle("sd-7-0-3-button-group__button--last",n===e.length-1),o.classList.toggle("sd-7-0-3-button-group__button--radio",o.tagName.toLowerCase()==="sd-7-0-3-radio-button"))})}render(){return c`<slot part="base" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};s.styles=[...u.styles,d`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],l([h("slot")],s.prototype,"defaultSlot",2),l([b()],s.prototype,"disableRole",2),l([g({type:String,reflect:!0})],s.prototype,"label",2),s=l([m("sd-7-0-3-button-group")],s);function a(r){var e;let i="sd-7-0-3-button, sd-7-0-3-radio-button";return(e=r.closest(i))!=null?e:r.querySelector(i)}export{s as a};
@@ -1,2 +1,2 @@
1
- import{b as m}from"./chunk.NL7YFV4O.js";import{a as b}from"./chunk.MEDJPDBB.js";import{a as o}from"./chunk.4ZZFYCXX.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as d,b as a,d as n,h as s}from"./chunk.J45556RK.js";import{b as r}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends s{constructor(){super(...arguments);this.localize=new b(this);this.disabled=!1;this.label=""}handleDisableOptions(){let{disabled:i}=this;this.defaultSlot.assignedElements().filter(l=>l.tagName.toLowerCase()==="sd-7-0-1-option").forEach(l=>{l.disabled=i})}handleDisabledChange(){this.handleDisableOptions()}render(){let{disabled:i}=this;return m`<div role="${i?"presentation":"group"}" class="${o(this.disabled?"text-neutral-500":"")}" part="base" aria-labelledby="group-label"><sd-7-0-1-divider id="divider" class="pt-2 pb-4" part="divider"></sd-7-0-1-divider><div part="label-container" class="${o(this.disabled?"text-neutral-500":"text-black")} px-4 font-bold text-left" role="presentation" id="group-label"><slot name="label"><span>${this.label}</span></slot></div><div role="listbox" part="options" aria-label="${this.localize.term("optionGroup")}"><slot @slotchange="${this.handleDisableOptions}"></slot></div></div>`}};e.styles=[...s.styles,r`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{--display-divider:block}#divider{display:var(--display-divider)}`],t([n("slot:not([name])")],e.prototype,"defaultSlot",2),t([a({reflect:!0,type:Boolean})],e.prototype,"disabled",2),t([a({type:String,reflect:!0})],e.prototype,"label",2),t([p("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([d("sd-7-0-1-optgroup")],e);export{e as a};
1
+ import{b as m}from"./chunk.NL7YFV4O.js";import{a as b}from"./chunk.MEDJPDBB.js";import{a as o}from"./chunk.4ZZFYCXX.js";import{a as p}from"./chunk.NYKJXI3Q.js";import{a as d,b as a,d as n,h as s}from"./chunk.J45556RK.js";import{b as r}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends s{constructor(){super(...arguments);this.localize=new b(this);this.disabled=!1;this.label=""}handleDisableOptions(){let{disabled:i}=this;this.defaultSlot.assignedElements().filter(l=>l.tagName.toLowerCase()==="sd-7-0-3-option").forEach(l=>{l.disabled=i})}handleDisabledChange(){this.handleDisableOptions()}render(){let{disabled:i}=this;return m`<div role="${i?"presentation":"group"}" class="${o(this.disabled?"text-neutral-500":"")}" part="base" aria-labelledby="group-label"><sd-7-0-3-divider id="divider" class="pt-2 pb-4" part="divider"></sd-7-0-3-divider><div part="label-container" class="${o(this.disabled?"text-neutral-500":"text-black")} px-4 font-bold text-left" role="presentation" id="group-label"><slot name="label"><span>${this.label}</span></slot></div><div role="listbox" part="options" aria-label="${this.localize.term("optionGroup")}"><slot @slotchange="${this.handleDisableOptions}"></slot></div></div>`}};e.styles=[...s.styles,r`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{--display-divider:block}#divider{display:var(--display-divider)}`],t([n("slot:not([name])")],e.prototype,"defaultSlot",2),t([a({reflect:!0,type:Boolean})],e.prototype,"disabled",2),t([a({type:String,reflect:!0})],e.prototype,"label",2),t([p("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([d("sd-7-0-3-optgroup")],e);export{e as a};
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk.MHWW3RZB.js";import{a as n,b as a,d,h as r}from"./chunk.J45556RK.js";import{b as o,e as s}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends r{constructor(){super(...arguments);this.fixed=!1;this.shadow=!1}connectedCallback(){super.connectedCallback(),this.updateCalculatedHeight=this.updateCalculatedHeight.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this),window.addEventListener("resize",this.updateCalculatedHeight)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.updateCalculatedHeight)}firstUpdated(){this.updateCalculatedHeight(),this.addResizeObserver()}updated(i){super.updated(i),i.has("fixed")&&this.updateCalculatedHeight()}addResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateCalculatedHeight),this.header&&this.resizeObserver.observe(this.header)}updateCalculatedHeight(){let i=parseFloat(getComputedStyle(document.documentElement).fontSize),h=window.innerHeight/i;this.header&&this.fixed&&h>=32?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.header.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return s`<header class="w-full sd-7-0-1-header-color-background sd-7-0-1-header-padding-bottom relative" role="banner"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}};e.styles=[...r.styles,o`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
- :host{position:relative;z-index:var(--sd-z-index-header,600);display:block}@media (min-height:32rem){:host([fixed]){padding-bottom:var(--sd-header-calculated-height)!important}:host([fixed]) header{position:fixed;top:0;left:0;width:100%}}:host([shadow]) header::after{position:absolute;top:100%;right:0;left:0;height:var(--sd-header__shadow-height,.25rem);--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops));--tw-gradient-from:color-mix(in oklab, var(--color-black, #000) 40%, transparent);--tw-gradient-to:color-mix(in oklab, var(--color-black, #000) var(--sd-opacity-0, 0%), transparent);--tw-gradient-stops:var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));--tw-content:'';content:var(--tw-content)}[part=main]{width:var(--sd-header-inner-width);max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px)}:host([shadow]) header::before{position:absolute;bottom:0;left:0;display:block;width:100%;--tw-content:'';content:var(--tw-content);background-color:rgb(var(--sd-header__underline-color-background));height:var(--sd-header__underline-height,var(--sd-spacing-2))}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],t([a({reflect:!0,type:Boolean})],e.prototype,"fixed",2),t([a({reflect:!0,type:Boolean})],e.prototype,"shadow",2),t([d("header")],e.prototype,"header",2),t([l(100)],e.prototype,"updateCalculatedHeight",1),e=t([n("sd-7-0-1-header")],e);export{e as a};
1
+ import{a as l}from"./chunk.MHWW3RZB.js";import{a as n,b as a,d,h as r}from"./chunk.J45556RK.js";import{b as o,e as s}from"./chunk.OBAEIKIV.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends r{constructor(){super(...arguments);this.fixed=!1;this.shadow=!1}connectedCallback(){super.connectedCallback(),this.updateCalculatedHeight=this.updateCalculatedHeight.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this),window.addEventListener("resize",this.updateCalculatedHeight)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.updateCalculatedHeight)}firstUpdated(){this.updateCalculatedHeight(),this.addResizeObserver()}updated(i){super.updated(i),i.has("fixed")&&this.updateCalculatedHeight()}addResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateCalculatedHeight),this.header&&this.resizeObserver.observe(this.header)}updateCalculatedHeight(){let i=parseFloat(getComputedStyle(document.documentElement).fontSize),h=window.innerHeight/i;this.header&&this.fixed&&h>=32?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.header.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return s`<header class="w-full sd-7-0-3-header-color-background sd-7-0-3-header-padding-bottom relative" role="banner"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}};e.styles=[...r.styles,o`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
+ :host{position:relative;z-index:var(--sd-z-index-header,600);display:block}@media (min-height:32rem){:host([fixed]){padding-bottom:var(--sd-header-calculated-height)!important}:host([fixed]) header{position:fixed;top:0;left:0;width:100%}}:host([shadow]) header::after{position:absolute;top:100%;right:0;left:0;height:var(--sd-header__shadow-height,.25rem);--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops));--tw-gradient-from:color-mix(in oklab, var(--color-black, #000) 40%, transparent);--tw-gradient-to:color-mix(in oklab, var(--color-black, #000) var(--sd-opacity-0, 0%), transparent);--tw-gradient-stops:var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));--tw-content:'';content:var(--tw-content)}[part=main]{width:var(--sd-header-inner-width);max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px)}:host([shadow]) header::before{position:absolute;bottom:0;left:0;display:block;width:100%;--tw-content:'';content:var(--tw-content);background-color:rgb(var(--sd-header__underline-color-background));height:var(--sd-header__underline-height,var(--sd-spacing-2))}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`],t([a({reflect:!0,type:Boolean})],e.prototype,"fixed",2),t([a({reflect:!0,type:Boolean})],e.prototype,"shadow",2),t([d("header")],e.prototype,"header",2),t([l(100)],e.prototype,"updateCalculatedHeight",1),e=t([n("sd-7-0-3-header")],e);export{e as a};
@@ -1,5 +1,5 @@
1
- import{a as k}from"./chunk.CGQ2BPPZ.js";import{a as m,c as f}from"./chunk.B2NUKX6G.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as x}from"./chunk.MEDJPDBB.js";import{a as l}from"./chunk.4ZZFYCXX.js";import{a as h}from"./chunk.NYKJXI3Q.js";import{a as b,b as o,d as n,h as c}from"./chunk.J45556RK.js";import{b as v,e as a}from"./chunk.OBAEIKIV.js";import{b as p,c as d,e as u}from"./chunk.W4QBFD6E.js";import{e as i}from"./chunk.6EV4YU6C.js";var e=class extends c{constructor(){super(...arguments);this.localize=new x(this);this.hasSlotController=new k(this,"[default]","content");this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.closeTrigger="click focus escape";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.handleDocumentClick=this.handleDocumentClick.bind(this),document.addEventListener("click",this.handleDocumentClick),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction),document.removeEventListener("click",this.handleDocumentClick)}get hasCustomTrigger(){return this.hasSlotController.test("[default]")}formatDefaultSlot(t){if(!t)return;t.assignedNodes({flatten:!0}).forEach(r=>{var y,g;r.nodeType===Node.TEXT_NODE&&!((y=r==null?void 0:r.textContent)!=null&&y.trim())&&((g=r==null?void 0:r.parentNode)==null||g.removeChild(r))})}handleBlur(){this.hasCloseTrigger("focus")&&this.hide()}handleClick(){this.open&&this.hasCloseTrigger("click")?this.hide():this.hasTrigger("click")&&this.show()}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(t){this.open&&t.key==="Escape"&&this.hasCloseTrigger("escape")&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let t=d(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}}handleMouseOut(){if(this.hasCloseTrigger("hover")){let t=d(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),t)}}handleDocumentClick(t){if(!this.open||this.interactionType==="keyboard")return;let s=t.composedPath();this.hasCloseTrigger("focus")&&!s.includes(this)&&!s.includes(this.popup)&&this.hide()}hasTrigger(t){return this.trigger.split(" ").includes(t)}hasCloseTrigger(t){return this.closeTrigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await u(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:t,options:s}=f(this,"tooltip.show",{dir:this.localize.dir()});await p(this.popup.popup,t,s),this.emit("sd-after-show")}else{this.emit("sd-hide"),await u(this.body);let{keyframes:t,options:s}=f(this,"tooltip.hide",{dir:this.localize.dir()});await p(this.popup.popup,t,s),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,w(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),w(this,"sd-after-hide")}render(){let t=this.placement.endsWith("-start"),s=this.placement.endsWith("-end");return a`<sd-7-0-1-popup part="base" exportparts="
1
+ import{a as k}from"./chunk.CGQ2BPPZ.js";import{a as m,c as f}from"./chunk.B2NUKX6G.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as x}from"./chunk.MEDJPDBB.js";import{a as l}from"./chunk.4ZZFYCXX.js";import{a as h}from"./chunk.NYKJXI3Q.js";import{a as b,b as o,d as n,h as c}from"./chunk.J45556RK.js";import{b as v,e as a}from"./chunk.OBAEIKIV.js";import{b as p,c as d,e as u}from"./chunk.W4QBFD6E.js";import{e as i}from"./chunk.6EV4YU6C.js";var e=class extends c{constructor(){super(...arguments);this.localize=new x(this);this.hasSlotController=new k(this,"[default]","content");this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.closeTrigger="click focus escape";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.handleDocumentClick=this.handleDocumentClick.bind(this),document.addEventListener("click",this.handleDocumentClick),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction),document.removeEventListener("click",this.handleDocumentClick)}get hasCustomTrigger(){return this.hasSlotController.test("[default]")}formatDefaultSlot(t){if(!t)return;t.assignedNodes({flatten:!0}).forEach(r=>{var y,g;r.nodeType===Node.TEXT_NODE&&!((y=r==null?void 0:r.textContent)!=null&&y.trim())&&((g=r==null?void 0:r.parentNode)==null||g.removeChild(r))})}handleBlur(){this.hasCloseTrigger("focus")&&this.hide()}handleClick(){this.open&&this.hasCloseTrigger("click")?this.hide():this.hasTrigger("click")&&this.show()}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(t){this.open&&t.key==="Escape"&&this.hasCloseTrigger("escape")&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let t=d(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}}handleMouseOut(){if(this.hasCloseTrigger("hover")){let t=d(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),t)}}handleDocumentClick(t){if(!this.open||this.interactionType==="keyboard")return;let s=t.composedPath();this.hasCloseTrigger("focus")&&!s.includes(this)&&!s.includes(this.popup)&&this.hide()}hasTrigger(t){return this.trigger.split(" ").includes(t)}hasCloseTrigger(t){return this.closeTrigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await u(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:t,options:s}=f(this,"tooltip.show",{dir:this.localize.dir()});await p(this.popup.popup,t,s),this.emit("sd-after-show")}else{this.emit("sd-hide"),await u(this.body);let{keyframes:t,options:s}=f(this,"tooltip.hide",{dir:this.localize.dir()});await p(this.popup.popup,t,s),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,w(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),w(this,"sd-after-hide")}render(){let t=this.placement.endsWith("-start"),s=this.placement.endsWith("-end");return a`<sd-7-0-3-popup part="base" exportparts="
2
2
  popup:base__popup,
3
3
  arrow:base__arrow
4
- " class="${l(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[t?"start":s?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger?a`<slot slot="anchor"></slot>`:a`<button slot="anchor" aria-describedby="tooltip" class="${l("flex sd-interactive rounded-full",this.size==="lg"?"text-xl":"text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-7-0-1-icon library="_internal" name="info-circle" label="Tooltip" class="${l(this.disabled&&"sd-interactive--disabled")}"></sd-7-0-1-icon></button>`}<slot name="content" part="body" id="tooltip" class="sd-7-0-1-tooltip-color-background sd-7-0-1-tooltip-color-text py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-7-0-1-popup>`}};e.styles=[...c.styles,v`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
5
- :host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-7-0-1-popup{--arrow-color:rgba(var(--sd-tooltip-color-background));--arrow-size:10px}sd-7-0-1-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgba(81, 81, 81, 0.75));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}sd-7-0-1-popup::part(arrow){--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgba(81, 81, 81, 0.75));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}sd-7-0-1-popup[placement^=top]::part(popup){transform-origin:bottom}sd-7-0-1-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){overflow:auto;max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}`],i([n("slot:not([name])")],e.prototype,"defaultSlot",2),i([n("#tooltip")],e.prototype,"body",2),i([n("sd-7-0-1-popup")],e.prototype,"popup",2),i([o({type:String,reflect:!0})],e.prototype,"size",2),i([o({type:String,reflect:!0})],e.prototype,"content",2),i([o({type:String,reflect:!0})],e.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],e.prototype,"disabled",2),i([o({type:Boolean,reflect:!0})],e.prototype,"open",2),i([o({type:String,reflect:!0})],e.prototype,"trigger",2),i([o({type:String,attribute:"close-trigger",reflect:!0})],e.prototype,"closeTrigger",2),i([o({type:Boolean,reflect:!0})],e.prototype,"hoist",2),i([h("open",{waitUntilFirstUpdate:!0})],e.prototype,"handleOpenChange",1),i([h(["content","hoist","placement"])],e.prototype,"handleOptionsChange",1),i([h("disabled")],e.prototype,"handleDisabledChange",1),e=i([b("sd-7-0-1-tooltip")],e);m("tooltip.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});m("tooltip.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{e as a};
4
+ " class="${l(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[t?"start":s?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger?a`<slot slot="anchor"></slot>`:a`<button slot="anchor" aria-describedby="tooltip" class="${l("flex sd-interactive rounded-full",this.size==="lg"?"text-xl":"text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-7-0-3-icon library="_internal" name="info-circle" label="Tooltip" class="${l(this.disabled&&"sd-interactive--disabled")}"></sd-7-0-3-icon></button>`}<slot name="content" part="body" id="tooltip" class="sd-7-0-3-tooltip-color-background sd-7-0-3-tooltip-color-text py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-7-0-3-popup>`}};e.styles=[...c.styles,v`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
5
+ :host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-7-0-3-popup{--arrow-color:rgba(var(--sd-tooltip-color-background));--arrow-size:10px}sd-7-0-3-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgba(81, 81, 81, 0.75));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}sd-7-0-3-popup::part(arrow){--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgba(81, 81, 81, 0.75));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}sd-7-0-3-popup[placement^=top]::part(popup){transform-origin:bottom}sd-7-0-3-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){overflow:auto;max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}`],i([n("slot:not([name])")],e.prototype,"defaultSlot",2),i([n("#tooltip")],e.prototype,"body",2),i([n("sd-7-0-3-popup")],e.prototype,"popup",2),i([o({type:String,reflect:!0})],e.prototype,"size",2),i([o({type:String,reflect:!0})],e.prototype,"content",2),i([o({type:String,reflect:!0})],e.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],e.prototype,"disabled",2),i([o({type:Boolean,reflect:!0})],e.prototype,"open",2),i([o({type:String,reflect:!0})],e.prototype,"trigger",2),i([o({type:String,attribute:"close-trigger",reflect:!0})],e.prototype,"closeTrigger",2),i([o({type:Boolean,reflect:!0})],e.prototype,"hoist",2),i([h("open",{waitUntilFirstUpdate:!0})],e.prototype,"handleOpenChange",1),i([h(["content","hoist","placement"])],e.prototype,"handleOptionsChange",1),i([h("disabled")],e.prototype,"handleDisabledChange",1),e=i([b("sd-7-0-3-tooltip")],e);m("tooltip.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});m("tooltip.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{e as a};
@@ -1,4 +1,4 @@
1
- import{a as f}from"./chunk.ICEC5PGK.js";import{b as c}from"./chunk.QQD62QOV.js";import{e as l,i as u}from"./chunk.OBAEIKIV.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.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.G!==void 0)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-7-0-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-7-0-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-7-0-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-7-0-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-7-0-1-popup>`:l`<slot name="submenu" hidden></slot>`}};export{g as a};
1
+ import{a as f}from"./chunk.ICEC5PGK.js";import{b as c}from"./chunk.QQD62QOV.js";import{e as l,i as u}from"./chunk.OBAEIKIV.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.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.G!==void 0)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-7-0-3-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-7-0-3-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-7-0-3-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-7-0-3-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-7-0-3-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,2 +1,2 @@
1
- import{a as v}from"./chunk.TWZDCIM2.js";import{b as y}from"./chunk.W5O4FM6B.js";import{a as p,b as u,c as a}from"./chunk.552X4W43.js";import{a as n}from"./chunk.NYKJXI3Q.js";import{a as b,b as s,c as f,h as c}from"./chunk.J45556RK.js";import{b as g,e as d}from"./chunk.OBAEIKIV.js";import{e as r}from"./chunk.6EV4YU6C.js";var h,t=class extends c{constructor(){super(...arguments);this.svg="";this.label="";this.library="default";this.color="currentColor"}connectedCallback(){super.connectedCallback(),p(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),u(this)}onThemeChange(){this.setIcon()}getUrl(){let e=a(this.library);return this.name&&e?e.name==="_internal"||e.name==="sd-multi-theming"?e.resolver(this.name,this):e.resolver(this.name):this.src}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var m;let e=a(this.library),i=this.getUrl();if(h||(h=new DOMParser),i)try{let o=await v(i);if(i===this.getUrl())if(o.ok){let l=h.parseFromString(o.svg,"text/html").body.querySelector("svg");l!==null?((m=e==null?void 0:e.mutator)==null||m.call(e,l),this.svg=l.outerHTML,this.emit("sd-load")):(this.svg="",this.emit("sd-error"))}else this.svg="",this.emit("sd-error")}catch(o){this.emit("sd-error")}else this.svg.length>0&&(this.svg="")}render(){return d`<sd-7-0-1-theme-listener></sd-7-0-1-theme-listener>${y(this.svg)}`}};t.styles=[...c.styles,g`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{width:1em;height:1em;box-sizing:content-box!important;display:inline-block}svg{display:block;height:100%;width:100%}:host([color=primary]) svg{color:rgba(var(--sd-color-icon-fill-primary,var(--sd-color-primary)))}:host([name^='content/'][color=primary]) svg{color:rgba(var(--sd-color-icon-fill-content-icons-primary,var(--sd-color-primary)))}:host([color=white]) svg{color:rgba(var(--sd-color-text-white,255 255 255))}`],r([f()],t.prototype,"svg",2),r([s({reflect:!0})],t.prototype,"name",2),r([s()],t.prototype,"src",2),r([s()],t.prototype,"label",2),r([s({reflect:!0})],t.prototype,"library",2),r([s({reflect:!0})],t.prototype,"color",2),r([n("label")],t.prototype,"handleLabelChange",1),r([n(["name","src","library"])],t.prototype,"setIcon",1),t=r([b("sd-7-0-1-icon")],t);export{t as a};
1
+ import{a as v}from"./chunk.TWZDCIM2.js";import{b as y}from"./chunk.W5O4FM6B.js";import{a as p,b as u,c as a}from"./chunk.552X4W43.js";import{a as n}from"./chunk.NYKJXI3Q.js";import{a as b,b as s,c as f,h as c}from"./chunk.J45556RK.js";import{b as g,e as d}from"./chunk.OBAEIKIV.js";import{e as r}from"./chunk.6EV4YU6C.js";var h,t=class extends c{constructor(){super(...arguments);this.svg="";this.label="";this.library="default";this.color="currentColor"}connectedCallback(){super.connectedCallback(),p(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),u(this)}onThemeChange(){this.setIcon()}getUrl(){let e=a(this.library);return this.name&&e?e.name==="_internal"||e.name==="sd-multi-theming"?e.resolver(this.name,this):e.resolver(this.name):this.src}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var m;let e=a(this.library),i=this.getUrl();if(h||(h=new DOMParser),i)try{let o=await v(i);if(i===this.getUrl())if(o.ok){let l=h.parseFromString(o.svg,"text/html").body.querySelector("svg");l!==null?((m=e==null?void 0:e.mutator)==null||m.call(e,l),this.svg=l.outerHTML,this.emit("sd-load")):(this.svg="",this.emit("sd-error"))}else this.svg="",this.emit("sd-error")}catch(o){this.emit("sd-error")}else this.svg.length>0&&(this.svg="")}render(){return d`<sd-7-0-3-theme-listener></sd-7-0-3-theme-listener>${y(this.svg)}`}};t.styles=[...c.styles,g`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{width:1em;height:1em;box-sizing:content-box!important;display:inline-block}svg{display:block;height:100%;width:100%}:host([color=primary]) svg{color:rgba(var(--sd-color-icon-fill-primary,var(--sd-color-primary)))}:host([name^='content/'][color=primary]) svg{color:rgba(var(--sd-color-icon-fill-content-icons-primary,var(--sd-color-primary)))}:host([color=white]) svg{color:rgba(var(--sd-color-text-white,255 255 255))}`],r([f()],t.prototype,"svg",2),r([s({reflect:!0})],t.prototype,"name",2),r([s()],t.prototype,"src",2),r([s()],t.prototype,"label",2),r([s({reflect:!0})],t.prototype,"library",2),r([s({reflect:!0})],t.prototype,"color",2),r([n("label")],t.prototype,"handleLabelChange",1),r([n(["name","src","library"])],t.prototype,"setIcon",1),t=r([b("sd-7-0-3-icon")],t);export{t as a};
@@ -10,4 +10,4 @@ import{a as M,h as V}from"./chunk.J45556RK.js";import{b as j}from"./chunk.OBAEIK
10
10
  color: transparent;
11
11
  }
12
12
  `),i.shadowRoot.adoptedStyleSheets.push(e);let s=e.cssRules[0].style;s.setProperty("--style-observer-adopted-style-sheet-bug","1");let r=getComputedStyle(i),t=r.getPropertyValue("--style-observer-adopted-style-sheet-bug");s.removeProperty("--style-observer-adopted-style-sheet-bug"),r=getComputedStyle(i);let n=r.getPropertyValue("--style-observer-adopted-style-sheet-bug");return i.remove(),t===n}});var E=class extends WeakMap{has(e,s){if(arguments.length===1)return super.has(e);let r=super.get(e);return(r==null?void 0:r.has(s))||!1}add(e,s){var t;let r=(t=super.get(e))!=null?t:new Set;r.add(s),super.set(e,r)}delete(e,...s){let r=super.get(e);if(r){for(let t of s)r.delete(t);r.size===0&&super.delete(e)}}};function f(i){return i==null?[]:Array.isArray(i)?i:typeof i!="string"&&typeof i[Symbol.iterator]=="function"?Array.from(i):[i]}function H(i){return i?new Promise(e=>setTimeout(e,i)):new Promise(e=>requestAnimationFrame(e))}var N;function Q(i){N!=null||(N=document.createElement("div"));let e=N.style;e[i]="inherit";let s=[...e];return s.length===0&&(s=[i]),e.cssText="",s}function X(i){let e=i.matchAll(/(?:^|\s)([+-]?(?:\d+|\d*\.\d+))\s*(ms|s)?(?=\s|$)/g),s=[];for(let r of e){let[,t,n]=r;t=parseFloat(t),n==="s"&&(t*=1e3),s.push(t)}return s}function W(i,e){e=Z(e);let s;if(i==="all")s=/\b\w+\b/g;else{let m=[...new Set([...Q(i),i,"all"])];s=RegExp(`(?:^|\\s)(${m.join("|")})\\b`)}let r=e.findLast(m=>s.test(m)),t=r?X(r):[0,0];t.length===0?t=[0,0]:t.length===1&&t.push(0);let[n,o]=t;return{duration:n,delay:o}}function Z(i){let e=[],s=0,r=[];for(let t of i.matchAll(/[,()]/g)){let n=t[0];if(n===","){if(r.length===0){let o=i.slice(s,t.index);e.push(o.trim()),s=t.index+1}}else n==="("?r.push("("):n===")"&&r.pop()}if(s<i.length){let t=i.slice(s);e.push(t.trim())}return e}var y,T,P=class{constructor(e){d(this,y,new Set);d(this,T,new WeakMap);this.callback=e}observe(e){if(l(this,y).has(e))return;let s=e.ownerDocument,r=l(this,T).get(s);r||(r=new IntersectionObserver(t=>{this.callback(t.map(({target:n})=>({target:n})))},{root:s.documentElement}),l(this,T).set(s,r)),l(this,y).add(e),r.observe(e)}unobserve(e){if(!e){for(let t of l(this,y))this.unobserve(t);return}let s=e.ownerDocument,r=l(this,T).get(s);r==null||r.unobserve(e),l(this,y).delete(e)}};y=new WeakMap,T=new WeakMap;var R,q,ee=(q=(R=globalThis.CSS)==null?void 0:R.supports)!=null&&q.call(R,"transition-behavior","allow-discrete")?" allow-discrete":"";globalThis.document&&(S("--style-observer-transition",{inherits:!1}),a.detectAll());var x,_,G,O,c=class{constructor(e,s,r={}){d(this,_);h(this,"properties");h(this,"target");h(this,"callback");h(this,"options");d(this,x,!1);d(this,O);h(this,"_shadowSheet");h(this,"_styles",{});this.constructor.all.add(e,this),this.properties=new Map,this.target=e,this.callback=s,this.options=I({properties:[]},r);let t=f(r.properties);this.renderedObserver=new P(n=>{this.propertyNames.length>0&&this.handleEvent()}),t.length>0&&this.observe(t)}get propertyNames(){return[...this.properties.keys()]}resolveOptions(e){return Object.assign(k(e),this.options)}async handleEvent(e){if(e&&!this.properties.has(e.propertyName))return;if(a.TRANSITIONRUN_EVENT_LOOP&&(e==null?void 0:e.type)==="transitionrun"||this.options.throttle>0){let t=a.TRANSITIONRUN_EVENT_LOOP?"transitionrun":"transitionstart",n=Math.max(this.options.throttle,50);if(a.TRANSITIONRUN_EVENT_LOOP){let o=W(e.propertyName,getComputedStyle(this.target).transition);n=Math.max(n,o.duration+o.delay+16)}this.target.removeEventListener(t,this),await H(n),this.target.addEventListener(t,this)}let s=getComputedStyle(this.target),r=[];for(let t of this.propertyNames){let n=s.getPropertyValue(t),o=this.properties.get(t);n!==o&&(r.push({target:this.target,property:t,value:n,oldValue:o}),this.properties.set(t,n))}r.length>0&&this.callback(r)}observe(e){var r;if(e=f(e),e=e.filter(t=>!this.properties.has(t)),e.length===0)return;$(this,_,G).call(this);let s=getComputedStyle(this.target);for(let t of e){a.UNREGISTERED_TRANSITION&&!this.constructor.properties.has(t)&&(S(t,void 0,this.target.ownerDocument),this.constructor.properties.add(t));let n=s.getPropertyValue(t);this.properties.set(t,n)}a.TRANSITIONRUN_EVENT_LOOP&&(this.target.addEventListener("transitionrun",this),(r=a.all.TRANSITIONRUN_EVENT_LOOP.valuePending)==null||r.then(t=>{t||this.target.removeEventListener("transitionrun",this)})),this.target.addEventListener("transitionstart",this),this.target.addEventListener("transitionend",this),this.updateTransitionProperties(),this.renderedObserver.observe(this.target)}updateTransitionProperties(){this.setProperty("--style-observer-transition","");let e=new Set(getComputedStyle(this.target).transitionProperty.split(", ")),s=[];for(let t of this.constructor.all.get(this.target))s.push(...t.propertyNames);s=[...new Set(s)];let r=s.filter(t=>!e.has(t)).map(t=>`${t} 1ms step-start${ee}`).join(", ");this.setProperty("--style-observer-transition",r)}updateTransition({firstTime:e}={}){let s="var(--style-observer-transition, --style-observer-noop)",r=this.getProperty("transition"),t;(e?r:!r.includes(s))&&(t=g(this,O,r)),t===void 0&&(e||!l(this,O))&&(r.includes(s)&&this.setProperty("transition",""),t=getComputedStyle(this.target).transition),t==="all"?t="":t=t.replace(/^none\b/,"");let n=t?t+", ":"";this.setProperty("transition",n+s),this.updateTransitionProperties()}get _isHost(){return this.target.shadowRoot&&!a.ADOPTED_STYLE_SHEET&&!Object.isFrozen(this.target.shadowRoot.adoptedStyleSheets)}setProperty(e,s,r){let t=this.target.style,n=t;if(this._isHost){if(!this._shadowSheet&&(this._shadowSheet=new CSSStyleSheet,this._shadowSheet.insertRule(":host { }"),this.target.shadowRoot.adoptedStyleSheets.push(this._shadowSheet),Object.keys(this._styles).length>0))for(let o in this._styles){let m=this._styles[o];this.setProperty(o,m),t.getPropertyValue(o)===m&&t.removeProperty(o)}n=this._shadowSheet.cssRules[0].style}n.setProperty(e,s,r),this._styles[e]=this.getProperty(e)}getProperty(e){var r,t,n;return((n=(t=(r=this._shadowSheet)==null?void 0:r.cssRules[0])==null?void 0:t.style)!=null?n:this.target.style).getPropertyValue(e)}unobserve(e){e=f(e),e=e.filter(s=>this.properties.has(s));for(let s of e)this.properties.delete(s);this.properties.size===0&&(this.target.removeEventListener("transitionrun",this),this.target.removeEventListener("transitionstart",this),this.target.removeEventListener("transitionend",this),this.renderedObserver.unobserve(this.target)),this.updateTransitionProperties()}};x=new WeakMap,_=new WeakSet,G=function(){if(l(this,x))return;let e=this.constructor.all.get(this.target).size===1;this.updateTransition({firstTime:e}),g(this,x,!0)},O=new WeakMap,h(c,"properties",new Set),h(c,"all",new E);function k(i){return i?(typeof i=="string"||Array.isArray(i)?i={properties:f(i)}:typeof i=="object"&&(i=I({properties:[]},i)),i):{}}var b=class{constructor(e,s){h(this,"elementObservers",new WeakMap);var r;this.callback=e,s=k(s),(r=s.targets)!=null||(s.targets=[]),s.target&&s.targets.push(s.target),this.options=s,this.options.targets.length>0&&this.options.properties.length>0&&this.observe(this.options.targets,this.options.properties)}changed(e){this.callback(e)}observe(...e){let{targets:s,properties:r}=Y(...e);if(s.length===0&&(s=this.options.targets),s.length!==0)for(let t of s){let n=this.elementObservers.get(t);n||(n=new c(t,o=>this.changed(o),this.options),this.elementObservers.set(t,n)),n.observe(r)}}unobserve(...e){let{targets:s,properties:r}=Y(...e);if(s.length===0&&(s=this.options.targets),s.length!==0){r.length===0&&(r=this.options.properties);for(let t of s){let n=this.elementObservers.get(t);n&&n.unobserve(r)}}}updateTransition(e){for(let s of f(e)){let r=this.elementObservers.get(s);r&&r.updateTransition()}}};function Y(i,e){let s=[...f(i),...f(e)];i=[],e=[];for(let r of s)(typeof r=="string"||r instanceof String?e:i).push(r);return{targets:i,properties:e}}var A=class{constructor(e,s){this.host=e,this.callback=s}connect(){this.observer=new b(e=>{var r,t;let s=(t=(r=e==null?void 0:e[0])==null?void 0:r.value)==null?void 0:t.replaceAll("'","");s&&this.callback(s)}),this.observer.observe(this.host,"--sd-theme")}disconnect(){var e;(e=this.observer)==null||e.unobserve(this.host)}};var w=class extends V{handleThemeChange(e){this.emit("sd-theme-change",{detail:{theme:e},bubbles:!0})}connectedCallback(){super.connectedCallback(),this.themeObserver=new A(this,this.handleThemeChange.bind(this)),this.themeObserver.connect()}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.themeObserver)==null||e.disconnect()}};w.styles=[...V.styles,j`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
13
- :host{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}`],w=D([M("sd-7-0-1-theme-listener")],w);export{w as a};
13
+ :host{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}`],w=D([M("sd-7-0-3-theme-listener")],w);export{w as a};
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.4ZZFYCXX.js";import{a as h,b as a,c as d,d as c,h as s}from"./chunk.J45556RK.js";import{b as l,e as n}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends s{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.reversedLayout=!1;this.hasSlotController=new m(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),this.breakpoint===0?this._orientation="horizontal":this.breakpoint===9999?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.updateOrientation()),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(i){super.updated(i),i.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){let i=this.variant==="white border-neutral-400"||this.inset,o={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline")};return n`<div class="${r("flex sd-7-0-1-teaser-border-radius",{white:"bg-white","white border-neutral-400":"bg-white border sd-7-0-1-teaser--neutral-400-color-border","neutral-100":"sd-7-0-1-teaser--neutral-100-color-background",primary:"bg-primary text-white","primary-100":"sd-7-0-1-teaser--primary-100-color-background"}[this.variant],this._orientation==="vertical"&&"flex-col",this._orientation==="horizontal"&&"flex-row gap-8",this._orientation==="horizontal"&&i&&"py-8 px-10")}" part="base"><div style="${this._orientation==="horizontal"?`width: var(--distribution-content, 100%); ${i?"width: var(--distribution-content, calc(100% - 2rem));":""}`:""}" class="${r("flex flex-col text-left order-2",this._orientation==="horizontal"&&"flex flex-col",this._orientation==="vertical"&&i&&"m-4")}" part="content"><div class="flex flex-col-reverse"><div part="headline" class="${r("text-lg font-bold m-0",this.variant==="primary"?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. &lt;h2>)</slot></div><div part="meta" class="${r("gap-2 mb-4",!o["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${r(!o["teaser-has-default"]&&"hidden")}" role="group" aria-labelledby="headline"><slot></slot></div></div><div part="media" id="media" style="${this._orientation==="horizontal"?"width: var(--distribution-media, 100%);":""}" class="${r("order-1",!i&&this._orientation==="vertical"&&"mb-4",!o["teaser-has-media"]&&"hidden",this.variant==="white border-neutral-400"&&this._orientation==="vertical"&&"mx-[-1px] mt-[-1px]",this._orientation!=="vertical"&&this.reversedLayout&&"order-2")}"><slot name="media"></slot></div></div>`}};t.styles=[...s.styles,l`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
- :host{display:block}::slotted(*){margin:0}::slotted([slot=headline]){margin:0;font-size:var(--sd-text-lg,1.25rem);line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75 / 1.125)));--tw-leading:var(--leading-normal, 1.5);line-height:var(--leading-normal,1.5);--tw-font-weight:var(--sd-font-weight-bold, 600);font-weight:var(--sd-font-weight-bold,600)}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({reflect:!0,type:Number})],t.prototype,"breakpoint",2),e([a({type:Boolean,reflect:!0})],t.prototype,"inset",2),e([a({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),e([c('[part="base"]')],t.prototype,"teaser",2),e([d()],t.prototype,"_orientation",2),t=e([h("sd-7-0-1-teaser")],t);export{t as a};
1
+ import{a as m}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.4ZZFYCXX.js";import{a as h,b as a,c as d,d as c,h as s}from"./chunk.J45556RK.js";import{b as l,e as n}from"./chunk.OBAEIKIV.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends s{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.reversedLayout=!1;this.hasSlotController=new m(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),this.breakpoint===0?this._orientation="horizontal":this.breakpoint===9999?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.updateOrientation()),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(i){super.updated(i),i.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){let i=this.variant==="white border-neutral-400"||this.inset,o={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline")};return n`<div class="${r("flex sd-7-0-3-teaser-border-radius",{white:"bg-white","white border-neutral-400":"bg-white border sd-7-0-3-teaser--neutral-400-color-border","neutral-100":"sd-7-0-3-teaser--neutral-100-color-background",primary:"bg-primary text-white","primary-100":"sd-7-0-3-teaser--primary-100-color-background"}[this.variant],this._orientation==="vertical"&&"flex-col",this._orientation==="horizontal"&&"flex-row gap-8",this._orientation==="horizontal"&&i&&"py-8 px-10")}" part="base"><div style="${this._orientation==="horizontal"?`width: var(--distribution-content, 100%); ${i?"width: var(--distribution-content, calc(100% - 2rem));":""}`:""}" class="${r("flex flex-col text-left order-2",this._orientation==="horizontal"&&"flex flex-col",this._orientation==="vertical"&&i&&"m-4")}" part="content"><div class="flex flex-col-reverse"><div part="headline" class="${r("text-lg font-bold m-0",this.variant==="primary"?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. &lt;h2>)</slot></div><div part="meta" class="${r("gap-2 mb-4",!o["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${r(!o["teaser-has-default"]&&"hidden")}" role="group" aria-labelledby="headline"><slot></slot></div></div><div part="media" id="media" style="${this._orientation==="horizontal"?"width: var(--distribution-media, 100%);":""}" class="${r("order-1",!i&&this._orientation==="vertical"&&"mb-4",!o["teaser-has-media"]&&"hidden",this.variant==="white border-neutral-400"&&this._orientation==="vertical"&&"mx-[-1px] mt-[-1px]",this._orientation!=="vertical"&&this.reversedLayout&&"order-2")}"><slot name="media"></slot></div></div>`}};t.styles=[...s.styles,l`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
+ :host{display:block}::slotted(*){margin:0}::slotted([slot=headline]){margin:0;font-size:var(--sd-text-lg,1.25rem);line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75 / 1.125)));--tw-leading:var(--leading-normal, 1.5);line-height:var(--leading-normal,1.5);--tw-font-weight:var(--sd-font-weight-bold, 600);font-weight:var(--sd-font-weight-bold,600)}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({reflect:!0,type:Number})],t.prototype,"breakpoint",2),e([a({type:Boolean,reflect:!0})],t.prototype,"inset",2),e([a({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),e([c('[part="base"]')],t.prototype,"teaser",2),e([d()],t.prototype,"_orientation",2),t=e([h("sd-7-0-3-teaser")],t);export{t as a};