@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,498 +1,2 @@
|
|
|
1
|
-
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert, f as flush, s as safe_not_equal, c as assign, e as element, d as space, n as noop, g as attr, h as set_attributes, j as append, U as set_input_value, B as action_destroyer, l as listen, m as get_spread_update, o as detach, H as run_all, p as compute_rest_props, r as get_current_component, a4 as afterUpdate, q as exclude_internal_props } 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/textinput/Textinput.svelte generated by Svelte v3.58.0 */
|
|
6
|
-
|
|
7
|
-
function create_if_block(ctx) {
|
|
8
|
-
let span;
|
|
9
|
-
let raw_value = `<${generateIconName(/*iconname*/ ctx[7])} />` + "";
|
|
10
|
-
|
|
11
|
-
return {
|
|
12
|
-
c() {
|
|
13
|
-
span = element("span");
|
|
14
|
-
attr(span, "class", "mc-left-icon-input__icon");
|
|
15
|
-
},
|
|
16
|
-
m(target, anchor) {
|
|
17
|
-
insert(target, span, anchor);
|
|
18
|
-
span.innerHTML = raw_value;
|
|
19
|
-
},
|
|
20
|
-
p(ctx, dirty) {
|
|
21
|
-
if (dirty & /*iconname*/ 128 && raw_value !== (raw_value = `<${generateIconName(/*iconname*/ ctx[7])} />` + "")) span.innerHTML = raw_value; },
|
|
22
|
-
d(detaching) {
|
|
23
|
-
if (detaching) detach(span);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function create_fragment(ctx) {
|
|
29
|
-
let div;
|
|
30
|
-
let t;
|
|
31
|
-
let input;
|
|
32
|
-
let input_class_value;
|
|
33
|
-
let div_class_value;
|
|
34
|
-
let mounted;
|
|
35
|
-
let dispose;
|
|
36
|
-
let if_block = /*iconname*/ ctx[7] && create_if_block(ctx);
|
|
37
|
-
|
|
38
|
-
let div_levels = [
|
|
39
|
-
{
|
|
40
|
-
class: div_class_value = "" + ((/*iconname*/ ctx[7] ? 'mc-left-icon-input' : '') + " " + /*userClass*/ ctx[13])
|
|
41
|
-
},
|
|
42
|
-
/*attributes*/ ctx[12]
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
let div_data = {};
|
|
46
|
-
|
|
47
|
-
for (let i = 0; i < div_levels.length; i += 1) {
|
|
48
|
-
div_data = assign(div_data, div_levels[i]);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
c() {
|
|
53
|
-
div = element("div");
|
|
54
|
-
if (if_block) if_block.c();
|
|
55
|
-
t = space();
|
|
56
|
-
input = element("input");
|
|
57
|
-
this.c = noop;
|
|
58
|
-
attr(input, "class", input_class_value = "" + (/*getClasses*/ ctx[16](/*isvalid*/ ctx[3], /*isinvalid*/ ctx[4], /*size*/ ctx[6], /*iconname*/ ctx[7]) + " " + /*$$props*/ ctx[18].class));
|
|
59
|
-
attr(input, "aria-invalid", /*isinvalid*/ ctx[4]);
|
|
60
|
-
attr(input, "name", /*name*/ ctx[1]);
|
|
61
|
-
attr(input, "id", /*name*/ ctx[1]);
|
|
62
|
-
attr(input, "placeholder", /*placeholder*/ ctx[2]);
|
|
63
|
-
input.disabled = /*disabled*/ ctx[5];
|
|
64
|
-
attr(input, "min", /*min*/ ctx[8]);
|
|
65
|
-
attr(input, "max", /*max*/ ctx[9]);
|
|
66
|
-
attr(input, "minlength", /*minlength*/ ctx[10]);
|
|
67
|
-
attr(input, "maxlength", /*maxlength*/ ctx[11]);
|
|
68
|
-
attr(input, "spellcheck", "false");
|
|
69
|
-
set_attributes(div, div_data);
|
|
70
|
-
},
|
|
71
|
-
m(target, anchor) {
|
|
72
|
-
insert(target, div, anchor);
|
|
73
|
-
if (if_block) if_block.m(div, null);
|
|
74
|
-
append(div, t);
|
|
75
|
-
append(div, input);
|
|
76
|
-
set_input_value(input, /*value*/ ctx[0]);
|
|
77
|
-
|
|
78
|
-
if (!mounted) {
|
|
79
|
-
dispose = [
|
|
80
|
-
action_destroyer(/*forwardEvents*/ ctx[14].call(null, input)),
|
|
81
|
-
listen(input, "input", /*input_input_handler*/ ctx[21]),
|
|
82
|
-
action_destroyer(/*setType*/ ctx[17].call(null, input)),
|
|
83
|
-
listen(input, "keydown", /*keydown_handler*/ ctx[22])
|
|
84
|
-
];
|
|
85
|
-
|
|
86
|
-
mounted = true;
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
p(ctx, [dirty]) {
|
|
90
|
-
if (/*iconname*/ ctx[7]) {
|
|
91
|
-
if (if_block) {
|
|
92
|
-
if_block.p(ctx, dirty);
|
|
93
|
-
} else {
|
|
94
|
-
if_block = create_if_block(ctx);
|
|
95
|
-
if_block.c();
|
|
96
|
-
if_block.m(div, t);
|
|
97
|
-
}
|
|
98
|
-
} else if (if_block) {
|
|
99
|
-
if_block.d(1);
|
|
100
|
-
if_block = null;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (dirty & /*isvalid, isinvalid, size, iconname, $$props*/ 262360 && input_class_value !== (input_class_value = "" + (/*getClasses*/ ctx[16](/*isvalid*/ ctx[3], /*isinvalid*/ ctx[4], /*size*/ ctx[6], /*iconname*/ ctx[7]) + " " + /*$$props*/ ctx[18].class))) {
|
|
104
|
-
attr(input, "class", input_class_value);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (dirty & /*isinvalid*/ 16) {
|
|
108
|
-
attr(input, "aria-invalid", /*isinvalid*/ ctx[4]);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if (dirty & /*name*/ 2) {
|
|
112
|
-
attr(input, "name", /*name*/ ctx[1]);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (dirty & /*name*/ 2) {
|
|
116
|
-
attr(input, "id", /*name*/ ctx[1]);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (dirty & /*placeholder*/ 4) {
|
|
120
|
-
attr(input, "placeholder", /*placeholder*/ ctx[2]);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (dirty & /*disabled*/ 32) {
|
|
124
|
-
input.disabled = /*disabled*/ ctx[5];
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (dirty & /*min*/ 256) {
|
|
128
|
-
attr(input, "min", /*min*/ ctx[8]);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (dirty & /*max*/ 512) {
|
|
132
|
-
attr(input, "max", /*max*/ ctx[9]);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (dirty & /*minlength*/ 1024) {
|
|
136
|
-
attr(input, "minlength", /*minlength*/ ctx[10]);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if (dirty & /*maxlength*/ 2048) {
|
|
140
|
-
attr(input, "maxlength", /*maxlength*/ ctx[11]);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (dirty & /*value*/ 1 && input.value !== /*value*/ ctx[0]) {
|
|
144
|
-
set_input_value(input, /*value*/ ctx[0]);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
set_attributes(div, div_data = get_spread_update(div_levels, [
|
|
148
|
-
dirty & /*iconname, userClass*/ 8320 && div_class_value !== (div_class_value = "" + ((/*iconname*/ ctx[7] ? 'mc-left-icon-input' : '') + " " + /*userClass*/ ctx[13])) && { class: div_class_value },
|
|
149
|
-
dirty & /*attributes*/ 4096 && /*attributes*/ ctx[12]
|
|
150
|
-
]));
|
|
151
|
-
},
|
|
152
|
-
i: noop,
|
|
153
|
-
o: noop,
|
|
154
|
-
d(detaching) {
|
|
155
|
-
if (detaching) detach(div);
|
|
156
|
-
if (if_block) if_block.d();
|
|
157
|
-
mounted = false;
|
|
158
|
-
run_all(dispose);
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
function generateIconName(iconName) {
|
|
164
|
-
return `${iconName}`;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function instance($$self, $$props, $$invalidate) {
|
|
168
|
-
let inputType;
|
|
169
|
-
let userClass;
|
|
170
|
-
let attributes;
|
|
171
|
-
|
|
172
|
-
const omit_props_names = [
|
|
173
|
-
"name","value","placeholder","inputtype","isvalid","isinvalid","disabled","size","iconname","rightalign","min","max","minlength","maxlength"
|
|
174
|
-
];
|
|
175
|
-
|
|
176
|
-
let $$restProps = compute_rest_props($$props, omit_props_names);
|
|
177
|
-
let { name } = $$props;
|
|
178
|
-
let { value } = $$props;
|
|
179
|
-
let { placeholder } = $$props;
|
|
180
|
-
let { inputtype = 'text' } = $$props;
|
|
181
|
-
let { isvalid } = $$props;
|
|
182
|
-
let { isinvalid } = $$props;
|
|
183
|
-
let { disabled = false } = $$props;
|
|
184
|
-
let { size = 'm' } = $$props;
|
|
185
|
-
let { iconname } = $$props;
|
|
186
|
-
let { rightalign } = $$props;
|
|
187
|
-
let { min } = $$props;
|
|
188
|
-
let { max } = $$props;
|
|
189
|
-
let { minlength } = $$props;
|
|
190
|
-
let { maxlength } = $$props;
|
|
191
|
-
const forwardEvents = createEventForwarder(get_current_component());
|
|
192
|
-
let eventHandler = new EventHandler();
|
|
193
|
-
|
|
194
|
-
function getClasses(isValid, isInvalid, size, iconname) {
|
|
195
|
-
const classes = ['mc-text-input', 'mc-field__input'];
|
|
196
|
-
|
|
197
|
-
if (isValid) {
|
|
198
|
-
classes.push('is-valid');
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
if (isInvalid) {
|
|
202
|
-
classes.push('is-invalid');
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
if (size === 's') {
|
|
206
|
-
classes.push('mc-text-input--s');
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
if (iconname) {
|
|
210
|
-
classes.push('mc-left-icon-input__input');
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
if (rightalign) {
|
|
214
|
-
classes.push('right-align');
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
return classes.join(' ');
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
const setType = node => {
|
|
221
|
-
node.type = inputType;
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
const component = get_current_component();
|
|
225
|
-
|
|
226
|
-
afterUpdate(() => {
|
|
227
|
-
const input = component.shadowRoot.querySelector('.mc-text-input');
|
|
228
|
-
input.type = inputType;
|
|
229
|
-
});
|
|
230
|
-
|
|
231
|
-
function input_input_handler() {
|
|
232
|
-
value = this.value;
|
|
233
|
-
$$invalidate(0, value);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
const keydown_handler = event => {
|
|
237
|
-
if (event?.key === 'Enter') {
|
|
238
|
-
eventHandler.dispatch('submit-search', value);
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
$$self.$$set = $$new_props => {
|
|
243
|
-
$$invalidate(18, $$props = assign(assign({}, $$props), exclude_internal_props($$new_props)));
|
|
244
|
-
$$invalidate(25, $$restProps = compute_rest_props($$props, omit_props_names));
|
|
245
|
-
if ('name' in $$new_props) $$invalidate(1, name = $$new_props.name);
|
|
246
|
-
if ('value' in $$new_props) $$invalidate(0, value = $$new_props.value);
|
|
247
|
-
if ('placeholder' in $$new_props) $$invalidate(2, placeholder = $$new_props.placeholder);
|
|
248
|
-
if ('inputtype' in $$new_props) $$invalidate(19, inputtype = $$new_props.inputtype);
|
|
249
|
-
if ('isvalid' in $$new_props) $$invalidate(3, isvalid = $$new_props.isvalid);
|
|
250
|
-
if ('isinvalid' in $$new_props) $$invalidate(4, isinvalid = $$new_props.isinvalid);
|
|
251
|
-
if ('disabled' in $$new_props) $$invalidate(5, disabled = $$new_props.disabled);
|
|
252
|
-
if ('size' in $$new_props) $$invalidate(6, size = $$new_props.size);
|
|
253
|
-
if ('iconname' in $$new_props) $$invalidate(7, iconname = $$new_props.iconname);
|
|
254
|
-
if ('rightalign' in $$new_props) $$invalidate(20, rightalign = $$new_props.rightalign);
|
|
255
|
-
if ('min' in $$new_props) $$invalidate(8, min = $$new_props.min);
|
|
256
|
-
if ('max' in $$new_props) $$invalidate(9, max = $$new_props.max);
|
|
257
|
-
if ('minlength' in $$new_props) $$invalidate(10, minlength = $$new_props.minlength);
|
|
258
|
-
if ('maxlength' in $$new_props) $$invalidate(11, maxlength = $$new_props.maxlength);
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
$$self.$$.update = () => {
|
|
262
|
-
if ($$self.$$.dirty & /*inputtype*/ 524288) {
|
|
263
|
-
inputType = inputtype;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
$$invalidate(13, userClass = $$props.class);
|
|
267
|
-
$$invalidate(12, attributes = Object.assign({}, $$restProps));
|
|
268
|
-
|
|
269
|
-
if ($$self.$$.dirty & /*attributes*/ 4096) {
|
|
270
|
-
delete attributes.class;
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
$$props = exclude_internal_props($$props);
|
|
275
|
-
|
|
276
|
-
return [
|
|
277
|
-
value,
|
|
278
|
-
name,
|
|
279
|
-
placeholder,
|
|
280
|
-
isvalid,
|
|
281
|
-
isinvalid,
|
|
282
|
-
disabled,
|
|
283
|
-
size,
|
|
284
|
-
iconname,
|
|
285
|
-
min,
|
|
286
|
-
max,
|
|
287
|
-
minlength,
|
|
288
|
-
maxlength,
|
|
289
|
-
attributes,
|
|
290
|
-
userClass,
|
|
291
|
-
forwardEvents,
|
|
292
|
-
eventHandler,
|
|
293
|
-
getClasses,
|
|
294
|
-
setType,
|
|
295
|
-
$$props,
|
|
296
|
-
inputtype,
|
|
297
|
-
rightalign,
|
|
298
|
-
input_input_handler,
|
|
299
|
-
keydown_handler
|
|
300
|
-
];
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
class Textinput extends SvelteElement {
|
|
304
|
-
constructor(options) {
|
|
305
|
-
super();
|
|
306
|
-
const style = document.createElement('style');
|
|
307
|
-
style.textContent = `@charset "UTF-8";.mc-text-input{font-family:"LeroyMerlin", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease;display:block;width:100%;position:relative;border:1px solid #666666;color:#191919;background-color:#ffffff;border-radius:4px}.mc-text-input[type=number]::-webkit-inner-spin-button,.mc-text-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.mc-text-input[type=number]{-moz-appearance:textfield}.mc-text-input[type=search]::-webkit-search-decoration:hover,.mc-text-input[type=search]::-webkit-search-cancel-button:hover{cursor:pointer}.mc-text-input::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-webkit-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-moz-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input:-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::placeholder{margin:0;color:#666666;opacity:1}.mc-text-input.is-valid,.mc-text-input.is-invalid{background-repeat:no-repeat;background-size:1.5rem 1.5rem;background-position:right 0.4375rem center;padding-right:2.5rem}.mc-text-input.is-valid{border-color:#46a610;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjNDZhNjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiA0YTggOCAwIDExLTggOCA4IDggMCAwMTgtOG0wLTJhMTAgMTAgMCAxMDEwIDEwQTEwIDEwIDAgMDAxMiAyeiIvPjxwYXRoIGQ9Ik0xMC43MyAxNS43NWExIDEgMCAwMS0uNjgtLjI2bC0zLTIuNzRhMSAxIDAgMDExLjM2LTEuNDdsMi4yNSAyLjA4IDQuMzYtNC40MmExIDEgMCAxMTEuNDIgMS40MWwtNSA1LjFhMSAxIDAgMDEtLjcxLjN6Ii8+PC9zdmc+")}.mc-text-input.is-valid:hover,.mc-text-input.is-valid.is-hover{border-color:#035010}.mc-text-input.is-invalid{border-color:#c61112;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNjNjExMTIiPjxwYXRoIGQ9Ik0xMiAyYTEwIDEwIDAgMTAxMCAxMEExMCAxMCAwIDAwMTIgMnptMCAxOGE4IDggMCAxMTgtOCA4IDggMCAwMS04IDh6Ii8+PHBhdGggZD0iTTEyIDdhMSAxIDAgMDAtMSAxdjQuMzhhMSAxIDAgMDAyIDBWOGExIDEgMCAwMC0xLTF6Ii8+PGNpcmNsZSBjeD0iMTIiIGN5PSIxNiIgcj0iMSIvPjwvc3ZnPg==")}.mc-text-input.is-invalid:hover,.mc-text-input.is-invalid.is-hover{border-color:#530000}.mc-text-input.is-hover,.mc-text-input:hover{border-color:#191919}.mc-text-input.is-focus,.mc-text-input:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-text-input:disabled{background:#e6e6e6;border-color:#e6e6e6;color:#666666;cursor:not-allowed}.mc-text-input--s{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::placeholder{font-size:1rem;line-height:1.375}@media screen and (min-width: 680px){.mc-text-input--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-m::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1024px){.mc-text-input--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-l::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-l{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-l::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1280px){.mc-text-input--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1920px){.mc-text-input--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xxl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xxl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xxl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::placeholder{font-size:1rem;line-height:1.375}}.mc-left-icon-input{position:relative}.mc-left-icon-input__icon{position:absolute;z-index:1;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);fill:#666666;pointer-events:none}.mc-left-icon-input .mc-left-icon-input__icon{left:0.75rem;top:50%;width:1.5rem;height:1.5rem}.mc-left-icon-input .mc-left-icon-input__input{padding-left:2.9375rem}.mc-left-icon-input--s .mc-left-icon-input__icon{left:0.5rem;top:50%;width:1.5rem;height:1.5rem}.mc-left-icon-input--s .mc-left-icon-input__input{padding-left:2.4375rem}.mc-field__label,.mc-field__legend{font-size:0.875rem;line-height:1.2857142857;font-weight:400;color:#333333}.mc-field__legend{padding-left:0;padding-right:0}.mc-field__requirement,.mc-field__help{font-size:0.75rem;line-height:1.3333333333;font-weight:400;color:#666666}.mc-field__requirement::before{content:" - "}.mc-field__help{display:block;margin-top:0.125rem}.mc-field .mc-field__input,.mc-field .mc-field__element{margin-top:0.5rem}@media screen and (min-width: 769px){.mc-field__container--inline{display:-webkit-box;display:-ms-flexbox;display:flex}}@media screen and (min-width: 769px){.mc-field__container--inline .mc-field__item:not(:last-child){margin-bottom:0;margin-right:1rem}}@media screen and (min-width: 1024px){.mc-field__container--inline .mc-field__item:not(:last-child){margin-right:2rem}}.mc-field__item:not(:last-child){margin-bottom:1rem}.mc-field__error-message{font-size:0.875rem;line-height:1.2857142857;color:#c61112;display:inline-block;margin-top:0.25rem}.mc-field--group{border:none;margin-left:0;margin-right:0;padding:0}.mc-field--group .mc-field__error-message{margin-top:0.5rem}.right-align{text-align:right}`;
|
|
308
|
-
this.shadowRoot.appendChild(style);
|
|
309
|
-
|
|
310
|
-
init(
|
|
311
|
-
this,
|
|
312
|
-
{
|
|
313
|
-
target: this.shadowRoot,
|
|
314
|
-
props: attribute_to_object(this.attributes),
|
|
315
|
-
customElement: true
|
|
316
|
-
},
|
|
317
|
-
instance,
|
|
318
|
-
create_fragment,
|
|
319
|
-
safe_not_equal,
|
|
320
|
-
{
|
|
321
|
-
name: 1,
|
|
322
|
-
value: 0,
|
|
323
|
-
placeholder: 2,
|
|
324
|
-
inputtype: 19,
|
|
325
|
-
isvalid: 3,
|
|
326
|
-
isinvalid: 4,
|
|
327
|
-
disabled: 5,
|
|
328
|
-
size: 6,
|
|
329
|
-
iconname: 7,
|
|
330
|
-
rightalign: 20,
|
|
331
|
-
min: 8,
|
|
332
|
-
max: 9,
|
|
333
|
-
minlength: 10,
|
|
334
|
-
maxlength: 11
|
|
335
|
-
},
|
|
336
|
-
null
|
|
337
|
-
);
|
|
338
|
-
|
|
339
|
-
if (options) {
|
|
340
|
-
if (options.target) {
|
|
341
|
-
insert(options.target, this, options.anchor);
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
if (options.props) {
|
|
345
|
-
this.$set(options.props);
|
|
346
|
-
flush();
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
static get observedAttributes() {
|
|
352
|
-
return [
|
|
353
|
-
"name",
|
|
354
|
-
"value",
|
|
355
|
-
"placeholder",
|
|
356
|
-
"inputtype",
|
|
357
|
-
"isvalid",
|
|
358
|
-
"isinvalid",
|
|
359
|
-
"disabled",
|
|
360
|
-
"size",
|
|
361
|
-
"iconname",
|
|
362
|
-
"rightalign",
|
|
363
|
-
"min",
|
|
364
|
-
"max",
|
|
365
|
-
"minlength",
|
|
366
|
-
"maxlength"
|
|
367
|
-
];
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
get name() {
|
|
371
|
-
return this.$$.ctx[1];
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
set name(name) {
|
|
375
|
-
this.$$set({ name });
|
|
376
|
-
flush();
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
get value() {
|
|
380
|
-
return this.$$.ctx[0];
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
set value(value) {
|
|
384
|
-
this.$$set({ value });
|
|
385
|
-
flush();
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
get placeholder() {
|
|
389
|
-
return this.$$.ctx[2];
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
set placeholder(placeholder) {
|
|
393
|
-
this.$$set({ placeholder });
|
|
394
|
-
flush();
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
get inputtype() {
|
|
398
|
-
return this.$$.ctx[19];
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
set inputtype(inputtype) {
|
|
402
|
-
this.$$set({ inputtype });
|
|
403
|
-
flush();
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
get isvalid() {
|
|
407
|
-
return this.$$.ctx[3];
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
set isvalid(isvalid) {
|
|
411
|
-
this.$$set({ isvalid });
|
|
412
|
-
flush();
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
get isinvalid() {
|
|
416
|
-
return this.$$.ctx[4];
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
set isinvalid(isinvalid) {
|
|
420
|
-
this.$$set({ isinvalid });
|
|
421
|
-
flush();
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
get disabled() {
|
|
425
|
-
return this.$$.ctx[5];
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
set disabled(disabled) {
|
|
429
|
-
this.$$set({ disabled });
|
|
430
|
-
flush();
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
get size() {
|
|
434
|
-
return this.$$.ctx[6];
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
set size(size) {
|
|
438
|
-
this.$$set({ size });
|
|
439
|
-
flush();
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
get iconname() {
|
|
443
|
-
return this.$$.ctx[7];
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
set iconname(iconname) {
|
|
447
|
-
this.$$set({ iconname });
|
|
448
|
-
flush();
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
get rightalign() {
|
|
452
|
-
return this.$$.ctx[20];
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
set rightalign(rightalign) {
|
|
456
|
-
this.$$set({ rightalign });
|
|
457
|
-
flush();
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
get min() {
|
|
461
|
-
return this.$$.ctx[8];
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
set min(min) {
|
|
465
|
-
this.$$set({ min });
|
|
466
|
-
flush();
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
get max() {
|
|
470
|
-
return this.$$.ctx[9];
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
set max(max) {
|
|
474
|
-
this.$$set({ max });
|
|
475
|
-
flush();
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
get minlength() {
|
|
479
|
-
return this.$$.ctx[10];
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
set minlength(minlength) {
|
|
483
|
-
this.$$set({ minlength });
|
|
484
|
-
flush();
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
get maxlength() {
|
|
488
|
-
return this.$$.ctx[11];
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
set maxlength(maxlength) {
|
|
492
|
-
this.$$set({ maxlength });
|
|
493
|
-
flush();
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
export { Textinput as default };
|
|
1
|
+
import{S as e,i as t,a as i,b as n,f as m,s as l,c as r,e as o,d as s,n as a,g as h,h as c,j as p,U as d,B as u,l as g,m as x,o as f,H as z,p as b,r as w,a4 as $,q as v}from"../../index-c33b3772.js";import{c as M}from"../../EventForward-8492ff62.js";import{E as I}from"../../EventHandler-02058705.js";function _(e){let t,i=`<${A(e[7])} />`;return{c(){t=o("span"),h(t,"class","mc-left-icon-input__icon")},m(e,m){n(e,t,m),t.innerHTML=i},p(e,n){128&n&&i!==(i=`<${A(e[7])} />`)&&(t.innerHTML=i)},d(e){e&&f(t)}}}function y(e){let t,i,m,l,b,w,$,v=e[7]&&_(e),M=[{class:b=(e[7]?"mc-left-icon-input":"")+" "+e[13]},e[12]],I={};for(let e=0;e<M.length;e+=1)I=r(I,M[e]);return{c(){t=o("div"),v&&v.c(),i=s(),m=o("input"),this.c=a,h(m,"class",l=e[16](e[3],e[4],e[6],e[7])+" "+e[18].class),h(m,"aria-invalid",e[4]),h(m,"name",e[1]),h(m,"id",e[1]),h(m,"placeholder",e[2]),m.disabled=e[5],h(m,"min",e[8]),h(m,"max",e[9]),h(m,"minlength",e[10]),h(m,"maxlength",e[11]),h(m,"spellcheck","false"),c(t,I)},m(l,r){n(l,t,r),v&&v.m(t,null),p(t,i),p(t,m),d(m,e[0]),w||($=[u(e[14].call(null,m)),g(m,"input",e[21]),u(e[17].call(null,m)),g(m,"keydown",e[22])],w=!0)},p(e,[n]){e[7]?v?v.p(e,n):(v=_(e),v.c(),v.m(t,i)):v&&(v.d(1),v=null),262360&n&&l!==(l=e[16](e[3],e[4],e[6],e[7])+" "+e[18].class)&&h(m,"class",l),16&n&&h(m,"aria-invalid",e[4]),2&n&&h(m,"name",e[1]),2&n&&h(m,"id",e[1]),4&n&&h(m,"placeholder",e[2]),32&n&&(m.disabled=e[5]),256&n&&h(m,"min",e[8]),512&n&&h(m,"max",e[9]),1024&n&&h(m,"minlength",e[10]),2048&n&&h(m,"maxlength",e[11]),1&n&&m.value!==e[0]&&d(m,e[0]),c(t,I=x(M,[8320&n&&b!==(b=(e[7]?"mc-left-icon-input":"")+" "+e[13])&&{class:b},4096&n&&e[12]]))},i:a,o:a,d(e){e&&f(t),v&&v.d(),w=!1,z($)}}}function A(e){return`${e}`}function k(e,t,i){let n,m,l;const o=["name","value","placeholder","inputtype","isvalid","isinvalid","disabled","size","iconname","rightalign","min","max","minlength","maxlength"];let s=b(t,o),{name:a}=t,{value:h}=t,{placeholder:c}=t,{inputtype:p="text"}=t,{isvalid:d}=t,{isinvalid:u}=t,{disabled:g=!1}=t,{size:x="m"}=t,{iconname:f}=t,{rightalign:z}=t,{min:_}=t,{max:y}=t,{minlength:A}=t,{maxlength:k}=t;const D=M(w());let j=new I;const E=w();$((()=>{E.shadowRoot.querySelector(".mc-text-input").type=n}));return e.$$set=e=>{i(18,t=r(r({},t),v(e))),i(25,s=b(t,o)),"name"in e&&i(1,a=e.name),"value"in e&&i(0,h=e.value),"placeholder"in e&&i(2,c=e.placeholder),"inputtype"in e&&i(19,p=e.inputtype),"isvalid"in e&&i(3,d=e.isvalid),"isinvalid"in e&&i(4,u=e.isinvalid),"disabled"in e&&i(5,g=e.disabled),"size"in e&&i(6,x=e.size),"iconname"in e&&i(7,f=e.iconname),"rightalign"in e&&i(20,z=e.rightalign),"min"in e&&i(8,_=e.min),"max"in e&&i(9,y=e.max),"minlength"in e&&i(10,A=e.minlength),"maxlength"in e&&i(11,k=e.maxlength)},e.$$.update=()=>{524288&e.$$.dirty&&(n=p),i(13,m=t.class),i(12,l=Object.assign({},s)),4096&e.$$.dirty&&delete l.class},t=v(t),[h,a,c,d,u,g,x,f,_,y,A,k,l,m,D,j,function(e,t,i,n){const m=["mc-text-input","mc-field__input"];return e&&m.push("is-valid"),t&&m.push("is-invalid"),"s"===i&&m.push("mc-text-input--s"),n&&m.push("mc-left-icon-input__input"),z&&m.push("right-align"),m.join(" ")},e=>{e.type=n},t,p,z,function(){h=this.value,i(0,h)},e=>{"Enter"===e?.key&&j.dispatch("submit-search",h)}]}class D extends e{constructor(e){super();const r=document.createElement("style");r.textContent='@charset "UTF-8";.mc-text-input{font-family:"LeroyMerlin", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease;display:block;width:100%;position:relative;border:1px solid #666666;color:#191919;background-color:#ffffff;border-radius:4px}.mc-text-input[type=number]::-webkit-inner-spin-button,.mc-text-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.mc-text-input[type=number]{-moz-appearance:textfield}.mc-text-input[type=search]::-webkit-search-decoration:hover,.mc-text-input[type=search]::-webkit-search-cancel-button:hover{cursor:pointer}.mc-text-input::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-webkit-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-moz-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input:-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::placeholder{margin:0;color:#666666;opacity:1}.mc-text-input.is-valid,.mc-text-input.is-invalid{background-repeat:no-repeat;background-size:1.5rem 1.5rem;background-position:right 0.4375rem center;padding-right:2.5rem}.mc-text-input.is-valid{border-color:#46a610;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjNDZhNjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiA0YTggOCAwIDExLTggOCA4IDggMCAwMTgtOG0wLTJhMTAgMTAgMCAxMDEwIDEwQTEwIDEwIDAgMDAxMiAyeiIvPjxwYXRoIGQ9Ik0xMC43MyAxNS43NWExIDEgMCAwMS0uNjgtLjI2bC0zLTIuNzRhMSAxIDAgMDExLjM2LTEuNDdsMi4yNSAyLjA4IDQuMzYtNC40MmExIDEgMCAxMTEuNDIgMS40MWwtNSA1LjFhMSAxIDAgMDEtLjcxLjN6Ii8+PC9zdmc+")}.mc-text-input.is-valid:hover,.mc-text-input.is-valid.is-hover{border-color:#035010}.mc-text-input.is-invalid{border-color:#c61112;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNjNjExMTIiPjxwYXRoIGQ9Ik0xMiAyYTEwIDEwIDAgMTAxMCAxMEExMCAxMCAwIDAwMTIgMnptMCAxOGE4IDggMCAxMTgtOCA4IDggMCAwMS04IDh6Ii8+PHBhdGggZD0iTTEyIDdhMSAxIDAgMDAtMSAxdjQuMzhhMSAxIDAgMDAyIDBWOGExIDEgMCAwMC0xLTF6Ii8+PGNpcmNsZSBjeD0iMTIiIGN5PSIxNiIgcj0iMSIvPjwvc3ZnPg==")}.mc-text-input.is-invalid:hover,.mc-text-input.is-invalid.is-hover{border-color:#530000}.mc-text-input.is-hover,.mc-text-input:hover{border-color:#191919}.mc-text-input.is-focus,.mc-text-input:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-text-input:disabled{background:#e6e6e6;border-color:#e6e6e6;color:#666666;cursor:not-allowed}.mc-text-input--s{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::placeholder{font-size:1rem;line-height:1.375}@media screen and (min-width: 680px){.mc-text-input--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-m::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1024px){.mc-text-input--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-l::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-l{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-l::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1280px){.mc-text-input--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1920px){.mc-text-input--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xxl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xxl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xxl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::placeholder{font-size:1rem;line-height:1.375}}.mc-left-icon-input{position:relative}.mc-left-icon-input__icon{position:absolute;z-index:1;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);fill:#666666;pointer-events:none}.mc-left-icon-input .mc-left-icon-input__icon{left:0.75rem;top:50%;width:1.5rem;height:1.5rem}.mc-left-icon-input .mc-left-icon-input__input{padding-left:2.9375rem}.mc-left-icon-input--s .mc-left-icon-input__icon{left:0.5rem;top:50%;width:1.5rem;height:1.5rem}.mc-left-icon-input--s .mc-left-icon-input__input{padding-left:2.4375rem}.mc-field__label,.mc-field__legend{font-size:0.875rem;line-height:1.2857142857;font-weight:400;color:#333333}.mc-field__legend{padding-left:0;padding-right:0}.mc-field__requirement,.mc-field__help{font-size:0.75rem;line-height:1.3333333333;font-weight:400;color:#666666}.mc-field__requirement::before{content:" - "}.mc-field__help{display:block;margin-top:0.125rem}.mc-field .mc-field__input,.mc-field .mc-field__element{margin-top:0.5rem}@media screen and (min-width: 769px){.mc-field__container--inline{display:-webkit-box;display:-ms-flexbox;display:flex}}@media screen and (min-width: 769px){.mc-field__container--inline .mc-field__item:not(:last-child){margin-bottom:0;margin-right:1rem}}@media screen and (min-width: 1024px){.mc-field__container--inline .mc-field__item:not(:last-child){margin-right:2rem}}.mc-field__item:not(:last-child){margin-bottom:1rem}.mc-field__error-message{font-size:0.875rem;line-height:1.2857142857;color:#c61112;display:inline-block;margin-top:0.25rem}.mc-field--group{border:none;margin-left:0;margin-right:0;padding:0}.mc-field--group .mc-field__error-message{margin-top:0.5rem}.right-align{text-align:right}',this.shadowRoot.appendChild(r),t(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},k,y,l,{name:1,value:0,placeholder:2,inputtype:19,isvalid:3,isinvalid:4,disabled:5,size:6,iconname:7,rightalign:20,min:8,max:9,minlength:10,maxlength:11},null),e&&(e.target&&n(e.target,this,e.anchor),e.props&&(this.$set(e.props),m()))}static get observedAttributes(){return["name","value","placeholder","inputtype","isvalid","isinvalid","disabled","size","iconname","rightalign","min","max","minlength","maxlength"]}get name(){return this.$$.ctx[1]}set name(e){this.$$set({name:e}),m()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),m()}get placeholder(){return this.$$.ctx[2]}set placeholder(e){this.$$set({placeholder:e}),m()}get inputtype(){return this.$$.ctx[19]}set inputtype(e){this.$$set({inputtype:e}),m()}get isvalid(){return this.$$.ctx[3]}set isvalid(e){this.$$set({isvalid:e}),m()}get isinvalid(){return this.$$.ctx[4]}set isinvalid(e){this.$$set({isinvalid:e}),m()}get disabled(){return this.$$.ctx[5]}set disabled(e){this.$$set({disabled:e}),m()}get size(){return this.$$.ctx[6]}set size(e){this.$$set({size:e}),m()}get iconname(){return this.$$.ctx[7]}set iconname(e){this.$$set({iconname:e}),m()}get rightalign(){return this.$$.ctx[20]}set rightalign(e){this.$$set({rightalign:e}),m()}get min(){return this.$$.ctx[8]}set min(e){this.$$set({min:e}),m()}get max(){return this.$$.ctx[9]}set max(e){this.$$set({max:e}),m()}get minlength(){return this.$$.ctx[10]}set minlength(e){this.$$set({minlength:e}),m()}get maxlength(){return this.$$.ctx[11]}set maxlength(e){this.$$set({maxlength:e}),m()}}export{D as default};
|
|
498
2
|
//# sourceMappingURL=Textinput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textinput.js","sources":["../../../src/components/textinput/Textinput.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { afterUpdate } from 'svelte';\n import { createEventForwarder } from '../../utilities/EventForward';\n import { EventHandler } from '../../utilities/EventHandler';\n import { get_current_component } from 'svelte/internal';\n\n import type { TextInputSize, TextInputType } from './textinput.types';\n\n export let name: string;\n export let value: string;\n export let placeholder: string;\n export let inputtype: TextInputType = 'text';\n export let isvalid: boolean;\n export let isinvalid: boolean;\n export let disabled = false;\n export let size: TextInputSize = 'm';\n export let iconname: string;\n export let rightalign: boolean;\n export let min: string;\n export let max: string;\n export let minlength: number;\n export let maxlength: number;\n const forwardEvents = createEventForwarder(get_current_component());\n let eventHandler = new EventHandler();\n $: inputType = inputtype;\n $: userClass = $$props.class;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n function generateIconName(iconName: string): string {\n return `${iconName}`;\n }\n\n function getClasses(\n isValid: boolean,\n isInvalid: boolean,\n size: TextInputSize,\n iconname: string,\n ): string {\n const classes = ['mc-text-input', 'mc-field__input'];\n\n if (isValid) {\n classes.push('is-valid');\n }\n\n if (isInvalid) {\n classes.push('is-invalid');\n }\n\n if (size === 's') {\n classes.push('mc-text-input--s');\n }\n\n if (iconname) {\n classes.push('mc-left-icon-input__input');\n }\n\n if (rightalign) {\n classes.push('right-align');\n }\n\n return classes.join(' ');\n }\n\n const setType = (node: any) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n node.type = inputType;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const component: any = get_current_component();\n\n afterUpdate(() => {\n /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment */\n const input = component.shadowRoot.querySelector('.mc-text-input');\n input.type = inputType;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment */\n });\n</script>\n\n<div class=\"{iconname ? 'mc-left-icon-input' : ''} {userClass}\" {...attributes}>\n {#if iconname}\n <span class=\"mc-left-icon-input__icon\">\n {@html `<${generateIconName(iconname)} />`}\n </span>\n {/if}\n <input\n use:forwardEvents\n bind:value\n use:setType\n class=\"{getClasses(isvalid, isinvalid, size, iconname)} {$$props.class}\"\n aria-invalid={isinvalid}\n {name}\n id={name}\n {placeholder}\n {disabled}\n {min}\n {max}\n {minlength}\n {maxlength}\n spellcheck=\"false\"\n on:keydown={(event) => {\n if (event?.key === 'Enter') {\n eventHandler.dispatch('submit-search', value);\n }\n }}\n />\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.text-input';\n @import '@mozaic-ds/styles/components/c.left-icon-input';\n @import '@mozaic-ds/styles/components/c.fields';\n\n .right-align {\n text-align: right;\n }\n</style>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"Textinput.js","sources":["../../../src/components/textinput/Textinput.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { afterUpdate } from 'svelte';\n import { createEventForwarder } from '../../utilities/EventForward';\n import { EventHandler } from '../../utilities/EventHandler';\n import { get_current_component } from 'svelte/internal';\n\n import type { TextInputSize, TextInputType } from './textinput.types';\n\n export let name: string;\n export let value: string;\n export let placeholder: string;\n export let inputtype: TextInputType = 'text';\n export let isvalid: boolean;\n export let isinvalid: boolean;\n export let disabled = false;\n export let size: TextInputSize = 'm';\n export let iconname: string;\n export let rightalign: boolean;\n export let min: string;\n export let max: string;\n export let minlength: number;\n export let maxlength: number;\n const forwardEvents = createEventForwarder(get_current_component());\n let eventHandler = new EventHandler();\n $: inputType = inputtype;\n $: userClass = $$props.class;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n function generateIconName(iconName: string): string {\n return `${iconName}`;\n }\n\n function getClasses(\n isValid: boolean,\n isInvalid: boolean,\n size: TextInputSize,\n iconname: string,\n ): string {\n const classes = ['mc-text-input', 'mc-field__input'];\n\n if (isValid) {\n classes.push('is-valid');\n }\n\n if (isInvalid) {\n classes.push('is-invalid');\n }\n\n if (size === 's') {\n classes.push('mc-text-input--s');\n }\n\n if (iconname) {\n classes.push('mc-left-icon-input__input');\n }\n\n if (rightalign) {\n classes.push('right-align');\n }\n\n return classes.join(' ');\n }\n\n const setType = (node: any) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n node.type = inputType;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const component: any = get_current_component();\n\n afterUpdate(() => {\n /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment */\n const input = component.shadowRoot.querySelector('.mc-text-input');\n input.type = inputType;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment */\n });\n</script>\n\n<div class=\"{iconname ? 'mc-left-icon-input' : ''} {userClass}\" {...attributes}>\n {#if iconname}\n <span class=\"mc-left-icon-input__icon\">\n {@html `<${generateIconName(iconname)} />`}\n </span>\n {/if}\n <input\n use:forwardEvents\n bind:value\n use:setType\n class=\"{getClasses(isvalid, isinvalid, size, iconname)} {$$props.class}\"\n aria-invalid={isinvalid}\n {name}\n id={name}\n {placeholder}\n {disabled}\n {min}\n {max}\n {minlength}\n {maxlength}\n spellcheck=\"false\"\n on:keydown={(event) => {\n if (event?.key === 'Enter') {\n eventHandler.dispatch('submit-search', value);\n }\n }}\n />\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.text-input';\n @import '@mozaic-ds/styles/components/c.left-icon-input';\n @import '@mozaic-ds/styles/components/c.fields';\n\n .right-align {\n text-align: right;\n }\n</style>\n"],"names":["raw_value","generateIconName","ctx","insert","target","span","anchor","dirty","innerHTML","create_if_block","class","div_class_value","div","append","input","iconName","name","$$props","value","placeholder","inputtype","isvalid","isinvalid","disabled","size","iconname","rightalign","min","max","minlength","maxlength","forwardEvents","createEventForwarder","get_current_component","eventHandler","EventHandler","component","afterUpdate","shadowRoot","querySelector","type","inputType","$$invalidate","userClass","attributes","Object","assign","$$restProps","isValid","isInvalid","classes","push","join","node","event","key","dispatch"],"mappings":"iUAoFiBA,EAAA,IAAAC,EAAiBC,EAAQ,gFADtCC,EAEMC,EAAAC,EAAAC,yBADO,IAAAC,GAAAP,KAAAA,EAAA,IAAAC,EAAiBC,EAAQ,YAAAG,EAAAG,UAAAR,qDAFnCE,EAAQ,IAAAO,EAAAP,OADFQ,MAAAC,GAAAT,EAAW,GAAA,qBAAuB,QAAKA,EAAS,KAAOA,EAAU,2HAUlEA,EAAU,IAACA,EAAO,GAAEA,EAAS,GAAEA,EAAI,GAAEA,EAAQ,IAAA,IAAIA,EAAO,IAACQ,0BACnDR,EAAS,8BAEnBA,EAAI,mKAbZC,EA2BKC,EAAAQ,EAAAN,yBArBHO,EAoBCD,EAAAE,yHAzBIZ,EAAQ,0EASHA,EAAU,IAACA,EAAO,GAAEA,EAAS,GAAEA,EAAI,GAAEA,EAAQ,IAAA,IAAIA,EAAO,IAACQ,gDACnDR,EAAS,wCAEnBA,EAAI,+MAbC,KAAAK,GAAAI,KAAAA,GAAAT,EAAW,GAAA,qBAAuB,QAAKA,EAAS,MAAA,CAAAQ,MAAAC,WAAOT,EAAU,kDAnDnE,SAAAD,EAAiBc,YACdA,0MArBDC,GAAYC,SACZC,GAAaD,eACbE,GAAmBF,GACnBG,UAAAA,EAA2B,QAAMH,WACjCI,GAAgBJ,aAChBK,GAAkBL,GAClBM,SAAAA,GAAW,GAAKN,GAChBO,KAAAA,EAAsB,KAAGP,YACzBQ,GAAgBR,cAChBS,GAAmBT,OACnBU,GAAWV,OACXW,GAAWX,aACXY,GAAiBZ,aACjBa,GAAiBb,QACtBc,EAAgBC,EAAqBC,KACvC,IAAAC,MAAmBC,EAwCjB,MAMAC,EAAiBH,IAEvBI,GAAW,KAEKD,EAAUE,WAAWC,cAAc,kBAC3CC,KAAOC,CAAS,0iBAlDrBA,EAAYrB,GACZsB,EAAA,GAAAC,EAAY1B,EAAQP,YACpBkC,EAALC,OAAAC,UAAuBC,4BACXH,EAAWlC,+CAKZ,SACPsC,EACAC,EACAzB,EACAC,SAEMyB,EAAO,CAAI,gBAAiB,0BAE9BF,GACFE,EAAQC,KAAK,YAGXF,GACFC,EAAQC,KAAK,cAGF,MAAT3B,GACF0B,EAAQC,KAAK,oBAGX1B,GACFyB,EAAQC,KAAK,6BAGXzB,GACFwB,EAAQC,KAAK,eAGRD,EAAQE,KAAK,MAGLC,IAEfA,EAAKb,KAAOC,CAAS,wCAmCRa,IACQ,UAAfA,GAAOC,KACTrB,EAAasB,SAAS,gBAAiBtC"}
|