@mozaic-ds/web-components 0.9.0-beta → 0.9.0-beta-1

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 (189) hide show
  1. package/package.json +1 -1
  2. package/public/ClickOutside-63071e7a.js +1 -15
  3. package/public/ClickOutside-63071e7a.js.map +1 -1
  4. package/public/DataTableDefaultAction.nested-c37a5d51.js +1 -761
  5. package/public/DataTableDefaultAction.nested-c37a5d51.js.map +1 -1
  6. package/public/DataTableUtilities-313a448d.js +1 -385
  7. package/public/DataTableUtilities-313a448d.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/datatable/DataTable.js +1 -1
  13. package/public/adeo/components/datatable/DataTable.js.map +1 -1
  14. package/public/adeo/components/datatable/DataTable.svelte +1 -1
  15. package/public/adeo/components/datatable/data.d.ts.map +1 -1
  16. package/public/array-5b770a93.js +1 -13
  17. package/public/array-5b770a93.js.map +1 -1
  18. package/public/axis-fbc0f7b5.js +1 -174
  19. package/public/axis-fbc0f7b5.js.map +1 -1
  20. package/public/band-d7a07d2c.js +1 -186
  21. package/public/band-d7a07d2c.js.map +1 -1
  22. package/public/bricoman/components/datatable/DataTable.js +1 -1
  23. package/public/bricoman/components/datatable/DataTable.js.map +1 -1
  24. package/public/bricoman/components/datatable/DataTable.svelte +1 -1
  25. package/public/bricoman/components/datatable/data.d.ts.map +1 -1
  26. package/public/components/accordion/Accordion.js +1 -365
  27. package/public/components/accordion/Accordion.js.map +1 -1
  28. package/public/components/autocomplete/Autocomplete.js +1 -1515
  29. package/public/components/autocomplete/Autocomplete.js.map +1 -1
  30. package/public/components/badge/Badge.js +1 -155
  31. package/public/components/badge/Badge.js.map +1 -1
  32. package/public/components/badge/Badge.nested.js +1 -101
  33. package/public/components/badge/Badge.nested.js.map +1 -1
  34. package/public/components/breadcrumb/Breadcrumb.js +1 -372
  35. package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
  36. package/public/components/breadcrumb/Breadcrumb.nested.js +1 -319
  37. package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
  38. package/public/components/button/Button.js +1 -1138
  39. package/public/components/button/Button.js.map +1 -1
  40. package/public/components/card/Card.js +1 -369
  41. package/public/components/card/Card.js.map +1 -1
  42. package/public/components/chart/BarChart.js +1 -583
  43. package/public/components/chart/BarChart.js.map +1 -1
  44. package/public/components/chart/Donut.js +1 -1189
  45. package/public/components/chart/Donut.js.map +1 -1
  46. package/public/components/chart/GroupedBarChart.js +1 -750
  47. package/public/components/chart/GroupedBarChart.js.map +1 -1
  48. package/public/components/chart/LineChart.js +1 -1731
  49. package/public/components/chart/LineChart.js.map +1 -1
  50. package/public/components/chart/Radar.js +1 -729
  51. package/public/components/chart/Radar.js.map +1 -1
  52. package/public/components/chart/StackedBarChart.js +1 -745
  53. package/public/components/chart/StackedBarChart.js.map +1 -1
  54. package/public/components/checkbox/Checkbox.js +1 -307
  55. package/public/components/checkbox/Checkbox.js.map +1 -1
  56. package/public/components/checkboxgroup/checkboxGroup.js +1 -404
  57. package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
  58. package/public/components/datatable/DataTable.js +1 -3098
  59. package/public/components/datatable/DataTable.js.map +1 -1
  60. package/public/components/datatable/DataTable.svelte +1 -1
  61. package/public/components/datatable/DataTableDefaultAction.nested.js +1 -4
  62. package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
  63. package/public/components/datatable/DataTableDefaultEdtion.nested.js +1 -164
  64. package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
  65. package/public/components/datatable/DataTableDefaultFilterTags.nested.js +1 -380
  66. package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
  67. package/public/components/datatable/DataTableDefaultSelection.nested.js +1 -424
  68. package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
  69. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +1 -263
  70. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
  71. package/public/components/datatable/DataTableFooter.nested.js +1 -637
  72. package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
  73. package/public/components/datatable/data.d.ts.map +1 -1
  74. package/public/components/dropdown/Dropdown.js +1 -1426
  75. package/public/components/dropdown/Dropdown.js.map +1 -1
  76. package/public/components/field/Field.js +1 -375
  77. package/public/components/field/Field.js.map +1 -1
  78. package/public/components/fileuploader/FileUploader.js +1 -603
  79. package/public/components/fileuploader/FileUploader.js.map +1 -1
  80. package/public/components/fileuploader/ResultFile.nested.js +1 -344
  81. package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
  82. package/public/components/flag/Flag.js +1 -174
  83. package/public/components/flag/Flag.js.map +1 -1
  84. package/public/components/header/Header.js +1 -918
  85. package/public/components/header/Header.js.map +1 -1
  86. package/public/components/hero/Hero.js +1 -271
  87. package/public/components/hero/Hero.js.map +1 -1
  88. package/public/components/kpi/Kpi.js +1 -404
  89. package/public/components/kpi/Kpi.js.map +1 -1
  90. package/public/components/layer/Layer.js +1 -471
  91. package/public/components/layer/Layer.js.map +1 -1
  92. package/public/components/link/Link.js +1 -380
  93. package/public/components/link/Link.js.map +1 -1
  94. package/public/components/listbox/Listbox.js +1 -595
  95. package/public/components/listbox/Listbox.js.map +1 -1
  96. package/public/components/listbox/Listbox.nested.js +1 -629
  97. package/public/components/listbox/Listbox.nested.js.map +1 -1
  98. package/public/components/loader/Loader.js +1 -246
  99. package/public/components/loader/Loader.js.map +1 -1
  100. package/public/components/loader/Loader.nested.js +1 -176
  101. package/public/components/loader/Loader.nested.js.map +1 -1
  102. package/public/components/modal/Modal.js +1 -395
  103. package/public/components/modal/Modal.js.map +1 -1
  104. package/public/components/notification/Notification.js +1 -458
  105. package/public/components/notification/Notification.js.map +1 -1
  106. package/public/components/optionbutton/OptionButton.js +1 -316
  107. package/public/components/optionbutton/OptionButton.js.map +1 -1
  108. package/public/components/overlay/Overlay.js +1 -104
  109. package/public/components/overlay/Overlay.js.map +1 -1
  110. package/public/components/overlay/OverlayLoader.js +1 -151
  111. package/public/components/overlay/OverlayLoader.js.map +1 -1
  112. package/public/components/pagination/Pagination.js +1 -613
  113. package/public/components/pagination/Pagination.js.map +1 -1
  114. package/public/components/passwordinput/PasswordInput.js +1 -291
  115. package/public/components/passwordinput/PasswordInput.js.map +1 -1
  116. package/public/components/phonenumber/PhoneNumber.js +1 -6894
  117. package/public/components/phonenumber/PhoneNumber.js.map +1 -1
  118. package/public/components/price/Price.js +1 -768
  119. package/public/components/price/Price.js.map +1 -1
  120. package/public/components/progressbar/ProgressBar.js +1 -278
  121. package/public/components/progressbar/ProgressBar.js.map +1 -1
  122. package/public/components/quantityselector/QuantitySelector.js +1 -397
  123. package/public/components/quantityselector/QuantitySelector.js.map +1 -1
  124. package/public/components/radio/Radio.js +1 -273
  125. package/public/components/radio/Radio.js.map +1 -1
  126. package/public/components/radiogroup/RadioGroup.js +1 -414
  127. package/public/components/radiogroup/RadioGroup.js.map +1 -1
  128. package/public/components/ratings/StarsInput.js +1 -292
  129. package/public/components/ratings/StarsInput.js.map +1 -1
  130. package/public/components/ratings/StarsResult.js +1 -246
  131. package/public/components/ratings/StarsResult.js.map +1 -1
  132. package/public/components/select/Select.js +1 -451
  133. package/public/components/select/Select.js.map +1 -1
  134. package/public/components/sidebar/Sidebar.js +1 -784
  135. package/public/components/sidebar/Sidebar.js.map +1 -1
  136. package/public/components/sidebar/sidebar-feature-group.nested.js +1 -594
  137. package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
  138. package/public/components/sidebar/sidebar-feature.nested.js +1 -402
  139. package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
  140. package/public/components/sidebar/sidebar-section.nested.js +1 -394
  141. package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
  142. package/public/components/sidebar/sidebar-segment.nested.js +1 -200
  143. package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
  144. package/public/components/sidebar/sidebar-separator.nested.js +1 -49
  145. package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
  146. package/public/components/sidebar/sidebar-sub-features.nested.js +1 -312
  147. package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
  148. package/public/components/sidebar/sidebar-user.nested.js +1 -733
  149. package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
  150. package/public/components/stepper/Stepper.js +1 -371
  151. package/public/components/stepper/Stepper.js.map +1 -1
  152. package/public/components/tabs/Tabs.js +1 -615
  153. package/public/components/tabs/Tabs.js.map +1 -1
  154. package/public/components/tabs/Tabs.nested.js +1 -472
  155. package/public/components/tabs/Tabs.nested.js.map +1 -1
  156. package/public/components/tag/Tag.js +1 -665
  157. package/public/components/tag/Tag.js.map +1 -1
  158. package/public/components/tag/Tag.nested.js +1 -554
  159. package/public/components/tag/Tag.nested.js.map +1 -1
  160. package/public/components/taglist/TagList.js +1 -475
  161. package/public/components/taglist/TagList.js.map +1 -1
  162. package/public/components/textarea/Textarea.js +1 -303
  163. package/public/components/textarea/Textarea.js.map +1 -1
  164. package/public/components/textinput/Textinput.js +1 -497
  165. package/public/components/textinput/Textinput.js.map +1 -1
  166. package/public/components/textinput/Textinput.nested.js +1 -320
  167. package/public/components/textinput/Textinput.nested.js.map +1 -1
  168. package/public/components/toggle/Toggle.js +1 -278
  169. package/public/components/toggle/Toggle.js.map +1 -1
  170. package/public/components/tooltip/Tooltip.js +1 -173
  171. package/public/components/tooltip/Tooltip.js.map +1 -1
  172. package/public/index-c33b3772.js +1 -873
  173. package/public/index-c33b3772.js.map +1 -1
  174. package/public/linear-f46d7e9e.js +1 -700
  175. package/public/linear-f46d7e9e.js.map +1 -1
  176. package/public/path-1b5da959.js +1 -186
  177. package/public/path-1b5da959.js.map +1 -1
  178. package/public/sidebar-service-275bf9ef.js +1 -129
  179. package/public/sidebar-service-275bf9ef.js.map +1 -1
  180. package/public/symbol-b05a6e2b.js +1 -169
  181. package/public/symbol-b05a6e2b.js.map +1 -1
  182. package/public/transform-15d69d5d.js +1 -2743
  183. package/public/transform-15d69d5d.js.map +1 -1
  184. package/public/utilities/EventForward.js +1 -136
  185. package/public/utilities/EventForward.js.map +1 -1
  186. package/public/utilities/EventHandler.js +1 -36
  187. package/public/utilities/EventHandler.js.map +1 -1
  188. package/public/utilities/components/datatable/data.d.ts.map +1 -1
  189. package/public/utilities/stories/datatable/DataTable.stories.d.ts.map +1 -1
@@ -1,398 +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, U as set_input_value, l as listen, B as action_destroyer, Y as prevent_default, aa as to_number, m as get_spread_update, o as detach, H as run_all, p as compute_rest_props, r as get_current_component, q as exclude_internal_props } from '../../index-c33b3772.js';
2
- import { E as EventHandler } from '../../EventHandler-02058705.js';
3
- import { c as createEventForwarder } from '../../EventForward-8492ff62.js';
4
-
5
- /* src/components/quantityselector/QuantitySelector.svelte generated by Svelte v3.58.0 */
6
-
7
- function create_fragment(ctx) {
8
- let div;
9
- let button0;
10
- let span0;
11
- let button0_class_value;
12
- let button0_disabled_value;
13
- let t0;
14
- let input;
15
- let input_class_value;
16
- let t1;
17
- let button1;
18
- let span1;
19
- let button1_class_value;
20
- let button1_disabled_value;
21
- let mounted;
22
- let dispose;
23
- let div_levels = [{ class: "mc-quantity-selector" }, /*$$restProps*/ ctx[13]];
24
- let div_data = {};
25
-
26
- for (let i = 0; i < div_levels.length; i += 1) {
27
- div_data = assign(div_data, div_levels[i]);
28
- }
29
-
30
- return {
31
- c() {
32
- div = element("div");
33
- button0 = element("button");
34
- span0 = element("span");
35
- span0.innerHTML = `<navigation-control-less-32px size="100%"></navigation-control-less-32px>`;
36
- t0 = space();
37
- input = element("input");
38
- t1 = space();
39
- button1 = element("button");
40
- span1 = element("span");
41
- span1.innerHTML = `<navigation-control-more-32px size="100%"></navigation-control-more-32px>`;
42
- this.c = noop;
43
- attr(span0, "class", "mc-button__icon");
44
- attr(button0, "aria-controls", /*id*/ ctx[1]);
45
- attr(button0, "class", button0_class_value = "mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-left " + (/*small*/ ctx[5] ? 'mc-button--s' : ''));
46
- attr(button0, "aria-label", /*decrementarialabel*/ ctx[6]);
47
- button0.disabled = button0_disabled_value = /*quantity*/ ctx[0] === /*valuemin*/ ctx[2];
48
- attr(input, "id", /*id*/ ctx[1]);
49
- attr(input, "placeholder", /*placeholder*/ ctx[4]);
50
- attr(input, "type", "number");
51
- attr(input, "name", "quantity-selector-input");
52
- attr(input, "class", input_class_value = "mc-text-input mc-quantity-selector__input " + (/*small*/ ctx[5] ? 'mc-button--s' : ''));
53
- attr(input, "aria-label", /*inputarialabel*/ ctx[7]);
54
- attr(input, "aria-valuemin", /*valuemin*/ ctx[2]);
55
- attr(input, "aria-valuemax", /*valuemax*/ ctx[3]);
56
- attr(input, "aria-valuenow", /*quantity*/ ctx[0]);
57
- attr(input, "spellcheck", "false");
58
- attr(span1, "class", "mc-button__icon");
59
- attr(button1, "aria-controls", /*id*/ ctx[1]);
60
- attr(button1, "class", button1_class_value = "mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-right " + (/*small*/ ctx[5] ? 'mc-button--s' : ''));
61
- attr(button1, "aria-label", /*incrementarialabel*/ ctx[8]);
62
- button1.disabled = button1_disabled_value = /*quantity*/ ctx[0] === /*valuemax*/ ctx[3];
63
- set_attributes(div, div_data);
64
- },
65
- m(target, anchor) {
66
- insert(target, div, anchor);
67
- append(div, button0);
68
- append(button0, span0);
69
- append(div, t0);
70
- append(div, input);
71
- set_input_value(input, /*quantity*/ ctx[0]);
72
- append(div, t1);
73
- append(div, button1);
74
- append(button1, span1);
75
-
76
- if (!mounted) {
77
- dispose = [
78
- listen(button0, "click", /*click_handler*/ ctx[14]),
79
- action_destroyer(/*forwardEvents*/ ctx[9].call(null, input)),
80
- listen(input, "input", /*input_input_handler*/ ctx[15]),
81
- listen(input, "input", prevent_default(/*handleValue*/ ctx[10])),
82
- listen(button1, "click", /*click_handler_1*/ ctx[16])
83
- ];
84
-
85
- mounted = true;
86
- }
87
- },
88
- p(ctx, [dirty]) {
89
- if (dirty & /*id*/ 2) {
90
- attr(button0, "aria-controls", /*id*/ ctx[1]);
91
- }
92
-
93
- if (dirty & /*small*/ 32 && button0_class_value !== (button0_class_value = "mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-left " + (/*small*/ ctx[5] ? 'mc-button--s' : ''))) {
94
- attr(button0, "class", button0_class_value);
95
- }
96
-
97
- if (dirty & /*decrementarialabel*/ 64) {
98
- attr(button0, "aria-label", /*decrementarialabel*/ ctx[6]);
99
- }
100
-
101
- if (dirty & /*quantity, valuemin*/ 5 && button0_disabled_value !== (button0_disabled_value = /*quantity*/ ctx[0] === /*valuemin*/ ctx[2])) {
102
- button0.disabled = button0_disabled_value;
103
- }
104
-
105
- if (dirty & /*id*/ 2) {
106
- attr(input, "id", /*id*/ ctx[1]);
107
- }
108
-
109
- if (dirty & /*placeholder*/ 16) {
110
- attr(input, "placeholder", /*placeholder*/ ctx[4]);
111
- }
112
-
113
- if (dirty & /*small*/ 32 && input_class_value !== (input_class_value = "mc-text-input mc-quantity-selector__input " + (/*small*/ ctx[5] ? 'mc-button--s' : ''))) {
114
- attr(input, "class", input_class_value);
115
- }
116
-
117
- if (dirty & /*inputarialabel*/ 128) {
118
- attr(input, "aria-label", /*inputarialabel*/ ctx[7]);
119
- }
120
-
121
- if (dirty & /*valuemin*/ 4) {
122
- attr(input, "aria-valuemin", /*valuemin*/ ctx[2]);
123
- }
124
-
125
- if (dirty & /*valuemax*/ 8) {
126
- attr(input, "aria-valuemax", /*valuemax*/ ctx[3]);
127
- }
128
-
129
- if (dirty & /*quantity*/ 1) {
130
- attr(input, "aria-valuenow", /*quantity*/ ctx[0]);
131
- }
132
-
133
- if (dirty & /*quantity*/ 1 && to_number(input.value) !== /*quantity*/ ctx[0]) {
134
- set_input_value(input, /*quantity*/ ctx[0]);
135
- }
136
-
137
- if (dirty & /*id*/ 2) {
138
- attr(button1, "aria-controls", /*id*/ ctx[1]);
139
- }
140
-
141
- if (dirty & /*small*/ 32 && button1_class_value !== (button1_class_value = "mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-right " + (/*small*/ ctx[5] ? 'mc-button--s' : ''))) {
142
- attr(button1, "class", button1_class_value);
143
- }
144
-
145
- if (dirty & /*incrementarialabel*/ 256) {
146
- attr(button1, "aria-label", /*incrementarialabel*/ ctx[8]);
147
- }
148
-
149
- if (dirty & /*quantity, valuemax*/ 9 && button1_disabled_value !== (button1_disabled_value = /*quantity*/ ctx[0] === /*valuemax*/ ctx[3])) {
150
- button1.disabled = button1_disabled_value;
151
- }
152
-
153
- set_attributes(div, div_data = get_spread_update(div_levels, [
154
- { class: "mc-quantity-selector" },
155
- dirty & /*$$restProps*/ 8192 && /*$$restProps*/ ctx[13]
156
- ]));
157
- },
158
- i: noop,
159
- o: noop,
160
- d(detaching) {
161
- if (detaching) detach(div);
162
- mounted = false;
163
- run_all(dispose);
164
- }
165
- };
166
- }
167
-
168
- function instance($$self, $$props, $$invalidate) {
169
- const omit_props_names = [
170
- "id","quantity","valuemin","valuemax","placeholder","small","decrementarialabel","inputarialabel","incrementarialabel"
171
- ];
172
-
173
- let $$restProps = compute_rest_props($$props, omit_props_names);
174
- let { id = undefined } = $$props;
175
- let { quantity = 1 } = $$props;
176
- let { valuemin = 1 } = $$props;
177
- let { valuemax = 100 } = $$props;
178
- let { placeholder = undefined } = $$props;
179
- let { small = false } = $$props;
180
- let { decrementarialabel = 'Decrement' } = $$props;
181
- let { inputarialabel = 'Quantity Selector' } = $$props;
182
- let { incrementarialabel = 'Increment' } = $$props;
183
- let eventHandler = new EventHandler();
184
- const forwardEvents = createEventForwarder(get_current_component());
185
-
186
- function handleValue() {
187
- if (quantity > valuemax) {
188
- $$invalidate(0, quantity = valuemax);
189
- }
190
-
191
- if (quantity < valuemin) {
192
- $$invalidate(0, quantity = valuemin);
193
- }
194
-
195
- eventHandler.dispatch('input', quantity);
196
- }
197
-
198
- function decrement() {
199
- if (quantity > valuemin) {
200
- $$invalidate(0, quantity--, quantity);
201
- }
202
-
203
- eventHandler.dispatch('decrement', quantity);
204
- }
205
-
206
- function increment() {
207
- if (quantity < valuemax) {
208
- $$invalidate(0, quantity++, quantity);
209
- }
210
-
211
- eventHandler.dispatch('increment', quantity);
212
- }
213
-
214
- const click_handler = () => decrement();
215
-
216
- function input_input_handler() {
217
- quantity = to_number(this.value);
218
- $$invalidate(0, quantity);
219
- }
220
-
221
- const click_handler_1 = () => increment();
222
-
223
- $$self.$$set = $$new_props => {
224
- $$props = assign(assign({}, $$props), exclude_internal_props($$new_props));
225
- $$invalidate(13, $$restProps = compute_rest_props($$props, omit_props_names));
226
- if ('id' in $$new_props) $$invalidate(1, id = $$new_props.id);
227
- if ('quantity' in $$new_props) $$invalidate(0, quantity = $$new_props.quantity);
228
- if ('valuemin' in $$new_props) $$invalidate(2, valuemin = $$new_props.valuemin);
229
- if ('valuemax' in $$new_props) $$invalidate(3, valuemax = $$new_props.valuemax);
230
- if ('placeholder' in $$new_props) $$invalidate(4, placeholder = $$new_props.placeholder);
231
- if ('small' in $$new_props) $$invalidate(5, small = $$new_props.small);
232
- if ('decrementarialabel' in $$new_props) $$invalidate(6, decrementarialabel = $$new_props.decrementarialabel);
233
- if ('inputarialabel' in $$new_props) $$invalidate(7, inputarialabel = $$new_props.inputarialabel);
234
- if ('incrementarialabel' in $$new_props) $$invalidate(8, incrementarialabel = $$new_props.incrementarialabel);
235
- };
236
-
237
- return [
238
- quantity,
239
- id,
240
- valuemin,
241
- valuemax,
242
- placeholder,
243
- small,
244
- decrementarialabel,
245
- inputarialabel,
246
- incrementarialabel,
247
- forwardEvents,
248
- handleValue,
249
- decrement,
250
- increment,
251
- $$restProps,
252
- click_handler,
253
- input_input_handler,
254
- click_handler_1
255
- ];
256
- }
257
-
258
- class QuantitySelector extends SvelteElement {
259
- constructor(options) {
260
- super();
261
- const style = document.createElement('style');
262
- style.textContent = `.mc-text-input{font-family:"LeroyMerlin", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem;-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;display:block;width:100%;position:relative;border:1px solid #666666;color:#191919;background-color:#ffffff;border-radius:4px}.mc-text-input[type=number]::-webkit-inner-spin-button,.mc-text-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.mc-text-input[type=number]{-moz-appearance:textfield}.mc-text-input[type=search]::-webkit-search-decoration:hover,.mc-text-input[type=search]::-webkit-search-cancel-button:hover{cursor:pointer}.mc-text-input::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-webkit-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-moz-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input:-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::placeholder{margin:0;color:#666666;opacity:1}.mc-text-input.is-valid,.mc-text-input.is-invalid{background-repeat:no-repeat;background-size:1.5rem 1.5rem;background-position:right 0.4375rem center;padding-right:2.5rem}.mc-text-input.is-valid{border-color:#46a610;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjNDZhNjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiA0YTggOCAwIDExLTggOCA4IDggMCAwMTgtOG0wLTJhMTAgMTAgMCAxMDEwIDEwQTEwIDEwIDAgMDAxMiAyeiIvPjxwYXRoIGQ9Ik0xMC43MyAxNS43NWExIDEgMCAwMS0uNjgtLjI2bC0zLTIuNzRhMSAxIDAgMDExLjM2LTEuNDdsMi4yNSAyLjA4IDQuMzYtNC40MmExIDEgMCAxMTEuNDIgMS40MWwtNSA1LjFhMSAxIDAgMDEtLjcxLjN6Ii8+PC9zdmc+")}.mc-text-input.is-valid:hover,.mc-text-input.is-valid.is-hover{border-color:#035010}.mc-text-input.is-invalid{border-color:#c61112;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNjNjExMTIiPjxwYXRoIGQ9Ik0xMiAyYTEwIDEwIDAgMTAxMCAxMEExMCAxMCAwIDAwMTIgMnptMCAxOGE4IDggMCAxMTgtOCA4IDggMCAwMS04IDh6Ii8+PHBhdGggZD0iTTEyIDdhMSAxIDAgMDAtMSAxdjQuMzhhMSAxIDAgMDAyIDBWOGExIDEgMCAwMC0xLTF6Ii8+PGNpcmNsZSBjeD0iMTIiIGN5PSIxNiIgcj0iMSIvPjwvc3ZnPg==")}.mc-text-input.is-invalid:hover,.mc-text-input.is-invalid.is-hover{border-color:#530000}.mc-text-input.is-hover,.mc-text-input:hover{border-color:#191919}.mc-text-input.is-focus,.mc-text-input:focus{-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-text-input:disabled{background:#e6e6e6;border-color:#e6e6e6;color:#666666;cursor:not-allowed}.mc-text-input--s{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::placeholder{font-size:1rem;line-height:1.375}@media screen and (min-width: 680px){.mc-text-input--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-m::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1024px){.mc-text-input--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-l::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-l{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-l::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1280px){.mc-text-input--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1920px){.mc-text-input--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xxl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xxl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xxl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::placeholder{font-size:1rem;line-height:1.375}}.mc-button{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;color:#ffffff;background-color:#188803;font-family:"LeroyMerlin", sans-serif;font-weight:600;font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem;cursor:pointer;border-radius:4px;text-align:center;border:2px solid transparent;-webkit-transition:all ease 200ms;-o-transition:all ease 200ms;transition:all ease 200ms;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;vertical-align:middle;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;fill:currentColor}.mc-button.is-hover,.mc-button:hover{background-color:#006902;color:#ffffff}.mc-button.is-active,.mc-button:active{background-color:#006902}.mc-button:disabled,.mc-button.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button .mc-button__icon:first-child,.mc-button .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button.is-focus,.mc-button:focus{-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-button--s{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s .mc-button__icon:first-child,.mc-button--s .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m .mc-button__icon:first-child,.mc-button--m .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l .mc-button__icon{width:2rem;height:2rem}.mc-button--l .mc-button__icon:first-child,.mc-button--l .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full{width:-webkit-fill-available;width:-moz-available;width:stretch}}.mc-button--square{-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:0;padding:0}.mc-button__icon{-ms-flex-negative:0;flex-shrink:0}.mc-button__icon:last-child{margin-left:0.5rem;margin-right:-0.25rem}.mc-button__icon:first-child{margin-right:0.5rem;margin-left:-0.25rem}.mc-button__icon:only-child{margin:0}.mc-button__label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;pointer-events:none}.mc-button--solid-primary-02{background-color:#6a7081}.mc-button--solid-primary-02.is-hover,.mc-button--solid-primary-02:hover{background-color:#242938}.mc-button--solid-primary-02.is-active,.mc-button--solid-primary-02:active{background-color:#171b26}.mc-button--solid-primary-02:disabled,.mc-button--solid-primary-02.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--solid-neutral{background-color:#333333}.mc-button--solid-neutral.is-hover,.mc-button--solid-neutral:hover{background-color:#191919}.mc-button--solid-neutral.is-active,.mc-button--solid-neutral:active{background-color:#333333}.mc-button--solid-neutral:disabled,.mc-button--solid-neutral.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--solid-danger{background-color:#c61112}.mc-button--solid-danger.is-hover,.mc-button--solid-danger:hover{background-color:#8c0003}.mc-button--solid-danger.is-active,.mc-button--solid-danger:active{background-color:#8c0003}.mc-button--solid-danger:disabled,.mc-button--solid-danger.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered{color:#188803;border-color:#188803;background-color:#ffffff}.mc-button--bordered.is-hover,.mc-button--bordered:hover{background-color:#ebf5de;color:#006902}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#c5e39e;color:#035010}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#c5e39e;color:#035010}.mc-button--bordered:disabled,.mc-button--bordered.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-primary-02{color:#6a7081;border-color:#6a7081;background-color:#ffffff}.mc-button--bordered-primary-02.is-hover,.mc-button--bordered-primary-02:hover{background-color:#eeeff1;color:#6a7081}.mc-button--bordered-primary-02.is-active,.mc-button--bordered-primary-02:active{background-color:#cfd2d8}.mc-button--bordered-primary-02:disabled,.mc-button--bordered-primary-02.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-neutral{color:#333333;border-color:#333333;background-color:#ffffff}.mc-button--bordered-neutral.is-hover,.mc-button--bordered-neutral:hover{background-color:#e6e6e6;color:#333333}.mc-button--bordered-neutral.is-active,.mc-button--bordered-neutral:active{background-color:#cccccc}.mc-button--bordered-neutral:disabled,.mc-button--bordered-neutral.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-danger{color:#c61112;border-color:#c61112;background-color:#ffffff}.mc-button--bordered-danger.is-hover,.mc-button--bordered-danger:hover{background-color:#fdeaea;color:#8c0003}.mc-button--bordered-danger.is-active,.mc-button--bordered-danger:active{background-color:#f8bcbb;color:#530000}.mc-button--bordered-danger.is-active,.mc-button--bordered-danger:active{background-color:#f8bcbb;color:#530000}.mc-button--bordered-danger:disabled,.mc-button--bordered-danger.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}@media screen and (min-width: 680px){.mc-button--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-m .mc-button__icon:first-child,.mc-button--s\\@from-m .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-m{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-m .mc-button__icon:first-child,.mc-button--m\\@from-m .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-m{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-m .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-m .mc-button__icon:first-child,.mc-button--l\\@from-m .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-m{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-m{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-m{width:-webkit-fill-available;width:-moz-available;width:stretch}}}@media screen and (min-width: 1024px){.mc-button--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-l .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-l .mc-button__icon:first-child,.mc-button--s\\@from-l .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-l{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-l .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-l .mc-button__icon:first-child,.mc-button--m\\@from-l .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-l{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-l .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-l .mc-button__icon:first-child,.mc-button--l\\@from-l .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-l{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-l{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-l{width:-webkit-fill-available;width:-moz-available;width:stretch}}.mc-button--square{padding:0}}@media screen and (min-width: 1280px){.mc-button--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-xl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-xl .mc-button__icon:first-child,.mc-button--s\\@from-xl .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-xl{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-xl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-xl .mc-button__icon:first-child,.mc-button--m\\@from-xl .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-xl{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-xl .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-xl .mc-button__icon:first-child,.mc-button--l\\@from-xl .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-xl{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-xl{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-xl{width:-webkit-fill-available;width:-moz-available;width:stretch}}}@media screen and (min-width: 1920px){.mc-button--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-xxl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-xxl .mc-button__icon:first-child,.mc-button--s\\@from-xxl .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-xxl{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-xxl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-xxl .mc-button__icon:first-child,.mc-button--m\\@from-xxl .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-xxl{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-xxl .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-xxl .mc-button__icon:first-child,.mc-button--l\\@from-xxl .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-xxl{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-xxl{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-xxl{width:-webkit-fill-available;width:-moz-available;width:stretch}}}.mc-quantity-selector{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.mc-quantity-selector__button-right,.mc-quantity-selector__button-left{z-index:1}.mc-quantity-selector__button-right{border-radius:0 0.25rem 0.25rem 0}.mc-quantity-selector__button-left{border-radius:0.25rem 0 0 0.25rem}.mc-quantity-selector__input{border-radius:0}.mc-quantity-selector__input::-webkit-input-placeholder{text-align:center}.mc-quantity-selector__input::-moz-placeholder{text-align:center}.mc-quantity-selector__input:-ms-input-placeholder{text-align:center}.mc-quantity-selector__input::-ms-input-placeholder{text-align:center}.mc-quantity-selector__input,.mc-quantity-selector__input::placeholder{text-align:center}.mc-quantity-selector__input:not(:focus){border-left:none;border-right:none}.mc-quantity-selector__input:focus{z-index:2}`;
263
- this.shadowRoot.appendChild(style);
264
-
265
- init(
266
- this,
267
- {
268
- target: this.shadowRoot,
269
- props: attribute_to_object(this.attributes),
270
- customElement: true
271
- },
272
- instance,
273
- create_fragment,
274
- safe_not_equal,
275
- {
276
- id: 1,
277
- quantity: 0,
278
- valuemin: 2,
279
- valuemax: 3,
280
- placeholder: 4,
281
- small: 5,
282
- decrementarialabel: 6,
283
- inputarialabel: 7,
284
- incrementarialabel: 8
285
- },
286
- null
287
- );
288
-
289
- if (options) {
290
- if (options.target) {
291
- insert(options.target, this, options.anchor);
292
- }
293
-
294
- if (options.props) {
295
- this.$set(options.props);
296
- flush();
297
- }
298
- }
299
- }
300
-
301
- static get observedAttributes() {
302
- return [
303
- "id",
304
- "quantity",
305
- "valuemin",
306
- "valuemax",
307
- "placeholder",
308
- "small",
309
- "decrementarialabel",
310
- "inputarialabel",
311
- "incrementarialabel"
312
- ];
313
- }
314
-
315
- get id() {
316
- return this.$$.ctx[1];
317
- }
318
-
319
- set id(id) {
320
- this.$$set({ id });
321
- flush();
322
- }
323
-
324
- get quantity() {
325
- return this.$$.ctx[0];
326
- }
327
-
328
- set quantity(quantity) {
329
- this.$$set({ quantity });
330
- flush();
331
- }
332
-
333
- get valuemin() {
334
- return this.$$.ctx[2];
335
- }
336
-
337
- set valuemin(valuemin) {
338
- this.$$set({ valuemin });
339
- flush();
340
- }
341
-
342
- get valuemax() {
343
- return this.$$.ctx[3];
344
- }
345
-
346
- set valuemax(valuemax) {
347
- this.$$set({ valuemax });
348
- flush();
349
- }
350
-
351
- get placeholder() {
352
- return this.$$.ctx[4];
353
- }
354
-
355
- set placeholder(placeholder) {
356
- this.$$set({ placeholder });
357
- flush();
358
- }
359
-
360
- get small() {
361
- return this.$$.ctx[5];
362
- }
363
-
364
- set small(small) {
365
- this.$$set({ small });
366
- flush();
367
- }
368
-
369
- get decrementarialabel() {
370
- return this.$$.ctx[6];
371
- }
372
-
373
- set decrementarialabel(decrementarialabel) {
374
- this.$$set({ decrementarialabel });
375
- flush();
376
- }
377
-
378
- get inputarialabel() {
379
- return this.$$.ctx[7];
380
- }
381
-
382
- set inputarialabel(inputarialabel) {
383
- this.$$set({ inputarialabel });
384
- flush();
385
- }
386
-
387
- get incrementarialabel() {
388
- return this.$$.ctx[8];
389
- }
390
-
391
- set incrementarialabel(incrementarialabel) {
392
- this.$$set({ incrementarialabel });
393
- flush();
394
- }
395
- }
396
-
397
- export { QuantitySelector as default };
1
+ import{S as t,i as e,a as i,b as o,f as n,s as r,c as m,e as l,d as c,n as a,g as d,h as s,j as u,U as h,l as b,B as p,Y as g,aa as f,m as x,o as w,H as _,p as y,r as z,q as v}from"../../index-c33b3772.js";import{E as k}from"../../EventHandler-02058705.js";import{c as M}from"../../EventForward-8492ff62.js";function I(t){let e,i,n,r,y,z,v,k,M,I,A,D,q,$,j,E=[{class:"mc-quantity-selector"},t[13]],C={};for(let t=0;t<E.length;t+=1)C=m(C,E[t]);return{c(){e=l("div"),i=l("button"),n=l("span"),n.innerHTML='<navigation-control-less-32px size="100%"></navigation-control-less-32px>',z=c(),v=l("input"),M=c(),I=l("button"),A=l("span"),A.innerHTML='<navigation-control-more-32px size="100%"></navigation-control-more-32px>',this.c=a,d(n,"class","mc-button__icon"),d(i,"aria-controls",t[1]),d(i,"class",r="mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-left "+(t[5]?"mc-button--s":"")),d(i,"aria-label",t[6]),i.disabled=y=t[0]===t[2],d(v,"id",t[1]),d(v,"placeholder",t[4]),d(v,"type","number"),d(v,"name","quantity-selector-input"),d(v,"class",k="mc-text-input mc-quantity-selector__input "+(t[5]?"mc-button--s":"")),d(v,"aria-label",t[7]),d(v,"aria-valuemin",t[2]),d(v,"aria-valuemax",t[3]),d(v,"aria-valuenow",t[0]),d(v,"spellcheck","false"),d(A,"class","mc-button__icon"),d(I,"aria-controls",t[1]),d(I,"class",D="mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-right "+(t[5]?"mc-button--s":"")),d(I,"aria-label",t[8]),I.disabled=q=t[0]===t[3],s(e,C)},m(r,m){o(r,e,m),u(e,i),u(i,n),u(e,z),u(e,v),h(v,t[0]),u(e,M),u(e,I),u(I,A),$||(j=[b(i,"click",t[14]),p(t[9].call(null,v)),b(v,"input",t[15]),b(v,"input",g(t[10])),b(I,"click",t[16])],$=!0)},p(t,[o]){2&o&&d(i,"aria-controls",t[1]),32&o&&r!==(r="mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-left "+(t[5]?"mc-button--s":""))&&d(i,"class",r),64&o&&d(i,"aria-label",t[6]),5&o&&y!==(y=t[0]===t[2])&&(i.disabled=y),2&o&&d(v,"id",t[1]),16&o&&d(v,"placeholder",t[4]),32&o&&k!==(k="mc-text-input mc-quantity-selector__input "+(t[5]?"mc-button--s":""))&&d(v,"class",k),128&o&&d(v,"aria-label",t[7]),4&o&&d(v,"aria-valuemin",t[2]),8&o&&d(v,"aria-valuemax",t[3]),1&o&&d(v,"aria-valuenow",t[0]),1&o&&f(v.value)!==t[0]&&h(v,t[0]),2&o&&d(I,"aria-controls",t[1]),32&o&&D!==(D="mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-right "+(t[5]?"mc-button--s":""))&&d(I,"class",D),256&o&&d(I,"aria-label",t[8]),9&o&&q!==(q=t[0]===t[3])&&(I.disabled=q),s(e,C=x(E,[{class:"mc-quantity-selector"},8192&o&&t[13]]))},i:a,o:a,d(t){t&&w(e),$=!1,_(j)}}}function A(t,e,i){const o=["id","quantity","valuemin","valuemax","placeholder","small","decrementarialabel","inputarialabel","incrementarialabel"];let n=y(e,o),{id:r}=e,{quantity:l=1}=e,{valuemin:c=1}=e,{valuemax:a=100}=e,{placeholder:d}=e,{small:s=!1}=e,{decrementarialabel:u="Decrement"}=e,{inputarialabel:h="Quantity Selector"}=e,{incrementarialabel:b="Increment"}=e,p=new k;const g=M(z());function x(){l>c&&i(0,l--,l),p.dispatch("decrement",l)}function w(){l<a&&i(0,l++,l),p.dispatch("increment",l)}return t.$$set=t=>{e=m(m({},e),v(t)),i(13,n=y(e,o)),"id"in t&&i(1,r=t.id),"quantity"in t&&i(0,l=t.quantity),"valuemin"in t&&i(2,c=t.valuemin),"valuemax"in t&&i(3,a=t.valuemax),"placeholder"in t&&i(4,d=t.placeholder),"small"in t&&i(5,s=t.small),"decrementarialabel"in t&&i(6,u=t.decrementarialabel),"inputarialabel"in t&&i(7,h=t.inputarialabel),"incrementarialabel"in t&&i(8,b=t.incrementarialabel)},[l,r,c,a,d,s,u,h,b,g,function(){l>a&&i(0,l=a),l<c&&i(0,l=c),p.dispatch("input",l)},x,w,n,()=>x(),function(){l=f(this.value),i(0,l)},()=>w()]}class D extends t{constructor(t){super();const m=document.createElement("style");m.textContent='.mc-text-input{font-family:"LeroyMerlin", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem;-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;display:block;width:100%;position:relative;border:1px solid #666666;color:#191919;background-color:#ffffff;border-radius:4px}.mc-text-input[type=number]::-webkit-inner-spin-button,.mc-text-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.mc-text-input[type=number]{-moz-appearance:textfield}.mc-text-input[type=search]::-webkit-search-decoration:hover,.mc-text-input[type=search]::-webkit-search-cancel-button:hover{cursor:pointer}.mc-text-input::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-webkit-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-moz-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input:-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::placeholder{margin:0;color:#666666;opacity:1}.mc-text-input.is-valid,.mc-text-input.is-invalid{background-repeat:no-repeat;background-size:1.5rem 1.5rem;background-position:right 0.4375rem center;padding-right:2.5rem}.mc-text-input.is-valid{border-color:#46a610;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjNDZhNjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiA0YTggOCAwIDExLTggOCA4IDggMCAwMTgtOG0wLTJhMTAgMTAgMCAxMDEwIDEwQTEwIDEwIDAgMDAxMiAyeiIvPjxwYXRoIGQ9Ik0xMC43MyAxNS43NWExIDEgMCAwMS0uNjgtLjI2bC0zLTIuNzRhMSAxIDAgMDExLjM2LTEuNDdsMi4yNSAyLjA4IDQuMzYtNC40MmExIDEgMCAxMTEuNDIgMS40MWwtNSA1LjFhMSAxIDAgMDEtLjcxLjN6Ii8+PC9zdmc+")}.mc-text-input.is-valid:hover,.mc-text-input.is-valid.is-hover{border-color:#035010}.mc-text-input.is-invalid{border-color:#c61112;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNjNjExMTIiPjxwYXRoIGQ9Ik0xMiAyYTEwIDEwIDAgMTAxMCAxMEExMCAxMCAwIDAwMTIgMnptMCAxOGE4IDggMCAxMTgtOCA4IDggMCAwMS04IDh6Ii8+PHBhdGggZD0iTTEyIDdhMSAxIDAgMDAtMSAxdjQuMzhhMSAxIDAgMDAyIDBWOGExIDEgMCAwMC0xLTF6Ii8+PGNpcmNsZSBjeD0iMTIiIGN5PSIxNiIgcj0iMSIvPjwvc3ZnPg==")}.mc-text-input.is-invalid:hover,.mc-text-input.is-invalid.is-hover{border-color:#530000}.mc-text-input.is-hover,.mc-text-input:hover{border-color:#191919}.mc-text-input.is-focus,.mc-text-input:focus{-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-text-input:disabled{background:#e6e6e6;border-color:#e6e6e6;color:#666666;cursor:not-allowed}.mc-text-input--s{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::placeholder{font-size:1rem;line-height:1.375}@media screen and (min-width: 680px){.mc-text-input--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-m::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1024px){.mc-text-input--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-l::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-l{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-l::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1280px){.mc-text-input--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1920px){.mc-text-input--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xxl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xxl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xxl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::placeholder{font-size:1rem;line-height:1.375}}.mc-button{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;color:#ffffff;background-color:#188803;font-family:"LeroyMerlin", sans-serif;font-weight:600;font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem;cursor:pointer;border-radius:4px;text-align:center;border:2px solid transparent;-webkit-transition:all ease 200ms;-o-transition:all ease 200ms;transition:all ease 200ms;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;vertical-align:middle;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;fill:currentColor}.mc-button.is-hover,.mc-button:hover{background-color:#006902;color:#ffffff}.mc-button.is-active,.mc-button:active{background-color:#006902}.mc-button:disabled,.mc-button.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button .mc-button__icon:first-child,.mc-button .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button.is-focus,.mc-button:focus{-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-button--s{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s .mc-button__icon:first-child,.mc-button--s .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m .mc-button__icon:first-child,.mc-button--m .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l .mc-button__icon{width:2rem;height:2rem}.mc-button--l .mc-button__icon:first-child,.mc-button--l .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full{width:-webkit-fill-available;width:-moz-available;width:stretch}}.mc-button--square{-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:0;padding:0}.mc-button__icon{-ms-flex-negative:0;flex-shrink:0}.mc-button__icon:last-child{margin-left:0.5rem;margin-right:-0.25rem}.mc-button__icon:first-child{margin-right:0.5rem;margin-left:-0.25rem}.mc-button__icon:only-child{margin:0}.mc-button__label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;pointer-events:none}.mc-button--solid-primary-02{background-color:#6a7081}.mc-button--solid-primary-02.is-hover,.mc-button--solid-primary-02:hover{background-color:#242938}.mc-button--solid-primary-02.is-active,.mc-button--solid-primary-02:active{background-color:#171b26}.mc-button--solid-primary-02:disabled,.mc-button--solid-primary-02.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--solid-neutral{background-color:#333333}.mc-button--solid-neutral.is-hover,.mc-button--solid-neutral:hover{background-color:#191919}.mc-button--solid-neutral.is-active,.mc-button--solid-neutral:active{background-color:#333333}.mc-button--solid-neutral:disabled,.mc-button--solid-neutral.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--solid-danger{background-color:#c61112}.mc-button--solid-danger.is-hover,.mc-button--solid-danger:hover{background-color:#8c0003}.mc-button--solid-danger.is-active,.mc-button--solid-danger:active{background-color:#8c0003}.mc-button--solid-danger:disabled,.mc-button--solid-danger.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered{color:#188803;border-color:#188803;background-color:#ffffff}.mc-button--bordered.is-hover,.mc-button--bordered:hover{background-color:#ebf5de;color:#006902}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#c5e39e;color:#035010}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#c5e39e;color:#035010}.mc-button--bordered:disabled,.mc-button--bordered.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-primary-02{color:#6a7081;border-color:#6a7081;background-color:#ffffff}.mc-button--bordered-primary-02.is-hover,.mc-button--bordered-primary-02:hover{background-color:#eeeff1;color:#6a7081}.mc-button--bordered-primary-02.is-active,.mc-button--bordered-primary-02:active{background-color:#cfd2d8}.mc-button--bordered-primary-02:disabled,.mc-button--bordered-primary-02.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-neutral{color:#333333;border-color:#333333;background-color:#ffffff}.mc-button--bordered-neutral.is-hover,.mc-button--bordered-neutral:hover{background-color:#e6e6e6;color:#333333}.mc-button--bordered-neutral.is-active,.mc-button--bordered-neutral:active{background-color:#cccccc}.mc-button--bordered-neutral:disabled,.mc-button--bordered-neutral.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-danger{color:#c61112;border-color:#c61112;background-color:#ffffff}.mc-button--bordered-danger.is-hover,.mc-button--bordered-danger:hover{background-color:#fdeaea;color:#8c0003}.mc-button--bordered-danger.is-active,.mc-button--bordered-danger:active{background-color:#f8bcbb;color:#530000}.mc-button--bordered-danger.is-active,.mc-button--bordered-danger:active{background-color:#f8bcbb;color:#530000}.mc-button--bordered-danger:disabled,.mc-button--bordered-danger.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}@media screen and (min-width: 680px){.mc-button--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-m .mc-button__icon:first-child,.mc-button--s\\@from-m .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-m{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-m .mc-button__icon:first-child,.mc-button--m\\@from-m .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-m{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-m .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-m .mc-button__icon:first-child,.mc-button--l\\@from-m .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-m{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-m{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-m{width:-webkit-fill-available;width:-moz-available;width:stretch}}}@media screen and (min-width: 1024px){.mc-button--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-l .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-l .mc-button__icon:first-child,.mc-button--s\\@from-l .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-l{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-l .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-l .mc-button__icon:first-child,.mc-button--m\\@from-l .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-l{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-l .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-l .mc-button__icon:first-child,.mc-button--l\\@from-l .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-l{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-l{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-l{width:-webkit-fill-available;width:-moz-available;width:stretch}}.mc-button--square{padding:0}}@media screen and (min-width: 1280px){.mc-button--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-xl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-xl .mc-button__icon:first-child,.mc-button--s\\@from-xl .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-xl{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-xl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-xl .mc-button__icon:first-child,.mc-button--m\\@from-xl .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-xl{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-xl .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-xl .mc-button__icon:first-child,.mc-button--l\\@from-xl .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-xl{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-xl{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-xl{width:-webkit-fill-available;width:-moz-available;width:stretch}}}@media screen and (min-width: 1920px){.mc-button--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-xxl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-xxl .mc-button__icon:first-child,.mc-button--s\\@from-xxl .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-xxl{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-xxl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-xxl .mc-button__icon:first-child,.mc-button--m\\@from-xxl .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-xxl{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-xxl .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-xxl .mc-button__icon:first-child,.mc-button--l\\@from-xxl .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-xxl{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-xxl{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-xxl{width:-webkit-fill-available;width:-moz-available;width:stretch}}}.mc-quantity-selector{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.mc-quantity-selector__button-right,.mc-quantity-selector__button-left{z-index:1}.mc-quantity-selector__button-right{border-radius:0 0.25rem 0.25rem 0}.mc-quantity-selector__button-left{border-radius:0.25rem 0 0 0.25rem}.mc-quantity-selector__input{border-radius:0}.mc-quantity-selector__input::-webkit-input-placeholder{text-align:center}.mc-quantity-selector__input::-moz-placeholder{text-align:center}.mc-quantity-selector__input:-ms-input-placeholder{text-align:center}.mc-quantity-selector__input::-ms-input-placeholder{text-align:center}.mc-quantity-selector__input,.mc-quantity-selector__input::placeholder{text-align:center}.mc-quantity-selector__input:not(:focus){border-left:none;border-right:none}.mc-quantity-selector__input:focus{z-index:2}',this.shadowRoot.appendChild(m),e(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},A,I,r,{id:1,quantity:0,valuemin:2,valuemax:3,placeholder:4,small:5,decrementarialabel:6,inputarialabel:7,incrementarialabel:8},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["id","quantity","valuemin","valuemax","placeholder","small","decrementarialabel","inputarialabel","incrementarialabel"]}get id(){return this.$$.ctx[1]}set id(t){this.$$set({id:t}),n()}get quantity(){return this.$$.ctx[0]}set quantity(t){this.$$set({quantity:t}),n()}get valuemin(){return this.$$.ctx[2]}set valuemin(t){this.$$set({valuemin:t}),n()}get valuemax(){return this.$$.ctx[3]}set valuemax(t){this.$$set({valuemax:t}),n()}get placeholder(){return this.$$.ctx[4]}set placeholder(t){this.$$set({placeholder:t}),n()}get small(){return this.$$.ctx[5]}set small(t){this.$$set({small:t}),n()}get decrementarialabel(){return this.$$.ctx[6]}set decrementarialabel(t){this.$$set({decrementarialabel:t}),n()}get inputarialabel(){return this.$$.ctx[7]}set inputarialabel(t){this.$$set({inputarialabel:t}),n()}get incrementarialabel(){return this.$$.ctx[8]}set incrementarialabel(t){this.$$set({incrementarialabel:t}),n()}}export{D as default};
398
2
  //# sourceMappingURL=QuantitySelector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QuantitySelector.js","sources":["../../../src/components/quantityselector/QuantitySelector.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { get_current_component } from 'svelte/internal';\n import { EventHandler } from '../../utilities/EventHandler';\n import { createEventForwarder } from '../../utilities/EventForward';\n export let id: string | undefined = undefined;\n export let quantity = 1;\n export let valuemin = 1;\n export let valuemax = 100;\n export let placeholder: string | undefined = undefined;\n export let small = false;\n export let decrementarialabel = 'Decrement';\n export let inputarialabel = 'Quantity Selector';\n export let incrementarialabel = 'Increment';\n\n let eventHandler = new EventHandler();\n const forwardEvents = createEventForwarder(get_current_component());\n\n function handleValue(): void {\n if (quantity > valuemax) {\n quantity = valuemax;\n }\n if (quantity < valuemin) {\n quantity = valuemin;\n }\n eventHandler.dispatch('input', quantity);\n }\n\n function decrement(): void {\n if (quantity > valuemin) {\n quantity--;\n }\n eventHandler.dispatch('decrement', quantity);\n }\n\n function increment(): void {\n if (quantity < valuemax) {\n quantity++;\n }\n eventHandler.dispatch('increment', quantity);\n }\n</script>\n\n<div class=\"mc-quantity-selector\" {...$$restProps}>\n <button\n aria-controls={id}\n class=\"mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-left {small\n ? 'mc-button--s'\n : ''}\"\n aria-label={decrementarialabel}\n on:click={() => decrement()}\n disabled={quantity === valuemin}\n >\n <span class=\"mc-button__icon\">\n <navigation-control-less-32px size=\"100%\" />\n </span>\n </button>\n\n <input\n use:forwardEvents\n {id}\n {placeholder}\n bind:value={quantity}\n on:input|preventDefault={handleValue}\n type=\"number\"\n name=\"quantity-selector-input\"\n class=\"mc-text-input mc-quantity-selector__input {small\n ? 'mc-button--s'\n : ''}\"\n aria-label={inputarialabel}\n aria-valuemin={valuemin}\n aria-valuemax={valuemax}\n aria-valuenow={quantity}\n spellcheck=\"false\"\n />\n\n <button\n aria-controls={id}\n class=\"mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-right {small\n ? 'mc-button--s'\n : ''}\"\n aria-label={incrementarialabel}\n on:click={() => increment()}\n disabled={quantity === valuemax}\n >\n <span class=\"mc-button__icon\">\n <navigation-control-more-32px size=\"100%\" />\n </span>\n </button>\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/_c.text-input';\n @import '@mozaic-ds/styles/components/_c.button';\n @import '@mozaic-ds/styles/components/_c.quantity-selector';\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;sEA4CsC,GAAW,CAAA,EAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;yCAE9B,GAAE,CAAA,CAAA,CAAA,CAAA,CAAA;kJACyE,GAAA,CAAA,CAAA,CAAA,GACtF,cAAa,GACb,EAAE,CAAA,CAAA,CAAA;sDACM,GAAkB,CAAA,CAAA,CAAA,CAAA,CAAA;AAEpB,GAAA,OAAA,CAAA,QAAA,GAAA,sBAAA,gBAAA,GAAQ,qBAAK,GAAQ,CAAA,CAAA,CAAA,CAAA;;;;;sGAemB,GAAA,CAAA,CAAA,CAAA,GAC9C,cAAa,GACb,EAAE,CAAA,CAAA,CAAA;gDACM,GAAc,CAAA,CAAA,CAAA,CAAA,CAAA;6CACX,GAAQ,CAAA,CAAA,CAAA,CAAA,CAAA;6CACR,GAAQ,CAAA,CAAA,CAAA,CAAA,CAAA;6CACR,GAAQ,CAAA,CAAA,CAAA,CAAA,CAAA;;;yCAKR,GAAE,CAAA,CAAA,CAAA,CAAA,CAAA;mJAC0E,GAAA,CAAA,CAAA,CAAA,GACvF,cAAa,GACb,EAAE,CAAA,CAAA,CAAA;sDACM,GAAkB,CAAA,CAAA,CAAA,CAAA,CAAA;AAEpB,GAAA,OAAA,CAAA,QAAA,GAAA,sBAAA,gBAAA,GAAQ,qBAAK,GAAQ,CAAA,CAAA,CAAA,CAAA;;;;GAxCnC,MA8CK,CAAA,MAAA,EAAA,GAAA,EAAA,MAAA,CAAA,CAAA;GA7CH,MAYQ,CAAA,GAAA,EAAA,OAAA,CAAA,CAAA;GAHN,MAEM,CAAA,OAAA,EAAA,KAAA,CAAA,CAAA;;GAGR,MAgBC,CAAA,GAAA,EAAA,KAAA,CAAA,CAAA;uCAZa,GAAQ,CAAA,CAAA,CAAA,CAAA,CAAA;;GActB,MAYQ,CAAA,GAAA,EAAA,OAAA,CAAA,CAAA;GAHN,MAEM,CAAA,OAAA,EAAA,KAAA,CAAA,CAAA;;;;;;;4DAxBmB,GAAW,CAAA,EAAA,CAAA,CAAA,CAAA;;;;;;;;;0CAlBrB,GAAE,CAAA,CAAA,CAAA,CAAA,CAAA;;;gLACyE,GAAA,CAAA,CAAA,CAAA,GACtF,cAAa,GACb,EAAE,CAAA,CAAA,EAAA;;;;;uDACM,GAAkB,CAAA,CAAA,CAAA,CAAA,CAAA;;;AAEpB,GAAA,IAAA,KAAA,0BAAA,CAAA,IAAA,sBAAA,MAAA,sBAAA,gBAAA,GAAQ,qBAAK,GAAQ,CAAA,CAAA,CAAA,CAAA,EAAA;;;;;;;;;;;;oIAemB,GAAA,CAAA,CAAA,CAAA,GAC9C,cAAa,GACb,EAAE,CAAA,CAAA,EAAA;;;;;iDACM,GAAc,CAAA,CAAA,CAAA,CAAA,CAAA;;;;8CACX,GAAQ,CAAA,CAAA,CAAA,CAAA,CAAA;;;;8CACR,GAAQ,CAAA,CAAA,CAAA,CAAA,CAAA;;;;8CACR,GAAQ,CAAA,CAAA,CAAA,CAAA,CAAA;;;yEAVX,GAAQ,CAAA,CAAA,CAAA,EAAA;wCAAR,GAAQ,CAAA,CAAA,CAAA,CAAA,CAAA;;;;0CAeL,GAAE,CAAA,CAAA,CAAA,CAAA,CAAA;;;iLAC0E,GAAA,CAAA,CAAA,CAAA,GACvF,cAAa,GACb,EAAE,CAAA,CAAA,EAAA;;;;;uDACM,GAAkB,CAAA,CAAA,CAAA,CAAA,CAAA;;;AAEpB,GAAA,IAAA,KAAA,0BAAA,CAAA,IAAA,sBAAA,MAAA,sBAAA,gBAAA,GAAQ,qBAAK,GAAQ,CAAA,CAAA,CAAA,CAAA,EAAA;;;;;;oDAxCG,GAAW,CAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;AAtCpC,CAAA,IAAA,EAAA,EAAE,GAAuB,SAAS,EAAA,GAAA,OAAA,CAAA;AAClC,CAAA,IAAA,EAAA,QAAQ,GAAG,CAAC,EAAA,GAAA,OAAA,CAAA;AACZ,CAAA,IAAA,EAAA,QAAQ,GAAG,CAAC,EAAA,GAAA,OAAA,CAAA;AACZ,CAAA,IAAA,EAAA,QAAQ,GAAG,GAAG,EAAA,GAAA,OAAA,CAAA;AACd,CAAA,IAAA,EAAA,WAAW,GAAuB,SAAS,EAAA,GAAA,OAAA,CAAA;AAC3C,CAAA,IAAA,EAAA,KAAK,GAAG,KAAK,EAAA,GAAA,OAAA,CAAA;AACb,CAAA,IAAA,EAAA,kBAAkB,GAAG,WAAW,EAAA,GAAA,OAAA,CAAA;AAChC,CAAA,IAAA,EAAA,cAAc,GAAG,mBAAmB,EAAA,GAAA,OAAA,CAAA;AACpC,CAAA,IAAA,EAAA,kBAAkB,GAAG,WAAW,EAAA,GAAA,OAAA,CAAA;AAEvC,CAAA,IAAA,YAAY,OAAO,YAAY,EAAA,CAAA;OAC7B,aAAa,GAAG,oBAAoB,CAAC,qBAAqB,EAAA,CAAA,CAAA;;UAEvD,WAAW,GAAA;AACd,EAAA,IAAA,QAAQ,GAAG,QAAQ,EAAA;AACrB,GAAA,YAAA,CAAA,CAAA,EAAA,QAAQ,GAAG,QAAQ,CAAA,CAAA;;;AAEjB,EAAA,IAAA,QAAQ,GAAG,QAAQ,EAAA;AACrB,GAAA,YAAA,CAAA,CAAA,EAAA,QAAQ,GAAG,QAAQ,CAAA,CAAA;;;AAErB,EAAA,YAAY,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAA,CAAA;;;UAGhC,SAAS,GAAA;AACZ,EAAA,IAAA,QAAQ,GAAG,QAAQ,EAAA;mBACrB,QAAQ,EAAA,EAAA,QAAA,CAAA,CAAA;;;AAEV,EAAA,YAAY,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAA,CAAA;;;UAGpC,SAAS,GAAA;AACZ,EAAA,IAAA,QAAQ,GAAG,QAAQ,EAAA;mBACrB,QAAQ,EAAA,EAAA,QAAA,CAAA,CAAA;;;AAEV,EAAA,YAAY,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAA,CAAA;;;6BAW3B,SAAS,EAAA,CAAA;;;EAYb,QAAQ,GAAA,SAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA;;;;+BAoBJ,SAAS,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"QuantitySelector.js","sources":["../../../src/components/quantityselector/QuantitySelector.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { get_current_component } from 'svelte/internal';\n import { EventHandler } from '../../utilities/EventHandler';\n import { createEventForwarder } from '../../utilities/EventForward';\n export let id: string | undefined = undefined;\n export let quantity = 1;\n export let valuemin = 1;\n export let valuemax = 100;\n export let placeholder: string | undefined = undefined;\n export let small = false;\n export let decrementarialabel = 'Decrement';\n export let inputarialabel = 'Quantity Selector';\n export let incrementarialabel = 'Increment';\n\n let eventHandler = new EventHandler();\n const forwardEvents = createEventForwarder(get_current_component());\n\n function handleValue(): void {\n if (quantity > valuemax) {\n quantity = valuemax;\n }\n if (quantity < valuemin) {\n quantity = valuemin;\n }\n eventHandler.dispatch('input', quantity);\n }\n\n function decrement(): void {\n if (quantity > valuemin) {\n quantity--;\n }\n eventHandler.dispatch('decrement', quantity);\n }\n\n function increment(): void {\n if (quantity < valuemax) {\n quantity++;\n }\n eventHandler.dispatch('increment', quantity);\n }\n</script>\n\n<div class=\"mc-quantity-selector\" {...$$restProps}>\n <button\n aria-controls={id}\n class=\"mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-left {small\n ? 'mc-button--s'\n : ''}\"\n aria-label={decrementarialabel}\n on:click={() => decrement()}\n disabled={quantity === valuemin}\n >\n <span class=\"mc-button__icon\">\n <navigation-control-less-32px size=\"100%\" />\n </span>\n </button>\n\n <input\n use:forwardEvents\n {id}\n {placeholder}\n bind:value={quantity}\n on:input|preventDefault={handleValue}\n type=\"number\"\n name=\"quantity-selector-input\"\n class=\"mc-text-input mc-quantity-selector__input {small\n ? 'mc-button--s'\n : ''}\"\n aria-label={inputarialabel}\n aria-valuemin={valuemin}\n aria-valuemax={valuemax}\n aria-valuenow={quantity}\n spellcheck=\"false\"\n />\n\n <button\n aria-controls={id}\n class=\"mc-button mc-button--square mc-button--bordered mc-quantity-selector__button-right {small\n ? 'mc-button--s'\n : ''}\"\n aria-label={incrementarialabel}\n on:click={() => increment()}\n disabled={quantity === valuemax}\n >\n <span class=\"mc-button__icon\">\n <navigation-control-more-32px size=\"100%\" />\n </span>\n </button>\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/_c.text-input';\n @import '@mozaic-ds/styles/components/_c.button';\n @import '@mozaic-ds/styles/components/_c.quantity-selector';\n</style>\n"],"names":["ctx","button0","disabled","button0_disabled_value","button1","button1_disabled_value","insert","target","div","anchor","append","span0","input","span1","dirty","id","$$props","quantity","valuemin","valuemax","placeholder","small","decrementarialabel","inputarialabel","incrementarialabel","eventHandler","EventHandler","forwardEvents","createEventForwarder","get_current_component","decrement","dispatch","increment","$$invalidate","to_number","this","value"],"mappings":"sYA4CsCA,EAAW,iYAE9BA,EAAE,wGACyEA,EAAA,GACtF,eACA,sBACQA,EAAkB,IAEpBC,EAAAC,SAAAC,EAAAH,OAAaA,EAAQ,iKAemBA,EAAA,GAC9C,eACA,sBACQA,EAAc,wBACXA,EAAQ,wBACRA,EAAQ,wBACRA,EAAQ,iFAKRA,EAAE,yGAC0EA,EAAA,GACvF,eACA,sBACQA,EAAkB,IAEpBI,EAAAF,SAAAG,EAAAL,OAAaA,EAAQ,kBAxCnCM,EA8CKC,EAAAC,EAAAC,GA7CHC,EAYQF,EAAAP,GAHNS,EAEMT,EAAAU,UAGRD,EAgBCF,EAAAI,OAZaZ,EAAQ,WActBU,EAYQF,EAAAJ,GAHNM,EAEMN,EAAAS,mFAxBmBb,EAAW,mEAlBrBA,EAAE,uGACyEA,EAAA,GACtF,eACA,4CACQA,EAAkB,IAEpB,EAAAc,GAAAX,KAAAA,EAAAH,OAAaA,EAAQ,iIAemBA,EAAA,GAC9C,eACA,6CACQA,EAAc,6BACXA,EAAQ,6BACRA,EAAQ,6BACRA,EAAQ,sBAVXA,EAAQ,QAARA,EAAQ,6BAeLA,EAAE,wGAC0EA,EAAA,GACvF,eACA,6CACQA,EAAkB,IAEpB,EAAAc,GAAAT,KAAAA,EAAAL,OAAaA,EAAQ,sEAxCGA,EAAW,0MAtCpCe,GAAAA,GAAkCC,GAClCC,SAAAA,EAAW,GAACD,GACZE,SAAAA,EAAW,GAACF,GACZG,SAAAA,EAAW,KAAGH,GACdI,YAAAA,GAA2CJ,GAC3CK,MAAAA,GAAQ,GAAKL,GACbM,mBAAAA,EAAqB,aAAWN,GAChCO,eAAAA,EAAiB,qBAAmBP,GACpCQ,mBAAAA,EAAqB,aAAWR,EAEvCS,MAAmBC,QACjBC,EAAgBC,EAAqBC,cAYlCC,IACHb,EAAWC,OACbD,IAAQA,GAEVQ,EAAaM,SAAS,YAAad,YAG5Be,IACHf,EAAWE,OACbF,IAAQA,GAEVQ,EAAaM,SAAS,YAAad,kbApB/BA,EAAWE,GACbc,EAAA,EAAAhB,EAAWE,GAETF,EAAWC,GACbe,EAAA,EAAAhB,EAAWC,GAEbO,EAAaM,SAAS,QAASd,cAyBfa,eAYJb,EAAQiB,EAAAC,KAAAC,mBAoBJJ"}