@mozaic-ds/web-components 0.5.0 → 0.6.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.
- 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/checkbox/Checkbox.js +1 -1
- package/public/adeo/components/checkbox/Checkbox.js.map +1 -1
- package/public/adeo/components/checkbox/Checkbox.svelte +2 -2
- package/public/adeo/components/datatable/DataTable.js +1 -1
- package/public/adeo/components/datatable/DataTable.js.map +1 -1
- package/public/adeo/components/datatable/DataTable.svelte +18 -18
- package/public/adeo/components/fileuploader/FileUploader.js +1 -1
- package/public/adeo/components/fileuploader/FileUploader.js.map +1 -1
- package/public/adeo/components/fileuploader/FileUploader.svelte +8 -5
- package/public/adeo/components/fileuploader/ResultFile.nested.js +1 -1
- package/public/adeo/components/fileuploader/ResultFile.nested.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/link/Link.js +1 -1
- package/public/adeo/components/link/Link.js.map +1 -1
- package/public/adeo/components/link/Link.svelte +1 -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/adeo/components/resultfile/ResultFile.nested.svelte +1 -1
- 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/checkbox/Checkbox.js +1 -1
- package/public/bricoman/components/checkbox/Checkbox.js.map +1 -1
- package/public/bricoman/components/checkbox/Checkbox.svelte +2 -2
- package/public/bricoman/components/datatable/DataTable.js +1 -1
- package/public/bricoman/components/datatable/DataTable.js.map +1 -1
- package/public/bricoman/components/datatable/DataTable.svelte +18 -18
- package/public/bricoman/components/fileuploader/FileUploader.js +1 -1
- package/public/bricoman/components/fileuploader/FileUploader.js.map +1 -1
- package/public/bricoman/components/fileuploader/FileUploader.svelte +8 -5
- package/public/bricoman/components/fileuploader/ResultFile.nested.js +1 -1
- package/public/bricoman/components/fileuploader/ResultFile.nested.js.map +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/link/Link.js +1 -1
- package/public/bricoman/components/link/Link.js.map +1 -1
- package/public/bricoman/components/link/Link.svelte +1 -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/bricoman/components/resultfile/ResultFile.nested.svelte +1 -1
- 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/checkbox/Checkbox.svelte +2 -2
- 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/DataTable.svelte +18 -18
- 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/FileUploader.svelte +8 -5
- 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/link/Link.svelte +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/resultfile/ResultFile.nested.svelte +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/fileuploader/FileUploader.stories.d.ts.map +1 -1
- package/public/utilities/stories/quantityselector/QuantitySelector.stories.d.ts.map +1 -1
|
@@ -1,396 +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, t as text, d as space, 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, p as compute_rest_props, a4 as afterUpdate, 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/modal/Modal.svelte generated by Svelte v3.58.0 */
|
|
5
|
-
|
|
6
|
-
function create_if_block_1(ctx) {
|
|
7
|
-
let h3;
|
|
8
|
-
let t;
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
c() {
|
|
12
|
-
h3 = element("h3");
|
|
13
|
-
t = text(/*title*/ ctx[1]);
|
|
14
|
-
attr(h3, "class", "mc-modal__heading");
|
|
15
|
-
attr(h3, "id", "layerTitle");
|
|
16
|
-
},
|
|
17
|
-
m(target, anchor) {
|
|
18
|
-
insert(target, h3, anchor);
|
|
19
|
-
append(h3, t);
|
|
20
|
-
},
|
|
21
|
-
p(ctx, dirty) {
|
|
22
|
-
if (dirty & /*title*/ 2) set_data(t, /*title*/ ctx[1]);
|
|
23
|
-
},
|
|
24
|
-
d(detaching) {
|
|
25
|
-
if (detaching) detach(h3);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// (62:6) {#if !hideFooter}
|
|
31
|
-
function create_if_block(ctx) {
|
|
32
|
-
let footer;
|
|
33
|
-
|
|
34
|
-
return {
|
|
35
|
-
c() {
|
|
36
|
-
footer = element("footer");
|
|
37
|
-
footer.innerHTML = `<slot name="footer"></slot>`;
|
|
38
|
-
attr(footer, "class", "mc-modal__footer");
|
|
39
|
-
},
|
|
40
|
-
m(target, anchor) {
|
|
41
|
-
insert(target, footer, anchor);
|
|
42
|
-
},
|
|
43
|
-
d(detaching) {
|
|
44
|
-
if (detaching) detach(footer);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function create_fragment(ctx) {
|
|
50
|
-
let div3;
|
|
51
|
-
let div1;
|
|
52
|
-
let div0;
|
|
53
|
-
let header;
|
|
54
|
-
let h2;
|
|
55
|
-
let t0;
|
|
56
|
-
let t1;
|
|
57
|
-
let button;
|
|
58
|
-
let span;
|
|
59
|
-
let t2;
|
|
60
|
-
let t3;
|
|
61
|
-
let main;
|
|
62
|
-
let article;
|
|
63
|
-
let t4;
|
|
64
|
-
let slot;
|
|
65
|
-
let t5;
|
|
66
|
-
let div0_class_value;
|
|
67
|
-
let div1_class_value;
|
|
68
|
-
let div1_aria_hidden_value;
|
|
69
|
-
let t6;
|
|
70
|
-
let div2;
|
|
71
|
-
let div2_class_value;
|
|
72
|
-
let mounted;
|
|
73
|
-
let dispose;
|
|
74
|
-
let if_block0 = /*title*/ ctx[1] && create_if_block_1(ctx);
|
|
75
|
-
let if_block1 = !/*hideFooter*/ ctx[6] && create_if_block();
|
|
76
|
-
|
|
77
|
-
let div1_levels = [
|
|
78
|
-
{
|
|
79
|
-
class: div1_class_value = "mc-modal " + (/*scrollable*/ ctx[7] ? ' mc-modal--overflow' : '')
|
|
80
|
-
},
|
|
81
|
-
{ tabindex: "-1" },
|
|
82
|
-
{ role: "dialog" },
|
|
83
|
-
{ "aria-labelledby": "modalTitle" },
|
|
84
|
-
{
|
|
85
|
-
"aria-hidden": div1_aria_hidden_value = !/*isopen*/ ctx[0]
|
|
86
|
-
},
|
|
87
|
-
/*attributes*/ ctx[4]
|
|
88
|
-
];
|
|
89
|
-
|
|
90
|
-
let div_data_2 = {};
|
|
91
|
-
|
|
92
|
-
for (let i = 0; i < div1_levels.length; i += 1) {
|
|
93
|
-
div_data_2 = assign(div_data_2, div1_levels[i]);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return {
|
|
97
|
-
c() {
|
|
98
|
-
div3 = element("div");
|
|
99
|
-
div1 = element("div");
|
|
100
|
-
div0 = element("div");
|
|
101
|
-
header = element("header");
|
|
102
|
-
h2 = element("h2");
|
|
103
|
-
t0 = text(/*modaltitle*/ ctx[2]);
|
|
104
|
-
t1 = space();
|
|
105
|
-
button = element("button");
|
|
106
|
-
span = element("span");
|
|
107
|
-
t2 = text(/*closebuttontext*/ ctx[3]);
|
|
108
|
-
t3 = space();
|
|
109
|
-
main = element("main");
|
|
110
|
-
article = element("article");
|
|
111
|
-
if (if_block0) if_block0.c();
|
|
112
|
-
t4 = space();
|
|
113
|
-
slot = element("slot");
|
|
114
|
-
t5 = space();
|
|
115
|
-
if (if_block1) if_block1.c();
|
|
116
|
-
t6 = space();
|
|
117
|
-
div2 = element("div");
|
|
118
|
-
this.c = noop;
|
|
119
|
-
attr(h2, "class", "mc-modal__title");
|
|
120
|
-
attr(h2, "id", "modalTitle");
|
|
121
|
-
attr(span, "class", "mc-modal__close-text");
|
|
122
|
-
attr(button, "class", "mc-modal__close");
|
|
123
|
-
attr(button, "type", "button");
|
|
124
|
-
attr(header, "class", "mc-modal__header");
|
|
125
|
-
attr(slot, "name", "content");
|
|
126
|
-
attr(article, "class", "mc-modal__content");
|
|
127
|
-
attr(main, "class", "mc-modal__body");
|
|
128
|
-
attr(div0, "class", div0_class_value = "mc-modal__dialog " + (/*isopen*/ ctx[0] ? ' is-open' : ''));
|
|
129
|
-
attr(div0, "role", "document");
|
|
130
|
-
set_attributes(div1, div_data_2);
|
|
131
|
-
attr(div2, "class", div2_class_value = "mc-modal-overlay " + (/*isopen*/ ctx[0] ? ' is-visible' : ''));
|
|
132
|
-
attr(div2, "tabindex", "-1");
|
|
133
|
-
attr(div2, "role", "dialog");
|
|
134
|
-
},
|
|
135
|
-
m(target, anchor) {
|
|
136
|
-
insert(target, div3, anchor);
|
|
137
|
-
append(div3, div1);
|
|
138
|
-
append(div1, div0);
|
|
139
|
-
append(div0, header);
|
|
140
|
-
append(header, h2);
|
|
141
|
-
append(h2, t0);
|
|
142
|
-
append(header, t1);
|
|
143
|
-
append(header, button);
|
|
144
|
-
append(button, span);
|
|
145
|
-
append(span, t2);
|
|
146
|
-
append(div0, t3);
|
|
147
|
-
append(div0, main);
|
|
148
|
-
append(main, article);
|
|
149
|
-
if (if_block0) if_block0.m(article, null);
|
|
150
|
-
append(article, t4);
|
|
151
|
-
append(article, slot);
|
|
152
|
-
append(div0, t5);
|
|
153
|
-
if (if_block1) if_block1.m(div0, null);
|
|
154
|
-
append(div3, t6);
|
|
155
|
-
append(div3, div2);
|
|
156
|
-
/*div3_binding*/ ctx[11](div3);
|
|
157
|
-
|
|
158
|
-
if (!mounted) {
|
|
159
|
-
dispose = listen(button, "click", /*click_handler*/ ctx[10]);
|
|
160
|
-
mounted = true;
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
p(ctx, [dirty]) {
|
|
164
|
-
if (dirty & /*modaltitle*/ 4) set_data(t0, /*modaltitle*/ ctx[2]);
|
|
165
|
-
if (dirty & /*closebuttontext*/ 8) set_data(t2, /*closebuttontext*/ ctx[3]);
|
|
166
|
-
|
|
167
|
-
if (/*title*/ ctx[1]) {
|
|
168
|
-
if (if_block0) {
|
|
169
|
-
if_block0.p(ctx, dirty);
|
|
170
|
-
} else {
|
|
171
|
-
if_block0 = create_if_block_1(ctx);
|
|
172
|
-
if_block0.c();
|
|
173
|
-
if_block0.m(article, t4);
|
|
174
|
-
}
|
|
175
|
-
} else if (if_block0) {
|
|
176
|
-
if_block0.d(1);
|
|
177
|
-
if_block0 = null;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
if (!/*hideFooter*/ ctx[6]) {
|
|
181
|
-
if (if_block1) ; else {
|
|
182
|
-
if_block1 = create_if_block();
|
|
183
|
-
if_block1.c();
|
|
184
|
-
if_block1.m(div0, null);
|
|
185
|
-
}
|
|
186
|
-
} else if (if_block1) {
|
|
187
|
-
if_block1.d(1);
|
|
188
|
-
if_block1 = null;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (dirty & /*isopen*/ 1 && div0_class_value !== (div0_class_value = "mc-modal__dialog " + (/*isopen*/ ctx[0] ? ' is-open' : ''))) {
|
|
192
|
-
attr(div0, "class", div0_class_value);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
set_attributes(div1, div_data_2 = get_spread_update(div1_levels, [
|
|
196
|
-
{ class: div1_class_value },
|
|
197
|
-
{ tabindex: "-1" },
|
|
198
|
-
{ role: "dialog" },
|
|
199
|
-
{ "aria-labelledby": "modalTitle" },
|
|
200
|
-
dirty & /*isopen*/ 1 && div1_aria_hidden_value !== (div1_aria_hidden_value = !/*isopen*/ ctx[0]) && { "aria-hidden": div1_aria_hidden_value },
|
|
201
|
-
dirty & /*attributes*/ 16 && /*attributes*/ ctx[4]
|
|
202
|
-
]));
|
|
203
|
-
|
|
204
|
-
if (dirty & /*isopen*/ 1 && div2_class_value !== (div2_class_value = "mc-modal-overlay " + (/*isopen*/ ctx[0] ? ' is-visible' : ''))) {
|
|
205
|
-
attr(div2, "class", div2_class_value);
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
i: noop,
|
|
209
|
-
o: noop,
|
|
210
|
-
d(detaching) {
|
|
211
|
-
if (detaching) detach(div3);
|
|
212
|
-
if (if_block0) if_block0.d();
|
|
213
|
-
if (if_block1) if_block1.d();
|
|
214
|
-
/*div3_binding*/ ctx[11](null);
|
|
215
|
-
mounted = false;
|
|
216
|
-
dispose();
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function instance($$self, $$props, $$invalidate) {
|
|
222
|
-
let hideFooter;
|
|
223
|
-
let attributes;
|
|
224
|
-
const omit_props_names = ["title","modaltitle","isopen","closebuttontext","hidefooter"];
|
|
225
|
-
let $$restProps = compute_rest_props($$props, omit_props_names);
|
|
226
|
-
let { title } = $$props;
|
|
227
|
-
let { modaltitle } = $$props;
|
|
228
|
-
let { isopen } = $$props;
|
|
229
|
-
let { closebuttontext = 'Close' } = $$props;
|
|
230
|
-
let { hidefooter } = $$props;
|
|
231
|
-
let scrollable;
|
|
232
|
-
let root;
|
|
233
|
-
let eventHandler = new EventHandler();
|
|
234
|
-
|
|
235
|
-
afterUpdate(() => {
|
|
236
|
-
const modal = root.querySelector('.mc-modal');
|
|
237
|
-
const body = root.querySelector('.mc-modal__body');
|
|
238
|
-
const content = root.querySelector('.mc-modal__content');
|
|
239
|
-
const bodyHeight = body ? body.clientHeight : 0;
|
|
240
|
-
const contentHeight = content ? content.scrollHeight : 0;
|
|
241
|
-
|
|
242
|
-
if (contentHeight > bodyHeight && modal) {
|
|
243
|
-
modal.classList.add('mc-modal--overflow');
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
function onClose() {
|
|
248
|
-
$$invalidate(0, isopen = false);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
const click_handler = () => onClose();
|
|
252
|
-
|
|
253
|
-
function div3_binding($$value) {
|
|
254
|
-
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
255
|
-
root = $$value;
|
|
256
|
-
$$invalidate(5, root);
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
$$self.$$set = $$new_props => {
|
|
261
|
-
$$props = assign(assign({}, $$props), exclude_internal_props($$new_props));
|
|
262
|
-
$$invalidate(13, $$restProps = compute_rest_props($$props, omit_props_names));
|
|
263
|
-
if ('title' in $$new_props) $$invalidate(1, title = $$new_props.title);
|
|
264
|
-
if ('modaltitle' in $$new_props) $$invalidate(2, modaltitle = $$new_props.modaltitle);
|
|
265
|
-
if ('isopen' in $$new_props) $$invalidate(0, isopen = $$new_props.isopen);
|
|
266
|
-
if ('closebuttontext' in $$new_props) $$invalidate(3, closebuttontext = $$new_props.closebuttontext);
|
|
267
|
-
if ('hidefooter' in $$new_props) $$invalidate(9, hidefooter = $$new_props.hidefooter);
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
$$self.$$.update = () => {
|
|
271
|
-
if ($$self.$$.dirty & /*hidefooter*/ 512) {
|
|
272
|
-
$$invalidate(6, hideFooter = hidefooter !== null && hidefooter !== void 0
|
|
273
|
-
? hidefooter
|
|
274
|
-
: false);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
if ($$self.$$.dirty & /*isopen*/ 1) {
|
|
278
|
-
isopen
|
|
279
|
-
? eventHandler.dispatch('modal-opened', {})
|
|
280
|
-
: eventHandler.dispatch('modal-closed', {});
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
$$invalidate(4, attributes = Object.assign({}, $$restProps));
|
|
284
|
-
|
|
285
|
-
if ($$self.$$.dirty & /*attributes*/ 16) {
|
|
286
|
-
delete attributes.class;
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
return [
|
|
291
|
-
isopen,
|
|
292
|
-
title,
|
|
293
|
-
modaltitle,
|
|
294
|
-
closebuttontext,
|
|
295
|
-
attributes,
|
|
296
|
-
root,
|
|
297
|
-
hideFooter,
|
|
298
|
-
scrollable,
|
|
299
|
-
onClose,
|
|
300
|
-
hidefooter,
|
|
301
|
-
click_handler,
|
|
302
|
-
div3_binding
|
|
303
|
-
];
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
class Modal extends SvelteElement {
|
|
307
|
-
constructor(options) {
|
|
308
|
-
super();
|
|
309
|
-
const style = document.createElement('style');
|
|
310
|
-
style.textContent = `.mc-modal{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;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;display:-webkit-box;display:-ms-flexbox;display:flex;height:100vh;height:-webkit-fill-available;height:-moz-available;height:stretch;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;overflow-x:hidden;overflow-y:auto;padding:1rem 1.125rem;width:100vw}@media screen and (min-width: 680px){.mc-modal{-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0}}.mc-modal__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;opacity:0;position:relative;-webkit-transform:translateY(-25%);-ms-transform:translateY(-25%);transform:translateY(-25%);-webkit-transition:visibility 0s linear 0.4s, opacity 0.4s ease, -webkit-transform 0.4s ease;transition:visibility 0s linear 0.4s, opacity 0.4s ease, -webkit-transform 0.4s ease;-o-transition:visibility 0s linear 0.4s, transform 0.4s ease, opacity 0.4s ease;transition:visibility 0s linear 0.4s, transform 0.4s ease, opacity 0.4s ease;transition:visibility 0s linear 0.4s, transform 0.4s ease, opacity 0.4s ease, -webkit-transform 0.4s ease;visibility:hidden;width:100%}@media screen and (min-width: 680px){.mc-modal__dialog{max-height:50%;max-width:38.5rem}}@media(min-width: 1024px) and (max-width: 1919px){.mc-modal__dialog{max-height:66.6666666667%}}@media screen and (min-width: 1024px){.mc-modal__dialog{max-width:48rem}}@media screen and (min-width: 1280px){.mc-modal__dialog{max-width:50rem}}@media screen and (min-width: 1920px){.mc-modal__dialog{max-width:56.5rem}}.mc-modal__dialog.is-open{opacity:1;pointer-events:all;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);-webkit-transition:visibility 0s linear 0s, opacity 0.4s ease, -webkit-transform 0.4s ease;transition:visibility 0s linear 0s, opacity 0.4s ease, -webkit-transform 0.4s ease;-o-transition:visibility 0s linear 0s, transform 0.4s ease, opacity 0.4s ease;transition:visibility 0s linear 0s, transform 0.4s ease, opacity 0.4s ease;transition:visibility 0s linear 0s, transform 0.4s ease, opacity 0.4s ease, -webkit-transform 0.4s ease;visibility:visible}.mc-modal__form{display:contents}.mc-modal__header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:0.75rem;margin-bottom:1rem;min-height:3.75rem;padding:0.75rem 0.75rem 0.75rem 1rem;position:relative}.mc-modal__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: 680px){.mc-modal__header{padding-top:1rem;padding-right:1rem;padding-left:1.5rem}}.mc-modal__icon{fill:#666666;height:1.5rem;width:1.5rem}.mc-modal__title{font-size:0.875rem;line-height:1.2857142857;font-weight:400;color:#666666;margin-bottom:0;margin-top:0}.mc-modal__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;-ms-flex-negative:0;flex-shrink:0;margin-left:auto;width:2rem}.mc-modal__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-modal__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-modal__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-modal__body{font-size:1rem;line-height:1.375;-webkit-box-flex:1;-ms-flex:1 1;flex:1 1;color:#191919;overflow:hidden;padding-left:0.5rem;padding-right:0.5rem}@media screen and (min-width: 680px){.mc-modal__body{padding-left:0.75rem;padding-right:1rem}}.mc-modal__content{max-height:100%;overflow-y:auto;overflow-x:hidden;scrollbar-color:#666666 #e6e6e6;scrollbar-width:thin;padding-left:0.5rem;padding-right:0.5rem}@media screen and (min-width: 680px){.mc-modal__content{padding-left:0.75rem;padding-right:0.75rem}}.mc-modal__content::-webkit-scrollbar{background-color:#e6e6e6;width:0.25rem}.mc-modal__content::-webkit-scrollbar-thumb{background:#666666}.mc-modal__heading{font-size:1.125rem;line-height:1.3333333333;font-weight:600;color:#000000;margin-bottom:0;margin-top:0}.mc-modal__inner{padding-top:1.5rem;padding-bottom:3rem}.mc-modal__footer{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:1rem}@media screen and (min-width: 680px){.mc-modal__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;padding:1.5rem}}.mc-modal__footer>:first-child:not(:only-child){margin-bottom:0.75rem}@media screen and (min-width: 680px){.mc-modal__footer>:first-child:not(:only-child){margin-bottom:0;margin-right:1rem}}.mc-modal-open{overflow:hidden}.mc-modal--overflow .mc-modal__dialog{height:100%}.mc-modal--overflow .mc-modal__footer{-webkit-box-shadow:0 0.25rem 1.25rem 0 rgba(25, 25, 25, 0.2);box-shadow:0 0.25rem 1.25rem 0 rgba(25, 25, 25, 0.2)}.mc-modal-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-modal-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}`;
|
|
311
|
-
this.shadowRoot.appendChild(style);
|
|
312
|
-
|
|
313
|
-
init(
|
|
314
|
-
this,
|
|
315
|
-
{
|
|
316
|
-
target: this.shadowRoot,
|
|
317
|
-
props: attribute_to_object(this.attributes),
|
|
318
|
-
customElement: true
|
|
319
|
-
},
|
|
320
|
-
instance,
|
|
321
|
-
create_fragment,
|
|
322
|
-
safe_not_equal,
|
|
323
|
-
{
|
|
324
|
-
title: 1,
|
|
325
|
-
modaltitle: 2,
|
|
326
|
-
isopen: 0,
|
|
327
|
-
closebuttontext: 3,
|
|
328
|
-
hidefooter: 9
|
|
329
|
-
},
|
|
330
|
-
null
|
|
331
|
-
);
|
|
332
|
-
|
|
333
|
-
if (options) {
|
|
334
|
-
if (options.target) {
|
|
335
|
-
insert(options.target, this, options.anchor);
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
if (options.props) {
|
|
339
|
-
this.$set(options.props);
|
|
340
|
-
flush();
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
static get observedAttributes() {
|
|
346
|
-
return ["title", "modaltitle", "isopen", "closebuttontext", "hidefooter"];
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
get title() {
|
|
350
|
-
return this.$$.ctx[1];
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
set title(title) {
|
|
354
|
-
this.$$set({ title });
|
|
355
|
-
flush();
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
get modaltitle() {
|
|
359
|
-
return this.$$.ctx[2];
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
set modaltitle(modaltitle) {
|
|
363
|
-
this.$$set({ modaltitle });
|
|
364
|
-
flush();
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
get isopen() {
|
|
368
|
-
return this.$$.ctx[0];
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
set isopen(isopen) {
|
|
372
|
-
this.$$set({ isopen });
|
|
373
|
-
flush();
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
get closebuttontext() {
|
|
377
|
-
return this.$$.ctx[3];
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
set closebuttontext(closebuttontext) {
|
|
381
|
-
this.$$set({ closebuttontext });
|
|
382
|
-
flush();
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
get hidefooter() {
|
|
386
|
-
return this.$$.ctx[9];
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
set hidefooter(hidefooter) {
|
|
390
|
-
this.$$set({ hidefooter });
|
|
391
|
-
flush();
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
export { Modal as default };
|
|
1
|
+
import{S as e,i as t,a as i,b as o,f as a,s,c as n,e as l,t as r,d,n as m,g as c,h as b,j as h,l as p,k as g,m as f,o as x,p as w,a4 as y,q as u,v as _}from"../../index-c33b3772.js";import{E as v}from"../../EventHandler-02058705.js";function k(e){let t,i;return{c(){t=l("h3"),i=r(e[1]),c(t,"class","mc-modal__heading"),c(t,"id","layerTitle")},m(e,a){o(e,t,a),h(t,i)},p(e,t){2&t&&g(i,e[1])},d(e){e&&x(t)}}}function $(e){let t;return{c(){t=l("footer"),t.innerHTML='<slot name="footer"></slot>',c(t,"class","mc-modal__footer")},m(e,i){o(e,t,i)},d(e){e&&x(t)}}}function M(e){let t,i,a,s,w,y,u,_,v,M,A,D,I,j,z,C,S,L,E,T,O,Y,H,Z,N=e[1]&&k(e),q=!e[6]&&$(),P=[{class:L="mc-modal "+(e[7]?" mc-modal--overflow":"")},{tabindex:"-1"},{role:"dialog"},{"aria-labelledby":"modalTitle"},{"aria-hidden":E=!e[0]},e[4]],Q={};for(let e=0;e<P.length;e+=1)Q=n(Q,P[e]);return{c(){t=l("div"),i=l("div"),a=l("div"),s=l("header"),w=l("h2"),y=r(e[2]),u=d(),_=l("button"),v=l("span"),M=r(e[3]),A=d(),D=l("main"),I=l("article"),N&&N.c(),j=d(),z=l("slot"),C=d(),q&&q.c(),T=d(),O=l("div"),this.c=m,c(w,"class","mc-modal__title"),c(w,"id","modalTitle"),c(v,"class","mc-modal__close-text"),c(_,"class","mc-modal__close"),c(_,"type","button"),c(s,"class","mc-modal__header"),c(z,"name","content"),c(I,"class","mc-modal__content"),c(D,"class","mc-modal__body"),c(a,"class",S="mc-modal__dialog "+(e[0]?" is-open":"")),c(a,"role","document"),b(i,Q),c(O,"class",Y="mc-modal-overlay "+(e[0]?" is-visible":"")),c(O,"tabindex","-1"),c(O,"role","dialog")},m(n,l){o(n,t,l),h(t,i),h(i,a),h(a,s),h(s,w),h(w,y),h(s,u),h(s,_),h(_,v),h(v,M),h(a,A),h(a,D),h(D,I),N&&N.m(I,null),h(I,j),h(I,z),h(a,C),q&&q.m(a,null),h(t,T),h(t,O),e[11](t),H||(Z=p(_,"click",e[10]),H=!0)},p(e,[t]){4&t&&g(y,e[2]),8&t&&g(M,e[3]),e[1]?N?N.p(e,t):(N=k(e),N.c(),N.m(I,j)):N&&(N.d(1),N=null),e[6]?q&&(q.d(1),q=null):q||(q=$(),q.c(),q.m(a,null)),1&t&&S!==(S="mc-modal__dialog "+(e[0]?" is-open":""))&&c(a,"class",S),b(i,Q=f(P,[{class:L},{tabindex:"-1"},{role:"dialog"},{"aria-labelledby":"modalTitle"},1&t&&E!==(E=!e[0])&&{"aria-hidden":E},16&t&&e[4]])),1&t&&Y!==(Y="mc-modal-overlay "+(e[0]?" is-visible":""))&&c(O,"class",Y)},i:m,o:m,d(i){i&&x(t),N&&N.d(),q&&q.d(),e[11](null),H=!1,Z()}}}function A(e,t,i){let o,a;const s=["title","modaltitle","isopen","closebuttontext","hidefooter"];let l,r=w(t,s),{title:d}=t,{modaltitle:m}=t,{isopen:c}=t,{closebuttontext:b="Close"}=t,{hidefooter:h}=t,p=new v;function g(){i(0,c=!1)}y((()=>{const e=l.querySelector(".mc-modal"),t=l.querySelector(".mc-modal__body"),i=l.querySelector(".mc-modal__content"),o=t?t.clientHeight:0;(i?i.scrollHeight:0)>o&&e&&e.classList.add("mc-modal--overflow")}));return e.$$set=e=>{t=n(n({},t),u(e)),i(13,r=w(t,s)),"title"in e&&i(1,d=e.title),"modaltitle"in e&&i(2,m=e.modaltitle),"isopen"in e&&i(0,c=e.isopen),"closebuttontext"in e&&i(3,b=e.closebuttontext),"hidefooter"in e&&i(9,h=e.hidefooter)},e.$$.update=()=>{512&e.$$.dirty&&i(6,o=null!=h&&h),1&e.$$.dirty&&(c?p.dispatch("modal-opened",{}):p.dispatch("modal-closed",{})),i(4,a=Object.assign({},r)),16&e.$$.dirty&&delete a.class},[c,d,m,b,a,l,o,undefined,g,h,()=>g(),function(e){_[e?"unshift":"push"]((()=>{l=e,i(5,l)}))}]}class D extends e{constructor(e){super();const n=document.createElement("style");n.textContent='.mc-modal{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;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;display:-webkit-box;display:-ms-flexbox;display:flex;height:100vh;height:-webkit-fill-available;height:-moz-available;height:stretch;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;overflow-x:hidden;overflow-y:auto;padding:1rem 1.125rem;width:100vw}@media screen and (min-width: 680px){.mc-modal{-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0}}.mc-modal__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;opacity:0;position:relative;-webkit-transform:translateY(-25%);-ms-transform:translateY(-25%);transform:translateY(-25%);-webkit-transition:visibility 0s linear 0.4s, opacity 0.4s ease, -webkit-transform 0.4s ease;transition:visibility 0s linear 0.4s, opacity 0.4s ease, -webkit-transform 0.4s ease;-o-transition:visibility 0s linear 0.4s, transform 0.4s ease, opacity 0.4s ease;transition:visibility 0s linear 0.4s, transform 0.4s ease, opacity 0.4s ease;transition:visibility 0s linear 0.4s, transform 0.4s ease, opacity 0.4s ease, -webkit-transform 0.4s ease;visibility:hidden;width:100%}@media screen and (min-width: 680px){.mc-modal__dialog{max-height:50%;max-width:38.5rem}}@media(min-width: 1024px) and (max-width: 1919px){.mc-modal__dialog{max-height:66.6666666667%}}@media screen and (min-width: 1024px){.mc-modal__dialog{max-width:48rem}}@media screen and (min-width: 1280px){.mc-modal__dialog{max-width:50rem}}@media screen and (min-width: 1920px){.mc-modal__dialog{max-width:56.5rem}}.mc-modal__dialog.is-open{opacity:1;pointer-events:all;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);-webkit-transition:visibility 0s linear 0s, opacity 0.4s ease, -webkit-transform 0.4s ease;transition:visibility 0s linear 0s, opacity 0.4s ease, -webkit-transform 0.4s ease;-o-transition:visibility 0s linear 0s, transform 0.4s ease, opacity 0.4s ease;transition:visibility 0s linear 0s, transform 0.4s ease, opacity 0.4s ease;transition:visibility 0s linear 0s, transform 0.4s ease, opacity 0.4s ease, -webkit-transform 0.4s ease;visibility:visible}.mc-modal__form{display:contents}.mc-modal__header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:0.75rem;margin-bottom:1rem;min-height:3.75rem;padding:0.75rem 0.75rem 0.75rem 1rem;position:relative}.mc-modal__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: 680px){.mc-modal__header{padding-top:1rem;padding-right:1rem;padding-left:1.5rem}}.mc-modal__icon{fill:#666666;height:1.5rem;width:1.5rem}.mc-modal__title{font-size:0.875rem;line-height:1.2857142857;font-weight:400;color:#666666;margin-bottom:0;margin-top:0}.mc-modal__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;-ms-flex-negative:0;flex-shrink:0;margin-left:auto;width:2rem}.mc-modal__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-modal__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-modal__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-modal__body{font-size:1rem;line-height:1.375;-webkit-box-flex:1;-ms-flex:1 1;flex:1 1;color:#191919;overflow:hidden;padding-left:0.5rem;padding-right:0.5rem}@media screen and (min-width: 680px){.mc-modal__body{padding-left:0.75rem;padding-right:1rem}}.mc-modal__content{max-height:100%;overflow-y:auto;overflow-x:hidden;scrollbar-color:#666666 #e6e6e6;scrollbar-width:thin;padding-left:0.5rem;padding-right:0.5rem}@media screen and (min-width: 680px){.mc-modal__content{padding-left:0.75rem;padding-right:0.75rem}}.mc-modal__content::-webkit-scrollbar{background-color:#e6e6e6;width:0.25rem}.mc-modal__content::-webkit-scrollbar-thumb{background:#666666}.mc-modal__heading{font-size:1.125rem;line-height:1.3333333333;font-weight:600;color:#000000;margin-bottom:0;margin-top:0}.mc-modal__inner{padding-top:1.5rem;padding-bottom:3rem}.mc-modal__footer{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:1rem}@media screen and (min-width: 680px){.mc-modal__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;padding:1.5rem}}.mc-modal__footer>:first-child:not(:only-child){margin-bottom:0.75rem}@media screen and (min-width: 680px){.mc-modal__footer>:first-child:not(:only-child){margin-bottom:0;margin-right:1rem}}.mc-modal-open{overflow:hidden}.mc-modal--overflow .mc-modal__dialog{height:100%}.mc-modal--overflow .mc-modal__footer{-webkit-box-shadow:0 0.25rem 1.25rem 0 rgba(25, 25, 25, 0.2);box-shadow:0 0.25rem 1.25rem 0 rgba(25, 25, 25, 0.2)}.mc-modal-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-modal-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},A,M,s,{title:1,modaltitle:2,isopen:0,closebuttontext:3,hidefooter:9},null),e&&(e.target&&o(e.target,this,e.anchor),e.props&&(this.$set(e.props),a()))}static get observedAttributes(){return["title","modaltitle","isopen","closebuttontext","hidefooter"]}get title(){return this.$$.ctx[1]}set title(e){this.$$set({title:e}),a()}get modaltitle(){return this.$$.ctx[2]}set modaltitle(e){this.$$set({modaltitle:e}),a()}get isopen(){return this.$$.ctx[0]}set isopen(e){this.$$set({isopen:e}),a()}get closebuttontext(){return this.$$.ctx[3]}set closebuttontext(e){this.$$set({closebuttontext:e}),a()}get hidefooter(){return this.$$.ctx[9]}set hidefooter(e){this.$$set({hidefooter:e}),a()}}export{D as default};
|
|
396
2
|
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../../src/components/modal/Modal.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { afterUpdate } from 'svelte/internal';\n import { EventHandler } from '../../utilities/EventHandler';\n export let title: string;\n export let modaltitle: string;\n export let isopen: boolean;\n export let closebuttontext = 'Close';\n export let hidefooter: boolean;\n\n $: hideFooter = hidefooter ?? false;\n\n $: isopen\n ? eventHandler.dispatch('modal-opened', {})\n : eventHandler.dispatch('modal-closed', {});\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n let scrollable: boolean;\n\n let root: HTMLElement;\n let eventHandler = new EventHandler();\n\n afterUpdate(() => {\n const modal = root.querySelector('.mc-modal');\n const body = root.querySelector('.mc-modal__body');\n const content = root.querySelector('.mc-modal__content');\n\n const bodyHeight = body ? body.clientHeight : 0;\n const contentHeight = content ? content.scrollHeight : 0;\n\n if (contentHeight > bodyHeight && modal) {\n modal.classList.add('mc-modal--overflow');\n }\n });\n\n function onClose(): void {\n isopen = false;\n }\n</script>\n\n<div bind:this={root}>\n <div\n class=\"mc-modal {scrollable ? ' mc-modal--overflow' : ''}\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-labelledby=\"modalTitle\"\n aria-hidden={!isopen}\n {...attributes}\n >\n <div class=\"mc-modal__dialog {isopen ? ' is-open' : ''}\" role=\"document\">\n <header class=\"mc-modal__header\">\n <h2 class=\"mc-modal__title\" id=\"modalTitle\">{modaltitle}</h2>\n <button\n class=\"mc-modal__close\"\n type=\"button\"\n on:click={() => onClose()}\n >\n <span class=\"mc-modal__close-text\">{closebuttontext}</span>\n </button>\n </header>\n <main class=\"mc-modal__body\">\n <article class=\"mc-modal__content\">\n {#if title}\n <h3 class=\"mc-modal__heading\" id=\"layerTitle\">{title}</h3>\n {/if}\n <slot name=\"content\" />\n </article>\n </main>\n {#if !hideFooter}\n <footer class=\"mc-modal__footer\">\n <slot name=\"footer\" />\n </footer>\n {/if}\n </div>\n </div>\n <div\n class=\"mc-modal-overlay {isopen ? ' is-visible' : ''}\"\n tabindex=\"-1\"\n role=\"dialog\"\n />\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.modal';\n</style>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../../../src/components/modal/Modal.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { afterUpdate } from 'svelte/internal';\n import { EventHandler } from '../../utilities/EventHandler';\n export let title: string;\n export let modaltitle: string;\n export let isopen: boolean;\n export let closebuttontext = 'Close';\n export let hidefooter: boolean;\n\n $: hideFooter = hidefooter ?? false;\n\n $: isopen\n ? eventHandler.dispatch('modal-opened', {})\n : eventHandler.dispatch('modal-closed', {});\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n let scrollable: boolean;\n\n let root: HTMLElement;\n let eventHandler = new EventHandler();\n\n afterUpdate(() => {\n const modal = root.querySelector('.mc-modal');\n const body = root.querySelector('.mc-modal__body');\n const content = root.querySelector('.mc-modal__content');\n\n const bodyHeight = body ? body.clientHeight : 0;\n const contentHeight = content ? content.scrollHeight : 0;\n\n if (contentHeight > bodyHeight && modal) {\n modal.classList.add('mc-modal--overflow');\n }\n });\n\n function onClose(): void {\n isopen = false;\n }\n</script>\n\n<div bind:this={root}>\n <div\n class=\"mc-modal {scrollable ? ' mc-modal--overflow' : ''}\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-labelledby=\"modalTitle\"\n aria-hidden={!isopen}\n {...attributes}\n >\n <div class=\"mc-modal__dialog {isopen ? ' is-open' : ''}\" role=\"document\">\n <header class=\"mc-modal__header\">\n <h2 class=\"mc-modal__title\" id=\"modalTitle\">{modaltitle}</h2>\n <button\n class=\"mc-modal__close\"\n type=\"button\"\n on:click={() => onClose()}\n >\n <span class=\"mc-modal__close-text\">{closebuttontext}</span>\n </button>\n </header>\n <main class=\"mc-modal__body\">\n <article class=\"mc-modal__content\">\n {#if title}\n <h3 class=\"mc-modal__heading\" id=\"layerTitle\">{title}</h3>\n {/if}\n <slot name=\"content\" />\n </article>\n </main>\n {#if !hideFooter}\n <footer class=\"mc-modal__footer\">\n <slot name=\"footer\" />\n </footer>\n {/if}\n </div>\n </div>\n <div\n class=\"mc-modal-overlay {isopen ? ' is-visible' : ''}\"\n tabindex=\"-1\"\n role=\"dialog\"\n />\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.modal';\n</style>\n"],"names":["ctx","insert","target","h3","anchor","footer","create_if_block_1","create_if_block","div3","append","div1","div0","header","h2","button","span","main","article","slot","div2","div1_aria_hidden_value","root","title","$$props","modaltitle","isopen","closebuttontext","hidefooter","eventHandler","EventHandler","onClose","$$invalidate","afterUpdate","modal","querySelector","body","content","bodyHeight","clientHeight","scrollHeight","classList","add","hideFooter","dispatch","attributes","Object","assign","$$restProps","class","scrollable","$$value"],"mappings":"wRAgE2DA,EAAK,oEAApDC,EAAyDC,EAAAC,EAAAC,2BAAVJ,EAAK,mJAMxDC,EAEQC,EAAAG,EAAAD,uFATDJ,EAAK,IAAAM,EAAAN,MAMRA,EAAU,IAAAO,6BA1BDP,EAAU,GAAG,sBAAwB,wFAIxCA,EAAM,IAChBA,EAAU,yHAImCA,EAAU,wCAMjBA,EAAe,+YAR3BA,EAAM,GAAG,WAAa,sEA2B3BA,EAAM,GAAG,cAAgB,uDApCtDC,EAwCKC,EAAAM,EAAAJ,GAvCHK,EAiCKD,EAAAE,GAzBHD,EAwBKC,EAAAC,GAvBHF,EASQE,EAAAC,GARNH,EAA4DG,EAAAC,iBAC5DJ,EAMQG,EAAAE,GADNL,EAA0DK,EAAAC,iBAG9DN,EAOME,EAAAK,GANJP,EAKSO,EAAAC,yBADPR,EAAsBQ,EAAAC,gCAU9BT,EAICD,EAAAW,8DA5BkDnB,EAAU,aAMjBA,EAAe,IAK9CA,EAAK,yDAMRA,EAAU,oFAnBYA,EAAM,GAAG,WAAa,wHAHtCA,EAAM,KAAA,CAAA,cAAAoB,SAChBpB,EAAU,uCA6BWA,EAAM,GAAG,cAAgB,yLAzDhDqB,kBAfOC,GAAaC,cACbC,GAAkBD,UAClBE,GAAeF,GACfG,gBAAAA,EAAkB,SAAOH,cACzBI,GAAmBJ,EAY1BK,MAAmBC,WAedC,IACPC,EAAA,EAAAN,GAAS,GAdXO,GAAW,KACH,MAAAC,EAAQZ,EAAKa,cAAc,aAC3BC,EAAOd,EAAKa,cAAc,mBAC1BE,EAAUf,EAAKa,cAAc,sBAE7BG,EAAaF,EAAOA,EAAKG,aAAe,GACxBF,EAAUA,EAAQG,aAAe,GAEnCF,GAAcJ,GAChCA,EAAMO,UAAUC,IAAI,qSArBvBV,EAAA,EAAEW,EAAaf,SAAAA,kBAEbF,EACCG,EAAae,SAAS,eAAc,IACpCf,EAAae,SAAS,eAAc,CAAA,QACrCC,EAALC,OAAAC,UAAuBC,0BACXH,EAAWI,sBACjBC,kBAsCoBnB,4CAfVT,EAAI6B"}
|