@mozaic-ds/web-components 0.7.0 → 0.9.0-beta
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 +1 -1
- package/public/ClickOutside-63071e7a.js +15 -1
- package/public/ClickOutside-63071e7a.js.map +1 -1
- package/public/DataTableDefaultAction.nested-c37a5d51.js +762 -0
- package/public/DataTableDefaultAction.nested-c37a5d51.js.map +1 -0
- package/public/DataTableUtilities-313a448d.js +386 -0
- package/public/DataTableUtilities-313a448d.js.map +1 -0
- package/public/EventForward-8492ff62.js +109 -1
- package/public/EventForward-8492ff62.js.map +1 -1
- package/public/EventHandler-02058705.js +15 -1
- package/public/EventHandler-02058705.js.map +1 -1
- package/public/adeo/{DataTableDefaultAction.nested-90536fe3.js → DataTableDefaultAction.nested-ac2e3dbe.js} +2 -2
- package/public/adeo/{DataTableDefaultAction.nested-90536fe3.js.map → DataTableDefaultAction.nested-ac2e3dbe.js.map} +1 -1
- package/public/adeo/DataTableUtilities-313a448d.js +2 -0
- package/public/adeo/DataTableUtilities-313a448d.js.map +1 -0
- package/public/adeo/bundle.js +5 -0
- package/public/adeo/components/barchart/BarChart.svelte +3 -4
- package/public/adeo/components/chart/BarChart.js +1 -1
- package/public/adeo/components/chart/BarChart.js.map +1 -1
- 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 +12 -0
- package/public/adeo/components/datatable/DataTableDefaultAction.nested.js +1 -1
- package/public/adeo/components/datatable/DataTableDefaultEdtion.nested.js +1 -1
- package/public/adeo/components/datatable/DataTableDefaultFilterTags.nested.js +1 -1
- package/public/adeo/components/datatable/DataTableFooter.nested.js +1 -1
- package/public/adeo/components/datatable/data.d.ts.map +1 -1
- package/public/adeo/components/datatable/datatable.types.d.ts +9 -2
- package/public/adeo/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/adeo/components/header/Header.js +1 -1
- package/public/adeo/components/header/Header.js.map +1 -1
- package/public/adeo/components/header/Header.svelte +2 -2
- package/public/adeo/components/kpi/Kpi.js +2 -0
- package/public/adeo/components/kpi/Kpi.js.map +1 -0
- package/public/adeo/components/kpi/Kpi.svelte +232 -0
- package/public/adeo/components/sidebar/Sidebar.js +1 -1
- package/public/adeo/components/sidebar/Sidebar.js.map +1 -1
- package/public/adeo/components/sidebar/Sidebar.svelte +1 -1
- package/public/adeo/icons-storybook.js +16 -0
- package/public/adeo/main.d.ts +1 -0
- package/public/adeo/main.d.ts.map +1 -1
- package/public/adeo/utilities/DataTableUtilities.d.ts.map +1 -1
- package/public/adeo/utilities/DataTableUtilities.ts +22 -2
- package/public/array-5b770a93.js +13 -1
- package/public/array-5b770a93.js.map +1 -1
- package/public/axis-fbc0f7b5.js +174 -1
- package/public/axis-fbc0f7b5.js.map +1 -1
- package/public/band-d7a07d2c.js +186 -1
- package/public/band-d7a07d2c.js.map +1 -1
- package/public/bricoman/{DataTableDefaultAction.nested-928e5e2d.js → DataTableDefaultAction.nested-bcc599d1.js} +2 -2
- package/public/bricoman/{DataTableDefaultAction.nested-928e5e2d.js.map → DataTableDefaultAction.nested-bcc599d1.js.map} +1 -1
- package/public/bricoman/DataTableUtilities-313a448d.js +2 -0
- package/public/bricoman/DataTableUtilities-313a448d.js.map +1 -0
- package/public/bricoman/bundle.js +5 -0
- package/public/bricoman/components/barchart/BarChart.svelte +3 -4
- package/public/bricoman/components/chart/BarChart.js +1 -1
- package/public/bricoman/components/chart/BarChart.js.map +1 -1
- 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 +12 -0
- package/public/bricoman/components/datatable/DataTableDefaultAction.nested.js +1 -1
- package/public/bricoman/components/datatable/DataTableDefaultEdtion.nested.js +1 -1
- package/public/bricoman/components/datatable/DataTableDefaultFilterTags.nested.js +1 -1
- package/public/bricoman/components/datatable/DataTableFooter.nested.js +1 -1
- package/public/bricoman/components/datatable/data.d.ts.map +1 -1
- package/public/bricoman/components/datatable/datatable.types.d.ts +9 -2
- package/public/bricoman/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/bricoman/components/header/Header.js +1 -1
- package/public/bricoman/components/header/Header.js.map +1 -1
- package/public/bricoman/components/header/Header.svelte +2 -2
- package/public/bricoman/components/kpi/Kpi.js +2 -0
- package/public/bricoman/components/kpi/Kpi.js.map +1 -0
- package/public/bricoman/components/kpi/Kpi.svelte +232 -0
- package/public/bricoman/components/sidebar/Sidebar.js +1 -1
- package/public/bricoman/components/sidebar/Sidebar.js.map +1 -1
- package/public/bricoman/components/sidebar/Sidebar.svelte +1 -1
- package/public/bricoman/icons-storybook.js +16 -0
- package/public/bricoman/main.d.ts +1 -0
- package/public/bricoman/main.d.ts.map +1 -1
- package/public/bricoman/utilities/DataTableUtilities.d.ts.map +1 -1
- package/public/bricoman/utilities/DataTableUtilities.ts +22 -2
- package/public/bundle.js +5 -0
- package/public/components/accordion/Accordion.js +365 -1
- package/public/components/accordion/Accordion.js.map +1 -1
- package/public/components/autocomplete/Autocomplete.js +1515 -1
- package/public/components/autocomplete/Autocomplete.js.map +1 -1
- package/public/components/badge/Badge.js +155 -1
- package/public/components/badge/Badge.js.map +1 -1
- package/public/components/badge/Badge.nested.js +101 -1
- package/public/components/badge/Badge.nested.js.map +1 -1
- package/public/components/barchart/BarChart.svelte +3 -4
- package/public/components/breadcrumb/Breadcrumb.js +372 -1
- package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/public/components/breadcrumb/Breadcrumb.nested.js +319 -1
- package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
- package/public/components/button/Button.js +1138 -1
- package/public/components/button/Button.js.map +1 -1
- package/public/components/card/Card.js +369 -1
- package/public/components/card/Card.js.map +1 -1
- package/public/components/chart/BarChart.js +583 -1
- package/public/components/chart/BarChart.js.map +1 -1
- package/public/components/chart/Donut.js +1189 -1
- package/public/components/chart/Donut.js.map +1 -1
- package/public/components/chart/GroupedBarChart.js +750 -1
- package/public/components/chart/GroupedBarChart.js.map +1 -1
- package/public/components/chart/LineChart.js +1731 -1
- package/public/components/chart/LineChart.js.map +1 -1
- package/public/components/chart/Radar.js +729 -1
- package/public/components/chart/Radar.js.map +1 -1
- package/public/components/chart/StackedBarChart.js +745 -1
- package/public/components/chart/StackedBarChart.js.map +1 -1
- package/public/components/checkbox/Checkbox.js +307 -1
- package/public/components/checkbox/Checkbox.js.map +1 -1
- package/public/components/checkboxgroup/checkboxGroup.js +404 -1
- package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
- package/public/components/datatable/DataTable.js +3098 -1
- package/public/components/datatable/DataTable.js.map +1 -1
- package/public/components/datatable/DataTable.svelte +12 -0
- package/public/components/datatable/DataTableDefaultAction.nested.js +4 -1
- package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultEdtion.nested.js +164 -1
- package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultFilterTags.nested.js +380 -1
- package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultSelection.nested.js +424 -1
- package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +263 -1
- package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
- package/public/components/datatable/DataTableFooter.nested.js +637 -1
- package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
- package/public/components/datatable/data.d.ts.map +1 -1
- package/public/components/datatable/datatable.types.d.ts +9 -2
- package/public/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/components/dropdown/Dropdown.js +1426 -1
- package/public/components/dropdown/Dropdown.js.map +1 -1
- package/public/components/field/Field.js +375 -1
- package/public/components/field/Field.js.map +1 -1
- package/public/components/fileuploader/FileUploader.js +603 -1
- package/public/components/fileuploader/FileUploader.js.map +1 -1
- package/public/components/fileuploader/ResultFile.nested.js +344 -1
- package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
- package/public/components/flag/Flag.js +174 -1
- package/public/components/flag/Flag.js.map +1 -1
- package/public/components/header/Header.js +918 -1
- package/public/components/header/Header.js.map +1 -1
- package/public/components/header/Header.svelte +2 -2
- package/public/components/hero/Hero.js +271 -1
- package/public/components/hero/Hero.js.map +1 -1
- package/public/components/kpi/Kpi.js +405 -0
- package/public/components/kpi/Kpi.js.map +1 -0
- package/public/components/kpi/Kpi.svelte +232 -0
- package/public/components/layer/Layer.js +471 -1
- package/public/components/layer/Layer.js.map +1 -1
- package/public/components/link/Link.js +380 -1
- package/public/components/link/Link.js.map +1 -1
- package/public/components/listbox/Listbox.js +595 -1
- package/public/components/listbox/Listbox.js.map +1 -1
- package/public/components/listbox/Listbox.nested.js +629 -1
- package/public/components/listbox/Listbox.nested.js.map +1 -1
- package/public/components/loader/Loader.js +246 -1
- package/public/components/loader/Loader.js.map +1 -1
- package/public/components/loader/Loader.nested.js +176 -1
- package/public/components/loader/Loader.nested.js.map +1 -1
- package/public/components/modal/Modal.js +395 -1
- package/public/components/modal/Modal.js.map +1 -1
- package/public/components/notification/Notification.js +458 -1
- package/public/components/notification/Notification.js.map +1 -1
- package/public/components/optionbutton/OptionButton.js +316 -1
- package/public/components/optionbutton/OptionButton.js.map +1 -1
- package/public/components/overlay/Overlay.js +104 -1
- package/public/components/overlay/Overlay.js.map +1 -1
- package/public/components/overlay/OverlayLoader.js +151 -1
- package/public/components/overlay/OverlayLoader.js.map +1 -1
- package/public/components/pagination/Pagination.js +613 -1
- package/public/components/pagination/Pagination.js.map +1 -1
- package/public/components/passwordinput/PasswordInput.js +291 -1
- package/public/components/passwordinput/PasswordInput.js.map +1 -1
- package/public/components/phonenumber/PhoneNumber.js +6894 -1
- package/public/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/components/price/Price.js +768 -1
- package/public/components/price/Price.js.map +1 -1
- package/public/components/progressbar/ProgressBar.js +278 -1
- package/public/components/progressbar/ProgressBar.js.map +1 -1
- package/public/components/quantityselector/QuantitySelector.js +397 -1
- package/public/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/components/radio/Radio.js +273 -1
- package/public/components/radio/Radio.js.map +1 -1
- package/public/components/radiogroup/RadioGroup.js +414 -1
- package/public/components/radiogroup/RadioGroup.js.map +1 -1
- package/public/components/ratings/StarsInput.js +292 -1
- package/public/components/ratings/StarsInput.js.map +1 -1
- package/public/components/ratings/StarsResult.js +246 -1
- package/public/components/ratings/StarsResult.js.map +1 -1
- package/public/components/select/Select.js +451 -1
- package/public/components/select/Select.js.map +1 -1
- package/public/components/sidebar/Sidebar.js +784 -1
- package/public/components/sidebar/Sidebar.js.map +1 -1
- package/public/components/sidebar/Sidebar.svelte +1 -1
- package/public/components/sidebar/sidebar-feature-group.nested.js +594 -1
- package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-feature.nested.js +402 -1
- package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-section.nested.js +394 -1
- package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-segment.nested.js +200 -1
- package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-separator.nested.js +49 -1
- package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-sub-features.nested.js +312 -1
- package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-user.nested.js +733 -1
- package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
- package/public/components/stepper/Stepper.js +371 -1
- package/public/components/stepper/Stepper.js.map +1 -1
- package/public/components/tabs/Tabs.js +615 -1
- package/public/components/tabs/Tabs.js.map +1 -1
- package/public/components/tabs/Tabs.nested.js +472 -1
- package/public/components/tabs/Tabs.nested.js.map +1 -1
- package/public/components/tag/Tag.js +665 -1
- package/public/components/tag/Tag.js.map +1 -1
- package/public/components/tag/Tag.nested.js +554 -1
- package/public/components/tag/Tag.nested.js.map +1 -1
- package/public/components/taglist/TagList.js +475 -1
- package/public/components/taglist/TagList.js.map +1 -1
- package/public/components/textarea/Textarea.js +303 -1
- package/public/components/textarea/Textarea.js.map +1 -1
- package/public/components/textinput/Textinput.js +497 -1
- package/public/components/textinput/Textinput.js.map +1 -1
- package/public/components/textinput/Textinput.nested.js +320 -1
- package/public/components/textinput/Textinput.nested.js.map +1 -1
- package/public/components/toggle/Toggle.js +278 -1
- package/public/components/toggle/Toggle.js.map +1 -1
- package/public/components/tooltip/Tooltip.js +173 -1
- package/public/components/tooltip/Tooltip.js.map +1 -1
- package/public/icons-storybook.js +16 -0
- package/public/index-c33b3772.js +873 -1
- package/public/index-c33b3772.js.map +1 -1
- package/public/linear-f46d7e9e.js +700 -1
- package/public/linear-f46d7e9e.js.map +1 -1
- package/public/main.d.ts +1 -0
- package/public/main.d.ts.map +1 -1
- package/public/path-1b5da959.js +186 -1
- package/public/path-1b5da959.js.map +1 -1
- package/public/sidebar-service-275bf9ef.js +129 -1
- package/public/sidebar-service-275bf9ef.js.map +1 -1
- package/public/symbol-b05a6e2b.js +169 -1
- package/public/symbol-b05a6e2b.js.map +1 -1
- package/public/transform-15d69d5d.js +2743 -1
- package/public/transform-15d69d5d.js.map +1 -1
- package/public/utilities/DataTableUtilities.d.ts.map +1 -1
- package/public/utilities/DataTableUtilities.ts +22 -2
- package/public/utilities/EventForward.js +136 -1
- package/public/utilities/EventForward.js.map +1 -1
- package/public/utilities/EventHandler.js +36 -1
- package/public/utilities/EventHandler.js.map +1 -1
- package/public/utilities/components/datatable/data.d.ts.map +1 -1
- package/public/utilities/components/datatable/datatable.types.d.ts +9 -2
- package/public/utilities/components/datatable/datatable.types.d.ts.map +1 -1
- package/public/utilities/main.d.ts +1 -0
- package/public/utilities/main.d.ts.map +1 -1
- package/public/utilities/stories/datatable/DataTable.stories.d.ts.map +1 -1
- package/public/utilities/stories/header/Header.stories.d.ts.map +1 -1
- package/public/utilities/stories/kpi/kpi.stories.d.ts +7 -0
- package/public/utilities/stories/kpi/kpi.stories.d.ts.map +1 -0
- package/public/utilities/utilities/DataTableUtilities.d.ts.map +1 -1
- package/public/DataTableDefaultAction.nested-483f8bb0.js +0 -2
- package/public/DataTableDefaultAction.nested-483f8bb0.js.map +0 -1
- package/public/DataTableUtilities-60220c78.js +0 -2
- package/public/DataTableUtilities-60220c78.js.map +0 -1
- package/public/adeo/DataTableUtilities-60220c78.js +0 -2
- package/public/adeo/DataTableUtilities-60220c78.js.map +0 -1
- package/public/bricoman/DataTableUtilities-60220c78.js +0 -2
- package/public/bricoman/DataTableUtilities-60220c78.js.map +0 -1
|
@@ -1,2 +1,317 @@
|
|
|
1
|
-
import{S as
|
|
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, n as noop, h as set_attributes, m as get_spread_update, o as detach, J as destroy_each, p as compute_rest_props, r as get_current_component, q as exclude_internal_props, d as space, t as text, g as attr, z as toggle_class, j as append, B as action_destroyer, l as listen, k as set_data, H as run_all } from '../../index-c33b3772.js';
|
|
2
|
+
import { c as createEventForwarder } from '../../EventForward-8492ff62.js';
|
|
3
|
+
import { E as EventHandler } from '../../EventHandler-02058705.js';
|
|
4
|
+
|
|
5
|
+
/* src/components/optionbutton/OptionButton.svelte generated by Svelte v3.58.0 */
|
|
6
|
+
|
|
7
|
+
function get_each_context(ctx, list, i) {
|
|
8
|
+
const child_ctx = ctx.slice();
|
|
9
|
+
child_ctx[12] = list[i];
|
|
10
|
+
return child_ctx;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// (26:2) {#each parsedOptions as option}
|
|
14
|
+
function create_each_block(ctx) {
|
|
15
|
+
let div;
|
|
16
|
+
let input;
|
|
17
|
+
let input_id_value;
|
|
18
|
+
let input_name_value;
|
|
19
|
+
let input_disabled_value;
|
|
20
|
+
let t0;
|
|
21
|
+
let label;
|
|
22
|
+
let t1_value = /*option*/ ctx[12].label + "";
|
|
23
|
+
let t1;
|
|
24
|
+
let label_for_value;
|
|
25
|
+
let t2;
|
|
26
|
+
let mounted;
|
|
27
|
+
let dispose;
|
|
28
|
+
|
|
29
|
+
function change_handler() {
|
|
30
|
+
return /*change_handler*/ ctx[8](/*option*/ ctx[12]);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
c() {
|
|
35
|
+
div = element("div");
|
|
36
|
+
input = element("input");
|
|
37
|
+
t0 = space();
|
|
38
|
+
label = element("label");
|
|
39
|
+
t1 = text(t1_value);
|
|
40
|
+
t2 = space();
|
|
41
|
+
attr(input, "id", input_id_value = /*option*/ ctx[12].id);
|
|
42
|
+
attr(input, "type", "radio");
|
|
43
|
+
attr(input, "class", "mc-option-button__input");
|
|
44
|
+
attr(input, "name", input_name_value = /*option*/ ctx[12].name);
|
|
45
|
+
input.checked = /*checked*/ ctx[0];
|
|
46
|
+
input.disabled = input_disabled_value = /*option*/ ctx[12].disabled;
|
|
47
|
+
attr(label, "for", label_for_value = /*option*/ ctx[12].id);
|
|
48
|
+
attr(label, "class", "mc-option-button__label");
|
|
49
|
+
attr(div, "class", "mc-option-button");
|
|
50
|
+
toggle_class(div, "mc-option-button--full", /*option*/ ctx[12].fullwidth);
|
|
51
|
+
},
|
|
52
|
+
m(target, anchor) {
|
|
53
|
+
insert(target, div, anchor);
|
|
54
|
+
append(div, input);
|
|
55
|
+
append(div, t0);
|
|
56
|
+
append(div, label);
|
|
57
|
+
append(label, t1);
|
|
58
|
+
append(div, t2);
|
|
59
|
+
|
|
60
|
+
if (!mounted) {
|
|
61
|
+
dispose = [
|
|
62
|
+
action_destroyer(/*forwardEvents*/ ctx[5].call(null, input)),
|
|
63
|
+
listen(input, "change", change_handler)
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
mounted = true;
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
p(new_ctx, dirty) {
|
|
70
|
+
ctx = new_ctx;
|
|
71
|
+
|
|
72
|
+
if (dirty & /*parsedOptions*/ 16 && input_id_value !== (input_id_value = /*option*/ ctx[12].id)) {
|
|
73
|
+
attr(input, "id", input_id_value);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (dirty & /*parsedOptions*/ 16 && input_name_value !== (input_name_value = /*option*/ ctx[12].name)) {
|
|
77
|
+
attr(input, "name", input_name_value);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (dirty & /*checked*/ 1) {
|
|
81
|
+
input.checked = /*checked*/ ctx[0];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (dirty & /*parsedOptions*/ 16 && input_disabled_value !== (input_disabled_value = /*option*/ ctx[12].disabled)) {
|
|
85
|
+
input.disabled = input_disabled_value;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (dirty & /*parsedOptions*/ 16 && t1_value !== (t1_value = /*option*/ ctx[12].label + "")) set_data(t1, t1_value);
|
|
89
|
+
|
|
90
|
+
if (dirty & /*parsedOptions*/ 16 && label_for_value !== (label_for_value = /*option*/ ctx[12].id)) {
|
|
91
|
+
attr(label, "for", label_for_value);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (dirty & /*parsedOptions*/ 16) {
|
|
95
|
+
toggle_class(div, "mc-option-button--full", /*option*/ ctx[12].fullwidth);
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
d(detaching) {
|
|
99
|
+
if (detaching) detach(div);
|
|
100
|
+
mounted = false;
|
|
101
|
+
run_all(dispose);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function create_fragment(ctx) {
|
|
107
|
+
let div;
|
|
108
|
+
let div_class_value;
|
|
109
|
+
let div_style_value;
|
|
110
|
+
let each_value = /*parsedOptions*/ ctx[4];
|
|
111
|
+
let each_blocks = [];
|
|
112
|
+
|
|
113
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
114
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
let div_levels = [
|
|
118
|
+
{
|
|
119
|
+
class: div_class_value = "mc-option-group " + /*userClass*/ ctx[3]
|
|
120
|
+
},
|
|
121
|
+
/*attributes*/ ctx[2],
|
|
122
|
+
{
|
|
123
|
+
style: div_style_value = `justify-content:${/*justifycontent*/ ctx[1]}`
|
|
124
|
+
}
|
|
125
|
+
];
|
|
126
|
+
|
|
127
|
+
let div_data = {};
|
|
128
|
+
|
|
129
|
+
for (let i = 0; i < div_levels.length; i += 1) {
|
|
130
|
+
div_data = assign(div_data, div_levels[i]);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
c() {
|
|
135
|
+
div = element("div");
|
|
136
|
+
|
|
137
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
138
|
+
each_blocks[i].c();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
this.c = noop;
|
|
142
|
+
set_attributes(div, div_data);
|
|
143
|
+
},
|
|
144
|
+
m(target, anchor) {
|
|
145
|
+
insert(target, div, anchor);
|
|
146
|
+
|
|
147
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
148
|
+
if (each_blocks[i]) {
|
|
149
|
+
each_blocks[i].m(div, null);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
p(ctx, [dirty]) {
|
|
154
|
+
if (dirty & /*parsedOptions, checked, handleChange*/ 81) {
|
|
155
|
+
each_value = /*parsedOptions*/ ctx[4];
|
|
156
|
+
let i;
|
|
157
|
+
|
|
158
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
159
|
+
const child_ctx = get_each_context(ctx, each_value, i);
|
|
160
|
+
|
|
161
|
+
if (each_blocks[i]) {
|
|
162
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
163
|
+
} else {
|
|
164
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
165
|
+
each_blocks[i].c();
|
|
166
|
+
each_blocks[i].m(div, null);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
for (; i < each_blocks.length; i += 1) {
|
|
171
|
+
each_blocks[i].d(1);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
each_blocks.length = each_value.length;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
set_attributes(div, div_data = get_spread_update(div_levels, [
|
|
178
|
+
dirty & /*userClass*/ 8 && div_class_value !== (div_class_value = "mc-option-group " + /*userClass*/ ctx[3]) && { class: div_class_value },
|
|
179
|
+
dirty & /*attributes*/ 4 && /*attributes*/ ctx[2],
|
|
180
|
+
dirty & /*justifycontent*/ 2 && div_style_value !== (div_style_value = `justify-content:${/*justifycontent*/ ctx[1]}`) && { style: div_style_value }
|
|
181
|
+
]));
|
|
182
|
+
},
|
|
183
|
+
i: noop,
|
|
184
|
+
o: noop,
|
|
185
|
+
d(detaching) {
|
|
186
|
+
if (detaching) detach(div);
|
|
187
|
+
destroy_each(each_blocks, detaching);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function instance($$self, $$props, $$invalidate) {
|
|
193
|
+
let parsedOptions;
|
|
194
|
+
let userClass;
|
|
195
|
+
let attributes;
|
|
196
|
+
const omit_props_names = ["checked","options","justifycontent"];
|
|
197
|
+
let $$restProps = compute_rest_props($$props, omit_props_names);
|
|
198
|
+
let { checked } = $$props;
|
|
199
|
+
let { options } = $$props;
|
|
200
|
+
let { justifycontent = 'space-between' } = $$props;
|
|
201
|
+
let eventHandler = new EventHandler();
|
|
202
|
+
const forwardEvents = createEventForwarder(get_current_component());
|
|
203
|
+
|
|
204
|
+
function handleChange(option) {
|
|
205
|
+
option.checked = !option.checked;
|
|
206
|
+
eventHandler.dispatch('change', option);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const change_handler = option => handleChange(option);
|
|
210
|
+
|
|
211
|
+
$$self.$$set = $$new_props => {
|
|
212
|
+
$$invalidate(11, $$props = assign(assign({}, $$props), exclude_internal_props($$new_props)));
|
|
213
|
+
$$invalidate(10, $$restProps = compute_rest_props($$props, omit_props_names));
|
|
214
|
+
if ('checked' in $$new_props) $$invalidate(0, checked = $$new_props.checked);
|
|
215
|
+
if ('options' in $$new_props) $$invalidate(7, options = $$new_props.options);
|
|
216
|
+
if ('justifycontent' in $$new_props) $$invalidate(1, justifycontent = $$new_props.justifycontent);
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
$$self.$$.update = () => {
|
|
220
|
+
if ($$self.$$.dirty & /*options*/ 128) {
|
|
221
|
+
$$invalidate(4, parsedOptions = options ? JSON.parse(options) : []);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
$$invalidate(3, userClass = $$props.class);
|
|
225
|
+
$$invalidate(2, attributes = Object.assign({}, $$restProps));
|
|
226
|
+
|
|
227
|
+
if ($$self.$$.dirty & /*attributes*/ 4) {
|
|
228
|
+
delete attributes.class;
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
$$props = exclude_internal_props($$props);
|
|
233
|
+
|
|
234
|
+
return [
|
|
235
|
+
checked,
|
|
236
|
+
justifycontent,
|
|
237
|
+
attributes,
|
|
238
|
+
userClass,
|
|
239
|
+
parsedOptions,
|
|
240
|
+
forwardEvents,
|
|
241
|
+
handleChange,
|
|
242
|
+
options,
|
|
243
|
+
change_handler
|
|
244
|
+
];
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
class OptionButton extends SvelteElement {
|
|
248
|
+
constructor(options) {
|
|
249
|
+
super();
|
|
250
|
+
const style = document.createElement('style');
|
|
251
|
+
style.textContent = `.mc-option-button{display:-webkit-box;display:-ms-flexbox;display:flex;text-align:center}.mc-option-button__input{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-option-button__input:hover+.mc-option-button__label{-webkit-box-shadow:0 0 0 2px #333333;box-shadow:0 0 0 2px #333333}.mc-option-button__input:checked+.mc-option-button__label{border-color:#46a610;-webkit-box-shadow:0 0 0 0.25rem #ebf5de;box-shadow:0 0 0 0.25rem #ebf5de}.mc-option-button__input:focus+.mc-option-button__label::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-option-button__input:disabled+.mc-option-button__label{cursor:not-allowed;background-color:#cccccc;color:#666666;-webkit-box-shadow:none;box-shadow:none}.mc-option-button__label{font-family:"LeroyMerlin", sans-serif;font-weight:600;position:relative;padding:1.5625rem 2rem;border-radius:4px;-webkit-box-shadow:0 0 0 1px #b3b3b3;box-shadow:0 0 0 1px #b3b3b3;border:2px solid transparent;cursor:pointer;position:relative}.mc-option-button__label::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;border-radius:6px;top:-0.25rem;right:-0.25rem;bottom:-0.25rem;left:-0.25rem}.mc-option-button--full .mc-option-button__label{width:100%}.mc-option-group{display:-webkit-box;display:-ms-flexbox;display:flex}`;
|
|
252
|
+
this.shadowRoot.appendChild(style);
|
|
253
|
+
|
|
254
|
+
init(
|
|
255
|
+
this,
|
|
256
|
+
{
|
|
257
|
+
target: this.shadowRoot,
|
|
258
|
+
props: attribute_to_object(this.attributes),
|
|
259
|
+
customElement: true
|
|
260
|
+
},
|
|
261
|
+
instance,
|
|
262
|
+
create_fragment,
|
|
263
|
+
safe_not_equal,
|
|
264
|
+
{
|
|
265
|
+
checked: 0,
|
|
266
|
+
options: 7,
|
|
267
|
+
justifycontent: 1
|
|
268
|
+
},
|
|
269
|
+
null
|
|
270
|
+
);
|
|
271
|
+
|
|
272
|
+
if (options) {
|
|
273
|
+
if (options.target) {
|
|
274
|
+
insert(options.target, this, options.anchor);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (options.props) {
|
|
278
|
+
this.$set(options.props);
|
|
279
|
+
flush();
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
static get observedAttributes() {
|
|
285
|
+
return ["checked", "options", "justifycontent"];
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
get checked() {
|
|
289
|
+
return this.$$.ctx[0];
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
set checked(checked) {
|
|
293
|
+
this.$$set({ checked });
|
|
294
|
+
flush();
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
get options() {
|
|
298
|
+
return this.$$.ctx[7];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
set options(options) {
|
|
302
|
+
this.$$set({ options });
|
|
303
|
+
flush();
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
get justifycontent() {
|
|
307
|
+
return this.$$.ctx[1];
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
set justifycontent(justifycontent) {
|
|
311
|
+
this.$$set({ justifycontent });
|
|
312
|
+
flush();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export { OptionButton as default };
|
|
2
317
|
//# sourceMappingURL=OptionButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionButton.js","sources":["../../../src/components/optionbutton/OptionButton.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { get_current_component } from 'svelte/internal';\n import { createEventForwarder } from '../../utilities/EventForward';\n import { EventHandler } from '../../utilities/EventHandler';\n import type { OptionItems } from './optionbutton.types';\n export let checked: boolean;\n export let options: string;\n export let justifycontent = 'space-between';\n $: parsedOptions = options ? (JSON.parse(options) as OptionItems[]) : [];\n $: userClass = $$props.class;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n let eventHandler = new EventHandler();\n const forwardEvents = createEventForwarder(get_current_component());\n\n function handleChange(option: OptionItems): void {\n option.checked = !option.checked;\n eventHandler.dispatch('change', option);\n }\n</script>\n\n<div\n class=\"mc-option-group {userClass}\"\n {...attributes}\n style={`justify-content:${justifycontent}`}\n>\n {#each parsedOptions as option}\n <div\n class=\"mc-option-button\"\n class:mc-option-button--full={option.fullwidth}\n >\n <input\n use:forwardEvents\n id={option.id}\n type=\"radio\"\n class=\"mc-option-button__input\"\n name={option.name}\n {checked}\n disabled={option.disabled}\n on:change={() => handleChange(option)}\n />\n <label for={option.id} class=\"mc-option-button__label\">\n {option.label}\n </label>\n </div>\n {/each}\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.option-button';\n\n .mc-option-group {\n display: flex;\n }\n</style>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"OptionButton.js","sources":["../../../src/components/optionbutton/OptionButton.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { get_current_component } from 'svelte/internal';\n import { createEventForwarder } from '../../utilities/EventForward';\n import { EventHandler } from '../../utilities/EventHandler';\n import type { OptionItems } from './optionbutton.types';\n export let checked: boolean;\n export let options: string;\n export let justifycontent = 'space-between';\n $: parsedOptions = options ? (JSON.parse(options) as OptionItems[]) : [];\n $: userClass = $$props.class;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n let eventHandler = new EventHandler();\n const forwardEvents = createEventForwarder(get_current_component());\n\n function handleChange(option: OptionItems): void {\n option.checked = !option.checked;\n eventHandler.dispatch('change', option);\n }\n</script>\n\n<div\n class=\"mc-option-group {userClass}\"\n {...attributes}\n style={`justify-content:${justifycontent}`}\n>\n {#each parsedOptions as option}\n <div\n class=\"mc-option-button\"\n class:mc-option-button--full={option.fullwidth}\n >\n <input\n use:forwardEvents\n id={option.id}\n type=\"radio\"\n class=\"mc-option-button__input\"\n name={option.name}\n {checked}\n disabled={option.disabled}\n on:change={() => handleChange(option)}\n />\n <label for={option.id} class=\"mc-option-button__label\">\n {option.label}\n </label>\n </div>\n {/each}\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.option-button';\n\n .mc-option-group {\n display: flex;\n }\n</style>\n"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +1,105 @@
|
|
|
1
|
-
import{S as
|
|
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, n as noop, h as set_attributes, z as toggle_class, j as append, m as get_spread_update, o as detach, p as compute_rest_props, q as exclude_internal_props } from '../../index-c33b3772.js';
|
|
2
|
+
|
|
3
|
+
/* src/components/overlay/Overlay.svelte generated by Svelte v3.58.0 */
|
|
4
|
+
|
|
5
|
+
function create_fragment(ctx) {
|
|
6
|
+
let div;
|
|
7
|
+
let slot;
|
|
8
|
+
let div_levels = [{ class: "mc-overlay" }, /*$$restProps*/ ctx[1]];
|
|
9
|
+
let div_data = {};
|
|
10
|
+
|
|
11
|
+
for (let i = 0; i < div_levels.length; i += 1) {
|
|
12
|
+
div_data = assign(div_data, div_levels[i]);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
c() {
|
|
17
|
+
div = element("div");
|
|
18
|
+
slot = element("slot");
|
|
19
|
+
this.c = noop;
|
|
20
|
+
set_attributes(div, div_data);
|
|
21
|
+
toggle_class(div, "is-visible", /*visible*/ ctx[0]);
|
|
22
|
+
},
|
|
23
|
+
m(target, anchor) {
|
|
24
|
+
insert(target, div, anchor);
|
|
25
|
+
append(div, slot);
|
|
26
|
+
},
|
|
27
|
+
p(ctx, [dirty]) {
|
|
28
|
+
set_attributes(div, div_data = get_spread_update(div_levels, [
|
|
29
|
+
{ class: "mc-overlay" },
|
|
30
|
+
dirty & /*$$restProps*/ 2 && /*$$restProps*/ ctx[1]
|
|
31
|
+
]));
|
|
32
|
+
|
|
33
|
+
toggle_class(div, "is-visible", /*visible*/ ctx[0]);
|
|
34
|
+
},
|
|
35
|
+
i: noop,
|
|
36
|
+
o: noop,
|
|
37
|
+
d(detaching) {
|
|
38
|
+
if (detaching) detach(div);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function instance($$self, $$props, $$invalidate) {
|
|
44
|
+
const omit_props_names = ["visible"];
|
|
45
|
+
let $$restProps = compute_rest_props($$props, omit_props_names);
|
|
46
|
+
let { visible = false } = $$props;
|
|
47
|
+
|
|
48
|
+
$$self.$$set = $$new_props => {
|
|
49
|
+
$$props = assign(assign({}, $$props), exclude_internal_props($$new_props));
|
|
50
|
+
$$invalidate(1, $$restProps = compute_rest_props($$props, omit_props_names));
|
|
51
|
+
if ('visible' in $$new_props) $$invalidate(0, visible = $$new_props.visible);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return [visible, $$restProps];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
class Overlay extends SvelteElement {
|
|
58
|
+
constructor(options) {
|
|
59
|
+
super();
|
|
60
|
+
const style = document.createElement('style');
|
|
61
|
+
style.textContent = `.mc-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-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}.mc-overlay-loader{background-color:rgba(25, 25, 25, 0.7);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;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mc-overlay-loader.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}`;
|
|
62
|
+
this.shadowRoot.appendChild(style);
|
|
63
|
+
|
|
64
|
+
init(
|
|
65
|
+
this,
|
|
66
|
+
{
|
|
67
|
+
target: this.shadowRoot,
|
|
68
|
+
props: attribute_to_object(this.attributes),
|
|
69
|
+
customElement: true
|
|
70
|
+
},
|
|
71
|
+
instance,
|
|
72
|
+
create_fragment,
|
|
73
|
+
safe_not_equal,
|
|
74
|
+
{ visible: 0 },
|
|
75
|
+
null
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
if (options) {
|
|
79
|
+
if (options.target) {
|
|
80
|
+
insert(options.target, this, options.anchor);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (options.props) {
|
|
84
|
+
this.$set(options.props);
|
|
85
|
+
flush();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
static get observedAttributes() {
|
|
91
|
+
return ["visible"];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
get visible() {
|
|
95
|
+
return this.$$.ctx[0];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
set visible(visible) {
|
|
99
|
+
this.$$set({ visible });
|
|
100
|
+
flush();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export { Overlay as default };
|
|
2
105
|
//# sourceMappingURL=Overlay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.js","sources":["../../../src/components/overlay/Overlay.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n export let visible = false;\n</script>\n\n<div class=\"mc-overlay\" class:is-visible={visible} {...$$restProps}>\n <!-- @slot Use this slot to insert a centered content inside the overlay -->\n <slot />\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/all-settings';\n @import '@mozaic-ds/styles/components/c.overlay';\n</style>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"Overlay.js","sources":["../../../src/components/overlay/Overlay.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n export let visible = false;\n</script>\n\n<div class=\"mc-overlay\" class:is-visible={visible} {...$$restProps}>\n <!-- @slot Use this slot to insert a centered content inside the overlay -->\n <slot />\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/all-settings';\n @import '@mozaic-ds/styles/components/c.overlay';\n</style>\n"],"names":[],"mappings":";;;;;;;4DAMuD,GAAW,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;+CAAxB,GAAO,CAAA,CAAA,CAAA,CAAA,CAAA;;;GAAjD,MAGK,CAAA,MAAA,EAAA,GAAA,EAAA,MAAA,CAAA,CAAA;GADH,MAAO,CAAA,GAAA,EAAA,IAAA,CAAA,CAAA;;;;;iDAF8C,GAAW,CAAA,CAAA,CAAA;;;+CAAxB,GAAO,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;AAHpC,CAAA,IAAA,EAAA,OAAO,GAAG,KAAK,EAAA,GAAA,OAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,152 @@
|
|
|
1
|
-
import{S as
|
|
1
|
+
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert, f as flush, s as safe_not_equal, e as element, d as space, n as noop, g as attr, z as toggle_class, j as append, o as detach, t as text, k as set_data } from '../../index-c33b3772.js';
|
|
2
|
+
|
|
3
|
+
/* src/components/overlay/OverlayLoader.svelte generated by Svelte v3.58.0 */
|
|
4
|
+
|
|
5
|
+
function create_if_block(ctx) {
|
|
6
|
+
let span;
|
|
7
|
+
let t;
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
c() {
|
|
11
|
+
span = element("span");
|
|
12
|
+
t = text(/*text*/ ctx[1]);
|
|
13
|
+
attr(span, "class", "mc-loader__text");
|
|
14
|
+
},
|
|
15
|
+
m(target, anchor) {
|
|
16
|
+
insert(target, span, anchor);
|
|
17
|
+
append(span, t);
|
|
18
|
+
},
|
|
19
|
+
p(ctx, dirty) {
|
|
20
|
+
if (dirty & /*text*/ 2) set_data(t, /*text*/ ctx[1]);
|
|
21
|
+
},
|
|
22
|
+
d(detaching) {
|
|
23
|
+
if (detaching) detach(span);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function create_fragment(ctx) {
|
|
29
|
+
let div1;
|
|
30
|
+
let div0;
|
|
31
|
+
let span;
|
|
32
|
+
let t;
|
|
33
|
+
let if_block = /*text*/ ctx[1] && create_if_block(ctx);
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
c() {
|
|
37
|
+
div1 = element("div");
|
|
38
|
+
div0 = element("div");
|
|
39
|
+
span = element("span");
|
|
40
|
+
span.innerHTML = `<svg class="mc-loader__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><circle class="mc-loader__path" cx="50%" cy="50%" r="19"></circle></svg>`;
|
|
41
|
+
t = space();
|
|
42
|
+
if (if_block) if_block.c();
|
|
43
|
+
this.c = noop;
|
|
44
|
+
attr(span, "class", "mc-loader__spinner");
|
|
45
|
+
attr(div0, "class", "mc-loader mc-loader--l mc-loader--light");
|
|
46
|
+
attr(div1, "class", "mc-overlay-loader");
|
|
47
|
+
toggle_class(div1, "is-visible", /*visible*/ ctx[0]);
|
|
48
|
+
},
|
|
49
|
+
m(target, anchor) {
|
|
50
|
+
insert(target, div1, anchor);
|
|
51
|
+
append(div1, div0);
|
|
52
|
+
append(div0, span);
|
|
53
|
+
append(div0, t);
|
|
54
|
+
if (if_block) if_block.m(div0, null);
|
|
55
|
+
},
|
|
56
|
+
p(ctx, [dirty]) {
|
|
57
|
+
if (/*text*/ ctx[1]) {
|
|
58
|
+
if (if_block) {
|
|
59
|
+
if_block.p(ctx, dirty);
|
|
60
|
+
} else {
|
|
61
|
+
if_block = create_if_block(ctx);
|
|
62
|
+
if_block.c();
|
|
63
|
+
if_block.m(div0, null);
|
|
64
|
+
}
|
|
65
|
+
} else if (if_block) {
|
|
66
|
+
if_block.d(1);
|
|
67
|
+
if_block = null;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (dirty & /*visible*/ 1) {
|
|
71
|
+
toggle_class(div1, "is-visible", /*visible*/ ctx[0]);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
i: noop,
|
|
75
|
+
o: noop,
|
|
76
|
+
d(detaching) {
|
|
77
|
+
if (detaching) detach(div1);
|
|
78
|
+
if (if_block) if_block.d();
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function instance($$self, $$props, $$invalidate) {
|
|
84
|
+
let { visible = false } = $$props;
|
|
85
|
+
let { text } = $$props;
|
|
86
|
+
|
|
87
|
+
$$self.$$set = $$props => {
|
|
88
|
+
if ('visible' in $$props) $$invalidate(0, visible = $$props.visible);
|
|
89
|
+
if ('text' in $$props) $$invalidate(1, text = $$props.text);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
return [visible, text];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
class OverlayLoader extends SvelteElement {
|
|
96
|
+
constructor(options) {
|
|
97
|
+
super();
|
|
98
|
+
const style = document.createElement('style');
|
|
99
|
+
style.textContent = `.mc-loader{color:#188803;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mc-loader .mc-loader__spinner{height:2rem;width:2rem}.mc-loader .mc-loader__path{stroke-width:4}.mc-loader .mc-loader__path{stroke:currentColor}.mc-loader__spinner:not(:only-child){margin-bottom:1rem}.mc-loader__icon{-webkit-animation:rotate-loader 2s linear infinite;animation:rotate-loader 2s linear infinite;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center}.mc-loader__path{fill:none;stroke-dasharray:1, 200;stroke-dashoffset:0;stroke-linecap:round;-webkit-animation:animate-dash-loader 2s ease-in-out infinite;animation:animate-dash-loader 2s ease-in-out infinite}.mc-loader__text{font-size:1rem;line-height:1.375;color:currentColor}.mc-loader--l .mc-loader__spinner{height:4rem;width:4rem}.mc-loader--l .mc-loader__path{stroke-width:8}.mc-loader--light{color:#ffffff}.mc-loader--light .mc-loader__path{stroke:currentColor}@-webkit-keyframes rotate-loader{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}}@keyframes rotate-loader{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}}@-webkit-keyframes animate-dash-loader{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124px}}@keyframes animate-dash-loader{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124px}}.mc-overlay-loader{background-color:rgba(25, 25, 25, 0.7);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;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mc-overlay-loader.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}`;
|
|
100
|
+
this.shadowRoot.appendChild(style);
|
|
101
|
+
|
|
102
|
+
init(
|
|
103
|
+
this,
|
|
104
|
+
{
|
|
105
|
+
target: this.shadowRoot,
|
|
106
|
+
props: attribute_to_object(this.attributes),
|
|
107
|
+
customElement: true
|
|
108
|
+
},
|
|
109
|
+
instance,
|
|
110
|
+
create_fragment,
|
|
111
|
+
safe_not_equal,
|
|
112
|
+
{ visible: 0, text: 1 },
|
|
113
|
+
null
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
if (options) {
|
|
117
|
+
if (options.target) {
|
|
118
|
+
insert(options.target, this, options.anchor);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (options.props) {
|
|
122
|
+
this.$set(options.props);
|
|
123
|
+
flush();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
static get observedAttributes() {
|
|
129
|
+
return ["visible", "text"];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
get visible() {
|
|
133
|
+
return this.$$.ctx[0];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
set visible(visible) {
|
|
137
|
+
this.$$set({ visible });
|
|
138
|
+
flush();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
get text() {
|
|
142
|
+
return this.$$.ctx[1];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
set text(text) {
|
|
146
|
+
this.$$set({ text });
|
|
147
|
+
flush();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export { OverlayLoader as default };
|
|
2
152
|
//# sourceMappingURL=OverlayLoader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayLoader.js","sources":["../../../src/components/overlay/OverlayLoader.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n export let visible = false;\n export let text: string;\n</script>\n\n<div class=\"mc-overlay-loader\" class:is-visible={visible}>\n <div class=\"mc-loader mc-loader--l mc-loader--light\">\n <span class=\"mc-loader__spinner\">\n <svg\n class=\"mc-loader__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 64 64\"\n >\n <circle class=\"mc-loader__path\" cx=\"50%\" cy=\"50%\" r=\"19\" />\n </svg>\n </span>\n\n {#if text}\n <span class=\"mc-loader__text\">\n {text}\n </span>\n {/if}\n </div>\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/all-settings';\n @import '@mozaic-ds/styles/components/c.loader';\n @import '@mozaic-ds/styles/components/c.overlay';\n</style>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"OverlayLoader.js","sources":["../../../src/components/overlay/OverlayLoader.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n export let visible = false;\n export let text: string;\n</script>\n\n<div class=\"mc-overlay-loader\" class:is-visible={visible}>\n <div class=\"mc-loader mc-loader--l mc-loader--light\">\n <span class=\"mc-loader__spinner\">\n <svg\n class=\"mc-loader__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 64 64\"\n >\n <circle class=\"mc-loader__path\" cx=\"50%\" cy=\"50%\" r=\"19\" />\n </svg>\n </span>\n\n {#if text}\n <span class=\"mc-loader__text\">\n {text}\n </span>\n {/if}\n </div>\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/all-settings';\n @import '@mozaic-ds/styles/components/c.loader';\n @import '@mozaic-ds/styles/components/c.overlay';\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;qBAqBS,GAAI,CAAA,CAAA,CAAA,CAAA,CAAA;;;;GADP,MAEM,CAAA,MAAA,EAAA,IAAA,EAAA,MAAA,CAAA,CAAA;;;;gDADH,GAAI,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;yBAFJ,GAAI,CAAA,CAAA,CAAA,IAAA,eAAA,CAAA,GAAA,CAAA,CAAA;;;;;;;;;;;;;;gDAZoC,GAAO,CAAA,CAAA,CAAA,CAAA,CAAA;;;GAAxD,MAkBK,CAAA,MAAA,EAAA,IAAA,EAAA,MAAA,CAAA,CAAA;GAjBH,MAgBK,CAAA,IAAA,EAAA,IAAA,CAAA,CAAA;GAfH,MAQM,CAAA,IAAA,EAAA,IAAA,CAAA,CAAA;;;;;gBAED,GAAI,CAAA,CAAA,CAAA,EAAA;;;;;;;;;;;;;;iDAZoC,GAAO,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;AAJ3C,CAAA,IAAA,EAAA,OAAO,GAAG,KAAK,EAAA,GAAA,OAAA,CAAA;OACf,IAAY,EAAA,GAAA,OAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|