@solid-design-system/components 4.0.6 → 4.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (255) hide show
  1. package/cdn/chunks/{chunk.7JRCI5T7.js → chunk.3H546YPQ.js} +1 -1
  2. package/cdn/chunks/chunk.4EXZ2RBI.js +1 -0
  3. package/cdn/chunks/{chunk.PPMFZ77L.js → chunk.LXL4FWEA.js} +1 -1
  4. package/cdn/chunks/{chunk.LPJR7GDM.js → chunk.SJ2JO4KS.js} +1 -1
  5. package/cdn/components/animation/animation.js +1 -1
  6. package/cdn/components/audio/audio.js +1 -1
  7. package/cdn/components/drawer/drawer.js +1 -1
  8. package/cdn/components/navigation-item/navigation-item.js +1 -1
  9. package/cdn/custom-elements.json +677 -677
  10. package/cdn/solid-components.bundle.js +2 -2
  11. package/cdn/solid-components.iife.js +1 -1
  12. package/cdn/solid-components.js +1 -1
  13. package/cdn/web-types.json +1 -1
  14. package/cdn-versioned/_components/menu/menu.js +1 -1
  15. package/cdn-versioned/_components/menu/menu.styles.js +1 -1
  16. package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
  17. package/cdn-versioned/chunks/chunk.25ETUACJ.js +1 -1
  18. package/cdn-versioned/chunks/chunk.27EYM5XP.js +4 -4
  19. package/cdn-versioned/chunks/chunk.2H5XA4I4.js +1 -1
  20. package/cdn-versioned/chunks/chunk.2OLKGLBS.js +1 -1
  21. package/cdn-versioned/chunks/{chunk.7JRCI5T7.js → chunk.3H546YPQ.js} +1 -1
  22. package/cdn-versioned/chunks/chunk.4EXZ2RBI.js +1 -0
  23. package/cdn-versioned/chunks/chunk.4QUXWXQ7.js +1 -1
  24. package/cdn-versioned/chunks/chunk.5CIQRJCC.js +1 -1
  25. package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
  26. package/cdn-versioned/chunks/chunk.7ZYFSBMR.js +1 -1
  27. package/cdn-versioned/chunks/chunk.A63P52TG.js +1 -1
  28. package/cdn-versioned/chunks/chunk.A772RQJV.js +1 -1
  29. package/cdn-versioned/chunks/chunk.ANH5V2SE.js +2 -2
  30. package/cdn-versioned/chunks/chunk.AS7L23H2.js +2 -2
  31. package/cdn-versioned/chunks/chunk.B3H3PR6Y.js +1 -1
  32. package/cdn-versioned/chunks/chunk.B5YKUN6P.js +1 -1
  33. package/cdn-versioned/chunks/chunk.B6I2NZMP.js +4 -4
  34. package/cdn-versioned/chunks/chunk.BAO3UVTY.js +1 -1
  35. package/cdn-versioned/chunks/chunk.CAJUSOAF.js +1 -1
  36. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  37. package/cdn-versioned/chunks/chunk.D4RLVVDK.js +1 -1
  38. package/cdn-versioned/chunks/chunk.DUM4IQT6.js +1 -1
  39. package/cdn-versioned/chunks/chunk.EDD4HHHP.js +1 -1
  40. package/cdn-versioned/chunks/chunk.EJKLI2Q4.js +1 -1
  41. package/cdn-versioned/chunks/chunk.EP7OA5FU.js +1 -1
  42. package/cdn-versioned/chunks/chunk.GNYJN5QM.js +3 -3
  43. package/cdn-versioned/chunks/chunk.GQU4LYQ6.js +1 -1
  44. package/cdn-versioned/chunks/chunk.GX6NOXTL.js +1 -1
  45. package/cdn-versioned/chunks/chunk.JUGW2WJP.js +1 -1
  46. package/cdn-versioned/chunks/chunk.LPXG67S4.js +1 -1
  47. package/cdn-versioned/chunks/chunk.LQZOBUFT.js +1 -1
  48. package/cdn-versioned/chunks/chunk.LVDI5OTS.js +1 -1
  49. package/cdn-versioned/chunks/{chunk.PPMFZ77L.js → chunk.LXL4FWEA.js} +1 -1
  50. package/cdn-versioned/chunks/chunk.MOQCXANY.js +2 -2
  51. package/cdn-versioned/chunks/chunk.N5OYRZY6.js +1 -1
  52. package/cdn-versioned/chunks/chunk.OCT5SOOS.js +1 -1
  53. package/cdn-versioned/chunks/chunk.QA3NVZY4.js +1 -1
  54. package/cdn-versioned/chunks/chunk.QOQO2KP5.js +1 -1
  55. package/cdn-versioned/chunks/chunk.QV7OIYLT.js +1 -1
  56. package/cdn-versioned/chunks/chunk.QWPCVRMH.js +1 -1
  57. package/cdn-versioned/chunks/{chunk.LPJR7GDM.js → chunk.SJ2JO4KS.js} +1 -1
  58. package/cdn-versioned/chunks/chunk.SWUGEKNC.js +1 -1
  59. package/cdn-versioned/chunks/chunk.TR52VDPR.js +1 -1
  60. package/cdn-versioned/chunks/chunk.U5SOEJO4.js +1 -1
  61. package/cdn-versioned/chunks/chunk.V3WIIJLB.js +1 -1
  62. package/cdn-versioned/chunks/chunk.VYV6SKST.js +1 -1
  63. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  64. package/cdn-versioned/chunks/chunk.WADGCWRK.js +1 -1
  65. package/cdn-versioned/chunks/chunk.WG3IQMLL.js +1 -1
  66. package/cdn-versioned/chunks/chunk.WNV6OGRG.js +1 -1
  67. package/cdn-versioned/chunks/chunk.WVYVGVBF.js +1 -1
  68. package/cdn-versioned/chunks/chunk.Y67MAFTR.js +1 -1
  69. package/cdn-versioned/chunks/chunk.ZWWTEE7R.js +1 -1
  70. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  71. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  72. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  73. package/cdn-versioned/components/animation/animation.js +1 -1
  74. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  75. package/cdn-versioned/components/audio/audio.js +1 -1
  76. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  77. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  78. package/cdn-versioned/components/button/button.d.ts +1 -1
  79. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  80. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  81. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  82. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  83. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  84. package/cdn-versioned/components/combobox/combobox.d.ts +4 -4
  85. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  86. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  87. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  88. package/cdn-versioned/components/drawer/drawer.js +1 -1
  89. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  90. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  91. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  92. package/cdn-versioned/components/header/header.d.ts +1 -1
  93. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  94. package/cdn-versioned/components/include/include.d.ts +1 -1
  95. package/cdn-versioned/components/input/input.d.ts +1 -1
  96. package/cdn-versioned/components/link/link.d.ts +1 -1
  97. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  98. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  99. package/cdn-versioned/components/navigation-item/navigation-item.js +1 -1
  100. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  101. package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
  102. package/cdn-versioned/components/option/option.d.ts +1 -1
  103. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  104. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  105. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  106. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  107. package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
  108. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  109. package/cdn-versioned/components/select/select.d.ts +4 -4
  110. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  111. package/cdn-versioned/components/step/step.d.ts +1 -1
  112. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  113. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  114. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  115. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  116. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  117. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  118. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  119. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  120. package/cdn-versioned/components/video/video.d.ts +1 -1
  121. package/cdn-versioned/custom-elements.json +876 -876
  122. package/cdn-versioned/internal/form.js +3 -3
  123. package/cdn-versioned/solid-components.bundle.js +17 -17
  124. package/cdn-versioned/solid-components.css +2 -2
  125. package/cdn-versioned/solid-components.iife.js +17 -17
  126. package/cdn-versioned/solid-components.js +1 -1
  127. package/cdn-versioned/vscode.html-custom-data.json +80 -80
  128. package/cdn-versioned/web-types.json +137 -137
  129. package/dist/chunks/{chunk.32MPDFO4.js → chunk.F63YFNZS.js} +1 -1
  130. package/dist/chunks/{chunk.LU65KM4S.js → chunk.OZU372TI.js} +6 -3
  131. package/dist/components/animation/animation.js +2 -2
  132. package/dist/components/audio/audio.js +2 -2
  133. package/dist/components/drawer/drawer.js +1 -1
  134. package/dist/components/navigation-item/navigation-item.js +1 -1
  135. package/dist/custom-elements.json +677 -677
  136. package/dist/solid-components.js +14 -14
  137. package/dist/web-types.json +1 -1
  138. package/dist-versioned/_components/menu/menu.js +1 -1
  139. package/dist-versioned/_components/menu/menu.styles.js +1 -1
  140. package/dist-versioned/_components/menu-item/menu-item.js +2 -2
  141. package/dist-versioned/chunks/chunk.274HT4QS.js +3 -3
  142. package/dist-versioned/chunks/chunk.2FXKQI26.js +2 -2
  143. package/dist-versioned/chunks/chunk.4MHQ63NW.js +26 -26
  144. package/dist-versioned/chunks/chunk.4Q7KKH5Z.js +2 -2
  145. package/dist-versioned/chunks/chunk.674S2Z6M.js +1 -1
  146. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  147. package/dist-versioned/chunks/chunk.7E7C4YEQ.js +3 -3
  148. package/dist-versioned/chunks/chunk.A5S7GZJI.js +3 -3
  149. package/dist-versioned/chunks/chunk.ACST636J.js +1 -1
  150. package/dist-versioned/chunks/chunk.AJ7V76EG.js +1 -1
  151. package/dist-versioned/chunks/chunk.AKF4KQEW.js +2 -2
  152. package/dist-versioned/chunks/chunk.AQZSZKBJ.js +13 -13
  153. package/dist-versioned/chunks/chunk.BJIZPRT4.js +5 -5
  154. package/dist-versioned/chunks/chunk.CCQCEONR.js +2 -2
  155. package/dist-versioned/chunks/chunk.D26WCHLT.js +6 -6
  156. package/dist-versioned/chunks/chunk.DPY2TYIS.js +9 -9
  157. package/dist-versioned/chunks/chunk.DU3O42BH.js +2 -2
  158. package/dist-versioned/chunks/chunk.EH2FHVPN.js +3 -3
  159. package/dist-versioned/chunks/{chunk.32MPDFO4.js → chunk.F63YFNZS.js} +6 -6
  160. package/dist-versioned/chunks/chunk.FFKZQXJ2.js +2 -2
  161. package/dist-versioned/chunks/chunk.FTXUZOXH.js +2 -2
  162. package/dist-versioned/chunks/chunk.H5ARRBLT.js +2 -2
  163. package/dist-versioned/chunks/chunk.H5BDO4H5.js +11 -11
  164. package/dist-versioned/chunks/chunk.HFHUY7YD.js +1 -1
  165. package/dist-versioned/chunks/chunk.HP2TVELZ.js +1 -1
  166. package/dist-versioned/chunks/chunk.IN7RNHBF.js +1 -1
  167. package/dist-versioned/chunks/chunk.JIWTAZZS.js +5 -5
  168. package/dist-versioned/chunks/chunk.JZB2D4IZ.js +1 -1
  169. package/dist-versioned/chunks/chunk.K3JCC7KV.js +5 -5
  170. package/dist-versioned/chunks/chunk.KH4M6HPE.js +2 -2
  171. package/dist-versioned/chunks/chunk.KPA6BEFU.js +5 -5
  172. package/dist-versioned/chunks/{chunk.TGJ2SBPH.js → chunk.KQAHFLVX.js} +9 -9
  173. package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
  174. package/dist-versioned/chunks/chunk.L32THKSR.js +3 -3
  175. package/dist-versioned/chunks/chunk.L5XQ7O4S.js +2 -2
  176. package/dist-versioned/chunks/{chunk.DCTW5WAP.js → chunk.LZA2QYUU.js} +4 -4
  177. package/dist-versioned/chunks/chunk.NUIZDE7R.js +1 -1
  178. package/dist-versioned/chunks/chunk.NY5S53W2.js +13 -13
  179. package/dist-versioned/chunks/chunk.OBWOMZNU.js +2 -2
  180. package/dist-versioned/chunks/chunk.OMBVLHXJ.js +1 -1
  181. package/dist-versioned/chunks/chunk.OR7JTZLE.js +2 -2
  182. package/dist-versioned/chunks/{chunk.LU65KM4S.js → chunk.OZU372TI.js} +7 -4
  183. package/dist-versioned/chunks/chunk.PRXP5CUW.js +5 -5
  184. package/dist-versioned/chunks/chunk.PT7MDSWH.js +1 -1
  185. package/dist-versioned/chunks/chunk.QTFIZJGB.js +2 -2
  186. package/dist-versioned/chunks/chunk.QUYKT56M.js +1 -1
  187. package/dist-versioned/chunks/chunk.SNCHAQYL.js +4 -4
  188. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  189. package/dist-versioned/chunks/chunk.VTUCPGYW.js +1 -1
  190. package/dist-versioned/chunks/chunk.X2PI2F35.js +1 -1
  191. package/dist-versioned/chunks/chunk.XL2PSGM5.js +2 -2
  192. package/dist-versioned/chunks/chunk.XQNY7RZD.js +29 -29
  193. package/dist-versioned/chunks/chunk.Y7254YJM.js +2 -2
  194. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  195. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  196. package/dist-versioned/components/animation/animation.d.ts +1 -1
  197. package/dist-versioned/components/animation/animation.js +2 -2
  198. package/dist-versioned/components/audio/audio.d.ts +1 -1
  199. package/dist-versioned/components/audio/audio.js +2 -2
  200. package/dist-versioned/components/badge/badge.d.ts +1 -1
  201. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  202. package/dist-versioned/components/button/button.d.ts +1 -1
  203. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  204. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  205. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  206. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  207. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  208. package/dist-versioned/components/combobox/combobox.d.ts +4 -4
  209. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  210. package/dist-versioned/components/divider/divider.d.ts +1 -1
  211. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  212. package/dist-versioned/components/drawer/drawer.js +1 -1
  213. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  214. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  215. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  216. package/dist-versioned/components/header/header.d.ts +1 -1
  217. package/dist-versioned/components/icon/icon.d.ts +1 -1
  218. package/dist-versioned/components/include/include.d.ts +1 -1
  219. package/dist-versioned/components/input/input.d.ts +1 -1
  220. package/dist-versioned/components/link/link.d.ts +1 -1
  221. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  222. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  223. package/dist-versioned/components/navigation-item/navigation-item.js +1 -1
  224. package/dist-versioned/components/notification/notification.d.ts +1 -1
  225. package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
  226. package/dist-versioned/components/option/option.d.ts +1 -1
  227. package/dist-versioned/components/popup/popup.d.ts +1 -1
  228. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  229. package/dist-versioned/components/radio/radio.d.ts +1 -1
  230. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  231. package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
  232. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  233. package/dist-versioned/components/select/select.d.ts +4 -4
  234. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  235. package/dist-versioned/components/step/step.d.ts +1 -1
  236. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  237. package/dist-versioned/components/switch/switch.d.ts +1 -1
  238. package/dist-versioned/components/tab/tab.d.ts +1 -1
  239. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  240. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  241. package/dist-versioned/components/tag/tag.d.ts +1 -1
  242. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  243. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  244. package/dist-versioned/components/video/video.d.ts +1 -1
  245. package/dist-versioned/custom-elements.json +876 -876
  246. package/dist-versioned/internal/form.js +3 -3
  247. package/dist-versioned/solid-components.css +2 -2
  248. package/dist-versioned/solid-components.js +14 -14
  249. package/dist-versioned/vscode.html-custom-data.json +80 -80
  250. package/dist-versioned/web-types.json +137 -137
  251. package/package.json +1 -1
  252. package/cdn/chunks/chunk.OF353WP5.js +0 -1
  253. package/cdn-versioned/chunks/chunk.OF353WP5.js +0 -1
  254. package/dist/chunks/{chunk.TGJ2SBPH.js → chunk.KQAHFLVX.js} +3 -3
  255. package/dist/chunks/{chunk.DCTW5WAP.js → chunk.LZA2QYUU.js} +3 -3
@@ -1 +1 @@
1
- import{a as s}from"./chunk.HE2LNCWW.js";import{a as d,b as r}from"./chunk.5ZILM4TA.js";import{a as x}from"./chunk.6HO6CE4A.js";import{a as l}from"./chunk.DCOFYPWX.js";import{a as m,b as i,d as v,h as p}from"./chunk.GQU4LYQ6.js";import{b}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends p{constructor(){super(...arguments);this.hasSlotController=new x(this,"[default]","description","children");this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(n){this.disabled&&(n.preventDefault(),n.stopPropagation())}handleClickSummary(n){n.preventDefault(),n.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.isAccordion&&!this.isLink?d`summary`:this.separated?d`div`:this.isLink?d`a`:d`button`}render(){let n=this.tag,a=this.isLink,u=this.isButton,o=this.isAccordion,c={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},f=this.vertical?"pb-3":"pb-2",h=r`<${n} part="base" class="${l("cursor-pointer relative focus-visible:focus-outline",{md:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",o?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-all min-h-[48px] px-4")}" aria-controls="${s(o?"navigation-item-details":void 0)}" aria-current="${s(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${s(u?this.disabled:void 0)}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}" rel="${s(a&&this.target?"noreferrer noopener":void 0)}" role="${a?"link":"button"}" tabindex="${this.disabled||this.separated?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:u?this.handleClickButton:void 0}"><div part="current-indicator" class="${l("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${l("relative pt-3 inline-flex justify-between items-center",o?"grow":"w-full",c.description||this.separated?"pb-1":f,this.calculatePaddingX)}">${this.divider&&this.vertical?r`<sd-divider part="divider" class="${l("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?r`<a class="${l("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-all min-h-[48px]",!c.description&&"py-4")}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}"><slot part="content" class="inline"></slot></a>`:r`<slot part="content" class="inline"></slot>`} </span>${(this.chevron||c.children)&&this.vertical?this.separated?r`<button type="button" title="toggle-details" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("mr-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon></button>`:r`<sd-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${c.description&&this.vertical?r`<slot name="description" part="description" class="${l("inline-block text-sm text-left text-black",o||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX,f)}"></slot>`:""}</${n}>`;return o?r`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative flex">${h}<slot name="children"></slot></details>`:this.separated?r`<div part="details" id="navigation-item-details" class="relative flex flex-col">${h}${this.open?r`<slot name="children"></slot>`:""}</div>`:r`${h}`}};e.styles=[...p.styles,b`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],t([v('a[part="base"], button[part="base"]')],e.prototype,"button",2),t([i({type:Boolean,reflect:!0})],e.prototype,"vertical",2),t([i({reflect:!0})],e.prototype,"size",2),t([i({reflect:!0})],e.prototype,"href",2),t([i()],e.prototype,"target",2),t([i()],e.prototype,"download",2),t([i({type:Boolean,reflect:!0})],e.prototype,"current",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"chevron",2),t([i({type:Boolean,reflect:!0})],e.prototype,"relaxed",2),t([i({type:Boolean,reflect:!0})],e.prototype,"divider",2),t([i({type:Boolean,reflect:!0})],e.prototype,"indented",2),t([i({type:Boolean,reflect:!0})],e.prototype,"open",2),t([i({type:Boolean,reflect:!0})],e.prototype,"separated",2),e=t([m("sd-navigation-item")],e);export{e as a};
1
+ import{a as s}from"./chunk.HE2LNCWW.js";import{a as d,b as r}from"./chunk.5ZILM4TA.js";import{a as $}from"./chunk.6HO6CE4A.js";import{a as l}from"./chunk.DCOFYPWX.js";import{a as m,b as i,d as v,h as p}from"./chunk.GQU4LYQ6.js";import{b}from"./chunk.IRWHG2Q4.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends p{constructor(){super(...arguments);this.hasSlotController=new $(this,"[default]","description","children");this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(n){this.disabled&&(n.preventDefault(),n.stopPropagation())}handleClickSummary(n){n.preventDefault(),n.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.isAccordion&&!this.isLink?d`summary`:this.separated?d`div`:this.isLink?d`a`:d`button`}render(){let n=this.tag,a=this.isLink,u=this.isButton,o=this.isAccordion,c={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},f=this.vertical?"pb-3":"pb-2",h=r`<${n} part="base" class="${l("cursor-pointer relative focus-visible:focus-outline",{md:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",o?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-all min-h-[48px] px-4")}" aria-controls="${s(o?"navigation-item-details":void 0)}" aria-current="${s(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${s(u?this.disabled:void 0)}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}" rel="${s(a&&this.target?"noreferrer noopener":void 0)}" role="${a?"link":"button"}" tabindex="${this.disabled||this.separated?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:u?this.handleClickButton:void 0}"><div part="current-indicator" class="${l("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${l("relative pt-3 inline-flex justify-between items-center",o?"grow":"w-full",c.description||this.separated?"pb-1":f,this.calculatePaddingX)}">${this.divider&&this.vertical?r`<sd-divider part="divider" class="${l("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto">${this.separated?r`<a class="${l("mr-4 w-full inline-flex items-center pl-4 cursor-pointer relative focus-visible:focus-outline hover:bg-neutral-200 group transition-all min-h-[48px]",!c.description&&"py-4")}" href="${s(a?this.href:void 0)}" target="${s(a?this.target:void 0)}" download="${s(a?this.download:void 0)}"><slot part="content" class="inline"></slot></a>`:r`<slot part="content" class="inline"></slot>`} </span>${(this.chevron||c.children)&&this.vertical?this.separated?r`<button type="button" title="toggle-details" class="sd-interactive sd-interactive--reset" @click="${this.handleClickSummary}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("mr-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon></button>`:r`<sd-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${l("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${c.description&&this.vertical?r`<slot name="description" part="description" class="${l("inline-block text-sm text-left text-black",o||this.separated?"grow":"w-full",this.separated?"px-4":this.calculatePaddingX,f)}"></slot>`:""}</${n}>`;return o?r`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${h}<slot name="children"></slot></details>`:this.separated?r`<div part="details" id="navigation-item-details" class="relative flex flex-col">${h}${this.open?r`<slot name="children"></slot>`:""}</div>`:r`${h}`}};e.styles=[...p.styles,b`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],t([v('a[part="base"], button[part="base"]')],e.prototype,"button",2),t([i({type:Boolean,reflect:!0})],e.prototype,"vertical",2),t([i({reflect:!0})],e.prototype,"size",2),t([i({reflect:!0})],e.prototype,"href",2),t([i()],e.prototype,"target",2),t([i()],e.prototype,"download",2),t([i({type:Boolean,reflect:!0})],e.prototype,"current",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"chevron",2),t([i({type:Boolean,reflect:!0})],e.prototype,"relaxed",2),t([i({type:Boolean,reflect:!0})],e.prototype,"divider",2),t([i({type:Boolean,reflect:!0})],e.prototype,"indented",2),t([i({type:Boolean,reflect:!0})],e.prototype,"open",2),t([i({type:Boolean,reflect:!0})],e.prototype,"separated",2),e=t([m("sd-navigation-item")],e);export{e as a};
@@ -0,0 +1 @@
1
+ import{a as A}from"./chunk.X2O263YD.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as o,c as l}from"./chunk.A3DKF5BY.js";import{a as n,d as h}from"./chunk.RQYP7MH5.js";import{a as g}from"./chunk.KLRPP4NQ.js";import{a as b}from"./chunk.E2DRD2OX.js";import{a as L}from"./chunk.6HO6CE4A.js";import{a as E}from"./chunk.26YUWEYR.js";import{a as p}from"./chunk.DCOFYPWX.js";import{a as C,b as r,d as c,h as w}from"./chunk.GQU4LYQ6.js";import{b as x,e as u}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";function k(y){return y.charAt(0).toUpperCase()+y.slice(1)}var t=class extends w{constructor(){super(...arguments);this.hasSlotController=new L(this,"footer");this.localize=new E(this);this.modal=new A(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=e=>{this.open&&e.key==="Escape"&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),m(this)))}disconnectedCallback(){super.disconnectedCallback(),f(this)}requestClose(e){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let a=l(this,"drawer.denyClose",{dir:this.localize.dir()});n(this.panel,a.keyframes,a.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var v;let e=(v=this.closeButton.shadowRoot)==null?void 0:v.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.contained||(this.modal.activate(),m(this));let a=this.querySelector("[autofocus]");a&&a.removeAttribute("autofocus"),await Promise.all([h(this.drawer),h(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(a?a.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),a?a.setAttribute("autofocus",""):this.closeButton.focus()});let d=l(this,`drawer.show${k(this.placement)}`,{dir:this.localize.dir()}),s=l(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([n(this.panel,d.keyframes,d.options),n(this.overlay,s.keyframes,s.options)]),e==null||e.setAttribute("aria-controls","drawer"),e==null||e.setAttribute("aria-expanded","true"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),f(this)),await Promise.all([h(this.drawer),h(this.overlay)]);let a=l(this,`drawer.hide${k(this.placement)}`,{dir:this.localize.dir()}),d=l(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([n(this.overlay,d.keyframes,d.options).then(()=>{this.overlay.hidden=!0}),n(this.panel,a.keyframes,a.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let s=this.originalTrigger;typeof(s==null?void 0:s.focus)=="function"&&setTimeout(()=>s.focus()),e==null||e.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),m(this)),this.open&&this.contained&&(this.modal.deactivate(),f(this))}async show(){if(!this.open)return this.open=!0,g(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,g(this,"sd-after-hide")}render(){return u`<div id="drawer" part="base" class="${p("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}"><div part="overlay" class="${p("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${p("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 right-2"><sd-icon label="${this.localize.term("close")}" name="close" library="system"></sd-icon></sd-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-icon label="${this.localize.term("close")}" name="close" library="system"></sd-icon></sd-button></div></header>`}<div part="body" class="flex-auto block px-4" role="region" tabindex="0"><slot></slot></div><footer part="footer" class="${p(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></div>`}};t.styles=[...w.styles,x`:host{--width:25rem;display:contents}:host([contained]){z-index:auto}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],i([c("[part=base]")],t.prototype,"drawer",2),i([c("[part=panel]")],t.prototype,"panel",2),i([c("[part=overlay]")],t.prototype,"overlay",2),i([c("[part=close-button]")],t.prototype,"closeButton",2),i([r({type:Boolean,reflect:!0})],t.prototype,"open",2),i([r({attribute:"label",reflect:!0})],t.prototype,"label",2),i([r({reflect:!0})],t.prototype,"placement",2),i([r({type:Boolean,reflect:!0})],t.prototype,"contained",2),i([r({attribute:"no-header",type:Boolean})],t.prototype,"noHeader",2),i([b("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([b("contained",{waitUntilFirstUpdate:!0})],t.prototype,"handleNoModalChange",1),t=i([C("sd-drawer")],t);o("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}});o("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}});o("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}});o("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}});o("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}});o("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});o("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});export{t as a};
@@ -1 +1 @@
1
- import{a as b}from"./chunk.6HO6CE4A.js";import{a as v}from"./chunk.26YUWEYR.js";import{a}from"./chunk.DCOFYPWX.js";import{a as f,b as l,c as d,d as h,h as p}from"./chunk.GQU4LYQ6.js";import{b as m,e as s}from"./chunk.IRWHG2Q4.js";import{a as u}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends p{constructor(){super();this.localize=new v(this);this.hasSlotController=new b(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.progress=0;this.setAudioProgress=()=>{this.progressSlider.max=Math.floor(this.audioElement.duration).toString()};this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),this.audioElement.playbackRate=this.speed,this.animated&&this.initAnimation())}updated(e){if(e.has("animated")){let r=e.get("animated");!r&&this.animated?this.initAnimation():r&&!this.animated&&this.clear()}}get audioElement(){let e=this.shadowRoot.querySelector("slot");return(e==null?void 0:e.assignedElements().length)>0?e.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let e=this.audioElement.currentTime;this.currentTime=this.formatTime(e),this.progress=Math.floor(e),this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.setAudioProgress()}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.togglePlaybackSpeed())}formatTime(e){let r=Math.floor(e/60),o=Math.floor(e%60);return`${r}:${o<10?"0":""}${o}`}handleAudioProgress(){if(!this.audioElement)return;let e=Number(this.progressSlider.value);this.audioElement.currentTime=e,this.progress=e,this.currentTime=this.formatTime(e)}handleAudioProgressKeydown(e){e.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),e.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0}showTranscriptKeydown(e){(e.key==="Enter"||e.key===" ")&&this.showTranscript()}rgbToHex(e){let r=e.match(/\d+/g);if(r&&r.length===3){let o=parseInt(r[0]),n=parseInt(r[1]),g=parseInt(r[2]),c=y=>y.toString(16).padStart(2,"0");return`#${c(o)}${c(n)}${c(g)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let e=this.audioPlayerContainer.querySelector(".playback-speed"),o=window.getComputedStyle(e).color,n;this.inverted?n="#FFFFFF33":n=this.rgbToHex(o)+"33",this.waveList=[new u({canvas:this.canvas,color:n,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(e=>{e.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(e=>{e.redraw()}),await new Promise(e=>{setTimeout(e,1e3/30)}),await this.draw())}render(){let e=this.audioElement?this.progress/this.audioElement.duration*100:0,r=s`<div class="${a("controls grid grid-cols-3 justify-items-center items-center",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full",this.reversedLayout?"mt-2":"mb-2")}" part="audio-controls"><button class="${a("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")}" tabindex="0" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="text-3xl">${this.isPlaying?s`<slot name="pause-icon"><sd-icon class="text-3xl" name="pause" library="system"></sd-icon></slot>`:s`<slot name="play-icon"><sd-icon class="text-3xl" name="start" library="system"></sd-icon></slot>`}</sd-button><div class="flex items-center justify-self-end">${this.hasSlotController.test("transcript")?s`<button class="${a("mr-6 w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" tab-index="0"><sd-icon class="w-6 h-6" name="transcript" library="system" label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}"></sd-icon></button>`:null} <button class="${a("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.localize.term("mute")}" tabindex="0" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="system"></sd-icon></button></div></div>`,o=s`<div class="${a("w-full flex justify-between",this.reversedLayout?"mb-2":"mt-2",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 mb-2",this.animated&&!this.reversedLayout&&"mt-2")}" part="timestamps"><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.currentTime}</div><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.duration}</div></div>`;return s`<div class="${a("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?r:null}<div class="relative">${this.animated&&!this.reversedLayout?s`${r}`:null} ${this.animated?s`<canvas class="w-full h-16"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?o:null} <input class="${a("progress-slider bg-primary appearance-none w-full cursor-pointer outline-none h-1 flex items-center sd-interactive",this.inverted&&"sd-interactive--inverted")}" type="range" max="100" step="0.001" value="${this.progress}" tabindex="0" @input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}" part="progress-slider" style="background:linear-gradient(to right,${this.inverted?"rgb(var(--sd-color-white, 255 255 255) / 1)":"rgb(var(--sd-color-primary, 0 53 142) / 1)"} ${e}%,${this.animated?"transparent":this.inverted?"rgb(var(--sd-color-primary-400, 153 171 208) / 1)":"rgb(var(--sd-color-grey-400, 195 195 195) / 1)"} ${e}%)"></div>${this.hasSlotController.test("transcript")?s`<sd-drawer><slot name="transcript"></slot></sd-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?o:null}</div>`}};t.styles=[...p.styles,m`.progress-slider:focus-visible{outline:2px solid transparent;outline-offset:2px}.progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-webkit-slider-thumb{outline-offset:2px;outline-style:solid}.progress-slider::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-moz-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-moz-range-thumb{outline-offset:2px;outline-style:solid}sd-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-16,4rem);justify-content:center;width:var(--sd-spacing-16,4rem)}sd-button::part(label){align-items:center;display:flex;flex-grow:0}`],i([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),i([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],t.prototype,"hideTimestamps",2),i([l({type:Boolean,reflect:!0})],t.prototype,"animated",2),i([l({type:Boolean,reflect:!0})],t.prototype,"inverted",2),i([l({type:Number})],t.prototype,"speed",2),i([d()],t.prototype,"currentTime",2),i([d()],t.prototype,"duration",2),i([d()],t.prototype,"isPlaying",2),i([d()],t.prototype,"isMuted",2),i([d()],t.prototype,"progress",2),i([h('[part="progress-slider"]')],t.prototype,"progressSlider",2),i([h('[part="audio-player"]')],t.prototype,"audioPlayerContainer",2),i([h("sd-drawer")],t.prototype,"drawer",2),i([h("canvas")],t.prototype,"canvas",2),t=i([f("sd-audio")],t);export{t as a};
1
+ import{a as u}from"./chunk.WNP2V63C.js";import{a as b}from"./chunk.6HO6CE4A.js";import{a as v}from"./chunk.26YUWEYR.js";import{a}from"./chunk.DCOFYPWX.js";import{a as f,b as l,c as d,d as h,h as p}from"./chunk.GQU4LYQ6.js";import{b as m,e as s}from"./chunk.IRWHG2Q4.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends p{constructor(){super();this.localize=new v(this);this.hasSlotController=new b(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.progress=0;this.setAudioProgress=()=>{this.progressSlider.max=Math.floor(this.audioElement.duration).toString()};this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),this.audioElement.playbackRate=this.speed,this.animated&&this.initAnimation())}updated(e){if(e.has("animated")){let r=e.get("animated");!r&&this.animated?this.initAnimation():r&&!this.animated&&this.clear()}}get audioElement(){let e=this.shadowRoot.querySelector("slot");return(e==null?void 0:e.assignedElements().length)>0?e.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let e=this.audioElement.currentTime;this.currentTime=this.formatTime(e),this.progress=Math.floor(e),this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.setAudioProgress()}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(e){e.key==="Enter"&&(e.preventDefault(),this.togglePlaybackSpeed())}formatTime(e){let r=Math.floor(e/60),o=Math.floor(e%60);return`${r}:${o<10?"0":""}${o}`}handleAudioProgress(){if(!this.audioElement)return;let e=Number(this.progressSlider.value);this.audioElement.currentTime=e,this.progress=e,this.currentTime=this.formatTime(e)}handleAudioProgressKeydown(e){e.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),e.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0}showTranscriptKeydown(e){(e.key==="Enter"||e.key===" ")&&this.showTranscript()}rgbToHex(e){let r=e.match(/\d+/g);if(r&&r.length===3){let o=parseInt(r[0]),n=parseInt(r[1]),g=parseInt(r[2]),c=y=>y.toString(16).padStart(2,"0");return`#${c(o)}${c(n)}${c(g)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let e=this.audioPlayerContainer.querySelector(".playback-speed"),o=window.getComputedStyle(e).color,n;this.inverted?n="#FFFFFF33":n=this.rgbToHex(o)+"33",this.waveList=[new u({canvas:this.canvas,color:n,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new u({canvas:this.canvas,color:n,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(e=>{e.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(e=>{e.redraw()}),await new Promise(e=>{setTimeout(e,1e3/30)}),await this.draw())}render(){let e=this.audioElement?this.progress/this.audioElement.duration*100:0,r=s`<div class="${a("controls grid grid-cols-3 justify-items-center items-center",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full",this.reversedLayout?"mt-2":"mb-2")}" part="audio-controls"><button class="${a("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")}" tabindex="0" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="text-3xl">${this.isPlaying?s`<slot name="pause-icon"><sd-icon class="text-3xl" name="pause" library="system"></sd-icon></slot>`:s`<slot name="play-icon"><sd-icon class="text-3xl" name="start" library="system"></sd-icon></slot>`}</sd-button><div class="flex items-center justify-self-end">${this.hasSlotController.test("transcript")?s`<button class="${a("mr-6 w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" tab-index="0"><sd-icon class="w-6 h-6" name="transcript" library="system" label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}"></sd-icon></button>`:null} <button class="${a("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.localize.term("mute")}" tabindex="0" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="system"></sd-icon></button></div></div>`,o=s`<div class="${a("w-full flex justify-between",this.reversedLayout?"mb-2":"mt-2",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 mb-2",this.animated&&!this.reversedLayout&&"mt-2")}" part="timestamps"><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.currentTime}</div><div class="${a("current-time text-sm",this.inverted?"text-primary-400":"text-neutral-700")}">${this.duration}</div></div>`;return s`<div class="${a("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?r:null}<div class="relative">${this.animated&&!this.reversedLayout?s`${r}`:null} ${this.animated?s`<canvas class="w-full h-16"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?o:null} <input class="${a("progress-slider bg-primary appearance-none w-full cursor-pointer outline-none h-1 flex items-center sd-interactive",this.inverted&&"sd-interactive--inverted")}" type="range" max="100" step="0.001" value="${this.progress}" tabindex="0" @input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}" part="progress-slider" style="background:linear-gradient(to right,${this.inverted?"rgb(var(--sd-color-white, 255 255 255) / 1)":"rgb(var(--sd-color-primary, 0 53 142) / 1)"} ${e}%,${this.animated?"transparent":this.inverted?"rgb(var(--sd-color-primary-400, 153 171 208) / 1)":"rgb(var(--sd-color-grey-400, 195 195 195) / 1)"} ${e}%)"></div>${this.hasSlotController.test("transcript")?s`<sd-drawer><slot name="transcript"></slot></sd-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?o:null}</div>`}};t.styles=[...p.styles,m`.progress-slider:focus-visible{outline:2px solid transparent;outline-offset:2px}.progress-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-webkit-slider-thumb{outline-offset:2px;outline-style:solid}.progress-slider::-moz-range-thumb{-moz-appearance:none;appearance:none;background-color:currentColor;border-radius:var(--sd-border-radius-full,9999px);border-style:none;height:var(--sd-spacing-4,1rem);transition-duration:.2s;-moz-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:var(--sd-spacing-4,1rem)}.progress-slider:focus-visible::-moz-range-thumb{outline-offset:2px;outline-style:solid}sd-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-16,4rem);justify-content:center;width:var(--sd-spacing-16,4rem)}sd-button::part(label){align-items:center;display:flex;flex-grow:0}`],i([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],t.prototype,"reversedLayout",2),i([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],t.prototype,"hideTimestamps",2),i([l({type:Boolean,reflect:!0})],t.prototype,"animated",2),i([l({type:Boolean,reflect:!0})],t.prototype,"inverted",2),i([l({type:Number})],t.prototype,"speed",2),i([d()],t.prototype,"currentTime",2),i([d()],t.prototype,"duration",2),i([d()],t.prototype,"isPlaying",2),i([d()],t.prototype,"isMuted",2),i([d()],t.prototype,"progress",2),i([h('[part="progress-slider"]')],t.prototype,"progressSlider",2),i([h('[part="audio-player"]')],t.prototype,"audioPlayerContainer",2),i([h("sd-drawer")],t.prototype,"drawer",2),i([h("canvas")],t.prototype,"canvas",2),t=i([f("sd-audio")],t);export{t 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.GQU4LYQ6.js";import{b as c,e as d}from"./chunk.IRWHG2Q4.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-animation")],t);export{t as a};
1
+ import{a as s}from"./chunk.E2DRD2OX.js";import{a as l}from"./chunk.XR2KNB36.js";import{a as y,b as a,f,h as r}from"./chunk.GQU4LYQ6.js";import{b as c,e as d}from"./chunk.IRWHG2Q4.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-animation")],t);export{t as a};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.LPJR7GDM.js";import"../../chunks/chunk.XR2KNB36.js";import"../../chunks/chunk.E2DRD2OX.js";import"../../chunks/chunk.GQU4LYQ6.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.SJ2JO4KS.js";import"../../chunks/chunk.E2DRD2OX.js";import"../../chunks/chunk.XR2KNB36.js";import"../../chunks/chunk.GQU4LYQ6.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.PPMFZ77L.js";import"../../chunks/chunk.6HO6CE4A.js";import"../../chunks/chunk.26YUWEYR.js";import"../../chunks/chunk.LI5H3QYB.js";import"../../chunks/chunk.TJ6RGDHH.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.DCOFYPWX.js";import"../../chunks/chunk.GQU4LYQ6.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.WNP2V63C.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.LXL4FWEA.js";import"../../chunks/chunk.WNP2V63C.js";import"../../chunks/chunk.6HO6CE4A.js";import"../../chunks/chunk.26YUWEYR.js";import"../../chunks/chunk.LI5H3QYB.js";import"../../chunks/chunk.TJ6RGDHH.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.DCOFYPWX.js";import"../../chunks/chunk.GQU4LYQ6.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.OF353WP5.js";import"../../chunks/chunk.X2O263YD.js";import"../../chunks/chunk.64UNKF45.js";import"../../chunks/chunk.3L472FD4.js";import"../../chunks/chunk.N5OYRZY6.js";import"../../chunks/chunk.EP7OA5FU.js";import"../../chunks/chunk.65NSSTJE.js";import"../../chunks/chunk.HE2LNCWW.js";import"../../chunks/chunk.A3DKF5BY.js";import"../../chunks/chunk.5ZILM4TA.js";import"../../chunks/chunk.LQZOBUFT.js";import"../../chunks/chunk.SPDB3L7V.js";import"../../chunks/chunk.TWZDCIM2.js";import"../../chunks/chunk.MWDEA25W.js";import"../../chunks/chunk.5YRTJVAZ.js";import"../../chunks/chunk.K7HF3VBZ.js";import"../../chunks/chunk.EFLL7VXU.js";import"../../chunks/chunk.RQYP7MH5.js";import"../../chunks/chunk.KLRPP4NQ.js";import"../../chunks/chunk.E2DRD2OX.js";import"../../chunks/chunk.6HO6CE4A.js";import"../../chunks/chunk.26YUWEYR.js";import"../../chunks/chunk.LI5H3QYB.js";import"../../chunks/chunk.TJ6RGDHH.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.DCOFYPWX.js";import"../../chunks/chunk.GQU4LYQ6.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.4EXZ2RBI.js";import"../../chunks/chunk.X2O263YD.js";import"../../chunks/chunk.64UNKF45.js";import"../../chunks/chunk.3L472FD4.js";import"../../chunks/chunk.N5OYRZY6.js";import"../../chunks/chunk.EP7OA5FU.js";import"../../chunks/chunk.65NSSTJE.js";import"../../chunks/chunk.HE2LNCWW.js";import"../../chunks/chunk.A3DKF5BY.js";import"../../chunks/chunk.5ZILM4TA.js";import"../../chunks/chunk.LQZOBUFT.js";import"../../chunks/chunk.SPDB3L7V.js";import"../../chunks/chunk.TWZDCIM2.js";import"../../chunks/chunk.MWDEA25W.js";import"../../chunks/chunk.5YRTJVAZ.js";import"../../chunks/chunk.K7HF3VBZ.js";import"../../chunks/chunk.EFLL7VXU.js";import"../../chunks/chunk.RQYP7MH5.js";import"../../chunks/chunk.KLRPP4NQ.js";import"../../chunks/chunk.E2DRD2OX.js";import"../../chunks/chunk.6HO6CE4A.js";import"../../chunks/chunk.26YUWEYR.js";import"../../chunks/chunk.LI5H3QYB.js";import"../../chunks/chunk.TJ6RGDHH.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.DCOFYPWX.js";import"../../chunks/chunk.GQU4LYQ6.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.7JRCI5T7.js";import"../../chunks/chunk.HE2LNCWW.js";import"../../chunks/chunk.5ZILM4TA.js";import"../../chunks/chunk.6HO6CE4A.js";import"../../chunks/chunk.DCOFYPWX.js";import"../../chunks/chunk.GQU4LYQ6.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.3H546YPQ.js";import"../../chunks/chunk.HE2LNCWW.js";import"../../chunks/chunk.5ZILM4TA.js";import"../../chunks/chunk.6HO6CE4A.js";import"../../chunks/chunk.DCOFYPWX.js";import"../../chunks/chunk.GQU4LYQ6.js";import"../../chunks/chunk.IRWHG2Q4.js";import"../../chunks/chunk.TJOCV4DC.js";export{a as default};