@solid-design-system/components 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (531) hide show
  1. package/cdn/chunks/{chunk.JMR5LRM4.js → chunk.2MKIKDQY.js} +1 -1
  2. package/cdn/chunks/{chunk.ROPE253M.js → chunk.2RKC4PX2.js} +1 -1
  3. package/cdn/chunks/{chunk.M4RFSHFF.js → chunk.37AKROZQ.js} +1 -1
  4. package/cdn/chunks/{chunk.WZC3XCIR.js → chunk.3CMEDI5Q.js} +1 -1
  5. package/cdn/chunks/{chunk.U34WY52I.js → chunk.4LW22GLX.js} +1 -1
  6. package/cdn/chunks/{chunk.A4G6Y76O.js → chunk.5KCSOAA3.js} +1 -1
  7. package/cdn/chunks/{chunk.NZ5V2VSI.js → chunk.6BCGXAUV.js} +1 -1
  8. package/cdn/chunks/{chunk.27P4XVMA.js → chunk.6HMIEKMA.js} +1 -1
  9. package/cdn/chunks/{chunk.TU2SAF4G.js → chunk.ANSLHQOM.js} +1 -1
  10. package/cdn/chunks/{chunk.WEAE6ZBM.js → chunk.AQYKEDSK.js} +1 -1
  11. package/cdn/chunks/{chunk.QKDYT7VV.js → chunk.BSXRWVFJ.js} +1 -1
  12. package/cdn/chunks/{chunk.YMD2XYIC.js → chunk.C7B7IJTF.js} +1 -1
  13. package/cdn/chunks/{chunk.PDS5EJLY.js → chunk.ENXPYC3I.js} +1 -1
  14. package/cdn/chunks/{chunk.3BP4JKVA.js → chunk.ERIS2E6E.js} +1 -1
  15. package/cdn/chunks/{chunk.NLBGFAEL.js → chunk.F3I2ZAJZ.js} +1 -1
  16. package/cdn/chunks/{chunk.U7AQLAX6.js → chunk.FNE6AWAP.js} +1 -1
  17. package/cdn/chunks/{chunk.HWHDT555.js → chunk.FPDKP6PN.js} +1 -1
  18. package/cdn/chunks/{chunk.PY4OL3TM.js → chunk.FX3IWUZL.js} +1 -1
  19. package/cdn/chunks/{chunk.FZOGKJ6K.js → chunk.GI6GBMRK.js} +1 -1
  20. package/cdn/chunks/{chunk.TNLTS4Y3.js → chunk.I6KWEJL5.js} +1 -1
  21. package/cdn/chunks/{chunk.BURIKJWK.js → chunk.JE65MGDL.js} +1 -1
  22. package/cdn/chunks/{chunk.ADINOF7M.js → chunk.KHK74CJA.js} +1 -1
  23. package/cdn/chunks/{chunk.AET67HPL.js → chunk.KT6CS7MB.js} +1 -1
  24. package/cdn/chunks/{chunk.NHZ6UIWO.js → chunk.L5LJFTUA.js} +1 -1
  25. package/cdn/chunks/{chunk.3IPN77DT.js → chunk.LFTAVPYP.js} +1 -1
  26. package/cdn/chunks/{chunk.EY7SRDP7.js → chunk.LKHCEWG6.js} +1 -1
  27. package/cdn/chunks/{chunk.HZ4OPRVF.js → chunk.MD77BZE7.js} +1 -1
  28. package/cdn/chunks/{chunk.GU6YYER3.js → chunk.MVMJOYL7.js} +1 -1
  29. package/cdn/chunks/chunk.MX2AOQKK.js +1 -0
  30. package/cdn/chunks/{chunk.IDCOAEYV.js → chunk.N7DREP3X.js} +1 -1
  31. package/cdn/chunks/{chunk.XYADX7DL.js → chunk.NCSRAXCO.js} +1 -1
  32. package/cdn/chunks/{chunk.7VSDQRWQ.js → chunk.NJPQO7AM.js} +1 -1
  33. package/cdn/chunks/{chunk.V2TDTGPP.js → chunk.O657MMFX.js} +1 -1
  34. package/cdn/chunks/{chunk.2CYKFWL2.js → chunk.OJILWIHU.js} +1 -1
  35. package/cdn/chunks/{chunk.6BDCEAVF.js → chunk.OYVDI4G4.js} +1 -1
  36. package/cdn/chunks/{chunk.3SSIAAEU.js → chunk.QK2P72CA.js} +1 -1
  37. package/cdn/chunks/{chunk.U7T4LLPE.js → chunk.RNVF7IN5.js} +1 -1
  38. package/cdn/chunks/{chunk.EH4OGY33.js → chunk.RORUJY5E.js} +1 -1
  39. package/cdn/chunks/{chunk.PCWU4TKS.js → chunk.RWS4N2NC.js} +1 -1
  40. package/cdn/chunks/{chunk.NSYOAWT4.js → chunk.SH5F4YM4.js} +1 -1
  41. package/cdn/chunks/{chunk.MNUMMNDI.js → chunk.TTAYTI3M.js} +1 -1
  42. package/cdn/chunks/{chunk.647JLNTI.js → chunk.UCPHLOPM.js} +1 -1
  43. package/cdn/chunks/{chunk.5BMT34AY.js → chunk.VHSIUWDX.js} +1 -1
  44. package/cdn/chunks/{chunk.BKAM7ZYV.js → chunk.VVLFNR53.js} +1 -1
  45. package/cdn/chunks/{chunk.Z5YG3CRT.js → chunk.VWVU4BWU.js} +1 -1
  46. package/cdn/chunks/{chunk.DLTYLPXF.js → chunk.WDX7NMBB.js} +1 -1
  47. package/cdn/chunks/{chunk.GCJNU5BB.js → chunk.WRDPMPPA.js} +1 -1
  48. package/cdn/chunks/{chunk.OYCPNRQV.js → chunk.XTSUFBWJ.js} +1 -1
  49. package/cdn/chunks/{chunk.XODZQ2XV.js → chunk.YHWKY6MV.js} +1 -1
  50. package/cdn/chunks/{chunk.XHNPUCSF.js → chunk.ZAYOIELL.js} +1 -1
  51. package/cdn/components/accordion/accordion.js +1 -1
  52. package/cdn/components/accordion-group/accordion-group.js +1 -1
  53. package/cdn/components/animation/animation.js +1 -1
  54. package/cdn/components/audio/audio.js +1 -1
  55. package/cdn/components/badge/badge.js +1 -1
  56. package/cdn/components/brandshape/brandshape.js +1 -1
  57. package/cdn/components/button/button.js +1 -1
  58. package/cdn/components/button-group/button-group.js +1 -1
  59. package/cdn/components/carousel/carousel.js +1 -1
  60. package/cdn/components/carousel-item/carousel-item.js +1 -1
  61. package/cdn/components/checkbox/checkbox.js +1 -1
  62. package/cdn/components/checkbox-group/checkbox-group.js +1 -1
  63. package/cdn/components/combobox/combobox.js +1 -1
  64. package/cdn/components/dialog/dialog.js +1 -1
  65. package/cdn/components/divider/divider.js +1 -1
  66. package/cdn/components/drawer/drawer.js +1 -1
  67. package/cdn/components/dropdown/dropdown.js +1 -1
  68. package/cdn/components/expandable/expandable.js +1 -1
  69. package/cdn/components/flipcard/flipcard.js +1 -1
  70. package/cdn/components/header/header.js +1 -1
  71. package/cdn/components/icon/icon.js +1 -1
  72. package/cdn/components/include/include.js +1 -1
  73. package/cdn/components/input/input.js +1 -1
  74. package/cdn/components/link/link.js +1 -1
  75. package/cdn/components/map-marker/map-marker.js +1 -1
  76. package/cdn/components/navigation-item/navigation-item.js +1 -1
  77. package/cdn/components/notification/notification.js +1 -1
  78. package/cdn/components/optgroup/optgroup.js +1 -1
  79. package/cdn/components/option/option.js +1 -1
  80. package/cdn/components/popup/popup.js +1 -1
  81. package/cdn/components/quickfact/quickfact.js +1 -1
  82. package/cdn/components/radio/radio.js +1 -1
  83. package/cdn/components/radio-button/radio-button.js +1 -1
  84. package/cdn/components/radio-group/radio-group.js +1 -1
  85. package/cdn/components/scrollable/scrollable.js +1 -1
  86. package/cdn/components/select/select.js +1 -1
  87. package/cdn/components/spinner/spinner.js +1 -1
  88. package/cdn/components/step/step.js +1 -1
  89. package/cdn/components/step-group/step-group.js +1 -1
  90. package/cdn/components/switch/switch.js +1 -1
  91. package/cdn/components/tab/tab.js +1 -1
  92. package/cdn/components/tab-group/tab-group.js +1 -1
  93. package/cdn/components/tab-panel/tab-panel.js +1 -1
  94. package/cdn/components/tag/tag.js +1 -1
  95. package/cdn/components/teaser/teaser.js +1 -1
  96. package/cdn/components/teaser-media/teaser-media.js +1 -1
  97. package/cdn/components/textarea/textarea.js +1 -1
  98. package/cdn/components/tooltip/tooltip.js +1 -1
  99. package/cdn/components/video/video.js +1 -1
  100. package/cdn/custom-elements.json +1 -1
  101. package/cdn/solid-components.bundle.js +15 -15
  102. package/cdn/solid-components.iife.js +15 -15
  103. package/cdn/solid-components.js +1 -1
  104. package/cdn/utilities/autocomplete-config.js +1 -1
  105. package/cdn/web-types.json +1 -1
  106. package/cdn-versioned/_components/menu/menu.js +1 -1
  107. package/cdn-versioned/_components/menu/menu.styles.js +1 -1
  108. package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
  109. package/cdn-versioned/chunks/{chunk.JMR5LRM4.js → chunk.2MKIKDQY.js} +1 -1
  110. package/cdn-versioned/chunks/{chunk.ROPE253M.js → chunk.2RKC4PX2.js} +1 -1
  111. package/cdn-versioned/chunks/{chunk.M4RFSHFF.js → chunk.37AKROZQ.js} +1 -1
  112. package/cdn-versioned/chunks/{chunk.WZC3XCIR.js → chunk.3CMEDI5Q.js} +2 -2
  113. package/cdn-versioned/chunks/{chunk.U34WY52I.js → chunk.4LW22GLX.js} +1 -1
  114. package/cdn-versioned/chunks/{chunk.A4G6Y76O.js → chunk.5KCSOAA3.js} +1 -1
  115. package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
  116. package/cdn-versioned/chunks/{chunk.NZ5V2VSI.js → chunk.6BCGXAUV.js} +1 -1
  117. package/cdn-versioned/chunks/{chunk.27P4XVMA.js → chunk.6HMIEKMA.js} +1 -1
  118. package/cdn-versioned/chunks/{chunk.TU2SAF4G.js → chunk.ANSLHQOM.js} +4 -4
  119. package/cdn-versioned/chunks/{chunk.WEAE6ZBM.js → chunk.AQYKEDSK.js} +1 -1
  120. package/cdn-versioned/chunks/{chunk.QKDYT7VV.js → chunk.BSXRWVFJ.js} +1 -1
  121. package/cdn-versioned/chunks/{chunk.YMD2XYIC.js → chunk.C7B7IJTF.js} +1 -1
  122. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  123. package/cdn-versioned/chunks/{chunk.PDS5EJLY.js → chunk.ENXPYC3I.js} +1 -1
  124. package/cdn-versioned/chunks/{chunk.3BP4JKVA.js → chunk.ERIS2E6E.js} +1 -1
  125. package/cdn-versioned/chunks/{chunk.NLBGFAEL.js → chunk.F3I2ZAJZ.js} +4 -4
  126. package/cdn-versioned/chunks/{chunk.U7AQLAX6.js → chunk.FNE6AWAP.js} +1 -1
  127. package/cdn-versioned/chunks/{chunk.HWHDT555.js → chunk.FPDKP6PN.js} +1 -1
  128. package/cdn-versioned/chunks/{chunk.PY4OL3TM.js → chunk.FX3IWUZL.js} +2 -2
  129. package/cdn-versioned/chunks/{chunk.FZOGKJ6K.js → chunk.GI6GBMRK.js} +1 -1
  130. package/cdn-versioned/chunks/{chunk.TNLTS4Y3.js → chunk.I6KWEJL5.js} +1 -1
  131. package/cdn-versioned/chunks/{chunk.BURIKJWK.js → chunk.JE65MGDL.js} +1 -1
  132. package/cdn-versioned/chunks/{chunk.ADINOF7M.js → chunk.KHK74CJA.js} +1 -1
  133. package/cdn-versioned/chunks/{chunk.AET67HPL.js → chunk.KT6CS7MB.js} +1 -1
  134. package/cdn-versioned/chunks/{chunk.NHZ6UIWO.js → chunk.L5LJFTUA.js} +1 -1
  135. package/cdn-versioned/chunks/{chunk.3IPN77DT.js → chunk.LFTAVPYP.js} +1 -1
  136. package/cdn-versioned/chunks/{chunk.EY7SRDP7.js → chunk.LKHCEWG6.js} +2 -2
  137. package/cdn-versioned/chunks/{chunk.HZ4OPRVF.js → chunk.MD77BZE7.js} +1 -1
  138. package/cdn-versioned/chunks/{chunk.GU6YYER3.js → chunk.MVMJOYL7.js} +1 -1
  139. package/cdn-versioned/chunks/chunk.MX2AOQKK.js +1 -0
  140. package/cdn-versioned/chunks/{chunk.IDCOAEYV.js → chunk.N7DREP3X.js} +1 -1
  141. package/cdn-versioned/chunks/{chunk.XYADX7DL.js → chunk.NCSRAXCO.js} +1 -1
  142. package/cdn-versioned/chunks/{chunk.7VSDQRWQ.js → chunk.NJPQO7AM.js} +1 -1
  143. package/cdn-versioned/chunks/{chunk.V2TDTGPP.js → chunk.O657MMFX.js} +1 -1
  144. package/cdn-versioned/chunks/{chunk.2CYKFWL2.js → chunk.OJILWIHU.js} +1 -1
  145. package/cdn-versioned/chunks/{chunk.6BDCEAVF.js → chunk.OYVDI4G4.js} +4 -4
  146. package/cdn-versioned/chunks/{chunk.3SSIAAEU.js → chunk.QK2P72CA.js} +1 -1
  147. package/cdn-versioned/chunks/{chunk.U7T4LLPE.js → chunk.RNVF7IN5.js} +1 -1
  148. package/cdn-versioned/chunks/{chunk.EH4OGY33.js → chunk.RORUJY5E.js} +2 -2
  149. package/cdn-versioned/chunks/{chunk.PCWU4TKS.js → chunk.RWS4N2NC.js} +1 -1
  150. package/cdn-versioned/chunks/{chunk.NSYOAWT4.js → chunk.SH5F4YM4.js} +1 -1
  151. package/cdn-versioned/chunks/{chunk.MNUMMNDI.js → chunk.TTAYTI3M.js} +2 -2
  152. package/cdn-versioned/chunks/{chunk.647JLNTI.js → chunk.UCPHLOPM.js} +1 -1
  153. package/cdn-versioned/chunks/{chunk.5BMT34AY.js → chunk.VHSIUWDX.js} +1 -1
  154. package/cdn-versioned/chunks/{chunk.BKAM7ZYV.js → chunk.VVLFNR53.js} +1 -1
  155. package/cdn-versioned/chunks/{chunk.Z5YG3CRT.js → chunk.VWVU4BWU.js} +1 -1
  156. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  157. package/cdn-versioned/chunks/{chunk.DLTYLPXF.js → chunk.WDX7NMBB.js} +1 -1
  158. package/cdn-versioned/chunks/{chunk.GCJNU5BB.js → chunk.WRDPMPPA.js} +1 -1
  159. package/cdn-versioned/chunks/{chunk.OYCPNRQV.js → chunk.XTSUFBWJ.js} +1 -1
  160. package/cdn-versioned/chunks/{chunk.XODZQ2XV.js → chunk.YHWKY6MV.js} +1 -1
  161. package/cdn-versioned/chunks/{chunk.XHNPUCSF.js → chunk.ZAYOIELL.js} +1 -1
  162. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  163. package/cdn-versioned/components/accordion/accordion.js +1 -1
  164. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  165. package/cdn-versioned/components/accordion-group/accordion-group.js +1 -1
  166. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  167. package/cdn-versioned/components/animation/animation.js +1 -1
  168. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  169. package/cdn-versioned/components/audio/audio.js +1 -1
  170. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  171. package/cdn-versioned/components/badge/badge.js +1 -1
  172. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  173. package/cdn-versioned/components/brandshape/brandshape.js +1 -1
  174. package/cdn-versioned/components/button/button.d.ts +1 -1
  175. package/cdn-versioned/components/button/button.js +1 -1
  176. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  177. package/cdn-versioned/components/button-group/button-group.js +1 -1
  178. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  179. package/cdn-versioned/components/carousel/carousel.js +1 -1
  180. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  181. package/cdn-versioned/components/carousel-item/carousel-item.js +1 -1
  182. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  183. package/cdn-versioned/components/checkbox/checkbox.js +1 -1
  184. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  185. package/cdn-versioned/components/checkbox-group/checkbox-group.js +1 -1
  186. package/cdn-versioned/components/combobox/combobox.d.ts +4 -4
  187. package/cdn-versioned/components/combobox/combobox.js +1 -1
  188. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  189. package/cdn-versioned/components/dialog/dialog.js +1 -1
  190. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  191. package/cdn-versioned/components/divider/divider.js +1 -1
  192. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  193. package/cdn-versioned/components/drawer/drawer.js +1 -1
  194. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  195. package/cdn-versioned/components/dropdown/dropdown.js +1 -1
  196. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  197. package/cdn-versioned/components/expandable/expandable.js +1 -1
  198. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  199. package/cdn-versioned/components/flipcard/flipcard.js +1 -1
  200. package/cdn-versioned/components/header/header.d.ts +1 -1
  201. package/cdn-versioned/components/header/header.js +1 -1
  202. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  203. package/cdn-versioned/components/icon/icon.js +1 -1
  204. package/cdn-versioned/components/include/include.d.ts +1 -1
  205. package/cdn-versioned/components/include/include.js +1 -1
  206. package/cdn-versioned/components/input/input.d.ts +1 -1
  207. package/cdn-versioned/components/input/input.js +1 -1
  208. package/cdn-versioned/components/link/link.d.ts +1 -1
  209. package/cdn-versioned/components/link/link.js +1 -1
  210. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  211. package/cdn-versioned/components/map-marker/map-marker.js +1 -1
  212. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  213. package/cdn-versioned/components/navigation-item/navigation-item.js +1 -1
  214. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  215. package/cdn-versioned/components/notification/notification.js +1 -1
  216. package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
  217. package/cdn-versioned/components/optgroup/optgroup.js +1 -1
  218. package/cdn-versioned/components/option/option.d.ts +1 -1
  219. package/cdn-versioned/components/option/option.js +1 -1
  220. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  221. package/cdn-versioned/components/popup/popup.js +1 -1
  222. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  223. package/cdn-versioned/components/quickfact/quickfact.js +1 -1
  224. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  225. package/cdn-versioned/components/radio/radio.js +1 -1
  226. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  227. package/cdn-versioned/components/radio-button/radio-button.js +1 -1
  228. package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
  229. package/cdn-versioned/components/radio-group/radio-group.js +1 -1
  230. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  231. package/cdn-versioned/components/scrollable/scrollable.js +1 -1
  232. package/cdn-versioned/components/select/select.d.ts +4 -4
  233. package/cdn-versioned/components/select/select.js +1 -1
  234. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  235. package/cdn-versioned/components/spinner/spinner.js +1 -1
  236. package/cdn-versioned/components/step/step.d.ts +1 -1
  237. package/cdn-versioned/components/step/step.js +1 -1
  238. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  239. package/cdn-versioned/components/step-group/step-group.js +1 -1
  240. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  241. package/cdn-versioned/components/switch/switch.js +1 -1
  242. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  243. package/cdn-versioned/components/tab/tab.js +1 -1
  244. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  245. package/cdn-versioned/components/tab-group/tab-group.js +1 -1
  246. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  247. package/cdn-versioned/components/tab-panel/tab-panel.js +1 -1
  248. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  249. package/cdn-versioned/components/tag/tag.js +1 -1
  250. package/cdn-versioned/components/teaser/teaser.js +1 -1
  251. package/cdn-versioned/components/teaser-media/teaser-media.js +1 -1
  252. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  253. package/cdn-versioned/components/textarea/textarea.js +1 -1
  254. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  255. package/cdn-versioned/components/tooltip/tooltip.js +1 -1
  256. package/cdn-versioned/components/video/video.d.ts +1 -1
  257. package/cdn-versioned/components/video/video.js +1 -1
  258. package/cdn-versioned/custom-elements.json +202 -202
  259. package/cdn-versioned/internal/form.js +3 -3
  260. package/cdn-versioned/solid-components.bundle.js +19 -19
  261. package/cdn-versioned/solid-components.css +2 -2
  262. package/cdn-versioned/solid-components.iife.js +19 -19
  263. package/cdn-versioned/solid-components.js +1 -1
  264. package/cdn-versioned/utilities/autocomplete-config.js +1 -1
  265. package/cdn-versioned/vscode.html-custom-data.json +80 -80
  266. package/cdn-versioned/web-types.json +137 -137
  267. package/dist/chunks/{chunk.VDF7KHYO.js → chunk.23WUCVW6.js} +1 -1
  268. package/dist/chunks/{chunk.MEYIIQQC.js → chunk.2FWAXOB3.js} +1 -1
  269. package/dist/chunks/{chunk.FXAD3J2G.js → chunk.336SOZQ7.js} +1 -1
  270. package/dist/chunks/{chunk.VA4H4TO6.js → chunk.3IIJI2YI.js} +1 -1
  271. package/dist/chunks/{chunk.N443KN6M.js → chunk.47Y6CRA6.js} +1 -1
  272. package/dist/chunks/{chunk.SX66NTJS.js → chunk.4LA6375U.js} +1 -1
  273. package/dist/chunks/{chunk.RJG7FDQN.js → chunk.4NORTB4T.js} +1 -1
  274. package/dist/chunks/{chunk.C3IVTPFT.js → chunk.5UXE3YAT.js} +1 -1
  275. package/dist/chunks/{chunk.DWIJB4FE.js → chunk.5ZWBIPBJ.js} +1 -1
  276. package/dist/chunks/{chunk.KARKPO6D.js → chunk.6US5BJNM.js} +1 -1
  277. package/dist/chunks/{chunk.ZYCCX6R7.js → chunk.7JO5FCU4.js} +1 -1
  278. package/dist/chunks/{chunk.YQ6ZGCYS.js → chunk.A7ETNRKR.js} +1 -1
  279. package/dist/chunks/{chunk.WSGE4KVS.js → chunk.AFZXA6KB.js} +3 -3
  280. package/dist/chunks/{chunk.FTPI46H7.js → chunk.B2FZCDD2.js} +1 -1
  281. package/dist/chunks/{chunk.SAHCI5Y5.js → chunk.BTN23KPO.js} +1 -1
  282. package/dist/chunks/{chunk.LOHV3SQ7.js → chunk.BZNIT6S5.js} +1 -1
  283. package/dist/chunks/{chunk.7TH6VN75.js → chunk.DHEEQPKB.js} +2 -2
  284. package/dist/chunks/{chunk.KXWPB4EA.js → chunk.DID2HIGU.js} +1 -1
  285. package/dist/chunks/{chunk.SWWBX77U.js → chunk.DQUOULN6.js} +1 -1
  286. package/dist/chunks/{chunk.ZY536C6C.js → chunk.EYDGWH4T.js} +1 -1
  287. package/dist/chunks/{chunk.VYFAJUCN.js → chunk.FAMYJDBN.js} +1 -1
  288. package/dist/chunks/{chunk.G4S2CHVG.js → chunk.G6LYMXKT.js} +4 -4
  289. package/dist/chunks/{chunk.MSBRGBZ3.js → chunk.GMOZ5YXA.js} +2 -2
  290. package/dist/chunks/{chunk.S5ODUYDD.js → chunk.GSDAOG7M.js} +1 -1
  291. package/dist/chunks/{chunk.7A4PCELQ.js → chunk.GWYRJFJU.js} +1 -1
  292. package/dist/chunks/{chunk.GC3PXZ6M.js → chunk.KGZ3GBGJ.js} +1 -1
  293. package/dist/chunks/{chunk.CWZMGP22.js → chunk.LBHA2DC4.js} +1 -1
  294. package/dist/chunks/{chunk.72RQXFUJ.js → chunk.MFJDLGGR.js} +1 -1
  295. package/dist/chunks/{chunk.I4JQIHL5.js → chunk.NEZVEG7K.js} +1 -1
  296. package/dist/chunks/{chunk.ZDM4363V.js → chunk.NU62KGCW.js} +1 -1
  297. package/dist/chunks/{chunk.IJKJEQKZ.js → chunk.OZXJCMQU.js} +1 -1
  298. package/dist/chunks/{chunk.XW5FWVSL.js → chunk.QDCDOA3O.js} +1 -1
  299. package/dist/chunks/{chunk.SNEFSXVE.js → chunk.QEMNNDQN.js} +1 -1
  300. package/dist/chunks/{chunk.ZXUJNQSP.js → chunk.QZF3GDJ6.js} +1 -1
  301. package/dist/chunks/{chunk.3MB5BULP.js → chunk.R3AKTB5D.js} +1 -1
  302. package/dist/chunks/{chunk.EOK7GTLB.js → chunk.REUL4QMO.js} +1 -1
  303. package/dist/chunks/{chunk.ASAXVCVJ.js → chunk.RGLEFOOR.js} +1 -1
  304. package/dist/chunks/{chunk.EZZY6RYW.js → chunk.SWDIWUUU.js} +1 -1
  305. package/dist/chunks/{chunk.EROZOZSD.js → chunk.THY5BDBS.js} +1 -1
  306. package/dist/chunks/{chunk.LIHVJG34.js → chunk.TPF3IUIC.js} +1 -1
  307. package/dist/chunks/{chunk.S4MVT4ZE.js → chunk.UJYVSZ25.js} +2 -2
  308. package/dist/chunks/{chunk.V542QHOM.js → chunk.V3JNM4K3.js} +1 -1
  309. package/dist/chunks/{chunk.GLFF67DA.js → chunk.VBMNECRY.js} +1 -1
  310. package/dist/chunks/{chunk.JN6UBBKL.js → chunk.VX3KGPNB.js} +1 -1
  311. package/dist/chunks/{chunk.JWJRZKES.js → chunk.WLPV5EZN.js} +1 -1
  312. package/dist/chunks/{chunk.YMMZA3LC.js → chunk.XVR2P4CC.js} +1 -1
  313. package/dist/chunks/{chunk.AFNKNM3P.js → chunk.XW3H7TX7.js} +4 -4
  314. package/dist/chunks/{chunk.E5RK2KNC.js → chunk.Y3F3Y4DX.js} +1 -1
  315. package/dist/chunks/{chunk.KCHA5X3N.js → chunk.YA3KZ3ZS.js} +1 -1
  316. package/dist/chunks/{chunk.BAKEFAQ3.js → chunk.YFF7OIOH.js} +1 -1
  317. package/dist/components/accordion/accordion.js +3 -3
  318. package/dist/components/accordion-group/accordion-group.js +4 -4
  319. package/dist/components/animation/animation.js +2 -2
  320. package/dist/components/audio/audio.js +2 -2
  321. package/dist/components/badge/badge.js +2 -2
  322. package/dist/components/brandshape/brandshape.js +2 -2
  323. package/dist/components/button/button.js +3 -3
  324. package/dist/components/button-group/button-group.js +2 -2
  325. package/dist/components/carousel/carousel.js +4 -4
  326. package/dist/components/carousel-item/carousel-item.js +2 -2
  327. package/dist/components/checkbox/checkbox.js +3 -3
  328. package/dist/components/checkbox-group/checkbox-group.js +3 -3
  329. package/dist/components/combobox/combobox.js +5 -5
  330. package/dist/components/dialog/dialog.js +5 -5
  331. package/dist/components/divider/divider.js +2 -2
  332. package/dist/components/drawer/drawer.js +5 -5
  333. package/dist/components/dropdown/dropdown.js +3 -3
  334. package/dist/components/expandable/expandable.js +2 -2
  335. package/dist/components/flipcard/flipcard.js +5 -5
  336. package/dist/components/header/header.js +2 -2
  337. package/dist/components/icon/icon.js +2 -2
  338. package/dist/components/include/include.js +2 -2
  339. package/dist/components/input/input.js +3 -3
  340. package/dist/components/link/link.js +2 -2
  341. package/dist/components/map-marker/map-marker.js +2 -2
  342. package/dist/components/navigation-item/navigation-item.js +2 -2
  343. package/dist/components/notification/notification.js +2 -2
  344. package/dist/components/optgroup/optgroup.js +3 -3
  345. package/dist/components/option/option.js +3 -3
  346. package/dist/components/popup/popup.js +2 -2
  347. package/dist/components/quickfact/quickfact.js +4 -4
  348. package/dist/components/radio/radio.js +3 -3
  349. package/dist/components/radio-button/radio-button.js +2 -2
  350. package/dist/components/radio-group/radio-group.js +5 -5
  351. package/dist/components/scrollable/scrollable.js +2 -2
  352. package/dist/components/select/select.js +5 -5
  353. package/dist/components/spinner/spinner.js +2 -2
  354. package/dist/components/step/step.js +2 -2
  355. package/dist/components/step-group/step-group.js +2 -2
  356. package/dist/components/switch/switch.js +2 -2
  357. package/dist/components/tab/tab.js +2 -2
  358. package/dist/components/tab-group/tab-group.js +2 -2
  359. package/dist/components/tab-panel/tab-panel.js +2 -2
  360. package/dist/components/tag/tag.js +2 -2
  361. package/dist/components/teaser/teaser.js +2 -2
  362. package/dist/components/teaser-media/teaser-media.js +2 -2
  363. package/dist/components/textarea/textarea.js +2 -2
  364. package/dist/components/tooltip/tooltip.js +3 -3
  365. package/dist/components/video/video.js +2 -2
  366. package/dist/custom-elements.json +1 -1
  367. package/dist/solid-components.js +52 -52
  368. package/dist/utilities/autocomplete-config.js +2 -2
  369. package/dist/web-types.json +1 -1
  370. package/dist-versioned/_components/menu/menu.js +1 -1
  371. package/dist-versioned/_components/menu/menu.styles.js +1 -1
  372. package/dist-versioned/_components/menu-item/menu-item.js +2 -2
  373. package/dist-versioned/chunks/{chunk.VDF7KHYO.js → chunk.23WUCVW6.js} +2 -2
  374. package/dist-versioned/chunks/{chunk.MEYIIQQC.js → chunk.2FWAXOB3.js} +14 -14
  375. package/dist-versioned/chunks/{chunk.FXAD3J2G.js → chunk.336SOZQ7.js} +3 -3
  376. package/dist-versioned/chunks/{chunk.VA4H4TO6.js → chunk.3IIJI2YI.js} +3 -3
  377. package/dist-versioned/chunks/{chunk.N443KN6M.js → chunk.47Y6CRA6.js} +2 -2
  378. package/dist-versioned/chunks/{chunk.SX66NTJS.js → chunk.4LA6375U.js} +6 -6
  379. package/dist-versioned/chunks/{chunk.RJG7FDQN.js → chunk.4NORTB4T.js} +3 -3
  380. package/dist-versioned/chunks/{chunk.C3IVTPFT.js → chunk.5UXE3YAT.js} +3 -3
  381. package/dist-versioned/chunks/{chunk.DWIJB4FE.js → chunk.5ZWBIPBJ.js} +3 -3
  382. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  383. package/dist-versioned/chunks/{chunk.KARKPO6D.js → chunk.6US5BJNM.js} +3 -3
  384. package/dist-versioned/chunks/{chunk.ZYCCX6R7.js → chunk.7JO5FCU4.js} +4 -4
  385. package/dist-versioned/chunks/{chunk.YQ6ZGCYS.js → chunk.A7ETNRKR.js} +3 -3
  386. package/dist-versioned/chunks/{chunk.WSGE4KVS.js → chunk.AFZXA6KB.js} +16 -16
  387. package/dist-versioned/chunks/{chunk.FTPI46H7.js → chunk.B2FZCDD2.js} +3 -3
  388. package/dist-versioned/chunks/{chunk.SAHCI5Y5.js → chunk.BTN23KPO.js} +2 -2
  389. package/dist-versioned/chunks/{chunk.LOHV3SQ7.js → chunk.BZNIT6S5.js} +2 -2
  390. package/dist-versioned/chunks/{chunk.7TH6VN75.js → chunk.DHEEQPKB.js} +5 -5
  391. package/dist-versioned/chunks/{chunk.KXWPB4EA.js → chunk.DID2HIGU.js} +10 -10
  392. package/dist-versioned/chunks/{chunk.SWWBX77U.js → chunk.DQUOULN6.js} +3 -3
  393. package/dist-versioned/chunks/{chunk.ZY536C6C.js → chunk.EYDGWH4T.js} +2 -2
  394. package/dist-versioned/chunks/{chunk.VYFAJUCN.js → chunk.FAMYJDBN.js} +3 -3
  395. package/dist-versioned/chunks/{chunk.G4S2CHVG.js → chunk.G6LYMXKT.js} +30 -30
  396. package/dist-versioned/chunks/{chunk.MSBRGBZ3.js → chunk.GMOZ5YXA.js} +8 -8
  397. package/dist-versioned/chunks/{chunk.S5ODUYDD.js → chunk.GSDAOG7M.js} +6 -6
  398. package/dist-versioned/chunks/{chunk.7A4PCELQ.js → chunk.GWYRJFJU.js} +2 -2
  399. package/dist-versioned/chunks/{chunk.GC3PXZ6M.js → chunk.KGZ3GBGJ.js} +1 -1
  400. package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
  401. package/dist-versioned/chunks/{chunk.CWZMGP22.js → chunk.LBHA2DC4.js} +3 -3
  402. package/dist-versioned/chunks/{chunk.72RQXFUJ.js → chunk.MFJDLGGR.js} +3 -3
  403. package/dist-versioned/chunks/{chunk.I4JQIHL5.js → chunk.NEZVEG7K.js} +7 -7
  404. package/dist-versioned/chunks/{chunk.ZDM4363V.js → chunk.NU62KGCW.js} +5 -5
  405. package/dist-versioned/chunks/{chunk.IJKJEQKZ.js → chunk.OZXJCMQU.js} +3 -3
  406. package/dist-versioned/chunks/{chunk.XW5FWVSL.js → chunk.QDCDOA3O.js} +2 -2
  407. package/dist-versioned/chunks/{chunk.SNEFSXVE.js → chunk.QEMNNDQN.js} +6 -6
  408. package/dist-versioned/chunks/{chunk.ZXUJNQSP.js → chunk.QZF3GDJ6.js} +2 -2
  409. package/dist-versioned/chunks/{chunk.3MB5BULP.js → chunk.R3AKTB5D.js} +2 -2
  410. package/dist-versioned/chunks/{chunk.EOK7GTLB.js → chunk.REUL4QMO.js} +2 -2
  411. package/dist-versioned/chunks/{chunk.ASAXVCVJ.js → chunk.RGLEFOOR.js} +4 -4
  412. package/dist-versioned/chunks/{chunk.EZZY6RYW.js → chunk.SWDIWUUU.js} +4 -4
  413. package/dist-versioned/chunks/{chunk.EROZOZSD.js → chunk.THY5BDBS.js} +2 -2
  414. package/dist-versioned/chunks/{chunk.LIHVJG34.js → chunk.TPF3IUIC.js} +2 -2
  415. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  416. package/dist-versioned/chunks/{chunk.S4MVT4ZE.js → chunk.UJYVSZ25.js} +7 -7
  417. package/dist-versioned/chunks/{chunk.V542QHOM.js → chunk.V3JNM4K3.js} +3 -3
  418. package/dist-versioned/chunks/{chunk.GLFF67DA.js → chunk.VBMNECRY.js} +6 -6
  419. package/dist-versioned/chunks/{chunk.JN6UBBKL.js → chunk.VX3KGPNB.js} +3 -3
  420. package/dist-versioned/chunks/{chunk.JWJRZKES.js → chunk.WLPV5EZN.js} +12 -12
  421. package/dist-versioned/chunks/{chunk.YMMZA3LC.js → chunk.XVR2P4CC.js} +4 -4
  422. package/dist-versioned/chunks/{chunk.AFNKNM3P.js → chunk.XW3H7TX7.js} +33 -33
  423. package/dist-versioned/chunks/{chunk.E5RK2KNC.js → chunk.Y3F3Y4DX.js} +3 -3
  424. package/dist-versioned/chunks/{chunk.KCHA5X3N.js → chunk.YA3KZ3ZS.js} +6 -6
  425. package/dist-versioned/chunks/{chunk.BAKEFAQ3.js → chunk.YFF7OIOH.js} +2 -2
  426. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  427. package/dist-versioned/components/accordion/accordion.js +3 -3
  428. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  429. package/dist-versioned/components/accordion-group/accordion-group.js +4 -4
  430. package/dist-versioned/components/animation/animation.d.ts +1 -1
  431. package/dist-versioned/components/animation/animation.js +2 -2
  432. package/dist-versioned/components/audio/audio.d.ts +1 -1
  433. package/dist-versioned/components/audio/audio.js +2 -2
  434. package/dist-versioned/components/badge/badge.d.ts +1 -1
  435. package/dist-versioned/components/badge/badge.js +2 -2
  436. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  437. package/dist-versioned/components/brandshape/brandshape.js +2 -2
  438. package/dist-versioned/components/button/button.d.ts +1 -1
  439. package/dist-versioned/components/button/button.js +3 -3
  440. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  441. package/dist-versioned/components/button-group/button-group.js +2 -2
  442. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  443. package/dist-versioned/components/carousel/carousel.js +4 -4
  444. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  445. package/dist-versioned/components/carousel-item/carousel-item.js +2 -2
  446. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  447. package/dist-versioned/components/checkbox/checkbox.js +3 -3
  448. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  449. package/dist-versioned/components/checkbox-group/checkbox-group.js +3 -3
  450. package/dist-versioned/components/combobox/combobox.d.ts +4 -4
  451. package/dist-versioned/components/combobox/combobox.js +5 -5
  452. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  453. package/dist-versioned/components/dialog/dialog.js +5 -5
  454. package/dist-versioned/components/divider/divider.d.ts +1 -1
  455. package/dist-versioned/components/divider/divider.js +2 -2
  456. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  457. package/dist-versioned/components/drawer/drawer.js +5 -5
  458. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  459. package/dist-versioned/components/dropdown/dropdown.js +3 -3
  460. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  461. package/dist-versioned/components/expandable/expandable.js +2 -2
  462. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  463. package/dist-versioned/components/flipcard/flipcard.js +5 -5
  464. package/dist-versioned/components/header/header.d.ts +1 -1
  465. package/dist-versioned/components/header/header.js +2 -2
  466. package/dist-versioned/components/icon/icon.d.ts +1 -1
  467. package/dist-versioned/components/icon/icon.js +2 -2
  468. package/dist-versioned/components/include/include.d.ts +1 -1
  469. package/dist-versioned/components/include/include.js +2 -2
  470. package/dist-versioned/components/input/input.d.ts +1 -1
  471. package/dist-versioned/components/input/input.js +3 -3
  472. package/dist-versioned/components/link/link.d.ts +1 -1
  473. package/dist-versioned/components/link/link.js +2 -2
  474. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  475. package/dist-versioned/components/map-marker/map-marker.js +2 -2
  476. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  477. package/dist-versioned/components/navigation-item/navigation-item.js +2 -2
  478. package/dist-versioned/components/notification/notification.d.ts +1 -1
  479. package/dist-versioned/components/notification/notification.js +2 -2
  480. package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
  481. package/dist-versioned/components/optgroup/optgroup.js +3 -3
  482. package/dist-versioned/components/option/option.d.ts +1 -1
  483. package/dist-versioned/components/option/option.js +3 -3
  484. package/dist-versioned/components/popup/popup.d.ts +1 -1
  485. package/dist-versioned/components/popup/popup.js +2 -2
  486. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  487. package/dist-versioned/components/quickfact/quickfact.js +4 -4
  488. package/dist-versioned/components/radio/radio.d.ts +1 -1
  489. package/dist-versioned/components/radio/radio.js +3 -3
  490. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  491. package/dist-versioned/components/radio-button/radio-button.js +2 -2
  492. package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
  493. package/dist-versioned/components/radio-group/radio-group.js +5 -5
  494. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  495. package/dist-versioned/components/scrollable/scrollable.js +2 -2
  496. package/dist-versioned/components/select/select.d.ts +4 -4
  497. package/dist-versioned/components/select/select.js +5 -5
  498. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  499. package/dist-versioned/components/spinner/spinner.js +2 -2
  500. package/dist-versioned/components/step/step.d.ts +1 -1
  501. package/dist-versioned/components/step/step.js +2 -2
  502. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  503. package/dist-versioned/components/step-group/step-group.js +2 -2
  504. package/dist-versioned/components/switch/switch.d.ts +1 -1
  505. package/dist-versioned/components/switch/switch.js +2 -2
  506. package/dist-versioned/components/tab/tab.d.ts +1 -1
  507. package/dist-versioned/components/tab/tab.js +2 -2
  508. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  509. package/dist-versioned/components/tab-group/tab-group.js +2 -2
  510. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  511. package/dist-versioned/components/tab-panel/tab-panel.js +2 -2
  512. package/dist-versioned/components/tag/tag.d.ts +1 -1
  513. package/dist-versioned/components/tag/tag.js +2 -2
  514. package/dist-versioned/components/teaser/teaser.js +2 -2
  515. package/dist-versioned/components/teaser-media/teaser-media.js +2 -2
  516. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  517. package/dist-versioned/components/textarea/textarea.js +2 -2
  518. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  519. package/dist-versioned/components/tooltip/tooltip.js +3 -3
  520. package/dist-versioned/components/video/video.d.ts +1 -1
  521. package/dist-versioned/components/video/video.js +2 -2
  522. package/dist-versioned/custom-elements.json +202 -202
  523. package/dist-versioned/internal/form.js +3 -3
  524. package/dist-versioned/solid-components.css +2 -2
  525. package/dist-versioned/solid-components.js +52 -52
  526. package/dist-versioned/utilities/autocomplete-config.js +2 -2
  527. package/dist-versioned/vscode.html-custom-data.json +80 -80
  528. package/dist-versioned/web-types.json +137 -137
  529. package/package.json +18 -15
  530. package/cdn/chunks/chunk.INQ5A3RT.js +0 -1
  531. package/cdn-versioned/chunks/chunk.INQ5A3RT.js +0 -1
@@ -1 +1 @@
1
- import{a as Z}from"./chunks/chunk.CEVVDV52.js";import"./chunks/chunk.HAL7R4WT.js";import{a as y}from"./chunks/chunk.ADINOF7M.js";import{a as z}from"./chunks/chunk.YMD2XYIC.js";import{a as J}from"./chunks/chunk.HWHDT555.js";import{a as K}from"./chunks/chunk.WZC3XCIR.js";import{a as U}from"./chunks/chunk.AET67HPL.js";import{a as F}from"./chunks/chunk.NLBGFAEL.js";import{a as H}from"./chunks/chunk.FZOGKJ6K.js";import{a as L}from"./chunks/chunk.PDS5EJLY.js";import{a as Q}from"./chunks/chunk.EH4OGY33.js";import{a as V}from"./chunks/chunk.IDCOAEYV.js";import{a as j}from"./chunks/chunk.647JLNTI.js";import{a as q}from"./chunks/chunk.OYCPNRQV.js";import{a as R}from"./chunks/chunk.QKDYT7VV.js";import{a as M}from"./chunks/chunk.XHNPUCSF.js";import{a as v}from"./chunks/chunk.6BDCEAVF.js";import{a as O}from"./chunks/chunk.NHZ6UIWO.js";import{a as P}from"./chunks/chunk.A4G6Y76O.js";import{a as N}from"./chunks/chunk.M4RFSHFF.js";import{a as E}from"./chunks/chunk.U34WY52I.js";import{a as I}from"./chunks/chunk.ROPE253M.js";import{a as h}from"./chunks/chunk.PCWU4TKS.js";import{a as A}from"./chunks/chunk.BKAM7ZYV.js";import{a as B}from"./chunks/chunk.U7T4LLPE.js";import{a as D}from"./chunks/chunk.NZ5V2VSI.js";import{a as w}from"./chunks/chunk.3SSIAAEU.js";import{a as g}from"./chunks/chunk.5BMT34AY.js";import{a as k}from"./chunks/chunk.U7AQLAX6.js";import{a as C}from"./chunks/chunk.GU6YYER3.js";import{a as G}from"./chunks/chunk.V2TDTGPP.js";import{a as m}from"./chunks/chunk.PY4OL3TM.js";import"./chunks/chunk.5CK64GWQ.js";import{a as S}from"./chunks/chunk.Z5YG3CRT.js";import{a as n}from"./chunks/chunk.TU2SAF4G.js";import"./chunks/chunk.UH4KE6MR.js";import{a as i}from"./chunks/chunk.27P4XVMA.js";import{a as s}from"./chunks/chunk.INQ5A3RT.js";import"./chunks/chunk.D7TMPF3D.js";import"./chunks/chunk.X2GM34WQ.js";import"./chunks/chunk.W7A3TU2Z.js";import{a as c}from"./chunks/chunk.7VSDQRWQ.js";import{a as b}from"./chunks/chunk.HZ4OPRVF.js";import{a as T}from"./chunks/chunk.NSYOAWT4.js";import"./chunks/chunk.X2O263YD.js";import"./chunks/chunk.64UNKF45.js";import"./chunks/chunk.3L472FD4.js";import{a as d}from"./chunks/chunk.XODZQ2XV.js";import{a as f}from"./chunks/chunk.TNLTS4Y3.js";import{a as u}from"./chunks/chunk.MNUMMNDI.js";import{a as p}from"./chunks/chunk.BURIKJWK.js";import"./chunks/chunk.65NSSTJE.js";import"./chunks/chunk.HE2LNCWW.js";import"./chunks/chunk.WEAE6ZBM.js";import{a as x}from"./chunks/chunk.EY7SRDP7.js";import"./chunks/chunk.CBQWVOOS.js";import"./chunks/chunk.EUGX6XW6.js";import"./chunks/chunk.MHWW3RZB.js";import{a as l}from"./chunks/chunk.DLTYLPXF.js";import{a}from"./chunks/chunk.2CYKFWL2.js";import{a as e}from"./chunks/chunk.XYADX7DL.js";import"./chunks/chunk.A3DKF5BY.js";import"./chunks/chunk.5ZILM4TA.js";import{b as o}from"./chunks/chunk.3IPN77DT.js";import"./chunks/chunk.SPDB3L7V.js";import"./chunks/chunk.TWZDCIM2.js";import"./chunks/chunk.MWDEA25W.js";import{d as W,e as X}from"./chunks/chunk.5YRTJVAZ.js";import"./chunks/chunk.K7HF3VBZ.js";import"./chunks/chunk.EFLL7VXU.js";import"./chunks/chunk.RQYP7MH5.js";import"./chunks/chunk.KLRPP4NQ.js";import{a as t}from"./chunks/chunk.GCJNU5BB.js";import"./chunks/chunk.E2DRD2OX.js";import"./chunks/chunk.XR2KNB36.js";import{a as r}from"./chunks/chunk.JMR5LRM4.js";import"./chunks/chunk.6HO6CE4A.js";import{a as Y}from"./chunks/chunk.26YUWEYR.js";import"./chunks/chunk.LI5H3QYB.js";import"./chunks/chunk.TJ6RGDHH.js";import"./chunks/chunk.HJGLYEWV.js";import"./chunks/chunk.DCOFYPWX.js";import"./chunks/chunk.3BP4JKVA.js";import"./chunks/chunk.IRWHG2Q4.js";import"./chunks/chunk.WNP2V63C.js";import"./chunks/chunk.TJOCV4DC.js";export{Y as LocalizeController,e as SdAccordion,a as SdAccordionGroup,t as SdAnimation,r as SdAudio,d as SdBadge,f as SdBrandshape,u as SdButton,x as SdCarousel,l as SdCarouselItem,m as SdCheckbox,S as SdCheckboxGroup,n as SdCombobox,c as SdDialog,b as SdDivider,T as SdDrawer,g as SdDropdown,k as SdExpandable,C as SdFlipcard,G as SdHeader,o as SdIcon,I as SdInclude,h as SdInput,A as SdLink,B as SdMapMarker,D as SdNavigationItem,w as SdNotification,R as SdOptgroup,M as SdOption,s as SdPopup,v as SdQuickfact,N as SdRadio,O as SdRadioButton,P as SdRadioGroup,E as SdScrollable,F as SdSelect,p as SdSpinner,H as SdStep,L as SdStepGroup,Q as SdSwitch,V as SdTab,j as SdTabGroup,q as SdTabPanel,i as SdTag,y as SdTeaser,z as SdTeaserMedia,J as SdTextarea,K as SdTooltip,U as SdVideo,W as registerIconLibrary,Z as setupAutocomplete,X as unregisterIconLibrary};
1
+ import{a as Z}from"./chunks/chunk.CEVVDV52.js";import"./chunks/chunk.HAL7R4WT.js";import{a as y}from"./chunks/chunk.KHK74CJA.js";import{a as z}from"./chunks/chunk.C7B7IJTF.js";import{a as J}from"./chunks/chunk.FPDKP6PN.js";import{a as K}from"./chunks/chunk.3CMEDI5Q.js";import{a as U}from"./chunks/chunk.KT6CS7MB.js";import{a as F}from"./chunks/chunk.F3I2ZAJZ.js";import{a as H}from"./chunks/chunk.GI6GBMRK.js";import{a as L}from"./chunks/chunk.ENXPYC3I.js";import{a as Q}from"./chunks/chunk.RORUJY5E.js";import{a as V}from"./chunks/chunk.N7DREP3X.js";import{a as j}from"./chunks/chunk.UCPHLOPM.js";import{a as q}from"./chunks/chunk.XTSUFBWJ.js";import{a as R}from"./chunks/chunk.BSXRWVFJ.js";import{a as M}from"./chunks/chunk.ZAYOIELL.js";import{a as v}from"./chunks/chunk.OYVDI4G4.js";import{a as O}from"./chunks/chunk.L5LJFTUA.js";import{a as P}from"./chunks/chunk.5KCSOAA3.js";import{a as N}from"./chunks/chunk.37AKROZQ.js";import{a as E}from"./chunks/chunk.4LW22GLX.js";import{a as I}from"./chunks/chunk.2RKC4PX2.js";import{a as h}from"./chunks/chunk.RWS4N2NC.js";import{a as A}from"./chunks/chunk.VVLFNR53.js";import{a as B}from"./chunks/chunk.RNVF7IN5.js";import{a as D}from"./chunks/chunk.6BCGXAUV.js";import{a as w}from"./chunks/chunk.QK2P72CA.js";import{a as g}from"./chunks/chunk.VHSIUWDX.js";import{a as k}from"./chunks/chunk.FNE6AWAP.js";import{a as C}from"./chunks/chunk.MVMJOYL7.js";import{a as G}from"./chunks/chunk.O657MMFX.js";import{a as m}from"./chunks/chunk.FX3IWUZL.js";import"./chunks/chunk.5CK64GWQ.js";import{a as S}from"./chunks/chunk.VWVU4BWU.js";import{a as n}from"./chunks/chunk.ANSLHQOM.js";import"./chunks/chunk.UH4KE6MR.js";import{a as i}from"./chunks/chunk.6HMIEKMA.js";import{a as s}from"./chunks/chunk.MX2AOQKK.js";import"./chunks/chunk.D7TMPF3D.js";import"./chunks/chunk.X2GM34WQ.js";import"./chunks/chunk.W7A3TU2Z.js";import{a as b}from"./chunks/chunk.MD77BZE7.js";import{a as c}from"./chunks/chunk.NJPQO7AM.js";import{a as T}from"./chunks/chunk.SH5F4YM4.js";import"./chunks/chunk.X2O263YD.js";import"./chunks/chunk.64UNKF45.js";import"./chunks/chunk.3L472FD4.js";import{a as d}from"./chunks/chunk.YHWKY6MV.js";import{a as f}from"./chunks/chunk.I6KWEJL5.js";import{a as u}from"./chunks/chunk.TTAYTI3M.js";import{a as p}from"./chunks/chunk.JE65MGDL.js";import"./chunks/chunk.65NSSTJE.js";import"./chunks/chunk.HE2LNCWW.js";import"./chunks/chunk.AQYKEDSK.js";import{a as x}from"./chunks/chunk.LKHCEWG6.js";import"./chunks/chunk.CBQWVOOS.js";import"./chunks/chunk.EUGX6XW6.js";import"./chunks/chunk.MHWW3RZB.js";import{a as l}from"./chunks/chunk.WDX7NMBB.js";import{a}from"./chunks/chunk.OJILWIHU.js";import{a as e}from"./chunks/chunk.NCSRAXCO.js";import"./chunks/chunk.A3DKF5BY.js";import"./chunks/chunk.5ZILM4TA.js";import{b as o}from"./chunks/chunk.LFTAVPYP.js";import"./chunks/chunk.SPDB3L7V.js";import"./chunks/chunk.TWZDCIM2.js";import"./chunks/chunk.MWDEA25W.js";import{d as W,e as X}from"./chunks/chunk.5YRTJVAZ.js";import"./chunks/chunk.K7HF3VBZ.js";import"./chunks/chunk.EFLL7VXU.js";import"./chunks/chunk.RQYP7MH5.js";import"./chunks/chunk.KLRPP4NQ.js";import{a as t}from"./chunks/chunk.WRDPMPPA.js";import"./chunks/chunk.E2DRD2OX.js";import"./chunks/chunk.XR2KNB36.js";import{a as r}from"./chunks/chunk.2MKIKDQY.js";import"./chunks/chunk.6HO6CE4A.js";import{a as Y}from"./chunks/chunk.26YUWEYR.js";import"./chunks/chunk.LI5H3QYB.js";import"./chunks/chunk.TJ6RGDHH.js";import"./chunks/chunk.HJGLYEWV.js";import"./chunks/chunk.DCOFYPWX.js";import"./chunks/chunk.ERIS2E6E.js";import"./chunks/chunk.IRWHG2Q4.js";import"./chunks/chunk.WNP2V63C.js";import"./chunks/chunk.TJOCV4DC.js";export{Y as LocalizeController,e as SdAccordion,a as SdAccordionGroup,t as SdAnimation,r as SdAudio,d as SdBadge,f as SdBrandshape,u as SdButton,x as SdCarousel,l as SdCarouselItem,m as SdCheckbox,S as SdCheckboxGroup,n as SdCombobox,c as SdDialog,b as SdDivider,T as SdDrawer,g as SdDropdown,k as SdExpandable,C as SdFlipcard,G as SdHeader,o as SdIcon,I as SdInclude,h as SdInput,A as SdLink,B as SdMapMarker,D as SdNavigationItem,w as SdNotification,R as SdOptgroup,M as SdOption,s as SdPopup,v as SdQuickfact,N as SdRadio,O as SdRadioButton,P as SdRadioGroup,E as SdScrollable,F as SdSelect,p as SdSpinner,H as SdStep,L as SdStepGroup,Q as SdSwitch,V as SdTab,j as SdTabGroup,q as SdTabPanel,i as SdTag,y as SdTeaser,z as SdTeaserMedia,J as SdTextarea,K as SdTooltip,U as SdVideo,W as registerIconLibrary,Z as setupAutocomplete,X as unregisterIconLibrary};
@@ -1 +1 @@
1
- import{a}from"../chunks/chunk.CEVVDV52.js";import"../chunks/chunk.INQ5A3RT.js";import"../chunks/chunk.DCOFYPWX.js";import"../chunks/chunk.3BP4JKVA.js";import"../chunks/chunk.IRWHG2Q4.js";import"../chunks/chunk.TJOCV4DC.js";export{a as setupAutocomplete};
1
+ import{a}from"../chunks/chunk.CEVVDV52.js";import"../chunks/chunk.MX2AOQKK.js";import"../chunks/chunk.DCOFYPWX.js";import"../chunks/chunk.ERIS2E6E.js";import"../chunks/chunk.IRWHG2Q4.js";import"../chunks/chunk.TJOCV4DC.js";export{a as setupAutocomplete};
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@solid-design-system/components",
4
- "version": "4.0.0",
4
+ "version": "4.0.1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -32,7 +32,7 @@ let SdMenu = class SdMenu extends SolidElement {
32
32
  if (item.type === 'checkbox') {
33
33
  item.checked = !item.checked;
34
34
  }
35
- this.emit('sd-4-0-0-select', { detail: { item } });
35
+ this.emit('sd-4-0-1-select', { detail: { item } });
36
36
  }
37
37
  handleKeyDown(event) {
38
38
  if (event.key === 'Enter') {
@@ -11,7 +11,7 @@ export default css `
11
11
  overscroll-behavior: none;
12
12
  }
13
13
 
14
- ::slotted(sd-4-0-0-divider) {
14
+ ::slotted(sd-4-0-1-divider) {
15
15
  --spacing: var(--sd-spacing-x-small);
16
16
  }
17
17
  `;
@@ -74,7 +74,7 @@ let SdMenuItem = class SdMenuItem extends SolidElement {
74
74
  })}
75
75
  >
76
76
  <span part="checked-icon" class="menu-item__check">
77
- <sd-4-0-0-icon name="check" library="system" aria-hidden="true"></sd-4-0-0-icon>
77
+ <sd-4-0-1-icon name="check" library="system" aria-hidden="true"></sd-4-0-1-icon>
78
78
  </span>
79
79
 
80
80
  <slot name="prefix" part="prefix" class="menu-item__prefix"></slot>
@@ -84,7 +84,7 @@ let SdMenuItem = class SdMenuItem extends SolidElement {
84
84
  <slot name="suffix" part="suffix" class="menu-item__suffix"></slot>
85
85
 
86
86
  <span class="menu-item__chevron">
87
- <sd-4-0-0-icon name="chevron-right" library="system" aria-hidden="true"></sd-4-0-0-icon>
87
+ <sd-4-0-1-icon name="chevron-right" library="system" aria-hidden="true"></sd-4-0-1-icon>
88
88
  </span>
89
89
  </div>
90
90
  `;
@@ -1 +1 @@
1
- import{a as b}from"./chunk.6HO6CE4A.js";import{a as v}from"./chunk.26YUWEYR.js";import{a}from"./chunk.DCOFYPWX.js";import{a as f,b as l,c as d,d as h,h as p}from"./chunk.3BP4JKVA.js";import{b as m,e as s}from"./chunk.IRWHG2Q4.js";import{a as u}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends p{constructor(){super();this.localize=new v(this);this.hasSlotController=new b(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.progress=0;this.setAudioProgress=()=>{this.progressSlider.max=Math.floor(this.audioElement.duration).toString()};this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),this.audioElement.playbackRate=this.speed,this.animated&&this.initAnimation())}updated(e){if(e.has("animated")){let r=e.get("animated");!r&&this.animated?this.initAnimation():r&&!this.animated&&this.clear()}}get audioElement(){let e=this.shadowRoot.querySelector("slot");return(e==null?void 0:e.assignedElements().length)>0?e.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let e=this.audioElement.currentTime;this.currentTime=this.formatTime(e),this.progress=Math.floor(e),this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.setAudioProgress()}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.togglePlaybackSpeed())}formatTime(e){let r=Math.floor(e/60),o=Math.floor(e%60);return`${r}:${o<10?"0":""}${o}`}handleAudioProgress(){if(!this.audioElement)return;let e=Number(this.progressSlider.value);this.audioElement.currentTime=e,this.progress=e,this.currentTime=this.formatTime(e)}handleAudioProgressKeydown(e){e.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),e.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0}showTranscriptKeydown(e){(e.key==="Enter"||e.key===" ")&&this.showTranscript()}rgbToHex(e){let r=e.match(/\d+/g);if(r&&r.length===3){let o=parseInt(r[0]),n=parseInt(r[1]),g=parseInt(r[2]),c=y=>y.toString(16).padStart(2,"0");return`#${c(o)}${c(n)}${c(g)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let e=this.audioPlayerContainer.querySelector(".playback-speed"),o=window.getComputedStyle(e).color,n;this.inverted?n="#FFFFFF33":n=this.rgbToHex(o)+"33",this.waveList=[new u({canvas:this.canvas,color:n,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(e=>{e.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(e=>{e.redraw()}),await new Promise(e=>{setTimeout(e,1e3/30)}),await this.draw())}render(){let e=this.audioElement?this.progress/this.audioElement.duration*100:0,r=s`<div class="${a("controls grid grid-cols-3 justify-items-center items-center",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full",this.reversedLayout?"mt-2":"mb-2")}" part="audio-controls"><button class="${a("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")}" tabindex="0" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-4-0-0-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="text-3xl">${this.isPlaying?s`<slot name="pause-icon"><sd-4-0-0-icon class="text-3xl" name="pause" library="system"></sd-4-0-0-icon></slot>`:s`<slot name="play-icon"><sd-4-0-0-icon class="text-3xl" name="start" library="system"></sd-4-0-0-icon></slot>`}</sd-4-0-0-button><div class="flex items-center justify-self-end">${this.hasSlotController.test("transcript")?s`<button class="${a("mr-6 w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" tab-index="0"><sd-4-0-0-icon class="w-6 h-6" name="transcript" library="system" label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}"></sd-4-0-0-icon></button>`:null} <button class="${a("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.localize.term("mute")}" tabindex="0" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-4-0-0-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="system"></sd-4-0-0-icon></button></div></div>`,o=s`<div class="${a("w-full flex justify-between",this.reversedLayout?"mb-2":"mt-2",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 mb-2",this.animated&&!this.reversedLayout&&"mt-2")}" part="timestamps"><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.currentTime}</div><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.duration}</div></div>`;return s`<div class="${a("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?r:null}<div class="relative">${this.animated&&!this.reversedLayout?s`${r}`:null} ${this.animated?s`<canvas class="w-full h-16"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?o:null} <input class="${a("progress-slider bg-primary appearance-none w-full cursor-pointer outline-none h-1 flex items-center sd-interactive",this.inverted&&"sd-interactive--inverted")}" type="range" max="100" step="0.001" value="${this.progress}" tabindex="0" @input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}" part="progress-slider" style="background:linear-gradient(to right,${this.inverted?"rgb(var(--sd-color-white, 255 255 255) / 1)":"rgb(var(--sd-color-primary, 0 53 142) / 1)"} ${e}%,${this.animated?"transparent":this.inverted?"rgb(var(--sd-color-primary-400, 153 171 208) / 1)":"rgb(var(--sd-color-grey-400, 195 195 195) / 1)"} ${e}%)"></div>${this.hasSlotController.test("transcript")?s`<sd-4-0-0-drawer><slot name="transcript"></slot></sd-4-0-0-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?o:null}</div>`}};t.styles=[...p.styles,m`.progress-slider:focus-visible{outline:2px solid transparent;outline-offset:2px}.progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-webkit-slider-thumb{outline-offset:2px;outline-style:solid}.progress-slider::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-moz-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-moz-range-thumb{outline-offset:2px;outline-style:solid}sd-4-0-0-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-16,4rem);justify-content:center;width:var(--sd-spacing-16,4rem)}sd-4-0-0-button::part(label){align-items:center;display:flex;flex-grow:0}`],i([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),i([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],t.prototype,"hideTimestamps",2),i([l({type:Boolean,reflect:!0})],t.prototype,"animated",2),i([l({type:Boolean,reflect:!0})],t.prototype,"inverted",2),i([l({type:Number})],t.prototype,"speed",2),i([d()],t.prototype,"currentTime",2),i([d()],t.prototype,"duration",2),i([d()],t.prototype,"isPlaying",2),i([d()],t.prototype,"isMuted",2),i([d()],t.prototype,"progress",2),i([h('[part="progress-slider"]')],t.prototype,"progressSlider",2),i([h('[part="audio-player"]')],t.prototype,"audioPlayerContainer",2),i([h("sd-4-0-0-drawer")],t.prototype,"drawer",2),i([h("canvas")],t.prototype,"canvas",2),t=i([f("sd-4-0-0-audio")],t);export{t as a};
1
+ import{a as b}from"./chunk.6HO6CE4A.js";import{a as v}from"./chunk.26YUWEYR.js";import{a}from"./chunk.DCOFYPWX.js";import{a as f,b as l,c as d,d as h,h as p}from"./chunk.ERIS2E6E.js";import{b as m,e as s}from"./chunk.IRWHG2Q4.js";import{a as u}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends p{constructor(){super();this.localize=new v(this);this.hasSlotController=new b(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.progress=0;this.setAudioProgress=()=>{this.progressSlider.max=Math.floor(this.audioElement.duration).toString()};this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),this.audioElement.playbackRate=this.speed,this.animated&&this.initAnimation())}updated(e){if(e.has("animated")){let r=e.get("animated");!r&&this.animated?this.initAnimation():r&&!this.animated&&this.clear()}}get audioElement(){let e=this.shadowRoot.querySelector("slot");return(e==null?void 0:e.assignedElements().length)>0?e.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let e=this.audioElement.currentTime;this.currentTime=this.formatTime(e),this.progress=Math.floor(e),this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.setAudioProgress()}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.togglePlaybackSpeed())}formatTime(e){let r=Math.floor(e/60),o=Math.floor(e%60);return`${r}:${o<10?"0":""}${o}`}handleAudioProgress(){if(!this.audioElement)return;let e=Number(this.progressSlider.value);this.audioElement.currentTime=e,this.progress=e,this.currentTime=this.formatTime(e)}handleAudioProgressKeydown(e){e.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),e.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0}showTranscriptKeydown(e){(e.key==="Enter"||e.key===" ")&&this.showTranscript()}rgbToHex(e){let r=e.match(/\d+/g);if(r&&r.length===3){let o=parseInt(r[0]),n=parseInt(r[1]),g=parseInt(r[2]),c=y=>y.toString(16).padStart(2,"0");return`#${c(o)}${c(n)}${c(g)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let e=this.audioPlayerContainer.querySelector(".playback-speed"),o=window.getComputedStyle(e).color,n;this.inverted?n="#FFFFFF33":n=this.rgbToHex(o)+"33",this.waveList=[new u({canvas:this.canvas,color:n,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(e=>{e.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(e=>{e.redraw()}),await new Promise(e=>{setTimeout(e,1e3/30)}),await this.draw())}render(){let e=this.audioElement?this.progress/this.audioElement.duration*100:0,r=s`<div class="${a("controls grid grid-cols-3 justify-items-center items-center",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full",this.reversedLayout?"mt-2":"mb-2")}" part="audio-controls"><button class="${a("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")}" tabindex="0" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-4-0-1-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="text-3xl">${this.isPlaying?s`<slot name="pause-icon"><sd-4-0-1-icon class="text-3xl" name="pause" library="system"></sd-4-0-1-icon></slot>`:s`<slot name="play-icon"><sd-4-0-1-icon class="text-3xl" name="start" library="system"></sd-4-0-1-icon></slot>`}</sd-4-0-1-button><div class="flex items-center justify-self-end">${this.hasSlotController.test("transcript")?s`<button class="${a("mr-6 w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" tab-index="0"><sd-4-0-1-icon class="w-6 h-6" name="transcript" library="system" label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}"></sd-4-0-1-icon></button>`:null} <button class="${a("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.localize.term("mute")}" tabindex="0" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-4-0-1-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="system"></sd-4-0-1-icon></button></div></div>`,o=s`<div class="${a("w-full flex justify-between",this.reversedLayout?"mb-2":"mt-2",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 mb-2",this.animated&&!this.reversedLayout&&"mt-2")}" part="timestamps"><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.currentTime}</div><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.duration}</div></div>`;return s`<div class="${a("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?r:null}<div class="relative">${this.animated&&!this.reversedLayout?s`${r}`:null} ${this.animated?s`<canvas class="w-full h-16"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?o:null} <input class="${a("progress-slider bg-primary appearance-none w-full cursor-pointer outline-none h-1 flex items-center sd-interactive",this.inverted&&"sd-interactive--inverted")}" type="range" max="100" step="0.001" value="${this.progress}" tabindex="0" @input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}" part="progress-slider" style="background:linear-gradient(to right,${this.inverted?"rgb(var(--sd-color-white, 255 255 255) / 1)":"rgb(var(--sd-color-primary, 0 53 142) / 1)"} ${e}%,${this.animated?"transparent":this.inverted?"rgb(var(--sd-color-primary-400, 153 171 208) / 1)":"rgb(var(--sd-color-grey-400, 195 195 195) / 1)"} ${e}%)"></div>${this.hasSlotController.test("transcript")?s`<sd-4-0-1-drawer><slot name="transcript"></slot></sd-4-0-1-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?o:null}</div>`}};t.styles=[...p.styles,m`.progress-slider:focus-visible{outline:2px solid transparent;outline-offset:2px}.progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-webkit-slider-thumb{outline-offset:2px;outline-style:solid}.progress-slider::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-moz-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-moz-range-thumb{outline-offset:2px;outline-style:solid}sd-4-0-1-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-16,4rem);justify-content:center;width:var(--sd-spacing-16,4rem)}sd-4-0-1-button::part(label){align-items:center;display:flex;flex-grow:0}`],i([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),i([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],t.prototype,"hideTimestamps",2),i([l({type:Boolean,reflect:!0})],t.prototype,"animated",2),i([l({type:Boolean,reflect:!0})],t.prototype,"inverted",2),i([l({type:Number})],t.prototype,"speed",2),i([d()],t.prototype,"currentTime",2),i([d()],t.prototype,"duration",2),i([d()],t.prototype,"isPlaying",2),i([d()],t.prototype,"isMuted",2),i([d()],t.prototype,"progress",2),i([h('[part="progress-slider"]')],t.prototype,"progressSlider",2),i([h('[part="audio-player"]')],t.prototype,"audioPlayerContainer",2),i([h("sd-4-0-1-drawer")],t.prototype,"drawer",2),i([h("canvas")],t.prototype,"canvas",2),t=i([f("sd-4-0-1-audio")],t);export{t as a};
@@ -1 +1 @@
1
- import{a as n}from"./chunk.MWDEA25W.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as m,b as o,h as a}from"./chunk.3BP4JKVA.js";import{b as l,e as c}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var t=class extends a{constructor(){super(...arguments);this.mode="cors";this.allowScripts=!1}executeScript(e){let r=document.createElement("script");[...e.attributes].forEach(i=>r.setAttribute(i.name,i.value)),r.textContent=e.textContent,e.parentNode.replaceChild(r,e)}async handleSrcChange(){try{let e=this.src,r=await n(e,this.mode);if(e!==this.src)return;if(!r.ok){this.emit("sd-error",{detail:{status:r.status}});return}this.innerHTML=r.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(i=>this.executeScript(i)),this.emit("sd-load")}catch(e){this.emit("sd-error",{detail:{status:-1}})}}render(){return c`<slot></slot>`}};t.styles=[...a.styles,l`:host{display:block}`],s([o()],t.prototype,"src",2),s([o()],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([m("sd-4-0-0-include")],t);export{t as a};
1
+ import{a as n}from"./chunk.MWDEA25W.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as m,b as o,h as a}from"./chunk.ERIS2E6E.js";import{b as l,e as c}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var t=class extends a{constructor(){super(...arguments);this.mode="cors";this.allowScripts=!1}executeScript(e){let r=document.createElement("script");[...e.attributes].forEach(i=>r.setAttribute(i.name,i.value)),r.textContent=e.textContent,e.parentNode.replaceChild(r,e)}async handleSrcChange(){try{let e=this.src,r=await n(e,this.mode);if(e!==this.src)return;if(!r.ok){this.emit("sd-error",{detail:{status:r.status}});return}this.innerHTML=r.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(i=>this.executeScript(i)),this.emit("sd-load")}catch(e){this.emit("sd-error",{detail:{status:-1}})}}render(){return c`<slot></slot>`}};t.styles=[...a.styles,l`:host{display:block}`],s([o()],t.prototype,"src",2),s([o()],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([m("sd-4-0-1-include")],t);export{t as a};
@@ -1 +1 @@
1
- import{a}from"./chunk.E2DRD2OX.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as o,b as s,c as l,h as n}from"./chunk.3BP4JKVA.js";import{b as h,e as i}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!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.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?"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 i`<span part="base" class="${r("sd-4-0-0-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",this.disabled&&"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="${r("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4",this.disabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}">${this.checked?i`<span part="checked" class="${r("rounded-full inline-flex text-white border bg-accent h-2.5 w-2.5",this.disabled?"bg-neutral-500":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span>`:""}</span><slot part="label" class="${r("ml-2 select-none inline-block",this.disabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};e.styles=[...n.styles,h`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],t([l()],e.prototype,"checked",2),t([l()],e.prototype,"hasFocus",2),t([s({reflect:!0})],e.prototype,"size",2),t([s({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([s()],e.prototype,"value",2),t([s({type:Boolean,reflect:!0})],e.prototype,"invalid",2),t([a("checked")],e.prototype,"handleCheckedChange",1),t([a("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([o("sd-4-0-0-radio")],e);export{e as a};
1
+ import{a}from"./chunk.E2DRD2OX.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as o,b as s,c as l,h as n}from"./chunk.ERIS2E6E.js";import{b as h,e as i}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends n{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!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.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?"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 i`<span part="base" class="${r("sd-4-0-1-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",this.disabled&&"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="${r("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4",this.disabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}">${this.checked?i`<span part="checked" class="${r("rounded-full inline-flex text-white border bg-accent h-2.5 w-2.5",this.disabled?"bg-neutral-500":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span>`:""}</span><slot part="label" class="${r("ml-2 select-none inline-block",this.disabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};e.styles=[...n.styles,h`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],t([l()],e.prototype,"checked",2),t([l()],e.prototype,"hasFocus",2),t([s({reflect:!0})],e.prototype,"size",2),t([s({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([s()],e.prototype,"value",2),t([s({type:Boolean,reflect:!0})],e.prototype,"invalid",2),t([a("checked")],e.prototype,"handleCheckedChange",1),t([a("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([o("sd-4-0-1-radio")],e);export{e as a};
@@ -1,4 +1,4 @@
1
- import{a as u,c}from"./chunk.A3DKF5BY.js";import{a as p,b as d,d as l}from"./chunk.RQYP7MH5.js";import{a as m}from"./chunk.KLRPP4NQ.js";import{a as r}from"./chunk.E2DRD2OX.js";import{a as g}from"./chunk.26YUWEYR.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as v,b as i,d as a,h}from"./chunk.3BP4JKVA.js";import{b as f,e as w}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends h{constructor(){super(...arguments);this.isFocusTriggered=!1;this.localize=new g(this);this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut)}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){if(this.hasTrigger("click")){if(this.isFocusTriggered){this.isFocusTriggered=!1;return}this.open?this.hide():this.show()}}handleFocus(){this.hasTrigger("focus")&&(this.isFocusTriggered=!0,this.show())}handleKeyDown(s){this.open&&s.key==="Escape"&&(s.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let s=d(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),s)}}handleMouseOut(){if(this.hasTrigger("hover")){let s=d(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),s)}}hasTrigger(s){return this.trigger.split(" ").includes(s)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await l(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:s,options:o}=c(this,"tooltip.show",{dir:this.localize.dir()});await p(this.popup.popup,s,o),this.emit("sd-after-show")}else{this.emit("sd-hide"),await l(this.body);let{keyframes:s,options:o}=c(this,"tooltip.hide",{dir:this.localize.dir()});await p(this.popup.popup,s,o),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,m(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,m(this,"sd-after-hide")}render(){let s=this.placement.endsWith("-start"),o=this.placement.endsWith("-end");return w`<sd-4-0-0-popup part="base" exportparts="
1
+ import{a as u,c}from"./chunk.A3DKF5BY.js";import{a as p,b as d,d as l}from"./chunk.RQYP7MH5.js";import{a as m}from"./chunk.KLRPP4NQ.js";import{a as r}from"./chunk.E2DRD2OX.js";import{a as g}from"./chunk.26YUWEYR.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as v,b as i,d as a,h}from"./chunk.ERIS2E6E.js";import{b as f,e as w}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends h{constructor(){super(...arguments);this.isFocusTriggered=!1;this.localize=new g(this);this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut)}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){if(this.hasTrigger("click")){if(this.isFocusTriggered){this.isFocusTriggered=!1;return}this.open?this.hide():this.show()}}handleFocus(){this.hasTrigger("focus")&&(this.isFocusTriggered=!0,this.show())}handleKeyDown(s){this.open&&s.key==="Escape"&&(s.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let s=d(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),s)}}handleMouseOut(){if(this.hasTrigger("hover")){let s=d(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),s)}}hasTrigger(s){return this.trigger.split(" ").includes(s)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await l(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:s,options:o}=c(this,"tooltip.show",{dir:this.localize.dir()});await p(this.popup.popup,s,o),this.emit("sd-after-show")}else{this.emit("sd-hide"),await l(this.body);let{keyframes:s,options:o}=c(this,"tooltip.hide",{dir:this.localize.dir()});await p(this.popup.popup,s,o),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,m(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,m(this,"sd-after-hide")}render(){let s=this.placement.endsWith("-start"),o=this.placement.endsWith("-end");return w`<sd-4-0-1-popup part="base" exportparts="
2
2
  popup:base__popup,
3
3
  arrow:base__arrow
4
- " class="${n(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[s?"start":o?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0"><slot slot="anchor" aria-describedby="tooltip" class="${n(this.size==="lg"?"text-xl":"text-base")}"><button class="flex sd-interactive rounded-full"><sd-4-0-0-icon library="system" name="info-circle" class="${n(this.disabled&&"sd-interactive--disabled")}"></sd-4-0-0-icon></button></slot><slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="Tooltip" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-4-0-0-popup>`}};e.styles=[...h.styles,f`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-4-0-0-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-4-0-0-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-4-0-0-popup::part(arrow){--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-4-0-0-popup[placement^=top]::part(popup){transform-origin:bottom}sd-4-0-0-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],t([a("slot:not([name])")],e.prototype,"defaultSlot",2),t([a("#tooltip")],e.prototype,"body",2),t([a("sd-4-0-0-popup")],e.prototype,"popup",2),t([i()],e.prototype,"size",2),t([i()],e.prototype,"content",2),t([i({reflect:!0})],e.prototype,"placement",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"open",2),t([i()],e.prototype,"trigger",2),t([i({type:Boolean})],e.prototype,"hoist",2),t([r("open",{waitUntilFirstUpdate:!0})],e.prototype,"handleOpenChange",1),t([r(["content","hoist","placement"])],e.prototype,"handleOptionsChange",1),t([r("disabled")],e.prototype,"handleDisabledChange",1),e=t([v("sd-4-0-0-tooltip")],e);u("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}});u("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});export{e as a};
4
+ " class="${n(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[s?"start":o?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0"><slot slot="anchor" aria-describedby="tooltip" class="${n(this.size==="lg"?"text-xl":"text-base")}"><button class="flex sd-interactive rounded-full"><sd-4-0-1-icon library="system" name="info-circle" class="${n(this.disabled&&"sd-interactive--disabled")}"></sd-4-0-1-icon></button></slot><slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="Tooltip" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-4-0-1-popup>`}};e.styles=[...h.styles,f`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-4-0-1-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-4-0-1-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-4-0-1-popup::part(arrow){--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-4-0-1-popup[placement^=top]::part(popup){transform-origin:bottom}sd-4-0-1-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],t([a("slot:not([name])")],e.prototype,"defaultSlot",2),t([a("#tooltip")],e.prototype,"body",2),t([a("sd-4-0-1-popup")],e.prototype,"popup",2),t([i()],e.prototype,"size",2),t([i()],e.prototype,"content",2),t([i({reflect:!0})],e.prototype,"placement",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"open",2),t([i()],e.prototype,"trigger",2),t([i({type:Boolean})],e.prototype,"hoist",2),t([r("open",{waitUntilFirstUpdate:!0})],e.prototype,"handleOpenChange",1),t([r(["content","hoist","placement"])],e.prototype,"handleOptionsChange",1),t([r("disabled")],e.prototype,"handleDisabledChange",1),e=t([v("sd-4-0-1-tooltip")],e);u("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}});u("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});export{e as a};
@@ -1 +1 @@
1
- import{a as m}from"./chunk.26YUWEYR.js";import{a as d}from"./chunk.DCOFYPWX.js";import{a as g,b as n,c as u,h as f}from"./chunk.3BP4JKVA.js";import{b as v,e as l}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var e=class extends f{constructor(){super(...arguments);this.localize=new m(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1;this.isKeyboardNavigation=!1;this.scrollContainer=null}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollIndicatorVisibility()}),this.updateComplete.then(()=>{this.scrollContainer=this.renderRoot.querySelector(".scroll-container"),this.scrollContainer&&this.resizeObserver.observe(this.scrollContainer)})}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer&&this.resizeObserver.unobserve(this.scrollContainer)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.updateScrollIndicatorVisibility())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get container(){return this.renderRoot.querySelector(".scroll-container")}updateScrollIndicatorVisibility(){let t=this.container;if(!t)return;let r=this.isScrollHorizontalEnabled&&t.scrollLeft>0,o=this.isScrollHorizontalEnabled&&t.scrollLeft+t.clientWidth<t.scrollWidth-1,h=this.isScrollVerticalEnabled&&t.scrollTop>0,a=this.isScrollVerticalEnabled&&t.scrollTop+t.clientHeight<t.scrollHeight-1,c=this.renderRoot.querySelector('[part="button-start"]'),i=this.renderRoot.querySelector('[part="button-end"]');this.canScroll={left:this.isKeyboardNavigation?this.isScrollHorizontalEnabled:r,right:this.isKeyboardNavigation?this.isScrollHorizontalEnabled:o,up:this.isKeyboardNavigation?this.isScrollVerticalEnabled:h,down:this.isKeyboardNavigation?this.isScrollVerticalEnabled:a};let b=r||h,p=o||a;b&&this.dispatchEvent(new CustomEvent("start")),p&&this.dispatchEvent(new CustomEvent("end")),this.isKeyboardNavigation&&(c&&(c.hidden=!b),c&&b&&!(a||o)&&c.focus(),i&&(i.hidden=!p),i&&p&&!(h||r)&&i.focus())}handleScroll(t,r){var i;let o=t==="left"||t==="up"?-this.step:this.step,h=t==="left"||t==="right"?"left":"top";this.isKeyboardNavigation=(r==null?void 0:r.pointerType)!=="mouse";let a={behavior:"smooth"};a[h]=o,(i=this.scrollContainer)==null||i.scrollBy(a);let c=`button-${t}`;this.dispatchEvent(new CustomEvent(c,{bubbles:!0,composed:!0}))}render(){let t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",r="scroll-shadow absolute z-10 pointer-events-none";return l`<div part="base" class="${d("scroll-container flex overflow-hidden flex-1",this.orientation==="horizontal"&&"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden",this.orientation==="vertical"&&"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden",this.orientation==="auto"&&"scroll-auto overflow-auto",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset?"p-4":"")}" @scroll="${this.updateScrollIndicatorVisibility}" tabindex="0"><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?l`${this.isScrollHorizontalEnabled?l`${this.canScroll.left?l`<div part="button-left" class="absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8"><button part="button-start" class="${d(t)}" @click="${o=>this.handleScroll("left",o)}"><slot name="icon-start"><sd-4-0-0-icon library="system" name="chevron-up" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-4-0-0-icon></slot></button></div>`:null} ${this.canScroll.right?l`<div part="button-right" class="absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8"><button part="button-end" class="${d(t)}" @click="${o=>this.handleScroll("right",o)}"><slot name="icon-end"><sd-4-0-0-icon library="system" name="chevron-down" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-4-0-0-icon></slot></button></div>`:null}`:null} ${this.isScrollVerticalEnabled?l`${this.canScroll.up?l`<div part="button-top" class="absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8"><button part="button-start" class="${d(t)}" @click="${o=>this.handleScroll("up",o)}"><slot name="icon-start"><sd-4-0-0-icon library="system" name="chevron-up" label="${this.localize.term("scrollToStart")}"></sd-4-0-0-icon></slot></button></div>`:null} ${this.canScroll.down?l`<div part="button-bottom" class="absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8"><button part="button-end" class="${d(t)}" @click="${o=>this.handleScroll("down",o)}"><slot name="icon-end"><sd-4-0-0-icon library="system" name="chevron-down" label="${this.localize.term("scrollToEnd")}"></sd-4-0-0-icon></slot></button></div>`:null}`:null}`:null} ${this.shadows?l`${this.isScrollHorizontalEnabled?l`${this.canScroll.left?l`<div part="shadow-left" class="${r} left top-0 left-0 w-[6px] h-full"></div>`:null} ${this.canScroll.right?l`<div part="shadow-right" class="${r} right top-0 right-0 w-[6px] h-full"></div>`:null}`:null} ${this.isScrollVerticalEnabled?l`${this.canScroll.up?l`<div part="shadow-top" class="${r} top top-0 left-0 w-full h-[6px]"></div>`:null} ${this.canScroll.down?l`<div part="shadow-bottom" class="${r} bottom bottom-0 left-0 w-full h-[6px]"></div>`:null}`:null}`:null}`}};e.styles=[...f.styles,v`:host{--gradient-color:hsla(0,0%,100%,0);--gradient:var(--gradient-color) 0%,#fff 80%,#fff 100%;display:flex;overflow:hidden;position:relative}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-border-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-right]{background:linear-gradient(90deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-top]{background:linear-gradient(0deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-bottom]{background:linear-gradient(180deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}.sd-4-0-0-icon--top{align-self:flex-start}.sd-4-0-0-icon--down{align-self:flex-end}`],s([n({type:String,reflect:!0})],e.prototype,"orientation",2),s([n({type:Boolean,reflect:!0})],e.prototype,"scrollbars",2),s([n({type:Boolean,reflect:!0})],e.prototype,"buttons",2),s([n({type:Boolean,reflect:!0})],e.prototype,"shadows",2),s([n({type:Boolean,reflect:!0})],e.prototype,"inset",2),s([n({type:Number,reflect:!0})],e.prototype,"step",2),s([u()],e.prototype,"canScroll",2),s([u()],e.prototype,"isScrollHorizontalEnabled",2),s([u()],e.prototype,"isScrollVerticalEnabled",2),s([u()],e.prototype,"isKeyboardNavigation",2),e=s([g("sd-4-0-0-scrollable")],e);export{e as a};
1
+ import{a as m}from"./chunk.26YUWEYR.js";import{a as d}from"./chunk.DCOFYPWX.js";import{a as g,b as n,c as u,h as f}from"./chunk.ERIS2E6E.js";import{b as v,e as l}from"./chunk.IRWHG2Q4.js";import{e as s}from"./chunk.TJOCV4DC.js";var e=class extends f{constructor(){super(...arguments);this.localize=new m(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1;this.isKeyboardNavigation=!1;this.scrollContainer=null}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollIndicatorVisibility()}),this.updateComplete.then(()=>{this.scrollContainer=this.renderRoot.querySelector(".scroll-container"),this.scrollContainer&&this.resizeObserver.observe(this.scrollContainer)})}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer&&this.resizeObserver.unobserve(this.scrollContainer)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.updateScrollIndicatorVisibility())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get container(){return this.renderRoot.querySelector(".scroll-container")}updateScrollIndicatorVisibility(){let t=this.container;if(!t)return;let r=this.isScrollHorizontalEnabled&&t.scrollLeft>0,o=this.isScrollHorizontalEnabled&&t.scrollLeft+t.clientWidth<t.scrollWidth-1,h=this.isScrollVerticalEnabled&&t.scrollTop>0,a=this.isScrollVerticalEnabled&&t.scrollTop+t.clientHeight<t.scrollHeight-1,c=this.renderRoot.querySelector('[part="button-start"]'),i=this.renderRoot.querySelector('[part="button-end"]');this.canScroll={left:this.isKeyboardNavigation?this.isScrollHorizontalEnabled:r,right:this.isKeyboardNavigation?this.isScrollHorizontalEnabled:o,up:this.isKeyboardNavigation?this.isScrollVerticalEnabled:h,down:this.isKeyboardNavigation?this.isScrollVerticalEnabled:a};let b=r||h,p=o||a;b&&this.dispatchEvent(new CustomEvent("start")),p&&this.dispatchEvent(new CustomEvent("end")),this.isKeyboardNavigation&&(c&&(c.hidden=!b),c&&b&&!(a||o)&&c.focus(),i&&(i.hidden=!p),i&&p&&!(h||r)&&i.focus())}handleScroll(t,r){var i;let o=t==="left"||t==="up"?-this.step:this.step,h=t==="left"||t==="right"?"left":"top";this.isKeyboardNavigation=(r==null?void 0:r.pointerType)!=="mouse";let a={behavior:"smooth"};a[h]=o,(i=this.scrollContainer)==null||i.scrollBy(a);let c=`button-${t}`;this.dispatchEvent(new CustomEvent(c,{bubbles:!0,composed:!0}))}render(){let t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",r="scroll-shadow absolute z-10 pointer-events-none";return l`<div part="base" class="${d("scroll-container flex overflow-hidden flex-1",this.orientation==="horizontal"&&"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden",this.orientation==="vertical"&&"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden",this.orientation==="auto"&&"scroll-auto overflow-auto",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset?"p-4":"")}" @scroll="${this.updateScrollIndicatorVisibility}" tabindex="0"><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?l`${this.isScrollHorizontalEnabled?l`${this.canScroll.left?l`<div part="button-left" class="absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8"><button part="button-start" class="${d(t)}" @click="${o=>this.handleScroll("left",o)}"><slot name="icon-start"><sd-4-0-1-icon library="system" name="chevron-up" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-4-0-1-icon></slot></button></div>`:null} ${this.canScroll.right?l`<div part="button-right" class="absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8"><button part="button-end" class="${d(t)}" @click="${o=>this.handleScroll("right",o)}"><slot name="icon-end"><sd-4-0-1-icon library="system" name="chevron-down" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-4-0-1-icon></slot></button></div>`:null}`:null} ${this.isScrollVerticalEnabled?l`${this.canScroll.up?l`<div part="button-top" class="absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8"><button part="button-start" class="${d(t)}" @click="${o=>this.handleScroll("up",o)}"><slot name="icon-start"><sd-4-0-1-icon library="system" name="chevron-up" label="${this.localize.term("scrollToStart")}"></sd-4-0-1-icon></slot></button></div>`:null} ${this.canScroll.down?l`<div part="button-bottom" class="absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8"><button part="button-end" class="${d(t)}" @click="${o=>this.handleScroll("down",o)}"><slot name="icon-end"><sd-4-0-1-icon library="system" name="chevron-down" label="${this.localize.term("scrollToEnd")}"></sd-4-0-1-icon></slot></button></div>`:null}`:null}`:null} ${this.shadows?l`${this.isScrollHorizontalEnabled?l`${this.canScroll.left?l`<div part="shadow-left" class="${r} left top-0 left-0 w-[6px] h-full"></div>`:null} ${this.canScroll.right?l`<div part="shadow-right" class="${r} right top-0 right-0 w-[6px] h-full"></div>`:null}`:null} ${this.isScrollVerticalEnabled?l`${this.canScroll.up?l`<div part="shadow-top" class="${r} top top-0 left-0 w-full h-[6px]"></div>`:null} ${this.canScroll.down?l`<div part="shadow-bottom" class="${r} bottom bottom-0 left-0 w-full h-[6px]"></div>`:null}`:null}`:null}`}};e.styles=[...f.styles,v`:host{--gradient-color:hsla(0,0%,100%,0);--gradient:var(--gradient-color) 0%,#fff 80%,#fff 100%;display:flex;overflow:hidden;position:relative}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-border-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-right]{background:linear-gradient(90deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-top]{background:linear-gradient(0deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-bottom]{background:linear-gradient(180deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}.sd-4-0-1-icon--top{align-self:flex-start}.sd-4-0-1-icon--down{align-self:flex-end}`],s([n({type:String,reflect:!0})],e.prototype,"orientation",2),s([n({type:Boolean,reflect:!0})],e.prototype,"scrollbars",2),s([n({type:Boolean,reflect:!0})],e.prototype,"buttons",2),s([n({type:Boolean,reflect:!0})],e.prototype,"shadows",2),s([n({type:Boolean,reflect:!0})],e.prototype,"inset",2),s([n({type:Number,reflect:!0})],e.prototype,"step",2),s([u()],e.prototype,"canScroll",2),s([u()],e.prototype,"isScrollHorizontalEnabled",2),s([u()],e.prototype,"isScrollVerticalEnabled",2),s([u()],e.prototype,"isKeyboardNavigation",2),e=s([g("sd-4-0-1-scrollable")],e);export{e as a};
@@ -1 +1 @@
1
- import{a as w}from"./chunk.M4RFSHFF.js";import{b as C,c as E,d as V,e as k}from"./chunk.65NSSTJE.js";import{a as M}from"./chunk.WEAE6ZBM.js";import{a as m}from"./chunk.E2DRD2OX.js";import{a as b}from"./chunk.6HO6CE4A.js";import{a as f}from"./chunk.DCOFYPWX.js";import{a as y,b as n,c as u,d as c,h as p}from"./chunk.3BP4JKVA.js";import{b as g,e as h}from"./chunk.IRWHG2Q4.js";import{e as o}from"./chunk.TJOCV4DC.js";var i=class extends p{constructor(){super(...arguments);this.formControlController=new C(this);this.hasSlotController=new b(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.boldLabel=!1;this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?k:t?V:E}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-4-0-0-radio, sd-4-0-0-radio-button")]}handleRadioClick(t){let e=t.target.closest("sd-4-0-0-radio, sd-4-0-0-radio-button"),a=this.getAllRadios(),s=this.value;e.disabled||(this.value=e.value,a.forEach(d=>d.checked=d===e),this.value!==s&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){var v;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(r=>!r.disabled),a=(v=e.find(r=>r.checked))!=null?v:e[0],s=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,d=this.value,l=e.indexOf(a)+s;l<0&&(l=e.length-1),l>e.length-1&&(l=0),this.getAllRadios().forEach(r=>{r.checked=!1,this.hasButtonGroup||(r.tabIndex=-1)}),this.value=e[l].value,e[l].checked=!0,this.hasButtonGroup?e[l].shadowRoot.querySelector("button").focus():(e[l].tabIndex=0,e[l].focus()),this.value!==d&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios(),a=t.find(s=>s.checked)||t[0];a&&a.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var e,a;let t=this.getAllRadios();if(await Promise.all(t.map(async s=>{await s.updateComplete,s.checked=s.value===this.value,s.size=this.size,s instanceof w&&(s.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(s=>s.tagName.toLowerCase()==="sd-4-0-0-radio-button"),!t.some(s=>s.checked))if(this.hasButtonGroup){let s=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");s&&(s.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let s=(a=this.shadowRoot)==null?void 0:a.querySelector("sd-4-0-0-button-group");s&&(s.disableRole=!0)}}syncRadios(){if(customElements.get("sd-4-0-0-radio")&&customElements.get("sd-4-0-0-radio-button")){this.syncRadioElements();return}customElements.get("sd-4-0-0-radio")?this.syncRadioElements():customElements.whenDefined("sd-4-0-0-radio").then(()=>this.syncRadios()),customElements.get("sd-4-0-0-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-4-0-0-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:!!t,a=h`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return h`<fieldset part="form-control" class="${f("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="radiogroup" aria-describedby="invalid-message"><div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${f("p-0 leading-normal text-black text-left",!e&&"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend><slot name="tooltip"></slot></div><div part="form-control-input" class="${f("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?h`<sd-4-0-0-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${a}</sd-4-0-0-button-group>`:a}</div></fieldset>${this.formControlController.renderInvalidMessage()}`}};i.dependencies={"sd-4-0-0-button-group":M},i.styles=[...p.styles,g`:host{display:block}:host([orientation=vertical]) ::slotted(sd-4-0-0-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-4-0-0-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-4-0-0-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-4-0-0-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-4-0-0-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-4-0-0-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}`],o([c("slot:not([name])")],i.prototype,"defaultSlot",2),o([c("#validation-input")],i.prototype,"validationInput",2),o([c("#invalid-message")],i.prototype,"invalidMessage",2),o([u()],i.prototype,"hasButtonGroup",2),o([u()],i.prototype,"defaultValue",2),o([u()],i.prototype,"showInvalidStyle",2),o([n({reflect:!0})],i.prototype,"size",2),o([n({type:Boolean,reflect:!0})],i.prototype,"required",2),o([n({reflect:!0})],i.prototype,"orientation",2),o([n()],i.prototype,"label",2),o([n({type:Boolean,reflect:!0})],i.prototype,"boldLabel",2),o([n()],i.prototype,"name",2),o([n({reflect:!0})],i.prototype,"value",2),o([n({reflect:!0})],i.prototype,"form",2),o([m("size",{waitUntilFirstUpdate:!0})],i.prototype,"handleSizeChange",1),o([m("showInvalidStyle",{waitUntilFirstUpdate:!0})],i.prototype,"handleInvalidChange",1),o([m("value")],i.prototype,"handleValueChange",1),i=o([y("sd-4-0-0-radio-group")],i);export{i as a};
1
+ import{a as w}from"./chunk.37AKROZQ.js";import{b as C,c as E,d as V,e as k}from"./chunk.65NSSTJE.js";import{a as M}from"./chunk.AQYKEDSK.js";import{a as m}from"./chunk.E2DRD2OX.js";import{a as b}from"./chunk.6HO6CE4A.js";import{a as f}from"./chunk.DCOFYPWX.js";import{a as y,b as n,c as u,d as c,h as p}from"./chunk.ERIS2E6E.js";import{b as g,e as h}from"./chunk.IRWHG2Q4.js";import{e as o}from"./chunk.TJOCV4DC.js";var i=class extends p{constructor(){super(...arguments);this.formControlController=new C(this);this.hasSlotController=new b(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.boldLabel=!1;this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?k:t?V:E}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-4-0-1-radio, sd-4-0-1-radio-button")]}handleRadioClick(t){let e=t.target.closest("sd-4-0-1-radio, sd-4-0-1-radio-button"),a=this.getAllRadios(),s=this.value;e.disabled||(this.value=e.value,a.forEach(d=>d.checked=d===e),this.value!==s&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){var v;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(r=>!r.disabled),a=(v=e.find(r=>r.checked))!=null?v:e[0],s=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,d=this.value,l=e.indexOf(a)+s;l<0&&(l=e.length-1),l>e.length-1&&(l=0),this.getAllRadios().forEach(r=>{r.checked=!1,this.hasButtonGroup||(r.tabIndex=-1)}),this.value=e[l].value,e[l].checked=!0,this.hasButtonGroup?e[l].shadowRoot.querySelector("button").focus():(e[l].tabIndex=0,e[l].focus()),this.value!==d&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios(),a=t.find(s=>s.checked)||t[0];a&&a.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var e,a;let t=this.getAllRadios();if(await Promise.all(t.map(async s=>{await s.updateComplete,s.checked=s.value===this.value,s.size=this.size,s instanceof w&&(s.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(s=>s.tagName.toLowerCase()==="sd-4-0-1-radio-button"),!t.some(s=>s.checked))if(this.hasButtonGroup){let s=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");s&&(s.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let s=(a=this.shadowRoot)==null?void 0:a.querySelector("sd-4-0-1-button-group");s&&(s.disableRole=!0)}}syncRadios(){if(customElements.get("sd-4-0-1-radio")&&customElements.get("sd-4-0-1-radio-button")){this.syncRadioElements();return}customElements.get("sd-4-0-1-radio")?this.syncRadioElements():customElements.whenDefined("sd-4-0-1-radio").then(()=>this.syncRadios()),customElements.get("sd-4-0-1-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-4-0-1-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:!!t,a=h`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return h`<fieldset part="form-control" class="${f("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="radiogroup" aria-describedby="invalid-message"><div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${f("p-0 leading-normal text-black text-left",!e&&"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend><slot name="tooltip"></slot></div><div part="form-control-input" class="${f("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?h`<sd-4-0-1-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${a}</sd-4-0-1-button-group>`:a}</div></fieldset>${this.formControlController.renderInvalidMessage()}`}};i.dependencies={"sd-4-0-1-button-group":M},i.styles=[...p.styles,g`:host{display:block}:host([orientation=vertical]) ::slotted(sd-4-0-1-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-4-0-1-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-4-0-1-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-4-0-1-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-4-0-1-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-4-0-1-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}`],o([c("slot:not([name])")],i.prototype,"defaultSlot",2),o([c("#validation-input")],i.prototype,"validationInput",2),o([c("#invalid-message")],i.prototype,"invalidMessage",2),o([u()],i.prototype,"hasButtonGroup",2),o([u()],i.prototype,"defaultValue",2),o([u()],i.prototype,"showInvalidStyle",2),o([n({reflect:!0})],i.prototype,"size",2),o([n({type:Boolean,reflect:!0})],i.prototype,"required",2),o([n({reflect:!0})],i.prototype,"orientation",2),o([n()],i.prototype,"label",2),o([n({type:Boolean,reflect:!0})],i.prototype,"boldLabel",2),o([n()],i.prototype,"name",2),o([n({reflect:!0})],i.prototype,"value",2),o([n({reflect:!0})],i.prototype,"form",2),o([m("size",{waitUntilFirstUpdate:!0})],i.prototype,"handleSizeChange",1),o([m("showInvalidStyle",{waitUntilFirstUpdate:!0})],i.prototype,"handleInvalidChange",1),o([m("value")],i.prototype,"handleValueChange",1),i=o([y("sd-4-0-1-radio-group")],i);export{i as a};
@@ -1 +1 @@
1
- import{e as p}from"./chunk.IRWHG2Q4.js";import{a as l,b as m}from"./chunk.TJOCV4DC.js";var a=new WeakMap,n=new WeakMap,c=new WeakMap,d=new WeakMap,v=class{constructor(t,e){this.handleFormData=t=>{let e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),s=this.host.tagName.toLowerCase()==="sd-4-0-0-button";!e&&!s&&typeof o=="string"&&o.length>0&&typeof i!="undefined"&&(Array.isArray(i)?i.forEach(r=>{t.formData.append(o,r.toString())}):t.formData.append(o,i.toString()))};this.handleFormSubmit=t=>{var i,s;let e=this.options.disabled(this.host),o=this.options.reportValidity;if(this.form&&!this.form.noValidate&&((i=a.get(this.form))==null||i.forEach(r=>{this.setUserInteracted(r,!0)})),this.form&&!this.form.noValidate&&!e&&!o(this.host)){t.preventDefault(),t.stopImmediatePropagation();let r=(s=this.form)==null?void 0:s.querySelectorAll("[data-invalid]");Array.from(r).filter(h=>h.tagName.toLowerCase()==="sd-4-0-0-radio-group").forEach(h=>{var f,u;(u=(f=h.shadowRoot)==null?void 0:f.querySelector("input"))==null||u.dispatchEvent(new Event("invalid"))}),r!=null&&r.length&&r[0].focus()}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),d.set(this.host,[])};this.handleInteraction=t=>{let e=d.get(this.host);e.includes(t.type)||e.push(t.type),e.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)};this.fakeUserInteraction=()=>{this.setUserInteracted(this.host,!0)};(this.host=t).addController(this),this.options=l({form:o=>{if(o.hasAttribute("form")&&o.getAttribute("form")!==""){let i=o.getRootNode(),s=o.getAttribute("form");if(s)return i.getElementById(s)}return o.closest("form")},name:o=>o.name,value:o=>o.value,defaultValue:o=>o.defaultValue,disabled:o=>{var i;return(i=o.disabled)!=null?i:!1},reportValidity:o=>typeof o.reportValidity=="function"?o.reportValidity():!0,setValue:(o,i)=>o.value=i,assumeInteractionOn:["sd-4-0-0-input"]},e)}hostConnected(){let t=this.options.form(this.host);t&&this.attachForm(t),d.set(this.host,[]),this.options.assumeInteractionOn.forEach(e=>{this.host.addEventListener(e,this.handleInteraction)})}hostDisconnected(){this.detachForm(),d.delete(this.host),this.options.assumeInteractionOn.forEach(t=>{this.host.removeEventListener(t,this.handleInteraction)})}hostUpdated(){var e;let t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&(this.setValidity((e=this.host)==null?void 0:e.validity.valid),this.updateValidityStyle())}attachForm(t){t?(this.form=t,a.has(this.form)?a.get(this.form).add(this.host):a.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),n.has(this.form)||(n.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var t;this.form&&((t=a.get(this.form))==null||t.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),n.has(this.form)&&(this.form.reportValidity=n.get(this.form),n.delete(this.form))),this.form=void 0}reportFormValidity(){if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let e of t)if(typeof e.reportValidity=="function"&&!e.reportValidity())return!1}return!0}setUserInteracted(t,e){c.set(t,e),t.requestUpdate()}doAction(t,e){if(this.form){let o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(i=>{e.hasAttribute(i)&&o.setAttribute(i,e.getAttribute(i))})),this.form.append(o),o.click(),o.remove()}}updateValidityStyle(){this.host.hasAttribute("data-user-valid")&&this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!0),this.host.showInvalidStyle=!1):this.host.hasAttribute("data-user-invalid")&&!this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!0):(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!1)}getForm(){var t;return(t=this.form)!=null?t:null}renderInvalidMessage(){return p`<div id="invalid-message" class="text-error text-sm mt-2 text-left" part="invalid-message" aria-live="polite" ?hidden="${!this.host.showInvalidStyle}"></div>`}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){var s;let e=this.host,o=!!c.get(e),i=!!e.required;(s=this.form)!=null&&s.noValidate?(e.removeAttribute("data-required"),e.removeAttribute("data-optional"),e.removeAttribute("data-invalid"),e.removeAttribute("data-valid"),e.removeAttribute("data-user-invalid"),e.removeAttribute("data-user-valid"),e.removeAttribute("aria-invalid")):(e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o),e.setAttribute("aria-invalid",(!t).toString()))}updateValidity(){let t=this.host;this.setValidity(t==null?void 0:t.validity.valid)}emitInvalidEvent(t){t==null||t.preventDefault();let e=new CustomEvent("sd-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault()}},y=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),F=Object.freeze(m(l({},y),{valid:!1,valueMissing:!0})),V=Object.freeze(m(l({},y),{valid:!1,customError:!0}));export{a,v as b,y as c,F as d,V as e};
1
+ import{e as p}from"./chunk.IRWHG2Q4.js";import{a as l,b as m}from"./chunk.TJOCV4DC.js";var a=new WeakMap,n=new WeakMap,c=new WeakMap,d=new WeakMap,v=class{constructor(t,e){this.handleFormData=t=>{let e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),s=this.host.tagName.toLowerCase()==="sd-4-0-1-button";!e&&!s&&typeof o=="string"&&o.length>0&&typeof i!="undefined"&&(Array.isArray(i)?i.forEach(r=>{t.formData.append(o,r.toString())}):t.formData.append(o,i.toString()))};this.handleFormSubmit=t=>{var i,s;let e=this.options.disabled(this.host),o=this.options.reportValidity;if(this.form&&!this.form.noValidate&&((i=a.get(this.form))==null||i.forEach(r=>{this.setUserInteracted(r,!0)})),this.form&&!this.form.noValidate&&!e&&!o(this.host)){t.preventDefault(),t.stopImmediatePropagation();let r=(s=this.form)==null?void 0:s.querySelectorAll("[data-invalid]");Array.from(r).filter(h=>h.tagName.toLowerCase()==="sd-4-0-1-radio-group").forEach(h=>{var f,u;(u=(f=h.shadowRoot)==null?void 0:f.querySelector("input"))==null||u.dispatchEvent(new Event("invalid"))}),r!=null&&r.length&&r[0].focus()}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),d.set(this.host,[])};this.handleInteraction=t=>{let e=d.get(this.host);e.includes(t.type)||e.push(t.type),e.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)};this.fakeUserInteraction=()=>{this.setUserInteracted(this.host,!0)};(this.host=t).addController(this),this.options=l({form:o=>{if(o.hasAttribute("form")&&o.getAttribute("form")!==""){let i=o.getRootNode(),s=o.getAttribute("form");if(s)return i.getElementById(s)}return o.closest("form")},name:o=>o.name,value:o=>o.value,defaultValue:o=>o.defaultValue,disabled:o=>{var i;return(i=o.disabled)!=null?i:!1},reportValidity:o=>typeof o.reportValidity=="function"?o.reportValidity():!0,setValue:(o,i)=>o.value=i,assumeInteractionOn:["sd-4-0-1-input"]},e)}hostConnected(){let t=this.options.form(this.host);t&&this.attachForm(t),d.set(this.host,[]),this.options.assumeInteractionOn.forEach(e=>{this.host.addEventListener(e,this.handleInteraction)})}hostDisconnected(){this.detachForm(),d.delete(this.host),this.options.assumeInteractionOn.forEach(t=>{this.host.removeEventListener(t,this.handleInteraction)})}hostUpdated(){var e;let t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&(this.setValidity((e=this.host)==null?void 0:e.validity.valid),this.updateValidityStyle())}attachForm(t){t?(this.form=t,a.has(this.form)?a.get(this.form).add(this.host):a.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),n.has(this.form)||(n.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var t;this.form&&((t=a.get(this.form))==null||t.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),n.has(this.form)&&(this.form.reportValidity=n.get(this.form),n.delete(this.form))),this.form=void 0}reportFormValidity(){if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let e of t)if(typeof e.reportValidity=="function"&&!e.reportValidity())return!1}return!0}setUserInteracted(t,e){c.set(t,e),t.requestUpdate()}doAction(t,e){if(this.form){let o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(i=>{e.hasAttribute(i)&&o.setAttribute(i,e.getAttribute(i))})),this.form.append(o),o.click(),o.remove()}}updateValidityStyle(){this.host.hasAttribute("data-user-valid")&&this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!0),this.host.showInvalidStyle=!1):this.host.hasAttribute("data-user-invalid")&&!this.host.checkValidity()?(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!0):(this.host.showValidStyle!==void 0&&(this.host.showValidStyle=!1),this.host.showInvalidStyle=!1)}getForm(){var t;return(t=this.form)!=null?t:null}renderInvalidMessage(){return p`<div id="invalid-message" class="text-error text-sm mt-2 text-left" part="invalid-message" aria-live="polite" ?hidden="${!this.host.showInvalidStyle}"></div>`}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){var s;let e=this.host,o=!!c.get(e),i=!!e.required;(s=this.form)!=null&&s.noValidate?(e.removeAttribute("data-required"),e.removeAttribute("data-optional"),e.removeAttribute("data-invalid"),e.removeAttribute("data-valid"),e.removeAttribute("data-user-invalid"),e.removeAttribute("data-user-valid"),e.removeAttribute("aria-invalid")):(e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o),e.setAttribute("aria-invalid",(!t).toString()))}updateValidity(){let t=this.host;this.setValidity(t==null?void 0:t.validity.valid)}emitInvalidEvent(t){t==null||t.preventDefault();let e=new CustomEvent("sd-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault()}},y=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),F=Object.freeze(m(l({},y),{valid:!1,valueMissing:!0})),V=Object.freeze(m(l({},y),{valid:!1,customError:!0}));export{a,v as b,y as c,F as d,V as e};
@@ -1 +1 @@
1
- import{a as s}from"./chunk.HE2LNCWW.js";import{a as d,b as r}from"./chunk.5ZILM4TA.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as l}from"./chunk.DCOFYPWX.js";import{a as m,b as i,d as v,h as p}from"./chunk.3BP4JKVA.js";import{b}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends p{constructor(){super(...arguments);this.hasSlotController=new x(this,"[default]","description","children");this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(n){this.disabled&&(n.preventDefault(),n.stopPropagation())}handleClickSummary(n){n.preventDefault(),n.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.isAccordion&&!this.isLink?d`summary`:this.separated?d`div`:this.isLink?d`a`:d`button`}render(){let n=this.tag,a=this.isLink,u=this.isButton,o=this.isAccordion,c={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},f=this.vertical?"pb-3":"pb-2",h=r`<${n} part="base" class="${l("cursor-pointer relative focus-visible:focus-outline",{md:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",o?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-all min-h-[48px] px-4")}" aria-controls="${s(o?"navigation-item-details":void 0)}" aria-current="${s(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${s(u?this.disabled:void 0)}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}" rel="${s(a&&this.target?"noreferrer noopener":void 0)}" role="${a?"link":"button"}" tabindex="${this.disabled||this.separated?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:u?this.handleClickButton:void 0}"><div part="current-indicator" class="${l("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${l("relative pt-3 inline-flex justify-between items-center",o?"grow":"w-full",c.description||this.separated?"pb-1":f,this.calculatePaddingX)}">${this.divider&&this.vertical?r`<sd-4-0-0-divider part="divider" class="${l("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-4-0-0-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?r`<a class="${l("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-all min-h-[48px]",!c.description&&"py-4")}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}"><slot part="content" class="inline"></slot></a>`:r`<slot part="content" class="inline"></slot>`} </span>${(this.chevron||c.children)&&this.vertical?this.separated?r`<button type="button" title="toggle-details" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-4-0-0-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("mr-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-4-0-0-icon></button>`:r`<sd-4-0-0-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-4-0-0-icon>`:""} </span>${c.description&&this.vertical?r`<slot name="description" part="description" class="${l("inline-block text-sm text-left text-black",o||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX,f)}"></slot>`:""}</${n}>`;return o?r`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative flex">${h}<slot name="children"></slot></details>`:this.separated?r`<div part="details" id="navigation-item-details" class="relative flex flex-col">${h}${this.open?r`<slot name="children"></slot>`:""}</div>`:r`${h}`}};e.styles=[...p.styles,b`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],t([v('a[part="base"], button[part="base"]')],e.prototype,"button",2),t([i({type:Boolean,reflect:!0})],e.prototype,"vertical",2),t([i({reflect:!0})],e.prototype,"size",2),t([i({reflect:!0})],e.prototype,"href",2),t([i()],e.prototype,"target",2),t([i()],e.prototype,"download",2),t([i({type:Boolean,reflect:!0})],e.prototype,"current",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"chevron",2),t([i({type:Boolean,reflect:!0})],e.prototype,"relaxed",2),t([i({type:Boolean,reflect:!0})],e.prototype,"divider",2),t([i({type:Boolean,reflect:!0})],e.prototype,"indented",2),t([i({type:Boolean,reflect:!0})],e.prototype,"open",2),t([i({type:Boolean,reflect:!0})],e.prototype,"separated",2),e=t([m("sd-4-0-0-navigation-item")],e);export{e as a};
1
+ import{a as s}from"./chunk.HE2LNCWW.js";import{a as d,b as r}from"./chunk.5ZILM4TA.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as l}from"./chunk.DCOFYPWX.js";import{a as m,b as i,d as v,h as p}from"./chunk.ERIS2E6E.js";import{b}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends p{constructor(){super(...arguments);this.hasSlotController=new x(this,"[default]","description","children");this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(n){this.disabled&&(n.preventDefault(),n.stopPropagation())}handleClickSummary(n){n.preventDefault(),n.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.isAccordion&&!this.isLink?d`summary`:this.separated?d`div`:this.isLink?d`a`:d`button`}render(){let n=this.tag,a=this.isLink,u=this.isButton,o=this.isAccordion,c={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},f=this.vertical?"pb-3":"pb-2",h=r`<${n} part="base" class="${l("cursor-pointer relative focus-visible:focus-outline",{md:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",o?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-all min-h-[48px] px-4")}" aria-controls="${s(o?"navigation-item-details":void 0)}" aria-current="${s(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${s(u?this.disabled:void 0)}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}" rel="${s(a&&this.target?"noreferrer noopener":void 0)}" role="${a?"link":"button"}" tabindex="${this.disabled||this.separated?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:u?this.handleClickButton:void 0}"><div part="current-indicator" class="${l("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${l("relative pt-3 inline-flex justify-between items-center",o?"grow":"w-full",c.description||this.separated?"pb-1":f,this.calculatePaddingX)}">${this.divider&&this.vertical?r`<sd-4-0-1-divider part="divider" class="${l("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-4-0-1-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?r`<a class="${l("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-all min-h-[48px]",!c.description&&"py-4")}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}"><slot part="content" class="inline"></slot></a>`:r`<slot part="content" class="inline"></slot>`} </span>${(this.chevron||c.children)&&this.vertical?this.separated?r`<button type="button" title="toggle-details" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-4-0-1-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("mr-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-4-0-1-icon></button>`:r`<sd-4-0-1-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-4-0-1-icon>`:""} </span>${c.description&&this.vertical?r`<slot name="description" part="description" class="${l("inline-block text-sm text-left text-black",o||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX,f)}"></slot>`:""}</${n}>`;return o?r`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative flex">${h}<slot name="children"></slot></details>`:this.separated?r`<div part="details" id="navigation-item-details" class="relative flex flex-col">${h}${this.open?r`<slot name="children"></slot>`:""}</div>`:r`${h}`}};e.styles=[...p.styles,b`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],t([v('a[part="base"], button[part="base"]')],e.prototype,"button",2),t([i({type:Boolean,reflect:!0})],e.prototype,"vertical",2),t([i({reflect:!0})],e.prototype,"size",2),t([i({reflect:!0})],e.prototype,"href",2),t([i()],e.prototype,"target",2),t([i()],e.prototype,"download",2),t([i({type:Boolean,reflect:!0})],e.prototype,"current",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"chevron",2),t([i({type:Boolean,reflect:!0})],e.prototype,"relaxed",2),t([i({type:Boolean,reflect:!0})],e.prototype,"divider",2),t([i({type:Boolean,reflect:!0})],e.prototype,"indented",2),t([i({type:Boolean,reflect:!0})],e.prototype,"open",2),t([i({type:Boolean,reflect:!0})],e.prototype,"separated",2),e=t([m("sd-4-0-1-navigation-item")],e);export{e as a};
@@ -1 +1 @@
1
- import{a as s}from"./chunk.HE2LNCWW.js";import{a as o,b as a}from"./chunk.5ZILM4TA.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as m,b as i,d as b,h as l}from"./chunk.3BP4JKVA.js";import{b as p}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends l{constructor(){super(...arguments);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemoveClick(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(r){this.tag.focus(r)}blur(){this.tag.blur()}render(){let r=this.isLink(),d=r?o`a`:o`button`;return a`<${d} part="base" type="${s(r?void 0:"button")}" href="${s(r?this.href:void 0)}" rel="${s(r&&this.target?"noreferrer noopener":void 0)}" target="${s(r?this.target:void 0)}" download="${s(r?this.download:void 0)}" ?disabled="${s(r?void 0:this.disabled)}" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${s(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${n("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":"border-primary text-primary hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500 disabled:border-neutral-500 disabled:text-neutral-500",this.disabled&&!r&&"cursor-not-allowed")}"><slot part="content"></slot>${this.removable?a`<slot part="removable-indicator" name="removable-indicator" @click="${this.handleRemoveClick}" class="${n({lg:"text-base",sm:"text-[12px]"}[this.size])}"><sd-4-0-0-icon library="system" name="close" label="remove"></sd-4-0-0-icon></slot>`:""}</${d}>`}};e.styles=[...l.styles,p`:host{display:inline-block}`],t([b("a, button")],e.prototype,"tag",2),t([i({reflect:!0})],e.prototype,"size",2),t([i({type:Boolean,reflect:!0})],e.prototype,"selected",2),t([i({type:Boolean,reflect:!0})],e.prototype,"toggleable",2),t([i({type:Boolean,reflect:!0})],e.prototype,"removable",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i()],e.prototype,"href",2),t([i()],e.prototype,"target",2),t([i()],e.prototype,"download",2),e=t([m("sd-4-0-0-tag")],e);export{e as a};
1
+ import{a as s}from"./chunk.HE2LNCWW.js";import{a as o,b as a}from"./chunk.5ZILM4TA.js";import{a as n}from"./chunk.DCOFYPWX.js";import{a as m,b as i,d as b,h as l}from"./chunk.ERIS2E6E.js";import{b as p}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends l{constructor(){super(...arguments);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemoveClick(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(r){this.tag.focus(r)}blur(){this.tag.blur()}render(){let r=this.isLink(),d=r?o`a`:o`button`;return a`<${d} part="base" type="${s(r?void 0:"button")}" href="${s(r?this.href:void 0)}" rel="${s(r&&this.target?"noreferrer noopener":void 0)}" target="${s(r?this.target:void 0)}" download="${s(r?this.download:void 0)}" ?disabled="${s(r?void 0:this.disabled)}" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${s(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${n("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":"border-primary text-primary hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500 disabled:border-neutral-500 disabled:text-neutral-500",this.disabled&&!r&&"cursor-not-allowed")}"><slot part="content"></slot>${this.removable?a`<slot part="removable-indicator" name="removable-indicator" @click="${this.handleRemoveClick}" class="${n({lg:"text-base",sm:"text-[12px]"}[this.size])}"><sd-4-0-1-icon library="system" name="close" label="remove"></sd-4-0-1-icon></slot>`:""}</${d}>`}};e.styles=[...l.styles,p`:host{display:inline-block}`],t([b("a, button")],e.prototype,"tag",2),t([i({reflect:!0})],e.prototype,"size",2),t([i({type:Boolean,reflect:!0})],e.prototype,"selected",2),t([i({type:Boolean,reflect:!0})],e.prototype,"toggleable",2),t([i({type:Boolean,reflect:!0})],e.prototype,"removable",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i()],e.prototype,"href",2),t([i()],e.prototype,"target",2),t([i()],e.prototype,"download",2),e=t([m("sd-4-0-1-tag")],e);export{e as a};
@@ -1,11 +1,11 @@
1
- import{a as U}from"./chunk.27P4XVMA.js";import{a as K}from"./chunk.INQ5A3RT.js";import{a as A}from"./chunk.D7TMPF3D.js";import{a as H}from"./chunk.X2GM34WQ.js";import{a as L,d as P,e as R,f as w}from"./chunk.W7A3TU2Z.js";import{c as B}from"./chunk.3L472FD4.js";import{b as z}from"./chunk.65NSSTJE.js";import{a as C,c as E}from"./chunk.A3DKF5BY.js";import{a as $,b as F}from"./chunk.3IPN77DT.js";import{a as S,d as T}from"./chunk.RQYP7MH5.js";import{a as x}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as M}from"./chunk.26YUWEYR.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as k,b as o,c as h,d as c,h as I}from"./chunk.3BP4JKVA.js";import{b as V,e as d}from"./chunk.IRWHG2Q4.js";import{e as a}from"./chunk.TJOCV4DC.js";var s=class extends I{constructor(){super(...arguments);this.formControlController=new z(this,{assumeInteractionOn:["sd-blur","sd-4-0-0-input"]});this.hasSlotController=new D(this,"help-text","label");this.localize=new M(this);this.hasHover=!1;this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel=this.localize.term("tagsSelected");this.disabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.currentPlacement=this.placement;this.getOption=H;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=w(t.value),l=w(t.getTextLabel()),n=w(e);return i.includes(n)||l.includes(n)};this.getTag=t=>d`<sd-4-0-0-tag ?disabled="${this.disabled}" part="tag" exportparts="
1
+ import{a as U}from"./chunk.6HMIEKMA.js";import{a as K}from"./chunk.MX2AOQKK.js";import{a as A}from"./chunk.D7TMPF3D.js";import{a as H}from"./chunk.X2GM34WQ.js";import{a as L,d as P,e as R,f as w}from"./chunk.W7A3TU2Z.js";import{c as B}from"./chunk.3L472FD4.js";import{b as z}from"./chunk.65NSSTJE.js";import{a as C,c as E}from"./chunk.A3DKF5BY.js";import{a as $,b as F}from"./chunk.LFTAVPYP.js";import{a as S,d as T}from"./chunk.RQYP7MH5.js";import{a as x}from"./chunk.KLRPP4NQ.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as D}from"./chunk.6HO6CE4A.js";import{a as M}from"./chunk.26YUWEYR.js";import{a as r}from"./chunk.DCOFYPWX.js";import{a as k,b as o,c as h,d as c,h as I}from"./chunk.ERIS2E6E.js";import{b as V,e as d}from"./chunk.IRWHG2Q4.js";import{e as a}from"./chunk.TJOCV4DC.js";var s=class extends I{constructor(){super(...arguments);this.formControlController=new z(this,{assumeInteractionOn:["sd-blur","sd-4-0-1-input"]});this.hasSlotController=new D(this,"help-text","label");this.localize=new M(this);this.hasHover=!1;this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel=this.localize.term("tagsSelected");this.disabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.currentPlacement=this.placement;this.getOption=H;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let i=w(t.value),l=w(t.getTextLabel()),n=w(e);return i.includes(n)||l.includes(n)};this.getTag=t=>d`<sd-4-0-1-tag ?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-4-0-0-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{if(t.target.closest(".combobox__clear")===null){if(t.key==="Escape"&&(this.open?(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})):this.displayInputValue=""),t.key==="Backspace"&&this.multiple&&this.displayInput.value===""){this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0}));return}if(t.key==="Enter"){let l=this.getCurrentOption(),n=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;if(!this.open&&!n){setTimeout(()=>{t.defaultPrevented||this.formControlController.submit()});return}if(!this.open||l!=null&&l.disabled)return;if(l&&!l.disabled){let p=this.value;this.multiple?(this.toggleOptionSelection(l),this.lastOption=l,this.setOrderedSelectedOptions(l),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(l),this.setSelectedOptions(l)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==p&&(this.emit("sd-input"),this.emit("sd-change"))})}this.displayInput.focus({preventScroll:!0}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}));return}["ArrowUp","ArrowDown"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.open||this.show(),this.selectNextOption(t.key==="ArrowDown")),["Home","End"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key==="Home"?this.displayInput.setSelectionRange(0,0):t.key==="End"&&this.displayInput.setSelectionRange(this.displayInput.value.length,this.displayInput.value.length))}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){if(!this.multiple){let t=this.findOptionByValue(this.getSlottedOptions(),this.value);this.selectedTextLabel=(t==null?void 0:t.getTextLabel())||""}this.formControlController.updateValidity()}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}get options(){let t=e=>{let i=this.displayInput.value,l=this.getOption(e,i);return d`${typeof l=="string"?$(l):l}`};return this.filteredOptions.map(e=>e.tagName.toLowerCase()==="sd-4-0-0-optgroup"?(Array.from(e.children).forEach(i=>{i.tagName.toLowerCase()==="sd-4-0-0-option"&&t(i)}),e):t(e))}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let i=this.getTag(t,e);return d`<div @sd-remove="${l=>this.handleTagRemove(l,t)}">${typeof i=="string"?$(i):i}</div>`}return[d``]}):[d`<sd-4-0-0-tag ?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-4-0-1-tag>`;this.handleDocumentFocusIn=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()};this.handleDocumentKeyDown=t=>{if(t.target.closest(".combobox__clear")===null){if(t.key==="Escape"&&(this.open?(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})):this.displayInputValue=""),t.key==="Backspace"&&this.multiple&&this.displayInput.value===""){this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0}));return}if(t.key==="Enter"){let l=this.getCurrentOption(),n=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;if(!this.open&&!n){setTimeout(()=>{t.defaultPrevented||this.formControlController.submit()});return}if(!this.open||l!=null&&l.disabled)return;if(l&&!l.disabled){let p=this.value;this.multiple?(this.toggleOptionSelection(l),this.lastOption=l,this.setOrderedSelectedOptions(l),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(l),this.setSelectedOptions(l)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==p&&(this.emit("sd-input"),this.emit("sd-change"))})}this.displayInput.focus({preventScroll:!0}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}));return}["ArrowUp","ArrowDown"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.open||this.show(),this.selectNextOption(t.key==="ArrowDown")),["Home","End"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),t.key==="Home"?this.displayInput.setSelectionRange(0,0):t.key==="End"&&this.displayInput.setSelectionRange(this.displayInput.value.length,this.displayInput.value.length))}};this.handleDocumentMouseDown=t=>{let e=t.composedPath();this&&!e.includes(this)&&this.hide()}}connectedCallback(){super.connectedCallback(),this.open=!1}firstUpdated(){if(!this.multiple){let t=this.findOptionByValue(this.getSlottedOptions(),this.value);this.selectedTextLabel=(t==null?void 0:t.getTextLabel())||""}this.formControlController.updateValidity()}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}get options(){let t=e=>{let i=this.displayInput.value,l=this.getOption(e,i);return d`${typeof l=="string"?$(l):l}`};return this.filteredOptions.map(e=>e.tagName.toLowerCase()==="sd-4-0-1-optgroup"?(Array.from(e.children).forEach(i=>{i.tagName.toLowerCase()==="sd-4-0-1-option"&&t(i)}),e):t(e))}get tags(){return this.selectedOptions.length<=this.maxOptionsVisible?this.selectedOptions.map((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){let i=this.getTag(t,e);return d`<div @sd-remove="${l=>this.handleTagRemove(l,t)}">${typeof i=="string"?$(i):i}</div>`}return[d``]}):[d`<sd-4-0-1-tag ?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.maxOptionsTagLabel}</sd-4-0-0-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){t.key==="Backspace"&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){t.key==="Backspace"&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-4-0-0-option"),l=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==l&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),l=e.indexOf(i),n=Math.max(0,l);if(t){let p=l+1;n=p>e.length-1?0:p}else{let p=l-1;n=p<0?e.length-1:p}this.setCurrentOption(e[n]),B(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-4-0-0-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t){let e=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),e.forEach(i=>{i.current=!1,i.setAttribute("aria-selected","false")}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id))}toggleOptionSelection(t,e){let l=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());l&&(l.selected=e!=null?e:!l.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,l;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((l=this.selectedOptions[0])==null?void 0:l.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var y,O,m;let l=i.cloneNode(!0);if(l.current=l.value===((y=this.lastOption)==null?void 0:y.value),l.selected=i.selected,l.checkbox=i.checkbox,l.size=i.size,!(((O=i.parentElement)==null?void 0:O.tagName.toLowerCase())==="sd-4-0-0-optgroup"))return l;let p=i.parentElement,g=(m=p.querySelector('[slot="label"]'))==null?void 0:m.cloneNode(!0),u=e.find(b=>b.id===p.id);if(u){u==null||u.appendChild(l),g&&(u==null||u.appendChild(g));return}let v=p.cloneNode();return v.appendChild(l),g&&v.appendChild(g),e.push(v),v}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-4-0-0-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&!this.disabled){this.emit("sd-show"),this.addOpenListeners(),await T(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:l}=E(this,"combobox.show",{dir:this.localize.dir()});await S(this.popup.popup,i,l),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await T(this);let{keyframes:t,options:e}=E(this,"combobox.hide",{dir:this.localize.dir()});await S(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,Promise.race([x(this,"sd-after-show"),x(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,x(this,"sd-after-hide")}checkValidity(){return this.valueInput.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.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return P(L(this.defaultSlot)).flat()}getSlottedOptGroups(){return R(L(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-4-0-0-option")){customElements.whenDefined("sd-4-0-0-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((l,n)=>{this.multiple&&(l.checkbox=!0),l.id=l.id||`sd-4-0-0-combobox-option-${n}`}),e.forEach((l,n)=>{l.id=l.id||`sd-4-0-0-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),l=this.label?!0:!!e,n=this.helpText?!0:!!i,p=this.clearable&&!this.disabled,g=this.disabled?"disabled":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=this.disabled?"cursor-not-allowed":"cursor-pointer",v=this.disabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],O={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return d`<div part="form-control" class="${r("relative text-left",u,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${l&&"inline-block mb-2"}" aria-hidden="${!l}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${r("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{disabled:"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"}[g],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-4-0-0-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${r("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift 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.maxOptionsTagLabel}</sd-4-0-1-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){t.key==="Backspace"&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){t.key==="Backspace"&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){let i=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||i)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let i=t.target.closest("sd-4-0-1-option"),l=this.value;i&&!i.disabled&&(this.multiple?(this.toggleOptionSelection(i),this.lastOption=i,this.setOrderedSelectedOptions(i),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(i),this.setSelectedOptions(i)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==l&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let i=this.getCurrentOption(),l=e.indexOf(i),n=Math.max(0,l);if(t){let p=l+1;n=p>e.length-1?0:p}else{let p=l-1;n=p<0?e.length-1:p}this.setCurrentOption(e[n]),B(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-4-0-1-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t){let e=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),e.forEach(i=>{i.current=!1,i.setAttribute("aria-selected","false")}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id))}toggleOptionSelection(t,e){let l=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());l&&(l.selected=e!=null?e:!l.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(i=>e.includes(i.value)):t.find(i=>i.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(i=>{i.selected=this.compareOptions(i,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(i=>this.compareOptions(i,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(i=>this.compareOptions(i,e))?this.selectedOptions=this.selectedOptions.filter(i=>!this.compareOptions(i,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,i,l;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((i=this.selectedOptions[0])==null?void 0:i.getTextLabel())||"",this.selectedTextLabel=((l=this.selectedOptions[0])==null?void 0:l.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(i=>this.filter(i,t)||t==="").map(i=>{var y,O,m;let l=i.cloneNode(!0);if(l.current=l.value===((y=this.lastOption)==null?void 0:y.value),l.selected=i.selected,l.checkbox=i.checkbox,l.size=i.size,!(((O=i.parentElement)==null?void 0:O.tagName.toLowerCase())==="sd-4-0-1-optgroup"))return l;let p=i.parentElement,g=(m=p.querySelector('[slot="label"]'))==null?void 0:m.cloneNode(!0),u=e.find(b=>b.id===p.id);if(u){u==null||u.appendChild(l),g&&(u==null||u.appendChild(g));return}let v=p.cloneNode();return v.appendChild(l),g&&v.appendChild(g),e.push(v),v}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-4-0-1-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&!this.disabled){this.emit("sd-show"),this.addOpenListeners(),await T(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:i,options:l}=E(this,"combobox.show",{dir:this.localize.dir()});await S(this.popup.popup,i,l),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await T(this);let{keyframes:t,options:e}=E(this,"combobox.hide",{dir:this.localize.dir()});await S(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,Promise.race([x(this,"sd-after-show"),x(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,x(this,"sd-after-hide")}checkValidity(){return this.valueInput.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.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return P(L(this.defaultSlot)).flat()}getSlottedOptGroups(){return R(L(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-4-0-1-option")){customElements.whenDefined("sd-4-0-1-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let i=this.findOptionByValue(t,this.value);this.selectedTextLabel=(i==null?void 0:i.getTextLabel())||"",t.forEach((l,n)=>{this.multiple&&(l.checkbox=!0),l.id=l.id||`sd-4-0-1-combobox-option-${n}`}),e.forEach((l,n)=>{l.id=l.id||`sd-4-0-1-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),i=this.hasSlotController.test("help-text"),l=this.label?!0:!!e,n=this.helpText?!0:!!i,p=this.clearable&&!this.disabled,g=this.disabled?"disabled":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=this.disabled?"cursor-not-allowed":"cursor-pointer",v=this.disabled?"text-neutral-500":"text-primary",y={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],O={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return d`<div part="form-control" class="${r("relative text-left",u,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${l&&"inline-block mb-2"}" aria-hidden="${!l}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${r("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{disabled:"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"}[g],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-4-0-1-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${r("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
10
10
  popup:popup__content,
11
- "><div part="combobox" class="${r("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}">${t.left?d`<slot part="left" name="left" class="${r("inline-flex",O,v,m)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?d`<div part="tags" class="${r("flex items-center gap-1",O)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${r("appearance-none outline-none bg-transparent flex-auto min-w-0",u,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder")}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${r("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",u)}" 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}"> ${p?d`<button part="clear-button" class="${r("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-0-icon class="${r("text-icon-fill-neutral-800",m)}" name="closing-round" library="system"></sd-4-0-0-icon></slot></button>`:""} ${this.showInvalidStyle?d`<sd-4-0-0-icon part="invalid-icon" class="${r(y,m,"text-error")}" library="system" name="risk"></sd-4-0-0-icon>`:""} ${this.styleOnValid&&this.showValidStyle?d`<sd-4-0-0-icon part="valid-icon" class="${r("flex-shrink-0 text-success",y,m)}" library="system" name="status-check"></sd-4-0-0-icon>`:""}<slot name="right" part="right" class="${r("inline-flex ml-2 leading-[0]",this.disabled?"text-neutral-500":"text-primary",m)}"><sd-4-0-0-icon class="${r("transition-all",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-0-0-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${r("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow",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" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox" class="overflow-y-scroll">${this.filteredOptions.length===0?d`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-4-0-0-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-4-0-0-icon":F,"sd-4-0-0-popup":K,"sd-4-0-0-tag":U},s.styles=[...I.styles,V`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-0-0-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-0-0-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-4-0-0-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-4-0-0-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-0-0-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-4-0-0-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],a([c("sd-4-0-0-popup")],s.prototype,"popup",2),a([c('[part="combobox"]')],s.prototype,"combobox",2),a([c('[part="display-input"]')],s.prototype,"displayInput",2),a([c(".value-input")],s.prototype,"valueInput",2),a([c('[part="listbox"]')],s.prototype,"listbox",2),a([c('[part="tags"]')],s.prototype,"tagWrapper",2),a([c('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),a([c("slot:not([name])")],s.prototype,"defaultSlot",2),a([c("#invalid-message")],s.prototype,"invalidMessage",2),a([h()],s.prototype,"hasHover",2),a([h()],s.prototype,"hasFocus",2),a([h()],s.prototype,"displayInputValue",2),a([h()],s.prototype,"selectedTextLabel",2),a([h()],s.prototype,"selectedOptions",2),a([h()],s.prototype,"filteredOptions",2),a([h()],s.prototype,"allOptions",2),a([h()],s.prototype,"lastOption",2),a([h()],s.prototype,"showValidStyle",2),a([h()],s.prototype,"showInvalidStyle",2),a([o()],s.prototype,"name",2),a([o({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),a([A()],s.prototype,"defaultValue",2),a([o({reflect:!0})],s.prototype,"size",2),a([o()],s.prototype,"placeholder",2),a([o({attribute:"max-options-tag-label"})],s.prototype,"maxOptionsTagLabel",2),a([o({reflect:!0,type:Boolean})],s.prototype,"disabled",2),a([o({type:Boolean})],s.prototype,"clearable",2),a([o({reflect:!0,type:Boolean})],s.prototype,"open",2),a([o({type:Boolean})],s.prototype,"hoist",2),a([o()],s.prototype,"label",2),a([o({reflect:!0})],s.prototype,"placement",2),a([o({attribute:"help-text"})],s.prototype,"helpText",2),a([o({reflect:!0})],s.prototype,"form",2),a([o({reflect:!0,type:Boolean})],s.prototype,"required",2),a([h()],s.prototype,"currentPlacement",2),a([o()],s.prototype,"getOption",2),a([o({type:Boolean,reflect:!0})],s.prototype,"multiple",2),a([o({type:Boolean,reflect:!0})],s.prototype,"useTags",2),a([o({attribute:"max-options-visible",type:Number})],s.prototype,"maxOptionsVisible",2),a([o({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),a([o()],s.prototype,"filter",2),a([o()],s.prototype,"getTag",2),a([f("filter",{waitUntilFirstUpdate:!0})],s.prototype,"handleFilterChange",1),a([f("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),a([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),a([f("disabled",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),a([f("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),a([f("displayInputValue",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisplayInputValueChange",1),a([f("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),s=a([k("sd-4-0-0-combobox")],s);C("combobox.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});C("combobox.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
11
+ "><div part="combobox" class="${r("relative w-full px-4 flex flex-row items-center rounded-default",this.open&&"shadow",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}">${t.left?d`<slot part="left" name="left" class="${r("inline-flex",O,v,m)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?d`<div part="tags" class="${r("flex items-center gap-1",O)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${r("appearance-none outline-none bg-transparent flex-auto min-w-0",u,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder")}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${r("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",u)}" 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}"> ${p?d`<button part="clear-button" class="${r("flex justify-center",y,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-0-1-icon class="${r("text-icon-fill-neutral-800",m)}" name="closing-round" library="system"></sd-4-0-1-icon></slot></button>`:""} ${this.showInvalidStyle?d`<sd-4-0-1-icon part="invalid-icon" class="${r(y,m,"text-error")}" library="system" name="risk"></sd-4-0-1-icon>`:""} ${this.styleOnValid&&this.showValidStyle?d`<sd-4-0-1-icon part="valid-icon" class="${r("flex-shrink-0 text-success",y,m)}" library="system" name="status-check"></sd-4-0-1-icon>`:""}<slot name="right" part="right" class="${r("inline-flex ml-2 leading-[0]",this.disabled?"text-neutral-500":"text-primary",m)}"><sd-4-0-1-icon class="${r("transition-all",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="system" color="currentColor"></sd-4-0-1-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${r("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow",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" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox" class="overflow-y-scroll">${this.filteredOptions.length===0?d`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-4-0-1-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};s.dependencies={"sd-4-0-1-icon":F,"sd-4-0-1-popup":K,"sd-4-0-1-tag":U},s.styles=[...I.styles,V`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-4-0-1-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-4-0-1-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-4-0-1-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-4-0-1-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-4-0-1-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-4-0-1-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],a([c("sd-4-0-1-popup")],s.prototype,"popup",2),a([c('[part="combobox"]')],s.prototype,"combobox",2),a([c('[part="display-input"]')],s.prototype,"displayInput",2),a([c(".value-input")],s.prototype,"valueInput",2),a([c('[part="listbox"]')],s.prototype,"listbox",2),a([c('[part="tags"]')],s.prototype,"tagWrapper",2),a([c('[part="filtered-listbox"]')],s.prototype,"filteredWrapper",2),a([c("slot:not([name])")],s.prototype,"defaultSlot",2),a([c("#invalid-message")],s.prototype,"invalidMessage",2),a([h()],s.prototype,"hasHover",2),a([h()],s.prototype,"hasFocus",2),a([h()],s.prototype,"displayInputValue",2),a([h()],s.prototype,"selectedTextLabel",2),a([h()],s.prototype,"selectedOptions",2),a([h()],s.prototype,"filteredOptions",2),a([h()],s.prototype,"allOptions",2),a([h()],s.prototype,"lastOption",2),a([h()],s.prototype,"showValidStyle",2),a([h()],s.prototype,"showInvalidStyle",2),a([o()],s.prototype,"name",2),a([o({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],s.prototype,"value",2),a([A()],s.prototype,"defaultValue",2),a([o({reflect:!0})],s.prototype,"size",2),a([o()],s.prototype,"placeholder",2),a([o({attribute:"max-options-tag-label"})],s.prototype,"maxOptionsTagLabel",2),a([o({reflect:!0,type:Boolean})],s.prototype,"disabled",2),a([o({type:Boolean})],s.prototype,"clearable",2),a([o({reflect:!0,type:Boolean})],s.prototype,"open",2),a([o({type:Boolean})],s.prototype,"hoist",2),a([o()],s.prototype,"label",2),a([o({reflect:!0})],s.prototype,"placement",2),a([o({attribute:"help-text"})],s.prototype,"helpText",2),a([o({reflect:!0})],s.prototype,"form",2),a([o({reflect:!0,type:Boolean})],s.prototype,"required",2),a([h()],s.prototype,"currentPlacement",2),a([o()],s.prototype,"getOption",2),a([o({type:Boolean,reflect:!0})],s.prototype,"multiple",2),a([o({type:Boolean,reflect:!0})],s.prototype,"useTags",2),a([o({attribute:"max-options-visible",type:Number})],s.prototype,"maxOptionsVisible",2),a([o({type:Boolean,reflect:!0,attribute:"style-on-valid"})],s.prototype,"styleOnValid",2),a([o()],s.prototype,"filter",2),a([o()],s.prototype,"getTag",2),a([f("filter",{waitUntilFirstUpdate:!0})],s.prototype,"handleFilterChange",1),a([f("useTags",{waitUntilFirstUpdate:!0})],s.prototype,"handleUseTagsChange",1),a([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"applySizeToOptions",1),a([f("disabled",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisabledChange",1),a([f("value",{waitUntilFirstUpdate:!0})],s.prototype,"handleValueChange",1),a([f("displayInputValue",{waitUntilFirstUpdate:!0})],s.prototype,"handleDisplayInputValueChange",1),a([f("open",{waitUntilFirstUpdate:!0})],s.prototype,"handleOpenChange",1),s=a([k("sd-4-0-1-combobox")],s);C("combobox.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});C("combobox.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{s as a};
@@ -1 +1 @@
1
- import{a as g,b as m,c as b,d as h,h as i}from"./chunk.3BP4JKVA.js";import{b as d,e as c}from"./chunk.IRWHG2Q4.js";import{e as l}from"./chunk.TJOCV4DC.js";var s=class extends i{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(e){let t=a(e.target);t==null||t.classList.add("sd-4-0-0-button-group__button--focus")}handleBlur(e){let t=a(e.target);t==null||t.classList.remove("sd-4-0-0-button-group__button--focus")}handleMouseOver(e){let t=a(e.target);t==null||t.classList.add("sd-4-0-0-button-group__button--hover")}handleMouseOut(e){let t=a(e.target);t==null||t.classList.remove("sd-4-0-0-button-group__button--hover")}handleSlotChange(){let e=[...this.defaultSlot.assignedElements({flatten:!0})];e.forEach(t=>{let n=e.indexOf(t),o=a(t);o!==null&&(o.classList.add("sd-4-0-0-button-group__button"),o.classList.toggle("sd-4-0-0-button-group__button--first",n===0),o.classList.toggle("sd-4-0-0-button-group__button--inner",n>0&&n<e.length-1),o.classList.toggle("sd-4-0-0-button-group__button--last",n===e.length-1),o.classList.toggle("sd-4-0-0-button-group__button--radio",o.tagName.toLowerCase()==="sd-4-0-0-radio-button"))})}render(){return c`<slot part="base" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};s.styles=[...i.styles,d`:host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],l([h("slot")],s.prototype,"defaultSlot",2),l([b()],s.prototype,"disableRole",2),l([m()],s.prototype,"label",2),s=l([g("sd-4-0-0-button-group")],s);function a(r){var e;let u="sd-4-0-0-button, sd-4-0-0-radio-button";return(e=r.closest(u))!=null?e:r.querySelector(u)}export{s as a};
1
+ import{a as g,b as m,c as b,d as h,h as i}from"./chunk.ERIS2E6E.js";import{b as d,e as c}from"./chunk.IRWHG2Q4.js";import{e as l}from"./chunk.TJOCV4DC.js";var s=class extends i{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(e){let t=a(e.target);t==null||t.classList.add("sd-4-0-1-button-group__button--focus")}handleBlur(e){let t=a(e.target);t==null||t.classList.remove("sd-4-0-1-button-group__button--focus")}handleMouseOver(e){let t=a(e.target);t==null||t.classList.add("sd-4-0-1-button-group__button--hover")}handleMouseOut(e){let t=a(e.target);t==null||t.classList.remove("sd-4-0-1-button-group__button--hover")}handleSlotChange(){let e=[...this.defaultSlot.assignedElements({flatten:!0})];e.forEach(t=>{let n=e.indexOf(t),o=a(t);o!==null&&(o.classList.add("sd-4-0-1-button-group__button"),o.classList.toggle("sd-4-0-1-button-group__button--first",n===0),o.classList.toggle("sd-4-0-1-button-group__button--inner",n>0&&n<e.length-1),o.classList.toggle("sd-4-0-1-button-group__button--last",n===e.length-1),o.classList.toggle("sd-4-0-1-button-group__button--radio",o.tagName.toLowerCase()==="sd-4-0-1-radio-button"))})}render(){return c`<slot part="base" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};s.styles=[...i.styles,d`:host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],l([h("slot")],s.prototype,"defaultSlot",2),l([b()],s.prototype,"disableRole",2),l([m()],s.prototype,"label",2),s=l([g("sd-4-0-1-button-group")],s);function a(r){var e;let u="sd-4-0-1-button, sd-4-0-1-radio-button";return(e=r.closest(u))!=null?e:r.querySelector(u)}export{s as a};