@maggioli-design-system/mds-input-select 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-input-select.cjs.entry.js +17 -3
- package/dist/cjs/mds-input-select.cjs.js +1 -1
- package/dist/collection/common/slot.js +13 -0
- package/dist/collection/components/mds-input-select/mds-input-select.js +18 -2
- package/dist/collection/dictionary/animation.js +5 -0
- package/dist/collection/dictionary/file-extensions.js +6 -59
- package/dist/collection/fixtures/filenames.js +62 -1
- package/dist/collection/type/animation.js +1 -0
- package/dist/collection/type/variant-file-format.js +5 -0
- package/dist/components/mds-input-select.js +19 -4
- package/dist/documentation.json +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mds-input-select.entry.js +17 -3
- package/dist/esm/mds-input-select.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-input-select.entry.js +1 -1
- package/dist/esm-es5/mds-input-select.js +1 -1
- package/dist/mds-input-select/mds-input-select.esm.js +1 -1
- package/dist/mds-input-select/p-0511e8d9.entry.js +1 -0
- package/dist/mds-input-select/{p-f1804d7b.system.entry.js → p-879b97ee.system.entry.js} +1 -1
- package/dist/mds-input-select/p-ec8a0b02.system.js +1 -1
- package/dist/stats.json +27 -17
- package/dist/types/common/slot.d.ts +2 -0
- package/dist/types/components/mds-input-select/mds-input-select.d.ts +2 -0
- package/dist/types/dictionary/animation.d.ts +2 -0
- package/dist/types/fixtures/filenames.d.ts +62 -1
- package/dist/types/type/animation.d.ts +1 -0
- package/dist/types/type/file-types.d.ts +1 -1
- package/dist/types/type/variant-file-format.d.ts +1 -1
- package/documentation.json +17 -7
- package/package.json +1 -1
- package/src/common/slot.ts +15 -0
- package/src/components/mds-input-select/mds-input-select.tsx +16 -0
- package/src/dictionary/animation.ts +8 -0
- package/src/dictionary/file-extensions.ts +6 -60
- package/src/fixtures/filenames.ts +63 -0
- package/src/fixtures/icons.json +1 -0
- package/src/meta/file-format/locale.el.json +26 -21
- package/src/meta/file-format/locale.en.json +26 -21
- package/src/meta/file-format/locale.es.json +26 -21
- package/src/meta/file-format/locale.it.json +26 -21
- package/src/type/animation.ts +3 -0
- package/src/type/file-types.ts +6 -0
- package/src/type/variant-file-format.ts +6 -0
- package/www/build/mds-input-select.esm.js +1 -1
- package/www/build/p-0511e8d9.entry.js +1 -0
- package/www/build/{p-f1804d7b.system.entry.js → p-879b97ee.system.entry.js} +1 -1
- package/www/build/p-ec8a0b02.system.js +1 -1
- package/dist/mds-input-select/p-99fd6ce0.entry.js +0 -1
- package/www/build/p-99fd6ce0.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["mds-input-select.cjs",[[65,"mds-input-select",{"autocomplete":[513],"autoFocus":[516,"auto-focus"],"placeholder":[513],"name":[513],"disabled":[516],"required":[516],"multiple":[516],"size":[514],"value":[520],"variant":[513],"selected":[32],"hasFocus":[32]},null,{"value":["valueChanged"]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["mds-input-select.cjs",[[65,"mds-input-select",{"autocomplete":[513],"autoFocus":[516,"auto-focus"],"placeholder":[513],"name":[513],"disabled":[516],"required":[516],"multiple":[516],"size":[514],"value":[520],"variant":[513],"selected":[32],"hasFocus":[32]},null,{"value":["valueChanged"],"disabled":["disabledChanged"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -102,6 +102,19 @@ const MdsInputSelect = class {
|
|
|
102
102
|
this.changeEvent.emit({ value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString() });
|
|
103
103
|
this.internals.setFormValue((_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : null);
|
|
104
104
|
}
|
|
105
|
+
disabledChanged(newValue) {
|
|
106
|
+
/**
|
|
107
|
+
* This is related to ALL disabled attributes set on Magma input components
|
|
108
|
+
* if solved, please check mds-button, mds-input, mds-input-*
|
|
109
|
+
* https://github.com/ionic-team/stencil/issues/5461
|
|
110
|
+
*/
|
|
111
|
+
if (newValue) {
|
|
112
|
+
this.internals.setFormValue(null);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
formResetCallback() {
|
|
116
|
+
this.internals.setFormValue('');
|
|
117
|
+
}
|
|
105
118
|
componentDidLoad() {
|
|
106
119
|
if (this.value) {
|
|
107
120
|
this.selected = true;
|
|
@@ -109,13 +122,14 @@ const MdsInputSelect = class {
|
|
|
109
122
|
}
|
|
110
123
|
}
|
|
111
124
|
render() {
|
|
112
|
-
return (index.h(index.Host, { key: '
|
|
113
|
-
index.h("mds-input-tip-item", { key: '
|
|
125
|
+
return (index.h(index.Host, { key: '4530b7a0bc9da6176b222477f7cf41aceaf380f3' }, index.h("select", { key: '6f190cc6924b5f0da6f9703c10eec1e0c55e3360', class: clsx('input', this.selected && 'input--selected'), onInput: this.onInput.bind(this), onBlur: this.onBlur, onFocus: this.onFocus, name: this.name, required: this.required, disabled: this.disabled, multiple: this.multiple, size: this.size, part: "select" }, this.placeholder && index.h("option", { key: 'fca8a6450fb9c1ee9b66efc9b24f7a346673b3c6', value: "", disabled: true, selected: true }, this.placeholder)), index.h("div", { key: '557463d7c2cc90f451fd9d18a9df7745352c29dd', class: "icon-container" }, index.h("i", { key: '3b5cd0ddcd86d9ac2dd16717d3536f7daff4a48c', class: "icon", innerHTML: miBaselineKeyboardArrowDown })), index.h("div", { key: 'c341322713f8b8e739cb3e5d6a9f1b0a163cfadd', class: "option-container" }, index.h("slot", { key: 'bffb6b7b0a0be6f2f006f2776e03021fd5f59964', onSlotchange: this.onSlotChangeHandler })), index.h("mds-input-tip", { key: 'b8af860a3f766e829fc811fd8b3aba9f5e33394b', position: "top", active: this.hasFocus }, this.disabled && index.h("mds-input-tip-item", { key: 'ec17d9e2e3b3baab7d6307fa31853fa01a7f78fb', expanded: true, variant: "disabled" }), this.required &&
|
|
126
|
+
index.h("mds-input-tip-item", { key: '459e3ba038297693d650405b7af577d4a44505a8', expanded: this.hasFocus, variant: this.value === '' ? 'required' : 'required-success' }))));
|
|
114
127
|
}
|
|
115
128
|
static get formAssociated() { return true; }
|
|
116
129
|
get host() { return index.getElement(this); }
|
|
117
130
|
static get watchers() { return {
|
|
118
|
-
"value": ["valueChanged"]
|
|
131
|
+
"value": ["valueChanged"],
|
|
132
|
+
"disabled": ["disabledChanged"]
|
|
119
133
|
}; }
|
|
120
134
|
};
|
|
121
135
|
MdsInputSelect.style = MdsInputSelectStyle0;
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["mds-input-select.cjs",[[65,"mds-input-select",{"autocomplete":[513],"autoFocus":[516,"auto-focus"],"placeholder":[513],"name":[513],"disabled":[516],"required":[516],"multiple":[516],"size":[514],"value":[520],"variant":[513],"selected":[32],"hasFocus":[32]},null,{"value":["valueChanged"]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["mds-input-select.cjs",[[65,"mds-input-select",{"autocomplete":[513],"autoFocus":[516,"auto-focus"],"placeholder":[513],"name":[513],"disabled":[516],"required":[516],"multiple":[516],"size":[514],"value":[520],"variant":[513],"selected":[32],"hasFocus":[32]},null,{"value":["valueChanged"],"disabled":["disabledChanged"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const hasSlottedElements = (el, name) => {
|
|
2
|
+
var _a;
|
|
3
|
+
let query = 'slot';
|
|
4
|
+
if (name) {
|
|
5
|
+
query = `slot[name=${name}]`;
|
|
6
|
+
}
|
|
7
|
+
const slot = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(query);
|
|
8
|
+
if (slot) {
|
|
9
|
+
return slot.assignedNodes().length > 0;
|
|
10
|
+
}
|
|
11
|
+
return false;
|
|
12
|
+
};
|
|
13
|
+
export { hasSlottedElements, };
|
|
@@ -86,6 +86,19 @@ export class MdsInputSelect {
|
|
|
86
86
|
this.changeEvent.emit({ value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString() });
|
|
87
87
|
this.internals.setFormValue((_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : null);
|
|
88
88
|
}
|
|
89
|
+
disabledChanged(newValue) {
|
|
90
|
+
/**
|
|
91
|
+
* This is related to ALL disabled attributes set on Magma input components
|
|
92
|
+
* if solved, please check mds-button, mds-input, mds-input-*
|
|
93
|
+
* https://github.com/ionic-team/stencil/issues/5461
|
|
94
|
+
*/
|
|
95
|
+
if (newValue) {
|
|
96
|
+
this.internals.setFormValue(null);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
formResetCallback() {
|
|
100
|
+
this.internals.setFormValue('');
|
|
101
|
+
}
|
|
89
102
|
componentDidLoad() {
|
|
90
103
|
if (this.value) {
|
|
91
104
|
this.selected = true;
|
|
@@ -93,8 +106,8 @@ export class MdsInputSelect {
|
|
|
93
106
|
}
|
|
94
107
|
}
|
|
95
108
|
render() {
|
|
96
|
-
return (h(Host, { key: '
|
|
97
|
-
h("mds-input-tip-item", { key: '
|
|
109
|
+
return (h(Host, { key: '4530b7a0bc9da6176b222477f7cf41aceaf380f3' }, h("select", { key: '6f190cc6924b5f0da6f9703c10eec1e0c55e3360', class: clsx('input', this.selected && 'input--selected'), onInput: this.onInput.bind(this), onBlur: this.onBlur, onFocus: this.onFocus, name: this.name, required: this.required, disabled: this.disabled, multiple: this.multiple, size: this.size, part: "select" }, this.placeholder && h("option", { key: 'fca8a6450fb9c1ee9b66efc9b24f7a346673b3c6', value: "", disabled: true, selected: true }, this.placeholder)), h("div", { key: '557463d7c2cc90f451fd9d18a9df7745352c29dd', class: "icon-container" }, h("i", { key: '3b5cd0ddcd86d9ac2dd16717d3536f7daff4a48c', class: "icon", innerHTML: miBaselineKeyboardArrowDown })), h("div", { key: 'c341322713f8b8e739cb3e5d6a9f1b0a163cfadd', class: "option-container" }, h("slot", { key: 'bffb6b7b0a0be6f2f006f2776e03021fd5f59964', onSlotchange: this.onSlotChangeHandler })), h("mds-input-tip", { key: 'b8af860a3f766e829fc811fd8b3aba9f5e33394b', position: "top", active: this.hasFocus }, this.disabled && h("mds-input-tip-item", { key: 'ec17d9e2e3b3baab7d6307fa31853fa01a7f78fb', expanded: true, variant: "disabled" }), this.required &&
|
|
110
|
+
h("mds-input-tip-item", { key: '459e3ba038297693d650405b7af577d4a44505a8', expanded: this.hasFocus, variant: this.value === '' ? 'required' : 'required-success' }))));
|
|
98
111
|
}
|
|
99
112
|
static get is() { return "mds-input-select"; }
|
|
100
113
|
static get encapsulation() { return "shadow"; }
|
|
@@ -329,6 +342,9 @@ export class MdsInputSelect {
|
|
|
329
342
|
return [{
|
|
330
343
|
"propName": "value",
|
|
331
344
|
"methodName": "valueChanged"
|
|
345
|
+
}, {
|
|
346
|
+
"propName": "disabled",
|
|
347
|
+
"methodName": "disabledChanged"
|
|
332
348
|
}];
|
|
333
349
|
}
|
|
334
350
|
static get attachInternalsMemberName() { return "internals"; }
|
|
@@ -14,8 +14,8 @@ const fileExtensionsDictionary = {
|
|
|
14
14
|
exe: { format: 'executable', description: 'fileEXE' },
|
|
15
15
|
flac: { format: 'audio', description: 'uncompressedAudio' },
|
|
16
16
|
gif: { format: 'image', description: 'compressedImage', preview: true },
|
|
17
|
-
htm: { format: 'markup', description: 'documentWeb' },
|
|
18
17
|
heic: { format: 'image', description: 'imageHEFF' },
|
|
18
|
+
htm: { format: 'markup', description: 'documentWeb' },
|
|
19
19
|
html: { format: 'markup', description: 'documentWeb' },
|
|
20
20
|
jpe: { format: 'image', description: 'compressedImage', preview: true },
|
|
21
21
|
jpeg: { format: 'image', description: 'compressedImage', preview: true },
|
|
@@ -32,9 +32,12 @@ const fileExtensionsDictionary = {
|
|
|
32
32
|
mpg4: { format: 'video', description: 'videoSD' },
|
|
33
33
|
mpg: { format: 'video', description: 'videoSD' },
|
|
34
34
|
mpga: { format: 'audio', description: 'compressedAudio' },
|
|
35
|
+
odf: { format: 'document', description: 'openDocumentFormat' },
|
|
35
36
|
odp: { format: 'slide', description: 'slideLO' },
|
|
36
37
|
ods: { format: 'spreadsheet', description: 'spreadsheetLO' },
|
|
37
38
|
odt: { format: 'text', description: 'documentLO' },
|
|
39
|
+
ole: { format: 'document', description: 'objectLinkingAndEmbedding' },
|
|
40
|
+
p7m: { format: 'certificate', description: 'documentDigitalSingnature' },
|
|
38
41
|
pdf: { format: 'document', description: 'documentAdobe' },
|
|
39
42
|
php: { format: 'code', description: 'filePHP' },
|
|
40
43
|
png: { format: 'image', description: 'imagePNG', preview: true },
|
|
@@ -47,6 +50,7 @@ const fileExtensionsDictionary = {
|
|
|
47
50
|
tar: { format: 'archive', description: 'uncompressedArchive' },
|
|
48
51
|
tiff: { format: 'image', description: 'imageTIFF' },
|
|
49
52
|
ts: { format: 'code', description: 'fileTS' },
|
|
53
|
+
tsd: { format: 'certificate', description: 'certificateTSD' },
|
|
50
54
|
tsx: { format: 'code', description: 'fileTSX' },
|
|
51
55
|
txt: { format: 'text', description: 'documentTXT' },
|
|
52
56
|
wav: { format: 'audio', description: 'uncompressedAudio' },
|
|
@@ -54,66 +58,9 @@ const fileExtensionsDictionary = {
|
|
|
54
58
|
xar: { format: 'archive', description: 'compressedArchive' },
|
|
55
59
|
xls: { format: 'spreadsheet', description: 'spreadsheetMS' },
|
|
56
60
|
xlsx: { format: 'spreadsheet', description: 'spreadsheetMS' },
|
|
61
|
+
xml: { format: 'markup', description: 'extensibleMarkupLanguage' },
|
|
57
62
|
zip: { format: 'archive', description: 'compressedArchive' },
|
|
58
63
|
};
|
|
59
|
-
// const fileExtensionsDictionary: FileExtenstion = {
|
|
60
|
-
// '7z': { format: 'archive', description: 'Archivio compresso' },
|
|
61
|
-
// ace: { format: 'archive', description: 'Archivio compresso' },
|
|
62
|
-
// ai: { format: 'vector', description: 'Vettoriale Adobe Illustrator' },
|
|
63
|
-
// dart: { format: 'code', description: 'Dart' },
|
|
64
|
-
// db: { format: 'data', description: 'File di database' },
|
|
65
|
-
// default: { format: 'attachment', description: 'Formato sconosciuto' },
|
|
66
|
-
// dmg: { format: 'executable', description: 'Apple Disk Image' },
|
|
67
|
-
// doc: { format: 'text', description: 'Documento Microsoft Word' },
|
|
68
|
-
// docm: { format: 'text', description: 'Documento Microsoft Word' },
|
|
69
|
-
// docx: { format: 'text', description: 'Documento Microsoft Word Compresso' },
|
|
70
|
-
// eml: { format: 'email', description: 'E-mail di posta elettronica' },
|
|
71
|
-
// eps: { format: 'vector', description: 'Vettoriale Corel Draw' },
|
|
72
|
-
// exe: { format: 'executable', description: 'File eseguibile Windows' },
|
|
73
|
-
// flac: { format: 'audio', description: 'Audio non compresso' },
|
|
74
|
-
// gif: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
75
|
-
// htm: { format: 'markup', description: 'Pagina web' },
|
|
76
|
-
// heic: { format: 'image', description: 'High Efficiency Image File Format' },
|
|
77
|
-
// html: { format: 'markup', description: 'Pagina web' },
|
|
78
|
-
// jpe: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
79
|
-
// jpeg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
80
|
-
// jpg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
81
|
-
// js: { format: 'code', description: 'JavaScript' },
|
|
82
|
-
// json: { format: 'data', description: 'JavaScript Object Notation' },
|
|
83
|
-
// jsx: { format: 'code', description: 'JavaScript' },
|
|
84
|
-
// m2v: { format: 'video', description: 'Filmato SD' },
|
|
85
|
-
// mp2: { format: 'audio', description: 'Audio compresso' },
|
|
86
|
-
// mp3: { format: 'audio', description: 'Audio compresso' },
|
|
87
|
-
// mp4: { format: 'video', description: 'Filmato HD' },
|
|
88
|
-
// mp4v: { format: 'video', description: 'Filmato HD' },
|
|
89
|
-
// mpeg: { format: 'video', description: 'Filmato SD' },
|
|
90
|
-
// mpg4: { format: 'video', description: 'Filmato SD' },
|
|
91
|
-
// mpg: { format: 'video', description: 'Filmato SD' },
|
|
92
|
-
// mpga: { format: 'audio', description: 'Audio compresso' },
|
|
93
|
-
// odp: { format: 'slide', description: 'Slide di presentazione LibreOffice' },
|
|
94
|
-
// ods: { format: 'spreadsheet', description: 'Foglio di calcolo LibreOffice' },
|
|
95
|
-
// odt: { format: 'text', description: 'File di testo LibreOffice' },
|
|
96
|
-
// pdf: { format: 'document', description: 'Documento Adobe' },
|
|
97
|
-
// php: { format: 'code', description: 'Hypertext Preprocessor' },
|
|
98
|
-
// png: { format: 'image', description: 'Immagine Portable Network Graphics', preview: true },
|
|
99
|
-
// ppt: { format: 'slide', description: 'Slide di presentazione PowerPoint' },
|
|
100
|
-
// rar: { format: 'archive', description: 'Archivio compresso' },
|
|
101
|
-
// rtf: { format: 'text', description: 'Documento di testo Rich Text Format' },
|
|
102
|
-
// sass: { format: 'code', description: 'Syntactically Awesome StyleSheets' },
|
|
103
|
-
// shtml: { format: 'markup', description: 'Pagina web' },
|
|
104
|
-
// svg: { format: 'vector', description: 'Scalable Vector Graphics', preview: true },
|
|
105
|
-
// tar: { format: 'archive', description: 'Archivio non compresso' },
|
|
106
|
-
// tiff: { format: 'image', description: 'Tag Image File Format' },
|
|
107
|
-
// ts: { format: 'code', description: 'TypeScript' },
|
|
108
|
-
// tsx: { format: 'code', description: 'TypeScript Extended Syntax' },
|
|
109
|
-
// txt: { format: 'text', description: 'Documento di testo non formattato' },
|
|
110
|
-
// wav: { format: 'audio', description: 'Audio non compresso' },
|
|
111
|
-
// webp: { format: 'image', description: 'Immagine Web Picture', preview: true },
|
|
112
|
-
// xar: { format: 'archive', description: 'Archivio compresso' },
|
|
113
|
-
// xls: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
114
|
-
// xlsx: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
115
|
-
// zip: { format: 'archive', description: 'Archivio compresso' },
|
|
116
|
-
// }
|
|
117
64
|
const genericMimeToExt = new Map([
|
|
118
65
|
['image', ['.png', '.jpg', '.jpeg', '.tiff', '.webp', '.jpe', '.gif', '.heic']],
|
|
119
66
|
['audio', ['.mp2', '.mp3', '.mpga', '.wav', '.flac']],
|
|
@@ -54,4 +54,65 @@ const filesList = [
|
|
|
54
54
|
'wisconsin_bypassing_small.xar',
|
|
55
55
|
'wooden.jsx',
|
|
56
56
|
];
|
|
57
|
-
|
|
57
|
+
const namedFilesList = {
|
|
58
|
+
'7z': 'frozen_haptic.7z',
|
|
59
|
+
'No extension file': 'this_is_an_extensionless_file',
|
|
60
|
+
'png with URL': 'https://i2.wp.com/clipart.info/images/ccovers/1495750818Apple-PNG-Clip-Art.png',
|
|
61
|
+
ace: 'sky_marketing.ace',
|
|
62
|
+
ai: 'foreground_overriding.ai',
|
|
63
|
+
db: 'matrix_black_hat.db',
|
|
64
|
+
default: 'copying.default',
|
|
65
|
+
dmg: 'protocol_designer.dmg',
|
|
66
|
+
doc: 'forges.doc',
|
|
67
|
+
docm: 'officer_somalia.docm',
|
|
68
|
+
docx: 'upgradable_gold.docx',
|
|
69
|
+
eml: 'brunei_logistical.eml',
|
|
70
|
+
eps: 'alarm_circuit_plastic.eps',
|
|
71
|
+
exe: 'rss_systematic_avon.exe',
|
|
72
|
+
flac: 'liaison_panel_central.flac',
|
|
73
|
+
gif: 'initiatives_group.gif',
|
|
74
|
+
htm: 'books_monetize_arizona.htm',
|
|
75
|
+
html: 'flexibility_auto_money.html',
|
|
76
|
+
jpe: 'intelligent_radical.jpe',
|
|
77
|
+
jpeg: 'iowa_installation.jpeg',
|
|
78
|
+
jpg: 'buckinghamshire_macao.jpg',
|
|
79
|
+
js: 'monitor.js',
|
|
80
|
+
json: 'calculating.json',
|
|
81
|
+
jsx: 'wooden.jsx',
|
|
82
|
+
m2v: 'interface_bedfordshire_solid.m2v',
|
|
83
|
+
mp2: 'explicit.mp2',
|
|
84
|
+
mp3: 'optimization_radical.mp3',
|
|
85
|
+
mp4: 'nebraska.mp4',
|
|
86
|
+
mp4v: 'reduced_regional_greenland.mp4v',
|
|
87
|
+
mpeg: 'impactful_alarm_handmade.mpeg',
|
|
88
|
+
mpg4: 'revolutionize.mpg4',
|
|
89
|
+
mpg: 'complexity_deposit.mpg',
|
|
90
|
+
mpga: 'ports_copy_granite.mpga',
|
|
91
|
+
odf: 'This is a file_to_read.odf',
|
|
92
|
+
odp: 'needs_based_solid.odp',
|
|
93
|
+
ods: 'compressing_black_colorado.ods',
|
|
94
|
+
odt: 'salad_compressing.odt',
|
|
95
|
+
ole: 'Document-RPF_Open-new.ole',
|
|
96
|
+
p7m: 'file with certificate from government.pdf.p7m',
|
|
97
|
+
pdf: 'connect_local_visualize.pdf',
|
|
98
|
+
php: 'fish.php',
|
|
99
|
+
png: 'awesome_orchestration.png',
|
|
100
|
+
ppt: 'gorgeous_manager_savings.ppt',
|
|
101
|
+
rar: 'unbranded.rar',
|
|
102
|
+
rtf: 'pound.rtf',
|
|
103
|
+
sass: 'open_source_gorgeous.sass',
|
|
104
|
+
shtml: 'brand.shtml',
|
|
105
|
+
svg: 'b2c_tan_sports.svg',
|
|
106
|
+
tar: 'graphic_frozen_bedfordshire.tar',
|
|
107
|
+
ts: 'forge_face.ts',
|
|
108
|
+
tsd: 'Marked file-7483274hy6Fg6R8.tsd',
|
|
109
|
+
txt: 'bedfordshire_iceland_identity.txt',
|
|
110
|
+
wav: 'synergistic.wav',
|
|
111
|
+
webp: 'open_source.webp',
|
|
112
|
+
xar: 'wisconsin_bypassing_small.xar',
|
|
113
|
+
xls: 'metrics_lempira_account.xls',
|
|
114
|
+
xlsx: 'hdd_navigate_panama.xlsx',
|
|
115
|
+
xml: 'Markup language.xml',
|
|
116
|
+
zip: 'tuna_table_fall.zip',
|
|
117
|
+
};
|
|
118
|
+
export { filesList, namedFilesList, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,6 +3,7 @@ import baselineAttachFile from "@icon/mi/baseline/attach-file.svg";
|
|
|
3
3
|
import baselineAudiotrack from "@icon/mi/baseline/audiotrack.svg";
|
|
4
4
|
import baselineTerminal from "@icon/mi/baseline/terminal.svg";
|
|
5
5
|
import baselineInsertDriveFile from "@icon/mi/baseline/insert-drive-file.svg";
|
|
6
|
+
import mdiLicense from "@icon/mdi/license.svg";
|
|
6
7
|
import mdiHardDisk from "@icon/mdi/harddisk.svg";
|
|
7
8
|
import baselineEmail from "@icon/mi/baseline/email.svg";
|
|
8
9
|
import baselineWysiwyg from "@icon/mi/baseline/wysiwyg.svg";
|
|
@@ -26,6 +27,10 @@ const fileFormatsVariant = {
|
|
|
26
27
|
icon: baselineAudiotrack,
|
|
27
28
|
variant: 'violet',
|
|
28
29
|
},
|
|
30
|
+
certificate: {
|
|
31
|
+
icon: mdiLicense,
|
|
32
|
+
variant: 'orange',
|
|
33
|
+
},
|
|
29
34
|
code: {
|
|
30
35
|
icon: baselineTerminal,
|
|
31
36
|
variant: 'yellow',
|
|
@@ -94,6 +94,19 @@ const MdsInputSelect$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputSelect e
|
|
|
94
94
|
this.changeEvent.emit({ value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString() });
|
|
95
95
|
this.internals.setFormValue((_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : null);
|
|
96
96
|
}
|
|
97
|
+
disabledChanged(newValue) {
|
|
98
|
+
/**
|
|
99
|
+
* This is related to ALL disabled attributes set on Magma input components
|
|
100
|
+
* if solved, please check mds-button, mds-input, mds-input-*
|
|
101
|
+
* https://github.com/ionic-team/stencil/issues/5461
|
|
102
|
+
*/
|
|
103
|
+
if (newValue) {
|
|
104
|
+
this.internals.setFormValue(null);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
formResetCallback() {
|
|
108
|
+
this.internals.setFormValue('');
|
|
109
|
+
}
|
|
97
110
|
componentDidLoad() {
|
|
98
111
|
if (this.value) {
|
|
99
112
|
this.selected = true;
|
|
@@ -101,13 +114,14 @@ const MdsInputSelect$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputSelect e
|
|
|
101
114
|
}
|
|
102
115
|
}
|
|
103
116
|
render() {
|
|
104
|
-
return (h(Host, { key: '
|
|
105
|
-
h("mds-input-tip-item", { key: '
|
|
117
|
+
return (h(Host, { key: '4530b7a0bc9da6176b222477f7cf41aceaf380f3' }, h("select", { key: '6f190cc6924b5f0da6f9703c10eec1e0c55e3360', class: clsx('input', this.selected && 'input--selected'), onInput: this.onInput.bind(this), onBlur: this.onBlur, onFocus: this.onFocus, name: this.name, required: this.required, disabled: this.disabled, multiple: this.multiple, size: this.size, part: "select" }, this.placeholder && h("option", { key: 'fca8a6450fb9c1ee9b66efc9b24f7a346673b3c6', value: "", disabled: true, selected: true }, this.placeholder)), h("div", { key: '557463d7c2cc90f451fd9d18a9df7745352c29dd', class: "icon-container" }, h("i", { key: '3b5cd0ddcd86d9ac2dd16717d3536f7daff4a48c', class: "icon", innerHTML: miBaselineKeyboardArrowDown })), h("div", { key: 'c341322713f8b8e739cb3e5d6a9f1b0a163cfadd', class: "option-container" }, h("slot", { key: 'bffb6b7b0a0be6f2f006f2776e03021fd5f59964', onSlotchange: this.onSlotChangeHandler })), h("mds-input-tip", { key: 'b8af860a3f766e829fc811fd8b3aba9f5e33394b', position: "top", active: this.hasFocus }, this.disabled && h("mds-input-tip-item", { key: 'ec17d9e2e3b3baab7d6307fa31853fa01a7f78fb', expanded: true, variant: "disabled" }), this.required &&
|
|
118
|
+
h("mds-input-tip-item", { key: '459e3ba038297693d650405b7af577d4a44505a8', expanded: this.hasFocus, variant: this.value === '' ? 'required' : 'required-success' }))));
|
|
106
119
|
}
|
|
107
120
|
static get formAssociated() { return true; }
|
|
108
121
|
get host() { return this; }
|
|
109
122
|
static get watchers() { return {
|
|
110
|
-
"value": ["valueChanged"]
|
|
123
|
+
"value": ["valueChanged"],
|
|
124
|
+
"disabled": ["disabledChanged"]
|
|
111
125
|
}; }
|
|
112
126
|
static get style() { return MdsInputSelectStyle0; }
|
|
113
127
|
}, [65, "mds-input-select", {
|
|
@@ -124,7 +138,8 @@ const MdsInputSelect$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputSelect e
|
|
|
124
138
|
"selected": [32],
|
|
125
139
|
"hasFocus": [32]
|
|
126
140
|
}, undefined, {
|
|
127
|
-
"value": ["valueChanged"]
|
|
141
|
+
"value": ["valueChanged"],
|
|
142
|
+
"disabled": ["disabledChanged"]
|
|
128
143
|
}]);
|
|
129
144
|
function defineCustomElement$1() {
|
|
130
145
|
if (typeof customElements === "undefined") {
|
package/dist/documentation.json
CHANGED
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["mds-input-select",[[65,"mds-input-select",{"autocomplete":[513],"autoFocus":[516,"auto-focus"],"placeholder":[513],"name":[513],"disabled":[516],"required":[516],"multiple":[516],"size":[514],"value":[520],"variant":[513],"selected":[32],"hasFocus":[32]},null,{"value":["valueChanged"]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["mds-input-select",[[65,"mds-input-select",{"autocomplete":[513],"autoFocus":[516,"auto-focus"],"placeholder":[513],"name":[513],"disabled":[516],"required":[516],"multiple":[516],"size":[514],"value":[520],"variant":[513],"selected":[32],"hasFocus":[32]},null,{"value":["valueChanged"],"disabled":["disabledChanged"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -98,6 +98,19 @@ const MdsInputSelect = class {
|
|
|
98
98
|
this.changeEvent.emit({ value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString() });
|
|
99
99
|
this.internals.setFormValue((_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : null);
|
|
100
100
|
}
|
|
101
|
+
disabledChanged(newValue) {
|
|
102
|
+
/**
|
|
103
|
+
* This is related to ALL disabled attributes set on Magma input components
|
|
104
|
+
* if solved, please check mds-button, mds-input, mds-input-*
|
|
105
|
+
* https://github.com/ionic-team/stencil/issues/5461
|
|
106
|
+
*/
|
|
107
|
+
if (newValue) {
|
|
108
|
+
this.internals.setFormValue(null);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
formResetCallback() {
|
|
112
|
+
this.internals.setFormValue('');
|
|
113
|
+
}
|
|
101
114
|
componentDidLoad() {
|
|
102
115
|
if (this.value) {
|
|
103
116
|
this.selected = true;
|
|
@@ -105,13 +118,14 @@ const MdsInputSelect = class {
|
|
|
105
118
|
}
|
|
106
119
|
}
|
|
107
120
|
render() {
|
|
108
|
-
return (h(Host, { key: '
|
|
109
|
-
h("mds-input-tip-item", { key: '
|
|
121
|
+
return (h(Host, { key: '4530b7a0bc9da6176b222477f7cf41aceaf380f3' }, h("select", { key: '6f190cc6924b5f0da6f9703c10eec1e0c55e3360', class: clsx('input', this.selected && 'input--selected'), onInput: this.onInput.bind(this), onBlur: this.onBlur, onFocus: this.onFocus, name: this.name, required: this.required, disabled: this.disabled, multiple: this.multiple, size: this.size, part: "select" }, this.placeholder && h("option", { key: 'fca8a6450fb9c1ee9b66efc9b24f7a346673b3c6', value: "", disabled: true, selected: true }, this.placeholder)), h("div", { key: '557463d7c2cc90f451fd9d18a9df7745352c29dd', class: "icon-container" }, h("i", { key: '3b5cd0ddcd86d9ac2dd16717d3536f7daff4a48c', class: "icon", innerHTML: miBaselineKeyboardArrowDown })), h("div", { key: 'c341322713f8b8e739cb3e5d6a9f1b0a163cfadd', class: "option-container" }, h("slot", { key: 'bffb6b7b0a0be6f2f006f2776e03021fd5f59964', onSlotchange: this.onSlotChangeHandler })), h("mds-input-tip", { key: 'b8af860a3f766e829fc811fd8b3aba9f5e33394b', position: "top", active: this.hasFocus }, this.disabled && h("mds-input-tip-item", { key: 'ec17d9e2e3b3baab7d6307fa31853fa01a7f78fb', expanded: true, variant: "disabled" }), this.required &&
|
|
122
|
+
h("mds-input-tip-item", { key: '459e3ba038297693d650405b7af577d4a44505a8', expanded: this.hasFocus, variant: this.value === '' ? 'required' : 'required-success' }))));
|
|
110
123
|
}
|
|
111
124
|
static get formAssociated() { return true; }
|
|
112
125
|
get host() { return getElement(this); }
|
|
113
126
|
static get watchers() { return {
|
|
114
|
-
"value": ["valueChanged"]
|
|
127
|
+
"value": ["valueChanged"],
|
|
128
|
+
"disabled": ["disabledChanged"]
|
|
115
129
|
}; }
|
|
116
130
|
};
|
|
117
131
|
MdsInputSelect.style = MdsInputSelectStyle0;
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["mds-input-select",[[65,"mds-input-select",{"autocomplete":[513],"autoFocus":[516,"auto-focus"],"placeholder":[513],"name":[513],"disabled":[516],"required":[516],"multiple":[516],"size":[514],"value":[520],"variant":[513],"selected":[32],"hasFocus":[32]},null,{"value":["valueChanged"]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["mds-input-select",[[65,"mds-input-select",{"autocomplete":[513],"autoFocus":[516,"auto-focus"],"placeholder":[513],"name":[513],"disabled":[516],"required":[516],"multiple":[516],"size":[514],"value":[520],"variant":[513],"selected":[32],"hasFocus":[32]},null,{"value":["valueChanged"],"disabled":["disabledChanged"]}]]]], options);
|
|
20
20
|
});
|
package/dist/esm-es5/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(a,u)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(e){return function(t){return c([e,t])}}function c(u){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(n=0)),n)try{if(r=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;i=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1];o=u;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(u);break}if(o[2])n.ops.pop();n.trys.pop();continue}u=t.call(e,n)}catch(e){u=[6,e];i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{b as bootstrapLazy}from"./index-f99575c3.js";export{s as setNonce}from"./index-f99575c3.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";var defineCustomElements=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(typeof window==="undefined")return[2,undefined];return[4,globalScripts()];case 1:e.sent();return[2,bootstrapLazy([["mds-input-select",[[65,"mds-input-select",{autocomplete:[513],autoFocus:[516,"auto-focus"],placeholder:[513],name:[513],disabled:[516],required:[516],multiple:[516],size:[514],value:[520],variant:[513],selected:[32],hasFocus:[32]},null,{value:["valueChanged"],disabled:["disabledChanged"]}]]]],t)]}}))}))};export{defineCustomElements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-f99575c3.js";function r(n){var t,o,e="";if("string"==typeof n||"number"==typeof n)e+=n;else if("object"==typeof n)if(Array.isArray(n)){var i=n.length;for(t=0;t<i;t++)n[t]&&(o=r(n[t]))&&(e&&(e+=" "),e+=o)}else for(o in n)n[o]&&(e&&(e+=" "),e+=o);return e}function clsx(){for(var n,t,o=0,e="",i=arguments.length;o<i;o++)(n=arguments[o])&&(t=r(n))&&(e&&(e+=" "),e+=t);return e}var miBaselineKeyboardArrowDown='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6l1.41-1.41z"/></svg>';var mdsInputSelectCss='@tailwind components;\n@tailwind utilities;\n\n\n:host{\n\n min-height: 1.5rem;\n\n font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;\n\n font-size: 1rem;\n\n line-height: 1.5rem;\n\n -webkit-font-smoothing: antialiased;\n\n -moz-osx-font-smoothing: grayscale;\n\n --mds-input-select-variant-color: var(--tone-neutral-01);\n --mds-input-select-ring: 0 0 0 1px rgb(var(--mds-input-select-variant-color) / 0.1);\n --mds-input-select-shadow: 0 1px 3px 0 rgb(var(--mds-input-select-variant-color) / 0.1), 0 1px 2px 0 rgb(var(--mds-input-select-variant-color) / 0.06);\n --mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-blur-background-color);\n --mds-input-select-arrow-icon-blur-background-color: transparent;\n --mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color) / 0.5);\n --mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-blur-color);\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--mds-input-select-variant-color) / 0.5);\n --mds-input-select-arrow-icon-hover-color: rgb(var(--mds-input-select-variant-color));\n\n color: rgb(var(--tone-neutral-02));\n display: -ms-flexbox;\n display: flex;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n:host([required]:not([required="false"]):focus-within) .icon {\n -webkit-transform: translate(0.375rem, 0.375rem);\n transform: translate(0.375rem, 0.375rem);\n}\n\n:host(:hover),\n:host(:focus-within) {\n\n --mds-input-select-variant-color: var(--variant-primary-03);\n --mds-input-select-ring: 0 0 0 3px rgb(var(--mds-input-select-variant-color) / 1);\n --mds-input-select-shadow: 0 4px 6px -1px rgb(var(--mds-input-select-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-select-variant-color) / 0.06);\n --mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-hover-background-color);\n --mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-hover-color);\n}\n\n.input{\n\n font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;\n\n font-size: 1rem;\n\n line-height: 1.5rem;\n\n -webkit-font-smoothing: antialiased;\n\n -moz-osx-font-smoothing: grayscale;\n\n margin: 0rem;\n\n min-height: 3rem;\n\n width: 100%;\n\n border-radius: 0.5rem;\n\n padding-top: 0.75rem;\n\n padding-bottom: 0.75rem;\n\n padding-left: 1rem;\n\n padding-right: 3rem;\n\n -webkit-transition-duration: 300ms;\n\n transition-duration: 300ms;\n\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n -webkit-appearance: none;\n\n -moz-appearance: none;\n\n appearance: none;\n background-color: rgb(var(--tone-neutral));\n border: 0;\n -webkit-box-shadow: var(--mds-input-select-ring), var(--mds-input-select-shadow);\n box-shadow: var(--mds-input-select-ring), var(--mds-input-select-shadow);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: rgb(var(--tone-neutral-05));\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-transition-property: background-color, border-color, color, fill, -webkit-box-shadow;\n transition-property: background-color, border-color, color, fill, -webkit-box-shadow;\n transition-property: background-color, border-color, box-shadow, color, fill;\n transition-property: background-color, border-color, box-shadow, color, fill, -webkit-box-shadow;\n}\n\n.input:hover,\n.input:focus{\n\n outline: 2px solid transparent;\n\n outline-offset: 2px;\n\n -webkit-transition-duration: 300ms;\n\n transition-duration: 300ms;\n\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: rgb(var(--tone-neutral-03));\n}\n\n:host([value]:not([value=""])) .input {\n color: rgb(var(--tone-neutral-03));\n}\n\n.input--mds-input-select-selected {\n color: rgb(var(--tone-neutral-02));\n}\n\n.input:disabled {\n background-color: rgb(var(--tone-neutral-09));\n opacity: 1;\n}\n\n:host([disabled]:not([disabled="false"])) {\n pointer-events: none;\n}\n\n:host([disabled]:not([disabled="false"])) .input {\n pointer-events: none;\n}\n\n:host([disabled]:not([disabled="false"])) .icon {\n fill: rgb(var(--tone-neutral-06));\n -webkit-transform: translate(0.625rem, 0.5rem);\n transform: translate(0.625rem, 0.5rem);\n}\n\n.icon-container{\n\n right: 1rem;\n\n height: 3rem;\n\n -ms-flex-align: center;\n\n align-items: center;\n color: inherit;\n display: -ms-flexbox;\n display: flex;\n pointer-events: none;\n position: absolute;\n}\n\n.icon{\n\n display: -ms-flexbox;\n\n display: flex;\n}\n\n.icon svg{\n\n aspect-ratio: 1/1;\n\n height: 100%;\n\n width: 100%;\n}\n\n.icon{\n\n border-radius: 9999px;\n\n -webkit-transition-duration: 200ms;\n\n transition-duration: 200ms;\n\n background-color: var(--mds-input-select-arrow-icon-background-color, rgb(var(--variant-primary-09)));\n fill: var(--mds-input-select-arrow-icon-color, rgb(var(--variant-primary-04)));\n -webkit-transition-property: background-color, fill;\n transition-property: background-color, fill;\n}\n\n.option-container {\n display: none;\n}\n\n@container (max-width: 210px) {\n :host .tip__content,\n :host(:focus-within) .tip__content {\n grid-template-columns: 0fr;\n opacity: 0;\n }\n\n :host .tip {\n padding-left: 0;\n padding-right: 0;\n }\n\n :host {\n\n --mds-input-select-background: rgb(var(--variant-primary-07));\n }\n}\n\n@tailwind utilities;\n\n:host {\n\n --mds-input-select-icon-color: var(--variant-primary-03);\n --mds-input-select-variant-color: 0 0 0;\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--variant-primary-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--variant-primary-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--variant-primary-04));\n}\n\n:host( :hover ),\n:host( :focus-within ) {\n\n --mds-input-select-variant-color: var(--variant-primary-04);\n}\n\n:host( [variant="info"] ) {\n\n --mds-input-select-icon-color: var(--status-info-05);\n --mds-input-select-tip-background: var(--status-info-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-info-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-info-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-info-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-info-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host( [variant="info"]:hover ),\n:host( [variant="info"]:focus-within ) {\n\n --mds-input-select-icon-color: var(--status-info-04);\n --mds-input-select-variant-color: var(--status-info-05);\n}\n\n:host( [variant="success"] ) {\n\n --mds-input-select-icon-color: var(--status-success-05);\n --mds-input-select-tip-background: var(--status-success-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-success-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-success-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-success-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-success-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host( [variant="success"]:hover ),\n:host( [variant="success"]:focus-within ) {\n\n --mds-input-select-icon-color: var(--status-success-04);\n --mds-input-select-variant-color: var(--status-success-05);\n}\n\n:host( [variant="warning"] ) {\n\n --mds-input-select-icon-color: var(--status-warning-05);\n --mds-input-select-tip-background: var(--status-warning-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-warning-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-warning-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-warning-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-warning-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host( [variant="warning"]:hover ),\n:host( [variant="warning"]:focus-within ) {\n\n --mds-input-select-icon-color: var(--status-warning-04);\n --mds-input-select-variant-color: var(--status-warning-05);\n}\n\n:host( [variant="error"] ) {\n\n --mds-input-select-icon-color: var(--status-error-05);\n --mds-input-select-tip-background: var(--status-error-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-error-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-error-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-error-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-error-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host( [variant="error"]:hover ),\n:host( [variant="error"]:focus-within ) {\n\n --mds-input-select-icon-color: var(--status-error-04);\n --mds-input-select-variant-color: var(--status-error-05);\n}\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .input,\n .input:hover,\n .input:focus,\n .icon {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .input,\n .input:hover,\n .input:focus,\n .icon {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-blur-background-color);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-05));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color));\n --mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-blur-color);\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--mds-input-select-variant-color));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--tone-neutral-10));\n }\n\n .input {\n color: rgb(var(--tone-neutral-03));\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-blur-background-color);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-05));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color));\n --mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-blur-color);\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--mds-input-select-variant-color));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--tone-neutral-10));\n }\n\n .input {\n color: rgb(var(--tone-neutral-03));\n }\n }\n}\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);\n }\n\n .input {\n color: rgb(var(--tone-neutral-01));\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);\n }\n\n .input {\n color: rgb(var(--tone-neutral-01));\n }\n }\n}\n\n\n';var MdsInputSelectStyle0=mdsInputSelectCss;var MdsInputSelect=function(){function n(n){var r=this;registerInstance(this,n);this.changeEvent=createEvent(this,"mdsInputSelectChange",7);if(n.$hostElement$["s-ei"]){this.internals=n.$hostElement$["s-ei"]}else{this.internals=n.$hostElement$.attachInternals();n.$hostElement$["s-ei"]=this.internals}this.onInput=function(n){var t=n.target;if(t){r.value=t.value}};this.onBlur=function(){r.hasFocus=false};this.onFocus=function(){r.hasFocus=true};this.emptyOptions=function(){var n;var t=(n=r.host.shadowRoot)===null||n===void 0?void 0:n.querySelector("select");var o=t===null||t===void 0?void 0:t.querySelectorAll("option");if(!o){return}o.forEach((function(n,t){if(!r.placeholder){n.remove()}if(r.placeholder&&t>0){n.remove()}}))};this.onSlotChangeHandler=function(){var n,t,o;var e=(t=(n=r.host.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("slot")[0])===null||t===void 0?void 0:t.assignedNodes();var i=(o=r.host.shadowRoot)===null||o===void 0?void 0:o.querySelector("select");var s=i===null||i===void 0?void 0:i.querySelectorAll("option");if(!s){return}if(!r.placeholder&&s.length>0){r.emptyOptions()}if(r.placeholder&&s.length>1){r.emptyOptions()}e===null||e===void 0?void 0:e.forEach((function(n){i===null||i===void 0?void 0:i.appendChild(n.cloneNode(true))}));if(r.value){i===null||i===void 0?void 0:i.querySelectorAll("option").forEach((function(n){n.selected=n.value===r.value}))}else if(!r.placeholder){r.value=i===null||i===void 0?void 0:i.querySelectorAll("option")[0].value}};this.selected=undefined;this.hasFocus=false;this.autocomplete=undefined;this.autoFocus=undefined;this.placeholder=undefined;this.name=undefined;this.disabled=false;this.required=false;this.multiple=false;this.size=0;this.value="";this.variant=undefined}n.prototype.valueChanged=function(){var n,r,t;this.selected=this.value!=="";this.changeEvent.emit({value:(n=this.value)===null||n===void 0?void 0:n.toString()});this.internals.setFormValue((t=(r=this.value)===null||r===void 0?void 0:r.toString())!==null&&t!==void 0?t:null)};n.prototype.componentDidLoad=function(){if(this.value){this.selected=true;this.internals.setFormValue(this.value.toString())}};n.prototype.render=function(){return h(Host,{key:"81ab7f5b366ae9e842612a276b8efe1d52d21dd0"},h("select",{key:"130119ceb7447ee4f8b80b5a6f7b7ac712c9f347",class:clsx("input",this.selected&&"input--selected"),onInput:this.onInput.bind(this),onBlur:this.onBlur,onFocus:this.onFocus,name:this.name,required:this.required,disabled:this.disabled,multiple:this.multiple,size:this.size,part:"select"},this.placeholder&&h("option",{key:"f56c4a89209571e5f57c0fd9edc5a3fb34e62664",value:"",disabled:true,selected:true},this.placeholder)),h("div",{key:"65564368c9fc116b98a0c9159cf3191e03d49193",class:"icon-container"},h("i",{key:"d35fb6bb42e9ed84f5d7d5a2b432c7da03164eab",class:"icon",innerHTML:miBaselineKeyboardArrowDown})),h("div",{key:"d8515da7da334fbd00ff6df9ee81f8d46cfb6c8c",class:"option-container"},h("slot",{key:"2209933b74c5a1dfab7673eaaaac8e23b8e15a74",onSlotchange:this.onSlotChangeHandler})),h("mds-input-tip",{key:"a794103ca26e4d2312059108448e5d0643edca5d",position:"top",active:this.hasFocus},this.disabled&&h("mds-input-tip-item",{key:"1415ed93d80ad27f2e922ea5c5176f78cf0ffa65",expanded:true,variant:"disabled"}),this.required&&h("mds-input-tip-item",{key:"36807554f81acc5c312835587493b5be0c632157",expanded:this.hasFocus,variant:this.value===""?"required":"required-success"})))};Object.defineProperty(n,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return n}();MdsInputSelect.style=MdsInputSelectStyle0;export{MdsInputSelect as mds_input_select};
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-f99575c3.js";function r(n){var t,o,e="";if("string"==typeof n||"number"==typeof n)e+=n;else if("object"==typeof n)if(Array.isArray(n)){var i=n.length;for(t=0;t<i;t++)n[t]&&(o=r(n[t]))&&(e&&(e+=" "),e+=o)}else for(o in n)n[o]&&(e&&(e+=" "),e+=o);return e}function clsx(){for(var n,t,o=0,e="",i=arguments.length;o<i;o++)(n=arguments[o])&&(t=r(n))&&(e&&(e+=" "),e+=t);return e}var miBaselineKeyboardArrowDown='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6l1.41-1.41z"/></svg>';var mdsInputSelectCss='@tailwind components;\n@tailwind utilities;\n\n\n:host{\n\n min-height: 1.5rem;\n\n font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;\n\n font-size: 1rem;\n\n line-height: 1.5rem;\n\n -webkit-font-smoothing: antialiased;\n\n -moz-osx-font-smoothing: grayscale;\n\n --mds-input-select-variant-color: var(--tone-neutral-01);\n --mds-input-select-ring: 0 0 0 1px rgb(var(--mds-input-select-variant-color) / 0.1);\n --mds-input-select-shadow: 0 1px 3px 0 rgb(var(--mds-input-select-variant-color) / 0.1), 0 1px 2px 0 rgb(var(--mds-input-select-variant-color) / 0.06);\n --mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-blur-background-color);\n --mds-input-select-arrow-icon-blur-background-color: transparent;\n --mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color) / 0.5);\n --mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-blur-color);\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--mds-input-select-variant-color) / 0.5);\n --mds-input-select-arrow-icon-hover-color: rgb(var(--mds-input-select-variant-color));\n\n color: rgb(var(--tone-neutral-02));\n display: -ms-flexbox;\n display: flex;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n:host([required]:not([required="false"]):focus-within) .icon {\n -webkit-transform: translate(0.375rem, 0.375rem);\n transform: translate(0.375rem, 0.375rem);\n}\n\n:host(:hover),\n:host(:focus-within) {\n\n --mds-input-select-variant-color: var(--variant-primary-03);\n --mds-input-select-ring: 0 0 0 3px rgb(var(--mds-input-select-variant-color) / 1);\n --mds-input-select-shadow: 0 4px 6px -1px rgb(var(--mds-input-select-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-select-variant-color) / 0.06);\n --mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-hover-background-color);\n --mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-hover-color);\n}\n\n.input{\n\n font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;\n\n font-size: 1rem;\n\n line-height: 1.5rem;\n\n -webkit-font-smoothing: antialiased;\n\n -moz-osx-font-smoothing: grayscale;\n\n margin: 0rem;\n\n min-height: 3rem;\n\n width: 100%;\n\n border-radius: 0.5rem;\n\n padding-top: 0.75rem;\n\n padding-bottom: 0.75rem;\n\n padding-left: 1rem;\n\n padding-right: 3rem;\n\n -webkit-transition-duration: 300ms;\n\n transition-duration: 300ms;\n\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n -webkit-appearance: none;\n\n -moz-appearance: none;\n\n appearance: none;\n background-color: rgb(var(--tone-neutral));\n border: 0;\n -webkit-box-shadow: var(--mds-input-select-ring), var(--mds-input-select-shadow);\n box-shadow: var(--mds-input-select-ring), var(--mds-input-select-shadow);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: rgb(var(--tone-neutral-05));\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-transition-property: background-color, border-color, color, fill, -webkit-box-shadow;\n transition-property: background-color, border-color, color, fill, -webkit-box-shadow;\n transition-property: background-color, border-color, box-shadow, color, fill;\n transition-property: background-color, border-color, box-shadow, color, fill, -webkit-box-shadow;\n}\n\n.input:hover,\n.input:focus{\n\n outline: 2px solid transparent;\n\n outline-offset: 2px;\n\n -webkit-transition-duration: 300ms;\n\n transition-duration: 300ms;\n\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: rgb(var(--tone-neutral-03));\n}\n\n:host([value]:not([value=""])) .input {\n color: rgb(var(--tone-neutral-03));\n}\n\n.input--mds-input-select-selected {\n color: rgb(var(--tone-neutral-02));\n}\n\n.input:disabled {\n background-color: rgb(var(--tone-neutral-09));\n opacity: 1;\n}\n\n:host([disabled]:not([disabled="false"])) {\n pointer-events: none;\n}\n\n:host([disabled]:not([disabled="false"])) .input {\n pointer-events: none;\n}\n\n:host([disabled]:not([disabled="false"])) .icon {\n fill: rgb(var(--tone-neutral-06));\n -webkit-transform: translate(0.625rem, 0.5rem);\n transform: translate(0.625rem, 0.5rem);\n}\n\n.icon-container{\n\n right: 1rem;\n\n height: 3rem;\n\n -ms-flex-align: center;\n\n align-items: center;\n color: inherit;\n display: -ms-flexbox;\n display: flex;\n pointer-events: none;\n position: absolute;\n}\n\n.icon{\n\n display: -ms-flexbox;\n\n display: flex;\n}\n\n.icon svg{\n\n aspect-ratio: 1/1;\n\n height: 100%;\n\n width: 100%;\n}\n\n.icon{\n\n border-radius: 9999px;\n\n -webkit-transition-duration: 200ms;\n\n transition-duration: 200ms;\n\n background-color: var(--mds-input-select-arrow-icon-background-color, rgb(var(--variant-primary-09)));\n fill: var(--mds-input-select-arrow-icon-color, rgb(var(--variant-primary-04)));\n -webkit-transition-property: background-color, fill;\n transition-property: background-color, fill;\n}\n\n.option-container {\n display: none;\n}\n\n@container (max-width: 210px) {\n :host .tip__content,\n :host(:focus-within) .tip__content {\n grid-template-columns: 0fr;\n opacity: 0;\n }\n\n :host .tip {\n padding-left: 0;\n padding-right: 0;\n }\n\n :host {\n\n --mds-input-select-background: rgb(var(--variant-primary-07));\n }\n}\n\n@tailwind utilities;\n\n:host {\n\n --mds-input-select-icon-color: var(--variant-primary-03);\n --mds-input-select-variant-color: 0 0 0;\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--variant-primary-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--variant-primary-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--variant-primary-04));\n}\n\n:host( :hover ),\n:host( :focus-within ) {\n\n --mds-input-select-variant-color: var(--variant-primary-04);\n}\n\n:host( [variant="info"] ) {\n\n --mds-input-select-icon-color: var(--status-info-05);\n --mds-input-select-tip-background: var(--status-info-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-info-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-info-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-info-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-info-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host( [variant="info"]:hover ),\n:host( [variant="info"]:focus-within ) {\n\n --mds-input-select-icon-color: var(--status-info-04);\n --mds-input-select-variant-color: var(--status-info-05);\n}\n\n:host( [variant="success"] ) {\n\n --mds-input-select-icon-color: var(--status-success-05);\n --mds-input-select-tip-background: var(--status-success-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-success-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-success-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-success-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-success-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host( [variant="success"]:hover ),\n:host( [variant="success"]:focus-within ) {\n\n --mds-input-select-icon-color: var(--status-success-04);\n --mds-input-select-variant-color: var(--status-success-05);\n}\n\n:host( [variant="warning"] ) {\n\n --mds-input-select-icon-color: var(--status-warning-05);\n --mds-input-select-tip-background: var(--status-warning-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-warning-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-warning-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-warning-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-warning-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host( [variant="warning"]:hover ),\n:host( [variant="warning"]:focus-within ) {\n\n --mds-input-select-icon-color: var(--status-warning-04);\n --mds-input-select-variant-color: var(--status-warning-05);\n}\n\n:host( [variant="error"] ) {\n\n --mds-input-select-icon-color: var(--status-error-05);\n --mds-input-select-tip-background: var(--status-error-05);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--status-error-09));\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--status-error-08));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--status-error-06));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--status-error-04));\n --mds-input-select-variant-color: 0 0 0;\n}\n\n:host( [variant="error"]:hover ),\n:host( [variant="error"]:focus-within ) {\n\n --mds-input-select-icon-color: var(--status-error-04);\n --mds-input-select-variant-color: var(--status-error-05);\n}\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .input,\n .input:hover,\n .input:focus,\n .icon {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .input,\n .input:hover,\n .input:focus,\n .icon {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-blur-background-color);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-05));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color));\n --mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-blur-color);\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--mds-input-select-variant-color));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--tone-neutral-10));\n }\n\n .input {\n color: rgb(var(--tone-neutral-03));\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-input-select-arrow-icon-background-color: var(--mds-input-select-arrow-icon-blur-background-color);\n --mds-input-select-arrow-icon-blur-background-color: rgb(var(--variant-primary-05));\n --mds-input-select-arrow-icon-blur-color: rgb(var(--mds-input-select-variant-color));\n --mds-input-select-arrow-icon-color: var(--mds-input-select-arrow-icon-blur-color);\n --mds-input-select-arrow-icon-hover-background-color: rgb(var(--mds-input-select-variant-color));\n --mds-input-select-arrow-icon-hover-color: rgb(var(--tone-neutral-10));\n }\n\n .input {\n color: rgb(var(--tone-neutral-03));\n }\n }\n}\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);\n }\n\n .input {\n color: rgb(var(--tone-neutral-01));\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --mds-input-select-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);\n }\n\n .input {\n color: rgb(var(--tone-neutral-01));\n }\n }\n}\n\n\n';var MdsInputSelectStyle0=mdsInputSelectCss;var MdsInputSelect=function(){function n(n){var r=this;registerInstance(this,n);this.changeEvent=createEvent(this,"mdsInputSelectChange",7);if(n.$hostElement$["s-ei"]){this.internals=n.$hostElement$["s-ei"]}else{this.internals=n.$hostElement$.attachInternals();n.$hostElement$["s-ei"]=this.internals}this.onInput=function(n){var t=n.target;if(t){r.value=t.value}};this.onBlur=function(){r.hasFocus=false};this.onFocus=function(){r.hasFocus=true};this.emptyOptions=function(){var n;var t=(n=r.host.shadowRoot)===null||n===void 0?void 0:n.querySelector("select");var o=t===null||t===void 0?void 0:t.querySelectorAll("option");if(!o){return}o.forEach((function(n,t){if(!r.placeholder){n.remove()}if(r.placeholder&&t>0){n.remove()}}))};this.onSlotChangeHandler=function(){var n,t,o;var e=(t=(n=r.host.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("slot")[0])===null||t===void 0?void 0:t.assignedNodes();var i=(o=r.host.shadowRoot)===null||o===void 0?void 0:o.querySelector("select");var s=i===null||i===void 0?void 0:i.querySelectorAll("option");if(!s){return}if(!r.placeholder&&s.length>0){r.emptyOptions()}if(r.placeholder&&s.length>1){r.emptyOptions()}e===null||e===void 0?void 0:e.forEach((function(n){i===null||i===void 0?void 0:i.appendChild(n.cloneNode(true))}));if(r.value){i===null||i===void 0?void 0:i.querySelectorAll("option").forEach((function(n){n.selected=n.value===r.value}))}else if(!r.placeholder){r.value=i===null||i===void 0?void 0:i.querySelectorAll("option")[0].value}};this.selected=undefined;this.hasFocus=false;this.autocomplete=undefined;this.autoFocus=undefined;this.placeholder=undefined;this.name=undefined;this.disabled=false;this.required=false;this.multiple=false;this.size=0;this.value="";this.variant=undefined}n.prototype.valueChanged=function(){var n,r,t;this.selected=this.value!=="";this.changeEvent.emit({value:(n=this.value)===null||n===void 0?void 0:n.toString()});this.internals.setFormValue((t=(r=this.value)===null||r===void 0?void 0:r.toString())!==null&&t!==void 0?t:null)};n.prototype.disabledChanged=function(n){if(n){this.internals.setFormValue(null)}};n.prototype.formResetCallback=function(){this.internals.setFormValue("")};n.prototype.componentDidLoad=function(){if(this.value){this.selected=true;this.internals.setFormValue(this.value.toString())}};n.prototype.render=function(){return h(Host,{key:"4530b7a0bc9da6176b222477f7cf41aceaf380f3"},h("select",{key:"6f190cc6924b5f0da6f9703c10eec1e0c55e3360",class:clsx("input",this.selected&&"input--selected"),onInput:this.onInput.bind(this),onBlur:this.onBlur,onFocus:this.onFocus,name:this.name,required:this.required,disabled:this.disabled,multiple:this.multiple,size:this.size,part:"select"},this.placeholder&&h("option",{key:"fca8a6450fb9c1ee9b66efc9b24f7a346673b3c6",value:"",disabled:true,selected:true},this.placeholder)),h("div",{key:"557463d7c2cc90f451fd9d18a9df7745352c29dd",class:"icon-container"},h("i",{key:"3b5cd0ddcd86d9ac2dd16717d3536f7daff4a48c",class:"icon",innerHTML:miBaselineKeyboardArrowDown})),h("div",{key:"c341322713f8b8e739cb3e5d6a9f1b0a163cfadd",class:"option-container"},h("slot",{key:"bffb6b7b0a0be6f2f006f2776e03021fd5f59964",onSlotchange:this.onSlotChangeHandler})),h("mds-input-tip",{key:"b8af860a3f766e829fc811fd8b3aba9f5e33394b",position:"top",active:this.hasFocus},this.disabled&&h("mds-input-tip-item",{key:"ec17d9e2e3b3baab7d6307fa31853fa01a7f78fb",expanded:true,variant:"disabled"}),this.required&&h("mds-input-tip-item",{key:"459e3ba038297693d650405b7af577d4a44505a8",expanded:this.hasFocus,variant:this.value===""?"required":"required-success"})))};Object.defineProperty(n,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{value:["valueChanged"],disabled:["disabledChanged"]}},enumerable:false,configurable:true});return n}();MdsInputSelect.style=MdsInputSelectStyle0;export{MdsInputSelect as mds_input_select};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(a,u)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(e){return function(t){return c([e,t])}}function c(u){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(n=0)),n)try{if(r=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;i=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1];o=u;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(u);break}if(o[2])n.ops.pop();n.trys.pop();continue}u=t.call(e,n)}catch(e){u=[6,e];i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{p as promiseResolve,b as bootstrapLazy}from"./index-f99575c3.js";export{s as setNonce}from"./index-f99575c3.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,globalScripts()];case 1:t.sent();return[2,bootstrapLazy([["mds-input-select",[[65,"mds-input-select",{autocomplete:[513],autoFocus:[516,"auto-focus"],placeholder:[513],name:[513],disabled:[516],required:[516],multiple:[516],size:[514],value:[520],variant:[513],selected:[32],hasFocus:[32]},null,{value:["valueChanged"],disabled:["disabledChanged"]}]]]],e)]}}))}))}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-ecf343d4.js";export{s as setNonce}from"./p-ecf343d4.js";import{g as t}from"./p-e1255160.js";(()=>{const a=import.meta.url,s={};return""!==a&&(s.resourcesUrl=new URL(".",a).href),e(s)})().then((async e=>(await t(),a([["p-
|
|
1
|
+
import{p as e,b as a}from"./p-ecf343d4.js";export{s as setNonce}from"./p-ecf343d4.js";import{g as t}from"./p-e1255160.js";(()=>{const a=import.meta.url,s={};return""!==a&&(s.resourcesUrl=new URL(".",a).href),e(s)})().then((async e=>(await t(),a([["p-0511e8d9",[[65,"mds-input-select",{autocomplete:[513],autoFocus:[516,"auto-focus"],placeholder:[513],name:[513],disabled:[516],required:[516],multiple:[516],size:[514],value:[520],variant:[513],selected:[32],hasFocus:[32]},null,{value:["valueChanged"],disabled:["disabledChanged"]}]]]],e))));
|