@solid-design-system/components 5.16.2 → 5.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (629) hide show
  1. package/cdn/chunks/{chunk.5QETSQFJ.js → chunk.23JJBCLW.js} +1 -1
  2. package/cdn/chunks/{chunk.BDPK77SL.js → chunk.2D3B6W4C.js} +1 -1
  3. package/cdn/chunks/{chunk.6KIASTDN.js → chunk.2RPN4LHN.js} +1 -1
  4. package/cdn/chunks/{chunk.3ZSLSQT3.js → chunk.2YMJV2KL.js} +1 -1
  5. package/cdn/chunks/{chunk.Y4YRXSRB.js → chunk.37O5FAM6.js} +1 -1
  6. package/cdn/chunks/{chunk.YJ2L67GK.js → chunk.3PTWVC7K.js} +1 -1
  7. package/cdn/chunks/{chunk.SB7VJNMQ.js → chunk.4HEDUSC5.js} +1 -1
  8. package/cdn/chunks/{chunk.W4Y456DP.js → chunk.4THKQ4PC.js} +1 -1
  9. package/cdn/chunks/{chunk.NOZRJQX2.js → chunk.4USO2EJG.js} +1 -1
  10. package/cdn/chunks/{chunk.WMLPJIUB.js → chunk.5GPPZUNF.js} +1 -1
  11. package/cdn/chunks/{chunk.AZMH6NZR.js → chunk.6QNQMWSQ.js} +1 -1
  12. package/cdn/chunks/{chunk.P7DGMSNP.js → chunk.6XOV6LQS.js} +1 -1
  13. package/cdn/chunks/{chunk.OLX6LCKD.js → chunk.72JQHJ3G.js} +1 -1
  14. package/cdn/chunks/{chunk.3SQYUPQR.js → chunk.75UMJKQC.js} +1 -1
  15. package/cdn/chunks/{chunk.QP5624EY.js → chunk.7FMD6ZWC.js} +1 -1
  16. package/cdn/chunks/{chunk.SKIYV7KD.js → chunk.7NHEEBDB.js} +1 -1
  17. package/cdn/chunks/{chunk.W32I6F46.js → chunk.7SJXKLVN.js} +1 -1
  18. package/cdn/chunks/{chunk.DLQQ7NIM.js → chunk.ADTHFKFC.js} +1 -1
  19. package/cdn/chunks/{chunk.WAAEZAT7.js → chunk.AKJ7U3Y3.js} +1 -1
  20. package/cdn/chunks/{chunk.KBESD73V.js → chunk.BV42CEWL.js} +1 -1
  21. package/cdn/chunks/chunk.CARQ25VA.js +1 -0
  22. package/cdn/chunks/{chunk.CBQDWY5Y.js → chunk.CTOV3B4T.js} +1 -1
  23. package/cdn/chunks/{chunk.KKT3D6C3.js → chunk.EIGW4PKE.js} +1 -1
  24. package/cdn/chunks/{chunk.UKCW2W2D.js → chunk.EIRHQEOO.js} +1 -1
  25. package/cdn/chunks/{chunk.B7YAWCJP.js → chunk.FYOUHXBZ.js} +1 -1
  26. package/cdn/chunks/{chunk.3FCZSYJE.js → chunk.H3W4J4F4.js} +1 -1
  27. package/cdn/chunks/{chunk.TOLB3HGS.js → chunk.H7I6O5HE.js} +1 -1
  28. package/cdn/chunks/{chunk.5UL2MFVQ.js → chunk.HXUQZXCZ.js} +1 -1
  29. package/cdn/chunks/{chunk.DAPRKASR.js → chunk.KVJJEMOI.js} +1 -1
  30. package/cdn/chunks/{chunk.6WJYMU5I.js → chunk.LLJ2OCGM.js} +1 -1
  31. package/cdn/chunks/chunk.M6XINJ52.js +25 -0
  32. package/cdn/chunks/{chunk.7LYAXCBH.js → chunk.MGCXOSRH.js} +1 -1
  33. package/cdn/chunks/{chunk.DTEAN466.js → chunk.MMM4IMJD.js} +1 -1
  34. package/cdn/chunks/{chunk.CRGRHGIA.js → chunk.N4RSYGAV.js} +1 -1
  35. package/cdn/chunks/{chunk.LFJ4IYGZ.js → chunk.NTP4LLF3.js} +1 -1
  36. package/cdn/chunks/{chunk.6AL2V3GA.js → chunk.OCIA2UJP.js} +1 -1
  37. package/cdn/chunks/{chunk.6O24TPWT.js → chunk.OIOXSZHI.js} +1 -1
  38. package/cdn/chunks/{chunk.NYJKF5NP.js → chunk.OPMX2Q3A.js} +1 -1
  39. package/cdn/chunks/{chunk.CN5K7RGY.js → chunk.OQSPWMNR.js} +1 -1
  40. package/cdn/chunks/{chunk.LZBHL4IV.js → chunk.PCAKJGIV.js} +1 -1
  41. package/cdn/chunks/{chunk.THIUBNOW.js → chunk.PIAYQI7K.js} +1 -1
  42. package/cdn/chunks/{chunk.F7X5747H.js → chunk.QJAN6R4E.js} +1 -1
  43. package/cdn/chunks/{chunk.R7A64SR7.js → chunk.QJFZKBPG.js} +1 -1
  44. package/cdn/chunks/{chunk.ULAC7BZA.js → chunk.QJVPLDR4.js} +1 -1
  45. package/cdn/chunks/{chunk.7BYMJ4MT.js → chunk.RCMXIAQV.js} +1 -1
  46. package/cdn/chunks/{chunk.PKBVHWYN.js → chunk.RIOXBQBC.js} +1 -1
  47. package/cdn/chunks/{chunk.GCKYK2C3.js → chunk.ROIKKEJQ.js} +1 -1
  48. package/cdn/chunks/{chunk.QVATLNE5.js → chunk.SQ7OLI7Q.js} +1 -1
  49. package/cdn/chunks/{chunk.SAXLGODJ.js → chunk.TDRPE2QQ.js} +1 -1
  50. package/cdn/chunks/{chunk.BS3WSQN5.js → chunk.TFKNNQ5S.js} +1 -1
  51. package/cdn/chunks/{chunk.AGOSIHIV.js → chunk.TTG6Y6QJ.js} +1 -1
  52. package/cdn/chunks/{chunk.EXK3HKK5.js → chunk.W2JKI6K3.js} +1 -1
  53. package/cdn/chunks/{chunk.X53UBPCZ.js → chunk.XAIFQKHV.js} +1 -1
  54. package/cdn/chunks/{chunk.ZSXBZK7F.js → chunk.YMTUR575.js} +1 -1
  55. package/cdn/chunks/{chunk.QWAB34LZ.js → chunk.YVU7BES7.js} +1 -1
  56. package/cdn/chunks/{chunk.EOIYFHSR.js → chunk.Z4V7WPTW.js} +1 -1
  57. package/cdn/chunks/{chunk.5P7RNZVM.js → chunk.ZENM3WVO.js} +1 -1
  58. package/cdn/chunks/{chunk.XGIPT7I4.js → chunk.ZKBX734R.js} +1 -1
  59. package/cdn/chunks/{chunk.K7UH7J3V.js → chunk.ZZAPDP7V.js} +1 -1
  60. package/cdn/components/accordion/accordion.js +1 -1
  61. package/cdn/components/accordion-group/accordion-group.js +1 -1
  62. package/cdn/components/animation/animation.js +1 -1
  63. package/cdn/components/audio/audio.js +1 -1
  64. package/cdn/components/badge/badge.js +1 -1
  65. package/cdn/components/brandshape/brandshape.js +1 -1
  66. package/cdn/components/breadcrumb/breadcrumb.js +1 -1
  67. package/cdn/components/breadcrumb-item/breadcrumb-item.js +1 -1
  68. package/cdn/components/button/button.js +1 -1
  69. package/cdn/components/button-group/button-group.js +1 -1
  70. package/cdn/components/carousel/carousel.js +1 -1
  71. package/cdn/components/carousel-item/carousel-item.js +1 -1
  72. package/cdn/components/checkbox/checkbox.js +1 -1
  73. package/cdn/components/checkbox-group/checkbox-group.js +1 -1
  74. package/cdn/components/combobox/combobox.js +1 -1
  75. package/cdn/components/datepicker/datepicker.d.ts +3 -0
  76. package/cdn/components/datepicker/datepicker.js +1 -1
  77. package/cdn/components/dialog/dialog.js +1 -1
  78. package/cdn/components/divider/divider.js +1 -1
  79. package/cdn/components/drawer/drawer.js +1 -1
  80. package/cdn/components/dropdown/dropdown.js +1 -1
  81. package/cdn/components/expandable/expandable.js +1 -1
  82. package/cdn/components/flipcard/flipcard.js +1 -1
  83. package/cdn/components/header/header.js +1 -1
  84. package/cdn/components/icon/icon.js +1 -1
  85. package/cdn/components/include/include.js +1 -1
  86. package/cdn/components/input/input.js +1 -1
  87. package/cdn/components/link/link.js +1 -1
  88. package/cdn/components/loader/loader.js +1 -1
  89. package/cdn/components/map-marker/map-marker.js +1 -1
  90. package/cdn/components/menu/menu.js +1 -1
  91. package/cdn/components/menu-item/menu-item.js +1 -1
  92. package/cdn/components/navigation-item/navigation-item.js +1 -1
  93. package/cdn/components/notification/notification.js +1 -1
  94. package/cdn/components/optgroup/optgroup.js +1 -1
  95. package/cdn/components/option/option.js +1 -1
  96. package/cdn/components/popup/popup.js +1 -1
  97. package/cdn/components/quickfact/quickfact.js +1 -1
  98. package/cdn/components/radio/radio.js +1 -1
  99. package/cdn/components/radio-button/radio-button.js +1 -1
  100. package/cdn/components/radio-group/radio-group.js +1 -1
  101. package/cdn/components/range/range.js +1 -1
  102. package/cdn/components/range-tick/range-tick.js +1 -1
  103. package/cdn/components/scrollable/scrollable.js +1 -1
  104. package/cdn/components/select/select.js +1 -1
  105. package/cdn/components/skeleton/skeleton.d.ts +11 -0
  106. package/cdn/components/skeleton/skeleton.js +1 -0
  107. package/cdn/components/spinner/spinner.js +1 -1
  108. package/cdn/components/step/step.js +1 -1
  109. package/cdn/components/step-group/step-group.js +1 -1
  110. package/cdn/components/switch/switch.js +1 -1
  111. package/cdn/components/tab/tab.js +1 -1
  112. package/cdn/components/tab-group/tab-group.js +1 -1
  113. package/cdn/components/tab-panel/tab-panel.js +1 -1
  114. package/cdn/components/tag/tag.js +1 -1
  115. package/cdn/components/teaser/teaser.js +1 -1
  116. package/cdn/components/teaser-media/teaser-media.js +1 -1
  117. package/cdn/components/textarea/textarea.js +1 -1
  118. package/cdn/components/tooltip/tooltip.js +1 -1
  119. package/cdn/components/video/video.js +1 -1
  120. package/cdn/custom-elements.json +178 -1
  121. package/cdn/solid-components.bundle.js +17 -17
  122. package/cdn/solid-components.d.ts +1 -0
  123. package/cdn/solid-components.iife.js +17 -17
  124. package/cdn/solid-components.js +1 -1
  125. package/cdn/utilities/autocomplete-config.js +1 -1
  126. package/cdn/vscode.html-custom-data.json +27 -0
  127. package/cdn/web-types.json +53 -1
  128. package/cdn-versioned/chunks/{chunk.5QETSQFJ.js → chunk.23JJBCLW.js} +1 -1
  129. package/cdn-versioned/chunks/{chunk.BDPK77SL.js → chunk.2D3B6W4C.js} +1 -1
  130. package/cdn-versioned/chunks/{chunk.6KIASTDN.js → chunk.2RPN4LHN.js} +4 -4
  131. package/cdn-versioned/chunks/{chunk.3ZSLSQT3.js → chunk.2YMJV2KL.js} +1 -1
  132. package/cdn-versioned/chunks/{chunk.Y4YRXSRB.js → chunk.37O5FAM6.js} +1 -1
  133. package/cdn-versioned/chunks/{chunk.YJ2L67GK.js → chunk.3PTWVC7K.js} +2 -2
  134. package/cdn-versioned/chunks/{chunk.SB7VJNMQ.js → chunk.4HEDUSC5.js} +1 -1
  135. package/cdn-versioned/chunks/{chunk.W4Y456DP.js → chunk.4THKQ4PC.js} +1 -1
  136. package/cdn-versioned/chunks/{chunk.NOZRJQX2.js → chunk.4USO2EJG.js} +2 -2
  137. package/cdn-versioned/chunks/{chunk.WMLPJIUB.js → chunk.5GPPZUNF.js} +1 -1
  138. package/cdn-versioned/chunks/{chunk.AZMH6NZR.js → chunk.6QNQMWSQ.js} +2 -2
  139. package/cdn-versioned/chunks/{chunk.P7DGMSNP.js → chunk.6XOV6LQS.js} +1 -1
  140. package/cdn-versioned/chunks/{chunk.OLX6LCKD.js → chunk.72JQHJ3G.js} +1 -1
  141. package/cdn-versioned/chunks/{chunk.3SQYUPQR.js → chunk.75UMJKQC.js} +1 -1
  142. package/cdn-versioned/chunks/{chunk.QP5624EY.js → chunk.7FMD6ZWC.js} +1 -1
  143. package/cdn-versioned/chunks/{chunk.SKIYV7KD.js → chunk.7NHEEBDB.js} +1 -1
  144. package/cdn-versioned/chunks/{chunk.W32I6F46.js → chunk.7SJXKLVN.js} +1 -1
  145. package/cdn-versioned/chunks/{chunk.DLQQ7NIM.js → chunk.ADTHFKFC.js} +1 -1
  146. package/cdn-versioned/chunks/{chunk.WAAEZAT7.js → chunk.AKJ7U3Y3.js} +1 -1
  147. package/cdn-versioned/chunks/{chunk.KBESD73V.js → chunk.BV42CEWL.js} +1 -1
  148. package/cdn-versioned/chunks/chunk.CARQ25VA.js +1 -0
  149. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  150. package/cdn-versioned/chunks/{chunk.CBQDWY5Y.js → chunk.CTOV3B4T.js} +1 -1
  151. package/cdn-versioned/chunks/{chunk.KKT3D6C3.js → chunk.EIGW4PKE.js} +1 -1
  152. package/cdn-versioned/chunks/{chunk.UKCW2W2D.js → chunk.EIRHQEOO.js} +1 -1
  153. package/cdn-versioned/chunks/{chunk.B7YAWCJP.js → chunk.FYOUHXBZ.js} +1 -1
  154. package/cdn-versioned/chunks/{chunk.3FCZSYJE.js → chunk.H3W4J4F4.js} +1 -1
  155. package/cdn-versioned/chunks/{chunk.TOLB3HGS.js → chunk.H7I6O5HE.js} +1 -1
  156. package/cdn-versioned/chunks/chunk.HJ4O4XQA.js +1 -1
  157. package/cdn-versioned/chunks/{chunk.5UL2MFVQ.js → chunk.HXUQZXCZ.js} +1 -1
  158. package/cdn-versioned/chunks/{chunk.DAPRKASR.js → chunk.KVJJEMOI.js} +1 -1
  159. package/cdn-versioned/chunks/{chunk.6WJYMU5I.js → chunk.LLJ2OCGM.js} +4 -4
  160. package/cdn-versioned/chunks/chunk.M6XINJ52.js +25 -0
  161. package/cdn-versioned/chunks/{chunk.7LYAXCBH.js → chunk.MGCXOSRH.js} +1 -1
  162. package/cdn-versioned/chunks/{chunk.DTEAN466.js → chunk.MMM4IMJD.js} +1 -1
  163. package/cdn-versioned/chunks/{chunk.CRGRHGIA.js → chunk.N4RSYGAV.js} +1 -1
  164. package/cdn-versioned/chunks/chunk.NRBNWX7R.js +1 -1
  165. package/cdn-versioned/chunks/{chunk.LFJ4IYGZ.js → chunk.NTP4LLF3.js} +1 -1
  166. package/cdn-versioned/chunks/{chunk.6AL2V3GA.js → chunk.OCIA2UJP.js} +1 -1
  167. package/cdn-versioned/chunks/{chunk.6O24TPWT.js → chunk.OIOXSZHI.js} +1 -1
  168. package/cdn-versioned/chunks/{chunk.NYJKF5NP.js → chunk.OPMX2Q3A.js} +1 -1
  169. package/cdn-versioned/chunks/{chunk.CN5K7RGY.js → chunk.OQSPWMNR.js} +1 -1
  170. package/cdn-versioned/chunks/{chunk.LZBHL4IV.js → chunk.PCAKJGIV.js} +1 -1
  171. package/cdn-versioned/chunks/{chunk.THIUBNOW.js → chunk.PIAYQI7K.js} +1 -1
  172. package/cdn-versioned/chunks/{chunk.F7X5747H.js → chunk.QJAN6R4E.js} +1 -1
  173. package/cdn-versioned/chunks/{chunk.R7A64SR7.js → chunk.QJFZKBPG.js} +1 -1
  174. package/cdn-versioned/chunks/{chunk.ULAC7BZA.js → chunk.QJVPLDR4.js} +1 -1
  175. package/cdn-versioned/chunks/{chunk.7BYMJ4MT.js → chunk.RCMXIAQV.js} +2 -2
  176. package/cdn-versioned/chunks/{chunk.PKBVHWYN.js → chunk.RIOXBQBC.js} +1 -1
  177. package/cdn-versioned/chunks/{chunk.GCKYK2C3.js → chunk.ROIKKEJQ.js} +1 -1
  178. package/cdn-versioned/chunks/{chunk.QVATLNE5.js → chunk.SQ7OLI7Q.js} +1 -1
  179. package/cdn-versioned/chunks/{chunk.SAXLGODJ.js → chunk.TDRPE2QQ.js} +1 -1
  180. package/cdn-versioned/chunks/{chunk.BS3WSQN5.js → chunk.TFKNNQ5S.js} +1 -1
  181. package/cdn-versioned/chunks/{chunk.AGOSIHIV.js → chunk.TTG6Y6QJ.js} +1 -1
  182. package/cdn-versioned/chunks/{chunk.EXK3HKK5.js → chunk.W2JKI6K3.js} +1 -1
  183. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  184. package/cdn-versioned/chunks/{chunk.X53UBPCZ.js → chunk.XAIFQKHV.js} +1 -1
  185. package/cdn-versioned/chunks/{chunk.ZSXBZK7F.js → chunk.YMTUR575.js} +1 -1
  186. package/cdn-versioned/chunks/{chunk.QWAB34LZ.js → chunk.YVU7BES7.js} +2 -2
  187. package/cdn-versioned/chunks/{chunk.EOIYFHSR.js → chunk.Z4V7WPTW.js} +1 -1
  188. package/cdn-versioned/chunks/{chunk.5P7RNZVM.js → chunk.ZENM3WVO.js} +1 -1
  189. package/cdn-versioned/chunks/{chunk.XGIPT7I4.js → chunk.ZKBX734R.js} +1 -1
  190. package/cdn-versioned/chunks/{chunk.K7UH7J3V.js → chunk.ZZAPDP7V.js} +1 -1
  191. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  192. package/cdn-versioned/components/accordion/accordion.js +1 -1
  193. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  194. package/cdn-versioned/components/accordion-group/accordion-group.js +1 -1
  195. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  196. package/cdn-versioned/components/animation/animation.js +1 -1
  197. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  198. package/cdn-versioned/components/audio/audio.js +1 -1
  199. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  200. package/cdn-versioned/components/badge/badge.js +1 -1
  201. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  202. package/cdn-versioned/components/brandshape/brandshape.js +1 -1
  203. package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  204. package/cdn-versioned/components/breadcrumb/breadcrumb.js +1 -1
  205. package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  206. package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.js +1 -1
  207. package/cdn-versioned/components/button/button.d.ts +1 -1
  208. package/cdn-versioned/components/button/button.js +1 -1
  209. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  210. package/cdn-versioned/components/button-group/button-group.js +1 -1
  211. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  212. package/cdn-versioned/components/carousel/carousel.js +1 -1
  213. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  214. package/cdn-versioned/components/carousel-item/carousel-item.js +1 -1
  215. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  216. package/cdn-versioned/components/checkbox/checkbox.js +1 -1
  217. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  218. package/cdn-versioned/components/checkbox-group/checkbox-group.js +1 -1
  219. package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
  220. package/cdn-versioned/components/combobox/combobox.js +1 -1
  221. package/cdn-versioned/components/datepicker/datepicker.d.ts +4 -1
  222. package/cdn-versioned/components/datepicker/datepicker.js +1 -1
  223. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  224. package/cdn-versioned/components/dialog/dialog.js +1 -1
  225. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  226. package/cdn-versioned/components/divider/divider.js +1 -1
  227. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  228. package/cdn-versioned/components/drawer/drawer.js +1 -1
  229. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  230. package/cdn-versioned/components/dropdown/dropdown.js +1 -1
  231. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  232. package/cdn-versioned/components/expandable/expandable.js +1 -1
  233. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  234. package/cdn-versioned/components/flipcard/flipcard.js +1 -1
  235. package/cdn-versioned/components/header/header.d.ts +1 -1
  236. package/cdn-versioned/components/header/header.js +1 -1
  237. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  238. package/cdn-versioned/components/icon/icon.js +1 -1
  239. package/cdn-versioned/components/include/include.d.ts +1 -1
  240. package/cdn-versioned/components/include/include.js +1 -1
  241. package/cdn-versioned/components/input/input.d.ts +1 -1
  242. package/cdn-versioned/components/input/input.js +1 -1
  243. package/cdn-versioned/components/link/link.d.ts +1 -1
  244. package/cdn-versioned/components/link/link.js +1 -1
  245. package/cdn-versioned/components/loader/loader.d.ts +1 -1
  246. package/cdn-versioned/components/loader/loader.js +1 -1
  247. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  248. package/cdn-versioned/components/map-marker/map-marker.js +1 -1
  249. package/cdn-versioned/components/menu/menu.d.ts +1 -1
  250. package/cdn-versioned/components/menu/menu.js +1 -1
  251. package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
  252. package/cdn-versioned/components/menu-item/menu-item.js +1 -1
  253. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  254. package/cdn-versioned/components/navigation-item/navigation-item.js +1 -1
  255. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  256. package/cdn-versioned/components/notification/notification.js +1 -1
  257. package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
  258. package/cdn-versioned/components/optgroup/optgroup.js +1 -1
  259. package/cdn-versioned/components/option/option.d.ts +1 -1
  260. package/cdn-versioned/components/option/option.js +1 -1
  261. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  262. package/cdn-versioned/components/popup/popup.js +1 -1
  263. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  264. package/cdn-versioned/components/quickfact/quickfact.js +1 -1
  265. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  266. package/cdn-versioned/components/radio/radio.js +1 -1
  267. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  268. package/cdn-versioned/components/radio-button/radio-button.js +1 -1
  269. package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
  270. package/cdn-versioned/components/radio-group/radio-group.js +1 -1
  271. package/cdn-versioned/components/range/range.d.ts +1 -1
  272. package/cdn-versioned/components/range/range.js +1 -1
  273. package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
  274. package/cdn-versioned/components/range-tick/range-tick.js +1 -1
  275. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  276. package/cdn-versioned/components/scrollable/scrollable.js +1 -1
  277. package/cdn-versioned/components/select/select.d.ts +1 -1
  278. package/cdn-versioned/components/select/select.js +1 -1
  279. package/cdn-versioned/components/skeleton/skeleton.d.ts +11 -0
  280. package/cdn-versioned/components/skeleton/skeleton.js +1 -0
  281. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  282. package/cdn-versioned/components/spinner/spinner.js +1 -1
  283. package/cdn-versioned/components/step/step.d.ts +1 -1
  284. package/cdn-versioned/components/step/step.js +1 -1
  285. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  286. package/cdn-versioned/components/step-group/step-group.js +1 -1
  287. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  288. package/cdn-versioned/components/switch/switch.js +1 -1
  289. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  290. package/cdn-versioned/components/tab/tab.js +1 -1
  291. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  292. package/cdn-versioned/components/tab-group/tab-group.js +1 -1
  293. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  294. package/cdn-versioned/components/tab-panel/tab-panel.js +1 -1
  295. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  296. package/cdn-versioned/components/tag/tag.js +1 -1
  297. package/cdn-versioned/components/teaser/teaser.js +1 -1
  298. package/cdn-versioned/components/teaser-media/teaser-media.js +1 -1
  299. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  300. package/cdn-versioned/components/textarea/textarea.js +1 -1
  301. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  302. package/cdn-versioned/components/tooltip/tooltip.js +1 -1
  303. package/cdn-versioned/components/video/video.d.ts +1 -1
  304. package/cdn-versioned/components/video/video.js +1 -1
  305. package/cdn-versioned/custom-elements.json +423 -246
  306. package/cdn-versioned/internal/form.js +3 -3
  307. package/cdn-versioned/solid-components.bundle.js +18 -18
  308. package/cdn-versioned/solid-components.css +2 -2
  309. package/cdn-versioned/solid-components.d.ts +1 -0
  310. package/cdn-versioned/solid-components.iife.js +18 -18
  311. package/cdn-versioned/solid-components.js +1 -1
  312. package/cdn-versioned/utilities/autocomplete-config.js +1 -1
  313. package/cdn-versioned/vscode.html-custom-data.json +120 -93
  314. package/cdn-versioned/web-types.json +214 -162
  315. package/dist/chunks/{chunk.TED3AFLN.js → chunk.22DM7THN.js} +1 -1
  316. package/dist/chunks/{chunk.7JUNYBWC.js → chunk.246LUIGB.js} +1 -1
  317. package/dist/chunks/{chunk.2CAP3Q56.js → chunk.2EN4CJ2E.js} +1 -1
  318. package/dist/chunks/{chunk.7YENJBA2.js → chunk.3CUXBZXY.js} +1 -1
  319. package/dist/chunks/{chunk.BLKVBNBL.js → chunk.4D5SPJ27.js} +1 -1
  320. package/dist/chunks/{chunk.3YQ55DEG.js → chunk.4VSYGWIQ.js} +1 -1
  321. package/dist/chunks/{chunk.UFU7P2YD.js → chunk.5L52M55A.js} +1 -1
  322. package/dist/chunks/{chunk.VCV7HS44.js → chunk.63D5DO3S.js} +1 -1
  323. package/dist/chunks/{chunk.44BJS2SJ.js → chunk.6KCL3YWT.js} +1 -1
  324. package/dist/chunks/{chunk.7QAWQQC2.js → chunk.6OGLZOU3.js} +1 -1
  325. package/dist/chunks/{chunk.XF7G3LFU.js → chunk.A5GKQZGQ.js} +1 -1
  326. package/dist/chunks/{chunk.43SFOPTI.js → chunk.AAK5STGD.js} +1 -1
  327. package/dist/chunks/{chunk.G4FXGRRH.js → chunk.ATKLZZWE.js} +1 -1
  328. package/dist/chunks/{chunk.YJF7I33G.js → chunk.AUMWRORX.js} +1 -1
  329. package/dist/chunks/{chunk.5USUIHQC.js → chunk.AWVURKQ3.js} +1 -1
  330. package/dist/chunks/{chunk.W5ZR6XJP.js → chunk.AZ5YCFXX.js} +1 -1
  331. package/dist/chunks/{chunk.O7O2LFXK.js → chunk.DOGMVREV.js} +1 -1
  332. package/dist/chunks/{chunk.ANLMAOKA.js → chunk.E4O3LVAZ.js} +1 -1
  333. package/dist/chunks/{chunk.ERJOEJ54.js → chunk.FPIRMH7R.js} +1 -1
  334. package/dist/chunks/{chunk.GUZQ4ADZ.js → chunk.FWDG6KMC.js} +1 -1
  335. package/dist/chunks/{chunk.LLUTMJ6Y.js → chunk.HTEXYS4A.js} +1 -1
  336. package/dist/chunks/{chunk.XR6GLQWM.js → chunk.IKDVBWFR.js} +1 -1
  337. package/dist/chunks/{chunk.EOLLVTEE.js → chunk.J2MPIUT5.js} +1 -1
  338. package/dist/chunks/{chunk.V257WRGF.js → chunk.JUZY76ML.js} +1 -1
  339. package/dist/chunks/{chunk.TWLOCD6V.js → chunk.KHS7FSFX.js} +1 -1
  340. package/dist/chunks/{chunk.YN47LYT7.js → chunk.KMU4KABG.js} +1 -1
  341. package/dist/chunks/{chunk.AQI2R5GT.js → chunk.MCUIYSD6.js} +1 -1
  342. package/dist/chunks/{chunk.AXFVYO5L.js → chunk.NBHVDDUK.js} +1 -1
  343. package/dist/chunks/{chunk.U3IJ4WDG.js → chunk.NYOWE72U.js} +1 -1
  344. package/dist/chunks/{chunk.ZSD3BEVL.js → chunk.OH3W4PGL.js} +1 -1
  345. package/dist/chunks/{chunk.G3JK5J7P.js → chunk.OWYDTY46.js} +1 -1
  346. package/dist/chunks/{chunk.72VNUTTV.js → chunk.P2JBJQH6.js} +1 -1
  347. package/dist/chunks/{chunk.QVBR2RUV.js → chunk.PKG3F2KC.js} +1 -1
  348. package/dist/chunks/{chunk.PJPWXQY7.js → chunk.Q4HWX7FF.js} +1 -1
  349. package/dist/chunks/chunk.QP27BG3Y.js +41 -0
  350. package/dist/chunks/{chunk.7IR6CJSO.js → chunk.QPBHKXL6.js} +1 -1
  351. package/dist/chunks/{chunk.FK2BNPQB.js → chunk.QPBJEOPN.js} +1 -1
  352. package/dist/chunks/{chunk.PB672B5H.js → chunk.QTQEKSJS.js} +1 -1
  353. package/dist/chunks/{chunk.4VTG7PRD.js → chunk.QVNC3EJB.js} +1 -1
  354. package/dist/chunks/chunk.RZLBIMEH.js +82 -0
  355. package/dist/chunks/{chunk.DKBTK7VW.js → chunk.S253T7LE.js} +1 -1
  356. package/dist/chunks/{chunk.JGH3YXMX.js → chunk.SJZCQ5SU.js} +2 -2
  357. package/dist/chunks/{chunk.RRDLKLEV.js → chunk.TD5EDBVC.js} +1 -1
  358. package/dist/chunks/{chunk.7FMGPUZF.js → chunk.TJKIQ2ZR.js} +1 -1
  359. package/dist/chunks/{chunk.XU2JEV5G.js → chunk.TMJN75ST.js} +1 -1
  360. package/dist/chunks/{chunk.UKB75H6A.js → chunk.U5L4ZATG.js} +1 -1
  361. package/dist/chunks/{chunk.RCBOBERD.js → chunk.URTB3C7J.js} +1 -1
  362. package/dist/chunks/{chunk.BWFYNOYR.js → chunk.VDSIXERI.js} +1 -1
  363. package/dist/chunks/{chunk.CKLEIUJP.js → chunk.VUTMPKYK.js} +1 -1
  364. package/dist/chunks/{chunk.VZBVZB3D.js → chunk.W6RMEFFR.js} +1 -1
  365. package/dist/chunks/{chunk.ABLPLQOM.js → chunk.WRP3NGPP.js} +1 -1
  366. package/dist/chunks/{chunk.QV5WLO4L.js → chunk.WTG2WY6X.js} +1 -1
  367. package/dist/chunks/{chunk.WV4BVBH5.js → chunk.WUB4VSXU.js} +1 -1
  368. package/dist/chunks/{chunk.7MXI26GR.js → chunk.XRKSJCLQ.js} +2 -2
  369. package/dist/chunks/{chunk.QFW772DW.js → chunk.YBAAPYHP.js} +1 -1
  370. package/dist/chunks/{chunk.4DHEQEYR.js → chunk.YGHO5R3O.js} +1 -1
  371. package/dist/chunks/{chunk.ZEBYA7QQ.js → chunk.ZAQS4XFO.js} +2 -2
  372. package/dist/chunks/{chunk.QL6JHFGU.js → chunk.ZBDFCFOP.js} +1 -1
  373. package/dist/chunks/{chunk.2SR73L2N.js → chunk.ZUL25WD4.js} +1 -1
  374. package/dist/components/accordion/accordion.js +3 -3
  375. package/dist/components/accordion-group/accordion-group.js +4 -4
  376. package/dist/components/animation/animation.js +2 -2
  377. package/dist/components/audio/audio.js +6 -6
  378. package/dist/components/badge/badge.js +2 -2
  379. package/dist/components/brandshape/brandshape.js +2 -2
  380. package/dist/components/breadcrumb/breadcrumb.js +2 -2
  381. package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
  382. package/dist/components/button/button.js +3 -3
  383. package/dist/components/button-group/button-group.js +2 -2
  384. package/dist/components/carousel/carousel.js +4 -4
  385. package/dist/components/carousel-item/carousel-item.js +2 -2
  386. package/dist/components/checkbox/checkbox.js +3 -3
  387. package/dist/components/checkbox-group/checkbox-group.js +3 -3
  388. package/dist/components/combobox/combobox.js +5 -5
  389. package/dist/components/datepicker/datepicker.d.ts +3 -0
  390. package/dist/components/datepicker/datepicker.js +11 -2
  391. package/dist/components/dialog/dialog.js +5 -5
  392. package/dist/components/divider/divider.js +2 -2
  393. package/dist/components/drawer/drawer.js +5 -5
  394. package/dist/components/dropdown/dropdown.js +3 -3
  395. package/dist/components/expandable/expandable.js +3 -3
  396. package/dist/components/flipcard/flipcard.js +5 -5
  397. package/dist/components/header/header.js +2 -2
  398. package/dist/components/icon/icon.js +2 -2
  399. package/dist/components/include/include.js +2 -2
  400. package/dist/components/input/input.js +3 -3
  401. package/dist/components/link/link.js +2 -2
  402. package/dist/components/loader/loader.js +2 -2
  403. package/dist/components/map-marker/map-marker.js +2 -2
  404. package/dist/components/menu/menu.js +2 -2
  405. package/dist/components/menu-item/menu-item.js +2 -2
  406. package/dist/components/navigation-item/navigation-item.js +4 -4
  407. package/dist/components/notification/notification.js +5 -5
  408. package/dist/components/optgroup/optgroup.js +3 -3
  409. package/dist/components/option/option.js +3 -3
  410. package/dist/components/popup/popup.js +2 -2
  411. package/dist/components/quickfact/quickfact.js +4 -4
  412. package/dist/components/radio/radio.js +2 -2
  413. package/dist/components/radio-button/radio-button.js +2 -2
  414. package/dist/components/radio-group/radio-group.js +4 -4
  415. package/dist/components/range/range.js +2 -2
  416. package/dist/components/range-tick/range-tick.js +2 -2
  417. package/dist/components/scrollable/scrollable.js +3 -3
  418. package/dist/components/select/select.js +5 -5
  419. package/dist/components/skeleton/skeleton.d.ts +11 -0
  420. package/dist/components/skeleton/skeleton.js +9 -0
  421. package/dist/components/spinner/spinner.js +2 -2
  422. package/dist/components/step/step.js +3 -3
  423. package/dist/components/step-group/step-group.js +2 -2
  424. package/dist/components/switch/switch.js +2 -2
  425. package/dist/components/tab/tab.js +2 -2
  426. package/dist/components/tab-group/tab-group.js +3 -3
  427. package/dist/components/tab-panel/tab-panel.js +2 -2
  428. package/dist/components/tag/tag.js +3 -3
  429. package/dist/components/teaser/teaser.js +2 -2
  430. package/dist/components/teaser-media/teaser-media.js +2 -2
  431. package/dist/components/textarea/textarea.js +3 -3
  432. package/dist/components/tooltip/tooltip.js +4 -4
  433. package/dist/components/video/video.js +3 -3
  434. package/dist/custom-elements.json +178 -1
  435. package/dist/solid-components.d.ts +1 -0
  436. package/dist/solid-components.js +70 -66
  437. package/dist/utilities/autocomplete-config.js +2 -2
  438. package/dist/vscode.html-custom-data.json +27 -0
  439. package/dist/web-types.json +53 -1
  440. package/dist-versioned/chunks/{chunk.TED3AFLN.js → chunk.22DM7THN.js} +3 -3
  441. package/dist-versioned/chunks/{chunk.7JUNYBWC.js → chunk.246LUIGB.js} +2 -2
  442. package/dist-versioned/chunks/{chunk.2CAP3Q56.js → chunk.2EN4CJ2E.js} +2 -2
  443. package/dist-versioned/chunks/{chunk.7YENJBA2.js → chunk.3CUXBZXY.js} +2 -2
  444. package/dist-versioned/chunks/{chunk.BLKVBNBL.js → chunk.4D5SPJ27.js} +2 -2
  445. package/dist-versioned/chunks/{chunk.3YQ55DEG.js → chunk.4VSYGWIQ.js} +3 -3
  446. package/dist-versioned/chunks/{chunk.UFU7P2YD.js → chunk.5L52M55A.js} +4 -4
  447. package/dist-versioned/chunks/{chunk.VCV7HS44.js → chunk.63D5DO3S.js} +3 -3
  448. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  449. package/dist-versioned/chunks/{chunk.44BJS2SJ.js → chunk.6KCL3YWT.js} +4 -4
  450. package/dist-versioned/chunks/{chunk.7QAWQQC2.js → chunk.6OGLZOU3.js} +2 -2
  451. package/dist-versioned/chunks/{chunk.XF7G3LFU.js → chunk.A5GKQZGQ.js} +3 -3
  452. package/dist-versioned/chunks/{chunk.43SFOPTI.js → chunk.AAK5STGD.js} +3 -3
  453. package/dist-versioned/chunks/{chunk.G4FXGRRH.js → chunk.ATKLZZWE.js} +3 -3
  454. package/dist-versioned/chunks/{chunk.YJF7I33G.js → chunk.AUMWRORX.js} +7 -7
  455. package/dist-versioned/chunks/{chunk.5USUIHQC.js → chunk.AWVURKQ3.js} +9 -9
  456. package/dist-versioned/chunks/{chunk.W5ZR6XJP.js → chunk.AZ5YCFXX.js} +3 -3
  457. package/dist-versioned/chunks/{chunk.O7O2LFXK.js → chunk.DOGMVREV.js} +4 -4
  458. package/dist-versioned/chunks/{chunk.ANLMAOKA.js → chunk.E4O3LVAZ.js} +2 -2
  459. package/dist-versioned/chunks/{chunk.ERJOEJ54.js → chunk.FPIRMH7R.js} +5 -5
  460. package/dist-versioned/chunks/{chunk.GUZQ4ADZ.js → chunk.FWDG6KMC.js} +2 -2
  461. package/dist-versioned/chunks/{chunk.LLUTMJ6Y.js → chunk.HTEXYS4A.js} +27 -27
  462. package/dist-versioned/chunks/{chunk.XR6GLQWM.js → chunk.IKDVBWFR.js} +3 -3
  463. package/dist-versioned/chunks/{chunk.EOLLVTEE.js → chunk.J2MPIUT5.js} +2 -2
  464. package/dist-versioned/chunks/{chunk.V257WRGF.js → chunk.JUZY76ML.js} +2 -2
  465. package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
  466. package/dist-versioned/chunks/{chunk.TWLOCD6V.js → chunk.KHS7FSFX.js} +6 -6
  467. package/dist-versioned/chunks/{chunk.YN47LYT7.js → chunk.KMU4KABG.js} +3 -3
  468. package/dist-versioned/chunks/{chunk.AQI2R5GT.js → chunk.MCUIYSD6.js} +3 -3
  469. package/dist-versioned/chunks/{chunk.AXFVYO5L.js → chunk.NBHVDDUK.js} +5 -5
  470. package/dist-versioned/chunks/{chunk.U3IJ4WDG.js → chunk.NYOWE72U.js} +2 -2
  471. package/dist-versioned/chunks/{chunk.ZSD3BEVL.js → chunk.OH3W4PGL.js} +25 -25
  472. package/dist-versioned/chunks/{chunk.G3JK5J7P.js → chunk.OWYDTY46.js} +3 -3
  473. package/dist-versioned/chunks/{chunk.72VNUTTV.js → chunk.P2JBJQH6.js} +2 -2
  474. package/dist-versioned/chunks/{chunk.QVBR2RUV.js → chunk.PKG3F2KC.js} +2 -2
  475. package/dist-versioned/chunks/{chunk.PJPWXQY7.js → chunk.Q4HWX7FF.js} +6 -6
  476. package/dist-versioned/chunks/chunk.QP27BG3Y.js +41 -0
  477. package/dist-versioned/chunks/{chunk.7IR6CJSO.js → chunk.QPBHKXL6.js} +4 -4
  478. package/dist-versioned/chunks/{chunk.FK2BNPQB.js → chunk.QPBJEOPN.js} +13 -13
  479. package/dist-versioned/chunks/{chunk.PB672B5H.js → chunk.QTQEKSJS.js} +2 -2
  480. package/dist-versioned/chunks/{chunk.4VTG7PRD.js → chunk.QVNC3EJB.js} +2 -2
  481. package/dist-versioned/chunks/chunk.RZLBIMEH.js +82 -0
  482. package/dist-versioned/chunks/{chunk.DKBTK7VW.js → chunk.S253T7LE.js} +12 -12
  483. package/dist-versioned/chunks/{chunk.JGH3YXMX.js → chunk.SJZCQ5SU.js} +14 -14
  484. package/dist-versioned/chunks/{chunk.RRDLKLEV.js → chunk.TD5EDBVC.js} +3 -3
  485. package/dist-versioned/chunks/{chunk.7FMGPUZF.js → chunk.TJKIQ2ZR.js} +6 -6
  486. package/dist-versioned/chunks/{chunk.XU2JEV5G.js → chunk.TMJN75ST.js} +7 -7
  487. package/dist-versioned/chunks/{chunk.UKB75H6A.js → chunk.U5L4ZATG.js} +6 -6
  488. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  489. package/dist-versioned/chunks/{chunk.RCBOBERD.js → chunk.URTB3C7J.js} +4 -4
  490. package/dist-versioned/chunks/{chunk.BWFYNOYR.js → chunk.VDSIXERI.js} +3 -3
  491. package/dist-versioned/chunks/{chunk.CKLEIUJP.js → chunk.VUTMPKYK.js} +4 -4
  492. package/dist-versioned/chunks/{chunk.VZBVZB3D.js → chunk.W6RMEFFR.js} +3 -3
  493. package/dist-versioned/chunks/{chunk.ABLPLQOM.js → chunk.WRP3NGPP.js} +5 -5
  494. package/dist-versioned/chunks/{chunk.QV5WLO4L.js → chunk.WTG2WY6X.js} +6 -6
  495. package/dist-versioned/chunks/{chunk.WV4BVBH5.js → chunk.WUB4VSXU.js} +3 -3
  496. package/dist-versioned/chunks/chunk.XCQC3F3H.js +3 -3
  497. package/dist-versioned/chunks/{chunk.7MXI26GR.js → chunk.XRKSJCLQ.js} +8 -8
  498. package/dist-versioned/chunks/{chunk.QFW772DW.js → chunk.YBAAPYHP.js} +15 -15
  499. package/dist-versioned/chunks/{chunk.4DHEQEYR.js → chunk.YGHO5R3O.js} +4 -4
  500. package/dist-versioned/chunks/{chunk.ZEBYA7QQ.js → chunk.ZAQS4XFO.js} +4 -4
  501. package/dist-versioned/chunks/{chunk.QL6JHFGU.js → chunk.ZBDFCFOP.js} +4 -4
  502. package/dist-versioned/chunks/{chunk.2SR73L2N.js → chunk.ZUL25WD4.js} +2 -2
  503. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  504. package/dist-versioned/components/accordion/accordion.js +3 -3
  505. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  506. package/dist-versioned/components/accordion-group/accordion-group.js +4 -4
  507. package/dist-versioned/components/animation/animation.d.ts +1 -1
  508. package/dist-versioned/components/animation/animation.js +2 -2
  509. package/dist-versioned/components/audio/audio.d.ts +1 -1
  510. package/dist-versioned/components/audio/audio.js +6 -6
  511. package/dist-versioned/components/badge/badge.d.ts +1 -1
  512. package/dist-versioned/components/badge/badge.js +2 -2
  513. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  514. package/dist-versioned/components/brandshape/brandshape.js +2 -2
  515. package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  516. package/dist-versioned/components/breadcrumb/breadcrumb.js +2 -2
  517. package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  518. package/dist-versioned/components/breadcrumb-item/breadcrumb-item.js +2 -2
  519. package/dist-versioned/components/button/button.d.ts +1 -1
  520. package/dist-versioned/components/button/button.js +3 -3
  521. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  522. package/dist-versioned/components/button-group/button-group.js +2 -2
  523. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  524. package/dist-versioned/components/carousel/carousel.js +4 -4
  525. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  526. package/dist-versioned/components/carousel-item/carousel-item.js +2 -2
  527. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  528. package/dist-versioned/components/checkbox/checkbox.js +3 -3
  529. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  530. package/dist-versioned/components/checkbox-group/checkbox-group.js +3 -3
  531. package/dist-versioned/components/combobox/combobox.d.ts +1 -1
  532. package/dist-versioned/components/combobox/combobox.js +5 -5
  533. package/dist-versioned/components/datepicker/datepicker.d.ts +4 -1
  534. package/dist-versioned/components/datepicker/datepicker.js +11 -2
  535. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  536. package/dist-versioned/components/dialog/dialog.js +5 -5
  537. package/dist-versioned/components/divider/divider.d.ts +1 -1
  538. package/dist-versioned/components/divider/divider.js +2 -2
  539. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  540. package/dist-versioned/components/drawer/drawer.js +5 -5
  541. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  542. package/dist-versioned/components/dropdown/dropdown.js +3 -3
  543. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  544. package/dist-versioned/components/expandable/expandable.js +3 -3
  545. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  546. package/dist-versioned/components/flipcard/flipcard.js +5 -5
  547. package/dist-versioned/components/header/header.d.ts +1 -1
  548. package/dist-versioned/components/header/header.js +2 -2
  549. package/dist-versioned/components/icon/icon.d.ts +1 -1
  550. package/dist-versioned/components/icon/icon.js +2 -2
  551. package/dist-versioned/components/include/include.d.ts +1 -1
  552. package/dist-versioned/components/include/include.js +2 -2
  553. package/dist-versioned/components/input/input.d.ts +1 -1
  554. package/dist-versioned/components/input/input.js +3 -3
  555. package/dist-versioned/components/link/link.d.ts +1 -1
  556. package/dist-versioned/components/link/link.js +2 -2
  557. package/dist-versioned/components/loader/loader.d.ts +1 -1
  558. package/dist-versioned/components/loader/loader.js +2 -2
  559. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  560. package/dist-versioned/components/map-marker/map-marker.js +2 -2
  561. package/dist-versioned/components/menu/menu.d.ts +1 -1
  562. package/dist-versioned/components/menu/menu.js +2 -2
  563. package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
  564. package/dist-versioned/components/menu-item/menu-item.js +2 -2
  565. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  566. package/dist-versioned/components/navigation-item/navigation-item.js +4 -4
  567. package/dist-versioned/components/notification/notification.d.ts +1 -1
  568. package/dist-versioned/components/notification/notification.js +5 -5
  569. package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
  570. package/dist-versioned/components/optgroup/optgroup.js +3 -3
  571. package/dist-versioned/components/option/option.d.ts +1 -1
  572. package/dist-versioned/components/option/option.js +3 -3
  573. package/dist-versioned/components/popup/popup.d.ts +1 -1
  574. package/dist-versioned/components/popup/popup.js +2 -2
  575. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  576. package/dist-versioned/components/quickfact/quickfact.js +4 -4
  577. package/dist-versioned/components/radio/radio.d.ts +1 -1
  578. package/dist-versioned/components/radio/radio.js +2 -2
  579. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  580. package/dist-versioned/components/radio-button/radio-button.js +2 -2
  581. package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
  582. package/dist-versioned/components/radio-group/radio-group.js +4 -4
  583. package/dist-versioned/components/range/range.d.ts +1 -1
  584. package/dist-versioned/components/range/range.js +2 -2
  585. package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
  586. package/dist-versioned/components/range-tick/range-tick.js +2 -2
  587. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  588. package/dist-versioned/components/scrollable/scrollable.js +3 -3
  589. package/dist-versioned/components/select/select.d.ts +1 -1
  590. package/dist-versioned/components/select/select.js +5 -5
  591. package/dist-versioned/components/skeleton/skeleton.d.ts +11 -0
  592. package/dist-versioned/components/skeleton/skeleton.js +9 -0
  593. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  594. package/dist-versioned/components/spinner/spinner.js +2 -2
  595. package/dist-versioned/components/step/step.d.ts +1 -1
  596. package/dist-versioned/components/step/step.js +3 -3
  597. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  598. package/dist-versioned/components/step-group/step-group.js +2 -2
  599. package/dist-versioned/components/switch/switch.d.ts +1 -1
  600. package/dist-versioned/components/switch/switch.js +2 -2
  601. package/dist-versioned/components/tab/tab.d.ts +1 -1
  602. package/dist-versioned/components/tab/tab.js +2 -2
  603. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  604. package/dist-versioned/components/tab-group/tab-group.js +3 -3
  605. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  606. package/dist-versioned/components/tab-panel/tab-panel.js +2 -2
  607. package/dist-versioned/components/tag/tag.d.ts +1 -1
  608. package/dist-versioned/components/tag/tag.js +3 -3
  609. package/dist-versioned/components/teaser/teaser.js +2 -2
  610. package/dist-versioned/components/teaser-media/teaser-media.js +2 -2
  611. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  612. package/dist-versioned/components/textarea/textarea.js +3 -3
  613. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  614. package/dist-versioned/components/tooltip/tooltip.js +4 -4
  615. package/dist-versioned/components/video/video.d.ts +1 -1
  616. package/dist-versioned/components/video/video.js +3 -3
  617. package/dist-versioned/custom-elements.json +423 -246
  618. package/dist-versioned/internal/form.js +3 -3
  619. package/dist-versioned/solid-components.css +2 -2
  620. package/dist-versioned/solid-components.d.ts +1 -0
  621. package/dist-versioned/solid-components.js +70 -66
  622. package/dist-versioned/utilities/autocomplete-config.js +2 -2
  623. package/dist-versioned/vscode.html-custom-data.json +120 -93
  624. package/dist-versioned/web-types.json +214 -162
  625. package/package.json +2 -2
  626. package/cdn/chunks/chunk.TIK62LTB.js +0 -25
  627. package/cdn-versioned/chunks/chunk.TIK62LTB.js +0 -25
  628. package/dist/chunks/chunk.PJJCHCFO.js +0 -82
  629. package/dist-versioned/chunks/chunk.PJJCHCFO.js +0 -82
@@ -1 +1 @@
1
- import{a}from"./chunk.635MGLIZ.js";import{b as N}from"./chunk.NRBNWX7R.js";import{a as W}from"./chunk.CGQ2BPPZ.js";import{a as $}from"./chunk.YEDQWNIV.js";import{a as q}from"./chunk.L6MCOH7T.js";import{a as P}from"./chunk.E2DRD2OX.js";import{a as H,b as v,c as E,d as B,h as R}from"./chunk.TIK62LTB.js";import{b as A,e as C,i as z}from"./chunk.RZUTJ36B.js";import{e as h}from"./chunk.TJOCV4DC.js";var o=class extends R{constructor(){super();this.localize=new q(this);this.hasSlotController=new W(this,"label","help-text","tooltip");this.formControlController=new N(this,{assumeInteractionOn:["sd-blur","sd-5-16-2-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.disabled=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=a.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(i=>{var n,l;return i instanceof HTMLElement&&(((n=i.classList)==null?void 0:n.contains("nav"))||((l=i.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,u,f,b,c;if(this.disabled||this.visuallyDisabled){(l=t.preventDefault)==null||l.call(t),(u=t.stopPropagation)==null||u.call(t);return}let e=t.target,s=e.value,i=(f=e.selectionStart)!=null?f:s.length,n=(b=t.inputType)==null?void 0:b.startsWith("delete");if(this.range){let d=s.replace(/\D/g,""),r=d.slice(0,8),g=d.slice(8,16),m=this.buildDmyFromDigits(r),S=this.buildDmyFromDigits(g),M;r.length===0?M="":r.length<8?M=m:g.length>0?M=`${m} - ${S}`:M=n?m:`${m} -`;let I=this.countDigitsBeforeCaret(s,i),y;if(I<=8){let p=this.digitIndexToDmyCaretPos(Math.min(I,8));y=Math.min(p,m.length)}else{let p=r.length<8?m.length:m.length+3,D=Math.min(I-8,8),x=this.digitIndexToDmyCaretPos(D);y=p+Math.min(x,S.length)}this.inputValue=M;let L=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(m)){let p=this.dmyToIso(m),D=p?a.parseLocalISO(p):null;!!D&&!this.isDisabled(D)&&this.inMinMax(D)&&this.rangeStart!==p&&(this.rangeStart=p,this.previewEnd=null,this.viewMonth=new Date(D.getFullYear(),D.getMonth(),1),this.focusedDate=a.startOfDayLocal(D),L=!0)}else this.rangeStart&&(this.rangeStart=null,L=!0),this.rangeEnd&&(this.rangeEnd=null,L=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(S)&&this.rangeStart){let p=a.parseLocalISO(this.rangeStart),D=this.dmyToIso(S),x=D?a.parseLocalISO(D):null;if(!!x&&!this.isDisabled(x)&&this.inMinMax(x)){let[T,O]=a.compareDates(p,x)<=0?[p,x]:[x,p],Y=a.isSameDay(T,O);if((this.allowSameDayRange||!Y)&&!this.wouldRangeContainDisabled(T,O)){let V=a.toLocalISODate(a.startOfDayLocal(T)),k=a.toLocalISODate(a.startOfDayLocal(O));(this.rangeStart!==V||this.rangeEnd!==k)&&(this.rangeStart=V,this.rangeEnd=k,this.viewMonth=new Date(O.getFullYear(),O.getMonth(),1),this.focusedDate=a.startOfDayLocal(O),L=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,L=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),L&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var D;let p=(D=this.input)!=null?D:e;p&&(p.value=this.inputValue,p.setSelectionRange(y,y))})})}else{let d=e,r=d.value,g=(c=d.selectionStart)!=null?c:r.length,m=r.replace(/\D/g,"").slice(0,8),S=m.slice(0,2),M=m.slice(2,4),I=m.slice(4,8),y="";S.length>0&&(y+=S,S.length===2&&(y+=".")),M.length>0&&S.length===2&&(y+=M,M.length===2&&(y+=".")),I.length>0&&S.length===2&&M.length===2&&(y+=I),y=y.replace(/\.\.+/g,".");let L=this.inputValue||"";this.inputValue=y;let p=g,D=w=>{let V=[];for(let k=0;k<w.length;k++)w[k]==="."&&V.push(k);return V},x=D(L),F=D(y),T=x.filter(w=>w<g).length,Y=F.filter(w=>w<g).length-T;if(Y>0?p+=Y:!x.includes(g)&&F.includes(g)&&(p+=1),p=Math.min(Math.max(0,p),y.length),requestAnimationFrame(()=>{var V;let w=(V=this.input)!=null?V:d;w&&(w.value=this.inputValue,w.setSelectionRange(p,p))}),/^\d{2}\.\d{2}\.\d{4}$/.test(y)){let w=this.parseInputText(y);this.applyParsedInput(w)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let d=this.rangeStart?a.parseLocalISO(this.rangeStart):null,r=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;d&&!r?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}`):d&&r&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(r)}`)}else if(this.value){let d=a.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(d)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{this.currentPlacement=t.detail.placement};this.handleHeaderKeyDown=(t,e,s,i)=>{if(t.key==="Tab"&&!t.shiftKey){i&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(s):this.setYear(s))};this.onKeyDown=t=>{if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let e=t.key,s=!0,i=new Date(this.focusedDate);switch(e){case"ArrowLeft":i.setDate(i.getDate()-1);break;case"ArrowRight":i.setDate(i.getDate()+1);break;case"ArrowUp":i.setDate(i.getDate()-7);break;case"ArrowDown":i.setDate(i.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:s=!1}if(s){if(t.preventDefault(),i.getMonth()!==this.viewMonth.getMonth()||i.getFullYear()!==this.viewMonth.getFullYear()){this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1);let f=this.formatMonthYear(this.viewMonth);this.setNavStatus(f)}let l=a.startOfDayLocal(i);(!this.focusedDate||l.getTime()!==this.focusedDate.getTime())&&(this.focusedDate=l);let u=l.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(u),this.requestUpdate(),requestAnimationFrame(()=>{let f=this.shadowRoot,b=f==null?void 0:f.querySelector("button.day.focused");b==null||b.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?a.parseLocalISO(this.value):null,e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.range&&e?e:t!=null?t:a.startOfDayLocal(new Date);this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.clampDateToMonth(s,this.viewMonth),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?a.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=a.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let e=this.input;if(e){e.value=(s=this.inputValue)!=null?s:"";let i=e.value.length;e.setSelectionRange(i,i)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?a.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null,s=t!=null?t:e;s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.startOfDayLocal(s)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let i=this.input;if(i){i.value=(n=this.inputValue)!=null?n:"";let l=i.value.length;i.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return a.parseLocalISO(t)}inMinMax(t){let e=this.parseISO(this.min!==null?String(this.min):null),s=this.parseISO(this.max!==null?String(this.max):null);return!(e&&t<e||s&&t>s)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=a.toLocalISODate(a.startOfDayLocal(t));return this.disabledDatesSet.has(e)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let s="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+s},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),s=this.ordinal(e),i=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${s} of ${i} ${n}`}ordinal(t){let e=["th","st","nd","rd"],s=t%100,i=e[(s-20)%10]||e[s]||e[0];return t+i}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let s=JSON.parse(e);Array.isArray(s)&&(t=s)}catch(s){t=[]}else e.length>0&&(t=e.split(",").map(s=>s.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let s=a.compareDates(t,e)<=0?a.startOfDayLocal(t):a.startOfDayLocal(e),i=a.compareDates(t,e)<=0?a.startOfDayLocal(e):a.startOfDayLocal(t),n=new Date(s);for(;a.compareDates(n,i)<=0;){if(this.isDisabled(n))return!0;n.setDate(n.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=a.parseLocalISO(t);if(!e)return"";let s=String(e.getDate()).padStart(2,"0"),i=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${s}.${i}.${n}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let s=Number(e[1]),i=Number(e[2]),n=Number(e[3]),l=new Date(n,i-1,s);if(l.getFullYear()!==n||l.getMonth()!==i-1||l.getDate()!==s)return null;let u=a.startOfDayLocal(l);return a.toLocalISODate(u)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),i=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let n=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return n&&l?`${n} ${i} ${l}`:n&&!l?`${n} ${i}`:""}parseInputText(t){var i,n;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let u=l[0];if(!u)return{start:null,end:null,valid:!0};let f=this.dmyToIso(u);return f?{start:f,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let u=(i=l[0])!=null?i:"",f=(n=l[1])!=null?n:"",b=u?this.dmyToIso(u):null,c=f?this.dmyToIso(f):null;return u&&!b?{start:null,end:null,valid:!1}:f&&!c?{start:null,end:null,valid:!1}:{start:b,end:c,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let s=this.dmyToIso(e);return s?{single:s,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var u,f,b,c;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=d=>{if(!d)return!0;let r=a.parseLocalISO(d);return!(!this.inMinMax(r)||this.isDisabled(r))},s=!1;if(this.range){let d=(u=t.start)!=null?u:null,r=(f=t.end)!=null?f:null;if(!e(d)||r&&!e(r))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let g=d?a.parseLocalISO(d):null,m=r?a.parseLocalISO(r):null;if(g&&m){if(a.compareDates(g,m)>0){let I=g;g=m,m=I}if(!this.allowSameDayRange&&a.isSameDay(g,m))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(g,m))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let S=g?a.toLocalISODate(a.startOfDayLocal(g)):null,M=m?a.toLocalISODate(a.startOfDayLocal(m)):null;if(this.rangeStart!==S||this.rangeEnd!==M){this.rangeStart=S,this.rangeEnd=M,this.previewEnd=null,s=!0;let I=(b=g!=null?g:m)!=null?b:this.today;this.viewMonth=new Date(I.getFullYear(),I.getMonth(),1),this.focusedDate=a.startOfDayLocal(I),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let i=(c=t.single)!=null?c:null;if(!e(i))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=i?a.parseLocalISO(i):null,l=n?a.toLocalISODate(a.startOfDayLocal(n)):null;return this.value!==l&&(this.value=l,s=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=a.startOfDayLocal(n)),this.emit("sd-select",{detail:{value:this.value,date:n!=null?n:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),s}buildDmyFromDigits(t){let e=t.slice(0,8),s=e.slice(0,2),i=e.slice(2,4),n=e.slice(4,8),l=s;return i.length&&(l+="."+i),n.length&&(l+="."+n),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var s,i;((i=(s=t.composedPath)==null?void 0:s.call(t))!=null?i:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.emit("sd-focus")}setMonth(t){let e=new Date(this.viewMonth.getFullYear(),this.viewMonth.getMonth()+t,1);if(e.getMonth()===this.viewMonth.getMonth()&&e.getFullYear()===this.viewMonth.getFullYear())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-change",{detail:{month:this.viewMonth}})}setYear(t){let e=new Date(this.viewMonth.getFullYear()+t,this.viewMonth.getMonth(),1);if(e.getFullYear()===this.viewMonth.getFullYear()&&e.getMonth()===this.viewMonth.getMonth())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-year",{detail:{month:this.viewMonth}})}focusInitialGridDay(){let t=null;if(!this.range&&this.value){let s=a.parseLocalISO(this.value);s&&(t=a.startOfDayLocal(s))}if(this.range){let s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;i?t=a.startOfDayLocal(i):s&&(t=a.startOfDayLocal(s))}if(!(s=>s?s.getFullYear()===this.viewMonth.getFullYear()&&s.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(this.viewMonth),i=s.flat().find(n=>n.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(n,this.today)&&!this.isDisabled(n));if(i)t=a.startOfDayLocal(i);else{let n=s.flat().find(l=>l.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(l));t=n?a.startOfDayLocal(n):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,i=(s==null?void 0:s.querySelector("button.day.selected"))||(s==null?void 0:s.querySelector("button.day.focused"))||(s==null?void 0:s.querySelector('button.day[tabindex="0"]'))||(s==null?void 0:s.querySelector("button.day"));i==null||i.focus({preventScroll:!0})})}selectSingleDate(t){if(this.isDisabled(t))return;let e=a.startOfDayLocal(t),s=a.toLocalISODate(e);if(this.value===s)return;this.value=s;let i=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(i),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let n=this.input;n&&(n.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=n.value.length;n.setSelectionRange(u,u)})}))})}selectRangeDate(t){let e=a.startOfDayLocal(t),s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(!s&&!i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))});return}if(s&&!i){if(this.isDisabled(e))return;if(a.isSameDay(s,e)){if(!this.allowSameDayRange){this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let d=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${d}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var g;let r=this.input;r&&(r.value=(g=this.inputValue)!=null?g:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let m=r.value.length;r.setSelectionRange(m,m)})}))});return}this.rangeStart=a.toLocalISODate(e),this.rangeEnd=a.toLocalISODate(e),this.previewEnd=null;let c=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${c}`,40),this.announceSelect(`${this.termEndSelected()}: ${c}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var r;let d=this.input;d&&(d.value=(r=this.inputValue)!=null?r:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let g=d.value.length;d.setSelectionRange(g,g)})}))});return}let n=a.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[l,u]=a.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=a.toLocalISODate(l),this.rangeEnd=a.toLocalISODate(u),this.previewEnd=null;let f=this.formatSelectionLabel(l),b=this.formatSelectionLabel(u);this.announceSelect(`${this.termStartSelected()}: ${f}`,40),this.announceSelect(`${this.termEndSelected()}: ${b}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var d;let c=this.input;c&&(c.value=(d=this.inputValue)!=null?d:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let r=c.value.length;c.setSelectionRange(r,r)})}))});return}if(s&&i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))})}}selectDate(t){this.range?this.selectRangeDate(t):this.selectSingleDate(t)}getMonthMatrix(t){var b;let e=(b=this.firstDayOfWeek)!=null?b:1,s=new Date(t.getFullYear(),t.getMonth(),1),i=new Date(s),n=(s.getDay()-e+7)%7;i.setDate(s.getDate()-n);let l=[],u=i;for(let c=0;c<6;c++){let d=[];for(let r=0;r<7;r++)d.push(new Date(u)),u.setDate(u.getDate()+1);l.push(d)}let f=c=>c.every(d=>d.getMonth()!==t.getMonth());for(;l.length>0&&f(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var i;let t=(i=this.firstDayOfWeek)!=null?i:1,e=new Date(2021,7,1),s=[];for(let n=0;n<7;n++){let l=new Date(e);l.setDate(e.getDate()+(t+n)%7);try{s.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(u){s.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return s}getTabTargetDayForCurrentView(t){let e=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(i,this.today)&&!this.isDisabled(i));if(e)return a.startOfDayLocal(e);let s=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(i));return s?a.startOfDayLocal(s):null}onDayMouseEnter(t){if(!this.range)return;let e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(e&&!s){let i=a.startOfDayLocal(t);this.previewEnd=this.isDisabled(i)?null:i,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){let{weeks:t}=this.getMonthMatrix(this.viewMonth),e=this.formatMonthYear(this.viewMonth),s=this.weekdayLabels(),i=this.value?this.parseISO(this.value):null,n=this.rangeStart?this.parseISO(this.rangeStart):null,l=this.rangeEnd?this.parseISO(this.rangeEnd):null,u=this.previewEnd,f=c=>!this.range||!n||l||!u?!1:a.isBetweenInclusive(c,n,u),b=this.getTabTargetDayForCurrentView(t);return C`<div part="datepicker" class="w-[284px] z-50 absolute top-full bg-white border-2 border-t-0 border-primary py-3 px-4 ${this.open?"block rounded-bl-default rounded-br-default":"hidden"} ${this.alignment==="left"?"left-0":"right-0"}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-5-16-2-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-5-16-2-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-5-16-2-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-5-16-2-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base !text-primary" part="month-label" aria-live="polite">${e}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-5-16-2-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-5-16-2-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-5-16-2-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-5-16-2-icon></button></div></div><sd-5-16-2-divider></sd-5-16-2-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${e}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${s.map((c,d)=>C`<div role="columnheader" aria-colindex="${d+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${c}" title="${c}" id="${"col-"+(d+1)}">${c}</div>`)}</div>${t.map((c,d)=>C`<div class="grid-row grid grid-cols-7 ${d===0?"mt-2":""}" role="row" aria-rowindex="${d+2}">${c.map((r,g)=>{let m=r.getMonth()===this.viewMonth.getMonth(),S=this.isDisabled(r),M=a.isSameDay(r,this.focusedDate),I=a.isSameDay(r,this.today),y=!this.range&&i?a.isSameDay(r,i):!1,L=this.range&&n?a.isSameDay(r,n):!1,p=this.range&&l?a.isSameDay(r,l):!1,D=this.range&&n&&l?a.isBetweenInclusive(r,n,l):!1,x=f(r)&&!S,F=-1,T=b&&a.isSameDay(r,b);(this.tabbingIntoGrid&&T||!this.tabbingIntoGrid&&M)&&(F=0);let O=this.isWeekend(r),Y=r.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),w=L?this.localize.term("startDateSelected"):p?this.localize.term("endDateSelected"):void 0;return C`<button type="button" part="day" class="${$("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded-md w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",L||p?"hover:bg-primary-500":"hover:bg-primary-100 hover:text-primary-500",m?this.isInDisabledDates(r)?"out-month text-neutral-500":this.disabledWeekends&&O?"weekend-day text-neutral-500":"in-month text-primary":this.disabledWeekends&&O?"out-month weekend-day text-neutral-500":O?"out-month weekend-day text-neutral-700":"out-month text-neutral-700",y?"selected border-primary bg-primary text-white hover:bg-primary-500 hover:text-white":"",L?"bg-primary text-white rounded-l-md rounded-r-none":"",p?"bg-primary text-white range-end rounded-r-md rounded-l-none":"",D&&!L&&!p?"in-range selected bg-primary-100 text-primary-500 rounded-none hover:bg-primary-500 hover:text-white":"",!D&&x&&!L&&!p?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",I&&!y&&!L&&!p&&M?"today border-[1px] border-primary font-bold":"",S?"disabled cursor-not-allowed hover:bg-transparent":"",M&&!I?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${g+1}" aria-labelledby="${"col-"+(g+1)}" .tabIndex="${F}" ?disabled="${S||this.disabled}" aria-disabled="${S||this.visuallyDisabled||this.disabled?"true":"false"}" aria-selected="${y||D||L||p?"true":"false"}" aria-current="${I?"date":z}" aria-label="${Y}" aria-roledescription="${w!=null?w:z}" @focus="${()=>this.focusedDate=a.startOfDayLocal(r)}" @mouseenter="${()=>this.onDayMouseEnter(r)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=a.startOfDayLocal(r),this.selectDate(r)}}">${r.getDate()}</button>`})}</div>`)}</div></div>`}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,s=this.helpText?!0:!!t.helpText,i=!!t.tooltip,n=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",l={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],u={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],f=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",b={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[f],c=this.size==="sm"?"text-sm":"text-base";return C`<div part="form-control" class="${$("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e||i?C`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${$(e?"inline-block":"hidden",c)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?C`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${$("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${$("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",b,this.open&&this.alignment==="left"?"rounded-bl-none":"",this.open&&this.alignment==="right"?"rounded-br-none":"")}"></div><sd-5-16-2-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${$("inline-flex relative w-full")}" sync="width" auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${$("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",f==="disabled"||f==="visuallyDisabled"?"text-neutral-500":"text-black")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${s?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${$("min-w-0 flex-grow focus:outline-none bg-transparent hover:cursor-pointer",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],c)}" autocomplete="off" spellcheck="false" placeholder="${this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder")}" ?disabled="${this.disabled}" ?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?C`<sd-5-16-2-icon part="invalid-icon" class="${$("text-error",l,u)}" library="_internal" name="risk"></sd-5-16-2-icon>`:""} ${this.showValidStyle&&this.styleOnValid?C`<sd-5-16-2-icon class="${$("text-success flex-shrink-0",l,u)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-5-16-2-icon>`:""}<sd-5-16-2-icon class="${$(n,l,u,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-5-16-2-icon>${this.renderCalendar()}</div></sd-5-16-2-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${$("text-sm text-neutral-700 mt-1",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};o.styles=[...R.styles,A`:host{display:inline-block;outline:2px solid transparent;outline-offset:2px;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}`],h([v({type:String,reflect:!0})],o.prototype,"locale",2),h([v({type:String})],o.prototype,"value",2),h([v({type:Boolean,reflect:!0})],o.prototype,"range",2),h([v({type:String})],o.prototype,"rangeStart",2),h([v({type:String})],o.prototype,"rangeEnd",2),h([v({type:Boolean})],o.prototype,"allowSameDayRange",2),h([v({type:String})],o.prototype,"min",2),h([v({type:String})],o.prototype,"max",2),h([v({type:Number})],o.prototype,"firstDayOfWeek",2),h([v({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],o.prototype,"disabledWeekends",2),h([v({attribute:"disabled-dates"})],o.prototype,"disabledDates",2),h([v({attribute:!1})],o.prototype,"isDateDisabled",2),h([v({type:String,reflect:!0})],o.prototype,"size",2),h([v({type:String})],o.prototype,"alignment",2),h([v({type:String,reflect:!0})],o.prototype,"label",2),h([v({type:String,attribute:"help-text",reflect:!0})],o.prototype,"helpText",2),h([v({type:Boolean,reflect:!0})],o.prototype,"disabled",2),h([v({type:Boolean,attribute:"visually-disabled"})],o.prototype,"visuallyDisabled",2),h([v({type:Boolean,reflect:!0,attribute:"style-on-valid"})],o.prototype,"styleOnValid",2),h([v({type:Boolean,reflect:!0})],o.prototype,"readonly",2),h([v({type:String,reflect:!0})],o.prototype,"placement",2),h([v({type:String,reflect:!0})],o.prototype,"placeholder",2),h([v({reflect:!0})],o.prototype,"name",2),h([v({type:String,reflect:!0})],o.prototype,"form",2),h([E()],o.prototype,"open",2),h([E()],o.prototype,"viewMonth",2),h([E()],o.prototype,"focusedDate",2),h([E()],o.prototype,"today",2),h([E()],o.prototype,"disabledDatesSet",2),h([E()],o.prototype,"previewEnd",2),h([E()],o.prototype,"statusNavText",2),h([E()],o.prototype,"statusSelectText",2),h([E()],o.prototype,"hasFocus",2),h([E()],o.prototype,"showValidStyle",2),h([E()],o.prototype,"showInvalidStyle",2),h([E()],o.prototype,"currentPlacement",2),h([E()],o.prototype,"inputValue",2),h([B("#invalid-message")],o.prototype,"invalidMessage",2),h([B("#input")],o.prototype,"input",2),h([P("locale")],o.prototype,"handleLocaleChange",1),h([P("disabledDates")],o.prototype,"handleDisabledDatesChange",1),h([P("value")],o.prototype,"handleValueChange",1),h([P("rangeStart"),P("rangeEnd")],o.prototype,"handleRangeChange",1),h([P(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],o.prototype,"handleDisabledChange",1),o=h([H("sd-5-16-2-datepicker")],o);export{o as a};
1
+ import{a}from"./chunk.635MGLIZ.js";import{b as N}from"./chunk.NRBNWX7R.js";import{a as W}from"./chunk.CGQ2BPPZ.js";import{a as $}from"./chunk.YEDQWNIV.js";import{a as q}from"./chunk.L6MCOH7T.js";import{a as P}from"./chunk.E2DRD2OX.js";import{a as H,b as v,c as E,d as B,h as R}from"./chunk.M6XINJ52.js";import{b as A,e as C,i as z}from"./chunk.RZUTJ36B.js";import{e as h}from"./chunk.TJOCV4DC.js";var o=class extends R{constructor(){super();this.localize=new q(this);this.hasSlotController=new W(this,"label","help-text","tooltip");this.formControlController=new N(this,{assumeInteractionOn:["sd-blur","sd-5-17-1-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.disabled=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=a.startOfDayLocal(new Date);this.disabledDatesSet=new Set;this.previewEnd=null;this.statusNavText="";this.statusSelectText="";this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.currentPlacement=this.placement;this.inputValue="";this.tabbingIntoGrid=!1;this.statusBumpCounter=0;this.onFocusOut=t=>{let e=t.relatedTarget;e&&this.contains(e)||(this.open&&(this.hide(),this.emit("sd-datepicker-close")),this.hasFocus=!1)};this.onFocusIn=t=>{if(this.disabled||this.visuallyDisabled)return;t.composedPath().some(i=>{var n,l;return i instanceof HTMLElement&&(((n=i.classList)==null?void 0:n.contains("nav"))||((l=i.classList)==null?void 0:l.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var l,u,f,b,c;if(this.disabled||this.visuallyDisabled){(l=t.preventDefault)==null||l.call(t),(u=t.stopPropagation)==null||u.call(t);return}let e=t.target,s=e.value,i=(f=e.selectionStart)!=null?f:s.length,n=(b=t.inputType)==null?void 0:b.startsWith("delete");if(this.range){let d=s.replace(/\D/g,""),r=d.slice(0,8),g=d.slice(8,16),m=this.buildDmyFromDigits(r),S=this.buildDmyFromDigits(g),M;r.length===0?M="":r.length<8?M=m:g.length>0?M=`${m} - ${S}`:M=n?m:`${m} -`;let I=this.countDigitsBeforeCaret(s,i),y;if(I<=8){let p=this.digitIndexToDmyCaretPos(Math.min(I,8));y=Math.min(p,m.length)}else{let p=r.length<8?m.length:m.length+3,D=Math.min(I-8,8),x=this.digitIndexToDmyCaretPos(D);y=p+Math.min(x,S.length)}this.inputValue=M;let L=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(m)){let p=this.dmyToIso(m),D=p?a.parseLocalISO(p):null;!!D&&!this.isDisabled(D)&&this.inMinMax(D)&&this.rangeStart!==p&&(this.rangeStart=p,this.previewEnd=null,this.viewMonth=new Date(D.getFullYear(),D.getMonth(),1),this.focusedDate=a.startOfDayLocal(D),L=!0)}else this.rangeStart&&(this.rangeStart=null,L=!0),this.rangeEnd&&(this.rangeEnd=null,L=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(S)&&this.rangeStart){let p=a.parseLocalISO(this.rangeStart),D=this.dmyToIso(S),x=D?a.parseLocalISO(D):null;if(!!x&&!this.isDisabled(x)&&this.inMinMax(x)){let[T,O]=a.compareDates(p,x)<=0?[p,x]:[x,p],Y=a.isSameDay(T,O);if((this.allowSameDayRange||!Y)&&!this.wouldRangeContainDisabled(T,O)){let V=a.toLocalISODate(a.startOfDayLocal(T)),k=a.toLocalISODate(a.startOfDayLocal(O));(this.rangeStart!==V||this.rangeEnd!==k)&&(this.rangeStart=V,this.rangeEnd=k,this.viewMonth=new Date(O.getFullYear(),O.getMonth(),1),this.focusedDate=a.startOfDayLocal(O),L=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,L=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),L&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var D;let p=(D=this.input)!=null?D:e;p&&(p.value=this.inputValue,p.setSelectionRange(y,y))})})}else{let d=e,r=d.value,g=(c=d.selectionStart)!=null?c:r.length,m=r.replace(/\D/g,"").slice(0,8),S=m.slice(0,2),M=m.slice(2,4),I=m.slice(4,8),y="";S.length>0&&(y+=S,S.length===2&&(y+=".")),M.length>0&&S.length===2&&(y+=M,M.length===2&&(y+=".")),I.length>0&&S.length===2&&M.length===2&&(y+=I),y=y.replace(/\.\.+/g,".");let L=this.inputValue||"";this.inputValue=y;let p=g,D=w=>{let V=[];for(let k=0;k<w.length;k++)w[k]==="."&&V.push(k);return V},x=D(L),F=D(y),T=x.filter(w=>w<g).length,Y=F.filter(w=>w<g).length-T;if(Y>0?p+=Y:!x.includes(g)&&F.includes(g)&&(p+=1),p=Math.min(Math.max(0,p),y.length),requestAnimationFrame(()=>{var V;let w=(V=this.input)!=null?V:d;w&&(w.value=this.inputValue,w.setSelectionRange(p,p))}),/^\d{2}\.\d{2}\.\d{4}$/.test(y)){let w=this.parseInputText(y);this.applyParsedInput(w)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let d=this.rangeStart?a.parseLocalISO(this.rangeStart):null,r=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;d&&!r?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}`):d&&r&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(d)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(r)}`)}else if(this.value){let d=a.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(d)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{this.currentPlacement=t.detail.placement};this.handleHeaderKeyDown=(t,e,s,i)=>{if(t.key==="Tab"&&!t.shiftKey){i&&(t.preventDefault(),t.stopPropagation(),this.tabbingIntoGrid=!0,this.focusInitialGridDay());return}(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e==="month"?this.setMonth(s):this.setYear(s))};this.onKeyDown=t=>{if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let e=t.key,s=!0,i=new Date(this.focusedDate);switch(e){case"ArrowLeft":i.setDate(i.getDate()-1);break;case"ArrowRight":i.setDate(i.getDate()+1);break;case"ArrowUp":i.setDate(i.getDate()-7);break;case"ArrowDown":i.setDate(i.getDate()+7);break;case"Escape":{this.previewEnd?(this.previewEnd=null,this.setNavStatus(this.localize.term("selectionCleared"))):this.range&&this.rangeStart&&!this.rangeEnd&&(this.rangeStart=null,this.setNavStatus(this.localize.term("selectionCleared")),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})),this.open&&(this.hide(),this.emit("sd-datepicker-close"));break}case"Enter":case" ":this.selectDate(this.focusedDate);break;default:s=!1}if(s){if(t.preventDefault(),i.getMonth()!==this.viewMonth.getMonth()||i.getFullYear()!==this.viewMonth.getFullYear()){this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1);let f=this.formatMonthYear(this.viewMonth);this.setNavStatus(f)}let l=a.startOfDayLocal(i);(!this.focusedDate||l.getTime()!==this.focusedDate.getTime())&&(this.focusedDate=l);let u=l.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(u),this.requestUpdate(),requestAnimationFrame(()=>{let f=this.shadowRoot,b=f==null?void 0:f.querySelector("button.day.focused");b==null||b.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?a.parseLocalISO(this.value):null,e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.range&&e?e:t!=null?t:a.startOfDayLocal(new Date);this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.clampDateToMonth(s,this.viewMonth),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?a.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=a.startOfDayLocal(t)),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var s;let e=this.input;if(e){e.value=(s=this.inputValue)!=null?s:"";let i=e.value.length;e.setSelectionRange(i,i)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?a.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null,s=t!=null?t:e;s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=a.startOfDayLocal(s)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var n;let i=this.input;if(i){i.value=(n=this.inputValue)!=null?n:"";let l=i.value.length;i.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return a.parseLocalISO(t)}inMinMax(t){let e=this.parseISO(this.min!==null?String(this.min):null),s=this.parseISO(this.max!==null?String(this.max):null);return!(e&&t<e||s&&t>s)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=a.toLocalISODate(a.startOfDayLocal(t));return this.disabledDatesSet.has(e)}isWeekend(t){let e=t.getDay();return e===0||e===6}isDisabled(t){var e;return!!(!this.inMinMax(t)||this.disabledWeekends&&this.isWeekend(t)||this.isInDisabledDates(t)||(e=this.isDateDisabled)!=null&&e.call(this,t))}setNavStatus(t){this.statusNavText=t}announceSelect(t,e=40){setTimeout(()=>{this.statusBumpCounter++;let s="\u200B".repeat(this.statusBumpCounter%3);this.statusSelectText=t+s},e)}formatSelectionLabel(t){if(this.locale==="de-DE")return t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"});let e=t.getDate(),s=this.ordinal(e),i=t.toLocaleDateString("en-US",{month:"long"}),n=t.getFullYear();return`${s} of ${i} ${n}`}ordinal(t){let e=["th","st","nd","rd"],s=t%100,i=e[(s-20)%10]||e[s]||e[0];return t+i}syncDisabledDatesSet(){let t=[];if(Array.isArray(this.disabledDates))t=this.disabledDates;else if(typeof this.disabledDates=="string"){let e=this.disabledDates.trim();if(e.startsWith("["))try{let s=JSON.parse(e);Array.isArray(s)&&(t=s)}catch(s){t=[]}else e.length>0&&(t=e.split(",").map(s=>s.trim()).filter(Boolean))}this.disabledDatesSet=new Set(t)}wouldRangeContainDisabled(t,e){let s=a.compareDates(t,e)<=0?a.startOfDayLocal(t):a.startOfDayLocal(e),i=a.compareDates(t,e)<=0?a.startOfDayLocal(e):a.startOfDayLocal(t),n=new Date(s);for(;a.compareDates(n,i)<=0;){if(this.isDisabled(n))return!0;n.setDate(n.getDate()+1)}return!1}termStartSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"startDateSelected")}termEndSelected(){var t,e;return(e=(t=this.localize)==null?void 0:t.term)==null?void 0:e.call(t,"endDateSelected")}isoToDmy(t){if(!t)return"";let e=a.parseLocalISO(t);if(!e)return"";let s=String(e.getDate()).padStart(2,"0"),i=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getFullYear());return`${s}.${i}.${n}`}dmyToIso(t){if(!t)return null;let e=t.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!e)return null;let s=Number(e[1]),i=Number(e[2]),n=Number(e[3]),l=new Date(n,i-1,s);if(l.getFullYear()!==n||l.getMonth()!==i-1||l.getDate()!==s)return null;let u=a.startOfDayLocal(l);return a.toLocalISODate(u)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),i=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let n=this.isoToDmy(this.rangeStart),l=this.isoToDmy(this.rangeEnd);return n&&l?`${n} ${i} ${l}`:n&&!l?`${n} ${i}`:""}parseInputText(t){var i,n;let e=t.trim();if(this.range){let l=e.split(/\s*-\s*/);if(l.length===1){let u=l[0];if(!u)return{start:null,end:null,valid:!0};let f=this.dmyToIso(u);return f?{start:f,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(l.length>=2){let u=(i=l[0])!=null?i:"",f=(n=l[1])!=null?n:"",b=u?this.dmyToIso(u):null,c=f?this.dmyToIso(f):null;return u&&!b?{start:null,end:null,valid:!1}:f&&!c?{start:null,end:null,valid:!1}:{start:b,end:c,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let s=this.dmyToIso(e);return s?{single:s,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var u,f,b,c;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=d=>{if(!d)return!0;let r=a.parseLocalISO(d);return!(!this.inMinMax(r)||this.isDisabled(r))},s=!1;if(this.range){let d=(u=t.start)!=null?u:null,r=(f=t.end)!=null?f:null;if(!e(d)||r&&!e(r))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let g=d?a.parseLocalISO(d):null,m=r?a.parseLocalISO(r):null;if(g&&m){if(a.compareDates(g,m)>0){let I=g;g=m,m=I}if(!this.allowSameDayRange&&a.isSameDay(g,m))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(g,m))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let S=g?a.toLocalISODate(a.startOfDayLocal(g)):null,M=m?a.toLocalISODate(a.startOfDayLocal(m)):null;if(this.rangeStart!==S||this.rangeEnd!==M){this.rangeStart=S,this.rangeEnd=M,this.previewEnd=null,s=!0;let I=(b=g!=null?g:m)!=null?b:this.today;this.viewMonth=new Date(I.getFullYear(),I.getMonth(),1),this.focusedDate=a.startOfDayLocal(I),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let i=(c=t.single)!=null?c:null;if(!e(i))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let n=i?a.parseLocalISO(i):null,l=n?a.toLocalISODate(a.startOfDayLocal(n)):null;return this.value!==l&&(this.value=l,s=!0,n&&(this.viewMonth=new Date(n.getFullYear(),n.getMonth(),1),this.focusedDate=a.startOfDayLocal(n)),this.emit("sd-select",{detail:{value:this.value,date:n!=null?n:null}})),this.showInvalidStyle=!1,this.showValidStyle=!!this.value,this.inputValue=this.formatInputValue(),s}buildDmyFromDigits(t){let e=t.slice(0,8),s=e.slice(0,2),i=e.slice(2,4),n=e.slice(4,8),l=s;return i.length&&(l+="."+i),n.length&&(l+="."+n),l}digitIndexToDmyCaretPos(t){return t<=2?t:t<=4?3+(t-2):6+(t-4)}countDigitsBeforeCaret(t,e){return t.slice(0,e).replace(/\D/g,"").length}handleOutsideClick(t){var s,i;((i=(s=t.composedPath)==null?void 0:s.call(t))!=null?i:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.emit("sd-focus")}setMonth(t){let e=new Date(this.viewMonth.getFullYear(),this.viewMonth.getMonth()+t,1);if(e.getMonth()===this.viewMonth.getMonth()&&e.getFullYear()===this.viewMonth.getFullYear())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-change",{detail:{month:this.viewMonth}})}setYear(t){let e=new Date(this.viewMonth.getFullYear()+t,this.viewMonth.getMonth(),1);if(e.getFullYear()===this.viewMonth.getFullYear()&&e.getMonth()===this.viewMonth.getMonth())return;this.viewMonth=e;let s=this.formatMonthYear(this.viewMonth);this.setNavStatus(s),this.emit("sd-month-year",{detail:{month:this.viewMonth}})}focusInitialGridDay(){let t=null;if(!this.range&&this.value){let s=a.parseLocalISO(this.value);s&&(t=a.startOfDayLocal(s))}if(this.range){let s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;i?t=a.startOfDayLocal(i):s&&(t=a.startOfDayLocal(s))}if(!(s=>s?s.getFullYear()===this.viewMonth.getFullYear()&&s.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(s):!1)(t)){let{weeks:s}=this.getMonthMatrix(this.viewMonth),i=s.flat().find(n=>n.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(n,this.today)&&!this.isDisabled(n));if(i)t=a.startOfDayLocal(i);else{let n=s.flat().find(l=>l.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(l));t=n?a.startOfDayLocal(n):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let s=this.shadowRoot,i=(s==null?void 0:s.querySelector("button.day.selected"))||(s==null?void 0:s.querySelector("button.day.focused"))||(s==null?void 0:s.querySelector('button.day[tabindex="0"]'))||(s==null?void 0:s.querySelector("button.day"));i==null||i.focus({preventScroll:!0})})}selectSingleDate(t){if(this.isDisabled(t))return;let e=a.startOfDayLocal(t),s=a.toLocalISODate(e);if(this.value===s)return;this.value=s;let i=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(i),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var l;let n=this.input;n&&(n.value=(l=this.inputValue)!=null?l:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let u=n.value.length;n.setSelectionRange(u,u)})}))})}selectRangeDate(t){let e=a.startOfDayLocal(t),s=this.rangeStart?a.parseLocalISO(this.rangeStart):null,i=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(!s&&!i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))});return}if(s&&!i){if(this.isDisabled(e))return;if(a.isSameDay(s,e)){if(!this.allowSameDayRange){this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let d=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${d}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var g;let r=this.input;r&&(r.value=(g=this.inputValue)!=null?g:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let m=r.value.length;r.setSelectionRange(m,m)})}))});return}this.rangeStart=a.toLocalISODate(e),this.rangeEnd=a.toLocalISODate(e),this.previewEnd=null;let c=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${c}`,40),this.announceSelect(`${this.termEndSelected()}: ${c}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var r;let d=this.input;d&&(d.value=(r=this.inputValue)!=null?r:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let g=d.value.length;d.setSelectionRange(g,g)})}))});return}let n=a.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(n,e))return;let[l,u]=a.compareDates(n,e)<=0?[n,e]:[e,n];this.rangeStart=a.toLocalISODate(l),this.rangeEnd=a.toLocalISODate(u),this.previewEnd=null;let f=this.formatSelectionLabel(l),b=this.formatSelectionLabel(u);this.announceSelect(`${this.termStartSelected()}: ${f}`,40),this.announceSelect(`${this.termEndSelected()}: ${b}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var d;let c=this.input;c&&(c.value=(d=this.inputValue)!=null?d:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let r=c.value.length;c.setSelectionRange(r,r)})}))});return}if(s&&i){if(this.isDisabled(e))return;this.rangeStart=a.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let n=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${n}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let l=this.input;l&&(l.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=l.value.length;l.setSelectionRange(f,f)})}))})}}selectDate(t){this.range?this.selectRangeDate(t):this.selectSingleDate(t)}getMonthMatrix(t){var b;let e=(b=this.firstDayOfWeek)!=null?b:1,s=new Date(t.getFullYear(),t.getMonth(),1),i=new Date(s),n=(s.getDay()-e+7)%7;i.setDate(s.getDate()-n);let l=[],u=i;for(let c=0;c<6;c++){let d=[];for(let r=0;r<7;r++)d.push(new Date(u)),u.setDate(u.getDate()+1);l.push(d)}let f=c=>c.every(d=>d.getMonth()!==t.getMonth());for(;l.length>0&&f(l[l.length-1]);)l.pop();return{weeks:l}}formatMonthYear(t){try{return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}catch(e){return`${t.toLocaleString(void 0,{month:"long"})} ${t.getFullYear()}`}}weekdayLabels(){var i;let t=(i=this.firstDayOfWeek)!=null?i:1,e=new Date(2021,7,1),s=[];for(let n=0;n<7;n++){let l=new Date(e);l.setDate(e.getDate()+(t+n)%7);try{s.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(l))}catch(u){s.push(l.toLocaleDateString(void 0,{weekday:"short"}))}}return s}getTabTargetDayForCurrentView(t){let e=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&a.isSameDay(i,this.today)&&!this.isDisabled(i));if(e)return a.startOfDayLocal(e);let s=t.flat().find(i=>i.getMonth()===this.viewMonth.getMonth()&&!this.isDisabled(i));return s?a.startOfDayLocal(s):null}onDayMouseEnter(t){if(!this.range)return;let e=this.rangeStart?a.parseLocalISO(this.rangeStart):null,s=this.rangeEnd?a.parseLocalISO(this.rangeEnd):null;if(e&&!s){let i=a.startOfDayLocal(t);this.previewEnd=this.isDisabled(i)?null:i,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){let{weeks:t}=this.getMonthMatrix(this.viewMonth),e=this.formatMonthYear(this.viewMonth),s=this.weekdayLabels(),i=this.value?this.parseISO(this.value):null,n=this.rangeStart?this.parseISO(this.rangeStart):null,l=this.rangeEnd?this.parseISO(this.rangeEnd):null,u=this.previewEnd,f=c=>!this.range||!n||l||!u?!1:a.isBetweenInclusive(c,n,u),b=this.getTabTargetDayForCurrentView(t);return C`<div part="datepicker" class="w-[284px] z-50 absolute top-full bg-white border-2 border-t-0 border-primary py-3 px-4 ${this.open?"block rounded-bl-default rounded-br-default":"hidden"} ${this.alignment==="left"?"left-0":"right-0"}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-year-button" @click="${()=>this.setYear(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",-1,!1)}" aria-label="${this.localize.term("previousYear")}"><sd-5-17-1-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-5-17-1-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-5-17-1-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-5-17-1-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base !text-primary" part="month-label" aria-live="polite">${e}</div><div class="flex items-center"><button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-month-button" @click="${()=>this.setMonth(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",1,!1)}" aria-label="${this.localize.term("nextMonth")}"><sd-5-17-1-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-5-17-1-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-5-17-1-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-5-17-1-icon></button></div></div><sd-5-17-1-divider></sd-5-17-1-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${e}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${s.map((c,d)=>C`<div role="columnheader" aria-colindex="${d+1}" part="weekday" class="cell head flex items-center justify-center font-bold text-black text-sm leading-none h-8" aria-label="${c}" title="${c}" id="${"col-"+(d+1)}">${c}</div>`)}</div>${t.map((c,d)=>C`<div class="grid-row grid grid-cols-7 ${d===0?"mt-2":""}" role="row" aria-rowindex="${d+2}">${c.map((r,g)=>{let m=r.getMonth()===this.viewMonth.getMonth(),S=this.isDisabled(r),M=a.isSameDay(r,this.focusedDate),I=a.isSameDay(r,this.today),y=!this.range&&i?a.isSameDay(r,i):!1,L=this.range&&n?a.isSameDay(r,n):!1,p=this.range&&l?a.isSameDay(r,l):!1,D=this.range&&n&&l?a.isBetweenInclusive(r,n,l):!1,x=f(r)&&!S,F=-1,T=b&&a.isSameDay(r,b);(this.tabbingIntoGrid&&T||!this.tabbingIntoGrid&&M)&&(F=0);let O=this.isWeekend(r),Y=r.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),w=L?this.localize.term("startDateSelected"):p?this.localize.term("endDateSelected"):void 0;return C`<button type="button" part="day" class="${$("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded-md w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",L||p?"hover:bg-primary-500":"hover:bg-primary-100 hover:text-primary-500",m?this.isInDisabledDates(r)?"out-month text-neutral-500":this.disabledWeekends&&O?"weekend-day text-neutral-500":"in-month text-primary":this.disabledWeekends&&O?"out-month weekend-day text-neutral-500":O?"out-month weekend-day text-neutral-700":"out-month text-neutral-700",y?"selected border-primary bg-primary text-white hover:bg-primary-500 hover:text-white":"",L?"bg-primary text-white rounded-l-md rounded-r-none":"",p?"bg-primary text-white range-end rounded-r-md rounded-l-none":"",D&&!L&&!p?"in-range selected bg-primary-100 text-primary-500 rounded-none hover:bg-primary-500 hover:text-white":"",!D&&x&&!L&&!p?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",I&&!y&&!L&&!p&&M?"today border-[1px] border-primary font-bold":"",S?"disabled cursor-not-allowed hover:bg-transparent":"",M&&!I?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${g+1}" aria-labelledby="${"col-"+(g+1)}" .tabIndex="${F}" ?disabled="${S||this.disabled}" aria-disabled="${S||this.visuallyDisabled||this.disabled?"true":"false"}" aria-selected="${y||D||L||p?"true":"false"}" aria-current="${I?"date":z}" aria-label="${Y}" aria-roledescription="${w!=null?w:z}" @focus="${()=>this.focusedDate=a.startOfDayLocal(r)}" @mouseenter="${()=>this.onDayMouseEnter(r)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=a.startOfDayLocal(r),this.selectDate(r)}}">${r.getDate()}</button>`})}</div>`)}</div></div>`}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,s=this.helpText?!0:!!t.helpText,i=!!t.tooltip,n=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",l={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],u={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],f=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",b={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[f],c=this.size==="sm"?"text-sm":"text-base";return C`<div part="form-control" class="${$("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e||i?C`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${$(e?"inline-block":"hidden",c)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?C`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${$("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${$("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",b,this.open&&this.alignment==="left"?"rounded-bl-none":"",this.open&&this.alignment==="right"?"rounded-br-none":"")}"></div><sd-5-17-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${$("inline-flex relative w-full")}" sync="width" auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${$("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",f==="disabled"||f==="visuallyDisabled"?"text-neutral-500":"text-black")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${s?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${$("min-w-0 flex-grow focus:outline-none bg-transparent hover:cursor-pointer",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],c)}" autocomplete="off" spellcheck="false" placeholder="${this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder")}" ?disabled="${this.disabled}" ?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?C`<sd-5-17-1-icon part="invalid-icon" class="${$("text-error",l,u)}" library="_internal" name="risk"></sd-5-17-1-icon>`:""} ${this.showValidStyle&&this.styleOnValid?C`<sd-5-17-1-icon class="${$("text-success flex-shrink-0",l,u)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-5-17-1-icon>`:""}<sd-5-17-1-icon class="${$(n,l,u,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-5-17-1-icon>${this.renderCalendar()}</div></sd-5-17-1-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${$("text-sm text-neutral-700 mt-1",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};o.styles=[...R.styles,A`:host{display:inline-block;outline:2px solid transparent;outline-offset:2px;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}`],h([v({type:String,reflect:!0})],o.prototype,"locale",2),h([v({type:String})],o.prototype,"value",2),h([v({type:Boolean,reflect:!0})],o.prototype,"range",2),h([v({type:String})],o.prototype,"rangeStart",2),h([v({type:String})],o.prototype,"rangeEnd",2),h([v({type:Boolean})],o.prototype,"allowSameDayRange",2),h([v({type:String})],o.prototype,"min",2),h([v({type:String})],o.prototype,"max",2),h([v({type:Number})],o.prototype,"firstDayOfWeek",2),h([v({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],o.prototype,"disabledWeekends",2),h([v({attribute:"disabled-dates"})],o.prototype,"disabledDates",2),h([v({attribute:!1})],o.prototype,"isDateDisabled",2),h([v({type:String,reflect:!0})],o.prototype,"size",2),h([v({type:String})],o.prototype,"alignment",2),h([v({type:String,reflect:!0})],o.prototype,"label",2),h([v({type:String,attribute:"help-text",reflect:!0})],o.prototype,"helpText",2),h([v({type:Boolean,reflect:!0})],o.prototype,"disabled",2),h([v({type:Boolean,attribute:"visually-disabled"})],o.prototype,"visuallyDisabled",2),h([v({type:Boolean,reflect:!0,attribute:"style-on-valid"})],o.prototype,"styleOnValid",2),h([v({type:Boolean,reflect:!0})],o.prototype,"readonly",2),h([v({type:String,reflect:!0})],o.prototype,"placement",2),h([v({type:String,reflect:!0})],o.prototype,"placeholder",2),h([v({reflect:!0})],o.prototype,"name",2),h([v({type:String,reflect:!0})],o.prototype,"form",2),h([E()],o.prototype,"open",2),h([E()],o.prototype,"viewMonth",2),h([E()],o.prototype,"focusedDate",2),h([E()],o.prototype,"today",2),h([E()],o.prototype,"disabledDatesSet",2),h([E()],o.prototype,"previewEnd",2),h([E()],o.prototype,"statusNavText",2),h([E()],o.prototype,"statusSelectText",2),h([E()],o.prototype,"hasFocus",2),h([E()],o.prototype,"showValidStyle",2),h([E()],o.prototype,"showInvalidStyle",2),h([E()],o.prototype,"currentPlacement",2),h([E()],o.prototype,"inputValue",2),h([B("#invalid-message")],o.prototype,"invalidMessage",2),h([B("#input")],o.prototype,"input",2),h([P("locale")],o.prototype,"handleLocaleChange",1),h([P("disabledDates")],o.prototype,"handleDisabledDatesChange",1),h([P("value")],o.prototype,"handleValueChange",1),h([P("rangeStart"),P("rangeEnd")],o.prototype,"handleRangeChange",1),h([P(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],o.prototype,"handleDisabledChange",1),o=h([H("sd-5-17-1-datepicker")],o);export{o as a};
@@ -1,4 +1,4 @@
1
- import{b as y,c as g}from"./chunk.NRBNWX7R.js";import{a as x}from"./chunk.CGQ2BPPZ.js";import{a}from"./chunk.CHU57RUD.js";import{a as u,b as m}from"./chunk.PVM2WKMA.js";import{a as l}from"./chunk.YEDQWNIV.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as h,b as i,c,d as b,g as v,h as d}from"./chunk.TIK62LTB.js";import{b as p}from"./chunk.RZUTJ36B.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends d{constructor(){super(...arguments);this.formControlController=new y(this,{form:r=>{if(r.hasAttribute("form")){let o=r.getRootNode(),s=r.getAttribute("form");return o.getElementById(s)}return r.closest("form")}});this.hasSlotController=new x(this,"[default]","icon-left","icon-right");this.invalid=!1;this.title="";this.variant="primary";this.inverted=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.loading=!1;this.type="button";this.name="";this.value="";this.href=""}get validity(){return this.isButton()?this.button.validity:g}get validationMessage(){return this.isButton()?this.button.validationMessage:""}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(r){if(this.disabled||this.loading||this.visuallyDisabled){r.preventDefault(),r.stopPropagation();return}this.type==="submit"&&this.formControlController.submit(this),this.type==="reset"&&this.formControlController.reset(this)}handleInvalid(r){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(r)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(r){this.button.focus(r)}blur(){this.button.blur()}checkValidity(){return this.isButton()?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.isButton()?this.button.reportValidity():!0}setCustomValidity(r){this.isButton()&&(this.button.setCustomValidity(r),this.formControlController.updateValidity())}render(){let r=this.isLink(),o=r?u`a`:u`button`,s={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right"),"icon-only":this._iconsInDefaultSlot.length>0},n=this.variant==="secondary";return m`<${o} part="base" class="${l(`group relative z-10 font-md no-underline
1
+ import{b as y,c as g}from"./chunk.NRBNWX7R.js";import{a as x}from"./chunk.CGQ2BPPZ.js";import{a}from"./chunk.CHU57RUD.js";import{a as u,b as m}from"./chunk.PVM2WKMA.js";import{a as l}from"./chunk.YEDQWNIV.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as h,b as i,c,d as b,g as v,h as d}from"./chunk.M6XINJ52.js";import{b as p}from"./chunk.RZUTJ36B.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends d{constructor(){super(...arguments);this.formControlController=new y(this,{form:r=>{if(r.hasAttribute("form")){let o=r.getRootNode(),s=r.getAttribute("form");return o.getElementById(s)}return r.closest("form")}});this.hasSlotController=new x(this,"[default]","icon-left","icon-right");this.invalid=!1;this.title="";this.variant="primary";this.inverted=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.loading=!1;this.type="button";this.name="";this.value="";this.href=""}get validity(){return this.isButton()?this.button.validity:g}get validationMessage(){return this.isButton()?this.button.validationMessage:""}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(r){if(this.disabled||this.loading||this.visuallyDisabled){r.preventDefault(),r.stopPropagation();return}this.type==="submit"&&this.formControlController.submit(this),this.type==="reset"&&this.formControlController.reset(this)}handleInvalid(r){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(r)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(r){this.button.focus(r)}blur(){this.button.blur()}checkValidity(){return this.isButton()?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.isButton()?this.button.reportValidity():!0}setCustomValidity(r){this.isButton()&&(this.button.setCustomValidity(r),this.formControlController.updateValidity())}render(){let r=this.isLink(),o=r?u`a`:u`button`,s={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right"),"icon-only":this._iconsInDefaultSlot.length>0},n=this.variant==="secondary";return m`<${o} part="base" class="${l(`group relative z-10 font-md no-underline
2
2
  w-full align-middle inline-flex items-stretch justify-center
3
3
  transition-colors duration-fast ease-in-out rounded-default
4
4
  select-none cursor-[inherit]`,this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.loading&&"relative cursor-wait",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed",s["icon-only"]&&"px-0 min-h-varspacing w-varspacing",{sm:`text-sm varspacing-8 ${n?"py-[0.281rem] px-[0.938rem]":"py-[0.344rem] px-4"}`,md:`text-base varspacing-10 ${n?"py-[0.438rem] px-[0.938rem]":"py-2 px-4"}`,lg:`text-base varspacing-12 ${n?"py-[0.688rem] px-[0.938rem]":"py-3 px-4"}`}[this.size],{primary:this.inverted?`${this.visuallyDisabled?"bg-neutral-500 text-white border-neutral-500 hover:bg-neutral-500 active:bg-neutral-500":"text-primary bg-white border-white hover:text-primary-500 active:text-primary-800"}
@@ -8,4 +8,4 @@ import{b as y,c as g}from"./chunk.NRBNWX7R.js";import{a as x}from"./chunk.CGQ2BP
8
8
  disabled:text-neutral-500 disabled:border-neutral-500`,tertiary:this.inverted?`border-transparent ${this.visuallyDisabled?"text-neutral-600 hover:text-neutral-600 active:text-neutral-600":"text-white hover:text-primary-100 active:text-primary-200"}
9
9
  disabled:text-neutral-600`:`border-transparent ${this.visuallyDisabled?"text-neutral-500 hover:text-neutral-500 active:text-neutral-500":"text-primary hover:text-primary-500 active:text-primary-800"}
10
10
  disabled:text-neutral-500`,cta:`text-white ${this.visuallyDisabled?"bg-neutral-500 border-neutral-500 hover:bg-neutral-500 active:bg-neutral-500":"bg-accent-500 border-transparent"}
11
- ${this.inverted?"disabled:bg-neutral-600 disabled:border-neutral-600":"disabled:bg-neutral-500 disabled:border-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${a(r?void 0:this.disabled)}" type="${a(r?void 0:this.type)}" title="${this.title}" name="${a(r?void 0:this.name)}" value="${a(r?void 0:this.value)}" href="${a(r?this.href:void 0)}" target="${a(r?this.target:void 0)}" download="${a(r?this.download:void 0)}" rel="${a(r&&this.target?"noreferrer noopener":void 0)}" role="${a(r?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><div part="motion-wrapper" class="${l("absolute inset-0 rounded-default -z-10 overflow-hidden pointer-events-none ",(this.disabled||this.visuallyDisabled)&&"hidden")}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${l("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div><div class="${l("absolute w-full h-full mt-[22%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div></div></div><slot name="icon-left" part="icon-left" class="${l("flex flex-auto items-center justify-end pointer-events-none",s["icon-only"]&&"hidden",this.loading&&"invisible",s["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${l("inline-flex items-center justify-center",s["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${l("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",s["icon-only"]&&"hidden",s["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?m`<sd-5-16-2-loader class="${l("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-5-16-2-loader>`:""}</${o}>`}};t.styles=[...d.styles,p`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto);z-index:0}::slotted(sd-5-16-2-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-5-16-2-icon),sd-5-16-2-loader{font-size:calc(var(--tw-varspacing)/2)}`],e([b("a, button")],t.prototype,"button",2),e([v({selector:"sd-5-16-2-icon"})],t.prototype,"_iconsInDefaultSlot",2),e([c()],t.prototype,"invalid",2),e([i({type:String,reflect:!0})],t.prototype,"title",2),e([i({type:String,reflect:!0})],t.prototype,"variant",2),e([i({type:Boolean,reflect:!0})],t.prototype,"inverted",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:Boolean,reflect:!0})],t.prototype,"loading",2),e([i({type:String,reflect:!0})],t.prototype,"type",2),e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i()],t.prototype,"value",2),e([i({type:String,reflect:!0})],t.prototype,"href",2),e([i({type:String,reflect:!0})],t.prototype,"target",2),e([i({reflect:!0})],t.prototype,"download",2),e([i({reflect:!0})],t.prototype,"form",2),e([i({attribute:"formaction"})],t.prototype,"formAction",2),e([i({attribute:"formenctype"})],t.prototype,"formEnctype",2),e([i({attribute:"formmethod"})],t.prototype,"formMethod",2),e([i({attribute:"formnovalidate",type:Boolean})],t.prototype,"formNoValidate",2),e([i({attribute:"formtarget"})],t.prototype,"formTarget",2),e([f("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=e([h("sd-5-16-2-button")],t);export{t as a};
11
+ ${this.inverted?"disabled:bg-neutral-600 disabled:border-neutral-600":"disabled:bg-neutral-500 disabled:border-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${a(r?void 0:this.disabled)}" type="${a(r?void 0:this.type)}" title="${this.title}" name="${a(r?void 0:this.name)}" value="${a(r?void 0:this.value)}" href="${a(r?this.href:void 0)}" target="${a(r?this.target:void 0)}" download="${a(r?this.download:void 0)}" rel="${a(r&&this.target?"noreferrer noopener":void 0)}" role="${a(r?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><div part="motion-wrapper" class="${l("absolute inset-0 rounded-default -z-10 overflow-hidden pointer-events-none ",(this.disabled||this.visuallyDisabled)&&"hidden")}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${l("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div><div class="${l("absolute w-full h-full mt-[22%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div></div></div><slot name="icon-left" part="icon-left" class="${l("flex flex-auto items-center justify-end pointer-events-none",s["icon-only"]&&"hidden",this.loading&&"invisible",s["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${l("inline-flex items-center justify-center",s["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${l("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",s["icon-only"]&&"hidden",s["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?m`<sd-5-17-1-loader class="${l("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-5-17-1-loader>`:""}</${o}>`}};t.styles=[...d.styles,p`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto);z-index:0}::slotted(sd-5-17-1-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-5-17-1-icon),sd-5-17-1-loader{font-size:calc(var(--tw-varspacing)/2)}`],e([b("a, button")],t.prototype,"button",2),e([v({selector:"sd-5-17-1-icon"})],t.prototype,"_iconsInDefaultSlot",2),e([c()],t.prototype,"invalid",2),e([i({type:String,reflect:!0})],t.prototype,"title",2),e([i({type:String,reflect:!0})],t.prototype,"variant",2),e([i({type:Boolean,reflect:!0})],t.prototype,"inverted",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:Boolean,reflect:!0})],t.prototype,"loading",2),e([i({type:String,reflect:!0})],t.prototype,"type",2),e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i()],t.prototype,"value",2),e([i({type:String,reflect:!0})],t.prototype,"href",2),e([i({type:String,reflect:!0})],t.prototype,"target",2),e([i({reflect:!0})],t.prototype,"download",2),e([i({reflect:!0})],t.prototype,"form",2),e([i({attribute:"formaction"})],t.prototype,"formAction",2),e([i({attribute:"formenctype"})],t.prototype,"formEnctype",2),e([i({attribute:"formmethod"})],t.prototype,"formMethod",2),e([i({attribute:"formnovalidate",type:Boolean})],t.prototype,"formNoValidate",2),e([i({attribute:"formtarget"})],t.prototype,"formTarget",2),e([f("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=e([h("sd-5-17-1-button")],t);export{t as a};
@@ -1 +1 @@
1
- import{a as p,b as c,c as _}from"./chunk.IVHEBGOY.js";import{a as A}from"./chunk.EJI65G6N.js";import{b as E}from"./chunk.NRBNWX7R.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as b}from"./chunk.CHU57RUD.js";import{a as m}from"./chunk.YEDQWNIV.js";import{a as w}from"./chunk.L6MCOH7T.js";import{a as C,b as h,d as f,e as D,h as T}from"./chunk.TIK62LTB.js";import{b as I,e as v}from"./chunk.RZUTJ36B.js";import{e as n}from"./chunk.TJOCV4DC.js";var l=class extends T{constructor(){super();this.formControlController=new E(this);this.hasSlotController=new M(this,"label","help-text");this.localize=new w(this);this.name="";this.label="";this.helpText="";this.min=0;this.max=100;this.step=1;this.disabled=!1;this.visuallyDisabled=!1;this.noTrackBar=!1;this.noTooltip=!1;this.defaultValue="";this._value=[0];this._rangeValues=new Map;this._lastChangeValue=[];this._hasFocus=!1;this.tooltipFormatter=this.localize.number.bind(this.localize)}set value(e){this._value=e?e.split(" ").map(Number).sort(p):[]}get value(){return this._value.slice().sort(p).join(" ")}set valueAsArray(e){let t=this._value;this._value=Array.isArray(e)?e.slice().sort(p):e||[],c(t,this._value)&&this.requestUpdate("value",t.join(" "))}get valueAsArray(){return[...this._value].sort(p)}get rtl(){return this.localize.dir()==="rtl"}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value)}willUpdate(e){super.willUpdate(e),this.min>this.max&&([this.min,this.max]=[this.max,this.min]),this.step>this.max-this.min&&(this.step=this.max-this.min),this.step<=0&&(this.step=1);let t=this._value.map(i=>{if(i<=this.min)return this.min;if(i>=this.max)return this.max;let a=this.min+this.step*Math.round((i-this.min)/this.step);return a>this.max?this.max:a});c(this._value,t)&&(this._value=t)}updated(e){super.updated(e);for(let t of this.thumbs){let i=+t.dataset.rangeId;this._rangeValues.has(i)&&this.moveThumb(t,this._rangeValues.get(i))}this.updateActiveTrack()}focus(e){let t=this.thumbs.item(0);t?t.focus(e):super.focus(e)}get validity(){return this.input.validity}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}updateTooltip(e){let t=+e.dataset.rangeId;if(!this._rangeValues.has(t))return;let i=this._rangeValues.get(t),a=e.parentElement;a.content=this.tooltipFormatter(i)}updateActiveTrack(){let{activeTrack:e}=this;if(!e)return;if(this.min===this.max){e.style.insetInlineStart="0%",e.style.insetInlineEnd="0%";return}if(this._value.length===1){let s=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",o=100*(this._value[0]-this.min)/(this.max-this.min);e.style.insetInlineStart=`min(${s}, ${o}%)`,e.style.insetInlineEnd=`min(calc(100% - ${s}), calc(100% - ${o}%))`;return}let t=this._value.slice().sort(p),i=100*(t[0]-this.min)/(this.max-this.min),a=100*(t[t.length-1]-this.min)/(this.max-this.min);e.style.insetInlineStart=`${i}%`,e.style.insetInlineEnd=`calc(100% - ${a}%)`}moveThumb(e,t){e.setAttribute("aria-valuenow",t.toString()),e.setAttribute("aria-valuetext",this.tooltipFormatter(t));let i=(t-this.min)/(this.max-this.min);e.style.insetInlineStart=`calc(${100*i}% - 8px)`,this.updateTooltip(e)}movementBoundariesForThumb(e,t){let i=this.valueAsArray,s=Array.from(this.thumbs).indexOf(e),o=i[s-1]||this.min,r=i[s+1]||this.max,u=t<o||t>r;return{finalValue:Math.max(o,Math.min(r,t)),isRestricted:u,nextValue:r,prevValue:o}}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}onClickTrack(e,t=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:i}=e,a=Array.from(this.thumbs),s=_(this.inputWrapper,i),o=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/o),u=a.reduce((g,x)=>{let V=this._rangeValues.get(+x.dataset.rangeId),L=this._rangeValues.get(+g.dataset.rangeId),$=Math.abs(V-r),k=Math.abs(L-r);return $===k?V<r?x:g:$<k?x:g}),d=+u.dataset.rangeId;if(!d)return;this._rangeValues.set(d,r),this.moveThumb(u,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),c(y,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change"));let F=new PointerEvent("pointerdown",e);t&&u.dispatchEvent(F)&&this.updateTooltip(u)}onClickTrackItem(e){this.onClickTrack(e,!1)}async onClickThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target;this.updateTooltip(t),t.dataset.pointerId&&t.releasePointerCapture(+t.dataset.pointerId),t.dataset.pointerId=e.pointerId.toString(),t.setPointerCapture(e.pointerId),t.classList.add("grabbed"),await t.parentElement.show()}onDragThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target,i=+t.dataset.rangeId;if(!this._rangeValues.has(i)||(t.dataset.pointerId?+t.dataset.pointerId:null)!==e.pointerId)return;let s=_(this.inputWrapper,e.clientX),o=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/o);if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:r}}).defaultPrevented)return;let d=this.movementBoundariesForThumb(t,r);d.isRestricted?(r=d.finalValue,t.style.zIndex=(3+this.thumbs.length).toFixed(0)):t.style.zIndex="3",this._rangeValues.set(i,r),this.moveThumb(t,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),c(y,this._value)&&this.emit("sd-input")}async onReleaseThumb(e){let t=e.target;!t.dataset.pointerId||e.pointerId!==+t.dataset.pointerId||(t.classList.remove("grabbed"),t.releasePointerCapture(e.pointerId),delete t.dataset.pointerId,c(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),await t.parentElement.hide())}onKeyPress(e){let t=e.target,i=+t.dataset.rangeId,a=this._rangeValues.get(i);if(a===void 0)return;let s=a;switch(e.key){case"ArrowUp":case"Up":s=Math.min(a+this.step,this.max);break;case"ArrowDown":case"Down":s=Math.max(a-this.step,this.min);break;case"ArrowLeft":case"Left":s=this.rtl?Math.min(a+this.step,this.max):Math.max(a-this.step,this.min);break;case"ArrowRight":case"Right":s=this.rtl?Math.max(a-this.step,this.min):Math.min(a+this.step,this.max);break;case"PageUp":s=Math.min(a+(this.max-this.min)/5,this.max);break;case"PageDown":s=Math.max(a-(this.max-this.min)/5,this.min);break;case"Home":s=this.min;break;case"End":s=this.max;break;default:return}if(s!==a){if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:s}}).defaultPrevented)return;let r=this.movementBoundariesForThumb(t,s);r.isRestricted&&(s=r.finalValue),this.moveThumb(t,s),this._rangeValues.set(i,s),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(t),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}e.preventDefault()}onBlur(e){var t;e.relatedTarget&&((t=this.shadowRoot)!=null&&t.contains(e.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(e){var i;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let t=e.target;(i=t==null?void 0:t.dataset)!=null&&i.rangeId&&this.updateTooltip(t)}renderThumbs(e){let t=this._value.length>1;return this._rangeValues.clear(),this._value.map((i,a)=>{let s=a+1;this._rangeValues.set(s,i);let o=`thumb-${s}`,r="",u="";return t?(u=e?`label aria-label-hidden ${o}`:`aria-label-hidden ${o}`,a===0?r=`${this.localize.term("minimum")} (${this.tooltipFormatter(i)})`:a===this._value.length-1?r=`${this.localize.term("maximum")} (${this.tooltipFormatter(i)})`:r=this.tooltipFormatter(i)):u=e?"label aria-label-hidden":"",v`<sd-5-16-2-tooltip hoist trigger="focus" disabled="${b(this.disabled||this.visuallyDisabled||this.noTooltip?!0:void 0)}"><div id="${o}" part="thumb" role="slider" tabindex="${this.disabled||this.visuallyDisabled?-1:0}" aria-disabled="${b(this.disabled||this.visuallyDisabled?"true":void 0)}" aria-labelledby="${u}" aria-label="${r}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${i}" aria-valuetext="${this.tooltipFormatter(i)}" data-range-id="${s}" @pointerdown="${this.onClickThumb}" @pointermove="${this.onDragThumb}" @pointerup="${this.onReleaseThumb}" @pointercancel="${this.onReleaseThumb}" @pointerleave="${this.onReleaseThumb}" @keydown="${this.onKeyPress}" @focus="${this.onFocusThumb}" class="${m("rounded-full absolute top-0 size-4 hover:cursor-grab after:-inset-2",this.disabled||this.visuallyDisabled?"bg-neutral-500 outline-none":"bg-primary hover:bg-primary-500 cursor-pointer focus-visible:focus-outline")}"></div></sd-5-16-2-tooltip>`})}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},t=!!(this.label||e.label),i=!!(this.helpText||e.helpText);return v`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${t?v`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${t?"false":"true"}" class="${m("w-full",t?"inline-block":"hidden")}" @click="${this.focus}"><slot name="label">${this.label}</slot></label></div>`:null} <label id="aria-label-hidden" class="sr-only">(${this._value.map(this.tooltipFormatter).join(" - ")})</label><div part="base" class="${m("inline-flex w-full",this.visuallyDisabled&&"focus-visible:focus-outline")}" tabindex="${b(this.visuallyDisabled?"0":void 0)}"><div part="input-wrapper" class="relative flex-1 mx-2 mb-[10px]"><input id="input" tabindex="-1" hidden @invalid="${this.handleInvalid}"><div part="track-wrapper" role="presentation" @pointerdown="${this.onClickTrack}" class="relative cursor-pointer -mx-2"><div part="track-click-helper" class="absolute -inset-y-2 inset-x-0"></div><div part="track" class="${m("h-1 my-[6px]",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-neutral-400")}"></div><div part="active-track" hidden="${b(this.noTrackBar?!0:void 0)}" class="${m("absolute top-0 h-1",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-primary")}"></div></div>${this.renderThumbs(t)}<div class="-mt-[10px]" part="scale-ticks" @pointerdown="${this.onClickTrackItem}" role="presentation"><slot name="scale-ticks"></slot></div></div></div><slot></slot><slot name="help-text" part="form-control-help-text" id="help-text" class="${m("text-sm text-neutral-700 mt-1",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot></div>`}};l.styles=[...T.styles,I`[part=base]{touch-action:none;-webkit-touch-callout:none}[part=thumb].grabbed{--tw-bg-opacity:1!important;background-color:rgb(var(--sd-color-primary-800,5 21 48)/var(--tw-bg-opacity,1))!important}`],n([f("#input")],l.prototype,"input",2),n([f('[part="active-track"]')],l.prototype,"activeTrack",2),n([f('[part="input-wrapper"]')],l.prototype,"inputWrapper",2),n([D('[part="thumb"]')],l.prototype,"thumbs",2),n([h({attribute:!1})],l.prototype,"tooltipFormatter",2),n([h({type:String,reflect:!0})],l.prototype,"name",2),n([h({type:String,reflect:!0})],l.prototype,"label",2),n([h({attribute:"help-text",reflect:!0})],l.prototype,"helpText",2),n([h({type:Number,reflect:!0})],l.prototype,"min",2),n([h({type:Number,reflect:!0})],l.prototype,"max",2),n([h({type:Number,reflect:!0})],l.prototype,"step",2),n([h({type:Boolean,reflect:!0})],l.prototype,"disabled",2),n([h({attribute:"visually-disabled",type:Boolean,reflect:!0})],l.prototype,"visuallyDisabled",2),n([h({attribute:"no-track-bar",type:Boolean,reflect:!0})],l.prototype,"noTrackBar",2),n([h({attribute:"no-tooltip",type:Boolean,reflect:!0})],l.prototype,"noTooltip",2),n([A()],l.prototype,"defaultValue",2),n([h({type:String})],l.prototype,"value",1),l=n([C("sd-5-16-2-range")],l);export{l as a};
1
+ import{a as p,b as c,c as _}from"./chunk.IVHEBGOY.js";import{a as A}from"./chunk.EJI65G6N.js";import{b as E}from"./chunk.NRBNWX7R.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as b}from"./chunk.CHU57RUD.js";import{a as m}from"./chunk.YEDQWNIV.js";import{a as w}from"./chunk.L6MCOH7T.js";import{a as C,b as h,d as f,e as D,h as T}from"./chunk.M6XINJ52.js";import{b as I,e as v}from"./chunk.RZUTJ36B.js";import{e as n}from"./chunk.TJOCV4DC.js";var l=class extends T{constructor(){super();this.formControlController=new E(this);this.hasSlotController=new M(this,"label","help-text");this.localize=new w(this);this.name="";this.label="";this.helpText="";this.min=0;this.max=100;this.step=1;this.disabled=!1;this.visuallyDisabled=!1;this.noTrackBar=!1;this.noTooltip=!1;this.defaultValue="";this._value=[0];this._rangeValues=new Map;this._lastChangeValue=[];this._hasFocus=!1;this.tooltipFormatter=this.localize.number.bind(this.localize)}set value(e){this._value=e?e.split(" ").map(Number).sort(p):[]}get value(){return this._value.slice().sort(p).join(" ")}set valueAsArray(e){let t=this._value;this._value=Array.isArray(e)?e.slice().sort(p):e||[],c(t,this._value)&&this.requestUpdate("value",t.join(" "))}get valueAsArray(){return[...this._value].sort(p)}get rtl(){return this.localize.dir()==="rtl"}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value)}willUpdate(e){super.willUpdate(e),this.min>this.max&&([this.min,this.max]=[this.max,this.min]),this.step>this.max-this.min&&(this.step=this.max-this.min),this.step<=0&&(this.step=1);let t=this._value.map(i=>{if(i<=this.min)return this.min;if(i>=this.max)return this.max;let a=this.min+this.step*Math.round((i-this.min)/this.step);return a>this.max?this.max:a});c(this._value,t)&&(this._value=t)}updated(e){super.updated(e);for(let t of this.thumbs){let i=+t.dataset.rangeId;this._rangeValues.has(i)&&this.moveThumb(t,this._rangeValues.get(i))}this.updateActiveTrack()}focus(e){let t=this.thumbs.item(0);t?t.focus(e):super.focus(e)}get validity(){return this.input.validity}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}updateTooltip(e){let t=+e.dataset.rangeId;if(!this._rangeValues.has(t))return;let i=this._rangeValues.get(t),a=e.parentElement;a.content=this.tooltipFormatter(i)}updateActiveTrack(){let{activeTrack:e}=this;if(!e)return;if(this.min===this.max){e.style.insetInlineStart="0%",e.style.insetInlineEnd="0%";return}if(this._value.length===1){let s=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",o=100*(this._value[0]-this.min)/(this.max-this.min);e.style.insetInlineStart=`min(${s}, ${o}%)`,e.style.insetInlineEnd=`min(calc(100% - ${s}), calc(100% - ${o}%))`;return}let t=this._value.slice().sort(p),i=100*(t[0]-this.min)/(this.max-this.min),a=100*(t[t.length-1]-this.min)/(this.max-this.min);e.style.insetInlineStart=`${i}%`,e.style.insetInlineEnd=`calc(100% - ${a}%)`}moveThumb(e,t){e.setAttribute("aria-valuenow",t.toString()),e.setAttribute("aria-valuetext",this.tooltipFormatter(t));let i=(t-this.min)/(this.max-this.min);e.style.insetInlineStart=`calc(${100*i}% - 8px)`,this.updateTooltip(e)}movementBoundariesForThumb(e,t){let i=this.valueAsArray,s=Array.from(this.thumbs).indexOf(e),o=i[s-1]||this.min,r=i[s+1]||this.max,u=t<o||t>r;return{finalValue:Math.max(o,Math.min(r,t)),isRestricted:u,nextValue:r,prevValue:o}}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}onClickTrack(e,t=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:i}=e,a=Array.from(this.thumbs),s=_(this.inputWrapper,i),o=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/o),u=a.reduce((g,x)=>{let V=this._rangeValues.get(+x.dataset.rangeId),L=this._rangeValues.get(+g.dataset.rangeId),$=Math.abs(V-r),k=Math.abs(L-r);return $===k?V<r?x:g:$<k?x:g}),d=+u.dataset.rangeId;if(!d)return;this._rangeValues.set(d,r),this.moveThumb(u,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),c(y,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change"));let F=new PointerEvent("pointerdown",e);t&&u.dispatchEvent(F)&&this.updateTooltip(u)}onClickTrackItem(e){this.onClickTrack(e,!1)}async onClickThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target;this.updateTooltip(t),t.dataset.pointerId&&t.releasePointerCapture(+t.dataset.pointerId),t.dataset.pointerId=e.pointerId.toString(),t.setPointerCapture(e.pointerId),t.classList.add("grabbed"),await t.parentElement.show()}onDragThumb(e){if(this.disabled||this.visuallyDisabled)return;let t=e.target,i=+t.dataset.rangeId;if(!this._rangeValues.has(i)||(t.dataset.pointerId?+t.dataset.pointerId:null)!==e.pointerId)return;let s=_(this.inputWrapper,e.clientX),o=this.step/(this.max-this.min),r=this.min+this.step*Math.round(s/o);if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:r}}).defaultPrevented)return;let d=this.movementBoundariesForThumb(t,r);d.isRestricted?(r=d.finalValue,t.style.zIndex=(3+this.thumbs.length).toFixed(0)):t.style.zIndex="3",this._rangeValues.set(i,r),this.moveThumb(t,r);let y=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),c(y,this._value)&&this.emit("sd-input")}async onReleaseThumb(e){let t=e.target;!t.dataset.pointerId||e.pointerId!==+t.dataset.pointerId||(t.classList.remove("grabbed"),t.releasePointerCapture(e.pointerId),delete t.dataset.pointerId,c(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),await t.parentElement.hide())}onKeyPress(e){let t=e.target,i=+t.dataset.rangeId,a=this._rangeValues.get(i);if(a===void 0)return;let s=a;switch(e.key){case"ArrowUp":case"Up":s=Math.min(a+this.step,this.max);break;case"ArrowDown":case"Down":s=Math.max(a-this.step,this.min);break;case"ArrowLeft":case"Left":s=this.rtl?Math.min(a+this.step,this.max):Math.max(a-this.step,this.min);break;case"ArrowRight":case"Right":s=this.rtl?Math.max(a-this.step,this.min):Math.min(a+this.step,this.max);break;case"PageUp":s=Math.min(a+(this.max-this.min)/5,this.max);break;case"PageDown":s=Math.max(a-(this.max-this.min)/5,this.min);break;case"Home":s=this.min;break;case"End":s=this.max;break;default:return}if(s!==a){if(this.emit("sd-move",{cancelable:!0,detail:{element:t,value:s}}).defaultPrevented)return;let r=this.movementBoundariesForThumb(t,s);r.isRestricted&&(s=r.finalValue),this.moveThumb(t,s),this._rangeValues.set(i,s),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(t),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}e.preventDefault()}onBlur(e){var t;e.relatedTarget&&((t=this.shadowRoot)!=null&&t.contains(e.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(e){var i;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let t=e.target;(i=t==null?void 0:t.dataset)!=null&&i.rangeId&&this.updateTooltip(t)}renderThumbs(e){let t=this._value.length>1;return this._rangeValues.clear(),this._value.map((i,a)=>{let s=a+1;this._rangeValues.set(s,i);let o=`thumb-${s}`,r="",u="";return t?(u=e?`label aria-label-hidden ${o}`:`aria-label-hidden ${o}`,a===0?r=`${this.localize.term("minimum")} (${this.tooltipFormatter(i)})`:a===this._value.length-1?r=`${this.localize.term("maximum")} (${this.tooltipFormatter(i)})`:r=this.tooltipFormatter(i)):u=e?"label aria-label-hidden":"",v`<sd-5-17-1-tooltip hoist trigger="focus" disabled="${b(this.disabled||this.visuallyDisabled||this.noTooltip?!0:void 0)}"><div id="${o}" part="thumb" role="slider" tabindex="${this.disabled||this.visuallyDisabled?-1:0}" aria-disabled="${b(this.disabled||this.visuallyDisabled?"true":void 0)}" aria-labelledby="${u}" aria-label="${r}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${i}" aria-valuetext="${this.tooltipFormatter(i)}" data-range-id="${s}" @pointerdown="${this.onClickThumb}" @pointermove="${this.onDragThumb}" @pointerup="${this.onReleaseThumb}" @pointercancel="${this.onReleaseThumb}" @pointerleave="${this.onReleaseThumb}" @keydown="${this.onKeyPress}" @focus="${this.onFocusThumb}" class="${m("rounded-full absolute top-0 size-4 hover:cursor-grab after:-inset-2",this.disabled||this.visuallyDisabled?"bg-neutral-500 outline-none":"bg-primary hover:bg-primary-500 cursor-pointer focus-visible:focus-outline")}"></div></sd-5-17-1-tooltip>`})}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},t=!!(this.label||e.label),i=!!(this.helpText||e.helpText);return v`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${t?v`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${t?"false":"true"}" class="${m("w-full",t?"inline-block":"hidden")}" @click="${this.focus}"><slot name="label">${this.label}</slot></label></div>`:null} <label id="aria-label-hidden" class="sr-only">(${this._value.map(this.tooltipFormatter).join(" - ")})</label><div part="base" class="${m("inline-flex w-full",this.visuallyDisabled&&"focus-visible:focus-outline")}" tabindex="${b(this.visuallyDisabled?"0":void 0)}"><div part="input-wrapper" class="relative flex-1 mx-2 mb-[10px]"><input id="input" tabindex="-1" hidden @invalid="${this.handleInvalid}"><div part="track-wrapper" role="presentation" @pointerdown="${this.onClickTrack}" class="relative cursor-pointer -mx-2"><div part="track-click-helper" class="absolute -inset-y-2 inset-x-0"></div><div part="track" class="${m("h-1 my-[6px]",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-neutral-400")}"></div><div part="active-track" hidden="${b(this.noTrackBar?!0:void 0)}" class="${m("absolute top-0 h-1",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-primary")}"></div></div>${this.renderThumbs(t)}<div class="-mt-[10px]" part="scale-ticks" @pointerdown="${this.onClickTrackItem}" role="presentation"><slot name="scale-ticks"></slot></div></div></div><slot></slot><slot name="help-text" part="form-control-help-text" id="help-text" class="${m("text-sm text-neutral-700 mt-1",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot></div>`}};l.styles=[...T.styles,I`[part=base]{touch-action:none;-webkit-touch-callout:none}[part=thumb].grabbed{--tw-bg-opacity:1!important;background-color:rgb(var(--sd-color-primary-800,5 21 48)/var(--tw-bg-opacity,1))!important}`],n([f("#input")],l.prototype,"input",2),n([f('[part="active-track"]')],l.prototype,"activeTrack",2),n([f('[part="input-wrapper"]')],l.prototype,"inputWrapper",2),n([D('[part="thumb"]')],l.prototype,"thumbs",2),n([h({attribute:!1})],l.prototype,"tooltipFormatter",2),n([h({type:String,reflect:!0})],l.prototype,"name",2),n([h({type:String,reflect:!0})],l.prototype,"label",2),n([h({attribute:"help-text",reflect:!0})],l.prototype,"helpText",2),n([h({type:Number,reflect:!0})],l.prototype,"min",2),n([h({type:Number,reflect:!0})],l.prototype,"max",2),n([h({type:Number,reflect:!0})],l.prototype,"step",2),n([h({type:Boolean,reflect:!0})],l.prototype,"disabled",2),n([h({attribute:"visually-disabled",type:Boolean,reflect:!0})],l.prototype,"visuallyDisabled",2),n([h({attribute:"no-track-bar",type:Boolean,reflect:!0})],l.prototype,"noTrackBar",2),n([h({attribute:"no-tooltip",type:Boolean,reflect:!0})],l.prototype,"noTooltip",2),n([A()],l.prototype,"defaultValue",2),n([h({type:String})],l.prototype,"value",1),l=n([C("sd-5-17-1-range")],l);export{l as a};
@@ -1 +1 @@
1
- import{a as p}from"./chunk.HJ4O4XQA.js";import{a as d,b as u}from"./chunk.CGQ2BPPZ.js";import{a as l}from"./chunk.YEDQWNIV.js";import{a as r}from"./chunk.E2DRD2OX.js";import{a as h,b as a,d as o,h as n}from"./chunk.TIK62LTB.js";import{b as c,e as i}from"./chunk.RZUTJ36B.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.type="normal";this.checked=!1;this.disabled=!1;this.value="";this.chevron=!1;this.hasSlotController=new d(this,"submenu");this.submenuController=new p(this,this.hasSlotController);this.handleHostClick=s=>{this.disabled&&(s.preventDefault(),s.stopImmediatePropagation())};this.handleMouseOver=s=>{this.focus(),s.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}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}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.setAttribute("tabindex",this.disabled?"-1":"0")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return u(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){let s=this.submenuController.isExpanded(),b={label:this.hasSlotController.test("[default]"),iconIndent:this.hasSlotController.test("icon-indent")};return i`<div id="anchor" part="base" class="${l("relative flex items-stretch whitespace-nowrap py-3 px-4 no-wrap",this.disabled?"outline-none cursor-not-allowed text-neutral-500 hover:bg-transparent":"cursor-pointer text-primary hover:bg-neutral-200",this.isSubmenu()&&s&&"submenu-expanded")}" .disabled="${this.disabled}" ?aria-haspopup="${this.isSubmenu()}" ?aria-expanded="${!!s}">${this.type==="checkbox"?i`<span part="checked-icon" class="${l("flex items-center justify-center grow-0 shrink-0 basis-auto",this.checked?"visible":"invisible")}"><sd-5-16-2-icon name="status-check" library="sd-status-assets" aria-hidden="true"></sd-5-16-2-icon></span>`:""} ${b.iconIndent?i`<slot name="icon-indent" part="icon-indent" class="flex items-center grow-0 shrink-0 basis-auto mr-2"></slot>`:""}<slot part="label" class="inline-flex grow shrink basis-auto text-ellipsis overflow-hidden" @slotchange="${this.handleDefaultSlotChange}"></slot>${this.chevron||this.isSubmenu()?i`<span part="submenu-icon" class="flex items-center justify-center grow-0 shrink-0 basis-auto ml-3"><sd-5-16-2-icon name="chevron-right" library="_internal" aria-hidden="true" class="h-6 w-6"></sd-5-16-2-icon></span>`:""} ${this.submenuController.renderSubmenu()}</div>`}};e.styles=[...n.styles,c`:host{--submenu-offset:-6px;display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}::slotted(sd-5-16-2-icon){height:var(--sd-spacing-6,1.5rem);width:var(--sd-spacing-6,1.5rem)}[part=checked-icon]{margin-right:var(--sd-spacing-3,.75rem)}.submenu-expanded:after{bottom:var(--sd-spacing-0,0);left:var(--sd-spacing-0,0);position:fixed;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);z-index:calc(var(z-dropdown) - 1);--tw-content:"";clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0));content:var(--tw-content)}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:-2px;outline-style:solid;outline-width:2px}:host(:hover) [part=base]{outline:2px solid transparent;outline-offset:2px}sd-5-16-2-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));margin-left:var(--submenu-offset)}::slotted(sd-5-16-2-menu){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important}`],t([o("slot:not([name])")],e.prototype,"defaultSlot",2),t([o('part="base"')],e.prototype,"menuItem",2),t([a()],e.prototype,"type",2),t([a({type:Boolean,reflect:!0})],e.prototype,"checked",2),t([a({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([a()],e.prototype,"value",2),t([a({type:Boolean,reflect:!0})],e.prototype,"chevron",2),t([r("checked")],e.prototype,"handleCheckedChange",1),t([r("disabled")],e.prototype,"handleDisabledChange",1),t([r("type")],e.prototype,"handleTypeChange",1),e=t([h("sd-5-16-2-menu-item")],e);export{e as a};
1
+ import{a as p}from"./chunk.HJ4O4XQA.js";import{a as d,b as u}from"./chunk.CGQ2BPPZ.js";import{a as l}from"./chunk.YEDQWNIV.js";import{a as r}from"./chunk.E2DRD2OX.js";import{a as h,b as a,d as o,h as n}from"./chunk.M6XINJ52.js";import{b as c,e as i}from"./chunk.RZUTJ36B.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.type="normal";this.checked=!1;this.disabled=!1;this.value="";this.chevron=!1;this.hasSlotController=new d(this,"submenu");this.submenuController=new p(this,this.hasSlotController);this.handleHostClick=s=>{this.disabled&&(s.preventDefault(),s.stopImmediatePropagation())};this.handleMouseOver=s=>{this.focus(),s.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}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}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.setAttribute("tabindex",this.disabled?"-1":"0")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return u(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){let s=this.submenuController.isExpanded(),b={label:this.hasSlotController.test("[default]"),iconIndent:this.hasSlotController.test("icon-indent")};return i`<div id="anchor" part="base" class="${l("relative flex items-stretch whitespace-nowrap py-3 px-4 no-wrap",this.disabled?"outline-none cursor-not-allowed text-neutral-500 hover:bg-transparent":"cursor-pointer text-primary hover:bg-neutral-200",this.isSubmenu()&&s&&"submenu-expanded")}" .disabled="${this.disabled}" ?aria-haspopup="${this.isSubmenu()}" ?aria-expanded="${!!s}">${this.type==="checkbox"?i`<span part="checked-icon" class="${l("flex items-center justify-center grow-0 shrink-0 basis-auto",this.checked?"visible":"invisible")}"><sd-5-17-1-icon name="status-check" library="sd-status-assets" aria-hidden="true"></sd-5-17-1-icon></span>`:""} ${b.iconIndent?i`<slot name="icon-indent" part="icon-indent" class="flex items-center grow-0 shrink-0 basis-auto mr-2"></slot>`:""}<slot part="label" class="inline-flex grow shrink basis-auto text-ellipsis overflow-hidden" @slotchange="${this.handleDefaultSlotChange}"></slot>${this.chevron||this.isSubmenu()?i`<span part="submenu-icon" class="flex items-center justify-center grow-0 shrink-0 basis-auto ml-3"><sd-5-17-1-icon name="chevron-right" library="_internal" aria-hidden="true" class="h-6 w-6"></sd-5-17-1-icon></span>`:""} ${this.submenuController.renderSubmenu()}</div>`}};e.styles=[...n.styles,c`:host{--submenu-offset:-6px;display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}::slotted(sd-5-17-1-icon){height:var(--sd-spacing-6,1.5rem);width:var(--sd-spacing-6,1.5rem)}[part=checked-icon]{margin-right:var(--sd-spacing-3,.75rem)}.submenu-expanded:after{bottom:var(--sd-spacing-0,0);left:var(--sd-spacing-0,0);position:fixed;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);z-index:calc(var(z-dropdown) - 1);--tw-content:"";clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0));content:var(--tw-content)}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:-2px;outline-style:solid;outline-width:2px}:host(:hover) [part=base]{outline:2px solid transparent;outline-offset:2px}sd-5-17-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));margin-left:var(--submenu-offset)}::slotted(sd-5-17-1-menu){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important}`],t([o("slot:not([name])")],e.prototype,"defaultSlot",2),t([o('part="base"')],e.prototype,"menuItem",2),t([a()],e.prototype,"type",2),t([a({type:Boolean,reflect:!0})],e.prototype,"checked",2),t([a({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([a()],e.prototype,"value",2),t([a({type:Boolean,reflect:!0})],e.prototype,"chevron",2),t([r("checked")],e.prototype,"handleCheckedChange",1),t([r("disabled")],e.prototype,"handleDisabledChange",1),t([r("type")],e.prototype,"handleTypeChange",1),e=t([h("sd-5-17-1-menu-item")],e);export{e as a};
@@ -1,3 +1,3 @@
1
- import{a as T,b as M}from"./chunk.G7HKVXLR.js";import{c as L}from"./chunk.3L472FD4.js";import{a as h,c as u}from"./chunk.SKUMYG4O.js";import{a as m}from"./chunk.KLRPP4NQ.js";import{a as k}from"./chunk.YEDQWNIV.js";import{a as v}from"./chunk.L6MCOH7T.js";import{a as E}from"./chunk.E2DRD2OX.js";import{a as w,b as o,d as r,h as d}from"./chunk.TIK62LTB.js";import{b as y,e as b}from"./chunk.RZUTJ36B.js";import{b as l,e as p}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";function A(c,f){let e=c;for(;e;){if(e.matches(f))return e;if(e.parentElement)e=e.parentElement;else if(e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else break}return null}var n=class extends d{constructor(){super(...arguments);this.localize=new v(this);this.open=!1;this.rounded=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.noAutoSize=!1;this.noFlip=!1;this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}getAccessibleTrigger(){let t=this.trigger.assignedElements({flatten:!0}).find(a=>M(a).start),s=null;if(t)switch(t.tagName.toLowerCase()){case"sd-5-16-2-button":case"sd-5-16-2-icon-button":s=t.button;break;case"sd-5-16-2-navigation-item":s=t.button;break;default:s=t}return s}updateAccessibleTrigger(){let e=this.getAccessibleTrigger();e&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded",this.open?"true":"false"))}focusOnTrigger(){let e=this.getAccessibleTrigger();typeof(e==null?void 0:e.focus)=="function"&&e.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find(e=>e.tagName.toLowerCase()==="sd-5-16-2-menu")}handleKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(e){var t;if(e.key==="Tab"){if(this.open&&((t=document.activeElement)==null?void 0:t.tagName.toLowerCase())==="sd-5-16-2-menu-item"){e.preventDefault(),this.hide(),this.focusOnTrigger();return}setTimeout(()=>{let s=T();(!s||!this.containingElement||A(s,this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide()})}}handleDocumentMouseDown(e){let t=e.composedPath();this.containingElement&&!t.includes(this.containingElement)&&this.hide()}handleMenuItemActivate(e){let t=e.target;L(t,this.panel)}handlePanelSelect(e){let t=e.target;!this.stayOpenOnSelect&&t.tagName.toLowerCase()==="sd-5-16-2-menu"&&(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(e){if(e.key==="Escape"&&this.open){e.stopPropagation(),this.focusOnTrigger(),this.hide();return}if([" ","Enter"].includes(e.key)){e.preventDefault(),this.handleTriggerClick();return}let t=this.getMenu();if(t){let s=t.defaultSlot.assignedElements({flatten:!0}),a=s.find(C=>!C.disabled)||s[0],g=s[s.length-1];["ArrowDown","ArrowUp","Home","End"].includes(e.key)&&(e.preventDefault(),this.open||this.show(),s.length>0&&requestAnimationFrame(()=>{(e.key==="ArrowDown"||e.key==="Home")&&(t.setCurrentItem(a),a.focus()),(e.key==="ArrowUp"||e.key==="End")&&(t.setCurrentItem(g),g.focus())}))}}handleTriggerKeyUp(e){e.key===" "&&e.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}async show(){if(!this.open)return this.open=!0,m(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,m(this,"sd-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("sd-activate",this.handleMenuItemActivate),this.panel.addEventListener("sd-5-16-2-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("sd-activate",this.handleMenuItemActivate),this.panel.removeEventListener("sd-5-16-2-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open){this.emit("sd-show"),this.addOpenListeners(),await p(this),this.panel.hidden=!1,this.popup.active=!0;let{keyframes:e,options:t}=u(this,"dropdown.show",{dir:this.localize.dir()});await l(this.popup.popup,e,t),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await p(this);let{keyframes:e,options:t}=u(this,"dropdown.hide",{dir:this.localize.dir()});await l(this.popup.popup,e,t),this.panel.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}render(){return b`<sd-5-16-2-popup part="base" id="dropdown" exportparts="
1
+ import{a as T,b as M}from"./chunk.G7HKVXLR.js";import{c as L}from"./chunk.3L472FD4.js";import{a as h,c as u}from"./chunk.SKUMYG4O.js";import{a as m}from"./chunk.KLRPP4NQ.js";import{a as k}from"./chunk.YEDQWNIV.js";import{a as v}from"./chunk.L6MCOH7T.js";import{a as E}from"./chunk.E2DRD2OX.js";import{a as w,b as o,d as r,h as d}from"./chunk.M6XINJ52.js";import{b as y,e as b}from"./chunk.RZUTJ36B.js";import{b as l,e as p}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";function A(c,f){let e=c;for(;e;){if(e.matches(f))return e;if(e.parentElement)e=e.parentElement;else if(e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else break}return null}var n=class extends d{constructor(){super(...arguments);this.localize=new v(this);this.open=!1;this.rounded=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.noAutoSize=!1;this.noFlip=!1;this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}getAccessibleTrigger(){let t=this.trigger.assignedElements({flatten:!0}).find(a=>M(a).start),s=null;if(t)switch(t.tagName.toLowerCase()){case"sd-5-17-1-button":case"sd-5-17-1-icon-button":s=t.button;break;case"sd-5-17-1-navigation-item":s=t.button;break;default:s=t}return s}updateAccessibleTrigger(){let e=this.getAccessibleTrigger();e&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded",this.open?"true":"false"))}focusOnTrigger(){let e=this.getAccessibleTrigger();typeof(e==null?void 0:e.focus)=="function"&&e.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find(e=>e.tagName.toLowerCase()==="sd-5-17-1-menu")}handleKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(e){var t;if(e.key==="Tab"){if(this.open&&((t=document.activeElement)==null?void 0:t.tagName.toLowerCase())==="sd-5-17-1-menu-item"){e.preventDefault(),this.hide(),this.focusOnTrigger();return}setTimeout(()=>{let s=T();(!s||!this.containingElement||A(s,this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide()})}}handleDocumentMouseDown(e){let t=e.composedPath();this.containingElement&&!t.includes(this.containingElement)&&this.hide()}handleMenuItemActivate(e){let t=e.target;L(t,this.panel)}handlePanelSelect(e){let t=e.target;!this.stayOpenOnSelect&&t.tagName.toLowerCase()==="sd-5-17-1-menu"&&(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(e){if(e.key==="Escape"&&this.open){e.stopPropagation(),this.focusOnTrigger(),this.hide();return}if([" ","Enter"].includes(e.key)){e.preventDefault(),this.handleTriggerClick();return}let t=this.getMenu();if(t){let s=t.defaultSlot.assignedElements({flatten:!0}),a=s.find(C=>!C.disabled)||s[0],g=s[s.length-1];["ArrowDown","ArrowUp","Home","End"].includes(e.key)&&(e.preventDefault(),this.open||this.show(),s.length>0&&requestAnimationFrame(()=>{(e.key==="ArrowDown"||e.key==="Home")&&(t.setCurrentItem(a),a.focus()),(e.key==="ArrowUp"||e.key==="End")&&(t.setCurrentItem(g),g.focus())}))}}handleTriggerKeyUp(e){e.key===" "&&e.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}async show(){if(!this.open)return this.open=!0,m(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,m(this,"sd-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("sd-activate",this.handleMenuItemActivate),this.panel.addEventListener("sd-5-17-1-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("sd-activate",this.handleMenuItemActivate),this.panel.removeEventListener("sd-5-17-1-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open){this.emit("sd-show"),this.addOpenListeners(),await p(this),this.panel.hidden=!1,this.popup.active=!0;let{keyframes:e,options:t}=u(this,"dropdown.show",{dir:this.localize.dir()});await l(this.popup.popup,e,t),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await p(this);let{keyframes:e,options:t}=u(this,"dropdown.hide",{dir:this.localize.dir()});await l(this.popup.popup,e,t),this.panel.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}render(){return b`<sd-5-17-1-popup part="base" id="dropdown" exportparts="
2
2
  popup:base__popup,
3
- " placement="${this.placement}" distance="${this.rounded&&this.distance<1?1:this.distance}" skidding="${this.skidding}" strategy="${this.hoist?"fixed":"absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${k("shadow bg-white block",this.open?"pointer-events-auto":"pointer-events-none",this.rounded&&"rounded-md")}" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dropdown"></slot></sd-5-16-2-popup>`}};n.styles=[...d.styles,y`:host{display:inline-block}#dropdown::part(popup){z-index:var(--sd-z-index-dropdown,900)}#dropdown[data-current-placement^=top]::part(popup){transform-origin:bottom}#dropdown[data-current-placement^=bottom]::part(popup){transform-origin:top}#dropdown[data-current-placement^=left]::part(popup){transform-origin:right}#dropdown[data-current-placement^=right]::part(popup){transform-origin:left}:host(:not([no-auto-size])) ::slotted(:not([slot=trigger])){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],i([r("#dropdown")],n.prototype,"popup",2),i([r("[part=trigger]")],n.prototype,"trigger",2),i([r("[part=panel]")],n.prototype,"panel",2),i([o({type:Boolean,reflect:!0})],n.prototype,"open",2),i([o({type:Boolean,reflect:!0})],n.prototype,"rounded",2),i([o({type:String,reflect:!0})],n.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],n.prototype,"disabled",2),i([o({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],n.prototype,"stayOpenOnSelect",2),i([o({type:Object})],n.prototype,"containingElement",2),i([o({type:Number,reflect:!0})],n.prototype,"distance",2),i([o({type:Number,reflect:!0})],n.prototype,"skidding",2),i([o({type:Boolean,reflect:!0,attribute:"no-auto-size"})],n.prototype,"noAutoSize",2),i([o({type:Boolean,reflect:!0,attribute:"no-flip"})],n.prototype,"noFlip",2),i([o({type:Boolean,reflect:!0})],n.prototype,"hoist",2),i([E("open",{waitUntilFirstUpdate:!0})],n.prototype,"handleOpenChange",1),n=i([w("sd-5-16-2-dropdown")],n);h("dropdown.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});h("dropdown.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{n as a};
3
+ " placement="${this.placement}" distance="${this.rounded&&this.distance<1?1:this.distance}" skidding="${this.skidding}" strategy="${this.hoist?"fixed":"absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${k("shadow bg-white block",this.open?"pointer-events-auto":"pointer-events-none",this.rounded&&"rounded-md")}" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dropdown"></slot></sd-5-17-1-popup>`}};n.styles=[...d.styles,y`:host{display:inline-block}#dropdown::part(popup){z-index:var(--sd-z-index-dropdown,900)}#dropdown[data-current-placement^=top]::part(popup){transform-origin:bottom}#dropdown[data-current-placement^=bottom]::part(popup){transform-origin:top}#dropdown[data-current-placement^=left]::part(popup){transform-origin:right}#dropdown[data-current-placement^=right]::part(popup){transform-origin:left}:host(:not([no-auto-size])) ::slotted(:not([slot=trigger])){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],i([r("#dropdown")],n.prototype,"popup",2),i([r("[part=trigger]")],n.prototype,"trigger",2),i([r("[part=panel]")],n.prototype,"panel",2),i([o({type:Boolean,reflect:!0})],n.prototype,"open",2),i([o({type:Boolean,reflect:!0})],n.prototype,"rounded",2),i([o({type:String,reflect:!0})],n.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],n.prototype,"disabled",2),i([o({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],n.prototype,"stayOpenOnSelect",2),i([o({type:Object})],n.prototype,"containingElement",2),i([o({type:Number,reflect:!0})],n.prototype,"distance",2),i([o({type:Number,reflect:!0})],n.prototype,"skidding",2),i([o({type:Boolean,reflect:!0,attribute:"no-auto-size"})],n.prototype,"noAutoSize",2),i([o({type:Boolean,reflect:!0,attribute:"no-flip"})],n.prototype,"noFlip",2),i([o({type:Boolean,reflect:!0})],n.prototype,"hoist",2),i([E("open",{waitUntilFirstUpdate:!0})],n.prototype,"handleOpenChange",1),n=i([w("sd-5-17-1-dropdown")],n);h("dropdown.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});h("dropdown.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{n as a};
@@ -1 +1 @@
1
- import{a as m}from"./chunk.YEDQWNIV.js";import{a}from"./chunk.L6MCOH7T.js";import{a as i,b as s,h as l}from"./chunk.TIK62LTB.js";import{b as t,e as o}from"./chunk.RZUTJ36B.js";import{e as r}from"./chunk.TJOCV4DC.js";var e=class extends l{constructor(){super(...arguments);this.color="currentColor";this.localize=new a(this)}render(){return o`<svg role="progressbar" viewBox="0 0 24 24" class="${m("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};e.styles=[...l.styles,t`:host{display:inline-block;height:1em;width:1em}`],r([s({type:String,reflect:!0})],e.prototype,"color",2),e=r([i("sd-5-16-2-spinner")],e);export{e as a};
1
+ import{a as m}from"./chunk.YEDQWNIV.js";import{a}from"./chunk.L6MCOH7T.js";import{a as i,b as s,h as l}from"./chunk.M6XINJ52.js";import{b as t,e as o}from"./chunk.RZUTJ36B.js";import{e as r}from"./chunk.TJOCV4DC.js";var e=class extends l{constructor(){super(...arguments);this.color="currentColor";this.localize=new a(this)}render(){return o`<svg role="progressbar" viewBox="0 0 24 24" class="${m("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};e.styles=[...l.styles,t`:host{display:inline-block;height:1em;width:1em}`],r([s({type:String,reflect:!0})],e.prototype,"color",2),e=r([i("sd-5-17-1-spinner")],e);export{e as a};
@@ -1,4 +1,4 @@
1
- import{a as k}from"./chunk.CGQ2BPPZ.js";import{a as m,c as f}from"./chunk.SKUMYG4O.js";import{a as v}from"./chunk.KLRPP4NQ.js";import{a as d}from"./chunk.YEDQWNIV.js";import{a as x}from"./chunk.L6MCOH7T.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as b,b as o,d as n,h as c}from"./chunk.TIK62LTB.js";import{b as g,e as r}from"./chunk.RZUTJ36B.js";import{b as p,c as l,e as u}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=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.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.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)}get hasCustomTrigger(){return this.hasSlotController.test("[default]")}formatDefaultSlot(e){if(!e)return;e.assignedNodes({flatten:!0}).forEach(s=>{var w,y;s.nodeType===Node.TEXT_NODE&&!((w=s==null?void 0:s.textContent)!=null&&w.trim())&&((y=s==null?void 0:s.parentNode)==null||y.removeChild(s))})}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let e=l(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),e)}}handleMouseOut(){if(this.hasTrigger("hover")){let e=l(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),e)}}hasTrigger(e){return this.trigger.split(" ").includes(e)}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:e,options:a}=f(this,"tooltip.show",{dir:this.localize.dir()});await p(this.popup.popup,e,a),this.emit("sd-after-show")}else{this.emit("sd-hide"),await u(this.body);let{keyframes:e,options:a}=f(this,"tooltip.hide",{dir:this.localize.dir()});await p(this.popup.popup,e,a),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,v(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),v(this,"sd-after-hide")}render(){let e=this.placement.endsWith("-start"),a=this.placement.endsWith("-end");return r`<sd-5-16-2-popup part="base" exportparts="
1
+ import{a as k}from"./chunk.CGQ2BPPZ.js";import{a as m,c as f}from"./chunk.SKUMYG4O.js";import{a as v}from"./chunk.KLRPP4NQ.js";import{a as d}from"./chunk.YEDQWNIV.js";import{a as x}from"./chunk.L6MCOH7T.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as b,b as o,d as n,h as c}from"./chunk.M6XINJ52.js";import{b as g,e as r}from"./chunk.RZUTJ36B.js";import{b as p,c as l,e as u}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=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.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.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)}get hasCustomTrigger(){return this.hasSlotController.test("[default]")}formatDefaultSlot(e){if(!e)return;e.assignedNodes({flatten:!0}).forEach(s=>{var w,y;s.nodeType===Node.TEXT_NODE&&!((w=s==null?void 0:s.textContent)!=null&&w.trim())&&((y=s==null?void 0:s.parentNode)==null||y.removeChild(s))})}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let e=l(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),e)}}handleMouseOut(){if(this.hasTrigger("hover")){let e=l(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),e)}}hasTrigger(e){return this.trigger.split(" ").includes(e)}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:e,options:a}=f(this,"tooltip.show",{dir:this.localize.dir()});await p(this.popup.popup,e,a),this.emit("sd-after-show")}else{this.emit("sd-hide"),await u(this.body);let{keyframes:e,options:a}=f(this,"tooltip.hide",{dir:this.localize.dir()});await p(this.popup.popup,e,a),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,v(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),v(this,"sd-after-hide")}render(){let e=this.placement.endsWith("-start"),a=this.placement.endsWith("-end");return r`<sd-5-17-1-popup part="base" exportparts="
2
2
  popup:base__popup,
3
3
  arrow:base__arrow
4
- " class="${d(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[e?"start":a?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger?r`<slot slot="anchor"></slot>`:r`<button slot="anchor" aria-describedby="tooltip" class="${d("flex sd-interactive rounded-full",this.size==="lg"?"text-xl":"text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-5-16-2-icon library="_internal" name="info-circle" label="Tooltip" class="${d(this.disabled&&"sd-interactive--disabled")}"></sd-5-16-2-icon></button>`}<slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-5-16-2-popup>`}};t.styles=[...c.styles,g`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-5-16-2-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-5-16-2-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-5-16-2-popup::part(arrow){--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-5-16-2-popup[placement^=top]::part(popup){transform-origin:bottom}sd-5-16-2-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],i([n("slot:not([name])")],t.prototype,"defaultSlot",2),i([n("#tooltip")],t.prototype,"body",2),i([n("sd-5-16-2-popup")],t.prototype,"popup",2),i([o({type:String,reflect:!0})],t.prototype,"size",2),i([o({type:String,reflect:!0})],t.prototype,"content",2),i([o({type:String,reflect:!0})],t.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([o({type:Boolean,reflect:!0})],t.prototype,"open",2),i([o({type:String,reflect:!0})],t.prototype,"trigger",2),i([o({type:Boolean,reflect:!0})],t.prototype,"hoist",2),i([h("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([h(["content","hoist","placement"])],t.prototype,"handleOptionsChange",1),i([h("disabled")],t.prototype,"handleDisabledChange",1),t=i([b("sd-5-16-2-tooltip")],t);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{t as a};
4
+ " class="${d(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[e?"start":a?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger?r`<slot slot="anchor"></slot>`:r`<button slot="anchor" aria-describedby="tooltip" class="${d("flex sd-interactive rounded-full",this.size==="lg"?"text-xl":"text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-5-17-1-icon library="_internal" name="info-circle" label="Tooltip" class="${d(this.disabled&&"sd-interactive--disabled")}"></sd-5-17-1-icon></button>`}<slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-5-17-1-popup>`}};t.styles=[...c.styles,g`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-5-17-1-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-5-17-1-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-5-17-1-popup::part(arrow){--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-5-17-1-popup[placement^=top]::part(popup){transform-origin:bottom}sd-5-17-1-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],i([n("slot:not([name])")],t.prototype,"defaultSlot",2),i([n("#tooltip")],t.prototype,"body",2),i([n("sd-5-17-1-popup")],t.prototype,"popup",2),i([o({type:String,reflect:!0})],t.prototype,"size",2),i([o({type:String,reflect:!0})],t.prototype,"content",2),i([o({type:String,reflect:!0})],t.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([o({type:Boolean,reflect:!0})],t.prototype,"open",2),i([o({type:String,reflect:!0})],t.prototype,"trigger",2),i([o({type:Boolean,reflect:!0})],t.prototype,"hoist",2),i([h("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([h(["content","hoist","placement"])],t.prototype,"handleOptionsChange",1),i([h("disabled")],t.prototype,"handleDisabledChange",1),t=i([b("sd-5-17-1-tooltip")],t);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{t as a};
@@ -1 +1 @@
1
- import{a as s}from"./chunk.CHU57RUD.js";import{a as l}from"./chunk.YEDQWNIV.js";import{a as k}from"./chunk.L6MCOH7T.js";import{a as T,b as h,c as b,d as u,h as y}from"./chunk.TIK62LTB.js";import{b as S,e as c}from"./chunk.RZUTJ36B.js";import{e as o}from"./chunk.TJOCV4DC.js";var n=class extends y{constructor(){super(...arguments);this.localize=new k(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.handleContainerScroll()}),this.updateComplete.then(()=>{this.container&&this.resizeObserver.observe(this.container)})}disconnectedCallback(){super.disconnectedCallback(),this.container&&this.resizeObserver.unobserve(this.container)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.handleContainerScroll())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get scrollButtons(){return{left:this.leftButton,right:this.rightButton,up:this.upButton,down:this.downButton}}handleContainerScroll(){if(!this.container)return;let t=this.container.scrollLeft>0,i=this.container.scrollLeft+this.container.clientWidth<this.container.scrollWidth-1,e=this.container.scrollTop>0,d=this.container.scrollTop+this.container.clientHeight<this.container.scrollHeight-1,a=this.canScroll,r={left:this.isScrollHorizontalEnabled&&t,right:this.isScrollHorizontalEnabled&&i,up:this.isScrollVerticalEnabled&&e,down:this.isScrollVerticalEnabled&&d},m=a.left&&!r.left,v=a.up&&!r.up,E=a.right&&!r.right,f=a.down&&!r.down;(m||v)&&this.dispatchEvent(new CustomEvent("start")),(E||f)&&this.dispatchEvent(new CustomEvent("end")),this.canScroll=r}handleScroll(t,i){var z,x,B;let e=["left","up"].includes(t)?-this.step:this.step,d=["left","right"].includes(t)?"horizontal":"vertical",a=["left","up"].includes(t)?"start":"end",r=!["mouse","touch"].includes((z=i==null?void 0:i.pointerType)!=null?z:""),m=d==="horizontal"?"left":"top";(x=this.container)==null||x.scrollBy({behavior:"smooth",[m]:e});let v=`button-${t}`;this.dispatchEvent(new CustomEvent(v,{bubbles:!0,composed:!0}));let f=(d==="horizontal"?this.container.scrollLeft:this.container.scrollTop)+e,C=d==="horizontal"?this.container.scrollWidth-this.container.clientWidth:this.container.scrollHeight-this.container.clientHeight,$=a==="start"&&f<=0,H=a==="end"&&f>=C-1;if(!($||H)){let w=this.localize.term("scrolled");this.announcementContainer.textContent=this.announcementContainer.textContent===w?`${w}\u200B`:w;return}let g=this.scrollButtons[t],p={left:this.rightButton,right:this.leftButton,up:this.downButton,down:this.upButton}[t],L=$?`${this.localize.term("scrolled")}. ${this.localize.term("scrollToEnd")}`:`${this.localize.term("scrolled")}. ${this.localize.term("scrollToStart")}`;(B=p==null?void 0:p.querySelector("sd-5-16-2-icon"))==null||B.setAttribute("label",L),r?p==null||p.focus():g==null||g.blur()}handleButtonBlur(t,i){var r;let d=(["left","up"].includes(t)?"start":"end")==="start"?this.localize.term("scrollToStart"):this.localize.term("scrollToEnd");(r=i.target.querySelector("sd-5-16-2-icon"))==null||r.setAttribute("label",d)}render(){let t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",i="scroll-shadow absolute z-10 pointer-events-none transition-opacity duration-medium ease-in-out";return c`<div part="base" class="${l("scroll-container flex overflow-hidden flex-1",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset&&"p-4",{horizontal:"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden",vertical:"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden",auto:"scroll-auto overflow-auto"}[this.orientation])}" @scroll="${this.handleContainerScroll}" tabindex="0"><div id="announcement-container" role="status" class="sr-only"></div><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?c`${this.isScrollHorizontalEnabled?c`<div part="button-left" class="${l("absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.left&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${l(t)}" aria-hidden="${s(!this.canScroll.left||void 0)}" tabindex="${s(this.canScroll.left?void 0:-1)}" @click="${e=>this.handleScroll("left",e)}" @blur="${e=>this.handleButtonBlur("left",e)}"><slot name="icon-start"><sd-5-16-2-icon library="_internal" name="chevron-up" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-5-16-2-icon></slot></button></div><div part="button-right" class="${l("absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.right&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${l(t)}" aria-hidden="${s(!this.canScroll.right||void 0)}" tabindex="${s(this.canScroll.right?void 0:-1)}" @click="${e=>this.handleScroll("right",e)}" @blur="${e=>this.handleButtonBlur("right",e)}"><slot name="icon-end"><sd-5-16-2-icon library="_internal" name="chevron-down" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-5-16-2-icon></slot></button></div>`:null} ${this.isScrollVerticalEnabled?c`<div part="button-top" class="${l("absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.up&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${l(t)}" aria-hidden="${s(!this.canScroll.up||void 0)}" tabindex="${s(this.canScroll.up?void 0:-1)}" @click="${e=>this.handleScroll("up",e)}" @blur="${e=>this.handleButtonBlur("up",e)}"><slot name="icon-start"><sd-5-16-2-icon library="_internal" name="chevron-up" label="${this.localize.term("scrollToStart")}"></sd-5-16-2-icon></slot></button></div><div part="button-bottom" class="${l("absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.down&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${l(t)}" aria-hidden="${s(!this.canScroll.down||void 0)}" tabindex="${s(this.canScroll.down?void 0:-1)}" @click="${e=>this.handleScroll("down",e)}" @blur="${e=>this.handleButtonBlur("down",e)}"><slot name="icon-end"><sd-5-16-2-icon library="_internal" name="chevron-down" label="${this.localize.term("scrollToEnd")}"></sd-5-16-2-icon></slot></button></div>`:null}`:null} ${this.shadows?c`${this.isScrollHorizontalEnabled?c`<div part="shadow-left" class="${l("left top-0 left-0 w-[6px] h-full",i,this.canScroll.left?"opacity-100":"opacity-0")}"></div><div part="shadow-right" class="${l("right top-0 right-0 w-[6px] h-full",i,this.canScroll.right?"opacity-100":"opacity-0")}"></div>`:null} ${this.isScrollVerticalEnabled?c`<div part="shadow-top" class="${l("top top-0 left-0 w-full h-[6px]",i,this.canScroll.up?"opacity-100":"opacity-0")}"></div><div part="shadow-bottom" class="${l("bottom bottom-0 left-0 w-full h-[6px]",i,this.canScroll.down?"opacity-100":"opacity-0")}"></div>`:null}`:null}`}};n.styles=[...y.styles,S`:host{--gradient-color:hsla(0,0%,100%,0);--gradient:var(--gradient-color) 0%,#fff 80%,#fff 100%;display:flex;overflow:hidden;position:relative}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-border-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-right]{background:linear-gradient(90deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-top]{background:linear-gradient(0deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-bottom]{background:linear-gradient(180deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}.sd-5-16-2-icon--top{align-self:flex-start}.sd-5-16-2-icon--down{align-self:flex-end}`],o([u('[part="button-right"] button')],n.prototype,"rightButton",2),o([u('[part="button-left"] button')],n.prototype,"leftButton",2),o([u('[part="button-bottom"] button')],n.prototype,"downButton",2),o([u('[part="button-top"] button')],n.prototype,"upButton",2),o([u(".scroll-container")],n.prototype,"container",2),o([u("#announcement-container")],n.prototype,"announcementContainer",2),o([h({type:String,reflect:!0})],n.prototype,"orientation",2),o([h({type:Boolean,reflect:!0})],n.prototype,"scrollbars",2),o([h({type:Boolean,reflect:!0})],n.prototype,"buttons",2),o([h({type:Boolean,reflect:!0})],n.prototype,"shadows",2),o([h({type:Boolean,reflect:!0})],n.prototype,"inset",2),o([h({type:Number,reflect:!0})],n.prototype,"step",2),o([b()],n.prototype,"canScroll",2),o([b()],n.prototype,"isScrollHorizontalEnabled",2),o([b()],n.prototype,"isScrollVerticalEnabled",2),n=o([T("sd-5-16-2-scrollable")],n);export{n as a};
1
+ import{a as s}from"./chunk.CHU57RUD.js";import{a as l}from"./chunk.YEDQWNIV.js";import{a as k}from"./chunk.L6MCOH7T.js";import{a as T,b as h,c as b,d as u,h as y}from"./chunk.M6XINJ52.js";import{b as S,e as c}from"./chunk.RZUTJ36B.js";import{e as o}from"./chunk.TJOCV4DC.js";var n=class extends y{constructor(){super(...arguments);this.localize=new k(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.handleContainerScroll()}),this.updateComplete.then(()=>{this.container&&this.resizeObserver.observe(this.container)})}disconnectedCallback(){super.disconnectedCallback(),this.container&&this.resizeObserver.unobserve(this.container)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.handleContainerScroll())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get scrollButtons(){return{left:this.leftButton,right:this.rightButton,up:this.upButton,down:this.downButton}}handleContainerScroll(){if(!this.container)return;let t=this.container.scrollLeft>0,i=this.container.scrollLeft+this.container.clientWidth<this.container.scrollWidth-1,e=this.container.scrollTop>0,d=this.container.scrollTop+this.container.clientHeight<this.container.scrollHeight-1,a=this.canScroll,r={left:this.isScrollHorizontalEnabled&&t,right:this.isScrollHorizontalEnabled&&i,up:this.isScrollVerticalEnabled&&e,down:this.isScrollVerticalEnabled&&d},m=a.left&&!r.left,v=a.up&&!r.up,E=a.right&&!r.right,f=a.down&&!r.down;(m||v)&&this.dispatchEvent(new CustomEvent("start")),(E||f)&&this.dispatchEvent(new CustomEvent("end")),this.canScroll=r}handleScroll(t,i){var z,x,B;let e=["left","up"].includes(t)?-this.step:this.step,d=["left","right"].includes(t)?"horizontal":"vertical",a=["left","up"].includes(t)?"start":"end",r=!["mouse","touch"].includes((z=i==null?void 0:i.pointerType)!=null?z:""),m=d==="horizontal"?"left":"top";(x=this.container)==null||x.scrollBy({behavior:"smooth",[m]:e});let v=`button-${t}`;this.dispatchEvent(new CustomEvent(v,{bubbles:!0,composed:!0}));let f=(d==="horizontal"?this.container.scrollLeft:this.container.scrollTop)+e,C=d==="horizontal"?this.container.scrollWidth-this.container.clientWidth:this.container.scrollHeight-this.container.clientHeight,$=a==="start"&&f<=0,H=a==="end"&&f>=C-1;if(!($||H)){let w=this.localize.term("scrolled");this.announcementContainer.textContent=this.announcementContainer.textContent===w?`${w}\u200B`:w;return}let g=this.scrollButtons[t],p={left:this.rightButton,right:this.leftButton,up:this.downButton,down:this.upButton}[t],L=$?`${this.localize.term("scrolled")}. ${this.localize.term("scrollToEnd")}`:`${this.localize.term("scrolled")}. ${this.localize.term("scrollToStart")}`;(B=p==null?void 0:p.querySelector("sd-5-17-1-icon"))==null||B.setAttribute("label",L),r?p==null||p.focus():g==null||g.blur()}handleButtonBlur(t,i){var r;let d=(["left","up"].includes(t)?"start":"end")==="start"?this.localize.term("scrollToStart"):this.localize.term("scrollToEnd");(r=i.target.querySelector("sd-5-17-1-icon"))==null||r.setAttribute("label",d)}render(){let t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",i="scroll-shadow absolute z-10 pointer-events-none transition-opacity duration-medium ease-in-out";return c`<div part="base" class="${l("scroll-container flex overflow-hidden flex-1",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset&&"p-4",{horizontal:"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden",vertical:"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden",auto:"scroll-auto overflow-auto"}[this.orientation])}" @scroll="${this.handleContainerScroll}" tabindex="0"><div id="announcement-container" role="status" class="sr-only"></div><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?c`${this.isScrollHorizontalEnabled?c`<div part="button-left" class="${l("absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.left&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${l(t)}" aria-hidden="${s(!this.canScroll.left||void 0)}" tabindex="${s(this.canScroll.left?void 0:-1)}" @click="${e=>this.handleScroll("left",e)}" @blur="${e=>this.handleButtonBlur("left",e)}"><slot name="icon-start"><sd-5-17-1-icon library="_internal" name="chevron-up" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-5-17-1-icon></slot></button></div><div part="button-right" class="${l("absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.right&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${l(t)}" aria-hidden="${s(!this.canScroll.right||void 0)}" tabindex="${s(this.canScroll.right?void 0:-1)}" @click="${e=>this.handleScroll("right",e)}" @blur="${e=>this.handleButtonBlur("right",e)}"><slot name="icon-end"><sd-5-17-1-icon library="_internal" name="chevron-down" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-5-17-1-icon></slot></button></div>`:null} ${this.isScrollVerticalEnabled?c`<div part="button-top" class="${l("absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.up&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${l(t)}" aria-hidden="${s(!this.canScroll.up||void 0)}" tabindex="${s(this.canScroll.up?void 0:-1)}" @click="${e=>this.handleScroll("up",e)}" @blur="${e=>this.handleButtonBlur("up",e)}"><slot name="icon-start"><sd-5-17-1-icon library="_internal" name="chevron-up" label="${this.localize.term("scrollToStart")}"></sd-5-17-1-icon></slot></button></div><div part="button-bottom" class="${l("absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.down&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${l(t)}" aria-hidden="${s(!this.canScroll.down||void 0)}" tabindex="${s(this.canScroll.down?void 0:-1)}" @click="${e=>this.handleScroll("down",e)}" @blur="${e=>this.handleButtonBlur("down",e)}"><slot name="icon-end"><sd-5-17-1-icon library="_internal" name="chevron-down" label="${this.localize.term("scrollToEnd")}"></sd-5-17-1-icon></slot></button></div>`:null}`:null} ${this.shadows?c`${this.isScrollHorizontalEnabled?c`<div part="shadow-left" class="${l("left top-0 left-0 w-[6px] h-full",i,this.canScroll.left?"opacity-100":"opacity-0")}"></div><div part="shadow-right" class="${l("right top-0 right-0 w-[6px] h-full",i,this.canScroll.right?"opacity-100":"opacity-0")}"></div>`:null} ${this.isScrollVerticalEnabled?c`<div part="shadow-top" class="${l("top top-0 left-0 w-full h-[6px]",i,this.canScroll.up?"opacity-100":"opacity-0")}"></div><div part="shadow-bottom" class="${l("bottom bottom-0 left-0 w-full h-[6px]",i,this.canScroll.down?"opacity-100":"opacity-0")}"></div>`:null}`:null}`}};n.styles=[...y.styles,S`:host{--gradient-color:hsla(0,0%,100%,0);--gradient:var(--gradient-color) 0%,#fff 80%,#fff 100%;display:flex;overflow:hidden;position:relative}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-border-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-right]{background:linear-gradient(90deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-top]{background:linear-gradient(0deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-bottom]{background:linear-gradient(180deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}.sd-5-17-1-icon--top{align-self:flex-start}.sd-5-17-1-icon--down{align-self:flex-end}`],o([u('[part="button-right"] button')],n.prototype,"rightButton",2),o([u('[part="button-left"] button')],n.prototype,"leftButton",2),o([u('[part="button-bottom"] button')],n.prototype,"downButton",2),o([u('[part="button-top"] button')],n.prototype,"upButton",2),o([u(".scroll-container")],n.prototype,"container",2),o([u("#announcement-container")],n.prototype,"announcementContainer",2),o([h({type:String,reflect:!0})],n.prototype,"orientation",2),o([h({type:Boolean,reflect:!0})],n.prototype,"scrollbars",2),o([h({type:Boolean,reflect:!0})],n.prototype,"buttons",2),o([h({type:Boolean,reflect:!0})],n.prototype,"shadows",2),o([h({type:Boolean,reflect:!0})],n.prototype,"inset",2),o([h({type:Number,reflect:!0})],n.prototype,"step",2),o([b()],n.prototype,"canScroll",2),o([b()],n.prototype,"isScrollHorizontalEnabled",2),o([b()],n.prototype,"isScrollVerticalEnabled",2),n=o([T("sd-5-17-1-scrollable")],n);export{n as a};
@@ -1 +1 @@
1
- import{a as u}from"./chunk.CGQ2BPPZ.js";import{a as i}from"./chunk.YEDQWNIV.js";import{a as o}from"./chunk.E2DRD2OX.js";import{a as h,b as a,c as r,d,h as n}from"./chunk.TIK62LTB.js";import{b as c,e as l}from"./chunk.RZUTJ36B.js";import{e as t}from"./chunk.TJOCV4DC.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" class="${i("px-4 flex items-center w-full transition-colors duration-fast ease-in-out text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-700 cursor-not-allowed":"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 rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"bg-white border-neutral-800")}">${this.selected?l`<sd-5-16-2-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" name="status-check"></sd-5-16-2-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`:host{display:block;outline:2px solid transparent!important;outline-offset:2px!important;position:relative;width:100%}.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-5-16-2-option")],e);export{e as a};
1
+ import{a as u}from"./chunk.CGQ2BPPZ.js";import{a as i}from"./chunk.YEDQWNIV.js";import{a as o}from"./chunk.E2DRD2OX.js";import{a as h,b as a,c as r,d,h as n}from"./chunk.M6XINJ52.js";import{b as c,e as l}from"./chunk.RZUTJ36B.js";import{e as t}from"./chunk.TJOCV4DC.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" class="${i("px-4 flex items-center w-full transition-colors duration-fast ease-in-out text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-700 cursor-not-allowed":"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 rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"bg-white border-neutral-800")}">${this.selected?l`<sd-5-17-1-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" name="status-check"></sd-5-17-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`:host{display:block;outline:2px solid transparent!important;outline-offset:2px!important;position:relative;width:100%}.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-5-17-1-option")],e);export{e as a};