@synergy-design-system/components 1.14.0 → 1.16.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 (269) hide show
  1. package/dist/chunks/{chunk.525LGYB4.js → chunk.2URWP5LD.js} +10 -4
  2. package/dist/chunks/chunk.2URWP5LD.js.map +7 -0
  3. package/dist/chunks/{chunk.DXL3JN6D.js → chunk.3EONOQ2P.js} +2 -2
  4. package/dist/chunks/{chunk.COFVSXEF.js → chunk.3M6IVPMZ.js} +6 -6
  5. package/dist/chunks/{chunk.YRMXDJFM.js → chunk.4MBMY5UE.js} +2 -2
  6. package/dist/chunks/{chunk.GDHER3FZ.js → chunk.4RMP4EST.js} +2 -2
  7. package/dist/chunks/{chunk.UEQDHG7J.js → chunk.5I7DR4UT.js} +2 -2
  8. package/dist/chunks/{chunk.MEDX62IL.js → chunk.5OV7FNMN.js} +3 -3
  9. package/dist/chunks/{chunk.7UVCYUNR.js → chunk.66MOXMDP.js} +2 -2
  10. package/dist/chunks/{chunk.QQB6JCQY.js → chunk.6V72DOSV.js} +16 -17
  11. package/dist/chunks/chunk.6V72DOSV.js.map +7 -0
  12. package/dist/chunks/chunk.74N5WLM5.js +53 -0
  13. package/dist/chunks/chunk.74N5WLM5.js.map +7 -0
  14. package/dist/chunks/{chunk.A6S4OYWD.js → chunk.7NH6SYGG.js} +21 -17
  15. package/dist/chunks/chunk.7NH6SYGG.js.map +7 -0
  16. package/dist/chunks/{chunk.VSEAHAW7.js → chunk.7PYQKCMR.js} +3 -3
  17. package/dist/chunks/{chunk.B57ZVQ2Q.js → chunk.ABSGP4AA.js} +2 -2
  18. package/dist/chunks/{chunk.JDXKGJ63.js → chunk.AOKNP4QD.js} +42 -2
  19. package/dist/chunks/{chunk.JDXKGJ63.js.map → chunk.AOKNP4QD.js.map} +2 -2
  20. package/dist/chunks/{chunk.4QS5IWYB.js → chunk.AW2HNLNP.js} +1 -9
  21. package/dist/chunks/{chunk.4QS5IWYB.js.map → chunk.AW2HNLNP.js.map} +2 -2
  22. package/dist/chunks/{chunk.PAK472WN.js → chunk.BKRTJVKH.js} +2 -2
  23. package/dist/chunks/{chunk.QFMUPETV.js → chunk.BQ3U6CVQ.js} +3 -3
  24. package/dist/chunks/{chunk.H33SDUY3.js → chunk.CCITL3IY.js} +14 -11
  25. package/dist/chunks/chunk.CCITL3IY.js.map +7 -0
  26. package/dist/chunks/{chunk.SRZMRKLQ.js → chunk.CNKXQN5I.js} +4 -4
  27. package/dist/chunks/{chunk.PSTO5STZ.js → chunk.CXLJMDBV.js} +2 -2
  28. package/dist/chunks/{chunk.4MRXASVT.js → chunk.D63XRN3X.js} +2 -2
  29. package/dist/chunks/{chunk.2NRG7KJT.js → chunk.E3MWAHV4.js} +2 -2
  30. package/dist/chunks/{chunk.EZE5M5XB.js → chunk.EHMIJIZ2.js} +2 -2
  31. package/dist/chunks/{chunk.2SLHEFOH.js → chunk.ENAW6YL5.js} +7 -7
  32. package/dist/chunks/chunk.EQ2W2Z5B.js +12 -0
  33. package/dist/chunks/chunk.EQ2W2Z5B.js.map +7 -0
  34. package/dist/chunks/{chunk.KUO3KJOC.js → chunk.GBARDV25.js} +2 -2
  35. package/dist/chunks/{chunk.RK7OBPZ5.js → chunk.GEHO4WRP.js} +2 -2
  36. package/dist/chunks/{chunk.RK7OBPZ5.js.map → chunk.GEHO4WRP.js.map} +1 -1
  37. package/dist/chunks/chunk.GO3CCKC3.js +96 -0
  38. package/dist/chunks/chunk.GO3CCKC3.js.map +7 -0
  39. package/dist/chunks/{chunk.64MHCKTF.js → chunk.H3GKRGN6.js} +7 -7
  40. package/dist/chunks/{chunk.CSOIUDS4.js → chunk.HZTZOBNJ.js} +2 -2
  41. package/dist/chunks/{chunk.4LMFTSOM.js → chunk.I3SSNN7J.js} +10 -4
  42. package/dist/chunks/chunk.I3SSNN7J.js.map +7 -0
  43. package/dist/chunks/{chunk.BUIBP2TA.js → chunk.INLTRHSF.js} +2 -2
  44. package/dist/chunks/{chunk.GGY5VQYA.js → chunk.IVHB4EQ6.js} +3 -3
  45. package/dist/chunks/chunk.IVHB4EQ6.js.map +7 -0
  46. package/dist/chunks/{chunk.2ZEMD2N7.js → chunk.J3HTR5NX.js} +2 -2
  47. package/dist/chunks/{chunk.RRWSXFQ5.js → chunk.JDBDBGQP.js} +3 -2
  48. package/dist/chunks/{chunk.RRWSXFQ5.js.map → chunk.JDBDBGQP.js.map} +2 -2
  49. package/dist/chunks/{chunk.Q4CT57M2.js → chunk.JJZKPNJZ.js} +2 -2
  50. package/dist/chunks/{chunk.SZCGMXW5.js → chunk.JUJZBRXD.js} +2 -2
  51. package/dist/chunks/chunk.JUJZBRXD.js.map +7 -0
  52. package/dist/chunks/{chunk.722JR5BD.js → chunk.K2H37OYP.js} +6 -6
  53. package/dist/chunks/{chunk.722JR5BD.js.map → chunk.K2H37OYP.js.map} +2 -2
  54. package/dist/chunks/chunk.K6AHAO25.js +166 -0
  55. package/dist/chunks/chunk.K6AHAO25.js.map +7 -0
  56. package/dist/chunks/{chunk.2OLQHFOR.js → chunk.KJ7V3TWI.js} +3 -3
  57. package/dist/chunks/{chunk.UYD2OVFV.js → chunk.KZMWNTUS.js} +2 -2
  58. package/dist/chunks/chunk.KZMWNTUS.js.map +7 -0
  59. package/dist/chunks/chunk.L4UUXVRZ.js +312 -0
  60. package/dist/chunks/chunk.L4UUXVRZ.js.map +7 -0
  61. package/dist/chunks/{chunk.ETREUSYO.js → chunk.LFNAPJXT.js} +4 -4
  62. package/dist/chunks/{chunk.H7XP6JAS.js → chunk.LOUVN7OA.js} +3 -3
  63. package/dist/chunks/{chunk.3STW62TA.js → chunk.NIYKFSPR.js} +2 -1
  64. package/dist/chunks/{chunk.3STW62TA.js.map → chunk.NIYKFSPR.js.map} +2 -2
  65. package/dist/chunks/{chunk.34NAFEQ7.js → chunk.NLWT6VZN.js} +2 -2
  66. package/dist/chunks/{chunk.ZLEQ5DOF.js → chunk.NOB4TQLJ.js} +2 -2
  67. package/dist/chunks/{chunk.7UUZ5ISH.js → chunk.O3AC2EVL.js} +3 -3
  68. package/dist/chunks/chunk.OCH36GVS.js +12 -0
  69. package/dist/chunks/chunk.OCH36GVS.js.map +7 -0
  70. package/dist/chunks/{chunk.OLM7IVHA.js → chunk.OEMIM5RD.js} +6 -6
  71. package/dist/chunks/chunk.ONVWJKVD.js +318 -0
  72. package/dist/chunks/chunk.ONVWJKVD.js.map +7 -0
  73. package/dist/chunks/{chunk.ITUSK365.js → chunk.PCI22DJU.js} +2 -2
  74. package/dist/chunks/{chunk.3HTXK6WY.js → chunk.PGM6WEYY.js} +2 -2
  75. package/dist/chunks/{chunk.SJMMPKWP.js → chunk.Q4CRAGN3.js} +11 -11
  76. package/dist/chunks/{chunk.SJMMPKWP.js.map → chunk.Q4CRAGN3.js.map} +1 -1
  77. package/dist/chunks/{chunk.CG753OYA.js → chunk.Q7WVOJG4.js} +2 -2
  78. package/dist/chunks/{chunk.ZIQXX272.js → chunk.QPK7SLOE.js} +2 -2
  79. package/dist/chunks/{chunk.V53WYKEU.js → chunk.QY3GFWGZ.js} +6 -1
  80. package/dist/chunks/{chunk.V53WYKEU.js.map → chunk.QY3GFWGZ.js.map} +2 -2
  81. package/dist/chunks/{chunk.2QYALZBT.js → chunk.RIJKFEYZ.js} +14 -7
  82. package/dist/chunks/chunk.RIJKFEYZ.js.map +7 -0
  83. package/dist/chunks/{chunk.MQCFDVLW.js → chunk.SAHA7Z3T.js} +2 -2
  84. package/dist/chunks/chunk.SHOXPF5L.js +12 -0
  85. package/dist/chunks/chunk.SHOXPF5L.js.map +7 -0
  86. package/dist/chunks/{chunk.VDYPXC2H.js → chunk.SOAZXMVH.js} +2 -2
  87. package/dist/chunks/{chunk.ADRKUQGR.js → chunk.TAO5QIIQ.js} +2 -1
  88. package/dist/chunks/{chunk.ADRKUQGR.js.map → chunk.TAO5QIIQ.js.map} +2 -2
  89. package/dist/chunks/{chunk.5HAKNNIR.js → chunk.TUFBQA52.js} +2 -2
  90. package/dist/chunks/{chunk.P2D7PUR2.js → chunk.TWZC4LT2.js} +4 -4
  91. package/dist/chunks/chunk.U2H36O5J.js +208 -0
  92. package/dist/chunks/chunk.U2H36O5J.js.map +7 -0
  93. package/dist/chunks/chunk.UHVHULGW.js +286 -0
  94. package/dist/chunks/chunk.UHVHULGW.js.map +7 -0
  95. package/dist/chunks/{chunk.5TOD3QS2.js → chunk.VCFVQ6KS.js} +2 -2
  96. package/dist/chunks/{chunk.5TOD3QS2.js.map → chunk.VCFVQ6KS.js.map} +1 -1
  97. package/dist/chunks/{chunk.N4VSEIRQ.js → chunk.VTKIDI7N.js} +7 -1
  98. package/dist/chunks/{chunk.N4VSEIRQ.js.map → chunk.VTKIDI7N.js.map} +2 -2
  99. package/dist/chunks/{chunk.PEMSU7RY.js → chunk.WM7IMLTR.js} +2 -2
  100. package/dist/chunks/{chunk.2KV3G5JF.js → chunk.WMYFFFHI.js} +2 -2
  101. package/dist/chunks/{chunk.VCXIV7H4.js → chunk.WPAPTZLW.js} +3 -3
  102. package/dist/chunks/{chunk.EWGDHM27.js → chunk.WZWI3VYU.js} +2 -2
  103. package/dist/chunks/{chunk.NXX572OD.js → chunk.XADGSL34.js} +2 -2
  104. package/dist/chunks/chunk.XNP4OTUB.js +16 -0
  105. package/dist/chunks/chunk.XNP4OTUB.js.map +7 -0
  106. package/dist/chunks/{chunk.KEEDSK2V.js → chunk.ZM72G6GO.js} +4 -4
  107. package/dist/components/badge/badge.component.js +4 -4
  108. package/dist/components/badge/badge.js +5 -5
  109. package/dist/components/button/button.component.js +10 -10
  110. package/dist/components/button/button.js +11 -11
  111. package/dist/components/button/button.styles.js +1 -1
  112. package/dist/components/button-group/button-group.component.js +2 -2
  113. package/dist/components/button-group/button-group.js +3 -3
  114. package/dist/components/checkbox/checkbox.component.js +7 -7
  115. package/dist/components/checkbox/checkbox.js +8 -8
  116. package/dist/components/checkbox/checkbox.styles.js +1 -1
  117. package/dist/components/divider/divider.component.js +2 -2
  118. package/dist/components/divider/divider.js +3 -3
  119. package/dist/components/drawer/drawer.component.js +10 -10
  120. package/dist/components/drawer/drawer.custom.styles.js +1 -1
  121. package/dist/components/drawer/drawer.js +11 -11
  122. package/dist/components/dropdown/dropdown.component.d.ts +4 -0
  123. package/dist/components/dropdown/dropdown.component.js +5 -5
  124. package/dist/components/dropdown/dropdown.js +6 -6
  125. package/dist/components/header/header.component.d.ts +42 -1
  126. package/dist/components/header/header.component.js +9 -7
  127. package/dist/components/header/header.js +10 -8
  128. package/dist/components/header/header.styles.js +1 -1
  129. package/dist/components/icon/icon.component.js +4 -4
  130. package/dist/components/icon/icon.js +5 -5
  131. package/dist/components/icon/library.js +2 -2
  132. package/dist/components/icon/library.system.js +1 -1
  133. package/dist/components/icon-button/icon-button.component.js +5 -5
  134. package/dist/components/icon-button/icon-button.js +6 -6
  135. package/dist/components/input/input.component.js +10 -10
  136. package/dist/components/input/input.js +11 -11
  137. package/dist/components/input/input.styles.js +1 -1
  138. package/dist/components/menu/menu.component.js +2 -2
  139. package/dist/components/menu/menu.js +3 -3
  140. package/dist/components/menu-item/menu-item.component.js +10 -10
  141. package/dist/components/menu-item/menu-item.js +11 -11
  142. package/dist/components/menu-item/submenu-controller.js +3 -3
  143. package/dist/components/menu-label/menu-label.component.js +3 -3
  144. package/dist/components/menu-label/menu-label.js +4 -4
  145. package/dist/components/nav-item/nav-item.component.d.ts +145 -0
  146. package/dist/components/nav-item/nav-item.component.js +15 -0
  147. package/dist/components/nav-item/nav-item.component.js.map +7 -0
  148. package/dist/components/nav-item/nav-item.d.ts +8 -0
  149. package/dist/components/nav-item/nav-item.js +16 -0
  150. package/dist/components/nav-item/nav-item.js.map +7 -0
  151. package/dist/components/nav-item/nav-item.styles.d.ts +2 -0
  152. package/dist/components/nav-item/nav-item.styles.js +8 -0
  153. package/dist/components/nav-item/nav-item.styles.js.map +7 -0
  154. package/dist/components/optgroup/optgroup.component.js +3 -3
  155. package/dist/components/optgroup/optgroup.js +4 -4
  156. package/dist/components/option/option.component.js +7 -7
  157. package/dist/components/option/option.js +8 -8
  158. package/dist/components/popup/popup.component.d.ts +1 -0
  159. package/dist/components/popup/popup.component.js +2 -2
  160. package/dist/components/popup/popup.js +3 -3
  161. package/dist/components/prio-nav/prio-nav.component.d.ts +110 -0
  162. package/dist/components/prio-nav/prio-nav.component.js +38 -0
  163. package/dist/components/prio-nav/prio-nav.component.js.map +7 -0
  164. package/dist/components/prio-nav/prio-nav.d.ts +8 -0
  165. package/dist/components/prio-nav/prio-nav.js +39 -0
  166. package/dist/components/prio-nav/prio-nav.js.map +7 -0
  167. package/dist/components/prio-nav/prio-nav.styles.d.ts +2 -0
  168. package/dist/components/prio-nav/prio-nav.styles.js +8 -0
  169. package/dist/components/prio-nav/prio-nav.styles.js.map +7 -0
  170. package/dist/components/prio-nav/utils.d.ts +20 -0
  171. package/dist/components/prio-nav/utils.js +12 -0
  172. package/dist/components/prio-nav/utils.js.map +7 -0
  173. package/dist/components/radio/radio.component.js +6 -6
  174. package/dist/components/radio/radio.js +7 -7
  175. package/dist/components/radio-button/radio-button.component.js +4 -4
  176. package/dist/components/radio-button/radio-button.js +5 -5
  177. package/dist/components/radio-button/radio-button.styles.js +2 -2
  178. package/dist/components/radio-group/radio-group.component.js +4 -4
  179. package/dist/components/radio-group/radio-group.js +5 -5
  180. package/dist/components/select/select.component.js +12 -12
  181. package/dist/components/select/select.js +13 -13
  182. package/dist/components/side-nav/side-nav.component.d.ts +122 -0
  183. package/dist/components/side-nav/side-nav.component.js +34 -0
  184. package/dist/components/side-nav/side-nav.component.js.map +7 -0
  185. package/dist/components/side-nav/side-nav.d.ts +8 -0
  186. package/dist/components/side-nav/side-nav.js +35 -0
  187. package/dist/components/side-nav/side-nav.js.map +7 -0
  188. package/dist/components/side-nav/side-nav.styles.d.ts +2 -0
  189. package/dist/components/side-nav/side-nav.styles.js +8 -0
  190. package/dist/components/side-nav/side-nav.styles.js.map +7 -0
  191. package/dist/components/spinner/spinner.component.js +4 -4
  192. package/dist/components/switch/switch.component.js +4 -4
  193. package/dist/components/switch/switch.js +5 -5
  194. package/dist/components/switch/switch.styles.js +1 -1
  195. package/dist/components/tag/tag.component.js +8 -8
  196. package/dist/components/tag/tag.js +9 -9
  197. package/dist/components/textarea/textarea.component.js +3 -3
  198. package/dist/components/textarea/textarea.js +4 -4
  199. package/dist/custom-elements.json +2086 -860
  200. package/dist/events/events.d.ts +2 -0
  201. package/dist/events/syn-burger-menu-hide.d.ts +6 -0
  202. package/dist/events/syn-burger-menu-show.d.ts +6 -0
  203. package/dist/synergy.d.ts +3 -0
  204. package/dist/synergy.js +97 -78
  205. package/dist/themes/utility.css +2 -1
  206. package/dist/translations/de.js +7 -2
  207. package/dist/translations/de.js.map +2 -2
  208. package/dist/translations/en.js +1 -1
  209. package/dist/utilities/form.js +2 -2
  210. package/dist/utilities/icon-library.js +2 -2
  211. package/dist/utilities/localize.d.ts +3 -0
  212. package/dist/utilities/localize.js +2 -2
  213. package/dist/vscode.html-custom-data.json +125 -19
  214. package/package.json +5 -4
  215. package/dist/chunks/chunk.2QYALZBT.js.map +0 -7
  216. package/dist/chunks/chunk.4LMFTSOM.js.map +0 -7
  217. package/dist/chunks/chunk.525LGYB4.js.map +0 -7
  218. package/dist/chunks/chunk.A6S4OYWD.js.map +0 -7
  219. package/dist/chunks/chunk.GGY5VQYA.js.map +0 -7
  220. package/dist/chunks/chunk.H33SDUY3.js.map +0 -7
  221. package/dist/chunks/chunk.L6ZUZPOW.js +0 -80
  222. package/dist/chunks/chunk.L6ZUZPOW.js.map +0 -7
  223. package/dist/chunks/chunk.QQB6JCQY.js.map +0 -7
  224. package/dist/chunks/chunk.SZCGMXW5.js.map +0 -7
  225. package/dist/chunks/chunk.UYD2OVFV.js.map +0 -7
  226. /package/dist/chunks/{chunk.DXL3JN6D.js.map → chunk.3EONOQ2P.js.map} +0 -0
  227. /package/dist/chunks/{chunk.COFVSXEF.js.map → chunk.3M6IVPMZ.js.map} +0 -0
  228. /package/dist/chunks/{chunk.YRMXDJFM.js.map → chunk.4MBMY5UE.js.map} +0 -0
  229. /package/dist/chunks/{chunk.GDHER3FZ.js.map → chunk.4RMP4EST.js.map} +0 -0
  230. /package/dist/chunks/{chunk.UEQDHG7J.js.map → chunk.5I7DR4UT.js.map} +0 -0
  231. /package/dist/chunks/{chunk.MEDX62IL.js.map → chunk.5OV7FNMN.js.map} +0 -0
  232. /package/dist/chunks/{chunk.7UVCYUNR.js.map → chunk.66MOXMDP.js.map} +0 -0
  233. /package/dist/chunks/{chunk.VSEAHAW7.js.map → chunk.7PYQKCMR.js.map} +0 -0
  234. /package/dist/chunks/{chunk.B57ZVQ2Q.js.map → chunk.ABSGP4AA.js.map} +0 -0
  235. /package/dist/chunks/{chunk.PAK472WN.js.map → chunk.BKRTJVKH.js.map} +0 -0
  236. /package/dist/chunks/{chunk.QFMUPETV.js.map → chunk.BQ3U6CVQ.js.map} +0 -0
  237. /package/dist/chunks/{chunk.SRZMRKLQ.js.map → chunk.CNKXQN5I.js.map} +0 -0
  238. /package/dist/chunks/{chunk.PSTO5STZ.js.map → chunk.CXLJMDBV.js.map} +0 -0
  239. /package/dist/chunks/{chunk.4MRXASVT.js.map → chunk.D63XRN3X.js.map} +0 -0
  240. /package/dist/chunks/{chunk.2NRG7KJT.js.map → chunk.E3MWAHV4.js.map} +0 -0
  241. /package/dist/chunks/{chunk.EZE5M5XB.js.map → chunk.EHMIJIZ2.js.map} +0 -0
  242. /package/dist/chunks/{chunk.2SLHEFOH.js.map → chunk.ENAW6YL5.js.map} +0 -0
  243. /package/dist/chunks/{chunk.KUO3KJOC.js.map → chunk.GBARDV25.js.map} +0 -0
  244. /package/dist/chunks/{chunk.64MHCKTF.js.map → chunk.H3GKRGN6.js.map} +0 -0
  245. /package/dist/chunks/{chunk.CSOIUDS4.js.map → chunk.HZTZOBNJ.js.map} +0 -0
  246. /package/dist/chunks/{chunk.BUIBP2TA.js.map → chunk.INLTRHSF.js.map} +0 -0
  247. /package/dist/chunks/{chunk.2ZEMD2N7.js.map → chunk.J3HTR5NX.js.map} +0 -0
  248. /package/dist/chunks/{chunk.Q4CT57M2.js.map → chunk.JJZKPNJZ.js.map} +0 -0
  249. /package/dist/chunks/{chunk.2OLQHFOR.js.map → chunk.KJ7V3TWI.js.map} +0 -0
  250. /package/dist/chunks/{chunk.ETREUSYO.js.map → chunk.LFNAPJXT.js.map} +0 -0
  251. /package/dist/chunks/{chunk.H7XP6JAS.js.map → chunk.LOUVN7OA.js.map} +0 -0
  252. /package/dist/chunks/{chunk.34NAFEQ7.js.map → chunk.NLWT6VZN.js.map} +0 -0
  253. /package/dist/chunks/{chunk.ZLEQ5DOF.js.map → chunk.NOB4TQLJ.js.map} +0 -0
  254. /package/dist/chunks/{chunk.7UUZ5ISH.js.map → chunk.O3AC2EVL.js.map} +0 -0
  255. /package/dist/chunks/{chunk.OLM7IVHA.js.map → chunk.OEMIM5RD.js.map} +0 -0
  256. /package/dist/chunks/{chunk.ITUSK365.js.map → chunk.PCI22DJU.js.map} +0 -0
  257. /package/dist/chunks/{chunk.3HTXK6WY.js.map → chunk.PGM6WEYY.js.map} +0 -0
  258. /package/dist/chunks/{chunk.CG753OYA.js.map → chunk.Q7WVOJG4.js.map} +0 -0
  259. /package/dist/chunks/{chunk.ZIQXX272.js.map → chunk.QPK7SLOE.js.map} +0 -0
  260. /package/dist/chunks/{chunk.MQCFDVLW.js.map → chunk.SAHA7Z3T.js.map} +0 -0
  261. /package/dist/chunks/{chunk.VDYPXC2H.js.map → chunk.SOAZXMVH.js.map} +0 -0
  262. /package/dist/chunks/{chunk.5HAKNNIR.js.map → chunk.TUFBQA52.js.map} +0 -0
  263. /package/dist/chunks/{chunk.P2D7PUR2.js.map → chunk.TWZC4LT2.js.map} +0 -0
  264. /package/dist/chunks/{chunk.PEMSU7RY.js.map → chunk.WM7IMLTR.js.map} +0 -0
  265. /package/dist/chunks/{chunk.2KV3G5JF.js.map → chunk.WMYFFFHI.js.map} +0 -0
  266. /package/dist/chunks/{chunk.VCXIV7H4.js.map → chunk.WPAPTZLW.js.map} +0 -0
  267. /package/dist/chunks/{chunk.EWGDHM27.js.map → chunk.WZWI3VYU.js.map} +0 -0
  268. /package/dist/chunks/{chunk.NXX572OD.js.map → chunk.XADGSL34.js.map} +0 -0
  269. /package/dist/chunks/{chunk.KEEDSK2V.js.map → chunk.ZM72G6GO.js.map} +0 -0
@@ -1,80 +0,0 @@
1
- import {
2
- icon_default
3
- } from "./chunk.Q4CT57M2.js";
4
- import {
5
- header_styles_default
6
- } from "./chunk.JDXKGJ63.js";
7
- import {
8
- HasSlotController
9
- } from "./chunk.66WXVGAW.js";
10
- import {
11
- SynergyElement,
12
- component_styles_default
13
- } from "./chunk.5TOD3QS2.js";
14
- import {
15
- __decorateClass
16
- } from "./chunk.QNDC5KWA.js";
17
-
18
- // src/components/header/header.component.ts
19
- import { classMap } from "lit/directives/class-map.js";
20
- import { html } from "lit/static-html.js";
21
- import { property } from "lit/decorators.js";
22
- var SynHeader = class extends SynergyElement {
23
- constructor() {
24
- super(...arguments);
25
- this.hasSlotController = new HasSlotController(this, "[default]", "logo", "label", "meta-navigation", "navigation");
26
- this.label = "";
27
- }
28
- render() {
29
- const hasNavigation = this.hasSlotController.test("navigation");
30
- return html`
31
- <header
32
- class=${classMap({
33
- header: true,
34
- "header--has-navigation": hasNavigation
35
- })}
36
- part="base"
37
- >
38
- <!-- .header__content -->
39
- <div part="content" class="header__content">
40
-
41
- <div part="logo" class="header__logo">
42
- <slot name="logo">
43
- <syn-icon name="logo-color" library="system" label="SICK Sensor Intelligence"></syn-icon>
44
- </slot>
45
- </div>
46
-
47
- <div part="label" class="header__label">
48
- <slot>
49
- ${this.label}
50
- </slot>
51
- </div>
52
-
53
- <div part="meta-navigation" class="header__meta-navigation">
54
- <slot name="meta-navigation"></slot>
55
- </div>
56
- </div>
57
- <!-- /.header__content -->
58
-
59
- <div part="navigation" class="header__navigation">
60
- <slot name="navigation"></slot>
61
- </div>
62
- </header>
63
- `;
64
- }
65
- };
66
- SynHeader.styles = [
67
- component_styles_default,
68
- header_styles_default
69
- ];
70
- SynHeader.dependencies = {
71
- "syn-icon": icon_default
72
- };
73
- __decorateClass([
74
- property()
75
- ], SynHeader.prototype, "label", 2);
76
-
77
- export {
78
- SynHeader
79
- };
80
- //# sourceMappingURL=chunk.L6ZUZPOW.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/header/header.component.ts"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/unbound-method */\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html } from 'lit/static-html.js';\nimport { property } from 'lit/decorators.js';\nimport type { CSSResultGroup } from 'lit';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport styles from './header.styles.js';\nimport SynIcon from '../icon/icon.js';\n\n/**\n * @summary The <syn-header /> element provides a generic application header\n * that can be used to add applications name, toolbar and primary navigation.\n *\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-header--docs\n * @status stable\n * @since 1.10.0\n *\n * @slot - The label for the header.\n * @slot logo - The logo that should be displayed. Will fall back to the SICK logo if not provided.\n * @slot meta-navigation - The meta-navigation is used to add various application toolbar icons.\n * Best used with `<syn-icon-button />` and `<syn-drop-down />`\n * @slot navigation - This slot can be used to add an optional horizontal navigation\n *\n * @csspart base - The component's base wrapper.\n * @csspart content - The wrapper most content items reside\n * @csspart logo - The wrapper the application logo resides in\n * @csspart label - The element wrapping the application name\n * @csspart meta-navigation - The Item wrapping the optional application menu\n * @csspart navigation - The wrapper that is holding the optional top navigation section\n */\nexport default class SynHeader extends SynergyElement {\n static styles: CSSResultGroup = [\n componentStyles,\n styles,\n ];\n\n static dependencies = {\n 'syn-icon': SynIcon,\n };\n\n private readonly hasSlotController = new HasSlotController(this, '[default]', 'logo', 'label', 'meta-navigation', 'navigation');\n\n /**\n * The headers label. If you need to display HTML, use the `label` slot instead.\n */\n @property() label = '';\n\n render() {\n const hasNavigation = this.hasSlotController.test('navigation');\n\n return html`\n <header\n class=${classMap({\n header: true,\n 'header--has-navigation': hasNavigation,\n })}\n part=\"base\"\n >\n <!-- .header__content -->\n <div part=\"content\" class=\"header__content\">\n\n <div part=\"logo\" class=\"header__logo\">\n <slot name=\"logo\">\n <syn-icon name=\"logo-color\" library=\"system\" label=\"SICK Sensor Intelligence\"></syn-icon>\n </slot>\n </div>\n\n <div part=\"label\" class=\"header__label\">\n <slot>\n ${this.label}\n </slot>\n </div>\n\n <div part=\"meta-navigation\" class=\"header__meta-navigation\">\n <slot name=\"meta-navigation\"></slot>\n </div>\n </div>\n <!-- /.header__content -->\n\n <div part=\"navigation\" class=\"header__navigation\">\n <slot name=\"navigation\"></slot>\n </div>\n </header>\n `;\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AACA,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,gBAAgB;AA6BzB,IAAqB,YAArB,cAAuC,eAAe;AAAA,EAAtD;AAAA;AAUE,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,aAAa,QAAQ,SAAS,mBAAmB,YAAY;AAKlH,iBAAQ;AAAA;AAAA,EAEpB,SAAS;AACP,UAAM,gBAAgB,KAAK,kBAAkB,KAAK,YAAY;AAE9D,WAAO;AAAA;AAAA,gBAEK,SAAS;AAAA,MACf,QAAQ;AAAA,MACR,0BAA0B;AAAA,IAC5B,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAcM,KAAK,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAexB;AACF;AAvDqB,UACZ,SAAyB;AAAA,EAC9B;AAAA,EACA;AACF;AAJmB,UAMZ,eAAe;AAAA,EACpB,YAAY;AACd;AAOY;AAAA,EAAX,SAAS;AAAA,GAfS,UAeP;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/input/input.component.ts", "../../src/internal/longpress.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 { defaultValue } from '../../internal/default-value.js';\nimport { FormControlController } from '../../internal/form.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport formControlStyles from '../../styles/form-control.styles.js';\nimport formControlCustomStyles from '../../styles/form-control.custom.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIcon from '../icon/icon.component.js';\nimport SynDivider from '../divider/divider.component.js';\nimport { longPress } from '../../internal/longpress.js';\nimport styles from './input.styles.js';\nimport customStyles from './input.custom.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport type { SynergyFormControl } from '../../internal/synergy-element.js';\n\n/**\n * @summary Inputs collect data from the user.\n * @documentation https://synergy.style/components/input\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n * @dependency syn-divider\n *\n * @slot label - The input's label. Alternatively, you can use the `label` attribute.\n * @slot prefix - Used to prepend a presentational icon or similar element to the input.\n * @slot suffix - Used to append a presentational icon or similar element to the input.\n * @slot clear-icon - An icon to use in lieu of the default clear icon.\n * @slot show-password-icon - An icon to use in lieu of the default show password icon.\n * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.\n * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n * @slot increment-number-stepper - An icon to use in lieu of the default increment number stepper icon.\n * @slot decrement-number-stepper - An icon to use in lieu of the default decrement number stepper icon.\n *\n * @event syn-blur - Emitted when the control loses focus.\n * @event syn-change - Emitted when an alteration to the control's value is committed by the user.\n * @event syn-clear - Emitted when the clear button is activated.\n * @event syn-focus - Emitted when the control gains focus.\n * @event syn-input - Emitted when the control receives input.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart base - The component's base wrapper.\n * @csspart input - The internal `<input>` control.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart clear-button - The clear button.\n * @csspart password-toggle-button - The password toggle button.\n * @csspart suffix - The container that wraps the suffix.\n * @csspart stepper - The container that wraps the number stepper.\n * @csspart decrement-number-stepper - The decrement number stepper button.\n * @csspart increment-number-stepper - The increment number stepper button.\n * @csspart divider - The divider between the increment and decrement number stepper buttons.\n */\nexport default class SynInput extends SynergyElement implements SynergyFormControl {\n static styles: CSSResultGroup = [componentStyles, formControlStyles, styles, formControlCustomStyles, customStyles];\n static dependencies = {\n\t\t'syn-icon': SynIcon,\n\t\t'syn-divider': SynDivider\n\t};\n\n private readonly formControlController = new FormControlController(this, {\n assumeInteractionOn: ['syn-blur', 'syn-input']\n });\n private readonly hasSlotController = new HasSlotController(this, 'help-text', 'label', 'prefix', 'suffix');\n private readonly localize = new LocalizeController(this);\n\n @query('.input__control') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n @property() title = ''; // make reactive to pass through\n\n private __numberInput = Object.assign(document.createElement('input'), { type: 'number' });\n private __dateInput = Object.assign(document.createElement('input'), { type: 'date' });\n\n /**\n * The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\n * to `text`.\n */\n @property({ reflect: true }) type:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url' = 'text';\n\n /** The name of the input, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the input, submitted as a name/value pair with form data. */\n @property() value = '';\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n /** The input's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** The input's help text. If you need to display HTML, use the `help-text` slot instead. */\n @property({ attribute: 'help-text' }) helpText = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Adds a button to toggle the password's visibility. Only applies to password types. */\n @property({ attribute: 'password-toggle', type: Boolean }) passwordToggle = false;\n\n /** Determines whether or not the password is currently visible. Only applies to password input types. */\n @property({ attribute: 'password-visible', type: Boolean }) passwordVisible = false;\n\n /** Hides the increment/decrement spin buttons for number inputs. */\n @property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons = false;\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Makes the input a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** A regular expression pattern to validate input against. */\n @property() pattern: string;\n\n /** The minimum length of input that will be considered valid. */\n @property({ type: Number }) minlength: number;\n\n /** The maximum length of input that will be considered valid. */\n @property({ type: Number }) maxlength: number;\n\n /** The input's minimum value. Only applies to date and number input types. */\n @property() min: number | string;\n\n /** The input's maximum value. Only applies to date and number input types. */\n @property() max: number | string;\n\n /**\n * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\n * implied, allowing any numeric value. Only applies to date and number input types.\n */\n @property() step: number | 'any';\n\n /** Controls whether and how text input is automatically capitalized as it is entered by the user. */\n @property() autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';\n\n /** Indicates whether the browser's autocorrect feature is on or off. */\n @property() autocorrect: 'off' | 'on';\n\n /**\n * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.\n */\n @property() autocomplete: string;\n\n /** Indicates that the input should receive focus on page load. */\n @property({ type: Boolean }) autofocus: boolean;\n\n /** Used to customize the label or icon of the Enter key on virtual keyboards. */\n @property() enterkeyhint: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /** Enables spell checking on the input. */\n @property({\n type: Boolean,\n converter: {\n // Allow \"true|false\" attribute values but keep the property boolean\n fromAttribute: value => (!value || value === 'false' ? false : true),\n toAttribute: value => (value ? 'true' : 'false')\n }\n })\n spellcheck = true;\n\n /**\n * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\n * keyboard on supportive devices.\n */\n @property() inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n //\n // NOTE: We use an in-memory input for these getters/setters instead of the one in the template because the properties\n // can be set before the component is rendered.\n //\n\n /**\n * Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. This will use the native `<input type=\"{{type}}\">` implementation and may result in an error.\n */\n get valueAsDate() {\n this.__dateInput.type = this.type;\n this.__dateInput.value = this.value;\n return this.input?.valueAsDate || this.__dateInput.valueAsDate;\n }\n\n set valueAsDate(newValue: Date | null) {\n this.__dateInput.type = this.type;\n this.__dateInput.valueAsDate = newValue;\n this.value = this.__dateInput.value;\n }\n\n /** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */\n get valueAsNumber() {\n this.__numberInput.value = this.value;\n return this.input?.valueAsNumber || this.__numberInput.valueAsNumber;\n }\n\n set valueAsNumber(newValue: number) {\n this.__numberInput.valueAsNumber = newValue;\n this.value = this.__numberInput.value;\n }\n\n /** Gets the validity state object */\n get validity() {\n return this.input.validity;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n return this.input.validationMessage;\n }\n\n firstUpdated() {\n this.formControlController.updateValidity();\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('syn-blur');\n }\n\n private handleStep(){\n this.handleInput();\n this.input.focus();\n }\n\n private handleStepUp() {\n this.stepUp();\n this.handleStep();\n }\n\n private handleStepDown() {\n this.stepDown();\n this.handleStep();\n }\n \n private isDecrementDisabled() {\n if(this.disabled || this.readonly) {\n return true;\n }\n\n if (this.min === undefined || this.min === null || this.disabled) {\n return false;\n }\n\n const min = typeof this.min === 'string' ? parseFloat(this.min) : this.min\n return this.valueAsNumber <= min;\n }\n\n private isIncrementDisabled() {\n if(this.disabled || this.readonly) {\n return true;\n }\n\n if (this.max === undefined || this.max === null) {\n return false;\n }\n\n const max = typeof this.max === 'string' ? parseFloat(this.max) : this.max\n return this.valueAsNumber >= max;\n }\n\n private handleChange() {\n this.value = this.input.value;\n this.emit('syn-change');\n }\n\n private handleClearClick(event: MouseEvent) {\n this.value = '';\n this.emit('syn-clear');\n this.emit('syn-input');\n this.emit('syn-change');\n this.input.focus();\n\n event.stopPropagation();\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('syn-focus');\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.formControlController.updateValidity();\n this.emit('syn-input');\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\n // Pressing enter when focused on an input should submit the form like a native input, but we wait a tick before\n // submitting to allow users to cancel the keydown event if they need to\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n //\n // When using an Input Method Editor (IME), pressing enter will cause the form to submit unexpectedly. One way\n // to check for this is to look at event.isComposing, which will be true when the IME is open.\n //\n // See https://github.com/synergy-design-system/synergy/pull/988\n //\n if (!event.defaultPrevented && !event.isComposing) {\n this.formControlController.submit();\n }\n });\n }\n }\n\n private handlePasswordToggle() {\n this.passwordVisible = !this.passwordVisible;\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n\n @watch('step', { waitUntilFirstUpdate: true })\n handleStepChange() {\n // If step changes, the value may become invalid so we need to recheck after the update. We set the new step\n // imperatively so we don't have to wait for the next render to report the updated validity.\n this.input.step = String(this.step);\n this.formControlController.updateValidity();\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n this.formControlController.updateValidity();\n }\n\n /** Sets focus on the input. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the input. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the input. */\n select() {\n this.input.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n const selectionStart = start ?? this.input.selectionStart!;\n const selectionEnd = end ?? this.input.selectionEnd!;\n\n this.input.setRangeText(replacement, selectionStart, selectionEnd, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Displays the browser picker for an input element (only works if the browser supports it for the input type). */\n showPicker() {\n if ('showPicker' in HTMLInputElement.prototype) {\n this.input.showPicker();\n }\n }\n\n /** Increments the value of a numeric input type by the value of the step attribute. */\n stepUp() {\n this.input.stepUp();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Decrements the value of a numeric input type by the value of the step attribute. */\n stepDown() {\n this.input.stepDown();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n return this.input.checkValidity();\n }\n\n /** Gets the associated form, if one exists. */\n getForm(): HTMLFormElement | null {\n return this.formControlController.getForm();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n return this.input.reportValidity();\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasPrefixSlot = this.hasSlotController.test('prefix');\n const hasSuffixSlot = this.hasSlotController.test('suffix');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;\n const hasClearIcon = this.clearable && !this.disabled && !this.readonly;\n const isClearIconVisible = hasClearIcon && (typeof this.value === 'number' || this.value.length > 0);\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--small': this.size === 'small',\n 'form-control--medium': this.size === 'medium',\n 'form-control--large': this.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'form-control--has-prefix': hasPrefixSlot,\n 'form-control--has-suffix': hasSuffixSlot\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n <div\n part=\"base\"\n class=${classMap({\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--standard': !this.readonly,\n 'input--readonly': this.readonly,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': !this.value,\n 'input--no-spin-buttons': this.noSpinButtons\n })}\n >\n <span part=\"prefix\" class=\"input__prefix\">\n <slot name=\"prefix\"></slot>\n </span>\n\n <input\n part=\"input\"\n id=\"input\"\n class=\"input__control\"\n type=${this.type === 'password' && this.passwordVisible ? 'text' : this.type}\n title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}\n name=${ifDefined(this.name)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n .value=${live(this.value)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocomplete=${ifDefined(this.autocomplete)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${this.spellcheck}\n pattern=${ifDefined(this.pattern)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n\n ${hasClearIcon\n ? html`\n <button\n part=\"clear-button\"\n class=${classMap({\n input__clear: true,\n 'input__clear--visible': isClearIconVisible\n })}\n type=\"button\"\n aria-label=${this.localize.term('clearEntry')}\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <syn-icon name=\"x-circle-fill\" library=\"system\"></syn-icon>\n </slot>\n </button>\n `\n : ''}\n ${this.passwordToggle && !this.disabled\n ? html`\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n aria-label=${this.localize.term(this.passwordVisible ? 'hidePassword' : 'showPassword')}\n @click=${this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n ${this.passwordVisible\n ? html`\n <slot name=\"show-password-icon\">\n <syn-icon name=\"eye-slash\" library=\"system\"></syn-icon>\n </slot>\n `\n : html`\n <slot name=\"hide-password-icon\">\n <syn-icon name=\"eye\" library=\"system\"></syn-icon>\n </slot>\n `}\n </button>\n `\n : ''}\n\n <span part=\"suffix\" class=\"input__suffix\">\n <slot name=\"suffix\"></slot>\n </span>\n\n ${this.type === 'number' && !this.noSpinButtons\n ? html`\n <div part=\"stepper\" class=\"input__number-stepper\">\n <button\n part=\"decrement-number-stepper\"\n class=\"input__number-stepper-button\"\n type=\"button\"\n ?disabled=${this.isDecrementDisabled()}\n aria-hidden=\"true\"\n ${longPress({ start: () => this.handleStepDown(), end: () => this.handleChange()})}\n tabindex=\"-1\"\n >\n <slot name=\"decrement-number-stepper\">\n <syn-icon name=\"indeterminate\" library=\"system\"></syn-icon>\n </slot>\n </button>\n <syn-divider class=\"input__number-divider\" part=\"divider\" vertical></syn-divider>\n <button\n part=\"increment-number-stepper\"\n class=\"input__number-stepper-button\"\n type=\"button\"\n ?disabled=${this.isIncrementDisabled()}\n aria-hidden=\"true\"\n ${longPress({ start: () => this.handleStepUp(), end: () => this.handleChange()})}\n tabindex=\"-1\"\n >\n <slot name=\"increment-number-stepper\">\n <syn-icon name=\"add\" library=\"system\"></syn-icon>\n </slot>\n </button>\n </div>\n `\n : ''}\n </div>\n </div>\n\n <div\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n <slot name=\"help-text\">${this.helpText}</slot>\n </div>\n </div>\n `;\n }\n}\n", "import { type ElementPart, noChange, nothing } from 'lit';\nimport {\n AsyncDirective,\n type DirectiveParameters,\n type Part,\n PartType,\n directive,\n} from 'lit/async-directive.js';\n\ntype Callbacks = {\n start: () => void;\n end: () => void;\n};\n\n/**\n * A directive that determines,if a HTMLButtonElement is long pressed or only clicked.\n * Depending on the state it executes the callback once or repeating.\n *\n * Usage:\n *\n * <button\n * ${longPress({ start: () => this.handleStepUp(), end: () => this.handleChange()})}\n * >\n * my button\n * </button>\n */\nclass LongPressDirective extends AsyncDirective {\n host: HTMLButtonElement;\n\n observer: MutationObserver;\n\n callbacks: Callbacks;\n\n interval: NodeJS.Timeout;\n\n timeout: NodeJS.Timeout;\n\n constructor(part: Part) {\n super(part);\n if (part.type !== PartType.ELEMENT || !(part.element instanceof HTMLButtonElement)) {\n throw new Error('The `longPress` directive must be used on an HTMLButtonElement.');\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this\n render(_callback: Callbacks): typeof nothing {\n return nothing;\n }\n\n update(part: ElementPart, [callbacks]: DirectiveParameters<this>): typeof noChange {\n // initial call\n if (this.callbacks === undefined && this.host === undefined) {\n this.host = part.element as HTMLButtonElement;\n this.callbacks = { ...callbacks };\n this.host.addEventListener('pointerdown', this.handlePointerDown);\n }\n\n return noChange;\n }\n\n protected disconnected(): void {\n this.stopSpinningAndCleanUp();\n this.host.removeEventListener('pointerdown', this.handlePointerDown);\n document.removeEventListener('pointerup', this.handlePointerUp);\n }\n\n private handlePointerDown = (event: PointerEvent) => {\n // do nothing if the click was not done from the left mouse button or if the button is disabled\n if (event.button !== 0 || this.host.disabled) {\n return;\n }\n this.spinOnLongPressCallback(event);\n };\n\n /**\n * Start spinning on long press clicks otherwise handle as single click event\n */\n private spinOnLongPressCallback(event: PointerEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n // Start spinning only on long press\n this.timeout = setTimeout(() => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.timeout = undefined;\n this.interval = setInterval(() => {\n this.callbacks.start();\n }, 50);\n }, 500);\n\n document.addEventListener('pointerup', this.handlePointerUp);\n\n // when buttons becoming disabled during long-press\n this.observer?.disconnect();\n this.observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.attributeName === 'disabled') {\n this.stopSpinningAndCleanUp();\n }\n });\n });\n this.observer.observe(this.host, { attributes: true });\n }\n\n private handlePointerUp = (pointerUp?: PointerEvent) => {\n pointerUp?.preventDefault();\n pointerUp?.stopPropagation();\n\n // we did not start to spin\n if (this.timeout) {\n this.callbacks.start();\n }\n\n this.stopSpinningAndCleanUp();\n\n this.callbacks.end();\n document.removeEventListener('pointerup', this.handlePointerUp);\n };\n\n /**\n * Stop the spinning and clean up all timer and observer\n */\n private stopSpinningAndCleanUp() {\n // stop spinning\n clearInterval(this.interval);\n\n clearTimeout(this.timeout);\n this.observer?.disconnect();\n }\n}\n\nexport const longPress = directive(LongPressDirective);\n\nexport type { LongPressDirective };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,SAAS,gBAAgB;AAIzB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAErB,SAAS,UAAU,OAAO,aAAa;;;ACdvC,SAA2B,UAAU,eAAe;AACpD;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AAmBP,IAAM,qBAAN,cAAiC,eAAe;AAAA,EAW9C,YAAY,MAAY;AACtB,UAAM,IAAI;AA4BZ,SAAQ,oBAAoB,CAAC,UAAwB;AAEnD,UAAI,MAAM,WAAW,KAAK,KAAK,KAAK,UAAU;AAC5C;AAAA,MACF;AACA,WAAK,wBAAwB,KAAK;AAAA,IACpC;AAiCA,SAAQ,kBAAkB,CAAC,cAA6B;AACtD,6CAAW;AACX,6CAAW;AAGX,UAAI,KAAK,SAAS;AAChB,aAAK,UAAU,MAAM;AAAA,MACvB;AAEA,WAAK,uBAAuB;AAE5B,WAAK,UAAU,IAAI;AACnB,eAAS,oBAAoB,aAAa,KAAK,eAAe;AAAA,IAChE;AA/EE,QAAI,KAAK,SAAS,SAAS,WAAW,EAAE,KAAK,mBAAmB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,SAAS;AAAA,GA/GS,SA+GP;AAMA;AAAA,EAAX,SAAS;AAAA,GArHS,SAqHP;AAGiB;AAAA,EAA5B,SAAS,EAAE,MAAM,QAAQ,CAAC;AAAA,GAxHR,SAwHU;AAGjB;AAAA,EAAX,SAAS;AAAA,GA3HS,SA2HP;AAWZ;AAAA,EARC,SAAS;AAAA,IACR,MAAM;AAAA,IACN,WAAW;AAAA;AAAA,MAET,eAAe,WAAU,CAAC,SAAS,UAAU,UAAU,QAAQ;AAAA,MAC/D,aAAa,WAAU,QAAQ,SAAS;AAAA,IAC1C;AAAA,EACF,CAAC;AAAA,GArIkB,SAsInB;AAMY;AAAA,EAAX,SAAS;AAAA,GA5IS,SA4IP;AAqJZ;AAAA,EADC,MAAM,YAAY,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAhS9B,SAiSnB;AAMA;AAAA,EADC,MAAM,QAAQ,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAtS1B,SAuSnB;AAQM;AAAA,EADL,MAAM,SAAS,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA9S3B,SA+Sb;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
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,QAC7E;AAAA,MACF;AAAA,IACF;AAEA,SAAQ,mBAAmB,CAAC,UAAiB;AAnP/C;AAoPI,YAAM,WAAW,KAAK,QAAQ,SAAS,KAAK,IAAI;AAChD,YAAM,iBAAiB,KAAK,QAAQ;AAGpC,UAAI,KAAK,QAAQ,CAAC,KAAK,KAAK,YAAY;AACtC,8BAAgB,IAAI,KAAK,IAAI,MAA7B,mBAAgC,QAAQ,aAAW;AACjD,eAAK,kBAA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,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,7 +0,0 @@
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
- }