@mgdis/mg-components 5.28.0 → 5.28.2

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 (65) hide show
  1. package/dist/cjs/{index-d8721674.js → index-792fd1c1.js} +48 -47
  2. package/dist/cjs/index-792fd1c1.js.map +1 -0
  3. package/dist/cjs/mg-action-more_36.cjs.entry.js +91 -91
  4. package/dist/cjs/mg-action-more_36.cjs.entry.js.map +1 -1
  5. package/dist/cjs/mg-loader.cjs.entry.js +2 -2
  6. package/dist/collection/components/atoms/mg-button/mg-button.js +2 -2
  7. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
  8. package/dist/components/index.es.js +41 -40
  9. package/dist/components/index.es.js.map +1 -1
  10. package/dist/components/index2.js +2 -2
  11. package/dist/components/mg-action-more.js +2 -2
  12. package/dist/components/mg-badge2.js +3 -3
  13. package/dist/components/mg-button2.js +5 -5
  14. package/dist/components/mg-button2.js.map +1 -1
  15. package/dist/components/mg-card2.js +2 -2
  16. package/dist/components/mg-details.js +2 -2
  17. package/dist/components/mg-form.js +3 -3
  18. package/dist/components/mg-icon2.js +2 -2
  19. package/dist/components/mg-illustrated-message.js +2 -2
  20. package/dist/components/mg-input-checkbox.js +4 -4
  21. package/dist/components/mg-input-date.js +11 -11
  22. package/dist/components/mg-input-numeric.js +5 -5
  23. package/dist/components/mg-input-password.js +3 -3
  24. package/dist/components/mg-input-radio.js +4 -4
  25. package/dist/components/mg-input-select2.js +6 -6
  26. package/dist/components/mg-input-text2.js +6 -6
  27. package/dist/components/mg-input-textarea.js +6 -6
  28. package/dist/components/mg-input-title2.js +2 -2
  29. package/dist/components/mg-input-toggle.js +4 -4
  30. package/dist/components/mg-input2.js +3 -3
  31. package/dist/components/mg-item-more2.js +3 -3
  32. package/dist/components/mg-loader.js +2 -2
  33. package/dist/components/mg-menu-item2.js +5 -5
  34. package/dist/components/mg-message.js +3 -3
  35. package/dist/components/mg-modal.js +6 -6
  36. package/dist/components/mg-pagination2.js +2 -2
  37. package/dist/components/mg-panel.js +4 -4
  38. package/dist/components/mg-popover-content2.js +3 -3
  39. package/dist/components/mg-popover2.js +3 -3
  40. package/dist/components/mg-skip-links.js +2 -2
  41. package/dist/components/mg-tabs.js +6 -6
  42. package/dist/components/mg-tag.js +3 -3
  43. package/dist/components/mg-tooltip2.js +6 -6
  44. package/dist/esm/{index-817d7645.js → index-2667a5c4.js} +43 -42
  45. package/dist/esm/index-2667a5c4.js.map +1 -0
  46. package/dist/esm/mg-action-more_36.entry.js +91 -91
  47. package/dist/esm/mg-action-more_36.entry.js.map +1 -1
  48. package/dist/esm/mg-loader.entry.js +2 -2
  49. package/dist/mg-components/mg-components.esm.js +1 -1
  50. package/dist/mg-components/{p-ef541188.entry.js → p-56cce4ec.entry.js} +2 -2
  51. package/dist/mg-components/p-56cce4ec.entry.js.map +1 -0
  52. package/dist/mg-components/{p-c4207303.entry.js → p-64eaef9e.entry.js} +2 -2
  53. package/dist/mg-components/p-7cda52b6.js +2 -0
  54. package/dist/mg-components/p-7cda52b6.js.map +1 -0
  55. package/dist/types/components/atoms/mg-button/mg-button.d.ts +1 -1
  56. package/dist/types/components.d.ts +2 -2
  57. package/ide/intellij/web-types.json +4 -4
  58. package/ide/vscode/html-custom-data.json +3 -3
  59. package/package.json +26 -27
  60. package/dist/cjs/index-d8721674.js.map +0 -1
  61. package/dist/esm/index-817d7645.js.map +0 -1
  62. package/dist/mg-components/p-eb6ec303.js +0 -2
  63. package/dist/mg-components/p-eb6ec303.js.map +0 -1
  64. package/dist/mg-components/p-ef541188.entry.js.map +0 -1
  65. /package/dist/mg-components/{p-c4207303.entry.js.map → p-64eaef9e.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { I as Ie } from './index.es.js';
2
+ import { Z as Ze } from './index.es.js';
3
3
  import { d as defineCustomElement$4 } from './mg-icon2.js';
4
4
  import { d as defineCustomElement$3 } from './mg-input-title2.js';
5
5
  import { d as defineCustomElement$2 } from './mg-tooltip2.js';
@@ -83,7 +83,7 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
83
83
  this.isVerticalList = false;
84
84
  }
85
85
  watchIdentifier(newValue) {
86
- if (!Ie(newValue)) {
86
+ if (!Ze(newValue)) {
87
87
  throw new Error('<mg-input> prop "identifier" is required.');
88
88
  }
89
89
  else {
@@ -168,7 +168,7 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
168
168
  */
169
169
  // eslint-disable-next-line @stencil-community/no-unused-watch
170
170
  watchLabel() {
171
- if (!Ie(this.label)) {
171
+ if (!Ze(this.label)) {
172
172
  throw new Error('<mg-input> prop "label" is required.');
173
173
  }
174
174
  else {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { I as Ie, G as Ge } from './index.es.js';
2
+ import { Z as Ze, Y as Ye } from './index.es.js';
3
3
  import { d as defineCustomElement$4, D as Direction, s as sizes } from './mg-menu-item2.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$8 } from './mg-badge2.js';
@@ -414,7 +414,7 @@ const MgItemMore = /*@__PURE__*/ proxyCustomElement(class MgItemMore extends HTM
414
414
  if (!proxy)
415
415
  return;
416
416
  // remove proxy id to prevent duplicate key. default html id is: '';
417
- if (Ie(proxy.id))
417
+ if (Ze(proxy.id))
418
418
  proxy.id = '';
419
419
  const proxyClickHandler = () => {
420
420
  this.parentMenu
@@ -458,7 +458,7 @@ const MgItemMore = /*@__PURE__*/ proxyCustomElement(class MgItemMore extends HTM
458
458
  // create item-more menu items element from main menu-items clones
459
459
  this.moreElementMenuItem.querySelector('mg-menu').appendChild(child.cloneNode(true));
460
460
  // we need to get all `mg-menu-item` linked to the cloned one to set mirror process
461
- Ge(() => {
461
+ Ye(() => {
462
462
  if (child.querySelector('mg-menu')) {
463
463
  child.querySelectorAll('mg-menu-item').forEach(this.setProxyElement);
464
464
  }
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
  import { i as initLocales } from './index2.js';
3
- import { I as Ie } from './index.es.js';
3
+ import { Z as Ze } from './index.es.js';
4
4
  import { d as defineCustomElement$2 } from './mg-icon2.js';
5
5
 
6
6
  const mgLoaderCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host{display:block}.mg-c-loader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.4rem;text-align:center}";
@@ -15,7 +15,7 @@ const MgLoader$1 = /*@__PURE__*/ proxyCustomElement(class MgLoader extends HTMLE
15
15
  this.messageHide = undefined;
16
16
  }
17
17
  watchMessage(newValue) {
18
- if (newValue && !Ie(newValue))
18
+ if (newValue && !Ze(newValue))
19
19
  throw new Error('<mg-loader> prop "message" must be a valid string.');
20
20
  }
21
21
  /*************
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { I as Ie, C as Ce, H as He, G as Ge } from './index.es.js';
2
+ import { Z as Ze, z as ze, I as Ie, Y as Ye } from './index.es.js';
3
3
  import { i as initLocales } from './index2.js';
4
4
  import { d as defineCustomElement$6 } from './mg-badge2.js';
5
5
  import { d as defineCustomElement$5 } from './mg-button2.js';
@@ -112,7 +112,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
112
112
  throw new Error(`<${this.name}> slot "label" is required.`);
113
113
  ['label', 'metadata'].forEach(slot => {
114
114
  Array.from(this.element.querySelectorAll(`[slot="${slot}"]`)).forEach(element => {
115
- if (!Ie(element.textContent))
115
+ if (!Ze(element.textContent))
116
116
  throw new Error(`<${this.name}> slot "${slot}" must have text content.`);
117
117
  if ((guard && element.getAttribute('title') === null) || !guard)
118
118
  element.setAttribute('title', element.textContent);
@@ -181,13 +181,13 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
181
181
  * @returns HTML Element
182
182
  */
183
183
  this.renderSlot = () => h("slot", null);
184
- this.identifier = Ce('mg-menu-item');
184
+ this.identifier = ze('mg-menu-item');
185
185
  this.href = undefined;
186
186
  this.target = undefined;
187
187
  this.status = Status.VISIBLE;
188
188
  this.expanded = false;
189
189
  this.size = 'regular';
190
- this.navigationButtonClassList = new He([this.navigationButton]);
190
+ this.navigationButtonClassList = new Ie([this.navigationButton]);
191
191
  this.direction = undefined;
192
192
  this.isInMainMenu = undefined;
193
193
  this.isItemMore = undefined;
@@ -334,7 +334,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
334
334
  * Emit event when component is updated
335
335
  */
336
336
  componentShouldUpdate() {
337
- return Ge(() => {
337
+ return Ye(() => {
338
338
  this.itemUpdated.emit();
339
339
  });
340
340
  }
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { C as Ce, H as He } from './index.es.js';
2
+ import { z as ze, I as Ie } from './index.es.js';
3
3
  import { i as initLocales } from './index2.js';
4
4
  import { d as defineCustomElement$4 } from './mg-button2.js';
5
5
  import { d as defineCustomElement$3 } from './mg-card2.js';
@@ -83,13 +83,13 @@ const MgMessage$1 = /*@__PURE__*/ proxyCustomElement(class MgMessage extends HTM
83
83
  return 'exclamation-circle';
84
84
  }
85
85
  };
86
- this.identifier = Ce('mg-message');
86
+ this.identifier = ze('mg-message');
87
87
  this.delay = undefined;
88
88
  this.variant = variants[0];
89
89
  this.closeButton = false;
90
90
  this.hide = false;
91
91
  this.noAriaRole = undefined;
92
- this.classCollection = new He(['mg-c-message']);
92
+ this.classCollection = new Ie(['mg-c-message']);
93
93
  this.hasActions = false;
94
94
  }
95
95
  validateDelay(newValue) {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { W as We, C as Ce, H as He, I as Ie } from './index.es.js';
2
+ import { K as Ke, z as ze, I as Ie, Z as Ze } from './index.es.js';
3
3
  import { i as initLocales } from './index2.js';
4
4
  import { d as defineCustomElement$4 } from './mg-button2.js';
5
5
  import { d as defineCustomElement$3 } from './mg-card2.js';
@@ -59,12 +59,12 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class MgModal extends HTMLEle
59
59
  */
60
60
  this.setFocus = () => {
61
61
  // Get all focusable elements
62
- const slottedFocusableElements = Array.from(this.element.querySelectorAll(We));
62
+ const slottedFocusableElements = Array.from(this.element.querySelectorAll(Ke));
63
63
  // If close button is enabled or at least one of the slotted element is focusable
64
64
  if (this.closeButton || slottedFocusableElements.length > 0) {
65
65
  // Check if slotted focusable elements have shadowDom with focusable elements
66
66
  this.modalFocusableElements = slottedFocusableElements.reduce((acc, focusableElement) => {
67
- acc.push(focusableElement.shadowRoot !== null ? focusableElement.shadowRoot.querySelector(We) || focusableElement : focusableElement);
67
+ acc.push(focusableElement.shadowRoot !== null ? focusableElement.shadowRoot.querySelector(Ke) || focusableElement : focusableElement);
68
68
  return acc;
69
69
  }, []);
70
70
  // When close button is enabled it's the first focusable element.
@@ -86,21 +86,21 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class MgModal extends HTMLEle
86
86
  this.handleClose = () => {
87
87
  this.hide = true;
88
88
  };
89
- this.identifier = Ce('mg-modal');
89
+ this.identifier = ze('mg-modal');
90
90
  this.dialogRole = dialogRoles[0];
91
91
  this.modalTitle = undefined;
92
92
  this.closeButton = false;
93
93
  this.hide = undefined;
94
94
  this.hasActions = false;
95
95
  this.hasContent = false;
96
- this.classCollection = new He(['mg-c-modal']);
96
+ this.classCollection = new Ie(['mg-c-modal']);
97
97
  }
98
98
  validateDialogRole(newValue) {
99
99
  if (!dialogRoles.includes(newValue))
100
100
  throw new Error(`<mg-modal> prop "dialogRole" must be one of: ${dialogRoles.join(', ')}.`);
101
101
  }
102
102
  validateModalTitle(newValue) {
103
- if (!Ie(newValue)) {
103
+ if (!Ze(newValue)) {
104
104
  throw new Error('<mg-modal> prop "modalTitle" is required.');
105
105
  }
106
106
  }
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { C as Ce } from './index.es.js';
2
+ import { z as ze } from './index.es.js';
3
3
  import { i as initLocales } from './index2.js';
4
4
  import { d as defineCustomElement$7 } from './mg-button2.js';
5
5
  import { d as defineCustomElement$6 } from './mg-icon2.js';
@@ -72,7 +72,7 @@ const MgPagination = /*@__PURE__*/ proxyCustomElement(class MgPagination extends
72
72
  this.handleGoToPage = (action, disabled) => {
73
73
  !disabled && this.goToPage(action === NavigationAction.NEXT ? this.currentPage + 1 : this.currentPage - 1);
74
74
  };
75
- this.identifier = Ce('mg-pagination');
75
+ this.identifier = ze('mg-pagination');
76
76
  this.label = undefined;
77
77
  this.hideNavigationLabels = undefined;
78
78
  this.hidePageCount = undefined;
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { C as Ce, H as He, I as Ie } from './index.es.js';
2
+ import { z as ze, I as Ie, Z as Ze } from './index.es.js';
3
3
  import { i as initLocales } from './index2.js';
4
4
  import { d as defineCustomElement$a } from './mg-button2.js';
5
5
  import { d as defineCustomElement$9 } from './mg-card2.js';
@@ -122,7 +122,7 @@ const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class MgPanel extends HTMLEle
122
122
  ];
123
123
  return this.titlePosition === 'right' ? children.reverse() : children;
124
124
  };
125
- this.identifier = Ce('mg-panel');
125
+ this.identifier = ze('mg-panel');
126
126
  this.panelTitle = undefined;
127
127
  this.titlePattern = undefined;
128
128
  this.titlePatternErrorMessage = undefined;
@@ -131,12 +131,12 @@ const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class MgPanel extends HTMLEle
131
131
  this.expanded = false;
132
132
  this.expandToggleDisplay = expandToggleDisplays[0];
133
133
  this.expandToggleDisabled = undefined;
134
- this.classCollection = new He(['mg-c-panel']);
134
+ this.classCollection = new Ie(['mg-c-panel']);
135
135
  this.isEditing = false;
136
136
  this.updatedPanelTitle = undefined;
137
137
  }
138
138
  validatePanelTitle(newValue) {
139
- if (!Ie(newValue))
139
+ if (!Ze(newValue))
140
140
  throw new Error('<mg-panel> prop "panelTitle" is required.');
141
141
  this.titleChange.emit(newValue);
142
142
  }
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { H as He, B as Be } from './index.es.js';
2
+ import { I as Ie, X as Xe } from './index.es.js';
3
3
  import { i as initLocales } from './index2.js';
4
4
  import { d as defineCustomElement$3 } from './mg-button2.js';
5
5
  import { d as defineCustomElement$2 } from './mg-card2.js';
@@ -21,7 +21,7 @@ const MgPopoverContent = /*@__PURE__*/ proxyCustomElement(class MgPopoverContent
21
21
  this.hideContent.emit();
22
22
  };
23
23
  this.closeButton = false;
24
- this.classCollection = new He(['mg-c-popover-content']);
24
+ this.classCollection = new Ie(['mg-c-popover-content']);
25
25
  }
26
26
  /*************
27
27
  * Lifecycle *
@@ -39,7 +39,7 @@ const MgPopoverContent = /*@__PURE__*/ proxyCustomElement(class MgPopoverContent
39
39
  componentDidLoad() {
40
40
  const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
41
41
  const slottedTitleElement = this.element.querySelector('[slot="title"]');
42
- if (slottedTitleElement && !Be(slottedTitleElement, headingTags)) {
42
+ if (slottedTitleElement && !Xe(slottedTitleElement, headingTags)) {
43
43
  throw new Error(`<mg-popover> Slotted title must be a heading: ${headingTags.join(', ')}`);
44
44
  }
45
45
  }
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { C as Ce, z as ze } from './index.es.js';
2
+ import { z as ze, Q as Qe } from './index.es.js';
3
3
  import { d as defineCustomElement$4 } from './mg-button2.js';
4
4
  import { d as defineCustomElement$3 } from './mg-card2.js';
5
5
  import { d as defineCustomElement$2 } from './mg-icon2.js';
@@ -103,7 +103,7 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
103
103
  mgPopoverContent.setAttribute('id', this.identifier);
104
104
  }
105
105
  };
106
- this.identifier = Ce('mg-popover');
106
+ this.identifier = ze('mg-popover');
107
107
  this.placement = 'bottom';
108
108
  this.arrowHide = false;
109
109
  this.closeButton = false;
@@ -146,7 +146,7 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
146
146
  */
147
147
  componentWillLoad() {
148
148
  // Get windows to attach events
149
- this.windows = ze(window);
149
+ this.windows = Qe(window);
150
150
  // render mg-popover-content slot
151
151
  this.renderPopoverContent();
152
152
  this.validateCloseButton(this.closeButton);
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { i as initLocales } from './index2.js';
3
- import { I as Ie } from './index.es.js';
3
+ import { Z as Ze } from './index.es.js';
4
4
 
5
5
  const mgSkipLinksCss = ".mg-c-skip-links{position:absolute;background:hsl(var(--color-light));opacity:0;transform:translateY(-100%)}.mg-c-skip-links:focus-within{position:relative;opacity:1;transform:translateY(0)}.mg-c-skip-links__list{display:flex;flex-wrap:wrap;align-items:center;padding:.64rem 1.8rem;margin:0;gap:.6rem;list-style:none}.mg-c-skip-links__link{display:inline-block;padding:1.2rem;color:hsl(var(--color-dark))}.mg-c-skip-links__link:hover{background:hsl(var(--color-dark)/10%)}";
6
6
  const MgSkipLinksStyle0 = mgSkipLinksCss;
@@ -25,7 +25,7 @@ const MgSkipLinks$1 = /*@__PURE__*/ proxyCustomElement(class MgSkipLinks extends
25
25
  this.links = undefined;
26
26
  }
27
27
  validateLinks(links) {
28
- if (links === undefined || links.length === 0 || links.some(link => !Ie(link.href) || !link.href.startsWith('#') || !Ie(link.label))) {
28
+ if (links === undefined || links.length === 0 || links.some(link => !Ze(link.href) || !link.href.startsWith('#') || !Ze(link.label))) {
29
29
  throw new Error(`<mg-skip-links> prop "links": Cannot be empty and each link must contains an href starting with a "#" and a non empty label attributes.`);
30
30
  }
31
31
  }
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { G as Ge, C as Ce, H as He, I as Ie, P as Pe } from './index.es.js';
2
+ import { Y as Ye, z as ze, I as Ie, Z as Ze, G as Ge } from './index.es.js';
3
3
  import { d as defineCustomElement$3 } from './mg-badge2.js';
4
4
  import { d as defineCustomElement$2 } from './mg-icon2.js';
5
5
 
@@ -129,7 +129,7 @@ const MgTabs$1 = /*@__PURE__*/ proxyCustomElement(class MgTabs extends HTMLEleme
129
129
  */
130
130
  this.resetFocus = () => {
131
131
  // update asynchronously tabindex to prevent get focus on new tabindex at then end of event process
132
- Ge(() => {
132
+ Ye(() => {
133
133
  this.tabFocus = undefined;
134
134
  Array.from(this.element.shadowRoot.querySelectorAll('[data-index]')).forEach((tab, index) => {
135
135
  tab.setAttribute('tabindex', this.activeTab - this.startIndex !== index ? '-1' : '0');
@@ -144,16 +144,16 @@ const MgTabs$1 = /*@__PURE__*/ proxyCustomElement(class MgTabs extends HTMLEleme
144
144
  if (slots.length !== this.tabs.length)
145
145
  throw new Error('<mg-tabs> Must have slots counts equal to tabs count.');
146
146
  };
147
- this.identifier = Ce('mg-tabs');
147
+ this.identifier = ze('mg-tabs');
148
148
  this.label = undefined;
149
149
  this.size = 'regular';
150
150
  this.items = undefined;
151
151
  this.activeTab = undefined;
152
152
  this.tabs = [];
153
- this.classCollection = new He(['mg-c-tabs']);
153
+ this.classCollection = new Ie(['mg-c-tabs']);
154
154
  }
155
155
  validateLabel(newValue) {
156
- if (!Ie(newValue)) {
156
+ if (!Ze(newValue)) {
157
157
  throw new Error('<mg-tabs> prop "label" is required.');
158
158
  }
159
159
  }
@@ -165,7 +165,7 @@ const MgTabs$1 = /*@__PURE__*/ proxyCustomElement(class MgTabs extends HTMLEleme
165
165
  }
166
166
  validateItems(newValue) {
167
167
  // String array
168
- if (Pe(newValue))
168
+ if (Ge(newValue))
169
169
  this.tabs = newValue.map(item => ({ label: item, status: Status.VISIBLE }));
170
170
  // Object array
171
171
  else if (Array.isArray(newValue) && newValue.length > 0 && newValue.every(isTabItem))
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
- import { H as He, I as Ie } from './index.es.js';
2
+ import { I as Ie, Z as Ze } from './index.es.js';
3
3
 
4
4
  /**
5
5
  * List of all possibles variants
@@ -23,7 +23,7 @@ const MgTag$1 = /*@__PURE__*/ proxyCustomElement(class MgTag extends HTMLElement
23
23
  this.variant = variants[0];
24
24
  this.outline = undefined;
25
25
  this.soft = undefined;
26
- this.classCollection = new He(['mg-c-tag']);
26
+ this.classCollection = new Ie(['mg-c-tag']);
27
27
  }
28
28
  validateVariant(newValue, oldValue) {
29
29
  if (!variants.includes(newValue)) {
@@ -60,7 +60,7 @@ const MgTag$1 = /*@__PURE__*/ proxyCustomElement(class MgTag extends HTMLElement
60
60
  * @param textContent - html element textContent property
61
61
  */
62
62
  validateTextContent(textContent) {
63
- if (!Ie(textContent))
63
+ if (!Ze(textContent))
64
64
  throw new Error('<mg-tag> slot must contain a text content.');
65
65
  }
66
66
  /*************
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { G as Ge, C as Ce, I as Ie, z as ze, W as We } from './index.es.js';
2
+ import { Y as Ye, z as ze, Z as Ze, Q as Qe, K as Ke } from './index.es.js';
3
3
  import { d as defineCustomElement$1 } from './mg-tooltip-content2.js';
4
4
  import { c as createPopper } from './popper.js';
5
5
 
@@ -34,7 +34,7 @@ const MgTooltip = /*@__PURE__*/ proxyCustomElement(class MgTooltip extends HTMLE
34
34
  // Enable the event listeners
35
35
  this.popper.setOptions(options => (Object.assign(Object.assign({}, options), { modifiers: [...options.modifiers, { name: 'eventListeners', enabled: true }] })));
36
36
  // hide when click outside on nextTick to prevent event to trigger after creation
37
- Ge(() => {
37
+ Ye(() => {
38
38
  this.windows.forEach((localWindow) => {
39
39
  localWindow.addEventListener('click', this.handleClickOutside, false);
40
40
  localWindow.addEventListener('keydown', this.handlePressEscape, false);
@@ -224,7 +224,7 @@ const MgTooltip = /*@__PURE__*/ proxyCustomElement(class MgTooltip extends HTMLE
224
224
  element.setAttribute('aria-describedby', `${[...new Set([...ariaDescribedby.split(' '), this.identifier])].join(' ')}`);
225
225
  }
226
226
  };
227
- this.identifier = Ce('mg-tooltip');
227
+ this.identifier = ze('mg-tooltip');
228
228
  this.message = undefined;
229
229
  this.placement = 'bottom';
230
230
  this.display = false;
@@ -235,7 +235,7 @@ const MgTooltip = /*@__PURE__*/ proxyCustomElement(class MgTooltip extends HTMLE
235
235
  this.renderTooltipContent();
236
236
  }
237
237
  watchMessage(newValue) {
238
- if (!Ie(newValue)) {
238
+ if (!Ze(newValue)) {
239
239
  throw new Error('<mg-tooltip> prop "message" is required.');
240
240
  }
241
241
  this.mgTooltipContent.message = newValue;
@@ -290,7 +290,7 @@ const MgTooltip = /*@__PURE__*/ proxyCustomElement(class MgTooltip extends HTMLE
290
290
  */
291
291
  componentWillLoad() {
292
292
  // Get windows to attach events
293
- this.windows = ze(window);
293
+ this.windows = Qe(window);
294
294
  // Get tooltip element
295
295
  this.renderTooltipContent();
296
296
  //validate properties
@@ -308,7 +308,7 @@ const MgTooltip = /*@__PURE__*/ proxyCustomElement(class MgTooltip extends HTMLE
308
308
  // get slotted element wich is not the tooltip
309
309
  const slotElement = this.element.querySelector(`*:not(#${this.identifier})`);
310
310
  // Get interactive element
311
- const interactiveElement = slotElement.matches(We) ? slotElement : (_a = slotElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(We);
311
+ const interactiveElement = slotElement.matches(Ke) ? slotElement : (_a = slotElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(Ke);
312
312
  this.setTooltipedElement(interactiveElement || slotElement);
313
313
  // Check if slotted element is a disabled mg-button
314
314
  // In this case we wrap the mg-button into a div to enable the tooltip
@@ -1,30 +1,30 @@
1
- var $e = Object.defineProperty;
2
- var ue = (e, t, s) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var v = (e, t, s) => ue(e, typeof t != "symbol" ? t + "" : t, s);
4
- const Ce = (e = "", t = 10) => {
1
+ var ve = Object.defineProperty;
2
+ var he = (e, t, s) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var g = (e, t, s) => he(e, typeof t != "symbol" ? t + "" : t, s);
4
+ const ze = (e = "", t = 10) => {
5
5
  const s = new Uint8Array(t);
6
6
  crypto.getRandomValues(s);
7
7
  const r = Array.from(s).map((o) => o.toString(16).padStart(2, "0")).join("").slice(0, t);
8
8
  return e !== "" ? `${e}-${r}` : r;
9
9
  };
10
- class He {
10
+ class Ie {
11
11
  constructor(t = []) {
12
12
  /**
13
13
  * Available classes
14
14
  */
15
- v(this, "classes");
15
+ g(this, "classes");
16
16
  /**
17
17
  * Add class
18
18
  * @param className - class name to add
19
19
  */
20
- v(this, "add", (t) => {
20
+ g(this, "add", (t) => {
21
21
  this.has(t) || this.classes.push(t);
22
22
  });
23
23
  /**
24
24
  * Delete class
25
25
  * @param className - class name to delete
26
26
  */
27
- v(this, "delete", (t) => {
27
+ g(this, "delete", (t) => {
28
28
  const s = this.classes.indexOf(t);
29
29
  s > -1 && this.classes.splice(s, 1);
30
30
  });
@@ -33,75 +33,66 @@ class He {
33
33
  * @param className - class name to check
34
34
  * @returns class name is in the list
35
35
  */
36
- v(this, "has", (t) => this.classes.includes(t));
36
+ g(this, "has", (t) => this.classes.includes(t));
37
37
  /**
38
38
  * Join classes seperated by spaces
39
39
  * @returns joined values
40
40
  */
41
- v(this, "join", () => this.classes.join(" "));
41
+ g(this, "join", () => this.classes.join(" "));
42
42
  this.classes = t;
43
43
  }
44
44
  }
45
- const Pe = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Be = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), We = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', ze = (e) => {
46
- const t = Q(e), s = Z(e);
45
+ const Ge = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Xe = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Ke = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Qe = (e) => {
46
+ const t = te(e), s = se(e);
47
47
  return [e, ...t, ...s];
48
- }, Q = (e, t = []) => {
48
+ }, te = (e, t = []) => {
49
49
  if (e.self !== e.top)
50
50
  try {
51
51
  const s = e.parent;
52
- return s ? (t.push(s), Q(s, t)) : t;
52
+ return s ? (t.push(s), te(s, t)) : t;
53
53
  } catch (s) {
54
54
  return console.error("Different hosts between iframes:", s), t;
55
55
  }
56
56
  return t;
57
- }, Z = (e, t = []) => {
57
+ }, se = (e, t = []) => {
58
58
  if (e.frames.length > 0)
59
59
  for (const s of Array.from(e.frames))
60
- t.push(s), Z(s, t);
60
+ t.push(s), se(s, t);
61
61
  return t;
62
- }, Ie = (e) => typeof e == "string" && e.trim() !== "", qe = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, Ge = async (e) => e(), Qe = (e) => {
63
- const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
64
- return ye([t.value, s.value, r.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
65
- }, Ze = (e) => e.toISOString().split("T")[0], ge = (e, t, s) => {
66
- const r = e.closest("[lang]"), o = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), l = o.length > 0 && typeof o[0] == "string" ? o[0] : navigator.language || s, n = l.split("-").shift();
67
- return {
68
- locale: l,
69
- messages: t[n] || t[s]
70
- };
71
- }, Je = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), Ye = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), he = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, ye = (e, t, s) => typeof e != "string" || e === "" || !he.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), Ve = (e, t) => (s) => ge(s, e, t);
72
- var be = Object.defineProperty, Se = (e, t) => {
62
+ }, Ze = (e) => typeof e == "string" && e.trim() !== "", Je = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, Ye = async (e) => e();
63
+ var me = Object.defineProperty, be = (e, t) => {
73
64
  for (var s in t)
74
- be(e, s, { get: t[s], enumerable: !0 });
65
+ me(e, s, { get: t[s], enumerable: !0 });
75
66
  };
76
67
  var xe = {};
77
- Se(xe, {
78
- err: () => ee,
79
- map: () => Ee,
80
- ok: () => F,
81
- unwrap: () => Ae,
68
+ be(xe, {
69
+ err: () => oe,
70
+ map: () => Ae,
71
+ ok: () => U,
72
+ unwrap: () => Ee,
82
73
  unwrapErr: () => Le
83
74
  });
84
- var F = (e) => ({
75
+ var U = (e) => ({
85
76
  isOk: !0,
86
77
  isErr: !1,
87
78
  value: e
88
- }), ee = (e) => ({
79
+ }), oe = (e) => ({
89
80
  isOk: !1,
90
81
  isErr: !0,
91
82
  value: e
92
83
  });
93
- function Ee(e, t) {
84
+ function Ae(e, t) {
94
85
  if (e.isOk) {
95
86
  const s = t(e.value);
96
- return s instanceof Promise ? s.then((r) => F(r)) : F(s);
87
+ return s instanceof Promise ? s.then((r) => U(r)) : U(s);
97
88
  }
98
89
  if (e.isErr) {
99
90
  const s = e.value;
100
- return ee(s);
91
+ return oe(s);
101
92
  }
102
93
  throw "should never get here";
103
94
  }
104
- var Ae = (e) => {
95
+ var Ee = (e) => {
105
96
  if (e.isOk)
106
97
  return e.value;
107
98
  throw e.value;
@@ -110,6 +101,16 @@ var Ae = (e) => {
110
101
  return e.value;
111
102
  throw e.value;
112
103
  };
104
+ const nt = (e) => {
105
+ const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
106
+ return Be([t.value, s.value, r.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
107
+ }, lt = (e) => e.toISOString().split("T")[0], Ue = (e, t, s) => {
108
+ const r = e.closest("[lang]"), o = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), n = o.length > 0 && typeof o[0] == "string" ? o[0] : navigator.language || s, l = n.split("-").shift();
109
+ return {
110
+ locale: n,
111
+ messages: t[l] || t[s]
112
+ };
113
+ }, it = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), at = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), He = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, Be = (e, t, s) => typeof e != "string" || e === "" || !He.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), ct = (e, t) => (s) => Ue(s, e, t);
113
114
 
114
115
  const errors$1 = {
115
116
  required: "This field is required.",
@@ -360,8 +361,8 @@ const messages = { en, fr };
360
361
  * @param element - element we need to get the language
361
362
  * @returns messages object
362
363
  */
363
- const initLocales = Ve(messages, defaultLocale);
364
+ const initLocales = ct(messages, defaultLocale);
364
365
 
365
- export { Be as B, Ce as C, Ge as G, He as H, Ie as I, Je as J, Pe as P, Qe as Q, We as W, Ye as Y, Ze as Z, he as h, initLocales as i, qe as q, ye as y, ze as z };
366
+ export { Be as B, Ge as G, He as H, Ie as I, Je as J, Ke as K, Qe as Q, Xe as X, Ye as Y, Ze as Z, it as a, at as b, initLocales as i, lt as l, nt as n, ze as z };
366
367
 
367
- //# sourceMappingURL=index-817d7645.js.map
368
+ //# sourceMappingURL=index-2667a5c4.js.map