@mozaic-ds/web-components 0.12.0-beta.0 → 0.12.0-beta.2

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 (246) hide show
  1. package/package.json +2 -1
  2. package/public/ClickOutside-63071e7a.js +1 -15
  3. package/public/ClickOutside-63071e7a.js.map +1 -1
  4. package/public/EventForward-8492ff62.js +1 -109
  5. package/public/EventForward-8492ff62.js.map +1 -1
  6. package/public/EventHandler-02058705.js +1 -15
  7. package/public/EventHandler-02058705.js.map +1 -1
  8. package/public/adeo/components/autocomplete/Autocomplete.js +1 -1
  9. package/public/adeo/components/autocomplete/Autocomplete.js.map +1 -1
  10. package/public/adeo/components/autocomplete/Autocomplete.svelte +2 -1
  11. package/public/adeo/components/datatable/DataTable.js +1 -1
  12. package/public/adeo/components/datatable/DataTable.js.map +1 -1
  13. package/public/adeo/components/datatable/DataTable.svelte +9 -13
  14. package/public/array-5b770a93.js +1 -13
  15. package/public/array-5b770a93.js.map +1 -1
  16. package/public/axis-fbc0f7b5.js +1 -174
  17. package/public/axis-fbc0f7b5.js.map +1 -1
  18. package/public/band-d7a07d2c.js +1 -186
  19. package/public/band-d7a07d2c.js.map +1 -1
  20. package/public/bricoman/components/autocomplete/Autocomplete.js +1 -1
  21. package/public/bricoman/components/autocomplete/Autocomplete.js.map +1 -1
  22. package/public/bricoman/components/autocomplete/Autocomplete.svelte +2 -1
  23. package/public/bricoman/components/datatable/DataTable.js +1 -1
  24. package/public/bricoman/components/datatable/DataTable.js.map +1 -1
  25. package/public/bricoman/components/datatable/DataTable.svelte +9 -13
  26. package/public/bundle.js +60 -56
  27. package/public/components/accordion/Accordion.js +1 -365
  28. package/public/components/accordion/Accordion.js.map +1 -1
  29. package/public/components/autocomplete/Autocomplete.js +1 -1515
  30. package/public/components/autocomplete/Autocomplete.js.map +1 -1
  31. package/public/components/autocomplete/Autocomplete.svelte +43 -21
  32. package/public/components/badge/Badge.js +1 -155
  33. package/public/components/badge/Badge.js.map +1 -1
  34. package/public/components/badge/Badge.nested.js +1 -101
  35. package/public/components/badge/Badge.nested.js.map +1 -1
  36. package/public/components/breadcrumb/Breadcrumb.js +1 -372
  37. package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
  38. package/public/components/breadcrumb/Breadcrumb.nested.js +1 -319
  39. package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
  40. package/public/components/button/Button.js +1 -1141
  41. package/public/components/button/Button.js.map +1 -1
  42. package/public/components/button/Button.svelte +2 -2
  43. package/public/components/card/Card.js +1 -369
  44. package/public/components/card/Card.js.map +1 -1
  45. package/public/components/chart/BarChart.js +1 -583
  46. package/public/components/chart/BarChart.js.map +1 -1
  47. package/public/components/chart/Donut.js +1 -1189
  48. package/public/components/chart/Donut.js.map +1 -1
  49. package/public/components/chart/GroupedBarChart.js +1 -750
  50. package/public/components/chart/GroupedBarChart.js.map +1 -1
  51. package/public/components/chart/LineChart.js +1 -1731
  52. package/public/components/chart/LineChart.js.map +1 -1
  53. package/public/components/chart/Radar.js +1 -729
  54. package/public/components/chart/Radar.js.map +1 -1
  55. package/public/components/chart/StackedBarChart.js +1 -745
  56. package/public/components/chart/StackedBarChart.js.map +1 -1
  57. package/public/components/checkbox/Checkbox.js +1 -307
  58. package/public/components/checkbox/Checkbox.js.map +1 -1
  59. package/public/components/checkboxgroup/checkboxGroup.js +1 -404
  60. package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
  61. package/public/components/checkboxgroup/checkboxgroup.types.d.ts.map +1 -1
  62. package/public/components/datatable/DataTable.js +1 -3098
  63. package/public/components/datatable/DataTable.js.map +1 -1
  64. package/public/components/datatable/DataTable.svelte +41 -20
  65. package/public/components/datatable/DataTableDefaultAction.nested.js +1 -4
  66. package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
  67. package/public/components/datatable/DataTableDefaultEdtion.nested.js +1 -164
  68. package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
  69. package/public/components/datatable/DataTableDefaultFilterTags.nested.js +1 -380
  70. package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
  71. package/public/components/datatable/DataTableDefaultSelection.nested.js +1 -424
  72. package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
  73. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +1 -263
  74. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
  75. package/public/components/datatable/DataTableFooter.nested.js +1 -637
  76. package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
  77. package/public/components/datatable/data.d.ts.map +1 -1
  78. package/public/components/datatable/datatable.types.d.ts +16 -2
  79. package/public/components/datatable/datatable.types.d.ts.map +1 -1
  80. package/public/components/datatabledefaultaction/DataTableDefaultAction.nested.svelte +18 -0
  81. package/public/components/dropdown/Dropdown.js +1 -1426
  82. package/public/components/dropdown/Dropdown.js.map +1 -1
  83. package/public/components/field/Field.js +1 -375
  84. package/public/components/field/Field.js.map +1 -1
  85. package/public/components/fileuploader/FileUploader.js +1 -603
  86. package/public/components/fileuploader/FileUploader.js.map +1 -1
  87. package/public/components/fileuploader/ResultFile.nested.js +1 -344
  88. package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
  89. package/public/components/flag/Flag.js +1 -174
  90. package/public/components/flag/Flag.js.map +1 -1
  91. package/public/components/header/Header.js +1 -918
  92. package/public/components/header/Header.js.map +1 -1
  93. package/public/components/header/Header.types.d.ts.map +1 -1
  94. package/public/components/hero/Hero.js +1 -271
  95. package/public/components/hero/Hero.js.map +1 -1
  96. package/public/components/kpi/Kpi.js +1 -404
  97. package/public/components/kpi/Kpi.js.map +1 -1
  98. package/public/components/layer/Layer.js +1 -471
  99. package/public/components/layer/Layer.js.map +1 -1
  100. package/public/components/link/Link.js +1 -380
  101. package/public/components/link/Link.js.map +1 -1
  102. package/public/components/listbox/Listbox.js +1 -595
  103. package/public/components/listbox/Listbox.js.map +1 -1
  104. package/public/components/listbox/Listbox.nested.js +1 -629
  105. package/public/components/listbox/Listbox.nested.js.map +1 -1
  106. package/public/components/loader/Loader.js +1 -246
  107. package/public/components/loader/Loader.js.map +1 -1
  108. package/public/components/loader/Loader.nested.js +1 -176
  109. package/public/components/loader/Loader.nested.js.map +1 -1
  110. package/public/components/modal/Modal.js +1 -395
  111. package/public/components/modal/Modal.js.map +1 -1
  112. package/public/components/notification/Notification.js +1 -458
  113. package/public/components/notification/Notification.js.map +1 -1
  114. package/public/components/optionbutton/OptionButton.js +1 -316
  115. package/public/components/optionbutton/OptionButton.js.map +1 -1
  116. package/public/components/overlay/Overlay.js +1 -104
  117. package/public/components/overlay/Overlay.js.map +1 -1
  118. package/public/components/overlay/OverlayLoader.js +1 -151
  119. package/public/components/overlay/OverlayLoader.js.map +1 -1
  120. package/public/components/pagination/Pagination.js +1 -613
  121. package/public/components/pagination/Pagination.js.map +1 -1
  122. package/public/components/pagination/Pagination.svelte +5 -4
  123. package/public/components/passwordinput/PasswordInput.js +1 -291
  124. package/public/components/passwordinput/PasswordInput.js.map +1 -1
  125. package/public/components/phonenumber/PhoneNumber.js +1 -6894
  126. package/public/components/phonenumber/PhoneNumber.js.map +1 -1
  127. package/public/components/phonenumber/PhoneNumber.svelte +1 -1
  128. package/public/components/price/Price.js +1 -768
  129. package/public/components/price/Price.js.map +1 -1
  130. package/public/components/progressbar/ProgressBar.js +1 -278
  131. package/public/components/progressbar/ProgressBar.js.map +1 -1
  132. package/public/components/quantityselector/QuantitySelector.js +1 -397
  133. package/public/components/quantityselector/QuantitySelector.js.map +1 -1
  134. package/public/components/radio/Radio.js +1 -273
  135. package/public/components/radio/Radio.js.map +1 -1
  136. package/public/components/radiogroup/RadioGroup.js +1 -414
  137. package/public/components/radiogroup/RadioGroup.js.map +1 -1
  138. package/public/components/radiogroup/radioGroup.types.d.ts.map +1 -1
  139. package/public/components/ratings/StarsInput.js +1 -292
  140. package/public/components/ratings/StarsInput.js.map +1 -1
  141. package/public/components/ratings/StarsResult.js +1 -246
  142. package/public/components/ratings/StarsResult.js.map +1 -1
  143. package/public/components/select/Select.js +1 -451
  144. package/public/components/select/Select.js.map +1 -1
  145. package/public/components/sidebar/Sidebar.js +1 -784
  146. package/public/components/sidebar/Sidebar.js.map +1 -1
  147. package/public/components/sidebar/sidebar-feature-group.nested.js +1 -592
  148. package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
  149. package/public/components/sidebar/sidebar-feature.nested.js +1 -402
  150. package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
  151. package/public/components/sidebar/sidebar-section.nested.js +1 -394
  152. package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
  153. package/public/components/sidebar/sidebar-segment.nested.js +1 -198
  154. package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
  155. package/public/components/sidebar/sidebar-separator.nested.js +1 -49
  156. package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
  157. package/public/components/sidebar/sidebar-service.d.ts.map +1 -1
  158. package/public/components/sidebar/sidebar-sub-features.nested.js +1 -312
  159. package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
  160. package/public/components/sidebar/sidebar-user.nested.js +1 -733
  161. package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
  162. package/public/components/sidebar/sidebar.types.d.ts.map +1 -1
  163. package/public/components/sidebar-feature-group/sidebar-feature-group.nested.svelte +1 -1
  164. package/public/components/sidebar-segment/sidebar-segment.nested.svelte +1 -1
  165. package/public/components/sidebar-user/sidebar-user.nested.svelte +1 -0
  166. package/public/components/starsinput/StarsInput.svelte +9 -2
  167. package/public/components/stepper/Stepper.js +1 -371
  168. package/public/components/stepper/Stepper.js.map +1 -1
  169. package/public/components/tabs/Tabs.js +1 -615
  170. package/public/components/tabs/Tabs.js.map +1 -1
  171. package/public/components/tabs/Tabs.nested.js +1 -472
  172. package/public/components/tabs/Tabs.nested.js.map +1 -1
  173. package/public/components/tag/Tag.js +1 -665
  174. package/public/components/tag/Tag.js.map +1 -1
  175. package/public/components/tag/Tag.nested.js +1 -554
  176. package/public/components/tag/Tag.nested.js.map +1 -1
  177. package/public/components/tag/Tag.nested.svelte +5 -5
  178. package/public/components/tag/Tag.svelte +5 -5
  179. package/public/components/taglist/TagList.js +1 -475
  180. package/public/components/taglist/TagList.js.map +1 -1
  181. package/public/components/textarea/Textarea.js +1 -303
  182. package/public/components/textarea/Textarea.js.map +1 -1
  183. package/public/components/textinput/Textinput.js +1 -497
  184. package/public/components/textinput/Textinput.js.map +1 -1
  185. package/public/components/textinput/Textinput.nested.js +1 -320
  186. package/public/components/textinput/Textinput.nested.js.map +1 -1
  187. package/public/components/toggle/Toggle.js +1 -278
  188. package/public/components/toggle/Toggle.js.map +1 -1
  189. package/public/components/tooltip/Tooltip.js +1 -173
  190. package/public/components/tooltip/Tooltip.js.map +1 -1
  191. package/public/index-c33b3772.js +1 -873
  192. package/public/index-c33b3772.js.map +1 -1
  193. package/public/linear-f46d7e9e.js +1 -700
  194. package/public/linear-f46d7e9e.js.map +1 -1
  195. package/public/main.d.ts +0 -1
  196. package/public/main.d.ts.map +1 -1
  197. package/public/path-1b5da959.js +1 -186
  198. package/public/path-1b5da959.js.map +1 -1
  199. package/public/sidebar-service-275bf9ef.js +1 -129
  200. package/public/sidebar-service-275bf9ef.js.map +1 -1
  201. package/public/symbol-b05a6e2b.js +1 -169
  202. package/public/symbol-b05a6e2b.js.map +1 -1
  203. package/public/transform-15d69d5d.js +1 -2743
  204. package/public/transform-15d69d5d.js.map +1 -1
  205. package/public/utilities/DataTableUtilities.d.ts.map +1 -1
  206. package/public/utilities/DataTableUtilities.ts +12 -0
  207. package/public/utilities/EventForward.js +1 -136
  208. package/public/utilities/EventForward.js.map +1 -1
  209. package/public/utilities/EventHandler.js +1 -36
  210. package/public/utilities/EventHandler.js.map +1 -1
  211. package/public/utilities/components/datatable/data.d.ts.map +1 -1
  212. package/public/utilities/components/datatable/datatable.types.d.ts +16 -2
  213. package/public/utilities/components/datatable/datatable.types.d.ts.map +1 -1
  214. package/public/utilities/main.d.ts +0 -1
  215. package/public/utilities/main.d.ts.map +1 -1
  216. package/public/utilities/stories/datatable/DataTable.stories.d.ts.map +1 -1
  217. package/public/utilities/stories/ratings/StarsResult.stories.d.ts.map +1 -1
  218. package/public/utilities/utilities/DataTableUtilities.d.ts.map +1 -1
  219. package/public/DataTableDefaultAction.nested-46712849.js +0 -762
  220. package/public/DataTableDefaultAction.nested-46712849.js.map +0 -1
  221. package/public/DataTableUtilities-313a448d.js +0 -386
  222. package/public/DataTableUtilities-313a448d.js.map +0 -1
  223. package/public/components/button/Button.nested.js +0 -1005
  224. package/public/components/button/Button.nested.js.map +0 -1
  225. package/public/components/button/Button.nested.svelte +0 -173
  226. package/public/components/carousel/Carousel.js +0 -710
  227. package/public/components/carousel/Carousel.js.map +0 -1
  228. package/public/components/carousel/Carousel.svelte +0 -408
  229. package/public/components/carousel/CarouselCard.nested.js +0 -140
  230. package/public/components/carousel/CarouselCard.nested.js.map +0 -1
  231. package/public/components/carousel/carousel.types.d.ts +0 -20
  232. package/public/components/carousel/carousel.types.d.ts.map +0 -1
  233. package/public/components/carouselcard/CarouselCard.nested.svelte +0 -54
  234. package/public/components/link/Link.nested.js +0 -285
  235. package/public/components/link/Link.nested.js.map +0 -1
  236. package/public/components/link/Link.nested.svelte +0 -78
  237. package/public/sidebar-service-589b271b.js +0 -125
  238. package/public/sidebar-service-589b271b.js.map +0 -1
  239. package/public/stories/carousel/items.d.ts +0 -3
  240. package/public/stories/carousel/items.d.ts.map +0 -1
  241. package/public/utilities/components/carousel/carousel.types.d.ts +0 -20
  242. package/public/utilities/components/carousel/carousel.types.d.ts.map +0 -1
  243. package/public/utilities/stories/carousel/Carousel.stories.d.ts +0 -8
  244. package/public/utilities/stories/carousel/Carousel.stories.d.ts.map +0 -1
  245. package/public/utilities/stories/carousel/items.d.ts +0 -3
  246. package/public/utilities/stories/carousel/items.d.ts.map +0 -1
@@ -1,459 +1,2 @@
1
- import { S as SvelteElement, i as init, a as attribute_to_object, b as insert, f as flush, s as safe_not_equal, c as assign, e as element, d as space, n as noop, g as attr, h as set_attributes, j as append, m as get_spread_update, o as detach, p as compute_rest_props, q as exclude_internal_props, K as empty, l as listen, Z as HtmlTag, t as text, k as set_data } from '../../index-c33b3772.js';
2
- import { E as EventHandler } from '../../EventHandler-02058705.js';
3
-
4
- /* src/components/notification/Notification.svelte generated by Svelte v3.58.0 */
5
-
6
- function create_if_block_3(ctx) {
7
- let html_tag;
8
- let raw_value = `<${/*titletag*/ ctx[1]} class="mc-notification__title">${/*title*/ ctx[0]}</${/*titletag*/ ctx[1]}>` + "";
9
- let html_anchor;
10
-
11
- return {
12
- c() {
13
- html_tag = new HtmlTag(false);
14
- html_anchor = empty();
15
- html_tag.a = html_anchor;
16
- },
17
- m(target, anchor) {
18
- html_tag.m(raw_value, target, anchor);
19
- insert(target, html_anchor, anchor);
20
- },
21
- p(ctx, dirty) {
22
- if (dirty & /*titletag, title*/ 3 && raw_value !== (raw_value = `<${/*titletag*/ ctx[1]} class="mc-notification__title">${/*title*/ ctx[0]}</${/*titletag*/ ctx[1]}>` + "")) html_tag.p(raw_value);
23
- },
24
- d(detaching) {
25
- if (detaching) detach(html_anchor);
26
- if (detaching) html_tag.d();
27
- }
28
- };
29
- }
30
-
31
- // (50:24)
32
- function create_if_block_2(ctx) {
33
- let div;
34
-
35
- return {
36
- c() {
37
- div = element("div");
38
- div.innerHTML = `<slot name="footer"></slot>`;
39
- attr(div, "class", "mc-notification__footer");
40
- },
41
- m(target, anchor) {
42
- insert(target, div, anchor);
43
- },
44
- p: noop,
45
- d(detaching) {
46
- if (detaching) detach(div);
47
- }
48
- };
49
- }
50
-
51
- // (46:4) {#if href && linkcontent}
52
- function create_if_block_1(ctx) {
53
- let div;
54
- let a;
55
- let t;
56
-
57
- return {
58
- c() {
59
- div = element("div");
60
- a = element("a");
61
- t = text(/*linkcontent*/ ctx[4]);
62
- attr(a, "class", "mc-notification__link mc-link");
63
- attr(a, "href", /*href*/ ctx[3]);
64
- attr(div, "class", "mc-notification__footer");
65
- },
66
- m(target, anchor) {
67
- insert(target, div, anchor);
68
- append(div, a);
69
- append(a, t);
70
- },
71
- p(ctx, dirty) {
72
- if (dirty & /*linkcontent*/ 16) set_data(t, /*linkcontent*/ ctx[4]);
73
-
74
- if (dirty & /*href*/ 8) {
75
- attr(a, "href", /*href*/ ctx[3]);
76
- }
77
- },
78
- d(detaching) {
79
- if (detaching) detach(div);
80
- }
81
- };
82
- }
83
-
84
- // (56:2) {#if closable}
85
- function create_if_block(ctx) {
86
- let button;
87
- let mounted;
88
- let dispose;
89
-
90
- return {
91
- c() {
92
- button = element("button");
93
- attr(button, "type", "button");
94
- attr(button, "class", "mc-notification-closable__close");
95
- attr(button, "title", "Close");
96
- },
97
- m(target, anchor) {
98
- insert(target, button, anchor);
99
-
100
- if (!mounted) {
101
- dispose = listen(button, "click", /*emitClose*/ ctx[10]);
102
- mounted = true;
103
- }
104
- },
105
- p: noop,
106
- d(detaching) {
107
- if (detaching) detach(button);
108
- mounted = false;
109
- dispose();
110
- }
111
- };
112
- }
113
-
114
- function create_fragment(ctx) {
115
- let div2;
116
- let div1;
117
- let t0;
118
- let div0;
119
- let t1;
120
- let t2;
121
- let div2_class_value;
122
- let div2_role_value;
123
- let if_block0 = /*title*/ ctx[0] && create_if_block_3(ctx);
124
-
125
- function select_block_type(ctx, dirty) {
126
- if (/*href*/ ctx[3] && /*linkcontent*/ ctx[4]) return create_if_block_1;
127
- if (/*hasfooter*/ ctx[8]) return create_if_block_2;
128
- }
129
-
130
- let current_block_type = select_block_type(ctx);
131
- let if_block1 = current_block_type && current_block_type(ctx);
132
- let if_block2 = /*closable*/ ctx[6] && create_if_block(ctx);
133
-
134
- let div2_levels = [
135
- {
136
- class: div2_class_value = "" + (setClasses(/*type*/ ctx[5], /*size*/ ctx[7], /*closable*/ ctx[6]) + " " + /*$$props*/ ctx[11].class)
137
- },
138
- {
139
- role: div2_role_value = /*alert*/ ctx[2] ? 'alert' : 'status'
140
- },
141
- /*attributes*/ ctx[9]
142
- ];
143
-
144
- let div_data_2 = {};
145
-
146
- for (let i = 0; i < div2_levels.length; i += 1) {
147
- div_data_2 = assign(div_data_2, div2_levels[i]);
148
- }
149
-
150
- return {
151
- c() {
152
- div2 = element("div");
153
- div1 = element("div");
154
- if (if_block0) if_block0.c();
155
- t0 = space();
156
- div0 = element("div");
157
- div0.innerHTML = `<slot></slot>`;
158
- t1 = space();
159
- if (if_block1) if_block1.c();
160
- t2 = space();
161
- if (if_block2) if_block2.c();
162
- this.c = noop;
163
- attr(div0, "class", "mc-notification__message");
164
- attr(div1, "class", "mc-notification__content");
165
- set_attributes(div2, div_data_2);
166
- },
167
- m(target, anchor) {
168
- insert(target, div2, anchor);
169
- append(div2, div1);
170
- if (if_block0) if_block0.m(div1, null);
171
- append(div1, t0);
172
- append(div1, div0);
173
- append(div1, t1);
174
- if (if_block1) if_block1.m(div1, null);
175
- append(div2, t2);
176
- if (if_block2) if_block2.m(div2, null);
177
- },
178
- p(ctx, [dirty]) {
179
- if (/*title*/ ctx[0]) {
180
- if (if_block0) {
181
- if_block0.p(ctx, dirty);
182
- } else {
183
- if_block0 = create_if_block_3(ctx);
184
- if_block0.c();
185
- if_block0.m(div1, t0);
186
- }
187
- } else if (if_block0) {
188
- if_block0.d(1);
189
- if_block0 = null;
190
- }
191
-
192
- if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block1) {
193
- if_block1.p(ctx, dirty);
194
- } else {
195
- if (if_block1) if_block1.d(1);
196
- if_block1 = current_block_type && current_block_type(ctx);
197
-
198
- if (if_block1) {
199
- if_block1.c();
200
- if_block1.m(div1, null);
201
- }
202
- }
203
-
204
- if (/*closable*/ ctx[6]) {
205
- if (if_block2) {
206
- if_block2.p(ctx, dirty);
207
- } else {
208
- if_block2 = create_if_block(ctx);
209
- if_block2.c();
210
- if_block2.m(div2, null);
211
- }
212
- } else if (if_block2) {
213
- if_block2.d(1);
214
- if_block2 = null;
215
- }
216
-
217
- set_attributes(div2, div_data_2 = get_spread_update(div2_levels, [
218
- dirty & /*type, size, closable, $$props*/ 2272 && div2_class_value !== (div2_class_value = "" + (setClasses(/*type*/ ctx[5], /*size*/ ctx[7], /*closable*/ ctx[6]) + " " + /*$$props*/ ctx[11].class)) && { class: div2_class_value },
219
- dirty & /*alert*/ 4 && div2_role_value !== (div2_role_value = /*alert*/ ctx[2] ? 'alert' : 'status') && { role: div2_role_value },
220
- dirty & /*attributes*/ 512 && /*attributes*/ ctx[9]
221
- ]));
222
- },
223
- i: noop,
224
- o: noop,
225
- d(detaching) {
226
- if (detaching) detach(div2);
227
- if (if_block0) if_block0.d();
228
-
229
- if (if_block1) {
230
- if_block1.d();
231
- }
232
-
233
- if (if_block2) if_block2.d();
234
- }
235
- };
236
- }
237
-
238
- function setClasses(type, size, closable) {
239
- const classes = ['mc-notification'];
240
-
241
- if (type) {
242
- classes.push(`mc-notification--${type}`);
243
- }
244
-
245
- if (size && size !== 'm') {
246
- classes.push(`mc-notification--${size}`);
247
- }
248
-
249
- if (closable) {
250
- classes.push('mc-notification-closable');
251
- }
252
-
253
- return classes.join(' ');
254
- }
255
-
256
- function instance($$self, $$props, $$invalidate) {
257
- let attributes;
258
-
259
- const omit_props_names = [
260
- "title","titletag","alert","href","linkcontent","type","closable","size","hasfooter"
261
- ];
262
-
263
- let $$restProps = compute_rest_props($$props, omit_props_names);
264
- let { title } = $$props;
265
- let { titletag = 'h3' } = $$props;
266
- let { alert = false } = $$props;
267
- let { href } = $$props;
268
- let { linkcontent } = $$props;
269
- let { type } = $$props;
270
- let { closable = false } = $$props;
271
- let { size = 'm' } = $$props;
272
- let { hasfooter = false } = $$props;
273
- let eventHandler = new EventHandler();
274
-
275
- function emitClose(e) {
276
- eventHandler.dispatch('close', e);
277
- }
278
-
279
- $$self.$$set = $$new_props => {
280
- $$invalidate(11, $$props = assign(assign({}, $$props), exclude_internal_props($$new_props)));
281
- $$invalidate(13, $$restProps = compute_rest_props($$props, omit_props_names));
282
- if ('title' in $$new_props) $$invalidate(0, title = $$new_props.title);
283
- if ('titletag' in $$new_props) $$invalidate(1, titletag = $$new_props.titletag);
284
- if ('alert' in $$new_props) $$invalidate(2, alert = $$new_props.alert);
285
- if ('href' in $$new_props) $$invalidate(3, href = $$new_props.href);
286
- if ('linkcontent' in $$new_props) $$invalidate(4, linkcontent = $$new_props.linkcontent);
287
- if ('type' in $$new_props) $$invalidate(5, type = $$new_props.type);
288
- if ('closable' in $$new_props) $$invalidate(6, closable = $$new_props.closable);
289
- if ('size' in $$new_props) $$invalidate(7, size = $$new_props.size);
290
- if ('hasfooter' in $$new_props) $$invalidate(8, hasfooter = $$new_props.hasfooter);
291
- };
292
-
293
- $$self.$$.update = () => {
294
- $$invalidate(9, attributes = Object.assign({}, $$restProps));
295
-
296
- if ($$self.$$.dirty & /*attributes*/ 512) {
297
- delete attributes.class;
298
- }
299
- };
300
-
301
- $$props = exclude_internal_props($$props);
302
-
303
- return [
304
- title,
305
- titletag,
306
- alert,
307
- href,
308
- linkcontent,
309
- type,
310
- closable,
311
- size,
312
- hasfooter,
313
- attributes,
314
- emitClose,
315
- $$props
316
- ];
317
- }
318
-
319
- class Notification extends SvelteElement {
320
- constructor(options) {
321
- super();
322
- const style = document.createElement('style');
323
- style.textContent = `.mc-link{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:inherit;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;line-height:inherit;text-decoration:underline;-webkit-transition:color ease 200ms;-o-transition:color ease 200ms;transition:color ease 200ms;gap:0.25rem;color:#000000;position:relative;font-size:1rem;line-height:1.375}.mc-link:focus{outline:none}.mc-link:focus::after{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-link.is-visited,.mc-link:visited{color:#333333}.mc-link.is-hover,.mc-link:hover{color:#666666}.mc-link.is-active,.mc-link:active{color:#333333}.mc-link.is-disabled{color:#e6e6e6;cursor:not-allowed}.mc-link--s{font-size:0.875rem;line-height:1.2857142857}.mc-link--m{font-size:1rem;line-height:1.375}.mc-link::after{border-radius:2px;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;content:"";display:block;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease}.mc-link__icon{display:block;height:1rem;fill:currentColor;-ms-flex-negative:0;flex-shrink:0;width:1rem}.mc-link--light{color:#ffffff}.mc-link--light.is-visited,.mc-link--light:visited{color:#cccccc}.mc-link--light.is-hover,.mc-link--light:hover{color:#999999}.mc-link--light.is-active,.mc-link--light:active{color:#cccccc}.mc-link--light.is-disabled{color:#e6e6e6;cursor:not-allowed}.mc-link--primary{color:#188803}.mc-link--primary.is-visited,.mc-link--primary:visited{color:#006902}.mc-link--primary.is-hover,.mc-link--primary:hover{color:#035010}.mc-link--primary.is-active,.mc-link--primary:active{color:#006902}.mc-link--primary.is-disabled{color:#e6e6e6;cursor:not-allowed}.mc-link--primary-02{color:#494f60}.mc-link--primary-02.is-visited,.mc-link--primary-02:visited{color:#343b4c}.mc-link--primary-02.is-hover,.mc-link--primary-02:hover{color:#171b26}.mc-link--primary-02.is-active,.mc-link--primary-02:active{color:#343b4c}.mc-link--primary-02.is-disabled{color:#e6e6e6;cursor:not-allowed}.mc-link--danger{color:#c61112}.mc-link--danger.is-visited,.mc-link--danger:visited{color:#8c0003}.mc-link--danger.is-hover,.mc-link--danger:hover{color:#530000}.mc-link--danger.is-active,.mc-link--danger:active{color:#8c0003}.mc-link--danger.is-disabled{color:#e6e6e6;cursor:not-allowed}@media screen and (min-width: 680px){.mc-link--s\\@from-m{font-size:0.875rem;line-height:1.2857142857}.mc-link--m\\@from-m{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1024px){.mc-link--s\\@from-l{font-size:0.875rem;line-height:1.2857142857}.mc-link--m\\@from-l{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1280px){.mc-link--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857}.mc-link--m\\@from-xl{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1920px){.mc-link--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857}.mc-link--m\\@from-xxl{font-size:1rem;line-height:1.375}}.mc-notification{font-family:"LeroyMerlin", sans-serif;font-weight:400;border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;padding:1rem 1.5rem 1.5rem 1rem;background:#daeff7;-webkit-box-shadow:inset 0 0 0 1px #0b96cc;box-shadow:inset 0 0 0 1px #0b96cc;-webkit-box-sizing:border-box;box-sizing:border-box;color:#000000}.mc-notification::before{background-size:2rem;-webkit-box-flex:0;-ms-flex:0 0 2rem;flex:0 0 2rem;height:2rem;margin-right:1rem;width:2rem}.mc-notification .mc-notification__content{padding-top:0.25rem}.mc-notification::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='2rem' width='2rem' viewBox='0 0 32 32' fill='%23007bb4'%3E%3Cpath d='M16,29A13,13,0,1,1,29,16,13,13,0,0,1,16,29ZM16,5A11,11,0,1,0,27,16,11,11,0,0,0,16,5Z'/%3E%3Cpath d='M16,21.7a1,1,0,0,1-1-1V14.87a1,1,0,1,1,2,0V20.7A1,1,0,0,1,16,21.7Z'/%3E%3Ccircle cx='16' cy='11.3' r='1'/%3E%3C/svg%3E")}.mc-notification::before{background-color:transparent;background-repeat:no-repeat;content:"";display:block}.mc-notification__content{-webkit-box-flex:1;-ms-flex:1 1 0px;flex:1 1 0}.mc-notification__title,.mc-notification__message{margin-bottom:0;margin-top:0}.mc-notification__title{font-family:"LeroyMerlin", sans-serif;font-weight:600;font-size:1rem;line-height:1.5}.mc-notification__message{font-size:0.875rem;line-height:1.5714285714}.mc-notification__footer{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-top:1rem}.mc-notification__link{font-size:0.875rem;line-height:1.2857142857;margin-top:0.5rem}.mc-notification--information{background:#daeff7;-webkit-box-shadow:inset 0 0 0 1px #0b96cc;box-shadow:inset 0 0 0 1px #0b96cc}.mc-notification--information::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='2rem' width='2rem' viewBox='0 0 32 32' fill='%23007bb4'%3E%3Cpath d='M16,29A13,13,0,1,1,29,16,13,13,0,0,1,16,29ZM16,5A11,11,0,1,0,27,16,11,11,0,0,0,16,5Z'/%3E%3Cpath d='M16,21.7a1,1,0,0,1-1-1V14.87a1,1,0,1,1,2,0V20.7A1,1,0,0,1,16,21.7Z'/%3E%3Ccircle cx='16' cy='11.3' r='1'/%3E%3C/svg%3E")}.mc-notification--success{background:#ebf5de;-webkit-box-shadow:inset 0 0 0 1px #46a610;box-shadow:inset 0 0 0 1px #46a610}.mc-notification--success::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='2rem' width='2rem' fill='%23188803' viewBox='0 0 32 32'%3E%3Cpath d='M16,5A11,11,0,1,1,5,16,11,11,0,0,1,16,5m0-2A13,13,0,1,0,29,16,13,13,0,0,0,16,3Z'/%3E%3Cpath d='M14.2,21.45,8.5,16.18a1,1,0,1,1,1.35-1.47l4.28,4,8-8.09a1,1,0,0,1,1.42,0,1,1,0,0,1,0,1.41Z'/%3E%3C/svg%3E")}.mc-notification--warning{background:#fdf1e8;-webkit-box-shadow:inset 0 0 0 1px #ea7315;box-shadow:inset 0 0 0 1px #ea7315}.mc-notification--warning::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='2rem' width='2rem' viewBox='0 0 32 32' fill='%23c65200'%3E%3Cpath d='M16,29A13,13,0,1,1,29,16,13,13,0,0,1,16,29ZM16,5A11,11,0,1,0,27,16,11,11,0,0,0,16,5Z'/%3E%3Cpath d='M16,18.13a1,1,0,0,1-1-1V11.3a1,1,0,0,1,2,0v5.83A1,1,0,0,1,16,18.13Z'/%3E%3Ccircle cx='16' cy='20.7' r='1'/%3E%3C/svg%3E")}.mc-notification--danger{background:#fdeaea;-webkit-box-shadow:inset 0 0 0 1px #ea302d;box-shadow:inset 0 0 0 1px #ea302d}.mc-notification--danger::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='2rem' width='2rem' viewBox='0 0 32 32' fill='%23c61112'%3E%3Cpath d='M16,3A13,13,0,1,0,29,16,13,13,0,0,0,16,3Zm0,24A11,11,0,1,1,27,16,11,11,0,0,1,16,27Z'/%3E%3Cpath d='M20.71,11.29a1,1,0,0,0-1.42,0L16,14.59l-3.29-3.3a1,1,0,0,0-1.42,1.42L14.59,16l-3.3,3.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L16,17.41l3.29,3.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42L17.41,16l3.3-3.29A1,1,0,0,0,20.71,11.29Z'/%3E%3C/svg%3E")}.mc-notification--s{padding:0.75rem 0.75rem 1.5rem}.mc-notification--s::before{background-size:1.5rem;-webkit-box-flex:0;-ms-flex:0 0 1.5rem;flex:0 0 1.5rem;height:1.5rem;margin-right:0.5rem;width:1.5rem}.mc-notification--s .mc-notification__content{padding-top:0}.mc-notification--s::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.5rem' width='1.5rem' viewBox='0 0 24 24' fill='%23007bb4'%3E%3Cpath d='M12 22a10 10 0 1110-10 10 10 0 01-10 10zm0-18a8 8 0 108 8 8 8 0 00-8-8z'/%3E%3Cpath d='M12 17a1 1 0 01-1-1v-4.39a1 1 0 012 0V16a1 1 0 01-1 1z'/%3E%3Ccircle cx='12' cy='8' r='1'/%3E%3C/svg%3E")}.mc-notification--s.mc-notification--success::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.5rem' width='1.5rem' viewBox='0 0 24 24' fill='%23188803'%3E%3Cpath d='M12 4a8 8 0 11-8 8 8 8 0 018-8m0-2a10 10 0 1010 10A10 10 0 0012 2z'/%3E%3Cpath d='M10.73 15.75a1 1 0 01-.68-.26l-3-2.74a1 1 0 011.36-1.47l2.25 2.08 4.36-4.42a1 1 0 111.42 1.41l-5 5.1a1 1 0 01-.71.3z'/%3E%3C/svg%3E")}.mc-notification--s.mc-notification--warning::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.5rem' width='1.5rem' viewBox='0 0 24 24' fill='%23c65200'%3E%3Cpath d='M12 2a10 10 0 1010 10A10 10 0 0012 2zm0 18a8 8 0 118-8 8 8 0 01-8 8z'/%3E%3Cpath d='M12 7a1 1 0 00-1 1v4.38a1 1 0 002 0V8a1 1 0 00-1-1z'/%3E%3Ccircle cx='12' cy='16' r='1'/%3E%3C/svg%3E")}.mc-notification--s.mc-notification--danger::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.5rem' width='1.5rem' viewBox='0 0 24 24' fill='%23c61112'%3E%3Cpath d='M12 2a10 10 0 1010 10A10 10 0 0012 2zm0 18a8 8 0 118-8 8 8 0 01-8 8z'/%3E%3Cpath d='M16.21 7.88a1 1 0 00-1.42 0l-2.74 2.74-2.84-2.83a1 1 0 10-1.42 1.42L10.63 12l-2.77 2.79a1 1 0 001.41 1.42l2.78-2.77 2.68 2.68a1 1 0 001.41-1.42L13.46 12l2.75-2.7a1 1 0 000-1.42z'/%3E%3C/svg%3E")}.mc-notification-closable{position:relative}.mc-notification-closable__close{position:relative;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23000000' viewBox='0 0 16 16'%3E%3Cpath d='M9.41 8l3.3-3.29a1 1 0 10-1.42-1.42L8 6.59l-3.29-3.3a1 1 0 00-1.42 1.42L6.59 8l-3.3 3.29a1 1 0 000 1.42 1 1 0 001.42 0L8 9.41l3.29 3.3a1 1 0 001.42 0 1 1 0 000-1.42z'/%3E%3C/svg%3E") no-repeat;background-size:1rem;border:0;cursor:pointer;display:block;height:1rem;padding:0;position:absolute;outline:0;right:1rem;top:1rem;width:1rem}.mc-notification-closable__close::after{border-radius:2px;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;content:"";display:block;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease}.mc-notification-closable__close:focus::after{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;-webkit-box-shadow:0 0 0 0.125rem #0b96cc;box-shadow:0 0 0 0.125rem #0b96cc}@media screen and (min-width: 1024px){.mc-notification__footer{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}`;
324
- this.shadowRoot.appendChild(style);
325
-
326
- init(
327
- this,
328
- {
329
- target: this.shadowRoot,
330
- props: attribute_to_object(this.attributes),
331
- customElement: true
332
- },
333
- instance,
334
- create_fragment,
335
- safe_not_equal,
336
- {
337
- title: 0,
338
- titletag: 1,
339
- alert: 2,
340
- href: 3,
341
- linkcontent: 4,
342
- type: 5,
343
- closable: 6,
344
- size: 7,
345
- hasfooter: 8
346
- },
347
- null
348
- );
349
-
350
- if (options) {
351
- if (options.target) {
352
- insert(options.target, this, options.anchor);
353
- }
354
-
355
- if (options.props) {
356
- this.$set(options.props);
357
- flush();
358
- }
359
- }
360
- }
361
-
362
- static get observedAttributes() {
363
- return [
364
- "title",
365
- "titletag",
366
- "alert",
367
- "href",
368
- "linkcontent",
369
- "type",
370
- "closable",
371
- "size",
372
- "hasfooter"
373
- ];
374
- }
375
-
376
- get title() {
377
- return this.$$.ctx[0];
378
- }
379
-
380
- set title(title) {
381
- this.$$set({ title });
382
- flush();
383
- }
384
-
385
- get titletag() {
386
- return this.$$.ctx[1];
387
- }
388
-
389
- set titletag(titletag) {
390
- this.$$set({ titletag });
391
- flush();
392
- }
393
-
394
- get alert() {
395
- return this.$$.ctx[2];
396
- }
397
-
398
- set alert(alert) {
399
- this.$$set({ alert });
400
- flush();
401
- }
402
-
403
- get href() {
404
- return this.$$.ctx[3];
405
- }
406
-
407
- set href(href) {
408
- this.$$set({ href });
409
- flush();
410
- }
411
-
412
- get linkcontent() {
413
- return this.$$.ctx[4];
414
- }
415
-
416
- set linkcontent(linkcontent) {
417
- this.$$set({ linkcontent });
418
- flush();
419
- }
420
-
421
- get type() {
422
- return this.$$.ctx[5];
423
- }
424
-
425
- set type(type) {
426
- this.$$set({ type });
427
- flush();
428
- }
429
-
430
- get closable() {
431
- return this.$$.ctx[6];
432
- }
433
-
434
- set closable(closable) {
435
- this.$$set({ closable });
436
- flush();
437
- }
438
-
439
- get size() {
440
- return this.$$.ctx[7];
441
- }
442
-
443
- set size(size) {
444
- this.$$set({ size });
445
- flush();
446
- }
447
-
448
- get hasfooter() {
449
- return this.$$.ctx[8];
450
- }
451
-
452
- set hasfooter(hasfooter) {
453
- this.$$set({ hasfooter });
454
- flush();
455
- }
456
- }
457
-
458
- export { Notification as default };
1
+ import{S as i,i as e,a as t,b as o,f as n,s as a,c as s,e as r,d as l,n as c,g as m,h as d,j as f,m as h,o as g,p as b,q as x,K as w,l as p,Z as k,t as u,k as v}from"../../index-c33b3772.js";import{E as y}from"../../EventHandler-02058705.js";function $(i){let e,t,n=`<${i[1]} class="mc-notification__title">${i[0]}</${i[1]}>`;return{c(){e=new k(!1),t=w(),e.a=t},m(i,a){e.m(n,i,a),o(i,t,a)},p(i,t){3&t&&n!==(n=`<${i[1]} class="mc-notification__title">${i[0]}</${i[1]}>`)&&e.p(n)},d(i){i&&g(t),i&&e.d()}}}function C(i){let e;return{c(){e=r("div"),e.innerHTML='<slot name="footer"></slot>',m(e,"class","mc-notification__footer")},m(i,t){o(i,e,t)},p:c,d(i){i&&g(e)}}}function E(i){let e,t,n;return{c(){e=r("div"),t=r("a"),n=u(i[4]),m(t,"class","mc-notification__link mc-link"),m(t,"href",i[3]),m(e,"class","mc-notification__footer")},m(i,a){o(i,e,a),f(e,t),f(t,n)},p(i,e){16&e&&v(n,i[4]),8&e&&m(t,"href",i[3])},d(i){i&&g(e)}}}function z(i){let e,t,n;return{c(){e=r("button"),m(e,"type","button"),m(e,"class","mc-notification-closable__close"),m(e,"title","Close")},m(a,s){o(a,e,s),t||(n=p(e,"click",i[10]),t=!0)},p:c,d(i){i&&g(e),t=!1,n()}}}function _(i){let e,t,n,a,b,x,w,p,k=i[0]&&$(i);function u(i,e){return i[3]&&i[4]?E:i[8]?C:void 0}let v=u(i),y=v&&v(i),_=i[6]&&z(i),A=[{class:w=M(i[5],i[7],i[6])+" "+i[11].class},{role:p=i[2]?"alert":"status"},i[9]],Z={};for(let i=0;i<A.length;i+=1)Z=s(Z,A[i]);return{c(){e=r("div"),t=r("div"),k&&k.c(),n=l(),a=r("div"),a.innerHTML="<slot></slot>",b=l(),y&&y.c(),x=l(),_&&_.c(),this.c=c,m(a,"class","mc-notification__message"),m(t,"class","mc-notification__content"),d(e,Z)},m(i,s){o(i,e,s),f(e,t),k&&k.m(t,null),f(t,n),f(t,a),f(t,b),y&&y.m(t,null),f(e,x),_&&_.m(e,null)},p(i,[o]){i[0]?k?k.p(i,o):(k=$(i),k.c(),k.m(t,n)):k&&(k.d(1),k=null),v===(v=u(i))&&y?y.p(i,o):(y&&y.d(1),y=v&&v(i),y&&(y.c(),y.m(t,null))),i[6]?_?_.p(i,o):(_=z(i),_.c(),_.m(e,null)):_&&(_.d(1),_=null),d(e,Z=h(A,[2272&o&&w!==(w=M(i[5],i[7],i[6])+" "+i[11].class)&&{class:w},4&o&&p!==(p=i[2]?"alert":"status")&&{role:p},512&o&&i[9]]))},i:c,o:c,d(i){i&&g(e),k&&k.d(),y&&y.d(),_&&_.d()}}}function M(i,e,t){const o=["mc-notification"];return i&&o.push(`mc-notification--${i}`),e&&"m"!==e&&o.push(`mc-notification--${e}`),t&&o.push("mc-notification-closable"),o.join(" ")}function A(i,e,t){let o;const n=["title","titletag","alert","href","linkcontent","type","closable","size","hasfooter"];let a=b(e,n),{title:r}=e,{titletag:l="h3"}=e,{alert:c=!1}=e,{href:m}=e,{linkcontent:d}=e,{type:f}=e,{closable:h=!1}=e,{size:g="m"}=e,{hasfooter:w=!1}=e,p=new y;return i.$$set=i=>{t(11,e=s(s({},e),x(i))),t(13,a=b(e,n)),"title"in i&&t(0,r=i.title),"titletag"in i&&t(1,l=i.titletag),"alert"in i&&t(2,c=i.alert),"href"in i&&t(3,m=i.href),"linkcontent"in i&&t(4,d=i.linkcontent),"type"in i&&t(5,f=i.type),"closable"in i&&t(6,h=i.closable),"size"in i&&t(7,g=i.size),"hasfooter"in i&&t(8,w=i.hasfooter)},i.$$.update=()=>{t(9,o=Object.assign({},a)),512&i.$$.dirty&&delete o.class},e=x(e),[r,l,c,m,d,f,h,g,w,o,function(i){p.dispatch("close",i)},e]}class Z extends i{constructor(i){super();const s=document.createElement("style");s.textContent=".mc-link{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:inherit;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;line-height:inherit;text-decoration:underline;-webkit-transition:color ease 200ms;-o-transition:color ease 200ms;transition:color ease 200ms;gap:0.25rem;color:#000000;position:relative;font-size:1rem;line-height:1.375}.mc-link:focus{outline:none}.mc-link:focus::after{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-link.is-visited,.mc-link:visited{color:#333333}.mc-link.is-hover,.mc-link:hover{color:#666666}.mc-link.is-active,.mc-link:active{color:#333333}.mc-link.is-disabled{color:#e6e6e6;cursor:not-allowed}.mc-link--s{font-size:0.875rem;line-height:1.2857142857}.mc-link--m{font-size:1rem;line-height:1.375}.mc-link::after{border-radius:2px;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;content:\"\";display:block;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease}.mc-link__icon{display:block;height:1rem;fill:currentColor;-ms-flex-negative:0;flex-shrink:0;width:1rem}.mc-link--light{color:#ffffff}.mc-link--light.is-visited,.mc-link--light:visited{color:#cccccc}.mc-link--light.is-hover,.mc-link--light:hover{color:#999999}.mc-link--light.is-active,.mc-link--light:active{color:#cccccc}.mc-link--light.is-disabled{color:#e6e6e6;cursor:not-allowed}.mc-link--primary{color:#188803}.mc-link--primary.is-visited,.mc-link--primary:visited{color:#006902}.mc-link--primary.is-hover,.mc-link--primary:hover{color:#035010}.mc-link--primary.is-active,.mc-link--primary:active{color:#006902}.mc-link--primary.is-disabled{color:#e6e6e6;cursor:not-allowed}.mc-link--primary-02{color:#494f60}.mc-link--primary-02.is-visited,.mc-link--primary-02:visited{color:#343b4c}.mc-link--primary-02.is-hover,.mc-link--primary-02:hover{color:#171b26}.mc-link--primary-02.is-active,.mc-link--primary-02:active{color:#343b4c}.mc-link--primary-02.is-disabled{color:#e6e6e6;cursor:not-allowed}.mc-link--danger{color:#c61112}.mc-link--danger.is-visited,.mc-link--danger:visited{color:#8c0003}.mc-link--danger.is-hover,.mc-link--danger:hover{color:#530000}.mc-link--danger.is-active,.mc-link--danger:active{color:#8c0003}.mc-link--danger.is-disabled{color:#e6e6e6;cursor:not-allowed}@media screen and (min-width: 680px){.mc-link--s\\@from-m{font-size:0.875rem;line-height:1.2857142857}.mc-link--m\\@from-m{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1024px){.mc-link--s\\@from-l{font-size:0.875rem;line-height:1.2857142857}.mc-link--m\\@from-l{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1280px){.mc-link--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857}.mc-link--m\\@from-xl{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1920px){.mc-link--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857}.mc-link--m\\@from-xxl{font-size:1rem;line-height:1.375}}.mc-notification{font-family:\"LeroyMerlin\", sans-serif;font-weight:400;border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;padding:1rem 1.5rem 1.5rem 1rem;background:#daeff7;-webkit-box-shadow:inset 0 0 0 1px #0b96cc;box-shadow:inset 0 0 0 1px #0b96cc;-webkit-box-sizing:border-box;box-sizing:border-box;color:#000000}.mc-notification::before{background-size:2rem;-webkit-box-flex:0;-ms-flex:0 0 2rem;flex:0 0 2rem;height:2rem;margin-right:1rem;width:2rem}.mc-notification .mc-notification__content{padding-top:0.25rem}.mc-notification::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='2rem' width='2rem' viewBox='0 0 32 32' fill='%23007bb4'%3E%3Cpath d='M16,29A13,13,0,1,1,29,16,13,13,0,0,1,16,29ZM16,5A11,11,0,1,0,27,16,11,11,0,0,0,16,5Z'/%3E%3Cpath d='M16,21.7a1,1,0,0,1-1-1V14.87a1,1,0,1,1,2,0V20.7A1,1,0,0,1,16,21.7Z'/%3E%3Ccircle cx='16' cy='11.3' r='1'/%3E%3C/svg%3E\")}.mc-notification::before{background-color:transparent;background-repeat:no-repeat;content:\"\";display:block}.mc-notification__content{-webkit-box-flex:1;-ms-flex:1 1 0px;flex:1 1 0}.mc-notification__title,.mc-notification__message{margin-bottom:0;margin-top:0}.mc-notification__title{font-family:\"LeroyMerlin\", sans-serif;font-weight:600;font-size:1rem;line-height:1.5}.mc-notification__message{font-size:0.875rem;line-height:1.5714285714}.mc-notification__footer{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-top:1rem}.mc-notification__link{font-size:0.875rem;line-height:1.2857142857;margin-top:0.5rem}.mc-notification--information{background:#daeff7;-webkit-box-shadow:inset 0 0 0 1px #0b96cc;box-shadow:inset 0 0 0 1px #0b96cc}.mc-notification--information::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='2rem' width='2rem' viewBox='0 0 32 32' fill='%23007bb4'%3E%3Cpath d='M16,29A13,13,0,1,1,29,16,13,13,0,0,1,16,29ZM16,5A11,11,0,1,0,27,16,11,11,0,0,0,16,5Z'/%3E%3Cpath d='M16,21.7a1,1,0,0,1-1-1V14.87a1,1,0,1,1,2,0V20.7A1,1,0,0,1,16,21.7Z'/%3E%3Ccircle cx='16' cy='11.3' r='1'/%3E%3C/svg%3E\")}.mc-notification--success{background:#ebf5de;-webkit-box-shadow:inset 0 0 0 1px #46a610;box-shadow:inset 0 0 0 1px #46a610}.mc-notification--success::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='2rem' width='2rem' fill='%23188803' viewBox='0 0 32 32'%3E%3Cpath d='M16,5A11,11,0,1,1,5,16,11,11,0,0,1,16,5m0-2A13,13,0,1,0,29,16,13,13,0,0,0,16,3Z'/%3E%3Cpath d='M14.2,21.45,8.5,16.18a1,1,0,1,1,1.35-1.47l4.28,4,8-8.09a1,1,0,0,1,1.42,0,1,1,0,0,1,0,1.41Z'/%3E%3C/svg%3E\")}.mc-notification--warning{background:#fdf1e8;-webkit-box-shadow:inset 0 0 0 1px #ea7315;box-shadow:inset 0 0 0 1px #ea7315}.mc-notification--warning::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='2rem' width='2rem' viewBox='0 0 32 32' fill='%23c65200'%3E%3Cpath d='M16,29A13,13,0,1,1,29,16,13,13,0,0,1,16,29ZM16,5A11,11,0,1,0,27,16,11,11,0,0,0,16,5Z'/%3E%3Cpath d='M16,18.13a1,1,0,0,1-1-1V11.3a1,1,0,0,1,2,0v5.83A1,1,0,0,1,16,18.13Z'/%3E%3Ccircle cx='16' cy='20.7' r='1'/%3E%3C/svg%3E\")}.mc-notification--danger{background:#fdeaea;-webkit-box-shadow:inset 0 0 0 1px #ea302d;box-shadow:inset 0 0 0 1px #ea302d}.mc-notification--danger::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='2rem' width='2rem' viewBox='0 0 32 32' fill='%23c61112'%3E%3Cpath d='M16,3A13,13,0,1,0,29,16,13,13,0,0,0,16,3Zm0,24A11,11,0,1,1,27,16,11,11,0,0,1,16,27Z'/%3E%3Cpath d='M20.71,11.29a1,1,0,0,0-1.42,0L16,14.59l-3.29-3.3a1,1,0,0,0-1.42,1.42L14.59,16l-3.3,3.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L16,17.41l3.29,3.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42L17.41,16l3.3-3.29A1,1,0,0,0,20.71,11.29Z'/%3E%3C/svg%3E\")}.mc-notification--s{padding:0.75rem 0.75rem 1.5rem}.mc-notification--s::before{background-size:1.5rem;-webkit-box-flex:0;-ms-flex:0 0 1.5rem;flex:0 0 1.5rem;height:1.5rem;margin-right:0.5rem;width:1.5rem}.mc-notification--s .mc-notification__content{padding-top:0}.mc-notification--s::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.5rem' width='1.5rem' viewBox='0 0 24 24' fill='%23007bb4'%3E%3Cpath d='M12 22a10 10 0 1110-10 10 10 0 01-10 10zm0-18a8 8 0 108 8 8 8 0 00-8-8z'/%3E%3Cpath d='M12 17a1 1 0 01-1-1v-4.39a1 1 0 012 0V16a1 1 0 01-1 1z'/%3E%3Ccircle cx='12' cy='8' r='1'/%3E%3C/svg%3E\")}.mc-notification--s.mc-notification--success::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.5rem' width='1.5rem' viewBox='0 0 24 24' fill='%23188803'%3E%3Cpath d='M12 4a8 8 0 11-8 8 8 8 0 018-8m0-2a10 10 0 1010 10A10 10 0 0012 2z'/%3E%3Cpath d='M10.73 15.75a1 1 0 01-.68-.26l-3-2.74a1 1 0 011.36-1.47l2.25 2.08 4.36-4.42a1 1 0 111.42 1.41l-5 5.1a1 1 0 01-.71.3z'/%3E%3C/svg%3E\")}.mc-notification--s.mc-notification--warning::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.5rem' width='1.5rem' viewBox='0 0 24 24' fill='%23c65200'%3E%3Cpath d='M12 2a10 10 0 1010 10A10 10 0 0012 2zm0 18a8 8 0 118-8 8 8 0 01-8 8z'/%3E%3Cpath d='M12 7a1 1 0 00-1 1v4.38a1 1 0 002 0V8a1 1 0 00-1-1z'/%3E%3Ccircle cx='12' cy='16' r='1'/%3E%3C/svg%3E\")}.mc-notification--s.mc-notification--danger::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.5rem' width='1.5rem' viewBox='0 0 24 24' fill='%23c61112'%3E%3Cpath d='M12 2a10 10 0 1010 10A10 10 0 0012 2zm0 18a8 8 0 118-8 8 8 0 01-8 8z'/%3E%3Cpath d='M16.21 7.88a1 1 0 00-1.42 0l-2.74 2.74-2.84-2.83a1 1 0 10-1.42 1.42L10.63 12l-2.77 2.79a1 1 0 001.41 1.42l2.78-2.77 2.68 2.68a1 1 0 001.41-1.42L13.46 12l2.75-2.7a1 1 0 000-1.42z'/%3E%3C/svg%3E\")}.mc-notification-closable{position:relative}.mc-notification-closable__close{position:relative;background:transparent url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1rem' width='1rem' fill='%23000000' viewBox='0 0 16 16'%3E%3Cpath d='M9.41 8l3.3-3.29a1 1 0 10-1.42-1.42L8 6.59l-3.29-3.3a1 1 0 00-1.42 1.42L6.59 8l-3.3 3.29a1 1 0 000 1.42 1 1 0 001.42 0L8 9.41l3.29 3.3a1 1 0 001.42 0 1 1 0 000-1.42z'/%3E%3C/svg%3E\") no-repeat;background-size:1rem;border:0;cursor:pointer;display:block;height:1rem;padding:0;position:absolute;outline:0;right:1rem;top:1rem;width:1rem}.mc-notification-closable__close::after{border-radius:2px;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;content:\"\";display:block;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease}.mc-notification-closable__close:focus::after{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;-webkit-box-shadow:0 0 0 0.125rem #0b96cc;box-shadow:0 0 0 0.125rem #0b96cc}@media screen and (min-width: 1024px){.mc-notification__footer{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}",this.shadowRoot.appendChild(s),e(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},A,_,a,{title:0,titletag:1,alert:2,href:3,linkcontent:4,type:5,closable:6,size:7,hasfooter:8},null),i&&(i.target&&o(i.target,this,i.anchor),i.props&&(this.$set(i.props),n()))}static get observedAttributes(){return["title","titletag","alert","href","linkcontent","type","closable","size","hasfooter"]}get title(){return this.$$.ctx[0]}set title(i){this.$$set({title:i}),n()}get titletag(){return this.$$.ctx[1]}set titletag(i){this.$$set({titletag:i}),n()}get alert(){return this.$$.ctx[2]}set alert(i){this.$$set({alert:i}),n()}get href(){return this.$$.ctx[3]}set href(i){this.$$set({href:i}),n()}get linkcontent(){return this.$$.ctx[4]}set linkcontent(i){this.$$set({linkcontent:i}),n()}get type(){return this.$$.ctx[5]}set type(i){this.$$set({type:i}),n()}get closable(){return this.$$.ctx[6]}set closable(i){this.$$set({closable:i}),n()}get size(){return this.$$.ctx[7]}set size(i){this.$$set({size:i}),n()}get hasfooter(){return this.$$.ctx[8]}set hasfooter(i){this.$$set({hasfooter:i}),n()}}export{Z as default};
459
2
  //# sourceMappingURL=Notification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.js","sources":["../../../src/components/notification/Notification.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import type {\n NotificationTitleTag,\n NotificationType,\n NotificationSize,\n } from './notification.types';\n import { EventHandler } from '../../utilities/EventHandler';\n\n export let title: string;\n export let titletag: NotificationTitleTag = 'h3';\n export let alert = false;\n export let href: string;\n export let linkcontent: string;\n export let type: NotificationType;\n export let closable = false;\n export let size: NotificationSize = 'm';\n export let hasfooter = false;\n\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n let eventHandler = new EventHandler();\n\n function setClasses(\n type: NotificationType,\n size: NotificationSize,\n closable: boolean,\n ): string {\n const classes = ['mc-notification'];\n\n if (type) {\n classes.push(`mc-notification--${type}`);\n }\n\n if (size && size !== 'm') {\n classes.push(`mc-notification--${size}`);\n }\n\n if (closable) {\n classes.push('mc-notification-closable');\n }\n\n return classes.join(' ');\n }\n\n function emitClose(e: CustomEventInit): void {\n eventHandler.dispatch('close', e);\n }\n</script>\n\n<div\n class=\"{setClasses(type, size, closable)} {$$props.class}\"\n role={alert ? 'alert' : 'status'}\n {...attributes}\n>\n <div class=\"mc-notification__content\">\n {#if title}\n {@html `<${titletag} class=\"mc-notification__title\">${title}</${titletag}>`}\n {/if}\n <div class=\"mc-notification__message\">\n <slot />\n </div>\n {#if href && linkcontent}\n <div class=\"mc-notification__footer\">\n <a class=\"mc-notification__link mc-link\" {href}>{linkcontent}</a>\n </div>\n {:else if hasfooter}\n <div class=\"mc-notification__footer\">\n <slot name=\"footer\" />\n </div>\n {/if}\n </div>\n {#if closable}\n <button\n type=\"button\"\n class=\"mc-notification-closable__close\"\n title=\"Close\"\n on:click={emitClose}\n />\n {/if}\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/_c.links';\n @import '@mozaic-ds/styles/components/_c.notification';\n</style>\n"],"names":[],"mappings":";;;;;;;kCA2DiB,GAAQ,CAAA,CAAA,CAAA,CAAA,gCAAA,YAAmC,GAAK,CAAA,CAAA,CAAA,CAAA,EAAA,eAAK,GAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAA,CAAA;;;;;;;;;;;;;;oFAA7D,GAAQ,CAAA,CAAA,CAAA,CAAA,gCAAA,YAAmC,GAAK,CAAA,CAAA,CAAA,CAAA,EAAA,eAAK,GAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAA,CAAA,EAAA,QAAA,CAAA,CAAA,CAAA,SAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;GAUxE,MAEK,CAAA,MAAA,EAAA,GAAA,EAAA,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;4BAL8C,GAAW,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;GAD9D,MAEK,CAAA,MAAA,EAAA,GAAA,EAAA,MAAA,CAAA,CAAA;GADH,MAAgE,CAAA,GAAA,EAAA,CAAA,CAAA,CAAA;;;;+DAAf,GAAW,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GAShE,MAKC,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;;;oDADW,GAAS,CAAA,EAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;2BArBhB,GAAK,CAAA,CAAA,CAAA,IAAA,iBAAA,CAAA,GAAA,CAAA,CAAA;;;AAML,EAAA,aAAA,GAAI,uBAAI,GAAW,CAAA,CAAA,CAAA,EAAA,OAAA,iBAAA,CAAA;oBAId,GAAS,CAAA,CAAA,CAAA,EAAA,OAAA,iBAAA,CAAA;;;;;8BAMhB,GAAQ,CAAA,CAAA,CAAA,IAAA,eAAA,CAAA,GAAA,CAAA,CAAA;;;;mCArBL,UAAU,UAAC,GAAI,CAAE,CAAA,CAAA,WAAA,GAAI,kBAAE,GAAQ,CAAA,CAAA,CAAA,CAAA,GAAA,GAAA,eAAI,GAAO,CAAA,EAAA,CAAA,CAAC,KAAK,CAAA;;;qCAClD,GAAK,CAAA,CAAA,CAAA,GAAG,OAAO,GAAG,QAAQ;;iBAC5B,GAAU,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GAHhB,MA8BK,CAAA,MAAA,EAAA,IAAA,EAAA,MAAA,CAAA,CAAA;GAzBH,MAgBK,CAAA,IAAA,EAAA,IAAA,CAAA,CAAA;;;GAZH,MAEK,CAAA,IAAA,EAAA,IAAA,CAAA,CAAA;;;;;;;iBALA,GAAK,CAAA,CAAA,CAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;oBAgBP,GAAQ,CAAA,CAAA,CAAA,EAAA;;;;;;;;;;;;;;qGArBL,UAAU,UAAC,GAAI,CAAE,CAAA,CAAA,WAAA,GAAI,kBAAE,GAAQ,CAAA,CAAA,CAAA,CAAA,GAAA,GAAA,eAAI,GAAO,CAAA,EAAA,CAAA,CAAC,KAAK,CAAA,CAAA,IAAA,EAAA,KAAA,EAAA,gBAAA,EAAA;4EAClD,GAAK,CAAA,CAAA,CAAA,GAAG,OAAO,GAAG,QAAQ,CAAA,IAAA,EAAA,IAAA,EAAA,eAAA,EAAA;iDAC5B,GAAU,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;AA9BL,SAAA,UAAU,CACjB,IAAsB,EACtB,IAAsB,EACtB,QAAiB,EAAA;AAEX,CAAA,MAAA,OAAO,IAAI,iBAAiB,CAAA,CAAA;;KAE9B,IAAI,EAAA;EACN,OAAO,CAAC,IAAI,CAAA,CAAA,iBAAA,EAAqB,IAAI,CAAA,CAAA,CAAA,CAAA;;;KAGnC,IAAI,IAAI,IAAI,KAAK,GAAG,EAAA;EACtB,OAAO,CAAC,IAAI,CAAA,CAAA,iBAAA,EAAqB,IAAI,CAAA,CAAA,CAAA,CAAA;;;KAGnC,QAAQ,EAAA;EACV,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAA,CAAA;;;QAGlC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAA,CAAA;;;;;;;;;;;OAlCd,KAAa,EAAA,GAAA,OAAA,CAAA;AACb,CAAA,IAAA,EAAA,QAAQ,GAAyB,IAAI,EAAA,GAAA,OAAA,CAAA;AACrC,CAAA,IAAA,EAAA,KAAK,GAAG,KAAK,EAAA,GAAA,OAAA,CAAA;OACb,IAAY,EAAA,GAAA,OAAA,CAAA;OACZ,WAAmB,EAAA,GAAA,OAAA,CAAA;OACnB,IAAsB,EAAA,GAAA,OAAA,CAAA;AACtB,CAAA,IAAA,EAAA,QAAQ,GAAG,KAAK,EAAA,GAAA,OAAA,CAAA;AAChB,CAAA,IAAA,EAAA,IAAI,GAAqB,GAAG,EAAA,GAAA,OAAA,CAAA;AAC5B,CAAA,IAAA,EAAA,SAAS,GAAG,KAAK,EAAA,GAAA,OAAA,CAAA;AAKxB,CAAA,IAAA,YAAY,OAAO,YAAY,EAAA,CAAA;;AAwB1B,CAAA,SAAA,SAAS,CAAC,CAAkB,EAAA;AACnC,EAAA,YAAY,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;AA5BlC,kBAAG,UAAU,GAAf,MAAA,CAAA,MAAA,KAAuB,WAAW,CAAA,CAAA,CAAA;;;GAC/B,OAAS,UAAU,CAAC,KAAK,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Notification.js","sources":["../../../src/components/notification/Notification.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import type {\n NotificationTitleTag,\n NotificationType,\n NotificationSize,\n } from './notification.types';\n import { EventHandler } from '../../utilities/EventHandler';\n\n export let title: string;\n export let titletag: NotificationTitleTag = 'h3';\n export let alert = false;\n export let href: string;\n export let linkcontent: string;\n export let type: NotificationType;\n export let closable = false;\n export let size: NotificationSize = 'm';\n export let hasfooter = false;\n\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n let eventHandler = new EventHandler();\n\n function setClasses(\n type: NotificationType,\n size: NotificationSize,\n closable: boolean,\n ): string {\n const classes = ['mc-notification'];\n\n if (type) {\n classes.push(`mc-notification--${type}`);\n }\n\n if (size && size !== 'm') {\n classes.push(`mc-notification--${size}`);\n }\n\n if (closable) {\n classes.push('mc-notification-closable');\n }\n\n return classes.join(' ');\n }\n\n function emitClose(e: CustomEventInit): void {\n eventHandler.dispatch('close', e);\n }\n</script>\n\n<div\n class=\"{setClasses(type, size, closable)} {$$props.class}\"\n role={alert ? 'alert' : 'status'}\n {...attributes}\n>\n <div class=\"mc-notification__content\">\n {#if title}\n {@html `<${titletag} class=\"mc-notification__title\">${title}</${titletag}>`}\n {/if}\n <div class=\"mc-notification__message\">\n <slot />\n </div>\n {#if href && linkcontent}\n <div class=\"mc-notification__footer\">\n <a class=\"mc-notification__link mc-link\" {href}>{linkcontent}</a>\n </div>\n {:else if hasfooter}\n <div class=\"mc-notification__footer\">\n <slot name=\"footer\" />\n </div>\n {/if}\n </div>\n {#if closable}\n <button\n type=\"button\"\n class=\"mc-notification-closable__close\"\n title=\"Close\"\n on:click={emitClose}\n />\n {/if}\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/_c.links';\n @import '@mozaic-ds/styles/components/_c.notification';\n</style>\n"],"names":["ctx","html_tag","p","raw_value","insert","target","div","anchor","append","a","button","create_if_block_3","create_if_block_1","create_if_block_2","create_if_block","setClasses","class","div2","div1","div0","div2_class_value","role","div2_role_value","type","size","closable","classes","push","join","title","$$props","titletag","alert","href","linkcontent","hasfooter","eventHandler","EventHandler","attributes","Object","assign","$$restProps","e","dispatch"],"mappings":"8QA2DiBA,EAAQ,qCAAmCA,EAAK,OAAKA,EAAQ,6FAA7DA,EAAQ,qCAAmCA,EAAK,OAAKA,EAAQ,QAAAC,EAAAC,EAAAC,+JAUxEC,EAEKC,EAAAC,EAAAC,kFAL8CP,EAAW,iHAD9DI,EAEKC,EAAAC,EAAAC,GADHC,EAAgEF,EAAAG,4BAAfT,EAAW,4LAShEI,EAKCC,EAAAK,EAAAH,qBADWP,EAAS,4EArBhBA,EAAK,IAAAW,EAAAX,mBAML,OAAAA,MAAQA,EAAW,GAAAY,EAIdZ,EAAS,GAAAa,gCAMhBb,EAAQ,IAAAc,EAAAd,eArBLe,EAAWf,EAAM,GAAAA,KAAMA,EAAQ,IAAA,IAAIA,EAAO,IAACgB,eAC7ChB,EAAK,GAAG,QAAU,UACpBA,EAAU,8QAHhBI,EA8BKC,EAAAY,EAAAV,GAzBHC,EAgBKS,EAAAC,yBAZHV,EAEKU,EAAAC,yDALAnB,EAAK,+HAgBPA,EAAQ,sFArBLe,EAAWf,EAAM,GAAAA,KAAMA,EAAQ,IAAA,IAAIA,EAAO,IAACgB,QAAK,CAAAA,MAAAI,eAClDpB,EAAK,GAAG,QAAU,WAAQ,CAAAqB,KAAAC,UAC5BtB,EAAU,yDA9BL,SAAAe,EACPQ,EACAC,EACAC,GAEM,MAAAC,GAAW,0BAEbH,GACFG,EAAQC,KAAI,oBAAqBJ,KAG/BC,GAAiB,MAATA,GACVE,EAAQC,KAAI,oBAAqBH,KAG/BC,GACFC,EAAQC,KAAK,4BAGRD,EAAQE,KAAK,gJAlCXC,GAAaC,GACbC,SAAAA,EAAiC,MAAID,GACrCE,MAAAA,GAAQ,GAAKF,QACbG,GAAYH,eACZI,GAAmBJ,QACnBP,GAAsBO,GACtBL,SAAAA,GAAW,GAAKK,GAChBN,KAAAA,EAAyB,KAAGM,GAC5BK,UAAAA,GAAY,GAAKL,EAKxBM,MAAmBC,wWAHpBC,EAALC,OAAAC,UAAuBC,2BACXH,EAAWtB,mCA0BZ,SAAU0B,GACjBN,EAAaO,SAAS,QAASD"}