@mgdis/mg-components 6.14.0 → 6.16.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-DUJwxnoi.js → index-CpENFzEo.js} +2 -2
- package/dist/cjs/{index-DzBkSgSK.js → index-T3-qWqFE.js} +8 -2
- package/dist/cjs/{index-CwjAofQ1.js → index-YM1EJx9X.js} +43 -31
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_37.cjs.entry.js +136 -150
- package/dist/cjs/mg-alert.cjs.entry.js +4 -4
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-input-combobox.cjs.entry.js +15 -13
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +1247 -16003
- package/dist/cjs/mg-loader.cjs.entry.js +4 -4
- package/dist/cjs/mg-progress.cjs.entry.js +3 -3
- package/dist/collection/assets/icons/index.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +49 -106
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +55 -36
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +11 -9
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +2 -2
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +1 -1
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +1 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +2 -2
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +1 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js +1 -1
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +1 -1
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -1
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
- package/dist/collection/components/molecules/mg-table/mg-table.js +2 -2
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
- package/dist/collection/locales/en/messages.json +19 -15
- package/dist/collection/locales/fr/messages.json +20 -16
- package/dist/components/index2.js +3 -3
- package/dist/components/index3.js +43 -31
- package/dist/components/mg-action-more.js +2 -2
- package/dist/components/mg-alert.js +2 -2
- package/dist/components/mg-badge2.js +1 -1
- package/dist/components/mg-button2.js +1 -1
- package/dist/components/mg-card2.js +1 -1
- package/dist/components/mg-character-left2.js +1 -1
- package/dist/components/mg-details.js +2 -2
- package/dist/components/mg-divider2.js +1 -1
- package/dist/components/mg-form.js +2 -2
- package/dist/components/mg-icon2.js +1 -1
- package/dist/components/mg-illustrated-message.js +2 -2
- package/dist/components/mg-input-checkbox-paginated2.js +42 -124
- package/dist/components/mg-input-checkbox.js +89 -59
- package/dist/components/mg-input-combobox.js +14 -12
- package/dist/components/mg-input-date.js +2 -2
- package/dist/components/mg-input-numeric.js +7 -2
- package/dist/components/mg-input-password.js +2 -2
- package/dist/components/mg-input-radio.js +2 -2
- package/dist/components/mg-input-rich-text-editor.js +1247 -16003
- package/dist/components/mg-input-select2.js +2 -2
- package/dist/components/mg-input-text2.js +2 -2
- package/dist/components/mg-input-textarea.js +2 -2
- package/dist/components/mg-input-title2.js +1 -1
- package/dist/components/mg-input-toggle.js +2 -2
- package/dist/components/mg-input2.js +1 -1
- package/dist/components/mg-item-more2.js +2 -2
- package/dist/components/mg-loader2.js +2 -2
- package/dist/components/mg-menu-item2.js +1 -1
- package/dist/components/mg-message2.js +3 -3
- package/dist/components/mg-modal.js +3 -3
- package/dist/components/mg-pagination.js +227 -1
- package/dist/components/mg-panel.js +3 -3
- package/dist/components/mg-popover-content2.js +2 -2
- package/dist/components/mg-popover2.js +2 -2
- package/dist/components/mg-progress.js +2 -2
- package/dist/components/mg-skip-links.js +2 -2
- package/dist/components/mg-table.js +3 -3
- package/dist/components/mg-tabs.js +1 -311
- package/dist/components/mg-tabs2.js +313 -0
- package/dist/components/mg-tag.js +1 -1
- package/dist/components/mg-tooltip-content2.js +1 -1
- package/dist/components/mg-tooltip2.js +2 -2
- package/dist/esm/{index-Bv7NHR-W.js → index-Bab8_u8S.js} +43 -31
- package/dist/esm/{index-Degtjvph.js → index-JHj_9FSs.js} +8 -2
- package/dist/esm/{index-Dr7GYvIz.js → index-WtiuOkLj.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_37.entry.js +136 -150
- package/dist/esm/mg-alert.entry.js +4 -4
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-input-combobox.entry.js +15 -13
- package/dist/esm/mg-input-rich-text-editor.entry.js +1248 -16004
- package/dist/esm/mg-loader.entry.js +4 -4
- package/dist/esm/mg-progress.entry.js +3 -3
- package/dist/mg-components/locales/en/messages.json +19 -15
- package/dist/mg-components/locales/fr/messages.json +20 -16
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-056ba467.entry.js → p-42a90251.entry.js} +1 -1
- package/dist/mg-components/p-54156253.entry.js +1 -0
- package/dist/mg-components/{p-d13a6fdc.entry.js → p-658f828c.entry.js} +1 -1
- package/dist/mg-components/{p-c522f3c1.entry.js → p-82455ac7.entry.js} +1 -1
- package/dist/mg-components/p-Bab8_u8S.js +1 -0
- package/dist/mg-components/p-JHj_9FSs.js +2 -0
- package/dist/mg-components/p-WtiuOkLj.js +1 -0
- package/dist/mg-components/p-abbd151c.entry.js +1 -0
- package/dist/mg-components/p-c85b5d10.entry.js +1 -0
- package/dist/types/assets/icons/index.d.ts +6 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +17 -40
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +1 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -6
- package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +1 -1
- package/dist/types/components.d.ts +6 -33
- package/ide/intellij/web-types.json +13 -13
- package/ide/vscode/html-custom-data.json +39 -3
- package/package.json +23 -23
- package/dist/components/mg-pagination2.js +0 -229
- package/dist/mg-components/p-625c463c.entry.js +0 -1
- package/dist/mg-components/p-Bv7NHR-W.js +0 -1
- package/dist/mg-components/p-Degtjvph.js +0 -2
- package/dist/mg-components/p-Dr7GYvIz.js +0 -1
- package/dist/mg-components/p-cac23bd7.entry.js +0 -1
- package/dist/mg-components/p-e75f5383.entry.js +0 -10
|
@@ -372,7 +372,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
372
372
|
*/
|
|
373
373
|
render() {
|
|
374
374
|
const readonlyValue = this.getReadonlyValue();
|
|
375
|
-
return (h("mg-input", { key: '
|
|
375
|
+
return (h("mg-input", { key: '1394827503d3f2dd71efc6efa389ac707573d2ec', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue === null ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, readonlyValue)) : (h("select", { class: "mg-c-input__box", id: this.identifier, name: this.name, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
|
|
376
376
|
if (el !== null)
|
|
377
377
|
this.input = el;
|
|
378
378
|
} }, (!this.placeholderHide || !this.valueExist) && ( // In case passed value does not match any option we display the placeholder
|
|
@@ -388,7 +388,7 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class MgInputSelect exten
|
|
|
388
388
|
"mgWidth": ["watchMgWidth"]
|
|
389
389
|
}; }
|
|
390
390
|
static get style() { return mgInputSelectCss; }
|
|
391
|
-
}, [
|
|
391
|
+
}, [257, "mg-input-select", {
|
|
392
392
|
"value": [1032],
|
|
393
393
|
"items": [16],
|
|
394
394
|
"identifier": [1],
|
|
@@ -382,7 +382,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends H
|
|
|
382
382
|
* @returns HTML Element
|
|
383
383
|
*/
|
|
384
384
|
render() {
|
|
385
|
-
return (h("mg-input", { key: '
|
|
385
|
+
return (h("mg-input", { key: '8b9ffd8f5546fe9ffe0e7054e794afa06de4189f', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: this.characterLeftId, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly
|
|
386
386
|
? this.value && this.renderReadonly()
|
|
387
387
|
: [
|
|
388
388
|
h("div", { key: "input", class: "mg-c-input__with-character-left", style: {
|
|
@@ -409,7 +409,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class MgInputText extends H
|
|
|
409
409
|
"helpText": ["watchHelpText"]
|
|
410
410
|
}; }
|
|
411
411
|
static get style() { return mgInputTextCss; }
|
|
412
|
-
}, [
|
|
412
|
+
}, [257, "mg-input-text", {
|
|
413
413
|
"value": [1544],
|
|
414
414
|
"identifier": [1],
|
|
415
415
|
"name": [1],
|
|
@@ -302,7 +302,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class MgInputTextarea
|
|
|
302
302
|
* @returns HTML Element
|
|
303
303
|
*/
|
|
304
304
|
render() {
|
|
305
|
-
return (h("mg-input", { key: '
|
|
305
|
+
return (h("mg-input", { key: 'e87320fe4d3c2c857751ddcc30fab470956b4ed2', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: this.characterLeftId, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, this.value)) : (h("div", { class: "mg-c-input__with-character-left" }, h("textarea", { class: {
|
|
306
306
|
'mg-c-input__box': true,
|
|
307
307
|
'mg-c-input__box--width': true,
|
|
308
308
|
'mg-c-input__box--resizable': this.resizable === 'both',
|
|
@@ -325,7 +325,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class MgInputTextarea
|
|
|
325
325
|
"characterLeftHide": ["validatecharacterLeftHide"]
|
|
326
326
|
}; }
|
|
327
327
|
static get style() { return mgInputTextareaCss; }
|
|
328
|
-
}, [
|
|
328
|
+
}, [257, "mg-input-textarea", {
|
|
329
329
|
"value": [1537],
|
|
330
330
|
"identifier": [1],
|
|
331
331
|
"name": [1],
|
|
@@ -51,7 +51,7 @@ const MgInputTitle = /*@__PURE__*/ proxyCustomElement(class MgInputTitle extends
|
|
|
51
51
|
"isLegend": ["validateIsLegend"]
|
|
52
52
|
}; }
|
|
53
53
|
static get style() { return mgInputTitleCss; }
|
|
54
|
-
}, [
|
|
54
|
+
}, [262, "mg-input-title", {
|
|
55
55
|
"identifier": [1],
|
|
56
56
|
"required": [4],
|
|
57
57
|
"readonly": [4],
|
|
@@ -265,7 +265,7 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class MgInputToggle ext
|
|
|
265
265
|
*/
|
|
266
266
|
render() {
|
|
267
267
|
const checkedItem = this.getCheckedItem(this.checked);
|
|
268
|
-
return (h("mg-input", { key: '
|
|
268
|
+
return (h("mg-input", { key: '7611cffaf1c01e30c3fa7a27555f94ab357dd374', label: this.label, helpText: this.helpText, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, errorMessage: this.errorMessage }, this.readonly ? (checkedItem && h("b", { class: "mg-c-input__readonly-value" }, checkedItem.title)) : (h("button", { type: "button", role: "switch", "aria-checked": this.checked.toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-c-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.toggleChecked, ref: el => {
|
|
269
269
|
if (el !== null)
|
|
270
270
|
this.button = el;
|
|
271
271
|
} }, h("span", { "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { name: "item-1" })), h("span", { "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { name: "item-2" }))))));
|
|
@@ -281,7 +281,7 @@ const MgInputToggle$1 = /*@__PURE__*/ proxyCustomElement(class MgInputToggle ext
|
|
|
281
281
|
"checked": ["handleChecked"]
|
|
282
282
|
}; }
|
|
283
283
|
static get style() { return mgInputToggleCss; }
|
|
284
|
-
}, [
|
|
284
|
+
}, [257, "mg-input-toggle", {
|
|
285
285
|
"value": [1032],
|
|
286
286
|
"items": [16],
|
|
287
287
|
"identifier": [1],
|
|
@@ -290,7 +290,7 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
290
290
|
"isFieldset": ["watchLabel"]
|
|
291
291
|
}; }
|
|
292
292
|
static get style() { return mgInputCss; }
|
|
293
|
-
}, [
|
|
293
|
+
}, [257, "mg-input", {
|
|
294
294
|
"identifier": [1],
|
|
295
295
|
"label": [1],
|
|
296
296
|
"labelOnTop": [4, "label-on-top"],
|
|
@@ -262,7 +262,7 @@ const MgMenu = /*@__PURE__*/ proxyCustomElement(class MgMenu extends HTMLElement
|
|
|
262
262
|
"size": ["validateSize"]
|
|
263
263
|
}; }
|
|
264
264
|
static get style() { return mgMenuCss; }
|
|
265
|
-
}, [
|
|
265
|
+
}, [257, "mg-menu", {
|
|
266
266
|
"label": [1],
|
|
267
267
|
"direction": [513],
|
|
268
268
|
"itemmore": [16],
|
|
@@ -424,7 +424,7 @@ const MgItemMore = /*@__PURE__*/ proxyCustomElement(class MgItemMore extends HTM
|
|
|
424
424
|
"size": ["validateSize"]
|
|
425
425
|
}; }
|
|
426
426
|
static get style() { return mgItemMoreCss; }
|
|
427
|
-
}, [
|
|
427
|
+
}, [257, "mg-item-more", {
|
|
428
428
|
"icon": [16],
|
|
429
429
|
"slotlabel": [16],
|
|
430
430
|
"size": [1],
|
|
@@ -36,14 +36,14 @@ const MgLoader = /*@__PURE__*/ proxyCustomElement(class MgLoader extends HTMLEle
|
|
|
36
36
|
* @returns HTML Element
|
|
37
37
|
*/
|
|
38
38
|
render() {
|
|
39
|
-
return (h("div", { key: '
|
|
39
|
+
return (h("div", { key: 'b74028455b7003824fa5618b1751d05a91ab7071', class: "mg-c-loader", "aria-live": "polite" }, h("mg-icon", { key: '204acdb8f881b348148020214c05269878852c4f', icon: "loader", spin: true }), h("span", { key: '40f1792354df01ec9af61ab128575ea166f34cb5', class: { 'mg-u-visually-hidden': this.messageHide } }, this.message || this.messages.loader.inProgress)));
|
|
40
40
|
}
|
|
41
41
|
get element() { return this; }
|
|
42
42
|
static get watchers() { return {
|
|
43
43
|
"message": ["watchMessage"]
|
|
44
44
|
}; }
|
|
45
45
|
static get style() { return mgLoaderCss; }
|
|
46
|
-
}, [
|
|
46
|
+
}, [257, "mg-loader", {
|
|
47
47
|
"message": [1],
|
|
48
48
|
"messageHide": [4, "message-hide"]
|
|
49
49
|
}, undefined, {
|
|
@@ -412,7 +412,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTM
|
|
|
412
412
|
"data-has-focus": ["watchDataHasFocus"]
|
|
413
413
|
}; }
|
|
414
414
|
static get style() { return mgMenuItemCss; }
|
|
415
|
-
}, [
|
|
415
|
+
}, [257, "mg-menu-item", {
|
|
416
416
|
"identifier": [513],
|
|
417
417
|
"href": [1],
|
|
418
418
|
"target": [1],
|
|
@@ -96,9 +96,9 @@ const MgMessage = /*@__PURE__*/ proxyCustomElement(class MgMessage extends HTMLE
|
|
|
96
96
|
* @returns HTML Element
|
|
97
97
|
*/
|
|
98
98
|
render() {
|
|
99
|
-
return (h("div", { key: '
|
|
99
|
+
return (h("div", { key: 'a113514956d6a3ef9fada1a20baa7b00843e5b96', class: this.classCollection.join() }, h("mg-card", { key: 'db894eb3d0f3cb9b18681e0925e0fd1bdcd208e2', shadow: true }, this.variantStyle === 'bar-left' && h("span", { key: '37eb3a027be82ab006fe30dd07bce88f526fc263', class: "mg-c-message__bar" }), h("span", { key: '76a3b6bf2d27ec85b3e9b7235cf5bba933ac02e2', class: "mg-c-message__icon" }, h("mg-icon", { key: '2988764c8a3d272dab5e749a8dc95643b9ead573', icon: this.getIcon() })), h("div", { key: '64e57835d18f433965eda9260efeb74055489c6e', class: "mg-c-message__content" }, h("span", { key: 'a2032d4fe0eec962cd9bb1e12119709bcb6ff53c', class: "mg-c-message__content-slot" }, h("slot", { key: 'dfe5f7315e8f8d66ccb195d8e7f7862eb803e6d9' })), this.hasActions && [
|
|
100
100
|
h("span", { class: "mg-c-message__content-separator", key: "content-separator" }),
|
|
101
|
-
h("span", { class: "mg-c-message__content-actions-slot", key: "content-actions-slot" }, h("slot", { key: '
|
|
101
|
+
h("span", { class: "mg-c-message__content-actions-slot", key: "content-actions-slot" }, h("slot", { key: 'db1782730e0bffb168b8ec23410e6836f572715c', name: "actions" })),
|
|
102
102
|
]))));
|
|
103
103
|
}
|
|
104
104
|
get element() { return this; }
|
|
@@ -107,7 +107,7 @@ const MgMessage = /*@__PURE__*/ proxyCustomElement(class MgMessage extends HTMLE
|
|
|
107
107
|
"variantStyle": ["watchVariantStyle"]
|
|
108
108
|
}; }
|
|
109
109
|
static get style() { return mgMessageCss; }
|
|
110
|
-
}, [
|
|
110
|
+
}, [257, "mg-message", {
|
|
111
111
|
"variant": [1],
|
|
112
112
|
"variantStyle": [1, "variant-style"],
|
|
113
113
|
"classCollection": [32],
|
|
@@ -118,11 +118,11 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class MgModal extends HTMLEle
|
|
|
118
118
|
* @returns HTML Element
|
|
119
119
|
*/
|
|
120
120
|
render() {
|
|
121
|
-
return (h("dialog", { key: '
|
|
121
|
+
return (h("dialog", { key: '783b289712deb419fa7ac4c9f371add80054af6b', role: this.dialogRole, id: this.identifier, class: this.classCollection.join(), "aria-labelledby": this.titleId, ref: (el) => {
|
|
122
122
|
if (el !== null) {
|
|
123
123
|
this.dialog = el;
|
|
124
124
|
}
|
|
125
|
-
} }, h("mg-card", { key: '
|
|
125
|
+
} }, h("mg-card", { key: 'd6006f296ab50a192229e09e6e01a3313ab69cce', shadow: true }, h("div", { key: '76bc44557dc4b4bcce40b54d5d4bfa381f7906af', class: "mg-c-modal__dialog" }, h("header", { key: '08ba473f429ae57434dd321575f9eaf97e41f7a9', class: "mg-c-modal__header" }, this.closeButton && (h("span", { key: 'd96baeaaefdb5541da7ee7bc58c3901b3d64ed33', class: "mg-c-modal__close-button" }, h("mg-button", { key: 'f43486e05e337fad6e54b8a0b07b9d13aad50acc', "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { key: '3278e25d15abdefb56cc3c67e7a8ec500d90547b', icon: "cross" })))), h("h1", { key: 'd9246055be4cb938f4aff20fcdc53b3a7c119d20', class: "mg-c-modal__title", id: this.titleId }, this.modalTitle)), h("article", { key: 'bce8cd10a2fffdf726df6d07b9f81da1fd693038', class: "mg-c-modal__content" }, h("slot", { key: '9db561d8462fe9a3afc6be543f2ef3b189f3efd4' })), this.hasActions && (h("footer", { key: '226e235454dce60eb8b5652add3b23e1cf480fc7', class: "mg-c-modal__footer" }, h("slot", { key: '8352666de0db98e96c52a419c939574285972571', name: "actions" })))))));
|
|
126
126
|
}
|
|
127
127
|
get element() { return this; }
|
|
128
128
|
static get watchers() { return {
|
|
@@ -132,7 +132,7 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class MgModal extends HTMLEle
|
|
|
132
132
|
"open": ["watchOpen"]
|
|
133
133
|
}; }
|
|
134
134
|
static get style() { return mgModalCss; }
|
|
135
|
-
}, [
|
|
135
|
+
}, [257, "mg-modal", {
|
|
136
136
|
"identifier": [1],
|
|
137
137
|
"dialogRole": [1, "dialog-role"],
|
|
138
138
|
"modalTitle": [1, "modal-title"],
|
|
@@ -1,4 +1,230 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { c as createID, a as isValideID, t as toString, i as isValidString } from './index2.js';
|
|
3
|
+
import { i as initLocales } from './index3.js';
|
|
4
|
+
import { d as defineCustomElement$8 } from './mg-button2.js';
|
|
5
|
+
import { d as defineCustomElement$7 } from './mg-icon2.js';
|
|
6
|
+
import { d as defineCustomElement$6 } from './mg-input2.js';
|
|
7
|
+
import { d as defineCustomElement$5 } from './mg-input-select2.js';
|
|
8
|
+
import { d as defineCustomElement$4 } from './mg-input-title2.js';
|
|
9
|
+
import { d as defineCustomElement$3 } from './mg-tooltip2.js';
|
|
10
|
+
import { d as defineCustomElement$2 } from './mg-tooltip-content2.js';
|
|
11
|
+
|
|
12
|
+
const NavigationAction = {
|
|
13
|
+
NEXT: 'next',
|
|
14
|
+
PREVIOUS: 'previous',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const mgPaginationCss = ".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-pagination{display:flex;align-items:center;gap:var(--mg-b-spacing-actions)}.mg-c-pagination__page-count{display:flex;align-items:center;gap:var(--mg-b-size-4)}.mg-c-pagination.mg-c-pagination--hide-page-count{gap:0}";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Range generator
|
|
21
|
+
*
|
|
22
|
+
* ```
|
|
23
|
+
* start by get the range length, add "+ 1" to include last value, ex: Math.ceil((3 + 1 - 1) / 1) => 3
|
|
24
|
+
* then with Array(Math.ceil...) we get the final array with empty values, ex: Array(Math.ceil(2 + 1 - 1) / 1)) => [empty, empty, empty]
|
|
25
|
+
* then with Array(Math.ceil...).keys() we get the Array Iterator from empty values
|
|
26
|
+
* then with Array.from(Array(...)) we get the complete array with "index" values instead of "empty" values
|
|
27
|
+
* ex: Array.from(Array(Math.ceil((2 + 1 - 1) / 1) || 1).keys()) => [0, 1, 2]
|
|
28
|
+
* finaly we map values from "start" range and apply the "step" coefficiant,
|
|
29
|
+
* ex: Array.from(Array(Math.ceil((2 + 1 - 1) / 1) || 1).keys()).map(x => 1 + x * 1) => [1, 2, 3]
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* range(1, 1) = [1]
|
|
33
|
+
* range(1, 5) = [1, 2, 3, 4, 5]
|
|
34
|
+
* range(10, 20, 2) = [10, 12, 14, 16, 18, 20]
|
|
35
|
+
* @param start - start range
|
|
36
|
+
* @param end - start end
|
|
37
|
+
* @param step - step size
|
|
38
|
+
* @returns range numbers
|
|
39
|
+
*/
|
|
40
|
+
const range = (start, end, step = 1) => Array.from(Array(Math.ceil((end + 1 - start) / step)).keys()).map(x => start + x * step);
|
|
41
|
+
const MgPagination$1 = /*@__PURE__*/ proxyCustomElement(class MgPagination extends HTMLElement {
|
|
42
|
+
constructor() {
|
|
43
|
+
super();
|
|
44
|
+
this.__registerHost();
|
|
45
|
+
this.__attachShadow();
|
|
46
|
+
this.currentPageChange = createEvent(this, "current-page-change", 7);
|
|
47
|
+
/**
|
|
48
|
+
* Identifier is used for the element ID (id is a reserved prop in Stencil.js)
|
|
49
|
+
* If not set, it will be created.
|
|
50
|
+
*/
|
|
51
|
+
this.identifier = createID('mg-pagination');
|
|
52
|
+
/**
|
|
53
|
+
* Hide navigation label
|
|
54
|
+
*/
|
|
55
|
+
this.hideNavigationLabels = false;
|
|
56
|
+
/**
|
|
57
|
+
* Hide select input
|
|
58
|
+
*/
|
|
59
|
+
this.hidePageCount = false;
|
|
60
|
+
/**
|
|
61
|
+
* Component total pages
|
|
62
|
+
*/
|
|
63
|
+
this.totalPages = 1;
|
|
64
|
+
/**
|
|
65
|
+
* Component current page
|
|
66
|
+
*/
|
|
67
|
+
this.currentPage = 1;
|
|
68
|
+
/**
|
|
69
|
+
* Change current page from target
|
|
70
|
+
* @param target - target page
|
|
71
|
+
*/
|
|
72
|
+
this.goToPage = (target) => {
|
|
73
|
+
this.currentPage = target;
|
|
74
|
+
};
|
|
75
|
+
/************
|
|
76
|
+
* Handlers *
|
|
77
|
+
************/
|
|
78
|
+
/**
|
|
79
|
+
* select handler
|
|
80
|
+
* @param event - value change event
|
|
81
|
+
*/
|
|
82
|
+
this.handleSelect = (event) => {
|
|
83
|
+
const to = Number(event.target.value);
|
|
84
|
+
this.goToPage(to > 0 ? to : 1);
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Go to 'previous/next' page button handler
|
|
88
|
+
* @param action - navigation action
|
|
89
|
+
* @param disabled - button disable state
|
|
90
|
+
*/
|
|
91
|
+
this.handleGoToPage = (action, disabled) => {
|
|
92
|
+
!disabled && this.goToPage(action === NavigationAction.NEXT ? this.currentPage + 1 : this.currentPage - 1);
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
watchIdentifier(newValue) {
|
|
96
|
+
if (!isValideID(newValue)) {
|
|
97
|
+
console.error(`<mg-pagination> prop "identifier" value is invalid. Passed value: ${toString(newValue)}.`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
validateTotalPages(newValue) {
|
|
101
|
+
if (newValue < 1) {
|
|
102
|
+
throw new Error(`<mg-pagination> prop "totalPages" must be greater than 0. Passed value: ${toString(newValue)}.`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
validateCurrentPage(newValue) {
|
|
106
|
+
if (newValue < 1) {
|
|
107
|
+
throw new Error(`<mg-pagination> prop "currentPage" must be greater than 0. Passed value: ${toString(newValue)}.`);
|
|
108
|
+
}
|
|
109
|
+
else if (newValue > this.totalPages) {
|
|
110
|
+
throw new Error('<mg-pagination> prop "currentPage" can not be greater than total page.');
|
|
111
|
+
}
|
|
112
|
+
this.currentPageChange.emit(newValue);
|
|
113
|
+
}
|
|
114
|
+
watchPaginationMessages(newValue) {
|
|
115
|
+
if (Boolean(newValue) && (typeof newValue !== 'object' || !['next', 'previous', 'nextLabel', 'previousLabel'].every(key => isValidString(newValue[key])))) {
|
|
116
|
+
throw new Error('<mg-pagination> prop "messages" must be a valid "PaginationMessagesType".');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/*************
|
|
120
|
+
* Lifecycle *
|
|
121
|
+
*************/
|
|
122
|
+
/**
|
|
123
|
+
* Check if props are well configured on init
|
|
124
|
+
*/
|
|
125
|
+
componentWillLoad() {
|
|
126
|
+
// Get locales
|
|
127
|
+
this.localesMessages = initLocales(this.element).messages;
|
|
128
|
+
// Validate
|
|
129
|
+
this.watchIdentifier(this.identifier);
|
|
130
|
+
this.validateTotalPages(this.totalPages);
|
|
131
|
+
this.validateCurrentPage(this.currentPage);
|
|
132
|
+
this.watchPaginationMessages(this.messages);
|
|
133
|
+
// Set default label
|
|
134
|
+
if (this.label === undefined || this.label === '') {
|
|
135
|
+
this.label = this.localesMessages.pagination.label;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Render
|
|
140
|
+
* @returns HTML Element
|
|
141
|
+
*/
|
|
142
|
+
render() {
|
|
143
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
144
|
+
const navigationMessages = {
|
|
145
|
+
next: (_b = (_a = this.messages) === null || _a === void 0 ? void 0 : _a.next) !== null && _b !== void 0 ? _b : this.localesMessages.general.next,
|
|
146
|
+
previous: (_d = (_c = this.messages) === null || _c === void 0 ? void 0 : _c.previous) !== null && _d !== void 0 ? _d : this.localesMessages.general.previous,
|
|
147
|
+
nextLabel: (_f = (_e = this.messages) === null || _e === void 0 ? void 0 : _e.nextLabel) !== null && _f !== void 0 ? _f : this.localesMessages.pagination.nextLabel,
|
|
148
|
+
previousLabel: (_h = (_g = this.messages) === null || _g === void 0 ? void 0 : _g.previousLabel) !== null && _h !== void 0 ? _h : this.localesMessages.pagination.previousLabel,
|
|
149
|
+
};
|
|
150
|
+
const navigationActionButton = (disabled, action) => {
|
|
151
|
+
return (h("mg-button", { label: navigationMessages[`${action}Label`],
|
|
152
|
+
// eslint-disable-next-line react/jsx-no-bind
|
|
153
|
+
onClick: () => this.handleGoToPage(action, disabled), disabled: disabled, variant: "flat", isIcon: this.hideNavigationLabels }, action === NavigationAction.PREVIOUS && h("mg-icon", { icon: "chevron-left" }), !this.hideNavigationLabels && navigationMessages[action], action === NavigationAction.NEXT && h("mg-icon", { icon: "chevron-right" })));
|
|
154
|
+
};
|
|
155
|
+
return (h(Host, { hidden: this.totalPages < 2 }, h("nav", { role: "navigation", "aria-label": this.label, id: this.identifier, class: { 'mg-c-pagination': true, 'mg-c-pagination--hide-page-count': this.hidePageCount } }, navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS), !this.hidePageCount && (h("div", { class: "mg-c-pagination__page-count" }, h("mg-input-select", { identifier: `${this.identifier}-select`, items: range(1, this.totalPages).map(page => page.toString()), label: this.localesMessages.pagination.selectPage, "label-hide": true, "on-value-change": this.handleSelect, value: this.currentPage.toString(), "placeholder-hide": true }), h("span", { class: "mg-u-visually-hidden" }, this.localesMessages.pagination.page, " ", this.currentPage), "/ ", this.totalPages, " ", this.totalPages > 1 ? this.localesMessages.pagination.pages : this.localesMessages.pagination.page)), navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT))));
|
|
156
|
+
}
|
|
157
|
+
get element() { return this; }
|
|
158
|
+
static get watchers() { return {
|
|
159
|
+
"identifier": ["watchIdentifier"],
|
|
160
|
+
"totalPages": ["validateTotalPages"],
|
|
161
|
+
"currentPage": ["validateCurrentPage"],
|
|
162
|
+
"messages": ["watchPaginationMessages"]
|
|
163
|
+
}; }
|
|
164
|
+
static get style() { return mgPaginationCss; }
|
|
165
|
+
}, [257, "mg-pagination", {
|
|
166
|
+
"identifier": [1],
|
|
167
|
+
"label": [1025],
|
|
168
|
+
"hideNavigationLabels": [4, "hide-navigation-labels"],
|
|
169
|
+
"hidePageCount": [4, "hide-page-count"],
|
|
170
|
+
"totalPages": [2, "total-pages"],
|
|
171
|
+
"currentPage": [1538, "current-page"],
|
|
172
|
+
"messages": [16]
|
|
173
|
+
}, undefined, {
|
|
174
|
+
"identifier": ["watchIdentifier"],
|
|
175
|
+
"totalPages": ["validateTotalPages"],
|
|
176
|
+
"currentPage": ["validateCurrentPage"],
|
|
177
|
+
"messages": ["watchPaginationMessages"]
|
|
178
|
+
}]);
|
|
179
|
+
function defineCustomElement$1() {
|
|
180
|
+
if (typeof customElements === "undefined") {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const components = ["mg-pagination", "mg-button", "mg-icon", "mg-input", "mg-input-select", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
|
|
184
|
+
components.forEach(tagName => { switch (tagName) {
|
|
185
|
+
case "mg-pagination":
|
|
186
|
+
if (!customElements.get(tagName)) {
|
|
187
|
+
customElements.define(tagName, MgPagination$1);
|
|
188
|
+
}
|
|
189
|
+
break;
|
|
190
|
+
case "mg-button":
|
|
191
|
+
if (!customElements.get(tagName)) {
|
|
192
|
+
defineCustomElement$8();
|
|
193
|
+
}
|
|
194
|
+
break;
|
|
195
|
+
case "mg-icon":
|
|
196
|
+
if (!customElements.get(tagName)) {
|
|
197
|
+
defineCustomElement$7();
|
|
198
|
+
}
|
|
199
|
+
break;
|
|
200
|
+
case "mg-input":
|
|
201
|
+
if (!customElements.get(tagName)) {
|
|
202
|
+
defineCustomElement$6();
|
|
203
|
+
}
|
|
204
|
+
break;
|
|
205
|
+
case "mg-input-select":
|
|
206
|
+
if (!customElements.get(tagName)) {
|
|
207
|
+
defineCustomElement$5();
|
|
208
|
+
}
|
|
209
|
+
break;
|
|
210
|
+
case "mg-input-title":
|
|
211
|
+
if (!customElements.get(tagName)) {
|
|
212
|
+
defineCustomElement$4();
|
|
213
|
+
}
|
|
214
|
+
break;
|
|
215
|
+
case "mg-tooltip":
|
|
216
|
+
if (!customElements.get(tagName)) {
|
|
217
|
+
defineCustomElement$3();
|
|
218
|
+
}
|
|
219
|
+
break;
|
|
220
|
+
case "mg-tooltip-content":
|
|
221
|
+
if (!customElements.get(tagName)) {
|
|
222
|
+
defineCustomElement$2();
|
|
223
|
+
}
|
|
224
|
+
break;
|
|
225
|
+
} });
|
|
226
|
+
}
|
|
227
|
+
defineCustomElement$1();
|
|
2
228
|
|
|
3
229
|
const MgPagination = MgPagination$1;
|
|
4
230
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -20,7 +20,7 @@ const expandToggleDisplays = ['text', 'icon'];
|
|
|
20
20
|
*/
|
|
21
21
|
const titlePositions = ['left', 'right'];
|
|
22
22
|
|
|
23
|
-
const mgPanelCss = "/*!\n * @prop --mg-c-panel-border-radius: Defines the border radius of the panel. Default value: `--mg-b-size-radius`.\n * @prop --mg-c-panel-color-background: Defines the background of the panel.\n * @prop --mg-c-panel-box-shadow: Defines the box shadow of the panel. Default value: `--mg-b-box-shadow`.\n * @prop --mg-c-panel-content-spacing: Defines the padding of the panel content. Default value: `--mg-b-size-16`.\n */:host{--mg-c-card-
|
|
23
|
+
const mgPanelCss = "/*!\n * @prop --mg-c-panel-border-radius: Defines the border radius of the panel. Default value: `--mg-b-size-radius`.\n * @prop --mg-c-panel-color-background: Defines the background of the panel.\n * @prop --mg-c-panel-box-shadow: Defines the box shadow of the panel. Default value: `--mg-b-box-shadow`.\n * @prop --mg-c-panel-content-spacing: Defines the padding of the panel content. Default value: `--mg-b-size-16`.\n */:host{--mg-c-card-spacing:0;--mg-c-card-border-radius:var(--mg-c-panel-border-radius);--mg-c-card-color-background:var(--mg-c-panel-color-background);--mg-c-card-box-shadow:var(--mg-c-panel-box-shadow)}.mg-c-panel__header{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;padding:0 var(--mg-b-size-4)}.mg-c-panel__header-title,.mg-c-panel__header-content{display:flex;margin:var(--mg-b-size-4) 0}.mg-c-panel__header-content{min-height:var(--mg-b-size-min-height);flex:1 auto;align-items:center;padding-left:var(--mg-b-size-4)}.mg-c-panel__header-title mg-input-text{flex-grow:1;margin-left:var(--mg-b-size-4)}.mg-c-panel__header-title mg-button+mg-button:not([slot=append-input]){margin-left:var(--mg-b-size-4)}.mg-c-panel__header-title.mg-c-panel__header-title--full{flex:1 1 auto}.mg-c-panel__collapse-button-content{--mg-b-font-size:var(--mg-b-font-size-h5);--mg-c-button-font-weight:600}.mg-c-panel__collapse-button-icon.mg-c-panel__collapse-button-icon--reverse{transform:rotate(180deg)}.mg-c-panel__content{padding:var(--mg-c-panel-content-spacing)}.mg-c-panel ::slotted([slot=header-right]){display:flex;flex-wrap:wrap;margin-left:auto;gap:var(--mg-b-spacing-actions)}.mg-c-panel ::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}";
|
|
24
24
|
|
|
25
25
|
const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class MgPanel extends HTMLElement {
|
|
26
26
|
constructor() {
|
|
@@ -217,7 +217,7 @@ const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class MgPanel extends HTMLEle
|
|
|
217
217
|
*/
|
|
218
218
|
render() {
|
|
219
219
|
const headerId = `${this.identifier}-header`;
|
|
220
|
-
return (h("section", { key: '
|
|
220
|
+
return (h("section", { key: '6d9b0759cf8d6a8e94a1a6598f45fc00288ca22a', class: this.classCollection.join(), id: this.identifier }, h("mg-card", { key: '21b0d991daf053506097333df58d3b98ec2e5b0e', shadow: this.shadow }, h("header", { key: 'abd9dbeb13d85c9a66aac13e7b32e6a83e2ded57', class: { 'mg-c-panel__header': true, 'mg-c-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { key: '23c74b70bd275fb18c853a1b7a0a4b4ff5a4c605', class: "mg-c-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", { key: '15561936437c960768c4954f45df4045ac3dee03' })))));
|
|
221
221
|
}
|
|
222
222
|
get element() { return this; }
|
|
223
223
|
static get watchers() { return {
|
|
@@ -230,7 +230,7 @@ const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class MgPanel extends HTMLEle
|
|
|
230
230
|
"expandToggleDisplay": ["validateExpandToggleDisplay"]
|
|
231
231
|
}; }
|
|
232
232
|
static get style() { return mgPanelCss; }
|
|
233
|
-
}, [
|
|
233
|
+
}, [257, "mg-panel", {
|
|
234
234
|
"identifier": [1],
|
|
235
235
|
"panelTitle": [1025, "panel-title"],
|
|
236
236
|
"titlePattern": [1, "title-pattern"],
|
|
@@ -53,11 +53,11 @@ const MgPopoverContent = /*@__PURE__*/ proxyCustomElement(class MgPopoverContent
|
|
|
53
53
|
* @returns HTML Element
|
|
54
54
|
*/
|
|
55
55
|
render() {
|
|
56
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: '2746e72f636c1a702d2b15836343ca8503f233e5' }, h("mg-card", { key: '84e28550627969d4e15ded5a5f8b6d19584eb891', class: this.classCollection.join(), shadow: true }, this.closeButton && (h("mg-button", { key: 'f25c773593441597e81330997df3175cd9a963e4', "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { key: '723f3d1e8a85356d7aa9be9c875b273d7c9c1f72', icon: "cross" }))), h("div", { key: '283316f2a66212d9afc128aaec3fb24e4a40c0eb', class: "mg-c-popover-content__title" }, h("slot", { key: 'a1839a9a3259ccb221b90e82f786eb0e7c3d2a19', name: "title" })), h("slot", { key: '708903013417e27f4a9ed9811fde886d6b697dec', name: "content" })), h("slot", { key: 'fad6024a2474ffd5f46925101baa0e6ab9f2e951', name: "arrow" })));
|
|
57
57
|
}
|
|
58
58
|
get element() { return this; }
|
|
59
59
|
static get style() { return mgPopoverContentCss; }
|
|
60
|
-
}, [
|
|
60
|
+
}, [257, "mg-popover-content", {
|
|
61
61
|
"closeButton": [4, "close-button"],
|
|
62
62
|
"classCollection": [32]
|
|
63
63
|
}]);
|
|
@@ -249,7 +249,7 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
|
|
|
249
249
|
* @returns HTML Element
|
|
250
250
|
*/
|
|
251
251
|
render() {
|
|
252
|
-
return (h(Host, { key: '
|
|
252
|
+
return (h(Host, { key: '7ea28f19a5a61f6191c2aece439e85da8f067270' }, h("slot", { key: 'aa6a627b90246ca327e2971329ab58b02eeb1d04' }), h("slot", { key: '1851353a6b4de659d6027a0bf3ba5f2120f7137d', name: "content" })));
|
|
253
253
|
}
|
|
254
254
|
get element() { return this; }
|
|
255
255
|
static get watchers() { return {
|
|
@@ -259,7 +259,7 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
|
|
|
259
259
|
"display": ["handleDisplay"]
|
|
260
260
|
}; }
|
|
261
261
|
static get style() { return mgPopoverCss; }
|
|
262
|
-
}, [
|
|
262
|
+
}, [257, "mg-popover", {
|
|
263
263
|
"identifier": [1],
|
|
264
264
|
"placement": [1],
|
|
265
265
|
"arrowHide": [4, "arrow-hide"],
|
|
@@ -75,7 +75,7 @@ const MgProgress$1 = /*@__PURE__*/ proxyCustomElement(class MgProgress extends H
|
|
|
75
75
|
* @returns HTML Element
|
|
76
76
|
*/
|
|
77
77
|
render() {
|
|
78
|
-
return (h(Host, { key: '
|
|
78
|
+
return (h(Host, { key: '62c66dbd93249bfde3eb8ff449b49884edfe49c3', role: this.ariaRole, "aria-label": this.label, "aria-valuenow": this.value, "aria-valuemin": this.min, "aria-valuemax": this.max }, h("div", { key: 'b349c9d7358086ca4668705a1935fd8bbdb86afa', class: "mg-c-progress" }, h("div", { key: '57cc19d07c0f006f8ecf3a1f86ec12e37ffd8d6b', class: { 'mg-c-progress__bar': true, 'mg-c-progress__bar--active': this.value > this.min } }, h("div", { key: 'b4c49d94d9cfe2e1a6d8013aa4a39cde51b36d04', class: "mg-c-progress__fill", style: {
|
|
79
79
|
width: `${Math.round(((this.value - this.min) / (this.max - this.min)) * 100)}%`,
|
|
80
80
|
} })))));
|
|
81
81
|
}
|
|
@@ -87,7 +87,7 @@ const MgProgress$1 = /*@__PURE__*/ proxyCustomElement(class MgProgress extends H
|
|
|
87
87
|
"max": ["watchMax"]
|
|
88
88
|
}; }
|
|
89
89
|
static get style() { return mgProgressCss; }
|
|
90
|
-
}, [
|
|
90
|
+
}, [257, "mg-progress", {
|
|
91
91
|
"label": [1],
|
|
92
92
|
"ariaRole": [1, "aria-role"],
|
|
93
93
|
"value": [2],
|
|
@@ -43,14 +43,14 @@ const MgSkipLinks$1 = /*@__PURE__*/ proxyCustomElement(class MgSkipLinks extends
|
|
|
43
43
|
* @returns HTML Element
|
|
44
44
|
*/
|
|
45
45
|
render() {
|
|
46
|
-
return (h("nav", { key: '
|
|
46
|
+
return (h("nav", { key: '66ea9a2abfd1db7a1c7c46e9cdcd15af013ea406', class: "mg-c-skip-links", role: "navigation", "aria-label": this.messages.skipLinks.navLabel }, h("ul", { key: '07f404865c3ad0d815b87e32a46716136ed77d7d', class: "mg-c-skip-links__list", role: "list" }, this.links.map(link => (h("li", { key: link.href }, h("a", { class: "mg-c-skip-links__link", href: link.href, onClick: this.handleLinkCLick }, link.label)))))));
|
|
47
47
|
}
|
|
48
48
|
get element() { return this; }
|
|
49
49
|
static get watchers() { return {
|
|
50
50
|
"links": ["validateLinks"]
|
|
51
51
|
}; }
|
|
52
52
|
static get style() { return mgSkipLinksCss; }
|
|
53
|
-
}, [
|
|
53
|
+
}, [257, "mg-skip-links", {
|
|
54
54
|
"links": [16]
|
|
55
55
|
}, undefined, {
|
|
56
56
|
"links": ["validateLinks"]
|
|
@@ -16,7 +16,7 @@ const textAlignments = ['left', 'center', 'right'];
|
|
|
16
16
|
// Define possible data types
|
|
17
17
|
const dataTypes = ['string', 'numeric', 'date'];
|
|
18
18
|
|
|
19
|
-
const mgTableCss = ".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}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}@font-face{font-family:\"Open Sans\";src:url(\"fonts/OpenSans-Regular.ttf\") format(\"truetype\")}@font-face{font-family:\"Open Sans\";font-weight:600;src:url(\"fonts/OpenSans-SemiBold.ttf\") format(\"truetype\")}@font-face{font-family:\"Open Sans\";font-weight:700;src:url(\"fonts/OpenSans-Bold.ttf\") format(\"truetype\")}p{margin:0}p+p{margin-top:var(--mg-b-size-8)}h1,.mg-u-h1{font-family:var(--mg-b-font-family-heading);font-
|
|
19
|
+
const mgTableCss = ".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}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}@font-face{font-family:\"Open Sans\";src:url(\"fonts/OpenSans-Regular.ttf\") format(\"truetype\")}@font-face{font-family:\"Open Sans\";font-weight:600;src:url(\"fonts/OpenSans-SemiBold.ttf\") format(\"truetype\")}@font-face{font-family:\"Open Sans\";font-weight:700;src:url(\"fonts/OpenSans-Bold.ttf\") format(\"truetype\")}p{margin:0}p+p{margin-top:var(--mg-b-size-8)}h1,.mg-u-h1{font-family:var(--mg-b-font-family-heading);font-size:var(--mg-b-font-size-h1);font-weight:bold}h2,.mg-u-h2{font-family:var(--mg-b-font-family-heading);font-size:var(--mg-b-font-size-h2);font-weight:bold}h3,.mg-u-h3{font-family:var(--mg-b-font-family-heading);font-size:var(--mg-b-font-size-h3);font-weight:bold}h4,.mg-u-h4{font-family:var(--mg-b-font-family-heading);font-size:var(--mg-b-font-size-h4);font-weight:bold}h5,.mg-u-h5{font-family:var(--mg-b-font-family-heading);font-size:var(--mg-b-font-size-h5);font-weight:bold}h6,.mg-u-h6{font-family:var(--mg-b-font-family-heading);font-size:var(--mg-b-font-size-h6);font-weight:bold}small{font-size:var(--mg-b-small-font-size)}.mg-u-text-left{text-align:left !important}.mg-u-text-center{text-align:center !important}.mg-u-text-right{text-align:right !important}.mg-c-table{--mg-c-table-cell-spacing:var(--mg-b-size-8) var(--mg-b-size-16);--mg-c-table-cell-height:var(--mg-b-size-40);--mg-c-table-header-cell-height:calc(var(--mg-b-size-min-height) + 2 * var(--mg-b-size-8));overflow:hidden;border:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30);border-radius:var(--mg-b-size-12);background:var(--mg-b-color-light);border-spacing:0;color:var(--mg-b-color-dark)}.mg-c-table td,.mg-c-table th{height:var(--mg-c-table-cell-height);box-sizing:border-box;padding:var(--mg-c-table-cell-spacing);text-align:start}.mg-c-table thead{height:var(--mg-c-table-header-cell-height)}.mg-c-table thead,.mg-c-table tfoot{background-color:var(--mg-b-color-neutral-10)}.mg-c-table thead td,.mg-c-table tfoot td,.mg-c-table th{font-weight:600}.mg-c-table tr th,.mg-c-table tr td{border-block-end:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30)}.mg-c-table tfoot tr:last-of-type th,.mg-c-table tfoot tr:last-of-type td{border-block-end:none}.mg-c-table.mg-c-table--size-small{--mg-c-table-cell-spacing:var(--mg-b-size-4) var(--mg-b-size-16);--mg-c-table-cell-height:var(--mg-b-size-32);--mg-c-table-header-cell-height:var(--mg-b-size-32)}.mg-c-table.mg-c-table--size-large{--mg-c-table-cell-height:var(--mg-c-table-header-cell-height)}.mg-c-table.mg-c-table--size-xlarge{--mg-c-table-cell-spacing:var(--mg-b-size-12) var(--mg-b-size-16);--mg-c-table-cell-height:var(--mg-b-size-64);--mg-c-table-header-cell-height:var(--mg-b-size-64)}.mg-c-table.mg-c-table--full-width{width:100%}.mg-c-table-wrapper{overflow:auto}.mg-c-table thead td,.mg-c-table thead th{position:relative}.mg-c-table thead td .mg-c-table__sort-button,.mg-c-table thead th .mg-c-table__sort-button{display:inline-flex;align-items:center;padding:0;border:none;margin:0;background:none;color:inherit;font-size:inherit;font-weight:600;gap:var(--mg-b-size-4);text-align:left}.mg-c-table thead td .mg-c-table__sort-button::after,.mg-c-table thead th .mg-c-table__sort-button::after{position:absolute;content:\"\";inset:0}.mg-c-table thead td .mg-c-table__sort-button:hover,.mg-c-table thead th .mg-c-table__sort-button:hover{cursor:pointer}.mg-c-table thead td:has(.mg-c-table__sort-button):hover,.mg-c-table thead td[aria-sort=descending],.mg-c-table thead td[aria-sort=ascending],.mg-c-table thead th:has(.mg-c-table__sort-button):hover,.mg-c-table thead th[aria-sort=descending],.mg-c-table thead th[aria-sort=ascending]{background-color:var(--mg-b-color-neutral-20)}";
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Check if value is a valid align object
|
|
@@ -127,11 +127,11 @@ const MgTable$1 = /*@__PURE__*/ proxyCustomElement(class MgTable extends HTMLEle
|
|
|
127
127
|
Object.entries(this.columns).forEach(([key, value]) => {
|
|
128
128
|
// Add alignment to stylesheet
|
|
129
129
|
if (value.align !== undefined) {
|
|
130
|
-
this.alignmentStylesheet.insertRule(`.${this.componentClass}
|
|
130
|
+
this.alignmentStylesheet.insertRule(`.${this.componentClass} th:nth-child(${key}),td:nth-child(${key}){text-align:${value.align};&>*{display:inline-block;}}`);
|
|
131
131
|
}
|
|
132
132
|
// if align is not defined and datatype is number, align right
|
|
133
133
|
else if (value.datatype === 'numeric') {
|
|
134
|
-
this.alignmentStylesheet.insertRule(`.${this.componentClass}
|
|
134
|
+
this.alignmentStylesheet.insertRule(`.${this.componentClass} th:nth-child(${key}),td:nth-child(${key}){text-align:right;&>*{display:inline-block;}}`);
|
|
135
135
|
}
|
|
136
136
|
// Define if column is sortable
|
|
137
137
|
if (value.sortable) {
|