@solid-design-system/components 5.8.0 → 5.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/cdn/chunks/chunk.HRTBCNEN.js +1 -0
  2. package/{cdn-versioned/chunks/chunk.PU5TFXA4.js → cdn/chunks/chunk.PMP4GFXI.js} +1 -1
  3. package/cdn/components/combobox/combobox.js +1 -1
  4. package/cdn/components/dropdown/dropdown.js +1 -1
  5. package/cdn/components/header/header.js +1 -1
  6. package/cdn/components/popup/popup.js +1 -1
  7. package/cdn/components/select/select.js +1 -1
  8. package/cdn/components/tooltip/tooltip.js +1 -1
  9. package/cdn/custom-elements.json +1 -1
  10. package/cdn/solid-components.bundle.js +18 -18
  11. package/cdn/solid-components.iife.js +18 -18
  12. package/cdn/solid-components.js +1 -1
  13. package/cdn/utilities/autocomplete-config.js +1 -1
  14. package/cdn/web-types.json +1 -1
  15. package/cdn-versioned/_components/menu/menu.js +1 -1
  16. package/cdn-versioned/_components/menu/menu.styles.js +1 -1
  17. package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
  18. package/cdn-versioned/chunks/chunk.26O6IKAG.js +1 -1
  19. package/cdn-versioned/chunks/chunk.2JBLGDAG.js +1 -1
  20. package/cdn-versioned/chunks/chunk.3IA4LYAE.js +1 -1
  21. package/cdn-versioned/chunks/chunk.4ND6BT4C.js +1 -1
  22. package/cdn-versioned/chunks/chunk.5P5EXSCE.js +1 -1
  23. package/cdn-versioned/chunks/chunk.6HLS5XU2.js +1 -1
  24. package/cdn-versioned/chunks/chunk.7PAPSYUK.js +1 -1
  25. package/cdn-versioned/chunks/chunk.7UITUXR7.js +1 -1
  26. package/cdn-versioned/chunks/chunk.BUAUXM45.js +1 -1
  27. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  28. package/cdn-versioned/chunks/chunk.DR3XJQRD.js +1 -1
  29. package/cdn-versioned/chunks/chunk.DSA6LS4D.js +1 -1
  30. package/cdn-versioned/chunks/chunk.DU2SXY3R.js +1 -1
  31. package/cdn-versioned/chunks/chunk.DUHPZXXT.js +1 -1
  32. package/cdn-versioned/chunks/chunk.EXZ5YJHN.js +1 -1
  33. package/cdn-versioned/chunks/chunk.FMW27SW2.js +1 -1
  34. package/cdn-versioned/chunks/chunk.FSFMVNRK.js +1 -1
  35. package/cdn-versioned/chunks/chunk.G24RRCWJ.js +1 -1
  36. package/cdn-versioned/chunks/chunk.G7HBP2EA.js +4 -4
  37. package/cdn-versioned/chunks/chunk.HEVVK37Z.js +1 -1
  38. package/cdn-versioned/chunks/chunk.HJWBWAOH.js +1 -1
  39. package/cdn-versioned/chunks/chunk.HK5LV22V.js +1 -1
  40. package/cdn-versioned/chunks/chunk.HRTBCNEN.js +1 -0
  41. package/cdn-versioned/chunks/chunk.IIPOW4BF.js +1 -1
  42. package/cdn-versioned/chunks/chunk.ILZHTUPU.js +1 -1
  43. package/cdn-versioned/chunks/chunk.J2LVZAHB.js +1 -1
  44. package/cdn-versioned/chunks/chunk.J6OZWGFI.js +1 -1
  45. package/cdn-versioned/chunks/chunk.J7EPPTFP.js +1 -1
  46. package/cdn-versioned/chunks/chunk.KGZFLNCL.js +1 -1
  47. package/cdn-versioned/chunks/chunk.KRR6NFHE.js +1 -1
  48. package/cdn-versioned/chunks/chunk.KVHJAQJC.js +1 -1
  49. package/cdn-versioned/chunks/chunk.M7V7LXP2.js +1 -1
  50. package/cdn-versioned/chunks/chunk.NEHO757V.js +1 -1
  51. package/cdn-versioned/chunks/chunk.NVXMW7JA.js +2 -2
  52. package/cdn-versioned/chunks/chunk.OLKTD3H6.js +1 -1
  53. package/{cdn/chunks/chunk.PU5TFXA4.js → cdn-versioned/chunks/chunk.PMP4GFXI.js} +1 -1
  54. package/cdn-versioned/chunks/chunk.QDGET4J7.js +1 -1
  55. package/cdn-versioned/chunks/chunk.QDYCPBH5.js +1 -1
  56. package/cdn-versioned/chunks/chunk.REJ4HJHM.js +1 -1
  57. package/cdn-versioned/chunks/chunk.SABXUHBG.js +1 -1
  58. package/cdn-versioned/chunks/chunk.SV6S6VUZ.js +1 -1
  59. package/cdn-versioned/chunks/chunk.TEMANSX2.js +4 -4
  60. package/cdn-versioned/chunks/chunk.TW4QSRRZ.js +1 -1
  61. package/cdn-versioned/chunks/chunk.UPOUK4YE.js +1 -1
  62. package/cdn-versioned/chunks/chunk.VGYK5BAY.js +1 -1
  63. package/cdn-versioned/chunks/chunk.VY4OJYTU.js +1 -1
  64. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  65. package/cdn-versioned/chunks/chunk.WLNGSSPM.js +1 -1
  66. package/cdn-versioned/chunks/chunk.X2PYZCU7.js +1 -1
  67. package/cdn-versioned/chunks/chunk.XRCG4RJJ.js +1 -1
  68. package/cdn-versioned/chunks/chunk.XRHEUCUN.js +1 -1
  69. package/cdn-versioned/chunks/chunk.XYSFDUN5.js +3 -3
  70. package/cdn-versioned/chunks/chunk.YCMKDACM.js +1 -1
  71. package/cdn-versioned/chunks/chunk.YCO53VY5.js +1 -1
  72. package/cdn-versioned/chunks/chunk.YR2HDSHK.js +1 -1
  73. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  74. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  75. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  76. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  77. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  78. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  79. package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  80. package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  81. package/cdn-versioned/components/button/button.d.ts +1 -1
  82. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  83. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  84. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  85. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  86. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  87. package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
  88. package/cdn-versioned/components/combobox/combobox.js +1 -1
  89. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  90. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  91. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  92. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  93. package/cdn-versioned/components/dropdown/dropdown.js +1 -1
  94. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  95. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  96. package/cdn-versioned/components/header/header.d.ts +1 -1
  97. package/cdn-versioned/components/header/header.js +1 -1
  98. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  99. package/cdn-versioned/components/include/include.d.ts +1 -1
  100. package/cdn-versioned/components/input/input.d.ts +1 -1
  101. package/cdn-versioned/components/link/link.d.ts +1 -1
  102. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  103. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  104. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  105. package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
  106. package/cdn-versioned/components/option/option.d.ts +1 -1
  107. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  108. package/cdn-versioned/components/popup/popup.js +1 -1
  109. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  110. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  111. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  112. package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
  113. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  114. package/cdn-versioned/components/select/select.d.ts +1 -1
  115. package/cdn-versioned/components/select/select.js +1 -1
  116. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  117. package/cdn-versioned/components/step/step.d.ts +1 -1
  118. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  119. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  120. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  121. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  122. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  123. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  124. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  125. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  126. package/cdn-versioned/components/tooltip/tooltip.js +1 -1
  127. package/cdn-versioned/components/video/video.d.ts +1 -1
  128. package/cdn-versioned/custom-elements.json +218 -218
  129. package/cdn-versioned/internal/form.js +3 -3
  130. package/cdn-versioned/solid-components.bundle.js +20 -20
  131. package/cdn-versioned/solid-components.css +2 -2
  132. package/cdn-versioned/solid-components.iife.js +20 -20
  133. package/cdn-versioned/solid-components.js +1 -1
  134. package/cdn-versioned/utilities/autocomplete-config.js +1 -1
  135. package/cdn-versioned/vscode.html-custom-data.json +84 -84
  136. package/cdn-versioned/web-types.json +142 -142
  137. package/dist/chunks/{chunk.7UEOJL4C.js → chunk.357URABG.js} +1 -1
  138. package/dist/components/header/header.js +1 -1
  139. package/dist/custom-elements.json +1 -1
  140. package/dist/solid-components.js +1 -1
  141. package/dist/web-types.json +1 -1
  142. package/dist-versioned/_components/menu/menu.js +1 -1
  143. package/dist-versioned/_components/menu/menu.styles.js +1 -1
  144. package/dist-versioned/_components/menu-item/menu-item.js +2 -2
  145. package/dist-versioned/chunks/chunk.2BDWN26F.js +5 -5
  146. package/dist-versioned/chunks/chunk.2CQI5LE4.js +3 -3
  147. package/dist-versioned/chunks/chunk.2W7NHUH7.js +26 -26
  148. package/dist-versioned/chunks/{chunk.7UEOJL4C.js → chunk.357URABG.js} +2 -2
  149. package/dist-versioned/chunks/chunk.374V27WG.js +1 -1
  150. package/dist-versioned/chunks/chunk.3IFUYWCQ.js +4 -4
  151. package/dist-versioned/chunks/chunk.56KFGJVD.js +1 -1
  152. package/dist-versioned/chunks/chunk.5IM5U5QH.js +6 -6
  153. package/dist-versioned/chunks/chunk.5KVES6PS.js +3 -3
  154. package/dist-versioned/chunks/chunk.5ZNZ5OFS.js +24 -24
  155. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  156. package/dist-versioned/chunks/chunk.7MAASMDW.js +1 -1
  157. package/dist-versioned/chunks/chunk.7ZNUQOKK.js +2 -2
  158. package/dist-versioned/chunks/chunk.AGJBHOHC.js +9 -9
  159. package/dist-versioned/chunks/chunk.BFV6FVEH.js +2 -2
  160. package/dist-versioned/chunks/chunk.BGJVVJYW.js +8 -8
  161. package/dist-versioned/chunks/chunk.BHEBFVOB.js +1 -1
  162. package/dist-versioned/chunks/chunk.C3QUN3CW.js +1 -1
  163. package/dist-versioned/chunks/chunk.CRGWQRUO.js +2 -2
  164. package/dist-versioned/chunks/chunk.CU3SNWRP.js +3 -3
  165. package/dist-versioned/chunks/chunk.DHECGUIH.js +2 -2
  166. package/dist-versioned/chunks/chunk.ECTYRNKF.js +3 -3
  167. package/dist-versioned/chunks/chunk.FAY52O5K.js +5 -5
  168. package/dist-versioned/chunks/chunk.FQ65C655.js +1 -1
  169. package/dist-versioned/chunks/chunk.G7LKDW7D.js +2 -2
  170. package/dist-versioned/chunks/chunk.GRJDOPAS.js +12 -12
  171. package/dist-versioned/chunks/chunk.GWQANU5I.js +3 -3
  172. package/dist-versioned/chunks/chunk.H7FP247H.js +2 -2
  173. package/dist-versioned/chunks/chunk.IUAN7YQ4.js +2 -2
  174. package/dist-versioned/chunks/chunk.J2R4HF6O.js +2 -2
  175. package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
  176. package/dist-versioned/chunks/chunk.L7XW5PYI.js +14 -14
  177. package/dist-versioned/chunks/chunk.NC2M2T2Q.js +4 -4
  178. package/dist-versioned/chunks/chunk.ONBBO64D.js +1 -1
  179. package/dist-versioned/chunks/chunk.PBSF5V4E.js +11 -11
  180. package/dist-versioned/chunks/chunk.PCHDKK7W.js +6 -6
  181. package/dist-versioned/chunks/chunk.PK4OGH3M.js +2 -2
  182. package/dist-versioned/chunks/chunk.PYH33SDH.js +1 -1
  183. package/dist-versioned/chunks/chunk.SO2HIZUP.js +5 -5
  184. package/dist-versioned/chunks/chunk.TQRMINMT.js +2 -2
  185. package/dist-versioned/chunks/chunk.U62FIAJ5.js +1 -1
  186. package/dist-versioned/chunks/chunk.U7SCAMCN.js +2 -2
  187. package/dist-versioned/chunks/chunk.UA3G5555.js +1 -1
  188. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  189. package/dist-versioned/chunks/chunk.UTHJPWMF.js +2 -2
  190. package/dist-versioned/chunks/chunk.VOSWJX2Z.js +6 -6
  191. package/dist-versioned/chunks/chunk.VTMF55NN.js +2 -2
  192. package/dist-versioned/chunks/chunk.WK2T7YB4.js +1 -1
  193. package/dist-versioned/chunks/chunk.X6WRFCHO.js +1 -1
  194. package/dist-versioned/chunks/chunk.XNHIGD4G.js +1 -1
  195. package/dist-versioned/chunks/chunk.XX3FTPX7.js +5 -5
  196. package/dist-versioned/chunks/chunk.ZC5TZTGP.js +3 -3
  197. package/dist-versioned/chunks/chunk.ZD3I7DCU.js +2 -2
  198. package/dist-versioned/chunks/chunk.ZTR5JB55.js +4 -4
  199. package/dist-versioned/chunks/chunk.ZZZHB23N.js +2 -2
  200. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  201. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  202. package/dist-versioned/components/animation/animation.d.ts +1 -1
  203. package/dist-versioned/components/audio/audio.d.ts +1 -1
  204. package/dist-versioned/components/badge/badge.d.ts +1 -1
  205. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  206. package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  207. package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  208. package/dist-versioned/components/button/button.d.ts +1 -1
  209. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  210. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  211. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  212. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  213. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  214. package/dist-versioned/components/combobox/combobox.d.ts +1 -1
  215. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  216. package/dist-versioned/components/divider/divider.d.ts +1 -1
  217. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  218. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  219. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  220. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  221. package/dist-versioned/components/header/header.d.ts +1 -1
  222. package/dist-versioned/components/header/header.js +1 -1
  223. package/dist-versioned/components/icon/icon.d.ts +1 -1
  224. package/dist-versioned/components/include/include.d.ts +1 -1
  225. package/dist-versioned/components/input/input.d.ts +1 -1
  226. package/dist-versioned/components/link/link.d.ts +1 -1
  227. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  228. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  229. package/dist-versioned/components/notification/notification.d.ts +1 -1
  230. package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
  231. package/dist-versioned/components/option/option.d.ts +1 -1
  232. package/dist-versioned/components/popup/popup.d.ts +1 -1
  233. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  234. package/dist-versioned/components/radio/radio.d.ts +1 -1
  235. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  236. package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
  237. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  238. package/dist-versioned/components/select/select.d.ts +1 -1
  239. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  240. package/dist-versioned/components/step/step.d.ts +1 -1
  241. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  242. package/dist-versioned/components/switch/switch.d.ts +1 -1
  243. package/dist-versioned/components/tab/tab.d.ts +1 -1
  244. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  245. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  246. package/dist-versioned/components/tag/tag.d.ts +1 -1
  247. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  248. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  249. package/dist-versioned/components/video/video.d.ts +1 -1
  250. package/dist-versioned/custom-elements.json +218 -218
  251. package/dist-versioned/internal/form.js +3 -3
  252. package/dist-versioned/solid-components.css +2 -2
  253. package/dist-versioned/solid-components.js +1 -1
  254. package/dist-versioned/vscode.html-custom-data.json +84 -84
  255. package/dist-versioned/web-types.json +142 -142
  256. package/package.json +7 -7
  257. package/cdn/chunks/chunk.BMMJQ4XS.js +0 -1
  258. package/cdn-versioned/chunks/chunk.BMMJQ4XS.js +0 -1
@@ -1 +1 @@
1
- import{a as w}from"./chunk.6HO6CE4A.js";import{a as s}from"./chunk.YTG5BN3U.js";import{a as c,b as i}from"./chunk.H2TKMIFR.js";import{a}from"./chunk.26V4EXHB.js";import{a as b}from"./chunk.GHC63SXL.js";import{a as v,b as r,d as m,h}from"./chunk.VGYK5BAY.js";import{b as f}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends h{constructor(){super(...arguments);this.hasSlotController=new w(this,"[default]","description","children");this.localize=new b(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.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?c`summary`:this.separated?c`div`:this.isLink?c`a`:c`button`}render(){let n=this.tag,l=this.isLink,u=this.isButton,o=this.isAccordion,d={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},x=this.vertical?"py-3":"py-2",p=i`<${n} part="base" class="${a("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",this.current&&"font-bold",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-colors duration-fast ease-in-out min-h-[48px] px-4")}" aria-current="${s(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${s(u?this.disabled:void 0)}" href="${s(l?this.href:void 0)}" target="${s(l?this.target:void 0)}" download="${s(l?this.download:void 0)}" rel="${s(l&&this.target?"noreferrer noopener":void 0)}" role="${l?"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="${a("absolute bg-accent left-0 pointer-events-none",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-[calc(100%-16px)] bottom-0 left-2 group-hover:w-full group-hover:left-0",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${a("relative inline-flex justify-between items-center",o?"grow":"w-full",d.description&&"pt-3",d.description||this.separated?"pb-1":x,this.calculatePaddingX)}">${this.divider&&this.vertical?i`<sd-5-8-0-divider part="divider" class="${a("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-5-8-0-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?i`<a class="${a("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px]",!d.description&&"py-4")}" href="${s(l?this.href:void 0)}" target="${s(l?this.target:void 0)}" download="${s(l?this.download:void 0)}"><slot part="content" class="inline-flex"></slot></a>`:i`<slot part="content" class="inline-flex"></slot>`} </span>${(this.chevron||d.children)&&this.vertical?this.separated?i`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-5-8-0-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${a("m-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-5-8-0-icon></button>`:i`<sd-5-8-0-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${a("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-5-8-0-icon>`:""} </span>${d.description&&this.vertical?i`<slot name="description" part="description" class="${a("inline-block text-sm text-left text-black pb-3",o||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX)}"></slot>`:""}</${n}>`;return o?i`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${p}<slot name="children"></slot></details>`:this.separated?i`<div part="details" id="navigation-item-details" class="relative flex flex-col">${p}${this.open?i`<slot name="children"></slot>`:""}</div>`:i`${p}`}};t.styles=[...h.styles,f`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}[part=current-indicator]{--tw-scale-x:0;--tw-scale-y:0;opacity:var(--sd-opacity-0,0);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:var(--sd-duration-fast,.15s);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([current]) [part=current-indicator]{--tw-scale-x:1;--tw-scale-y:1;opacity:var(--sd-opacity-100,1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}`],e([m('a[part="base"], button[part="base"]')],t.prototype,"button",2),e([r({type:Boolean,reflect:!0})],t.prototype,"vertical",2),e([r({type:String,reflect:!0})],t.prototype,"size",2),e([r({reflect:!0})],t.prototype,"href",2),e([r({type:String,reflect:!0})],t.prototype,"target",2),e([r({reflect:!0})],t.prototype,"download",2),e([r({type:Boolean,reflect:!0})],t.prototype,"current",2),e([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([r({type:Boolean,reflect:!0})],t.prototype,"chevron",2),e([r({type:Boolean,reflect:!0})],t.prototype,"relaxed",2),e([r({type:Boolean,reflect:!0})],t.prototype,"divider",2),e([r({type:Boolean,reflect:!0})],t.prototype,"indented",2),e([r({type:Boolean,reflect:!0})],t.prototype,"open",2),e([r({type:Boolean,reflect:!0})],t.prototype,"separated",2),t=e([v("sd-5-8-0-navigation-item")],t);export{t as a};
1
+ import{a as w}from"./chunk.6HO6CE4A.js";import{a as s}from"./chunk.YTG5BN3U.js";import{a as c,b as i}from"./chunk.H2TKMIFR.js";import{a}from"./chunk.26V4EXHB.js";import{a as b}from"./chunk.GHC63SXL.js";import{a as v,b as r,d as m,h}from"./chunk.VGYK5BAY.js";import{b as f}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends h{constructor(){super(...arguments);this.hasSlotController=new w(this,"[default]","description","children");this.localize=new b(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.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?c`summary`:this.separated?c`div`:this.isLink?c`a`:c`button`}render(){let n=this.tag,l=this.isLink,u=this.isButton,o=this.isAccordion,d={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},x=this.vertical?"py-3":"py-2",p=i`<${n} part="base" class="${a("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",this.current&&"font-bold",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-colors duration-fast ease-in-out min-h-[48px] px-4")}" aria-current="${s(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${s(u?this.disabled:void 0)}" href="${s(l?this.href:void 0)}" target="${s(l?this.target:void 0)}" download="${s(l?this.download:void 0)}" rel="${s(l&&this.target?"noreferrer noopener":void 0)}" role="${l?"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="${a("absolute bg-accent left-0 pointer-events-none",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-[calc(100%-16px)] bottom-0 left-2 group-hover:w-full group-hover:left-0",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${a("relative inline-flex justify-between items-center",o?"grow":"w-full",d.description&&"pt-3",d.description||this.separated?"pb-1":x,this.calculatePaddingX)}">${this.divider&&this.vertical?i`<sd-5-8-1-divider part="divider" class="${a("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-5-8-1-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?i`<a class="${a("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px]",!d.description&&"py-4")}" href="${s(l?this.href:void 0)}" target="${s(l?this.target:void 0)}" download="${s(l?this.download:void 0)}"><slot part="content" class="inline-flex"></slot></a>`:i`<slot part="content" class="inline-flex"></slot>`} </span>${(this.chevron||d.children)&&this.vertical?this.separated?i`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-5-8-1-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${a("m-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-5-8-1-icon></button>`:i`<sd-5-8-1-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${a("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-5-8-1-icon>`:""} </span>${d.description&&this.vertical?i`<slot name="description" part="description" class="${a("inline-block text-sm text-left text-black pb-3",o||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX)}"></slot>`:""}</${n}>`;return o?i`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${p}<slot name="children"></slot></details>`:this.separated?i`<div part="details" id="navigation-item-details" class="relative flex flex-col">${p}${this.open?i`<slot name="children"></slot>`:""}</div>`:i`${p}`}};t.styles=[...h.styles,f`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}[part=current-indicator]{--tw-scale-x:0;--tw-scale-y:0;opacity:var(--sd-opacity-0,0);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:var(--sd-duration-fast,.15s);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([current]) [part=current-indicator]{--tw-scale-x:1;--tw-scale-y:1;opacity:var(--sd-opacity-100,1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}`],e([m('a[part="base"], button[part="base"]')],t.prototype,"button",2),e([r({type:Boolean,reflect:!0})],t.prototype,"vertical",2),e([r({type:String,reflect:!0})],t.prototype,"size",2),e([r({reflect:!0})],t.prototype,"href",2),e([r({type:String,reflect:!0})],t.prototype,"target",2),e([r({reflect:!0})],t.prototype,"download",2),e([r({type:Boolean,reflect:!0})],t.prototype,"current",2),e([r({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([r({type:Boolean,reflect:!0})],t.prototype,"chevron",2),e([r({type:Boolean,reflect:!0})],t.prototype,"relaxed",2),e([r({type:Boolean,reflect:!0})],t.prototype,"divider",2),e([r({type:Boolean,reflect:!0})],t.prototype,"indented",2),e([r({type:Boolean,reflect:!0})],t.prototype,"open",2),e([r({type:Boolean,reflect:!0})],t.prototype,"separated",2),t=e([v("sd-5-8-1-navigation-item")],t);export{t as a};
@@ -1 +1 @@
1
- import{a as p}from"./chunk.6HO6CE4A.js";import{a as r}from"./chunk.26V4EXHB.js";import{a as h,b as a,c as d,d as m,h as s}from"./chunk.VGYK5BAY.js";import{b as l,e as n}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends s{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.reversedLayout=!1;this.hasSlotController=new p(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),this.breakpoint===0?this._orientation="horizontal":this.breakpoint===9999?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.updateOrientation()),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(i){super.updated(i),i.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){let i=this.variant==="white border-neutral-400"||this.inset,o={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline")};return n`<div class="${r("flex",{white:"bg-white","white border-neutral-400":"bg-white border border-neutral-400","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],this._orientation==="vertical"&&"flex-col",this._orientation==="horizontal"&&"flex-row gap-8",this._orientation==="horizontal"&&i&&"py-8 px-10")}" part="base"><div style="${this._orientation==="horizontal"?`width: var(--distribution-content, 100%); ${i?"width: var(--distribution-content, calc(100% - 2rem));":""}`:""}" class="${r("flex flex-col text-left order-2",this._orientation==="horizontal"&&"flex flex-col",this._orientation==="vertical"&&i&&"m-4")}" part="content"><div class="flex flex-col-reverse"><div part="headline" class="${r("text-lg font-bold m-0",this.variant==="primary"?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. &lt;h2>)</slot></div><div part="meta" class="${r("gap-2 mb-4",!o["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${r(!o["teaser-has-default"]&&"hidden")}" role="group" aria-labelledby="headline"><slot></slot></div></div><div part="media" id="media" style="${this._orientation==="horizontal"?"width: var(--distribution-media, 100%);":""}" class="${r("order-1",!i&&this._orientation==="vertical"&&"mb-4",!o["teaser-has-media"]&&"hidden",this.variant==="white border-neutral-400"&&this._orientation==="vertical"&&"mx-[-1px] mt-[-1px]",this._orientation!=="vertical"&&this.reversedLayout&&"order-2")}"><slot name="media"></slot></div></div>`}};t.styles=[...s.styles,l`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:var(--sd-spacing-0,0)!important}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({reflect:!0,type:Number})],t.prototype,"breakpoint",2),e([a({type:Boolean,reflect:!0})],t.prototype,"inset",2),e([a({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),e([m('[part="base"]')],t.prototype,"teaser",2),e([d()],t.prototype,"_orientation",2),t=e([h("sd-5-8-0-teaser")],t);export{t as a};
1
+ import{a as p}from"./chunk.6HO6CE4A.js";import{a as r}from"./chunk.26V4EXHB.js";import{a as h,b as a,c as d,d as m,h as s}from"./chunk.VGYK5BAY.js";import{b as l,e as n}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends s{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.reversedLayout=!1;this.hasSlotController=new p(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),this.breakpoint===0?this._orientation="horizontal":this.breakpoint===9999?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.updateOrientation()),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(i){super.updated(i),i.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){let i=this.variant==="white border-neutral-400"||this.inset,o={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline")};return n`<div class="${r("flex",{white:"bg-white","white border-neutral-400":"bg-white border border-neutral-400","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],this._orientation==="vertical"&&"flex-col",this._orientation==="horizontal"&&"flex-row gap-8",this._orientation==="horizontal"&&i&&"py-8 px-10")}" part="base"><div style="${this._orientation==="horizontal"?`width: var(--distribution-content, 100%); ${i?"width: var(--distribution-content, calc(100% - 2rem));":""}`:""}" class="${r("flex flex-col text-left order-2",this._orientation==="horizontal"&&"flex flex-col",this._orientation==="vertical"&&i&&"m-4")}" part="content"><div class="flex flex-col-reverse"><div part="headline" class="${r("text-lg font-bold m-0",this.variant==="primary"?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. &lt;h2>)</slot></div><div part="meta" class="${r("gap-2 mb-4",!o["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${r(!o["teaser-has-default"]&&"hidden")}" role="group" aria-labelledby="headline"><slot></slot></div></div><div part="media" id="media" style="${this._orientation==="horizontal"?"width: var(--distribution-media, 100%);":""}" class="${r("order-1",!i&&this._orientation==="vertical"&&"mb-4",!o["teaser-has-media"]&&"hidden",this.variant==="white border-neutral-400"&&this._orientation==="vertical"&&"mx-[-1px] mt-[-1px]",this._orientation!=="vertical"&&this.reversedLayout&&"order-2")}"><slot name="media"></slot></div></div>`}};t.styles=[...s.styles,l`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:var(--sd-spacing-0,0)!important}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({reflect:!0,type:Number})],t.prototype,"breakpoint",2),e([a({type:Boolean,reflect:!0})],t.prototype,"inset",2),e([a({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),e([m('[part="base"]')],t.prototype,"teaser",2),e([d()],t.prototype,"_orientation",2),t=e([h("sd-5-8-1-teaser")],t);export{t as a};
@@ -7,4 +7,4 @@ import{a as i}from"./chunk.YTG5BN3U.js";import{a as n,b as l}from"./chunk.H2TKMI
7
7
  </svg> `,place:`
8
8
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75">
9
9
  <path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd" />
10
- </svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let s=this.isLink(),o=this.notInteractive?n`div`:s?n`a`:n`button`,d=h(this.marker[this.variant]),m=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return l`<${o} part="base" class="${r("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${i(s?this.href:void 0)}" target="${i(s?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${i(this.notInteractive||s?void 0:"button")}" aria-label="${i(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${i(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${r("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"fill-primary",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${m};-webkit-mask-image:${m}"><div class="${r("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${r("min-w-full min-h-full skew-y-[-11deg]",{cluster:"bg-primary-500",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?l`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${d} ${this.variant==="cluster"?l`<div id="cluster-border" class="${r("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${r("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${o}>`}};t.styles=[...c.styles,v`:host{display:block}#motion-wrapper{mask-position:center;-webkit-mask-position:center;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem)*var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{font-size:calc(var(--sd-font-size-3xl,2rem)*var(--map-marker-scaling,1));margin-top:calc(var(--sd-spacing-2,.5rem)*-1)}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow:drop-shadow(var(--sd-shadow,0px 1px 3px #515151));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host([variant=main]) #marker-circle{height:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));width:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1))}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:String,reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a({type:String,reflect:!0})],t.prototype,"href",2),e([a({type:String,reflect:!0})],t.prototype,"target",2),e([a({reflect:!0})],t.prototype,"label",2),t=e([p("sd-5-8-0-map-marker")],t);export{t as a};
10
+ </svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let s=this.isLink(),o=this.notInteractive?n`div`:s?n`a`:n`button`,d=h(this.marker[this.variant]),m=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return l`<${o} part="base" class="${r("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${i(s?this.href:void 0)}" target="${i(s?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${i(this.notInteractive||s?void 0:"button")}" aria-label="${i(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${i(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${r("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"fill-primary",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${m};-webkit-mask-image:${m}"><div class="${r("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${r("min-w-full min-h-full skew-y-[-11deg]",{cluster:"bg-primary-500",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?l`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${d} ${this.variant==="cluster"?l`<div id="cluster-border" class="${r("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${r("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${o}>`}};t.styles=[...c.styles,v`:host{display:block}#motion-wrapper{mask-position:center;-webkit-mask-position:center;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem)*var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{font-size:calc(var(--sd-font-size-3xl,2rem)*var(--map-marker-scaling,1));margin-top:calc(var(--sd-spacing-2,.5rem)*-1)}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow:drop-shadow(var(--sd-shadow,0px 1px 3px #515151));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host([variant=main]) #marker-circle{height:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));width:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1))}`],e([a({type:String,reflect:!0})],t.prototype,"variant",2),e([a({type:String,reflect:!0})],t.prototype,"state",2),e([a({type:Boolean,reflect:!0})],t.prototype,"animated",2),e([a({type:Boolean,reflect:!0,attribute:"not-interactive"})],t.prototype,"notInteractive",2),e([a({type:String,reflect:!0})],t.prototype,"href",2),e([a({type:String,reflect:!0})],t.prototype,"target",2),e([a({reflect:!0})],t.prototype,"label",2),t=e([p("sd-5-8-1-map-marker")],t);export{t as a};
@@ -8,4 +8,4 @@ import{b as f,c as y}from"./chunk.6HLS5XU2.js";import{a as g}from"./chunk.6HO6CE
8
8
  disabled:text-neutral-500 disabled:border-neutral-500`,tertiary:this.inverted?`${this.visuallyDisabled?"text-neutral-600 hover:text-neutral-600 active:text-neutral-600":"text-white hover:text-primary-100 active:text-primary-200"}
9
9
  disabled:text-neutral-600`:`${this.visuallyDisabled?"text-neutral-500 hover:text-neutral-500 active:text-neutral-500":"text-primary hover:text-primary-500 active:text-primary-800"}
10
10
  disabled:text-neutral-500`,cta:`text-white ${this.visuallyDisabled?"bg-neutral-500 hover:bg-neutral-500 active:bg-neutral-500":"bg-accent-500"}
11
- ${this.inverted?"disabled:bg-neutral-600":"disabled:bg-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${a(r?void 0:this.disabled)}" type="${a(r?void 0:this.type)}" title="${this.title}" name="${a(r?void 0:this.name)}" value="${a(r?void 0:this.value)}" href="${a(r?this.href:void 0)}" target="${a(r?this.target:void 0)}" download="${a(r?this.download:void 0)}" rel="${a(r&&this.target?"noreferrer noopener":void 0)}" role="${a(r?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><div part="motion-wrapper" class="${l("absolute inset-0 rounded-default -z-10 overflow-hidden pointer-events-none ",(this.disabled||this.visuallyDisabled)&&"hidden")}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${l("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div><div class="${l("absolute w-full h-full mt-[22%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div></div></div><slot name="icon-left" part="icon-left" class="${l("flex flex-auto items-center justify-end pointer-events-none",s["icon-only"]&&"hidden",this.loading&&"invisible",s["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${l("inline-flex items-center justify-center",s["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${l("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",s["icon-only"]&&"hidden",s["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?u`<sd-5-8-0-spinner class="${l("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-5-8-0-spinner>`:""}</${o}>`}};t.styles=[...n.styles,c`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto);z-index:0}sd-5-8-0-spinner{--indicator-color:currentColor;--track-color:var(--tw-varcolor-200)}::slotted(sd-5-8-0-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-5-8-0-icon),sd-5-8-0-spinner{font-size:calc(var(--tw-varspacing)/2)}`],e([h("a, button")],t.prototype,"button",2),e([b({selector:"sd-5-8-0-icon"})],t.prototype,"_iconsInDefaultSlot",2),e([p()],t.prototype,"invalid",2),e([i({type:String,reflect:!0})],t.prototype,"title",2),e([i({type:String,reflect:!0})],t.prototype,"variant",2),e([i({type:Boolean,reflect:!0})],t.prototype,"inverted",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:Boolean,reflect:!0})],t.prototype,"loading",2),e([i({type:String,reflect:!0})],t.prototype,"type",2),e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i()],t.prototype,"value",2),e([i({type:String,reflect:!0})],t.prototype,"href",2),e([i({type:String,reflect:!0})],t.prototype,"target",2),e([i({reflect:!0})],t.prototype,"download",2),e([i({reflect:!0})],t.prototype,"form",2),e([i({attribute:"formaction"})],t.prototype,"formAction",2),e([i({attribute:"formenctype"})],t.prototype,"formEnctype",2),e([i({attribute:"formmethod"})],t.prototype,"formMethod",2),e([i({attribute:"formnovalidate",type:Boolean})],t.prototype,"formNoValidate",2),e([i({attribute:"formtarget"})],t.prototype,"formTarget",2),e([v("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=e([m("sd-5-8-0-button")],t);export{t as a};
11
+ ${this.inverted?"disabled:bg-neutral-600":"disabled:bg-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${a(r?void 0:this.disabled)}" type="${a(r?void 0:this.type)}" title="${this.title}" name="${a(r?void 0:this.name)}" value="${a(r?void 0:this.value)}" href="${a(r?this.href:void 0)}" target="${a(r?this.target:void 0)}" download="${a(r?this.download:void 0)}" rel="${a(r&&this.target?"noreferrer noopener":void 0)}" role="${a(r?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><div part="motion-wrapper" class="${l("absolute inset-0 rounded-default -z-10 overflow-hidden pointer-events-none ",(this.disabled||this.visuallyDisabled)&&"hidden")}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${l("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div><div class="${l("absolute w-full h-full mt-[22%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div></div></div><slot name="icon-left" part="icon-left" class="${l("flex flex-auto items-center justify-end pointer-events-none",s["icon-only"]&&"hidden",this.loading&&"invisible",s["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${l("inline-flex items-center justify-center",s["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${l("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",s["icon-only"]&&"hidden",s["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?u`<sd-5-8-1-spinner class="${l("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-5-8-1-spinner>`:""}</${o}>`}};t.styles=[...n.styles,c`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto);z-index:0}sd-5-8-1-spinner{--indicator-color:currentColor;--track-color:var(--tw-varcolor-200)}::slotted(sd-5-8-1-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-5-8-1-icon),sd-5-8-1-spinner{font-size:calc(var(--tw-varspacing)/2)}`],e([h("a, button")],t.prototype,"button",2),e([b({selector:"sd-5-8-1-icon"})],t.prototype,"_iconsInDefaultSlot",2),e([p()],t.prototype,"invalid",2),e([i({type:String,reflect:!0})],t.prototype,"title",2),e([i({type:String,reflect:!0})],t.prototype,"variant",2),e([i({type:Boolean,reflect:!0})],t.prototype,"inverted",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([i({type:Boolean,reflect:!0})],t.prototype,"loading",2),e([i({type:String,reflect:!0})],t.prototype,"type",2),e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i()],t.prototype,"value",2),e([i({type:String,reflect:!0})],t.prototype,"href",2),e([i({type:String,reflect:!0})],t.prototype,"target",2),e([i({reflect:!0})],t.prototype,"download",2),e([i({reflect:!0})],t.prototype,"form",2),e([i({attribute:"formaction"})],t.prototype,"formAction",2),e([i({attribute:"formenctype"})],t.prototype,"formEnctype",2),e([i({attribute:"formmethod"})],t.prototype,"formMethod",2),e([i({attribute:"formnovalidate",type:Boolean})],t.prototype,"formNoValidate",2),e([i({attribute:"formtarget"})],t.prototype,"formTarget",2),e([v("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=e([m("sd-5-8-1-button")],t);export{t as a};
@@ -1 +1 @@
1
- import{a as g,b as m,c as b,d as h,h as i}from"./chunk.VGYK5BAY.js";import{b as d,e as c}from"./chunk.UWPDCU52.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-5-8-0-button-group__button--focus")}handleBlur(e){let t=a(e.target);t==null||t.classList.remove("sd-5-8-0-button-group__button--focus")}handleMouseOver(e){let t=a(e.target);t==null||t.classList.add("sd-5-8-0-button-group__button--hover")}handleMouseOut(e){let t=a(e.target);t==null||t.classList.remove("sd-5-8-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-5-8-0-button-group__button"),o.classList.toggle("sd-5-8-0-button-group__button--first",n===0),o.classList.toggle("sd-5-8-0-button-group__button--inner",n>0&&n<e.length-1),o.classList.toggle("sd-5-8-0-button-group__button--last",n===e.length-1),o.classList.toggle("sd-5-8-0-button-group__button--radio",o.tagName.toLowerCase()==="sd-5-8-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({type:String,reflect:!0})],s.prototype,"label",2),s=l([g("sd-5-8-0-button-group")],s);function a(r){var e;let u="sd-5-8-0-button, sd-5-8-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.VGYK5BAY.js";import{b as d,e as c}from"./chunk.UWPDCU52.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-5-8-1-button-group__button--focus")}handleBlur(e){let t=a(e.target);t==null||t.classList.remove("sd-5-8-1-button-group__button--focus")}handleMouseOver(e){let t=a(e.target);t==null||t.classList.add("sd-5-8-1-button-group__button--hover")}handleMouseOut(e){let t=a(e.target);t==null||t.classList.remove("sd-5-8-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-5-8-1-button-group__button"),o.classList.toggle("sd-5-8-1-button-group__button--first",n===0),o.classList.toggle("sd-5-8-1-button-group__button--inner",n>0&&n<e.length-1),o.classList.toggle("sd-5-8-1-button-group__button--last",n===e.length-1),o.classList.toggle("sd-5-8-1-button-group__button--radio",o.tagName.toLowerCase()==="sd-5-8-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({type:String,reflect:!0})],s.prototype,"label",2),s=l([g("sd-5-8-1-button-group")],s);function a(r){var e;let u="sd-5-8-1-button, sd-5-8-1-radio-button";return(e=r.closest(u))!=null?e:r.querySelector(u)}export{s as a};
@@ -1 +1 @@
1
- import{a as l}from"./chunk.XR2KNB36.js";import{a as s}from"./chunk.E2DRD2OX.js";import{a as y,b as a,f,h as r}from"./chunk.VGYK5BAY.js";import{b as c,e as d}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends r{constructor(){super(...arguments);this.hasStarted=!1;this.name="none";this.play=!1;this.delay=0;this.direction="normal";this.duration=1e3;this.easing="linear";this.endDelay=0;this.fill="auto";this.iterations=1/0;this.iterationStart=0;this.playbackRate=1}get currentTime(){var i,n;return(n=(i=this.animation)==null?void 0:i.currentTime)!=null?n:0}set currentTime(i){this.animation&&(this.animation.currentTime=i)}connectedCallback(){super.connectedCallback(),this.createAnimation(),this.handleAnimationCancel=this.handleAnimationCancel.bind(this),this.handleAnimationFinish=this.handleAnimationFinish.bind(this)}disconnectedCallback(){super.disconnectedCallback(),this.destroyAnimation()}handleAnimationFinish(){this.play=!1,this.hasStarted=!1,this.emit("sd-finish")}handleAnimationCancel(){this.play=!1,this.hasStarted=!1,this.emit("sd-cancel")}handleSlotChange(){this.destroyAnimation(),this.createAnimation()}async createAnimation(){var o,m;let i=(o=l.easings[this.easing])!=null?o:this.easing,n=(m=this.keyframes)!=null?m:l[this.name],h=(await this.defaultSlot).assignedElements()[0];return!h||!n?!1:(this.destroyAnimation(),this.animation=h.animate(n,{delay:this.delay,direction:this.direction,duration:this.duration,easing:i,endDelay:this.endDelay,fill:this.fill,iterationStart:this.iterationStart,iterations:this.iterations}),this.animation.playbackRate=this.playbackRate,this.animation.addEventListener("cancel",this.handleAnimationCancel),this.animation.addEventListener("finish",this.handleAnimationFinish),this.play?(this.hasStarted=!0,this.emit("sd-start")):this.animation.pause(),!0)}destroyAnimation(){this.animation&&(this.animation.cancel(),this.animation.removeEventListener("cancel",this.handleAnimationCancel),this.animation.removeEventListener("finish",this.handleAnimationFinish),this.hasStarted=!1)}handleAnimationChange(){this.hasUpdated&&this.createAnimation()}handlePlayChange(){return this.animation?(this.play&&!this.hasStarted&&(this.hasStarted=!0,this.emit("sd-start")),this.play?this.animation.play():this.animation.pause(),!0):!1}handlePlaybackRateChange(){this.animation&&(this.animation.playbackRate=this.playbackRate)}cancel(){var i;(i=this.animation)==null||i.cancel()}finish(){var i;(i=this.animation)==null||i.finish()}render(){return d`<slot @slotchange="${this.handleSlotChange}"></slot>`}};t.styles=[...r.styles,c`:host{display:contents}`],e([f("slot")],t.prototype,"defaultSlot",2),e([a()],t.prototype,"name",2),e([a({type:Boolean,reflect:!0})],t.prototype,"play",2),e([a({type:Number})],t.prototype,"delay",2),e([a()],t.prototype,"direction",2),e([a({type:Number})],t.prototype,"duration",2),e([a()],t.prototype,"easing",2),e([a({attribute:"end-delay",type:Number})],t.prototype,"endDelay",2),e([a()],t.prototype,"fill",2),e([a({type:Number})],t.prototype,"iterations",2),e([a({attribute:"iteration-start",type:Number})],t.prototype,"iterationStart",2),e([a({attribute:!1})],t.prototype,"keyframes",2),e([a({attribute:"playback-rate",type:Number})],t.prototype,"playbackRate",2),e([s(["name","delay","direction","duration","easing","endDelay","fill","iterations","iterationsStart","keyframes"])],t.prototype,"handleAnimationChange",1),e([s("play")],t.prototype,"handlePlayChange",1),e([s("playbackRate")],t.prototype,"handlePlaybackRateChange",1),t=e([y("sd-5-8-0-animation")],t);export{t as a};
1
+ import{a as l}from"./chunk.XR2KNB36.js";import{a as s}from"./chunk.E2DRD2OX.js";import{a as y,b as a,f,h as r}from"./chunk.VGYK5BAY.js";import{b as c,e as d}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends r{constructor(){super(...arguments);this.hasStarted=!1;this.name="none";this.play=!1;this.delay=0;this.direction="normal";this.duration=1e3;this.easing="linear";this.endDelay=0;this.fill="auto";this.iterations=1/0;this.iterationStart=0;this.playbackRate=1}get currentTime(){var i,n;return(n=(i=this.animation)==null?void 0:i.currentTime)!=null?n:0}set currentTime(i){this.animation&&(this.animation.currentTime=i)}connectedCallback(){super.connectedCallback(),this.createAnimation(),this.handleAnimationCancel=this.handleAnimationCancel.bind(this),this.handleAnimationFinish=this.handleAnimationFinish.bind(this)}disconnectedCallback(){super.disconnectedCallback(),this.destroyAnimation()}handleAnimationFinish(){this.play=!1,this.hasStarted=!1,this.emit("sd-finish")}handleAnimationCancel(){this.play=!1,this.hasStarted=!1,this.emit("sd-cancel")}handleSlotChange(){this.destroyAnimation(),this.createAnimation()}async createAnimation(){var o,m;let i=(o=l.easings[this.easing])!=null?o:this.easing,n=(m=this.keyframes)!=null?m:l[this.name],h=(await this.defaultSlot).assignedElements()[0];return!h||!n?!1:(this.destroyAnimation(),this.animation=h.animate(n,{delay:this.delay,direction:this.direction,duration:this.duration,easing:i,endDelay:this.endDelay,fill:this.fill,iterationStart:this.iterationStart,iterations:this.iterations}),this.animation.playbackRate=this.playbackRate,this.animation.addEventListener("cancel",this.handleAnimationCancel),this.animation.addEventListener("finish",this.handleAnimationFinish),this.play?(this.hasStarted=!0,this.emit("sd-start")):this.animation.pause(),!0)}destroyAnimation(){this.animation&&(this.animation.cancel(),this.animation.removeEventListener("cancel",this.handleAnimationCancel),this.animation.removeEventListener("finish",this.handleAnimationFinish),this.hasStarted=!1)}handleAnimationChange(){this.hasUpdated&&this.createAnimation()}handlePlayChange(){return this.animation?(this.play&&!this.hasStarted&&(this.hasStarted=!0,this.emit("sd-start")),this.play?this.animation.play():this.animation.pause(),!0):!1}handlePlaybackRateChange(){this.animation&&(this.animation.playbackRate=this.playbackRate)}cancel(){var i;(i=this.animation)==null||i.cancel()}finish(){var i;(i=this.animation)==null||i.finish()}render(){return d`<slot @slotchange="${this.handleSlotChange}"></slot>`}};t.styles=[...r.styles,c`:host{display:contents}`],e([f("slot")],t.prototype,"defaultSlot",2),e([a()],t.prototype,"name",2),e([a({type:Boolean,reflect:!0})],t.prototype,"play",2),e([a({type:Number})],t.prototype,"delay",2),e([a()],t.prototype,"direction",2),e([a({type:Number})],t.prototype,"duration",2),e([a()],t.prototype,"easing",2),e([a({attribute:"end-delay",type:Number})],t.prototype,"endDelay",2),e([a()],t.prototype,"fill",2),e([a({type:Number})],t.prototype,"iterations",2),e([a({attribute:"iteration-start",type:Number})],t.prototype,"iterationStart",2),e([a({attribute:!1})],t.prototype,"keyframes",2),e([a({attribute:"playback-rate",type:Number})],t.prototype,"playbackRate",2),e([s(["name","delay","direction","duration","easing","endDelay","fill","iterations","iterationsStart","keyframes"])],t.prototype,"handleAnimationChange",1),e([s("play")],t.prototype,"handlePlayChange",1),e([s("playbackRate")],t.prototype,"handlePlaybackRateChange",1),t=e([y("sd-5-8-1-animation")],t);export{t as a};
@@ -1,4 +1,4 @@
1
- import{a as m,c as f}from"./chunk.SKUMYG4O.js";import{a as v}from"./chunk.KLRPP4NQ.js";import{a as d}from"./chunk.26V4EXHB.js";import{a as x}from"./chunk.GHC63SXL.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as b,b as o,d as n,h as c}from"./chunk.VGYK5BAY.js";import{b as g,e as r}from"./chunk.UWPDCU52.js";import{b as p,c as l,e as u}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends c{constructor(){super(...arguments);this.localize=new x(this);this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction)}get hasCustomTrigger(){return!!this.querySelector("*:not([slot])")}formatDefaultSlot(e){if(!e)return;e.assignedNodes({flatten:!0}).forEach(s=>{var w,y;s.nodeType===Node.TEXT_NODE&&!((w=s==null?void 0:s.textContent)!=null&&w.trim())&&((y=s==null?void 0:s.parentNode)==null||y.removeChild(s))})}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let e=l(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),e)}}handleMouseOut(){if(this.hasTrigger("hover")){let e=l(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),e)}}hasTrigger(e){return this.trigger.split(" ").includes(e)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await u(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:e,options:a}=f(this,"tooltip.show",{dir:this.localize.dir()});await p(this.popup.popup,e,a),this.emit("sd-after-show")}else{this.emit("sd-hide"),await u(this.body);let{keyframes:e,options:a}=f(this,"tooltip.hide",{dir:this.localize.dir()});await p(this.popup.popup,e,a),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,v(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),v(this,"sd-after-hide")}render(){let e=this.placement.endsWith("-start"),a=this.placement.endsWith("-end");return r`<sd-5-8-0-popup part="base" exportparts="
1
+ import{a as m,c as f}from"./chunk.SKUMYG4O.js";import{a as v}from"./chunk.KLRPP4NQ.js";import{a as d}from"./chunk.26V4EXHB.js";import{a as x}from"./chunk.GHC63SXL.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as b,b as o,d as n,h as c}from"./chunk.VGYK5BAY.js";import{b as g,e as r}from"./chunk.UWPDCU52.js";import{b as p,c as l,e as u}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends c{constructor(){super(...arguments);this.localize=new x(this);this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction)}get hasCustomTrigger(){return!!this.querySelector("*:not([slot])")}formatDefaultSlot(e){if(!e)return;e.assignedNodes({flatten:!0}).forEach(s=>{var w,y;s.nodeType===Node.TEXT_NODE&&!((w=s==null?void 0:s.textContent)!=null&&w.trim())&&((y=s==null?void 0:s.parentNode)==null||y.removeChild(s))})}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let e=l(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),e)}}handleMouseOut(){if(this.hasTrigger("hover")){let e=l(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),e)}}hasTrigger(e){return this.trigger.split(" ").includes(e)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await u(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:e,options:a}=f(this,"tooltip.show",{dir:this.localize.dir()});await p(this.popup.popup,e,a),this.emit("sd-after-show")}else{this.emit("sd-hide"),await u(this.body);let{keyframes:e,options:a}=f(this,"tooltip.hide",{dir:this.localize.dir()});await p(this.popup.popup,e,a),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,v(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),v(this,"sd-after-hide")}render(){let e=this.placement.endsWith("-start"),a=this.placement.endsWith("-end");return r`<sd-5-8-1-popup part="base" exportparts="
2
2
  popup:base__popup,
3
3
  arrow:base__arrow
4
- " class="${d(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[e?"start":a?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger?r`<slot slot="anchor"></slot>`:r`<button slot="anchor" aria-describedby="tooltip" class="${d("flex sd-interactive rounded-full",this.size==="lg"?"text-xl":"text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-5-8-0-icon library="_internal" name="info-circle" label="Tooltip" class="${d(this.disabled&&"sd-interactive--disabled")}"></sd-5-8-0-icon></button>`}<slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-5-8-0-popup>`}};t.styles=[...c.styles,g`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-5-8-0-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-5-8-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-5-8-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-5-8-0-popup[placement^=top]::part(popup){transform-origin:bottom}sd-5-8-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}`],i([n("slot:not([name])")],t.prototype,"defaultSlot",2),i([n("#tooltip")],t.prototype,"body",2),i([n("sd-5-8-0-popup")],t.prototype,"popup",2),i([o({type:String,reflect:!0})],t.prototype,"size",2),i([o({type:String,reflect:!0})],t.prototype,"content",2),i([o({type:String,reflect:!0})],t.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([o({type:Boolean,reflect:!0})],t.prototype,"open",2),i([o({type:String,reflect:!0})],t.prototype,"trigger",2),i([o({type:Boolean,reflect:!0})],t.prototype,"hoist",2),i([h("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([h(["content","hoist","placement"])],t.prototype,"handleOptionsChange",1),i([h("disabled")],t.prototype,"handleDisabledChange",1),t=i([b("sd-5-8-0-tooltip")],t);m("tooltip.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});m("tooltip.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{t as a};
4
+ " class="${d(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[e?"start":a?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger?r`<slot slot="anchor"></slot>`:r`<button slot="anchor" aria-describedby="tooltip" class="${d("flex sd-interactive rounded-full",this.size==="lg"?"text-xl":"text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-5-8-1-icon library="_internal" name="info-circle" label="Tooltip" class="${d(this.disabled&&"sd-interactive--disabled")}"></sd-5-8-1-icon></button>`}<slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-5-8-1-popup>`}};t.styles=[...c.styles,g`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-5-8-1-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-5-8-1-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-5-8-1-popup::part(arrow){--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-5-8-1-popup[placement^=top]::part(popup){transform-origin:bottom}sd-5-8-1-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],i([n("slot:not([name])")],t.prototype,"defaultSlot",2),i([n("#tooltip")],t.prototype,"body",2),i([n("sd-5-8-1-popup")],t.prototype,"popup",2),i([o({type:String,reflect:!0})],t.prototype,"size",2),i([o({type:String,reflect:!0})],t.prototype,"content",2),i([o({type:String,reflect:!0})],t.prototype,"placement",2),i([o({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([o({type:Boolean,reflect:!0})],t.prototype,"open",2),i([o({type:String,reflect:!0})],t.prototype,"trigger",2),i([o({type:Boolean,reflect:!0})],t.prototype,"hoist",2),i([h("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([h(["content","hoist","placement"])],t.prototype,"handleOptionsChange",1),i([h("disabled")],t.prototype,"handleDisabledChange",1),t=i([b("sd-5-8-1-tooltip")],t);m("tooltip.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});m("tooltip.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});export{t as a};
@@ -1 +1 @@
1
- import{a as d}from"./chunk.6HO6CE4A.js";import{a as i}from"./chunk.YTG5BN3U.js";import{a as r}from"./chunk.26V4EXHB.js";import{a as h,b as s,d as u,h as o}from"./chunk.VGYK5BAY.js";import{b as a,e as n}from"./chunk.UWPDCU52.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends o{constructor(){super(...arguments);this.hasSlotController=new d(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href="";this.visuallyDisabled=!1}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(l){this.visuallyDisabled&&(l.preventDefault(),l.stopPropagation())}focus(l){this.button.focus(l)}blur(){this.button.blur()}render(){let l={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return n`<a part="base" class="${r("inline",this.href&&!this.visuallyDisabled?"cursor-pointer":"",this.visuallyDisabled?"cursor-not-allowed focus-visible:focus-outline":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline",visuallyDisabled:this.inverted?"text-neutral-600":"text-neutral-500"}[this.href&&!this.visuallyDisabled?"enabled":this.visuallyDisabled?"visuallyDisabled":"disabled"],this.standalone&&"flex items-start")}" href="${i(this.href||void 0)}" target="${i(this.target||void 0)}" download="${i(this.download)}" rel="${i(this.target?"noreferrer noopener":void 0)}" aria-disabled="${!this.href||this.visuallyDisabled?"true":"false"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${r("inline",l["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${r("inline",l["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};e.styles=[...o.styles,a`::slotted(sd-5-8-0-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-5-8-0-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-5-8-0-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],t([u("a")],e.prototype,"button",2),t([s({type:Boolean,reflect:!0})],e.prototype,"standalone",2),t([s({type:String,reflect:!0})],e.prototype,"size",2),t([s({type:Boolean,reflect:!0})],e.prototype,"inverted",2),t([s({type:String,reflect:!0})],e.prototype,"href",2),t([s({type:Boolean,attribute:"visually-disabled",reflect:!0})],e.prototype,"visuallyDisabled",2),t([s({type:String,reflect:!0})],e.prototype,"target",2),t([s({reflect:!0})],e.prototype,"download",2),e=t([h("sd-5-8-0-link")],e);export{e as a};
1
+ import{a as d}from"./chunk.6HO6CE4A.js";import{a as i}from"./chunk.YTG5BN3U.js";import{a as r}from"./chunk.26V4EXHB.js";import{a as h,b as s,d as u,h as o}from"./chunk.VGYK5BAY.js";import{b as a,e as n}from"./chunk.UWPDCU52.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends o{constructor(){super(...arguments);this.hasSlotController=new d(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href="";this.visuallyDisabled=!1}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(l){this.visuallyDisabled&&(l.preventDefault(),l.stopPropagation())}focus(l){this.button.focus(l)}blur(){this.button.blur()}render(){let l={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return n`<a part="base" class="${r("inline",this.href&&!this.visuallyDisabled?"cursor-pointer":"",this.visuallyDisabled?"cursor-not-allowed focus-visible:focus-outline":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline",visuallyDisabled:this.inverted?"text-neutral-600":"text-neutral-500"}[this.href&&!this.visuallyDisabled?"enabled":this.visuallyDisabled?"visuallyDisabled":"disabled"],this.standalone&&"flex items-start")}" href="${i(this.href||void 0)}" target="${i(this.target||void 0)}" download="${i(this.download)}" rel="${i(this.target?"noreferrer noopener":void 0)}" aria-disabled="${!this.href||this.visuallyDisabled?"true":"false"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${r("inline",l["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${r("inline",l["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};e.styles=[...o.styles,a`::slotted(sd-5-8-1-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-5-8-1-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-5-8-1-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],t([u("a")],e.prototype,"button",2),t([s({type:Boolean,reflect:!0})],e.prototype,"standalone",2),t([s({type:String,reflect:!0})],e.prototype,"size",2),t([s({type:Boolean,reflect:!0})],e.prototype,"inverted",2),t([s({type:String,reflect:!0})],e.prototype,"href",2),t([s({type:Boolean,attribute:"visually-disabled",reflect:!0})],e.prototype,"visuallyDisabled",2),t([s({type:String,reflect:!0})],e.prototype,"target",2),t([s({reflect:!0})],e.prototype,"download",2),e=t([h("sd-5-8-1-link")],e);export{e as a};
@@ -1 +1 @@
1
- import{a as o}from"./chunk.MHWW3RZB.js";import{a as s,b as n,d as l,h as a}from"./chunk.VGYK5BAY.js";import{b as r,e as d}from"./chunk.UWPDCU52.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends a{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.updateCalculatedHeight=this.updateCalculatedHeight.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this),window.addEventListener("resize",this.updateCalculatedHeight)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.updateCalculatedHeight)}firstUpdated(){this.updateCalculatedHeight(),this.addResizeObserver()}updated(i){super.updated(i),i.has("fixed")&&this.updateCalculatedHeight()}addResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateCalculatedHeight),this.header&&this.resizeObserver.observe(this.header)}updateCalculatedHeight(){let i=parseFloat(getComputedStyle(document.documentElement).fontSize),h=window.innerHeight/i;this.header&&this.fixed&&h>=32?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.header.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return d`<header class="w-full bg-white relative" role="banner"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}};e.styles=[...a.styles,r`:host{display:block;position:relative;z-index:var(--sd-z-index-header,600)}@media (min-height:32rem){:host([fixed]){padding-bottom:var(--sd-header-calculated-height)}:host([fixed]) header{left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%;--tw-content:"";background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:var(--tw-content)}}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],t([n({reflect:!0,type:Boolean})],e.prototype,"fixed",2),t([l("header")],e.prototype,"header",2),t([o(100)],e.prototype,"updateCalculatedHeight",1),e=t([s("sd-header")],e);export{e as a};
1
+ import{a as l}from"./chunk.MHWW3RZB.js";import{a as s,b as n,d as o,h as a}from"./chunk.VGYK5BAY.js";import{b as r,e as d}from"./chunk.UWPDCU52.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends a{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.updateCalculatedHeight=this.updateCalculatedHeight.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this),window.addEventListener("resize",this.updateCalculatedHeight)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.updateCalculatedHeight)}firstUpdated(){this.updateCalculatedHeight(),this.addResizeObserver()}updated(i){super.updated(i),i.has("fixed")&&this.updateCalculatedHeight()}addResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateCalculatedHeight),this.header&&this.resizeObserver.observe(this.header)}updateCalculatedHeight(){let i=parseFloat(getComputedStyle(document.documentElement).fontSize),h=window.innerHeight/i;this.header&&this.fixed&&h>=32?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.header.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return d`<header class="w-full bg-white relative" role="banner"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}};e.styles=[...a.styles,r`:host{display:block;position:relative;z-index:var(--sd-z-index-header,600)}@media (min-height:32rem){:host([fixed]){padding-bottom:var(--sd-header-calculated-height)!important}:host([fixed]) header{left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%;--tw-content:"";background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:var(--tw-content)}}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],t([n({reflect:!0,type:Boolean})],e.prototype,"fixed",2),t([o("header")],e.prototype,"header",2),t([l(100)],e.prototype,"updateCalculatedHeight",1),e=t([s("sd-5-8-1-header")],e);export{e as a};
@@ -1 +1 @@
1
- import{a as b}from"./chunk.6HO6CE4A.js";import{a as i}from"./chunk.26V4EXHB.js";import{a}from"./chunk.E2DRD2OX.js";import{a as d,b as l,d as c,h as r}from"./chunk.VGYK5BAY.js";import{b as o,e as n}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var u=0,t=class extends r{constructor(){super(...arguments);this.attrId=++u;this.componentId=`sd-5-8-0-tab-${this.attrId}`;this.hasSlotController=new b(this,"left");this.variant="default";this.active=!1;this.disabled=!1;this.visuallyDisabled=!1;this.panel=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){let s=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",s?"true":"false")}focus(s){this.tab.focus(s)}blur(){this.tab.blur()}render(){this.id=this.id.length>0?this.id:this.componentId;let s={left:this.hasSlotController.test("left")};return n`<div part="base" class="${i("inline-flex justify-center min-w-max items-center h-12 px-3 leading-none select-none cursor-pointer group relative focus-visible:focus-outline outline-2 !-outline-offset-2",this.variant==="container"&&" rounded-[4px_4px_0_0]",this.variant==="container"&&this.active&&"tab--active-container-border bg-white",this.disabled||this.visuallyDisabled?"!cursor-not-allowed":"hover:bg-neutral-200")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><div class="${i("flex h-full items-center justify-center whitespace-nowrap",this.disabled||this.visuallyDisabled&&"opacity-50 ")}"><slot name="left" class="${i(s.left&&"block pr-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><slot class="${i(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><div part="active-tab-indicator" class="${i((!this.active||this.disabled)&&"hidden","absolute bottom-0 h-1 bg-accent",this.variant==="default"?"w-full":"w-3/4 group-hover:w-full transition-all duration-200 ease-in-out")}"></div><div part="hover-bottom-border" class="${i(!this.active&&!this.disabled&&"absolute w-full h-0.25 bottom-0 border-b border-neutral-400 invisible group-hover:visible")}"></div></div></div>`}};t.styles=[...r.styles,o`:host{box-sizing:border-box;display:block}.tab--active-container-border:after{border-width:1px;content:"";height:100%;position:absolute;width:100%;--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1));border-bottom:none;border-radius:4px 4px 0 0}`],e([c("[part=base]")],t.prototype,"tab",2),e([l({type:String,reflect:!0})],t.prototype,"variant",2),e([l({type:Boolean,reflect:!0})],t.prototype,"active",2),e([l({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([l({type:String,reflect:!0})],t.prototype,"panel",2),e([a("active")],t.prototype,"handleActiveChange",1),e([a(["disabled","visually-disabled"])],t.prototype,"handleDisabledChange",1),t=e([d("sd-5-8-0-tab")],t);export{t as a};
1
+ import{a as b}from"./chunk.6HO6CE4A.js";import{a as i}from"./chunk.26V4EXHB.js";import{a}from"./chunk.E2DRD2OX.js";import{a as d,b as l,d as c,h as r}from"./chunk.VGYK5BAY.js";import{b as o,e as n}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var u=0,t=class extends r{constructor(){super(...arguments);this.attrId=++u;this.componentId=`sd-5-8-1-tab-${this.attrId}`;this.hasSlotController=new b(this,"left");this.variant="default";this.active=!1;this.disabled=!1;this.visuallyDisabled=!1;this.panel=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){let s=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",s?"true":"false")}focus(s){this.tab.focus(s)}blur(){this.tab.blur()}render(){this.id=this.id.length>0?this.id:this.componentId;let s={left:this.hasSlotController.test("left")};return n`<div part="base" class="${i("inline-flex justify-center min-w-max items-center h-12 px-3 leading-none select-none cursor-pointer group relative focus-visible:focus-outline outline-2 !-outline-offset-2",this.variant==="container"&&" rounded-[4px_4px_0_0]",this.variant==="container"&&this.active&&"tab--active-container-border bg-white",this.disabled||this.visuallyDisabled?"!cursor-not-allowed":"hover:bg-neutral-200")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><div class="${i("flex h-full items-center justify-center whitespace-nowrap",this.disabled||this.visuallyDisabled&&"opacity-50 ")}"><slot name="left" class="${i(s.left&&"block pr-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><slot class="${i(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><div part="active-tab-indicator" class="${i((!this.active||this.disabled)&&"hidden","absolute bottom-0 h-1 bg-accent",this.variant==="default"?"w-full":"w-3/4 group-hover:w-full transition-all duration-200 ease-in-out")}"></div><div part="hover-bottom-border" class="${i(!this.active&&!this.disabled&&"absolute w-full h-0.25 bottom-0 border-b border-neutral-400 invisible group-hover:visible")}"></div></div></div>`}};t.styles=[...r.styles,o`:host{box-sizing:border-box;display:block}.tab--active-container-border:after{border-width:1px;content:"";height:100%;position:absolute;width:100%;--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1));border-bottom:none;border-radius:4px 4px 0 0}`],e([c("[part=base]")],t.prototype,"tab",2),e([l({type:String,reflect:!0})],t.prototype,"variant",2),e([l({type:Boolean,reflect:!0})],t.prototype,"active",2),e([l({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),e([l({type:String,reflect:!0})],t.prototype,"panel",2),e([a("active")],t.prototype,"handleActiveChange",1),e([a(["disabled","visually-disabled"])],t.prototype,"handleDisabledChange",1),t=e([d("sd-5-8-1-tab")],t);export{t as a};
@@ -1,4 +1,4 @@
1
- import{a as k}from"./chunk.BJBQEPZV.js";import{a as T}from"./chunk.C577EOP7.js";import{a as _}from"./chunk.FSFMVNRK.js";import{a as C}from"./chunk.CBQWVOOS.js";import{a as l}from"./chunk.26V4EXHB.js";import{a as A}from"./chunk.GHC63SXL.js";import{a as v}from"./chunk.E2DRD2OX.js";import{a as E,b as p,c as b,d as f,e as $,h as S}from"./chunk.VGYK5BAY.js";import{b as x,e as m}from"./chunk.UWPDCU52.js";import{d as M}from"./chunk.6OTM3PE5.js";import{e as o}from"./chunk.TJOCV4DC.js";function L(u,d,e){let i=t=>Object.is(t,-0)?0:t;return u<d?i(d):u>e?i(e):i(u)}function*I(u,d){if(u!==void 0){let e=0;for(let i of u)yield d(i,e++)}}function*B(u,d,e=1){let i=d===void 0?0:u;d!=null||(d=u);for(let t=i;e>0?t<d:d<t;t+=e)yield t}var r=class extends S{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new C(this,()=>this.next());this.scrollController=new T(this);this.slides=this.getElementsByTagName("sd-5-8-0-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new A(this);this.userInteracted=!1;this.fadeController=new k(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=e=>{e.some(t=>[...t.addedNodes,...t.removedNodes].some(s=>_.isCarouselItem(s)&&!s.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(e,i)=>{e.detail&&i.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(i=>this.addEventListener(i,this.handleUserInteraction));let e=new IntersectionObserver(i=>{i.forEach(t=>{this.intersectionObserverEntries.set(t.target,t);let s=t.target;s.toggleAttribute("inert",!t.isIntersecting),s.classList.toggle("--in-view",t.isIntersecting),s.setAttribute("aria-hidden",t.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=e,e.takeRecords().forEach(i=>{this.intersectionObserverEntries.set(i.target,i)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(e=>this.removeEventListener(e,this.handleUserInteraction)),this.fade&&this.fadeController.disable()}async firstUpdated(){this.initializeSlides(),this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(e,i,t){return Math.ceil((e-i)/t)+1>0?Math.ceil((e-i)/t)+1:1}getCurrentPage(e,i,t,s){return Math.ceil((e-t)/s)-Math.ceil((e-t-i)/s)+1}getSlides({excludeClones:e=!0}={}){return[...this.slides].filter(i=>!e||!i.hasAttribute("data-clone"))}handleKeyDown(e){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)){let i=e.target,t=this.localize.dir()==="rtl",s=i.closest('[part~="pagination-item"]')!==null,n=e.key==="ArrowDown"||!t&&e.key==="ArrowRight"||t&&e.key==="ArrowLeft",h=e.key==="ArrowUp"||!t&&e.key==="ArrowLeft"||t&&e.key==="ArrowRight";e.preventDefault(),h&&this.previous(),n&&this.next(),e.key==="Home"&&this.goToSlide(0),e.key==="End"&&this.goToSlide(this.getSlides().length-1),s&&this.updateComplete.then(()=>{var a;let c=(a=this.shadowRoot)==null?void 0:a.querySelector('[part~="pagination-item--active"]');c&&c.focus()})}}handleScrollEnd(){if(this.fade)return;let e=this.getSlides(),t=[...this.intersectionObserverEntries.values()].find(s=>s.isIntersecting);if(this.loop&&(t!=null&&t.target.hasAttribute("data-clone"))){let s=Number(t.target.getAttribute("data-clone"));this.goToSlide(s,"auto");return}t&&(this.activeSlide=e.indexOf(t.target))}handleFocus(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","polite")}handleBlur(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","off")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){var e,i;this.pausedAutoplay?(this.autoplayController.stop(),(e=this.autoplayControls)==null||e.setAttribute("aria-pressed","false")):this.autoplay&&(this.autoplayController.start(3e3),(i=this.autoplayControls)==null||i.setAttribute("aria-pressed","true"))}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let e=this.getSlides(),i=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((t,s)=>{i.unobserve(t),t.classList.remove("--in-view"),t.classList.remove("--is-active"),t.setAttribute("aria-label",this.localize.term("slideNum",s+1,e.length)),t.hasAttribute("data-clone")&&t.remove()}),this.loop&&!this.fade){let t=this.slidesPerPage,s=e.slice(-t),n=e.slice(0,t);s.reverse().forEach((h,c)=>{let a=h.cloneNode(!0);a.setAttribute("data-clone",String(e.length-c-1)),this.prepend(a)}),n.forEach((h,c)=>{let a=h.cloneNode(!0);a.setAttribute("data-clone",String(c)),this.append(a)})}this.getSlides({excludeClones:!1}).forEach(t=>{i.observe(t)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let e=this.getSlides();e.forEach((s,n)=>{s.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let i=this.getCurrentPage(e.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);this.currentPage!==i&&(this.currentPage=i),this.hasUpdated&&this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:e[this.activeSlide]}});let t=this.getPageCount(e.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>t&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let e=this.getSlides({excludeClones:!1}),i=this.slidesPerMove;e.forEach((t,s)=>{Math.abs(s-i)%i===0?t.style.removeProperty("scroll-snap-align"):t.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(3e3)}previous(e="smooth"){if(this.fade){let s=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(s);return}let i=this.activeSlide||this.activeSlide-this.slidesPerMove,t=!1;for(;!t&&i>0;)i-=1,t=Math.abs(i-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,e):this.goToSlide(i,e)}next(e="smooth"){if(this.fade){let i=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(i);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,e):this.loop&&this.nextTillFirst(e)}nextTillFirst(e="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,e);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(e,i="smooth"){let{slidesPerPage:t,loop:s,scrollContainer:n,fade:h}=this,c=this.getSlides(),a=this.getSlides({excludeClones:!1}),g=(e+c.length)%c.length;if(this.activeSlide=g,h)return;let y=L(e+(s?t:0),0,a.length+1),O=a[y],w=n.getBoundingClientRect(),P=O.getBoundingClientRect();if(n.scrollTo({left:P.left-w.left+n.scrollLeft,top:P.top-w.top+n.scrollTop,behavior:M()?"auto":i}),this.userInteracted&&!this.loop){let z=this.activeSlide===c.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,H=this.activeSlide===0;z?this.previousButton.focus({preventScroll:!0}):H&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:e,slidesPerMove:i}=this,t=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),s=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||s>1,h=this.loop||s<t,c=this.localize.dir()==="ltr";return m`<div part="base" class="${l("carousel h-full w-full")}"><div id="scroll-container" part="scroll-container" class="${l("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${e.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",this.slides.length)}" aria-live="${this.autoplay?"off":"polite"}" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><slot></slot></div><div part="controls" class="${l("w-full flex items-center justify-center relative")}"><div part="navigation" class="${l("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${l("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${n?a=>{this.previous(),this.unblockAutoplay(a,this.previousButton)}:null}"><slot name="previous-icon"><sd-5-8-0-icon class="${l("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${c?"chevron-down":"chevron-up"}"></sd-5-8-0-icon></slot></button> ${this.variant==="dot"?m`<div part="pagination-dot" role="tablist" class="${l("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${I(B(t),a=>{let g=a+1===s;return m`<button part="pagination-item ${g?"pagination-item--active":""}" class="${l("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",g?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${g?"true":"false"}" aria-label="${this.localize.term("goToSlide",a+1,t)}" @click="${y=>{this.goToSlide(a*i),this.unblockAutoplay(y,this.paginationItems[a])}}" @keydown="${this.handleKeyDown}"><span class="${l("h-4 w-4 block border hover:border-primary-500 rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"border-white hover:border-primary-500":"border-primary",g&&"bg-accent border-none",g?this.inverted?"hover:bg-accent-300":"hover:bg-accent-550":"")}"></span></button>`})}</div>`:m`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${l("w-5 text-center border-b-2 border-accent",this.inverted?"text-white":"text-black")}">${s}</span> <span part="pagination-divider" class="${l("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${l("w-5 text-center",this.inverted?"text-white":"text-black")}">${t}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!h}" class="${l("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!h&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${h?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${h?a=>{this.next(),this.unblockAutoplay(a,this.nextButton)}:null}"><slot name="next-icon"><sd-5-8-0-icon class="${l("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${c?"chevron-up":"chevron-down"}"></sd-5-8-0-icon></slot></button></div><button class="${l("ml-6 !rounded-sm","!absolute !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.localize.term("autoplay")}" aria-pressed="true" @click="${a=>{this.pausedAutoplay=!this.pausedAutoplay,a.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${l(this.pausedAutoplay?"":"hidden")}"><sd-5-8-0-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-5-8-0-icon></slot><slot name="autoplay-pause" class="${l(this.pausedAutoplay?"hidden":"")}"><sd-5-8-0-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-5-8-0-icon></slot></button></div></div>`}};r.styles=[...S.styles,x`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{display:block;height:var(--carousel-height);overflow:hidden;position:relative}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-5-8-0-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`],o([f('[part~="autoplay-controls"]')],r.prototype,"autoplayControls",2),o([f('[part~="navigation-button--previous"]')],r.prototype,"previousButton",2),o([f('[part~="navigation-button--next"]')],r.prototype,"nextButton",2),o([$('[part~="pagination-item"]')],r.prototype,"paginationItems",2),o([p({type:String,reflect:!0})],r.prototype,"variant",2),o([p({type:Boolean,reflect:!0})],r.prototype,"inverted",2),o([p({type:Boolean,reflect:!0})],r.prototype,"loop",2),o([p({type:Boolean,reflect:!0})],r.prototype,"autoplay",2),o([p({type:Boolean,reflect:!0})],r.prototype,"fade",2),o([p({type:Number,attribute:"slides-per-page",reflect:!0})],r.prototype,"slidesPerPage",2),o([p({type:Number,attribute:"slides-per-move",reflect:!0})],r.prototype,"slidesPerMove",2),o([f("slot:not([name])")],r.prototype,"defaultSlot",2),o([f(".carousel__slides")],r.prototype,"scrollContainer",2),o([f(".carousel__pagination")],r.prototype,"paginationContainer",2),o([b()],r.prototype,"activeSlide",2),o([b()],r.prototype,"currentPage",2),o([b()],r.prototype,"pausedAutoplay",2),o([v("pausedAutoplay")],r.prototype,"handlePausedAutoplay",1),o([v("fade",{waitUntilFirstUpdate:!0})],r.prototype,"handleFadeChange",1),o([v("loop",{waitUntilFirstUpdate:!0}),v("slidesPerPage",{waitUntilFirstUpdate:!0})],r.prototype,"initializeSlides",1),o([v("activeSlide")],r.prototype,"handleSlideChange",1),o([v("slidesPerMove")],r.prototype,"handleSlidesPerMoveChange",1),o([v("autoplay")],r.prototype,"handleAutoplayChange",1),r=o([E("sd-5-8-0-carousel")],r);export{r as a};
1
+ import{a as k}from"./chunk.BJBQEPZV.js";import{a as T}from"./chunk.C577EOP7.js";import{a as _}from"./chunk.FSFMVNRK.js";import{a as C}from"./chunk.CBQWVOOS.js";import{a as l}from"./chunk.26V4EXHB.js";import{a as A}from"./chunk.GHC63SXL.js";import{a as v}from"./chunk.E2DRD2OX.js";import{a as E,b as p,c as b,d as f,e as $,h as S}from"./chunk.VGYK5BAY.js";import{b as x,e as m}from"./chunk.UWPDCU52.js";import{d as M}from"./chunk.6OTM3PE5.js";import{e as o}from"./chunk.TJOCV4DC.js";function L(u,d,e){let i=t=>Object.is(t,-0)?0:t;return u<d?i(d):u>e?i(e):i(u)}function*I(u,d){if(u!==void 0){let e=0;for(let i of u)yield d(i,e++)}}function*B(u,d,e=1){let i=d===void 0?0:u;d!=null||(d=u);for(let t=i;e>0?t<d:d<t;t+=e)yield t}var r=class extends S{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new C(this,()=>this.next());this.scrollController=new T(this);this.slides=this.getElementsByTagName("sd-5-8-1-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new A(this);this.userInteracted=!1;this.fadeController=new k(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=e=>{e.some(t=>[...t.addedNodes,...t.removedNodes].some(s=>_.isCarouselItem(s)&&!s.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(e,i)=>{e.detail&&i.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(i=>this.addEventListener(i,this.handleUserInteraction));let e=new IntersectionObserver(i=>{i.forEach(t=>{this.intersectionObserverEntries.set(t.target,t);let s=t.target;s.toggleAttribute("inert",!t.isIntersecting),s.classList.toggle("--in-view",t.isIntersecting),s.setAttribute("aria-hidden",t.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=e,e.takeRecords().forEach(i=>{this.intersectionObserverEntries.set(i.target,i)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(e=>this.removeEventListener(e,this.handleUserInteraction)),this.fade&&this.fadeController.disable()}async firstUpdated(){this.initializeSlides(),this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(e,i,t){return Math.ceil((e-i)/t)+1>0?Math.ceil((e-i)/t)+1:1}getCurrentPage(e,i,t,s){return Math.ceil((e-t)/s)-Math.ceil((e-t-i)/s)+1}getSlides({excludeClones:e=!0}={}){return[...this.slides].filter(i=>!e||!i.hasAttribute("data-clone"))}handleKeyDown(e){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key)){let i=e.target,t=this.localize.dir()==="rtl",s=i.closest('[part~="pagination-item"]')!==null,n=e.key==="ArrowDown"||!t&&e.key==="ArrowRight"||t&&e.key==="ArrowLeft",h=e.key==="ArrowUp"||!t&&e.key==="ArrowLeft"||t&&e.key==="ArrowRight";e.preventDefault(),h&&this.previous(),n&&this.next(),e.key==="Home"&&this.goToSlide(0),e.key==="End"&&this.goToSlide(this.getSlides().length-1),s&&this.updateComplete.then(()=>{var a;let c=(a=this.shadowRoot)==null?void 0:a.querySelector('[part~="pagination-item--active"]');c&&c.focus()})}}handleScrollEnd(){if(this.fade)return;let e=this.getSlides(),t=[...this.intersectionObserverEntries.values()].find(s=>s.isIntersecting);if(this.loop&&(t!=null&&t.target.hasAttribute("data-clone"))){let s=Number(t.target.getAttribute("data-clone"));this.goToSlide(s,"auto");return}t&&(this.activeSlide=e.indexOf(t.target))}handleFocus(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","polite")}handleBlur(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","off")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){var e,i;this.pausedAutoplay?(this.autoplayController.stop(),(e=this.autoplayControls)==null||e.setAttribute("aria-pressed","false")):this.autoplay&&(this.autoplayController.start(3e3),(i=this.autoplayControls)==null||i.setAttribute("aria-pressed","true"))}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let e=this.getSlides(),i=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((t,s)=>{i.unobserve(t),t.classList.remove("--in-view"),t.classList.remove("--is-active"),t.setAttribute("aria-label",this.localize.term("slideNum",s+1,e.length)),t.hasAttribute("data-clone")&&t.remove()}),this.loop&&!this.fade){let t=this.slidesPerPage,s=e.slice(-t),n=e.slice(0,t);s.reverse().forEach((h,c)=>{let a=h.cloneNode(!0);a.setAttribute("data-clone",String(e.length-c-1)),this.prepend(a)}),n.forEach((h,c)=>{let a=h.cloneNode(!0);a.setAttribute("data-clone",String(c)),this.append(a)})}this.getSlides({excludeClones:!1}).forEach(t=>{i.observe(t)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let e=this.getSlides();e.forEach((s,n)=>{s.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let i=this.getCurrentPage(e.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);this.currentPage!==i&&(this.currentPage=i),this.hasUpdated&&this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:e[this.activeSlide]}});let t=this.getPageCount(e.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>t&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let e=this.getSlides({excludeClones:!1}),i=this.slidesPerMove;e.forEach((t,s)=>{Math.abs(s-i)%i===0?t.style.removeProperty("scroll-snap-align"):t.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(3e3)}previous(e="smooth"){if(this.fade){let s=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(s);return}let i=this.activeSlide||this.activeSlide-this.slidesPerMove,t=!1;for(;!t&&i>0;)i-=1,t=Math.abs(i-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,e):this.goToSlide(i,e)}next(e="smooth"){if(this.fade){let i=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(i);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,e):this.loop&&this.nextTillFirst(e)}nextTillFirst(e="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,e);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(e,i="smooth"){let{slidesPerPage:t,loop:s,scrollContainer:n,fade:h}=this,c=this.getSlides(),a=this.getSlides({excludeClones:!1}),g=(e+c.length)%c.length;if(this.activeSlide=g,h)return;let y=L(e+(s?t:0),0,a.length+1),O=a[y],w=n.getBoundingClientRect(),P=O.getBoundingClientRect();if(n.scrollTo({left:P.left-w.left+n.scrollLeft,top:P.top-w.top+n.scrollTop,behavior:M()?"auto":i}),this.userInteracted&&!this.loop){let z=this.activeSlide===c.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,H=this.activeSlide===0;z?this.previousButton.focus({preventScroll:!0}):H&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:e,slidesPerMove:i}=this,t=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),s=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||s>1,h=this.loop||s<t,c=this.localize.dir()==="ltr";return m`<div part="base" class="${l("carousel h-full w-full")}"><div id="scroll-container" part="scroll-container" class="${l("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${e.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",this.slides.length)}" aria-live="${this.autoplay?"off":"polite"}" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><slot></slot></div><div part="controls" class="${l("w-full flex items-center justify-center relative")}"><div part="navigation" class="${l("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${l("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${n?a=>{this.previous(),this.unblockAutoplay(a,this.previousButton)}:null}"><slot name="previous-icon"><sd-5-8-1-icon class="${l("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${c?"chevron-down":"chevron-up"}"></sd-5-8-1-icon></slot></button> ${this.variant==="dot"?m`<div part="pagination-dot" role="tablist" class="${l("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${I(B(t),a=>{let g=a+1===s;return m`<button part="pagination-item ${g?"pagination-item--active":""}" class="${l("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",g?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${g?"true":"false"}" aria-label="${this.localize.term("goToSlide",a+1,t)}" @click="${y=>{this.goToSlide(a*i),this.unblockAutoplay(y,this.paginationItems[a])}}" @keydown="${this.handleKeyDown}"><span class="${l("h-4 w-4 block border hover:border-primary-500 rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"border-white hover:border-primary-500":"border-primary",g&&"bg-accent border-none",g?this.inverted?"hover:bg-accent-300":"hover:bg-accent-550":"")}"></span></button>`})}</div>`:m`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${l("w-5 text-center border-b-2 border-accent",this.inverted?"text-white":"text-black")}">${s}</span> <span part="pagination-divider" class="${l("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${l("w-5 text-center",this.inverted?"text-white":"text-black")}">${t}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!h}" class="${l("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!h&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${h?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${h?a=>{this.next(),this.unblockAutoplay(a,this.nextButton)}:null}"><slot name="next-icon"><sd-5-8-1-icon class="${l("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${c?"chevron-up":"chevron-down"}"></sd-5-8-1-icon></slot></button></div><button class="${l("ml-6 !rounded-sm","!absolute !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.localize.term("autoplay")}" aria-pressed="true" @click="${a=>{this.pausedAutoplay=!this.pausedAutoplay,a.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${l(this.pausedAutoplay?"":"hidden")}"><sd-5-8-1-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-5-8-1-icon></slot><slot name="autoplay-pause" class="${l(this.pausedAutoplay?"hidden":"")}"><sd-5-8-1-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-5-8-1-icon></slot></button></div></div>`}};r.styles=[...S.styles,x`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{display:block;height:var(--carousel-height);overflow:hidden;position:relative}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-5-8-1-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`],o([f('[part~="autoplay-controls"]')],r.prototype,"autoplayControls",2),o([f('[part~="navigation-button--previous"]')],r.prototype,"previousButton",2),o([f('[part~="navigation-button--next"]')],r.prototype,"nextButton",2),o([$('[part~="pagination-item"]')],r.prototype,"paginationItems",2),o([p({type:String,reflect:!0})],r.prototype,"variant",2),o([p({type:Boolean,reflect:!0})],r.prototype,"inverted",2),o([p({type:Boolean,reflect:!0})],r.prototype,"loop",2),o([p({type:Boolean,reflect:!0})],r.prototype,"autoplay",2),o([p({type:Boolean,reflect:!0})],r.prototype,"fade",2),o([p({type:Number,attribute:"slides-per-page",reflect:!0})],r.prototype,"slidesPerPage",2),o([p({type:Number,attribute:"slides-per-move",reflect:!0})],r.prototype,"slidesPerMove",2),o([f("slot:not([name])")],r.prototype,"defaultSlot",2),o([f(".carousel__slides")],r.prototype,"scrollContainer",2),o([f(".carousel__pagination")],r.prototype,"paginationContainer",2),o([b()],r.prototype,"activeSlide",2),o([b()],r.prototype,"currentPage",2),o([b()],r.prototype,"pausedAutoplay",2),o([v("pausedAutoplay")],r.prototype,"handlePausedAutoplay",1),o([v("fade",{waitUntilFirstUpdate:!0})],r.prototype,"handleFadeChange",1),o([v("loop",{waitUntilFirstUpdate:!0}),v("slidesPerPage",{waitUntilFirstUpdate:!0})],r.prototype,"initializeSlides",1),o([v("activeSlide")],r.prototype,"handleSlideChange",1),o([v("slidesPerMove")],r.prototype,"handleSlidesPerMoveChange",1),o([v("autoplay")],r.prototype,"handleAutoplayChange",1),r=o([E("sd-5-8-1-carousel")],r);export{r as a};
2
2
  /*! Bundled license information:
3
3
 
4
4
  lit-html/directives/map.js:
@@ -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.VGYK5BAY.js";import{b as l,e as c}from"./chunk.UWPDCU52.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({reflect:!0})],t.prototype,"src",2),s([o({type:String,reflect:!0})],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean,reflect:!0})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([m("sd-5-8-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.VGYK5BAY.js";import{b as l,e as c}from"./chunk.UWPDCU52.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({reflect:!0})],t.prototype,"src",2),s([o({type:String,reflect:!0})],t.prototype,"mode",2),s([o({attribute:"allow-scripts",type:Boolean,reflect:!0})],t.prototype,"allowScripts",2),s([p("src")],t.prototype,"handleSrcChange",1),t=s([m("sd-5-8-1-include")],t);export{t as a};
@@ -1 +1 @@
1
- import{a as h}from"./chunk.YTG5BN3U.js";import{a as f}from"./chunk.GHC63SXL.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as o,b as r,d as c,h as i}from"./chunk.VGYK5BAY.js";import{b as a,e as l}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends i{constructor(){super(...arguments);this.localize=new f(this);this.href="";this.current=!1}handleCurrentChange(){var n,s;!this.base||!this.current||(s=(n=this.base.shadowRoot)==null?void 0:n.querySelector("a"))==null||s.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return l`<sd-5-8-0-link part="base" href="${h(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-5-8-0-link>`}};t.styles=[...i.styles,a`:host{align-items:center;display:inline-flex}sd-5-8-0-link::part(base){align-items:center}sd-5-8-0-link::part(icon-left){display:inline-flex;margin-right:var(--sd-spacing-0,0)}sd-5-8-0-link sd-5-8-0-icon{margin:var(--sd-spacing-0,0)}:host([current]) sd-5-8-0-link::part(base){--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-700,104 104 104)/var(--tw-text-opacity,1))}:host([current]) sd-5-8-0-link::part(label){text-decoration-line:none}`],e([c('[part="base"]')],t.prototype,"base",2),e([r({type:String,reflect:!0})],t.prototype,"href",2),e([r({type:String,reflect:!0})],t.prototype,"target",2),e([r({type:Boolean,reflect:!0})],t.prototype,"current",2),e([p("current")],t.prototype,"handleCurrentChange",1),t=e([o("sd-5-8-0-breadcrumb-item")],t);export{t as a};
1
+ import{a as h}from"./chunk.YTG5BN3U.js";import{a as f}from"./chunk.GHC63SXL.js";import{a as p}from"./chunk.E2DRD2OX.js";import{a as o,b as r,d as c,h as i}from"./chunk.VGYK5BAY.js";import{b as a,e as l}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends i{constructor(){super(...arguments);this.localize=new f(this);this.href="";this.current=!1}handleCurrentChange(){var n,s;!this.base||!this.current||(s=(n=this.base.shadowRoot)==null?void 0:n.querySelector("a"))==null||s.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return l`<sd-5-8-1-link part="base" href="${h(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-5-8-1-link>`}};t.styles=[...i.styles,a`:host{align-items:center;display:inline-flex}sd-5-8-1-link::part(base){align-items:center}sd-5-8-1-link::part(icon-left){display:inline-flex;margin-right:var(--sd-spacing-0,0)}sd-5-8-1-link sd-5-8-1-icon{margin:var(--sd-spacing-0,0)}:host([current]) sd-5-8-1-link::part(base){--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-700,104 104 104)/var(--tw-text-opacity,1))}:host([current]) sd-5-8-1-link::part(label){text-decoration-line:none}`],e([c('[part="base"]')],t.prototype,"base",2),e([r({type:String,reflect:!0})],t.prototype,"href",2),e([r({type:String,reflect:!0})],t.prototype,"target",2),e([r({type:Boolean,reflect:!0})],t.prototype,"current",2),e([p("current")],t.prototype,"handleCurrentChange",1),t=e([o("sd-5-8-1-breadcrumb-item")],t);export{t as a};
@@ -1 +1 @@
1
- import{a as k}from"./chunk.HJWBWAOH.js";import{b,c as C,d as x,e as E}from"./chunk.6HLS5XU2.js";import{a as V}from"./chunk.6HO6CE4A.js";import{a as u}from"./chunk.26V4EXHB.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as y,b as r,c,d as m,h as p}from"./chunk.VGYK5BAY.js";import{b as v,e as h}from"./chunk.UWPDCU52.js";import{e as o}from"./chunk.TJOCV4DC.js";var s=class extends p{constructor(){super(...arguments);this.formControlController=new b(this);this.hasSlotController=new V(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.helpText="";this.boldLabel=!1;this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?E:t?x:C}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-5-8-0-radio, sd-5-8-0-radio-button")]}handleRadioClick(t){let e=t.target.closest("sd-5-8-0-radio, sd-5-8-0-radio-button"),a=this.getAllRadios(),i=this.value;e.disabled||(this.value=e.value,a.forEach(n=>n.checked=n===e),this.value!==i&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){var g;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(d=>!d.disabled),a=(g=e.find(d=>d.checked))!=null?g:e[0],i=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,n=this.value,l=e.indexOf(a)+i;l<0&&(l=e.length-1),l>e.length-1&&(l=0),this.getAllRadios().forEach(d=>{d.checked=!1,this.hasButtonGroup||(d.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!==n&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios(),a=t.find(i=>i.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 i=>{await i.updateComplete,i.checked=i.value===this.value,i.size=this.size,i instanceof k&&(i.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(i=>i.tagName.toLowerCase()==="sd-5-8-0-radio-button"),!t.some(i=>i.checked))if(this.hasButtonGroup){let i=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");i&&(i.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let i=(a=this.shadowRoot)==null?void 0:a.querySelector("sd-5-8-0-button-group");i&&(i.disableRole=!0)}}syncRadios(){if(customElements.get("sd-5-8-0-radio")&&customElements.get("sd-5-8-0-radio-button")){this.syncRadioElements();return}customElements.get("sd-5-8-0-radio")?this.syncRadioElements():customElements.whenDefined("sd-5-8-0-radio").then(()=>this.syncRadios()),customElements.get("sd-5-8-0-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-5-8-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=this.hasSlotController.test("help-text"),i=this.helpText?!0:!!a,n=this.hasSlotController.test("tooltip"),l=h`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return h`<fieldset part="form-control" class="${u("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">${e||n?h`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${u("p-0 leading-normal text-black text-left",e?"flex":"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend>${n?h`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${u("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?h`<sd-5-8-0-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${l}</sd-5-8-0-button-group>`:l}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${u("text-sm text-neutral-700 mt-2",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot>${this.formControlController.renderInvalidMessage()}`}};s.styles=[...p.styles,v`:host{display:block}:host([orientation=vertical]) ::slotted(sd-5-8-0-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-5-8-0-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-5-8-0-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-5-8-0-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-5-8-0-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-5-8-0-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}`],o([m("slot:not([name])")],s.prototype,"defaultSlot",2),o([m("#validation-input")],s.prototype,"validationInput",2),o([m("#invalid-message")],s.prototype,"invalidMessage",2),o([c()],s.prototype,"hasButtonGroup",2),o([c()],s.prototype,"defaultValue",2),o([c()],s.prototype,"showInvalidStyle",2),o([r({type:String,reflect:!0})],s.prototype,"size",2),o([r({type:Boolean,reflect:!0})],s.prototype,"required",2),o([r({type:String,reflect:!0})],s.prototype,"orientation",2),o([r({type:String,reflect:!0})],s.prototype,"label",2),o([r({type:String,attribute:"help-text",reflect:!0})],s.prototype,"helpText",2),o([r({type:Boolean,reflect:!0})],s.prototype,"boldLabel",2),o([r({type:String,reflect:!0})],s.prototype,"name",2),o([r()],s.prototype,"value",2),o([r({type:String,reflect:!0})],s.prototype,"form",2),o([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"handleSizeChange",1),o([f("showInvalidStyle",{waitUntilFirstUpdate:!0})],s.prototype,"handleInvalidChange",1),o([f("value")],s.prototype,"handleValueChange",1),s=o([y("sd-5-8-0-radio-group")],s);export{s as a};
1
+ import{a as k}from"./chunk.HJWBWAOH.js";import{b,c as C,d as x,e as E}from"./chunk.6HLS5XU2.js";import{a as V}from"./chunk.6HO6CE4A.js";import{a as u}from"./chunk.26V4EXHB.js";import{a as f}from"./chunk.E2DRD2OX.js";import{a as y,b as r,c,d as m,h as p}from"./chunk.VGYK5BAY.js";import{b as v,e as h}from"./chunk.UWPDCU52.js";import{e as o}from"./chunk.TJOCV4DC.js";var s=class extends p{constructor(){super(...arguments);this.formControlController=new b(this);this.hasSlotController=new V(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.helpText="";this.boldLabel=!1;this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?E:t?x:C}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-5-8-1-radio, sd-5-8-1-radio-button")]}handleRadioClick(t){let e=t.target.closest("sd-5-8-1-radio, sd-5-8-1-radio-button"),a=this.getAllRadios(),i=this.value;e.disabled||(this.value=e.value,a.forEach(n=>n.checked=n===e),this.value!==i&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){var g;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(d=>!d.disabled),a=(g=e.find(d=>d.checked))!=null?g:e[0],i=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,n=this.value,l=e.indexOf(a)+i;l<0&&(l=e.length-1),l>e.length-1&&(l=0),this.getAllRadios().forEach(d=>{d.checked=!1,this.hasButtonGroup||(d.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!==n&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios(),a=t.find(i=>i.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 i=>{await i.updateComplete,i.checked=i.value===this.value,i.size=this.size,i instanceof k&&(i.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(i=>i.tagName.toLowerCase()==="sd-5-8-1-radio-button"),!t.some(i=>i.checked))if(this.hasButtonGroup){let i=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");i&&(i.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let i=(a=this.shadowRoot)==null?void 0:a.querySelector("sd-5-8-1-button-group");i&&(i.disableRole=!0)}}syncRadios(){if(customElements.get("sd-5-8-1-radio")&&customElements.get("sd-5-8-1-radio-button")){this.syncRadioElements();return}customElements.get("sd-5-8-1-radio")?this.syncRadioElements():customElements.whenDefined("sd-5-8-1-radio").then(()=>this.syncRadios()),customElements.get("sd-5-8-1-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-5-8-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=this.hasSlotController.test("help-text"),i=this.helpText?!0:!!a,n=this.hasSlotController.test("tooltip"),l=h`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return h`<fieldset part="form-control" class="${u("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">${e||n?h`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${u("p-0 leading-normal text-black text-left",e?"flex":"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend>${n?h`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${u("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?h`<sd-5-8-1-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${l}</sd-5-8-1-button-group>`:l}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${u("text-sm text-neutral-700 mt-2",i?"block":"hidden")}" aria-hidden="${!i}">${this.helpText}</slot>${this.formControlController.renderInvalidMessage()}`}};s.styles=[...p.styles,v`:host{display:block}:host([orientation=vertical]) ::slotted(sd-5-8-1-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-5-8-1-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-5-8-1-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-5-8-1-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-5-8-1-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-5-8-1-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}`],o([m("slot:not([name])")],s.prototype,"defaultSlot",2),o([m("#validation-input")],s.prototype,"validationInput",2),o([m("#invalid-message")],s.prototype,"invalidMessage",2),o([c()],s.prototype,"hasButtonGroup",2),o([c()],s.prototype,"defaultValue",2),o([c()],s.prototype,"showInvalidStyle",2),o([r({type:String,reflect:!0})],s.prototype,"size",2),o([r({type:Boolean,reflect:!0})],s.prototype,"required",2),o([r({type:String,reflect:!0})],s.prototype,"orientation",2),o([r({type:String,reflect:!0})],s.prototype,"label",2),o([r({type:String,attribute:"help-text",reflect:!0})],s.prototype,"helpText",2),o([r({type:Boolean,reflect:!0})],s.prototype,"boldLabel",2),o([r({type:String,reflect:!0})],s.prototype,"name",2),o([r()],s.prototype,"value",2),o([r({type:String,reflect:!0})],s.prototype,"form",2),o([f("size",{waitUntilFirstUpdate:!0})],s.prototype,"handleSizeChange",1),o([f("showInvalidStyle",{waitUntilFirstUpdate:!0})],s.prototype,"handleInvalidChange",1),o([f("value")],s.prototype,"handleValueChange",1),s=o([y("sd-5-8-1-radio-group")],s);export{s as a};