@synergy-design-system/components 1.19.0 → 1.20.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 (206) hide show
  1. package/dist/chunks/{chunk.2UY7COPU.js → chunk.2HMAZW6A.js} +2 -2
  2. package/dist/chunks/{chunk.LVQ53WA2.js → chunk.32GEMZZV.js} +2 -2
  3. package/dist/chunks/{chunk.LVQ53WA2.js.map → chunk.32GEMZZV.js.map} +1 -1
  4. package/dist/chunks/{chunk.4J7Z64K2.js → chunk.35WADEQD.js} +2 -2
  5. package/dist/chunks/{chunk.API7KARX.js → chunk.3NEF2ECB.js} +2 -2
  6. package/dist/chunks/{chunk.GJ6H2WYF.js → chunk.3Z63ZDCN.js} +2 -2
  7. package/dist/chunks/{chunk.AQHCB5J4.js → chunk.47JB5OS5.js} +9 -9
  8. package/dist/chunks/{chunk.KPYNOAQ6.js → chunk.524IJCDT.js} +3 -3
  9. package/dist/chunks/{chunk.P6H4IUOO.js → chunk.54HPCZLM.js} +2 -2
  10. package/dist/chunks/{chunk.RZE2HSE2.js → chunk.5NSIAXSA.js} +2 -2
  11. package/dist/chunks/{chunk.KUWSMYGR.js → chunk.A6AAFCG3.js} +2 -2
  12. package/dist/chunks/{chunk.EMKKKKFU.js → chunk.AOQTVAEY.js} +2 -2
  13. package/dist/chunks/{chunk.BZBSIR5N.js → chunk.AQKOFOYX.js} +2 -2
  14. package/dist/chunks/{chunk.RURN5UFR.js → chunk.AUURIE7A.js} +3 -3
  15. package/dist/chunks/{chunk.MCRJOP4B.js → chunk.AWAHSLMZ.js} +2 -2
  16. package/dist/chunks/{chunk.DZ7S4RJY.js → chunk.CKQLSMDO.js} +2 -2
  17. package/dist/chunks/{chunk.QMBZGUIN.js → chunk.CSXBPQFP.js} +7 -7
  18. package/dist/chunks/{chunk.A47EKSQ4.js → chunk.CWHSZ4BH.js} +3 -3
  19. package/dist/chunks/{chunk.XHI2F52K.js → chunk.DHBMSKDO.js} +5 -5
  20. package/dist/chunks/{chunk.QY3NFYFU.js → chunk.DKUZB46V.js} +7 -7
  21. package/dist/chunks/{chunk.LECQCB4C.js → chunk.EPZGNWBV.js} +2 -2
  22. package/dist/chunks/{chunk.WJQ6ZWWB.js → chunk.EUKFLHGG.js} +2 -2
  23. package/dist/chunks/{chunk.KJORV2US.js → chunk.EZDC4UMG.js} +2 -2
  24. package/dist/chunks/{chunk.5LG6OZVL.js → chunk.F4A2CST4.js} +2 -2
  25. package/dist/chunks/{chunk.ARMOGDBS.js → chunk.FQFZOZEN.js} +2 -2
  26. package/dist/chunks/{chunk.BPHDK3CI.js → chunk.FTBYTDD5.js} +2 -2
  27. package/dist/chunks/{chunk.Z3NQ3OCM.js → chunk.FTG2II25.js} +3 -3
  28. package/dist/chunks/{chunk.TJIIZ7CR.js → chunk.GE3ZKSIL.js} +2 -2
  29. package/dist/chunks/chunk.GM27OBUM.js +12 -0
  30. package/dist/chunks/chunk.GM27OBUM.js.map +7 -0
  31. package/dist/chunks/{chunk.5L2JI5UY.js → chunk.HAOJSHHP.js} +2 -2
  32. package/dist/chunks/{chunk.QAZDNT7V.js → chunk.HL7SBENS.js} +3 -3
  33. package/dist/chunks/{chunk.UHGLUAVY.js → chunk.HXG34EFO.js} +2 -2
  34. package/dist/chunks/{chunk.DEGXHPWD.js → chunk.I4HVPXQK.js} +2 -2
  35. package/dist/chunks/{chunk.UGPXRN6M.js → chunk.IFBYW5FA.js} +2 -2
  36. package/dist/chunks/{chunk.2DDDCRJ3.js → chunk.IGFBLFXD.js} +10 -10
  37. package/dist/chunks/{chunk.6HSRAAQU.js → chunk.JHY3MH4D.js} +2 -2
  38. package/dist/chunks/chunk.JRYXECAY.js +94 -0
  39. package/dist/chunks/chunk.JRYXECAY.js.map +7 -0
  40. package/dist/chunks/{chunk.X4X2RMYJ.js → chunk.L3ANONV5.js} +3 -3
  41. package/dist/chunks/{chunk.VELRTLV7.js → chunk.L55DODNB.js} +2 -2
  42. package/dist/chunks/{chunk.DUNJ5BV6.js → chunk.LDN3IDWU.js} +2 -2
  43. package/dist/chunks/{chunk.4I5SYBN7.js → chunk.LJJHFA3A.js} +2 -2
  44. package/dist/chunks/{chunk.NGEQ7HRH.js → chunk.LT2IOL3W.js} +5 -5
  45. package/dist/chunks/{chunk.W5NCYA3D.js → chunk.NSW46LNB.js} +6 -6
  46. package/dist/chunks/{chunk.G5P3WTL3.js → chunk.O63F2VQH.js} +2 -2
  47. package/dist/chunks/{chunk.CZ6WRNZU.js → chunk.PIGPCN4I.js} +2 -2
  48. package/dist/chunks/chunk.PS4UJFYT.js +60 -0
  49. package/dist/chunks/chunk.PS4UJFYT.js.map +7 -0
  50. package/dist/chunks/{chunk.NH3IR2C2.js → chunk.RA4T4PSL.js} +2 -2
  51. package/dist/chunks/{chunk.L7WWNO6T.js → chunk.RKLLBPDJ.js} +2 -2
  52. package/dist/chunks/{chunk.LPAMBMOA.js → chunk.RRCGUD4A.js} +2 -2
  53. package/dist/chunks/{chunk.SRUKBLUF.js → chunk.RWIYH2J5.js} +2 -2
  54. package/dist/chunks/{chunk.T46C67Z2.js → chunk.SOA43S6O.js} +2 -2
  55. package/dist/chunks/{chunk.5ZXK3DHG.js → chunk.SW3IVEWX.js} +2 -2
  56. package/dist/chunks/{chunk.W7PLVOS3.js → chunk.TGGCQSF3.js} +6 -6
  57. package/dist/chunks/{chunk.NGJRG6XB.js → chunk.TLBRAHTC.js} +2 -2
  58. package/dist/chunks/{chunk.3JD6SIIU.js → chunk.TVUPDAKK.js} +14 -14
  59. package/dist/chunks/{chunk.2JOZWWOE.js → chunk.UEVDP3J5.js} +3 -3
  60. package/dist/chunks/chunk.UINFNZLR.js +217 -0
  61. package/dist/chunks/chunk.UINFNZLR.js.map +7 -0
  62. package/dist/chunks/{chunk.O2XQWYYG.js → chunk.VMECHIZN.js} +2 -2
  63. package/dist/chunks/{chunk.UN5IHLKM.js → chunk.VWZE6BIA.js} +2 -2
  64. package/dist/chunks/{chunk.ET6X3DLL.js → chunk.WQNQONGU.js} +2 -2
  65. package/dist/chunks/{chunk.N5F4YN7J.js → chunk.XOYMSEKT.js} +2 -2
  66. package/dist/chunks/{chunk.TDPC64DK.js → chunk.YLVTDJCD.js} +6 -6
  67. package/dist/chunks/{chunk.V2LC4HXQ.js → chunk.YVG2RYSG.js} +2 -2
  68. package/dist/chunks/{chunk.Q5FGJTK5.js → chunk.YXI6WDAW.js} +6 -6
  69. package/dist/chunks/{chunk.BLEAPCEP.js → chunk.ZGVJ3KBH.js} +5 -5
  70. package/dist/components/alert/alert.component.d.ts +70 -0
  71. package/dist/components/alert/alert.component.js +27 -0
  72. package/dist/components/alert/alert.component.js.map +7 -0
  73. package/dist/components/alert/alert.custom.styles.d.ts +2 -0
  74. package/dist/components/alert/alert.custom.styles.js +8 -0
  75. package/dist/components/alert/alert.custom.styles.js.map +7 -0
  76. package/dist/components/alert/alert.d.ts +8 -0
  77. package/dist/components/alert/alert.js +28 -0
  78. package/dist/components/alert/alert.js.map +7 -0
  79. package/dist/components/alert/alert.styles.d.ts +2 -0
  80. package/dist/components/alert/alert.styles.js +8 -0
  81. package/dist/components/alert/alert.styles.js.map +7 -0
  82. package/dist/components/badge/badge.component.js +2 -2
  83. package/dist/components/badge/badge.js +3 -3
  84. package/dist/components/button/button.component.js +8 -8
  85. package/dist/components/button/button.js +9 -9
  86. package/dist/components/button-group/button-group.component.js +2 -2
  87. package/dist/components/button-group/button-group.js +3 -3
  88. package/dist/components/checkbox/checkbox.component.js +5 -5
  89. package/dist/components/checkbox/checkbox.js +6 -6
  90. package/dist/components/divider/divider.component.js +2 -2
  91. package/dist/components/divider/divider.js +3 -3
  92. package/dist/components/drawer/drawer.component.js +10 -10
  93. package/dist/components/drawer/drawer.js +11 -11
  94. package/dist/components/dropdown/dropdown.component.js +4 -4
  95. package/dist/components/dropdown/dropdown.js +5 -5
  96. package/dist/components/header/header.component.js +7 -7
  97. package/dist/components/header/header.js +8 -8
  98. package/dist/components/icon/icon.component.js +4 -4
  99. package/dist/components/icon/icon.js +5 -5
  100. package/dist/components/icon-button/icon-button.component.js +5 -5
  101. package/dist/components/icon-button/icon-button.js +6 -6
  102. package/dist/components/input/input.component.js +9 -9
  103. package/dist/components/input/input.js +10 -10
  104. package/dist/components/menu/menu.component.js +2 -2
  105. package/dist/components/menu/menu.js +3 -3
  106. package/dist/components/menu-item/menu-item.component.js +8 -8
  107. package/dist/components/menu-item/menu-item.js +9 -9
  108. package/dist/components/menu-label/menu-label.component.js +3 -3
  109. package/dist/components/menu-label/menu-label.js +4 -4
  110. package/dist/components/nav-item/nav-item.component.js +3 -3
  111. package/dist/components/nav-item/nav-item.js +4 -4
  112. package/dist/components/optgroup/optgroup.component.js +3 -3
  113. package/dist/components/optgroup/optgroup.js +4 -4
  114. package/dist/components/option/option.component.js +7 -7
  115. package/dist/components/option/option.js +8 -8
  116. package/dist/components/popup/popup.component.js +2 -2
  117. package/dist/components/popup/popup.js +3 -3
  118. package/dist/components/prio-nav/prio-nav.component.js +13 -13
  119. package/dist/components/prio-nav/prio-nav.js +14 -14
  120. package/dist/components/progress-bar/progress-bar.component.js +2 -2
  121. package/dist/components/progress-bar/progress-bar.js +3 -3
  122. package/dist/components/progress-ring/progress-ring.component.js +2 -2
  123. package/dist/components/progress-ring/progress-ring.js +3 -3
  124. package/dist/components/radio/radio.component.js +5 -5
  125. package/dist/components/radio/radio.js +6 -6
  126. package/dist/components/radio-button/radio-button.component.js +2 -2
  127. package/dist/components/radio-button/radio-button.js +3 -3
  128. package/dist/components/radio-group/radio-group.component.js +4 -4
  129. package/dist/components/radio-group/radio-group.js +5 -5
  130. package/dist/components/select/select.component.js +12 -12
  131. package/dist/components/select/select.js +13 -13
  132. package/dist/components/side-nav/side-nav.component.js +13 -13
  133. package/dist/components/side-nav/side-nav.js +14 -14
  134. package/dist/components/spinner/spinner.component.js +2 -2
  135. package/dist/components/switch/switch.component.js +2 -2
  136. package/dist/components/switch/switch.js +3 -3
  137. package/dist/components/tag/tag.component.js +7 -7
  138. package/dist/components/tag/tag.js +8 -8
  139. package/dist/components/textarea/textarea.component.js +2 -2
  140. package/dist/components/textarea/textarea.js +3 -3
  141. package/dist/custom-elements.json +258 -1
  142. package/dist/internal/test/data-testid-helpers.d.ts +12 -0
  143. package/dist/synergy.d.ts +1 -0
  144. package/dist/synergy.js +118 -111
  145. package/dist/themes/utility.css +1 -1
  146. package/dist/vscode.html-custom-data.json +38 -0
  147. package/package.json +3 -3
  148. /package/dist/chunks/{chunk.2UY7COPU.js.map → chunk.2HMAZW6A.js.map} +0 -0
  149. /package/dist/chunks/{chunk.4J7Z64K2.js.map → chunk.35WADEQD.js.map} +0 -0
  150. /package/dist/chunks/{chunk.API7KARX.js.map → chunk.3NEF2ECB.js.map} +0 -0
  151. /package/dist/chunks/{chunk.GJ6H2WYF.js.map → chunk.3Z63ZDCN.js.map} +0 -0
  152. /package/dist/chunks/{chunk.AQHCB5J4.js.map → chunk.47JB5OS5.js.map} +0 -0
  153. /package/dist/chunks/{chunk.KPYNOAQ6.js.map → chunk.524IJCDT.js.map} +0 -0
  154. /package/dist/chunks/{chunk.P6H4IUOO.js.map → chunk.54HPCZLM.js.map} +0 -0
  155. /package/dist/chunks/{chunk.RZE2HSE2.js.map → chunk.5NSIAXSA.js.map} +0 -0
  156. /package/dist/chunks/{chunk.KUWSMYGR.js.map → chunk.A6AAFCG3.js.map} +0 -0
  157. /package/dist/chunks/{chunk.EMKKKKFU.js.map → chunk.AOQTVAEY.js.map} +0 -0
  158. /package/dist/chunks/{chunk.BZBSIR5N.js.map → chunk.AQKOFOYX.js.map} +0 -0
  159. /package/dist/chunks/{chunk.RURN5UFR.js.map → chunk.AUURIE7A.js.map} +0 -0
  160. /package/dist/chunks/{chunk.MCRJOP4B.js.map → chunk.AWAHSLMZ.js.map} +0 -0
  161. /package/dist/chunks/{chunk.DZ7S4RJY.js.map → chunk.CKQLSMDO.js.map} +0 -0
  162. /package/dist/chunks/{chunk.QMBZGUIN.js.map → chunk.CSXBPQFP.js.map} +0 -0
  163. /package/dist/chunks/{chunk.A47EKSQ4.js.map → chunk.CWHSZ4BH.js.map} +0 -0
  164. /package/dist/chunks/{chunk.XHI2F52K.js.map → chunk.DHBMSKDO.js.map} +0 -0
  165. /package/dist/chunks/{chunk.QY3NFYFU.js.map → chunk.DKUZB46V.js.map} +0 -0
  166. /package/dist/chunks/{chunk.LECQCB4C.js.map → chunk.EPZGNWBV.js.map} +0 -0
  167. /package/dist/chunks/{chunk.WJQ6ZWWB.js.map → chunk.EUKFLHGG.js.map} +0 -0
  168. /package/dist/chunks/{chunk.KJORV2US.js.map → chunk.EZDC4UMG.js.map} +0 -0
  169. /package/dist/chunks/{chunk.5LG6OZVL.js.map → chunk.F4A2CST4.js.map} +0 -0
  170. /package/dist/chunks/{chunk.ARMOGDBS.js.map → chunk.FQFZOZEN.js.map} +0 -0
  171. /package/dist/chunks/{chunk.BPHDK3CI.js.map → chunk.FTBYTDD5.js.map} +0 -0
  172. /package/dist/chunks/{chunk.Z3NQ3OCM.js.map → chunk.FTG2II25.js.map} +0 -0
  173. /package/dist/chunks/{chunk.TJIIZ7CR.js.map → chunk.GE3ZKSIL.js.map} +0 -0
  174. /package/dist/chunks/{chunk.5L2JI5UY.js.map → chunk.HAOJSHHP.js.map} +0 -0
  175. /package/dist/chunks/{chunk.QAZDNT7V.js.map → chunk.HL7SBENS.js.map} +0 -0
  176. /package/dist/chunks/{chunk.UHGLUAVY.js.map → chunk.HXG34EFO.js.map} +0 -0
  177. /package/dist/chunks/{chunk.DEGXHPWD.js.map → chunk.I4HVPXQK.js.map} +0 -0
  178. /package/dist/chunks/{chunk.UGPXRN6M.js.map → chunk.IFBYW5FA.js.map} +0 -0
  179. /package/dist/chunks/{chunk.2DDDCRJ3.js.map → chunk.IGFBLFXD.js.map} +0 -0
  180. /package/dist/chunks/{chunk.6HSRAAQU.js.map → chunk.JHY3MH4D.js.map} +0 -0
  181. /package/dist/chunks/{chunk.X4X2RMYJ.js.map → chunk.L3ANONV5.js.map} +0 -0
  182. /package/dist/chunks/{chunk.VELRTLV7.js.map → chunk.L55DODNB.js.map} +0 -0
  183. /package/dist/chunks/{chunk.DUNJ5BV6.js.map → chunk.LDN3IDWU.js.map} +0 -0
  184. /package/dist/chunks/{chunk.4I5SYBN7.js.map → chunk.LJJHFA3A.js.map} +0 -0
  185. /package/dist/chunks/{chunk.NGEQ7HRH.js.map → chunk.LT2IOL3W.js.map} +0 -0
  186. /package/dist/chunks/{chunk.W5NCYA3D.js.map → chunk.NSW46LNB.js.map} +0 -0
  187. /package/dist/chunks/{chunk.G5P3WTL3.js.map → chunk.O63F2VQH.js.map} +0 -0
  188. /package/dist/chunks/{chunk.CZ6WRNZU.js.map → chunk.PIGPCN4I.js.map} +0 -0
  189. /package/dist/chunks/{chunk.NH3IR2C2.js.map → chunk.RA4T4PSL.js.map} +0 -0
  190. /package/dist/chunks/{chunk.L7WWNO6T.js.map → chunk.RKLLBPDJ.js.map} +0 -0
  191. /package/dist/chunks/{chunk.LPAMBMOA.js.map → chunk.RRCGUD4A.js.map} +0 -0
  192. /package/dist/chunks/{chunk.SRUKBLUF.js.map → chunk.RWIYH2J5.js.map} +0 -0
  193. /package/dist/chunks/{chunk.T46C67Z2.js.map → chunk.SOA43S6O.js.map} +0 -0
  194. /package/dist/chunks/{chunk.5ZXK3DHG.js.map → chunk.SW3IVEWX.js.map} +0 -0
  195. /package/dist/chunks/{chunk.W7PLVOS3.js.map → chunk.TGGCQSF3.js.map} +0 -0
  196. /package/dist/chunks/{chunk.NGJRG6XB.js.map → chunk.TLBRAHTC.js.map} +0 -0
  197. /package/dist/chunks/{chunk.3JD6SIIU.js.map → chunk.TVUPDAKK.js.map} +0 -0
  198. /package/dist/chunks/{chunk.2JOZWWOE.js.map → chunk.UEVDP3J5.js.map} +0 -0
  199. /package/dist/chunks/{chunk.O2XQWYYG.js.map → chunk.VMECHIZN.js.map} +0 -0
  200. /package/dist/chunks/{chunk.UN5IHLKM.js.map → chunk.VWZE6BIA.js.map} +0 -0
  201. /package/dist/chunks/{chunk.ET6X3DLL.js.map → chunk.WQNQONGU.js.map} +0 -0
  202. /package/dist/chunks/{chunk.N5F4YN7J.js.map → chunk.XOYMSEKT.js.map} +0 -0
  203. /package/dist/chunks/{chunk.TDPC64DK.js.map → chunk.YLVTDJCD.js.map} +0 -0
  204. /package/dist/chunks/{chunk.V2LC4HXQ.js.map → chunk.YVG2RYSG.js.map} +0 -0
  205. /package/dist/chunks/{chunk.Q5FGJTK5.js.map → chunk.YXI6WDAW.js.map} +0 -0
  206. /package/dist/chunks/{chunk.BLEAPCEP.js.map → chunk.ZGVJ3KBH.js.map} +0 -0
@@ -0,0 +1,217 @@
1
+ import {
2
+ SynIconButton
3
+ } from "./chunk.HL7SBENS.js";
4
+ import {
5
+ animateTo,
6
+ stopAnimations,
7
+ waitForEvent
8
+ } from "./chunk.7BEVGRQ2.js";
9
+ import {
10
+ getAnimation,
11
+ setDefaultAnimation
12
+ } from "./chunk.QAUTITK3.js";
13
+ import {
14
+ alert_custom_styles_default
15
+ } from "./chunk.JRYXECAY.js";
16
+ import {
17
+ alert_styles_default
18
+ } from "./chunk.PS4UJFYT.js";
19
+ import {
20
+ HasSlotController
21
+ } from "./chunk.66WXVGAW.js";
22
+ import {
23
+ watch
24
+ } from "./chunk.AVTU2BGE.js";
25
+ import {
26
+ LocalizeController
27
+ } from "./chunk.GEHO4WRP.js";
28
+ import {
29
+ SynergyElement,
30
+ component_styles_default
31
+ } from "./chunk.32GEMZZV.js";
32
+ import {
33
+ __decorateClass
34
+ } from "./chunk.QNDC5KWA.js";
35
+
36
+ // src/components/alert/alert.component.ts
37
+ import { classMap } from "lit/directives/class-map.js";
38
+ import { html } from "lit";
39
+ import { property, query } from "lit/decorators.js";
40
+ var toastStack = Object.assign(document.createElement("div"), { className: "syn-toast-stack" });
41
+ var SynAlert = class extends SynergyElement {
42
+ constructor() {
43
+ super(...arguments);
44
+ this.hasSlotController = new HasSlotController(this, "icon", "suffix");
45
+ this.localize = new LocalizeController(this);
46
+ this.open = false;
47
+ this.closable = false;
48
+ this.variant = "primary";
49
+ this.duration = Infinity;
50
+ }
51
+ firstUpdated() {
52
+ this.base.hidden = !this.open;
53
+ }
54
+ restartAutoHide() {
55
+ clearTimeout(this.autoHideTimeout);
56
+ if (this.open && this.duration < Infinity) {
57
+ this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);
58
+ }
59
+ }
60
+ handleCloseClick() {
61
+ this.hide();
62
+ }
63
+ handleMouseMove() {
64
+ this.restartAutoHide();
65
+ }
66
+ async handleOpenChange() {
67
+ if (this.open) {
68
+ this.emit("syn-show");
69
+ if (this.duration < Infinity) {
70
+ this.restartAutoHide();
71
+ }
72
+ await stopAnimations(this.base);
73
+ this.base.hidden = false;
74
+ const { keyframes, options } = getAnimation(this, "alert.show", { dir: this.localize.dir() });
75
+ await animateTo(this.base, keyframes, options);
76
+ this.emit("syn-after-show");
77
+ } else {
78
+ this.emit("syn-hide");
79
+ clearTimeout(this.autoHideTimeout);
80
+ await stopAnimations(this.base);
81
+ const { keyframes, options } = getAnimation(this, "alert.hide", { dir: this.localize.dir() });
82
+ await animateTo(this.base, keyframes, options);
83
+ this.base.hidden = true;
84
+ this.emit("syn-after-hide");
85
+ }
86
+ }
87
+ handleDurationChange() {
88
+ this.restartAutoHide();
89
+ }
90
+ /** Shows the alert. */
91
+ async show() {
92
+ if (this.open) {
93
+ return void 0;
94
+ }
95
+ this.open = true;
96
+ return waitForEvent(this, "syn-after-show");
97
+ }
98
+ /** Hides the alert */
99
+ async hide() {
100
+ if (!this.open) {
101
+ return void 0;
102
+ }
103
+ this.open = false;
104
+ return waitForEvent(this, "syn-after-hide");
105
+ }
106
+ /**
107
+ * Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when
108
+ * dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by
109
+ * calling this method again. The returned promise will resolve after the alert is hidden.
110
+ */
111
+ async toast() {
112
+ return new Promise((resolve) => {
113
+ if (toastStack.parentElement === null) {
114
+ document.body.append(toastStack);
115
+ }
116
+ toastStack.appendChild(this);
117
+ requestAnimationFrame(() => {
118
+ this.clientWidth;
119
+ this.show();
120
+ });
121
+ this.addEventListener(
122
+ "syn-after-hide",
123
+ () => {
124
+ toastStack.removeChild(this);
125
+ resolve();
126
+ if (toastStack.querySelector("syn-alert") === null) {
127
+ toastStack.remove();
128
+ }
129
+ },
130
+ { once: true }
131
+ );
132
+ });
133
+ }
134
+ render() {
135
+ return html`
136
+ <div
137
+ part="base"
138
+ class=${classMap({
139
+ alert: true,
140
+ "alert--open": this.open,
141
+ "alert--closable": this.closable,
142
+ "alert--has-icon": this.hasSlotController.test("icon"),
143
+ "alert--primary": this.variant === "primary",
144
+ "alert--success": this.variant === "success",
145
+ "alert--neutral": this.variant === "neutral",
146
+ "alert--warning": this.variant === "warning",
147
+ "alert--danger": this.variant === "danger"
148
+ })}
149
+ role="alert"
150
+ aria-hidden=${this.open ? "false" : "true"}
151
+ @mousemove=${this.handleMouseMove}
152
+ >
153
+ <div part="icon" class="alert__icon">
154
+ <slot name="icon"></slot>
155
+ </div>
156
+
157
+ <div part="message" class="alert__message" aria-live="polite">
158
+ <slot></slot>
159
+ </div>
160
+
161
+ ${this.closable ? html`
162
+ <syn-icon-button
163
+ part="close-button"
164
+ exportparts="base:close-button__base"
165
+ class="alert__close-button"
166
+ name="x-lg"
167
+ library="system"
168
+ label=${this.localize.term("close")}
169
+ @click=${this.handleCloseClick}
170
+ ></syn-icon-button>
171
+ ` : ""}
172
+ </div>
173
+ `;
174
+ }
175
+ };
176
+ SynAlert.styles = [component_styles_default, alert_styles_default, alert_custom_styles_default];
177
+ SynAlert.dependencies = { "syn-icon-button": SynIconButton };
178
+ __decorateClass([
179
+ query('[part~="base"]')
180
+ ], SynAlert.prototype, "base", 2);
181
+ __decorateClass([
182
+ property({ type: Boolean, reflect: true })
183
+ ], SynAlert.prototype, "open", 2);
184
+ __decorateClass([
185
+ property({ type: Boolean, reflect: true })
186
+ ], SynAlert.prototype, "closable", 2);
187
+ __decorateClass([
188
+ property({ reflect: true })
189
+ ], SynAlert.prototype, "variant", 2);
190
+ __decorateClass([
191
+ property({ type: Number })
192
+ ], SynAlert.prototype, "duration", 2);
193
+ __decorateClass([
194
+ watch("open", { waitUntilFirstUpdate: true })
195
+ ], SynAlert.prototype, "handleOpenChange", 1);
196
+ __decorateClass([
197
+ watch("duration")
198
+ ], SynAlert.prototype, "handleDurationChange", 1);
199
+ setDefaultAnimation("alert.show", {
200
+ keyframes: [
201
+ { opacity: 0, scale: 0.8 },
202
+ { opacity: 1, scale: 1 }
203
+ ],
204
+ options: { duration: 250, easing: "ease" }
205
+ });
206
+ setDefaultAnimation("alert.hide", {
207
+ keyframes: [
208
+ { opacity: 1, scale: 1 },
209
+ { opacity: 0, scale: 0.8 }
210
+ ],
211
+ options: { duration: 250, easing: "ease" }
212
+ });
213
+
214
+ export {
215
+ SynAlert
216
+ };
217
+ //# sourceMappingURL=chunk.UINFNZLR.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/alert/alert.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 { animateTo, stopAnimations } from '../../internal/animate.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { getAnimation, setDefaultAnimation } from '../../utilities/animation-registry.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { property, query } from 'lit/decorators.js';\nimport { waitForEvent } from '../../internal/event.js';\nimport { watch } from '../../internal/watch.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIconButton from '../icon-button/icon-button.component.js';\nimport styles from './alert.styles.js';\nimport customStyles from './alert.custom.styles.js';\nimport type { CSSResultGroup } from 'lit';\n\nconst toastStack = Object.assign(document.createElement('div'), { className: 'syn-toast-stack' });\n\n/**\n * @summary Alerts are used to display important messages inline or as toast notifications.\n * @documentation https://synergy.style/components/alert\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon-button\n *\n * @slot - The alert's main content.\n * @slot icon - An icon to show in the alert. Works best with `<syn-icon>`.\n *\n * @event syn-show - Emitted when the alert opens.\n * @event syn-after-show - Emitted after the alert opens and all animations are complete.\n * @event syn-hide - Emitted when the alert closes.\n * @event syn-after-hide - Emitted after the alert closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart icon - The container that wraps the optional icon.\n * @csspart message - The container that wraps the alert's main content.\n * @csspart close-button - The close button, an `<syn-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n *\n * @animation alert.show - The animation to use when showing the alert.\n * @animation alert.hide - The animation to use when hiding the alert.\n */\nexport default class SynAlert extends SynergyElement {\n static styles: CSSResultGroup = [componentStyles, styles, customStyles];\n static dependencies = { 'syn-icon-button': SynIconButton };\n\n private autoHideTimeout: number;\n private readonly hasSlotController = new HasSlotController(this, 'icon', 'suffix');\n private readonly localize = new LocalizeController(this);\n\n @query('[part~=\"base\"]') base: HTMLElement;\n\n /**\n * Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the alert's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /** Enables a close button that allows the user to dismiss the alert. */\n @property({ type: Boolean, reflect: true }) closable = false;\n\n /** The alert's theme variant. */\n @property({ reflect: true }) variant: 'primary' | 'success' | 'neutral' | 'warning' | 'danger' = 'primary';\n\n /**\n * The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\n * the alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\n * the alert will not close on its own.\n */\n @property({ type: Number }) duration = Infinity;\n\n firstUpdated() {\n this.base.hidden = !this.open;\n }\n\n private restartAutoHide() {\n clearTimeout(this.autoHideTimeout);\n if (this.open && this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);\n }\n }\n\n private handleCloseClick() {\n this.hide();\n }\n\n private handleMouseMove() {\n this.restartAutoHide();\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit('syn-show');\n\n if (this.duration < Infinity) {\n this.restartAutoHide();\n }\n\n await stopAnimations(this.base);\n this.base.hidden = false;\n const { keyframes, options } = getAnimation(this, 'alert.show', { dir: this.localize.dir() });\n await animateTo(this.base, keyframes, options);\n\n this.emit('syn-after-show');\n } else {\n // Hide\n this.emit('syn-hide');\n\n clearTimeout(this.autoHideTimeout);\n\n await stopAnimations(this.base);\n const { keyframes, options } = getAnimation(this, 'alert.hide', { dir: this.localize.dir() });\n await animateTo(this.base, keyframes, options);\n this.base.hidden = true;\n\n this.emit('syn-after-hide');\n }\n }\n\n @watch('duration')\n handleDurationChange() {\n this.restartAutoHide();\n }\n\n /** Shows the alert. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'syn-after-show');\n }\n\n /** Hides the alert */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'syn-after-hide');\n }\n\n /**\n * Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when\n * dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by\n * calling this method again. The returned promise will resolve after the alert is hidden.\n */\n async toast() {\n return new Promise<void>(resolve => {\n if (toastStack.parentElement === null) {\n document.body.append(toastStack);\n }\n\n toastStack.appendChild(this);\n\n // Wait for the toast stack to render\n requestAnimationFrame(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- force a reflow for the initial transition\n this.clientWidth;\n this.show();\n });\n\n this.addEventListener(\n 'syn-after-hide',\n () => {\n toastStack.removeChild(this);\n resolve();\n\n // Remove the toast stack from the DOM when there are no more alerts\n if (toastStack.querySelector('syn-alert') === null) {\n toastStack.remove();\n }\n },\n { once: true }\n );\n });\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n alert: true,\n 'alert--open': this.open,\n 'alert--closable': this.closable,\n 'alert--has-icon': this.hasSlotController.test('icon'),\n 'alert--primary': this.variant === 'primary',\n 'alert--success': this.variant === 'success',\n 'alert--neutral': this.variant === 'neutral',\n 'alert--warning': this.variant === 'warning',\n 'alert--danger': this.variant === 'danger'\n })}\n role=\"alert\"\n aria-hidden=${this.open ? 'false' : 'true'}\n @mousemove=${this.handleMouseMove}\n >\n <div part=\"icon\" class=\"alert__icon\">\n <slot name=\"icon\"></slot>\n </div>\n\n <div part=\"message\" class=\"alert__message\" aria-live=\"polite\">\n <slot></slot>\n </div>\n\n ${this.closable\n ? html`\n <syn-icon-button\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n class=\"alert__close-button\"\n name=\"x-lg\"\n library=\"system\"\n label=${this.localize.term('close')}\n @click=${this.handleCloseClick}\n ></syn-icon-button>\n `\n : ''}\n </div>\n `;\n }\n}\n\nsetDefaultAnimation('alert.show', {\n keyframes: [\n { opacity: 0, scale: 0.8 },\n { opacity: 1, scale: 1 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('alert.hide', {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.8 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,SAAS,gBAAgB;AAGzB,SAAS,YAAY;AAErB,SAAS,UAAU,aAAa;AAUhC,IAAM,aAAa,OAAO,OAAO,SAAS,cAAc,KAAK,GAAG,EAAE,WAAW,kBAAkB,CAAC;AA2BhG,IAAqB,WAArB,cAAsC,eAAe;AAAA,EAArD;AAAA;AAKE,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,QAAQ,QAAQ;AACj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WB.js";
3
+ } from "./chunk.EUKFLHGG.js";
4
4
 
5
5
  // src/components/button-group/button-group.ts
6
6
  var button_group_default = SynButtonGroup;
@@ -9,4 +9,4 @@ SynButtonGroup.define("syn-button-group");
9
9
  export {
10
10
  button_group_default
11
11
  };
12
- //# sourceMappingURL=chunk.O2XQWYYG.js.map
12
+ //# sourceMappingURL=chunk.VMECHIZN.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SynMenuItem
3
- } from "./chunk.NGEQ7HRH.js";
3
+ } from "./chunk.LT2IOL3W.js";
4
4
 
5
5
  // src/components/menu-item/menu-item.ts
6
6
  var menu_item_default = SynMenuItem;
@@ -9,4 +9,4 @@ SynMenuItem.define("syn-menu-item");
9
9
  export {
10
10
  menu_item_default
11
11
  };
12
- //# sourceMappingURL=chunk.UN5IHLKM.js.map
12
+ //# sourceMappingURL=chunk.VWZE6BIA.js.map
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  SynergyElement,
12
12
  component_styles_default
13
- } from "./chunk.LVQ53WA2.js";
13
+ } from "./chunk.32GEMZZV.js";
14
14
  import {
15
15
  __decorateClass
16
16
  } from "./chunk.QNDC5KWA.js";
@@ -74,4 +74,4 @@ __decorateClass([
74
74
  export {
75
75
  SynProgressRing
76
76
  };
77
- //# sourceMappingURL=chunk.ET6X3DLL.js.map
77
+ //# sourceMappingURL=chunk.WQNQONGU.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SynProgressBar
3
- } from "./chunk.LPAMBMOA.js";
3
+ } from "./chunk.RRCGUD4A.js";
4
4
 
5
5
  // src/components/progress-bar/progress-bar.ts
6
6
  var progress_bar_default = SynProgressBar;
@@ -9,4 +9,4 @@ SynProgressBar.define("syn-progress-bar");
9
9
  export {
10
10
  progress_bar_default
11
11
  };
12
- //# sourceMappingURL=chunk.N5F4YN7J.js.map
12
+ //# sourceMappingURL=chunk.XOYMSEKT.js.map
@@ -4,9 +4,6 @@ import {
4
4
  import {
5
5
  input_styles_default
6
6
  } from "./chunk.AW2HNLNP.js";
7
- import {
8
- SynDivider
9
- } from "./chunk.4J7Z64K2.js";
10
7
  import {
11
8
  defaultValue
12
9
  } from "./chunk.WFAJR3FN.js";
@@ -14,6 +11,9 @@ import {
14
11
  form_control_custom_styles_default,
15
12
  form_control_styles_default
16
13
  } from "./chunk.TTL762VF.js";
14
+ import {
15
+ SynDivider
16
+ } from "./chunk.35WADEQD.js";
17
17
  import {
18
18
  FormControlController
19
19
  } from "./chunk.JUJZBRXD.js";
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk.66WXVGAW.js";
23
23
  import {
24
24
  SynIcon
25
- } from "./chunk.QMBZGUIN.js";
25
+ } from "./chunk.CSXBPQFP.js";
26
26
  import {
27
27
  watch
28
28
  } from "./chunk.AVTU2BGE.js";
@@ -32,7 +32,7 @@ import {
32
32
  import {
33
33
  SynergyElement,
34
34
  component_styles_default
35
- } from "./chunk.LVQ53WA2.js";
35
+ } from "./chunk.32GEMZZV.js";
36
36
  import {
37
37
  __decorateClass,
38
38
  __spreadValues
@@ -642,4 +642,4 @@ __decorateClass([
642
642
  export {
643
643
  SynInput
644
644
  };
645
- //# sourceMappingURL=chunk.TDPC64DK.js.map
645
+ //# sourceMappingURL=chunk.YLVTDJCD.js.map
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  SynergyElement,
9
9
  component_styles_default
10
- } from "./chunk.LVQ53WA2.js";
10
+ } from "./chunk.32GEMZZV.js";
11
11
  import {
12
12
  __decorateClass
13
13
  } from "./chunk.QNDC5KWA.js";
@@ -128,4 +128,4 @@ __decorateClass([
128
128
  export {
129
129
  SynMenu
130
130
  };
131
- //# sourceMappingURL=chunk.V2LC4HXQ.js.map
131
+ //# sourceMappingURL=chunk.YVG2RYSG.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  SynPopup
3
- } from "./chunk.BPHDK3CI.js";
3
+ } from "./chunk.FTBYTDD5.js";
4
+ import {
5
+ getTabbableBoundary
6
+ } from "./chunk.2QOQY4ZG.js";
4
7
  import {
5
8
  dropdown_custom_styles_default
6
9
  } from "./chunk.2KYFCKCK.js";
7
10
  import {
8
11
  dropdown_styles_default
9
12
  } from "./chunk.SLCYXMHB.js";
10
- import {
11
- getTabbableBoundary
12
- } from "./chunk.2QOQY4ZG.js";
13
13
  import {
14
14
  animateTo,
15
15
  stopAnimations,
@@ -28,7 +28,7 @@ import {
28
28
  import {
29
29
  SynergyElement,
30
30
  component_styles_default
31
- } from "./chunk.LVQ53WA2.js";
31
+ } from "./chunk.32GEMZZV.js";
32
32
  import {
33
33
  __decorateClass
34
34
  } from "./chunk.QNDC5KWA.js";
@@ -368,4 +368,4 @@ setDefaultAnimation("dropdown.hide", {
368
368
  export {
369
369
  SynDropdown
370
370
  };
371
- //# sourceMappingURL=chunk.Q5FGJTK5.js.map
371
+ //# sourceMappingURL=chunk.YXI6WDAW.js.map
@@ -1,9 +1,9 @@
1
- import {
2
- icon_default
3
- } from "./chunk.2UY7COPU.js";
4
1
  import {
5
2
  header_styles_default
6
3
  } from "./chunk.AOKNP4QD.js";
4
+ import {
5
+ icon_default
6
+ } from "./chunk.2HMAZW6A.js";
7
7
  import {
8
8
  HasSlotController
9
9
  } from "./chunk.66WXVGAW.js";
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  SynergyElement,
18
18
  component_styles_default
19
- } from "./chunk.LVQ53WA2.js";
19
+ } from "./chunk.32GEMZZV.js";
20
20
  import {
21
21
  __decorateClass
22
22
  } from "./chunk.QNDC5KWA.js";
@@ -163,4 +163,4 @@ __decorateClass([
163
163
  export {
164
164
  SynHeader
165
165
  };
166
- //# sourceMappingURL=chunk.BLEAPCEP.js.map
166
+ //# sourceMappingURL=chunk.ZGVJ3KBH.js.map
@@ -0,0 +1,70 @@
1
+ import SynergyElement from '../../internal/synergy-element.js';
2
+ import SynIconButton from '../icon-button/icon-button.component.js';
3
+ import type { CSSResultGroup } from 'lit';
4
+ /**
5
+ * @summary Alerts are used to display important messages inline or as toast notifications.
6
+ * @documentation https://synergy.style/components/alert
7
+ * @status stable
8
+ * @since 2.0
9
+ *
10
+ * @dependency syn-icon-button
11
+ *
12
+ * @slot - The alert's main content.
13
+ * @slot icon - An icon to show in the alert. Works best with `<syn-icon>`.
14
+ *
15
+ * @event syn-show - Emitted when the alert opens.
16
+ * @event syn-after-show - Emitted after the alert opens and all animations are complete.
17
+ * @event syn-hide - Emitted when the alert closes.
18
+ * @event syn-after-hide - Emitted after the alert closes and all animations are complete.
19
+ *
20
+ * @csspart base - The component's base wrapper.
21
+ * @csspart icon - The container that wraps the optional icon.
22
+ * @csspart message - The container that wraps the alert's main content.
23
+ * @csspart close-button - The close button, an `<syn-icon-button>`.
24
+ * @csspart close-button__base - The close button's exported `base` part.
25
+ *
26
+ * @animation alert.show - The animation to use when showing the alert.
27
+ * @animation alert.hide - The animation to use when hiding the alert.
28
+ */
29
+ export default class SynAlert extends SynergyElement {
30
+ static styles: CSSResultGroup;
31
+ static dependencies: {
32
+ 'syn-icon-button': typeof SynIconButton;
33
+ };
34
+ private autoHideTimeout;
35
+ private readonly hasSlotController;
36
+ private readonly localize;
37
+ base: HTMLElement;
38
+ /**
39
+ * Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can
40
+ * use the `show()` and `hide()` methods and this attribute will reflect the alert's open state.
41
+ */
42
+ open: boolean;
43
+ /** Enables a close button that allows the user to dismiss the alert. */
44
+ closable: boolean;
45
+ /** The alert's theme variant. */
46
+ variant: 'primary' | 'success' | 'neutral' | 'warning' | 'danger';
47
+ /**
48
+ * The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with
49
+ * the alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning
50
+ * the alert will not close on its own.
51
+ */
52
+ duration: number;
53
+ firstUpdated(): void;
54
+ private restartAutoHide;
55
+ private handleCloseClick;
56
+ private handleMouseMove;
57
+ handleOpenChange(): Promise<void>;
58
+ handleDurationChange(): void;
59
+ /** Shows the alert. */
60
+ show(): Promise<void>;
61
+ /** Hides the alert */
62
+ hide(): Promise<void>;
63
+ /**
64
+ * Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when
65
+ * dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by
66
+ * calling this method again. The returned promise will resolve after the alert is hidden.
67
+ */
68
+ toast(): Promise<void>;
69
+ render(): import("lit").TemplateResult<1>;
70
+ }
@@ -0,0 +1,27 @@
1
+ import {
2
+ SynAlert
3
+ } from "../../chunks/chunk.UINFNZLR.js";
4
+ import "../../chunks/chunk.HL7SBENS.js";
5
+ import "../../chunks/chunk.ZHH2AHOZ.js";
6
+ import "../../chunks/chunk.LJQ7LEPV.js";
7
+ import "../../chunks/chunk.7BEVGRQ2.js";
8
+ import "../../chunks/chunk.QAUTITK3.js";
9
+ import "../../chunks/chunk.JRYXECAY.js";
10
+ import "../../chunks/chunk.PS4UJFYT.js";
11
+ import "../../chunks/chunk.66WXVGAW.js";
12
+ import "../../chunks/chunk.CSXBPQFP.js";
13
+ import "../../chunks/chunk.66MOXMDP.js";
14
+ import "../../chunks/chunk.6C4JXZZN.js";
15
+ import "../../chunks/chunk.VTKIDI7N.js";
16
+ import "../../chunks/chunk.PJO6TM3T.js";
17
+ import "../../chunks/chunk.2RF7KO5I.js";
18
+ import "../../chunks/chunk.AVTU2BGE.js";
19
+ import "../../chunks/chunk.GEHO4WRP.js";
20
+ import "../../chunks/chunk.QY3GFWGZ.js";
21
+ import "../../chunks/chunk.32GEMZZV.js";
22
+ import "../../chunks/chunk.C7624ITA.js";
23
+ import "../../chunks/chunk.QNDC5KWA.js";
24
+ export {
25
+ SynAlert as default
26
+ };
27
+ //# sourceMappingURL=alert.component.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import {
2
+ alert_custom_styles_default
3
+ } from "../../chunks/chunk.JRYXECAY.js";
4
+ import "../../chunks/chunk.QNDC5KWA.js";
5
+ export {
6
+ alert_custom_styles_default as default
7
+ };
8
+ //# sourceMappingURL=alert.custom.styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ import SynAlert from './alert.component.js';
2
+ export * from './alert.component.js';
3
+ export default SynAlert;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'syn-alert': SynAlert;
7
+ }
8
+ }
@@ -0,0 +1,28 @@
1
+ import {
2
+ alert_default
3
+ } from "../../chunks/chunk.GM27OBUM.js";
4
+ import "../../chunks/chunk.UINFNZLR.js";
5
+ import "../../chunks/chunk.HL7SBENS.js";
6
+ import "../../chunks/chunk.ZHH2AHOZ.js";
7
+ import "../../chunks/chunk.LJQ7LEPV.js";
8
+ import "../../chunks/chunk.7BEVGRQ2.js";
9
+ import "../../chunks/chunk.QAUTITK3.js";
10
+ import "../../chunks/chunk.JRYXECAY.js";
11
+ import "../../chunks/chunk.PS4UJFYT.js";
12
+ import "../../chunks/chunk.66WXVGAW.js";
13
+ import "../../chunks/chunk.CSXBPQFP.js";
14
+ import "../../chunks/chunk.66MOXMDP.js";
15
+ import "../../chunks/chunk.6C4JXZZN.js";
16
+ import "../../chunks/chunk.VTKIDI7N.js";
17
+ import "../../chunks/chunk.PJO6TM3T.js";
18
+ import "../../chunks/chunk.2RF7KO5I.js";
19
+ import "../../chunks/chunk.AVTU2BGE.js";
20
+ import "../../chunks/chunk.GEHO4WRP.js";
21
+ import "../../chunks/chunk.QY3GFWGZ.js";
22
+ import "../../chunks/chunk.32GEMZZV.js";
23
+ import "../../chunks/chunk.C7624ITA.js";
24
+ import "../../chunks/chunk.QNDC5KWA.js";
25
+ export {
26
+ alert_default as default
27
+ };
28
+ //# sourceMappingURL=alert.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import {
2
+ alert_styles_default
3
+ } from "../../chunks/chunk.PS4UJFYT.js";
4
+ import "../../chunks/chunk.QNDC5KWA.js";
5
+ export {
6
+ alert_styles_default as default
7
+ };
8
+ //# sourceMappingURL=alert.styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  SynBadge
3
- } from "../../chunks/chunk.MCRJOP4B.js";
3
+ } from "../../chunks/chunk.AWAHSLMZ.js";
4
4
  import "../../chunks/chunk.WQJRBFZA.js";
5
5
  import "../../chunks/chunk.II4PANKR.js";
6
6
  import "../../chunks/chunk.GEHO4WRP.js";
7
7
  import "../../chunks/chunk.QY3GFWGZ.js";
8
- import "../../chunks/chunk.LVQ53WA2.js";
8
+ import "../../chunks/chunk.32GEMZZV.js";
9
9
  import "../../chunks/chunk.QNDC5KWA.js";
10
10
  export {
11
11
  SynBadge as default
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  badge_default
3
- } from "../../chunks/chunk.5ZXK3DHG.js";
4
- import "../../chunks/chunk.MCRJOP4B.js";
3
+ } from "../../chunks/chunk.SW3IVEWX.js";
4
+ import "../../chunks/chunk.AWAHSLMZ.js";
5
5
  import "../../chunks/chunk.WQJRBFZA.js";
6
6
  import "../../chunks/chunk.II4PANKR.js";
7
7
  import "../../chunks/chunk.GEHO4WRP.js";
8
8
  import "../../chunks/chunk.QY3GFWGZ.js";
9
- import "../../chunks/chunk.LVQ53WA2.js";
9
+ import "../../chunks/chunk.32GEMZZV.js";
10
10
  import "../../chunks/chunk.QNDC5KWA.js";
11
11
  export {
12
12
  badge_default as default