@solid-design-system/components 6.12.0 → 6.12.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 (271) hide show
  1. package/cdn/chunks/{chunk.NOXJ72G5.js → chunk.DSVAD7WA.js} +2 -2
  2. package/cdn/components/combobox/combobox.js +1 -1
  3. package/cdn/custom-elements.json +1 -1
  4. package/cdn/solid-components.bundle.js +1 -1
  5. package/cdn/solid-components.iife.js +1 -1
  6. package/cdn/solid-components.js +1 -1
  7. package/cdn/web-types.json +1 -1
  8. package/cdn-versioned/chunks/chunk.2OSCB6XW.js +2 -2
  9. package/cdn-versioned/chunks/chunk.2XY2M6QX.js +2 -2
  10. package/cdn-versioned/chunks/chunk.3RO5EKVU.js +1 -1
  11. package/cdn-versioned/chunks/chunk.4275NGRN.js +2 -2
  12. package/cdn-versioned/chunks/chunk.4RPUAIQK.js +2 -2
  13. package/cdn-versioned/chunks/chunk.5DNOSYG7.js +1 -1
  14. package/cdn-versioned/chunks/chunk.5FYGQOXL.js +2 -2
  15. package/cdn-versioned/chunks/chunk.5X4GK4PS.js +1 -1
  16. package/cdn-versioned/chunks/chunk.5YHGT34K.js +2 -2
  17. package/cdn-versioned/chunks/chunk.6AEASXXL.js +2 -2
  18. package/cdn-versioned/chunks/chunk.AMWHBFTM.js +2 -2
  19. package/cdn-versioned/chunks/chunk.B46EHYIM.js +3 -3
  20. package/cdn-versioned/chunks/chunk.BAY7BKUC.js +1 -1
  21. package/cdn-versioned/chunks/chunk.BOVFUPAB.js +2 -2
  22. package/cdn-versioned/chunks/chunk.C7XYQGPF.js +2 -2
  23. package/cdn-versioned/chunks/chunk.DS2YD552.js +2 -2
  24. package/cdn-versioned/chunks/{chunk.NOXJ72G5.js → chunk.DSVAD7WA.js} +5 -5
  25. package/cdn-versioned/chunks/chunk.EMB5EOVL.js +2 -2
  26. package/cdn-versioned/chunks/chunk.ENQH3ZMT.js +2 -2
  27. package/cdn-versioned/chunks/chunk.ETAZT232.js +2 -2
  28. package/cdn-versioned/chunks/chunk.F6Z7C6GC.js +2 -2
  29. package/cdn-versioned/chunks/chunk.FC5OZ6LQ.js +2 -2
  30. package/cdn-versioned/chunks/chunk.FIUQMO6Q.js +2 -2
  31. package/cdn-versioned/chunks/chunk.FJ4YRN4X.js +2 -2
  32. package/cdn-versioned/chunks/chunk.FTCO66N2.js +2 -2
  33. package/cdn-versioned/chunks/chunk.G5PT3ZUT.js +2 -2
  34. package/cdn-versioned/chunks/chunk.H76VWBAF.js +1 -1
  35. package/cdn-versioned/chunks/chunk.HL52A333.js +2 -2
  36. package/cdn-versioned/chunks/chunk.HR5FZLRC.js +2 -2
  37. package/cdn-versioned/chunks/chunk.HUYURJ76.js +2 -2
  38. package/cdn-versioned/chunks/chunk.HWUUJJP3.js +1 -1
  39. package/cdn-versioned/chunks/chunk.INALKJVG.js +5 -5
  40. package/cdn-versioned/chunks/chunk.IXPIV7FA.js +2 -2
  41. package/cdn-versioned/chunks/chunk.JMZGGLJF.js +1 -1
  42. package/cdn-versioned/chunks/chunk.JZVRJWMV.js +2 -2
  43. package/cdn-versioned/chunks/chunk.KS4OSR2A.js +3 -3
  44. package/cdn-versioned/chunks/chunk.R3BQNXHR.js +2 -2
  45. package/cdn-versioned/chunks/chunk.RAP66B6O.js +1 -1
  46. package/cdn-versioned/chunks/chunk.REOCLYOU.js +2 -2
  47. package/cdn-versioned/chunks/chunk.SIVZ2S6B.js +1 -1
  48. package/cdn-versioned/chunks/chunk.TPSMY4DZ.js +1 -1
  49. package/cdn-versioned/chunks/chunk.TWQLXQ5K.js +2 -2
  50. package/cdn-versioned/chunks/chunk.TYKWEXBI.js +1 -1
  51. package/cdn-versioned/chunks/chunk.UYDZYQM5.js +2 -2
  52. package/cdn-versioned/chunks/chunk.V3TGYVID.js +2 -2
  53. package/cdn-versioned/chunks/chunk.V4BUIKPF.js +2 -2
  54. package/cdn-versioned/chunks/chunk.VNKXLA5X.js +2 -2
  55. package/cdn-versioned/chunks/chunk.VR5GAI7K.js +2 -2
  56. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  57. package/cdn-versioned/chunks/chunk.WBIJL62F.js +2 -2
  58. package/cdn-versioned/chunks/chunk.WNJTMU6J.js +1 -1
  59. package/cdn-versioned/chunks/chunk.WTZQJFYM.js +2 -2
  60. package/cdn-versioned/chunks/chunk.WZAWV2ED.js +2 -2
  61. package/cdn-versioned/chunks/chunk.XG7G63I4.js +2 -2
  62. package/cdn-versioned/chunks/chunk.XKUWNSWT.js +2 -2
  63. package/cdn-versioned/chunks/chunk.Y3LTN4CF.js +2 -2
  64. package/cdn-versioned/chunks/chunk.Y4QI2OPY.js +2 -2
  65. package/cdn-versioned/chunks/chunk.YF6TETRU.js +2 -2
  66. package/cdn-versioned/chunks/chunk.YPTZDABK.js +1 -1
  67. package/cdn-versioned/chunks/chunk.YQOLB2PJ.js +9 -9
  68. package/cdn-versioned/chunks/chunk.YWOD5MYX.js +2 -2
  69. package/cdn-versioned/chunks/chunk.ZIVWE443.js +1 -1
  70. package/cdn-versioned/chunks/chunk.ZRNSYCFR.js +2 -2
  71. package/cdn-versioned/chunks/chunk.ZSAXC4EQ.js +2 -2
  72. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  73. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  74. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  75. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  76. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  77. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  78. package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  79. package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  80. package/cdn-versioned/components/button/button.d.ts +1 -1
  81. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  82. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  83. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  84. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  85. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  86. package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
  87. package/cdn-versioned/components/combobox/combobox.js +1 -1
  88. package/cdn-versioned/components/datepicker/datepicker.d.ts +1 -1
  89. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  90. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  91. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  92. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  93. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  94. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  95. package/cdn-versioned/components/header/header.d.ts +1 -1
  96. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  97. package/cdn-versioned/components/include/include.d.ts +1 -1
  98. package/cdn-versioned/components/input/input.d.ts +1 -1
  99. package/cdn-versioned/components/link/link.d.ts +1 -1
  100. package/cdn-versioned/components/loader/loader.d.ts +1 -1
  101. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  102. package/cdn-versioned/components/menu/menu.d.ts +1 -1
  103. package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
  104. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  105. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  106. package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
  107. package/cdn-versioned/components/option/option.d.ts +1 -1
  108. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  109. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  110. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  111. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  112. package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
  113. package/cdn-versioned/components/range/range.d.ts +1 -1
  114. package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
  115. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  116. package/cdn-versioned/components/select/select.d.ts +1 -1
  117. package/cdn-versioned/components/skeleton/skeleton.d.ts +1 -1
  118. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  119. package/cdn-versioned/components/step/step.d.ts +1 -1
  120. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  121. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  122. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  123. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  124. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  125. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  126. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  127. package/cdn-versioned/components/theme-listener/theme-listener.d.ts +1 -1
  128. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  129. package/cdn-versioned/components/video/video.d.ts +1 -1
  130. package/cdn-versioned/custom-elements.json +246 -246
  131. package/cdn-versioned/internal/form.js +2 -2
  132. package/cdn-versioned/solid-components.bundle.js +80 -80
  133. package/cdn-versioned/solid-components.css +2 -2
  134. package/cdn-versioned/solid-components.iife.js +80 -80
  135. package/cdn-versioned/solid-components.js +1 -1
  136. package/cdn-versioned/vscode.html-custom-data.json +107 -107
  137. package/cdn-versioned/web-types.json +157 -157
  138. package/dist/chunks/{chunk.OWQ3YI2X.js → chunk.SCBHL45L.js} +2 -0
  139. package/dist/components/combobox/combobox.js +1 -1
  140. package/dist/custom-elements.json +1 -1
  141. package/dist/solid-components.js +1 -1
  142. package/dist/web-types.json +1 -1
  143. package/dist-versioned/chunks/chunk.2CU6QOL7.js +4 -4
  144. package/dist-versioned/chunks/chunk.35EQJ5SV.js +8 -8
  145. package/dist-versioned/chunks/chunk.4C33XKR5.js +4 -4
  146. package/dist-versioned/chunks/chunk.4GXGCVAT.js +4 -4
  147. package/dist-versioned/chunks/chunk.4TOOTTT7.js +3 -3
  148. package/dist-versioned/chunks/chunk.5IGIZXCC.js +12 -12
  149. package/dist-versioned/chunks/chunk.5V4ZLM46.js +2 -2
  150. package/dist-versioned/chunks/chunk.6ZTH3QOK.js +5 -5
  151. package/dist-versioned/chunks/chunk.77QMG2JK.js +1 -1
  152. package/dist-versioned/chunks/chunk.7NPVZGYG.js +10 -10
  153. package/dist-versioned/chunks/chunk.C3WIBDGG.js +2 -2
  154. package/dist-versioned/chunks/chunk.CGHNKRSG.js +2 -2
  155. package/dist-versioned/chunks/chunk.CPEBS32D.js +1 -1
  156. package/dist-versioned/chunks/chunk.CQPHP72G.js +5 -5
  157. package/dist-versioned/chunks/chunk.DVHTNKCQ.js +3 -3
  158. package/dist-versioned/chunks/chunk.DXOZDLN3.js +5 -5
  159. package/dist-versioned/chunks/chunk.EORDFUN5.js +8 -8
  160. package/dist-versioned/chunks/chunk.F733OTL5.js +2 -2
  161. package/dist-versioned/chunks/chunk.FN3QPQKW.js +6 -6
  162. package/dist-versioned/chunks/chunk.GUPU7Y4R.js +2 -2
  163. package/dist-versioned/chunks/chunk.HDB5VQ6T.js +3 -3
  164. package/dist-versioned/chunks/chunk.HMYRJJSA.js +1 -1
  165. package/dist-versioned/chunks/chunk.HSLR5EL7.js +2 -2
  166. package/dist-versioned/chunks/chunk.HWSQMDBV.js +2 -2
  167. package/dist-versioned/chunks/chunk.IYIDHG44.js +2 -2
  168. package/dist-versioned/chunks/chunk.J7P25XPS.js +1 -1
  169. package/dist-versioned/chunks/chunk.JBLVT4GJ.js +4 -4
  170. package/dist-versioned/chunks/chunk.JSHWJIQJ.js +5 -5
  171. package/dist-versioned/chunks/chunk.JVFY4KAV.js +4 -4
  172. package/dist-versioned/chunks/chunk.JZ4LAYZZ.js +1 -1
  173. package/dist-versioned/chunks/chunk.K33P42FK.js +1 -1
  174. package/dist-versioned/chunks/chunk.K5MFIQWD.js +12 -12
  175. package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
  176. package/dist-versioned/chunks/chunk.KH2LWYO6.js +1 -1
  177. package/dist-versioned/chunks/chunk.KMMZFIBW.js +3 -3
  178. package/dist-versioned/chunks/chunk.KNFZPKTF.js +3 -3
  179. package/dist-versioned/chunks/chunk.LRKBZ2PI.js +5 -5
  180. package/dist-versioned/chunks/chunk.MAECKDRE.js +9 -9
  181. package/dist-versioned/chunks/chunk.MJU6BUDN.js +4 -4
  182. package/dist-versioned/chunks/chunk.NDY2F6JA.js +14 -14
  183. package/dist-versioned/chunks/chunk.OA6QSAEX.js +28 -28
  184. package/dist-versioned/chunks/chunk.OYSZH2PZ.js +25 -25
  185. package/dist-versioned/chunks/chunk.P4H32F7J.js +8 -8
  186. package/dist-versioned/chunks/chunk.PU6VCTT2.js +3 -3
  187. package/dist-versioned/chunks/chunk.PZZI7LIX.js +3 -3
  188. package/dist-versioned/chunks/chunk.Q2YJAMQO.js +6 -6
  189. package/dist-versioned/chunks/chunk.QMQD2SCQ.js +7 -7
  190. package/dist-versioned/chunks/chunk.REYEB3D7.js +11 -11
  191. package/dist-versioned/chunks/{chunk.OWQ3YI2X.js → chunk.SCBHL45L.js} +25 -23
  192. package/dist-versioned/chunks/chunk.SQKCQFZY.js +2 -2
  193. package/dist-versioned/chunks/chunk.TAR64H3A.js +4 -4
  194. package/dist-versioned/chunks/chunk.TEHZN5K4.js +1 -1
  195. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  196. package/dist-versioned/chunks/chunk.URTSQLC4.js +3 -3
  197. package/dist-versioned/chunks/chunk.UZPDIPPZ.js +2 -2
  198. package/dist-versioned/chunks/chunk.V5VJQQ73.js +2 -2
  199. package/dist-versioned/chunks/chunk.VFLTCSUA.js +5 -5
  200. package/dist-versioned/chunks/chunk.VJNVCYUG.js +4 -4
  201. package/dist-versioned/chunks/chunk.WIXKV24T.js +1 -1
  202. package/dist-versioned/chunks/chunk.XVLJVMWL.js +5 -5
  203. package/dist-versioned/chunks/chunk.Y3THGL6Z.js +3 -3
  204. package/dist-versioned/chunks/chunk.Z5DZQTVN.js +1 -1
  205. package/dist-versioned/chunks/chunk.ZRHUI65H.js +5 -5
  206. package/dist-versioned/chunks/chunk.ZXKZDONO.js +5 -5
  207. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  208. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  209. package/dist-versioned/components/animation/animation.d.ts +1 -1
  210. package/dist-versioned/components/audio/audio.d.ts +1 -1
  211. package/dist-versioned/components/badge/badge.d.ts +1 -1
  212. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  213. package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  214. package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  215. package/dist-versioned/components/button/button.d.ts +1 -1
  216. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  217. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  218. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  219. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  220. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  221. package/dist-versioned/components/combobox/combobox.d.ts +1 -1
  222. package/dist-versioned/components/combobox/combobox.js +1 -1
  223. package/dist-versioned/components/datepicker/datepicker.d.ts +1 -1
  224. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  225. package/dist-versioned/components/divider/divider.d.ts +1 -1
  226. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  227. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  228. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  229. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  230. package/dist-versioned/components/header/header.d.ts +1 -1
  231. package/dist-versioned/components/icon/icon.d.ts +1 -1
  232. package/dist-versioned/components/include/include.d.ts +1 -1
  233. package/dist-versioned/components/input/input.d.ts +1 -1
  234. package/dist-versioned/components/link/link.d.ts +1 -1
  235. package/dist-versioned/components/loader/loader.d.ts +1 -1
  236. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  237. package/dist-versioned/components/menu/menu.d.ts +1 -1
  238. package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
  239. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  240. package/dist-versioned/components/notification/notification.d.ts +1 -1
  241. package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
  242. package/dist-versioned/components/option/option.d.ts +1 -1
  243. package/dist-versioned/components/popup/popup.d.ts +1 -1
  244. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  245. package/dist-versioned/components/radio/radio.d.ts +1 -1
  246. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  247. package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
  248. package/dist-versioned/components/range/range.d.ts +1 -1
  249. package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
  250. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  251. package/dist-versioned/components/select/select.d.ts +1 -1
  252. package/dist-versioned/components/skeleton/skeleton.d.ts +1 -1
  253. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  254. package/dist-versioned/components/step/step.d.ts +1 -1
  255. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  256. package/dist-versioned/components/switch/switch.d.ts +1 -1
  257. package/dist-versioned/components/tab/tab.d.ts +1 -1
  258. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  259. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  260. package/dist-versioned/components/tag/tag.d.ts +1 -1
  261. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  262. package/dist-versioned/components/theme-listener/theme-listener.d.ts +1 -1
  263. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  264. package/dist-versioned/components/video/video.d.ts +1 -1
  265. package/dist-versioned/custom-elements.json +246 -246
  266. package/dist-versioned/internal/form.js +2 -2
  267. package/dist-versioned/solid-components.css +2 -2
  268. package/dist-versioned/solid-components.js +1 -1
  269. package/dist-versioned/vscode.html-custom-data.json +107 -107
  270. package/dist-versioned/web-types.json +157 -157
  271. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk.3MADQ6HK.js";import{b as G}from"./chunk.RAP66B6O.js";import{a as _}from"./chunk.CGQ2BPPZ.js";import{a as K}from"./chunk.IQPMMUES.js";import{a as I}from"./chunk.3XPSGHFS.js";import{a as k}from"./chunk.NYKJXI3Q.js";import{a as U,b,c as E,d as R,h as N}from"./chunk.JMZGGLJF.js";import{b as W,e as F,i as H}from"./chunk.UOAG5PNU.js";import{e as h}from"./chunk.6EV4YU6C.js";var B={fromAttribute(w){if(!w)return null;let t=w.trim().replace(/[./]/g,"-").match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;let e=`${t[1]}-${t[2]}-${t[3]}`,s=new Date(+t[1],+t[2]-1,+t[3]);return s.getFullYear()!==+t[1]||s.getMonth()!==+t[2]-1||s.getDate()!==+t[3]?null:e},toAttribute(w){return w!=null?w:""}},j={fromAttribute(w){if(!w)return null;let T=w.trim().replace(/[./]/g,"-"),t=T.match(/^(\d{2})-(\d{4})$/),e,s;if(t)e=Number(t[1]),s=Number(t[2]);else{if(t=T.match(/^(\d{4})-(\d{2})$/),!t)return null;s=Number(t[1]),e=Number(t[2])}return!s||!e||e<1||e>12?null:new Date(s,e-1,1)},toAttribute(w){if(!w)return"";let T=w.getFullYear(),t=String(w.getMonth()+1).padStart(2,"0");return`${T}-${t}`}},J={fromAttribute(w){if(!w)return[];let T=[],t=w.trim();if(t.startsWith("["))try{let s=JSON.parse(t);Array.isArray(s)&&(T=s.map(String))}catch(s){return[]}else T=t.split(/[\s,]+/).map(s=>s.trim()).filter(Boolean);let e=[];for(let s of T){let i=s.replace(/[-/]/g,".").split(".");if(i.length!==3)continue;let[a,o,f]=i.map(Number);if(!a||!o||!f)continue;let y=new Date(a,o-1,f);if(y.getFullYear()!==a||y.getMonth()!==o-1||y.getDate()!==f)continue;let m=`${a}-${String(o).padStart(2,"0")}-${String(f).padStart(2,"0")}`;e.push(m)}return e},toAttribute(w){return w?w.join(","):""}},r=class extends N{constructor(){super();this.localize=new K(this);this.hasSlotController=new _(this,"label","help-text","tooltip");this.formControlController=new G(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.viewMonth=null;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=n.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(l=>{var i,a;return l instanceof HTMLElement&&(((i=l.classList)==null?void 0:i.contains("nav"))||((a=l.classList)==null?void 0:a.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var a,o,f,y,m;if(this.disabled||this.visuallyDisabled||this.readonly){(a=t.preventDefault)==null||a.call(t),(o=t.stopPropagation)==null||o.call(t);return}let e=t.target,s=e.value,l=(f=e.selectionStart)!=null?f:s.length,i=(y=t.inputType)==null?void 0:y.startsWith("delete");if(this.range){let u=s.replace(/\D/g,""),d=u.slice(0,8),c=u.slice(8,16),p=this.buildDmyFromDigits(d),g=this.buildDmyFromDigits(c),L;d.length===0?L="":d.length<8?L=p:c.length>0?L=`${p} - ${g}`:L=i?p:`${p} -`;let x=this.countDigitsBeforeCaret(s,l),D;if(x<=8){let v=this.digitIndexToDmyCaretPos(Math.min(x,8));D=Math.min(v,p.length)}else{let v=d.length<8?p.length:p.length+3,S=Math.min(x-8,8),M=this.digitIndexToDmyCaretPos(S);D=v+Math.min(M,g.length)}this.inputValue=L;let O=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(p)){let v=this.dmyToIso(p),S=v?n.parseLocalISO(v):null;S&&!this.isDisabled(S)&&this.inMinMax(S)&&this.rangeStart!==v&&(this.rangeStart=v,this.previewEnd=null,this.viewMonth=new Date(S.getFullYear(),S.getMonth(),1),this.focusedDate=n.startOfDayLocal(S),O=!0)}else this.rangeStart&&(this.rangeStart=null,O=!0),this.rangeEnd&&(this.rangeEnd=null,O=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(g)&&this.rangeStart){let v=n.parseLocalISO(this.rangeStart),S=this.dmyToIso(g),M=S?n.parseLocalISO(S):null;if(!!M&&!this.isDisabled(M)&&this.inMinMax(M)){let[P,z]=n.compareDates(v,M)<=0?[v,M]:[M,v],A=n.isSameDay(P,z);if((this.allowSameDayRange||!A)&&!this.wouldRangeContainDisabled(P,z)){let C=n.toLocalISODate(n.startOfDayLocal(P)),Y=n.toLocalISODate(n.startOfDayLocal(z));(this.rangeStart!==C||this.rangeEnd!==Y)&&(this.rangeStart=C,this.rangeEnd=Y,this.viewMonth=new Date(z.getFullYear(),z.getMonth(),1),this.focusedDate=n.startOfDayLocal(z),O=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,O=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),O&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var S;let v=(S=this.input)!=null?S:e;v&&(v.value=this.inputValue,v.setSelectionRange(D,D))})})}else{let u=e,d=u.value,c=(m=u.selectionStart)!=null?m:d.length,p=d.replace(/\D/g,"").slice(0,8),g=p.slice(0,2),L=p.slice(2,4),x=p.slice(4,8),D="";g.length>0&&(D+=g,g.length===2&&(D+=".")),L.length>0&&g.length===2&&(D+=L,L.length===2&&(D+=".")),x.length>0&&g.length===2&&L.length===2&&(D+=x),D=D.replace(/\.\.+/g,".");let O=this.inputValue||"";this.inputValue=D;let v=c,S=$=>{let C=[];for(let Y=0;Y<$.length;Y++)$[Y]==="."&&C.push(Y);return C},M=S(O),V=S(D),P=M.filter($=>$<c).length,A=V.filter($=>$<c).length-P;if(A>0?v+=A:!M.includes(c)&&V.includes(c)&&(v+=1),v=Math.min(Math.max(0,v),D.length),requestAnimationFrame(()=>{var C;let $=(C=this.input)!=null?C:u;$&&($.value=this.inputValue,$.setSelectionRange(v,v))}),/^\d{2}\.\d{2}\.\d{4}$/.test(D)){let $=this.parseInputText(D);this.applyParsedInput($)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let u=this.rangeStart?n.parseLocalISO(this.rangeStart):null,d=this.rangeEnd?n.parseLocalISO(this.rangeEnd):null;u&&!d?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(u)}`):u&&d&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(u)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(d)}`)}else if(this.value){let u=n.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(u)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{let e=t.detail;e&&(this.currentPlacement=e)};this.handleHeaderKeyDown=(t,e,s,l)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Tab"&&!t.shiftKey){l&&(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=>{var i,a;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}let e=t.key,s=!0,l=new Date(this.focusedDate);switch(e){case"ArrowLeft":l.setDate(l.getDate()-1);break;case"ArrowRight":l.setDate(l.getDate()+1);break;case"ArrowUp":l.setDate(l.getDate()-7);break;case"ArrowDown":l.setDate(l.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){t.preventDefault();let o=(i=this.viewMonth)!=null?i:this.ensureViewMonth();if(l.getMonth()!==o.getMonth()||l.getFullYear()!==o.getFullYear()){let u=new Date(l.getFullYear(),l.getMonth(),1);this.viewMonth=u;let d=this.formatMonthYear(u);this.setNavStatus(d)}let y=n.startOfDayLocal(l);y.getTime()!==((a=this.focusedDate)==null?void 0:a.getTime())&&(this.focusedDate=y);let m=y.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(m),this.requestUpdate(),requestAnimationFrame(()=>{let u=this.shadowRoot,d=u==null?void 0:u.querySelector("button.day.focused");d==null||d.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){var a;super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?n.parseLocalISO(this.value):null,e=this.rangeStart?n.parseLocalISO(this.rangeStart):null,s=n.startOfDayLocal(new Date),l=this.range&&e?e:t!=null?t:s,i=(a=this.viewMonth)!=null?a:new Date(l.getFullYear(),l.getMonth(),1);this.viewMonth=i,this.focusedDate=n.clampDateToMonth(l,i),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}handleOpenChange(){this.popup&&(this.popup.active=this.open&&!this.disabled&&!this.visuallyDisabled)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleViewMonthChange(){var s;if(!this.viewMonth)return;let t=this.focusedDate||this.range&&this.rangeEnd&&n.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&n.parseLocalISO(this.rangeStart)||this.value&&n.parseLocalISO(this.value)||this.today;if(!t)return;let e=n.clampDateToMonth(t,this.viewMonth);e.getTime()!==((s=this.focusedDate)==null?void 0:s.getTime())&&(this.focusedDate=e)}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?n.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=n.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 l=e.value.length;e.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?n.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?n.parseLocalISO(this.rangeEnd):null,s=t!=null?t:e;s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=n.startOfDayLocal(s)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var i;let l=this.input;if(l){l.value=(i=this.inputValue)!=null?i:"";let a=l.value.length;l.setSelectionRange(a,a)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return n.parseLocalISO(t)}inMinMax(t){let e=this.min===null?null:this.parseISO(String(this.min)),s=this.max===null?null:this.parseISO(String(this.max));return!(e&&t<e||s&&t>s)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),l=String(t.getDate()).padStart(2,"0"),i=`${e}-${s}-${l}`;return this.disabledDatesSet.has(i)}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),l=t.toLocaleDateString("en-US",{month:"long"}),i=t.getFullYear();return`${s} of ${l} ${i}`}ordinal(t){let e=["th","st","nd","rd"],s=t%100,l=e[(s-20)%10]||e[s]||e[0];return t+l}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=n.compareDates(t,e)<=0?n.startOfDayLocal(t):n.startOfDayLocal(e),l=n.compareDates(t,e)<=0?n.startOfDayLocal(e):n.startOfDayLocal(t),i=new Date(s);for(;n.compareDates(i,l)<=0;){if(this.isDisabled(i))return!0;i.setDate(i.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=n.parseLocalISO(t);if(e||(e=n.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let s=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getFullYear());return`${s}.${l}.${i}`}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]),l=Number(e[2]),i=Number(e[3]),a=new Date(i,l-1,s);if(a.getFullYear()!==i||a.getMonth()!==l-1||a.getDate()!==s)return null;let o=n.startOfDayLocal(a);return n.toLocalISODate(o)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),l=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let i=this.isoToDmy(this.rangeStart),a=this.isoToDmy(this.rangeEnd);return i&&a?`${i} ${l} ${a}`:i&&!a?`${i} ${l}`:""}parseInputText(t){var l,i;let e=t.trim();if(this.range){let a=e.split(/\s*-\s*/);if(a.length===1){let o=a[0];if(!o)return{start:null,end:null,valid:!0};let f=this.dmyToIso(o);return f?{start:f,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(a.length>=2){let o=(l=a[0])!=null?l:"",f=(i=a[1])!=null?i:"",y=o?this.dmyToIso(o):null,m=f?this.dmyToIso(f):null;return o&&!y?{start:null,end:null,valid:!1}:f&&!m?{start:null,end:null,valid:!1}:{start:y,end:m,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let s=this.dmyToIso(e);return s?{single:s,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var o,f,y,m;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=u=>{if(!u)return!0;let d=n.parseLocalISO(u);return!(!this.inMinMax(d)||this.isDisabled(d))},s=!1;if(this.range){let u=(o=t.start)!=null?o:null,d=(f=t.end)!=null?f:null;if(!e(u)||d&&!e(d))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let c=u?n.parseLocalISO(u):null,p=d?n.parseLocalISO(d):null;if(c&&p){if(n.compareDates(c,p)>0){let x=c;c=p,p=x}if(!this.allowSameDayRange&&n.isSameDay(c,p))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(c,p))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let g=c?n.toLocalISODate(n.startOfDayLocal(c)):null,L=p?n.toLocalISODate(n.startOfDayLocal(p)):null;if(this.rangeStart!==g||this.rangeEnd!==L){this.rangeStart=g,this.rangeEnd=L,this.previewEnd=null,s=!0;let x=(y=c!=null?c:p)!=null?y:this.today;this.viewMonth=new Date(x.getFullYear(),x.getMonth(),1),this.focusedDate=n.startOfDayLocal(x),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let l=(m=t.single)!=null?m:null;if(!e(l))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let i=l?n.parseLocalISO(l):null,a=i?n.toLocalISODate(n.startOfDayLocal(i)):null;return this.value!==a&&(this.value=a,s=!0,i&&(this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1),this.focusedDate=n.startOfDayLocal(i)),this.emit("sd-select",{detail:{value:this.value,date:i!=null?i: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),l=e.slice(2,4),i=e.slice(4,8),a=s;return l.length&&(a+="."+l),i.length&&(a+="."+i),a}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,l;((l=(s=t.composedPath)==null?void 0:s.call(t))!=null?l:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled||this.readonly){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled||this.readonly){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&this.show(),this.emit("sd-focus")}setMonth(t){var i;let e=(i=this.viewMonth)!=null?i:this.ensureViewMonth(),s=new Date(e.getFullYear(),e.getMonth()+t,1);if(s.getMonth()===e.getMonth()&&s.getFullYear()===e.getFullYear())return;this.viewMonth=s;let l=this.formatMonthYear(s);this.setNavStatus(l),this.emit("sd-month-change",{detail:{month:s}})}setYear(t){var i;let e=(i=this.viewMonth)!=null?i:this.ensureViewMonth(),s=new Date(e.getFullYear()+t,e.getMonth(),1);if(s.getFullYear()===e.getFullYear()&&s.getMonth()===e.getMonth())return;this.viewMonth=s;let l=this.formatMonthYear(s);this.setNavStatus(l),this.emit("sd-month-year",{detail:{month:s}})}focusInitialGridDay(){var l;let t=null;if(!this.range&&this.value){let i=n.parseLocalISO(this.value);i&&(t=n.startOfDayLocal(i))}if(this.range){let i=this.rangeStart?n.parseLocalISO(this.rangeStart):null,a=this.rangeEnd?n.parseLocalISO(this.rangeEnd):null;a?t=n.startOfDayLocal(a):i&&(t=n.startOfDayLocal(i))}let e=(l=this.viewMonth)!=null?l:this.ensureViewMonth();if(!(i=>i?i.getFullYear()===e.getFullYear()&&i.getMonth()===e.getMonth()&&!this.isDisabled(i):!1)(t)){let{weeks:i}=this.getMonthMatrix(e),a=i.flat().find(o=>o.getMonth()===e.getMonth()&&n.isSameDay(o,this.today)&&!this.isDisabled(o));if(a)t=n.startOfDayLocal(a);else{let o=i.flat().find(f=>f.getMonth()===e.getMonth()&&!this.isDisabled(f));t=o?n.startOfDayLocal(o):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let i=this.shadowRoot,a=(i==null?void 0:i.querySelector("button.day.selected"))||(i==null?void 0:i.querySelector("button.day.focused"))||(i==null?void 0:i.querySelector('button.day[tabindex="0"]'))||(i==null?void 0:i.querySelector("button.day"));a==null||a.focus({preventScroll:!0})})}selectSingleDate(t){if(this.readonly||this.isDisabled(t))return;let e=n.startOfDayLocal(t),s=n.toLocalISODate(e);if(this.value===s)return;this.value=s;let l=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(l),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var a;let i=this.input;i&&(i.value=(a=this.inputValue)!=null?a:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let o=i.value.length;i.setSelectionRange(o,o)})}))})}selectRangeDate(t){if(this.readonly)return;let e=n.startOfDayLocal(t),s=this.rangeStart?n.parseLocalISO(this.rangeStart):null,l=this.rangeEnd?n.parseLocalISO(this.rangeEnd):null;if(!s&&!l){if(this.isDisabled(e))return;this.rangeStart=n.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let i=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${i}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var o;let a=this.input;a&&(a.value=(o=this.inputValue)!=null?o:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=a.value.length;a.setSelectionRange(f,f)})}))});return}if(s&&!l){if(this.isDisabled(e))return;if(n.isSameDay(s,e)){if(!this.allowSameDayRange){this.rangeStart=n.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let u=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${u}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let d=this.input;d&&(d.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=d.value.length;d.setSelectionRange(p,p)})}))});return}this.rangeStart=n.toLocalISODate(e),this.rangeEnd=n.toLocalISODate(e),this.previewEnd=null;let m=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${m}`,40),this.announceSelect(`${this.termEndSelected()}: ${m}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var d;let u=this.input;u&&(u.value=(d=this.inputValue)!=null?d:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let c=u.value.length;u.setSelectionRange(c,c)})}))});return}let i=n.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(i,e))return;let[a,o]=n.compareDates(i,e)<=0?[i,e]:[e,i];this.rangeStart=n.toLocalISODate(a),this.rangeEnd=n.toLocalISODate(o),this.previewEnd=null;let f=this.formatSelectionLabel(a),y=this.formatSelectionLabel(o);this.announceSelect(`${this.termStartSelected()}: ${f}`,40),this.announceSelect(`${this.termEndSelected()}: ${y}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let m=this.input;m&&(m.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let d=m.value.length;m.setSelectionRange(d,d)})}))});return}if(s&&l){if(this.isDisabled(e))return;this.rangeStart=n.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let i=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${i}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var o;let a=this.input;a&&(a.value=(o=this.inputValue)!=null?o:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=a.value.length;a.setSelectionRange(f,f)})}))})}}selectDate(t){this.readonly||(this.range?this.selectRangeDate(t):this.selectSingleDate(t))}ensureViewMonth(){if(this.viewMonth)return this.viewMonth;let t=this.value?n.parseLocalISO(this.value):null,e=this.rangeStart?n.parseLocalISO(this.rangeStart):null,s=n.startOfDayLocal(new Date),l=this.range&&e?e:t!=null?t:s,i=new Date(l.getFullYear(),l.getMonth(),1);return this.viewMonth=i,i}getMonthMatrix(t){var y;let e=(y=this.firstDayOfWeek)!=null?y:1,s=new Date(t.getFullYear(),t.getMonth(),1),l=new Date(s),i=(s.getDay()-e+7)%7;l.setDate(s.getDate()-i);let a=[],o=l;for(let m=0;m<6;m++){let u=[];for(let d=0;d<7;d++)u.push(new Date(o)),o.setDate(o.getDate()+1);a.push(u)}let f=m=>m.every(u=>u.getMonth()!==t.getMonth());for(;a.length>0&&f(a[a.length-1]);)a.pop();return{weeks:a}}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 l;let t=(l=this.firstDayOfWeek)!=null?l:1,e=new Date(2021,7,1),s=[];for(let i=0;i<7;i++){let a=new Date(e);a.setDate(e.getDate()+(t+i)%7);try{s.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(a))}catch(o){s.push(a.toLocaleDateString(void 0,{weekday:"short"}))}}return s}getTabTargetDayForCurrentView(t){var i;let e=(i=this.viewMonth)!=null?i:this.ensureViewMonth(),s=t.flat().find(a=>a.getMonth()===e.getMonth()&&n.isSameDay(a,this.today)&&!this.isDisabled(a));if(s)return n.startOfDayLocal(s);let l=t.flat().find(a=>a.getMonth()===e.getMonth()&&!this.isDisabled(a));return l?n.startOfDayLocal(l):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?n.parseLocalISO(this.rangeStart):null,s=this.rangeEnd?n.parseLocalISO(this.rangeEnd):null;if(e&&!s){let l=n.startOfDayLocal(t);this.previewEnd=this.isDisabled(l)?null:l,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var u,d;let t=(u=this.viewMonth)!=null?u:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),s=this.formatMonthYear(t),l=this.weekdayLabels(),i=this.value?this.parseISO(this.value):null,a=this.rangeStart?this.parseISO(this.rangeStart):null,o=this.rangeEnd?this.parseISO(this.rangeEnd):null,f=this.previewEnd,y=c=>!this.range||!a||o||!f?!1:n.isBetweenInclusive(c,a,f),m=this.getTabTargetDayForCurrentView(e);return F`<div part="datepicker" class="${I("w-[284px] z-50 bg-white py-3 px-4",this.open?"block":"hidden",(d=this.currentPlacement)!=null&&d.startsWith("bottom")?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default","border-primary")}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="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-6-12-0-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-6-12-0-icon></button> <button type="button" tabindex="0" class="nav prev w-6 h-6 hover:cursor-pointer sd-interactive" part="prev-month-button" @click="${()=>this.setMonth(-1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"month",-1,!1)}" aria-label="${this.localize.term("previousMonth")}"><sd-6-12-0-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-6-12-0-icon></button></div><div tabindex="-1" class="month-label flex justify-center sd-headline sd-headline--size-base text-primary!" part="month-label" aria-live="polite">${s}</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-6-12-0-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-6-12-0-icon></button> <button type="button" tabindex="0" class="nav next w-6 h-6 hover:cursor-pointer sd-interactive" part="next-year-button" @click="${()=>this.setYear(1)}" @keydown="${c=>this.handleHeaderKeyDown(c,"year",1,!0)}" aria-label="${this.localize.term("nextYear")}"><sd-6-12-0-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-6-12-0-icon></button></div></div><sd-6-12-0-divider></sd-6-12-0-divider><div class="sr-only" aria-live="polite" aria-atomic="true">${this.statusNavText}</div><div class="sr-only" aria-live="assertive" aria-atomic="true">${this.statusSelectText}</div><div class="sr-only" id="keyboard-hint">${this.localize.term("datePickerInfo")}</div><div class="grid mt-2" role="grid" aria-describedby="keyboard-hint" aria-label="${s}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${l.map((c,p)=>F`<div role="columnheader" aria-colindex="${p+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-"+(p+1)}">${c}</div>`)}</div>${e.map((c,p)=>F`<div class="grid-row grid grid-cols-7 ${p===0?"mt-2":""}" role="row" aria-rowindex="${p+2}">${c.map((g,L)=>{let x=g.getMonth()===t.getMonth(),D=this.isDisabled(g)||!this.inMinMax(g),O=n.isSameDay(g,this.focusedDate),v=n.isSameDay(g,this.today),S=!this.range&&i?n.isSameDay(g,i):!1,M=this.range&&a?n.isSameDay(g,a):!1,V=this.range&&o?n.isSameDay(g,o):!1,P=this.range&&a&&o?n.isBetweenInclusive(g,a,o):!1,z=y(g)&&!D,A=-1,$=m&&n.isSameDay(g,m);(this.tabbingIntoGrid&&$||!this.tabbingIntoGrid&&O)&&(A=0);let C=this.isWeekend(g),Y=g.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),q=M?this.localize.term("startDateSelected"):V?this.localize.term("endDateSelected"):void 0;return F`<button type="button" part="day" class="${I("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded-md w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",M||V?"hover:bg-primary-500":"hover:bg-primary-100 hover:text-primary-500",x?this.isInDisabledDates(g)||!this.inMinMax(g)?"out-month text-neutral-500":this.disabledWeekends&&C?"weekend-day text-neutral-500":"in-month text-primary":this.disabledWeekends&&C?"out-month weekend-day text-neutral-500":C?"out-month weekend-day text-neutral-700":"out-month text-neutral-700",S?"selected border-primary bg-primary text-white hover:bg-primary-500 hover:text-white":"",M?"bg-primary text-white rounded-l-md rounded-r-none":"",V?"bg-primary text-white range-end rounded-r-md rounded-l-none":"",P&&!M&&!V?"in-range selected bg-primary-100 text-primary-500 rounded-none hover:bg-primary-500 hover:text-white":"",!P&&z&&!M&&!V?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",v&&!S&&!M&&!V&&O?"today border-[1px] border-primary font-bold":"",D?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",O&&!v?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${L+1}" aria-labelledby="${"col-"+(L+1)}" .tabIndex="${A}" ?disabled="${D||this.disabled||this.readonly}" aria-disabled="${D||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${S||P||M||V?"true":"false"}" aria-current="${v?"date":H}" aria-label="${Y}" aria-roledescription="${q!=null?q:H}" @focus="${()=>this.focusedDate=n.startOfDayLocal(g)}" @mouseenter="${()=>this.onDayMouseEnter(g)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=n.startOfDayLocal(g),this.selectDate(g)}}">${g.getDate()}</button>`})}</div>`)}</div></div>`}render(){var c,p;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,l=!!t.tooltip,i=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,a=this.floatingLabel&&e&&(this.hasFocus||this.open||i)&&!this.disabled&&!this.visuallyDisabled,o=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",f={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],y={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],m=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",u={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"}[m],d=this.size==="sm"?"text-sm":"text-base";return F`<div part="form-control" class="${I("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||l?F`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${I(e?"inline-block form-control-color-text":"hidden",d)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?F`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${I("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${e&&this.floatingLabel?F`<label id="label" part="form-control-floating-label" class="${I("absolute left-4 z-10 pointer-events-none transition-all duration-200",a?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2",a&&"mt-1")}" for="input"><span class="${I("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",a&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${I("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",u,this.open&&this.alignment==="left"?"rounded-bl-none":"",this.open&&this.alignment==="right"?"rounded-br-none":"",this.open&&((c=this.currentPlacement)!=null&&c.startsWith("bottom")?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-6-12-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${I("inline-flex relative w-full",(p=this.currentPlacement)!=null&&p.startsWith("bottom")?"origin-top":"origin-bottom")}" placement="${this.alignment==="left"?`${this.placement}-start`:`${this.placement}-end`}" flip shift auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${I("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",m==="disabled"||m==="visuallyDisabled"?"text-neutral-500":"text-black")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${s?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${I("min-w-0 grow focus:outline-none bg-transparent hover:cursor-pointer form-control-color-text",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],d,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||a?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?F`<sd-6-12-0-icon part="invalid-icon" class="${I("text-error",f,y)}" library="_internal" name="risk"></sd-6-12-0-icon>`:""} ${this.showValidStyle&&this.styleOnValid?F`<sd-6-12-0-icon class="${I("text-success shrink-0",f,y)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-12-0-icon>`:""}<sd-6-12-0-icon class="${I(o,f,y,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-6-12-0-icon></div>${this.renderCalendar()}</sd-6-12-0-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${I("text-sm text-neutral-700 mt-1",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};r.styles=[...N.styles,W`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}`],h([b({type:String,reflect:!0})],r.prototype,"locale",2),h([b({type:String,converter:B,reflect:!0})],r.prototype,"value",2),h([b({type:Boolean,reflect:!0})],r.prototype,"range",2),h([b({attribute:"range-start",converter:B,reflect:!0})],r.prototype,"rangeStart",2),h([b({attribute:"range-end",converter:B,reflect:!0})],r.prototype,"rangeEnd",2),h([b({type:Boolean})],r.prototype,"allowSameDayRange",2),h([b({type:String,converter:B,reflect:!0})],r.prototype,"min",2),h([b({type:String,converter:B,reflect:!0})],r.prototype,"max",2),h([b({attribute:"view-month",converter:j})],r.prototype,"viewMonth",2),h([b({type:Number})],r.prototype,"firstDayOfWeek",2),h([b({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],r.prototype,"disabledWeekends",2),h([b({attribute:"disabled-dates",converter:J})],r.prototype,"disabledDates",2),h([b({attribute:!1})],r.prototype,"isDateDisabled",2),h([b({type:String,reflect:!0})],r.prototype,"size",2),h([b({type:String})],r.prototype,"alignment",2),h([b({type:String,reflect:!0})],r.prototype,"label",2),h([b({type:String,attribute:"help-text",reflect:!0})],r.prototype,"helpText",2),h([b({attribute:"floating-label",type:Boolean,reflect:!0})],r.prototype,"floatingLabel",2),h([b({type:Boolean,reflect:!0})],r.prototype,"disabled",2),h([b({type:Boolean,reflect:!0})],r.prototype,"required",2),h([b({type:Boolean,attribute:"visually-disabled"})],r.prototype,"visuallyDisabled",2),h([b({type:Boolean,reflect:!0,attribute:"style-on-valid"})],r.prototype,"styleOnValid",2),h([b({type:Boolean,reflect:!0})],r.prototype,"readonly",2),h([b({type:String,reflect:!0})],r.prototype,"placement",2),h([b({type:String,reflect:!0})],r.prototype,"placeholder",2),h([b({reflect:!0})],r.prototype,"name",2),h([b({type:String,reflect:!0})],r.prototype,"form",2),h([E()],r.prototype,"open",2),h([E()],r.prototype,"focusedDate",2),h([E()],r.prototype,"today",2),h([E()],r.prototype,"disabledDatesSet",2),h([E()],r.prototype,"previewEnd",2),h([E()],r.prototype,"statusNavText",2),h([E()],r.prototype,"statusSelectText",2),h([E()],r.prototype,"hasFocus",2),h([E()],r.prototype,"showValidStyle",2),h([E()],r.prototype,"showInvalidStyle",2),h([E()],r.prototype,"currentPlacement",2),h([E()],r.prototype,"inputValue",2),h([R("sd-6-12-0-popup")],r.prototype,"popup",2),h([R("#invalid-message")],r.prototype,"invalidMessage",2),h([R("#input")],r.prototype,"input",2),h([k("open",{waitUntilFirstUpdate:!0})],r.prototype,"handleOpenChange",1),h([k("locale")],r.prototype,"handleLocaleChange",1),h([k("viewMonth")],r.prototype,"handleViewMonthChange",1),h([k("disabledDates")],r.prototype,"handleDisabledDatesChange",1),h([k("value")],r.prototype,"handleValueChange",1),h([k("rangeStart"),k("rangeEnd")],r.prototype,"handleRangeChange",1),h([k(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],r.prototype,"handleDisabledChange",1),h([k(["size","floatingLabel"])],r.prototype,"handleSizeChange",1),r=h([U("sd-6-12-0-datepicker")],r);export{r as a};
1
+ import{a as n}from"./chunk.3MADQ6HK.js";import{b as G}from"./chunk.RAP66B6O.js";import{a as _}from"./chunk.CGQ2BPPZ.js";import{a as K}from"./chunk.IQPMMUES.js";import{a as I}from"./chunk.3XPSGHFS.js";import{a as k}from"./chunk.NYKJXI3Q.js";import{a as U,b,c as E,d as R,h as N}from"./chunk.JMZGGLJF.js";import{b as W,e as F,i as H}from"./chunk.UOAG5PNU.js";import{e as h}from"./chunk.6EV4YU6C.js";var B={fromAttribute(w){if(!w)return null;let t=w.trim().replace(/[./]/g,"-").match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;let e=`${t[1]}-${t[2]}-${t[3]}`,s=new Date(+t[1],+t[2]-1,+t[3]);return s.getFullYear()!==+t[1]||s.getMonth()!==+t[2]-1||s.getDate()!==+t[3]?null:e},toAttribute(w){return w!=null?w:""}},j={fromAttribute(w){if(!w)return null;let T=w.trim().replace(/[./]/g,"-"),t=T.match(/^(\d{2})-(\d{4})$/),e,s;if(t)e=Number(t[1]),s=Number(t[2]);else{if(t=T.match(/^(\d{4})-(\d{2})$/),!t)return null;s=Number(t[1]),e=Number(t[2])}return!s||!e||e<1||e>12?null:new Date(s,e-1,1)},toAttribute(w){if(!w)return"";let T=w.getFullYear(),t=String(w.getMonth()+1).padStart(2,"0");return`${T}-${t}`}},J={fromAttribute(w){if(!w)return[];let T=[],t=w.trim();if(t.startsWith("["))try{let s=JSON.parse(t);Array.isArray(s)&&(T=s.map(String))}catch(s){return[]}else T=t.split(/[\s,]+/).map(s=>s.trim()).filter(Boolean);let e=[];for(let s of T){let i=s.replace(/[-/]/g,".").split(".");if(i.length!==3)continue;let[a,o,f]=i.map(Number);if(!a||!o||!f)continue;let y=new Date(a,o-1,f);if(y.getFullYear()!==a||y.getMonth()!==o-1||y.getDate()!==f)continue;let m=`${a}-${String(o).padStart(2,"0")}-${String(f).padStart(2,"0")}`;e.push(m)}return e},toAttribute(w){return w?w.join(","):""}},r=class extends N{constructor(){super();this.localize=new K(this);this.hasSlotController=new _(this,"label","help-text","tooltip");this.formControlController=new G(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.locale="en-US";this.value=null;this.range=!1;this.rangeStart=null;this.rangeEnd=null;this.allowSameDayRange=!1;this.min=void 0;this.max=void 0;this.viewMonth=null;this.firstDayOfWeek=null;this.disabledWeekends=!1;this.disabledDates=[];this.isDateDisabled=null;this.size="lg";this.alignment="left";this.label="";this.helpText="";this.floatingLabel=!1;this.disabled=!1;this.required=!1;this.visuallyDisabled=!1;this.styleOnValid=!1;this.readonly=!1;this.placement="bottom";this.placeholder="";this.name="";this.form="";this.open=!1;this.today=n.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(l=>{var i,a;return l instanceof HTMLElement&&(((i=l.classList)==null?void 0:i.contains("nav"))||((a=l.classList)==null?void 0:a.contains("month-label")))})&&(this.tabbingIntoGrid=!0)};this.handleInput=t=>{var a,o,f,y,m;if(this.disabled||this.visuallyDisabled||this.readonly){(a=t.preventDefault)==null||a.call(t),(o=t.stopPropagation)==null||o.call(t);return}let e=t.target,s=e.value,l=(f=e.selectionStart)!=null?f:s.length,i=(y=t.inputType)==null?void 0:y.startsWith("delete");if(this.range){let u=s.replace(/\D/g,""),d=u.slice(0,8),c=u.slice(8,16),p=this.buildDmyFromDigits(d),g=this.buildDmyFromDigits(c),L;d.length===0?L="":d.length<8?L=p:c.length>0?L=`${p} - ${g}`:L=i?p:`${p} -`;let x=this.countDigitsBeforeCaret(s,l),D;if(x<=8){let v=this.digitIndexToDmyCaretPos(Math.min(x,8));D=Math.min(v,p.length)}else{let v=d.length<8?p.length:p.length+3,S=Math.min(x-8,8),M=this.digitIndexToDmyCaretPos(S);D=v+Math.min(M,g.length)}this.inputValue=L;let O=!1;if(/^\d{2}\.\d{2}\.\d{4}$/.test(p)){let v=this.dmyToIso(p),S=v?n.parseLocalISO(v):null;S&&!this.isDisabled(S)&&this.inMinMax(S)&&this.rangeStart!==v&&(this.rangeStart=v,this.previewEnd=null,this.viewMonth=new Date(S.getFullYear(),S.getMonth(),1),this.focusedDate=n.startOfDayLocal(S),O=!0)}else this.rangeStart&&(this.rangeStart=null,O=!0),this.rangeEnd&&(this.rangeEnd=null,O=!0);if(/^\d{2}\.\d{2}\.\d{4}$/.test(g)&&this.rangeStart){let v=n.parseLocalISO(this.rangeStart),S=this.dmyToIso(g),M=S?n.parseLocalISO(S):null;if(!!M&&!this.isDisabled(M)&&this.inMinMax(M)){let[P,z]=n.compareDates(v,M)<=0?[v,M]:[M,v],A=n.isSameDay(P,z);if((this.allowSameDayRange||!A)&&!this.wouldRangeContainDisabled(P,z)){let C=n.toLocalISODate(n.startOfDayLocal(P)),Y=n.toLocalISODate(n.startOfDayLocal(z));(this.rangeStart!==C||this.rangeEnd!==Y)&&(this.rangeStart=C,this.rangeEnd=Y,this.viewMonth=new Date(z.getFullYear(),z.getMonth(),1),this.focusedDate=n.startOfDayLocal(z),O=!0)}}}else this.rangeEnd&&(this.rangeEnd=null,O=!0);this.showInvalidStyle=!1,this.showValidStyle=!!(this.rangeStart&&this.rangeEnd),O&&(this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})),Promise.resolve().then(()=>{requestAnimationFrame(()=>{var S;let v=(S=this.input)!=null?S:e;v&&(v.value=this.inputValue,v.setSelectionRange(D,D))})})}else{let u=e,d=u.value,c=(m=u.selectionStart)!=null?m:d.length,p=d.replace(/\D/g,"").slice(0,8),g=p.slice(0,2),L=p.slice(2,4),x=p.slice(4,8),D="";g.length>0&&(D+=g,g.length===2&&(D+=".")),L.length>0&&g.length===2&&(D+=L,L.length===2&&(D+=".")),x.length>0&&g.length===2&&L.length===2&&(D+=x),D=D.replace(/\.\.+/g,".");let O=this.inputValue||"";this.inputValue=D;let v=c,S=$=>{let C=[];for(let Y=0;Y<$.length;Y++)$[Y]==="."&&C.push(Y);return C},M=S(O),V=S(D),P=M.filter($=>$<c).length,A=V.filter($=>$<c).length-P;if(A>0?v+=A:!M.includes(c)&&V.includes(c)&&(v+=1),v=Math.min(Math.max(0,v),D.length),requestAnimationFrame(()=>{var C;let $=(C=this.input)!=null?C:u;$&&($.value=this.inputValue,$.setSelectionRange(v,v))}),/^\d{2}\.\d{2}\.\d{4}$/.test(D)){let $=this.parseInputText(D);this.applyParsedInput($)}else this.showInvalidStyle=!1,this.showValidStyle=!1;return}if(!this.open&&this.hasFocus&&!this.disabled&&!this.visuallyDisabled&&this.show(),this.range){let u=this.rangeStart?n.parseLocalISO(this.rangeStart):null,d=this.rangeEnd?n.parseLocalISO(this.rangeEnd):null;u&&!d?this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(u)}`):u&&d&&this.setNavStatus(`${this.termStartSelected()}: ${this.formatSelectionLabel(u)}; ${this.termEndSelected()}: ${this.formatSelectionLabel(d)}`)}else if(this.value){let u=n.parseLocalISO(this.value);this.setNavStatus(`${this.formatSelectionLabel(u)}`)}};this.handleInputBlur=()=>{if(this.disabled||this.visuallyDisabled){this.handleBlur();return}let t=this.parseInputText(this.inputValue);t.valid?this.applyParsedInput(t):(this.inputValue=this.formatInputValue(),this.showInvalidStyle=!!this.inputValue&&!this.value&&!this.rangeStart),this.handleBlur()};this.handleCurrentPlacement=t=>{let e=t.detail;e&&(this.currentPlacement=e)};this.handleHeaderKeyDown=(t,e,s,l)=>{if(!(this.disabled||this.visuallyDisabled||this.readonly)){if(t.key==="Tab"&&!t.shiftKey){l&&(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=>{var i,a;if(this.disabled||this.visuallyDisabled||this.readonly){t.preventDefault(),t.stopPropagation();return}let e=t.key,s=!0,l=new Date(this.focusedDate);switch(e){case"ArrowLeft":l.setDate(l.getDate()-1);break;case"ArrowRight":l.setDate(l.getDate()+1);break;case"ArrowUp":l.setDate(l.getDate()-7);break;case"ArrowDown":l.setDate(l.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){t.preventDefault();let o=(i=this.viewMonth)!=null?i:this.ensureViewMonth();if(l.getMonth()!==o.getMonth()||l.getFullYear()!==o.getFullYear()){let u=new Date(l.getFullYear(),l.getMonth(),1);this.viewMonth=u;let d=this.formatMonthYear(u);this.setNavStatus(d)}let y=n.startOfDayLocal(l);y.getTime()!==((a=this.focusedDate)==null?void 0:a.getTime())&&(this.focusedDate=y);let m=y.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"});this.setNavStatus(m),this.requestUpdate(),requestAnimationFrame(()=>{let u=this.shadowRoot,d=u==null?void 0:u.querySelector("button.day.focused");d==null||d.focus({preventScroll:!0})})}};this.handleInputKeyDown=t=>{if((this.disabled||this.visuallyDisabled||this.readonly)&&t.key!=="Tab"){t.preventDefault(),t.stopPropagation();return}if(!(t.key==="ArrowLeft"||t.key==="ArrowRight"||t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="Home"||t.key==="End"||t.key==="PageUp"||t.key==="PageDown")){if(t.key==="Escape"&&this.open){t.preventDefault(),this.hide(),this.emit("sd-datepicker-close");return}t.key==="Enter"&&!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&(t.preventDefault(),this.show())}};this.handleOutsideClick=this.handleOutsideClick.bind(this)}connectedCallback(){var a;super.connectedCallback(),this.syncDisabledDatesSet(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focusout",this.onFocusOut),this.updateComplete.then(()=>{this.formControlController.updateValidity()});let t=this.value?n.parseLocalISO(this.value):null,e=this.rangeStart?n.parseLocalISO(this.rangeStart):null,s=n.startOfDayLocal(new Date),l=this.range&&e?e:t!=null?t:s,i=(a=this.viewMonth)!=null?a:new Date(l.getFullYear(),l.getMonth(),1);this.viewMonth=i,this.focusedDate=n.clampDateToMonth(l,i),(this.firstDayOfWeek===null||this.firstDayOfWeek===void 0)&&(this.firstDayOfWeek=1),this.inputValue=this.formatInputValue(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.range?this.localize.term("datePickerRange"):this.localize.term("datePicker")),this.addEventListener("focusin",this.onFocusIn)}firstUpdated(){this.formControlController.updateValidity()}handleOpenChange(){this.popup&&(this.popup.active=this.open&&!this.disabled&&!this.visuallyDisabled)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),document.removeEventListener("click",this.handleOutsideClick)}handleLocaleChange(){this.firstDayOfWeek===null&&(this.firstDayOfWeek=1),this.requestUpdate()}handleViewMonthChange(){var s;if(!this.viewMonth)return;let t=this.focusedDate||this.range&&this.rangeEnd&&n.parseLocalISO(this.rangeEnd)||this.range&&this.rangeStart&&n.parseLocalISO(this.rangeStart)||this.value&&n.parseLocalISO(this.value)||this.today;if(!t)return;let e=n.clampDateToMonth(t,this.viewMonth);e.getTime()!==((s=this.focusedDate)==null?void 0:s.getTime())&&(this.focusedDate=e)}handleDisabledDatesChange(){this.syncDisabledDatesSet(),this.requestUpdate()}handleValueChange(){let t=this.value?n.parseLocalISO(this.value):null;t&&(this.viewMonth=new Date(t.getFullYear(),t.getMonth(),1),this.focusedDate=n.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 l=e.value.length;e.setSelectionRange(l,l)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleRangeChange(){let t=this.rangeStart?n.parseLocalISO(this.rangeStart):null,e=this.rangeEnd?n.parseLocalISO(this.rangeEnd):null,s=t!=null?t:e;s&&(this.viewMonth=new Date(s.getFullYear(),s.getMonth(),1),this.focusedDate=n.startOfDayLocal(s)),this.previewEnd!==null&&(this.previewEnd=null),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var i;let l=this.input;if(l){l.value=(i=this.inputValue)!=null?i:"";let a=l.value.length;l.setSelectionRange(a,a)}this.formControlController.updateValidity()}),this.emit("sd-change",{detail:{value:this.value,rangeStart:this.rangeStart,rangeEnd:this.rangeEnd}})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1)}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}get validity(){let t={valid:!0};return this.input instanceof HTMLInputElement?this.input.validity:t}get validationMessage(){return(this.input instanceof HTMLInputElement?this.input.validationMessage:"")||""}checkValidity(){return this.input instanceof HTMLInputElement?this.input.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input instanceof HTMLInputElement?this.input.reportValidity():!0}setCustomValidity(t){var e;(e=this.input)==null||e.setCustomValidity(t),this.formControlController.updateValidity()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}parseISO(t){return n.parseLocalISO(t)}inMinMax(t){let e=this.min===null?null:this.parseISO(String(this.min)),s=this.max===null?null:this.parseISO(String(this.max));return!(e&&t<e||s&&t>s)}isInDisabledDates(t){if(!this.disabledDatesSet||this.disabledDatesSet.size===0)return!1;let e=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),l=String(t.getDate()).padStart(2,"0"),i=`${e}-${s}-${l}`;return this.disabledDatesSet.has(i)}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),l=t.toLocaleDateString("en-US",{month:"long"}),i=t.getFullYear();return`${s} of ${l} ${i}`}ordinal(t){let e=["th","st","nd","rd"],s=t%100,l=e[(s-20)%10]||e[s]||e[0];return t+l}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=n.compareDates(t,e)<=0?n.startOfDayLocal(t):n.startOfDayLocal(e),l=n.compareDates(t,e)<=0?n.startOfDayLocal(e):n.startOfDayLocal(t),i=new Date(s);for(;n.compareDates(i,l)<=0;){if(this.isDisabled(i))return!0;i.setDate(i.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=n.parseLocalISO(t);if(e||(e=n.parseLocalISO(t.replace(/-/g,"."))),!e)return"";let s=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getFullYear());return`${s}.${l}.${i}`}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]),l=Number(e[2]),i=Number(e[3]),a=new Date(i,l-1,s);if(a.getFullYear()!==i||a.getMonth()!==l-1||a.getDate()!==s)return null;let o=n.startOfDayLocal(a);return n.toLocalISODate(o)}formatInputValue(){let t=(this.locale||"").toLowerCase(),e=(this.getAttribute("lang")||"").toLowerCase(),l=t.startsWith("de")||e.startsWith("de")?"\u2013":"-";if(!this.range)return this.isoToDmy(this.value);let i=this.isoToDmy(this.rangeStart),a=this.isoToDmy(this.rangeEnd);return i&&a?`${i} ${l} ${a}`:i&&!a?`${i} ${l}`:""}parseInputText(t){var l,i;let e=t.trim();if(this.range){let a=e.split(/\s*-\s*/);if(a.length===1){let o=a[0];if(!o)return{start:null,end:null,valid:!0};let f=this.dmyToIso(o);return f?{start:f,end:null,valid:!0}:{start:null,end:null,valid:!1}}else if(a.length>=2){let o=(l=a[0])!=null?l:"",f=(i=a[1])!=null?i:"",y=o?this.dmyToIso(o):null,m=f?this.dmyToIso(f):null;return o&&!y?{start:null,end:null,valid:!1}:f&&!m?{start:null,end:null,valid:!1}:{start:y,end:m,valid:!0}}return{start:null,end:null,valid:!1}}if(!e)return{single:null,valid:!0};let s=this.dmyToIso(e);return s?{single:s,valid:!0}:{single:null,valid:!1}}applyParsedInput(t){var o,f,y,m;if(!t.valid)return this.showInvalidStyle=!0,this.showValidStyle=!1,this.formControlController.setValidity(!1),!1;let e=u=>{if(!u)return!0;let d=n.parseLocalISO(u);return!(!this.inMinMax(d)||this.isDisabled(d))},s=!1;if(this.range){let u=(o=t.start)!=null?o:null,d=(f=t.end)!=null?f:null;if(!e(u)||d&&!e(d))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let c=u?n.parseLocalISO(u):null,p=d?n.parseLocalISO(d):null;if(c&&p){if(n.compareDates(c,p)>0){let x=c;c=p,p=x}if(!this.allowSameDayRange&&n.isSameDay(c,p))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1;if(this.wouldRangeContainDisabled(c,p))return this.showInvalidStyle=!0,this.showValidStyle=!1,!1}let g=c?n.toLocalISODate(n.startOfDayLocal(c)):null,L=p?n.toLocalISODate(n.startOfDayLocal(p)):null;if(this.rangeStart!==g||this.rangeEnd!==L){this.rangeStart=g,this.rangeEnd=L,this.previewEnd=null,s=!0;let x=(y=c!=null?c:p)!=null?y:this.today;this.viewMonth=new Date(x.getFullYear(),x.getMonth(),1),this.focusedDate=n.startOfDayLocal(x),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}})}return this.showInvalidStyle=!1,this.range?this.showValidStyle=!!(this.rangeStart&&this.rangeEnd&&this.styleOnValid):this.showValidStyle=!!(this.value&&this.styleOnValid),this.formControlController.setValidity(!0),this.updateComplete.then(()=>{this.formControlController.updateValidity()}),!0}let l=(m=t.single)!=null?m:null;if(!e(l))return this.input.setCustomValidity(this.localize.term("datePickerRange")),this.formControlController.setValidity(!1),this.showInvalidStyle=!0,this.showValidStyle=!1,!1;let i=l?n.parseLocalISO(l):null,a=i?n.toLocalISODate(n.startOfDayLocal(i)):null;return this.value!==a&&(this.value=a,s=!0,i&&(this.viewMonth=new Date(i.getFullYear(),i.getMonth(),1),this.focusedDate=n.startOfDayLocal(i)),this.emit("sd-select",{detail:{value:this.value,date:i!=null?i: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),l=e.slice(2,4),i=e.slice(4,8),a=s;return l.length&&(a+="."+l),i.length&&(a+="."+i),a}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,l;((l=(s=t.composedPath)==null?void 0:s.call(t))!=null?l:[]).includes(this)||(this.hide(),this.hasFocus=!1,this.emit("sd-datepicker-close"))}show(){if(this.open||this.disabled||this.visuallyDisabled||this.readonly){this.open=!1;return}this.open=!0}hide(){if(!this.open||this.disabled){this.open=!1;return}this.open=!1}handleMouseDown(t){if(this.visuallyDisabled||this.disabled||this.readonly){t.preventDefault(),t.stopPropagation();return}t.preventDefault(),this.open||this.show()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleFocus(){this.hasFocus=!0,!this.open&&!this.disabled&&!this.visuallyDisabled&&!this.readonly&&this.show(),this.emit("sd-focus")}setMonth(t){var i;let e=(i=this.viewMonth)!=null?i:this.ensureViewMonth(),s=new Date(e.getFullYear(),e.getMonth()+t,1);if(s.getMonth()===e.getMonth()&&s.getFullYear()===e.getFullYear())return;this.viewMonth=s;let l=this.formatMonthYear(s);this.setNavStatus(l),this.emit("sd-month-change",{detail:{month:s}})}setYear(t){var i;let e=(i=this.viewMonth)!=null?i:this.ensureViewMonth(),s=new Date(e.getFullYear()+t,e.getMonth(),1);if(s.getFullYear()===e.getFullYear()&&s.getMonth()===e.getMonth())return;this.viewMonth=s;let l=this.formatMonthYear(s);this.setNavStatus(l),this.emit("sd-month-year",{detail:{month:s}})}focusInitialGridDay(){var l;let t=null;if(!this.range&&this.value){let i=n.parseLocalISO(this.value);i&&(t=n.startOfDayLocal(i))}if(this.range){let i=this.rangeStart?n.parseLocalISO(this.rangeStart):null,a=this.rangeEnd?n.parseLocalISO(this.rangeEnd):null;a?t=n.startOfDayLocal(a):i&&(t=n.startOfDayLocal(i))}let e=(l=this.viewMonth)!=null?l:this.ensureViewMonth();if(!(i=>i?i.getFullYear()===e.getFullYear()&&i.getMonth()===e.getMonth()&&!this.isDisabled(i):!1)(t)){let{weeks:i}=this.getMonthMatrix(e),a=i.flat().find(o=>o.getMonth()===e.getMonth()&&n.isSameDay(o,this.today)&&!this.isDisabled(o));if(a)t=n.startOfDayLocal(a);else{let o=i.flat().find(f=>f.getMonth()===e.getMonth()&&!this.isDisabled(f));t=o?n.startOfDayLocal(o):null}}t&&(this.focusedDate=t),this.requestUpdate(),requestAnimationFrame(()=>{let i=this.shadowRoot,a=(i==null?void 0:i.querySelector("button.day.selected"))||(i==null?void 0:i.querySelector("button.day.focused"))||(i==null?void 0:i.querySelector('button.day[tabindex="0"]'))||(i==null?void 0:i.querySelector("button.day"));a==null||a.focus({preventScroll:!0})})}selectSingleDate(t){if(this.readonly||this.isDisabled(t))return;let e=n.startOfDayLocal(t),s=n.toLocalISODate(e);if(this.value===s)return;this.value=s;let l=`${this.formatSelectionLabel(e)}, ${this.localize.term("selected")}`;this.announceSelect(l),this.emit("sd-select",{detail:{value:this.value,date:e}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var a;let i=this.input;i&&(i.value=(a=this.inputValue)!=null?a:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let o=i.value.length;i.setSelectionRange(o,o)})}))})}selectRangeDate(t){if(this.readonly)return;let e=n.startOfDayLocal(t),s=this.rangeStart?n.parseLocalISO(this.rangeStart):null,l=this.rangeEnd?n.parseLocalISO(this.rangeEnd):null;if(!s&&!l){if(this.isDisabled(e))return;this.rangeStart=n.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let i=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${i}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var o;let a=this.input;a&&(a.value=(o=this.inputValue)!=null?o:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=a.value.length;a.setSelectionRange(f,f)})}))});return}if(s&&!l){if(this.isDisabled(e))return;if(n.isSameDay(s,e)){if(!this.allowSameDayRange){this.rangeStart=n.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let u=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${u}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var c;let d=this.input;d&&(d.value=(c=this.inputValue)!=null?c:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let p=d.value.length;d.setSelectionRange(p,p)})}))});return}this.rangeStart=n.toLocalISODate(e),this.rangeEnd=n.toLocalISODate(e),this.previewEnd=null;let m=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${m}`,40),this.announceSelect(`${this.termEndSelected()}: ${m}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var d;let u=this.input;u&&(u.value=(d=this.inputValue)!=null?d:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let c=u.value.length;u.setSelectionRange(c,c)})}))});return}let i=n.parseLocalISO(this.rangeStart);if(this.wouldRangeContainDisabled(i,e))return;let[a,o]=n.compareDates(i,e)<=0?[i,e]:[e,i];this.rangeStart=n.toLocalISODate(a),this.rangeEnd=n.toLocalISODate(o),this.previewEnd=null;let f=this.formatSelectionLabel(a),y=this.formatSelectionLabel(o);this.announceSelect(`${this.termStartSelected()}: ${f}`,40),this.announceSelect(`${this.termEndSelected()}: ${y}`,140),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var u;let m=this.input;m&&(m.value=(u=this.inputValue)!=null?u:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let d=m.value.length;m.setSelectionRange(d,d)})}))});return}if(s&&l){if(this.isDisabled(e))return;this.rangeStart=n.toLocalISODate(e),this.rangeEnd=null,this.previewEnd=null;let i=this.formatSelectionLabel(e);this.announceSelect(`${this.termStartSelected()}: ${i}`,40),this.emit("sd-range-select",{detail:{start:this.rangeStart,end:this.rangeEnd}}),this.inputValue=this.formatInputValue(),this.updateComplete.then(()=>{var o;let a=this.input;a&&(a.value=(o=this.inputValue)!=null?o:"",Promise.resolve().then(()=>{requestAnimationFrame(()=>{let f=a.value.length;a.setSelectionRange(f,f)})}))})}}selectDate(t){this.readonly||(this.range?this.selectRangeDate(t):this.selectSingleDate(t))}ensureViewMonth(){if(this.viewMonth)return this.viewMonth;let t=this.value?n.parseLocalISO(this.value):null,e=this.rangeStart?n.parseLocalISO(this.rangeStart):null,s=n.startOfDayLocal(new Date),l=this.range&&e?e:t!=null?t:s,i=new Date(l.getFullYear(),l.getMonth(),1);return this.viewMonth=i,i}getMonthMatrix(t){var y;let e=(y=this.firstDayOfWeek)!=null?y:1,s=new Date(t.getFullYear(),t.getMonth(),1),l=new Date(s),i=(s.getDay()-e+7)%7;l.setDate(s.getDate()-i);let a=[],o=l;for(let m=0;m<6;m++){let u=[];for(let d=0;d<7;d++)u.push(new Date(o)),o.setDate(o.getDate()+1);a.push(u)}let f=m=>m.every(u=>u.getMonth()!==t.getMonth());for(;a.length>0&&f(a[a.length-1]);)a.pop();return{weeks:a}}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 l;let t=(l=this.firstDayOfWeek)!=null?l:1,e=new Date(2021,7,1),s=[];for(let i=0;i<7;i++){let a=new Date(e);a.setDate(e.getDate()+(t+i)%7);try{s.push(new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(a))}catch(o){s.push(a.toLocaleDateString(void 0,{weekday:"short"}))}}return s}getTabTargetDayForCurrentView(t){var i;let e=(i=this.viewMonth)!=null?i:this.ensureViewMonth(),s=t.flat().find(a=>a.getMonth()===e.getMonth()&&n.isSameDay(a,this.today)&&!this.isDisabled(a));if(s)return n.startOfDayLocal(s);let l=t.flat().find(a=>a.getMonth()===e.getMonth()&&!this.isDisabled(a));return l?n.startOfDayLocal(l):null}onDayMouseEnter(t){if(!this.range||this.readonly)return;let e=this.rangeStart?n.parseLocalISO(this.rangeStart):null,s=this.rangeEnd?n.parseLocalISO(this.rangeEnd):null;if(e&&!s){let l=n.startOfDayLocal(t);this.previewEnd=this.isDisabled(l)?null:l,this.requestUpdate()}}onGridMouseLeave(){this.previewEnd!==null&&(this.previewEnd=null,this.requestUpdate())}renderCalendar(){var u,d;let t=(u=this.viewMonth)!=null?u:this.ensureViewMonth(),{weeks:e}=this.getMonthMatrix(t),s=this.formatMonthYear(t),l=this.weekdayLabels(),i=this.value?this.parseISO(this.value):null,a=this.rangeStart?this.parseISO(this.rangeStart):null,o=this.rangeEnd?this.parseISO(this.rangeEnd):null,f=this.previewEnd,y=c=>!this.range||!a||o||!f?!1:n.isBetweenInclusive(c,a,f),m=this.getTabTargetDayForCurrentView(e);return F`<div part="datepicker" class="${I("w-[284px] z-50 bg-white py-3 px-4",this.open?"block":"hidden",(d=this.currentPlacement)!=null&&d.startsWith("bottom")?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default","border-primary")}"><div class="flex flex-row items-center w-full justify-between mb-3" part="header"><div class="flex items-center"><button type="button" tabindex="0" class="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-6-12-1-icon library="_internal" name="chevrons-sm-left" class="h-6 w-6"></sd-6-12-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-6-12-1-icon library="_internal" name="chevron-sm-left" class="h-6 w-6"></sd-6-12-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">${s}</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-6-12-1-icon library="_internal" name="chevron-sm-right" class="h-6 w-6"></sd-6-12-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-6-12-1-icon library="_internal" name="chevrons-sm-right" class="h-6 w-6"></sd-6-12-1-icon></button></div></div><sd-6-12-1-divider></sd-6-12-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="${s}" part="grid" @mouseleave="${this.onGridMouseLeave}" @focusin="${()=>{this.tabbingIntoGrid=!1}}"><div class="grid-row grid-head grid grid-cols-7 gap-y-[1px]" role="row">${l.map((c,p)=>F`<div role="columnheader" aria-colindex="${p+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-"+(p+1)}">${c}</div>`)}</div>${e.map((c,p)=>F`<div class="grid-row grid grid-cols-7 ${p===0?"mt-2":""}" role="row" aria-rowindex="${p+2}">${c.map((g,L)=>{let x=g.getMonth()===t.getMonth(),D=this.isDisabled(g)||!this.inMinMax(g),O=n.isSameDay(g,this.focusedDate),v=n.isSameDay(g,this.today),S=!this.range&&i?n.isSameDay(g,i):!1,M=this.range&&a?n.isSameDay(g,a):!1,V=this.range&&o?n.isSameDay(g,o):!1,P=this.range&&a&&o?n.isBetweenInclusive(g,a,o):!1,z=y(g)&&!D,A=-1,$=m&&n.isSameDay(g,m);(this.tabbingIntoGrid&&$||!this.tabbingIntoGrid&&O)&&(A=0);let C=this.isWeekend(g),Y=g.toLocaleDateString(this.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),q=M?this.localize.term("startDateSelected"):V?this.localize.term("endDateSelected"):void 0;return F`<button type="button" part="day" class="${I("cell day flex items-center justify-center focus-visible:outline focus:outline-2 focus:outline-primary -outline-offset-2 rounded-md w-[36px]",this.size==="sm"?"text-sm h-6":"text-base h-8",M||V?"hover:bg-primary-500":"hover:bg-primary-100 hover:text-primary-500",x?this.isInDisabledDates(g)||!this.inMinMax(g)?"out-month text-neutral-500":this.disabledWeekends&&C?"weekend-day text-neutral-500":"in-month text-primary":this.disabledWeekends&&C?"out-month weekend-day text-neutral-500":C?"out-month weekend-day text-neutral-700":"out-month text-neutral-700",S?"selected border-primary bg-primary text-white hover:bg-primary-500 hover:text-white":"",M?"bg-primary text-white rounded-l-md rounded-r-none":"",V?"bg-primary text-white range-end rounded-r-md rounded-l-none":"",P&&!M&&!V?"in-range selected bg-primary-100 text-primary-500 rounded-none hover:bg-primary-500 hover:text-white":"",!P&&z&&!M&&!V?"in-preview-range bg-primary-100 text-primary-500 rounded-none":"",v&&!S&&!M&&!V&&O?"today border-[1px] border-primary font-bold":"",D?"disabled cursor-not-allowed hover:bg-transparent":"cursor-pointer",O&&!v?"focused outline outline-2 outline-primary":"")}" role="gridcell" aria-colindex="${L+1}" aria-labelledby="${"col-"+(L+1)}" .tabIndex="${A}" ?disabled="${D||this.disabled||this.readonly}" aria-disabled="${D||this.visuallyDisabled||this.disabled||this.readonly?"true":"false"}" aria-selected="${S||P||M||V?"true":"false"}" aria-current="${v?"date":H}" aria-label="${Y}" aria-roledescription="${q!=null?q:H}" @focus="${()=>this.focusedDate=n.startOfDayLocal(g)}" @mouseenter="${()=>this.onDayMouseEnter(g)}" @keydown="${this.onKeyDown}" @click="${()=>{this.focusedDate=n.startOfDayLocal(g),this.selectDate(g)}}">${g.getDate()}</button>`})}</div>`)}</div></div>`}render(){var c,p;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,l=!!t.tooltip,i=this.value!==null&&String(this.value).length>0||this.range&&this.rangeStart!==null||this.rangeEnd!==null,a=this.floatingLabel&&e&&(this.hasFocus||this.open||i)&&!this.disabled&&!this.visuallyDisabled,o=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",f={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],y={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],m=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",u={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"}[m],d=this.size==="sm"?"text-sm":"text-base";return F`<div part="form-control" class="${I("min-w-[284px]",this.open&&"z-50",(this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e&&!this.floatingLabel||l?F`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${I(e?"inline-block form-control-color-text":"hidden",d)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?F`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${I("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${e&&this.floatingLabel?F`<label id="label" part="form-control-floating-label" class="${I("absolute left-4 z-10 pointer-events-none transition-all duration-200",a?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2",a&&"mt-1")}" for="input"><span class="${I("leading-none",(this.visuallyDisabled||this.disabled)&&"text-neutral-500",a&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${I("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",u,this.open&&this.alignment==="left"?"rounded-bl-none":"",this.open&&this.alignment==="right"?"rounded-br-none":"",this.open&&((c=this.currentPlacement)!=null&&c.startsWith("bottom")?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-6-12-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${I("inline-flex relative w-full",(p=this.currentPlacement)!=null&&p.startsWith("bottom")?"origin-top":"origin-bottom")}" placement="${this.alignment==="left"?`${this.placement}-start`:`${this.placement}-end`}" flip shift auto-size="vertical" auto-size-padding="10" exportparts="popup:popup__content,"><div part="base" class="${I("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast w-full",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",m==="disabled"||m==="visuallyDisabled"?"text-neutral-500":"text-black")}" slot="anchor"><input id="input" type="text" role="combobox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="dialog" aria-controls="calendar-grid" aria-describedby="${s?"help-text":void 0}" aria-invalid="${this.showInvalidStyle?"true":"false"}" aria-label="${this.range?"Select date range":"Select a date"}" class="${I("min-w-0 grow focus:outline-none bg-transparent hover:cursor-pointer form-control-color-text",this.visuallyDisabled||this.disabled?"placeholder:text-neutral-500 cursor-not-allowed":"placeholder:text-neutral-700",{sm:"h-8",md:"h-10",lg:"h-12"}[this.size],d,this.floatingLabel&&"mt-4")}" autocomplete="off" spellcheck="false" placeholder="${!this.floatingLabel||a?this.placeholder||this.localize.term(this.range?"dateRangePlaceholder":"datePlaceholder"):""}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly||this.visuallyDisabled}" @input="${this.handleInput}" @click="${this.handleMouseDown}" @keydown="${this.handleInputKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleInputBlur}" @invalid="${this.handleInvalid}"> ${this.showInvalidStyle?F`<sd-6-12-1-icon part="invalid-icon" class="${I("text-error",f,y)}" library="_internal" name="risk"></sd-6-12-1-icon>`:""} ${this.showValidStyle&&this.styleOnValid?F`<sd-6-12-1-icon class="${I("text-success shrink-0",f,y)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-6-12-1-icon>`:""}<sd-6-12-1-icon class="${I(o,f,y,"hover:cursor-pointer")}" library="_internal" name="calendar" @click="${this.show}"></sd-6-12-1-icon></div>${this.renderCalendar()}</sd-6-12-1-popup></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${I("text-sm text-neutral-700 mt-1",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage(this.size)}`}};r.styles=[...N.styles,W`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{position:relative;display:inline-block;width:100%;--tw-outline-style:none;outline-style:none}:host([required]) #label::after{content:' *'}:host([visually-disabled]) input{caret-color:transparent}`],h([b({type:String,reflect:!0})],r.prototype,"locale",2),h([b({type:String,converter:B,reflect:!0})],r.prototype,"value",2),h([b({type:Boolean,reflect:!0})],r.prototype,"range",2),h([b({attribute:"range-start",converter:B,reflect:!0})],r.prototype,"rangeStart",2),h([b({attribute:"range-end",converter:B,reflect:!0})],r.prototype,"rangeEnd",2),h([b({type:Boolean})],r.prototype,"allowSameDayRange",2),h([b({type:String,converter:B,reflect:!0})],r.prototype,"min",2),h([b({type:String,converter:B,reflect:!0})],r.prototype,"max",2),h([b({attribute:"view-month",converter:j})],r.prototype,"viewMonth",2),h([b({type:Number})],r.prototype,"firstDayOfWeek",2),h([b({type:Boolean,reflect:!0,attribute:"disabled-weekends"})],r.prototype,"disabledWeekends",2),h([b({attribute:"disabled-dates",converter:J})],r.prototype,"disabledDates",2),h([b({attribute:!1})],r.prototype,"isDateDisabled",2),h([b({type:String,reflect:!0})],r.prototype,"size",2),h([b({type:String})],r.prototype,"alignment",2),h([b({type:String,reflect:!0})],r.prototype,"label",2),h([b({type:String,attribute:"help-text",reflect:!0})],r.prototype,"helpText",2),h([b({attribute:"floating-label",type:Boolean,reflect:!0})],r.prototype,"floatingLabel",2),h([b({type:Boolean,reflect:!0})],r.prototype,"disabled",2),h([b({type:Boolean,reflect:!0})],r.prototype,"required",2),h([b({type:Boolean,attribute:"visually-disabled"})],r.prototype,"visuallyDisabled",2),h([b({type:Boolean,reflect:!0,attribute:"style-on-valid"})],r.prototype,"styleOnValid",2),h([b({type:Boolean,reflect:!0})],r.prototype,"readonly",2),h([b({type:String,reflect:!0})],r.prototype,"placement",2),h([b({type:String,reflect:!0})],r.prototype,"placeholder",2),h([b({reflect:!0})],r.prototype,"name",2),h([b({type:String,reflect:!0})],r.prototype,"form",2),h([E()],r.prototype,"open",2),h([E()],r.prototype,"focusedDate",2),h([E()],r.prototype,"today",2),h([E()],r.prototype,"disabledDatesSet",2),h([E()],r.prototype,"previewEnd",2),h([E()],r.prototype,"statusNavText",2),h([E()],r.prototype,"statusSelectText",2),h([E()],r.prototype,"hasFocus",2),h([E()],r.prototype,"showValidStyle",2),h([E()],r.prototype,"showInvalidStyle",2),h([E()],r.prototype,"currentPlacement",2),h([E()],r.prototype,"inputValue",2),h([R("sd-6-12-1-popup")],r.prototype,"popup",2),h([R("#invalid-message")],r.prototype,"invalidMessage",2),h([R("#input")],r.prototype,"input",2),h([k("open",{waitUntilFirstUpdate:!0})],r.prototype,"handleOpenChange",1),h([k("locale")],r.prototype,"handleLocaleChange",1),h([k("viewMonth")],r.prototype,"handleViewMonthChange",1),h([k("disabledDates")],r.prototype,"handleDisabledDatesChange",1),h([k("value")],r.prototype,"handleValueChange",1),h([k("rangeStart"),k("rangeEnd")],r.prototype,"handleRangeChange",1),h([k(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],r.prototype,"handleDisabledChange",1),h([k(["size","floatingLabel"])],r.prototype,"handleSizeChange",1),r=h([U("sd-6-12-1-datepicker")],r);export{r as a};
@@ -1,2 +1,2 @@
1
1
  import{a as n}from"./chunk.IQPMMUES.js";import{a as e}from"./chunk.3XPSGHFS.js";import{a,b as c,h as i}from"./chunk.JMZGGLJF.js";import{b as l,e as o}from"./chunk.UOAG5PNU.js";import{e as t}from"./chunk.6EV4YU6C.js";var r=class extends i{constructor(){super(...arguments);this.color="currentColor";this.localize=new n(this)}render(){return o`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" role="progressbar" aria-label="${this.localize.term("loading")}"><circle class="${e("dot",{primary:"text-primary animate-loader-primary",white:"text-white animate-loader-white",currentColor:"animate-loader-current"}[this.color])}" cx="20" cy="12" r="2" fill="currentColor"/><circle class="${e("dot",{primary:"text-primary animate-loader-primary",white:"text-white animate-loader-white",currentColor:"animate-loader-current"}[this.color])}" cx="12" cy="12" r="2" fill="currentColor"/><circle class="${e("dot",{primary:"text-primary animate-loader-primary",white:"text-white animate-loader-white",currentColor:"animate-loader-current"}[this.color])}" cx="4" cy="12" r="2" fill="currentColor"/></svg>`}};r.styles=[...i.styles,l`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{display:inline-block;width:1em;height:1em}.dot:nth-child(2){animation-delay:.1s}.dot:nth-child(1){animation-delay:.2s}`],t([c({type:String,reflect:!0})],r.prototype,"color",2),r=t([a("sd-6-12-0-loader")],r);export{r as a};
2
+ :host{display:inline-block;width:1em;height:1em}.dot:nth-child(2){animation-delay:.1s}.dot:nth-child(1){animation-delay:.2s}`],t([c({type:String,reflect:!0})],r.prototype,"color",2),r=t([a("sd-6-12-1-loader")],r);export{r as a};
@@ -1,6 +1,6 @@
1
- import{a as s}from"./chunk.SLXPE3UU.js";import{a as t}from"./chunk.3XPSGHFS.js";import{a as c,b as e,c as m,d as o,h as n}from"./chunk.JMZGGLJF.js";import{b as l,e as d}from"./chunk.UOAG5PNU.js";import{e as a}from"./chunk.6EV4YU6C.js";var r=class extends n{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary";this.activeSide="front"}connectedCallback(){super.connectedCallback()}flipFront(){this.activeSide="back",this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),setTimeout(()=>{this.back.focus()})}flipBack(){this.activeSide="front",this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),setTimeout(()=>{this.front.focus()})}handleFrontKeydown(i){i.code==="Enter"&&this.front===i.target&&this.flipFront()}handleBackKeydown(i){i.code==="Enter"&&this.back===i.target&&this.flipBack()}render(){return d`<div part="base" class="${t("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${s(this.activeSide==="back"||void 0)}" class="${t("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${t("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${t("flex relative",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant])}"><div class="${t("absolute inset-0",{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"></div><slot name="front"></slot></div><div part="front-secondary-gradient" class="${t("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.frontVariant])}"></div><sd-6-12-0-button part="front-button" size="md" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.frontVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.frontVariant]}" class="${t("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-6-12-0-icon library="_internal" name="reload" label="Flip to Back"></sd-6-12-0-icon></sd-6-12-0-button></div><div part="back" tabindex="0" aria-hidden="${this.activeSide==="front"}" inert="${s(this.activeSide==="front"||void 0)}" class="${t("flip-card__side flip-card__side--back overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.backVariant==="primary"&&"bg-primary",this.backVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-back" class="${t("absolute h-full w-full -z-20",(this.backVariant==="primary"||this.backVariant==="primary-100")&&"hidden")}"><slot name="media-back"></slot></div><div part="back-slot-container" class="${t("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.backVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.backVariant])}"><slot name="back"></slot></div><div part="back-secondary-gradient" class="${t("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.backVariant])}"></div><sd-6-12-0-button size="md" part="back-button" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.backVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.backVariant]}" class="${t("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-6-12-0-icon library="_internal" name="reload" label="Flip to Front"></sd-6-12-0-icon></sd-6-12-0-button></div></div>`}};r.styles=[...n.styles,l`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
1
+ import{a as s}from"./chunk.SLXPE3UU.js";import{a as t}from"./chunk.3XPSGHFS.js";import{a as c,b as e,c as m,d as o,h as n}from"./chunk.JMZGGLJF.js";import{b as l,e as d}from"./chunk.UOAG5PNU.js";import{e as a}from"./chunk.6EV4YU6C.js";var r=class extends n{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary";this.activeSide="front"}connectedCallback(){super.connectedCallback()}flipFront(){this.activeSide="back",this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),setTimeout(()=>{this.back.focus()})}flipBack(){this.activeSide="front",this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),setTimeout(()=>{this.front.focus()})}handleFrontKeydown(i){i.code==="Enter"&&this.front===i.target&&this.flipFront()}handleBackKeydown(i){i.code==="Enter"&&this.back===i.target&&this.flipBack()}render(){return d`<div part="base" class="${t("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${s(this.activeSide==="back"||void 0)}" class="${t("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${t("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${t("flex relative",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant])}"><div class="${t("absolute inset-0",{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"></div><slot name="front"></slot></div><div part="front-secondary-gradient" class="${t("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.frontVariant])}"></div><sd-6-12-1-button part="front-button" size="md" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.frontVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.frontVariant]}" class="${t("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-6-12-1-icon library="_internal" name="reload" label="Flip to Back"></sd-6-12-1-icon></sd-6-12-1-button></div><div part="back" tabindex="0" aria-hidden="${this.activeSide==="front"}" inert="${s(this.activeSide==="front"||void 0)}" class="${t("flip-card__side flip-card__side--back overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.backVariant==="primary"&&"bg-primary",this.backVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-back" class="${t("absolute h-full w-full -z-20",(this.backVariant==="primary"||this.backVariant==="primary-100")&&"hidden")}"><slot name="media-back"></slot></div><div part="back-slot-container" class="${t("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.backVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.backVariant])}"><slot name="back"></slot></div><div part="back-secondary-gradient" class="${t("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.backVariant])}"></div><sd-6-12-1-button size="md" part="back-button" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.backVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.backVariant]}" class="${t("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-6-12-1-icon library="_internal" name="reload" label="Flip to Front"></sd-6-12-1-icon></sd-6-12-1-button></div></div>`}};r.styles=[...n.styles,l`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
2
  :host{display:block;aspect-ratio:var(--sd-aspect-3\\/4);--name:'';--height:480px;height:var(--height)}.flip-card{perspective:100rem}.flip-card__side{backface-visibility:hidden}.flip-card__side--back{transform:rotateY(180deg)}.clicked--front{transform:rotateY(-180deg)}.clicked--back{transform:rotateY(0)}.flip-card__side--back.vertical{transform:rotateX(180deg)}.clicked--front.vertical{transform:rotateX(-180deg)}.clicked--back.vertical{transform:rotateX(0)}.flip-card__gradient{flex:.4 1 0}:host([front-variant=gradient-light]) [part=front-secondary-gradient],:host([front-variant=gradient-light]) [part=front-slot-container] .bg-gradient-to-b{--sd-color-background-white:rgba(
3
3
  var(--sd-informational-gradient--white-color-background, rgba(var(--sd-color-white)))
4
4
  )}:host([front-variant=gradient-dark]) [part=front-secondary-gradient],:host([front-variant=gradient-dark]) [part=front-slot-container] .bg-gradient-to-b{--sd-color-background-primary-800:rgba(
5
5
  var(--sd-informational-gradient--primary-800-color-background, rgba(var(--sd-color-primary-800)))
6
- )}`],a([o('[part="front"]')],r.prototype,"front",2),a([o('[part="back"]')],r.prototype,"back",2),a([e({reflect:!0,attribute:"flip-direction"})],r.prototype,"flipDirection",2),a([e({reflect:!0})],r.prototype,"placement",2),a([e({type:String,reflect:!0,attribute:"front-variant"})],r.prototype,"frontVariant",2),a([e({type:String,reflect:!0,attribute:"back-variant"})],r.prototype,"backVariant",2),a([m()],r.prototype,"activeSide",2),r=a([c("sd-6-12-0-flipcard")],r);export{r as a};
6
+ )}`],a([o('[part="front"]')],r.prototype,"front",2),a([o('[part="back"]')],r.prototype,"back",2),a([e({reflect:!0,attribute:"flip-direction"})],r.prototype,"flipDirection",2),a([e({reflect:!0})],r.prototype,"placement",2),a([e({type:String,reflect:!0,attribute:"front-variant"})],r.prototype,"frontVariant",2),a([e({type:String,reflect:!0,attribute:"back-variant"})],r.prototype,"backVariant",2),a([m()],r.prototype,"activeSide",2),r=a([c("sd-6-12-1-flipcard")],r);export{r as a};
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk.3XPSGHFS.js";import{a as l}from"./chunk.NYKJXI3Q.js";import{a as c,b as i,c as r,h as a}from"./chunk.JMZGGLJF.js";import{b as o,e as d}from"./chunk.UOAG5PNU.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends a{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return d`<span part="base" class="${s("sd-6-12-0-radio group flex items-center text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${s("flex-initial shrink-0 relative inline-flex items-center justify-center border sd-6-12-0-radio-border-width rounded-full bg-white h-4 w-4 duration-fast ease-in-out",this.disabled||this.visuallyDisabled?"border-neutral-500":this.invalid?s("border-error hover:border-error-400 group-hover:border-error-400",this.checked?"sd-6-12-0-radio--checked--invalid--default-color-background":"sd-6-12-0-radio--default--invalid-color-background"):this.checked?"sd-6-12-0-radio--checked--default-color-background hover:sd-6-12-0-radio--checked--hover-color-background group-hover:sd-6-12-0-radio--checked--hover-color-background border-accent hover:border-accent-550 group-hover:border-accent-550":"form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span part="checked" class="${s("rounded-full inline-flex text-white sd-6-12-0-radio--checked--default__icon-color-background h-2.5 w-2.5 transition-[transform, colors] duration-medium ease-in-out",this.checked?"scale-100":"scale-0",this.disabled?"bg-neutral-500":this.visuallyDisabled?"bg-white":this.invalid?"sd-6-12-0-radio--checked--invalid--default__icon-color-background hover:sd-6-12-0-radio--checked--invalid--hover__icon-color-background group-hover:sd-6-12-0-radio--checked--invalid--hover__icon-color-background":this.checked?"sd-6-12-0-radio--checked--default__icon-color-background hover:sd-6-12-0-radio--checked--hover__icon-color-background group-hover:sd-6-12-0-radio--checked--hover__icon-color-background":"bg-neutral-800")}"></span></span><slot part="label" class="${s("ml-2 select-none inline-block",this.disabled||this.visuallyDisabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};e.styles=[...a.styles,o`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
- :host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){--tw-outline-style:none;outline-style:none}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-width:1px;outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:var(--sd-color-border-primary,var(--sd-color-primary))}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],t([r()],e.prototype,"checked",2),t([r()],e.prototype,"hasFocus",2),t([i({type:String,reflect:!0})],e.prototype,"size",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],e.prototype,"visuallyDisabled",2),t([i()],e.prototype,"value",2),t([i({type:Boolean,reflect:!0})],e.prototype,"invalid",2),t([l("checked")],e.prototype,"handleCheckedChange",1),t([l(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([c("sd-6-12-0-radio")],e);export{e as a};
1
+ import{a as s}from"./chunk.3XPSGHFS.js";import{a as l}from"./chunk.NYKJXI3Q.js";import{a as c,b as i,c as r,h as a}from"./chunk.JMZGGLJF.js";import{b as o,e as d}from"./chunk.UOAG5PNU.js";import{e as t}from"./chunk.6EV4YU6C.js";var e=class extends a{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return d`<span part="base" class="${s("sd-6-12-1-radio group flex items-center text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${s("flex-initial shrink-0 relative inline-flex items-center justify-center border sd-6-12-1-radio-border-width rounded-full bg-white h-4 w-4 duration-fast ease-in-out",this.disabled||this.visuallyDisabled?"border-neutral-500":this.invalid?s("border-error hover:border-error-400 group-hover:border-error-400",this.checked?"sd-6-12-1-radio--checked--invalid--default-color-background":"sd-6-12-1-radio--default--invalid-color-background"):this.checked?"sd-6-12-1-radio--checked--default-color-background hover:sd-6-12-1-radio--checked--hover-color-background group-hover:sd-6-12-1-radio--checked--hover-color-background border-accent hover:border-accent-550 group-hover:border-accent-550":"form-control-color-border hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span part="checked" class="${s("rounded-full inline-flex text-white sd-6-12-1-radio--checked--default__icon-color-background h-2.5 w-2.5 transition-[transform, colors] duration-medium ease-in-out",this.checked?"scale-100":"scale-0",this.disabled?"bg-neutral-500":this.visuallyDisabled?"bg-white":this.invalid?"sd-6-12-1-radio--checked--invalid--default__icon-color-background hover:sd-6-12-1-radio--checked--invalid--hover__icon-color-background group-hover:sd-6-12-1-radio--checked--invalid--hover__icon-color-background":this.checked?"sd-6-12-1-radio--checked--default__icon-color-background hover:sd-6-12-1-radio--checked--hover__icon-color-background group-hover:sd-6-12-1-radio--checked--hover__icon-color-background":"bg-neutral-800")}"></span></span><slot part="label" class="${s("ml-2 select-none inline-block",this.disabled||this.visuallyDisabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};e.styles=[...a.styles,o`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;
2
+ :host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){--tw-outline-style:none;outline-style:none}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-width:1px;outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:var(--sd-color-border-primary,var(--sd-color-primary))}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}`],t([r()],e.prototype,"checked",2),t([r()],e.prototype,"hasFocus",2),t([i({type:String,reflect:!0})],e.prototype,"size",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],e.prototype,"visuallyDisabled",2),t([i()],e.prototype,"value",2),t([i({type:Boolean,reflect:!0})],e.prototype,"invalid",2),t([l("checked")],e.prototype,"handleCheckedChange",1),t([l(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([c("sd-6-12-1-radio")],e);export{e as a};
@@ -1,5 +1,5 @@
1
- import{a as c}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.3XPSGHFS.js";import{a as l,b as i,d,h as n}from"./chunk.JMZGGLJF.js";import{b as s,e}from"./chunk.UOAG5PNU.js";import{e as a}from"./chunk.6EV4YU6C.js";var t=class extends n{constructor(){super(...arguments);this.variant="white";this.open=!1;this.hasSlotController=new c(this,"[default]","media","meta","headline","expandable")}onToggleClick(){this.open=!this.open}render(){let o={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return e`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${r("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.8] to-60%")}"></div><div class="${r("relative",["primary","gradient-dark"].includes(this.variant)&&"text-white")}"><div class="${r("absolute inset-0 pointer-events-none",{white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"sd-6-12-0-teaser-media--neutral-100-color-background group-hover:sd-6-12-0-teaser-media--neutral-100--hover-color-background",primary:"bg-primary/[.8] text-white group-hover:bg-primary/90","primary-100":"sd-6-12-0-teaser-media--primary-100-color-background group-hover:sd-6-12-0-teaser-media--primary-100--hover-color-background","gradient-light":"bg-gradient-to-t from-white/90 to-white/[.8]","gradient-dark":"bg-gradient-to-t from-primary-800/90 to-primary-800/[.8]"}[this.variant])}"></div><div class="relative flex flex-col text-left p-4" part="content"><div class="flex flex-col"><div part="headline" class="text-lg font-bold m-0 order-2"><slot name="headline">Always insert one semantically correct heading element here</slot></div><div part="meta" class="${r("gap-2 mb-2 order-1",!o["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${r(!o["teaser-has-default"]&&"hidden")}"><slot></slot></div><div class="${r("mt-3 transition-opacity duration-300",!this.open&&"hidden",this.open?"opacity-100":"opacity-0")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div>${o["teaser-has-expandable"]?e`<button part="toggle" class="sd-interactive sd-interactive--reset mt-2" @click="${this.onToggleClick}" aria-expanded="${this.open}" aria-label="${this.open?"Collapse content":"Expand content"}"><div class="h-full justify-start flex items-start"><sd-6-12-0-icon class="${r("w-6 h-6 transition-transform",this.open&&"rotate-180",["primary","gradient-dark"].includes(this.variant)?"text-white":"text-primary")}" library="_internal" name="chevron-down"></sd-6-12-0-icon></div></button>`:null}</div></div></div><div class="${r("mb-4 -z-10",!o["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};t.styles=[...n.styles,s`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
1
+ import{a as c}from"./chunk.CGQ2BPPZ.js";import{a as r}from"./chunk.3XPSGHFS.js";import{a as l,b as i,d,h as n}from"./chunk.JMZGGLJF.js";import{b as s,e}from"./chunk.UOAG5PNU.js";import{e as a}from"./chunk.6EV4YU6C.js";var t=class extends n{constructor(){super(...arguments);this.variant="white";this.open=!1;this.hasSlotController=new c(this,"[default]","media","meta","headline","expandable")}onToggleClick(){this.open=!this.open}render(){let o={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return e`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${r("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.8] to-60%")}"></div><div class="${r("relative",["primary","gradient-dark"].includes(this.variant)&&"text-white")}"><div class="${r("absolute inset-0 pointer-events-none",{white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"sd-6-12-1-teaser-media--neutral-100-color-background group-hover:sd-6-12-1-teaser-media--neutral-100--hover-color-background",primary:"bg-primary/[.8] text-white group-hover:bg-primary/90","primary-100":"sd-6-12-1-teaser-media--primary-100-color-background group-hover:sd-6-12-1-teaser-media--primary-100--hover-color-background","gradient-light":"bg-gradient-to-t from-white/90 to-white/[.8]","gradient-dark":"bg-gradient-to-t from-primary-800/90 to-primary-800/[.8]"}[this.variant])}"></div><div class="relative flex flex-col text-left p-4" part="content"><div class="flex flex-col"><div part="headline" class="text-lg font-bold m-0 order-2"><slot name="headline">Always insert one semantically correct heading element here</slot></div><div part="meta" class="${r("gap-2 mb-2 order-1",!o["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${r(!o["teaser-has-default"]&&"hidden")}"><slot></slot></div><div class="${r("mt-3 transition-opacity duration-300",!this.open&&"hidden",this.open?"opacity-100":"opacity-0")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div>${o["teaser-has-expandable"]?e`<button part="toggle" class="sd-interactive sd-interactive--reset mt-2" @click="${this.onToggleClick}" aria-expanded="${this.open}" aria-label="${this.open?"Collapse content":"Expand content"}"><div class="h-full justify-start flex items-start"><sd-6-12-1-icon class="${r("w-6 h-6 transition-transform",this.open&&"rotate-180",["primary","gradient-dark"].includes(this.variant)?"text-white":"text-primary")}" library="_internal" name="chevron-down"></sd-6-12-1-icon></div></button>`:null}</div></div></div><div class="${r("mb-4 -z-10",!o["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};t.styles=[...n.styles,s`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
2
  :host{display:block}::slotted(*){margin:calc(var(--sd-spacing-1) * 0)}:host([variant=white]) .background:focus-within{background-color:rgba(var(--sd-color-background-white))}@supports (color:color-mix(in lab,red,red)){:host([variant=white]) .background:focus-within{background-color:color-mix(in oklab,rgba(var(--sd-color-background-white)) var(--sd-opacity-90),transparent)}}:host([variant=neutral-100]) .background:focus-within{background-color:rgba(var(--sd-color-background-neutral-100))}@supports (color:color-mix(in lab,red,red)){:host([variant=neutral-100]) .background:focus-within{background-color:color-mix(in oklab,rgba(var(--sd-color-background-neutral-100)) var(--sd-opacity-90),transparent)}}:host([variant=primary]) .background:focus-within{background-color:rgba(var(--sd-color-background-primary))}@supports (color:color-mix(in lab,red,red)){:host([variant=primary]) .background:focus-within{background-color:color-mix(in oklab,rgba(var(--sd-color-background-primary)) var(--sd-opacity-90),transparent)}}:host([variant=primary-100]) .background:focus-within{background-color:rgba(var(--sd-color-background-primary-100))}@supports (color:color-mix(in lab,red,red)){:host([variant=primary-100]) .background:focus-within{background-color:color-mix(in oklab,rgba(var(--sd-color-background-primary-100)) var(--sd-opacity-90),transparent)}}:host([variant=gradient-light]) .bg-gradient-to-t{--sd-color-background-white:var(--sd-informational-gradient--white-color-background, var(--sd-color-white))}:host([variant=gradient-dark]) .bg-gradient-to-t{--sd-color-background-primary-800:var(
3
3
  --sd-informational-gradient--primary-800-color-background,
4
4
  var(--sd-color-primary-800)
5
- )}[part=toggle]{width:-moz-fit-content;width:fit-content}`],a([i({type:String,reflect:!0})],t.prototype,"variant",2),a([i({type:Boolean,reflect:!0})],t.prototype,"open",2),a([d('[part="base"]')],t.prototype,"teaserMedia",2),t=a([l("sd-6-12-0-teaser-media")],t);export{t as a};
5
+ )}[part=toggle]{width:-moz-fit-content;width:fit-content}`],a([i({type:String,reflect:!0})],t.prototype,"variant",2),a([i({type:Boolean,reflect:!0})],t.prototype,"open",2),a([d('[part="base"]')],t.prototype,"teaserMedia",2),t=a([l("sd-6-12-1-teaser-media")],t);export{t as a};
@@ -1,2 +1,2 @@
1
1
  import{a as n}from"./chunk.3XPSGHFS.js";import{a as i,b as a,h as r}from"./chunk.JMZGGLJF.js";import{b as l,e as s}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var t=class extends r{constructor(){super(...arguments);this.variant="rectangular"}render(){return s`<div part="base" aria-hidden="true" class="${n("bg-neutral-200 w-full h-full animate-pulse",{rectangular:"rounded-sm",circular:"rounded-full inline-block"}[this.variant])}"><slot></slot></div>`}};t.styles=[...r.styles,l`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{display:block}::slotted(*){visibility:hidden}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),t=e([i("sd-6-12-0-skeleton")],t);export{t as a};
2
+ :host{display:block}::slotted(*){visibility:hidden}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),t=e([i("sd-6-12-1-skeleton")],t);export{t as a};
@@ -1,12 +1,12 @@
1
- import{a as F}from"./chunk.W4EADN3G.js";import{c as A}from"./chunk.3L472FD4.js";import{b as I}from"./chunk.RAP66B6O.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as C,c as $}from"./chunk.B2NUKX6G.js";import{a as T}from"./chunk.KLRPP4NQ.js";import{a as L}from"./chunk.HLDWO3HP.js";import{a as z}from"./chunk.IQPMMUES.js";import{a as h}from"./chunk.3XPSGHFS.js";import{a as m}from"./chunk.NYKJXI3Q.js";import{a as D,b as r,c as u,d as c,g as k,h as O}from"./chunk.JMZGGLJF.js";import{b as E,e as p}from"./chunk.UOAG5PNU.js";import{b as x,e as w}from"./chunk.W4QBFD6E.js";import{e as s}from"./chunk.6EV4YU6C.js";var i=class extends O{constructor(){super(...arguments);this.formControlController=new I(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new M(this,"help-text","label");this.localize=new z(this);this.typeToSelectString="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=t=>p`<sd-6-12-0-tag class="relative z-10 min-w-0 max-w-full" ?disabled="${this.disabled}" part="tag" exportparts="
1
+ import{a as F}from"./chunk.W4EADN3G.js";import{c as A}from"./chunk.3L472FD4.js";import{b as I}from"./chunk.RAP66B6O.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as C,c as $}from"./chunk.B2NUKX6G.js";import{a as T}from"./chunk.KLRPP4NQ.js";import{a as L}from"./chunk.HLDWO3HP.js";import{a as z}from"./chunk.IQPMMUES.js";import{a as h}from"./chunk.3XPSGHFS.js";import{a as m}from"./chunk.NYKJXI3Q.js";import{a as D,b as r,c as u,d as c,g as k,h as O}from"./chunk.JMZGGLJF.js";import{b as E,e as p}from"./chunk.UOAG5PNU.js";import{b as x,e as w}from"./chunk.W4QBFD6E.js";import{e as s}from"./chunk.6EV4YU6C.js";var i=class extends O{constructor(){super(...arguments);this.formControlController=new I(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new M(this,"help-text","label");this.localize=new z(this);this.typeToSelectString="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.floatingLabel=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=t=>p`<sd-6-12-1-tag class="relative z-10 min-w-0 max-w-full" ?disabled="${this.disabled}" part="tag" exportparts="
2
2
  base:tag__base,
3
3
  content:tag__content,
4
4
  removable-indicator:tag__removable-indicator,
5
- " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-6-12-0-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{let e=t.target,o=e.closest(".select__clear")!==null,l=e.closest("sd-6-12-0-icon-button")!==null;if(!(o||l)){if(t.key==="Escape"&&this.open&&(t.preventDefault(),t.stopPropagation(),this.hide(),this.combobox.focus({preventScroll:!0})),t.key==="Enter"||t.key===" "&&this.typeToSelectString===""){if(t.preventDefault(),t.stopImmediatePropagation(),!this.open){this.show(),this.setCurrentOption(this.currentOption||this.getFirstOption(),t);return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){let d=this.getAllOptions(),n=d.indexOf(this.currentOption),a=Math.max(0,n);if(t.preventDefault(),!this.open&&(this.show(),this.currentOption))return;t.key==="ArrowDown"?(a=n+1,a>d.length-1&&(a=0)):t.key==="ArrowUp"?(a=n-1,a<0&&(a=d.length-1)):t.key==="Home"?a=0:t.key==="End"&&(a=d.length-1),this.setCurrentOption(d[a],t)}if(t.key.length===1||t.key==="Backspace"){let d=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if(t.key==="Backspace")return;this.show()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),t.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(let n of d)if(n.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(n);break}}}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){var o,l,d;if((t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple){t.preventDefault(),t.stopPropagation();let n=(o=t.currentTarget)==null?void 0:o.parentElement,a=(l=n==null?void 0:n.previousElementSibling)==null?void 0:l.querySelector("sd-6-12-0-tag"),f=(d=n==null?void 0:n.nextElementSibling)==null?void 0:d.querySelector("sd-6-12-0-tag");this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>{f?f.focus():a?a.focus():this.focus({preventScroll:!0})})}}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>{var o;let e=(o=this.shadowRoot)==null?void 0:o.querySelectorAll("sd-6-12-0-tag");e&&e.length>0?e==null||e[(e==null?void 0:e.length)-1].focus():this.focus({preventScroll:!0})}))}handleLabelClick(){this.combobox.focus()}handleComboboxMouseDown(t){let o=t.composedPath().some(l=>l instanceof HTMLSlotElement&&l.name==="removable-indicator");this.disabled||o||this.visuallyDisabled||(t.preventDefault(),this.combobox.focus({preventScroll:!0}),this.open=!this.open,this.setCurrentOption(this.currentOption||this.getFirstOption(),t))}handleComboboxKeyDown(t){t.stopPropagation(),this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearSelect()}clearSelect(){this.setSelectedOptions([]),this.combobox.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let o=t.target.closest("sd-6-12-0-option"),l=this.value;o&&!o.disabled&&(this.multiple?this.toggleOptionSelection(o):this.setSelectedOptions(o),this.updateComplete.then(()=>this.combobox.focus({preventScroll:!0})),this.value!==l&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})))}handleDefaultSlotChange(){let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value],o=[];customElements.get("sd-6-12-0-option")?(t.forEach(l=>{this.multiple&&(l.checkbox=!0),o.push(l.value)}),this.setSelectedOptions(t.filter(l=>e.includes(l.value)))):customElements.whenDefined("sd-6-12-0-option").then(()=>this.handleDefaultSlotChange())}handleTagRemove(t,e){t.stopPropagation(),e||this.clearSelect(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}))}getAllOptions(){return[...this.querySelectorAll("sd-6-12-0-option")]}getFirstOption(){return this.querySelector("sd-6-12-0-option")}setCurrentOption(t,e){this.getAllOptions().forEach(l=>{l.current=!1,l.tabIndex=-1,((e==null?void 0:e.type)==="keydown"||(e==null?void 0:e.type)==="mousedown")&&(l.isKeyboardFocus=!1)}),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,t.focus()),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}setSelectedOptions(t){let e=this.getAllOptions(),o=Array.isArray(t)?t:[t];e.forEach(l=>l.selected=!1),o.length&&o.forEach(l=>l.selected=!0),Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}toggleOptionSelection(t,e){e===!0||e===!1?t.selected=e:t.selected=!t.selected,Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}get displayLabel(){var t,e;return this.multiple?this.useTags||this.value.length===0?"":this.localize.term("numOptionsSelected",this.selectedOptions.length):(e=(t=this.selectedOptions[0])==null?void 0:t.getTextLabel())!=null?e:""}selectionChanged(t){var e,o;t&&this.multiple?this.selectedOptions.find(l=>l.value===t.value)?this.selectedOptions=this.selectedOptions.filter(l=>l.value!==t.value):this.selectedOptions=[...this.selectedOptions,t]:this.selectedOptions=this.getAllOptions().filter(l=>l.selected),this.multiple?this.value=this.selectedOptions.map(l=>l.value):this.value=(o=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?o:"",this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let o=this.getTag(t,e);return p`<div @sd-remove="${l=>this.handleTagRemove(l,t)}" class="max-w-full">${typeof o=="string"?L(o):o}</div>`}return[p``]}):[p`<sd-6-12-0-tag class="z-10 min-w-0 max-w-full" ?disabled="${this.disabled}" part="tag" exportparts="
5
+ " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${e=>this.handleTagKeyDown(e,t)}" @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-6-12-1-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{let e=t.target,o=e.closest(".select__clear")!==null,l=e.closest("sd-6-12-1-icon-button")!==null;if(!(o||l)){if(t.key==="Escape"&&this.open&&(t.preventDefault(),t.stopPropagation(),this.hide(),this.combobox.focus({preventScroll:!0})),t.key==="Enter"||t.key===" "&&this.typeToSelectString===""){if(t.preventDefault(),t.stopImmediatePropagation(),!this.open){this.show(),this.setCurrentOption(this.currentOption||this.getFirstOption(),t);return}this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){let d=this.getAllOptions(),n=d.indexOf(this.currentOption),a=Math.max(0,n);if(t.preventDefault(),!this.open&&(this.show(),this.currentOption))return;t.key==="ArrowDown"?(a=n+1,a>d.length-1&&(a=0)):t.key==="ArrowUp"?(a=n-1,a<0&&(a=d.length-1)):t.key==="Home"?a=0:t.key==="End"&&(a=d.length-1),this.setCurrentOption(d[a],t)}if(t.key.length===1||t.key==="Backspace"){let d=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if(t.key==="Backspace")return;this.show()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),t.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(let n of d)if(n.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(n);break}}}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){this.applySizeToOptions()}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){var o,l,d;if((t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple){t.preventDefault(),t.stopPropagation();let n=(o=t.currentTarget)==null?void 0:o.parentElement,a=(l=n==null?void 0:n.previousElementSibling)==null?void 0:l.querySelector("sd-6-12-1-tag"),f=(d=n==null?void 0:n.nextElementSibling)==null?void 0:d.querySelector("sd-6-12-1-tag");this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>{f?f.focus():a?a.focus():this.focus({preventScroll:!0})})}}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>{var o;let e=(o=this.shadowRoot)==null?void 0:o.querySelectorAll("sd-6-12-1-tag");e&&e.length>0?e==null||e[(e==null?void 0:e.length)-1].focus():this.focus({preventScroll:!0})}))}handleLabelClick(){this.combobox.focus()}handleComboboxMouseDown(t){let o=t.composedPath().some(l=>l instanceof HTMLSlotElement&&l.name==="removable-indicator");this.disabled||o||this.visuallyDisabled||(t.preventDefault(),this.combobox.focus({preventScroll:!0}),this.open=!this.open,this.setCurrentOption(this.currentOption||this.getFirstOption(),t))}handleComboboxKeyDown(t){t.stopPropagation(),this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearSelect()}clearSelect(){this.setSelectedOptions([]),this.combobox.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let o=t.target.closest("sd-6-12-1-option"),l=this.value;o&&!o.disabled&&(this.multiple?this.toggleOptionSelection(o):this.setSelectedOptions(o),this.updateComplete.then(()=>this.combobox.focus({preventScroll:!0})),this.value!==l&&this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}),this.multiple||(this.hide(),this.combobox.focus({preventScroll:!0})))}handleDefaultSlotChange(){let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value],o=[];customElements.get("sd-6-12-1-option")?(t.forEach(l=>{this.multiple&&(l.checkbox=!0),o.push(l.value)}),this.setSelectedOptions(t.filter(l=>e.includes(l.value)))):customElements.whenDefined("sd-6-12-1-option").then(()=>this.handleDefaultSlotChange())}handleTagRemove(t,e){t.stopPropagation(),e||this.clearSelect(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.emit("sd-input"),this.emit("sd-change")}))}getAllOptions(){return[...this.querySelectorAll("sd-6-12-1-option")]}getFirstOption(){return this.querySelector("sd-6-12-1-option")}setCurrentOption(t,e){this.getAllOptions().forEach(l=>{l.current=!1,l.tabIndex=-1,((e==null?void 0:e.type)==="keydown"||(e==null?void 0:e.type)==="mousedown")&&(l.isKeyboardFocus=!1)}),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,t.focus()),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}setSelectedOptions(t){let e=this.getAllOptions(),o=Array.isArray(t)?t:[t];e.forEach(l=>l.selected=!1),o.length&&o.forEach(l=>l.selected=!0),Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}toggleOptionSelection(t,e){e===!0||e===!1?t.selected=e:t.selected=!t.selected,Array.isArray(t)?this.selectionChanged():this.selectionChanged(t)}get displayLabel(){var t,e;return this.multiple?this.useTags||this.value.length===0?"":this.localize.term("numOptionsSelected",this.selectedOptions.length):(e=(t=this.selectedOptions[0])==null?void 0:t.getTextLabel())!=null?e:""}selectionChanged(t){var e,o;t&&this.multiple?this.selectedOptions.find(l=>l.value===t.value)?this.selectedOptions=this.selectedOptions.filter(l=>l.value!==t.value):this.selectedOptions=[...this.selectedOptions,t]:this.selectedOptions=this.getAllOptions().filter(l=>l.selected),this.multiple?this.value=this.selectedOptions.map(l=>l.value):this.value=(o=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?o:"",this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let o=this.getTag(t,e);return p`<div @sd-remove="${l=>this.handleTagRemove(l,t)}" class="max-w-full">${typeof o=="string"?L(o):o}</div>`}return[p``]}):[p`<sd-6-12-1-tag class="z-10 min-w-0 max-w-full" ?disabled="${this.disabled}" part="tag" exportparts="
6
6
  base:tag__base,
7
7
  content:tag__content,
8
8
  removable-indicator:tag__removable-indicator,
9
- " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-6-12-0-tag>`]}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleUseTagsChange(){let t=this.getAllOptions();customElements.get("sd-6-12-0-option")&&t.forEach(e=>{e.checkbox=this.multiple})}handleDisabledChange(){(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await w(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:t,options:e}=$(this,"select.show",{dir:this.localize.dir()});await x(this.popup.popup,t,e),this.currentOption&&A(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await w(this);let{keyframes:t,options:e}=$(this,"select.hide",{dir:this.localize.dir()});await x(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(t=>{t.size=this.size})}handleValueChange(){let t=this.value,e=Array.isArray(t)?t:[t],o=this.selectedOptions.map(n=>n.value);if(e.length===o.length&&e.every(n=>o.includes(n)))return;let l=this.getAllOptions(),d=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(l.filter(n=>d.includes(n.value))),this.value=t}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,T(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,T(this,"sd-after-hide")}checkValidity(){var t;return(t=this.valueInput)==null?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.combobox.focus(t)}blur(){this.combobox.blur()}render(){let t={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,o=this.helpText?!0:!!t.helpText,l=this.clearable&&!this.disabled,d=!!t.tooltip,n=this.value!==null&&String(this.value).length>0,a=this.floatingLabel&&e&&(this.hasFocus&&!this.visuallyDisabled||this.open||n)&&!(this.disabled&&!n),f=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",b=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",v={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],g={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],V=this.size==="lg"?this.floatingLabel?a?"py-3":"py-4":"py-2":this.floatingLabel?a?"py-2":"py-3":"py-1";return p`<div part="form-control" class="${h("relative text-left",b,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" aria-live="polite">${this.deletedTagLabel}</span> ${e&&!this.floatingLabel||d?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${e&&"inline-block form-control-color-text"}" aria-hidden="${e?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> ${t.tooltip?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${h("relative w-full bg-white",f==="disabled"?"text-neutral-500":"form-control-color-text")}">${e&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${h("absolute left-4 z-20 pointer-events-none transition-all duration-200",a?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2",a&&"mt-1")}" for="input"><span class="${h("leading-none",a&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${h("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[f],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-6-12-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${h("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
9
+ " size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-6-12-1-tag>`]}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleUseTagsChange(){let t=this.getAllOptions();customElements.get("sd-6-12-1-option")&&t.forEach(e=>{e.checkbox=this.multiple})}handleDisabledChange(){(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await w(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:t,options:e}=$(this,"select.show",{dir:this.localize.dir()});await x(this.popup.popup,t,e),this.currentOption&&A(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await w(this);let{keyframes:t,options:e}=$(this,"select.hide",{dir:this.localize.dir()});await x(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(t=>{t.size=this.size})}handleValueChange(){let t=this.value,e=Array.isArray(t)?t:[t],o=this.selectedOptions.map(n=>n.value);if(e.length===o.length&&e.every(n=>o.includes(n)))return;let l=this.getAllOptions(),d=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(l.filter(n=>d.includes(n.value))),this.value=t}handleSizeChange(){this.size=this.floatingLabel&&this.size==="sm"?"md":this.size}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,T(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,T(this,"sd-after-hide")}checkValidity(){var t;return(t=this.valueInput)==null?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.combobox.focus(t)}blur(){this.combobox.blur()}render(){let t={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,o=this.helpText?!0:!!t.helpText,l=this.clearable&&!this.disabled,d=!!t.tooltip,n=this.value!==null&&String(this.value).length>0,a=this.floatingLabel&&e&&(this.hasFocus&&!this.visuallyDisabled||this.open||n)&&!(this.disabled&&!n),f=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",b=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",v={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],g={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size],V=this.size==="lg"?this.floatingLabel?a?"py-3":"py-4":"py-2":this.floatingLabel?a?"py-2":"py-3":"py-1";return p`<div part="form-control" class="${h("relative text-left",b,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" aria-live="polite">${this.deletedTagLabel}</span> ${e&&!this.floatingLabel||d?p`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${e&&"inline-block form-control-color-text"}" aria-hidden="${e?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> ${t.tooltip?p`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${h("relative w-full bg-white",f==="disabled"?"text-neutral-500":"form-control-color-text")}">${e&&this.floatingLabel?p`<label id="label" part="form-control-floating-label" class="${h("absolute left-4 z-20 pointer-events-none transition-all duration-200",a?this.size==="lg"?"top-2 text-xs":"top-1 text-xs":"top-1/2 -translate-y-1/2",a&&"mt-1")}" for="input"><span class="${h("leading-none",a&&!this.visuallyDisabled&&!this.disabled&&"form-control--filled__floating-label-color-text")}">${this.label}</span></label>`:null}<div part="border" class="${h("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"form-control-color-border",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"form-control-color-border"}[f],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-6-12-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${h("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
10
10
  popup:popup__content,
11
- "><div class="${h("relative w-full h-full grid rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",["invalid","activeInvalid"].includes(f)&&"form-control--invalid-color-background")}" slot="anchor"><div class="${h("input-container items-center w-full h-full px-4 flex min-w-0",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],V)}"><input name="${this.name}" form="${this.form}" part="display-input" class="${h("top-0 left-0 appearance-none outline-none flex-grow bg-transparent flex-1 placeholder:text-neutral-700 min-w-0",b,this.multiple&&this.useTags&&this.value.length>0?"hidden":"",this.size==="sm"?a?"h-4":"h-6":a?"h-6":"h-8",a&&"leading-none mt-4")}" type="text" .disabled="${this.disabled}" placeholder="${!this.floatingLabel||a?this.placeholder||this.localize.term("selectDefaultPlaceholder"):""}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="-1"> ${this.multiple&&this.useTags&&this.tags&&this.tags.length>0?p`<div part="tags" class="${h("flex-grow flex flex-wrap items-center gap-1 min-w-0",this.floatingLabel&&"pt-4")}">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(y=>y==null?void 0:y.getTextLabel()).join(", ")}</div><input class="${h("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",b)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${l?p`<button part="clear-button" class="${h("select__clear flex justify-center",v,this.value.length>0?"visible":"hidden")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-12-0-icon class="${h("text-neutral-700 z-10",g)}" library="_internal" name="closing-round"></sd-6-12-0-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-6-12-0-icon part="invalid-icon" class="${h(v,g,"text-error")}" library="_internal" name="risk"></sd-6-12-0-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-6-12-0-icon part="valid-icon" class="${h("flex-shrink-0 text-success",v,g)}" library="_internal" name="confirm-circle"></sd-6-12-0-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${h("inline-flex ml-2 items-center transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",g)}"><sd-6-12-0-icon name="chevron-down" part="chevron" library="_internal" color="currentColor"></sd-6-12-0-icon></slot></div><button part="combobox" class="${h("relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",b,this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"min-h-[32px]",md:"min-h-[40px]",lg:"min-h-[48px]"}[this.size])}" type="button" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-labelledby="label"></button></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${h("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-6-12-0-popup></div><div class="text-sm text-neutral-700 mt-1" part="form-control-help-text" id="help-text" aria-hidden="${o?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage(this.size)}`}};i.styles=[...O.styles,E`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
12
- :host{position:relative;display:block;width:auto}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-6-12-0-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-6-12-0-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-6-12-0-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-6-12-0-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-6-12-0-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}`],s([k({selector:"sd-6-12-0-option"})],i.prototype,"_optionsInDefaultSlot",2),s([c("sd-6-12-0-popup")],i.prototype,"popup",2),s([c('[part="combobox"]')],i.prototype,"combobox",2),s([c('[part="display-input"]')],i.prototype,"displayInput",2),s([c(".value-input")],i.prototype,"valueInput",2),s([c('[part="listbox"]')],i.prototype,"listbox",2),s([c("#invalid-message")],i.prototype,"invalidMessage",2),s([u()],i.prototype,"deletedTagLabel",2),s([u()],i.prototype,"hasFocus",2),s([u()],i.prototype,"currentOption",2),s([u()],i.prototype,"selectedOptions",2),s([u()],i.prototype,"showValidStyle",2),s([u()],i.prototype,"showInvalidStyle",2),s([F()],i.prototype,"defaultValue",2),s([r({type:Boolean,reflect:!0})],i.prototype,"open",2),s([r({type:String,reflect:!0})],i.prototype,"size",2),s([r({type:String,reflect:!0})],i.prototype,"placement",2),s([r({type:String,reflect:!0})],i.prototype,"label",2),s([r({type:String,reflect:!0})],i.prototype,"placeholder",2),s([r({type:String,attribute:"max-options-tag-label",reflect:!0})],i.prototype,"maxOptionsTagLabel",2),s([r({type:Boolean,reflect:!0})],i.prototype,"disabled",2),s([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],i.prototype,"visuallyDisabled",2),s([r({type:String,attribute:"help-text",reflect:!0})],i.prototype,"helpText",2),s([u()],i.prototype,"currentPlacement",2),s([r({type:Boolean,reflect:!0})],i.prototype,"clearable",2),s([r({type:Boolean,reflect:!0})],i.prototype,"multiple",2),s([r({type:Boolean,reflect:!0})],i.prototype,"useTags",2),s([r({attribute:"max-options-visible",type:Number,reflect:!0})],i.prototype,"maxOptionsVisible",2),s([r({reflect:!0})],i.prototype,"form",2),s([r({reflect:!0})],i.prototype,"name",2),s([r({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],i.prototype,"value",2),s([r({type:Boolean,reflect:!0})],i.prototype,"required",2),s([r({attribute:"floating-label",type:Boolean,reflect:!0})],i.prototype,"floatingLabel",2),s([r({type:Boolean,reflect:!0,attribute:"style-on-valid"})],i.prototype,"styleOnValid",2),s([r({type:Boolean,reflect:!0})],i.prototype,"hoist",2),s([r()],i.prototype,"getTag",2),s([m("useTags",{waitUntilFirstUpdate:!0})],i.prototype,"handleUseTagsChange",1),s([m(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],i.prototype,"handleDisabledChange",1),s([m("open",{waitUntilFirstUpdate:!0})],i.prototype,"handleOpenChange",1),s([m("size",{waitUntilFirstUpdate:!0})],i.prototype,"applySizeToOptions",1),s([m("value",{waitUntilFirstUpdate:!0})],i.prototype,"handleValueChange",1),s([m(["size","floatingLabel"])],i.prototype,"handleSizeChange",1),i=s([D("sd-6-12-0-select")],i);C("select.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});C("select.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{i as a};
11
+ "><div class="${h("relative w-full h-full grid rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",["invalid","activeInvalid"].includes(f)&&"form-control--invalid-color-background")}" slot="anchor"><div class="${h("input-container items-center w-full h-full px-4 flex min-w-0",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],V)}"><input name="${this.name}" form="${this.form}" part="display-input" class="${h("top-0 left-0 appearance-none outline-none flex-grow bg-transparent flex-1 placeholder:text-neutral-700 min-w-0",b,this.multiple&&this.useTags&&this.value.length>0?"hidden":"",this.size==="sm"?a?"h-4":"h-6":a?"h-6":"h-8",a&&"leading-none mt-4")}" type="text" .disabled="${this.disabled}" placeholder="${!this.floatingLabel||a?this.placeholder||this.localize.term("selectDefaultPlaceholder"):""}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="-1"> ${this.multiple&&this.useTags&&this.tags&&this.tags.length>0?p`<div part="tags" class="${h("flex-grow flex flex-wrap items-center gap-1 min-w-0",this.floatingLabel&&"pt-4")}">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(y=>y==null?void 0:y.getTextLabel()).join(", ")}</div><input class="${h("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",b)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${l?p`<button part="clear-button" class="${h("select__clear flex justify-center",v,this.value.length>0?"visible":"hidden")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-6-12-1-icon class="${h("text-neutral-700 z-10",g)}" library="_internal" name="closing-round"></sd-6-12-1-icon></slot></button>`:""} ${this.showInvalidStyle?p`<sd-6-12-1-icon part="invalid-icon" class="${h(v,g,"text-error")}" library="_internal" name="risk"></sd-6-12-1-icon>`:""} ${this.styleOnValid&&this.showValidStyle?p`<sd-6-12-1-icon part="valid-icon" class="${h("flex-shrink-0 text-success",v,g)}" library="_internal" name="confirm-circle"></sd-6-12-1-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${h("inline-flex ml-2 items-center transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",g)}"><sd-6-12-1-icon name="chevron-down" part="chevron" library="_internal" color="currentColor"></sd-6-12-1-icon></slot></div><button part="combobox" class="${h("relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",b,this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"min-h-[32px]",md:"min-h-[40px]",lg:"min-h-[48px]"}[this.size])}" type="button" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-labelledby="label"></button></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${h("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-6-12-1-popup></div><div class="text-sm text-neutral-700 mt-1" part="form-control-help-text" id="help-text" aria-hidden="${o?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage(this.size)}`}};i.styles=[...O.styles,E`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
12
+ :host{position:relative;display:block;width:auto}:host([required]) #label::after{content:' *'}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{color:rgba(var(--sd-color-text-neutral-500))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{color:rgba(var(--sd-color-text-neutral-500))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-6-12-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-6-12-1-tag::part(base){border-radius:var(--sd-radius);padding-inline:var(--sd-spacing-1)}sd-6-12-1-tag::part(content){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--tag-max-width,15ch)}sd-6-12-1-tag[size=lg]::part(base){padding-inline:var(--sd-spacing-2)}sd-6-12-1-tag[disabled=false]::part(base):hover{background-color:rgba(var(--sd-color-background-primary-100))}`],s([k({selector:"sd-6-12-1-option"})],i.prototype,"_optionsInDefaultSlot",2),s([c("sd-6-12-1-popup")],i.prototype,"popup",2),s([c('[part="combobox"]')],i.prototype,"combobox",2),s([c('[part="display-input"]')],i.prototype,"displayInput",2),s([c(".value-input")],i.prototype,"valueInput",2),s([c('[part="listbox"]')],i.prototype,"listbox",2),s([c("#invalid-message")],i.prototype,"invalidMessage",2),s([u()],i.prototype,"deletedTagLabel",2),s([u()],i.prototype,"hasFocus",2),s([u()],i.prototype,"currentOption",2),s([u()],i.prototype,"selectedOptions",2),s([u()],i.prototype,"showValidStyle",2),s([u()],i.prototype,"showInvalidStyle",2),s([F()],i.prototype,"defaultValue",2),s([r({type:Boolean,reflect:!0})],i.prototype,"open",2),s([r({type:String,reflect:!0})],i.prototype,"size",2),s([r({type:String,reflect:!0})],i.prototype,"placement",2),s([r({type:String,reflect:!0})],i.prototype,"label",2),s([r({type:String,reflect:!0})],i.prototype,"placeholder",2),s([r({type:String,attribute:"max-options-tag-label",reflect:!0})],i.prototype,"maxOptionsTagLabel",2),s([r({type:Boolean,reflect:!0})],i.prototype,"disabled",2),s([r({type:Boolean,reflect:!0,attribute:"visually-disabled"})],i.prototype,"visuallyDisabled",2),s([r({type:String,attribute:"help-text",reflect:!0})],i.prototype,"helpText",2),s([u()],i.prototype,"currentPlacement",2),s([r({type:Boolean,reflect:!0})],i.prototype,"clearable",2),s([r({type:Boolean,reflect:!0})],i.prototype,"multiple",2),s([r({type:Boolean,reflect:!0})],i.prototype,"useTags",2),s([r({attribute:"max-options-visible",type:Number,reflect:!0})],i.prototype,"maxOptionsVisible",2),s([r({reflect:!0})],i.prototype,"form",2),s([r({reflect:!0})],i.prototype,"name",2),s([r({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],i.prototype,"value",2),s([r({type:Boolean,reflect:!0})],i.prototype,"required",2),s([r({attribute:"floating-label",type:Boolean,reflect:!0})],i.prototype,"floatingLabel",2),s([r({type:Boolean,reflect:!0,attribute:"style-on-valid"})],i.prototype,"styleOnValid",2),s([r({type:Boolean,reflect:!0})],i.prototype,"hoist",2),s([r()],i.prototype,"getTag",2),s([m("useTags",{waitUntilFirstUpdate:!0})],i.prototype,"handleUseTagsChange",1),s([m(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],i.prototype,"handleDisabledChange",1),s([m("open",{waitUntilFirstUpdate:!0})],i.prototype,"handleOpenChange",1),s([m("size",{waitUntilFirstUpdate:!0})],i.prototype,"applySizeToOptions",1),s([m("value",{waitUntilFirstUpdate:!0})],i.prototype,"handleValueChange",1),s([m(["size","floatingLabel"])],i.prototype,"handleSizeChange",1),i=s([D("sd-6-12-1-select")],i);C("select.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});C("select.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{i as a};
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk.3XPSGHFS.js";import{a as l}from"./chunk.NYKJXI3Q.js";import{a as o,b as i,h as a}from"./chunk.JMZGGLJF.js";import{b as s,e as r}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var n=0,t=class extends a{constructor(){super(...arguments);this.attrId=++n;this.componentId=`sd-6-12-0-tab-panel-${this.attrId}`;this.name="";this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return r`<slot part="base" class="${c("block",this.active&&"tab-panel--active")}"></slot>`}};t.styles=[...a.styles,s`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
- :host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i({type:Boolean,reflect:!0})],t.prototype,"active",2),e([l("active")],t.prototype,"handleActiveChange",1),t=e([o("sd-6-12-0-tab-panel")],t);export{t as a};
1
+ import{a as c}from"./chunk.3XPSGHFS.js";import{a as l}from"./chunk.NYKJXI3Q.js";import{a as o,b as i,h as a}from"./chunk.JMZGGLJF.js";import{b as s,e as r}from"./chunk.UOAG5PNU.js";import{e}from"./chunk.6EV4YU6C.js";var n=0,t=class extends a{constructor(){super(...arguments);this.attrId=++n;this.componentId=`sd-6-12-1-tab-panel-${this.attrId}`;this.name="";this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return r`<slot part="base" class="${c("block",this.active&&"tab-panel--active")}"></slot>`}};t.styles=[...a.styles,s`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
2
+ :host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i({type:Boolean,reflect:!0})],t.prototype,"active",2),e([l("active")],t.prototype,"handleActiveChange",1),t=e([o("sd-6-12-1-tab-panel")],t);export{t as a};