@solid-design-system/components 5.13.11 → 5.13.12

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 (249) hide show
  1. package/cdn/custom-elements.json +11 -7
  2. package/cdn/vscode.html-custom-data.json +13 -5
  3. package/cdn/web-types.json +27 -11
  4. package/cdn-versioned/chunks/chunk.22K26MFW.js +1 -1
  5. package/cdn-versioned/chunks/chunk.27FNJ2PN.js +1 -1
  6. package/cdn-versioned/chunks/chunk.2ASRYO75.js +1 -1
  7. package/cdn-versioned/chunks/chunk.2C7EBMG5.js +1 -1
  8. package/cdn-versioned/chunks/chunk.2GL7J2OA.js +1 -1
  9. package/cdn-versioned/chunks/chunk.2MWGJ42J.js +1 -1
  10. package/cdn-versioned/chunks/chunk.2NU6E5HZ.js +1 -1
  11. package/cdn-versioned/chunks/chunk.3FMPWWYL.js +1 -1
  12. package/cdn-versioned/chunks/chunk.42542XOU.js +1 -1
  13. package/cdn-versioned/chunks/chunk.4JCFZ7AN.js +1 -1
  14. package/cdn-versioned/chunks/chunk.4UDZGPPR.js +1 -1
  15. package/cdn-versioned/chunks/chunk.4WS6ISBF.js +1 -1
  16. package/cdn-versioned/chunks/chunk.54UYR3N2.js +1 -1
  17. package/cdn-versioned/chunks/chunk.5RA4GJWJ.js +1 -1
  18. package/cdn-versioned/chunks/chunk.5SK5BWKE.js +1 -1
  19. package/cdn-versioned/chunks/chunk.6EVGQLHB.js +1 -1
  20. package/cdn-versioned/chunks/chunk.6HLS5XU2.js +1 -1
  21. package/cdn-versioned/chunks/chunk.7OFXZTBU.js +1 -1
  22. package/cdn-versioned/chunks/chunk.APITCTY7.js +2 -2
  23. package/cdn-versioned/chunks/chunk.B54NSO5Y.js +1 -1
  24. package/cdn-versioned/chunks/chunk.BBD6RMZH.js +1 -1
  25. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  26. package/cdn-versioned/chunks/chunk.DB2LBRW5.js +1 -1
  27. package/cdn-versioned/chunks/chunk.DNPUPU5N.js +1 -1
  28. package/cdn-versioned/chunks/chunk.DS6OKK7E.js +1 -1
  29. package/cdn-versioned/chunks/chunk.DVQVZCFM.js +1 -1
  30. package/cdn-versioned/chunks/chunk.EF5R3XXB.js +1 -1
  31. package/cdn-versioned/chunks/chunk.EQQG2IOL.js +1 -1
  32. package/cdn-versioned/chunks/chunk.FADTWOWY.js +1 -1
  33. package/cdn-versioned/chunks/chunk.FEL7NDH5.js +1 -1
  34. package/cdn-versioned/chunks/chunk.GMVRGCVC.js +1 -1
  35. package/cdn-versioned/chunks/chunk.HJR66OM3.js +1 -1
  36. package/cdn-versioned/chunks/chunk.I4JFBFUL.js +1 -1
  37. package/cdn-versioned/chunks/chunk.IVTNENFE.js +1 -1
  38. package/cdn-versioned/chunks/chunk.JM4O4R5N.js +4 -4
  39. package/cdn-versioned/chunks/chunk.JR3LNORU.js +1 -1
  40. package/cdn-versioned/chunks/chunk.LDWID3GG.js +1 -1
  41. package/cdn-versioned/chunks/chunk.MEWKZ5ES.js +1 -1
  42. package/cdn-versioned/chunks/chunk.NLHZZEN6.js +1 -1
  43. package/cdn-versioned/chunks/chunk.O7HTYQZJ.js +1 -1
  44. package/cdn-versioned/chunks/chunk.OUQRVDFU.js +1 -1
  45. package/cdn-versioned/chunks/chunk.PIM4IVY7.js +1 -1
  46. package/cdn-versioned/chunks/chunk.SHP5JHWU.js +1 -1
  47. package/cdn-versioned/chunks/chunk.SSCDGZIU.js +4 -4
  48. package/cdn-versioned/chunks/chunk.T7TDYFIZ.js +1 -1
  49. package/cdn-versioned/chunks/chunk.UGEF2FQR.js +1 -1
  50. package/cdn-versioned/chunks/chunk.UK5N2DTE.js +1 -1
  51. package/cdn-versioned/chunks/chunk.UYJTT34Z.js +1 -1
  52. package/cdn-versioned/chunks/chunk.V35C2AM2.js +1 -1
  53. package/cdn-versioned/chunks/chunk.VHYOMSJH.js +1 -1
  54. package/cdn-versioned/chunks/chunk.VX2WA6JC.js +1 -1
  55. package/cdn-versioned/chunks/chunk.W2TNOVM3.js +1 -1
  56. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  57. package/cdn-versioned/chunks/chunk.WAVXNSMT.js +1 -1
  58. package/cdn-versioned/chunks/chunk.XT7KIHF3.js +1 -1
  59. package/cdn-versioned/chunks/chunk.XVP3JFUF.js +1 -1
  60. package/cdn-versioned/chunks/chunk.Y4C5Q22M.js +1 -1
  61. package/cdn-versioned/chunks/chunk.YJVLZLXE.js +1 -1
  62. package/cdn-versioned/chunks/chunk.YPIA2ACB.js +1 -1
  63. package/cdn-versioned/chunks/chunk.YQ27KD5M.js +1 -1
  64. package/cdn-versioned/chunks/chunk.ZQC5PYLE.js +1 -1
  65. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  66. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  67. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  68. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  69. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  70. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  71. package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  72. package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  73. package/cdn-versioned/components/button/button.d.ts +1 -1
  74. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  75. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  76. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  77. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  78. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  79. package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
  80. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  81. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  82. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  83. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  84. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  85. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  86. package/cdn-versioned/components/header/header.d.ts +1 -1
  87. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  88. package/cdn-versioned/components/include/include.d.ts +1 -1
  89. package/cdn-versioned/components/input/input.d.ts +1 -1
  90. package/cdn-versioned/components/link/link.d.ts +1 -1
  91. package/cdn-versioned/components/loader/loader.d.ts +1 -1
  92. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  93. package/cdn-versioned/components/menu/menu.d.ts +1 -1
  94. package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
  95. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  96. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  97. package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
  98. package/cdn-versioned/components/option/option.d.ts +1 -1
  99. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  100. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  101. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  102. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  103. package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
  104. package/cdn-versioned/components/range/range.d.ts +1 -1
  105. package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
  106. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  107. package/cdn-versioned/components/select/select.d.ts +1 -1
  108. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  109. package/cdn-versioned/components/step/step.d.ts +1 -1
  110. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  111. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  112. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  113. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  114. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  115. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  116. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  117. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  118. package/cdn-versioned/components/video/video.d.ts +1 -1
  119. package/cdn-versioned/custom-elements.json +248 -244
  120. package/cdn-versioned/internal/form.js +3 -3
  121. package/cdn-versioned/solid-components.bundle.js +13 -13
  122. package/cdn-versioned/solid-components.css +2 -2
  123. package/cdn-versioned/solid-components.iife.js +13 -13
  124. package/cdn-versioned/vscode.html-custom-data.json +104 -96
  125. package/cdn-versioned/web-types.json +180 -164
  126. package/dist/custom-elements.json +11 -7
  127. package/dist/vscode.html-custom-data.json +13 -5
  128. package/dist/web-types.json +27 -11
  129. package/dist-versioned/chunks/chunk.3ABKOHAW.js +12 -12
  130. package/dist-versioned/chunks/chunk.3ARIWNKQ.js +2 -2
  131. package/dist-versioned/chunks/chunk.3T7MEK7F.js +3 -3
  132. package/dist-versioned/chunks/chunk.43MFVINX.js +2 -2
  133. package/dist-versioned/chunks/chunk.4W52UQUR.js +5 -5
  134. package/dist-versioned/chunks/chunk.57HIVEJA.js +12 -12
  135. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  136. package/dist-versioned/chunks/chunk.7HM3D5ZB.js +8 -8
  137. package/dist-versioned/chunks/chunk.7LZ5ZQ7G.js +11 -11
  138. package/dist-versioned/chunks/chunk.AII7ENVH.js +5 -5
  139. package/dist-versioned/chunks/chunk.AOZYVZSI.js +3 -3
  140. package/dist-versioned/chunks/chunk.BDKNOJYX.js +3 -3
  141. package/dist-versioned/chunks/chunk.BN2JSIUV.js +1 -1
  142. package/dist-versioned/chunks/chunk.BYBDNBDE.js +24 -24
  143. package/dist-versioned/chunks/chunk.CEVD4PPV.js +2 -2
  144. package/dist-versioned/chunks/chunk.CQUTC7N3.js +3 -3
  145. package/dist-versioned/chunks/chunk.DUQJ25W4.js +2 -2
  146. package/dist-versioned/chunks/chunk.E5QDRLG5.js +2 -2
  147. package/dist-versioned/chunks/chunk.ECTNQOHT.js +1 -1
  148. package/dist-versioned/chunks/chunk.EMEGC6Q7.js +26 -26
  149. package/dist-versioned/chunks/chunk.ENHM6QPI.js +2 -2
  150. package/dist-versioned/chunks/chunk.ETFAVTWL.js +1 -1
  151. package/dist-versioned/chunks/chunk.G5HAUM5L.js +1 -1
  152. package/dist-versioned/chunks/chunk.G6CZTG7Q.js +1 -1
  153. package/dist-versioned/chunks/chunk.G6IBNC3A.js +3 -3
  154. package/dist-versioned/chunks/chunk.GJM2UBD5.js +1 -1
  155. package/dist-versioned/chunks/chunk.GXUXYUOG.js +5 -5
  156. package/dist-versioned/chunks/chunk.GZ3JKXQ2.js +2 -2
  157. package/dist-versioned/chunks/chunk.H2H7UKLB.js +1 -1
  158. package/dist-versioned/chunks/chunk.H6E4C5UY.js +2 -2
  159. package/dist-versioned/chunks/chunk.HKATDXCW.js +1 -1
  160. package/dist-versioned/chunks/chunk.IORKEN4C.js +3 -3
  161. package/dist-versioned/chunks/chunk.JF4YKLM4.js +1 -1
  162. package/dist-versioned/chunks/chunk.JGFET2UA.js +4 -4
  163. package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
  164. package/dist-versioned/chunks/chunk.KLFBH24N.js +4 -4
  165. package/dist-versioned/chunks/chunk.KP2X7UDC.js +3 -3
  166. package/dist-versioned/chunks/chunk.KUG4JFNY.js +4 -4
  167. package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
  168. package/dist-versioned/chunks/chunk.MSMR7NPP.js +2 -2
  169. package/dist-versioned/chunks/chunk.OIC3RK54.js +2 -2
  170. package/dist-versioned/chunks/chunk.OZ6OXBJC.js +1 -1
  171. package/dist-versioned/chunks/chunk.PJ5SMSQP.js +2 -2
  172. package/dist-versioned/chunks/chunk.QBUQZLK4.js +1 -1
  173. package/dist-versioned/chunks/chunk.QGTSHDWW.js +1 -1
  174. package/dist-versioned/chunks/chunk.QQUOW5WM.js +6 -6
  175. package/dist-versioned/chunks/chunk.RBS2XRPG.js +5 -5
  176. package/dist-versioned/chunks/chunk.SLM2NJ64.js +2 -2
  177. package/dist-versioned/chunks/chunk.SORC72SZ.js +2 -2
  178. package/dist-versioned/chunks/chunk.TGYBKEY2.js +5 -5
  179. package/dist-versioned/chunks/chunk.TYT467JR.js +1 -1
  180. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  181. package/dist-versioned/chunks/chunk.ULN3BADF.js +2 -2
  182. package/dist-versioned/chunks/chunk.UPQH3D5U.js +6 -6
  183. package/dist-versioned/chunks/chunk.VRFFOJAC.js +1 -1
  184. package/dist-versioned/chunks/chunk.VVBDKQHI.js +14 -14
  185. package/dist-versioned/chunks/chunk.W257EQK6.js +3 -3
  186. package/dist-versioned/chunks/chunk.X3POGM3M.js +2 -2
  187. package/dist-versioned/chunks/chunk.Z67EE23U.js +2 -2
  188. package/dist-versioned/chunks/chunk.ZQ5Z7U7A.js +1 -1
  189. package/dist-versioned/chunks/chunk.ZS7PGX4E.js +1 -1
  190. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  191. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  192. package/dist-versioned/components/animation/animation.d.ts +1 -1
  193. package/dist-versioned/components/audio/audio.d.ts +1 -1
  194. package/dist-versioned/components/badge/badge.d.ts +1 -1
  195. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  196. package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  197. package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  198. package/dist-versioned/components/button/button.d.ts +1 -1
  199. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  200. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  201. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  202. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  203. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  204. package/dist-versioned/components/combobox/combobox.d.ts +1 -1
  205. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  206. package/dist-versioned/components/divider/divider.d.ts +1 -1
  207. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  208. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  209. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  210. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  211. package/dist-versioned/components/header/header.d.ts +1 -1
  212. package/dist-versioned/components/icon/icon.d.ts +1 -1
  213. package/dist-versioned/components/include/include.d.ts +1 -1
  214. package/dist-versioned/components/input/input.d.ts +1 -1
  215. package/dist-versioned/components/link/link.d.ts +1 -1
  216. package/dist-versioned/components/loader/loader.d.ts +1 -1
  217. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  218. package/dist-versioned/components/menu/menu.d.ts +1 -1
  219. package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
  220. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  221. package/dist-versioned/components/notification/notification.d.ts +1 -1
  222. package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
  223. package/dist-versioned/components/option/option.d.ts +1 -1
  224. package/dist-versioned/components/popup/popup.d.ts +1 -1
  225. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  226. package/dist-versioned/components/radio/radio.d.ts +1 -1
  227. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  228. package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
  229. package/dist-versioned/components/range/range.d.ts +1 -1
  230. package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
  231. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  232. package/dist-versioned/components/select/select.d.ts +1 -1
  233. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  234. package/dist-versioned/components/step/step.d.ts +1 -1
  235. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  236. package/dist-versioned/components/switch/switch.d.ts +1 -1
  237. package/dist-versioned/components/tab/tab.d.ts +1 -1
  238. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  239. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  240. package/dist-versioned/components/tag/tag.d.ts +1 -1
  241. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  242. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  243. package/dist-versioned/components/video/video.d.ts +1 -1
  244. package/dist-versioned/custom-elements.json +248 -244
  245. package/dist-versioned/internal/form.js +3 -3
  246. package/dist-versioned/solid-components.css +2 -2
  247. package/dist-versioned/vscode.html-custom-data.json +104 -96
  248. package/dist-versioned/web-types.json +180 -164
  249. package/package.json +1 -1
@@ -2438,6 +2438,7 @@
2438
2438
  "text": "string"
2439
2439
  },
2440
2440
  "default": "''",
2441
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
2441
2442
  "attribute": "title",
2442
2443
  "reflects": true
2443
2444
  },
@@ -2794,6 +2795,7 @@
2794
2795
  "text": "string"
2795
2796
  },
2796
2797
  "default": "''",
2798
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
2797
2799
  "fieldName": "title"
2798
2800
  },
2799
2801
  {
@@ -3986,6 +3988,7 @@
3986
3988
  "text": "string"
3987
3989
  },
3988
3990
  "default": "''",
3991
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
3989
3992
  "attribute": "title",
3990
3993
  "reflects": true
3991
3994
  },
@@ -4262,6 +4265,7 @@
4262
4265
  "text": "string"
4263
4266
  },
4264
4267
  "default": "''",
4268
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
4265
4269
  "fieldName": "title"
4266
4270
  },
4267
4271
  {
@@ -9014,7 +9018,7 @@
9014
9018
  "text": "string"
9015
9019
  },
9016
9020
  "default": "''",
9017
- "description": "The `title` attribute specifies extra information about an element most often as tooltip text when the mouse moves over the element.",
9021
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
9018
9022
  "attribute": "title",
9019
9023
  "reflects": true
9020
9024
  },
@@ -9544,7 +9548,7 @@
9544
9548
  "text": "string"
9545
9549
  },
9546
9550
  "default": "''",
9547
- "description": "The `title` attribute specifies extra information about an element most often as tooltip text when the mouse moves over the element.",
9551
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
9548
9552
  "fieldName": "title"
9549
9553
  },
9550
9554
  {
@@ -17169,7 +17173,7 @@
17169
17173
  "text": "string"
17170
17174
  },
17171
17175
  "default": "''",
17172
- "description": "The title of the switch adds a tooltip with title text.",
17176
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
17173
17177
  "attribute": "title",
17174
17178
  "reflects": true
17175
17179
  },
@@ -17413,7 +17417,7 @@
17413
17417
  "text": "string"
17414
17418
  },
17415
17419
  "default": "''",
17416
- "description": "The title of the switch adds a tooltip with title text.",
17420
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
17417
17421
  "fieldName": "title"
17418
17422
  },
17419
17423
  {
@@ -19212,7 +19216,7 @@
19212
19216
  "text": "string"
19213
19217
  },
19214
19218
  "default": "''",
19215
- "description": "An empty title prevents browser validation tooltips from appearing on hover",
19219
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
19216
19220
  "attribute": "title",
19217
19221
  "reflects": true
19218
19222
  },
@@ -19713,7 +19717,7 @@
19713
19717
  "text": "string"
19714
19718
  },
19715
19719
  "default": "''",
19716
- "description": "An empty title prevents browser validation tooltips from appearing on hover",
19720
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
19717
19721
  "fieldName": "title"
19718
19722
  },
19719
19723
  {
@@ -20584,7 +20588,7 @@
20584
20588
  "package": {
20585
20589
  "name": "@solid-design-system/components",
20586
20590
  "description": "Solid Design System: Components",
20587
- "version": "5.13.11",
20591
+ "version": "5.13.12",
20588
20592
  "author": "Union Investment",
20589
20593
  "homepage": "https://solid-design-system.fe.union-investment.de/docs/",
20590
20594
  "license": "MIT"
@@ -339,7 +339,11 @@
339
339
  "name": "sd-button",
340
340
  "description": "Buttons represent actions that are available to the user.\n---\n\n\n### **Events:**\n - **sd-blur** - Emitted when the button loses focus.\n- **sd-focus** - Emitted when the button gains focus.\n- **sd-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **click()** - Simulates a click on the button.\n- **focus(options: _FocusOptions_)** - Sets focus on the button.\n- **blur()** - Removes focus from the button.\n- **checkValidity()** - Checks for validity but does not show the browser's validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. Pass an empty string to restore validity.\n- **emit(name: _string_, options: _CustomEventInit_)** - Emits a custom event with more convenient defaults.\n- **token(name: _string_, fallback: _T_): _T_** - Retrieves the value of a css variable token.\n\n### **Slots:**\n - _default_ - The button's label.\n- **icon-left** - A prefix icon or similar element.\n- **icon-right** - A suffix icon or similar element.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **icon-left** - The container that wraps the left icon area.\n- **label** - The button's label.\n- **icon-right** - The container that wraps the right icon area.\n- **motion-wrapper** - The container that wraps the motion animation.",
341
341
  "attributes": [
342
- { "name": "title", "values": [] },
342
+ {
343
+ "name": "title",
344
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
345
+ "values": []
346
+ },
343
347
  {
344
348
  "name": "variant",
345
349
  "description": "The button's theme variant.",
@@ -581,7 +585,11 @@
581
585
  "name": "sd-checkbox",
582
586
  "description": "Checkboxes allow the user to toggle an option on or off.\n---\n\n\n### **Events:**\n - **sd-blur** - Emitted when the checkbox loses focus.\n- **sd-change** - Emitted when the checked state changes.\n- **sd-focus** - Emitted when the checkbox gains focus.\n- **sd-input** - Emitted when the checkbox receives input.\n\n### **Methods:**\n - **click()** - Simulates a click on the checkbox.\n- **focus(options: _FocusOptions_)** - Sets focus on the checkbox.\n- **blur()** - Removes focus from the checkbox.\n- **checkValidity()** - Checks for validity but does not show a validation message. Returns true when valid and false when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows a validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. The value provided will be shown to the user when the form is submitted. To clear\nthe custom validation message, call this method with an empty string.\n- **emit(name: _string_, options: _CustomEventInit_)** - Emits a custom event with more convenient defaults.\n- **token(name: _string_, fallback: _T_): _T_** - Retrieves the value of a css variable token.\n\n### **Slots:**\n - _default_ - The checkbox's label.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **control** - The square container that wraps the checkbox's checked state.\n- **control--checked** - Matches the control part when the checkbox is checked.\n- **control--indeterminate** - Matches the control part when the checkbox is indeterminate.\n- **checked-icon** - The checked icon, an `<sd-icon>` element.\n- **indeterminate-icon** - The indeterminate icon, an `<sd-icon>` element.\n- **label** - The container that wraps the checkbox's label.",
583
587
  "attributes": [
584
- { "name": "title", "values": [] },
588
+ {
589
+ "name": "title",
590
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
591
+ "values": []
592
+ },
585
593
  {
586
594
  "name": "name",
587
595
  "description": "The name of the checkbox, submitted as a name/value pair with form data.",
@@ -1368,7 +1376,7 @@
1368
1376
  },
1369
1377
  {
1370
1378
  "name": "title",
1371
- "description": "The `title` attribute specifies extra information about an element most often as tooltip text when the mouse moves over the element.",
1379
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
1372
1380
  "values": []
1373
1381
  },
1374
1382
  {
@@ -2688,7 +2696,7 @@
2688
2696
  "attributes": [
2689
2697
  {
2690
2698
  "name": "title",
2691
- "description": "The title of the switch adds a tooltip with title text.",
2699
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
2692
2700
  "values": []
2693
2701
  },
2694
2702
  {
@@ -3002,7 +3010,7 @@
3002
3010
  "attributes": [
3003
3011
  {
3004
3012
  "name": "title",
3005
- "description": "An empty title prevents browser validation tooltips from appearing on hover",
3013
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
3006
3014
  "values": []
3007
3015
  },
3008
3016
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@solid-design-system/components",
4
- "version": "5.13.11",
4
+ "version": "5.13.12",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -756,7 +756,11 @@
756
756
  "description": "Buttons represent actions that are available to the user.\n---\n\n\n### **Events:**\n - **sd-blur** - Emitted when the button loses focus.\n- **sd-focus** - Emitted when the button gains focus.\n- **sd-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **click()** - Simulates a click on the button.\n- **focus(options: _FocusOptions_)** - Sets focus on the button.\n- **blur()** - Removes focus from the button.\n- **checkValidity()** - Checks for validity but does not show the browser's validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. Pass an empty string to restore validity.\n- **emit(name: _string_, options: _CustomEventInit_)** - Emits a custom event with more convenient defaults.\n- **token(name: _string_, fallback: _T_): _T_** - Retrieves the value of a css variable token.\n\n### **Slots:**\n - _default_ - The button's label.\n- **icon-left** - A prefix icon or similar element.\n- **icon-right** - A suffix icon or similar element.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **icon-left** - The container that wraps the left icon area.\n- **label** - The button's label.\n- **icon-right** - The container that wraps the right icon area.\n- **motion-wrapper** - The container that wraps the motion animation.",
757
757
  "doc-url": "",
758
758
  "attributes": [
759
- { "name": "title", "value": { "type": "string", "default": "''" } },
759
+ {
760
+ "name": "title",
761
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
762
+ "value": { "type": "string", "default": "''" }
763
+ },
760
764
  {
761
765
  "name": "variant",
762
766
  "description": "The button's theme variant.",
@@ -893,7 +897,11 @@
893
897
  ],
894
898
  "js": {
895
899
  "properties": [
896
- { "name": "title", "type": "string" },
900
+ {
901
+ "name": "title",
902
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
903
+ "type": "string"
904
+ },
897
905
  {
898
906
  "name": "variant",
899
907
  "description": "The button's theme variant.",
@@ -1248,7 +1256,11 @@
1248
1256
  "description": "Checkboxes allow the user to toggle an option on or off.\n---\n\n\n### **Events:**\n - **sd-blur** - Emitted when the checkbox loses focus.\n- **sd-change** - Emitted when the checked state changes.\n- **sd-focus** - Emitted when the checkbox gains focus.\n- **sd-input** - Emitted when the checkbox receives input.\n\n### **Methods:**\n - **click()** - Simulates a click on the checkbox.\n- **focus(options: _FocusOptions_)** - Sets focus on the checkbox.\n- **blur()** - Removes focus from the checkbox.\n- **checkValidity()** - Checks for validity but does not show a validation message. Returns true when valid and false when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows a validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. The value provided will be shown to the user when the form is submitted. To clear\nthe custom validation message, call this method with an empty string.\n- **emit(name: _string_, options: _CustomEventInit_)** - Emits a custom event with more convenient defaults.\n- **token(name: _string_, fallback: _T_): _T_** - Retrieves the value of a css variable token.\n\n### **Slots:**\n - _default_ - The checkbox's label.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **control** - The square container that wraps the checkbox's checked state.\n- **control--checked** - Matches the control part when the checkbox is checked.\n- **control--indeterminate** - Matches the control part when the checkbox is indeterminate.\n- **checked-icon** - The checked icon, an `<sd-icon>` element.\n- **indeterminate-icon** - The indeterminate icon, an `<sd-icon>` element.\n- **label** - The container that wraps the checkbox's label.",
1249
1257
  "doc-url": "",
1250
1258
  "attributes": [
1251
- { "name": "title", "value": { "type": "string", "default": "''" } },
1259
+ {
1260
+ "name": "title",
1261
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
1262
+ "value": { "type": "string", "default": "''" }
1263
+ },
1252
1264
  {
1253
1265
  "name": "name",
1254
1266
  "description": "The name of the checkbox, submitted as a name/value pair with form data.",
@@ -1326,7 +1338,11 @@
1326
1338
  ],
1327
1339
  "js": {
1328
1340
  "properties": [
1329
- { "name": "title", "type": "string" },
1341
+ {
1342
+ "name": "title",
1343
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
1344
+ "type": "string"
1345
+ },
1330
1346
  {
1331
1347
  "name": "name",
1332
1348
  "description": "The name of the checkbox, submitted as a name/value pair with form data.",
@@ -3006,7 +3022,7 @@
3006
3022
  },
3007
3023
  {
3008
3024
  "name": "title",
3009
- "description": "The `title` attribute specifies extra information about an element most often as tooltip text when the mouse moves over the element.",
3025
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
3010
3026
  "value": { "type": "string", "default": "''" }
3011
3027
  },
3012
3028
  {
@@ -3244,7 +3260,7 @@
3244
3260
  },
3245
3261
  {
3246
3262
  "name": "title",
3247
- "description": "The `title` attribute specifies extra information about an element most often as tooltip text when the mouse moves over the element.",
3263
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
3248
3264
  "type": "string"
3249
3265
  },
3250
3266
  {
@@ -6131,7 +6147,7 @@
6131
6147
  "attributes": [
6132
6148
  {
6133
6149
  "name": "title",
6134
- "description": "The title of the switch adds a tooltip with title text.",
6150
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
6135
6151
  "value": { "type": "string", "default": "''" }
6136
6152
  },
6137
6153
  {
@@ -6204,7 +6220,7 @@
6204
6220
  "properties": [
6205
6221
  {
6206
6222
  "name": "title",
6207
- "description": "The title of the switch adds a tooltip with title text.",
6223
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
6208
6224
  "type": "string"
6209
6225
  },
6210
6226
  {
@@ -6808,7 +6824,7 @@
6808
6824
  "attributes": [
6809
6825
  {
6810
6826
  "name": "title",
6811
- "description": "An empty title prevents browser validation tooltips from appearing on hover",
6827
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
6812
6828
  "value": { "type": "string", "default": "''" }
6813
6829
  },
6814
6830
  {
@@ -6976,7 +6992,7 @@
6976
6992
  "properties": [
6977
6993
  {
6978
6994
  "name": "title",
6979
- "description": "An empty title prevents browser validation tooltips from appearing on hover",
6995
+ "description": "The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.",
6980
6996
  "type": "string"
6981
6997
  },
6982
6998
  {
@@ -1 +1 @@
1
- import{a as g}from"./chunk.I2H6CZK5.js";import{a as L}from"./chunk.2AQOPKKH.js";import{a as A}from"./chunk.G7HKVXLR.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as E}from"./chunk.CGQ2BPPZ.js";import{a as o,c as l}from"./chunk.SKUMYG4O.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as p}from"./chunk.26V4EXHB.js";import{a as C}from"./chunk.DEXOQON7.js";import{a as v}from"./chunk.E2DRD2OX.js";import{a as x,b as r,d as c,h as b}from"./chunk.4WS6ISBF.js";import{b as k,e as u}from"./chunk.UWPDCU52.js";import{b as n,e as h}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends b{constructor(){super(...arguments);this.hasSlotController=new E(this,"footer");this.localize=new C(this);this.modal=new L(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 y;let e=(y=this.closeButton.shadowRoot)==null?void 0:y.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=A(),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");let d=l(this,`drawer.show${g(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"),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()}),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${g(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,w(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,w(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${p("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><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")}"></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-5-13-11-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 end-2"><sd-5-13-11-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-5-13-11-icon></sd-5-13-11-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 ms-4 absolute top-2 end-2"><sd-5-13-11-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-5-13-11-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-5-13-11-icon></sd-5-13-11-button></div></header>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" 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></section>`}};t.styles=[...b.styles,k`: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({type:String,attribute:"label",reflect:!0})],t.prototype,"label",2),i([r({type:String,reflect:!0})],t.prototype,"placement",2),i([r({type:Boolean,reflect:!0})],t.prototype,"contained",2),i([r({attribute:"no-header",type:Boolean,reflect:!0})],t.prototype,"noHeader",2),i([v("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([v("contained",{waitUntilFirstUpdate:!0})],t.prototype,"handleNoModalChange",1),t=i([x("sd-5-13-11-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:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});o("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});o("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});export{t as a};
1
+ import{a as g}from"./chunk.I2H6CZK5.js";import{a as L}from"./chunk.2AQOPKKH.js";import{a as A}from"./chunk.G7HKVXLR.js";import{a as m,b as f}from"./chunk.3L472FD4.js";import{a as E}from"./chunk.CGQ2BPPZ.js";import{a as o,c as l}from"./chunk.SKUMYG4O.js";import{a as w}from"./chunk.KLRPP4NQ.js";import{a as p}from"./chunk.26V4EXHB.js";import{a as C}from"./chunk.DEXOQON7.js";import{a as v}from"./chunk.E2DRD2OX.js";import{a as x,b as r,d as c,h as b}from"./chunk.4WS6ISBF.js";import{b as k,e as u}from"./chunk.UWPDCU52.js";import{b as n,e as h}from"./chunk.6OTM3PE5.js";import{e as i}from"./chunk.TJOCV4DC.js";var t=class extends b{constructor(){super(...arguments);this.hasSlotController=new E(this,"footer");this.localize=new C(this);this.modal=new L(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 y;let e=(y=this.closeButton.shadowRoot)==null?void 0:y.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=A(),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");let d=l(this,`drawer.show${g(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"),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()}),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${g(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,w(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,w(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${p("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><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")}"></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-5-13-12-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 end-2"><sd-5-13-12-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-5-13-12-icon></sd-5-13-12-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 ms-4 absolute top-2 end-2"><sd-5-13-12-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-5-13-12-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-5-13-12-icon></sd-5-13-12-button></div></header>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" 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></section>`}};t.styles=[...b.styles,k`: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({type:String,attribute:"label",reflect:!0})],t.prototype,"label",2),i([r({type:String,reflect:!0})],t.prototype,"placement",2),i([r({type:Boolean,reflect:!0})],t.prototype,"contained",2),i([r({attribute:"no-header",type:Boolean,reflect:!0})],t.prototype,"noHeader",2),i([v("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),i([v("contained",{waitUntilFirstUpdate:!0})],t.prototype,"handleNoModalChange",1),t=i([x("sd-5-13-12-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:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});o("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});o("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});o("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});export{t as a};
@@ -1 +1 @@
1
- import{a as s}from"./chunk.26V4EXHB.js";import{a as o,b as r,h as i}from"./chunk.4WS6ISBF.js";import{b as n,e as a}from"./chunk.UWPDCU52.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends i{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return a`<span part="base" aria-labelledby="content" class="${s("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"text-primary bg-primary-100 border-primary":"text-white bg-primary-500 border-white",green:this.inverted?"text-white bg-success border-primary":"text-white bg-success border-white",red:this.inverted?"text-white bg-error border-primary":"text-white bg-error border-white"}[this.variant])}"><span id="content" part="content" class="${s(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};e.styles=[...i.styles,n`:host{align-items:center;display:inline-flex;justify-content:center}:host([size=md]){font-size:.625rem;height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem)}:host([size=lg]){font-size:.75rem;height:var(--sd-spacing-5,1.25rem);min-width:var(--sd-spacing-5,1.25rem)}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({type:String,reflect:!0})],e.prototype,"size",2),t([r({type:String,reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([o("sd-5-13-11-badge")],e);export{e as a};
1
+ import{a as s}from"./chunk.26V4EXHB.js";import{a as o,b as r,h as i}from"./chunk.4WS6ISBF.js";import{b as n,e as a}from"./chunk.UWPDCU52.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends i{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return a`<span part="base" aria-labelledby="content" class="${s("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"text-primary bg-primary-100 border-primary":"text-white bg-primary-500 border-white",green:this.inverted?"text-white bg-success border-primary":"text-white bg-success border-white",red:this.inverted?"text-white bg-error border-primary":"text-white bg-error border-white"}[this.variant])}"><span id="content" part="content" class="${s(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};e.styles=[...i.styles,n`:host{align-items:center;display:inline-flex;justify-content:center}:host([size=md]){font-size:.625rem;height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem)}:host([size=lg]){font-size:.75rem;height:var(--sd-spacing-5,1.25rem);min-width:var(--sd-spacing-5,1.25rem)}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],t([r({type:String,reflect:!0})],e.prototype,"size",2),t([r({type:String,reflect:!0})],e.prototype,"variant",2),t([r({type:Boolean,reflect:!0})],e.prototype,"inverted",2),e=t([o("sd-5-13-12-badge")],e);export{e as a};
@@ -1 +1 @@
1
- import{a as p}from"./chunk.CGQ2BPPZ.js";import{a}from"./chunk.26V4EXHB.js";import{a as r}from"./chunk.E2DRD2OX.js";import{a as d,b as o,h as n}from"./chunk.4WS6ISBF.js";import{b as m,e as s}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends n{constructor(){super(...arguments);this.hasSlotController=new p(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-5-13-11-checkbox")]}async syncCheckboxElements(){let i=this.getAllCheckboxes();await Promise.all(i.map(async l=>{await l.updateComplete,l.size=this.size}))}syncCheckboxes(){customElements.get("sd-5-13-11-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-5-13-11-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let i=this.hasSlotController.test("label"),l=this.label?!0:i,b=this.hasSlotController.test("help-text"),c=this.helpText?!0:b,x=s`<slot @slotchange="${this.syncCheckboxes}"></slot>`,h=this.hasSlotController.test("tooltip");return s`<fieldset part="form-control" class="${a("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${l||h?s`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${a("p-0 font-bold leading-normal text-black",l?"flex":"hidden")}" aria-hidden="${l?"false":"true"}"><slot name="label">${this.label}</slot></label> ${h?s`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${a({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${x}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${a("text-sm text-neutral-700 mt-2",c?"block":"hidden")}" aria-hidden="${!c}">${this.helpText}</slot>`}};t.styles=[...n.styles,m`:host{display:block}:host([orientation=vertical]) ::slotted(sd-5-13-11-checkbox){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-5-13-11-checkbox:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-5-13-11-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-5-13-11-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-5-13-11-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-5-13-11-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}`],e([o({type:String,reflect:!0})],t.prototype,"size",2),e([o({type:String,reflect:!0})],t.prototype,"orientation",2),e([o({type:String,reflect:!0})],t.prototype,"label",2),e([o({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),e([r("size",{waitUntilFirstUpdate:!0})],t.prototype,"handleSizeChange",1),e([r("invalid",{waitUntilFirstUpdate:!0})],t.prototype,"handleInvalid",1),t=e([d("sd-5-13-11-checkbox-group")],t);export{t as a};
1
+ import{a as p}from"./chunk.CGQ2BPPZ.js";import{a}from"./chunk.26V4EXHB.js";import{a as r}from"./chunk.E2DRD2OX.js";import{a as d,b as o,h as n}from"./chunk.4WS6ISBF.js";import{b as m,e as s}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var t=class extends n{constructor(){super(...arguments);this.hasSlotController=new p(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-5-13-12-checkbox")]}async syncCheckboxElements(){let i=this.getAllCheckboxes();await Promise.all(i.map(async l=>{await l.updateComplete,l.size=this.size}))}syncCheckboxes(){customElements.get("sd-5-13-12-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-5-13-12-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let i=this.hasSlotController.test("label"),l=this.label?!0:i,b=this.hasSlotController.test("help-text"),c=this.helpText?!0:b,x=s`<slot @slotchange="${this.syncCheckboxes}"></slot>`,h=this.hasSlotController.test("tooltip");return s`<fieldset part="form-control" class="${a("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${l||h?s`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${a("p-0 font-bold leading-normal text-black",l?"flex":"hidden")}" aria-hidden="${l?"false":"true"}"><slot name="label">${this.label}</slot></label> ${h?s`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${a({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${x}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${a("text-sm text-neutral-700 mt-2",c?"block":"hidden")}" aria-hidden="${!c}">${this.helpText}</slot>`}};t.styles=[...n.styles,m`:host{display:block}:host([orientation=vertical]) ::slotted(sd-5-13-12-checkbox){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-5-13-12-checkbox:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-5-13-12-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-5-13-12-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-5-13-12-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-5-13-12-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}`],e([o({type:String,reflect:!0})],t.prototype,"size",2),e([o({type:String,reflect:!0})],t.prototype,"orientation",2),e([o({type:String,reflect:!0})],t.prototype,"label",2),e([o({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),e([r("size",{waitUntilFirstUpdate:!0})],t.prototype,"handleSizeChange",1),e([r("invalid",{waitUntilFirstUpdate:!0})],t.prototype,"handleInvalid",1),t=e([d("sd-5-13-12-checkbox-group")],t);export{t as a};
@@ -1 +1 @@
1
- import{a as p}from"./chunk.CGQ2BPPZ.js";import{a as b}from"./chunk.YTG5BN3U.js";import{a as o}from"./chunk.26V4EXHB.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as c,b as i,c as u,d as r,h as n}from"./chunk.4WS6ISBF.js";import{b as d,e as a}from"./chunk.UWPDCU52.js";import{e as s}from"./chunk.TJOCV4DC.js";var t=class extends n{constructor(){super(...arguments);this.hasSlotController=new p(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(e){if(this.disabled||this.visuallyDisabled){e.preventDefault(),e.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){let e=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",e?"true":"false")}focus(e){this.input.focus(e)}blur(){this.input.blur()}render(){let e=this.hasSlotController.test("[default]"),l=this.hasSlotController.test("icon"),m=`${this.size}-${e?"label":"no-label"}`;return a`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${o("relative text-center rounded-full transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled&&!this.visuallyDisabled?"bg-primary text-white hover:bg-primary-500":(this.disabled||this.visuallyDisabled)&&!this.checked?"text-neutral-500 hover:cursor-not-allowed":(this.disabled||this.visuallyDisabled)&&this.checked?"text-neutral-500 hover:cursor-not-allowed ":"bg-transparent text-primary border-primary hover:text-primary-500 cursor-pointer",e&&{sm:"px-3",md:"px-4",lg:"px-5"}[this.size],this.hasFocus&&"focused-class",e&&"button--has-label",l&&"button--has-icon flex gap-2",m)}" aria-disabled="${this.disabled||this.visuallyDisabled}" type="button" value="${b(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${o(l&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!l}"></slot>${e?a`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};t.styles=[...n.styles,d`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{padding-left:var(--sd-spacing-5,1.25rem);padding-right:var(--sd-spacing-5,1.25rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{padding-left:var(--sd-spacing-4,1rem);padding-right:var(--sd-spacing-4,1rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{padding-left:var(--sd-spacing-3,.75rem);padding-right:var(--sd-spacing-3,.75rem)}:host([size=lg].sd-5-13-11-button-group__button:not(.sd-5-13-11-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-3,.75rem)*-1)}:host([size=md].sd-5-13-11-button-group__button:not(.sd-5-13-11-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-2,.5rem)*-1)}:host([size=sm].sd-5-13-11-button-group__button:not(.sd-5-13-11-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-1,.25rem)*-1)}:host(.sd-5-13-11-button-group__button--hover){z-index:20}:host(.sd-5-13-11-button-group__button--focus),:host(.sd-5-13-11-button-group__button[checked]){z-index:10}`],s([r(".button")],t.prototype,"input",2),s([r(".hidden-input")],t.prototype,"hiddenInput",2),s([u()],t.prototype,"hasFocus",2),s([i({type:String,reflect:!0})],t.prototype,"size",2),s([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),s([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),s([i({type:Boolean,reflect:!0})],t.prototype,"checked",2),s([i()],t.prototype,"value",2),s([h(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=s([c("sd-5-13-11-radio-button")],t);export{t as a};
1
+ import{a as p}from"./chunk.CGQ2BPPZ.js";import{a as b}from"./chunk.YTG5BN3U.js";import{a as o}from"./chunk.26V4EXHB.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as c,b as i,c as u,d as r,h as n}from"./chunk.4WS6ISBF.js";import{b as d,e as a}from"./chunk.UWPDCU52.js";import{e as s}from"./chunk.TJOCV4DC.js";var t=class extends n{constructor(){super(...arguments);this.hasSlotController=new p(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(e){if(this.disabled||this.visuallyDisabled){e.preventDefault(),e.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){let e=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",e?"true":"false")}focus(e){this.input.focus(e)}blur(){this.input.blur()}render(){let e=this.hasSlotController.test("[default]"),l=this.hasSlotController.test("icon"),m=`${this.size}-${e?"label":"no-label"}`;return a`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${o("relative text-center rounded-full transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled&&!this.visuallyDisabled?"bg-primary text-white hover:bg-primary-500":(this.disabled||this.visuallyDisabled)&&!this.checked?"text-neutral-500 hover:cursor-not-allowed":(this.disabled||this.visuallyDisabled)&&this.checked?"text-neutral-500 hover:cursor-not-allowed ":"bg-transparent text-primary border-primary hover:text-primary-500 cursor-pointer",e&&{sm:"px-3",md:"px-4",lg:"px-5"}[this.size],this.hasFocus&&"focused-class",e&&"button--has-label",l&&"button--has-icon flex gap-2",m)}" aria-disabled="${this.disabled||this.visuallyDisabled}" type="button" value="${b(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${o(l&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!l}"></slot>${e?a`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};t.styles=[...n.styles,d`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{padding-left:var(--sd-spacing-5,1.25rem);padding-right:var(--sd-spacing-5,1.25rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{padding-left:var(--sd-spacing-4,1rem);padding-right:var(--sd-spacing-4,1rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{padding-left:var(--sd-spacing-3,.75rem);padding-right:var(--sd-spacing-3,.75rem)}:host([size=lg].sd-5-13-12-button-group__button:not(.sd-5-13-12-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-3,.75rem)*-1)}:host([size=md].sd-5-13-12-button-group__button:not(.sd-5-13-12-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-2,.5rem)*-1)}:host([size=sm].sd-5-13-12-button-group__button:not(.sd-5-13-12-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-1,.25rem)*-1)}:host(.sd-5-13-12-button-group__button--hover){z-index:20}:host(.sd-5-13-12-button-group__button--focus),:host(.sd-5-13-12-button-group__button[checked]){z-index:10}`],s([r(".button")],t.prototype,"input",2),s([r(".hidden-input")],t.prototype,"hiddenInput",2),s([u()],t.prototype,"hasFocus",2),s([i({type:String,reflect:!0})],t.prototype,"size",2),s([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),s([i({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),s([i({type:Boolean,reflect:!0})],t.prototype,"checked",2),s([i()],t.prototype,"value",2),s([h(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),t=s([c("sd-5-13-12-radio-button")],t);export{t as a};
@@ -1 +1 @@
1
- import{a as A}from"./chunk.YS7YV4KF.js";import{a as z}from"./chunk.URI32NHH.js";import{a as L}from"./chunk.CDC46OKY.js";import{b as F}from"./chunk.6HLS5XU2.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as n}from"./chunk.YTG5BN3U.js";import{a as P,b as V}from"./chunk.CDEXCMVF.js";import{a}from"./chunk.26V4EXHB.js";import{a as T}from"./chunk.DEXOQON7.js";import{a as m}from"./chunk.E2DRD2OX.js";import{a as E,b as s,c as p,d as v,h as y}from"./chunk.4WS6ISBF.js";import{b as C,e as r,h as k,i as D}from"./chunk.UWPDCU52.js";import{a as $,e as i}from"./chunk.TJOCV4DC.js";var g=class extends A{constructor(e){super(e);this.handlePointerDown=e=>{e.button!==0||this.host.disabled||this.spinOnLongPressCallback(e)};this.handlePointerUp=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(e.type!==P.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return D}update(e,[l]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=$({},l),this.host.addEventListener("pointerdown",this.handlePointerDown)),k}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(e){var l;e.preventDefault(),e.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(l=this.observer)==null||l.disconnect(),this.observer=new MutationObserver(u=>{u.forEach(c=>{c.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var e;clearInterval(this.interval),clearTimeout(this.timeout),(e=this.observer)==null||e.disconnect()}},w=V(g);var B,S=(B=navigator.userAgentData)==null?void 0:B.brands.some(b=>b.brand.includes("Chromium")),O=S?!1:navigator.userAgent.includes("Firefox"),t=class extends y{constructor(){super(...arguments);this.formControlController=new F(this);this.hasSlotController=new M(this,"help-text","label","left","right","message","placeholder");this.localize=new T(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var e,l;return(l=(e=this.input)==null?void 0:e.valueAsDate)!=null?l:null}set valueAsDate(e){let l=document.createElement("input");l.type="date",l.valueAsDate=e,this.value=l.value}get valueAsNumber(){var e,l;return(l=(e=this.input)==null?void 0:e.valueAsNumber)!=null?l:parseFloat(this.value)}set valueAsNumber(e){let l=document.createElement("input");l.type="number",l.valueAsNumber=e,this.value=l.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(e){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),e.stopPropagation()}handleSearchClick(e){this.emit("sd-search"),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleKeyDown(e){let l=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!l&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,l,u="none"){this.input.setSelectionRange(e,l,u)}setRangeText(e,l,u,c){this.input.setRangeText(e,l,u,c),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},l=this.label?!0:!!e.label,u=this.helpText?!0:!!e.helpText,c=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),U=!!e.tooltip,f=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",x=this.size==="sm"?"text-sm":"text-base",H={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[f],d=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",h={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],o={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return r`<div part="form-control" class="${a((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${l||U?r`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${a(l?"inline-block":"hidden",x)}" for="input" aria-hidden="${l?"false":"true"}"><slot name="label">${this.label}</slot></label> ${e.tooltip?r`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${a("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${a("absolute w-full h-full pointer-events-none border rounded-default transition-[border] ease-in-out duration-medium hover:duration-fast",H)}"></div><div part="base" class="${a("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast",this.size==="lg"?"py-2":"py-1",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",f==="disabled"||f==="visuallyDisabled"?"text-neutral-500":"text-black")}">${e.left?r`<slot name="left" part="left" class="${a("inline-flex",this.size==="sm"?"mr-1":"mr-2",d,o)}"></slot>`:""} <input part="input" id="input" class="${a("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder-neutral-500 cursor-not-allowed":"placeholder-neutral-700",this.size==="sm"?"h-6":"h-8",x)}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${n(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${n(this.placeholder)}" minlength="${n(this.minlength)}" maxlength="${n(this.maxlength)}" min="${n(this.min)}" max="${n(this.max)}" step="${n(this.step)}" .value="${z(this.value)}" autocapitalize="${n(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${n(this.autocomplete)}" autocorrect="${n(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${n(this.pattern)}" enterkeyhint="${n(this.enterkeyhint)}" inputmode="${n(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${c?r`<button part="clear-button" class="${a("flex justify-center",h)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-5-13-11-icon class="${a("text-neutral-700",o)}" library="_internal" name="closing-round"></sd-5-13-11-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?r`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="${a("flex items-center sd-interactive",h)}" type="button" @click="${this.handlePasswordToggle}">${this.passwordVisible?r`<slot name="show-password-icon"><sd-5-13-11-icon class="${a(d,o)}" library="_internal" name="eye"></sd-5-13-11-icon></slot>`:r`<slot name="hide-password-icon"><sd-5-13-11-icon class="${a(d,o)}" library="_internal" name="eye-crossed-out"></sd-5-13-11-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!O?r`<sd-5-13-11-icon class="${a(d,h,o)}" library="_internal" name="calendar"></sd-5-13-11-icon>`:""} ${this.type==="time"?r`<sd-5-13-11-icon class="${a(d,h,o)}" library="_internal" name="clock"></sd-5-13-11-icon>`:""} ${this.type==="search"?r`<button class="${a("flex items-center sd-interactive",h)}" type="button" @click="${this.handleSearchClick}"><sd-5-13-11-icon class="${a(d,o)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-5-13-11-icon></button>`:""} ${this.showInvalidStyle?r`<sd-5-13-11-icon part="invalid-icon" class="${a("text-error",h,o)}" library="_internal" name="risk"></sd-5-13-11-icon>`:""} ${this.showValidStyle&&this.styleOnValid?r`<sd-5-13-11-icon class="${a("text-success flex-shrink-0",h,o)}" library="_internal" name="status-check" part="valid-icon"></sd-5-13-11-icon>`:""} ${e.right?r`<slot name="right" part="right" class="${a("inline-flex",d,h,o)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?r`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${w({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-5-13-11-icon name="system/minus-circle" label="Decrease value" class="${a(d,h,o)}"></sd-5-13-11-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${w({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-5-13-11-icon name="system/plus-circle" label="Decrease value" class="${a(d,h,o)}"></sd-5-13-11-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${a("text-sm text-neutral-700 mt-2",u?"block":"hidden")}" aria-hidden="${!u}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};t.styles=[...y.styles,C`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-5-13-11-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],i([v("#input")],t.prototype,"input",2),i([v("#invalid-message")],t.prototype,"invalidMessage",2),i([p()],t.prototype,"hasFocus",2),i([p()],t.prototype,"showValidStyle",2),i([p()],t.prototype,"showInvalidStyle",2),i([s({type:String,reflect:!0})],t.prototype,"type",2),i([s({type:String,reflect:!0})],t.prototype,"size",2),i([s({type:String,reflect:!0})],t.prototype,"inputmode",2),i([s()],t.prototype,"value",2),i([L()],t.prototype,"defaultValue",2),i([s({type:String,reflect:!0})],t.prototype,"placeholder",2),i([s({type:String,reflect:!0})],t.prototype,"label",2),i([s({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),i([s({type:Boolean,reflect:!0})],t.prototype,"clearable",2),i([s({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([s({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),i([s({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([s({attribute:"password-toggle",type:Boolean,reflect:!0})],t.prototype,"passwordToggle",2),i([s({attribute:"password-visible",type:Boolean,reflect:!0})],t.prototype,"passwordVisible",2),i([s({attribute:"spin-buttons",type:Boolean,reflect:!0})],t.prototype,"spinButtons",2),i([s({type:Number,reflect:!0})],t.prototype,"minlength",2),i([s({type:Number,reflect:!0})],t.prototype,"maxlength",2),i([s({reflect:!0})],t.prototype,"min",2),i([s({reflect:!0})],t.prototype,"max",2),i([s({type:String,reflect:!0})],t.prototype,"form",2),i([s({type:String,reflect:!0})],t.prototype,"name",2),i([s({type:String,reflect:!0})],t.prototype,"title",2),i([s({type:Boolean,reflect:!0})],t.prototype,"required",2),i([s()],t.prototype,"pattern",2),i([s({reflect:!0})],t.prototype,"step",2),i([s({type:String,reflect:!0})],t.prototype,"autocapitalize",2),i([s({type:String,reflect:!0})],t.prototype,"autocorrect",2),i([s({reflect:!0})],t.prototype,"autocomplete",2),i([s({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),i([s({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),i([s({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),i([s({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],t.prototype,"spellcheck",2),i([m("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([m("step",{waitUntilFirstUpdate:!0})],t.prototype,"handleStepChange",1),i([m("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=i([E("sd-5-13-11-input")],t);export{t as a};
1
+ import{a as A}from"./chunk.YS7YV4KF.js";import{a as z}from"./chunk.URI32NHH.js";import{a as L}from"./chunk.CDC46OKY.js";import{b as F}from"./chunk.6HLS5XU2.js";import{a as M}from"./chunk.CGQ2BPPZ.js";import{a as n}from"./chunk.YTG5BN3U.js";import{a as P,b as V}from"./chunk.CDEXCMVF.js";import{a}from"./chunk.26V4EXHB.js";import{a as T}from"./chunk.DEXOQON7.js";import{a as m}from"./chunk.E2DRD2OX.js";import{a as E,b as s,c as p,d as v,h as y}from"./chunk.4WS6ISBF.js";import{b as C,e as r,h as k,i as D}from"./chunk.UWPDCU52.js";import{a as $,e as i}from"./chunk.TJOCV4DC.js";var g=class extends A{constructor(e){super(e);this.handlePointerDown=e=>{e.button!==0||this.host.disabled||this.spinOnLongPressCallback(e)};this.handlePointerUp=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(e.type!==P.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return D}update(e,[l]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=$({},l),this.host.addEventListener("pointerdown",this.handlePointerDown)),k}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(e){var l;e.preventDefault(),e.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(l=this.observer)==null||l.disconnect(),this.observer=new MutationObserver(u=>{u.forEach(c=>{c.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var e;clearInterval(this.interval),clearTimeout(this.timeout),(e=this.observer)==null||e.disconnect()}},w=V(g);var B,S=(B=navigator.userAgentData)==null?void 0:B.brands.some(b=>b.brand.includes("Chromium")),O=S?!1:navigator.userAgent.includes("Firefox"),t=class extends y{constructor(){super(...arguments);this.formControlController=new F(this);this.hasSlotController=new M(this,"help-text","label","left","right","message","placeholder");this.localize=new T(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var e,l;return(l=(e=this.input)==null?void 0:e.valueAsDate)!=null?l:null}set valueAsDate(e){let l=document.createElement("input");l.type="date",l.valueAsDate=e,this.value=l.value}get valueAsNumber(){var e,l;return(l=(e=this.input)==null?void 0:e.valueAsNumber)!=null?l:parseFloat(this.value)}set valueAsNumber(e){let l=document.createElement("input");l.type="number",l.valueAsNumber=e,this.value=l.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(e){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),e.stopPropagation()}handleSearchClick(e){this.emit("sd-search"),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleKeyDown(e){let l=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!l&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,l,u="none"){this.input.setSelectionRange(e,l,u)}setRangeText(e,l,u,c){this.input.setRangeText(e,l,u,c),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},l=this.label?!0:!!e.label,u=this.helpText?!0:!!e.helpText,c=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),U=!!e.tooltip,f=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",x=this.size==="sm"?"text-sm":"text-base",H={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[f],d=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",h={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],o={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return r`<div part="form-control" class="${a((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${l||U?r`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${a(l?"inline-block":"hidden",x)}" for="input" aria-hidden="${l?"false":"true"}"><slot name="label">${this.label}</slot></label> ${e.tooltip?r`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${a("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${a("absolute w-full h-full pointer-events-none border rounded-default transition-[border] ease-in-out duration-medium hover:duration-fast",H)}"></div><div part="base" class="${a("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast",this.size==="lg"?"py-2":"py-1",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",f==="disabled"||f==="visuallyDisabled"?"text-neutral-500":"text-black")}">${e.left?r`<slot name="left" part="left" class="${a("inline-flex",this.size==="sm"?"mr-1":"mr-2",d,o)}"></slot>`:""} <input part="input" id="input" class="${a("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder-neutral-500 cursor-not-allowed":"placeholder-neutral-700",this.size==="sm"?"h-6":"h-8",x)}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${n(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${n(this.placeholder)}" minlength="${n(this.minlength)}" maxlength="${n(this.maxlength)}" min="${n(this.min)}" max="${n(this.max)}" step="${n(this.step)}" .value="${z(this.value)}" autocapitalize="${n(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${n(this.autocomplete)}" autocorrect="${n(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${n(this.pattern)}" enterkeyhint="${n(this.enterkeyhint)}" inputmode="${n(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${c?r`<button part="clear-button" class="${a("flex justify-center",h)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-5-13-12-icon class="${a("text-neutral-700",o)}" library="_internal" name="closing-round"></sd-5-13-12-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?r`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="${a("flex items-center sd-interactive",h)}" type="button" @click="${this.handlePasswordToggle}">${this.passwordVisible?r`<slot name="show-password-icon"><sd-5-13-12-icon class="${a(d,o)}" library="_internal" name="eye"></sd-5-13-12-icon></slot>`:r`<slot name="hide-password-icon"><sd-5-13-12-icon class="${a(d,o)}" library="_internal" name="eye-crossed-out"></sd-5-13-12-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!O?r`<sd-5-13-12-icon class="${a(d,h,o)}" library="_internal" name="calendar"></sd-5-13-12-icon>`:""} ${this.type==="time"?r`<sd-5-13-12-icon class="${a(d,h,o)}" library="_internal" name="clock"></sd-5-13-12-icon>`:""} ${this.type==="search"?r`<button class="${a("flex items-center sd-interactive",h)}" type="button" @click="${this.handleSearchClick}"><sd-5-13-12-icon class="${a(d,o)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-5-13-12-icon></button>`:""} ${this.showInvalidStyle?r`<sd-5-13-12-icon part="invalid-icon" class="${a("text-error",h,o)}" library="_internal" name="risk"></sd-5-13-12-icon>`:""} ${this.showValidStyle&&this.styleOnValid?r`<sd-5-13-12-icon class="${a("text-success flex-shrink-0",h,o)}" library="_internal" name="status-check" part="valid-icon"></sd-5-13-12-icon>`:""} ${e.right?r`<slot name="right" part="right" class="${a("inline-flex",d,h,o)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?r`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${w({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-5-13-12-icon name="system/minus-circle" label="Decrease value" class="${a(d,h,o)}"></sd-5-13-12-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${w({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-5-13-12-icon name="system/plus-circle" label="Decrease value" class="${a(d,h,o)}"></sd-5-13-12-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${a("text-sm text-neutral-700 mt-2",u?"block":"hidden")}" aria-hidden="${!u}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};t.styles=[...y.styles,C`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-5-13-12-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],i([v("#input")],t.prototype,"input",2),i([v("#invalid-message")],t.prototype,"invalidMessage",2),i([p()],t.prototype,"hasFocus",2),i([p()],t.prototype,"showValidStyle",2),i([p()],t.prototype,"showInvalidStyle",2),i([s({type:String,reflect:!0})],t.prototype,"type",2),i([s({type:String,reflect:!0})],t.prototype,"size",2),i([s({type:String,reflect:!0})],t.prototype,"inputmode",2),i([s()],t.prototype,"value",2),i([L()],t.prototype,"defaultValue",2),i([s({type:String,reflect:!0})],t.prototype,"placeholder",2),i([s({type:String,reflect:!0})],t.prototype,"label",2),i([s({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),i([s({type:Boolean,reflect:!0})],t.prototype,"clearable",2),i([s({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([s({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),i([s({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([s({attribute:"password-toggle",type:Boolean,reflect:!0})],t.prototype,"passwordToggle",2),i([s({attribute:"password-visible",type:Boolean,reflect:!0})],t.prototype,"passwordVisible",2),i([s({attribute:"spin-buttons",type:Boolean,reflect:!0})],t.prototype,"spinButtons",2),i([s({type:Number,reflect:!0})],t.prototype,"minlength",2),i([s({type:Number,reflect:!0})],t.prototype,"maxlength",2),i([s({reflect:!0})],t.prototype,"min",2),i([s({reflect:!0})],t.prototype,"max",2),i([s({type:String,reflect:!0})],t.prototype,"form",2),i([s({type:String,reflect:!0})],t.prototype,"name",2),i([s({type:String,reflect:!0})],t.prototype,"title",2),i([s({type:Boolean,reflect:!0})],t.prototype,"required",2),i([s()],t.prototype,"pattern",2),i([s({reflect:!0})],t.prototype,"step",2),i([s({type:String,reflect:!0})],t.prototype,"autocapitalize",2),i([s({type:String,reflect:!0})],t.prototype,"autocorrect",2),i([s({reflect:!0})],t.prototype,"autocomplete",2),i([s({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),i([s({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),i([s({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),i([s({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],t.prototype,"spellcheck",2),i([m("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([m("step",{waitUntilFirstUpdate:!0})],t.prototype,"handleStepChange",1),i([m("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=i([E("sd-5-13-12-input")],t);export{t as a};
@@ -1 +1 @@
1
- import{a as y}from"./chunk.CGQ2BPPZ.js";import{a as n}from"./chunk.26V4EXHB.js";import{a as v}from"./chunk.DEXOQON7.js";import{a as g,b as l,c as o,d as u,h as c}from"./chunk.4WS6ISBF.js";import{b as m,e as a}from"./chunk.UWPDCU52.js";import{a as d}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.TJOCV4DC.js";var e=class extends c{constructor(){super();this.localize=new v(this);this.hasSlotController=new y(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.isTranscriptOpen=!1;this.progress=0;this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this),this.handleTranscriptDrawerToggle=this.handleTranscriptDrawerToggle.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),document.addEventListener("sd-after-hide",this.handleTranscriptDrawerToggle),this.audioElement.playbackRate=this.speed,this.progressSlider.tooltipFormatter=t=>this.localize.term("seconds",Number(t).toFixed(0)),this.animated&&this.initAnimation())}updated(t){if(t.has("animated")){let s=t.get("animated");!s&&this.animated?this.initAnimation():s&&!this.animated&&this.clear()}}get audioElement(){let t=this.shadowRoot.querySelector("slot");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let t=this.audioElement.currentTime;this.currentTime=this.formatTime(t),this.progress=t,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.progressSlider.max=this.audioElement.duration}}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(t){t.key==="Enter"&&(t.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(t){t.key==="Enter"&&(t.preventDefault(),this.togglePlaybackSpeed())}formatTime(t){let s=Math.floor(t/60).toString().padStart(2,"0"),h=Math.floor(t%60).toString().padStart(2,"0");return`${s}:${h}`}handleAudioProgress(){if(!this.audioElement)return;let t=Number(this.progressSlider.value);this.audioElement.currentTime=t,this.progress=t,this.currentTime=this.formatTime(t)}handleAudioProgressKeydown(t){t.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),t.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}handleTranscriptDrawerToggle(){this.isTranscriptOpen=!this.isTranscriptOpen}handleThumbGrab(){var t;(t=this.audioElement)==null||t.pause()}handleThumbRelease(){var t;this.isPlaying&&((t=this.audioElement)==null||t.play())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0,this.handleTranscriptDrawerToggle()}showTranscriptKeydown(t){(t.key==="Enter"||t.key===" ")&&this.showTranscript()}rgbToHex(t){let s=t.match(/\d+/g);if(s&&s.length===3){let h=parseInt(s[0]),r=parseInt(s[1]),b=parseInt(s[2]),p=f=>f.toString(16).padStart(2,"0");return`#${p(h)}${p(r)}${p(b)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let t=this.audioPlayerContainer.querySelector(".playback-speed"),h=window.getComputedStyle(t).color,r;this.inverted?r="#FFFFFF33":r=this.rgbToHex(h)+"33",this.waveList=[new d({canvas:this.canvas,color:r,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(t=>{t.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(t=>{t.redraw()}),await new Promise(t=>{setTimeout(t,1e3/30)}),await this.draw())}render(){let t=a`<div class="${n("controls grid grid-cols-3 justify-items-center items-center",this.reversedLayout?"mt-2":"mb-2",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full")}" part="audio-controls"><button class="${n("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")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-5-13-11-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")}" title="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="mb-4">${this.isPlaying?a`<slot name="pause-icon"><sd-5-13-11-icon class="text-xl" name="pause" library="_internal"></sd-5-13-11-icon></slot>`:a`<slot name="play-icon"><sd-5-13-11-icon class="text-xl" name="start" library="_internal"></sd-5-13-11-icon></slot>`}</sd-5-13-11-button><div class="flex items-center gap-6 justify-self-end">${this.hasSlotController.test("transcript")?a`<button class="${n("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.isTranscriptOpen?this.localize.term("transcriptIsOpen"):this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-5-13-11-icon class="w-6 h-6" name="transcript" library="_internal"></sd-5-13-11-icon></button>`:null} <button class="${n("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-5-13-11-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="_internal"></sd-5-13-11-icon></button></div></div>`,s=a`<div class="${n("w-full flex justify-between",this.reversedLayout?"mb-0.5":"mt-0.5",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 !mb-4")}" part="timestamps"><div class="${n("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.currentTime}</div><div class="${n("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.duration}</div></div>`;return a`<div class="${n("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?t:null}<div class="relative">${this.animated&&!this.reversedLayout?a`${t}`:null} ${this.animated?a`<canvas class="w-full h-16 -mb-2"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?s:null}<sd-5-13-11-range part="progress-slider" no-tooltip min="0" max="100" step="0.001" label="${this.localize.term("seekBar")}" @mousedown="${this.handleThumbGrab}" @touchstart="${this.handleThumbGrab}" @mouseup="${this.handleThumbRelease}" @touchend="${this.handleThumbRelease}" @sd-5-13-11-input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}"></sd-5-13-11-range></div>${this.hasSlotController.test("transcript")?a`<sd-5-13-11-drawer><slot name="transcript"></slot></sd-5-13-11-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?s:null}</div>`}};e.styles=[...c.styles,m`sd-5-13-11-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-12,3rem);justify-content:center;width:var(--sd-spacing-12,3rem)}sd-5-13-11-button::part(motion-wrapper){border-radius:var(--sd-border-radius-full,9999px)}sd-5-13-11-button::part(label){align-items:center;display:flex;flex-grow:0}sd-5-13-11-range::part(form-control-label){display:none}:host([inverted]) sd-5-13-11-range::part(thumb){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));outline-color:rgb(var(--sd-color-white,255 255 255)/1)}:host([animated]) sd-5-13-11-range::part(track){background-color:transparent}:host([inverted]:not([animated])) sd-5-13-11-range::part(track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-400,153 171 208)/var(--tw-bg-opacity,1))}:host([inverted]:not([animated])) sd-5-13-11-range::part(active-track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1))}`],i([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],e.prototype,"reversedLayout",2),i([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],e.prototype,"hideTimestamps",2),i([l({type:Boolean,reflect:!0})],e.prototype,"animated",2),i([l({type:Boolean,reflect:!0})],e.prototype,"inverted",2),i([l({type:Number,reflect:!0})],e.prototype,"speed",2),i([o()],e.prototype,"currentTime",2),i([o()],e.prototype,"duration",2),i([o()],e.prototype,"isPlaying",2),i([o()],e.prototype,"isMuted",2),i([o()],e.prototype,"isTranscriptOpen",2),i([o()],e.prototype,"progress",2),i([u('[part="progress-slider"]')],e.prototype,"progressSlider",2),i([u('[part="audio-player"]')],e.prototype,"audioPlayerContainer",2),i([u("sd-5-13-11-drawer")],e.prototype,"drawer",2),i([u("canvas")],e.prototype,"canvas",2),e=i([g("sd-5-13-11-audio")],e);export{e as a};
1
+ import{a as y}from"./chunk.CGQ2BPPZ.js";import{a as n}from"./chunk.26V4EXHB.js";import{a as v}from"./chunk.DEXOQON7.js";import{a as g,b as l,c as o,d as u,h as c}from"./chunk.4WS6ISBF.js";import{b as m,e as a}from"./chunk.UWPDCU52.js";import{a as d}from"./chunk.WNP2V63C.js";import{e as i}from"./chunk.TJOCV4DC.js";var e=class extends c{constructor(){super();this.localize=new v(this);this.hasSlotController=new y(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.isTranscriptOpen=!1;this.progress=0;this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this),this.handleTranscriptDrawerToggle=this.handleTranscriptDrawerToggle.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),document.addEventListener("sd-after-hide",this.handleTranscriptDrawerToggle),this.audioElement.playbackRate=this.speed,this.progressSlider.tooltipFormatter=t=>this.localize.term("seconds",Number(t).toFixed(0)),this.animated&&this.initAnimation())}updated(t){if(t.has("animated")){let s=t.get("animated");!s&&this.animated?this.initAnimation():s&&!this.animated&&this.clear()}}get audioElement(){let t=this.shadowRoot.querySelector("slot");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let t=this.audioElement.currentTime;this.currentTime=this.formatTime(t),this.progress=t,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.progressSlider.max=this.audioElement.duration}}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(t){t.key==="Enter"&&(t.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(t){t.key==="Enter"&&(t.preventDefault(),this.togglePlaybackSpeed())}formatTime(t){let s=Math.floor(t/60).toString().padStart(2,"0"),h=Math.floor(t%60).toString().padStart(2,"0");return`${s}:${h}`}handleAudioProgress(){if(!this.audioElement)return;let t=Number(this.progressSlider.value);this.audioElement.currentTime=t,this.progress=t,this.currentTime=this.formatTime(t)}handleAudioProgressKeydown(t){t.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),t.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}handleTranscriptDrawerToggle(){this.isTranscriptOpen=!this.isTranscriptOpen}handleThumbGrab(){var t;(t=this.audioElement)==null||t.pause()}handleThumbRelease(){var t;this.isPlaying&&((t=this.audioElement)==null||t.play())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0,this.handleTranscriptDrawerToggle()}showTranscriptKeydown(t){(t.key==="Enter"||t.key===" ")&&this.showTranscript()}rgbToHex(t){let s=t.match(/\d+/g);if(s&&s.length===3){let h=parseInt(s[0]),r=parseInt(s[1]),b=parseInt(s[2]),p=f=>f.toString(16).padStart(2,"0");return`#${p(h)}${p(r)}${p(b)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let t=this.audioPlayerContainer.querySelector(".playback-speed"),h=window.getComputedStyle(t).color,r;this.inverted?r="#FFFFFF33":r=this.rgbToHex(h)+"33",this.waveList=[new d({canvas:this.canvas,color:r,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new d({canvas:this.canvas,color:r,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(t=>{t.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(t=>{t.redraw()}),await new Promise(t=>{setTimeout(t,1e3/30)}),await this.draw())}render(){let t=a`<div class="${n("controls grid grid-cols-3 justify-items-center items-center",this.reversedLayout?"mt-2":"mb-2",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full")}" part="audio-controls"><button class="${n("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")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-5-13-12-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")}" title="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="mb-4">${this.isPlaying?a`<slot name="pause-icon"><sd-5-13-12-icon class="text-xl" name="pause" library="_internal"></sd-5-13-12-icon></slot>`:a`<slot name="play-icon"><sd-5-13-12-icon class="text-xl" name="start" library="_internal"></sd-5-13-12-icon></slot>`}</sd-5-13-12-button><div class="flex items-center gap-6 justify-self-end">${this.hasSlotController.test("transcript")?a`<button class="${n("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.isTranscriptOpen?this.localize.term("transcriptIsOpen"):this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-5-13-12-icon class="w-6 h-6" name="transcript" library="_internal"></sd-5-13-12-icon></button>`:null} <button class="${n("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-5-13-12-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="_internal"></sd-5-13-12-icon></button></div></div>`,s=a`<div class="${n("w-full flex justify-between",this.reversedLayout?"mb-0.5":"mt-0.5",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 !mb-4")}" part="timestamps"><div class="${n("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.currentTime}</div><div class="${n("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.duration}</div></div>`;return a`<div class="${n("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?t:null}<div class="relative">${this.animated&&!this.reversedLayout?a`${t}`:null} ${this.animated?a`<canvas class="w-full h-16 -mb-2"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?s:null}<sd-5-13-12-range part="progress-slider" no-tooltip min="0" max="100" step="0.001" label="${this.localize.term("seekBar")}" @mousedown="${this.handleThumbGrab}" @touchstart="${this.handleThumbGrab}" @mouseup="${this.handleThumbRelease}" @touchend="${this.handleThumbRelease}" @sd-5-13-12-input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}"></sd-5-13-12-range></div>${this.hasSlotController.test("transcript")?a`<sd-5-13-12-drawer><slot name="transcript"></slot></sd-5-13-12-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?s:null}</div>`}};e.styles=[...c.styles,m`sd-5-13-12-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-12,3rem);justify-content:center;width:var(--sd-spacing-12,3rem)}sd-5-13-12-button::part(motion-wrapper){border-radius:var(--sd-border-radius-full,9999px)}sd-5-13-12-button::part(label){align-items:center;display:flex;flex-grow:0}sd-5-13-12-range::part(form-control-label){display:none}:host([inverted]) sd-5-13-12-range::part(thumb){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));outline-color:rgb(var(--sd-color-white,255 255 255)/1)}:host([animated]) sd-5-13-12-range::part(track){background-color:transparent}:host([inverted]:not([animated])) sd-5-13-12-range::part(track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-400,153 171 208)/var(--tw-bg-opacity,1))}:host([inverted]:not([animated])) sd-5-13-12-range::part(active-track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1))}`],i([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],e.prototype,"reversedLayout",2),i([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],e.prototype,"hideTimestamps",2),i([l({type:Boolean,reflect:!0})],e.prototype,"animated",2),i([l({type:Boolean,reflect:!0})],e.prototype,"inverted",2),i([l({type:Number,reflect:!0})],e.prototype,"speed",2),i([o()],e.prototype,"currentTime",2),i([o()],e.prototype,"duration",2),i([o()],e.prototype,"isPlaying",2),i([o()],e.prototype,"isMuted",2),i([o()],e.prototype,"isTranscriptOpen",2),i([o()],e.prototype,"progress",2),i([u('[part="progress-slider"]')],e.prototype,"progressSlider",2),i([u('[part="audio-player"]')],e.prototype,"audioPlayerContainer",2),i([u("sd-5-13-12-drawer")],e.prototype,"drawer",2),i([u("canvas")],e.prototype,"canvas",2),e=i([g("sd-5-13-12-audio")],e);export{e as a};
@@ -1 +1 @@
1
- import{b as y}from"./chunk.N2OPZHJV.js";import{a as u,b as f,c as a}from"./chunk.H2TFK3FW.js";import{a as v}from"./chunk.TWZDCIM2.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as p,b as s,c as d,h as c}from"./chunk.4WS6ISBF.js";import{b as g,e as b}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var n,t=class extends c{constructor(){super(...arguments);this.svg="";this.label="";this.library="default";this.color="currentColor"}connectedCallback(){super.connectedCallback(),u(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),f(this)}getUrl(){let r=a(this.library);return this.name&&r?r.resolver(this.name):this.src}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var m;let r=a(this.library),i=this.getUrl();if(n||(n=new DOMParser),i)try{let l=await v(i);if(i===this.getUrl())if(l.ok){let o=n.parseFromString(l.svg,"text/html").body.querySelector("svg");o!==null?((m=r==null?void 0:r.mutator)==null||m.call(r,o),this.svg=o.outerHTML,this.emit("sd-load")):(this.svg="",this.emit("sd-error"))}else this.svg="",this.emit("sd-error")}catch(l){this.emit("sd-error")}else this.svg.length>0&&(this.svg="")}render(){return b`${y(this.svg)}`}};t.styles=[...c.styles,g`:host{box-sizing:content-box!important;display:inline-block;height:1em;width:1em}svg{display:block;height:100%;width:100%}:host([color=primary]) svg{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity,1))}:host([color=white]) svg{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity,1))}`],e([d()],t.prototype,"svg",2),e([s({reflect:!0})],t.prototype,"name",2),e([s()],t.prototype,"src",2),e([s()],t.prototype,"label",2),e([s({reflect:!0})],t.prototype,"library",2),e([s({reflect:!0})],t.prototype,"color",2),e([h("label")],t.prototype,"handleLabelChange",1),e([h(["name","src","library"])],t.prototype,"setIcon",1),t=e([p("sd-5-13-11-icon")],t);export{t as a};
1
+ import{b as y}from"./chunk.N2OPZHJV.js";import{a as u,b as f,c as a}from"./chunk.H2TFK3FW.js";import{a as v}from"./chunk.TWZDCIM2.js";import{a as h}from"./chunk.E2DRD2OX.js";import{a as p,b as s,c as d,h as c}from"./chunk.4WS6ISBF.js";import{b as g,e as b}from"./chunk.UWPDCU52.js";import{e}from"./chunk.TJOCV4DC.js";var n,t=class extends c{constructor(){super(...arguments);this.svg="";this.label="";this.library="default";this.color="currentColor"}connectedCallback(){super.connectedCallback(),u(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),f(this)}getUrl(){let r=a(this.library);return this.name&&r?r.resolver(this.name):this.src}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var m;let r=a(this.library),i=this.getUrl();if(n||(n=new DOMParser),i)try{let l=await v(i);if(i===this.getUrl())if(l.ok){let o=n.parseFromString(l.svg,"text/html").body.querySelector("svg");o!==null?((m=r==null?void 0:r.mutator)==null||m.call(r,o),this.svg=o.outerHTML,this.emit("sd-load")):(this.svg="",this.emit("sd-error"))}else this.svg="",this.emit("sd-error")}catch(l){this.emit("sd-error")}else this.svg.length>0&&(this.svg="")}render(){return b`${y(this.svg)}`}};t.styles=[...c.styles,g`:host{box-sizing:content-box!important;display:inline-block;height:1em;width:1em}svg{display:block;height:100%;width:100%}:host([color=primary]) svg{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity,1))}:host([color=white]) svg{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity,1))}`],e([d()],t.prototype,"svg",2),e([s({reflect:!0})],t.prototype,"name",2),e([s()],t.prototype,"src",2),e([s()],t.prototype,"label",2),e([s({reflect:!0})],t.prototype,"library",2),e([s({reflect:!0})],t.prototype,"color",2),e([h("label")],t.prototype,"handleLabelChange",1),e([h(["name","src","library"])],t.prototype,"setIcon",1),t=e([p("sd-5-13-12-icon")],t);export{t as a};
@@ -1 +1 @@
1
- import{a as i}from"./chunk.26V4EXHB.js";import{a as l}from"./chunk.E2DRD2OX.js";import{a as o,b as s,c as r,h as a}from"./chunk.4WS6ISBF.js";import{b as n,e as h}from"./chunk.UWPDCU52.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends a{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return h`<span part="base" class="${i("sd-5-13-11-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${i("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4 duration-fast ease-in-out",this.disabled||this.visuallyDisabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span part="checked" class="${i("rounded-full inline-flex text-white bg-accent h-2.5 w-2.5 transition-[transform, colors] duration-medium ease-in-out",this.checked?"scale-100":"scale-0",this.disabled?"bg-neutral-500":this.visuallyDisabled?"bg-white":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span></span><slot part="label" class="${i("ml-2 select-none inline-block",this.disabled||this.visuallyDisabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};e.styles=[...a.styles,n`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],t([r()],e.prototype,"checked",2),t([r()],e.prototype,"hasFocus",2),t([s({type:String,reflect:!0})],e.prototype,"size",2),t([s({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([s({type:Boolean,reflect:!0,attribute:"visually-disabled"})],e.prototype,"visuallyDisabled",2),t([s()],e.prototype,"value",2),t([s({type:Boolean,reflect:!0})],e.prototype,"invalid",2),t([l("checked")],e.prototype,"handleCheckedChange",1),t([l(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([o("sd-5-13-11-radio")],e);export{e as a};
1
+ import{a as i}from"./chunk.26V4EXHB.js";import{a as l}from"./chunk.E2DRD2OX.js";import{a as o,b as s,c as r,h as a}from"./chunk.4WS6ISBF.js";import{b as n,e as h}from"./chunk.UWPDCU52.js";import{e as t}from"./chunk.TJOCV4DC.js";var e=class extends a{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return h`<span part="base" class="${i("sd-5-13-12-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${i("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4 duration-fast ease-in-out",this.disabled||this.visuallyDisabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span part="checked" class="${i("rounded-full inline-flex text-white bg-accent h-2.5 w-2.5 transition-[transform, colors] duration-medium ease-in-out",this.checked?"scale-100":"scale-0",this.disabled?"bg-neutral-500":this.visuallyDisabled?"bg-white":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span></span><slot part="label" class="${i("ml-2 select-none inline-block",this.disabled||this.visuallyDisabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};e.styles=[...a.styles,n`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],t([r()],e.prototype,"checked",2),t([r()],e.prototype,"hasFocus",2),t([s({type:String,reflect:!0})],e.prototype,"size",2),t([s({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([s({type:Boolean,reflect:!0,attribute:"visually-disabled"})],e.prototype,"visuallyDisabled",2),t([s()],e.prototype,"value",2),t([s({type:Boolean,reflect:!0})],e.prototype,"invalid",2),t([l("checked")],e.prototype,"handleCheckedChange",1),t([l(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([o("sd-5-13-12-radio")],e);export{e as a};