@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.
Files changed (33) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mds-input-select.cjs.entry.js +852 -2
  3. package/dist/cjs/mds-input-select.cjs.js +1 -1
  4. package/dist/collection/components/mds-input-select/mds-input-select.js +29 -3
  5. package/dist/components/mds-input-select.js +854 -2
  6. package/dist/documentation.json +31 -1
  7. package/dist/esm/loader.js +1 -1
  8. package/dist/esm/mds-input-select.entry.js +852 -2
  9. package/dist/esm/mds-input-select.js +1 -1
  10. package/dist/esm-es5/loader.js +1 -1
  11. package/dist/esm-es5/mds-input-select.entry.js +6 -1
  12. package/dist/esm-es5/mds-input-select.js +1 -1
  13. package/dist/mds-input-select/mds-input-select.esm.js +1 -1
  14. package/dist/mds-input-select/p-310d06d4.system.entry.js +6 -0
  15. package/dist/mds-input-select/{p-a0dc943c.entry.js → p-4af0bd88.entry.js} +6 -1
  16. package/dist/mds-input-select/p-bddba7bd.system.js +1 -1
  17. package/dist/stats.json +69 -15
  18. package/dist/types/components/mds-input-select/mds-input-select.d.ts +4 -0
  19. package/dist/types/components.d.ts +1 -0
  20. package/dist/types/dictionary/icon.d.ts +1 -1
  21. package/documentation.json +41 -1
  22. package/package.json +1 -1
  23. package/readme.md +14 -3
  24. package/src/components/mds-input-select/mds-input-select.tsx +13 -1
  25. package/src/components/mds-input-select/readme.md +14 -3
  26. package/src/components.d.ts +1 -0
  27. package/www/build/mds-input-select.esm.js +1 -1
  28. package/www/build/p-310d06d4.system.entry.js +6 -0
  29. package/www/build/{p-a0dc943c.entry.js → p-4af0bd88.entry.js} +6 -1
  30. package/www/build/p-bddba7bd.system.js +1 -1
  31. package/dist/mds-input-select/p-450de70e.system.entry.js +0 -1
  32. package/src/fixtures/icons.json +0 -473
  33. 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: 'b217fb12291d7a274a658db14c93de159d6ef8f8' }, h("select", { key: 'ecfd2d64dafbc5fe6546122631927388976891f1', 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: '7b6de14db97a31802fb96080bda90cc5396ec604', class: "placeholder-option", value: "", disabled: !this.required ? undefined : true, selected: this.defaultValue ? undefined : true }, this.placeholder)), h("div", { key: 'c29136a8a74c71e1565cc31f92abdf016f9eac0d', class: "icon-container" }, h("i", { key: '64ba4ea00b6d497fb9075a8385844cf60e16051a', class: "icon", innerHTML: miBaselineKeyboardArrowDown })), h("div", { key: '49118d50d1de9222ca611c65f22bb2e9a37abba8', class: "option-container" }, h("slot", { key: '5b437f219f6d3470c3b33d97b0d215669d9ec1b6', onSlotchange: this.onSlotChangeHandler })), h("mds-input-tip", { key: 'e2e5f0b16cf5e5b8a6d2c4c61b3745533247030b', position: "top", active: this.hasFocus }, this.disabled && h("mds-input-tip-item", { key: '5d5fe9dee35f5fe0c048b66abf7bebd51846ebd5', expanded: true, variant: "disabled" }), this.required &&
157
- h("mds-input-tip-item", { key: '158a591219c8c0bf2a94b4f4c7d5a4f2a32b00ce', expanded: this.hasFocus, variant: this.value === '' ? 'required' : 'required-success' }))));
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>",