@mozaic-ds/web-components 0.5.0 → 0.6.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 (198) hide show
  1. package/package.json +3 -3
  2. package/public/ClickOutside-63071e7a.js +1 -15
  3. package/public/ClickOutside-63071e7a.js.map +1 -1
  4. package/public/DataTableDefaultAction.nested-4da4dc44.js +1 -759
  5. package/public/DataTableDefaultAction.nested-4da4dc44.js.map +1 -1
  6. package/public/DataTableUtilities-60220c78.js +1 -370
  7. package/public/DataTableUtilities-60220c78.js.map +1 -1
  8. package/public/EventForward-8492ff62.js +1 -109
  9. package/public/EventForward-8492ff62.js.map +1 -1
  10. package/public/EventHandler-02058705.js +1 -15
  11. package/public/EventHandler-02058705.js.map +1 -1
  12. package/public/adeo/components/layer/Layer.js +1 -1
  13. package/public/adeo/components/layer/Layer.js.map +1 -1
  14. package/public/adeo/components/layer/Layer.svelte +2 -1
  15. package/public/adeo/components/phonenumber/PhoneNumber.js +1 -1
  16. package/public/adeo/components/phonenumber/PhoneNumber.js.map +1 -1
  17. package/public/adeo/components/phonenumber/PhoneNumber.svelte +72 -9
  18. package/public/adeo/components/quantityselector/QuantitySelector.js +1 -1
  19. package/public/adeo/components/quantityselector/QuantitySelector.js.map +1 -1
  20. package/public/adeo/components/quantityselector/QuantitySelector.svelte +6 -3
  21. package/public/array-5b770a93.js +1 -13
  22. package/public/array-5b770a93.js.map +1 -1
  23. package/public/axis-fbc0f7b5.js +1 -174
  24. package/public/axis-fbc0f7b5.js.map +1 -1
  25. package/public/band-d7a07d2c.js +1 -186
  26. package/public/band-d7a07d2c.js.map +1 -1
  27. package/public/bricoman/components/chart/Donut.js +1 -1
  28. package/public/bricoman/components/header/Header.js +1 -1
  29. package/public/bricoman/components/hero/Hero.js +1 -1
  30. package/public/bricoman/components/layer/Layer.js +1 -1
  31. package/public/bricoman/components/layer/Layer.js.map +1 -1
  32. package/public/bricoman/components/layer/Layer.svelte +2 -1
  33. package/public/bricoman/components/listbox/Listbox.js +1 -1
  34. package/public/bricoman/components/listbox/Listbox.nested.js +1 -1
  35. package/public/bricoman/components/phonenumber/PhoneNumber.js +1 -1
  36. package/public/bricoman/components/phonenumber/PhoneNumber.js.map +1 -1
  37. package/public/bricoman/components/phonenumber/PhoneNumber.svelte +72 -9
  38. package/public/bricoman/components/price/Price.js +1 -1
  39. package/public/bricoman/components/quantityselector/QuantitySelector.js +1 -1
  40. package/public/bricoman/components/quantityselector/QuantitySelector.js.map +1 -1
  41. package/public/bricoman/components/quantityselector/QuantitySelector.svelte +6 -3
  42. package/public/components/accordion/Accordion.js +1 -365
  43. package/public/components/accordion/Accordion.js.map +1 -1
  44. package/public/components/autocomplete/Autocomplete.js +1 -1515
  45. package/public/components/autocomplete/Autocomplete.js.map +1 -1
  46. package/public/components/badge/Badge.js +1 -155
  47. package/public/components/badge/Badge.js.map +1 -1
  48. package/public/components/badge/Badge.nested.js +1 -101
  49. package/public/components/badge/Badge.nested.js.map +1 -1
  50. package/public/components/breadcrumb/Breadcrumb.js +1 -372
  51. package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
  52. package/public/components/breadcrumb/Breadcrumb.nested.js +1 -319
  53. package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
  54. package/public/components/button/Button.js +1 -1138
  55. package/public/components/button/Button.js.map +1 -1
  56. package/public/components/card/Card.js +1 -369
  57. package/public/components/card/Card.js.map +1 -1
  58. package/public/components/chart/BarChart.js +1 -582
  59. package/public/components/chart/BarChart.js.map +1 -1
  60. package/public/components/chart/Donut.js +1 -1189
  61. package/public/components/chart/Donut.js.map +1 -1
  62. package/public/components/chart/GroupedBarChart.js +1 -750
  63. package/public/components/chart/GroupedBarChart.js.map +1 -1
  64. package/public/components/chart/LineChart.js +1 -1731
  65. package/public/components/chart/LineChart.js.map +1 -1
  66. package/public/components/chart/Radar.js +1 -729
  67. package/public/components/chart/Radar.js.map +1 -1
  68. package/public/components/chart/StackedBarChart.js +1 -745
  69. package/public/components/chart/StackedBarChart.js.map +1 -1
  70. package/public/components/checkbox/Checkbox.js +1 -307
  71. package/public/components/checkbox/Checkbox.js.map +1 -1
  72. package/public/components/checkboxgroup/checkboxGroup.js +1 -404
  73. package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
  74. package/public/components/datatable/DataTable.js +1 -3064
  75. package/public/components/datatable/DataTable.js.map +1 -1
  76. package/public/components/datatable/DataTableDefaultAction.nested.js +1 -4
  77. package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
  78. package/public/components/datatable/DataTableDefaultEdtion.nested.js +1 -164
  79. package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
  80. package/public/components/datatable/DataTableDefaultFilterTags.nested.js +1 -380
  81. package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
  82. package/public/components/datatable/DataTableDefaultSelection.nested.js +1 -424
  83. package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
  84. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +1 -263
  85. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
  86. package/public/components/datatable/DataTableFooter.nested.js +1 -637
  87. package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
  88. package/public/components/dropdown/Dropdown.js +1 -1426
  89. package/public/components/dropdown/Dropdown.js.map +1 -1
  90. package/public/components/field/Field.js +1 -375
  91. package/public/components/field/Field.js.map +1 -1
  92. package/public/components/fileuploader/FileUploader.js +1 -555
  93. package/public/components/fileuploader/FileUploader.js.map +1 -1
  94. package/public/components/fileuploader/ResultFile.nested.js +1 -265
  95. package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
  96. package/public/components/flag/Flag.js +1 -174
  97. package/public/components/flag/Flag.js.map +1 -1
  98. package/public/components/header/Header.js +1 -903
  99. package/public/components/header/Header.js.map +1 -1
  100. package/public/components/hero/Hero.js +1 -271
  101. package/public/components/hero/Hero.js.map +1 -1
  102. package/public/components/layer/Layer.js +1 -453
  103. package/public/components/layer/Layer.js.map +1 -1
  104. package/public/components/layer/Layer.svelte +2 -1
  105. package/public/components/link/Link.js +1 -380
  106. package/public/components/link/Link.js.map +1 -1
  107. package/public/components/listbox/Listbox.js +1 -595
  108. package/public/components/listbox/Listbox.js.map +1 -1
  109. package/public/components/listbox/Listbox.nested.js +1 -629
  110. package/public/components/listbox/Listbox.nested.js.map +1 -1
  111. package/public/components/loader/Loader.js +1 -246
  112. package/public/components/loader/Loader.js.map +1 -1
  113. package/public/components/loader/Loader.nested.js +1 -176
  114. package/public/components/loader/Loader.nested.js.map +1 -1
  115. package/public/components/modal/Modal.js +1 -395
  116. package/public/components/modal/Modal.js.map +1 -1
  117. package/public/components/notification/Notification.js +1 -458
  118. package/public/components/notification/Notification.js.map +1 -1
  119. package/public/components/optionbutton/OptionButton.js +1 -316
  120. package/public/components/optionbutton/OptionButton.js.map +1 -1
  121. package/public/components/overlay/Overlay.js +1 -104
  122. package/public/components/overlay/Overlay.js.map +1 -1
  123. package/public/components/overlay/OverlayLoader.js +1 -151
  124. package/public/components/overlay/OverlayLoader.js.map +1 -1
  125. package/public/components/pagination/Pagination.js +1 -613
  126. package/public/components/pagination/Pagination.js.map +1 -1
  127. package/public/components/passwordinput/PasswordInput.js +1 -291
  128. package/public/components/passwordinput/PasswordInput.js.map +1 -1
  129. package/public/components/phonenumber/PhoneNumber.js +1 -6894
  130. package/public/components/phonenumber/PhoneNumber.js.map +1 -1
  131. package/public/components/price/Price.js +1 -768
  132. package/public/components/price/Price.js.map +1 -1
  133. package/public/components/progressbar/ProgressBar.js +1 -278
  134. package/public/components/progressbar/ProgressBar.js.map +1 -1
  135. package/public/components/quantityselector/QuantitySelector.js +1 -333
  136. package/public/components/quantityselector/QuantitySelector.js.map +1 -1
  137. package/public/components/quantityselector/QuantitySelector.svelte +6 -3
  138. package/public/components/radio/Radio.js +1 -273
  139. package/public/components/radio/Radio.js.map +1 -1
  140. package/public/components/radiogroup/RadioGroup.js +1 -414
  141. package/public/components/radiogroup/RadioGroup.js.map +1 -1
  142. package/public/components/ratings/StarsInput.js +1 -292
  143. package/public/components/ratings/StarsInput.js.map +1 -1
  144. package/public/components/ratings/StarsResult.js +1 -246
  145. package/public/components/ratings/StarsResult.js.map +1 -1
  146. package/public/components/select/Select.js +1 -451
  147. package/public/components/select/Select.js.map +1 -1
  148. package/public/components/sidebar/Sidebar.js +1 -784
  149. package/public/components/sidebar/Sidebar.js.map +1 -1
  150. package/public/components/sidebar/sidebar-feature-group.nested.js +1 -594
  151. package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
  152. package/public/components/sidebar/sidebar-feature.nested.js +1 -402
  153. package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
  154. package/public/components/sidebar/sidebar-section.nested.js +1 -394
  155. package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
  156. package/public/components/sidebar/sidebar-segment.nested.js +1 -200
  157. package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
  158. package/public/components/sidebar/sidebar-separator.nested.js +1 -49
  159. package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
  160. package/public/components/sidebar/sidebar-sub-features.nested.js +1 -312
  161. package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
  162. package/public/components/sidebar/sidebar-user.nested.js +1 -733
  163. package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
  164. package/public/components/stepper/Stepper.js +1 -371
  165. package/public/components/stepper/Stepper.js.map +1 -1
  166. package/public/components/tabs/Tabs.js +1 -615
  167. package/public/components/tabs/Tabs.js.map +1 -1
  168. package/public/components/tabs/Tabs.nested.js +1 -472
  169. package/public/components/tabs/Tabs.nested.js.map +1 -1
  170. package/public/components/tag/Tag.js +1 -665
  171. package/public/components/tag/Tag.js.map +1 -1
  172. package/public/components/tag/Tag.nested.js +1 -554
  173. package/public/components/tag/Tag.nested.js.map +1 -1
  174. package/public/components/taglist/TagList.js +1 -475
  175. package/public/components/taglist/TagList.js.map +1 -1
  176. package/public/components/textarea/Textarea.js +1 -303
  177. package/public/components/textarea/Textarea.js.map +1 -1
  178. package/public/components/textinput/Textinput.js +1 -497
  179. package/public/components/textinput/Textinput.js.map +1 -1
  180. package/public/components/textinput/Textinput.nested.js +1 -320
  181. package/public/components/textinput/Textinput.nested.js.map +1 -1
  182. package/public/components/toggle/Toggle.js +1 -278
  183. package/public/components/toggle/Toggle.js.map +1 -1
  184. package/public/components/tooltip/Tooltip.js +1 -173
  185. package/public/components/tooltip/Tooltip.js.map +1 -1
  186. package/public/index-c33b3772.js +1 -873
  187. package/public/index-c33b3772.js.map +1 -1
  188. package/public/linear-f46d7e9e.js +1 -700
  189. package/public/linear-f46d7e9e.js.map +1 -1
  190. package/public/path-1b5da959.js +1 -186
  191. package/public/path-1b5da959.js.map +1 -1
  192. package/public/sidebar-service-275bf9ef.js +1 -129
  193. package/public/sidebar-service-275bf9ef.js.map +1 -1
  194. package/public/symbol-b05a6e2b.js +1 -169
  195. package/public/symbol-b05a6e2b.js.map +1 -1
  196. package/public/transform-15d69d5d.js +1 -2743
  197. package/public/transform-15d69d5d.js.map +1 -1
  198. package/public/utilities/stories/quantityselector/QuantitySelector.stories.d.ts.map +1 -1
@@ -1,785 +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, x as create_component, n as noop, g as attr, h as set_attributes, j as append, A as mount_component, l as listen, C as transition_in, D as transition_out, E as check_outros, m as get_spread_update, o as detach, G as destroy_component, p as compute_rest_props, ab as component_subscribe, ac as onDestroy, q as exclude_internal_props, M as group_outros, J as destroy_each, ad as globals, T as svg_element } from '../../index-c33b3772.js';
2
- import Sidebar_segment_nested from './sidebar-segment.nested.js';
3
- import Sidebar_section_nested from './sidebar-section.nested.js';
4
- import Sidebar_user_nested from './sidebar-user.nested.js';
5
- import Sidebar_separator_nested from './sidebar-separator.nested.js';
6
- import { E as EventHandler } from '../../EventHandler-02058705.js';
7
- import { i as isSidebarOpen, s as selectedFeature, t as toggleSidebar, u as updateSidebarData, a as selectFeature, b as sidebar } from '../../sidebar-service-275bf9ef.js';
8
- import './sidebar-feature-group.nested.js';
9
- import './sidebar-feature.nested.js';
10
- import './sidebar-sub-features.nested.js';
11
-
12
- /* src/components/sidebar/Sidebar.svelte generated by Svelte v3.58.0 */
13
-
14
- const { Boolean: Boolean_1 } = globals;
15
-
16
- function get_each_context(ctx, list, i) {
17
- const child_ctx = ctx.slice();
18
- child_ctx[18] = list[i];
19
- return child_ctx;
20
- }
21
-
22
- function get_each_context_1(ctx, list, i) {
23
- const child_ctx = ctx.slice();
24
- child_ctx[21] = list[i];
25
- return child_ctx;
26
- }
27
-
28
- // (86:8) {:else}
29
- function create_else_block(ctx) {
30
- let svg;
31
- let path;
32
-
33
- return {
34
- c() {
35
- svg = svg_element("svg");
36
- path = svg_element("path");
37
- attr(path, "d", "M5.707 4.293a1 1 0 00-1.414 1.414L10.586 12l-6.293 6.293a1 1 0 101.414 1.414l7-7a1 1 0 000-1.414l-7-7zm9 0a1 1 0 10-1.414 1.414L19.586 12l-6.293 6.293a1 1 0 001.414 1.414l7-7a1 1 0 000-1.414l-7-7z");
38
- attr(svg, "class", "mc-sidebar__trigger-icon");
39
- attr(svg, "width", "24px");
40
- attr(svg, "height", "24px");
41
- attr(svg, "viewBox", "0 0 24 24");
42
- },
43
- m(target, anchor) {
44
- insert(target, svg, anchor);
45
- append(svg, path);
46
- },
47
- d(detaching) {
48
- if (detaching) detach(svg);
49
- }
50
- };
51
- }
52
-
53
- // (76:8) {#if $isSidebarOpen}
54
- function create_if_block_2(ctx) {
55
- let svg;
56
- let path;
57
-
58
- return {
59
- c() {
60
- svg = svg_element("svg");
61
- path = svg_element("path");
62
- attr(path, "d", "M10.707 5.707a1 1 0 00-1.414-1.414l-7 7a1 1 0 000 1.414l7 7a1 1 0 001.414-1.414L4.414 12l6.293-6.293zm9 0a1 1 0 00-1.414-1.414l-7 7a1 1 0 000 1.414l7 7a1 1 0 001.414-1.414L13.414 12l6.293-6.293z");
63
- attr(svg, "class", "mc-sidebar__trigger-icon");
64
- attr(svg, "width", "24px");
65
- attr(svg, "height", "24px");
66
- attr(svg, "viewBox", "0 0 24 24");
67
- },
68
- m(target, anchor) {
69
- insert(target, svg, anchor);
70
- append(svg, path);
71
- },
72
- d(detaching) {
73
- if (detaching) detach(svg);
74
- }
75
- };
76
- }
77
-
78
- // (102:4) {#if $sidebar?.UTILITIES}
79
- function create_if_block_1(ctx) {
80
- let div;
81
- let current;
82
- let each_value = /*$sidebar*/ ctx[4]?.UTILITIES;
83
- let each_blocks = [];
84
-
85
- for (let i = 0; i < each_value.length; i += 1) {
86
- each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
87
- }
88
-
89
- const out = i => transition_out(each_blocks[i], 1, 1, () => {
90
- each_blocks[i] = null;
91
- });
92
-
93
- return {
94
- c() {
95
- div = element("div");
96
-
97
- for (let i = 0; i < each_blocks.length; i += 1) {
98
- each_blocks[i].c();
99
- }
100
-
101
- attr(div, "class", "mc-sidebar__utilities");
102
- },
103
- m(target, anchor) {
104
- insert(target, div, anchor);
105
-
106
- for (let i = 0; i < each_blocks.length; i += 1) {
107
- if (each_blocks[i]) {
108
- each_blocks[i].m(div, null);
109
- }
110
- }
111
-
112
- current = true;
113
- },
114
- p(ctx, dirty) {
115
- if (dirty & /*$sidebar*/ 16) {
116
- each_value = /*$sidebar*/ ctx[4]?.UTILITIES;
117
- let i;
118
-
119
- for (i = 0; i < each_value.length; i += 1) {
120
- const child_ctx = get_each_context(ctx, each_value, i);
121
-
122
- if (each_blocks[i]) {
123
- each_blocks[i].p(child_ctx, dirty);
124
- transition_in(each_blocks[i], 1);
125
- } else {
126
- each_blocks[i] = create_each_block(child_ctx);
127
- each_blocks[i].c();
128
- transition_in(each_blocks[i], 1);
129
- each_blocks[i].m(div, null);
130
- }
131
- }
132
-
133
- group_outros();
134
-
135
- for (i = each_value.length; i < each_blocks.length; i += 1) {
136
- out(i);
137
- }
138
-
139
- check_outros();
140
- }
141
- },
142
- i(local) {
143
- if (current) return;
144
-
145
- for (let i = 0; i < each_value.length; i += 1) {
146
- transition_in(each_blocks[i]);
147
- }
148
-
149
- current = true;
150
- },
151
- o(local) {
152
- each_blocks = each_blocks.filter(Boolean_1);
153
-
154
- for (let i = 0; i < each_blocks.length; i += 1) {
155
- transition_out(each_blocks[i]);
156
- }
157
-
158
- current = false;
159
- },
160
- d(detaching) {
161
- if (detaching) detach(div);
162
- destroy_each(each_blocks, detaching);
163
- }
164
- };
165
- }
166
-
167
- // (107:12) {#each section as feature}
168
- function create_each_block_1(ctx) {
169
- let li;
170
- let segment;
171
- let current;
172
- segment = new Sidebar_segment_nested({ props: { data: /*feature*/ ctx[21] } });
173
-
174
- return {
175
- c() {
176
- li = element("li");
177
- create_component(segment.$$.fragment);
178
- attr(li, "class", "mc-sidebar__utilities__item");
179
- },
180
- m(target, anchor) {
181
- insert(target, li, anchor);
182
- mount_component(segment, li, null);
183
- current = true;
184
- },
185
- p(ctx, dirty) {
186
- const segment_changes = {};
187
- if (dirty & /*$sidebar*/ 16) segment_changes.data = /*feature*/ ctx[21];
188
- segment.$set(segment_changes);
189
- },
190
- i(local) {
191
- if (current) return;
192
- transition_in(segment.$$.fragment, local);
193
- current = true;
194
- },
195
- o(local) {
196
- transition_out(segment.$$.fragment, local);
197
- current = false;
198
- },
199
- d(detaching) {
200
- if (detaching) detach(li);
201
- destroy_component(segment);
202
- }
203
- };
204
- }
205
-
206
- // (104:8) {#each $sidebar?.UTILITIES as section}
207
- function create_each_block(ctx) {
208
- let navigationseparator;
209
- let t0;
210
- let ul;
211
- let t1;
212
- let current;
213
- navigationseparator = new Sidebar_separator_nested({});
214
- let each_value_1 = /*section*/ ctx[18];
215
- let each_blocks = [];
216
-
217
- for (let i = 0; i < each_value_1.length; i += 1) {
218
- each_blocks[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
219
- }
220
-
221
- const out = i => transition_out(each_blocks[i], 1, 1, () => {
222
- each_blocks[i] = null;
223
- });
224
-
225
- return {
226
- c() {
227
- create_component(navigationseparator.$$.fragment);
228
- t0 = space();
229
- ul = element("ul");
230
-
231
- for (let i = 0; i < each_blocks.length; i += 1) {
232
- each_blocks[i].c();
233
- }
234
-
235
- t1 = space();
236
- },
237
- m(target, anchor) {
238
- mount_component(navigationseparator, target, anchor);
239
- insert(target, t0, anchor);
240
- insert(target, ul, anchor);
241
-
242
- for (let i = 0; i < each_blocks.length; i += 1) {
243
- if (each_blocks[i]) {
244
- each_blocks[i].m(ul, null);
245
- }
246
- }
247
-
248
- append(ul, t1);
249
- current = true;
250
- },
251
- p(ctx, dirty) {
252
- if (dirty & /*$sidebar*/ 16) {
253
- each_value_1 = /*section*/ ctx[18];
254
- let i;
255
-
256
- for (i = 0; i < each_value_1.length; i += 1) {
257
- const child_ctx = get_each_context_1(ctx, each_value_1, i);
258
-
259
- if (each_blocks[i]) {
260
- each_blocks[i].p(child_ctx, dirty);
261
- transition_in(each_blocks[i], 1);
262
- } else {
263
- each_blocks[i] = create_each_block_1(child_ctx);
264
- each_blocks[i].c();
265
- transition_in(each_blocks[i], 1);
266
- each_blocks[i].m(ul, t1);
267
- }
268
- }
269
-
270
- group_outros();
271
-
272
- for (i = each_value_1.length; i < each_blocks.length; i += 1) {
273
- out(i);
274
- }
275
-
276
- check_outros();
277
- }
278
- },
279
- i(local) {
280
- if (current) return;
281
- transition_in(navigationseparator.$$.fragment, local);
282
-
283
- for (let i = 0; i < each_value_1.length; i += 1) {
284
- transition_in(each_blocks[i]);
285
- }
286
-
287
- current = true;
288
- },
289
- o(local) {
290
- transition_out(navigationseparator.$$.fragment, local);
291
- each_blocks = each_blocks.filter(Boolean_1);
292
-
293
- for (let i = 0; i < each_blocks.length; i += 1) {
294
- transition_out(each_blocks[i]);
295
- }
296
-
297
- current = false;
298
- },
299
- d(detaching) {
300
- destroy_component(navigationseparator, detaching);
301
- if (detaching) detach(t0);
302
- if (detaching) detach(ul);
303
- destroy_each(each_blocks, detaching);
304
- }
305
- };
306
- }
307
-
308
- // (117:2) {#if parsedUser}
309
- function create_if_block(ctx) {
310
- let navigationuser;
311
- let current;
312
-
313
- navigationuser = new Sidebar_user_nested({
314
- props: {
315
- user: /*parsedUser*/ ctx[2],
316
- data: /*$sidebar*/ ctx[4]?.USER_FEATURES,
317
- a11yLabels: /*a11yLabels*/ ctx[0]
318
- }
319
- });
320
-
321
- return {
322
- c() {
323
- create_component(navigationuser.$$.fragment);
324
- },
325
- m(target, anchor) {
326
- mount_component(navigationuser, target, anchor);
327
- current = true;
328
- },
329
- p(ctx, dirty) {
330
- const navigationuser_changes = {};
331
- if (dirty & /*parsedUser*/ 4) navigationuser_changes.user = /*parsedUser*/ ctx[2];
332
- if (dirty & /*$sidebar*/ 16) navigationuser_changes.data = /*$sidebar*/ ctx[4]?.USER_FEATURES;
333
- if (dirty & /*a11yLabels*/ 1) navigationuser_changes.a11yLabels = /*a11yLabels*/ ctx[0];
334
- navigationuser.$set(navigationuser_changes);
335
- },
336
- i(local) {
337
- if (current) return;
338
- transition_in(navigationuser.$$.fragment, local);
339
- current = true;
340
- },
341
- o(local) {
342
- transition_out(navigationuser.$$.fragment, local);
343
- current = false;
344
- },
345
- d(detaching) {
346
- destroy_component(navigationuser, detaching);
347
- }
348
- };
349
- }
350
-
351
- function create_fragment(ctx) {
352
- let nav;
353
- let div;
354
- let button;
355
- let span;
356
- let button_aria_label_value;
357
- let t0;
358
- let segment;
359
- let t1;
360
- let navigationseparator;
361
- let t2;
362
- let section;
363
- let t3;
364
- let div_class_value;
365
- let t4;
366
- let nav_class_value;
367
- let current;
368
- let mounted;
369
- let dispose;
370
-
371
- function select_block_type(ctx, dirty) {
372
- if (/*$isSidebarOpen*/ ctx[3]) return create_if_block_2;
373
- return create_else_block;
374
- }
375
-
376
- let current_block_type = select_block_type(ctx);
377
- let if_block0 = current_block_type(ctx);
378
-
379
- segment = new Sidebar_segment_nested({
380
- props: { data: /*$sidebar*/ ctx[4]?.HOME }
381
- });
382
-
383
- navigationseparator = new Sidebar_separator_nested({});
384
-
385
- section = new Sidebar_section_nested({
386
- props: {
387
- data: /*$sidebar*/ ctx[4]?.FEATURES,
388
- a11yLabels: /*a11yLabels*/ ctx[0]
389
- }
390
- });
391
-
392
- let if_block1 = /*$sidebar*/ ctx[4]?.UTILITIES && create_if_block_1(ctx);
393
- let if_block2 = /*parsedUser*/ ctx[2] && create_if_block(ctx);
394
-
395
- let nav_levels = [
396
- {
397
- class: nav_class_value = "mc-sidebar " + (/*$isSidebarOpen*/ ctx[3] ? 'is-open' : 'is-close')
398
- },
399
- {
400
- "aria-expanded": /*$isSidebarOpen*/ ctx[3]
401
- },
402
- { "aria-labelledby": "mc-sidebar__trigger" },
403
- /*attributes*/ ctx[1]
404
- ];
405
-
406
- let nav_data = {};
407
-
408
- for (let i = 0; i < nav_levels.length; i += 1) {
409
- nav_data = assign(nav_data, nav_levels[i]);
410
- }
411
-
412
- return {
413
- c() {
414
- nav = element("nav");
415
- div = element("div");
416
- button = element("button");
417
- span = element("span");
418
- if_block0.c();
419
- t0 = space();
420
- create_component(segment.$$.fragment);
421
- t1 = space();
422
- create_component(navigationseparator.$$.fragment);
423
- t2 = space();
424
- create_component(section.$$.fragment);
425
- t3 = space();
426
- if (if_block1) if_block1.c();
427
- t4 = space();
428
- if (if_block2) if_block2.c();
429
- this.c = noop;
430
- attr(span, "class", "mc-sidebar__trigger__container");
431
- attr(button, "id", "mc-sidebar__trigger");
432
- attr(button, "class", "mc-sidebar__trigger");
433
-
434
- attr(button, "aria-label", button_aria_label_value = /*$isSidebarOpen*/ ctx[3]
435
- ? /*a11yLabels*/ ctx[0]?.['close'] || 'Close the sidebar'
436
- : /*a11yLabels*/ ctx[0]?.['open'] || 'Open the sidebar');
437
-
438
- attr(div, "class", div_class_value = "mc-sidebar__container " + (/*parsedUser*/ ctx[2] ? 'has-bottom-panel' : ''));
439
- set_attributes(nav, nav_data);
440
- },
441
- m(target, anchor) {
442
- insert(target, nav, anchor);
443
- append(nav, div);
444
- append(div, button);
445
- append(button, span);
446
- if_block0.m(span, null);
447
- append(div, t0);
448
- mount_component(segment, div, null);
449
- append(div, t1);
450
- mount_component(navigationseparator, div, null);
451
- append(div, t2);
452
- mount_component(section, div, null);
453
- append(div, t3);
454
- if (if_block1) if_block1.m(div, null);
455
- append(nav, t4);
456
- if (if_block2) if_block2.m(nav, null);
457
- current = true;
458
-
459
- if (!mounted) {
460
- dispose = listen(button, "click", /*click_handler*/ ctx[9]);
461
- mounted = true;
462
- }
463
- },
464
- p(ctx, [dirty]) {
465
- if (current_block_type !== (current_block_type = select_block_type(ctx))) {
466
- if_block0.d(1);
467
- if_block0 = current_block_type(ctx);
468
-
469
- if (if_block0) {
470
- if_block0.c();
471
- if_block0.m(span, null);
472
- }
473
- }
474
-
475
- if (!current || dirty & /*$isSidebarOpen, a11yLabels*/ 9 && button_aria_label_value !== (button_aria_label_value = /*$isSidebarOpen*/ ctx[3]
476
- ? /*a11yLabels*/ ctx[0]?.['close'] || 'Close the sidebar'
477
- : /*a11yLabels*/ ctx[0]?.['open'] || 'Open the sidebar')) {
478
- attr(button, "aria-label", button_aria_label_value);
479
- }
480
-
481
- const segment_changes = {};
482
- if (dirty & /*$sidebar*/ 16) segment_changes.data = /*$sidebar*/ ctx[4]?.HOME;
483
- segment.$set(segment_changes);
484
- const section_changes = {};
485
- if (dirty & /*$sidebar*/ 16) section_changes.data = /*$sidebar*/ ctx[4]?.FEATURES;
486
- if (dirty & /*a11yLabels*/ 1) section_changes.a11yLabels = /*a11yLabels*/ ctx[0];
487
- section.$set(section_changes);
488
-
489
- if (/*$sidebar*/ ctx[4]?.UTILITIES) {
490
- if (if_block1) {
491
- if_block1.p(ctx, dirty);
492
-
493
- if (dirty & /*$sidebar*/ 16) {
494
- transition_in(if_block1, 1);
495
- }
496
- } else {
497
- if_block1 = create_if_block_1(ctx);
498
- if_block1.c();
499
- transition_in(if_block1, 1);
500
- if_block1.m(div, null);
501
- }
502
- } else if (if_block1) {
503
- group_outros();
504
-
505
- transition_out(if_block1, 1, 1, () => {
506
- if_block1 = null;
507
- });
508
-
509
- check_outros();
510
- }
511
-
512
- if (!current || dirty & /*parsedUser*/ 4 && div_class_value !== (div_class_value = "mc-sidebar__container " + (/*parsedUser*/ ctx[2] ? 'has-bottom-panel' : ''))) {
513
- attr(div, "class", div_class_value);
514
- }
515
-
516
- if (/*parsedUser*/ ctx[2]) {
517
- if (if_block2) {
518
- if_block2.p(ctx, dirty);
519
-
520
- if (dirty & /*parsedUser*/ 4) {
521
- transition_in(if_block2, 1);
522
- }
523
- } else {
524
- if_block2 = create_if_block(ctx);
525
- if_block2.c();
526
- transition_in(if_block2, 1);
527
- if_block2.m(nav, null);
528
- }
529
- } else if (if_block2) {
530
- group_outros();
531
-
532
- transition_out(if_block2, 1, 1, () => {
533
- if_block2 = null;
534
- });
535
-
536
- check_outros();
537
- }
538
-
539
- set_attributes(nav, nav_data = get_spread_update(nav_levels, [
540
- (!current || dirty & /*$isSidebarOpen*/ 8 && nav_class_value !== (nav_class_value = "mc-sidebar " + (/*$isSidebarOpen*/ ctx[3] ? 'is-open' : 'is-close'))) && { class: nav_class_value },
541
- (!current || dirty & /*$isSidebarOpen*/ 8) && {
542
- "aria-expanded": /*$isSidebarOpen*/ ctx[3]
543
- },
544
- { "aria-labelledby": "mc-sidebar__trigger" },
545
- dirty & /*attributes*/ 2 && /*attributes*/ ctx[1]
546
- ]));
547
- },
548
- i(local) {
549
- if (current) return;
550
- transition_in(segment.$$.fragment, local);
551
- transition_in(navigationseparator.$$.fragment, local);
552
- transition_in(section.$$.fragment, local);
553
- transition_in(if_block1);
554
- transition_in(if_block2);
555
- current = true;
556
- },
557
- o(local) {
558
- transition_out(segment.$$.fragment, local);
559
- transition_out(navigationseparator.$$.fragment, local);
560
- transition_out(section.$$.fragment, local);
561
- transition_out(if_block1);
562
- transition_out(if_block2);
563
- current = false;
564
- },
565
- d(detaching) {
566
- if (detaching) detach(nav);
567
- if_block0.d();
568
- destroy_component(segment);
569
- destroy_component(navigationseparator);
570
- destroy_component(section);
571
- if (if_block1) if_block1.d();
572
- if (if_block2) if_block2.d();
573
- mounted = false;
574
- dispose();
575
- }
576
- };
577
- }
578
-
579
- function instance($$self, $$props, $$invalidate) {
580
- let attributes;
581
- const omit_props_names = ["data","open","code","user","a11yLabels"];
582
- let $$restProps = compute_rest_props($$props, omit_props_names);
583
- let $isSidebarOpen;
584
- let $sidebar;
585
- component_subscribe($$self, isSidebarOpen, $$value => $$invalidate(3, $isSidebarOpen = $$value));
586
- component_subscribe($$self, sidebar, $$value => $$invalidate(4, $sidebar = $$value));
587
- let { data } = $$props;
588
- let { open } = $$props;
589
- let { code } = $$props;
590
- let { user } = $$props;
591
- let { a11yLabels } = $$props;
592
- let eventHandler = new EventHandler();
593
- let parsedUser;
594
- let previousCode;
595
- let previousData;
596
- let previousOpen = false;
597
-
598
- function updateData(newCode, newData) {
599
- if (typeof previousData !== typeof newData || previousData !== newData) {
600
- previousData = newData;
601
- updateSidebarData(newData);
602
- }
603
-
604
- if (typeof previousCode !== typeof newCode || previousCode !== newCode) {
605
- previousCode = newCode;
606
- selectFeature(newCode);
607
- }
608
- }
609
-
610
- function updateOpen(newOpenStatus) {
611
- if (typeof previousOpen !== typeof newOpenStatus || previousOpen !== newOpenStatus) {
612
- previousOpen = Boolean(newOpenStatus);
613
- toggleSidebar(Boolean(newOpenStatus));
614
- }
615
- }
616
-
617
- const unsubscribes = [];
618
-
619
- unsubscribes.push(isSidebarOpen.subscribe(state => {
620
- eventHandler.dispatch('on-toggle', state);
621
- }));
622
-
623
- unsubscribes.push(selectedFeature.subscribe(selection => {
624
- var _a, _b, _c, _d, _e;
625
-
626
- if (selection) {
627
- toggleSidebar(false);
628
-
629
- eventHandler.dispatch('on-select', (_d = (_b = (_a = selection.lv2) === null || _a === void 0
630
- ? void 0
631
- : _a.code) !== null && _b !== void 0
632
- ? _b
633
- : (_c = selection.lv1) === null || _c === void 0
634
- ? void 0
635
- : _c.code) !== null && _d !== void 0
636
- ? _d
637
- : (_e = selection.lv0) === null || _e === void 0
638
- ? void 0
639
- : _e.code);
640
- }
641
- }));
642
-
643
- onDestroy(() => {
644
- for (const unsubscribe of unsubscribes) {
645
- unsubscribe();
646
- }
647
- });
648
-
649
- const click_handler = () => toggleSidebar();
650
-
651
- $$self.$$set = $$new_props => {
652
- $$props = assign(assign({}, $$props), exclude_internal_props($$new_props));
653
- $$invalidate(17, $$restProps = compute_rest_props($$props, omit_props_names));
654
- if ('data' in $$new_props) $$invalidate(5, data = $$new_props.data);
655
- if ('open' in $$new_props) $$invalidate(6, open = $$new_props.open);
656
- if ('code' in $$new_props) $$invalidate(7, code = $$new_props.code);
657
- if ('user' in $$new_props) $$invalidate(8, user = $$new_props.user);
658
- if ('a11yLabels' in $$new_props) $$invalidate(0, a11yLabels = $$new_props.a11yLabels);
659
- };
660
-
661
- $$self.$$.update = () => {
662
- if ($$self.$$.dirty & /*code, data*/ 160) {
663
- updateData(code, data);
664
- }
665
-
666
- if ($$self.$$.dirty & /*open*/ 64) {
667
- updateOpen(open);
668
- }
669
-
670
- if ($$self.$$.dirty & /*user*/ 256) {
671
- $$invalidate(2, parsedUser = typeof user === 'string' ? JSON.parse(user) : user);
672
- }
673
-
674
- $$invalidate(1, attributes = Object.assign({}, $$restProps));
675
-
676
- if ($$self.$$.dirty & /*attributes*/ 2) {
677
- delete attributes.class;
678
- }
679
- };
680
-
681
- return [
682
- a11yLabels,
683
- attributes,
684
- parsedUser,
685
- $isSidebarOpen,
686
- $sidebar,
687
- data,
688
- open,
689
- code,
690
- user,
691
- click_handler
692
- ];
693
- }
694
-
695
- class Sidebar extends SvelteElement {
696
- constructor(options) {
697
- super();
698
- const style = document.createElement('style');
699
- style.textContent = `.mc-sidebar{position:absolute;top:0;left:0;z-index:10;font-size:14px;color:white;-webkit-box-sizing:border-box;box-sizing:border-box;fill:#191919;width:320px;background:#eeeff1;display:block;height:100vh}.mc-sidebar__container{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mc-sidebar__container.has-bottom-panel{height:calc(100% - 88px)}.mc-sidebar__utilities{margin-bottom:24px}.mc-sidebar__utilities__item{margin:4px 0px}.mc-sidebar__utilities__item:first-child{margin-top:0}.mc-sidebar__utilities__item:last-child{margin-bottom:0}.mc-sidebar__trigger{cursor:pointer;background:none;border:none;padding:0;margin:28px 0;min-height:38px;width:100%;font-size:inherit;font-family:inherit}.mc-sidebar__trigger-icon{fill:#191919}.mc-sidebar__trigger__container{height:38px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mc-sidebar__trigger__container>*{width:24px;height:24px}.mc-sidebar__trigger:hover .mc-sidebar__trigger__container{background:#b3b7c1}.mc-sidebar__trigger:focus-visible{-webkit-box-shadow:none;box-shadow:none;border:none;outline:none}.mc-sidebar__trigger:focus-visible .mc-sidebar__trigger__container{-webkit-box-shadow:none;box-shadow:none;border:none;border-radius:6px;outline:1px solid #0b96cc}.mc-sidebar.is-open{-o-transition:width 300ms ease-in-out;-webkit-transition:width 300ms ease-in-out;transition:width 300ms ease-in-out}.mc-sidebar.is-open .mc-sidebar__trigger__container{-o-transition:width 300ms ease-in-out, margin-left 300ms ease-in-out, border-radius 300ms ease-in-out;-webkit-transition:width 300ms ease-in-out, margin-left 300ms ease-in-out, border-radius 300ms ease-in-out;transition:width 300ms ease-in-out, margin-left 300ms ease-in-out, border-radius 300ms ease-in-out;margin-left:266px;width:38px;border-radius:4px}.mc-sidebar.is-close{-o-transition:width 300ms ease-in-out;-webkit-transition:width 300ms ease-in-out;transition:width 300ms ease-in-out;width:64px;padding:0}.mc-sidebar.is-close .mc-sidebar__trigger__container{-o-transition:width 300ms ease-in-out, margin-left 300ms ease-in-out, border-radius 300ms ease-in-out;-webkit-transition:width 300ms ease-in-out, margin-left 300ms ease-in-out, border-radius 300ms ease-in-out;transition:width 300ms ease-in-out, margin-left 300ms ease-in-out, border-radius 300ms ease-in-out;margin-left:0px;width:64px;border-radius:0px}.mc-sidebar ul{list-style-type:none;margin:0;padding:0}`;
700
- this.shadowRoot.appendChild(style);
701
-
702
- init(
703
- this,
704
- {
705
- target: this.shadowRoot,
706
- props: attribute_to_object(this.attributes),
707
- customElement: true
708
- },
709
- instance,
710
- create_fragment,
711
- safe_not_equal,
712
- {
713
- data: 5,
714
- open: 6,
715
- code: 7,
716
- user: 8,
717
- a11yLabels: 0
718
- },
719
- null
720
- );
721
-
722
- if (options) {
723
- if (options.target) {
724
- insert(options.target, this, options.anchor);
725
- }
726
-
727
- if (options.props) {
728
- this.$set(options.props);
729
- flush();
730
- }
731
- }
732
- }
733
-
734
- static get observedAttributes() {
735
- return ["data", "open", "code", "user", "a11yLabels"];
736
- }
737
-
738
- get data() {
739
- return this.$$.ctx[5];
740
- }
741
-
742
- set data(data) {
743
- this.$$set({ data });
744
- flush();
745
- }
746
-
747
- get open() {
748
- return this.$$.ctx[6];
749
- }
750
-
751
- set open(open) {
752
- this.$$set({ open });
753
- flush();
754
- }
755
-
756
- get code() {
757
- return this.$$.ctx[7];
758
- }
759
-
760
- set code(code) {
761
- this.$$set({ code });
762
- flush();
763
- }
764
-
765
- get user() {
766
- return this.$$.ctx[8];
767
- }
768
-
769
- set user(user) {
770
- this.$$set({ user });
771
- flush();
772
- }
773
-
774
- get a11yLabels() {
775
- return this.$$.ctx[0];
776
- }
777
-
778
- set a11yLabels(a11yLabels) {
779
- this.$$set({ a11yLabels });
780
- flush();
781
- }
782
- }
783
-
784
- export { Sidebar as default };
1
+ import{S as e,i as t,a as s,b as i,f as a,s as r,c as n,e as o,d as l,x as d,n as c,g as m,h as b,j as u,A as g,l as p,C as f,D as h,E as _,m as $,o as x,G as w,p as y,ab as v,ac as E,q as L,M as k,J as j,ad as T,T as I}from"../../index-c33b3772.js";import S from"./sidebar-segment.nested.js";import U from"./sidebar-section.nested.js";import z from"./sidebar-user.nested.js";import R from"./sidebar-separator.nested.js";import{E as A}from"../../EventHandler-02058705.js";import{i as O,s as B,t as C,u as M,a as F,b as H}from"../../sidebar-service-275bf9ef.js";import"./sidebar-feature-group.nested.js";import"./sidebar-feature.nested.js";import"./sidebar-sub-features.nested.js";const{Boolean:J}=T;function q(e,t,s){const i=e.slice();return i[18]=t[s],i}function D(e,t,s){const i=e.slice();return i[21]=t[s],i}function G(e){let t,s;return{c(){t=I("svg"),s=I("path"),m(s,"d","M5.707 4.293a1 1 0 00-1.414 1.414L10.586 12l-6.293 6.293a1 1 0 101.414 1.414l7-7a1 1 0 000-1.414l-7-7zm9 0a1 1 0 10-1.414 1.414L19.586 12l-6.293 6.293a1 1 0 001.414 1.414l7-7a1 1 0 000-1.414l-7-7z"),m(t,"class","mc-sidebar__trigger-icon"),m(t,"width","24px"),m(t,"height","24px"),m(t,"viewBox","0 0 24 24")},m(e,a){i(e,t,a),u(t,s)},d(e){e&&x(t)}}}function N(e){let t,s;return{c(){t=I("svg"),s=I("path"),m(s,"d","M10.707 5.707a1 1 0 00-1.414-1.414l-7 7a1 1 0 000 1.414l7 7a1 1 0 001.414-1.414L4.414 12l6.293-6.293zm9 0a1 1 0 00-1.414-1.414l-7 7a1 1 0 000 1.414l7 7a1 1 0 001.414-1.414L13.414 12l6.293-6.293z"),m(t,"class","mc-sidebar__trigger-icon"),m(t,"width","24px"),m(t,"height","24px"),m(t,"viewBox","0 0 24 24")},m(e,a){i(e,t,a),u(t,s)},d(e){e&&x(t)}}}function K(e){let t,s,a=e[4]?.UTILITIES,r=[];for(let t=0;t<a.length;t+=1)r[t]=Q(q(e,a,t));const n=e=>h(r[e],1,1,(()=>{r[e]=null}));return{c(){t=o("div");for(let e=0;e<r.length;e+=1)r[e].c();m(t,"class","mc-sidebar__utilities")},m(e,a){i(e,t,a);for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,null);s=!0},p(e,s){if(16&s){let i;for(a=e[4]?.UTILITIES,i=0;i<a.length;i+=1){const n=q(e,a,i);r[i]?(r[i].p(n,s),f(r[i],1)):(r[i]=Q(n),r[i].c(),f(r[i],1),r[i].m(t,null))}for(k(),i=a.length;i<r.length;i+=1)n(i);_()}},i(e){if(!s){for(let e=0;e<a.length;e+=1)f(r[e]);s=!0}},o(e){r=r.filter(J);for(let e=0;e<r.length;e+=1)h(r[e]);s=!1},d(e){e&&x(t),j(r,e)}}}function P(e){let t,s,a;return s=new S({props:{data:e[21]}}),{c(){t=o("li"),d(s.$$.fragment),m(t,"class","mc-sidebar__utilities__item")},m(e,r){i(e,t,r),g(s,t,null),a=!0},p(e,t){const i={};16&t&&(i.data=e[21]),s.$set(i)},i(e){a||(f(s.$$.fragment,e),a=!0)},o(e){h(s.$$.fragment,e),a=!1},d(e){e&&x(t),w(s)}}}function Q(e){let t,s,a,r,n;t=new R({});let c=e[18],m=[];for(let t=0;t<c.length;t+=1)m[t]=P(D(e,c,t));const b=e=>h(m[e],1,1,(()=>{m[e]=null}));return{c(){d(t.$$.fragment),s=l(),a=o("ul");for(let e=0;e<m.length;e+=1)m[e].c();r=l()},m(e,o){g(t,e,o),i(e,s,o),i(e,a,o);for(let e=0;e<m.length;e+=1)m[e]&&m[e].m(a,null);u(a,r),n=!0},p(e,t){if(16&t){let s;for(c=e[18],s=0;s<c.length;s+=1){const i=D(e,c,s);m[s]?(m[s].p(i,t),f(m[s],1)):(m[s]=P(i),m[s].c(),f(m[s],1),m[s].m(a,r))}for(k(),s=c.length;s<m.length;s+=1)b(s);_()}},i(e){if(!n){f(t.$$.fragment,e);for(let e=0;e<c.length;e+=1)f(m[e]);n=!0}},o(e){h(t.$$.fragment,e),m=m.filter(J);for(let e=0;e<m.length;e+=1)h(m[e]);n=!1},d(e){w(t,e),e&&x(s),e&&x(a),j(m,e)}}}function V(e){let t,s;return t=new z({props:{user:e[2],data:e[4]?.USER_FEATURES,a11yLabels:e[0]}}),{c(){d(t.$$.fragment)},m(e,i){g(t,e,i),s=!0},p(e,s){const i={};4&s&&(i.user=e[2]),16&s&&(i.data=e[4]?.USER_FEATURES),1&s&&(i.a11yLabels=e[0]),t.$set(i)},i(e){s||(f(t.$$.fragment,e),s=!0)},o(e){h(t.$$.fragment,e),s=!1},d(e){w(t,e)}}}function W(e){let t,s,a,r,y,v,E,L,j,T,I,z,A,O,B,C,M,F;function H(e,t){return e[3]?N:G}let J=H(e),q=J(e);E=new S({props:{data:e[4]?.HOME}}),j=new R({}),I=new U({props:{data:e[4]?.FEATURES,a11yLabels:e[0]}});let D=e[4]?.UTILITIES&&K(e),P=e[2]&&V(e),Q=[{class:B="mc-sidebar "+(e[3]?"is-open":"is-close")},{"aria-expanded":e[3]},{"aria-labelledby":"mc-sidebar__trigger"},e[1]],W={};for(let e=0;e<Q.length;e+=1)W=n(W,Q[e]);return{c(){t=o("nav"),s=o("div"),a=o("button"),r=o("span"),q.c(),v=l(),d(E.$$.fragment),L=l(),d(j.$$.fragment),T=l(),d(I.$$.fragment),z=l(),D&&D.c(),O=l(),P&&P.c(),this.c=c,m(r,"class","mc-sidebar__trigger__container"),m(a,"id","mc-sidebar__trigger"),m(a,"class","mc-sidebar__trigger"),m(a,"aria-label",y=e[3]?e[0]?.close||"Close the sidebar":e[0]?.open||"Open the sidebar"),m(s,"class",A="mc-sidebar__container "+(e[2]?"has-bottom-panel":"")),b(t,W)},m(n,o){i(n,t,o),u(t,s),u(s,a),u(a,r),q.m(r,null),u(s,v),g(E,s,null),u(s,L),g(j,s,null),u(s,T),g(I,s,null),u(s,z),D&&D.m(s,null),u(t,O),P&&P.m(t,null),C=!0,M||(F=p(a,"click",e[9]),M=!0)},p(e,[i]){J!==(J=H(e))&&(q.d(1),q=J(e),q&&(q.c(),q.m(r,null))),(!C||9&i&&y!==(y=e[3]?e[0]?.close||"Close the sidebar":e[0]?.open||"Open the sidebar"))&&m(a,"aria-label",y);const n={};16&i&&(n.data=e[4]?.HOME),E.$set(n);const o={};16&i&&(o.data=e[4]?.FEATURES),1&i&&(o.a11yLabels=e[0]),I.$set(o),e[4]?.UTILITIES?D?(D.p(e,i),16&i&&f(D,1)):(D=K(e),D.c(),f(D,1),D.m(s,null)):D&&(k(),h(D,1,1,(()=>{D=null})),_()),(!C||4&i&&A!==(A="mc-sidebar__container "+(e[2]?"has-bottom-panel":"")))&&m(s,"class",A),e[2]?P?(P.p(e,i),4&i&&f(P,1)):(P=V(e),P.c(),f(P,1),P.m(t,null)):P&&(k(),h(P,1,1,(()=>{P=null})),_()),b(t,W=$(Q,[(!C||8&i&&B!==(B="mc-sidebar "+(e[3]?"is-open":"is-close")))&&{class:B},(!C||8&i)&&{"aria-expanded":e[3]},{"aria-labelledby":"mc-sidebar__trigger"},2&i&&e[1]]))},i(e){C||(f(E.$$.fragment,e),f(j.$$.fragment,e),f(I.$$.fragment,e),f(D),f(P),C=!0)},o(e){h(E.$$.fragment,e),h(j.$$.fragment,e),h(I.$$.fragment,e),h(D),h(P),C=!1},d(e){e&&x(t),q.d(),w(E),w(j),w(I),D&&D.d(),P&&P.d(),M=!1,F()}}}function X(e,t,s){let i;const a=["data","open","code","user","a11yLabels"];let r,o,l=y(t,a);v(e,O,(e=>s(3,r=e))),v(e,H,(e=>s(4,o=e)));let d,c,m,{data:b}=t,{open:u}=t,{code:g}=t,{user:p}=t,{a11yLabels:f}=t,h=new A,_=!1;const $=[];$.push(O.subscribe((e=>{h.dispatch("on-toggle",e)}))),$.push(B.subscribe((e=>{var t,s,i,a,r;e&&(C(!1),h.dispatch("on-select",null!==(a=null!==(s=null===(t=e.lv2)||void 0===t?void 0:t.code)&&void 0!==s?s:null===(i=e.lv1)||void 0===i?void 0:i.code)&&void 0!==a?a:null===(r=e.lv0)||void 0===r?void 0:r.code))}))),E((()=>{for(const e of $)e()}));return e.$$set=e=>{t=n(n({},t),L(e)),s(17,l=y(t,a)),"data"in e&&s(5,b=e.data),"open"in e&&s(6,u=e.open),"code"in e&&s(7,g=e.code),"user"in e&&s(8,p=e.user),"a11yLabels"in e&&s(0,f=e.a11yLabels)},e.$$.update=()=>{var t,a,r;160&e.$$.dirty&&(t=g,typeof m==typeof(a=b)&&m===a||(m=a,M(a)),typeof c==typeof t&&c===t||(c=t,F(t))),64&e.$$.dirty&&(typeof _==typeof(r=u)&&_===r||(_=Boolean(r),C(Boolean(r)))),256&e.$$.dirty&&s(2,d="string"==typeof p?JSON.parse(p):p),s(1,i=Object.assign({},l)),2&e.$$.dirty&&delete i.class},[f,i,d,r,o,b,u,g,p,()=>C()]}class Y extends e{constructor(e){super();const n=document.createElement("style");n.textContent=".mc-sidebar{position:absolute;top:0;left:0;z-index:10;font-size:14px;color:white;-webkit-box-sizing:border-box;box-sizing:border-box;fill:#191919;width:320px;background:#eeeff1;display:block;height:100vh}.mc-sidebar__container{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mc-sidebar__container.has-bottom-panel{height:calc(100% - 88px)}.mc-sidebar__utilities{margin-bottom:24px}.mc-sidebar__utilities__item{margin:4px 0px}.mc-sidebar__utilities__item:first-child{margin-top:0}.mc-sidebar__utilities__item:last-child{margin-bottom:0}.mc-sidebar__trigger{cursor:pointer;background:none;border:none;padding:0;margin:28px 0;min-height:38px;width:100%;font-size:inherit;font-family:inherit}.mc-sidebar__trigger-icon{fill:#191919}.mc-sidebar__trigger__container{height:38px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mc-sidebar__trigger__container>*{width:24px;height:24px}.mc-sidebar__trigger:hover .mc-sidebar__trigger__container{background:#b3b7c1}.mc-sidebar__trigger:focus-visible{-webkit-box-shadow:none;box-shadow:none;border:none;outline:none}.mc-sidebar__trigger:focus-visible .mc-sidebar__trigger__container{-webkit-box-shadow:none;box-shadow:none;border:none;border-radius:6px;outline:1px solid #0b96cc}.mc-sidebar.is-open{-o-transition:width 300ms ease-in-out;-webkit-transition:width 300ms ease-in-out;transition:width 300ms ease-in-out}.mc-sidebar.is-open .mc-sidebar__trigger__container{-o-transition:width 300ms ease-in-out, margin-left 300ms ease-in-out, border-radius 300ms ease-in-out;-webkit-transition:width 300ms ease-in-out, margin-left 300ms ease-in-out, border-radius 300ms ease-in-out;transition:width 300ms ease-in-out, margin-left 300ms ease-in-out, border-radius 300ms ease-in-out;margin-left:266px;width:38px;border-radius:4px}.mc-sidebar.is-close{-o-transition:width 300ms ease-in-out;-webkit-transition:width 300ms ease-in-out;transition:width 300ms ease-in-out;width:64px;padding:0}.mc-sidebar.is-close .mc-sidebar__trigger__container{-o-transition:width 300ms ease-in-out, margin-left 300ms ease-in-out, border-radius 300ms ease-in-out;-webkit-transition:width 300ms ease-in-out, margin-left 300ms ease-in-out, border-radius 300ms ease-in-out;transition:width 300ms ease-in-out, margin-left 300ms ease-in-out, border-radius 300ms ease-in-out;margin-left:0px;width:64px;border-radius:0px}.mc-sidebar ul{list-style-type:none;margin:0;padding:0}",this.shadowRoot.appendChild(n),t(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},X,W,r,{data:5,open:6,code:7,user:8,a11yLabels:0},null),e&&(e.target&&i(e.target,this,e.anchor),e.props&&(this.$set(e.props),a()))}static get observedAttributes(){return["data","open","code","user","a11yLabels"]}get data(){return this.$$.ctx[5]}set data(e){this.$$set({data:e}),a()}get open(){return this.$$.ctx[6]}set open(e){this.$$set({open:e}),a()}get code(){return this.$$.ctx[7]}set code(e){this.$$set({code:e}),a()}get user(){return this.$$.ctx[8]}set user(e){this.$$set({user:e}),a()}get a11yLabels(){return this.$$.ctx[0]}set a11yLabels(e){this.$$set({a11yLabels:e}),a()}}export{Y as default};
785
2
  //# sourceMappingURL=Sidebar.js.map