@mgdis/mg-components 6.21.0 → 6.22.1

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 (177) hide show
  1. package/dist/cjs/{index-CCsGMNyq.js → index-BxB20_Vw.js} +8 -0
  2. package/dist/cjs/{index-C2viYwrR.js → index-Dz2LAZQT.js} +329 -1789
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/{mg-action-more_37.cjs.entry.js → mg-action-more_36.cjs.entry.js} +200 -242
  5. package/dist/cjs/mg-alert.cjs.entry.js +3 -3
  6. package/dist/cjs/mg-breadcrumb.cjs.entry.js +63 -0
  7. package/dist/cjs/mg-components.cjs.js +3 -3
  8. package/dist/cjs/mg-fieldset.cjs.entry.js +2 -2
  9. package/dist/cjs/mg-input-combobox.cjs.entry.js +4 -4
  10. package/dist/cjs/mg-input-file.cjs.entry.js +4 -4
  11. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +40095 -15808
  12. package/dist/cjs/mg-loader.cjs.entry.js +3 -3
  13. package/dist/cjs/mg-progress.cjs.entry.js +2 -2
  14. package/dist/collection/assets/icons/index.js +1 -1
  15. package/dist/collection/collection-manifest.json +4 -3
  16. package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +1 -1
  17. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +1 -1
  18. package/dist/collection/components/atoms/mg-badge/mg-badge.js +2 -1
  19. package/dist/collection/components/atoms/mg-button/mg-button.js +6 -3
  20. package/dist/collection/components/atoms/mg-card/mg-card.js +3 -2
  21. package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -1
  22. package/dist/collection/components/atoms/mg-icon/mg-icon.js +10 -6
  23. package/dist/collection/components/atoms/mg-tag/mg-tag.js +3 -2
  24. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +1 -1
  25. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +3 -2
  26. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +5 -3
  27. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +2 -2
  28. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +38 -0
  29. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +3 -2
  30. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +47 -26
  31. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +13 -7
  32. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +3 -2
  33. package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +4 -3
  34. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +9 -5
  35. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +6 -4
  36. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +5 -3
  37. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/custom-properties.scss +212 -0
  38. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.js +1 -0
  39. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js +300 -94
  40. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.js +29 -0
  41. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +164 -51
  42. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +22 -8
  43. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +12 -7
  44. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +5 -3
  45. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +7 -4
  46. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +7 -38
  47. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.conf.js +0 -4
  48. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +24 -44
  49. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +69 -40
  50. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -7
  51. package/dist/collection/components/molecules/mg-alert/mg-alert.js +5 -3
  52. package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.conf.js +1 -0
  53. package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +93 -0
  54. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  55. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +3 -2
  56. package/dist/collection/components/molecules/mg-form/mg-form.js +5 -3
  57. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +5 -3
  58. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  59. package/dist/collection/components/molecules/mg-message/mg-message.js +6 -4
  60. package/dist/collection/components/molecules/mg-modal/mg-modal.js +4 -3
  61. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -1
  62. package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -3
  63. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  64. package/dist/collection/components/molecules/mg-popover/mg-popover.js +3 -2
  65. package/dist/collection/components/molecules/mg-progress/mg-progress.js +3 -2
  66. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
  67. package/dist/collection/components/molecules/mg-table/mg-table.js +41 -2
  68. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +0 -4
  69. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +15 -34
  70. package/dist/collection/locales/en/messages.json +3 -0
  71. package/dist/collection/locales/fr/messages.json +3 -0
  72. package/dist/components/index2.js +1 -1
  73. package/dist/components/index3.js +1 -1
  74. package/dist/components/mg-action-more.js +1 -1
  75. package/dist/components/mg-alert.js +1 -1
  76. package/dist/components/mg-breadcrumb.d.ts +11 -0
  77. package/dist/components/mg-breadcrumb.js +1 -0
  78. package/dist/components/mg-card2.js +1 -1
  79. package/dist/components/mg-character-left2.js +1 -1
  80. package/dist/components/mg-details.js +1 -1
  81. package/dist/components/mg-divider2.js +1 -1
  82. package/dist/components/mg-fieldset.js +1 -1
  83. package/dist/components/mg-form.js +1 -1
  84. package/dist/components/mg-icon2.js +1 -1
  85. package/dist/components/mg-illustrated-message.js +1 -1
  86. package/dist/components/mg-input-checkbox.js +1 -1
  87. package/dist/components/mg-input-combobox.js +1 -1
  88. package/dist/components/mg-input-date.js +1 -1
  89. package/dist/components/mg-input-file.js +1 -1
  90. package/dist/components/mg-input-numeric.js +1 -1
  91. package/dist/components/mg-input-password.js +1 -1
  92. package/dist/components/mg-input-radio.js +1 -1
  93. package/dist/components/mg-input-rich-text-editor.js +1663 -1
  94. package/dist/components/mg-input-select2.js +1 -1
  95. package/dist/components/mg-input-text2.js +1 -1
  96. package/dist/components/mg-input-textarea.js +1 -1
  97. package/dist/components/mg-input-title2.js +1 -1
  98. package/dist/components/mg-input-toggle.js +1 -1
  99. package/dist/components/mg-input2.js +1 -1
  100. package/dist/components/mg-item-more2.js +1 -1
  101. package/dist/components/mg-loader2.js +1 -1
  102. package/dist/components/mg-menu-item2.js +1 -1
  103. package/dist/components/mg-message2.js +1 -1
  104. package/dist/components/mg-modal.js +1 -1
  105. package/dist/components/mg-panel.js +1 -1
  106. package/dist/components/mg-popover-content2.js +1 -1
  107. package/dist/components/mg-popover2.js +1 -1
  108. package/dist/components/mg-progress.js +1 -1
  109. package/dist/components/mg-skip-links.js +1 -1
  110. package/dist/components/mg-table.js +1 -1
  111. package/dist/components/mg-tabs2.js +1 -1
  112. package/dist/components/mg-tag.js +1 -1
  113. package/dist/components/mg-tooltip-content2.js +1 -1
  114. package/dist/components/mg-tooltip2.js +1 -1
  115. package/dist/esm/{index-DFwaH2hS.js → index-C3jUhxdI.js} +329 -1789
  116. package/dist/esm/{index-D-uaxCxH.js → index-DSEloqPn.js} +8 -0
  117. package/dist/esm/loader.js +3 -3
  118. package/dist/esm/{mg-action-more_37.entry.js → mg-action-more_36.entry.js} +202 -243
  119. package/dist/esm/mg-alert.entry.js +3 -3
  120. package/dist/esm/mg-breadcrumb.entry.js +61 -0
  121. package/dist/esm/mg-components.js +4 -4
  122. package/dist/esm/mg-fieldset.entry.js +2 -2
  123. package/dist/esm/mg-input-combobox.entry.js +4 -4
  124. package/dist/esm/mg-input-file.entry.js +4 -4
  125. package/dist/esm/mg-input-rich-text-editor.entry.js +40082 -15795
  126. package/dist/esm/mg-loader.entry.js +3 -3
  127. package/dist/esm/mg-progress.entry.js +2 -2
  128. package/dist/mg-components/locales/en/messages.json +3 -0
  129. package/dist/mg-components/locales/fr/messages.json +3 -0
  130. package/dist/mg-components/mg-components.esm.js +1 -1
  131. package/dist/mg-components/{p-6b57f249.entry.js → p-06fbdb2f.entry.js} +1 -1
  132. package/dist/mg-components/{p-c3d116b9.entry.js → p-188b9ca9.entry.js} +1 -1
  133. package/dist/mg-components/p-4667078d.entry.js +1 -0
  134. package/dist/mg-components/p-5a859ecf.entry.js +1658 -0
  135. package/dist/mg-components/p-661da56b.entry.js +1 -0
  136. package/dist/mg-components/{p-988c282e.entry.js → p-8e256086.entry.js} +1 -1
  137. package/dist/mg-components/p-C3jUhxdI.js +2 -0
  138. package/dist/mg-components/p-DSEloqPn.js +1 -0
  139. package/dist/mg-components/{p-6b655830.entry.js → p-b0b8c58f.entry.js} +1 -1
  140. package/dist/mg-components/{p-dd1934f4.entry.js → p-bbcef41c.entry.js} +1 -1
  141. package/dist/mg-components/{p-4175dcbe.entry.js → p-c1aeb277.entry.js} +1 -1
  142. package/dist/types/assets/icons/index.d.ts +2 -0
  143. package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +1 -1
  144. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +2 -2
  145. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.d.ts +8 -0
  146. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +16 -8
  147. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -5
  148. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.d.ts +17 -0
  149. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/index.d.ts +27 -19
  150. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.d.ts +3 -0
  151. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +48 -14
  152. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +1 -1
  153. package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.conf.d.ts +0 -5
  154. package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.d.ts +1 -6
  155. package/dist/types/components/molecules/menus/mg-menu/mg-menu.conf.d.ts +2 -10
  156. package/dist/types/components/molecules/menus/mg-menu/mg-menu.d.ts +7 -7
  157. package/dist/types/components/molecules/menus/mg-menu-item/mg-menu-item.d.ts +12 -8
  158. package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.conf.d.ts +18 -0
  159. package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.d.ts +34 -0
  160. package/dist/types/components/molecules/mg-table/mg-table.d.ts +6 -0
  161. package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +1 -9
  162. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +4 -4
  163. package/dist/types/components.d.ts +617 -207
  164. package/dist/types/stencil-public-runtime.d.ts +52 -2
  165. package/ide/intellij/web-types.json +143 -55
  166. package/ide/vscode/css-custom-data.json +10 -2
  167. package/ide/vscode/html-custom-data.json +113 -34
  168. package/package.json +24 -23
  169. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +0 -245
  170. package/dist/components/mg-input-checkbox-paginated.d.ts +0 -11
  171. package/dist/components/mg-input-checkbox-paginated.js +0 -1
  172. package/dist/components/mg-input-checkbox-paginated2.js +0 -1
  173. package/dist/mg-components/p-08fa327b.entry.js +0 -1
  174. package/dist/mg-components/p-D-uaxCxH.js +0 -1
  175. package/dist/mg-components/p-DFwaH2hS.js +0 -2
  176. package/dist/mg-components/p-a79b1f19.entry.js +0 -1
  177. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +0 -77
@@ -7,7 +7,3 @@ export const Status = {
7
7
  DISABLED: 'disabled',
8
8
  ACTIVE: 'active',
9
9
  };
10
- /**
11
- * List of all possibles sizes
12
- */
13
- export const sizes = ['medium', 'large'];
@@ -1,6 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { createID, ClassList, allItemsAreString, isValidString, nextTick, toString, isValideID } from "@mgdis/core-ui-helpers/dist/utils";
3
- import { sizes, Status } from "./mg-tabs.conf";
3
+ import { Status } from "./mg-tabs.conf";
4
4
  import { Keys } from "../../../utils/events.utils";
5
5
  /**
6
6
  * type TabItem validation function
@@ -25,10 +25,6 @@ export class MgTabs {
25
25
  * If not set, it will be created.
26
26
  */
27
27
  this.identifier = createID('mg-tabs');
28
- /**
29
- * Define tabs size
30
- */
31
- this.size = 'medium';
32
28
  /**
33
29
  * Component tabs
34
30
  */
@@ -160,12 +156,6 @@ export class MgTabs {
160
156
  throw new Error(`<mg-tabs> prop "label" is required and must be a string. Passed value: ${toString(newValue)}.`);
161
157
  }
162
158
  }
163
- validateSize(newValue) {
164
- if (!sizes.includes(newValue)) {
165
- throw new Error(`<mg-tabs> prop "size" must be one of: ${sizes.join(', ')}. Passed value: ${toString(newValue)}.`);
166
- }
167
- this.classCollection.add(`mg-c-tabs--size-${this.size}`);
168
- }
169
159
  validateItems(newValue) {
170
160
  // String array
171
161
  if (allItemsAreString(newValue))
@@ -214,7 +204,6 @@ export class MgTabs {
214
204
  this.validateLabel(this.label);
215
205
  this.validateItems(this.items);
216
206
  this.validateActiveTab(this.activeTab);
217
- this.validateSize(this.size);
218
207
  this.validateSlots();
219
208
  }
220
209
  /**
@@ -234,13 +223,13 @@ export class MgTabs {
234
223
  * @returns HTML Element
235
224
  */
236
225
  render() {
237
- return (h("div", { key: '06dd97d9d4e77f606dee3c4a8960b51265345666', class: this.classCollection.join() }, h("header", { key: 'ea3771bdfe8576bb8b443823a2c338a51ed3ba69', role: "tablist", "aria-label": this.label, class: "mg-c-tabs__header" }, this.tabs.map((tab, index) => (h("button", { key: tab.label, role: "tab", id: this.getElementId(this.identifier, index), class: {
226
+ return (h("div", { key: 'c58c255ddffc83ad6d911d37f626bcadaea61747', class: this.classCollection.join() }, h("header", { key: 'ba6d581a4a8bc4338d6341372c267a28df882113', role: "tablist", "aria-label": this.label, class: "mg-c-tabs__header" }, this.tabs.map((tab, index) => (h("button", { key: tab.label, role: "tab", id: this.getElementId(this.identifier, index), class: {
238
227
  [`${this.buttonTabBaseClass}`]: true,
239
228
  [`${this.buttonTabBaseClass}--horizontal`]: true,
240
229
  [`${this.getNavigationButtonClass(Status.ACTIVE)}`]: this.tabHasStatus(tab, Status.ACTIVE),
241
230
  [`${this.getNavigationButtonClass(Status.DISABLED)}`]: this.tabHasStatus(tab, Status.DISABLED),
242
231
  [`${this.getNavigationButtonClass(Status.HIDDEN)}`]: this.tabHasStatus(tab, Status.HIDDEN),
243
- }, tabindex: this.tabHasStatus(tab, Status.ACTIVE) ? 0 : -1, "aria-selected": this.tabHasStatus(tab, Status.ACTIVE).toString(), "aria-controls": this.getElementId(this.tabPanel, index), "aria-disabled": this.tabHasStatus(tab, Status.DISABLED), onClick: this.handleClick, onKeyDown: this.handleKeydown, "data-index": this.getTabItemIndex(index) }, tab.icon !== undefined && h("mg-icon", { icon: tab.icon }), tab.label, tab.badge !== undefined && h("mg-badge", { variant: "text-color", value: tab.badge.value, label: tab.badge.label, outline: tab.badge.role === 'information' }))))), this.tabs.map((tab, index) => (h("article", { key: tab.label, role: "tabpanel", id: this.getElementId(this.tabPanel, index), hidden: !this.tabHasStatus(tab, Status.ACTIVE), "aria-labelledby": this.getElementId(this.identifier, index), tabindex: this.tabHasStatus(tab, Status.ACTIVE) ? 0 : -1, class: "mg-c-tabs__content-container" }, h("slot", { name: this.getElementId('tab_content', index) }))))));
232
+ }, tabindex: this.tabHasStatus(tab, Status.ACTIVE) ? 0 : -1, "aria-selected": this.tabHasStatus(tab, Status.ACTIVE).toString(), "aria-controls": this.getElementId(this.tabPanel, index), "aria-disabled": this.tabHasStatus(tab, Status.DISABLED), onClick: this.handleClick, onKeyDown: this.handleKeydown, "data-index": this.getTabItemIndex(index) }, tab.icon !== undefined && h("mg-icon", { icon: tab.icon, size: "small" }), tab.label, tab.badge !== undefined && h("mg-badge", { variant: "text-color", value: tab.badge.value, label: tab.badge.label, outline: tab.badge.role === 'information' }))))), this.tabs.map((tab, index) => (h("article", { key: tab.label, role: "tabpanel", id: this.getElementId(this.tabPanel, index), hidden: !this.tabHasStatus(tab, Status.ACTIVE), "aria-labelledby": this.getElementId(this.identifier, index), tabindex: this.tabHasStatus(tab, Status.ACTIVE) ? 0 : -1, class: "mg-c-tabs__content-container" }, h("slot", { name: this.getElementId('tab_content', index) }))))));
244
233
  }
245
234
  static get is() { return "mg-tabs"; }
246
235
  static get encapsulation() { return "shadow"; }
@@ -296,30 +285,24 @@ export class MgTabs {
296
285
  "attribute": "label"
297
286
  },
298
287
  "size": {
299
- "type": "string",
288
+ "type": "unknown",
300
289
  "mutable": false,
301
290
  "complexType": {
302
- "original": "SizeType",
303
- "resolved": "\"large\" | \"medium\"",
304
- "references": {
305
- "SizeType": {
306
- "location": "import",
307
- "path": "./mg-tabs.conf",
308
- "id": "src/components/molecules/mg-tabs/mg-tabs.conf.ts::SizeType"
309
- }
310
- }
291
+ "original": "never",
292
+ "resolved": "never",
293
+ "references": {}
311
294
  },
312
295
  "required": false,
313
296
  "optional": false,
314
297
  "docs": {
315
- "tags": [],
316
- "text": "Define tabs size"
298
+ "tags": [{
299
+ "name": "deprecated",
300
+ "text": "this prop is deprecated and will be removed in future releases. Please use CSS custom properties to set the size of tabs items."
301
+ }],
302
+ "text": "Size of the tabs items."
317
303
  },
318
304
  "getter": false,
319
- "setter": false,
320
- "reflect": false,
321
- "attribute": "size",
322
- "defaultValue": "'medium'"
305
+ "setter": false
323
306
  },
324
307
  "items": {
325
308
  "type": "unknown",
@@ -331,7 +314,8 @@ export class MgTabs {
331
314
  "TabItem": {
332
315
  "location": "import",
333
316
  "path": "./mg-tabs.conf",
334
- "id": "src/components/molecules/mg-tabs/mg-tabs.conf.ts::TabItem"
317
+ "id": "src/components/molecules/mg-tabs/mg-tabs.conf.ts::TabItem",
318
+ "referenceLocation": "TabItem"
335
319
  }
336
320
  }
337
321
  },
@@ -402,9 +386,6 @@ export class MgTabs {
402
386
  }, {
403
387
  "propName": "label",
404
388
  "methodName": "validateLabel"
405
- }, {
406
- "propName": "size",
407
- "methodName": "validateSize"
408
389
  }, {
409
390
  "propName": "items",
410
391
  "methodName": "validateItems"
@@ -122,6 +122,9 @@
122
122
  "skipLinks": {
123
123
  "navLabel": "Quick access"
124
124
  },
125
+ "breadcrumb": {
126
+ "label": "Breadcrumb"
127
+ },
125
128
  "general": {
126
129
  "confirm": "Confirm",
127
130
  "cancel": "Cancel",
@@ -122,6 +122,9 @@
122
122
  "skipLinks": {
123
123
  "navLabel": "Accès rapide"
124
124
  },
125
+ "breadcrumb": {
126
+ "label": "Fil d'Ariane"
127
+ },
125
128
  "general": {
126
129
  "confirm": "Valider",
127
130
  "cancel": "Annuler",
@@ -1 +1 @@
1
- class t{classes;constructor(t=[]){this.classes=t}add=t=>{this.has(t)||this.classes.push(t)};delete=t=>{const s=this.classes.indexOf(t);s>-1&&this.classes.splice(s,1)};has=t=>this.classes.includes(t);join=()=>this.classes.join(" ")}const s=t=>"object"==typeof t&&!Array.isArray(t)&&null!==t,e=(t,r,i)=>{if(!s(t)||"string"!=typeof r)return i;const[n,...o]=r.split(".");return o.length?e(t[n],o.join("."),i):t[n]??i},r=t=>Array.isArray(t)&&t.every((t=>"string"==typeof t)),i=t=>"string"==typeof t&&""!==t.trim(),n=t=>"object"==typeof t?JSON.stringify(t):String(t),o=t=>"string"==typeof t?t.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):t,a=(t="",s=10)=>{const e=new Uint8Array(s);crypto.getRandomValues(e);const r=Array.from(e).map((t=>t.toString(16).padStart(2,"0"))).join("").slice(0,s);return""!==t?`${t}-${r}`:r},h=t=>i(t)&&null!==/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(t),f=t=>{let e;return"string"==typeof t?e=t:Boolean(t)&&"object"==typeof t&&(s(t)||Array.isArray(t))?e=JSON.stringify(t):null!=t&&"boolean"!=typeof t&&"object"!=typeof t&&(e=String(t)),e?e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((t,s)=>(s>0?"-":"")+t.toLowerCase())).replace(/[^a-z0-9-]+/g,"-").replace(/--+/g,"-").replace(/(?:^-)|(?:-$)/g,""):e},u=async t=>{if(t)return t()},c={FIRST:"first",NEXT:"next",PREVIOUS:"previous",LAST:"last"};class y{items=[];total;top=10;next;baseIndex=1;constructor(t){if(!s(t))throw new Error("Page - init must match IPage type.");Array.isArray(t.items)&&(this.items=t.items),"number"==typeof t.top&&(this.top=t.top),this.total="number"==typeof t.total?t.total:this.items.length,this.next=t.next}getIndexFromCursor=(t="first",s)=>{if(!Array.isArray(this.items)||!this.items.length)return null;const e=this.items.length-this.baseIndex;let r,i=0;if(["previous","next"].includes(t)&&s){const t=this.items.findIndex((t=>JSON.stringify(t)===JSON.stringify(s)));if(-1===t)return 0;i=t}return r="first"===t?0:"last"===t?e:"previous"===t?JSON.stringify(this.items[i])===JSON.stringify(this.items[0])?e:i-this.baseIndex:"next"===t?JSON.stringify(this.items[i])===JSON.stringify(this.items[e])?0:i+this.baseIndex:0,r}}class p{items=[];#t=10;#s;#e;constructor(t,e){Array.isArray(t)&&(this.items=t),e&&(["string","function"].includes(typeof e.next)||s(e.next)&&URL.canParse(e.next))&&(this.#s=e.next),"number"==typeof e?.top&&(this.#t=e.top),"number"==typeof e?.total&&(this.#e=e.total)}getPage=(t=0,s)=>{const e="function"==typeof s?this.items.filter(s):this.items;let r;return this.#s?r=this.#s:e.length>t+this.#t&&(r=()=>this.getPage(t+this.#t,s)),new y({items:e.slice(t,t+this.#t),total:this.#e,top:this.#t,next:r})}}const l=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,g=t=>t.toISOString().split("T")[0],b=(t,s)=>s.includes(t?.tagName.toLowerCase()),m='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',S=t=>"number"==typeof t&&!Number.isNaN(t),d=t=>[t,...x(t),...A(t)],x=(t,s=[])=>{if(t.self!==t.top)try{const e=t.parent;return e?(s.push(e),x(e,s)):s}catch(t){return console.error("Different hosts between iframes:",t),s}return s},A=(t,s=[])=>{if(t.frames.length>0)for(const e of Array.from(t.frames))s.push(e),A(e,s);return s};export{t as C,p as P,h as a,b,a as c,r as d,c as e,f,d as g,y as h,i,e as j,s as k,m as l,o as m,u as n,l as o,g as p,S as q,n as t}
1
+ class t{classes;constructor(t=[]){this.classes=t}add=t=>{this.has(t)||this.classes.push(t)};delete=t=>{const s=this.classes.indexOf(t);s>-1&&this.classes.splice(s,1)};has=t=>this.classes.includes(t);join=()=>this.classes.join(" ")}const s=t=>"object"==typeof t&&!Array.isArray(t)&&null!==t,e=(t,r,i)=>{if(!s(t)||"string"!=typeof r)return i;const[n,...o]=r.split(".");return o.length?e(t[n],o.join("."),i):t[n]??i},r=t=>Array.isArray(t)&&t.every((t=>"string"==typeof t)),i=t=>"string"==typeof t&&""!==t.trim(),n=t=>"object"==typeof t?JSON.stringify(t):String(t),o=t=>"string"==typeof t?t.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):t,a=(t="",s=10)=>{const e=new Uint8Array(s);crypto.getRandomValues(e);const r=Array.from(e).map((t=>t.toString(16).padStart(2,"0"))).join("").slice(0,s);return""!==t?`${t}-${r}`:r},h=t=>i(t)&&null!==/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(t),f=t=>{let e;return"string"==typeof t?e=t:Boolean(t)&&"object"==typeof t&&(s(t)||Array.isArray(t))?e=JSON.stringify(t):null!=t&&"boolean"!=typeof t&&"object"!=typeof t&&(e=String(t)),e?e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((t,s)=>(s>0?"-":"")+t.toLowerCase())).replace(/[^a-z0-9-]+/g,"-").replace(/--+/g,"-").replace(/(?:^-)|(?:-$)/g,""):e},u=async t=>{if(t)return t()},c={FIRST:"first",NEXT:"next",PREVIOUS:"previous",LAST:"last"};class y{items=[];total;top=10;next;baseIndex=1;constructor(t){if(!s(t))throw new Error("Page - init must match IPage type.");Array.isArray(t.items)&&(this.items=t.items),"number"==typeof t.top&&(this.top=t.top),this.total="number"==typeof t.total?t.total:this.items.length,this.next=t.next}getIndexFromCursor=(t="first",s)=>{if(!Array.isArray(this.items)||!this.items.length)return null;const e=this.items.length-this.baseIndex;let r,i=0;if(["previous","next"].includes(t)&&s){const t=this.items.findIndex((t=>JSON.stringify(t)===JSON.stringify(s)));if(-1===t)return 0;i=t}return r="first"===t?0:"last"===t?e:"previous"===t?JSON.stringify(this.items[i])===JSON.stringify(this.items[0])?e:i-this.baseIndex:"next"===t?JSON.stringify(this.items[i])===JSON.stringify(this.items[e])?0:i+this.baseIndex:0,r}}class p{items=[];#t=10;#s;#e;constructor(t,e){Array.isArray(t)&&(this.items=t),e&&(["string","function"].includes(typeof e.next)||s(e.next)&&URL.canParse(e.next))&&(this.#s=e.next),"number"==typeof e?.top&&(this.#t=e.top),"number"==typeof e?.total&&(this.#e=e.total)}getPage=(t=0,s)=>{const e="function"==typeof s?this.items.filter(s):this.items;let r;return this.#s?r=this.#s:e.length>t+this.#t&&(r=()=>this.getPage(t+this.#t,s)),new y({items:e.slice(t,t+this.#t),total:this.#e,top:this.#t,next:r})}}const l=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,g=t=>t.toISOString().split("T")[0],b=(t,s)=>s.includes(t?.tagName.toLowerCase()),m='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',S=t=>"number"==typeof t&&!Number.isNaN(t),d=t=>[t,...x(t),...A(t)],x=(t,s=[])=>{if(t.self!==t.top)try{const e=t.parent;return e?(s.push(e),x(e,s)):s}catch(t){return console.error("Different hosts between iframes:",t),s}return s},A=(t,s=[])=>{if(t.frames.length>0)for(const e of Array.from(t.frames))s.push(e),A(e,s);return s};export{t as C,p as P,h as a,b,a as c,r as d,c as e,y as f,d as g,e as h,i,s as j,f as k,m as l,l as m,u as n,g as o,S as p,o as q,n as t}
@@ -1 +1 @@
1
- const e=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,t=e=>{const t={value:"2023",pattern:"yyyy"},a={value:"12",pattern:"mm"},l={value:"24",pattern:"dd"};return n([t.value,a.value,l.value].join("-"),e,{timeZone:"UTC"}).replace(t.value,t.pattern).replace(a.value,a.pattern).replace(l.value,l.pattern)},a=(e,t,a)=>new Intl.NumberFormat(t,{style:"currency",currency:a}).format(e),l=(e,t,a=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:a}).format(Number(e)),r=(e,t)=>{if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error("localeByte - size must be a positive number.");const a=["byte","kilobyte","megabyte","gigabyte","terabyte"],l=a.findIndex(((t,a)=>e<Math.pow(1024,a+1)));return Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:2,unit:a[l],unitDisplay:"byte"===a[l]?"long":"short",style:"unit"}).format(e/Math.pow(1024,l))},s=(e,t,a=0)=>new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:a,maximumFractionDigits:a}).format(e),i=(e,t,a,l="short",r=0)=>new Intl.NumberFormat(t,{style:"unit",unit:a,unitDisplay:l,minimumFractionDigits:r,maximumFractionDigits:r}).format(e),n=(t,a,l)=>"string"==typeof t&&""!==t&&e.test(t)?new Intl.DateTimeFormat(a,l).format(new Date(t)):"",o=(u={en:{errors:{required:"This field is required."},nbCharLeft:"{counter} characters left.",input:{showMore:"Show more",select:{placeholder:"Select a value"},checkbox:{selectedValues:"{nb} selected values",selectedValue:"{nb} selected value",editButton:"Edit",selectButton:"Select values",showButton:"Show",sections:{label:'Values grouped by: "Selected" or "Available"',badge:{label:"value(s)"},search:{label:"Enter a value",values:"{count} value(s) found",noValue:"No values found"},selected:{title:"Selected",action:"Unselect all",tooltip:"Unselect all current values",values:"{count} value(s) selected",noValue:"No value selected"},notSelected:{title:"Available",action:"Select all",tooltip:"Select all current values",values:"{count} value(s) available",noValue:"All values are selected"}}},date:{pattern:{dd:"dd",mm:"mm",yyyy:"yyyy"},helpText:{expectedFormat:"Expected format: {pattern} (ex: {date})"},error:{badInput:"The date is inexistent or incorrect, the expected format is {pattern} (ex: {date})",min:"The date must be after or equal to {min}",max:"The date must be before or equal to {max}",minMax:"The date must be between {min} and {max}"}},numeric:{error:{min:"The value must be greater than or equal to {min}",max:"The value must be less than or equal to {max}",minMax:"The value must be between {min} and {max}"}},password:{display:"Display password value",hide:"Hide password value"},combobox:{notFound:"No value matches your input",notAvailable:"No value available",search:"Search…"},text:{helpText:{email:"Expected format: name@example.com",emails:"Expected format: first@example.com, second@example.com",url:"Expected format: https://example.com"},errors:{typeMismatch:{email:"The value is incorrect, the expected format is name@example.com",emails:"The value is incorrect, the expected format is first@example.com, second@example.com",url:"The value is incorrect, the expected format is https://example.com"}}},file:{helpText:{accept:"Accepted extensions: {{accept}}",maxSize:"Maximum size: {{maxSize}}"},errors:{maxSize:"The file size exceeds the maximum allowed size of {{maxSize}}"},browse:"Browse…",deleteButton:"Delete file"}},form:{required:'Fields with a <strong class="mg-u-is-asterisk">*</strong> are required',requiredSingle:'Field with a <strong class="mg-u-is-asterisk">*</strong> is required',allRequired:"All fields are required",allRequiredSingle:"The field is required"},alert:{closeButton:"Close message"},modal:{closeButton:"Close modal"},pagination:{label:"Pagination",page:"page",pages:"pages",nextLabel:"Next page",previousLabel:"Previous page",selectPage:"Select the page to display."},panel:{editLabel:"Edit section title."},skipLinks:{navLabel:"Quick access"},general:{confirm:"Confirm",cancel:"Cancel",close:"Close",next:"Next",previous:"Previous",reset:"reset"},menuItem:{badgeLabel:"Include notification(s)",openNewTab:"Open link in a new tab"},itemMore:{menuLabel:"Additional menu"},actionMore:{label:"Actions"},loader:{inProgress:"Loading in progress…"},table:{sortableCaption:"(column headers with buttons are sortable)"}},fr:{errors:{required:"Ce champ est obligatoire."},nbCharLeft:"{counter} caractères disponibles.",input:{showMore:"Afficher plus",select:{placeholder:"Sélectionnez une valeur"},checkbox:{selectedValues:"{nb} valeurs sélectionnées",selectedValue:"{nb} valeur sélectionnée",editButton:"Modifier",selectButton:"Sélectionner des valeurs",showButton:"Voir",sections:{label:'Valeurs regroupées par: "Sélectionnées" ou "Disponibles"',badge:{label:"valeur(s)"},search:{label:"Saisissez une valeur",values:"{count} résultat(s)",noValue:"Aucune valeur n'a été trouvée."},selected:{title:"Sélectionnées",action:"Tout désélectionner",tooltip:"Désélectionne toutes les valeurs de la section",values:"{count} valeur(s) sélectionnée(s)",noValue:"Aucune valeur sélectionnée"},notSelected:{title:"Disponibles",action:"Tout sélectionner",tooltip:"Sélectionne toutes les valeurs de la section",values:"{count} valeur(s) disponible(s)",noValue:"Toutes les valeurs sont sélectionnées"}}},date:{pattern:{dd:"jj",mm:"mm",yyyy:"aaaa"},helpText:{expectedFormat:"Format attendu&nbsp;: {pattern} (ex&nbsp;: {date})"},error:{badInput:"La date est inexistante ou incorrecte, le format attendu est {pattern} (ex&nbsp;: {date})",min:"La date doit être postérieure ou égale au {min}",max:"La date doit être antérieure ou égale au {max}",minMax:"La date doit être comprise entre le {min} et le {max}"}},numeric:{error:{min:"La valeur doit être supérieure ou égale à {min}",max:"La valeur doit être inférieure ou égale à {max}",minMax:"La valeur doit être comprise entre {min} et {max}"}},password:{display:"Afficher le mot de passe",hide:"Masquer le mot de passe"},combobox:{notFound:"Aucune valeur ne correspondont à votre saisie",notAvailable:"Aucune valeur disponible",search:"Recherche…"},text:{helpText:{email:"Format attendu&nbsp;: nom@exemple.fr",emails:"Format attendu&nbsp;: premier@exemple.fr, second@exemple.fr",url:"Format attendu&nbsp;: https://exemple.fr"},errors:{typeMismatch:{email:"La valeur est incorrecte, le format attendu est nom@exemple.fr",emails:"La valeur est incorrecte, le format attendu est premier@exemple.fr, second@exemple.fr",url:"La valeur est incorrecte, le format attendu est https://exemple.fr"}}},file:{helpText:{accept:"Extensions autorisée&nbsp;: {{acceptedFormat}}",maxSize:"Taille maximale&nbsp;: {{maxSize}}"},errors:{maxSize:"La taille du fichier dépasse la taille maximale autorisée de {{maxSize}}"},browse:"Parcourir…",deleteButton:"Supprimer le fichier"}},form:{required:'Les champs marqués d\'un <strong class="mg-u-is-asterisk">*</strong> sont obligatoires',requiredSingle:'Le champ marqué d\'un <strong class="mg-u-is-asterisk">*</strong> est obligatoire',allRequired:"Tous les champs sont obligatoires",allRequiredSingle:"Le champ est obligatoire"},alert:{closeButton:"Fermer le message"},modal:{closeButton:"Fermer la modale"},pagination:{label:"Pagination",page:"page",pages:"pages",nextLabel:"Page suivante",previousLabel:"Page précédente",selectPage:"Sélectionner la page à afficher."},panel:{editLabel:"Modifier le titre de la section."},skipLinks:{navLabel:"Accès rapide"},general:{confirm:"Valider",cancel:"Annuler",close:"Fermer",next:"Suivant",previous:"Précédent",reset:"réinitialiser"},menuItem:{badgeLabel:"Notification(s) incluse(s)",openNewTab:"Ouvrir le lien dans un nouvel onglet"},itemMore:{menuLabel:"Menu complémentaire"},actionMore:{label:"Actions"},loader:{inProgress:"Chargement en cours…"},table:{sortableCaption:"(les en-têtes de colonnes avec des boutons peuvent être triés)"}}},e=>((e,t,a)=>{const l=e.closest("[lang]"),r=Intl.NumberFormat.supportedLocalesOf(l?.lang),s=r.length>0&&"string"==typeof r[0]?r[0]:navigator.language||a,i=s.split("-").shift();return 0===Object.keys(t).length?{locale:s,messages:{lang:a}}:{locale:s,messages:t[i]??t[a]??{lang:a}}})(e,u,"en"));var u;export{n as a,t as b,l as c,i as d,s as e,a as f,o as i,r as l}
1
+ const e=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,t=e=>{const t={value:"2023",pattern:"yyyy"},a={value:"12",pattern:"mm"},l={value:"24",pattern:"dd"};return n([t.value,a.value,l.value].join("-"),e,{timeZone:"UTC"}).replace(t.value,t.pattern).replace(a.value,a.pattern).replace(l.value,l.pattern)},a=(e,t,a)=>new Intl.NumberFormat(t,{style:"currency",currency:a}).format(e),l=(e,t,a=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:a}).format(Number(e)),r=(e,t)=>{if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error("localeByte - size must be a positive number.");const a=["byte","kilobyte","megabyte","gigabyte","terabyte"],l=a.findIndex(((t,a)=>e<Math.pow(1024,a+1)));return Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:2,unit:a[l],unitDisplay:"byte"===a[l]?"long":"short",style:"unit"}).format(e/Math.pow(1024,l))},s=(e,t,a=0)=>new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:a,maximumFractionDigits:a}).format(e),i=(e,t,a,l="short",r=0)=>new Intl.NumberFormat(t,{style:"unit",unit:a,unitDisplay:l,minimumFractionDigits:r,maximumFractionDigits:r}).format(e),n=(t,a,l)=>"string"==typeof t&&""!==t&&e.test(t)?new Intl.DateTimeFormat(a,l).format(new Date(t)):"",o=(u={en:{errors:{required:"This field is required."},nbCharLeft:"{counter} characters left.",input:{showMore:"Show more",select:{placeholder:"Select a value"},checkbox:{selectedValues:"{nb} selected values",selectedValue:"{nb} selected value",editButton:"Edit",selectButton:"Select values",showButton:"Show",sections:{label:'Values grouped by: "Selected" or "Available"',badge:{label:"value(s)"},search:{label:"Enter a value",values:"{count} value(s) found",noValue:"No values found"},selected:{title:"Selected",action:"Unselect all",tooltip:"Unselect all current values",values:"{count} value(s) selected",noValue:"No value selected"},notSelected:{title:"Available",action:"Select all",tooltip:"Select all current values",values:"{count} value(s) available",noValue:"All values are selected"}}},date:{pattern:{dd:"dd",mm:"mm",yyyy:"yyyy"},helpText:{expectedFormat:"Expected format: {pattern} (ex: {date})"},error:{badInput:"The date is inexistent or incorrect, the expected format is {pattern} (ex: {date})",min:"The date must be after or equal to {min}",max:"The date must be before or equal to {max}",minMax:"The date must be between {min} and {max}"}},numeric:{error:{min:"The value must be greater than or equal to {min}",max:"The value must be less than or equal to {max}",minMax:"The value must be between {min} and {max}"}},password:{display:"Display password value",hide:"Hide password value"},combobox:{notFound:"No value matches your input",notAvailable:"No value available",search:"Search…"},text:{helpText:{email:"Expected format: name@example.com",emails:"Expected format: first@example.com, second@example.com",url:"Expected format: https://example.com"},errors:{typeMismatch:{email:"The value is incorrect, the expected format is name@example.com",emails:"The value is incorrect, the expected format is first@example.com, second@example.com",url:"The value is incorrect, the expected format is https://example.com"}}},file:{helpText:{accept:"Accepted extensions: {{accept}}",maxSize:"Maximum size: {{maxSize}}"},errors:{maxSize:"The file size exceeds the maximum allowed size of {{maxSize}}"},browse:"Browse…",deleteButton:"Delete file"}},form:{required:'Fields with a <strong class="mg-u-is-asterisk">*</strong> are required',requiredSingle:'Field with a <strong class="mg-u-is-asterisk">*</strong> is required',allRequired:"All fields are required",allRequiredSingle:"The field is required"},alert:{closeButton:"Close message"},modal:{closeButton:"Close modal"},pagination:{label:"Pagination",page:"page",pages:"pages",nextLabel:"Next page",previousLabel:"Previous page",selectPage:"Select the page to display."},panel:{editLabel:"Edit section title."},skipLinks:{navLabel:"Quick access"},breadcrumb:{label:"Breadcrumb"},general:{confirm:"Confirm",cancel:"Cancel",close:"Close",next:"Next",previous:"Previous",reset:"reset"},menuItem:{badgeLabel:"Include notification(s)",openNewTab:"Open link in a new tab"},itemMore:{menuLabel:"Additional menu"},actionMore:{label:"Actions"},loader:{inProgress:"Loading in progress…"},table:{sortableCaption:"(column headers with buttons are sortable)"}},fr:{errors:{required:"Ce champ est obligatoire."},nbCharLeft:"{counter} caractères disponibles.",input:{showMore:"Afficher plus",select:{placeholder:"Sélectionnez une valeur"},checkbox:{selectedValues:"{nb} valeurs sélectionnées",selectedValue:"{nb} valeur sélectionnée",editButton:"Modifier",selectButton:"Sélectionner des valeurs",showButton:"Voir",sections:{label:'Valeurs regroupées par: "Sélectionnées" ou "Disponibles"',badge:{label:"valeur(s)"},search:{label:"Saisissez une valeur",values:"{count} résultat(s)",noValue:"Aucune valeur n'a été trouvée."},selected:{title:"Sélectionnées",action:"Tout désélectionner",tooltip:"Désélectionne toutes les valeurs de la section",values:"{count} valeur(s) sélectionnée(s)",noValue:"Aucune valeur sélectionnée"},notSelected:{title:"Disponibles",action:"Tout sélectionner",tooltip:"Sélectionne toutes les valeurs de la section",values:"{count} valeur(s) disponible(s)",noValue:"Toutes les valeurs sont sélectionnées"}}},date:{pattern:{dd:"jj",mm:"mm",yyyy:"aaaa"},helpText:{expectedFormat:"Format attendu&nbsp;: {pattern} (ex&nbsp;: {date})"},error:{badInput:"La date est inexistante ou incorrecte, le format attendu est {pattern} (ex&nbsp;: {date})",min:"La date doit être postérieure ou égale au {min}",max:"La date doit être antérieure ou égale au {max}",minMax:"La date doit être comprise entre le {min} et le {max}"}},numeric:{error:{min:"La valeur doit être supérieure ou égale à {min}",max:"La valeur doit être inférieure ou égale à {max}",minMax:"La valeur doit être comprise entre {min} et {max}"}},password:{display:"Afficher le mot de passe",hide:"Masquer le mot de passe"},combobox:{notFound:"Aucune valeur ne correspondont à votre saisie",notAvailable:"Aucune valeur disponible",search:"Recherche…"},text:{helpText:{email:"Format attendu&nbsp;: nom@exemple.fr",emails:"Format attendu&nbsp;: premier@exemple.fr, second@exemple.fr",url:"Format attendu&nbsp;: https://exemple.fr"},errors:{typeMismatch:{email:"La valeur est incorrecte, le format attendu est nom@exemple.fr",emails:"La valeur est incorrecte, le format attendu est premier@exemple.fr, second@exemple.fr",url:"La valeur est incorrecte, le format attendu est https://exemple.fr"}}},file:{helpText:{accept:"Extensions autorisée&nbsp;: {{acceptedFormat}}",maxSize:"Taille maximale&nbsp;: {{maxSize}}"},errors:{maxSize:"La taille du fichier dépasse la taille maximale autorisée de {{maxSize}}"},browse:"Parcourir…",deleteButton:"Supprimer le fichier"}},form:{required:'Les champs marqués d\'un <strong class="mg-u-is-asterisk">*</strong> sont obligatoires',requiredSingle:'Le champ marqué d\'un <strong class="mg-u-is-asterisk">*</strong> est obligatoire',allRequired:"Tous les champs sont obligatoires",allRequiredSingle:"Le champ est obligatoire"},alert:{closeButton:"Fermer le message"},modal:{closeButton:"Fermer la modale"},pagination:{label:"Pagination",page:"page",pages:"pages",nextLabel:"Page suivante",previousLabel:"Page précédente",selectPage:"Sélectionner la page à afficher."},panel:{editLabel:"Modifier le titre de la section."},skipLinks:{navLabel:"Accès rapide"},breadcrumb:{label:"Fil d'Ariane"},general:{confirm:"Valider",cancel:"Annuler",close:"Fermer",next:"Suivant",previous:"Précédent",reset:"réinitialiser"},menuItem:{badgeLabel:"Notification(s) incluse(s)",openNewTab:"Ouvrir le lien dans un nouvel onglet"},itemMore:{menuLabel:"Menu complémentaire"},actionMore:{label:"Actions"},loader:{inProgress:"Chargement en cours…"},table:{sortableCaption:"(les en-têtes de colonnes avec des boutons peuvent être triés)"}}},e=>((e,t,a)=>{const l=e.closest("[lang]"),r=Intl.NumberFormat.supportedLocalesOf(l?.lang),s=r.length>0&&"string"==typeof r[0]?r[0]:navigator.language||a,i=s.split("-").shift();return 0===Object.keys(t).length?{locale:s,messages:{lang:a}}:{locale:s,messages:t[i]??t[a]??{lang:a}}})(e,u,"en"));var u;export{n as a,t as b,l as c,i as d,s as e,a as f,o as i,r as l}
@@ -1 +1 @@
1
- import{transformTag as t,proxyCustomElement as e,HTMLElement as i,h as o,Host as s}from"@stencil/core/internal/client";import{c as a,t as r}from"./index2.js";import{d as n,a as m,S as c}from"./mg-menu-item2.js";import{i as d}from"./index3.js";import{d as p}from"./mg-badge2.js";import{d as h}from"./mg-button2.js";import{d as l}from"./mg-card2.js";import{d as g}from"./mg-divider2.js";import{d as v}from"./mg-icon2.js";import{b as u,d as b}from"./mg-item-more2.js";import{d as f}from"./mg-popover2.js";import{d as y}from"./mg-popover-content2.js";const k=t=>"object"==typeof t&&t.every((t=>"object"==typeof t&&"string"==typeof t.label&&"function"==typeof t.mouseEventHandler||E(t))),E=t=>"object"==typeof t&&t.isDivider,j=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.name="mg-action-more",this.classBase="mg-c-action-more",this.mgPopoverIdentifier=a(this.name),this.button={variant:"flat",isIcon:!0},this.displayChevron=!1,this.expanded=!1,this.toggleExpanded=()=>{this.expanded=!this.expanded},this.handleDisplayChange=t=>{this.expanded=t.detail},this.handleButton=()=>{this.toggleExpanded()},this.handleItemClick=(t,e)=>{this.expanded=!1,e(t)}}validateItems(t){if(!k(t))throw Error(`<${this.name}> prop "items" is required and all values must be the same type, MgActionMoreItemType or MgActionMoreDividerType. Passed value: ${r(t)}.`);if(k(t)&&t.length>0&&(E(t[0])||E(t[t.length-1])))throw Error(`<${this.name}> prop "items" can’t have a divider at the beginning or the end of the array. Passed value: ${r(t)}.`)}validateIcon(t){if(t&&!(t=>"object"==typeof t&&"string"==typeof t.icon)(t))throw Error(`<${this.name}> prop "icon" must match MgActionMoreIconType. Passed value: ${r(t)}.`);void 0===(null==t?void 0:t.icon)&&this.button.isIcon&&(this.icon={icon:"ellipsis"})}validateButton(t){if(t&&!(t=>"object"==typeof t&&"string"==typeof t.variant&&"boolean"==typeof t.isIcon)(t))throw Error(`<${this.name}> prop "button" must match MgActionMoreButtonType. Passed value: ${r(t)}.`)}validateDisplayChevron(t){if(t&&!0===this.button.isIcon)throw Error(`<${this.name}> prop "displayChevron" can't be used with a 'button" prop "isIcon" attribute.`)}componentWillLoad(){this.messages=d(this.element).messages.actionMore,this.validateItems(this.items),this.validateButton(this.button),this.validateIcon(this.icon),this.validateDisplayChevron(this.displayChevron)}render(){const t=this.button.label||this.messages.label,e=[t];return!this.button.isIcon&&this.displayChevron&&e.push(o("span",{class:{[this.classBase+"__chevron"]:!0,[this.classBase+"__chevron--rotate"]:!0===this.expanded}},o("mg-icon",{icon:"chevron-down"}))),o(s,{key:"bef7d0e0c5a991f321ca930d65fa458873fc7564","data-mg-popover-guard":this.mgPopoverIdentifier},o("span",{key:"4e47d1513749cc1ac15ef8febd2fb914e362bbee",class:this.classBase},o("mg-popover",{key:"ab6dfc93422f03b49a78d2896196aa6901841aef",identifier:this.mgPopoverIdentifier,display:this.expanded,"onDisplay-change":this.handleDisplayChange},o("mg-button",{key:"921f17c4ede5f1783dc336429539b0b082902fdd",variant:this.button.variant,isIcon:this.button.isIcon,disabled:this.button.disabled,type:"button",label:t,onClick:this.handleButton},this.icon&&o("mg-icon",Object.assign({key:"19bf9e015cbd82d8dffc62269de735607ab4f2bb"},this.icon)),!this.button.isIcon&&e),o("div",{key:"56a43a5adebd31264742c0ef8905ccb0bd8fb581",slot:"content"},o("mg-menu",{key:"70520957ac07a3190ef753ee435996af96dbc5b5",direction:m.VERTICAL,label:this.messages.label},this.items.map((t=>{var e,i;return E(t)?o("mg-divider",{class:"mg-c-action-more__divider",key:"divider","full-width":!0}):o("mg-menu-item",{key:t.label,status:t.status||c.VISIBLE,target:t.target,href:t.href,onClick:e=>this.handleItemClick(e,t.mouseEventHandler)},(null===(e=t.icon)||void 0===e?void 0:e.icon)&&o("mg-icon",{icon:t.icon.icon,variant:t.icon.variant,variantStyle:t.icon.variantStyle,slot:"image"}),o("span",{slot:"label"},t.label),(null===(i=t.badge)||void 0===i?void 0:i.label)&&o("mg-badge",{label:t.badge.label,value:t.badge.value,slot:"information",variant:"text-color"}))})))))))}get element(){return this}static get watchers(){return{items:[{validateItems:0}],icon:[{validateIcon:0}],button:[{validateButton:0}],displayChevron:[{validateDisplayChevron:0}]}}static get style(){return".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{--mg-c-popover-padding-vertical:var(--mg-b-size-8);--mg-c-popover-padding-horizontal:0;--mg-c-popover-max-width:unset}.mg-c-action-more__divider{--mg-c-divider-spacing-vertical:var(--mg-b-size-4)}.mg-c-action-more__chevron{transition:200ms}.mg-c-action-more__chevron--rotate.mg-c-action-more__chevron{transform:rotate(180deg)}"}},[1,"mg-action-more",{items:[16],icon:[1040],button:[16],displayChevron:[4,"display-chevron"],expanded:[32]},void 0,{items:[{validateItems:0}],icon:[{validateIcon:0}],button:[{validateButton:0}],displayChevron:[{validateDisplayChevron:0}]}]);function w(){"undefined"!=typeof customElements&&["mg-action-more","mg-badge","mg-button","mg-card","mg-divider","mg-icon","mg-item-more","mg-menu","mg-menu-item","mg-popover","mg-popover-content"].forEach((e=>{switch(e){case"mg-action-more":customElements.get(t(e))||customElements.define(t(e),j);break;case"mg-badge":customElements.get(t(e))||p();break;case"mg-button":customElements.get(t(e))||h();break;case"mg-card":customElements.get(t(e))||l();break;case"mg-divider":customElements.get(t(e))||g();break;case"mg-icon":customElements.get(t(e))||v();break;case"mg-item-more":customElements.get(t(e))||b();break;case"mg-menu":customElements.get(t(e))||u();break;case"mg-menu-item":customElements.get(t(e))||n();break;case"mg-popover":customElements.get(t(e))||f();break;case"mg-popover-content":customElements.get(t(e))||y()}}))}w();const _=j,I=w;export{_ as MgActionMore,I as defineCustomElement}
1
+ import{transformTag as t,proxyCustomElement as e,HTMLElement as i,h as o,Host as s}from"@stencil/core/internal/client";import{c as a,t as r}from"./index2.js";import{d as n,a as m,S as c}from"./mg-menu-item2.js";import{i as d}from"./index3.js";import{d as p}from"./mg-badge2.js";import{d as h}from"./mg-button2.js";import{d as l}from"./mg-card2.js";import{d as g}from"./mg-divider2.js";import{d as v}from"./mg-icon2.js";import{b as u,d as b}from"./mg-item-more2.js";import{d as f}from"./mg-popover2.js";import{d as y}from"./mg-popover-content2.js";const k=t=>"object"==typeof t&&t.every((t=>"object"==typeof t&&"string"==typeof t.label&&"function"==typeof t.mouseEventHandler||E(t))),E=t=>"object"==typeof t&&t.isDivider,j=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.name="mg-action-more",this.classBase="mg-c-action-more",this.mgPopoverIdentifier=a(this.name),this.button={variant:"flat",isIcon:!0},this.displayChevron=!1,this.expanded=!1,this.toggleExpanded=()=>{this.expanded=!this.expanded},this.handleDisplayChange=t=>{this.expanded=t.detail},this.handleButton=()=>{this.toggleExpanded()},this.handleItemClick=(t,e)=>{this.expanded=!1,e(t)}}validateItems(t){if(!k(t))throw Error(`<${this.name}> prop "items" is required and all values must be the same type, MgActionMoreItemType or MgActionMoreDividerType. Passed value: ${r(t)}.`);if(k(t)&&t.length>0&&(E(t[0])||E(t[t.length-1])))throw Error(`<${this.name}> prop "items" can’t have a divider at the beginning or the end of the array. Passed value: ${r(t)}.`)}validateIcon(t){if(t&&!(t=>"object"==typeof t&&"string"==typeof t.icon)(t))throw Error(`<${this.name}> prop "icon" must match MgActionMoreIconType. Passed value: ${r(t)}.`);void 0===(null==t?void 0:t.icon)&&this.button.isIcon&&(this.icon={icon:"ellipsis"})}validateButton(t){if(t&&!(t=>"object"==typeof t&&"string"==typeof t.variant&&"boolean"==typeof t.isIcon)(t))throw Error(`<${this.name}> prop "button" must match MgActionMoreButtonType. Passed value: ${r(t)}.`)}validateDisplayChevron(t){if(t&&!0===this.button.isIcon)throw Error(`<${this.name}> prop "displayChevron" can't be used with a 'button" prop "isIcon" attribute.`)}componentWillLoad(){this.messages=d(this.element).messages.actionMore,this.validateItems(this.items),this.validateButton(this.button),this.validateIcon(this.icon),this.validateDisplayChevron(this.displayChevron)}render(){const t=this.button.label||this.messages.label,e=[t];return!this.button.isIcon&&this.displayChevron&&e.push(o("span",{class:{[this.classBase+"__chevron"]:!0,[this.classBase+"__chevron--rotate"]:!0===this.expanded}},o("mg-icon",{icon:"chevron-down"}))),o(s,{key:"184355435ec346d682c2df4aa8b33bf5f54e77e7","data-mg-popover-guard":this.mgPopoverIdentifier},o("span",{key:"8176489e5dd7741311745d015b8ef7f2a4f63ea9",class:this.classBase},o("mg-popover",{key:"3ee64b21556ee9e910939ad2fc9e3fbf8e4bd964",identifier:this.mgPopoverIdentifier,display:this.expanded,"onDisplay-change":this.handleDisplayChange},o("mg-button",{key:"cf8f7f4f736d6a8338a4f6eebce04b4e2be49825",variant:this.button.variant,isIcon:this.button.isIcon,disabled:this.button.disabled,type:"button",label:t,onClick:this.handleButton},this.icon&&o("mg-icon",Object.assign({key:"ee8b4f13bac85ccdd5e9d72edbaa957054c304ec"},this.icon)),!this.button.isIcon&&e),o("div",{key:"1c78fb9a98d59fa5422c5105ecb13d2f2884c7d2",slot:"content"},o("mg-menu",{key:"522d915d4a38529f7709640bb96eebb81ccc86af",direction:m.VERTICAL,label:this.messages.label},this.items.map((t=>{var e,i;return E(t)?o("mg-divider",{class:"mg-c-action-more__divider",key:"divider","full-width":!0}):o("mg-menu-item",{key:t.label,status:t.status||c.VISIBLE,target:t.target,href:t.href,onClick:e=>this.handleItemClick(e,t.mouseEventHandler)},(null===(e=t.icon)||void 0===e?void 0:e.icon)&&o("mg-icon",{icon:t.icon.icon,variant:t.icon.variant,variantStyle:t.icon.variantStyle,slot:"image"}),o("span",{slot:"label"},t.label),(null===(i=t.badge)||void 0===i?void 0:i.label)&&o("mg-badge",{label:t.badge.label,value:t.badge.value,slot:"information",variant:"text-color"}))})))))))}get element(){return this}static get watchers(){return{items:[{validateItems:0}],icon:[{validateIcon:0}],button:[{validateButton:0}],displayChevron:[{validateDisplayChevron:0}]}}static get style(){return".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{--mg-c-popover-spacing-vertical:var(--mg-b-size-4);--mg-c-popover-spacing-horizontal:0;--mg-c-popover-max-width:unset;--mg-c-popover-overflow:hidden}.mg-c-action-more__divider{--mg-c-divider-spacing-vertical:0.2rem}.mg-c-action-more__chevron{transition:200ms}.mg-c-action-more__chevron--rotate.mg-c-action-more__chevron{transform:rotate(180deg)}.mg-c-action-more mg-menu-item{--mg-c-menu-item-button-margin-horizontal:var(--mg-b-size-4)}"}},[1,"mg-action-more",{items:[16],icon:[1040],button:[16],displayChevron:[4,"display-chevron"],expanded:[32]},void 0,{items:[{validateItems:0}],icon:[{validateIcon:0}],button:[{validateButton:0}],displayChevron:[{validateDisplayChevron:0}]}]);function w(){"undefined"!=typeof customElements&&["mg-action-more","mg-badge","mg-button","mg-card","mg-divider","mg-icon","mg-item-more","mg-menu","mg-menu-item","mg-popover","mg-popover-content"].forEach((e=>{switch(e){case"mg-action-more":customElements.get(t(e))||customElements.define(t(e),j);break;case"mg-badge":customElements.get(t(e))||p();break;case"mg-button":customElements.get(t(e))||h();break;case"mg-card":customElements.get(t(e))||l();break;case"mg-divider":customElements.get(t(e))||g();break;case"mg-icon":customElements.get(t(e))||v();break;case"mg-item-more":customElements.get(t(e))||b();break;case"mg-menu":customElements.get(t(e))||u();break;case"mg-menu-item":customElements.get(t(e))||n();break;case"mg-popover":customElements.get(t(e))||f();break;case"mg-popover-content":customElements.get(t(e))||y()}}))}w();const _=j,I=w;export{_ as MgActionMore,I as defineCustomElement}
@@ -1 +1 @@
1
- import{transformTag as t,proxyCustomElement as s,HTMLElement as e,createEvent as i,forceUpdate as a,h as o}from"@stencil/core/internal/client";import{C as n,t as r}from"./index2.js";import{i as h}from"./index3.js";import{d as c}from"./mg-button2.js";import{d as m}from"./mg-card2.js";import{d as l}from"./mg-icon2.js";import{d}from"./mg-message2.js";const u=["info","warning","success","danger"],g=["bar-left","background"],f=s(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.componentShow=i(this,"component-show",3),this.componentHide=i(this,"component-hide",3),this.componentClose=i(this,"component-close",3),this.classCloseButton="mg-c-alert--close-button",this.storedTimer=null,this.isFocused=!1,this.isHovered=!1,this.variant="info",this.variantStyle="bar-left",this.classCollection=new n(["mg-c-alert"]),this.hasActions=!1,this.setTimer=()=>{this.storedTimer=setTimeout((()=>this.element.hidden=!0),1e3*this.delay)},this.clearTimer=()=>{clearTimeout(this.storedTimer)},this.timerEvents=t=>{this.clearTimer();const s="mouseenter"===t.type;this[s?"isHovered":"isFocused"]=!0,this.element.addEventListener(s?"mouseleave":"focusout",(t=>{this["mouseleave"===t.type?"isHovered":"isFocused"]=!1,this.isFocused||this.isHovered||this.setTimer()}),{once:!0})},this.handleClose=()=>{this.element.hidden=!0,this.componentClose.emit()}}watchDelay(t){if(void 0!==t&&t<2)throw Error(`<mg-alert> prop "delay" must be greater than 2 seconds. Passed value: ${r(t)}.`)}watchVariant(t){if(t&&!u.includes(t))throw Error(`<mg-alert> prop "variant" must be one of: ${u.join(", ")}. Passed value: ${r(t)}.`)}watchVariantStyle(t){if(t&&!g.includes(t))throw Error(`<mg-alert> prop "variantStyle" must be one of: ${g.join(", ")}. Passed value: ${r(t)}.`)}watchHidden(t){"string"==typeof t&&""===t&&(t=!0),t?(this.componentHide.emit(),["focusin","mouseenter"].forEach((t=>{this.element.removeEventListener(t,this.timerEvents)})),this.clearTimer()):(this.componentShow.emit(),this.delay>1&&(this.setTimer(),["focusin","mouseenter"].forEach((t=>{this.element.addEventListener(t,this.timerEvents)})))),a(this)}componentWillLoad(){this.messages=h(this.element).messages,this.watchVariant(this.variant),this.watchVariantStyle(this.variantStyle),this.watchDelay(this.delay),this.watchHidden(this.element.hidden),this.hasActions=null!==this.element.querySelector('[slot="actions"]'),this.hasActions||this.classCollection.add(this.classCloseButton)}render(){return o("mg-message",{key:"6085a45d00c4762bae88d98e89f44c20d5f9b6c4",class:this.classCollection.join(),role:["info","success"].includes(this.variant)?"status":"alert",variant:this.variant,variantStyle:this.variantStyle},o("slot",{key:"55491d1b41609883958680c14a2ddb8dd84a3bd4"}),this.hasActions?o("span",{slot:"actions"},o("slot",{name:"actions"})):o("span",{class:"mg-c-alert__close-button"},o("mg-button",{"is-icon":!0,variant:"flat",label:this.messages.alert.closeButton,onClick:this.handleClose},o("mg-icon",{icon:"cross"}))))}get element(){return this}static get watchers(){return{delay:[{watchDelay:0}],variant:[{watchVariant:0}],variantStyle:[{watchVariantStyle:0}],hidden:[{watchHidden:0}]}}static get style(){return".mg-c-alert__close-button{position:absolute;top:0;right:0}.mg-c-alert.mg-c-alert--close-button{--mg-c-card-spacing:0 var(--mg-b-size-min-height) 0 0}"}},[257,"mg-alert",{delay:[2],variant:[1],variantStyle:[1,"variant-style"],classCollection:[32],hasActions:[32]},void 0,{delay:[{watchDelay:0}],variant:[{watchVariant:0}],variantStyle:[{watchVariantStyle:0}],hidden:[{watchHidden:0}]}]);function b(){"undefined"!=typeof customElements&&["mg-alert","mg-button","mg-card","mg-icon","mg-message"].forEach((s=>{switch(s){case"mg-alert":customElements.get(t(s))||customElements.define(t(s),f);break;case"mg-button":customElements.get(t(s))||c();break;case"mg-card":customElements.get(t(s))||m();break;case"mg-icon":customElements.get(t(s))||l();break;case"mg-message":customElements.get(t(s))||d()}}))}b();const p=f,y=b;export{p as MgAlert,y as defineCustomElement}
1
+ import{transformTag as t,proxyCustomElement as s,HTMLElement as e,createEvent as i,forceUpdate as a,h as o}from"@stencil/core/internal/client";import{C as n,t as r}from"./index2.js";import{i as h}from"./index3.js";import{d as c}from"./mg-button2.js";import{d as m}from"./mg-card2.js";import{d as l}from"./mg-icon2.js";import{d as u}from"./mg-message2.js";const d=["info","warning","success","danger"],g=["bar-left","background"],f=s(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.componentShow=i(this,"component-show",3),this.componentHide=i(this,"component-hide",3),this.componentClose=i(this,"component-close",3),this.classCloseButton="mg-c-alert--close-button",this.storedTimer=null,this.isFocused=!1,this.isHovered=!1,this.variant="info",this.variantStyle="bar-left",this.classCollection=new n(["mg-c-alert"]),this.hasActions=!1,this.setTimer=()=>{this.storedTimer=setTimeout((()=>this.element.hidden=!0),1e3*this.delay)},this.clearTimer=()=>{clearTimeout(this.storedTimer)},this.timerEvents=t=>{this.clearTimer();const s="mouseenter"===t.type;this[s?"isHovered":"isFocused"]=!0,this.element.addEventListener(s?"mouseleave":"focusout",(t=>{this["mouseleave"===t.type?"isHovered":"isFocused"]=!1,this.isFocused||this.isHovered||this.setTimer()}),{once:!0})},this.handleClose=()=>{this.element.hidden=!0,this.componentClose.emit()}}watchDelay(t){if(void 0!==t&&t<2)throw Error(`<mg-alert> prop "delay" must be greater than 2 seconds. Passed value: ${r(t)}.`)}watchVariant(t){if(t&&!d.includes(t))throw Error(`<mg-alert> prop "variant" must be one of: ${d.join(", ")}. Passed value: ${r(t)}.`)}watchVariantStyle(t){if(t&&!g.includes(t))throw Error(`<mg-alert> prop "variantStyle" must be one of: ${g.join(", ")}. Passed value: ${r(t)}.`)}watchHidden(t){"string"==typeof t&&""===t&&(t=!0),t?(this.componentHide.emit(),["focusin","mouseenter"].forEach((t=>{this.element.removeEventListener(t,this.timerEvents)})),this.clearTimer()):(this.componentShow.emit(),this.delay>1&&(this.setTimer(),["focusin","mouseenter"].forEach((t=>{this.element.addEventListener(t,this.timerEvents)})))),a(this)}componentWillLoad(){this.messages=h(this.element).messages,this.watchVariant(this.variant),this.watchVariantStyle(this.variantStyle),this.watchDelay(this.delay),this.watchHidden(this.element.hidden),this.hasActions=null!==this.element.querySelector('[slot="actions"]'),this.hasActions||this.classCollection.add(this.classCloseButton)}render(){return o("mg-message",{key:"9041d8643bf4d0d44f20d30ac3c1d9aa46d6e060",class:this.classCollection.join(),role:["info","success"].includes(this.variant)?"status":"alert",variant:this.variant,variantStyle:this.variantStyle},o("slot",{key:"94d1a430e9af605fa2ea2b557e82fc15f1cc148b"}),this.hasActions?o("span",{slot:"actions"},o("slot",{name:"actions"})):o("span",{class:"mg-c-alert__close-button"},o("mg-button",{"is-icon":!0,variant:"flat",label:this.messages.alert.closeButton,onClick:this.handleClose},o("mg-icon",{icon:"cross"}))))}get element(){return this}static get watchers(){return{delay:[{watchDelay:0}],variant:[{watchVariant:0}],variantStyle:[{watchVariantStyle:0}],hidden:[{watchHidden:0}]}}static get style(){return".mg-c-alert__close-button{position:absolute;top:0;right:0}.mg-c-alert.mg-c-alert--close-button{--mg-c-card-spacing:0 var(--mg-b-size-min-height) 0 0}"}},[257,"mg-alert",{delay:[2],variant:[1],variantStyle:[1,"variant-style"],classCollection:[32],hasActions:[32]},void 0,{delay:[{watchDelay:0}],variant:[{watchVariant:0}],variantStyle:[{watchVariantStyle:0}],hidden:[{watchHidden:0}]}]);function p(){"undefined"!=typeof customElements&&["mg-alert","mg-button","mg-card","mg-icon","mg-message"].forEach((s=>{switch(s){case"mg-alert":customElements.get(t(s))||customElements.define(t(s),f);break;case"mg-button":customElements.get(t(s))||c();break;case"mg-card":customElements.get(t(s))||m();break;case"mg-icon":customElements.get(t(s))||l();break;case"mg-message":customElements.get(t(s))||u()}}))}p();const b=f,y=p;export{b as MgAlert,y as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MgBreadcrumb extends Components.MgBreadcrumb, HTMLElement {}
4
+ export const MgBreadcrumb: {
5
+ prototype: MgBreadcrumb;
6
+ new (): MgBreadcrumb;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{transformTag as e,proxyCustomElement as t,HTMLElement as r,h as i}from"@stencil/core/internal/client";import{i as a}from"./index3.js";import{t as s,i as m}from"./index2.js";import{d as c}from"./mg-icon2.js";const n=t(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}validateItems(e){if(void 0===e||!(e=>Array.isArray(e)&&e.length>0&&e.every(((t,r)=>"object"==typeof t&&null!==t&&m(t.label)&&(r===e.length-1||m(t.href)))))(e))throw Error(`<mg-breadcrumb> prop "items" is required and all values must be the same type, BreadcrumbItemType. Passed value: ${s(e)}.`)}renderItem(e,t){return m(e.href)?i("a",{href:e.href,"aria-label":void 0!==e.icon?e.label:void 0,"aria-current":t?"page":void 0},void 0!==e.icon?i("mg-icon",{icon:e.icon}):e.label):i("span",null,e.label)}componentWillLoad(){this.validateItems(this.items),this.messages=a(this.element).messages.breadcrumb}render(){return i("nav",{key:"af5c541e6a268af67762eb9d384269511fe0be17","aria-label":this.messages.label,class:"mg-c-breadcrumb"},i("ol",{key:"b5fdfe61eb2c826b3462bdd65cacfb73d4f00484",class:"mg-c-breadcrumb__list"},this.items.map(((e,t)=>{var r;return i("li",{key:`${t}-${null!==(r=e.href)&&void 0!==r?r:e.label}`,class:"mg-c-breadcrumb__list-item"},this.renderItem(e,t===this.items.length-1))}))))}get element(){return this}static get watchers(){return{items:[{validateItems:0}]}}static get style(){return'a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}.mg-c-breadcrumb{display:block}.mg-c-breadcrumb__list{padding:0;margin:0;list-style:none}.mg-c-breadcrumb__list-item{display:inline;color:var(--mg-b-color-dark);font-weight:700}.mg-c-breadcrumb__list-item:not(:last-child)::after{content:"/";font-weight:600;margin-inline:var(--mg-b-size-8)}.mg-c-breadcrumb__list-item:has(mg-icon) a{padding:var(--mg-b-size-4);margin:calc(var(--mg-b-size-4)*-1)}.mg-c-breadcrumb__list-item mg-icon{margin-block-start:.2rem;vertical-align:top}'}},[1,"mg-breadcrumb",{items:[16]},void 0,{items:[{validateItems:0}]}]);function o(){"undefined"!=typeof customElements&&["mg-breadcrumb","mg-icon"].forEach((t=>{switch(t){case"mg-breadcrumb":customElements.get(e(t))||customElements.define(e(t),n);break;case"mg-icon":customElements.get(e(t))||c()}}))}o();const l=n,d=o;export{l as MgBreadcrumb,d as defineCustomElement}
@@ -1 +1 @@
1
- import{transformTag as a,proxyCustomElement as r,HTMLElement as c,h as d}from"@stencil/core/internal/client";import{C as e}from"./index2.js";const s=["xsmall","small","medium"],o=r(class extends c{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.shadow=!1,this.radiusSize="medium",this.classCollection=new e(["mg-c-card"])}watchShadow(a){a?this.classCollection.add("mg-c-card--shadow"):this.classCollection.delete("mg-c-card--shadow")}watchRadiusSize(a,r){void 0!==r&&s.includes(r)&&this.classCollection.delete(`mg-c-card--radius-${r}`),s.includes(a)&&this.classCollection.add(`mg-c-card--radius-${a}`)}componentWillLoad(){this.watchShadow(this.shadow),this.watchRadiusSize(this.radiusSize)}render(){return d("div",{key:"6f83c5f7f9e0aacf502e407450cfdf039635a1f1",class:this.classCollection.join()},d("slot",{key:"6bf8c02d3c3c9d0719e45af96b41f54289e31961"}))}static get watchers(){return{shadow:[{watchShadow:0}],radiusSize:[{watchRadiusSize:0}]}}static get style(){return".mg-c-card{position:relative;z-index:inherit;overflow:var(--mg-c-card-overflow, var(--mg-c-card-overflow-default));width:100%;min-width:var(--mg-c-card-min-width);max-width:var(--mg-c-card-max-width);max-height:var(--mg-c-card-max-height);box-sizing:border-box;padding:var(--mg-c-card-spacing, var(--mg-c-card-spacing-default));border:var(--mg-c-card-border, var(--mg-c-card-border-default));border-radius:var(--mg-c-card-border-radius, var(--mg-c-card-border-radius-default));background:var(--mg-c-card-color-background, var(--mg-c-card-color-background-default))}.mg-c-card ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border:var(--mg-c-card-border-default);--mg-c-card-spacing:var(--mg-c-card-spacing-default);--mg-c-card-border-radius:var(--mg-c-card-border-radius-default);--mg-c-card-color-background:var(--mg-c-card-color-background-default);--mg-c-card-box-shadow:var(--mg-c-card-box-shadow-default);--mg-c-card-max-width:unset;--mg-c-card-min-width:unset;--mg-c-card-max-height:unset;--mg-c-card-overflow:var(--mg-c-card-overflow-default)}.mg-c-card.mg-c-card--shadow{--mg-c-card-border:var(--mg-b-color-neutral-20);box-shadow:var(--mg-c-card-box-shadow, var(--mg-c-card-box-shadow-default))}.mg-c-card.mg-c-card--radius-xsmall{--mg-c-card-border-radius:var(--mg-b-size-4)}.mg-c-card.mg-c-card--radius-small{--mg-c-card-border-radius:var(--mg-b-size-8)}"}},[257,"mg-card",{shadow:[4],radiusSize:[1,"radius-size"],classCollection:[32]},void 0,{shadow:[{watchShadow:0}],radiusSize:[{watchRadiusSize:0}]}]);function m(){"undefined"!=typeof customElements&&["mg-card"].forEach((r=>{"mg-card"===r&&(customElements.get(a(r))||customElements.define(a(r),o))}))}m();export{o as M,m as d}
1
+ import{transformTag as a,proxyCustomElement as r,HTMLElement as d,h as c}from"@stencil/core/internal/client";import{C as e}from"./index2.js";const s=["xsmall","small","medium"],o=r(class extends d{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.shadow=!1,this.radiusSize="medium",this.classCollection=new e(["mg-c-card"])}watchShadow(a){a?this.classCollection.add("mg-c-card--shadow"):this.classCollection.delete("mg-c-card--shadow")}watchRadiusSize(a,r){void 0!==r&&s.includes(r)&&this.classCollection.delete(`mg-c-card--radius-${r}`),s.includes(a)&&this.classCollection.add(`mg-c-card--radius-${a}`)}componentWillLoad(){this.watchShadow(this.shadow),this.watchRadiusSize(this.radiusSize)}render(){return c("div",{key:"fe5eff1e1d7c533cd533e27d3fb070a4e57194a8",class:this.classCollection.join()},c("slot",{key:"ca27dc4039d7bcaa21284714b7820de257625009"}))}static get watchers(){return{shadow:[{watchShadow:0}],radiusSize:[{watchRadiusSize:0}]}}static get style(){return".mg-c-card{position:relative;z-index:inherit;overflow:var(--mg-c-card-overflow, var(--mg-c-card-overflow-default));width:100%;min-width:var(--mg-c-card-min-width);max-width:var(--mg-c-card-max-width);max-height:var(--mg-c-card-max-height);box-sizing:border-box;padding:var(--mg-c-card-spacing, var(--mg-c-card-spacing-default));border:var(--mg-c-card-border, var(--mg-c-card-border-default));border-radius:var(--mg-c-card-border-radius, var(--mg-c-card-border-radius-default));background:var(--mg-c-card-color-background, var(--mg-c-card-color-background-default))}.mg-c-card ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border:var(--mg-c-card-border-default);--mg-c-card-spacing:var(--mg-c-card-spacing-default);--mg-c-card-border-radius:var(--mg-c-card-border-radius-default);--mg-c-card-color-background:var(--mg-c-card-color-background-default);--mg-c-card-box-shadow:var(--mg-c-card-box-shadow-default);--mg-c-card-max-width:unset;--mg-c-card-min-width:unset;--mg-c-card-max-height:unset;--mg-c-card-overflow:var(--mg-c-card-overflow-default)}.mg-c-card.mg-c-card--shadow{--mg-c-card-border:var(--mg-b-color-neutral-20);box-shadow:var(--mg-c-card-box-shadow, var(--mg-c-card-box-shadow-default))}.mg-c-card.mg-c-card--radius-xsmall{--mg-c-card-border-radius:var(--mg-b-size-4)}.mg-c-card.mg-c-card--radius-small{--mg-c-card-border-radius:var(--mg-b-size-8)}"}},[257,"mg-card",{shadow:[4],radiusSize:[1,"radius-size"],classCollection:[32]},void 0,{shadow:[{watchShadow:0}],radiusSize:[{watchRadiusSize:0}]}]);function m(){"undefined"!=typeof customElements&&["mg-card"].forEach((r=>{"mg-card"===r&&(customElements.get(a(r))||customElements.define(a(r),o))}))}m();export{o as M,m as d}
@@ -1 +1 @@
1
- import{transformTag as e,proxyCustomElement as t,HTMLElement as i,h as a}from"@stencil/core/internal/client";import{i as r}from"./index3.js";import{a as n,t as s}from"./index2.js";const c=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.characters=""}watchIdentifier(e){void 0===e||n(e)||console.error(`<mg-character-left> prop "identifier" value is invalid. Passed value: ${s(e)}.`)}validateMaxlength(e){if("number"!=typeof e)throw new Error(`<mg-character-left> prop "maxlength" is required and must be a number. Passed value: ${s(e)}.`)}componentWillLoad(){this.watchIdentifier(this.identifier),this.validateMaxlength(this.maxlength),this.messages=r(this.element).messages}render(){return a("span",{key:"22f23b636aaebc8857e4efa2fdb87a85977c59bf",id:this.identifier,"aria-live":"polite"},a("span",{key:"55addb97bc00800b1ec644b0eff68e779a03528a","aria-hidden":"true"},this.maxlength-this.characters.length,"/",this.maxlength),a("span",{key:"d5bd60b48b6a02cdaff4166f14e4ea6cf921f749",class:"mg-u-visually-hidden"},this.messages.nbCharLeft.replace("{counter}",this.maxlength-this.characters.length)))}get element(){return this}static get watchers(){return{identifier:[{watchIdentifier:0}],maxlength:[{validateMaxlength:0}]}}static get style(){return".mg-u-visually-hidden.sc-mg-character-left{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}*.sc-mg-character-left:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*.sc-mg-character-left{animation:none !important;transition:none !important}}mg-character-left.sc-mg-character-left{display:block}"}},[2,"mg-character-left",{identifier:[1],characters:[1],maxlength:[2]},void 0,{identifier:[{watchIdentifier:0}],maxlength:[{validateMaxlength:0}]}]);function o(){"undefined"!=typeof customElements&&["mg-character-left"].forEach((t=>{"mg-character-left"===t&&(customElements.get(e(t))||customElements.define(e(t),c))}))}o();export{c as M,o as d}
1
+ import{transformTag as e,proxyCustomElement as t,HTMLElement as i,h as a}from"@stencil/core/internal/client";import{i as r}from"./index3.js";import{a as n,t as s}from"./index2.js";const c=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.characters=""}watchIdentifier(e){void 0===e||n(e)||console.error(`<mg-character-left> prop "identifier" value is invalid. Passed value: ${s(e)}.`)}validateMaxlength(e){if("number"!=typeof e)throw new Error(`<mg-character-left> prop "maxlength" is required and must be a number. Passed value: ${s(e)}.`)}componentWillLoad(){this.watchIdentifier(this.identifier),this.validateMaxlength(this.maxlength),this.messages=r(this.element).messages}render(){return a("span",{key:"41b489eafc25e9fe2e32b54a72542090d79e1052",id:this.identifier,"aria-live":"polite"},a("span",{key:"c9dd3eb15ebc866333d4e911e1a560cac1c07ef7","aria-hidden":"true"},this.maxlength-this.characters.length,"/",this.maxlength),a("span",{key:"0e4664f577b8db68f0355fc92f9df251f945dedd",class:"mg-u-visually-hidden"},this.messages.nbCharLeft.replace("{counter}",this.maxlength-this.characters.length)))}get element(){return this}static get watchers(){return{identifier:[{watchIdentifier:0}],maxlength:[{validateMaxlength:0}]}}static get style(){return".mg-u-visually-hidden.sc-mg-character-left{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}*.sc-mg-character-left:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*.sc-mg-character-left{animation:none !important;transition:none !important}}mg-character-left.sc-mg-character-left{display:block}"}},[2,"mg-character-left",{identifier:[1],characters:[1],maxlength:[2]},void 0,{identifier:[{watchIdentifier:0}],maxlength:[{validateMaxlength:0}]}]);function o(){"undefined"!=typeof customElements&&["mg-character-left"].forEach((t=>{"mg-character-left"===t&&(customElements.get(e(t))||customElements.define(e(t),c))}))}o();export{c as M,o as d}
@@ -1 +1 @@
1
- import{transformTag as e,proxyCustomElement as t,HTMLElement as i,createEvent as a,h as s}from"@stencil/core/internal/client";import{i as n}from"./index2.js";import{d as m}from"./mg-icon2.js";const o=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expandedChange=a(this,"expanded-change",7),this.hideSummary=!1,this.expanded=!1,this.handleToggle=()=>{this.expanded=this.details.open}}validateTitles(e){if(!n(e))throw Error(`<mg-details> prop "toggleClosed" and "toggleOpened" is required and must be a valid string. Passed value: "toggleClosed='${this.toggleClosed}'" and "toggleOpened='${this.toggleOpened}'".`)}handleExpanded(e){this.expandedChange.emit(e)}componentWillLoad(){this.validateTitles(this.toggleClosed),this.validateTitles(this.toggleOpened);const e=this.element.querySelector('[slot="summary"]');this.isEmptySummary=null===e||!n(e.textContent),this.element.addEventListener("click",(e=>{null!==e.target.closest('[slot="summary"] mg-button, mg-button[slot="summary"]')&&e.preventDefault()}))}render(){return s("details",{key:"17840b16bee77489062320bd7a679d6e4765a6f6",class:{"mg-c-details":!0,"mg-c-details--empty-summary":this.isEmptySummary},onToggle:this.handleToggle,open:this.expanded,ref:e=>this.details=e},s("summary",{key:"be713c922be8c97cdfb803cd1a59a34de708fe5e"},s("slot",{key:"cebdbaee05189542496143208945ab1f685702ef",name:"summary"}),s("span",{key:"7a2ad4790c1a1b905e5fc65fc518c133139c0889",class:"mg-c-details__toggle"},s("mg-icon",{key:"628862cb0c1768c44c07033f2148ed7979bdad2b",icon:"chevron-up",class:{"mg-c-details__toggle-icon":!0,"mg-c-details__toggle-icon--reverse":!this.expanded}}),s("span",{key:"b2bb91aa70f91ea654d944d7f00c21d6ab0e3ebf",class:{"mg-u-visually-hidden":this.hideSummary}},this.expanded?this.toggleOpened:this.toggleClosed))),s("div",{key:"9432a42632e4c002d717a2851e372d6b40296c6f",class:"mg-c-details__details"},s("slot",{key:"008041bac5a1c3bf5eb7a172537750e6fa38aabc",name:"details"})))}get element(){return this}static get watchers(){return{toggleClosed:[{validateTitles:0}],toggleOpened:[{validateTitles:0}],expanded:[{handleExpanded:0}]}}static get style(){return".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-details summary{display:inline-flex;align-items:baseline;cursor:pointer;gap:var(--mg-b-size-16)}.mg-c-details summary::-webkit-details-marker{display:none}.mg-c-details.mg-c-details--empty-summary summary{gap:unset}.mg-c-details__toggle{display:flex;min-height:calc(var(--mg-b-font-size)*var(--mg-b-line-height));flex-shrink:0;align-items:center;align-self:flex-start;gap:var(--mg-b-size-4)}.mg-c-details__toggle-icon.mg-c-details__toggle-icon--reverse{transform:rotate(180deg)}.mg-c-details__details{margin-top:var(--mg-c-details-spacing)}@media (width < 43.75rem){.mg-c-details:not(.mg-c-details--empty-summary) .mg-c-details__toggle>span{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}}"}},[257,"mg-details",{toggleClosed:[1,"toggle-closed"],toggleOpened:[1,"toggle-opened"],hideSummary:[4,"hide-summary"],expanded:[1028]},void 0,{toggleClosed:[{validateTitles:0}],toggleOpened:[{validateTitles:0}],expanded:[{handleExpanded:0}]}]);function l(){"undefined"!=typeof customElements&&["mg-details","mg-icon"].forEach((t=>{switch(t){case"mg-details":customElements.get(e(t))||customElements.define(e(t),o);break;case"mg-icon":customElements.get(e(t))||m()}}))}l();const r=o,d=l;export{r as MgDetails,d as defineCustomElement}
1
+ import{transformTag as e,proxyCustomElement as t,HTMLElement as i,createEvent as a,h as s}from"@stencil/core/internal/client";import{i as n}from"./index2.js";import{d as m}from"./mg-icon2.js";const o=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expandedChange=a(this,"expanded-change",7),this.hideSummary=!1,this.expanded=!1,this.handleToggle=()=>{this.expanded=this.details.open}}validateTitles(e){if(!n(e))throw Error(`<mg-details> prop "toggleClosed" and "toggleOpened" is required and must be a valid string. Passed value: "toggleClosed='${this.toggleClosed}'" and "toggleOpened='${this.toggleOpened}'".`)}handleExpanded(e){this.expandedChange.emit(e)}componentWillLoad(){this.validateTitles(this.toggleClosed),this.validateTitles(this.toggleOpened);const e=this.element.querySelector('[slot="summary"]');this.isEmptySummary=null===e||!n(e.textContent),this.element.addEventListener("click",(e=>{null!==e.target.closest('[slot="summary"] mg-button, mg-button[slot="summary"]')&&e.preventDefault()}))}render(){return s("details",{key:"bbaac6909fa5f3fbd3236b2a8ace0f7c80b2580b",class:{"mg-c-details":!0,"mg-c-details--empty-summary":this.isEmptySummary},onToggle:this.handleToggle,open:this.expanded,ref:e=>this.details=e},s("summary",{key:"2ed8228b63403dd9b386bf3fa70c9094516b6f0e"},s("slot",{key:"5461d77d2b2869b14737a5c7cfc40a1f9584ee03",name:"summary"}),s("span",{key:"bb089365bdeaa7b934b97cff6f5f7c67587048e1",class:"mg-c-details__toggle"},s("mg-icon",{key:"dc1a30338703ad4182d50f9953a903ae0f68ecb1",icon:"chevron-up",class:{"mg-c-details__toggle-icon":!0,"mg-c-details__toggle-icon--reverse":!this.expanded}}),s("span",{key:"a32cbaf9e38b71540deeaa8980895c34a7288ecb",class:{"mg-u-visually-hidden":this.hideSummary}},this.expanded?this.toggleOpened:this.toggleClosed))),s("div",{key:"b9c2bc7d681da8ac8b4dec5ff25287bc68975fb6",class:"mg-c-details__details"},s("slot",{key:"069f05b4c133ff13055681e0b05bb98744303137",name:"details"})))}get element(){return this}static get watchers(){return{toggleClosed:[{validateTitles:0}],toggleOpened:[{validateTitles:0}],expanded:[{handleExpanded:0}]}}static get style(){return".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-details summary{display:inline-flex;align-items:baseline;cursor:pointer;gap:var(--mg-b-size-16)}.mg-c-details summary::-webkit-details-marker{display:none}.mg-c-details.mg-c-details--empty-summary summary{gap:unset}.mg-c-details__toggle{display:flex;min-height:calc(var(--mg-b-font-size)*var(--mg-b-line-height));flex-shrink:0;align-items:center;align-self:flex-start;gap:var(--mg-b-size-4)}.mg-c-details__toggle-icon.mg-c-details__toggle-icon--reverse{transform:rotate(180deg)}.mg-c-details__details{margin-top:var(--mg-c-details-spacing)}@media (width < 43.75rem){.mg-c-details:not(.mg-c-details--empty-summary) .mg-c-details__toggle>span{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}}"}},[257,"mg-details",{toggleClosed:[1,"toggle-closed"],toggleOpened:[1,"toggle-opened"],hideSummary:[4,"hide-summary"],expanded:[1028]},void 0,{toggleClosed:[{validateTitles:0}],toggleOpened:[{validateTitles:0}],expanded:[{handleExpanded:0}]}]);function l(){"undefined"!=typeof customElements&&["mg-details","mg-icon"].forEach((t=>{switch(t){case"mg-details":customElements.get(e(t))||customElements.define(e(t),o);break;case"mg-icon":customElements.get(e(t))||m()}}))}l();const r=o,d=l;export{r as MgDetails,d as defineCustomElement}
@@ -1 +1 @@
1
- import{transformTag as i,proxyCustomElement as e,HTMLElement as d,h as t}from"@stencil/core/internal/client";const r=e(class extends d{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.fullWidth=!1}render(){return t("div",{key:"60b987cb329c6db14c2cc4a665e7f32b2696a3ee",class:{"mg-c-divider":!0,"mg-c-divider--full-width":this.fullWidth}})}static get style(){return".mg-c-divider{width:var(--mg-b-size-120);height:var(--mg-c-divider-thickness);margin:var(--mg-c-divider-spacing-vertical) auto;background-color:var(--mg-c-divider-color-background)}.mg-c-divider.mg-c-divider--full-width{width:100%}"}},[1,"mg-divider",{fullWidth:[4,"full-width"]}]);function c(){"undefined"!=typeof customElements&&["mg-divider"].forEach((e=>{"mg-divider"===e&&(customElements.get(i(e))||customElements.define(i(e),r))}))}c();export{r as M,c as d}
1
+ import{transformTag as i,proxyCustomElement as e,HTMLElement as d,h as t}from"@stencil/core/internal/client";const r=e(class extends d{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.fullWidth=!1}render(){return t("div",{key:"a1b0e3b95ed9f52febab9f8d50b4053d1c13f7fb",class:{"mg-c-divider":!0,"mg-c-divider--full-width":this.fullWidth}})}static get style(){return".mg-c-divider{width:var(--mg-b-size-120);height:var(--mg-c-divider-thickness);margin:var(--mg-c-divider-spacing-vertical) auto;background-color:var(--mg-c-divider-color-background)}.mg-c-divider.mg-c-divider--full-width{width:100%}"}},[1,"mg-divider",{fullWidth:[4,"full-width"]}]);function c(){"undefined"!=typeof customElements&&["mg-divider"].forEach((e=>{"mg-divider"===e&&(customElements.get(i(e))||customElements.define(i(e),r))}))}c();export{r as M,c as d}
@@ -1 +1 @@
1
- import{transformTag as t,proxyCustomElement as e,HTMLElement as i,h as s}from"@stencil/core/internal/client";import{C as o,i as n}from"./index2.js";import{i as l,c as a}from"./mg-input.conf.js";import{d as r}from"./mg-icon2.js";import{d}from"./mg-input2.js";import{d as h}from"./mg-input-title2.js";import{d as c}from"./mg-tooltip2.js";import{d as m}from"./mg-tooltip-content2.js";const p=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.name=this.identifier,this.legendHide=!1,this.legendBorderDisplay=!1,this.readonly=!1,this.disabled=!1,this.classCollection=new o(["mg-c-input--fieldset"]),this.checkValidity=()=>{var t;this.valid=!(this.mgInputs.some((t=>t.invalid))||(null===(t=this.errorMessage)||void 0===t?void 0:t.length)>0)},this.setMgInputs=()=>{this.mgInputs=Array.from(this.element.querySelectorAll("*")).filter((t=>t.nodeName.startsWith("MG-INPUT"))),this.mgInputs.forEach((t=>{"MG-INPUT-FILE"===t.nodeName&&(this.readonly?t.setAttribute("hidden",""):t.removeAttribute("hidden")),this.readonly&&!l(t)?t.readonly=!0:this.disabled?t.disabled=!0:t.addEventListener("input-valid",this.checkValidity)}))}}watchLegendBorderDisplay(t){if(t&&!n(this.legendHeading))throw Error('<mg-fieldset> prop "legendBorderDisplay" must not be paired with the prop "legendHeading".')}watchReadonly(t){t?this.classCollection.add(a):this.classCollection.delete(a)}handleAttributeChange(){this.setMgInputs()}async setCustomValidity(t){this.errorMessage=n(t)?t:void 0,this.checkValidity()}async displayError(){this.readonly||this.mgInputs.forEach((t=>{t.displayError()}))}componentWillLoad(){this.watchReadonly(this.readonly),this.watchLegendBorderDisplay(this.legendBorderDisplay),this.setMgInputs()}componentDidLoad(){const t={childList:!0,subtree:!0};new MutationObserver((e=>{e.some((e=>Object.keys(t).includes(e.type)))&&this.setMgInputs()})).observe(this.element,t)}render(){return s("mg-input",{key:"31ccb9f783687845080fc7f184cc54b7343fab65",label:this.legend,identifier:this.identifier,class:this.classCollection.join(),labelOnTop:!this.legendHide,labelHeading:this.legendHeading,labelBorderDisplay:this.legendHeading&&this.legendBorderDisplay,labelHide:this.legendHide,inputsOnBottom:void 0!==this.legendHeading,tooltip:this.tooltip,tooltipPosition:"label",helpText:this.helpText,errorMessage:!this.valid&&n(this.errorMessage)?this.errorMessage:void 0},s("span",{key:"eedf1c66eaf88bee037c11b812844bb5a92175c1",class:"mg-c-input__input-group"},s("slot",{key:"a28f6759a63873ef4a228820b4310b42fcf1d3c7"})))}get element(){return this}static get watchers(){return{legendBorderDisplay:[{watchLegendBorderDisplay:0}],readonly:[{watchReadonly:0},{handleAttributeChange:0}],disabled:[{handleAttributeChange:0}]}}},[257,"mg-fieldset",{identifier:[1],name:[1],legend:[1],legendHide:[4,"legend-hide"],legendHeading:[1,"legend-heading"],legendBorderDisplay:[4,"legend-border-display"],readonly:[4],disabled:[4],tooltip:[1],helpText:[1,"help-text"],errorMessage:[32],valid:[32],classCollection:[32],setCustomValidity:[64],displayError:[64]},void 0,{legendBorderDisplay:[{watchLegendBorderDisplay:0}],readonly:[{watchReadonly:0},{handleAttributeChange:0}],disabled:[{handleAttributeChange:0}]}]);function g(){"undefined"!=typeof customElements&&["mg-fieldset","mg-icon","mg-input","mg-input-title","mg-tooltip","mg-tooltip-content"].forEach((e=>{switch(e){case"mg-fieldset":customElements.get(t(e))||customElements.define(t(e),p);break;case"mg-icon":customElements.get(t(e))||r();break;case"mg-input":customElements.get(t(e))||d();break;case"mg-input-title":customElements.get(t(e))||h();break;case"mg-tooltip":customElements.get(t(e))||c();break;case"mg-tooltip-content":customElements.get(t(e))||m()}}))}g();const u=p,b=g;export{u as MgFieldset,b as defineCustomElement}
1
+ import{transformTag as t,proxyCustomElement as e,HTMLElement as i,h as s}from"@stencil/core/internal/client";import{C as o,i as n}from"./index2.js";import{i as d,c as a}from"./mg-input.conf.js";import{d as l}from"./mg-icon2.js";import{d as r}from"./mg-input2.js";import{d as h}from"./mg-input-title2.js";import{d as c}from"./mg-tooltip2.js";import{d as m}from"./mg-tooltip-content2.js";const p=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.name=this.identifier,this.legendHide=!1,this.legendBorderDisplay=!1,this.readonly=!1,this.disabled=!1,this.classCollection=new o(["mg-c-input--fieldset"]),this.checkValidity=()=>{var t;this.valid=!(this.mgInputs.some((t=>t.invalid))||(null===(t=this.errorMessage)||void 0===t?void 0:t.length)>0)},this.setMgInputs=()=>{this.mgInputs=Array.from(this.element.querySelectorAll("*")).filter((t=>t.nodeName.startsWith("MG-INPUT"))),this.mgInputs.forEach((t=>{"MG-INPUT-FILE"===t.nodeName&&(this.readonly?t.setAttribute("hidden",""):t.removeAttribute("hidden")),this.readonly&&!d(t)?t.readonly=!0:this.disabled?t.disabled=!0:t.addEventListener("input-valid",this.checkValidity)}))}}watchLegendBorderDisplay(t){if(t&&!n(this.legendHeading))throw Error('<mg-fieldset> prop "legendBorderDisplay" must not be paired with the prop "legendHeading".')}watchReadonly(t){t?this.classCollection.add(a):this.classCollection.delete(a)}handleAttributeChange(){this.setMgInputs()}async setCustomValidity(t){this.errorMessage=n(t)?t:void 0,this.checkValidity()}async displayError(){this.readonly||this.mgInputs.forEach((t=>{t.displayError()}))}componentWillLoad(){this.watchReadonly(this.readonly),this.watchLegendBorderDisplay(this.legendBorderDisplay),this.setMgInputs()}componentDidLoad(){const t={childList:!0,subtree:!0};new MutationObserver((e=>{e.some((e=>Object.keys(t).includes(e.type)))&&this.setMgInputs()})).observe(this.element,t)}render(){return s("mg-input",{key:"a32d9d6e0a77eddf6dac1c741066cb600c2f27b3",label:this.legend,identifier:this.identifier,class:this.classCollection.join(),labelOnTop:!this.legendHide,labelHeading:this.legendHeading,labelBorderDisplay:this.legendHeading&&this.legendBorderDisplay,labelHide:this.legendHide,inputsOnBottom:void 0!==this.legendHeading,tooltip:this.tooltip,tooltipPosition:"label",helpText:this.helpText,errorMessage:!this.valid&&n(this.errorMessage)?this.errorMessage:void 0},s("span",{key:"5d05e51fd64fc43458bccb3287fcf3a4fe462c00",class:"mg-c-input__input-group"},s("slot",{key:"d641e3007cdd2adfa6115f639603de78caa63202"})))}get element(){return this}static get watchers(){return{legendBorderDisplay:[{watchLegendBorderDisplay:0}],readonly:[{watchReadonly:0},{handleAttributeChange:0}],disabled:[{handleAttributeChange:0}]}}},[257,"mg-fieldset",{identifier:[1],name:[1],legend:[1],legendHide:[4,"legend-hide"],legendHeading:[1,"legend-heading"],legendBorderDisplay:[4,"legend-border-display"],readonly:[4],disabled:[4],tooltip:[1],helpText:[1,"help-text"],errorMessage:[32],valid:[32],classCollection:[32],setCustomValidity:[64],displayError:[64]},void 0,{legendBorderDisplay:[{watchLegendBorderDisplay:0}],readonly:[{watchReadonly:0},{handleAttributeChange:0}],disabled:[{handleAttributeChange:0}]}]);function g(){"undefined"!=typeof customElements&&["mg-fieldset","mg-icon","mg-input","mg-input-title","mg-tooltip","mg-tooltip-content"].forEach((e=>{switch(e){case"mg-fieldset":customElements.get(t(e))||customElements.define(t(e),p);break;case"mg-icon":customElements.get(t(e))||l();break;case"mg-input":customElements.get(t(e))||r();break;case"mg-input-title":customElements.get(t(e))||h();break;case"mg-tooltip":customElements.get(t(e))||c();break;case"mg-tooltip-content":customElements.get(t(e))||m()}}))}g();const u=p,f=g;export{u as MgFieldset,f as defineCustomElement}
@@ -1 +1 @@
1
- import{transformTag as i,proxyCustomElement as t,HTMLElement as e,createEvent as s,h as r}from"@stencil/core/internal/client";import{c as a,C as h,a as o,t as n}from"./index2.js";import{i as l}from"./index3.js";import{i as d}from"./mg-input.conf.js";const m=["form","search","none","presentation"],c=["default","hide"],f=t(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.formValid=s(this,"form-valid",7),this.formSubmit=s(this,"form-submit",7),this.formReset=s(this,"form-reset",7),this.classAllRequired="mg-c-form--all-required",this.classLabelOnTop="mg-c-form--label-on-top",this.identifier=a("mg-form"),this.name=this.identifier,this.readonly=!1,this.labelOnTop=!1,this.disabled=!1,this.classCollection=new h(["mg-c-form"]),this.setRequiredMessage=()=>{if(this.requiredMessageText=null,this.classCollection.delete(this.classAllRequired),"hide"===this.requiredMessage)return;if("default"===this.requiredMessage)return void(this.requiredMessageText=this.messages.form.required);const i=i=>!(i.disabled||i.readonly),t=i=>"MG-INPUT-TOGGLE"===i.nodeName;if(!this.disabled&&!this.readonly&&this.mgInputs.some((e=>i(e)&&!t(e)))){const e=this.mgInputs.filter(i),s=e.filter((i=>!t(i)&&i.required));[s.length,e.length].every((i=>1===i))||s.length>1&&s.length===e.filter((i=>!t(i))).length?(this.requiredMessageText=this.getRequiredMessageBasedOnCount(s,"allRequiredSingle","allRequired"),this.classCollection.add(this.classAllRequired)):s.length>0&&(this.requiredMessageText=this.getRequiredMessageBasedOnCount(s,"requiredSingle","required"))}},this.getRequiredMessageBasedOnCount=(i,t,e)=>this.messages.form[1===i.length?t:e],this.checkValidity=()=>{this.setRequiredMessage(),this.valid=!this.mgInputs.some((i=>i.invalid)),this.invalid=!this.valid,this.formValid.emit(this.valid)},this.handleFormSubmit=i=>{i.preventDefault(),this.formSubmit.emit()},this.setMgInputs=()=>{this.mgInputs=Array.from(this.element.querySelectorAll("*")).filter((i=>i.nodeName.startsWith("MG-INPUT"))),this.mgInputs.forEach((i=>{this.labelOnTop&&(i.labelOnTop=!0),"MG-INPUT-FILE"===i.nodeName&&(this.readonly?i.setAttribute("hidden",""):i.removeAttribute("hidden")),this.readonly&&!d(i)?i.readonly=!0:this.disabled?i.disabled=!0:i.addEventListener("input-valid",this.checkValidity)}))}}watchIdentifier(i){o(i)||console.error(`<mg-form> prop "identifier" value is invalid. Passed value: ${n(i)}.`)}validateRequiredMessage(i){if(i&&!c.includes(i))throw Error(`<mg-form> prop "requiredMessage" must be one of: ${c.join(", ")}. Passed value: ${n(i)}.`)}validateAriaRole(i){if(i&&!m.includes(i))throw Error(`<mg-form> prop "ariaRole" must be one of: ${m.join(", ")}. Passed value: ${n(i)}.`)}handlelabelOnTop(i){i?this.classCollection.add(this.classLabelOnTop):this.classCollection.delete(this.classLabelOnTop)}handleAttributeChange(){this.setMgInputs(),this.setRequiredMessage()}async displayError(){this.readonly||([...Array.from(this.element.querySelectorAll("*")).filter((i=>i.nodeName.startsWith("MG-FIELDSET"))),...this.mgInputs].forEach((i=>{var t;null===(t=i.displayError)||void 0===t||t.call(i)})),this.checkValidity())}async reset(){this.readonly||(await Promise.all(this.mgInputs.map((async i=>{void 0!==i.reset&&await i.reset()}))),this.checkValidity(),this.formReset.emit(!0))}componentWillLoad(){this.messages=l(this.element).messages,this.watchIdentifier(this.identifier),this.validateAriaRole(this.ariaRole),this.validateRequiredMessage(this.requiredMessage),this.handlelabelOnTop(this.labelOnTop),this.mgButtons=Array.from(this.element.querySelectorAll("mg-button")),this.mgButtons.forEach((i=>{i.setAttribute("form",this.identifier),"reset"===i.type&&i.addEventListener("click",(()=>{this.reset()}))})),this.setMgInputs(),Promise.all(this.mgInputs.map((async i=>{try{await i.componentOnReady()}catch(i){}}))).then((()=>{this.checkValidity()}))}componentDidLoad(){const i={childList:!0,subtree:!0};new MutationObserver((t=>{t.some((t=>Object.keys(i).includes(t.type)))&&(this.setMgInputs(),this.checkValidity())})).observe(this.element,i)}render(){return r("form",{key:"b2e3d218d978f1194b2c461ab75cae7d491bc2c3",class:this.classCollection.join(),id:this.identifier,name:this.name,onSubmit:this.handleFormSubmit,role:this.ariaRole},this.requiredMessageText&&r("p",{key:"dd6db1a740f5fe525c3b652c2128aba6185970b8",innerHTML:this.requiredMessageText}),r("slot",{key:"5221d0c8fa5e30749c82d01490b402d9e46a63cd"}),!this.readonly&&!this.disabled&&r("slot",{key:"fb2595b8c5df85b9cefac0f43e54e463d529fff4",name:"actions"}))}get element(){return this}static get watchers(){return{identifier:[{watchIdentifier:0}],requiredMessage:[{validateRequiredMessage:0},{handleAttributeChange:0}],ariaRole:[{validateAriaRole:0}],labelOnTop:[{handlelabelOnTop:0}],readonly:[{handleAttributeChange:0}],disabled:[{handleAttributeChange:0}]}}static get style(){return".mg-u-form-legacy{--mg-c-form-inputs-title-width:calc(100% / 3 - 20px)}.mg-u-is-asterisk{color:var(--mg-b-color-danger)}.mg-c-form{--mg-c-input-title-width:var(--mg-c-form-inputs-title-width, calc(28 * var(--mg-b-size-8)));--mg-c-input-margin-bottom:var(--mg-b-size-16);--mg-c-input-title-horizontal-space:var(--mg-b-size-32)}.mg-c-form.mg-c-form--all-required{--mg-c-input-title-display:none}.mg-c-form.mg-c-form--label-on-top{--mg-c-input-margin-bottom:var(--mg-b-size-24)}.mg-c-form>p{font-size:var(--mg-b-font-size-small)}"}},[257,"mg-form",{identifier:[1],name:[1],readonly:[4],requiredMessage:[1,"required-message"],ariaRole:[1,"aria-role"],labelOnTop:[4,"label-on-top"],disabled:[4],valid:[1028],invalid:[1028],classCollection:[32],requiredMessageText:[32],displayError:[64],reset:[64]},void 0,{identifier:[{watchIdentifier:0}],requiredMessage:[{validateRequiredMessage:0},{handleAttributeChange:0}],ariaRole:[{validateAriaRole:0}],labelOnTop:[{handlelabelOnTop:0}],readonly:[{handleAttributeChange:0}],disabled:[{handleAttributeChange:0}]}]);function u(){"undefined"!=typeof customElements&&["mg-form"].forEach((t=>{"mg-form"===t&&(customElements.get(i(t))||customElements.define(i(t),f))}))}u();const g=f,b=u;export{g as MgForm,b as defineCustomElement}
1
+ import{transformTag as i,proxyCustomElement as t,HTMLElement as e,createEvent as s,h as a}from"@stencil/core/internal/client";import{c as r,C as h,a as o,t as n}from"./index2.js";import{i as l}from"./index3.js";import{i as d}from"./mg-input.conf.js";const m=["form","search","none","presentation"],c=["default","hide"],u=t(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.formValid=s(this,"form-valid",7),this.formSubmit=s(this,"form-submit",7),this.formReset=s(this,"form-reset",7),this.classAllRequired="mg-c-form--all-required",this.classLabelOnTop="mg-c-form--label-on-top",this.identifier=r("mg-form"),this.name=this.identifier,this.readonly=!1,this.labelOnTop=!1,this.disabled=!1,this.classCollection=new h(["mg-c-form"]),this.setRequiredMessage=()=>{if(this.requiredMessageText=null,this.classCollection.delete(this.classAllRequired),"hide"===this.requiredMessage)return;if("default"===this.requiredMessage)return void(this.requiredMessageText=this.messages.form.required);const i=i=>!(i.disabled||i.readonly),t=i=>"MG-INPUT-TOGGLE"===i.nodeName;if(!this.disabled&&!this.readonly&&this.mgInputs.some((e=>i(e)&&!t(e)))){const e=this.mgInputs.filter(i),s=e.filter((i=>!t(i)&&i.required));[s.length,e.length].every((i=>1===i))||s.length>1&&s.length===e.filter((i=>!t(i))).length?(this.requiredMessageText=this.getRequiredMessageBasedOnCount(s,"allRequiredSingle","allRequired"),this.classCollection.add(this.classAllRequired)):s.length>0&&(this.requiredMessageText=this.getRequiredMessageBasedOnCount(s,"requiredSingle","required"))}},this.getRequiredMessageBasedOnCount=(i,t,e)=>this.messages.form[1===i.length?t:e],this.checkValidity=()=>{this.setRequiredMessage(),this.valid=!this.mgInputs.some((i=>i.invalid)),this.invalid=!this.valid,this.formValid.emit(this.valid)},this.handleFormSubmit=i=>{i.preventDefault(),this.formSubmit.emit()},this.setMgInputs=()=>{this.mgInputs=Array.from(this.element.querySelectorAll("*")).filter((i=>i.nodeName.startsWith("MG-INPUT"))),this.mgInputs.forEach((i=>{this.labelOnTop&&(i.labelOnTop=!0),"MG-INPUT-FILE"===i.nodeName&&(this.readonly?i.setAttribute("hidden",""):i.removeAttribute("hidden")),this.readonly&&!d(i)?i.readonly=!0:this.disabled?i.disabled=!0:i.addEventListener("input-valid",this.checkValidity)}))}}watchIdentifier(i){o(i)||console.error(`<mg-form> prop "identifier" value is invalid. Passed value: ${n(i)}.`)}validateRequiredMessage(i){if(i&&!c.includes(i))throw Error(`<mg-form> prop "requiredMessage" must be one of: ${c.join(", ")}. Passed value: ${n(i)}.`)}validateAriaRole(i){if(i&&!m.includes(i))throw Error(`<mg-form> prop "ariaRole" must be one of: ${m.join(", ")}. Passed value: ${n(i)}.`)}handlelabelOnTop(i){i?this.classCollection.add(this.classLabelOnTop):this.classCollection.delete(this.classLabelOnTop)}handleAttributeChange(){this.setMgInputs(),this.setRequiredMessage()}async displayError(){this.readonly||([...Array.from(this.element.querySelectorAll("*")).filter((i=>i.nodeName.startsWith("MG-FIELDSET"))),...this.mgInputs].forEach((i=>{var t;null===(t=i.displayError)||void 0===t||t.call(i)})),this.checkValidity())}async reset(){this.readonly||(await Promise.all(this.mgInputs.map((async i=>{void 0!==i.reset&&await i.reset()}))),this.checkValidity(),this.formReset.emit(!0))}componentWillLoad(){this.messages=l(this.element).messages,this.watchIdentifier(this.identifier),this.validateAriaRole(this.ariaRole),this.validateRequiredMessage(this.requiredMessage),this.handlelabelOnTop(this.labelOnTop),this.mgButtons=Array.from(this.element.querySelectorAll("mg-button")),this.mgButtons.forEach((i=>{i.setAttribute("form",this.identifier),"reset"===i.type&&i.addEventListener("click",(()=>{this.reset()}))})),this.setMgInputs(),Promise.all(this.mgInputs.map((async i=>{try{await i.componentOnReady()}catch(i){}}))).then((()=>{this.checkValidity()}))}componentDidLoad(){const i={childList:!0,subtree:!0};new MutationObserver((t=>{t.some((t=>Object.keys(i).includes(t.type)))&&(this.setMgInputs(),this.checkValidity())})).observe(this.element,i)}render(){return a("form",{key:"e528a49eba4e57f809dd0a6dd5462c2be3677da5",class:this.classCollection.join(),id:this.identifier,name:this.name,onSubmit:this.handleFormSubmit,role:this.ariaRole},this.requiredMessageText&&a("p",{key:"37eb0c30984b998ef8d78ff8ae74949c4761c21a",innerHTML:this.requiredMessageText}),a("slot",{key:"8ae80522118a3e87ca735545a48844c1e4e3ab30"}),!this.readonly&&!this.disabled&&a("slot",{key:"4cdeba849881f9753ff08df6c456397e859c6a0d",name:"actions"}))}get element(){return this}static get watchers(){return{identifier:[{watchIdentifier:0}],requiredMessage:[{validateRequiredMessage:0},{handleAttributeChange:0}],ariaRole:[{validateAriaRole:0}],labelOnTop:[{handlelabelOnTop:0}],readonly:[{handleAttributeChange:0}],disabled:[{handleAttributeChange:0}]}}static get style(){return".mg-u-form-legacy{--mg-c-form-inputs-title-width:calc(100% / 3 - 20px)}.mg-u-is-asterisk{color:var(--mg-b-color-danger)}.mg-c-form{--mg-c-input-title-width:var(--mg-c-form-inputs-title-width, calc(28 * var(--mg-b-size-8)));--mg-c-input-margin-bottom:var(--mg-b-size-16);--mg-c-input-title-horizontal-space:var(--mg-b-size-32)}.mg-c-form.mg-c-form--all-required{--mg-c-input-title-display:none}.mg-c-form.mg-c-form--label-on-top{--mg-c-input-margin-bottom:var(--mg-b-size-24)}.mg-c-form>p{font-size:var(--mg-b-font-size-small)}"}},[257,"mg-form",{identifier:[1],name:[1],readonly:[4],requiredMessage:[1,"required-message"],ariaRole:[1,"aria-role"],labelOnTop:[4,"label-on-top"],disabled:[4],valid:[1028],invalid:[1028],classCollection:[32],requiredMessageText:[32],displayError:[64],reset:[64]},void 0,{identifier:[{watchIdentifier:0}],requiredMessage:[{validateRequiredMessage:0},{handleAttributeChange:0}],ariaRole:[{validateAriaRole:0}],labelOnTop:[{handlelabelOnTop:0}],readonly:[{handleAttributeChange:0}],disabled:[{handleAttributeChange:0}]}]);function f(){"undefined"!=typeof customElements&&["mg-form"].forEach((t=>{"mg-form"===t&&(customElements.get(i(t))||customElements.define(i(t),u))}))}f();const g=u,b=f;export{g as MgForm,b as defineCustomElement}