@maggioli-design-system/mds-input-select 3.0.0 → 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/aria.js +17 -1
- package/dist/collection/common/device.js +6 -0
- package/dist/collection/common/keyboard-manager.js +2 -2
- 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 +61 -56
- package/dist/collection/dictionary/text.js +60 -1
- 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 +29 -17
- package/dist/types/common/aria.d.ts +3 -1
- package/dist/types/common/device.d.ts +2 -0
- 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/dictionary/text.d.ts +3 -1
- 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/text.d.ts +2 -0
- package/dist/types/type/variant-file-format.d.ts +1 -1
- package/documentation.json +25 -10
- package/package.json +2 -2
- package/src/common/aria.ts +22 -2
- package/src/common/device.ts +9 -0
- package/src/common/keyboard-manager.ts +2 -2
- 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 +61 -56
- package/src/dictionary/text.ts +64 -0
- package/src/fixtures/filenames.ts +63 -0
- package/src/fixtures/icons.json +9 -0
- package/src/fixtures/iconsauce.json +5 -0
- package/src/meta/file-format/locale.el.json +44 -0
- package/src/meta/file-format/locale.en.json +44 -0
- package/src/meta/file-format/locale.es.json +44 -0
- package/src/meta/file-format/locale.it.json +44 -0
- package/src/type/animation.ts +3 -0
- package/src/type/file-types.ts +6 -0
- package/src/type/text.ts +59 -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;
|
|
@@ -18,6 +18,22 @@ const setAttributeIfEmpty = (element, attribute, value) => {
|
|
|
18
18
|
element.setAttribute(attribute, value);
|
|
19
19
|
return value;
|
|
20
20
|
};
|
|
21
|
+
const removeAttributesIf = (element, attribute, valueCheck = 'true', cleanAttributes) => {
|
|
22
|
+
if (ifAttribute(element, attribute, valueCheck)) {
|
|
23
|
+
const attributesList = Array.isArray(cleanAttributes) ? cleanAttributes : [cleanAttributes];
|
|
24
|
+
attributesList.forEach(attributeToRemove => {
|
|
25
|
+
element.removeAttribute(attributeToRemove);
|
|
26
|
+
});
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
};
|
|
31
|
+
const ifAttribute = (element, attribute, valueCheck = 'true') => {
|
|
32
|
+
if (element.hasAttribute(attribute) && element.getAttribute(attribute) === valueCheck) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
};
|
|
21
37
|
const hashValue = (value) => `${value}-${hash(value)}`;
|
|
22
38
|
const hashRandomValue = (value) => {
|
|
23
39
|
const randomValue = randomInt(1000000);
|
|
@@ -26,4 +42,4 @@ const hashRandomValue = (value) => {
|
|
|
26
42
|
}
|
|
27
43
|
return hash(randomValue.toString());
|
|
28
44
|
};
|
|
29
|
-
export {
|
|
45
|
+
export { hashRandomValue, hashValue, removeAttributesIf, setAttributeIfEmpty, ifAttribute, unslugName, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const isMobileDevice = () => {
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
+
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
|
4
|
+
return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
|
|
5
|
+
};
|
|
6
|
+
export { isMobileDevice, };
|
|
@@ -31,13 +31,13 @@ export class KeyboardManager {
|
|
|
31
31
|
};
|
|
32
32
|
this.attachEscapeBehavior = (callback) => {
|
|
33
33
|
this.escapeCallback = callback;
|
|
34
|
-
if (window !== undefined) {
|
|
34
|
+
if (typeof window !== 'undefined') {
|
|
35
35
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
this.detachEscapeBehavior = () => {
|
|
39
39
|
this.escapeCallback = () => { return; };
|
|
40
|
-
if (window !== undefined) {
|
|
40
|
+
if (typeof window !== 'undefined') {
|
|
41
41
|
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
42
42
|
}
|
|
43
43
|
};
|
|
@@ -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"; }
|
|
@@ -1,60 +1,65 @@
|
|
|
1
1
|
const fileExtensionsDictionary = {
|
|
2
|
-
'7z': { format: 'archive', description: '
|
|
3
|
-
ace: { format: 'archive', description: '
|
|
4
|
-
ai: { format: 'vector', description: '
|
|
5
|
-
dart: { format: 'code', description: '
|
|
6
|
-
db: { format: 'data', description: '
|
|
7
|
-
default: { format: 'attachment', description: '
|
|
8
|
-
dmg: { format: 'executable', description: '
|
|
9
|
-
doc: { format: 'text', description: '
|
|
10
|
-
docm: { format: 'text', description: '
|
|
11
|
-
docx: { format: 'text', description: '
|
|
12
|
-
eml: { format: 'email', description: '
|
|
13
|
-
eps: { format: 'vector', description: '
|
|
14
|
-
exe: { format: 'executable', description: '
|
|
15
|
-
flac: { format: 'audio', description: '
|
|
16
|
-
gif: { format: 'image', description: '
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
html: { format: 'markup', description: '
|
|
20
|
-
jpe: { format: 'image', description: '
|
|
21
|
-
jpeg: { format: 'image', description: '
|
|
22
|
-
jpg: { format: 'image', description: '
|
|
23
|
-
js: { format: 'code', description: '
|
|
24
|
-
json: { format: 'data', description: '
|
|
25
|
-
jsx: { format: 'code', description: '
|
|
26
|
-
m2v: { format: 'video', description: '
|
|
27
|
-
mp2: { format: 'audio', description: '
|
|
28
|
-
mp3: { format: 'audio', description: '
|
|
29
|
-
mp4: { format: 'video', description: '
|
|
30
|
-
mp4v: { format: 'video', description: '
|
|
31
|
-
mpeg: { format: 'video', description: '
|
|
32
|
-
mpg4: { format: 'video', description: '
|
|
33
|
-
mpg: { format: 'video', description: '
|
|
34
|
-
mpga: { format: 'audio', description: '
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
2
|
+
'7z': { format: 'archive', description: 'compressedArchive' },
|
|
3
|
+
ace: { format: 'archive', description: 'compressedArchive' },
|
|
4
|
+
ai: { format: 'vector', description: 'fileAI' },
|
|
5
|
+
dart: { format: 'code', description: 'dart' },
|
|
6
|
+
db: { format: 'data', description: 'fileDB' },
|
|
7
|
+
default: { format: 'attachment', description: 'unknown' },
|
|
8
|
+
dmg: { format: 'executable', description: 'appleDiskImage' },
|
|
9
|
+
doc: { format: 'text', description: 'documentMS' },
|
|
10
|
+
docm: { format: 'text', description: 'documentMS' },
|
|
11
|
+
docx: { format: 'text', description: 'compressedDocumentMS' },
|
|
12
|
+
eml: { format: 'email', description: 'email' },
|
|
13
|
+
eps: { format: 'vector', description: 'fileEPS' },
|
|
14
|
+
exe: { format: 'executable', description: 'fileEXE' },
|
|
15
|
+
flac: { format: 'audio', description: 'uncompressedAudio' },
|
|
16
|
+
gif: { format: 'image', description: 'compressedImage', preview: true },
|
|
17
|
+
heic: { format: 'image', description: 'imageHEFF' },
|
|
18
|
+
htm: { format: 'markup', description: 'documentWeb' },
|
|
19
|
+
html: { format: 'markup', description: 'documentWeb' },
|
|
20
|
+
jpe: { format: 'image', description: 'compressedImage', preview: true },
|
|
21
|
+
jpeg: { format: 'image', description: 'compressedImage', preview: true },
|
|
22
|
+
jpg: { format: 'image', description: 'compressedImage', preview: true },
|
|
23
|
+
js: { format: 'code', description: 'fileJS' },
|
|
24
|
+
json: { format: 'data', description: 'fileJSON' },
|
|
25
|
+
jsx: { format: 'code', description: 'fileJS' },
|
|
26
|
+
m2v: { format: 'video', description: 'videoSD' },
|
|
27
|
+
mp2: { format: 'audio', description: 'compressedAudio' },
|
|
28
|
+
mp3: { format: 'audio', description: 'compressedAudio' },
|
|
29
|
+
mp4: { format: 'video', description: 'videoHD' },
|
|
30
|
+
mp4v: { format: 'video', description: 'videoHD' },
|
|
31
|
+
mpeg: { format: 'video', description: 'videoSD' },
|
|
32
|
+
mpg4: { format: 'video', description: 'videoSD' },
|
|
33
|
+
mpg: { format: 'video', description: 'videoSD' },
|
|
34
|
+
mpga: { format: 'audio', description: 'compressedAudio' },
|
|
35
|
+
odf: { format: 'document', description: 'openDocumentFormat' },
|
|
36
|
+
odp: { format: 'slide', description: 'slideLO' },
|
|
37
|
+
ods: { format: 'spreadsheet', description: 'spreadsheetLO' },
|
|
38
|
+
odt: { format: 'text', description: 'documentLO' },
|
|
39
|
+
ole: { format: 'document', description: 'objectLinkingAndEmbedding' },
|
|
40
|
+
p7m: { format: 'certificate', description: 'documentDigitalSingnature' },
|
|
41
|
+
pdf: { format: 'document', description: 'documentAdobe' },
|
|
42
|
+
php: { format: 'code', description: 'filePHP' },
|
|
43
|
+
png: { format: 'image', description: 'imagePNG', preview: true },
|
|
44
|
+
ppt: { format: 'slide', description: 'slidePowerPoint' },
|
|
45
|
+
rar: { format: 'archive', description: 'compressedArchive' },
|
|
46
|
+
rtf: { format: 'text', description: 'documentRTF' },
|
|
47
|
+
sass: { format: 'code', description: 'fileSASS' },
|
|
48
|
+
shtml: { format: 'markup', description: 'documentWeb' },
|
|
49
|
+
svg: { format: 'vector', description: 'imageSVG', preview: true },
|
|
50
|
+
tar: { format: 'archive', description: 'uncompressedArchive' },
|
|
51
|
+
tiff: { format: 'image', description: 'imageTIFF' },
|
|
52
|
+
ts: { format: 'code', description: 'fileTS' },
|
|
53
|
+
tsd: { format: 'certificate', description: 'certificateTSD' },
|
|
54
|
+
tsx: { format: 'code', description: 'fileTSX' },
|
|
55
|
+
txt: { format: 'text', description: 'documentTXT' },
|
|
56
|
+
wav: { format: 'audio', description: 'uncompressedAudio' },
|
|
57
|
+
webp: { format: 'image', description: 'imageWEBP', preview: true },
|
|
58
|
+
xar: { format: 'archive', description: 'compressedArchive' },
|
|
59
|
+
xls: { format: 'spreadsheet', description: 'spreadsheetMS' },
|
|
60
|
+
xlsx: { format: 'spreadsheet', description: 'spreadsheetMS' },
|
|
61
|
+
xml: { format: 'markup', description: 'extensibleMarkupLanguage' },
|
|
62
|
+
zip: { format: 'archive', description: 'compressedArchive' },
|
|
58
63
|
};
|
|
59
64
|
const genericMimeToExt = new Map([
|
|
60
65
|
['image', ['.png', '.jpg', '.jpeg', '.tiff', '.webp', '.jpe', '.gif', '.heic']],
|
|
@@ -1,6 +1,65 @@
|
|
|
1
|
+
const typographyTagDictionary = [
|
|
2
|
+
'abbr',
|
|
3
|
+
'address',
|
|
4
|
+
'article',
|
|
5
|
+
'b',
|
|
6
|
+
'bdo',
|
|
7
|
+
'blockquote',
|
|
8
|
+
'cite',
|
|
9
|
+
'code',
|
|
10
|
+
'dd',
|
|
11
|
+
'del',
|
|
12
|
+
'details',
|
|
13
|
+
'dfn',
|
|
14
|
+
'div',
|
|
15
|
+
'dl',
|
|
16
|
+
'dt',
|
|
17
|
+
'em',
|
|
18
|
+
'figcaption',
|
|
19
|
+
'h1',
|
|
20
|
+
'h2',
|
|
21
|
+
'h3',
|
|
22
|
+
'h4',
|
|
23
|
+
'h5',
|
|
24
|
+
'h6',
|
|
25
|
+
'i',
|
|
26
|
+
'ins',
|
|
27
|
+
'kbd',
|
|
28
|
+
'label',
|
|
29
|
+
'legend',
|
|
30
|
+
'li',
|
|
31
|
+
'mark',
|
|
32
|
+
'ol',
|
|
33
|
+
'p',
|
|
34
|
+
'pre',
|
|
35
|
+
'q',
|
|
36
|
+
'rb',
|
|
37
|
+
'rt',
|
|
38
|
+
'ruby',
|
|
39
|
+
's',
|
|
40
|
+
'samp',
|
|
41
|
+
'small',
|
|
42
|
+
'span',
|
|
43
|
+
'strong',
|
|
44
|
+
'sub',
|
|
45
|
+
'summary',
|
|
46
|
+
'sup',
|
|
47
|
+
'time',
|
|
48
|
+
'u',
|
|
49
|
+
'ul',
|
|
50
|
+
'var',
|
|
51
|
+
];
|
|
52
|
+
const typographyHeadingTagDictionary = [
|
|
53
|
+
'h1',
|
|
54
|
+
'h2',
|
|
55
|
+
'h3',
|
|
56
|
+
'h4',
|
|
57
|
+
'h5',
|
|
58
|
+
'h6',
|
|
59
|
+
];
|
|
1
60
|
const truncateDictionary = [
|
|
2
61
|
'all',
|
|
3
62
|
'none',
|
|
4
63
|
'word',
|
|
5
64
|
];
|
|
6
|
-
export { truncateDictionary, };
|
|
65
|
+
export { truncateDictionary, typographyHeadingTagDictionary, typographyTagDictionary, };
|
|
@@ -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};
|