@maggioli-design-system/mds-input-select 3.6.1 → 3.7.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 +852 -2
- package/dist/cjs/mds-input-select.cjs.js +1 -1
- package/dist/collection/components/mds-input-select/mds-input-select.js +29 -3
- package/dist/components/mds-input-select.js +854 -2
- package/dist/documentation.json +31 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mds-input-select.entry.js +852 -2
- 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 +6 -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-310d06d4.system.entry.js +6 -0
- package/dist/mds-input-select/{p-a0dc943c.entry.js → p-4af0bd88.entry.js} +6 -1
- package/dist/mds-input-select/p-bddba7bd.system.js +1 -1
- package/dist/stats.json +69 -15
- package/dist/types/components/mds-input-select/mds-input-select.d.ts +4 -0
- package/dist/types/components.d.ts +1 -0
- package/dist/types/dictionary/icon.d.ts +1 -1
- package/documentation.json +41 -1
- package/package.json +1 -1
- package/readme.md +14 -3
- package/src/components/mds-input-select/mds-input-select.tsx +13 -1
- package/src/components/mds-input-select/readme.md +14 -3
- package/src/components.d.ts +1 -0
- package/www/build/mds-input-select.esm.js +1 -1
- package/www/build/p-310d06d4.system.entry.js +6 -0
- package/www/build/{p-a0dc943c.entry.js → p-4af0bd88.entry.js} +6 -1
- package/www/build/p-bddba7bd.system.js +1 -1
- package/dist/mds-input-select/p-450de70e.system.entry.js +0 -1
- package/src/fixtures/icons.json +0 -473
- package/www/build/p-450de70e.system.entry.js +0 -1
|
@@ -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],"defaultValue":[520,"default-value"],"variant":[513],"hasFocus":[32],"setValue":[64]},null,{"value":["valueChanged"],"disabled":["disabledChanged"],"placeholder":["placeholderChanged"]}]]]], 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],"defaultValue":[520,"default-value"],"variant":[513],"hasFocus":[32],"language":[32],"updateLang":[64],"setValue":[64]},null,{"value":["valueChanged"],"disabled":["disabledChanged"],"placeholder":["placeholderChanged"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { Locale } from "../../common/locale";
|
|
1
2
|
import miBaselineKeyboardArrowDown from "@icon/mi/baseline/keyboard-arrow-down.svg";
|
|
2
3
|
import { Host, h } from "@stencil/core";
|
|
3
4
|
/**
|
|
4
5
|
* @part select - The select HTML element
|
|
6
|
+
* @part tip-top - Selects the verbose status of input on top of element
|
|
5
7
|
*/
|
|
6
8
|
export class MdsInputSelect {
|
|
7
9
|
constructor() {
|
|
8
10
|
// @State() selected: boolean
|
|
9
11
|
this.hasFocus = false;
|
|
12
|
+
this.t = new Locale();
|
|
10
13
|
/**
|
|
11
14
|
* If true, the element is displayed as disabled
|
|
12
15
|
*/
|
|
@@ -88,6 +91,10 @@ export class MdsInputSelect {
|
|
|
88
91
|
}
|
|
89
92
|
};
|
|
90
93
|
}
|
|
94
|
+
async updateLang() {
|
|
95
|
+
this.language = this.t.lang(this.host);
|
|
96
|
+
this.t.update();
|
|
97
|
+
}
|
|
91
98
|
/**
|
|
92
99
|
* Sets the value of the component
|
|
93
100
|
*/
|
|
@@ -142,6 +149,7 @@ export class MdsInputSelect {
|
|
|
142
149
|
this.internals.setFormValue('');
|
|
143
150
|
}
|
|
144
151
|
componentWillLoad() {
|
|
152
|
+
this.language = this.t.lang(this.host);
|
|
145
153
|
// needed for react component, this prop should be used as default-value html attributo instead of defaultValue prop
|
|
146
154
|
if (this.defaultValue) {
|
|
147
155
|
this.value = this.defaultValue;
|
|
@@ -153,8 +161,8 @@ export class MdsInputSelect {
|
|
|
153
161
|
}
|
|
154
162
|
}
|
|
155
163
|
render() {
|
|
156
|
-
return (h(Host, { key: '
|
|
157
|
-
h("mds-input-tip-item", { key: '
|
|
164
|
+
return (h(Host, { key: '73f137487077d2ed0e6fef517a4c91b4a371c911' }, h("select", { key: 'e285056928bdae8ce707c63c72068313109d5226', class: 'input', 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", ref: el => this.selectEl = el }, h("option", { key: 'e30d53f050176c0a2bba4f5f65229c1f6182e337', class: "placeholder-option", value: "", disabled: !this.required ? undefined : true, selected: this.defaultValue ? undefined : true }, this.placeholder)), h("div", { key: '3f304e1308c720a6d46a79ebf928e28dd2a046d2', class: "icon-container" }, h("i", { key: '692f675de31a78b46a515a7b0fe988e1c07c76dd', class: "icon", innerHTML: miBaselineKeyboardArrowDown })), h("div", { key: '240cd09bb8fcdf3bb416a1f440c18aa6cedd20cf', class: "option-container" }, h("slot", { key: 'b56a351816a66db40741ce651d4ab9450b430649', onSlotchange: this.onSlotChangeHandler })), h("mds-input-tip", { key: 'abc5a09146616ac8c86744c7c613ca636627f0e5', position: "top", lang: this.language, active: this.hasFocus, part: "tip-top" }, this.disabled && h("mds-input-tip-item", { key: 'b062f1fb7edee9dc5750d19483c337713051220e', expanded: true, variant: "disabled" }), this.required &&
|
|
165
|
+
h("mds-input-tip-item", { key: 'd34ccd1497afcdc7ab67ebc54b874b7a64d7eb19', expanded: this.hasFocus, variant: this.value === '' ? 'required' : 'required-success' }))));
|
|
158
166
|
}
|
|
159
167
|
static get is() { return "mds-input-select"; }
|
|
160
168
|
static get encapsulation() { return "shadow"; }
|
|
@@ -395,7 +403,8 @@ export class MdsInputSelect {
|
|
|
395
403
|
}
|
|
396
404
|
static get states() {
|
|
397
405
|
return {
|
|
398
|
-
"hasFocus": {}
|
|
406
|
+
"hasFocus": {},
|
|
407
|
+
"language": {}
|
|
399
408
|
};
|
|
400
409
|
}
|
|
401
410
|
static get events() {
|
|
@@ -424,6 +433,23 @@ export class MdsInputSelect {
|
|
|
424
433
|
}
|
|
425
434
|
static get methods() {
|
|
426
435
|
return {
|
|
436
|
+
"updateLang": {
|
|
437
|
+
"complexType": {
|
|
438
|
+
"signature": "() => Promise<void>",
|
|
439
|
+
"parameters": [],
|
|
440
|
+
"references": {
|
|
441
|
+
"Promise": {
|
|
442
|
+
"location": "global",
|
|
443
|
+
"id": "global::Promise"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"return": "Promise<void>"
|
|
447
|
+
},
|
|
448
|
+
"docs": {
|
|
449
|
+
"text": "",
|
|
450
|
+
"tags": []
|
|
451
|
+
}
|
|
452
|
+
},
|
|
427
453
|
"setValue": {
|
|
428
454
|
"complexType": {
|
|
429
455
|
"signature": "(value: string | number | null) => Promise<void>",
|