@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.
- package/package.json +3 -3
- package/public/ClickOutside-63071e7a.js +1 -15
- package/public/ClickOutside-63071e7a.js.map +1 -1
- package/public/DataTableDefaultAction.nested-4da4dc44.js +1 -759
- package/public/DataTableDefaultAction.nested-4da4dc44.js.map +1 -1
- package/public/DataTableUtilities-60220c78.js +1 -370
- package/public/DataTableUtilities-60220c78.js.map +1 -1
- package/public/EventForward-8492ff62.js +1 -109
- package/public/EventForward-8492ff62.js.map +1 -1
- package/public/EventHandler-02058705.js +1 -15
- package/public/EventHandler-02058705.js.map +1 -1
- package/public/adeo/components/layer/Layer.js +1 -1
- package/public/adeo/components/layer/Layer.js.map +1 -1
- package/public/adeo/components/layer/Layer.svelte +2 -1
- package/public/adeo/components/phonenumber/PhoneNumber.js +1 -1
- package/public/adeo/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/adeo/components/phonenumber/PhoneNumber.svelte +72 -9
- package/public/adeo/components/quantityselector/QuantitySelector.js +1 -1
- package/public/adeo/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/adeo/components/quantityselector/QuantitySelector.svelte +6 -3
- package/public/array-5b770a93.js +1 -13
- package/public/array-5b770a93.js.map +1 -1
- package/public/axis-fbc0f7b5.js +1 -174
- package/public/axis-fbc0f7b5.js.map +1 -1
- package/public/band-d7a07d2c.js +1 -186
- package/public/band-d7a07d2c.js.map +1 -1
- package/public/bricoman/components/chart/Donut.js +1 -1
- package/public/bricoman/components/header/Header.js +1 -1
- package/public/bricoman/components/hero/Hero.js +1 -1
- package/public/bricoman/components/layer/Layer.js +1 -1
- package/public/bricoman/components/layer/Layer.js.map +1 -1
- package/public/bricoman/components/layer/Layer.svelte +2 -1
- package/public/bricoman/components/listbox/Listbox.js +1 -1
- package/public/bricoman/components/listbox/Listbox.nested.js +1 -1
- package/public/bricoman/components/phonenumber/PhoneNumber.js +1 -1
- package/public/bricoman/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/bricoman/components/phonenumber/PhoneNumber.svelte +72 -9
- package/public/bricoman/components/price/Price.js +1 -1
- package/public/bricoman/components/quantityselector/QuantitySelector.js +1 -1
- package/public/bricoman/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/bricoman/components/quantityselector/QuantitySelector.svelte +6 -3
- package/public/components/accordion/Accordion.js +1 -365
- package/public/components/accordion/Accordion.js.map +1 -1
- package/public/components/autocomplete/Autocomplete.js +1 -1515
- package/public/components/autocomplete/Autocomplete.js.map +1 -1
- package/public/components/badge/Badge.js +1 -155
- package/public/components/badge/Badge.js.map +1 -1
- package/public/components/badge/Badge.nested.js +1 -101
- package/public/components/badge/Badge.nested.js.map +1 -1
- package/public/components/breadcrumb/Breadcrumb.js +1 -372
- package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/public/components/breadcrumb/Breadcrumb.nested.js +1 -319
- package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
- package/public/components/button/Button.js +1 -1138
- package/public/components/button/Button.js.map +1 -1
- package/public/components/card/Card.js +1 -369
- package/public/components/card/Card.js.map +1 -1
- package/public/components/chart/BarChart.js +1 -582
- package/public/components/chart/BarChart.js.map +1 -1
- package/public/components/chart/Donut.js +1 -1189
- package/public/components/chart/Donut.js.map +1 -1
- package/public/components/chart/GroupedBarChart.js +1 -750
- package/public/components/chart/GroupedBarChart.js.map +1 -1
- package/public/components/chart/LineChart.js +1 -1731
- package/public/components/chart/LineChart.js.map +1 -1
- package/public/components/chart/Radar.js +1 -729
- package/public/components/chart/Radar.js.map +1 -1
- package/public/components/chart/StackedBarChart.js +1 -745
- package/public/components/chart/StackedBarChart.js.map +1 -1
- package/public/components/checkbox/Checkbox.js +1 -307
- package/public/components/checkbox/Checkbox.js.map +1 -1
- package/public/components/checkboxgroup/checkboxGroup.js +1 -404
- package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
- package/public/components/datatable/DataTable.js +1 -3064
- package/public/components/datatable/DataTable.js.map +1 -1
- package/public/components/datatable/DataTableDefaultAction.nested.js +1 -4
- package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultEdtion.nested.js +1 -164
- package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultFilterTags.nested.js +1 -380
- package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultSelection.nested.js +1 -424
- package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +1 -263
- package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
- package/public/components/datatable/DataTableFooter.nested.js +1 -637
- package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
- package/public/components/dropdown/Dropdown.js +1 -1426
- package/public/components/dropdown/Dropdown.js.map +1 -1
- package/public/components/field/Field.js +1 -375
- package/public/components/field/Field.js.map +1 -1
- package/public/components/fileuploader/FileUploader.js +1 -555
- package/public/components/fileuploader/FileUploader.js.map +1 -1
- package/public/components/fileuploader/ResultFile.nested.js +1 -265
- package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
- package/public/components/flag/Flag.js +1 -174
- package/public/components/flag/Flag.js.map +1 -1
- package/public/components/header/Header.js +1 -903
- package/public/components/header/Header.js.map +1 -1
- package/public/components/hero/Hero.js +1 -271
- package/public/components/hero/Hero.js.map +1 -1
- package/public/components/layer/Layer.js +1 -453
- package/public/components/layer/Layer.js.map +1 -1
- package/public/components/layer/Layer.svelte +2 -1
- package/public/components/link/Link.js +1 -380
- package/public/components/link/Link.js.map +1 -1
- package/public/components/listbox/Listbox.js +1 -595
- package/public/components/listbox/Listbox.js.map +1 -1
- package/public/components/listbox/Listbox.nested.js +1 -629
- package/public/components/listbox/Listbox.nested.js.map +1 -1
- package/public/components/loader/Loader.js +1 -246
- package/public/components/loader/Loader.js.map +1 -1
- package/public/components/loader/Loader.nested.js +1 -176
- package/public/components/loader/Loader.nested.js.map +1 -1
- package/public/components/modal/Modal.js +1 -395
- package/public/components/modal/Modal.js.map +1 -1
- package/public/components/notification/Notification.js +1 -458
- package/public/components/notification/Notification.js.map +1 -1
- package/public/components/optionbutton/OptionButton.js +1 -316
- package/public/components/optionbutton/OptionButton.js.map +1 -1
- package/public/components/overlay/Overlay.js +1 -104
- package/public/components/overlay/Overlay.js.map +1 -1
- package/public/components/overlay/OverlayLoader.js +1 -151
- package/public/components/overlay/OverlayLoader.js.map +1 -1
- package/public/components/pagination/Pagination.js +1 -613
- package/public/components/pagination/Pagination.js.map +1 -1
- package/public/components/passwordinput/PasswordInput.js +1 -291
- package/public/components/passwordinput/PasswordInput.js.map +1 -1
- package/public/components/phonenumber/PhoneNumber.js +1 -6894
- package/public/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/components/price/Price.js +1 -768
- package/public/components/price/Price.js.map +1 -1
- package/public/components/progressbar/ProgressBar.js +1 -278
- package/public/components/progressbar/ProgressBar.js.map +1 -1
- package/public/components/quantityselector/QuantitySelector.js +1 -333
- package/public/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/components/quantityselector/QuantitySelector.svelte +6 -3
- package/public/components/radio/Radio.js +1 -273
- package/public/components/radio/Radio.js.map +1 -1
- package/public/components/radiogroup/RadioGroup.js +1 -414
- package/public/components/radiogroup/RadioGroup.js.map +1 -1
- package/public/components/ratings/StarsInput.js +1 -292
- package/public/components/ratings/StarsInput.js.map +1 -1
- package/public/components/ratings/StarsResult.js +1 -246
- package/public/components/ratings/StarsResult.js.map +1 -1
- package/public/components/select/Select.js +1 -451
- package/public/components/select/Select.js.map +1 -1
- package/public/components/sidebar/Sidebar.js +1 -784
- package/public/components/sidebar/Sidebar.js.map +1 -1
- package/public/components/sidebar/sidebar-feature-group.nested.js +1 -594
- package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-feature.nested.js +1 -402
- package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-section.nested.js +1 -394
- package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-segment.nested.js +1 -200
- package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-separator.nested.js +1 -49
- package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-sub-features.nested.js +1 -312
- package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-user.nested.js +1 -733
- package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
- package/public/components/stepper/Stepper.js +1 -371
- package/public/components/stepper/Stepper.js.map +1 -1
- package/public/components/tabs/Tabs.js +1 -615
- package/public/components/tabs/Tabs.js.map +1 -1
- package/public/components/tabs/Tabs.nested.js +1 -472
- package/public/components/tabs/Tabs.nested.js.map +1 -1
- package/public/components/tag/Tag.js +1 -665
- package/public/components/tag/Tag.js.map +1 -1
- package/public/components/tag/Tag.nested.js +1 -554
- package/public/components/tag/Tag.nested.js.map +1 -1
- package/public/components/taglist/TagList.js +1 -475
- package/public/components/taglist/TagList.js.map +1 -1
- package/public/components/textarea/Textarea.js +1 -303
- package/public/components/textarea/Textarea.js.map +1 -1
- package/public/components/textinput/Textinput.js +1 -497
- package/public/components/textinput/Textinput.js.map +1 -1
- package/public/components/textinput/Textinput.nested.js +1 -320
- package/public/components/textinput/Textinput.nested.js.map +1 -1
- package/public/components/toggle/Toggle.js +1 -278
- package/public/components/toggle/Toggle.js.map +1 -1
- package/public/components/tooltip/Tooltip.js +1 -173
- package/public/components/tooltip/Tooltip.js.map +1 -1
- package/public/index-c33b3772.js +1 -873
- package/public/index-c33b3772.js.map +1 -1
- package/public/linear-f46d7e9e.js +1 -700
- package/public/linear-f46d7e9e.js.map +1 -1
- package/public/path-1b5da959.js +1 -186
- package/public/path-1b5da959.js.map +1 -1
- package/public/sidebar-service-275bf9ef.js +1 -129
- package/public/sidebar-service-275bf9ef.js.map +1 -1
- package/public/symbol-b05a6e2b.js +1 -169
- package/public/symbol-b05a6e2b.js.map +1 -1
- package/public/transform-15d69d5d.js +1 -2743
- package/public/transform-15d69d5d.js.map +1 -1
- package/public/utilities/stories/quantityselector/QuantitySelector.stories.d.ts.map +1 -1
|
@@ -1,454 +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, t as text, n as noop, g as attr, h as set_attributes, j as append, l as listen, k as set_data, m as get_spread_update, o as detach, H as run_all, p as compute_rest_props, a1 as onMount, q as exclude_internal_props, v as binding_callbacks } from '../../index-c33b3772.js';
|
|
2
|
-
import { E as EventHandler } from '../../EventHandler-02058705.js';
|
|
3
|
-
|
|
4
|
-
/* src/components/layer/Layer.svelte generated by Svelte v3.58.0 */
|
|
5
|
-
|
|
6
|
-
function create_if_block_1(ctx) {
|
|
7
|
-
let span;
|
|
8
|
-
let raw_value = `<${generateIconName(/*iconname*/ ctx[5])} class="mc-layer__icon" />` + "";
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
c() {
|
|
12
|
-
span = element("span");
|
|
13
|
-
attr(span, "class", "mc-layer__icon");
|
|
14
|
-
},
|
|
15
|
-
m(target, anchor) {
|
|
16
|
-
insert(target, span, anchor);
|
|
17
|
-
span.innerHTML = raw_value;
|
|
18
|
-
},
|
|
19
|
-
p(ctx, dirty) {
|
|
20
|
-
if (dirty & /*iconname*/ 32 && raw_value !== (raw_value = `<${generateIconName(/*iconname*/ ctx[5])} class="mc-layer__icon" />` + "")) span.innerHTML = raw_value; },
|
|
21
|
-
d(detaching) {
|
|
22
|
-
if (detaching) detach(span);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// (85:6) {#if !hideFooter}
|
|
28
|
-
function create_if_block(ctx) {
|
|
29
|
-
let footer;
|
|
30
|
-
|
|
31
|
-
return {
|
|
32
|
-
c() {
|
|
33
|
-
footer = element("footer");
|
|
34
|
-
footer.innerHTML = `<slot name="footer"></slot>`;
|
|
35
|
-
attr(footer, "class", "mc-layer__footer");
|
|
36
|
-
},
|
|
37
|
-
m(target, anchor) {
|
|
38
|
-
insert(target, footer, anchor);
|
|
39
|
-
},
|
|
40
|
-
d(detaching) {
|
|
41
|
-
if (detaching) detach(footer);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function create_fragment(ctx) {
|
|
47
|
-
let div4;
|
|
48
|
-
let div2;
|
|
49
|
-
let div1;
|
|
50
|
-
let div0;
|
|
51
|
-
let t0;
|
|
52
|
-
let h2;
|
|
53
|
-
let t1;
|
|
54
|
-
let t2;
|
|
55
|
-
let button;
|
|
56
|
-
let span;
|
|
57
|
-
let t3;
|
|
58
|
-
let t4;
|
|
59
|
-
let main;
|
|
60
|
-
let article;
|
|
61
|
-
let main_class_value;
|
|
62
|
-
let t5;
|
|
63
|
-
let div1_class_value;
|
|
64
|
-
let div2_aria_hidden_value;
|
|
65
|
-
let t6;
|
|
66
|
-
let div3;
|
|
67
|
-
let div3_class_value;
|
|
68
|
-
let mounted;
|
|
69
|
-
let dispose;
|
|
70
|
-
let if_block0 = /*iconname*/ ctx[5] && create_if_block_1(ctx);
|
|
71
|
-
let if_block1 = !/*hideFooter*/ ctx[8] && create_if_block();
|
|
72
|
-
|
|
73
|
-
let div2_levels = [
|
|
74
|
-
{ class: "mc-layer" },
|
|
75
|
-
{ tabindex: "-1" },
|
|
76
|
-
{ role: "dialog" },
|
|
77
|
-
{ "aria-labelledby": "layerTitle" },
|
|
78
|
-
{ "aria-modal": "true" },
|
|
79
|
-
{
|
|
80
|
-
"aria-hidden": div2_aria_hidden_value = !/*isopen*/ ctx[0]
|
|
81
|
-
},
|
|
82
|
-
/*attributes*/ ctx[6]
|
|
83
|
-
];
|
|
84
|
-
|
|
85
|
-
let div_data_3 = {};
|
|
86
|
-
|
|
87
|
-
for (let i = 0; i < div2_levels.length; i += 1) {
|
|
88
|
-
div_data_3 = assign(div_data_3, div2_levels[i]);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return {
|
|
92
|
-
c() {
|
|
93
|
-
div4 = element("div");
|
|
94
|
-
div2 = element("div");
|
|
95
|
-
div1 = element("div");
|
|
96
|
-
div0 = element("div");
|
|
97
|
-
if (if_block0) if_block0.c();
|
|
98
|
-
t0 = space();
|
|
99
|
-
h2 = element("h2");
|
|
100
|
-
t1 = text(/*title*/ ctx[1]);
|
|
101
|
-
t2 = space();
|
|
102
|
-
button = element("button");
|
|
103
|
-
span = element("span");
|
|
104
|
-
t3 = text(/*closebuttontext*/ ctx[4]);
|
|
105
|
-
t4 = space();
|
|
106
|
-
main = element("main");
|
|
107
|
-
article = element("article");
|
|
108
|
-
article.innerHTML = `<slot name="content"></slot>`;
|
|
109
|
-
t5 = space();
|
|
110
|
-
if (if_block1) if_block1.c();
|
|
111
|
-
t6 = space();
|
|
112
|
-
div3 = element("div");
|
|
113
|
-
this.c = noop;
|
|
114
|
-
attr(h2, "class", "mc-layer__title");
|
|
115
|
-
attr(h2, "id", "modallayerTitleTitle");
|
|
116
|
-
attr(span, "class", "mc-layer__close-text");
|
|
117
|
-
attr(button, "class", "mc-layer__close");
|
|
118
|
-
attr(button, "type", "button");
|
|
119
|
-
attr(div0, "class", "mc-layer__header");
|
|
120
|
-
attr(article, "class", "mc-layer__content");
|
|
121
|
-
|
|
122
|
-
attr(main, "class", main_class_value = "mc-layer__body " + (/*scrollbaredge*/ ctx[3]
|
|
123
|
-
? 'mc-layer__body--overflowing-scroll-edge'
|
|
124
|
-
: ''));
|
|
125
|
-
|
|
126
|
-
attr(div1, "class", div1_class_value = "mc-layer__dialog " + (/*isopen*/ ctx[0] ? ' is-open' : '') + " " + (/*extended*/ ctx[2] ? ' mc-layer__dialog--extend' : ''));
|
|
127
|
-
attr(div1, "role", "document");
|
|
128
|
-
set_attributes(div2, div_data_3);
|
|
129
|
-
attr(div3, "class", div3_class_value = "mc-layer-overlay " + (/*isopen*/ ctx[0] ? ' is-visible' : ''));
|
|
130
|
-
attr(div3, "tabindex", "-1");
|
|
131
|
-
attr(div3, "role", "dialog");
|
|
132
|
-
},
|
|
133
|
-
m(target, anchor) {
|
|
134
|
-
insert(target, div4, anchor);
|
|
135
|
-
append(div4, div2);
|
|
136
|
-
append(div2, div1);
|
|
137
|
-
append(div1, div0);
|
|
138
|
-
if (if_block0) if_block0.m(div0, null);
|
|
139
|
-
append(div0, t0);
|
|
140
|
-
append(div0, h2);
|
|
141
|
-
append(h2, t1);
|
|
142
|
-
append(div0, t2);
|
|
143
|
-
append(div0, button);
|
|
144
|
-
append(button, span);
|
|
145
|
-
append(span, t3);
|
|
146
|
-
append(div1, t4);
|
|
147
|
-
append(div1, main);
|
|
148
|
-
append(main, article);
|
|
149
|
-
append(div1, t5);
|
|
150
|
-
if (if_block1) if_block1.m(div1, null);
|
|
151
|
-
append(div4, t6);
|
|
152
|
-
append(div4, div3);
|
|
153
|
-
/*div4_binding*/ ctx[13](div4);
|
|
154
|
-
|
|
155
|
-
if (!mounted) {
|
|
156
|
-
dispose = [
|
|
157
|
-
listen(button, "click", /*click_handler*/ ctx[11]),
|
|
158
|
-
listen(div3, "click", /*click_handler_1*/ ctx[12])
|
|
159
|
-
];
|
|
160
|
-
|
|
161
|
-
mounted = true;
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
p(ctx, [dirty]) {
|
|
165
|
-
if (/*iconname*/ ctx[5]) {
|
|
166
|
-
if (if_block0) {
|
|
167
|
-
if_block0.p(ctx, dirty);
|
|
168
|
-
} else {
|
|
169
|
-
if_block0 = create_if_block_1(ctx);
|
|
170
|
-
if_block0.c();
|
|
171
|
-
if_block0.m(div0, t0);
|
|
172
|
-
}
|
|
173
|
-
} else if (if_block0) {
|
|
174
|
-
if_block0.d(1);
|
|
175
|
-
if_block0 = null;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if (dirty & /*title*/ 2) set_data(t1, /*title*/ ctx[1]);
|
|
179
|
-
if (dirty & /*closebuttontext*/ 16) set_data(t3, /*closebuttontext*/ ctx[4]);
|
|
180
|
-
|
|
181
|
-
if (dirty & /*scrollbaredge*/ 8 && main_class_value !== (main_class_value = "mc-layer__body " + (/*scrollbaredge*/ ctx[3]
|
|
182
|
-
? 'mc-layer__body--overflowing-scroll-edge'
|
|
183
|
-
: ''))) {
|
|
184
|
-
attr(main, "class", main_class_value);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if (!/*hideFooter*/ ctx[8]) {
|
|
188
|
-
if (if_block1) ; else {
|
|
189
|
-
if_block1 = create_if_block();
|
|
190
|
-
if_block1.c();
|
|
191
|
-
if_block1.m(div1, null);
|
|
192
|
-
}
|
|
193
|
-
} else if (if_block1) {
|
|
194
|
-
if_block1.d(1);
|
|
195
|
-
if_block1 = null;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (dirty & /*isopen, extended*/ 5 && div1_class_value !== (div1_class_value = "mc-layer__dialog " + (/*isopen*/ ctx[0] ? ' is-open' : '') + " " + (/*extended*/ ctx[2] ? ' mc-layer__dialog--extend' : ''))) {
|
|
199
|
-
attr(div1, "class", div1_class_value);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
set_attributes(div2, div_data_3 = get_spread_update(div2_levels, [
|
|
203
|
-
{ class: "mc-layer" },
|
|
204
|
-
{ tabindex: "-1" },
|
|
205
|
-
{ role: "dialog" },
|
|
206
|
-
{ "aria-labelledby": "layerTitle" },
|
|
207
|
-
{ "aria-modal": "true" },
|
|
208
|
-
dirty & /*isopen*/ 1 && div2_aria_hidden_value !== (div2_aria_hidden_value = !/*isopen*/ ctx[0]) && { "aria-hidden": div2_aria_hidden_value },
|
|
209
|
-
dirty & /*attributes*/ 64 && /*attributes*/ ctx[6]
|
|
210
|
-
]));
|
|
211
|
-
|
|
212
|
-
if (dirty & /*isopen*/ 1 && div3_class_value !== (div3_class_value = "mc-layer-overlay " + (/*isopen*/ ctx[0] ? ' is-visible' : ''))) {
|
|
213
|
-
attr(div3, "class", div3_class_value);
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
i: noop,
|
|
217
|
-
o: noop,
|
|
218
|
-
d(detaching) {
|
|
219
|
-
if (detaching) detach(div4);
|
|
220
|
-
if (if_block0) if_block0.d();
|
|
221
|
-
if (if_block1) if_block1.d();
|
|
222
|
-
/*div4_binding*/ ctx[13](null);
|
|
223
|
-
mounted = false;
|
|
224
|
-
run_all(dispose);
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
function generateIconName(iconname) {
|
|
230
|
-
return `${iconname} size="1.5rem"`;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
function instance($$self, $$props, $$invalidate) {
|
|
234
|
-
let hideFooter;
|
|
235
|
-
let attributes;
|
|
236
|
-
|
|
237
|
-
const omit_props_names = [
|
|
238
|
-
"title","isopen","extended","scrollbaredge","closebuttontext","iconname","hidefooter"
|
|
239
|
-
];
|
|
240
|
-
|
|
241
|
-
let $$restProps = compute_rest_props($$props, omit_props_names);
|
|
242
|
-
let { title } = $$props;
|
|
243
|
-
let { isopen } = $$props;
|
|
244
|
-
let { extended } = $$props;
|
|
245
|
-
let { scrollbaredge } = $$props;
|
|
246
|
-
let { closebuttontext = 'Close' } = $$props;
|
|
247
|
-
let { iconname = undefined } = $$props;
|
|
248
|
-
let { hidefooter } = $$props;
|
|
249
|
-
let root;
|
|
250
|
-
let eventHandler = new EventHandler();
|
|
251
|
-
|
|
252
|
-
onMount(() => {
|
|
253
|
-
const body = root.querySelector('.mc-layer__body');
|
|
254
|
-
const content = root.querySelector('.mc-layer__content');
|
|
255
|
-
|
|
256
|
-
const overflowingClass = !scrollbaredge
|
|
257
|
-
? 'mc-layer__body--overflowing'
|
|
258
|
-
: 'mc-layer__body--overflowing-scroll-edge';
|
|
259
|
-
|
|
260
|
-
if (body && content) {
|
|
261
|
-
const bodyHeight = body.clientHeight;
|
|
262
|
-
const contentHeight = content.scrollHeight;
|
|
263
|
-
|
|
264
|
-
if (contentHeight > bodyHeight) {
|
|
265
|
-
body.classList.add(overflowingClass);
|
|
266
|
-
} else {
|
|
267
|
-
body.classList.remove(overflowingClass);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
function onClose() {
|
|
273
|
-
$$invalidate(0, isopen = false);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
const click_handler = () => onClose();
|
|
277
|
-
const click_handler_1 = () => onClose();
|
|
278
|
-
|
|
279
|
-
function div4_binding($$value) {
|
|
280
|
-
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
281
|
-
root = $$value;
|
|
282
|
-
$$invalidate(7, root);
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
$$self.$$set = $$new_props => {
|
|
287
|
-
$$props = assign(assign({}, $$props), exclude_internal_props($$new_props));
|
|
288
|
-
$$invalidate(15, $$restProps = compute_rest_props($$props, omit_props_names));
|
|
289
|
-
if ('title' in $$new_props) $$invalidate(1, title = $$new_props.title);
|
|
290
|
-
if ('isopen' in $$new_props) $$invalidate(0, isopen = $$new_props.isopen);
|
|
291
|
-
if ('extended' in $$new_props) $$invalidate(2, extended = $$new_props.extended);
|
|
292
|
-
if ('scrollbaredge' in $$new_props) $$invalidate(3, scrollbaredge = $$new_props.scrollbaredge);
|
|
293
|
-
if ('closebuttontext' in $$new_props) $$invalidate(4, closebuttontext = $$new_props.closebuttontext);
|
|
294
|
-
if ('iconname' in $$new_props) $$invalidate(5, iconname = $$new_props.iconname);
|
|
295
|
-
if ('hidefooter' in $$new_props) $$invalidate(10, hidefooter = $$new_props.hidefooter);
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
$$self.$$.update = () => {
|
|
299
|
-
if ($$self.$$.dirty & /*hidefooter*/ 1024) {
|
|
300
|
-
$$invalidate(8, hideFooter = hidefooter !== null && hidefooter !== void 0
|
|
301
|
-
? hidefooter
|
|
302
|
-
: false);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
if ($$self.$$.dirty & /*isopen*/ 1) {
|
|
306
|
-
isopen
|
|
307
|
-
? eventHandler.dispatch('layer-opened', {})
|
|
308
|
-
: eventHandler.dispatch('layer-closed', {});
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
$$invalidate(6, attributes = Object.assign({}, $$restProps));
|
|
312
|
-
|
|
313
|
-
if ($$self.$$.dirty & /*attributes*/ 64) {
|
|
314
|
-
delete attributes.class;
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
return [
|
|
319
|
-
isopen,
|
|
320
|
-
title,
|
|
321
|
-
extended,
|
|
322
|
-
scrollbaredge,
|
|
323
|
-
closebuttontext,
|
|
324
|
-
iconname,
|
|
325
|
-
attributes,
|
|
326
|
-
root,
|
|
327
|
-
hideFooter,
|
|
328
|
-
onClose,
|
|
329
|
-
hidefooter,
|
|
330
|
-
click_handler,
|
|
331
|
-
click_handler_1,
|
|
332
|
-
div4_binding
|
|
333
|
-
];
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
class Layer extends SvelteElement {
|
|
337
|
-
constructor(options) {
|
|
338
|
-
super();
|
|
339
|
-
const style = document.createElement('style');
|
|
340
|
-
style.textContent = `.mc-layer{font-family:"LeroyMerlin", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;bottom:0;left:0;outline:0;pointer-events:none;position:fixed;right:0;top:0;z-index:1999999999;display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden}.mc-layer *{-webkit-box-sizing:inherit;box-sizing:inherit}.mc-layer--ltr{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.mc-layer--ltr .mc-layer__dialog{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0)}.mc-layer:not(.mc-layer--ltr){-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.mc-layer:not(.mc-layer--ltr) .mc-layer__dialog{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0)}.mc-layer__dialog{background:#ffffff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;max-width:calc(100% - 2rem);-webkit-transition:visibility 0s linear 0.4s, -webkit-transform 0.4s;transition:visibility 0s linear 0.4s, -webkit-transform 0.4s;-o-transition:visibility 0s linear 0.4s, transform 0.4s;transition:visibility 0s linear 0.4s, transform 0.4s;transition:visibility 0s linear 0.4s, transform 0.4s, -webkit-transform 0.4s;visibility:hidden;width:100%}@media screen and (min-width: 680px){.mc-layer__dialog{max-width:25rem}}@media screen and (min-width: 769px){.mc-layer__dialog{max-width:28.6875rem}}@media screen and (min-width: 1024px){.mc-layer__dialog{max-width:28rem}}@media screen and (min-width: 680px){.mc-layer__dialog--extend{max-width:31.75rem}}@media screen and (min-width: 769px){.mc-layer__dialog--extend{max-width:36.3125rem}}@media screen and (min-width: 1024px){.mc-layer__dialog--extend{max-width:43rem}}.mc-layer__header,.mc-layer__footer{padding-left:1rem;padding-right:1rem}@media screen and (min-width: 1024px){.mc-layer__header,.mc-layer__footer{padding-left:2rem;padding-right:2rem}}.mc-layer__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-bottom:0.5rem;padding-top:1rem;min-height:3.75rem;position:relative}.mc-layer__header::after{background:#b3b3b3;content:"";display:block;margin:0 auto;height:1px;width:100%;bottom:0;left:0;position:absolute}@media screen and (min-width: 1024px){.mc-layer__header{padding-bottom:0.75rem;padding-top:1.25rem;min-height:4.25rem}}.mc-layer__icon{fill:#666666;height:1.5rem;margin-right:0.75rem;width:1.5rem}.mc-layer__title{font-size:0.875rem;line-height:1.2857142857;font-weight:400;color:#666666;margin-bottom:0;margin-top:0}.mc-layer__close{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;position:relative;-ms-flex-item-align:start;align-self:flex-start;background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMnJlbSIgd2lkdGg9IjJyZW0iIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0iIzgwODA4MCI+PHBhdGggZD0iTTE3LjQxIDE2bDguOC04Ljc5YTEgMSAwIDEwLTEuNDItMS40MkwxNiAxNC41OWwtOC43OS04LjhhMSAxIDAgMDAtMS40MiAxLjQybDguOCA4Ljc5LTguOCA4Ljc5YTEgMSAwIDAwMCAxLjQyIDEgMSAwIDAwMS40MiAwbDguNzktOC44IDguNzkgOC44YTEgMSAwIDAwMS40MiAwIDEgMSAwIDAwMC0xLjQyeiIvPjwvc3ZnPg==") no-repeat;background-size:contain;cursor:pointer;height:2rem;margin-left:auto;width:2rem}.mc-layer__close::after{border-radius:2px;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;content:"";display:block;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease}.mc-layer__close-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;visibility:visible;white-space:nowrap}.mc-layer__close:focus::after{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-layer__body{-webkit-box-flex:1;-ms-flex:1 1;flex:1 1;overflow:hidden;padding-left:0.5rem;padding-right:0.5rem}@media screen and (min-width: 1024px){.mc-layer__body{padding-left:1rem;padding-right:1rem}}.mc-layer__body--overflowing-scroll-edge+.mc-layer__footer{-webkit-box-shadow:0px 4px 20px 0px rgba(25, 25, 25, 0.2);box-shadow:0px 4px 20px 0px rgba(25, 25, 25, 0.2);position:relative}.mc-layer__body--overflowing-scroll-edge{padding-left:0;padding-right:0}.mc-layer__body--overflowing-scroll-edge .mc-layer__content{padding-left:1rem;padding-right:1.125rem}@media screen and (min-width: 1024px){.mc-layer__body--overflowing-scroll-edge .mc-layer__content{padding-left:2rem;padding-right:2rem}}.mc-layer__content{max-height:100%;overflow-y:auto;overflow-x:hidden;padding:1.5rem 0.5rem 3rem;scrollbar-color:#666666 #e6e6e6;scrollbar-width:thin}@media screen and (min-width: 1024px){.mc-layer__content{padding-left:1rem;padding-right:1rem}}.mc-layer__content::-webkit-scrollbar{background-color:#e6e6e6;width:0.25rem}.mc-layer__content::-webkit-scrollbar-thumb{background:#666666}.mc-layer__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding-top:1rem;padding-bottom:1rem}@media screen and (min-width: 1024px){.mc-layer__footer{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-top:1.5rem;padding-bottom:1.5rem}}.mc-layer__footer>:first-child:not(:only-child){margin-bottom:0.75rem}@media screen and (min-width: 1024px){.mc-layer__footer>:first-child:not(:only-child){margin-bottom:0;margin-right:1rem}}.mc-layer-open{overflow:hidden}.mc-layer .mc-layer__dialog.is-open{pointer-events:all;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:visibility 0s linear 0s, -webkit-transform 0.4s;transition:visibility 0s linear 0s, -webkit-transform 0.4s;-o-transition:visibility 0s linear 0s, transform 0.4s;transition:visibility 0s linear 0s, transform 0.4s;transition:visibility 0s linear 0s, transform 0.4s, -webkit-transform 0.4s;visibility:visible}.mc-layer-overlay{background-color:rgba(25, 25, 25, 0.7);-webkit-filter:blur(1px);filter:blur(1px);inset:0;opacity:0;position:fixed;pointer-events:none;-webkit-transition:opacity 0.4s ease, visibility 0ms 0.4s;-o-transition:opacity 0.4s ease, visibility 0ms 0.4s;transition:opacity 0.4s ease, visibility 0ms 0.4s;z-index:1999999998}.mc-layer-overlay.is-visible{opacity:1;pointer-events:all;-webkit-transition:opacity 0.4s ease, visibility 0ms;-o-transition:opacity 0.4s ease, visibility 0ms;transition:opacity 0.4s ease, visibility 0ms;visibility:visible}`;
|
|
341
|
-
this.shadowRoot.appendChild(style);
|
|
342
|
-
|
|
343
|
-
init(
|
|
344
|
-
this,
|
|
345
|
-
{
|
|
346
|
-
target: this.shadowRoot,
|
|
347
|
-
props: attribute_to_object(this.attributes),
|
|
348
|
-
customElement: true
|
|
349
|
-
},
|
|
350
|
-
instance,
|
|
351
|
-
create_fragment,
|
|
352
|
-
safe_not_equal,
|
|
353
|
-
{
|
|
354
|
-
title: 1,
|
|
355
|
-
isopen: 0,
|
|
356
|
-
extended: 2,
|
|
357
|
-
scrollbaredge: 3,
|
|
358
|
-
closebuttontext: 4,
|
|
359
|
-
iconname: 5,
|
|
360
|
-
hidefooter: 10
|
|
361
|
-
},
|
|
362
|
-
null
|
|
363
|
-
);
|
|
364
|
-
|
|
365
|
-
if (options) {
|
|
366
|
-
if (options.target) {
|
|
367
|
-
insert(options.target, this, options.anchor);
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
if (options.props) {
|
|
371
|
-
this.$set(options.props);
|
|
372
|
-
flush();
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
static get observedAttributes() {
|
|
378
|
-
return [
|
|
379
|
-
"title",
|
|
380
|
-
"isopen",
|
|
381
|
-
"extended",
|
|
382
|
-
"scrollbaredge",
|
|
383
|
-
"closebuttontext",
|
|
384
|
-
"iconname",
|
|
385
|
-
"hidefooter"
|
|
386
|
-
];
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
get title() {
|
|
390
|
-
return this.$$.ctx[1];
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
set title(title) {
|
|
394
|
-
this.$$set({ title });
|
|
395
|
-
flush();
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
get isopen() {
|
|
399
|
-
return this.$$.ctx[0];
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
set isopen(isopen) {
|
|
403
|
-
this.$$set({ isopen });
|
|
404
|
-
flush();
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
get extended() {
|
|
408
|
-
return this.$$.ctx[2];
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
set extended(extended) {
|
|
412
|
-
this.$$set({ extended });
|
|
413
|
-
flush();
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
get scrollbaredge() {
|
|
417
|
-
return this.$$.ctx[3];
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
set scrollbaredge(scrollbaredge) {
|
|
421
|
-
this.$$set({ scrollbaredge });
|
|
422
|
-
flush();
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
get closebuttontext() {
|
|
426
|
-
return this.$$.ctx[4];
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
set closebuttontext(closebuttontext) {
|
|
430
|
-
this.$$set({ closebuttontext });
|
|
431
|
-
flush();
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
get iconname() {
|
|
435
|
-
return this.$$.ctx[5];
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
set iconname(iconname) {
|
|
439
|
-
this.$$set({ iconname });
|
|
440
|
-
flush();
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
get hidefooter() {
|
|
444
|
-
return this.$$.ctx[10];
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
set hidefooter(hidefooter) {
|
|
448
|
-
this.$$set({ hidefooter });
|
|
449
|
-
flush();
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
export { Layer as default };
|
|
1
|
+
import{S as e,i as t,a as i,b as r,f as a,s as o,c as n,e as l,d as s,t as d,n as c,g as m,h as b,j as y,l as g,k as x,m as p,o as h,H as f,p as w,a1 as _,q as u,v}from"../../index-c33b3772.js";import{E as k}from"../../EventHandler-02058705.js";function $(e){let t,i=`<${D(e[5])} class="mc-layer__icon" />`;return{c(){t=l("span"),m(t,"class","mc-layer__icon")},m(e,a){r(e,t,a),t.innerHTML=i},p(e,r){32&r&&i!==(i=`<${D(e[5])} class="mc-layer__icon" />`)&&(t.innerHTML=i)},d(e){e&&h(t)}}}function M(e){let t;return{c(){t=l("footer"),t.innerHTML='<slot name="footer"></slot>',m(t,"class","mc-layer__footer")},m(e,i){r(e,t,i)},d(e){e&&h(t)}}}function A(e){let t,i,a,o,w,_,u,v,k,A,D,I,j,L,z,C,S,T,E,H,O,Z,N,P=e[5]&&$(e),Q=!e[9]&&M(),W=[{class:"mc-layer"},{tabindex:"-1"},{role:"dialog"},{"aria-labelledby":e[6]},{"aria-modal":"true"},{"aria-hidden":T=!e[0]},e[7]],q={};for(let e=0;e<W.length;e+=1)q=n(q,W[e]);return{c(){t=l("div"),i=l("div"),a=l("div"),o=l("div"),P&&P.c(),w=s(),_=l("h2"),u=d(e[1]),v=s(),k=l("button"),A=l("span"),D=d(e[4]),I=s(),j=l("main"),L=l("article"),L.innerHTML='<slot name="content"></slot>',C=s(),Q&&Q.c(),E=s(),H=l("div"),this.c=c,m(_,"class","mc-layer__title"),m(_,"id","modallayerTitleTitle"),m(A,"class","mc-layer__close-text"),m(k,"class","mc-layer__close"),m(k,"type","button"),m(o,"class","mc-layer__header"),m(L,"class","mc-layer__content"),m(j,"class",z="mc-layer__body "+(e[3]?"mc-layer__body--overflowing-scroll-edge":"")),m(a,"class",S="mc-layer__dialog "+(e[0]?" is-open":"")+" "+(e[2]?" mc-layer__dialog--extend":"")),m(a,"role","document"),b(i,q),m(H,"class",O="mc-layer-overlay "+(e[0]?" is-visible":"")),m(H,"tabindex","-1"),m(H,"role","dialog")},m(n,l){r(n,t,l),y(t,i),y(i,a),y(a,o),P&&P.m(o,null),y(o,w),y(o,_),y(_,u),y(o,v),y(o,k),y(k,A),y(A,D),y(a,I),y(a,j),y(j,L),y(a,C),Q&&Q.m(a,null),y(t,E),y(t,H),e[14](t),Z||(N=[g(k,"click",e[12]),g(H,"click",e[13])],Z=!0)},p(e,[t]){e[5]?P?P.p(e,t):(P=$(e),P.c(),P.m(o,w)):P&&(P.d(1),P=null),2&t&&x(u,e[1]),16&t&&x(D,e[4]),8&t&&z!==(z="mc-layer__body "+(e[3]?"mc-layer__body--overflowing-scroll-edge":""))&&m(j,"class",z),e[9]?Q&&(Q.d(1),Q=null):Q||(Q=M(),Q.c(),Q.m(a,null)),5&t&&S!==(S="mc-layer__dialog "+(e[0]?" is-open":"")+" "+(e[2]?" mc-layer__dialog--extend":""))&&m(a,"class",S),b(i,q=p(W,[{class:"mc-layer"},{tabindex:"-1"},{role:"dialog"},64&t&&{"aria-labelledby":e[6]},{"aria-modal":"true"},1&t&&T!==(T=!e[0])&&{"aria-hidden":T},128&t&&e[7]])),1&t&&O!==(O="mc-layer-overlay "+(e[0]?" is-visible":""))&&m(H,"class",O)},i:c,o:c,d(i){i&&h(t),P&&P.d(),Q&&Q.d(),e[14](null),Z=!1,f(N)}}}function D(e){return`${e} size="1.5rem"`}function I(e,t,i){let r,a;const o=["title","isopen","extended","scrollbaredge","closebuttontext","iconname","hidefooter","arialabelledby"];let l,s=w(t,o),{title:d}=t,{isopen:c}=t,{extended:m}=t,{scrollbaredge:b}=t,{closebuttontext:y="Close"}=t,{iconname:g}=t,{hidefooter:x}=t,{arialabelledby:p="LayerTitle"}=t,h=new k;function f(){i(0,c=!1)}_((()=>{const e=l.querySelector(".mc-layer__body"),t=l.querySelector(".mc-layer__content"),i=b?"mc-layer__body--overflowing-scroll-edge":"mc-layer__body--overflowing";if(e&&t){const r=e.clientHeight;t.scrollHeight>r?e.classList.add(i):e.classList.remove(i)}}));return e.$$set=e=>{t=n(n({},t),u(e)),i(16,s=w(t,o)),"title"in e&&i(1,d=e.title),"isopen"in e&&i(0,c=e.isopen),"extended"in e&&i(2,m=e.extended),"scrollbaredge"in e&&i(3,b=e.scrollbaredge),"closebuttontext"in e&&i(4,y=e.closebuttontext),"iconname"in e&&i(5,g=e.iconname),"hidefooter"in e&&i(11,x=e.hidefooter),"arialabelledby"in e&&i(6,p=e.arialabelledby)},e.$$.update=()=>{2048&e.$$.dirty&&i(9,r=null!=x&&x),1&e.$$.dirty&&(c?h.dispatch("layer-opened",{}):h.dispatch("layer-closed",{})),i(7,a=Object.assign({},s)),128&e.$$.dirty&&delete a.class},[c,d,m,b,y,g,p,a,l,r,f,x,()=>f(),()=>f(),function(e){v[e?"unshift":"push"]((()=>{l=e,i(8,l)}))}]}class j extends e{constructor(e){super();const n=document.createElement("style");n.textContent='.mc-layer{font-family:"LeroyMerlin", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;bottom:0;left:0;outline:0;pointer-events:none;position:fixed;right:0;top:0;z-index:1999999999;display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden}.mc-layer *{-webkit-box-sizing:inherit;box-sizing:inherit}.mc-layer--ltr{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.mc-layer--ltr .mc-layer__dialog{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0)}.mc-layer:not(.mc-layer--ltr){-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.mc-layer:not(.mc-layer--ltr) .mc-layer__dialog{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0)}.mc-layer__dialog{background:#ffffff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;max-width:calc(100% - 2rem);-webkit-transition:visibility 0s linear 0.4s, -webkit-transform 0.4s;transition:visibility 0s linear 0.4s, -webkit-transform 0.4s;-o-transition:visibility 0s linear 0.4s, transform 0.4s;transition:visibility 0s linear 0.4s, transform 0.4s;transition:visibility 0s linear 0.4s, transform 0.4s, -webkit-transform 0.4s;visibility:hidden;width:100%}@media screen and (min-width: 680px){.mc-layer__dialog{max-width:25rem}}@media screen and (min-width: 769px){.mc-layer__dialog{max-width:28.6875rem}}@media screen and (min-width: 1024px){.mc-layer__dialog{max-width:28rem}}@media screen and (min-width: 680px){.mc-layer__dialog--extend{max-width:31.75rem}}@media screen and (min-width: 769px){.mc-layer__dialog--extend{max-width:36.3125rem}}@media screen and (min-width: 1024px){.mc-layer__dialog--extend{max-width:43rem}}.mc-layer__header,.mc-layer__footer{padding-left:1rem;padding-right:1rem}@media screen and (min-width: 1024px){.mc-layer__header,.mc-layer__footer{padding-left:2rem;padding-right:2rem}}.mc-layer__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-bottom:0.5rem;padding-top:1rem;min-height:3.75rem;position:relative}.mc-layer__header::after{background:#b3b3b3;content:"";display:block;margin:0 auto;height:1px;width:100%;bottom:0;left:0;position:absolute}@media screen and (min-width: 1024px){.mc-layer__header{padding-bottom:0.75rem;padding-top:1.25rem;min-height:4.25rem}}.mc-layer__icon{fill:#666666;height:1.5rem;margin-right:0.75rem;width:1.5rem}.mc-layer__title{font-size:0.875rem;line-height:1.2857142857;font-weight:400;color:#666666;margin-bottom:0;margin-top:0}.mc-layer__close{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;position:relative;-ms-flex-item-align:start;align-self:flex-start;background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMnJlbSIgd2lkdGg9IjJyZW0iIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0iIzgwODA4MCI+PHBhdGggZD0iTTE3LjQxIDE2bDguOC04Ljc5YTEgMSAwIDEwLTEuNDItMS40MkwxNiAxNC41OWwtOC43OS04LjhhMSAxIDAgMDAtMS40MiAxLjQybDguOCA4Ljc5LTguOCA4Ljc5YTEgMSAwIDAwMCAxLjQyIDEgMSAwIDAwMS40MiAwbDguNzktOC44IDguNzkgOC44YTEgMSAwIDAwMS40MiAwIDEgMSAwIDAwMC0xLjQyeiIvPjwvc3ZnPg==") no-repeat;background-size:contain;cursor:pointer;height:2rem;margin-left:auto;width:2rem}.mc-layer__close::after{border-radius:2px;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;content:"";display:block;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease}.mc-layer__close-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;visibility:visible;white-space:nowrap}.mc-layer__close:focus::after{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-layer__body{-webkit-box-flex:1;-ms-flex:1 1;flex:1 1;overflow:hidden;padding-left:0.5rem;padding-right:0.5rem}@media screen and (min-width: 1024px){.mc-layer__body{padding-left:1rem;padding-right:1rem}}.mc-layer__body--overflowing-scroll-edge+.mc-layer__footer{-webkit-box-shadow:0px 4px 20px 0px rgba(25, 25, 25, 0.2);box-shadow:0px 4px 20px 0px rgba(25, 25, 25, 0.2);position:relative}.mc-layer__body--overflowing-scroll-edge{padding-left:0;padding-right:0}.mc-layer__body--overflowing-scroll-edge .mc-layer__content{padding-left:1rem;padding-right:1.125rem}@media screen and (min-width: 1024px){.mc-layer__body--overflowing-scroll-edge .mc-layer__content{padding-left:2rem;padding-right:2rem}}.mc-layer__content{max-height:100%;overflow-y:auto;overflow-x:hidden;padding:1.5rem 0.5rem 3rem;scrollbar-color:#666666 #e6e6e6;scrollbar-width:thin}@media screen and (min-width: 1024px){.mc-layer__content{padding-left:1rem;padding-right:1rem}}.mc-layer__content::-webkit-scrollbar{background-color:#e6e6e6;width:0.25rem}.mc-layer__content::-webkit-scrollbar-thumb{background:#666666}.mc-layer__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding-top:1rem;padding-bottom:1rem}@media screen and (min-width: 1024px){.mc-layer__footer{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-top:1.5rem;padding-bottom:1.5rem}}.mc-layer__footer>:first-child:not(:only-child){margin-bottom:0.75rem}@media screen and (min-width: 1024px){.mc-layer__footer>:first-child:not(:only-child){margin-bottom:0;margin-right:1rem}}.mc-layer-open{overflow:hidden}.mc-layer .mc-layer__dialog.is-open{pointer-events:all;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:visibility 0s linear 0s, -webkit-transform 0.4s;transition:visibility 0s linear 0s, -webkit-transform 0.4s;-o-transition:visibility 0s linear 0s, transform 0.4s;transition:visibility 0s linear 0s, transform 0.4s;transition:visibility 0s linear 0s, transform 0.4s, -webkit-transform 0.4s;visibility:visible}.mc-layer-overlay{background-color:rgba(25, 25, 25, 0.7);-webkit-filter:blur(1px);filter:blur(1px);inset:0;opacity:0;position:fixed;pointer-events:none;-webkit-transition:opacity 0.4s ease, visibility 0ms 0.4s;-o-transition:opacity 0.4s ease, visibility 0ms 0.4s;transition:opacity 0.4s ease, visibility 0ms 0.4s;z-index:1999999998}.mc-layer-overlay.is-visible{opacity:1;pointer-events:all;-webkit-transition:opacity 0.4s ease, visibility 0ms;-o-transition:opacity 0.4s ease, visibility 0ms;transition:opacity 0.4s ease, visibility 0ms;visibility:visible}',this.shadowRoot.appendChild(n),t(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},I,A,o,{title:1,isopen:0,extended:2,scrollbaredge:3,closebuttontext:4,iconname:5,hidefooter:11,arialabelledby:6},null),e&&(e.target&&r(e.target,this,e.anchor),e.props&&(this.$set(e.props),a()))}static get observedAttributes(){return["title","isopen","extended","scrollbaredge","closebuttontext","iconname","hidefooter","arialabelledby"]}get title(){return this.$$.ctx[1]}set title(e){this.$$set({title:e}),a()}get isopen(){return this.$$.ctx[0]}set isopen(e){this.$$set({isopen:e}),a()}get extended(){return this.$$.ctx[2]}set extended(e){this.$$set({extended:e}),a()}get scrollbaredge(){return this.$$.ctx[3]}set scrollbaredge(e){this.$$set({scrollbaredge:e}),a()}get closebuttontext(){return this.$$.ctx[4]}set closebuttontext(e){this.$$set({closebuttontext:e}),a()}get iconname(){return this.$$.ctx[5]}set iconname(e){this.$$set({iconname:e}),a()}get hidefooter(){return this.$$.ctx[11]}set hidefooter(e){this.$$set({hidefooter:e}),a()}get arialabelledby(){return this.$$.ctx[6]}set arialabelledby(e){this.$$set({arialabelledby:e}),a()}}export{j as default};
|
|
454
2
|
//# sourceMappingURL=Layer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layer.js","sources":["../../../src/components/layer/Layer.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { onMount } from 'svelte/internal';\n import { EventHandler } from '../../utilities/EventHandler';\n export let title: string;\n export let isopen: boolean;\n export let extended: boolean;\n export let scrollbaredge: boolean;\n export let closebuttontext = 'Close';\n export let iconname: string | undefined = undefined;\n export let hidefooter: boolean;\n\n $: hideFooter = hidefooter ?? false;\n $: isopen\n ? eventHandler.dispatch('layer-opened', {})\n : eventHandler.dispatch('layer-closed', {});\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n let root: HTMLElement;\n let eventHandler = new EventHandler();\n onMount(() => {\n const body = root.querySelector('.mc-layer__body');\n const content = root.querySelector('.mc-layer__content');\n const overflowingClass = !scrollbaredge\n ? 'mc-layer__body--overflowing'\n : 'mc-layer__body--overflowing-scroll-edge';\n if (body && content) {\n const bodyHeight = body.clientHeight;\n const contentHeight = content.scrollHeight;\n\n if (contentHeight > bodyHeight) {\n body.classList.add(overflowingClass);\n } else {\n body.classList.remove(overflowingClass);\n }\n }\n });\n\n function onClose(): void {\n isopen = false;\n }\n\n function generateIconName(iconname: string): string {\n return `${iconname} size=\"1.5rem\"`;\n }\n</script>\n\n<div bind:this={root}>\n <div\n class=\"mc-layer\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-labelledby
|
|
1
|
+
{"version":3,"file":"Layer.js","sources":["../../../src/components/layer/Layer.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { onMount } from 'svelte/internal';\n import { EventHandler } from '../../utilities/EventHandler';\n export let title: string;\n export let isopen: boolean;\n export let extended: boolean;\n export let scrollbaredge: boolean;\n export let closebuttontext = 'Close';\n export let iconname: string | undefined = undefined;\n export let hidefooter: boolean;\n export let arialabelledby = 'LayerTitle';\n\n $: hideFooter = hidefooter ?? false;\n $: isopen\n ? eventHandler.dispatch('layer-opened', {})\n : eventHandler.dispatch('layer-closed', {});\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n let root: HTMLElement;\n let eventHandler = new EventHandler();\n onMount(() => {\n const body = root.querySelector('.mc-layer__body');\n const content = root.querySelector('.mc-layer__content');\n const overflowingClass = !scrollbaredge\n ? 'mc-layer__body--overflowing'\n : 'mc-layer__body--overflowing-scroll-edge';\n if (body && content) {\n const bodyHeight = body.clientHeight;\n const contentHeight = content.scrollHeight;\n\n if (contentHeight > bodyHeight) {\n body.classList.add(overflowingClass);\n } else {\n body.classList.remove(overflowingClass);\n }\n }\n });\n\n function onClose(): void {\n isopen = false;\n }\n\n function generateIconName(iconname: string): string {\n return `${iconname} size=\"1.5rem\"`;\n }\n</script>\n\n<div bind:this={root}>\n <div\n class=\"mc-layer\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-labelledby={arialabelledby}\n aria-modal=\"true\"\n aria-hidden={!isopen}\n {...attributes}\n >\n <div\n class=\"mc-layer__dialog {isopen ? ' is-open' : ''} {extended\n ? ' mc-layer__dialog--extend'\n : ''}\"\n role=\"document\"\n >\n <div class=\"mc-layer__header\">\n {#if iconname}\n <span class=\"mc-layer__icon\">\n {@html `<${generateIconName(iconname)} class=\"mc-layer__icon\" />`}\n </span>\n {/if}\n <h2 class=\"mc-layer__title\" id=\"modallayerTitleTitle\">{title}</h2>\n <button\n class=\"mc-layer__close\"\n type=\"button\"\n on:click={() => onClose()}\n >\n <span class=\"mc-layer__close-text\">{closebuttontext}</span>\n </button>\n </div>\n <main\n class=\"mc-layer__body {scrollbaredge\n ? 'mc-layer__body--overflowing-scroll-edge'\n : ''}\"\n >\n <article class=\"mc-layer__content\">\n <slot name=\"content\" />\n </article>\n </main>\n {#if !hideFooter}\n <footer class=\"mc-layer__footer\">\n <slot name=\"footer\" />\n </footer>\n {/if}\n </div>\n </div>\n <div\n class=\"mc-layer-overlay {isopen ? ' is-visible' : ''}\"\n tabindex=\"-1\"\n role=\"dialog\"\n on:click={() => onClose()}\n />\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.layer';\n</style>\n"],"names":["raw_value","generateIconName","ctx","insert","target","span","anchor","dirty","innerHTML","footer","create_if_block_1","create_if_block","div4","append","div2","div1","div0","h2","button","main","article","div3","div2_aria_hidden_value","iconname","root","title","$$props","isopen","extended","scrollbaredge","closebuttontext","hidefooter","arialabelledby","eventHandler","EventHandler","onClose","$$invalidate","onMount","body","querySelector","content","overflowingClass","bodyHeight","clientHeight","scrollHeight","classList","add","remove","hideFooter","dispatch","attributes","Object","assign","$$restProps","class","$$value"],"mappings":"yQAoEuBA,EAAA,IAAAC,EAAiBC,EAAQ,6FADtCC,EAEMC,EAAAC,EAAAC,yBADO,GAAAC,GAAAP,KAAAA,EAAA,IAAAC,EAAiBC,EAAQ,mCAAAG,EAAAG,UAAAR,kJAsBxCG,EAEQC,EAAAK,EAAAH,qFA1BHJ,EAAQ,IAAAQ,EAAAR,MAuBTA,EAAU,IAAAS,6EAnCDT,EAAc,4CAEjBA,EAAM,IAChBA,EAAU,qIAc6CA,EAAK,wCAMtBA,EAAe,mXAI9BA,EAAA,GACnB,0CACA,wCAvBmBA,EAAM,GAAG,WAAa,SAAKA,EAAA,GAChD,4BACA,sEAmCmBA,EAAM,GAAG,cAAgB,uDAhDtDC,EAqDKC,EAAAQ,EAAAN,GApDHO,EA6CKD,EAAAE,GApCHD,EAmCKC,EAAAC,GA7BHF,EAcKE,EAAAC,yBARHH,EAAiEG,EAAAC,iBACjEJ,EAMQG,EAAAE,GADNL,EAA0DK,EAAAb,iBAG9DQ,EAQME,EAAAI,GAHJN,EAESM,EAAAC,gCASfP,EAKCD,EAAAS,0EAnCUnB,EAAQ,kEAK0CA,EAAK,cAMtBA,EAAe,mCAI9BA,EAAA,GACnB,0CACA,qBAMAA,EAAU,oFA7BSA,EAAM,GAAG,WAAa,SAAKA,EAAA,GAChD,4BACA,4GARWA,EAAc,uCAEjBA,EAAM,KAAA,CAAA,cAAAoB,UAChBpB,EAAU,uCAwCWA,EAAM,GAAG,cAAgB,qFArD3C,SAAAD,EAAiBsB,YACdA,iKAzBRC,kBAfOC,GAAaC,UACbC,GAAeD,YACfE,GAAiBF,iBACjBG,GAAsBH,GACtBI,gBAAAA,EAAkB,SAAOJ,GACzBH,SAAAA,GAAwCG,cACxCK,GAAmBL,GACnBM,eAAAA,EAAiB,cAAYN,EASpCO,MAAmBC,WAmBdC,IACPC,EAAA,EAAAT,GAAS,GAnBXU,GAAO,KACC,MAAAC,EAAOd,EAAKe,cAAc,mBAC1BC,EAAUhB,EAAKe,cAAc,sBAC7BE,EAAoBZ,EAEtB,0CADA,8BAEA,GAAAS,GAAQE,EAAO,OACXE,EAAaJ,EAAKK,aACFH,EAAQI,aAEVF,EAClBJ,EAAKO,UAAUC,IAAIL,GAEnBH,EAAKO,UAAUE,OAAON,6YArB3BL,EAAA,EAAEY,EAAajB,SAAAA,kBACbJ,EACCM,EAAagB,SAAS,eAAc,IACpChB,EAAagB,SAAS,eAAc,CAAA,QACrCC,EAALC,OAAAC,UAAuBC,2BACXH,EAAWI,oCAwDGnB,QAyBNA,4CAnDJX,EAAI+B"}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
export let closebuttontext = 'Close';
|
|
11
11
|
export let iconname: string | undefined = undefined;
|
|
12
12
|
export let hidefooter: boolean;
|
|
13
|
+
export let arialabelledby = 'LayerTitle';
|
|
13
14
|
|
|
14
15
|
$: hideFooter = hidefooter ?? false;
|
|
15
16
|
$: isopen
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
class="mc-layer"
|
|
52
53
|
tabindex="-1"
|
|
53
54
|
role="dialog"
|
|
54
|
-
aria-labelledby=
|
|
55
|
+
aria-labelledby={arialabelledby}
|
|
55
56
|
aria-modal="true"
|
|
56
57
|
aria-hidden={!isopen}
|
|
57
58
|
{...attributes}
|