@mgdis/mg-components 6.17.0 → 6.18.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 (117) hide show
  1. package/dist/cjs/index-DCZEYvlH.js +4 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mg-action-more_37.cjs.entry.js +411 -168
  4. package/dist/cjs/mg-alert.cjs.entry.js +1 -1
  5. package/dist/cjs/mg-components.cjs.js +1 -1
  6. package/dist/cjs/mg-fieldset.cjs.entry.js +141 -0
  7. package/dist/cjs/mg-input-combobox.cjs.entry.js +71 -55
  8. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +33 -20
  9. package/dist/cjs/{mg-input.conf-WTsvDfpC.js → mg-input.conf-HYIzRsy7.js} +5 -0
  10. package/dist/cjs/mg-loader.cjs.entry.js +1 -1
  11. package/dist/cjs/mg-progress.cjs.entry.js +1 -1
  12. package/dist/collection/collection-manifest.json +1 -0
  13. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +4 -0
  14. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +178 -18
  15. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +1 -1
  16. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +36 -16
  17. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +78 -55
  18. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +41 -22
  19. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +32 -12
  20. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +30 -12
  21. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +31 -12
  22. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +40 -20
  23. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +31 -12
  24. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +44 -25
  25. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +31 -13
  26. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +36 -11
  27. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +5 -1
  28. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
  29. package/dist/collection/components/molecules/mg-alert/mg-alert.js +1 -1
  30. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  31. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +404 -0
  32. package/dist/collection/components/molecules/mg-form/mg-form.js +13 -4
  33. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +1 -1
  34. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  35. package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
  36. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  37. package/dist/collection/components/molecules/mg-panel/mg-panel.js +40 -9
  38. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  39. package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -1
  40. package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
  41. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  42. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
  43. package/dist/components/mg-action-more.js +1 -1
  44. package/dist/components/mg-alert.js +1 -1
  45. package/dist/components/mg-details.js +1 -1
  46. package/dist/components/mg-fieldset.d.ts +11 -0
  47. package/dist/components/mg-fieldset.js +209 -0
  48. package/dist/components/mg-form.js +4 -3
  49. package/dist/components/mg-illustrated-message.js +1 -1
  50. package/dist/components/mg-input-checkbox-paginated2.js +1 -1
  51. package/dist/components/mg-input-checkbox.js +28 -15
  52. package/dist/components/mg-input-combobox.js +71 -55
  53. package/dist/components/mg-input-date.js +33 -21
  54. package/dist/components/mg-input-numeric.js +24 -11
  55. package/dist/components/mg-input-password.js +22 -11
  56. package/dist/components/mg-input-radio.js +23 -11
  57. package/dist/components/mg-input-rich-text-editor.js +32 -19
  58. package/dist/components/mg-input-select2.js +24 -12
  59. package/dist/components/mg-input-text2.js +36 -24
  60. package/dist/components/mg-input-textarea.js +23 -12
  61. package/dist/components/mg-input-toggle.js +35 -10
  62. package/dist/components/mg-input2.js +117 -18
  63. package/dist/components/mg-item-more2.js +5 -1
  64. package/dist/components/mg-loader2.js +1 -1
  65. package/dist/components/mg-message2.js +2 -2
  66. package/dist/components/mg-modal.js +2 -2
  67. package/dist/components/mg-panel.js +36 -7
  68. package/dist/components/mg-popover-content2.js +1 -1
  69. package/dist/components/mg-popover2.js +1 -1
  70. package/dist/components/mg-progress.js +1 -1
  71. package/dist/components/mg-skip-links.js +1 -1
  72. package/dist/components/mg-tabs2.js +1 -1
  73. package/dist/esm/{index-WtiuOkLj.js → index-C7xjtdiw.js} +1 -1
  74. package/dist/esm/index-T6kOJXP1.js +4 -0
  75. package/dist/esm/loader.js +1 -1
  76. package/dist/esm/mg-action-more_37.entry.js +412 -169
  77. package/dist/esm/mg-alert.entry.js +2 -2
  78. package/dist/esm/mg-components.js +1 -1
  79. package/dist/esm/mg-fieldset.entry.js +139 -0
  80. package/dist/esm/mg-input-combobox.entry.js +72 -56
  81. package/dist/esm/mg-input-rich-text-editor.entry.js +34 -21
  82. package/dist/esm/{mg-input.conf-CNgv8hc5.js → mg-input.conf-D9V2v4n2.js} +5 -1
  83. package/dist/esm/mg-loader.entry.js +2 -2
  84. package/dist/esm/mg-progress.entry.js +2 -2
  85. package/dist/mg-components/mg-components.esm.js +1 -1
  86. package/dist/mg-components/p-2bab89c2.entry.js +1 -0
  87. package/dist/mg-components/{p-0e6b40d6.entry.js → p-5abc77cd.entry.js} +1 -1
  88. package/dist/mg-components/p-7d2e43b2.entry.js +1 -0
  89. package/dist/mg-components/{p-5dc3a1fb.entry.js → p-92e5e5a6.entry.js} +1 -1
  90. package/dist/mg-components/{p-c5da335e.entry.js → p-952288bd.entry.js} +1 -1
  91. package/dist/mg-components/{p-WtiuOkLj.js → p-C7xjtdiw.js} +1 -1
  92. package/dist/mg-components/p-D9V2v4n2.js +1 -0
  93. package/dist/mg-components/p-f2cddd52.entry.js +1 -0
  94. package/dist/mg-components/{p-397bf67b.entry.js → p-f6afaeb8.entry.js} +1 -1
  95. package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +5 -0
  96. package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +32 -1
  97. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +4 -3
  98. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +4 -2
  99. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +4 -2
  100. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +4 -2
  101. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +4 -2
  102. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +4 -2
  103. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +4 -2
  104. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +4 -2
  105. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +4 -2
  106. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +4 -2
  107. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +4 -2
  108. package/dist/types/components/molecules/mg-fieldset/mg-fieldset.d.ts +105 -0
  109. package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -1
  110. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +8 -1
  111. package/dist/types/components.d.ts +168 -18
  112. package/ide/intellij/web-types.json +272 -9
  113. package/ide/vscode/html-custom-data.json +243 -5
  114. package/package.json +15 -15
  115. package/dist/mg-components/p-8a69175b.entry.js +0 -1
  116. package/dist/mg-components/p-CNgv8hc5.js +0 -1
  117. package/dist/mg-components/p-d84d87ea.entry.js +0 -1
@@ -12,6 +12,7 @@ export class MgInputTextarea {
12
12
  this.classDisplayCharacterLeft = 'mg-c-input--display-character-left';
13
13
  // hasDisplayedError (triggered by blur event)
14
14
  this.hasDisplayedError = false;
15
+ this.customErrorMessage = { lock: false };
15
16
  /**
16
17
  * Input name
17
18
  * If not set the value equals the identifier
@@ -110,15 +111,16 @@ export class MgInputTextarea {
110
111
  };
111
112
  /**
112
113
  * Set input error message
113
- * @param errorMessage - errorMessage override
114
+ * @param fromSetErrorContext - context come from `setError` method
114
115
  */
115
- this.setErrorMessage = (errorMessage) => {
116
+ this.setErrorMessage = (fromSetErrorContext = false) => {
116
117
  // Set error message
117
118
  this.errorMessage = undefined;
118
- // Does not match pattern
119
+ // Does have a new custom error message
119
120
  if (!this.valid) {
120
- if (errorMessage !== undefined) {
121
- this.errorMessage = errorMessage;
121
+ // Does have a new custom error message OR does have a custom error message locked
122
+ if (fromSetErrorContext || (this.customErrorMessage.lock && this.customErrorMessage.message !== undefined)) {
123
+ this.errorMessage = this.customErrorMessage.message;
122
124
  }
123
125
  else if (!this.getPatternValidity()) {
124
126
  this.errorMessage = this.patternErrorMessage;
@@ -211,17 +213,22 @@ export class MgInputTextarea {
211
213
  * When used to set validity to `false`, you should use this method again to reset the validity to `true`.
212
214
  * @param valid - value indicating the validity
213
215
  * @param errorMessage - the error message to display
216
+ * @param errorMessageLock - lock the error message and validity state
214
217
  */
215
- async setError(valid, errorMessage) {
218
+ async setError(valid, errorMessage, errorMessageLock = false) {
216
219
  if (typeof valid !== 'boolean') {
217
220
  throw new Error('<mg-input-textarea> method "setError()" param "valid" must be a boolean.');
218
221
  }
219
- else if (!isValidString(errorMessage)) {
222
+ else if (errorMessage !== undefined && !isValidString(errorMessage)) {
220
223
  throw new Error('<mg-input-textarea> method "setError()" param "errorMessage" must be a string.');
221
224
  }
222
225
  else {
226
+ this.customErrorMessage = {
227
+ lock: valid ? false : errorMessageLock,
228
+ message: valid ? undefined : errorMessage,
229
+ };
223
230
  this.setValidity(valid);
224
- this.setErrorMessage(valid ? undefined : errorMessage);
231
+ this.setErrorMessage(true);
225
232
  this.hasDisplayedError = this.invalid;
226
233
  }
227
234
  }
@@ -239,6 +246,8 @@ export class MgInputTextarea {
239
246
  // - Keep everything in sync both inside and outside the component
240
247
  return new Promise(resolve => {
241
248
  requestAnimationFrame(() => {
249
+ // unlock validity check by reseting customErrorMessage
250
+ this.customErrorMessage = { lock: false };
242
251
  this.checkValidity();
243
252
  this.errorMessage = undefined;
244
253
  this.hasDisplayedError = false;
@@ -252,11 +261,13 @@ export class MgInputTextarea {
252
261
  * @param newValue - valid new value
253
262
  */
254
263
  setValidity(newValue) {
255
- const oldValidValue = this.valid;
256
- this.valid = newValue;
264
+ const oldValue = this.valid;
265
+ if (!this.customErrorMessage.lock || (this.customErrorMessage.message !== undefined && !newValue)) {
266
+ this.valid = newValue;
267
+ }
257
268
  this.invalid = !this.valid;
258
269
  // We need to send valid event even if it is the same value
259
- if (this.handlerInProgress === undefined || (this.handlerInProgress === 'blur' && this.valid !== oldValidValue))
270
+ if (this.handlerInProgress === undefined || (this.handlerInProgress === 'blur' && this.valid !== oldValue))
260
271
  this.inputValid.emit(this.valid);
261
272
  }
262
273
  /*************
@@ -289,7 +300,7 @@ export class MgInputTextarea {
289
300
  * @returns HTML Element
290
301
  */
291
302
  render() {
292
- return (h("mg-input", { key: 'e87320fe4d3c2c857751ddcc30fab470956b4ed2', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: this.characterLeftId, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, this.value)) : (h("div", { class: "mg-c-input__with-character-left" }, h("textarea", { class: {
303
+ return (h("mg-input", { key: '9b58ccb9f0b150f5de8cc9f895f4cdea2bbbeecd', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: this.characterLeftId, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, this.value)) : (h("div", { class: "mg-c-input__with-character-left" }, h("textarea", { class: {
293
304
  'mg-c-input__box': true,
294
305
  'mg-c-input__box--width': true,
295
306
  'mg-c-input__box--resizable': this.resizable === 'both',
@@ -845,7 +856,7 @@ export class MgInputTextarea {
845
856
  },
846
857
  "setError": {
847
858
  "complexType": {
848
- "signature": "(valid: MgInputTextarea[\"valid\"], errorMessage: string) => Promise<void>",
859
+ "signature": "(valid: MgInputTextarea[\"valid\"], errorMessage?: string, errorMessageLock?: boolean) => Promise<void>",
849
860
  "parameters": [{
850
861
  "name": "valid",
851
862
  "type": "boolean",
@@ -854,6 +865,10 @@ export class MgInputTextarea {
854
865
  "name": "errorMessage",
855
866
  "type": "string",
856
867
  "docs": "- the error message to display"
868
+ }, {
869
+ "name": "errorMessageLock",
870
+ "type": "boolean",
871
+ "docs": "- lock the error message and validity state"
857
872
  }],
858
873
  "references": {
859
874
  "Promise": {
@@ -875,6 +890,9 @@ export class MgInputTextarea {
875
890
  }, {
876
891
  "name": "param",
877
892
  "text": "errorMessage - the error message to display"
893
+ }, {
894
+ "name": "param",
895
+ "text": "errorMessageLock - lock the error message and validity state"
878
896
  }]
879
897
  }
880
898
  },
@@ -31,7 +31,9 @@ export class MgInputToggle {
31
31
  */
32
32
  this.labelHide = false;
33
33
  /**
34
- * Define if toggle have on/off style
34
+ * Define if toggle have on/off style,
35
+ * the left icon is hidden.
36
+ * Only available in combination with the "isIcon" prop.
35
37
  */
36
38
  this.isOnOff = false;
37
39
  /**
@@ -66,7 +68,7 @@ export class MgInputToggle {
66
68
  // Set error message
67
69
  this.errorMessage = undefined;
68
70
  // Does have a custom error message
69
- if (!this.valid && errorMessage !== undefined) {
71
+ if (!this.valid && typeof errorMessage === 'string') {
70
72
  this.errorMessage = errorMessage;
71
73
  }
72
74
  };
@@ -81,14 +83,31 @@ export class MgInputToggle {
81
83
  */
82
84
  this.validateSlots = () => {
83
85
  const slots = Array.from(this.element.children);
86
+ // validate slots
84
87
  if (slots.length !== 2) {
85
- throw new Error('<mg-input-toggle> 2 slots are required.');
88
+ if (this.isOnOff && this.isIcon) {
89
+ // ONLY slot="item-2" is required in with isOnOff && isIcon
90
+ if (this.element.querySelector('[slot="item-2"]') === null) {
91
+ throw new Error('<mg-input-toggle> an element with attribute slot="item-2" is required.');
92
+ }
93
+ }
94
+ else {
95
+ throw new Error('<mg-input-toggle> 2 slots are required.');
96
+ }
86
97
  }
87
- else if (!this.isIcon) {
98
+ // update slots
99
+ if (!this.isIcon) {
88
100
  // Due to text-overflow set to ellipsis
89
101
  // we need to ensure that slot element have title to display value on mouse over
90
102
  slots.forEach(slot => slot.setAttribute('title', slot.textContent));
91
103
  }
104
+ else {
105
+ slots.forEach(slot => {
106
+ if (slot.nodeName === 'MG-ICON') {
107
+ slot.size = 'small';
108
+ }
109
+ });
110
+ }
92
111
  };
93
112
  /**
94
113
  * Get checked item
@@ -129,10 +148,16 @@ export class MgInputToggle {
129
148
  }
130
149
  }
131
150
  watchIsOnOff(newValue) {
132
- if (newValue)
151
+ if (newValue) {
133
152
  this.classCollection.add(this.classOnOff);
134
- else
153
+ if (!this.isIcon) {
154
+ this.isOnOff = false;
155
+ console.warn('<mg-input-toggle> prop "isOnOff" must be used with "isIcon". Setting isOnOff to false.');
156
+ }
157
+ }
158
+ else {
135
159
  this.classCollection.delete(this.classOnOff);
160
+ }
136
161
  }
137
162
  watchIsIcon(newValue) {
138
163
  if (newValue)
@@ -180,7 +205,7 @@ export class MgInputToggle {
180
205
  if (typeof valid !== 'boolean') {
181
206
  throw new Error('<mg-input-toggle> method "setError()" param "valid" must be a boolean.');
182
207
  }
183
- else if (!isValidString(errorMessage)) {
208
+ else if (errorMessage !== undefined && !isValidString(errorMessage)) {
184
209
  throw new Error('<mg-input-toggle> method "setError()" param "errorMessage" must be a string.');
185
210
  }
186
211
  else {
@@ -257,7 +282,7 @@ export class MgInputToggle {
257
282
  */
258
283
  render() {
259
284
  const checkedItem = this.getCheckedItem(this.checked);
260
- return (h("mg-input", { key: '7611cffaf1c01e30c3fa7a27555f94ab357dd374', label: this.label, helpText: this.helpText, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, errorMessage: this.errorMessage }, this.readonly ? (checkedItem && h("b", { class: "mg-c-input__readonly-value" }, checkedItem.title)) : (h("button", { type: "button", role: "switch", "aria-checked": this.checked.toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-c-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.toggleChecked, ref: el => {
285
+ return (h("mg-input", { key: '4d87ed13bbd3d3a54303c21001247e1251417326', label: this.label, helpText: this.helpText, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, errorMessage: this.errorMessage }, this.readonly ? (checkedItem && h("b", { class: "mg-c-input__readonly-value" }, checkedItem.title)) : (h("button", { type: "button", role: "switch", "aria-checked": this.checked.toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-c-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.toggleChecked, ref: el => {
261
286
  if (el !== null)
262
287
  this.button = el;
263
288
  } }, h("span", { "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { name: "item-1" })), h("span", { "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { name: "item-2" }))))));
@@ -418,7 +443,7 @@ export class MgInputToggle {
418
443
  },
419
444
  "isOnOff": {
420
445
  "type": "boolean",
421
- "mutable": false,
446
+ "mutable": true,
422
447
  "complexType": {
423
448
  "original": "boolean",
424
449
  "resolved": "boolean",
@@ -428,7 +453,7 @@ export class MgInputToggle {
428
453
  "optional": false,
429
454
  "docs": {
430
455
  "tags": [],
431
- "text": "Define if toggle have on/off style"
456
+ "text": "Define if toggle have on/off style,\nthe left icon is hidden.\nOnly available in combination with the \"isIcon\" prop."
432
457
  },
433
458
  "getter": false,
434
459
  "setter": false,
@@ -630,7 +655,7 @@ export class MgInputToggle {
630
655
  },
631
656
  "setError": {
632
657
  "complexType": {
633
- "signature": "(valid: boolean, errorMessage: string) => Promise<void>",
658
+ "signature": "(valid: boolean, errorMessage?: string) => Promise<void>",
634
659
  "parameters": [{
635
660
  "name": "valid",
636
661
  "type": "boolean",
@@ -102,6 +102,10 @@ export class MgMenu {
102
102
  * @param event - mg-item-loaded "item-loaded" custom event
103
103
  */
104
104
  updateItemListener(event) {
105
+ // `<mg-action-more>` element doesn't need `data-has-focus` attribute
106
+ if (event.target.nodeName === 'MG-ACTION-MORE') {
107
+ return;
108
+ }
105
109
  const itemToWatch = event.target.nodeName === 'MG-ITEM-MORE' ? event.target.shadowRoot.querySelector('mg-menu-item') : event.target;
106
110
  ['click', 'focus'].forEach(trigger => {
107
111
  itemToWatch.addEventListener(trigger, () => {
@@ -162,7 +166,7 @@ export class MgMenu {
162
166
  * @returns HTML Element
163
167
  */
164
168
  render() {
165
- return (h(Host, { key: '45bdad3db5dff4700f51152b94682e5df1997dbf', role: "list", "aria-label": this.label }, h("slot", { key: '43c48419f51b58ec2ee9cec3cf3e5a7e21994a4d' })));
169
+ return (h(Host, { key: '753833b01b86d6983f5d063f5598e2187b147a6e', role: "list", "aria-label": this.label }, h("slot", { key: '56702e49f5a97feddeb66e6271bd898061aa0d48' })));
166
170
  }
167
171
  static get is() { return "mg-menu"; }
168
172
  static get encapsulation() { return "shadow"; }
@@ -141,7 +141,7 @@ export class MgActionMore {
141
141
  [`${this.classBase}__chevron--rotate`]: this.expanded === true,
142
142
  } }, h("mg-icon", { icon: "chevron-down" })));
143
143
  }
144
- return (h(Host, { key: 'f1b9e6e54f933a049628067993400d3a31d15710', "data-mg-popover-guard": this.mgPopoverIdentifier }, h("span", { key: '081b89284d5234f24e6073dcd9bf4088fd5a86b8', class: this.classBase }, h("mg-popover", { key: '0e6c50bc3bcb07f72507571de9fdda90226d2163', identifier: this.mgPopoverIdentifier, display: this.expanded, "onDisplay-change": this.handleDisplayChange }, h("mg-button", { key: 'ab4a385069e0a33fe9d5bc026c98160eb4ec1dfa', variant: this.button.variant, isIcon: this.button.isIcon, disabled: this.button.disabled, type: "button", label: buttonLabel, onClick: this.handleButton }, this.icon && h("mg-icon", Object.assign({ key: 'e9dc31c07c3c0f474cea70f5eeda36707d101e85' }, this.icon)), !this.button.isIcon && buttonContent), h("div", { key: '201666b0bf5513e3360c3cc960e6cd6cd565dda1', slot: "content" }, h("mg-menu", { key: '3b0d56d9779b5bcaad31c714586dcda81bc550fa', direction: directions.VERTICAL, label: this.messages.label }, this.items.map(item => {
144
+ return (h(Host, { key: 'd75e1a5326ea3a1414f8048858e5ee3fee51760e', "data-mg-popover-guard": this.mgPopoverIdentifier }, h("span", { key: 'b671a6c35cb3a9fa6eb7b2329f0f595e78b573b5', class: this.classBase }, h("mg-popover", { key: '38a38123d34ca868d0587123c2ab6b11550da8f0', identifier: this.mgPopoverIdentifier, display: this.expanded, "onDisplay-change": this.handleDisplayChange }, h("mg-button", { key: '030b9360917b79edfc8df325d5ca5cfa08356c81', variant: this.button.variant, isIcon: this.button.isIcon, disabled: this.button.disabled, type: "button", label: buttonLabel, onClick: this.handleButton }, this.icon && h("mg-icon", Object.assign({ key: 'a47ca6b078ca160d1cbb13c964df3abede5f373c' }, this.icon)), !this.button.isIcon && buttonContent), h("div", { key: 'ac38c705625cb5716a7e8aabd25d596db3d5adef', slot: "content" }, h("mg-menu", { key: 'cd382a65f69ba3c303a74d6b7444fcf0ccf9d1c5', direction: directions.VERTICAL, label: this.messages.label }, this.items.map(item => {
145
145
  var _a, _b;
146
146
  return isMgActionMoreDivider(item) ? (h("mg-divider", { class: "mg-c-action-more__divider", key: "divider", "full-width": true })) : (h("mg-menu-item", { key: item.label, status: item.status || Status.VISIBLE, target: item.target, href: item.href,
147
147
  // eslint-disable-next-line react/jsx-no-bind
@@ -142,7 +142,7 @@ export class MgAlert {
142
142
  * @returns HTML Element
143
143
  */
144
144
  render() {
145
- return (h("mg-message", { key: '626afcfe4c86dacff9860d2515827ae5aa6b7234', class: this.classCollection.join(), role: ['info', 'success'].includes(this.variant) ? 'status' : 'alert', variant: this.variant, variantStyle: this.variantStyle }, h("slot", { key: 'bc7d72c21dcf36c9012e144253ce2b3c6ebc14ed' }), this.hasActions ? (h("span", { slot: "actions" }, h("slot", { name: "actions" }))) : (h("span", { class: "mg-c-alert__close-button" }, h("mg-button", { "is-icon": true, variant: "flat", label: this.messages.alert.closeButton, onClick: this.handleClose }, h("mg-icon", { icon: "cross" }))))));
145
+ return (h("mg-message", { key: '4b974a10812e527a2c481ec00f22324ab490a135', class: this.classCollection.join(), role: ['info', 'success'].includes(this.variant) ? 'status' : 'alert', variant: this.variant, variantStyle: this.variantStyle }, h("slot", { key: '9133a3cca56d67e75e8c3f018c52838c31e908f2' }), this.hasActions ? (h("span", { slot: "actions" }, h("slot", { name: "actions" }))) : (h("span", { class: "mg-c-alert__close-button" }, h("mg-button", { "is-icon": true, variant: "flat", label: this.messages.alert.closeButton, onClick: this.handleClose }, h("mg-icon", { icon: "cross" }))))));
146
146
  }
147
147
  static get is() { return "mg-alert"; }
148
148
  static get encapsulation() { return "shadow"; }
@@ -53,7 +53,7 @@ export class MgDetails {
53
53
  * @returns HTML Element
54
54
  */
55
55
  render() {
56
- return (h("details", { key: '4da17afd7a964a14b5b101bcfadc241be569d55a', class: { 'mg-c-details': true, 'mg-c-details--empty-summary': this.isEmptySummary }, onToggle: this.handleToggle, open: this.expanded, ref: (el) => (this.details = el) }, h("summary", { key: '515d6c4e117b547fe80a310fb90e114900f645e8' }, h("slot", { key: '0c9c0dcc47dd418e34e541d878bfc03ca137c68d', name: "summary" }), h("span", { key: 'c94f52994843b10c1161c0d85f38f8cb917ea806', class: "mg-c-details__toggle" }, h("mg-icon", { key: '9421452572af3deb03146a8dfd189369b249ba2d', icon: "chevron-up", class: { 'mg-c-details__toggle-icon': true, 'mg-c-details__toggle-icon--reverse': !this.expanded } }), h("span", { key: 'dbfb0b34da00e37f55ec07236611c2babdd6b7c5', class: { 'mg-u-visually-hidden': this.hideSummary } }, this.expanded ? this.toggleOpened : this.toggleClosed))), h("div", { key: '1b18b65a98e39a8663fa5d7e51eef5fbe2b92f76', class: "mg-c-details__details" }, h("slot", { key: '81c213594b1b67747db439624090784eaa5e6fcd', name: "details" }))));
56
+ return (h("details", { key: 'bbaac6909fa5f3fbd3236b2a8ace0f7c80b2580b', class: { 'mg-c-details': true, 'mg-c-details--empty-summary': this.isEmptySummary }, onToggle: this.handleToggle, open: this.expanded, ref: (el) => (this.details = el) }, h("summary", { key: '2ed8228b63403dd9b386bf3fa70c9094516b6f0e' }, h("slot", { key: '5461d77d2b2869b14737a5c7cfc40a1f9584ee03', name: "summary" }), h("span", { key: 'bb089365bdeaa7b934b97cff6f5f7c67587048e1', class: "mg-c-details__toggle" }, h("mg-icon", { key: 'dc1a30338703ad4182d50f9953a903ae0f68ecb1', icon: "chevron-up", class: { 'mg-c-details__toggle-icon': true, 'mg-c-details__toggle-icon--reverse': !this.expanded } }), h("span", { key: 'a32cbaf9e38b71540deeaa8980895c34a7288ecb', class: { 'mg-u-visually-hidden': this.hideSummary } }, this.expanded ? this.toggleOpened : this.toggleClosed))), h("div", { key: 'b9c2bc7d681da8ac8b4dec5ff25287bc68975fb6', class: "mg-c-details__details" }, h("slot", { key: '069f05b4c133ff13055681e0b05bb98744303137', name: "details" }))));
57
57
  }
58
58
  static get is() { return "mg-details"; }
59
59
  static get encapsulation() { return "shadow"; }