@mgdis/mg-components 5.25.2 → 5.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-0256ee6d.js → index-0a2783ee.js} +1 -1
- package/dist/cjs/{index-0256ee6d.js.map → index-0a2783ee.js.map} +1 -1
- package/dist/cjs/{index-f699ee11.js → index-c585c382.js} +37 -37
- package/dist/cjs/index-c585c382.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mg-action-more_34.cjs.entry.js +89 -89
- package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-components.cjs.js +2 -2
- package/dist/cjs/mg-components.cjs.js.map +1 -1
- package/dist/cjs/mg-item-more.cjs.entry.js +3 -3
- package/dist/cjs/mg-loader.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +2 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -1
- package/dist/components/MgInput.js +3 -3
- package/dist/components/index.es.js +29 -29
- package/dist/components/index.es.js.map +1 -1
- package/dist/components/index2.js +2 -2
- package/dist/components/mg-action-more.js +2 -2
- package/dist/components/mg-badge2.js +4 -4
- package/dist/components/mg-badge2.js.map +1 -1
- package/dist/components/mg-button2.js +4 -4
- package/dist/components/mg-card2.js +2 -2
- package/dist/components/mg-details.js +2 -2
- package/dist/components/mg-form.js +3 -3
- package/dist/components/mg-icon2.js +2 -2
- package/dist/components/mg-illustrated-message.js +2 -2
- package/dist/components/mg-input-checkbox.js +4 -4
- package/dist/components/mg-input-date.js +11 -11
- package/dist/components/mg-input-numeric.js +5 -5
- package/dist/components/mg-input-password.js +3 -3
- package/dist/components/mg-input-radio.js +4 -4
- package/dist/components/mg-input-select2.js +6 -6
- package/dist/components/mg-input-text2.js +6 -6
- package/dist/components/mg-input-textarea.js +6 -6
- package/dist/components/mg-input-title2.js +2 -2
- package/dist/components/mg-input-toggle.js +4 -4
- package/dist/components/mg-item-more.js +2 -2
- package/dist/components/mg-loader.js +2 -2
- package/dist/components/mg-menu-item2.js +4 -4
- package/dist/components/mg-message.js +3 -3
- package/dist/components/mg-modal.js +6 -6
- package/dist/components/mg-pagination2.js +2 -2
- package/dist/components/mg-panel.js +4 -4
- package/dist/components/mg-popover-content2.js +3 -3
- package/dist/components/mg-popover2.js +3 -3
- package/dist/components/mg-skip-links.js +2 -2
- package/dist/components/mg-tabs.js +6 -6
- package/dist/components/mg-tag.js +3 -3
- package/dist/components/mg-tooltip2.js +6 -6
- package/dist/esm/{index-4ad17402.js → index-ad78ece7.js} +1 -1
- package/dist/esm/{index-4ad17402.js.map → index-ad78ece7.js.map} +1 -1
- package/dist/esm/{index-d2fc6ec0.js → index-bb17de92.js} +31 -31
- package/dist/esm/index-bb17de92.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mg-action-more_34.entry.js +89 -89
- package/dist/esm/mg-action-more_34.entry.js.map +1 -1
- package/dist/esm/mg-components.js +3 -3
- package/dist/esm/mg-components.js.map +1 -1
- package/dist/esm/mg-item-more.entry.js +3 -3
- package/dist/esm/mg-loader.entry.js +3 -3
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/mg-components.esm.js.map +1 -1
- package/dist/mg-components/{p-568c9ea9.entry.js → p-2db8355d.entry.js} +2 -2
- package/dist/mg-components/p-95653110.entry.js +2 -0
- package/dist/mg-components/p-95653110.entry.js.map +1 -0
- package/dist/mg-components/{p-f761ebcd.js → p-bc62d75e.js} +1 -1
- package/dist/mg-components/{p-f761ebcd.js.map → p-bc62d75e.js.map} +1 -1
- package/dist/mg-components/{p-29b5a514.js → p-d41aa78b.js} +2 -2
- package/dist/mg-components/p-d41aa78b.js.map +1 -0
- package/dist/mg-components/{p-22f575c5.entry.js → p-d80b844d.entry.js} +2 -2
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/ide/intellij/web-types.json +5810 -0
- package/ide/vscode/html-custom-data.json +5083 -0
- package/package.json +21 -14
- package/dist/cjs/index-f699ee11.js.map +0 -1
- package/dist/esm/index-d2fc6ec0.js.map +0 -1
- package/dist/mg-components/p-29b5a514.js.map +0 -1
- package/dist/mg-components/p-57614d95.entry.js +0 -2
- package/dist/mg-components/p-57614d95.entry.js.map +0 -1
- /package/dist/mg-components/{p-568c9ea9.entry.js.map → p-2db8355d.entry.js.map} +0 -0
- /package/dist/mg-components/{p-22f575c5.entry.js.map → p-d80b844d.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { R as Re, M as Me, B as Be } from './index.es.js';
|
|
3
3
|
import { i as initLocales } from './index2.js';
|
|
4
4
|
import { d as defineCustomElement$9 } from './mg-button2.js';
|
|
5
5
|
import { d as defineCustomElement$8 } from './mg-card2.js';
|
|
@@ -121,7 +121,7 @@ const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class MgPanel extends HTMLEle
|
|
|
121
121
|
];
|
|
122
122
|
return this.titlePosition === 'right' ? children.reverse() : children;
|
|
123
123
|
};
|
|
124
|
-
this.identifier =
|
|
124
|
+
this.identifier = Re('mg-panel');
|
|
125
125
|
this.panelTitle = undefined;
|
|
126
126
|
this.titlePattern = undefined;
|
|
127
127
|
this.titlePatternErrorMessage = undefined;
|
|
@@ -130,12 +130,12 @@ const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class MgPanel extends HTMLEle
|
|
|
130
130
|
this.expanded = false;
|
|
131
131
|
this.expandToggleDisplay = expandToggleDisplays[0];
|
|
132
132
|
this.expandToggleDisabled = undefined;
|
|
133
|
-
this.classCollection = new
|
|
133
|
+
this.classCollection = new Me(['mg-c-panel']);
|
|
134
134
|
this.isEditing = false;
|
|
135
135
|
this.updatedPanelTitle = undefined;
|
|
136
136
|
}
|
|
137
137
|
validatePanelTitle(newValue) {
|
|
138
|
-
if (!
|
|
138
|
+
if (!Be(newValue))
|
|
139
139
|
throw new Error('<mg-panel> prop "panelTitle" is required.');
|
|
140
140
|
this.titleChange.emit(newValue);
|
|
141
141
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { M as Me, F as Fe } 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
|
|
24
|
+
this.classCollection = new Me(['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 && !
|
|
42
|
+
if (slottedTitleElement && !Fe(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 {
|
|
2
|
+
import { R as Re, _ as _e } 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 =
|
|
106
|
+
this.identifier = Re('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 =
|
|
149
|
+
this.windows = _e(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 {
|
|
3
|
+
import { B as Be } 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 => !
|
|
28
|
+
if (links === undefined || links.length === 0 || links.some(link => !Be(link.href) || !link.href.startsWith('#') || !Be(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 {
|
|
2
|
+
import { U as Ue, R as Re, M as Me, B as Be, O as Oe } 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
|
-
|
|
132
|
+
Ue(() => {
|
|
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 =
|
|
147
|
+
this.identifier = Re('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
|
|
153
|
+
this.classCollection = new Me(['mg-c-tabs']);
|
|
154
154
|
}
|
|
155
155
|
validateLabel(newValue) {
|
|
156
|
-
if (!
|
|
156
|
+
if (!Be(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 (
|
|
168
|
+
if (Oe(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 {
|
|
2
|
+
import { M as Me, B as Be } 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
|
|
26
|
+
this.classCollection = new Me(['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 (!
|
|
63
|
+
if (!Be(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 {
|
|
2
|
+
import { U as Ue, R as Re, B as Be, _ as _e, D as De } 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
|
|
|
@@ -33,7 +33,7 @@ const MgTooltip = /*@__PURE__*/ proxyCustomElement(class MgTooltip extends HTMLE
|
|
|
33
33
|
// Enable the event listeners
|
|
34
34
|
this.popper.setOptions(options => (Object.assign(Object.assign({}, options), { modifiers: [...options.modifiers, { name: 'eventListeners', enabled: true }] })));
|
|
35
35
|
// hide when click outside on nextTick to prevent event to trigger after creation
|
|
36
|
-
|
|
36
|
+
Ue(() => {
|
|
37
37
|
this.windows.forEach((localWindow) => {
|
|
38
38
|
localWindow.addEventListener('click', this.clickOutside, false);
|
|
39
39
|
localWindow.addEventListener('keydown', this.pressEscape, false);
|
|
@@ -198,7 +198,7 @@ const MgTooltip = /*@__PURE__*/ proxyCustomElement(class MgTooltip extends HTMLE
|
|
|
198
198
|
});
|
|
199
199
|
});
|
|
200
200
|
};
|
|
201
|
-
this.identifier =
|
|
201
|
+
this.identifier = Re('mg-tooltip');
|
|
202
202
|
this.message = undefined;
|
|
203
203
|
this.placement = 'bottom';
|
|
204
204
|
this.display = false;
|
|
@@ -209,7 +209,7 @@ const MgTooltip = /*@__PURE__*/ proxyCustomElement(class MgTooltip extends HTMLE
|
|
|
209
209
|
this.renderTooltipContent();
|
|
210
210
|
}
|
|
211
211
|
validateMessage(newValue) {
|
|
212
|
-
if (!
|
|
212
|
+
if (!Be(newValue)) {
|
|
213
213
|
throw new Error('<mg-tooltip> prop "message" is required.');
|
|
214
214
|
}
|
|
215
215
|
this.mgTooltipContent.message = newValue;
|
|
@@ -258,7 +258,7 @@ const MgTooltip = /*@__PURE__*/ proxyCustomElement(class MgTooltip extends HTMLE
|
|
|
258
258
|
*/
|
|
259
259
|
componentWillLoad() {
|
|
260
260
|
// Get windows to attach events
|
|
261
|
-
this.windows =
|
|
261
|
+
this.windows = _e(window);
|
|
262
262
|
// Get tooltip element
|
|
263
263
|
this.renderTooltipContent();
|
|
264
264
|
this.mgTooltipContent = this.element.querySelector(`#${this.identifier}`);
|
|
@@ -277,7 +277,7 @@ const MgTooltip = /*@__PURE__*/ proxyCustomElement(class MgTooltip extends HTMLE
|
|
|
277
277
|
// get slotted element wich is not the tooltip
|
|
278
278
|
const slotElement = this.element.querySelector(`*:not(#${this.identifier})`);
|
|
279
279
|
// Get interactive element
|
|
280
|
-
const interactiveElement = slotElement.matches(
|
|
280
|
+
const interactiveElement = slotElement.matches(De) ? slotElement : (_a = slotElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(De);
|
|
281
281
|
// define selected element to become tooltip selector
|
|
282
282
|
this.tooltipedElement = interactiveElement || slotElement;
|
|
283
283
|
// Check if slotted element is a disabled mg-button
|
|
@@ -2493,4 +2493,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
|
2493
2493
|
|
|
2494
2494
|
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2495
2495
|
|
|
2496
|
-
//# sourceMappingURL=index-
|
|
2496
|
+
//# sourceMappingURL=index-ad78ece7.js.map
|