@synergy-design-system/components 1.7.0 → 1.9.0

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 (275) hide show
  1. package/README.md +8 -0
  2. package/dist/chunks/{chunk.23HTU3YE.js → chunk.2EI3TNL7.js} +1 -16
  3. package/dist/chunks/chunk.2EI3TNL7.js.map +7 -0
  4. package/dist/chunks/{chunk.RSONAU45.js → chunk.2RF7KO5I.js} +1 -12
  5. package/dist/chunks/chunk.2RF7KO5I.js.map +7 -0
  6. package/dist/chunks/{chunk.GHMKOVA3.js → chunk.3DE5ARIC.js} +23 -3
  7. package/dist/chunks/chunk.3DE5ARIC.js.map +7 -0
  8. package/dist/chunks/chunk.3O5WTWSN.js +12 -0
  9. package/dist/chunks/chunk.3O5WTWSN.js.map +7 -0
  10. package/dist/chunks/{chunk.MFFJYORB.js → chunk.3STW62TA.js} +1 -12
  11. package/dist/chunks/chunk.3STW62TA.js.map +7 -0
  12. package/dist/chunks/{chunk.EKOK7YPB.js → chunk.4QS5IWYB.js} +1 -16
  13. package/dist/chunks/chunk.4QS5IWYB.js.map +7 -0
  14. package/dist/chunks/{chunk.ULMZHWWW.js → chunk.5BMNRZ7L.js} +2 -2
  15. package/dist/chunks/{chunk.SMSP5C6C.js → chunk.5CB3CVZ7.js} +2 -2
  16. package/dist/chunks/{chunk.GMUVD5B2.js → chunk.5R3OVMH2.js} +25 -10
  17. package/dist/chunks/chunk.5R3OVMH2.js.map +7 -0
  18. package/dist/chunks/{chunk.EI34C7LC.js → chunk.6MS3WNDW.js} +8 -7
  19. package/dist/chunks/chunk.6MS3WNDW.js.map +7 -0
  20. package/dist/chunks/{chunk.4ZURABYO.js → chunk.A7IIJ2LL.js} +1 -7
  21. package/dist/chunks/{chunk.O7USYXBT.js.map → chunk.A7IIJ2LL.js.map} +3 -3
  22. package/dist/chunks/{chunk.PGCXJ2PT.js → chunk.ACTJFDNK.js} +1 -12
  23. package/dist/chunks/chunk.ACTJFDNK.js.map +7 -0
  24. package/dist/chunks/{chunk.MNMITYTH.js → chunk.ADRKUQGR.js} +1 -12
  25. package/dist/chunks/chunk.ADRKUQGR.js.map +7 -0
  26. package/dist/chunks/{chunk.5OPODPPZ.js → chunk.AJU6C4KC.js} +2 -2
  27. package/dist/chunks/{chunk.VZ7S7YYN.js → chunk.AVTU2BGE.js} +2 -2
  28. package/dist/chunks/{chunk.QHFGD6WW.js → chunk.BGHK4NQA.js} +1 -12
  29. package/dist/chunks/chunk.BGHK4NQA.js.map +7 -0
  30. package/dist/chunks/{chunk.LWXCBEHD.js → chunk.BGKFRWWO.js} +5 -5
  31. package/dist/chunks/{chunk.3ZHSSMBL.js → chunk.BJYVLDYR.js} +84 -6
  32. package/dist/chunks/chunk.BJYVLDYR.js.map +7 -0
  33. package/dist/chunks/chunk.BLOH2ZNU.js +636 -0
  34. package/dist/chunks/chunk.BLOH2ZNU.js.map +7 -0
  35. package/dist/chunks/{chunk.USYR7G7Z.js → chunk.BTZX6ZFZ.js} +2 -2
  36. package/dist/chunks/{chunk.W6V7TPGK.js → chunk.CFIQXXMW.js} +1 -12
  37. package/dist/chunks/chunk.CFIQXXMW.js.map +7 -0
  38. package/dist/chunks/{chunk.RA2WSKQT.js → chunk.F4THECWA.js} +2 -2
  39. package/dist/chunks/{chunk.Z4NKFCKY.js → chunk.FSONLJTT.js} +19 -15
  40. package/dist/chunks/chunk.FSONLJTT.js.map +7 -0
  41. package/dist/chunks/{chunk.PMTVLWNZ.js → chunk.FUNZW7ES.js} +2 -2
  42. package/dist/chunks/{chunk.OJREQD2D.js → chunk.GAPQVJGQ.js} +22 -14
  43. package/dist/chunks/chunk.GAPQVJGQ.js.map +7 -0
  44. package/dist/chunks/{chunk.NAX6WP3D.js → chunk.GBOII6N4.js} +11 -7
  45. package/dist/chunks/chunk.GBOII6N4.js.map +7 -0
  46. package/dist/chunks/chunk.GTSRMEPE.js +108 -0
  47. package/dist/chunks/chunk.GTSRMEPE.js.map +7 -0
  48. package/dist/chunks/{chunk.JAKJHV44.js → chunk.HF75YRVS.js} +22 -15
  49. package/dist/chunks/chunk.HF75YRVS.js.map +7 -0
  50. package/dist/chunks/{chunk.7VOPIPHW.js → chunk.IOPUYG6Q.js} +2 -2
  51. package/dist/chunks/{chunk.5THN2K5Q.js → chunk.IR2PZHC7.js} +2 -2
  52. package/dist/chunks/{chunk.SBEIXLRW.js → chunk.K3O2PP7X.js} +6 -5
  53. package/dist/chunks/chunk.K3O2PP7X.js.map +7 -0
  54. package/dist/chunks/{chunk.TUYEX4KP.js → chunk.KDDTDU4B.js} +73 -35
  55. package/dist/chunks/chunk.KDDTDU4B.js.map +7 -0
  56. package/dist/chunks/{chunk.5BOEKFIJ.js → chunk.KNXO2FGQ.js} +86 -48
  57. package/dist/chunks/chunk.KNXO2FGQ.js.map +7 -0
  58. package/dist/chunks/{chunk.HG5QC5EW.js → chunk.KUO3KJOC.js} +2 -2
  59. package/dist/chunks/{chunk.B6AKFQJS.js → chunk.LF2XSSHD.js} +2 -2
  60. package/dist/chunks/{chunk.2FN5DTS6.js → chunk.LJQ7LEPV.js} +1 -12
  61. package/dist/chunks/chunk.LJQ7LEPV.js.map +7 -0
  62. package/dist/chunks/{chunk.KP7SYG4K.js → chunk.LZE7OXKV.js} +2 -2
  63. package/dist/chunks/{chunk.CYN675Z6.js → chunk.MDZ22YWD.js} +12 -8
  64. package/dist/chunks/chunk.MDZ22YWD.js.map +7 -0
  65. package/dist/chunks/{chunk.JN7CLMQZ.js → chunk.MIMALEWP.js} +21 -7
  66. package/dist/chunks/chunk.MIMALEWP.js.map +7 -0
  67. package/dist/chunks/{chunk.XSXBQCWN.js → chunk.O6AXKVFJ.js} +11 -7
  68. package/dist/chunks/chunk.O6AXKVFJ.js.map +7 -0
  69. package/dist/chunks/{chunk.N2I6HVX3.js → chunk.OSBC36KQ.js} +4 -9
  70. package/dist/chunks/chunk.OSBC36KQ.js.map +7 -0
  71. package/dist/chunks/chunk.PHSJD47V.js +162 -0
  72. package/dist/chunks/chunk.PHSJD47V.js.map +7 -0
  73. package/dist/chunks/{chunk.JBYBQ5TQ.js → chunk.PKO6FEOM.js} +1 -12
  74. package/dist/chunks/chunk.PKO6FEOM.js.map +7 -0
  75. package/dist/chunks/{chunk.7KSU2SUD.js → chunk.PRZRH7SN.js} +2 -2
  76. package/dist/chunks/{chunk.4MYR27GF.js → chunk.PWMSNMDF.js} +13 -9
  77. package/dist/chunks/chunk.PWMSNMDF.js.map +7 -0
  78. package/dist/chunks/{chunk.BQG5LF7J.js → chunk.QAUTITK3.js} +2 -2
  79. package/dist/chunks/{chunk.DJOAQ4JU.js → chunk.QNDC5KWA.js} +43 -2
  80. package/dist/chunks/{chunk.6XU6OLZ3.js → chunk.QNQNR3RY.js} +1 -16
  81. package/dist/chunks/chunk.QNQNR3RY.js.map +7 -0
  82. package/dist/chunks/{chunk.Q7X5NOPZ.js → chunk.QY6MKIMK.js} +2 -2
  83. package/dist/chunks/{chunk.VQWUZKDS.js → chunk.RMQZMRVP.js} +2 -2
  84. package/dist/chunks/{chunk.XXF35USM.js → chunk.RMZBSKRR.js} +59 -109
  85. package/dist/chunks/chunk.RMZBSKRR.js.map +7 -0
  86. package/dist/chunks/{chunk.OJ4KOC7R.js → chunk.SJMMPKWP.js} +1 -12
  87. package/dist/chunks/chunk.SJMMPKWP.js.map +7 -0
  88. package/dist/chunks/{chunk.AMTCNRDE.js → chunk.SZCGMXW5.js} +3 -3
  89. package/dist/chunks/chunk.SZCGMXW5.js.map +7 -0
  90. package/dist/chunks/{chunk.JHXCBOUD.js → chunk.TTL762VF.js} +57 -60
  91. package/dist/chunks/chunk.TTL762VF.js.map +7 -0
  92. package/dist/chunks/chunk.UYD2OVFV.js +83 -0
  93. package/dist/chunks/chunk.UYD2OVFV.js.map +7 -0
  94. package/dist/chunks/{chunk.7EGCXNF2.js → chunk.UZFPGR6M.js} +8 -7
  95. package/dist/chunks/chunk.UZFPGR6M.js.map +7 -0
  96. package/dist/chunks/{chunk.SXW2KV3B.js → chunk.VATYXV2O.js} +2 -2
  97. package/dist/chunks/{chunk.AFEABUNX.js → chunk.W5JK7V7K.js} +6 -1
  98. package/dist/chunks/chunk.W5JK7V7K.js.map +7 -0
  99. package/dist/chunks/{chunk.IRT2DA6R.js → chunk.WC5SV4TV.js} +28 -18
  100. package/dist/chunks/chunk.WC5SV4TV.js.map +7 -0
  101. package/dist/chunks/{chunk.HKCTVD3U.js → chunk.XEI5ZP7Y.js} +11 -7
  102. package/dist/chunks/chunk.XEI5ZP7Y.js.map +7 -0
  103. package/dist/chunks/{chunk.4I6M5V6O.js → chunk.XIUSSERX.js} +1 -16
  104. package/dist/chunks/chunk.XIUSSERX.js.map +7 -0
  105. package/dist/chunks/{chunk.6V3HOZNE.js → chunk.Y72MIUNI.js} +2 -2
  106. package/dist/chunks/{chunk.IKKMWFWH.js → chunk.ZIQXX272.js} +2 -2
  107. package/dist/chunks/{chunk.GOVLCQY5.js → chunk.ZT5DUKVA.js} +2 -2
  108. package/dist/components/button/button.component.js +13 -14
  109. package/dist/components/button/button.custom.styles.js +1 -1
  110. package/dist/components/button/button.js +14 -15
  111. package/dist/components/button/button.styles.js +2 -4
  112. package/dist/components/button-group/button-group.component.js +4 -5
  113. package/dist/components/button-group/button-group.js +5 -6
  114. package/dist/components/button-group/button-group.styles.js +2 -3
  115. package/dist/components/checkbox/checkbox.component.d.ts +5 -0
  116. package/dist/components/checkbox/checkbox.component.js +12 -11
  117. package/dist/components/checkbox/checkbox.custom.styles.js +1 -1
  118. package/dist/components/checkbox/checkbox.js +13 -12
  119. package/dist/components/checkbox/checkbox.styles.js +2 -4
  120. package/dist/components/divider/divider.component.js +5 -6
  121. package/dist/components/divider/divider.custom.styles.js +1 -1
  122. package/dist/components/divider/divider.js +6 -7
  123. package/dist/components/divider/divider.styles.js +2 -4
  124. package/dist/components/drawer/drawer.component.d.ts +110 -0
  125. package/dist/components/drawer/drawer.component.js +27 -0
  126. package/dist/components/drawer/drawer.component.js.map +7 -0
  127. package/dist/components/drawer/drawer.custom.styles.d.ts +2 -0
  128. package/dist/components/drawer/drawer.custom.styles.js +8 -0
  129. package/dist/components/drawer/drawer.custom.styles.js.map +7 -0
  130. package/dist/components/drawer/drawer.d.ts +8 -0
  131. package/dist/components/drawer/drawer.js +28 -0
  132. package/dist/components/drawer/drawer.js.map +7 -0
  133. package/dist/components/drawer/drawer.styles.d.ts +2 -0
  134. package/dist/components/drawer/drawer.styles.js +8 -0
  135. package/dist/components/drawer/drawer.styles.js.map +7 -0
  136. package/dist/components/icon/icon.component.js +6 -7
  137. package/dist/components/icon/icon.custom.styles.js +1 -1
  138. package/dist/components/icon/icon.js +7 -8
  139. package/dist/components/icon/icon.styles.js +2 -4
  140. package/dist/components/icon/library.default.js +1 -1
  141. package/dist/components/icon/library.js +1 -1
  142. package/dist/components/icon/library.system.js +1 -1
  143. package/dist/components/icon-button/icon-button.component.js +8 -9
  144. package/dist/components/icon-button/icon-button.custom.styles.js +1 -1
  145. package/dist/components/icon-button/icon-button.js +9 -10
  146. package/dist/components/icon-button/icon-button.styles.js +2 -4
  147. package/dist/components/input/input.component.js +14 -15
  148. package/dist/components/input/input.custom.styles.js +1 -1
  149. package/dist/components/input/input.js +15 -16
  150. package/dist/components/input/input.styles.js +2 -5
  151. package/dist/components/optgroup/optgroup.component.js +6 -7
  152. package/dist/components/optgroup/optgroup.js +7 -8
  153. package/dist/components/optgroup/optgroup.styles.js +1 -1
  154. package/dist/components/option/option.component.js +8 -9
  155. package/dist/components/option/option.custom.styles.js +1 -1
  156. package/dist/components/option/option.js +9 -10
  157. package/dist/components/option/option.styles.js +2 -4
  158. package/dist/components/popup/popup.component.d.ts +9 -0
  159. package/dist/components/popup/popup.component.js +4 -5
  160. package/dist/components/popup/popup.styles.js +2 -3
  161. package/dist/components/radio/radio.component.js +8 -9
  162. package/dist/components/radio/radio.custom.styles.js +1 -1
  163. package/dist/components/radio/radio.js +9 -10
  164. package/dist/components/radio/radio.styles.js +2 -4
  165. package/dist/components/radio-button/radio-button.component.js +6 -8
  166. package/dist/components/radio-button/radio-button.js +7 -9
  167. package/dist/components/radio-button/radio-button.styles.js +3 -5
  168. package/dist/components/radio-group/radio-group.component.d.ts +1 -0
  169. package/dist/components/radio-group/radio-group.component.js +9 -10
  170. package/dist/components/radio-group/radio-group.custom.styles.js +1 -1
  171. package/dist/components/radio-group/radio-group.js +10 -11
  172. package/dist/components/radio-group/radio-group.styles.js +2 -5
  173. package/dist/components/select/select.component.d.ts +1 -0
  174. package/dist/components/select/select.component.js +20 -20
  175. package/dist/components/select/select.custom.styles.js +1 -1
  176. package/dist/components/select/select.js +21 -21
  177. package/dist/components/select/select.styles.js +2 -5
  178. package/dist/components/spinner/spinner.component.js +4 -5
  179. package/dist/components/spinner/spinner.styles.js +2 -3
  180. package/dist/components/switch/switch.component.d.ts +5 -0
  181. package/dist/components/switch/switch.component.js +9 -8
  182. package/dist/components/switch/switch.custom.styles.js +2 -2
  183. package/dist/components/switch/switch.js +10 -9
  184. package/dist/components/switch/switch.styles.js +2 -4
  185. package/dist/components/tag/tag.component.js +10 -11
  186. package/dist/components/tag/tag.custom.styles.js +1 -1
  187. package/dist/components/tag/tag.js +11 -12
  188. package/dist/components/tag/tag.styles.js +2 -4
  189. package/dist/components/textarea/textarea.component.js +8 -9
  190. package/dist/components/textarea/textarea.custom.styles.js +1 -1
  191. package/dist/components/textarea/textarea.js +9 -10
  192. package/dist/components/textarea/textarea.styles.js +2 -5
  193. package/dist/custom-elements.json +877 -351
  194. package/dist/events/events.d.ts +2 -0
  195. package/dist/events/syn-initial-focus.d.ts +6 -0
  196. package/dist/events/syn-request-close.d.ts +8 -0
  197. package/dist/internal/active-elements.d.ts +15 -0
  198. package/dist/internal/longpress.d.ts +2 -2
  199. package/dist/internal/modal.d.ts +24 -0
  200. package/dist/internal/string.d.ts +2 -0
  201. package/dist/internal/tabbable.d.ts +9 -0
  202. package/dist/synergy-autoloader.js +1 -1
  203. package/dist/synergy.d.ts +1 -0
  204. package/dist/synergy.js +88 -81
  205. package/dist/themes/utility.css +29 -0
  206. package/dist/translations/de.js +1 -1
  207. package/dist/translations/en.js +1 -1
  208. package/dist/utilities/animation-registry.js +2 -2
  209. package/dist/utilities/base-path.js +1 -1
  210. package/dist/utilities/form.js +3 -3
  211. package/dist/utilities/icon-library.js +1 -1
  212. package/dist/utilities/localize.js +1 -1
  213. package/dist/vscode.html-custom-data.json +78 -21
  214. package/package.json +4 -5
  215. package/dist/chunks/chunk.23HTU3YE.js.map +0 -7
  216. package/dist/chunks/chunk.2FN5DTS6.js.map +0 -7
  217. package/dist/chunks/chunk.3ZHSSMBL.js.map +0 -7
  218. package/dist/chunks/chunk.4I6M5V6O.js.map +0 -7
  219. package/dist/chunks/chunk.4MYR27GF.js.map +0 -7
  220. package/dist/chunks/chunk.4ZURABYO.js.map +0 -7
  221. package/dist/chunks/chunk.5BOEKFIJ.js.map +0 -7
  222. package/dist/chunks/chunk.6XU6OLZ3.js.map +0 -7
  223. package/dist/chunks/chunk.7EGCXNF2.js.map +0 -7
  224. package/dist/chunks/chunk.AFEABUNX.js.map +0 -7
  225. package/dist/chunks/chunk.AMTCNRDE.js.map +0 -7
  226. package/dist/chunks/chunk.CYN675Z6.js.map +0 -7
  227. package/dist/chunks/chunk.EI34C7LC.js.map +0 -7
  228. package/dist/chunks/chunk.EKOK7YPB.js.map +0 -7
  229. package/dist/chunks/chunk.GHMKOVA3.js.map +0 -7
  230. package/dist/chunks/chunk.GMUVD5B2.js.map +0 -7
  231. package/dist/chunks/chunk.HKCTVD3U.js.map +0 -7
  232. package/dist/chunks/chunk.IRT2DA6R.js.map +0 -7
  233. package/dist/chunks/chunk.JAKJHV44.js.map +0 -7
  234. package/dist/chunks/chunk.JBYBQ5TQ.js.map +0 -7
  235. package/dist/chunks/chunk.JHXCBOUD.js.map +0 -7
  236. package/dist/chunks/chunk.JN7CLMQZ.js.map +0 -7
  237. package/dist/chunks/chunk.MFFJYORB.js.map +0 -7
  238. package/dist/chunks/chunk.MNMITYTH.js.map +0 -7
  239. package/dist/chunks/chunk.N2I6HVX3.js.map +0 -7
  240. package/dist/chunks/chunk.NAX6WP3D.js.map +0 -7
  241. package/dist/chunks/chunk.O7USYXBT.js +0 -23
  242. package/dist/chunks/chunk.OJ4KOC7R.js.map +0 -7
  243. package/dist/chunks/chunk.OJREQD2D.js.map +0 -7
  244. package/dist/chunks/chunk.PGCXJ2PT.js.map +0 -7
  245. package/dist/chunks/chunk.QHFGD6WW.js.map +0 -7
  246. package/dist/chunks/chunk.RSONAU45.js.map +0 -7
  247. package/dist/chunks/chunk.SBEIXLRW.js.map +0 -7
  248. package/dist/chunks/chunk.TUYEX4KP.js.map +0 -7
  249. package/dist/chunks/chunk.W6V7TPGK.js.map +0 -7
  250. package/dist/chunks/chunk.XSXBQCWN.js.map +0 -7
  251. package/dist/chunks/chunk.XXF35USM.js.map +0 -7
  252. package/dist/chunks/chunk.Z4NKFCKY.js.map +0 -7
  253. package/dist/web-types.json +0 -2449
  254. /package/dist/chunks/{chunk.ULMZHWWW.js.map → chunk.5BMNRZ7L.js.map} +0 -0
  255. /package/dist/chunks/{chunk.SMSP5C6C.js.map → chunk.5CB3CVZ7.js.map} +0 -0
  256. /package/dist/chunks/{chunk.5OPODPPZ.js.map → chunk.AJU6C4KC.js.map} +0 -0
  257. /package/dist/chunks/{chunk.VZ7S7YYN.js.map → chunk.AVTU2BGE.js.map} +0 -0
  258. /package/dist/chunks/{chunk.LWXCBEHD.js.map → chunk.BGKFRWWO.js.map} +0 -0
  259. /package/dist/chunks/{chunk.USYR7G7Z.js.map → chunk.BTZX6ZFZ.js.map} +0 -0
  260. /package/dist/chunks/{chunk.RA2WSKQT.js.map → chunk.F4THECWA.js.map} +0 -0
  261. /package/dist/chunks/{chunk.PMTVLWNZ.js.map → chunk.FUNZW7ES.js.map} +0 -0
  262. /package/dist/chunks/{chunk.7VOPIPHW.js.map → chunk.IOPUYG6Q.js.map} +0 -0
  263. /package/dist/chunks/{chunk.5THN2K5Q.js.map → chunk.IR2PZHC7.js.map} +0 -0
  264. /package/dist/chunks/{chunk.HG5QC5EW.js.map → chunk.KUO3KJOC.js.map} +0 -0
  265. /package/dist/chunks/{chunk.B6AKFQJS.js.map → chunk.LF2XSSHD.js.map} +0 -0
  266. /package/dist/chunks/{chunk.KP7SYG4K.js.map → chunk.LZE7OXKV.js.map} +0 -0
  267. /package/dist/chunks/{chunk.7KSU2SUD.js.map → chunk.PRZRH7SN.js.map} +0 -0
  268. /package/dist/chunks/{chunk.BQG5LF7J.js.map → chunk.QAUTITK3.js.map} +0 -0
  269. /package/dist/chunks/{chunk.DJOAQ4JU.js.map → chunk.QNDC5KWA.js.map} +0 -0
  270. /package/dist/chunks/{chunk.Q7X5NOPZ.js.map → chunk.QY6MKIMK.js.map} +0 -0
  271. /package/dist/chunks/{chunk.VQWUZKDS.js.map → chunk.RMQZMRVP.js.map} +0 -0
  272. /package/dist/chunks/{chunk.SXW2KV3B.js.map → chunk.VATYXV2O.js.map} +0 -0
  273. /package/dist/chunks/{chunk.6V3HOZNE.js.map → chunk.Y72MIUNI.js.map} +0 -0
  274. /package/dist/chunks/{chunk.IKKMWFWH.js.map → chunk.ZIQXX272.js.map} +0 -0
  275. /package/dist/chunks/{chunk.GOVLCQY5.js.map → chunk.ZT5DUKVA.js.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/button/button.styles.ts"],
4
+ "sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { css } from 'lit';\n\nexport default css`\n\t/* stylelint-disable */\n :host {\n display: inline-block;\n position: relative;\n width: auto;\n cursor: pointer;\n }\n\n .button {\n display: inline-flex;\n align-items: stretch;\n justify-content: center;\n width: 100%;\n border-style: solid;\n border-width: var(--syn-input-border-width);\n font-family: var(--syn-input-font-family);\n font-weight: var(--syn-font-weight-semibold);\n text-decoration: none;\n user-select: none;\n -webkit-user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 0;\n transition:\n var(--syn-transition-x-fast) background-color,\n var(--syn-transition-x-fast) color,\n var(--syn-transition-x-fast) border,\n var(--syn-transition-x-fast) box-shadow;\n cursor: inherit;\n }\n\n .button::-moz-focus-inner {\n border: 0;\n }\n\n .button:focus {\n outline: none;\n }\n\n .button:focus-visible {\n outline: var(--syn-focus-ring);\n outline-offset: var(--syn-focus-ring-offset);\n }\n\n .button--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* When disabled, prevent mouse events from bubbling up from children */\n .button--disabled * {\n pointer-events: none;\n }\n\n .button__prefix,\n .button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n pointer-events: none;\n }\n\n .button__label {\n display: inline-block;\n }\n\n .button__label::slotted(syn-icon) {\n vertical-align: -2px;\n }\n\n /*\n * Standard buttons\n */\n\n /* Primary */\n .button--filled.button--primary {\n background-color: var(--syn-color-primary-600);\n border-color: var(--syn-color-primary-600);\n color: var(--syn-color-neutral-0);\n }\n\n .button--filled.button--primary:hover:not(.button--disabled) {\n background-color: var(--syn-color-primary-500);\n border-color: var(--syn-color-primary-500);\n color: var(--syn-color-neutral-0);\n }\n\n .button--filled.button--primary:active:not(.button--disabled) {\n background-color: var(--syn-color-primary-600);\n border-color: var(--syn-color-primary-600);\n color: var(--syn-color-neutral-0);\n }\n\n /*\n * Outline buttons\n */\n\n .button--outline {\n background: none;\n border: solid 1px;\n }\n\n /* Primary */\n .button--outline.button--primary {\n border-color: var(--syn-color-primary-600);\n color: var(--syn-color-primary-600);\n }\n\n .button--outline.button--primary:hover:not(.button--disabled),\n .button--outline.button--primary.button--checked:not(.button--disabled) {\n background-color: var(--syn-color-primary-600);\n color: var(--syn-color-neutral-0);\n }\n\n .button--outline.button--primary:active:not(.button--disabled) {\n border-color: var(--syn-color-primary-700);\n background-color: var(--syn-color-primary-700);\n color: var(--syn-color-neutral-0);\n }\n\n /*\n * Text buttons\n */\n\n .button--text {\n background-color: transparent;\n border-color: transparent;\n color: var(--syn-color-primary-600);\n }\n\n .button--text:hover:not(.button--disabled) {\n background-color: transparent;\n border-color: transparent;\n color: var(--syn-color-primary-500);\n }\n\n .button--text:focus-visible:not(.button--disabled) {\n background-color: transparent;\n border-color: transparent;\n color: var(--syn-color-primary-500);\n }\n\n .button--text:active:not(.button--disabled) {\n background-color: transparent;\n border-color: transparent;\n color: var(--syn-color-primary-700);\n }\n\n /*\n * Size modifiers\n */\n\n .button--small {\n height: auto;\n min-height: var(--syn-input-height-small);\n font-size: var(--syn-button-font-size-small);\n line-height: calc(var(--syn-input-height-small) - var(--syn-input-border-width) * 2);\n border-radius: var(--syn-input-border-radius-small);\n }\n\n .button--medium {\n height: auto;\n min-height: var(--syn-input-height-medium);\n font-size: var(--syn-button-font-size-medium);\n line-height: calc(var(--syn-input-height-medium) - var(--syn-input-border-width) * 2);\n border-radius: var(--syn-input-border-radius-medium);\n }\n\n .button--large {\n height: auto;\n min-height: var(--syn-input-height-large);\n font-size: var(--syn-button-font-size-large);\n line-height: calc(var(--syn-input-height-large) - var(--syn-input-border-width) * 2);\n border-radius: var(--syn-input-border-radius-large);\n }\n\n /*\n * Caret modifier\n */\n\n .button--caret .button__suffix {\n display: none;\n }\n\n .button--caret .button__caret {\n height: auto;\n }\n\n /*\n * Loading modifier\n */\n\n .button--loading {\n position: relative;\n cursor: wait;\n }\n\n .button--loading .button__prefix,\n .button--loading .button__label,\n .button--loading .button__suffix,\n .button--loading .button__caret {\n visibility: hidden;\n }\n\n .button--loading syn-spinner {\n --indicator-color: currentColor;\n position: absolute;\n font-size: 1em;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n\n /*\n * Badges\n */\n\n .button ::slotted(syn-badge) {\n position: absolute;\n top: 0;\n right: 0;\n translate: 50% -50%;\n pointer-events: none;\n }\n\n .button--rtl ::slotted(syn-badge) {\n right: auto;\n left: 0;\n translate: -50% -50%;\n }\n\n /*\n * Button spacing\n */\n\n .button--has-label.button--small .button__label {\n padding: 0 var(--syn-spacing-small);\n }\n\n .button--has-label.button--medium .button__label {\n padding: 0 var(--syn-spacing-medium);\n }\n\n .button--has-label.button--large .button__label {\n padding: 0 var(--syn-spacing-large);\n }\n\n .button--has-prefix.button--small {\n padding-inline-start: var(--syn-spacing-x-small);\n }\n\n .button--has-prefix.button--small .button__label {\n padding-inline-start: var(--syn-spacing-x-small);\n }\n\n .button--has-prefix.button--medium {\n padding-inline-start: var(--syn-spacing-small);\n }\n\n .button--has-prefix.button--medium .button__label {\n padding-inline-start: var(--syn-spacing-small);\n }\n\n .button--has-prefix.button--large {\n padding-inline-start: var(--syn-spacing-small);\n }\n\n .button--has-prefix.button--large .button__label {\n padding-inline-start: var(--syn-spacing-small);\n }\n\n .button--has-suffix.button--small,\n .button--caret.button--small {\n padding-inline-end: var(--syn-spacing-x-small);\n }\n\n .button--has-suffix.button--small .button__label,\n .button--caret.button--small .button__label {\n padding-inline-end: var(--syn-spacing-x-small);\n }\n\n .button--has-suffix.button--medium,\n .button--caret.button--medium {\n padding-inline-end: var(--syn-spacing-small);\n }\n\n .button--has-suffix.button--medium .button__label,\n .button--caret.button--medium .button__label {\n padding-inline-end: var(--syn-spacing-small);\n }\n\n .button--has-suffix.button--large,\n .button--caret.button--large {\n padding-inline-end: var(--syn-spacing-small);\n }\n\n .button--has-suffix.button--large .button__label,\n .button--caret.button--large .button__label {\n padding-inline-end: var(--syn-spacing-small);\n }\n\n /*\n * Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.).\n * This means buttons aren't always direct descendants of the button group, thus we can't target them with the\n * ::slotted selector. To work around this, the button group component does some magic to add these special classes to\n * buttons and we style them here instead.\n */\n\n :host(.syn-button-group__button--first:not(.syn-button-group__button--last)) .button {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n :host(.syn-button-group__button--inner) .button {\n border-radius: 0;\n }\n\n :host(.syn-button-group__button--last:not(.syn-button-group__button--first)) .button {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n\n /* All except the first */\n :host(.syn-button-group__button:not(.syn-button-group__button--first)) {\n margin-inline-start: calc(-1 * var(--syn-input-border-width));\n }\n\n /* Add a visual separator between solid buttons */\n :host(\n .syn-button-group__button:not(\n .syn-button-group__button--first,\n .syn-button-group__button--radio,\n [variant='filled']\n ):not(:hover)\n )\n .button:after {\n content: '';\n position: absolute;\n top: 0;\n inset-inline-start: 0;\n bottom: 0;\n border-left: solid 1px rgb(128 128 128 / 33%);\n mix-blend-mode: multiply;\n }\n\n /* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */\n :host(.syn-button-group__button--hover) {\n z-index: 1;\n }\n\n /* Focus and checked are always on top */\n :host(.syn-button-group__button--focus),\n :host(.syn-button-group__button[checked]) {\n z-index: 2;\n }\n`;\n"],
5
+ "mappings": ";AAMA,SAAS,WAAW;AAEpB,IAAO,wBAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __spreadProps,
3
3
  __spreadValues
4
- } from "./chunk.DJOAQ4JU.js";
4
+ } from "./chunk.QNDC5KWA.js";
5
5
 
6
6
  // src/internal/form.ts
7
7
  var formCollections = /* @__PURE__ */ new WeakMap();
@@ -16,7 +16,7 @@ var FormControlController = class {
16
16
  const name = this.options.name(this.host);
17
17
  const value = this.options.value(this.host);
18
18
  const isButton = this.host.tagName.toLowerCase() === "syn-button";
19
- if (!disabled && !isButton && typeof name === "string" && name.length > 0 && typeof value !== "undefined") {
19
+ if (this.host.isConnected && !disabled && !isButton && typeof name === "string" && name.length > 0 && typeof value !== "undefined") {
20
20
  if (Array.isArray(value)) {
21
21
  value.forEach((val) => {
22
22
  event.formData.append(name, val.toString());
@@ -301,4 +301,4 @@ export {
301
301
  valueMissingValidityState,
302
302
  customErrorValidityState
303
303
  };
304
- //# sourceMappingURL=chunk.AMTCNRDE.js.map
304
+ //# sourceMappingURL=chunk.SZCGMXW5.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/internal/form.ts"],
4
+ "sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport type { SynergyFormControl } from '../internal/synergy-element.js';\nimport type SynButton from '../components/button/button.js';\n\n//\n// We store a WeakMap of forms + controls so we can keep references to all Synergy controls within a given form. As\n// elements connect and disconnect to/from the DOM, their containing form is used as the key and the form control is\n// added and removed from the form's set, respectively.\n//\nexport const formCollections: WeakMap<HTMLFormElement, Set<SynergyFormControl>> = new WeakMap();\n\n//\n// We store a WeakMap of reportValidity() overloads so we can override it when form controls connect to the DOM and\n// restore the original behavior when they disconnect.\n//\nconst reportValidityOverloads: WeakMap<HTMLFormElement, () => boolean> = new WeakMap();\nconst checkValidityOverloads: WeakMap<HTMLFormElement, () => boolean> = new WeakMap();\n\n//\n// We store a Set of controls that users have interacted with. This allows us to determine the interaction state\n// without littering the DOM with additional data attributes.\n//\nconst userInteractedControls: WeakSet<SynergyFormControl> = new WeakSet();\n\n//\n// We store a WeakMap of interactions for each form control so we can track when all conditions are met for validation.\n//\nconst interactions = new WeakMap<SynergyFormControl, string[]>();\n\nexport interface FormControlControllerOptions {\n /** A function that returns the form containing the form control. */\n form: (input: SynergyFormControl) => HTMLFormElement | null;\n /** A function that returns the form control's name, which will be submitted with the form data. */\n name: (input: SynergyFormControl) => string;\n /** A function that returns the form control's current value. */\n value: (input: SynergyFormControl) => unknown | unknown[];\n /** A function that returns the form control's default value. */\n defaultValue: (input: SynergyFormControl) => unknown | unknown[];\n /** A function that returns the form control's current disabled state. If disabled, the value won't be submitted. */\n disabled: (input: SynergyFormControl) => boolean;\n /**\n * A function that maps to the form control's reportValidity() function. When the control is invalid, this will\n * prevent submission and trigger the browser's constraint violation warning.\n */\n reportValidity: (input: SynergyFormControl) => boolean;\n\n /**\n * A function that maps to the form control's `checkValidity()` function. When the control is invalid, this will return false.\n * this is helpful is you want to check validation without triggering the native browser constraint violation warning.\n */\n checkValidity: (input: SynergyFormControl) => boolean;\n /** A function that sets the form control's value */\n setValue: (input: SynergyFormControl, value: unknown) => void;\n /**\n * An array of event names to listen to. When all events in the list are emitted, the control will receive validity\n * states such as user-valid and user-invalid.user interacted validity states. */\n assumeInteractionOn: string[];\n}\n\n/** A reactive controller to allow form controls to participate in form submission, validation, etc. */\nexport class FormControlController implements ReactiveController {\n host: SynergyFormControl & ReactiveControllerHost;\n form?: HTMLFormElement | null;\n options: FormControlControllerOptions;\n\n constructor(host: ReactiveControllerHost & SynergyFormControl, options?: Partial<FormControlControllerOptions>) {\n (this.host = host).addController(this);\n this.options = {\n form: input => {\n // If there's a form attribute, use it to find the target form by id\n // Controls may not always reflect the 'form' property. For example, `<syn-button>` doesn't reflect.\n const formId = input.form;\n\n if (formId) {\n const root = input.getRootNode() as Document | ShadowRoot;\n\n const form = root.getElementById(formId);\n\n if (form) {\n return form as HTMLFormElement;\n }\n }\n\n return input.closest('form');\n },\n name: input => input.name,\n value: input => input.value,\n defaultValue: input => input.defaultValue,\n disabled: input => input.disabled ?? false,\n reportValidity: input => (typeof input.reportValidity === 'function' ? input.reportValidity() : true),\n checkValidity: input => (typeof input.checkValidity === 'function' ? input.checkValidity() : true),\n setValue: (input, value: string) => (input.value = value),\n assumeInteractionOn: ['syn-input'],\n ...options\n };\n }\n\n hostConnected() {\n const form = this.options.form(this.host);\n\n if (form) {\n this.attachForm(form);\n }\n\n // Listen for interactions\n interactions.set(this.host, []);\n this.options.assumeInteractionOn.forEach(event => {\n this.host.addEventListener(event, this.handleInteraction);\n });\n }\n\n hostDisconnected() {\n this.detachForm();\n\n // Clean up interactions\n interactions.delete(this.host);\n this.options.assumeInteractionOn.forEach(event => {\n this.host.removeEventListener(event, this.handleInteraction);\n });\n }\n\n hostUpdated() {\n const form = this.options.form(this.host);\n\n // Detach if the form no longer exists\n if (!form) {\n this.detachForm();\n }\n\n // If the form has changed, reattach it\n if (form && this.form !== form) {\n this.detachForm();\n this.attachForm(form);\n }\n\n if (this.host.hasUpdated) {\n this.setValidity(this.host.validity.valid);\n }\n }\n\n private attachForm(form?: HTMLFormElement) {\n if (form) {\n this.form = form;\n\n // Add this element to the form's collection\n if (formCollections.has(this.form)) {\n formCollections.get(this.form)!.add(this.host);\n } else {\n formCollections.set(this.form, new Set<SynergyFormControl>([this.host]));\n }\n\n this.form.addEventListener('formdata', this.handleFormData);\n this.form.addEventListener('submit', this.handleFormSubmit);\n this.form.addEventListener('reset', this.handleFormReset);\n\n // Overload the form's reportValidity() method so it looks at Synergy form controls\n if (!reportValidityOverloads.has(this.form)) {\n reportValidityOverloads.set(this.form, this.form.reportValidity);\n this.form.reportValidity = () => this.reportFormValidity();\n }\n\n // Overload the form's checkValidity() method so it looks at Synergy form controls\n if (!checkValidityOverloads.has(this.form)) {\n checkValidityOverloads.set(this.form, this.form.checkValidity);\n this.form.checkValidity = () => this.checkFormValidity();\n }\n } else {\n this.form = undefined;\n }\n }\n\n private detachForm() {\n if (!this.form) return;\n\n const formCollection = formCollections.get(this.form);\n\n if (!formCollection) {\n return;\n }\n\n // Remove this host from the form's collection\n formCollection.delete(this.host);\n\n // Check to make sure there's no other form controls in the collection. If we do this\n // without checking if any other controls are still in the collection, then we will wipe out the\n // validity checks for all other elements.\n // see: https://github.com/synergy-design-system/synergy/issues/1703\n if (formCollection.size <= 0) {\n this.form.removeEventListener('formdata', this.handleFormData);\n this.form.removeEventListener('submit', this.handleFormSubmit);\n this.form.removeEventListener('reset', this.handleFormReset);\n\n // Remove the overload and restore the original method\n if (reportValidityOverloads.has(this.form)) {\n this.form.reportValidity = reportValidityOverloads.get(this.form)!;\n reportValidityOverloads.delete(this.form);\n }\n\n if (checkValidityOverloads.has(this.form)) {\n this.form.checkValidity = checkValidityOverloads.get(this.form)!;\n checkValidityOverloads.delete(this.form);\n }\n\n // So it looks weird here to not always set the form to undefined. But I _think_ if we unattach this.form here,\n // we end up in this fun spot where future validity checks don't have a reference to the form validity handler.\n // First form element in sets the validity handler. So we can't clean up `this.form` until there are no other form elements in the form.\n this.form = undefined;\n }\n }\n\n private handleFormData = (event: FormDataEvent) => {\n const disabled = this.options.disabled(this.host);\n const name = this.options.name(this.host);\n const value = this.options.value(this.host);\n\n // For buttons, we only submit the value if they were the submitter. This is currently done in doAction() by\n // injecting the name/value on a temporary button, so we can just skip them here.\n const isButton = this.host.tagName.toLowerCase() === 'syn-button';\n\n if (\n this.host.isConnected &&\n !disabled &&\n !isButton &&\n typeof name === 'string' &&\n name.length > 0 &&\n typeof value !== 'undefined'\n ) {\n if (Array.isArray(value)) {\n (value as unknown[]).forEach(val => {\n event.formData.append(name, (val as string | number | boolean).toString());\n });\n } else {\n event.formData.append(name, (value as string | number | boolean).toString());\n }\n }\n };\n\n private handleFormSubmit = (event: Event) => {\n const disabled = this.options.disabled(this.host);\n const reportValidity = this.options.reportValidity;\n\n // Update the interacted state for all controls when the form is submitted\n if (this.form && !this.form.noValidate) {\n formCollections.get(this.form)?.forEach(control => {\n this.setUserInteracted(control, true);\n });\n }\n\n if (this.form && !this.form.noValidate && !disabled && !reportValidity(this.host)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n\n private handleFormReset = () => {\n this.options.setValue(this.host, this.options.defaultValue(this.host));\n this.setUserInteracted(this.host, false);\n interactions.set(this.host, []);\n };\n\n private handleInteraction = (event: Event) => {\n const emittedEvents = interactions.get(this.host)!;\n\n if (!emittedEvents.includes(event.type)) {\n emittedEvents.push(event.type);\n }\n\n // Mark it as user-interacted as soon as all associated events have been emitted\n if (emittedEvents.length === this.options.assumeInteractionOn.length) {\n this.setUserInteracted(this.host, true);\n }\n };\n\n private checkFormValidity = () => {\n //\n // This is very similar to the `reportFormValidity` function, but it does not trigger native constraint validation\n // Allow the user to simply check if the form is valid and handling validity in their own way.\n //\n // We preserve the original method in a WeakMap, but we don't call it from the overload because that would trigger\n // validations in an unexpected order. When the element disconnects, we revert to the original behavior. This won't\n // be necessary once we can use ElementInternals.\n //\n // Note that we're also honoring the form's novalidate attribute.\n //\n if (this.form && !this.form.noValidate) {\n // This seems sloppy, but checking all elements will cover native inputs, Synergy inputs, and other custom\n // elements that support the constraint validation API.\n const elements = this.form.querySelectorAll<HTMLInputElement>('*');\n\n for (const element of elements) {\n if (typeof element.checkValidity === 'function') {\n if (!element.checkValidity()) {\n return false;\n }\n }\n }\n }\n\n return true;\n };\n\n private reportFormValidity = () => {\n //\n // Synergy form controls work hard to act like regular form controls. They support the Constraint Validation API\n // and its associated methods such as setCustomValidity() and reportValidity(). However, the HTMLFormElement also\n // has a reportValidity() method that will trigger validation on all child controls. Since we're not yet using\n // ElementInternals, we need to overload this method so it looks for any element with the reportValidity() method.\n //\n // We preserve the original method in a WeakMap, but we don't call it from the overload because that would trigger\n // validations in an unexpected order. When the element disconnects, we revert to the original behavior. This won't\n // be necessary once we can use ElementInternals.\n //\n // Note that we're also honoring the form's novalidate attribute.\n //\n if (this.form && !this.form.noValidate) {\n // This seems sloppy, but checking all elements will cover native inputs, Synergy inputs, and other custom\n // elements that support the constraint validation API.\n const elements = this.form.querySelectorAll<HTMLInputElement>('*');\n\n for (const element of elements) {\n if (typeof element.reportValidity === 'function') {\n if (!element.reportValidity()) {\n return false;\n }\n }\n }\n }\n\n return true;\n };\n\n private setUserInteracted(el: SynergyFormControl, hasInteracted: boolean) {\n if (hasInteracted) {\n userInteractedControls.add(el);\n } else {\n userInteractedControls.delete(el);\n }\n\n el.requestUpdate();\n }\n\n private doAction(type: 'submit' | 'reset', submitter?: HTMLInputElement | SynButton) {\n if (this.form) {\n const button = document.createElement('button');\n button.type = type;\n button.style.position = 'absolute';\n button.style.width = '0';\n button.style.height = '0';\n button.style.clipPath = 'inset(50%)';\n button.style.overflow = 'hidden';\n button.style.whiteSpace = 'nowrap';\n\n // Pass name, value, and form attributes through to the temporary button\n if (submitter) {\n button.name = submitter.name;\n button.value = submitter.value;\n\n ['formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget'].forEach(attr => {\n if (submitter.hasAttribute(attr)) {\n button.setAttribute(attr, submitter.getAttribute(attr)!);\n }\n });\n }\n\n this.form.append(button);\n button.click();\n button.remove();\n }\n }\n\n /** Returns the associated `<form>` element, if one exists. */\n getForm() {\n return this.form ?? null;\n }\n\n /** Resets the form, restoring all the control to their default value */\n reset(submitter?: HTMLInputElement | SynButton) {\n this.doAction('reset', submitter);\n }\n\n /** Submits the form, triggering validation and form data injection. */\n submit(submitter?: HTMLInputElement | SynButton) {\n // Calling form.submit() bypasses the submit event and constraint validation. To prevent this, we can inject a\n // native submit button into the form, \"click\" it, then remove it to simulate a standard form submission.\n this.doAction('submit', submitter);\n }\n\n /**\n * Synchronously sets the form control's validity. Call this when you know the future validity but need to update\n * the host element immediately, i.e. before Lit updates the component in the next update.\n */\n setValidity(isValid: boolean) {\n const host = this.host;\n const hasInteracted = Boolean(userInteractedControls.has(host));\n const required = Boolean(host.required);\n\n //\n // We're mapping the following \"states\" to data attributes. In the future, we can use ElementInternals.states to\n // create a similar mapping, but instead of [data-invalid] it will look like :--invalid.\n //\n // See this RFC for more details: https://github.com/synergy-design-system/synergy/issues/1011\n //\n host.toggleAttribute('data-required', required);\n host.toggleAttribute('data-optional', !required);\n host.toggleAttribute('data-invalid', !isValid);\n host.toggleAttribute('data-valid', isValid);\n host.toggleAttribute('data-user-invalid', !isValid && hasInteracted);\n host.toggleAttribute('data-user-valid', isValid && hasInteracted);\n }\n\n /**\n * Updates the form control's validity based on the current value of `host.validity.valid`. Call this when anything\n * that affects constraint validation changes so the component receives the correct validity states.\n */\n updateValidity() {\n const host = this.host;\n this.setValidity(host.validity.valid);\n }\n\n /**\n * Dispatches a non-bubbling, cancelable custom event of type `syn-invalid`.\n * If the `syn-invalid` event will be cancelled then the original `invalid`\n * event (which may have been passed as argument) will also be cancelled.\n * If no original `invalid` event has been passed then the `syn-invalid`\n * event will be cancelled before being dispatched.\n */\n emitInvalidEvent(originalInvalidEvent?: Event) {\n const slInvalidEvent = new CustomEvent<Record<PropertyKey, never>>('syn-invalid', {\n bubbles: false,\n composed: false,\n cancelable: true,\n detail: {}\n });\n\n if (!originalInvalidEvent) {\n slInvalidEvent.preventDefault();\n }\n\n if (!this.host.dispatchEvent(slInvalidEvent)) {\n originalInvalidEvent?.preventDefault();\n }\n }\n}\n\n/*\n * Predefined common validity states.\n * All of them are read-only.\n */\n\n// A validity state object that represents `valid`\nexport const validValidityState: ValidityState = Object.freeze({\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: true,\n valueMissing: false\n});\n\n// A validity state object that represents `value missing`\nexport const valueMissingValidityState: ValidityState = Object.freeze({\n ...validValidityState,\n valid: false,\n valueMissing: true\n});\n\n// A validity state object that represents a custom error\nexport const customErrorValidityState: ValidityState = Object.freeze({\n ...validValidityState,\n valid: false,\n customError: true\n});\n"],
5
+ "mappings": ";;;;;;AAeO,IAAM,kBAAqE,oBAAI,QAAQ;AAM9F,IAAM,0BAAmE,oBAAI,QAAQ;AACrF,IAAM,yBAAkE,oBAAI,QAAQ;AAMpF,IAAM,yBAAsD,oBAAI,QAAQ;AAKxE,IAAM,eAAe,oBAAI,QAAsC;AAiCxD,IAAM,wBAAN,MAA0D;AAAA,EAK/D,YAAY,MAAmD,SAAiD;AAiJhH,SAAQ,iBAAiB,CAAC,UAAyB;AACjD,YAAM,WAAW,KAAK,QAAQ,SAAS,KAAK,IAAI;AAChD,YAAM,OAAO,KAAK,QAAQ,KAAK,KAAK,IAAI;AACxC,YAAM,QAAQ,KAAK,QAAQ,MAAM,KAAK,IAAI;AAI1C,YAAM,WAAW,KAAK,KAAK,QAAQ,YAAY,MAAM;AAErD,UACE,KAAK,KAAK,eACV,CAAC,YACD,CAAC,YACD,OAAO,SAAS,YAChB,KAAK,SAAS,KACd,OAAO,UAAU,aACjB;AACA,YAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,UAAC,MAAoB,QAAQ,SAAO;AAClC,kBAAM,SAAS,OAAO,MAAO,IAAkC,SAAS,CAAC;AAAA,UAC3E,CAAC;AAAA,QACH,OAAO;AACL,gBAAM,SAAS,OAAO,MAAO,MAAoC,SAAS,CAAC;AAAA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AAiB,IAAI,YAAwC,eAAe;AAAA,MAChF,SAAS;AAAA,MACT,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,QAAQ,CAAC;AAAA,IACX,CAAC;AAED,QAAI,CAAC,sBAAsB;AACzB,qBAAe,eAAe;AAAA,IAChC;AAEA,QAAI,CAAC,KAAK,KAAK,cAAc,cAAc,GAAG;AAC5C,mEAAsB;AAAA,IACxB;AAAA,EACF;AACF;AAQO,IAAM,qBAAoC,OAAO,OAAO;AAAA,EAC7D,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,SAAS;AAAA,EACT,UAAU;AAAA,EACV,cAAc;AAAA,EACd,OAAO;AAAA,EACP,cAAc;AAChB,CAAC;AAGM,IAAM,4BAA2C,OAAO,OAAO,iCACjE,qBADiE;AAAA,EAEpE,OAAO;AAAA,EACP,cAAc;AAChB,EAAC;AAGM,IAAM,2BAA0C,OAAO,OAAO,iCAChE,qBADgE;AAAA,EAEnE,OAAO;AAAA,EACP,aAAa;AACf,EAAC;",
6
+ "names": []
7
+ }
@@ -1,62 +1,6 @@
1
1
  // src/styles/form-control.styles.ts
2
- import { css as css2 } from "lit";
3
-
4
- // src/styles/form-control.custom.styles.ts
5
2
  import { css } from "lit";
6
- var form_control_custom_styles_default = css`
7
-
8
- /* Label */
9
- .form-control--has-label .form-control__label {
10
- font-weight: var(--syn-font-weight-semibold);
11
- }
12
-
13
- .form-control--has-label.form-control--small .form-control__label {
14
- margin-bottom: var(--syn-spacing-x-small);
15
- }
16
-
17
- .form-control--has-label.form-control--medium .form-control__label {
18
- margin-bottom: var(--syn-input-spacing-small);
19
- }
20
-
21
- .form-control--has-label.form-control--large .form-control__label {
22
- margin-bottom: var(--syn-input-spacing-medium);
23
- }
24
-
25
- /* Help text */
26
- .form-control--has-help-text .form-control__help-text {
27
- margin-top: var(--syn-spacing-x-small);
28
- }
29
-
30
- .form-control--small.form-control--has-prefix .input__control {
31
- padding: var(--syn-spacing-3x-small) 0;
32
- }
33
-
34
- .form-control--has-prefix.form-control--medium .input__control {
35
- padding: var(--syn-spacing-x-small) 0;
36
- }
37
-
38
- .form-control--large.form-control--has-prefix .input__control {
39
- padding: var(--syn-input-spacing-small) 0;
40
- }
41
-
42
- /* ERROR */
43
-
44
- :host([data-user-invalid]) .form-control__help-text {
45
- color: var(--syn-input-help-text-color-error);
46
- }
47
-
48
- /* DISABLED */
49
-
50
- :host([disabled]) .form-control--has-label .form-control__label,
51
- :host([disabled]) .form-control--has-help-text .form-control__help-text {
52
- cursor: not-allowed;
53
- opacity: 0.5;
54
- }
55
-
56
- `;
57
-
58
- // src/styles/form-control.styles.ts
59
- var form_control_styles_default = css2`
3
+ var form_control_styles_default = css`
60
4
  /* stylelint-disable */
61
5
  .form-control .form-control__label {
62
6
  display: none;
@@ -113,11 +57,64 @@ var form_control_styles_default = css2`
113
57
  .form-control--has-help-text.form-control--radio-group .form-control__help-text {
114
58
  margin-top: var(--syn-spacing-2x-small);
115
59
  }
60
+ `;
61
+
62
+ // src/styles/form-control.custom.styles.ts
63
+ import { css as css2 } from "lit";
64
+ var form_control_custom_styles_default = css2`
65
+
66
+ /* Label */
67
+ .form-control--has-label .form-control__label {
68
+ font-weight: var(--syn-font-weight-semibold);
69
+ }
70
+
71
+ .form-control--has-label.form-control--small .form-control__label {
72
+ margin-bottom: var(--syn-spacing-x-small);
73
+ }
74
+
75
+ .form-control--has-label.form-control--medium .form-control__label {
76
+ margin-bottom: var(--syn-input-spacing-small);
77
+ }
78
+
79
+ .form-control--has-label.form-control--large .form-control__label {
80
+ margin-bottom: var(--syn-input-spacing-medium);
81
+ }
82
+
83
+ /* Help text */
84
+ .form-control--has-help-text .form-control__help-text {
85
+ margin-top: var(--syn-spacing-x-small);
86
+ }
87
+
88
+ .form-control--small.form-control--has-prefix .input__control {
89
+ padding: var(--syn-spacing-3x-small) 0;
90
+ }
91
+
92
+ .form-control--has-prefix.form-control--medium .input__control {
93
+ padding: var(--syn-spacing-x-small) 0;
94
+ }
95
+
96
+ .form-control--large.form-control--has-prefix .input__control {
97
+ padding: var(--syn-input-spacing-small) 0;
98
+ }
99
+
100
+ /* ERROR */
101
+
102
+ :host([data-user-invalid]) .form-control__help-text {
103
+ color: var(--syn-input-help-text-color-error);
104
+ }
105
+
106
+ /* DISABLED */
107
+
108
+ :host([disabled]) .form-control--has-label .form-control__label,
109
+ :host([disabled]) .form-control--has-help-text .form-control__help-text {
110
+ cursor: not-allowed;
111
+ opacity: 0.5;
112
+ }
116
113
 
117
- ${form_control_custom_styles_default}
118
114
  `;
119
115
 
120
116
  export {
121
- form_control_styles_default
117
+ form_control_styles_default,
118
+ form_control_custom_styles_default
122
119
  };
123
- //# sourceMappingURL=chunk.JHXCBOUD.js.map
120
+ //# sourceMappingURL=chunk.TTL762VF.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/styles/form-control.styles.ts", "../../src/styles/form-control.custom.styles.ts"],
4
+ "sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { css } from 'lit';\n\nexport default css`\n\t/* stylelint-disable */\n .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: inline-block;\n color: var(--syn-input-label-color);\n margin-bottom: var(--syn-spacing-3x-small);\n }\n\n .form-control--has-label.form-control--small .form-control__label {\n font-size: var(--syn-input-label-font-size-small);\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: var(--syn-input-label-font-size-medium);\n }\n\n .form-control--has-label.form-control--large .form-control__label {\n font-size: var(--syn-input-label-font-size-large);\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: var(--syn-input-required-content);\n margin-inline-start: var(--syn-input-required-content-offset);\n color: var(--syn-input-required-content-color);\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: var(--syn-input-help-text-color);\n margin-top: var(--syn-spacing-3x-small);\n }\n\n .form-control--has-help-text.form-control--small .form-control__help-text {\n font-size: var(--syn-input-help-text-font-size-small);\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: var(--syn-input-help-text-font-size-medium);\n }\n\n .form-control--has-help-text.form-control--large .form-control__help-text {\n font-size: var(--syn-input-help-text-font-size-large);\n }\n\n .form-control--has-help-text.form-control--radio-group .form-control__help-text {\n margin-top: var(--syn-spacing-2x-small);\n }\n`;\n", "import { css } from 'lit';\n\nexport default css` \n\n /* Label */\n .form-control--has-label .form-control__label {\n font-weight: var(--syn-font-weight-semibold);\n }\n\n .form-control--has-label.form-control--small .form-control__label {\n margin-bottom: var(--syn-spacing-x-small);\n }\n \n .form-control--has-label.form-control--medium .form-control__label {\n margin-bottom: var(--syn-input-spacing-small);\n }\n\n .form-control--has-label.form-control--large .form-control__label {\n margin-bottom: var(--syn-input-spacing-medium);\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n margin-top: var(--syn-spacing-x-small);\n }\n\n .form-control--small.form-control--has-prefix .input__control {\n padding: var(--syn-spacing-3x-small) 0;\n }\n\n .form-control--has-prefix.form-control--medium .input__control {\n padding: var(--syn-spacing-x-small) 0;\n }\n\n .form-control--large.form-control--has-prefix .input__control {\n padding: var(--syn-input-spacing-small) 0;\n }\n\n /* ERROR */\n \n :host([data-user-invalid]) .form-control__help-text {\n color: var(--syn-input-help-text-color-error);\n }\n\n /* DISABLED */\n\n :host([disabled]) .form-control--has-label .form-control__label,\n :host([disabled]) .form-control--has-help-text .form-control__help-text {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n`;\n"],
5
+ "mappings": ";AAMA,SAAS,WAAW;AAEpB,IAAO,8BAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACRf,SAAS,OAAAA,YAAW;AAEpB,IAAO,qCAAQA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": ["css"]
7
+ }
@@ -0,0 +1,83 @@
1
+ // src/components/drawer/drawer.custom.styles.ts
2
+ import { css } from "lit";
3
+ var drawer_custom_styles_default = css`
4
+ :host {
5
+ /**
6
+ * Used as the default padding for the drawer title
7
+ */
8
+ --header-spacing: var(--syn-spacing-large) var(--syn-spacing-x-small) 0 var(--syn-spacing-large);
9
+
10
+ /**
11
+ * Defines the default body spacing
12
+ */
13
+ --body-spacing: var(--syn-spacing-medium) var(--syn-spacing-large);
14
+
15
+ /**
16
+ * Defines the default footer spacing
17
+ */
18
+ --footer-spacing: var(--syn-spacing-medium) var(--syn-spacing-large) var(--syn-spacing-large);
19
+ }
20
+
21
+ /**
22
+ * Synergy uses a border to distinguish the drawer from its background and
23
+ * removes the default shoelace shadow completely
24
+ */
25
+ .drawer__panel {
26
+ border: 0 solid var(--syn-color-neutral-300);
27
+ box-shadow: none;
28
+ color: var(--syn-color-neutral-950);
29
+ }
30
+
31
+ /*
32
+ * The border of the panel is always placed in direction to the content,
33
+ * depending on the position of the drawer itself
34
+ */
35
+ .drawer--end .drawer__panel {
36
+ border-left-width: var(--syn-border-width-small);
37
+ }
38
+
39
+ .drawer--start .drawer__panel {
40
+ border-right-width: var(--syn-border-width-small);
41
+ }
42
+
43
+ .drawer--top .drawer__panel {
44
+ border-bottom-width: var(--syn-border-width-small);
45
+ }
46
+
47
+ .drawer--bottom .drawer__panel {
48
+ border-top-width: var(--syn-border-width-small);
49
+ }
50
+
51
+ .drawer__header-actions {
52
+ align-items: flex-start;
53
+ gap: var(--syn-spacing-x-small);
54
+ padding: var(--syn-spacing-large) var(--syn-spacing-x-small) 0 0;
55
+ }
56
+
57
+ .drawer__title {
58
+ font-family: var(--syn-font-sans);
59
+ font-size: var(--syn-font-size-x-large);
60
+ font-weight: var(--syn-font-weight-bold);
61
+ line-height: var(--syn-line-height-normal);
62
+ }
63
+
64
+ /**
65
+ * We need this to make sure we are big enough as defined in the layout
66
+ * When omitting this statement, we will get rounding problems via line-height
67
+ */
68
+ .drawer__title,
69
+ .header-actions {
70
+ min-height: 64px;
71
+ }
72
+
73
+ .drawer__header-actions syn-icon-button,
74
+ .drawer__header-actions ::slotted(syn-icon-button) {
75
+ color: var(--syn-color-neutral-950);
76
+ font-size: var(--syn-font-size-x-large);
77
+ }
78
+ `;
79
+
80
+ export {
81
+ drawer_custom_styles_default
82
+ };
83
+ //# sourceMappingURL=chunk.UYD2OVFV.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/drawer/drawer.custom.styles.ts"],
4
+ "sourcesContent": ["import { css } from 'lit';\n\nexport default css`\n :host {\n /**\n * Used as the default padding for the drawer title\n */\n --header-spacing: var(--syn-spacing-large) var(--syn-spacing-x-small) 0 var(--syn-spacing-large);\n\n /**\n * Defines the default body spacing\n */\n --body-spacing: var(--syn-spacing-medium) var(--syn-spacing-large);\n\n /**\n * Defines the default footer spacing\n */\n --footer-spacing: var(--syn-spacing-medium) var(--syn-spacing-large) var(--syn-spacing-large);\n }\n\n /**\n * Synergy uses a border to distinguish the drawer from its background and\n * removes the default shoelace shadow completely\n */\n .drawer__panel {\n border: 0 solid var(--syn-color-neutral-300);\n box-shadow: none;\n color: var(--syn-color-neutral-950);\n }\n\n /*\n * The border of the panel is always placed in direction to the content,\n * depending on the position of the drawer itself\n */\n .drawer--end .drawer__panel {\n border-left-width: var(--syn-border-width-small);\n }\n\n .drawer--start .drawer__panel {\n border-right-width: var(--syn-border-width-small);\n }\n\n .drawer--top .drawer__panel {\n border-bottom-width: var(--syn-border-width-small);\n }\n\n .drawer--bottom .drawer__panel {\n border-top-width: var(--syn-border-width-small);\n }\n\n .drawer__header-actions {\n align-items: flex-start;\n gap: var(--syn-spacing-x-small);\n padding: var(--syn-spacing-large) var(--syn-spacing-x-small) 0 0;\n }\n\n .drawer__title {\n font-family: var(--syn-font-sans);\n font-size: var(--syn-font-size-x-large);\n font-weight: var(--syn-font-weight-bold);\n line-height: var(--syn-line-height-normal);\n }\n\n /**\n * We need this to make sure we are big enough as defined in the layout\n * When omitting this statement, we will get rounding problems via line-height\n */\n .drawer__title,\n .header-actions {\n min-height: 64px;\n }\n\n .drawer__header-actions syn-icon-button,\n .drawer__header-actions ::slotted(syn-icon-button) {\n color: var(--syn-color-neutral-950);\n font-size: var(--syn-font-size-x-large);\n }\n`;\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW;AAEpB,IAAO,+BAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,18 +1,19 @@
1
1
  import {
2
2
  radio_button_styles_default
3
- } from "./chunk.IKKMWFWH.js";
3
+ } from "./chunk.ZIQXX272.js";
4
4
  import {
5
5
  HasSlotController
6
6
  } from "./chunk.XGXFE6IF.js";
7
7
  import {
8
8
  watch
9
- } from "./chunk.VZ7S7YYN.js";
9
+ } from "./chunk.AVTU2BGE.js";
10
10
  import {
11
- SynergyElement
12
- } from "./chunk.GHMKOVA3.js";
11
+ SynergyElement,
12
+ component_styles_default
13
+ } from "./chunk.3DE5ARIC.js";
13
14
  import {
14
15
  __decorateClass
15
- } from "./chunk.DJOAQ4JU.js";
16
+ } from "./chunk.QNDC5KWA.js";
16
17
 
17
18
  // src/components/radio-button/radio-button.component.ts
18
19
  import { classMap } from "lit/directives/class-map.js";
@@ -95,7 +96,7 @@ var SynRadioButton = class extends SynergyElement {
95
96
  `;
96
97
  }
97
98
  };
98
- SynRadioButton.styles = radio_button_styles_default;
99
+ SynRadioButton.styles = [component_styles_default, radio_button_styles_default];
99
100
  __decorateClass([
100
101
  query(".button")
101
102
  ], SynRadioButton.prototype, "input", 2);
@@ -124,4 +125,4 @@ __decorateClass([
124
125
  export {
125
126
  SynRadioButton
126
127
  };
127
- //# sourceMappingURL=chunk.7EGCXNF2.js.map
128
+ //# sourceMappingURL=chunk.UZFPGR6M.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/radio-button/radio-button.component.ts"],
4
+ "sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit/static-html.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport styles from './radio-button.styles.js';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Radios buttons allow the user to select a single option from a group using a button-like control.\n * @documentation https://synergy.style/components/radio-button\n * @status stable\n * @since 2.0\n *\n * @slot - The radio button's label.\n * @slot prefix - A presentational prefix icon or similar element.\n * @slot suffix - A presentational suffix icon or similar element.\n *\n * @event syn-blur - Emitted when the button loses focus.\n * @event syn-focus - Emitted when the button gains focus.\n *\n * @csspart base - The component's base wrapper.\n * @csspart button - The internal `<button>` element.\n * @csspart button--checked - The internal button element when the radio button is checked.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart label - The container that wraps the radio button's label.\n * @csspart suffix - The container that wraps the suffix.\n */\nexport default class SynRadioButton extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles];\n\n private readonly hasSlotController = new HasSlotController(this, '[default]', 'prefix', 'suffix');\n\n @query('.button') input: HTMLInputElement;\n @query('.hidden-input') hiddenInput: HTMLInputElement;\n\n @state() protected hasFocus = false;\n\n /**\n * @internal The radio button's checked state. This is exposed as an \"internal\" attribute so we can reflect it, making\n * it easier to style in button groups.\n */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /** The radio's value. When selected, the radio group will receive this value. */\n @property() value: string;\n\n /** Disables the radio button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * The radio button's size. When used inside a radio group, the size will be determined by the radio group's size so\n * this attribute can typically be omitted.\n */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'presentation');\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('syn-blur');\n }\n\n private handleClick(e: MouseEvent) {\n if (this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n this.checked = true;\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('syn-focus');\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n /** Sets focus on the radio button. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the radio button. */\n blur() {\n this.input.blur();\n }\n\n render() {\n return html`\n <div part=\"base\" role=\"presentation\">\n <button\n part=\"${`button${this.checked ? ' button--checked' : ''}`}\"\n role=\"radio\"\n aria-checked=\"${this.checked}\"\n class=${classMap({\n button: true,\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n 'button--checked': this.checked,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--outline': true,\n 'button--has-label': this.hasSlotController.test('[default]'),\n 'button--has-prefix': this.hasSlotController.test('prefix'),\n 'button--has-suffix': this.hasSlotController.test('suffix')\n })}\n aria-disabled=${this.disabled}\n type=\"button\"\n value=${ifDefined(this.value)}\n tabindex=\"${this.checked ? '0' : '-1'}\"\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"button__prefix\"></slot>\n <slot part=\"label\" class=\"button__label\"></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"button__suffix\"></slot>\n </button>\n </div>\n `;\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAMA,SAAS,gBAAgB;AAEzB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,UAAU,OAAO,aAAa;AA2BvC,IAAqB,iBAArB,cAA4C,eAAe;AAAA,EAA3D;AAAA;AAGE,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,aAAa,UAAU,QAAQ;AAKvF,SAAU,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,CAAC;AAAA,sBACjB,KAAK,UAAU,MAAM,IAAI;AAAA,kBAC7B,KAAK,UAAU;AAAA,mBACd,KAAK,WAAW;AAAA,mBAChB,KAAK,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjC;AACF;AAvGqB,eACZ,SAAyB,CAAC,0BAAiB,2BAAM;AAItC;AAAA,EAAjB,MAAM,SAAS;AAAA,GALG,eAKD;AACM;AAAA,EAAvB,MAAM,eAAe;AAAA,GANH,eAMK;AAEL;AAAA,EAAlB,MAAM;AAAA,GARY,eAQA;AAMyB;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAdvB,eAcyB;AAGhC;AAAA,EAAX,SAAS;AAAA,GAjBS,eAiBP;AAGgC;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GApBvB,eAoByB;AAMf;AAAA,EAA5B,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GA1BR,eA0BU;AA4B7B;AAAA,EADC,MAAM,YAAY,EAAE,sBAAsB,KAAK,CAAC;AAAA,GArD9B,eAsDnB;",
6
+ "names": []
7
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SynRadioButton
3
- } from "./chunk.7EGCXNF2.js";
3
+ } from "./chunk.UZFPGR6M.js";
4
4
 
5
5
  // src/components/radio-button/radio-button.ts
6
6
  var radio_button_default = SynRadioButton;
@@ -9,4 +9,4 @@ SynRadioButton.define("syn-radio-button");
9
9
  export {
10
10
  radio_button_default
11
11
  };
12
- //# sourceMappingURL=chunk.SXW2KV3B.js.map
12
+ //# sourceMappingURL=chunk.VATYXV2O.js.map
@@ -31,6 +31,11 @@ var switch_custom_styles_default = css`
31
31
  padding: var(--syn-spacing-3x-small) 0;
32
32
  }
33
33
 
34
+ /* Hint: can be removed, if the padding stylings for sizes from above are removed */
35
+ .form-control--has-help-text .switch {
36
+ padding-bottom: 0;
37
+ }
38
+
34
39
  .switch__control {
35
40
  background-color: var(--syn-color-neutral-600);
36
41
  border: solid var(--syn-border-width-medium) var(--syn-color-neutral-600);
@@ -104,4 +109,4 @@ var switch_custom_styles_default = css`
104
109
  export {
105
110
  switch_custom_styles_default
106
111
  };
107
- //# sourceMappingURL=chunk.AFEABUNX.js.map
112
+ //# sourceMappingURL=chunk.W5JK7V7K.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/switch/switch.custom.styles.ts"],
4
+ "sourcesContent": ["import { css } from 'lit';\n\nexport default css`\n:host([size='small']) {\n --height: calc(var(--syn-font-size-medium) + 2px);\n --thumb-size: var(--syn-font-size-small);\n --width: calc((var(--height) * 2) - 6px);\n }\n\n :host([size='medium']) {\n --height: var(--syn-font-size-large);\n --thumb-size: var(--syn-font-size-medium);\n --width: calc((var(--height) * 2) - 6px);\n }\n\n :host([size='large']) {\n --height: calc(var(--syn-toggle-size-large) + 4px);\n --thumb-size: var(--syn-toggle-size-large);\n --width: calc((var(--height) * 2) - 6px);\n }\n\n .switch.switch--small {\n padding: var(--syn-spacing-2x-small) 0;\n }\n\n .switch.switch--medium {\n padding: var(--syn-spacing-2x-small) 0;\n }\n\n .switch.switch--large {\n padding: var(--syn-spacing-3x-small) 0;\n }\n\n /* Hint: can be removed, if the padding stylings for sizes from above are removed */\n .form-control--has-help-text .switch {\n padding-bottom: 0;\n }\n\n .switch__control {\n background-color: var(--syn-color-neutral-600);\n border: solid var(--syn-border-width-medium) var(--syn-color-neutral-600);\n }\n\n .switch__control .switch__thumb {\n border: none;\n }\n\n /* Hover */\n .switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover {\n background-color: var(--syn-color-neutral-900);\n border-color: var(--syn-color-neutral-900);\n }\n\n .switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover .switch__thumb {\n background-color: var(--syn-color-neutral-0);\n }\n\n /* Checked + hover */\n .switch.switch--checked:not(.switch--disabled) .switch__control:hover {\n background-color: var(--syn-color-primary-900);\n border-color: var(--syn-color-primary-900);\n }\n\n .switch.switch--checked:not(.switch--disabled) .switch__control:hover .switch__thumb {\n background-color: var(--syn-color-neutral-0);\n }\n\n /* Focus */\n .switch:not(.switch--checked):not(.switch--disabled) .switch__input:focus-visible ~ .switch__control {\n background-color: var(--syn-color-neutral-600);\n border-color: var(--syn-color-neutral-600);\n outline: var(--syn-focus-ring);\n outline-offset: var(--syn-focus-ring-offset);\n }\n\n .switch:not(.switch--checked):not(.switch--disabled) .switch__input:focus-visible ~ .switch__control .switch__thumb {\n background-color: var(--syn-color-neutral-0);\n outline: none;\n }\n\n /* Checked + focus */\n .switch.switch--checked:not(.switch--disabled) .switch__input:focus-visible ~ .switch__control {\n background-color: var(--syn-color-primary-900);\n border-color: var(--syn-color-primary-900);\n outline: var(--syn-focus-ring);\n outline-offset: var(--syn-focus-ring-offset);\n }\n\n .switch.switch--checked:not(.switch--disabled) .switch__input:focus-visible ~ .switch__control .switch__thumb {\n background-color: var(--syn-color-neutral-0);\n outline: none;\n }\n\n .switch__label {\n margin-inline-start: var(--syn-spacing-x-small);\n }\n \n :host([data-user-invalid]) .switch:not(.switch--checked):not(.switch--disabled) .switch__control {\n background-color: var(--syn-color-error-700);\n border-color: var(--syn-color-error-700);\n }\n\n :host([data-user-invalid]) .switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover {\n background-color: var(--syn-color-error-900);\n border-color: var(--syn-color-error-900);\n }\n `;\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW;AAEpB,IAAO,+BAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,34 +1,42 @@
1
+ import {
2
+ input_custom_styles_default
3
+ } from "./chunk.2OLVTQ5P.js";
1
4
  import {
2
5
  input_styles_default
3
- } from "./chunk.EKOK7YPB.js";
6
+ } from "./chunk.4QS5IWYB.js";
4
7
  import {
5
- SynDivider
6
- } from "./chunk.HKCTVD3U.js";
8
+ defaultValue
9
+ } from "./chunk.WFAJR3FN.js";
7
10
  import {
8
- HasSlotController
9
- } from "./chunk.XGXFE6IF.js";
11
+ form_control_custom_styles_default,
12
+ form_control_styles_default
13
+ } from "./chunk.TTL762VF.js";
14
+ import {
15
+ SynDivider
16
+ } from "./chunk.XEI5ZP7Y.js";
10
17
  import {
11
18
  LocalizeController
12
19
  } from "./chunk.LAB4YJYE.js";
13
- import {
14
- defaultValue
15
- } from "./chunk.WFAJR3FN.js";
16
20
  import {
17
21
  FormControlController
18
- } from "./chunk.AMTCNRDE.js";
22
+ } from "./chunk.SZCGMXW5.js";
23
+ import {
24
+ HasSlotController
25
+ } from "./chunk.XGXFE6IF.js";
19
26
  import {
20
27
  SynIcon
21
- } from "./chunk.4MYR27GF.js";
28
+ } from "./chunk.PWMSNMDF.js";
22
29
  import {
23
30
  watch
24
- } from "./chunk.VZ7S7YYN.js";
31
+ } from "./chunk.AVTU2BGE.js";
25
32
  import {
26
- SynergyElement
27
- } from "./chunk.GHMKOVA3.js";
33
+ SynergyElement,
34
+ component_styles_default
35
+ } from "./chunk.3DE5ARIC.js";
28
36
  import {
29
37
  __decorateClass,
30
38
  __spreadValues
31
- } from "./chunk.DJOAQ4JU.js";
39
+ } from "./chunk.QNDC5KWA.js";
32
40
 
33
41
  // src/components/input/input.component.ts
34
42
  import { classMap } from "lit/directives/class-map.js";
@@ -293,8 +301,10 @@ var SynInput = class extends SynergyElement {
293
301
  this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
294
302
  }
295
303
  /** Replaces a range of text with a new string. */
296
- setRangeText(replacement, start, end, selectMode) {
297
- this.input.setRangeText(replacement, start, end, selectMode);
304
+ setRangeText(replacement, start, end, selectMode = "preserve") {
305
+ const selectionStart = start != null ? start : this.input.selectionStart;
306
+ const selectionEnd = end != null ? end : this.input.selectionEnd;
307
+ this.input.setRangeText(replacement, selectionStart, selectionEnd, selectMode);
298
308
  if (this.value !== this.input.value) {
299
309
  this.value = this.input.value;
300
310
  }
@@ -512,7 +522,7 @@ var SynInput = class extends SynergyElement {
512
522
  `;
513
523
  }
514
524
  };
515
- SynInput.styles = input_styles_default;
525
+ SynInput.styles = [component_styles_default, form_control_styles_default, input_styles_default, form_control_custom_styles_default, input_custom_styles_default];
516
526
  SynInput.dependencies = {
517
527
  "syn-icon": SynIcon,
518
528
  "syn-divider": SynDivider
@@ -633,4 +643,4 @@ __decorateClass([
633
643
  export {
634
644
  SynInput
635
645
  };
636
- //# sourceMappingURL=chunk.IRT2DA6R.js.map
646
+ //# sourceMappingURL=chunk.WC5SV4TV.js.map