@mgdis/mg-components 6.10.1 → 6.11.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 (113) hide show
  1. package/dist/cjs/{index-CL_COdxv.js → index-B_WwxtkQ.js} +4 -4
  2. package/dist/cjs/{index-CL_COdxv.js.map → index-B_WwxtkQ.js.map} +1 -1
  3. package/dist/cjs/{index.es-DaPqByCe.js → index.es-C-3Gv8Eu.js} +47 -43
  4. package/dist/cjs/index.es-C-3Gv8Eu.js.map +1 -0
  5. package/dist/cjs/mg-action-more_37.cjs.entry.js +186 -187
  6. package/dist/cjs/mg-action-more_37.cjs.entry.js.map +1 -1
  7. package/dist/cjs/mg-alert.cjs.entry.js +6 -6
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +74 -71
  9. package/dist/cjs/mg-input-combobox.cjs.entry.js.map +1 -1
  10. package/dist/cjs/mg-input-combobox.entry.cjs.js.map +1 -1
  11. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +6 -6
  12. package/dist/cjs/mg-loader.cjs.entry.js +3 -3
  13. package/dist/cjs/mg-progress.cjs.entry.js +9 -9
  14. package/dist/collection/components/atoms/mg-button/mg-button.js +1 -1
  15. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
  16. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.js.map +1 -1
  17. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +67 -45
  18. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js.map +1 -1
  19. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +25 -30
  20. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  21. package/dist/collection/components/molecules/mg-details/mg-details.js +5 -1
  22. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
  23. package/dist/components/index.es.js +40 -37
  24. package/dist/components/index.es.js.map +1 -1
  25. package/dist/components/index2.js +2 -2
  26. package/dist/components/mg-action-more.js +6 -6
  27. package/dist/components/mg-alert.js +5 -5
  28. package/dist/components/mg-badge2.js +5 -5
  29. package/dist/components/mg-button2.js +6 -6
  30. package/dist/components/mg-button2.js.map +1 -1
  31. package/dist/components/mg-character-left2.js +4 -4
  32. package/dist/components/mg-details.js +6 -2
  33. package/dist/components/mg-details.js.map +1 -1
  34. package/dist/components/mg-form.js +7 -7
  35. package/dist/components/mg-icon2.js +6 -6
  36. package/dist/components/mg-illustrated-message.js +5 -5
  37. package/dist/components/mg-input-checkbox.js +5 -5
  38. package/dist/components/mg-input-combobox.js +73 -70
  39. package/dist/components/mg-input-combobox.js.map +1 -1
  40. package/dist/components/mg-input-date.js +14 -14
  41. package/dist/components/mg-input-numeric.js +11 -11
  42. package/dist/components/mg-input-password.js +2 -2
  43. package/dist/components/mg-input-radio.js +6 -6
  44. package/dist/components/mg-input-rich-text-editor.js +5 -5
  45. package/dist/components/mg-input-select2.js +31 -36
  46. package/dist/components/mg-input-select2.js.map +1 -1
  47. package/dist/components/mg-input-text2.js +6 -6
  48. package/dist/components/mg-input-textarea.js +5 -5
  49. package/dist/components/mg-input-title2.js +3 -3
  50. package/dist/components/mg-input-toggle.js +5 -5
  51. package/dist/components/mg-input2.js +6 -6
  52. package/dist/components/mg-item-more2.js +7 -7
  53. package/dist/components/mg-loader2.js +2 -2
  54. package/dist/components/mg-menu-item2.js +8 -8
  55. package/dist/components/mg-message2.js +4 -4
  56. package/dist/components/mg-modal.js +7 -7
  57. package/dist/components/mg-pagination2.js +6 -6
  58. package/dist/components/mg-panel.js +8 -8
  59. package/dist/components/mg-popover-content2.js +3 -3
  60. package/dist/components/mg-popover2.js +5 -5
  61. package/dist/components/mg-progress.js +9 -9
  62. package/dist/components/mg-table.js +5 -5
  63. package/dist/components/mg-tabs.js +11 -11
  64. package/dist/components/mg-tag.js +3 -3
  65. package/dist/components/mg-tooltip2.js +8 -8
  66. package/dist/esm/{index-DALWFL9i.js → index-DHpyFawS.js} +4 -4
  67. package/dist/esm/{index-DALWFL9i.js.map → index-DHpyFawS.js.map} +1 -1
  68. package/dist/esm/{index.es-hNwGkhG6.js → index.es-lyrZ9KRh.js} +42 -39
  69. package/dist/esm/index.es-lyrZ9KRh.js.map +1 -0
  70. package/dist/esm/mg-action-more_37.entry.js +186 -187
  71. package/dist/esm/mg-action-more_37.entry.js.map +1 -1
  72. package/dist/esm/mg-alert.entry.js +6 -6
  73. package/dist/esm/mg-input-combobox.entry.js +74 -71
  74. package/dist/esm/mg-input-combobox.entry.js.map +1 -1
  75. package/dist/esm/mg-input-rich-text-editor.entry.js +6 -6
  76. package/dist/esm/mg-loader.entry.js +3 -3
  77. package/dist/esm/mg-progress.entry.js +9 -9
  78. package/dist/mg-components/mg-components.esm.js +1 -1
  79. package/dist/mg-components/mg-input-combobox.entry.esm.js.map +1 -1
  80. package/dist/mg-components/{p-bf5de898.entry.js → p-596c0e08.entry.js} +2 -2
  81. package/dist/mg-components/p-8a3bd8ad.entry.js +2 -0
  82. package/dist/mg-components/p-8a3bd8ad.entry.js.map +1 -0
  83. package/dist/mg-components/p-98a74b62.entry.js +2 -0
  84. package/dist/mg-components/{p-a52a168c.entry.js.map → p-98a74b62.entry.js.map} +1 -1
  85. package/dist/mg-components/{p-Cg3R_y_o.js → p-C-vIqOyI.js} +2 -2
  86. package/dist/mg-components/{p-Cg3R_y_o.js.map → p-C-vIqOyI.js.map} +1 -1
  87. package/dist/mg-components/{p-e33557f9.entry.js → p-d4ed3aad.entry.js} +2 -2
  88. package/dist/mg-components/p-e822bd96.entry.js +2 -0
  89. package/dist/mg-components/{p-352cfc01.entry.js.map → p-e822bd96.entry.js.map} +1 -1
  90. package/dist/mg-components/p-fc7b96e6.entry.js +2 -0
  91. package/dist/mg-components/p-fc7b96e6.entry.js.map +1 -0
  92. package/dist/mg-components/p-lyrZ9KRh.js +2 -0
  93. package/dist/mg-components/p-lyrZ9KRh.js.map +1 -0
  94. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.d.ts +1 -1
  95. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +5 -0
  96. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -9
  97. package/dist/types/components/molecules/mg-details/mg-details.d.ts +1 -0
  98. package/dist/types/components.d.ts +5 -0
  99. package/ide/intellij/web-types.json +6 -2
  100. package/ide/vscode/html-custom-data.json +1 -1
  101. package/package.json +8 -8
  102. package/dist/cjs/index.es-DaPqByCe.js.map +0 -1
  103. package/dist/esm/index.es-hNwGkhG6.js.map +0 -1
  104. package/dist/mg-components/p-352cfc01.entry.js +0 -2
  105. package/dist/mg-components/p-68f7de47.entry.js +0 -2
  106. package/dist/mg-components/p-68f7de47.entry.js.map +0 -1
  107. package/dist/mg-components/p-a52a168c.entry.js +0 -2
  108. package/dist/mg-components/p-dcefa0b0.entry.js +0 -2
  109. package/dist/mg-components/p-dcefa0b0.entry.js.map +0 -1
  110. package/dist/mg-components/p-hNwGkhG6.js +0 -2
  111. package/dist/mg-components/p-hNwGkhG6.js.map +0 -1
  112. /package/dist/mg-components/{p-bf5de898.entry.js.map → p-596c0e08.entry.js.map} +0 -0
  113. /package/dist/mg-components/{p-e33557f9.entry.js.map → p-d4ed3aad.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h } from '@stencil/core/internal/client';
2
- import { q as qe, H as Ht, X as Xt } from './index.es.js';
2
+ import { q as qe, a as qt, Y as Yt } from './index.es.js';
3
3
  import { d as defineCustomElement$5, c as classReadonly, a as classDisabled } from './mg-input2.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$6 } from './mg-icon2.js';
@@ -31187,7 +31187,7 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
31187
31187
  /**
31188
31188
  * Component classes
31189
31189
  */
31190
- this.classCollection = new Ht(['mg-c-input--rich-text-editor']);
31190
+ this.classCollection = new qt(['mg-c-input--rich-text-editor']);
31191
31191
  /**
31192
31192
  * Check if the field is empty taking into account the value format
31193
31193
  * @returns truthy is value is invalid
@@ -31235,7 +31235,7 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
31235
31235
  */
31236
31236
  this.handleFocus = () => {
31237
31237
  this.classCollection.add(this.classFocus);
31238
- this.classCollection = new Ht(this.classCollection.classes);
31238
+ this.classCollection = new qt(this.classCollection.classes);
31239
31239
  };
31240
31240
  /**
31241
31241
  * Handles the blur event on the editor
@@ -31244,7 +31244,7 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
31244
31244
  this.handleBlur = () => {
31245
31245
  // Manage focus
31246
31246
  this.classCollection.delete(this.classFocus);
31247
- this.classCollection = new Ht(this.classCollection.classes);
31247
+ this.classCollection = new qt(this.classCollection.classes);
31248
31248
  if (!this.readonly) {
31249
31249
  this.checkValidity();
31250
31250
  this.setErrorMessage();
@@ -31297,7 +31297,7 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
31297
31297
  }
31298
31298
  validatePattern(newValue) {
31299
31299
  if (newValue !== undefined && !(qe(this.pattern) && qe(this.patternErrorMessage))) {
31300
- throw new Error(`<mg-input-rich-text-editor> props "pattern" and "patternErrorMessage" must be non-empty string and paired. Passed value: "pattern='${Xt(this.pattern)}'" and "patternErrorMessage='${Xt(this.patternErrorMessage)}'".`);
31300
+ throw new Error(`<mg-input-rich-text-editor> props "pattern" and "patternErrorMessage" must be non-empty string and paired. Passed value: "pattern='${Yt(this.pattern)}'" and "patternErrorMessage='${Yt(this.patternErrorMessage)}'".`);
31301
31301
  }
31302
31302
  }
31303
31303
  /**
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { H as Ht, a as qt, X as Xt, q as qe } from './index.es.js';
2
+ import { a as qt, G as Gt, Y as Yt, q as qe } from './index.es.js';
3
3
  import { d as defineCustomElement$4, c as classReadonly, a as classDisabled, w as widths } from './mg-input2.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$5 } from './mg-icon2.js';
@@ -100,48 +100,35 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
100
100
  /**
101
101
  * Component classes
102
102
  */
103
- this.classCollection = new Ht(['mg-c-input--select']);
103
+ this.classCollection = new qt(['mg-c-input--select']);
104
104
  /**
105
105
  * Handle input event
106
106
  */
107
107
  this.handleInput = () => {
108
- this.updateValue();
109
- if (this.hasDisplayedError)
110
- this.setErrorMessage();
111
- };
112
- /**
113
- * Method to compare item.title with input.value
114
- * @param item - item to compare with
115
- * @returns truthy if input.value is an item
116
- */
117
- this.isInputValue = (item) => { var _a; return item.title === ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value); };
118
- /**
119
- * value props setter
120
- * @param newValue - value to update with
121
- */
122
- this.setValue = (newValue) => {
123
- this.checkValidity();
124
- this.value = newValue;
125
- };
126
- /**
127
- * Update value from input.value
128
- */
129
- this.updateValue = () => {
130
108
  if (this.input.value === '') {
131
- this.setValue(null);
109
+ this.value = null;
132
110
  }
133
- else if (qt(this.items) && this.items.includes(this.input.value)) {
134
- this.setValue(this.input.value);
111
+ else if (Gt(this.items) && this.items.includes(this.input.value)) {
112
+ this.value = this.input.value;
135
113
  }
136
114
  else if (allItemsAreOptions(this.items) && typeof this.input.value === 'string' && this.items.some(this.isInputValue)) {
137
- this.setValue(this.items.find(this.isInputValue).value);
115
+ this.value = this.items.find(this.isInputValue).value;
138
116
  }
139
117
  else {
140
- // before set newValue with push to options[] the unknown input.value with a disable satus
118
+ // Add the unknown input.value to the options array as a disabled option before setting it as the new value
141
119
  this.options.push({ title: this.input.value, value: this.input.value, disabled: true });
142
- this.setValue(this.input.value);
120
+ this.value = this.input.value;
121
+ }
122
+ if (this.hasDisplayedError) {
123
+ this.setErrorMessage();
143
124
  }
144
125
  };
126
+ /**
127
+ * Method to compare item.title with input.value
128
+ * @param item - item to compare with
129
+ * @returns truthy if input.value is an item
130
+ */
131
+ this.isInputValue = (item) => { var _a; return item.title === ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value); };
145
132
  /**
146
133
  * Handle blur event
147
134
  */
@@ -188,7 +175,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
188
175
  }
189
176
  validateValue(newValue) {
190
177
  var _a, _b;
191
- if (qt(this.items) && typeof newValue === 'string') {
178
+ if (Gt(this.items) && typeof newValue === 'string') {
192
179
  this.readonlyValue = ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value) !== undefined ? this.input.value : newValue;
193
180
  }
194
181
  else if (allItemsAreOptions(this.items)) {
@@ -197,6 +184,12 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
197
184
  else {
198
185
  this.readonlyValue = null;
199
186
  }
187
+ setTimeout(() => {
188
+ this.checkValidity();
189
+ if (this.hasDisplayedError) {
190
+ this.setErrorMessage();
191
+ }
192
+ }, 0);
200
193
  this.valueChange.emit(newValue);
201
194
  }
202
195
  validateItems(newValue) {
@@ -205,9 +198,10 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
205
198
  this.options = [];
206
199
  }
207
200
  // String array
208
- else if (qt(newValue)) {
209
- if (typeof this.value === 'string')
201
+ else if (Gt(newValue)) {
202
+ if (typeof this.value === 'string') {
210
203
  this.valueExist = newValue.includes(this.value);
204
+ }
211
205
  this.options = newValue.map(item => ({ title: item, value: item }));
212
206
  }
213
207
  // Object array
@@ -223,7 +217,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
223
217
  }
224
218
  }
225
219
  else {
226
- throw new Error(`<mg-input-select> prop "items" is required, can be an empty Array or all items must be the same type: string or Option. Passed value: ${Xt(newValue)}.`);
220
+ throw new Error(`<mg-input-select> prop "items" is required, can be an empty Array or all items must be the same type: string or Option. Passed value: ${Yt(newValue)}.`);
227
221
  }
228
222
  }
229
223
  watchReadonly(newValue) {
@@ -317,8 +311,9 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
317
311
  this.valid = newValue;
318
312
  this.invalid = !this.valid;
319
313
  // We need to send valid event even if it is the same value
320
- if (this.handlerInProgress === undefined || (this.handlerInProgress === 'blur' && this.valid !== oldValidValue))
314
+ if (this.handlerInProgress === undefined || (this.handlerInProgress === 'blur' && this.valid !== oldValidValue)) {
321
315
  this.inputValid.emit(this.valid);
316
+ }
322
317
  }
323
318
  /*************
324
319
  * Lifecycle *
@@ -352,7 +347,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
352
347
  * @returns HTML Element
353
348
  */
354
349
  render() {
355
- return (h("mg-input", { key: '8fc77d20fe8fda510ea0352bc7246fafea31f8d8', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.readonlyValue === null ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, this.readonlyValue)) : (h("select", { class: "mg-c-input__box", id: this.identifier, name: this.name, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
350
+ return (h("mg-input", { key: 'e5f8f97d2ebe984532bc25b7be94053c2e6ddf43', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.readonlyValue === null ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, this.readonlyValue)) : (h("select", { class: "mg-c-input__box", id: this.identifier, name: this.name, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
356
351
  if (el !== null)
357
352
  this.input = el;
358
353
  } }, (!this.placeholderHide || !this.valueExist) && ( // In case passed value does not match any option we display the placeholder
@@ -1 +1 @@
1
- {"file":"mg-input-select2.js","mappings":";;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,m/JAAm/J;;ACM5gK;;;;AAIG;AACH,MAAM,QAAQ,GAAG,CAAC,MAAe,KAA6B,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAQ,MAAuB,CAAC,KAAK,KAAK,QAAQ;AAE9I;;;;AAIG;AACH,MAAM,kBAAkB,GAAG,CAAC,KAAgB,KAA8B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;AAErI;;;;AAIG;AACH,MAAM,UAAU,GAAG,CAAC,QAAiB,KACnC,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAQ,QAAqB,CAAC,KAAK,KAAK,QAAQ,IAAI,kBAAkB,CAAE,QAAqB,CAAC,OAAO,CAAC;AAExI;;;;;AAKG;AACH,MAAM,YAAY,GAAG,CAAC,GAAgC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAgB,KAAiC;AACtI,IAAA,IAAI,KAAK,KAAK,SAAS,EAAE;;AAEvB,QAAA,MAAM,QAAQ,GAAc,GAAkB,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC;;AAE/E,QAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;AAC1B,YAAA,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EA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AAK,EAAE,IAAI,CAAC,WAAW,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACT,cAAA,EAAA,CAAC,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE,QAAQ,EAAE,EAChD,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,GAAG,EAAE,CAAC,EAAqB,KAAI;gBAC7B,IAAI,EAAE,KAAK,IAAI;AAAE,oBAAA,IAAI,CAAC,KAAK,GAAG,EAAE;AAClC,aAAC,EAAA,EAEA,CAAC,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,UAAU;QACzC,CAAA,CAAA,QAAA,EAAA,EAAQ,KAAK,EAAC,EAAE,EAAC,QAAQ,EAAE,IAAI,CAAC,mBAAmB,IAAI,IAAI,CAAC,UAAU,EAAA,EACnE,IAAI,CAAC,WAAW,CACV,CACV,EACA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,IACtB,UAAU,CAAC,MAAM,CAAC,IAChB,CAAA,CAAA,UAAA,EAAA,EAAU,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,KAAK,EAC7C,EAAA,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAC7B,KAEX,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAC9C,CACF,CACM,CACV,CACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","ClassList","allItemsAreString","toString","isValidString"],"sources":["../styles/dist/components/mg-input-select.css?tag=mg-input-select&encapsulation=shadow","src/components/molecules/inputs/mg-input-select/mg-input-select.tsx"],"sourcesContent":[".mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left: 0;--mg-c-button-border-radius-bottom-left: 0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right: 0;--mg-c-button-border-radius-bottom-right: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right: var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right: var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left>mg-icon:first-of-type,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left .mg-c-input__box,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);word-break:break-word}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:has(textarea){flex-grow:inherit}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media(prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input__box{padding-top:0;padding-right:var(--mg-b-size-8);padding-bottom:0}@media screen and (max-width: 767px){.mg-c-input__box{width:100%}}/*# sourceMappingURL=mg-input-select.css.map */\n","import { Component, Element, Event, h, Prop, State, EventEmitter, Watch, Method } from '@stencil/core';\nimport { ClassList, allItemsAreString, isValidString, toString } from '@mgdis/stencil-helpers';\nimport { SelectOption, OptGroup } from './mg-input-select.conf';\nimport { type TooltipPosition, type Width, type EventType, classReadonly, classDisabled, widths } from '../mg-input/mg-input.conf';\nimport { initLocales } from '../../../../locales';\n\n/**\n * Check if item is a well configured option\n * @param option - select option\n * @returns select option type is valid\n */\nconst isOption = (option: unknown): option is SelectOption => typeof option === 'object' && typeof (option as SelectOption).title === 'string';\n\n/**\n * Check if items[] is SelectOption\n * @param items - select option\n * @returns select option array type is valid\n */\nconst allItemsAreOptions = (items: unknown[]): items is SelectOption[] => Array.isArray(items) && items.every(item => isOption(item));\n\n/**\n * Check if item is a well configured optgroup\n * @param optgroup - select option\n * @returns select optgroup type is valid\n */\nconst isOptGroup = (optgroup: unknown): optgroup is OptGroup =>\n typeof optgroup === 'object' && typeof (optgroup as OptGroup).group === 'string' && allItemsAreOptions((optgroup as OptGroup).options);\n\n/**\n * Group options\n * @param acc - reduce accumulator\n * @param item - item to add\n * @returns grouped options\n */\nconst groupOptions = (acc: (SelectOption | OptGroup)[], { group, title, value, disabled }: SelectOption): (SelectOption | OptGroup)[] => {\n if (group !== undefined) {\n // Check if group is already created\n const optGroup: OptGroup = (acc as OptGroup[]).find(grp => grp.group === group);\n // Add to group\n if (optGroup !== undefined) {\n optGroup.options.push({ title, value, disabled });\n }\n // Create group\n else {\n acc.push({ group, options: [{ title, value, disabled }] });\n }\n } else {\n acc.push({ title, value, disabled });\n }\n return acc;\n};\n\n@Component({\n tag: 'mg-input-select',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-select.css',\n shadow: true,\n})\nexport class MgInputSelect {\n /************\n * Internal *\n ************/\n\n // HTML selector\n private input: HTMLSelectElement;\n\n // Locales\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n private handlerInProgress: EventType;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputSelectElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true }) value: any; // eslint-disable-line @typescript-eslint/no-explicit-any\n @Watch('value')\n validateValue(newValue: MgInputSelect['value']): void {\n if (allItemsAreString(this.items) && typeof newValue === 'string') {\n this.readonlyValue = this.input?.value !== undefined ? this.input.value : newValue;\n } else if (allItemsAreOptions(this.items)) {\n this.readonlyValue = this.items.find(item => item.value === newValue)?.title;\n } else {\n this.readonlyValue = null;\n }\n this.valueChange.emit(newValue);\n }\n\n /**\n * Items are the possible options to select\n */\n @Prop() items!: (string | SelectOption)[];\n @Watch('items')\n validateItems(newValue: MgInputSelect['items']): void {\n // Empty options\n if (newValue.length === 0) {\n this.options = [];\n }\n // String array\n else if (allItemsAreString(newValue)) {\n if (typeof this.value === 'string') this.valueExist = newValue.includes(this.value);\n this.options = newValue.map(item => ({ title: item, value: item }));\n }\n // Object array\n else if (allItemsAreOptions(newValue)) {\n this.valueExist = newValue.map(item => item.value).includes(this.value);\n // Grouped object options\n if (newValue.some(item => Boolean(item.group))) {\n this.options = newValue.reduce(groupOptions, []);\n }\n // Standart object options\n else {\n this.options = newValue;\n }\n } else {\n throw new Error(\n `<mg-input-select> prop \"items\" is required, can be an empty Array or all items must be the same type: string or Option. Passed value: ${toString(newValue)}.`,\n );\n }\n }\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop = false;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.\n */\n @Prop({ mutable: true }) placeholder: string;\n\n /**\n * Option to remove placeholder\n */\n @Prop() placeholderHide = false;\n\n /**\n * Option to disable placeholder\n */\n @Prop() placeholderDisabled = false;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n @Watch('readonly')\n watchReadonly(newValue: MgInputSelect['readonly']): void {\n if (newValue) this.classCollection.add(classReadonly);\n else this.classCollection.delete(classReadonly);\n }\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input !== undefined) {\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n }\n\n @Watch('disabled')\n watchDisabled(newValue: MgInputSelect['disabled']): void {\n if (newValue) this.classCollection.add(classDisabled);\n else this.classCollection.delete(classDisabled);\n }\n\n /**\n * Define input width\n */\n @Prop({ reflect: true }) mgWidth: Width;\n @Watch('mgWidth')\n watchMgWidth(newValue: MgInputSelect['mgWidth']): void {\n // reset width class\n widths.forEach(width => {\n this.classCollection.delete(`mg-c-input--width-${width}`);\n });\n // apply new width\n if (newValue !== undefined) this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);\n }\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip?: string;\n\n /**\n * Define tooltip position\n */\n @Prop() tooltipPosition: TooltipPosition = 'input';\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText?: string;\n\n /**\n * Define input valid state\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input invalid state\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--select']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Formated items for display\n */\n @State() options: (SelectOption | OptGroup)[];\n\n /**\n * Does value match any item option\n */\n @State() valueExist: boolean;\n\n /**\n * Value to display in readonly mode\n */\n @State() readonlyValue: string;\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<HTMLMgInputCheckboxElement['value']>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputCheckboxElement['valid']>;\n\n /**\n * Display input error if it exists.\n */\n @Method()\n displayError(): Promise<void> {\n // Use `Promise` as requested for stencil method\n // Use `requestAnimationFrame` to ensure:\n // - DOM is fully updated before validation\n // - Async operations are completed\n // - No timing issues with Stencil's render cycle\n // - Keep everything in sync both inside and outside the component\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n resolve();\n });\n });\n }\n\n /**\n * Set an error and display a custom error message.\n * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given context.\n * When used to set validity to `false`, you should use this method again to reset the validity to `true`.\n * @param valid - value indicating the validity\n * @param errorMessage - the error message to display\n */\n @Method()\n async setError(valid: MgInputSelect['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-select> method \"setError()\" param \"valid\" must be a boolean.');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-select> method \"setError()\" param \"errorMessage\" must be a string.');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Reset value, validity and error state\n */\n @Method()\n async reset(): Promise<void> {\n if (!this.readonly) {\n this.value = null;\n this.checkValidity();\n this.errorMessage = undefined;\n this.hasDisplayedError = false;\n }\n }\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputSelect['valid']) {\n const oldValidValue = this.valid;\n this.valid = newValue;\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n if (this.handlerInProgress === undefined || (this.handlerInProgress === 'blur' && this.valid !== oldValidValue)) this.inputValid.emit(this.valid);\n }\n /**\n * Handle input event\n */\n private handleInput = (): void => {\n this.updateValue();\n if (this.hasDisplayedError) this.setErrorMessage();\n };\n\n /**\n * Method to compare item.title with input.value\n * @param item - item to compare with\n * @returns truthy if input.value is an item\n */\n private isInputValue = (item: SelectOption): boolean => item.title === this.input?.value;\n\n /**\n * value props setter\n * @param newValue - value to update with\n */\n private setValue = (newValue: MgInputSelect['value']): void => {\n this.checkValidity();\n this.value = newValue;\n };\n\n /**\n * Update value from input.value\n */\n private updateValue = (): void => {\n if (this.input.value === '') {\n this.setValue(null);\n } else if (allItemsAreString(this.items) && this.items.includes(this.input.value)) {\n this.setValue(this.input.value);\n } else if (allItemsAreOptions(this.items) && typeof this.input.value === 'string' && this.items.some(this.isInputValue)) {\n this.setValue(this.items.find(this.isInputValue).value);\n } else {\n // before set newValue with push to options[] the unknown input.value with a disable satus\n this.options.push({ title: this.input.value, value: this.input.value, disabled: true });\n this.setValue(this.input.value);\n }\n };\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n this.handlerInProgress = 'blur';\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n };\n\n /**\n * Input value is disabled\n * @returns truthy if input value is disabled\n */\n private isDisabledValue = (): boolean => allItemsAreOptions(this.options) && this.options.find(this.isInputValue)?.disabled === true;\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(!this.isDisabledValue() && (this.readonly || this.disabled || this.input.checkValidity()));\n };\n\n /**\n * Set input error message\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n if (!this.valid) {\n if (errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n } else if (this.input.validity.valueMissing) {\n this.errorMessage = this.messages.errors.required;\n }\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n this.messages = initLocales(this.element).messages;\n // Validate\n this.validateItems(this.items);\n this.validateValue(this.value);\n this.watchMgWidth(this.mgWidth);\n this.watchReadonly(this.readonly);\n this.watchDisabled(this.disabled);\n // Set default placeholder\n if (this.placeholder === undefined || this.placeholder === '') {\n this.placeholder = this.messages.input.select.placeholder;\n }\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render option\n * @param option - to render\n * @returns render option\n */\n private renderOption = (option: SelectOption): HTMLElement => (\n <option key={option.title} value={option.title} selected={JSON.stringify(this.value) === JSON.stringify(option.value)} disabled={option.disabled}>\n {option.title}\n </option>\n );\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <mg-input\n label={this.label}\n identifier={this.identifier}\n class={this.classCollection.join()}\n ariaDescribedbyIDs={[]}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n tooltip={this.tooltip}\n tooltipPosition={this.readonly && this.readonlyValue === null ? 'label' : this.tooltipPosition}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n >\n {this.readonly ? (\n this.readonlyValue && <b class=\"mg-c-input__readonly-value\">{this.readonlyValue}</b>\n ) : (\n <select\n class=\"mg-c-input__box\"\n id={this.identifier}\n name={this.name}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n aria-invalid={(this.invalid === true).toString()}\n onInput={this.handleInput}\n onBlur={this.handleBlur}\n ref={(el: HTMLSelectElement) => {\n if (el !== null) this.input = el;\n }}\n >\n {(!this.placeholderHide || !this.valueExist) && ( // In case passed value does not match any option we display the placeholder\n <option value=\"\" disabled={this.placeholderDisabled && this.valueExist}>\n {this.placeholder}\n </option>\n )}\n {this.options.map(option =>\n isOptGroup(option) ? (\n <optgroup label={option.group} key={option.group}>\n {option.options.map(this.renderOption)}\n </optgroup>\n ) : (\n isOption(option) && this.renderOption(option)\n ),\n )}\n </select>\n )}\n </mg-input>\n );\n }\n}\n"],"version":3}
1
+ {"file":"mg-input-select2.js","mappings":";;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,m/JAAm/J;;ACM5gK;;;;AAIG;AACH,MAAM,QAAQ,GAAG,CAAC,MAAe,KAA6B,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAQ,MAAuB,CAAC,KAAK,KAAK,QAAQ;AAE9I;;;;AAIG;AACH,MAAM,kBAAkB,GAAG,CAAC,KAAgB,KAA8B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;AAErI;;;;AAIG;AACH,MAAM,UAAU,GAAG,CAAC,QAAiB,KACnC,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAQ,QAAqB,CAAC,KAAK,KAAK,QAAQ,IAAI,kBAAkB,CAAE,QAAqB,CAAC,OAAO,CAAC;AAExI;;;;;AAKG;AACH,MA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ACF,CACM,CACV,CACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","ClassList","allItemsAreString","toString","isValidString"],"sources":["../styles/dist/components/mg-input-select.css?tag=mg-input-select&encapsulation=shadow","src/components/molecules/inputs/mg-input-select/mg-input-select.tsx"],"sourcesContent":[".mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left: 0;--mg-c-button-border-radius-bottom-left: 0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right: 0;--mg-c-button-border-radius-bottom-right: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right: var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right: var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left>mg-icon:first-of-type,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left .mg-c-input__box,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);word-break:break-word}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:has(textarea){flex-grow:inherit}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media(prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input__box{padding-top:0;padding-right:var(--mg-b-size-8);padding-bottom:0}@media screen and (max-width: 767px){.mg-c-input__box{width:100%}}/*# sourceMappingURL=mg-input-select.css.map */\n","import { Component, Element, Event, h, Prop, State, EventEmitter, Watch, Method } from '@stencil/core';\nimport { ClassList, allItemsAreString, isValidString, toString } from '@mgdis/stencil-helpers';\nimport { SelectOption, OptGroup } from './mg-input-select.conf';\nimport { type TooltipPosition, type Width, type EventType, classReadonly, classDisabled, widths } from '../mg-input/mg-input.conf';\nimport { initLocales } from '../../../../locales';\n\n/**\n * Check if item is a well configured option\n * @param option - select option\n * @returns select option type is valid\n */\nconst isOption = (option: unknown): option is SelectOption => typeof option === 'object' && typeof (option as SelectOption).title === 'string';\n\n/**\n * Check if items[] is SelectOption\n * @param items - select option\n * @returns select option array type is valid\n */\nconst allItemsAreOptions = (items: unknown[]): items is SelectOption[] => Array.isArray(items) && items.every(item => isOption(item));\n\n/**\n * Check if item is a well configured optgroup\n * @param optgroup - select option\n * @returns select optgroup type is valid\n */\nconst isOptGroup = (optgroup: unknown): optgroup is OptGroup =>\n typeof optgroup === 'object' && typeof (optgroup as OptGroup).group === 'string' && allItemsAreOptions((optgroup as OptGroup).options);\n\n/**\n * Group options\n * @param acc - reduce accumulator\n * @param item - item to add\n * @returns grouped options\n */\nconst groupOptions = (acc: (SelectOption | OptGroup)[], { group, title, value, disabled }: SelectOption): (SelectOption | OptGroup)[] => {\n if (group !== undefined) {\n // Check if group is already created\n const optGroup: OptGroup = (acc as OptGroup[]).find(grp => grp.group === group);\n // Add to group\n if (optGroup !== undefined) {\n optGroup.options.push({ title, value, disabled });\n }\n // Create group\n else {\n acc.push({ group, options: [{ title, value, disabled }] });\n }\n } else {\n acc.push({ title, value, disabled });\n }\n return acc;\n};\n\n@Component({\n tag: 'mg-input-select',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-select.css',\n shadow: true,\n})\nexport class MgInputSelect {\n /************\n * Internal *\n ************/\n\n // HTML selector\n private input: HTMLSelectElement;\n\n // Locales\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n private handlerInProgress: EventType;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputSelectElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true }) value: any; // eslint-disable-line @typescript-eslint/no-explicit-any\n @Watch('value')\n validateValue(newValue: MgInputSelect['value']): void {\n if (allItemsAreString(this.items) && typeof newValue === 'string') {\n this.readonlyValue = this.input?.value !== undefined ? this.input.value : newValue;\n } else if (allItemsAreOptions(this.items)) {\n this.readonlyValue = this.items.find(item => item.value === newValue)?.title;\n } else {\n this.readonlyValue = null;\n }\n setTimeout(() => {\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n }\n }, 0);\n this.valueChange.emit(newValue);\n }\n\n /**\n * Items are the possible options to select\n */\n @Prop() items!: (string | SelectOption)[];\n @Watch('items')\n validateItems(newValue: MgInputSelect['items']): void {\n // Empty options\n if (newValue.length === 0) {\n this.options = [];\n }\n // String array\n else if (allItemsAreString(newValue)) {\n if (typeof this.value === 'string') {\n this.valueExist = newValue.includes(this.value);\n }\n this.options = newValue.map(item => ({ title: item, value: item }));\n }\n // Object array\n else if (allItemsAreOptions(newValue)) {\n this.valueExist = newValue.map(item => item.value).includes(this.value);\n // Grouped object options\n if (newValue.some(item => Boolean(item.group))) {\n this.options = newValue.reduce(groupOptions, []);\n }\n // Standart object options\n else {\n this.options = newValue;\n }\n } else {\n throw new Error(\n `<mg-input-select> prop \"items\" is required, can be an empty Array or all items must be the same type: string or Option. Passed value: ${toString(newValue)}.`,\n );\n }\n }\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop = false;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.\n */\n @Prop({ mutable: true }) placeholder: string;\n\n /**\n * Option to remove placeholder\n */\n @Prop() placeholderHide = false;\n\n /**\n * Option to disable placeholder\n */\n @Prop() placeholderDisabled = false;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n @Watch('readonly')\n watchReadonly(newValue: MgInputSelect['readonly']): void {\n if (newValue) this.classCollection.add(classReadonly);\n else this.classCollection.delete(classReadonly);\n }\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input !== undefined) {\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n }\n\n @Watch('disabled')\n watchDisabled(newValue: MgInputSelect['disabled']): void {\n if (newValue) this.classCollection.add(classDisabled);\n else this.classCollection.delete(classDisabled);\n }\n\n /**\n * Define input width\n */\n @Prop({ reflect: true }) mgWidth: Width;\n @Watch('mgWidth')\n watchMgWidth(newValue: MgInputSelect['mgWidth']): void {\n // reset width class\n widths.forEach(width => {\n this.classCollection.delete(`mg-c-input--width-${width}`);\n });\n // apply new width\n if (newValue !== undefined) this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);\n }\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip?: string;\n\n /**\n * Define tooltip position\n */\n @Prop() tooltipPosition: TooltipPosition = 'input';\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText?: string;\n\n /**\n * Define input valid state\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input invalid state\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--select']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Formated items for display\n */\n @State() options: (SelectOption | OptGroup)[];\n\n /**\n * Does value match any item option\n */\n @State() valueExist: boolean;\n\n /**\n * Value to display in readonly mode\n */\n @State() readonlyValue: string;\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<HTMLMgInputCheckboxElement['value']>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputCheckboxElement['valid']>;\n\n /**\n * Display input error if it exists.\n */\n @Method()\n displayError(): Promise<void> {\n // Use `Promise` as requested for stencil method\n // Use `requestAnimationFrame` to ensure:\n // - DOM is fully updated before validation\n // - Async operations are completed\n // - No timing issues with Stencil's render cycle\n // - Keep everything in sync both inside and outside the component\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n resolve();\n });\n });\n }\n\n /**\n * Set an error and display a custom error message.\n * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given context.\n * When used to set validity to `false`, you should use this method again to reset the validity to `true`.\n * @param valid - value indicating the validity\n * @param errorMessage - the error message to display\n */\n @Method()\n async setError(valid: MgInputSelect['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-select> method \"setError()\" param \"valid\" must be a boolean.');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-select> method \"setError()\" param \"errorMessage\" must be a string.');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Reset value, validity and error state\n */\n @Method()\n async reset(): Promise<void> {\n if (!this.readonly) {\n this.value = null;\n this.checkValidity();\n this.errorMessage = undefined;\n this.hasDisplayedError = false;\n }\n }\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputSelect['valid']) {\n const oldValidValue = this.valid;\n this.valid = newValue;\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n if (this.handlerInProgress === undefined || (this.handlerInProgress === 'blur' && this.valid !== oldValidValue)) {\n this.inputValid.emit(this.valid);\n }\n }\n\n /**\n * Handle input event\n */\n private handleInput = (): void => {\n if (this.input.value === '') {\n this.value = null;\n } else if (allItemsAreString(this.items) && this.items.includes(this.input.value)) {\n this.value = this.input.value;\n } else if (allItemsAreOptions(this.items) && typeof this.input.value === 'string' && this.items.some(this.isInputValue)) {\n this.value = this.items.find(this.isInputValue).value;\n } else {\n // Add the unknown input.value to the options array as a disabled option before setting it as the new value\n this.options.push({ title: this.input.value, value: this.input.value, disabled: true });\n this.value = this.input.value;\n }\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n }\n };\n\n /**\n * Method to compare item.title with input.value\n * @param item - item to compare with\n * @returns truthy if input.value is an item\n */\n private isInputValue = (item: SelectOption): boolean => item.title === this.input?.value;\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n this.handlerInProgress = 'blur';\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n };\n\n /**\n * Input value is disabled\n * @returns truthy if input value is disabled\n */\n private isDisabledValue = (): boolean => allItemsAreOptions(this.options) && this.options.find(this.isInputValue)?.disabled === true;\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(!this.isDisabledValue() && (this.readonly || this.disabled || this.input.checkValidity()));\n };\n\n /**\n * Set input error message\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n if (!this.valid) {\n if (errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n } else if (this.input.validity.valueMissing) {\n this.errorMessage = this.messages.errors.required;\n }\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n this.messages = initLocales(this.element).messages;\n // Validate\n this.validateItems(this.items);\n this.validateValue(this.value);\n this.watchMgWidth(this.mgWidth);\n this.watchReadonly(this.readonly);\n this.watchDisabled(this.disabled);\n // Set default placeholder\n if (this.placeholder === undefined || this.placeholder === '') {\n this.placeholder = this.messages.input.select.placeholder;\n }\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render option\n * @param option - to render\n * @returns render option\n */\n private renderOption = (option: SelectOption): HTMLElement => (\n <option key={option.title} value={option.title} selected={JSON.stringify(this.value) === JSON.stringify(option.value)} disabled={option.disabled}>\n {option.title}\n </option>\n );\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <mg-input\n label={this.label}\n identifier={this.identifier}\n class={this.classCollection.join()}\n ariaDescribedbyIDs={[]}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n tooltip={this.tooltip}\n tooltipPosition={this.readonly && this.readonlyValue === null ? 'label' : this.tooltipPosition}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n >\n {this.readonly ? (\n this.readonlyValue && <b class=\"mg-c-input__readonly-value\">{this.readonlyValue}</b>\n ) : (\n <select\n class=\"mg-c-input__box\"\n id={this.identifier}\n name={this.name}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n aria-invalid={(this.invalid === true).toString()}\n onInput={this.handleInput}\n onBlur={this.handleBlur}\n ref={(el: HTMLSelectElement) => {\n if (el !== null) this.input = el;\n }}\n >\n {(!this.placeholderHide || !this.valueExist) && ( // In case passed value does not match any option we display the placeholder\n <option value=\"\" disabled={this.placeholderDisabled && this.valueExist}>\n {this.placeholder}\n </option>\n )}\n {this.options.map(option =>\n isOptGroup(option) ? (\n <optgroup label={option.group} key={option.group}>\n {option.options.map(this.renderOption)}\n </optgroup>\n ) : (\n isOption(option) && this.renderOption(option)\n ),\n )}\n </select>\n )}\n </mg-input>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { H as Ht, q as qe, a as qt, X as Xt } from './index.es.js';
2
+ import { a as qt, q as qe, G as Gt, Y as Yt } from './index.es.js';
3
3
  import { d as defineCustomElement$4, c as classReadonly, a as classDisabled, w as widths } from './mg-input2.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$6 } from './mg-character-left2.js';
@@ -29,7 +29,7 @@ const isOption = (option) => typeof option === 'object' && typeof option.title =
29
29
  * @param options - Datalist options to check.
30
30
  * @returns True if datalist is well structured.
31
31
  */
32
- const isDatalistOptions = (options) => qt(options) || (Array.isArray(options) && options.every(isOption));
32
+ const isDatalistOptions = (options) => Gt(options) || (Array.isArray(options) && options.every(isOption));
33
33
  const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends HTMLElement {
34
34
  constructor() {
35
35
  super();
@@ -96,7 +96,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends H
96
96
  /**
97
97
  * Component classes
98
98
  */
99
- this.classCollection = new Ht(['mg-c-input--text']);
99
+ this.classCollection = new qt(['mg-c-input--text']);
100
100
  /**
101
101
  * Validate pattern configuration
102
102
  */
@@ -122,7 +122,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends H
122
122
  */
123
123
  this.handleFocus = () => {
124
124
  this.classCollection.add(this.classFocus);
125
- this.classCollection = new Ht(this.classCollection.classes);
125
+ this.classCollection = new qt(this.classCollection.classes);
126
126
  };
127
127
  /**
128
128
  * Handle blur event
@@ -130,7 +130,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends H
130
130
  this.handleBlur = () => {
131
131
  // Manage focus
132
132
  this.classCollection.delete(this.classFocus);
133
- this.classCollection = new Ht(this.classCollection.classes);
133
+ this.classCollection = new qt(this.classCollection.classes);
134
134
  // Display Error
135
135
  this.handlerInProgress = 'blur';
136
136
  this.displayError().finally(() => {
@@ -225,7 +225,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends H
225
225
  }
226
226
  validateDatalistoptions(newValue) {
227
227
  if (Boolean(newValue) && !isDatalistOptions(newValue)) {
228
- throw new Error(`<mg-input-text> prop "datalistoptions" values must be the same type, string or OptionType. Passed value: ${Xt(newValue)}.`);
228
+ throw new Error(`<mg-input-text> prop "datalistoptions" values must be the same type, string or OptionType. Passed value: ${Yt(newValue)}.`);
229
229
  }
230
230
  }
231
231
  watchReadonly(newValue) {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { H as Ht, q as qe, X as Xt } from './index.es.js';
2
+ import { a as qt, q as qe, Y as Yt } from './index.es.js';
3
3
  import { d as defineCustomElement$5, c as classReadonly, a as classDisabled, w as widths } from './mg-input2.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$7 } from './mg-character-left2.js';
@@ -77,7 +77,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class MgInputTextarea
77
77
  /**
78
78
  * Component classes
79
79
  */
80
- this.classCollection = new Ht(['mg-c-input--textarea']);
80
+ this.classCollection = new qt(['mg-c-input--textarea']);
81
81
  /**
82
82
  * Handle input event
83
83
  */
@@ -93,7 +93,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class MgInputTextarea
93
93
  */
94
94
  this.handleFocus = () => {
95
95
  this.classCollection.add(this.classFocus);
96
- this.classCollection = new Ht(this.classCollection.classes);
96
+ this.classCollection = new qt(this.classCollection.classes);
97
97
  };
98
98
  /**
99
99
  * Handle blur event
@@ -101,7 +101,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class MgInputTextarea
101
101
  this.handleBlur = () => {
102
102
  // Manage focus
103
103
  this.classCollection.delete(this.classFocus);
104
- this.classCollection = new Ht(this.classCollection.classes);
104
+ this.classCollection = new qt(this.classCollection.classes);
105
105
  // Display Error
106
106
  this.handlerInProgress = 'blur';
107
107
  this.displayError().finally(() => {
@@ -180,7 +180,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class MgInputTextarea
180
180
  }
181
181
  validatePattern(newValue) {
182
182
  if (newValue !== undefined && !(qe(this.pattern) && qe(this.patternErrorMessage))) {
183
- throw new Error(`<mg-input-textarea> props "pattern" and "patternErrorMessage" must be non-empty string and paired. Passed value: "pattern='${Xt(this.pattern)}'" and "patternErrorMessage='${Xt(this.patternErrorMessage)}'".`);
183
+ throw new Error(`<mg-input-textarea> props "pattern" and "patternErrorMessage" must be non-empty string and paired. Passed value: "pattern='${Yt(this.pattern)}'" and "patternErrorMessage='${Yt(this.patternErrorMessage)}'".`);
184
184
  }
185
185
  }
186
186
  validatecharacterLeftHide(newValue) {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
- import { q as qe, D as Dt, X as Xt } from './index.es.js';
2
+ import { q as qe, B as Bt, Y as Yt } from './index.es.js';
3
3
 
4
4
  const mgInputTitleCss = ".mg-u-form-legacy.sc-mg-input-title{--mg-c-form-inputs-title-width:calc(100% / 3 - 20px)}.mg-u-is-asterisk.sc-mg-input-title{color:var(--mg-b-color-danger)}legend.mg-c-input-title.sc-mg-input-title{padding-right:0;padding-left:0}.mg-c-input-title__required.sc-mg-input-title{display:var(--mg-c-input-title-display, unset)}";
5
5
 
@@ -20,8 +20,8 @@ const MgInputTitle = /*@__PURE__*/ proxyCustomElement(class MgInputTitle extends
20
20
  if (!qe(newValue)) {
21
21
  throw new Error('<mg-input-title> prop "identifier" is required.');
22
22
  }
23
- else if (!Dt(newValue)) {
24
- console.error(`<mg-input-title> prop "identifier" value is invalid. Passed value: ${Xt(newValue)}.`);
23
+ else if (!Bt(newValue)) {
24
+ console.error(`<mg-input-title> prop "identifier" value is invalid. Passed value: ${Yt(newValue)}.`);
25
25
  }
26
26
  }
27
27
  validateIsLegend(newValue) {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { H as Ht, X as Xt, a as qt, q as qe } from './index.es.js';
2
+ import { a as qt, Y as Yt, G as Gt, q as qe } from './index.es.js';
3
3
  import { d as defineCustomElement$5, c as classReadonly, a as classDisabled } from './mg-input2.js';
4
4
  import { d as defineCustomElement$6 } from './mg-icon2.js';
5
5
  import { d as defineCustomElement$4 } from './mg-input-title2.js';
@@ -64,7 +64,7 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class MgInputToggle ext
64
64
  /**
65
65
  * Component classes
66
66
  */
67
- this.classCollection = new Ht(['mg-c-input--toggle']);
67
+ this.classCollection = new qt(['mg-c-input--toggle']);
68
68
  /**
69
69
  * Checked internal value
70
70
  */
@@ -125,10 +125,10 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class MgInputToggle ext
125
125
  }
126
126
  validateItems(newValue) {
127
127
  if (typeof newValue === 'object' && this.items.length !== 2) {
128
- throw new Error(`<mg-input-toggle> prop "items" require 2 items. Passed value: ${Xt(newValue)}.`);
128
+ throw new Error(`<mg-input-toggle> prop "items" require 2 items. Passed value: ${Yt(newValue)}.`);
129
129
  }
130
130
  // String array
131
- else if (qt(newValue)) {
131
+ else if (Gt(newValue)) {
132
132
  this.options = newValue.map(item => ({ title: item, value: item }));
133
133
  }
134
134
  // Object array
@@ -136,7 +136,7 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class MgInputToggle ext
136
136
  this.options = newValue;
137
137
  }
138
138
  else {
139
- throw new Error(`<mg-input-toggle> prop "items" is required and all items must be the same type: ToggleValue. Passed value: ${Xt(newValue)}.`);
139
+ throw new Error(`<mg-input-toggle> prop "items" is required and all items must be the same type: ToggleValue. Passed value: ${Yt(newValue)}.`);
140
140
  }
141
141
  }
142
142
  watchIsOnOff(newValue) {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { q as qe, X as Xt, D as Dt } from './index.es.js';
2
+ import { q as qe, Y as Yt, B as Bt } from './index.es.js';
3
3
  import { d as defineCustomElement$4 } from './mg-icon2.js';
4
4
  import { d as defineCustomElement$3 } from './mg-input-title2.js';
5
5
  import { d as defineCustomElement$2 } from './mg-tooltip2.js';
@@ -72,10 +72,10 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
72
72
  }
73
73
  watchIdentifier(newValue) {
74
74
  if (!qe(newValue)) {
75
- throw new Error(`<mg-input> prop "identifier" is required and must be a string. Passed value: ${Xt(newValue)}.`);
75
+ throw new Error(`<mg-input> prop "identifier" is required and must be a string. Passed value: ${Yt(newValue)}.`);
76
76
  }
77
- else if (!Dt(newValue)) {
78
- console.error(`<mg-input> prop "identifier" value is invalid. Passed value: ${Xt(newValue)}.`);
77
+ else if (!Bt(newValue)) {
78
+ console.error(`<mg-input> prop "identifier" value is invalid. Passed value: ${Yt(newValue)}.`);
79
79
  }
80
80
  else {
81
81
  this.helpTextId = `${this.identifier}-help-text`;
@@ -97,7 +97,7 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
97
97
  }
98
98
  watchTooltipPosition(newValue) {
99
99
  if (!tooltipPositions.includes(newValue)) {
100
- throw new Error(`<mg-input> prop "tooltipPosition" must be one of: ${tooltipPositions.join(', ')}. Passed value: ${Xt(newValue)}.`);
100
+ throw new Error(`<mg-input> prop "tooltipPosition" must be one of: ${tooltipPositions.join(', ')}. Passed value: ${Yt(newValue)}.`);
101
101
  }
102
102
  }
103
103
  watchErrorMessage(newValue) {
@@ -167,7 +167,7 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
167
167
  // eslint-disable-next-line @stencil-community/no-unused-watch
168
168
  watchLabel() {
169
169
  if (!qe(this.label)) {
170
- throw new Error(`<mg-input> prop "label" is required and must be a string. Passed value: ${Xt(this.label)}.`);
170
+ throw new Error(`<mg-input> prop "label" is required and must be a string. Passed value: ${Yt(this.label)}.`);
171
171
  }
172
172
  else {
173
173
  this.watchAriaDescribedbyIDs();
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { X as Xt } from './index.es.js';
2
+ import { Y as Yt } from './index.es.js';
3
3
  import { d as defineCustomElement$4, a as directions, s as sizes } from './mg-menu-item2.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$8 } from './mg-badge2.js';
@@ -163,12 +163,12 @@ const MgMenu = /*@__PURE__*/ proxyCustomElement(class MgMenu extends HTMLElement
163
163
  }
164
164
  validateLabel(newValue) {
165
165
  if (newValue === undefined && !this.element.hasAttribute('aria-label')) {
166
- throw new Error(`<${this.name}> prop "label" is required. Passed value: ${Xt(newValue)}.`);
166
+ throw new Error(`<${this.name}> prop "label" is required. Passed value: ${Yt(newValue)}.`);
167
167
  }
168
168
  }
169
169
  validateDirection(newValue) {
170
170
  if (![directions.VERTICAL, directions.HORIZONTAL].includes(newValue)) {
171
- throw new Error(`<${this.name}> prop "direction" must be one of: ${directions.HORIZONTAL}, ${directions.VERTICAL}. Passed value: ${Xt(newValue)}.`);
171
+ throw new Error(`<${this.name}> prop "direction" must be one of: ${directions.HORIZONTAL}, ${directions.VERTICAL}. Passed value: ${Yt(newValue)}.`);
172
172
  }
173
173
  else {
174
174
  this.updateMenuItems();
@@ -184,7 +184,7 @@ const MgMenu = /*@__PURE__*/ proxyCustomElement(class MgMenu extends HTMLElement
184
184
  }
185
185
  validateSize(newValue) {
186
186
  if (!sizes.includes(newValue)) {
187
- throw new Error(`<${this.name}> prop "size" must be one of: ${sizes.join(', ')}. Passed value: ${Xt(newValue)}.`);
187
+ throw new Error(`<${this.name}> prop "size" must be one of: ${sizes.join(', ')}. Passed value: ${Yt(newValue)}.`);
188
188
  }
189
189
  }
190
190
  /**
@@ -355,17 +355,17 @@ const MgItemMore = /*@__PURE__*/ proxyCustomElement(class MgItemMore extends HTM
355
355
  }
356
356
  validateIcon(newValue) {
357
357
  if (typeof newValue !== 'object' || (typeof newValue === 'object' && typeof newValue.icon !== 'string'))
358
- throw new Error(`<${this.name}> prop "icon" must match MgItemMore['icon'] type. Passed value: ${Xt(newValue)}.`);
358
+ throw new Error(`<${this.name}> prop "icon" must match MgItemMore['icon'] type. Passed value: ${Yt(newValue)}.`);
359
359
  }
360
360
  validateSlotLabel(newValue) {
361
361
  if (typeof newValue !== 'object' || (typeof newValue === 'object' && typeof newValue.display !== 'boolean'))
362
- throw new Error(`<${this.name}> prop "slotlabel" must match MgItemMore['slotlabel'] type. Passed value: ${Xt(newValue)}.`);
362
+ throw new Error(`<${this.name}> prop "slotlabel" must match MgItemMore['slotlabel'] type. Passed value: ${Yt(newValue)}.`);
363
363
  else if (typeof newValue.label !== 'string')
364
364
  this.slotlabel.label = this.messages.menuLabel;
365
365
  }
366
366
  validateSize(newValue) {
367
367
  if (newValue && !sizes.includes(newValue))
368
- throw new Error(`<${this.name}> prop "size" must match MgItemMore['size'] type. Passed value: ${Xt(newValue)}.`);
368
+ throw new Error(`<${this.name}> prop "size" must match MgItemMore['size'] type. Passed value: ${Yt(newValue)}.`);
369
369
  }
370
370
  /*************
371
371
  * Lifecycle *
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
  import { i as initLocales } from './index2.js';
3
- import { q as qe, X as Xt } from './index.es.js';
3
+ import { q as qe, Y as Yt } from './index.es.js';
4
4
  import { d as defineCustomElement$1 } from './mg-icon2.js';
5
5
 
6
6
  const mgLoaderCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host{display:block}.mg-c-loader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--mg-b-size-4);text-align:center}";
@@ -17,7 +17,7 @@ const MgLoader = /*@__PURE__*/ proxyCustomElement(class MgLoader extends HTMLEle
17
17
  }
18
18
  watchMessage(newValue) {
19
19
  if (newValue && !qe(newValue))
20
- throw new Error(`<mg-loader> prop "message" must be a valid string. Passed value: ${Xt(newValue)}.`);
20
+ throw new Error(`<mg-loader> prop "message" must be a valid string. Passed value: ${Yt(newValue)}.`);
21
21
  }
22
22
  /*************
23
23
  * Lifecycle *