@mgdis/mg-components 6.22.0 → 6.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-C2viYwrR.js → index-Dz2LAZQT.js} +325 -1789
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mg-action-more_37.cjs.entry.js → mg-action-more_36.cjs.entry.js} +109 -130
- package/dist/cjs/mg-alert.cjs.entry.js +2 -2
- package/dist/cjs/mg-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-fieldset.cjs.entry.js +2 -2
- package/dist/cjs/mg-input-combobox.cjs.entry.js +2 -2
- package/dist/cjs/mg-input-file.cjs.entry.js +3 -3
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +2498 -2474
- package/dist/cjs/mg-loader.cjs.entry.js +2 -2
- package/dist/cjs/mg-progress.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +2 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js +6 -3
- package/dist/collection/components/atoms/mg-card/mg-card.js +2 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +8 -4
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +2 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +2 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +4 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +38 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +47 -26
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +13 -7
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +4 -3
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +9 -5
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +7 -4
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +22 -8
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +11 -6
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +7 -4
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +5 -3
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +5 -3
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +4 -2
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -7
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +5 -3
- package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +3 -2
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +3 -2
- package/dist/collection/components/molecules/mg-form/mg-form.js +5 -3
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +5 -3
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +6 -4
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +4 -3
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -3
- 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 +3 -2
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +3 -2
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
- package/dist/collection/components/molecules/mg-table/mg-table.js +4 -2
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +3 -2
- package/dist/components/index2.js +1 -1
- package/dist/components/mg-action-more.js +1 -1
- package/dist/components/mg-alert.js +1 -1
- package/dist/components/mg-breadcrumb.js +1 -1
- package/dist/components/mg-details.js +1 -1
- package/dist/components/mg-fieldset.js +1 -1
- package/dist/components/mg-form.js +1 -1
- package/dist/components/mg-illustrated-message.js +1 -1
- package/dist/components/mg-input-checkbox.js +1 -1
- package/dist/components/mg-input-combobox.js +1 -1
- package/dist/components/mg-input-date.js +1 -1
- package/dist/components/mg-input-file.js +1 -1
- package/dist/components/mg-input-numeric.js +1 -1
- package/dist/components/mg-input-password.js +1 -1
- package/dist/components/mg-input-radio.js +1 -1
- package/dist/components/mg-input-rich-text-editor.js +2 -2
- package/dist/components/mg-input-select2.js +1 -1
- package/dist/components/mg-input-text2.js +1 -1
- package/dist/components/mg-input-textarea.js +1 -1
- package/dist/components/mg-input-toggle.js +1 -1
- package/dist/components/mg-item-more2.js +1 -1
- package/dist/components/mg-loader2.js +1 -1
- package/dist/components/mg-message2.js +1 -1
- package/dist/components/mg-modal.js +1 -1
- package/dist/components/mg-panel.js +1 -1
- package/dist/components/mg-popover-content2.js +1 -1
- package/dist/components/mg-popover2.js +1 -1
- package/dist/components/mg-progress.js +1 -1
- package/dist/components/mg-skip-links.js +1 -1
- package/dist/components/mg-tabs2.js +1 -1
- package/dist/esm/{index-DFwaH2hS.js → index-C3jUhxdI.js} +325 -1789
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mg-action-more_37.entry.js → mg-action-more_36.entry.js} +111 -131
- package/dist/esm/mg-alert.entry.js +2 -2
- package/dist/esm/mg-breadcrumb.entry.js +2 -2
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-fieldset.entry.js +2 -2
- package/dist/esm/mg-input-combobox.entry.js +2 -2
- package/dist/esm/mg-input-file.entry.js +3 -3
- package/dist/esm/mg-input-rich-text-editor.entry.js +2498 -2474
- package/dist/esm/mg-loader.entry.js +2 -2
- package/dist/esm/mg-progress.entry.js +2 -2
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-2ee92f38.entry.js → p-06fbdb2f.entry.js} +1 -1
- package/dist/mg-components/{p-3b653226.entry.js → p-188b9ca9.entry.js} +1 -1
- package/dist/mg-components/p-4667078d.entry.js +1 -0
- package/dist/mg-components/{p-c63f97f0.entry.js → p-5a859ecf.entry.js} +2 -2
- package/dist/mg-components/{p-d5e69c95.entry.js → p-661da56b.entry.js} +1 -1
- package/dist/mg-components/{p-adec7fcc.entry.js → p-8e256086.entry.js} +1 -1
- package/dist/mg-components/p-C3jUhxdI.js +2 -0
- package/dist/mg-components/{p-cc793586.entry.js → p-b0b8c58f.entry.js} +1 -1
- package/dist/mg-components/{p-5745fbea.entry.js → p-bbcef41c.entry.js} +1 -1
- package/dist/mg-components/{p-c8c8cfc1.entry.js → p-c1aeb277.entry.js} +1 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +2 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.d.ts +8 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +16 -8
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -5
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +1 -1
- package/dist/types/components.d.ts +525 -170
- package/dist/types/stencil-public-runtime.d.ts +52 -2
- package/ide/intellij/web-types.json +7 -7
- package/ide/vscode/html-custom-data.json +3 -3
- package/package.json +19 -19
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +0 -245
- package/dist/components/mg-input-checkbox-paginated.d.ts +0 -11
- package/dist/components/mg-input-checkbox-paginated.js +0 -1
- package/dist/components/mg-input-checkbox-paginated2.js +0 -1
- package/dist/mg-components/p-0482eb9f.entry.js +0 -1
- package/dist/mg-components/p-DFwaH2hS.js +0 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +0 -77
|
@@ -133,7 +133,7 @@ export class MgFieldset {
|
|
|
133
133
|
* @returns HTML Element
|
|
134
134
|
*/
|
|
135
135
|
render() {
|
|
136
|
-
return (h("mg-input", { key: '
|
|
136
|
+
return (h("mg-input", { key: 'a32d9d6e0a77eddf6dac1c741066cb600c2f27b3', label: this.legend, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: !this.legendHide, labelHeading: this.legendHeading, labelBorderDisplay: this.legendHeading && this.legendBorderDisplay, labelHide: this.legendHide, inputsOnBottom: this.legendHeading !== undefined, tooltip: this.tooltip, tooltipPosition: 'label', helpText: this.helpText, errorMessage: !this.valid && isValidString(this.errorMessage) ? this.errorMessage : undefined }, h("span", { key: '5d05e51fd64fc43458bccb3287fcf3a4fe462c00', class: "mg-c-input__input-group" }, h("slot", { key: 'd641e3007cdd2adfa6115f639603de78caa63202' }))));
|
|
137
137
|
}
|
|
138
138
|
static get is() { return "mg-fieldset"; }
|
|
139
139
|
static get encapsulation() { return "shadow"; }
|
|
@@ -227,7 +227,8 @@ export class MgFieldset {
|
|
|
227
227
|
"labelHeading": {
|
|
228
228
|
"location": "import",
|
|
229
229
|
"path": "../inputs/mg-input/mg-input.conf",
|
|
230
|
-
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::labelHeading"
|
|
230
|
+
"id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::labelHeading",
|
|
231
|
+
"referenceLocation": "labelHeading"
|
|
231
232
|
}
|
|
232
233
|
}
|
|
233
234
|
},
|
|
@@ -242,7 +242,7 @@ export class MgForm {
|
|
|
242
242
|
* @returns HTML Element
|
|
243
243
|
*/
|
|
244
244
|
render() {
|
|
245
|
-
return (h("form", { key: '
|
|
245
|
+
return (h("form", { key: 'e528a49eba4e57f809dd0a6dd5462c2be3677da5', class: this.classCollection.join(), id: this.identifier, name: this.name, onSubmit: this.handleFormSubmit, role: this.ariaRole }, this.requiredMessageText && h("p", { key: '37eb0c30984b998ef8d78ff8ae74949c4761c21a', innerHTML: this.requiredMessageText }), h("slot", { key: '8ae80522118a3e87ca735545a48844c1e4e3ab30' }), !this.readonly && !this.disabled && h("slot", { key: '4cdeba849881f9753ff08df6c456397e859c6a0d', name: "actions" })));
|
|
246
246
|
}
|
|
247
247
|
static get is() { return "mg-form"; }
|
|
248
248
|
static get encapsulation() { return "shadow"; }
|
|
@@ -328,7 +328,8 @@ export class MgForm {
|
|
|
328
328
|
"RequiredMessageStatusType": {
|
|
329
329
|
"location": "import",
|
|
330
330
|
"path": "./mg-form.conf",
|
|
331
|
-
"id": "src/components/molecules/mg-form/mg-form.conf.ts::RequiredMessageStatusType"
|
|
331
|
+
"id": "src/components/molecules/mg-form/mg-form.conf.ts::RequiredMessageStatusType",
|
|
332
|
+
"referenceLocation": "RequiredMessageStatusType"
|
|
332
333
|
}
|
|
333
334
|
}
|
|
334
335
|
},
|
|
@@ -353,7 +354,8 @@ export class MgForm {
|
|
|
353
354
|
"AriaRoleType": {
|
|
354
355
|
"location": "import",
|
|
355
356
|
"path": "./mg-form.conf",
|
|
356
|
-
"id": "src/components/molecules/mg-form/mg-form.conf.ts::AriaRoleType"
|
|
357
|
+
"id": "src/components/molecules/mg-form/mg-form.conf.ts::AriaRoleType",
|
|
358
|
+
"referenceLocation": "AriaRoleType"
|
|
357
359
|
}
|
|
358
360
|
}
|
|
359
361
|
},
|
package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js
CHANGED
|
@@ -81,7 +81,7 @@ export class MgIllustratedMessage {
|
|
|
81
81
|
* @returns HTML Element
|
|
82
82
|
*/
|
|
83
83
|
render() {
|
|
84
|
-
return (h("div", { key: '
|
|
84
|
+
return (h("div", { key: 'c9d8c8bfd2792b1cf5e78ab9d168d597b20e9a1e', class: this.classCollection.join() }, h("div", { key: 'cc8fa03147b9e59e6e8e015be9ed2b8dddd92ded', class: "mg-c-illustrated-message__illustration" }, h("slot", { key: '83a4ec2223c4e74511beb7c0abfa10e77cee425d', name: "illustration" })), h("div", { key: 'dbb4d13ca5324cab889fa2acc9b9b22522d7a8ec', class: "mg-c-illustrated-message__slots" }, h("slot", { key: '9e74d84becf29539ec9c37e8ad1e317714f3c86c', name: "title" }), h("slot", { key: 'ae97d25c19b76ca092560d2555ebd6a87f542ffe', name: "details" }))));
|
|
85
85
|
}
|
|
86
86
|
static get is() { return "mg-illustrated-message"; }
|
|
87
87
|
static get encapsulation() { return "shadow"; }
|
|
@@ -107,7 +107,8 @@ export class MgIllustratedMessage {
|
|
|
107
107
|
"IllustratedMessageSizeType": {
|
|
108
108
|
"location": "import",
|
|
109
109
|
"path": "./mg-illustrated-message.conf",
|
|
110
|
-
"id": "src/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.ts::IllustratedMessageSizeType"
|
|
110
|
+
"id": "src/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.ts::IllustratedMessageSizeType",
|
|
111
|
+
"referenceLocation": "IllustratedMessageSizeType"
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
},
|
|
@@ -133,7 +134,8 @@ export class MgIllustratedMessage {
|
|
|
133
134
|
"IllustratedMessageDirectionType": {
|
|
134
135
|
"location": "import",
|
|
135
136
|
"path": "./mg-illustrated-message.conf",
|
|
136
|
-
"id": "src/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.ts::IllustratedMessageDirectionType"
|
|
137
|
+
"id": "src/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.ts::IllustratedMessageDirectionType",
|
|
138
|
+
"referenceLocation": "IllustratedMessageDirectionType"
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
},
|
|
@@ -29,7 +29,7 @@ export class MgLoader {
|
|
|
29
29
|
* @returns HTML Element
|
|
30
30
|
*/
|
|
31
31
|
render() {
|
|
32
|
-
return (h("div", { key: '
|
|
32
|
+
return (h("div", { key: '739b4cbacd8a8da056dbb1445c40fac2cf26766a', class: "mg-c-loader", "aria-live": "polite" }, h("mg-icon", { key: '95d3cbf26fcd6dbf0dad4853bf55aa66385f1aba', icon: "loader", spin: true }), h("span", { key: 'f6322cd3054d8976bd2ec24f86a2d6bb60ca7ae1', class: { 'mg-u-visually-hidden': this.messageHide } }, this.message || this.messages.loader.inProgress)));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "mg-loader"; }
|
|
35
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -86,9 +86,9 @@ export class MgMessage {
|
|
|
86
86
|
* @returns HTML Element
|
|
87
87
|
*/
|
|
88
88
|
render() {
|
|
89
|
-
return (h("div", { key: '
|
|
89
|
+
return (h("div", { key: 'f99bf527eb2c6005eeaec11f89aaa08f8865ea57', class: this.classCollection.join() }, h("mg-card", { key: 'beede3cd97b022d947c216b6bba454a104ba5790', shadow: true }, this.variantStyle === 'bar-left' && h("span", { key: '515828d725a996c9d57b39ad75e9373150a1b78a', class: "mg-c-message__bar" }), h("span", { key: '02ae41c66af25c2611b9b6cb8c87a1ad99346fa3', class: "mg-c-message__icon" }, h("mg-icon", { key: '3eadb40ed0dfa5ec51155608a67769c5fee3d402', icon: this.getIcon() })), h("div", { key: 'b832251e8f330d00b512bcd508ae9bf6e5f511cb', class: "mg-c-message__content" }, h("span", { key: 'c3520fc49bd5c3c187a83823050ceb9ca8c12d46', class: "mg-c-message__content-slot" }, h("slot", { key: 'f4064dff9536cbb76e45c5c4c1a89621da9531b2' })), this.hasActions && [
|
|
90
90
|
h("span", { class: "mg-c-message__content-separator", key: "content-separator" }),
|
|
91
|
-
h("span", { class: "mg-c-message__content-actions-slot", key: "content-actions-slot" }, h("slot", { key: '
|
|
91
|
+
h("span", { class: "mg-c-message__content-actions-slot", key: "content-actions-slot" }, h("slot", { key: '5585f7c14c2c3896cfdb5319414cd82f4d4b3a8b', name: "actions" })),
|
|
92
92
|
]))));
|
|
93
93
|
}
|
|
94
94
|
static get is() { return "mg-message"; }
|
|
@@ -115,7 +115,8 @@ export class MgMessage {
|
|
|
115
115
|
"VariantType": {
|
|
116
116
|
"location": "import",
|
|
117
117
|
"path": "./mg-message.conf",
|
|
118
|
-
"id": "src/components/molecules/mg-message/mg-message.conf.ts::VariantType"
|
|
118
|
+
"id": "src/components/molecules/mg-message/mg-message.conf.ts::VariantType",
|
|
119
|
+
"referenceLocation": "VariantType"
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
122
|
},
|
|
@@ -141,7 +142,8 @@ export class MgMessage {
|
|
|
141
142
|
"VariantStyleType": {
|
|
142
143
|
"location": "import",
|
|
143
144
|
"path": "./mg-message.conf",
|
|
144
|
-
"id": "src/components/molecules/mg-message/mg-message.conf.ts::VariantStyleType"
|
|
145
|
+
"id": "src/components/molecules/mg-message/mg-message.conf.ts::VariantStyleType",
|
|
146
|
+
"referenceLocation": "VariantStyleType"
|
|
145
147
|
}
|
|
146
148
|
}
|
|
147
149
|
},
|
|
@@ -106,11 +106,11 @@ export class MgModal {
|
|
|
106
106
|
* @returns HTML Element
|
|
107
107
|
*/
|
|
108
108
|
render() {
|
|
109
|
-
return (h("dialog", { key: '
|
|
109
|
+
return (h("dialog", { key: '2d99322fd3c80b8cbfea70589cf579e0c1c6f06b', role: this.dialogRole, id: this.identifier, class: this.classCollection.join(), "aria-labelledby": this.titleId, ref: (el) => {
|
|
110
110
|
if (el !== null) {
|
|
111
111
|
this.dialog = el;
|
|
112
112
|
}
|
|
113
|
-
} }, h("mg-card", { key: '
|
|
113
|
+
} }, h("mg-card", { key: '32692a6d41ef30b3d3e61ddcfea47350d374ed09', shadow: true }, h("div", { key: 'c87bb43bb069671b65a9759ee293e77975707597', class: "mg-c-modal__dialog" }, h("header", { key: '1272a946878efcf8c69f3b09852ba6938cbe31b0', class: "mg-c-modal__header" }, this.closeButton && (h("span", { key: '0704656c7c5ac4c8d405f2cd673e91f72763ee8f', class: "mg-c-modal__close-button" }, h("mg-button", { key: '4402971c763ee34145de5bd69d367fde68f9d1a2', "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { key: '9e16add6a3e387971507a252671c895b6c94a586', icon: "cross" })))), h("h1", { key: '3e4fc2b4419398528565d382b728b8b752758ddd', class: "mg-c-modal__title", id: this.titleId }, this.modalTitle)), h("article", { key: '170ff6bd9592687baa4c561615f540ad1c7400e4', class: "mg-c-modal__content" }, h("slot", { key: 'cb710e2a57e4c997deac367169b56047af1200b1' })), this.hasActions && (h("footer", { key: '1e08d67caeaaaf75eb97faa11528719ea537c24c', class: "mg-c-modal__footer" }, h("slot", { key: '461ec8e4117477aef08dc6d346ad0bf6007ec12d', name: "actions" })))))));
|
|
114
114
|
}
|
|
115
115
|
static get is() { return "mg-modal"; }
|
|
116
116
|
static get encapsulation() { return "shadow"; }
|
|
@@ -156,7 +156,8 @@ export class MgModal {
|
|
|
156
156
|
"DialogRoleType": {
|
|
157
157
|
"location": "import",
|
|
158
158
|
"path": "./mg-modal.conf",
|
|
159
|
-
"id": "src/components/molecules/mg-modal/mg-modal.conf.ts::DialogRoleType"
|
|
159
|
+
"id": "src/components/molecules/mg-modal/mg-modal.conf.ts::DialogRoleType",
|
|
160
|
+
"referenceLocation": "DialogRoleType"
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
163
|
},
|
|
@@ -279,7 +279,8 @@ export class MgPagination {
|
|
|
279
279
|
"PaginationMessagesType": {
|
|
280
280
|
"location": "import",
|
|
281
281
|
"path": "./mg-pagination.conf",
|
|
282
|
-
"id": "src/components/molecules/mg-pagination/mg-pagination.conf.ts::PaginationMessagesType"
|
|
282
|
+
"id": "src/components/molecules/mg-pagination/mg-pagination.conf.ts::PaginationMessagesType",
|
|
283
|
+
"referenceLocation": "PaginationMessagesType"
|
|
283
284
|
}
|
|
284
285
|
}
|
|
285
286
|
},
|
|
@@ -224,7 +224,7 @@ export class MgPanel {
|
|
|
224
224
|
*/
|
|
225
225
|
render() {
|
|
226
226
|
const headerId = `${this.identifier}-header`;
|
|
227
|
-
return (h("section", { key: '
|
|
227
|
+
return (h("section", { key: '3662204d763051c34ea13de4b7b3f7abc7914b81', class: this.classCollection.join(), id: this.identifier }, h("mg-card", { key: '46f113258172b1d040f65a4d312554b0c0551489', shadow: this.shadow }, h("header", { key: '1d7e7a48a5c4f89d141a5a7e46b220d4f9c082a5', class: { 'mg-c-panel__header': true, 'mg-c-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { key: 'ab0aec831cc79d982b7556d6e245c80ae2979083', class: "mg-c-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", { key: 'e831573fe9d5ff783073d123b7e2a54baad73bfc' })))));
|
|
228
228
|
}
|
|
229
229
|
static get is() { return "mg-panel"; }
|
|
230
230
|
static get encapsulation() { return "shadow"; }
|
|
@@ -347,7 +347,8 @@ export class MgPanel {
|
|
|
347
347
|
"TitlePositionType": {
|
|
348
348
|
"location": "import",
|
|
349
349
|
"path": "./mg-panel.conf",
|
|
350
|
-
"id": "src/components/molecules/mg-panel/mg-panel.conf.ts::TitlePositionType"
|
|
350
|
+
"id": "src/components/molecules/mg-panel/mg-panel.conf.ts::TitlePositionType",
|
|
351
|
+
"referenceLocation": "TitlePositionType"
|
|
351
352
|
}
|
|
352
353
|
}
|
|
353
354
|
},
|
|
@@ -393,7 +394,8 @@ export class MgPanel {
|
|
|
393
394
|
"ExpandToggleDisplayType": {
|
|
394
395
|
"location": "import",
|
|
395
396
|
"path": "./mg-panel.conf",
|
|
396
|
-
"id": "src/components/molecules/mg-panel/mg-panel.conf.ts::ExpandToggleDisplayType"
|
|
397
|
+
"id": "src/components/molecules/mg-panel/mg-panel.conf.ts::ExpandToggleDisplayType",
|
|
398
|
+
"referenceLocation": "ExpandToggleDisplayType"
|
|
397
399
|
}
|
|
398
400
|
}
|
|
399
401
|
},
|
package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js
CHANGED
|
@@ -46,7 +46,7 @@ export class MgPopoverContent {
|
|
|
46
46
|
* @returns HTML Element
|
|
47
47
|
*/
|
|
48
48
|
render() {
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '054fc82954b39a488f7fe5cb391d89b5fa4a61fe' }, h("mg-card", { key: 'bb89bada37069b50295bd93d988667c3b85eada3', class: this.classCollection.join(), shadow: true }, this.closeButton && (h("mg-button", { key: 'a59d6610574b964be1e2ce34ccd8e31c1395b6ff', "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { key: '5bcc9e4eb21396f4fc66a6f1e4d6c5cdf68ec1f4', icon: "cross" }))), h("div", { key: '57be2022f3b61220e1249faeaf2acee9960027fe', class: "mg-c-popover-content__title" }, h("slot", { key: 'c7870e86a9f105cf6b9d4520c77874bce9235d72', name: "title" })), h("slot", { key: '5af8462232625d9c7d694bab46351d5e646f62ca', name: "content" })), h("slot", { key: '599863410dd7d751e82c440cd6c4fb7f2c48d9f3', name: "arrow" })));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "mg-popover-content"; }
|
|
52
52
|
static get encapsulation() { return "shadow"; }
|
|
@@ -242,7 +242,7 @@ export class MgPopover {
|
|
|
242
242
|
* @returns HTML Element
|
|
243
243
|
*/
|
|
244
244
|
render() {
|
|
245
|
-
return (h(Host, { key: '
|
|
245
|
+
return (h(Host, { key: '2c1506b8e2da100519aeeae75fc5c378a81c473c' }, h("slot", { key: 'f9aea885e8cbc168614c05761829f0a0740eba9e' }), h("slot", { key: 'fa6106a660a73b3761d4783f8d46d401c47b4eb6', name: "content" })));
|
|
246
246
|
}
|
|
247
247
|
static get is() { return "mg-popover"; }
|
|
248
248
|
static get encapsulation() { return "shadow"; }
|
|
@@ -288,7 +288,8 @@ export class MgPopover {
|
|
|
288
288
|
"Placement": {
|
|
289
289
|
"location": "import",
|
|
290
290
|
"path": "@popperjs/core",
|
|
291
|
-
"id": "../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/index.d.ts::Placement"
|
|
291
|
+
"id": "../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/index.d.ts::Placement",
|
|
292
|
+
"referenceLocation": "Placement"
|
|
292
293
|
}
|
|
293
294
|
}
|
|
294
295
|
},
|
|
@@ -65,7 +65,7 @@ export class MgProgress {
|
|
|
65
65
|
* @returns HTML Element
|
|
66
66
|
*/
|
|
67
67
|
render() {
|
|
68
|
-
return (h(Host, { key: '
|
|
68
|
+
return (h(Host, { key: '8e6c727e9416fa777fd94b32d618a9137e8e08f7', role: this.ariaRole, "aria-label": this.label, "aria-valuenow": this.value, "aria-valuemin": this.min, "aria-valuemax": this.max }, h("div", { key: 'ac42ee9c5dda55d70aad7391895e4a013aaa27f9', class: "mg-c-progress" }, h("div", { key: '34c77bc6c133bc59b9daa68d7d6c8534f13f7d37', class: { 'mg-c-progress__bar': true, 'mg-c-progress__bar--active': this.value > this.min } }, h("div", { key: '7ea03a3f0c54ca0c81616c7c070d178a510dd7e1', class: "mg-c-progress__fill", style: {
|
|
69
69
|
width: `${Math.round(((this.value - this.min) / (this.max - this.min)) * 100)}%`,
|
|
70
70
|
} })))));
|
|
71
71
|
}
|
|
@@ -112,7 +112,8 @@ export class MgProgress {
|
|
|
112
112
|
"AriaRoleType": {
|
|
113
113
|
"location": "import",
|
|
114
114
|
"path": "./mg-progress.conf",
|
|
115
|
-
"id": "src/components/molecules/mg-progress/mg-progress.conf.ts::AriaRoleType"
|
|
115
|
+
"id": "src/components/molecules/mg-progress/mg-progress.conf.ts::AriaRoleType",
|
|
116
|
+
"referenceLocation": "AriaRoleType"
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
},
|
|
@@ -36,7 +36,7 @@ export class MgSkipLinks {
|
|
|
36
36
|
* @returns HTML Element
|
|
37
37
|
*/
|
|
38
38
|
render() {
|
|
39
|
-
return (h("nav", { key: '
|
|
39
|
+
return (h("nav", { key: '5bf4427662bdca6512969bee91aa03f43a126743', class: "mg-c-skip-links", role: "navigation", "aria-label": this.messages.skipLinks.navLabel }, h("ul", { key: '1d2b2a56b3960f70a3d37b333c77bf686643e0fd', 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)))))));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "mg-skip-links"; }
|
|
42
42
|
static get encapsulation() { return "shadow"; }
|
|
@@ -62,7 +62,8 @@ export class MgSkipLinks {
|
|
|
62
62
|
"SkipLink": {
|
|
63
63
|
"location": "import",
|
|
64
64
|
"path": "./mg-skip-links.conf",
|
|
65
|
-
"id": "src/components/molecules/mg-skip-links/mg-skip-links.conf.tsx::SkipLink"
|
|
65
|
+
"id": "src/components/molecules/mg-skip-links/mg-skip-links.conf.tsx::SkipLink",
|
|
66
|
+
"referenceLocation": "SkipLink"
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
},
|
|
@@ -295,7 +295,8 @@ export class MgTable {
|
|
|
295
295
|
"TableSizeType": {
|
|
296
296
|
"location": "import",
|
|
297
297
|
"path": "./mg-table.conf",
|
|
298
|
-
"id": "src/components/molecules/mg-table/mg-table.conf.ts::TableSizeType"
|
|
298
|
+
"id": "src/components/molecules/mg-table/mg-table.conf.ts::TableSizeType",
|
|
299
|
+
"referenceLocation": "TableSizeType"
|
|
299
300
|
}
|
|
300
301
|
}
|
|
301
302
|
},
|
|
@@ -361,7 +362,8 @@ export class MgTable {
|
|
|
361
362
|
"ColumnsType": {
|
|
362
363
|
"location": "import",
|
|
363
364
|
"path": "./mg-table.conf",
|
|
364
|
-
"id": "src/components/molecules/mg-table/mg-table.conf.ts::ColumnsType"
|
|
365
|
+
"id": "src/components/molecules/mg-table/mg-table.conf.ts::ColumnsType",
|
|
366
|
+
"referenceLocation": "ColumnsType"
|
|
365
367
|
}
|
|
366
368
|
}
|
|
367
369
|
},
|
|
@@ -223,7 +223,7 @@ export class MgTabs {
|
|
|
223
223
|
* @returns HTML Element
|
|
224
224
|
*/
|
|
225
225
|
render() {
|
|
226
|
-
return (h("div", { key: '
|
|
226
|
+
return (h("div", { key: 'c58c255ddffc83ad6d911d37f626bcadaea61747', class: this.classCollection.join() }, h("header", { key: 'ba6d581a4a8bc4338d6341372c267a28df882113', role: "tablist", "aria-label": this.label, class: "mg-c-tabs__header" }, this.tabs.map((tab, index) => (h("button", { key: tab.label, role: "tab", id: this.getElementId(this.identifier, index), class: {
|
|
227
227
|
[`${this.buttonTabBaseClass}`]: true,
|
|
228
228
|
[`${this.buttonTabBaseClass}--horizontal`]: true,
|
|
229
229
|
[`${this.getNavigationButtonClass(Status.ACTIVE)}`]: this.tabHasStatus(tab, Status.ACTIVE),
|
|
@@ -314,7 +314,8 @@ export class MgTabs {
|
|
|
314
314
|
"TabItem": {
|
|
315
315
|
"location": "import",
|
|
316
316
|
"path": "./mg-tabs.conf",
|
|
317
|
-
"id": "src/components/molecules/mg-tabs/mg-tabs.conf.ts::TabItem"
|
|
317
|
+
"id": "src/components/molecules/mg-tabs/mg-tabs.conf.ts::TabItem",
|
|
318
|
+
"referenceLocation": "TabItem"
|
|
318
319
|
}
|
|
319
320
|
}
|
|
320
321
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
class t{classes;constructor(t=[]){this.classes=t}add=t=>{this.has(t)||this.classes.push(t)};delete=t=>{const s=this.classes.indexOf(t);s>-1&&this.classes.splice(s,1)};has=t=>this.classes.includes(t);join=()=>this.classes.join(" ")}const s=t=>"object"==typeof t&&!Array.isArray(t)&&null!==t,e=(t,r,i)=>{if(!s(t)||"string"!=typeof r)return i;const[n,...o]=r.split(".");return o.length?e(t[n],o.join("."),i):t[n]??i},r=t=>Array.isArray(t)&&t.every((t=>"string"==typeof t)),i=t=>"string"==typeof t&&""!==t.trim(),n=t=>"object"==typeof t?JSON.stringify(t):String(t),o=t=>"string"==typeof t?t.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):t,a=(t="",s=10)=>{const e=new Uint8Array(s);crypto.getRandomValues(e);const r=Array.from(e).map((t=>t.toString(16).padStart(2,"0"))).join("").slice(0,s);return""!==t?`${t}-${r}`:r},h=t=>i(t)&&null!==/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(t),f=t=>{let e;return"string"==typeof t?e=t:Boolean(t)&&"object"==typeof t&&(s(t)||Array.isArray(t))?e=JSON.stringify(t):null!=t&&"boolean"!=typeof t&&"object"!=typeof t&&(e=String(t)),e?e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((t,s)=>(s>0?"-":"")+t.toLowerCase())).replace(/[^a-z0-9-]+/g,"-").replace(/--+/g,"-").replace(/(?:^-)|(?:-$)/g,""):e},u=async t=>{if(t)return t()},c={FIRST:"first",NEXT:"next",PREVIOUS:"previous",LAST:"last"};class y{items=[];total;top=10;next;baseIndex=1;constructor(t){if(!s(t))throw new Error("Page - init must match IPage type.");Array.isArray(t.items)&&(this.items=t.items),"number"==typeof t.top&&(this.top=t.top),this.total="number"==typeof t.total?t.total:this.items.length,this.next=t.next}getIndexFromCursor=(t="first",s)=>{if(!Array.isArray(this.items)||!this.items.length)return null;const e=this.items.length-this.baseIndex;let r,i=0;if(["previous","next"].includes(t)&&s){const t=this.items.findIndex((t=>JSON.stringify(t)===JSON.stringify(s)));if(-1===t)return 0;i=t}return r="first"===t?0:"last"===t?e:"previous"===t?JSON.stringify(this.items[i])===JSON.stringify(this.items[0])?e:i-this.baseIndex:"next"===t?JSON.stringify(this.items[i])===JSON.stringify(this.items[e])?0:i+this.baseIndex:0,r}}class p{items=[];#t=10;#s;#e;constructor(t,e){Array.isArray(t)&&(this.items=t),e&&(["string","function"].includes(typeof e.next)||s(e.next)&&URL.canParse(e.next))&&(this.#s=e.next),"number"==typeof e?.top&&(this.#t=e.top),"number"==typeof e?.total&&(this.#e=e.total)}getPage=(t=0,s)=>{const e="function"==typeof s?this.items.filter(s):this.items;let r;return this.#s?r=this.#s:e.length>t+this.#t&&(r=()=>this.getPage(t+this.#t,s)),new y({items:e.slice(t,t+this.#t),total:this.#e,top:this.#t,next:r})}}const l=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,g=t=>t.toISOString().split("T")[0],b=(t,s)=>s.includes(t?.tagName.toLowerCase()),m='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',S=t=>"number"==typeof t&&!Number.isNaN(t),d=t=>[t,...x(t),...A(t)],x=(t,s=[])=>{if(t.self!==t.top)try{const e=t.parent;return e?(s.push(e),x(e,s)):s}catch(t){return console.error("Different hosts between iframes:",t),s}return s},A=(t,s=[])=>{if(t.frames.length>0)for(const e of Array.from(t.frames))s.push(e),A(e,s);return s};export{t as C,p as P,h as a,b,a as c,r as d,c as e,f,d as g,
|
|
1
|
+
class t{classes;constructor(t=[]){this.classes=t}add=t=>{this.has(t)||this.classes.push(t)};delete=t=>{const s=this.classes.indexOf(t);s>-1&&this.classes.splice(s,1)};has=t=>this.classes.includes(t);join=()=>this.classes.join(" ")}const s=t=>"object"==typeof t&&!Array.isArray(t)&&null!==t,e=(t,r,i)=>{if(!s(t)||"string"!=typeof r)return i;const[n,...o]=r.split(".");return o.length?e(t[n],o.join("."),i):t[n]??i},r=t=>Array.isArray(t)&&t.every((t=>"string"==typeof t)),i=t=>"string"==typeof t&&""!==t.trim(),n=t=>"object"==typeof t?JSON.stringify(t):String(t),o=t=>"string"==typeof t?t.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):t,a=(t="",s=10)=>{const e=new Uint8Array(s);crypto.getRandomValues(e);const r=Array.from(e).map((t=>t.toString(16).padStart(2,"0"))).join("").slice(0,s);return""!==t?`${t}-${r}`:r},h=t=>i(t)&&null!==/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(t),f=t=>{let e;return"string"==typeof t?e=t:Boolean(t)&&"object"==typeof t&&(s(t)||Array.isArray(t))?e=JSON.stringify(t):null!=t&&"boolean"!=typeof t&&"object"!=typeof t&&(e=String(t)),e?e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((t,s)=>(s>0?"-":"")+t.toLowerCase())).replace(/[^a-z0-9-]+/g,"-").replace(/--+/g,"-").replace(/(?:^-)|(?:-$)/g,""):e},u=async t=>{if(t)return t()},c={FIRST:"first",NEXT:"next",PREVIOUS:"previous",LAST:"last"};class y{items=[];total;top=10;next;baseIndex=1;constructor(t){if(!s(t))throw new Error("Page - init must match IPage type.");Array.isArray(t.items)&&(this.items=t.items),"number"==typeof t.top&&(this.top=t.top),this.total="number"==typeof t.total?t.total:this.items.length,this.next=t.next}getIndexFromCursor=(t="first",s)=>{if(!Array.isArray(this.items)||!this.items.length)return null;const e=this.items.length-this.baseIndex;let r,i=0;if(["previous","next"].includes(t)&&s){const t=this.items.findIndex((t=>JSON.stringify(t)===JSON.stringify(s)));if(-1===t)return 0;i=t}return r="first"===t?0:"last"===t?e:"previous"===t?JSON.stringify(this.items[i])===JSON.stringify(this.items[0])?e:i-this.baseIndex:"next"===t?JSON.stringify(this.items[i])===JSON.stringify(this.items[e])?0:i+this.baseIndex:0,r}}class p{items=[];#t=10;#s;#e;constructor(t,e){Array.isArray(t)&&(this.items=t),e&&(["string","function"].includes(typeof e.next)||s(e.next)&&URL.canParse(e.next))&&(this.#s=e.next),"number"==typeof e?.top&&(this.#t=e.top),"number"==typeof e?.total&&(this.#e=e.total)}getPage=(t=0,s)=>{const e="function"==typeof s?this.items.filter(s):this.items;let r;return this.#s?r=this.#s:e.length>t+this.#t&&(r=()=>this.getPage(t+this.#t,s)),new y({items:e.slice(t,t+this.#t),total:this.#e,top:this.#t,next:r})}}const l=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,g=t=>t.toISOString().split("T")[0],b=(t,s)=>s.includes(t?.tagName.toLowerCase()),m='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',S=t=>"number"==typeof t&&!Number.isNaN(t),d=t=>[t,...x(t),...A(t)],x=(t,s=[])=>{if(t.self!==t.top)try{const e=t.parent;return e?(s.push(e),x(e,s)):s}catch(t){return console.error("Different hosts between iframes:",t),s}return s},A=(t,s=[])=>{if(t.frames.length>0)for(const e of Array.from(t.frames))s.push(e),A(e,s);return s};export{t as C,p as P,h as a,b,a as c,r as d,c as e,y as f,d as g,e as h,i,s as j,f as k,m as l,l as m,u as n,g as o,S as p,o as q,n as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as t,proxyCustomElement as e,HTMLElement as i,h as o,Host as s}from"@stencil/core/internal/client";import{c as a,t as r}from"./index2.js";import{d as n,a as m,S as c}from"./mg-menu-item2.js";import{i as d}from"./index3.js";import{d as p}from"./mg-badge2.js";import{d as h}from"./mg-button2.js";import{d as l}from"./mg-card2.js";import{d as g}from"./mg-divider2.js";import{d as v}from"./mg-icon2.js";import{b as u,d as b}from"./mg-item-more2.js";import{d as f}from"./mg-popover2.js";import{d as y}from"./mg-popover-content2.js";const k=t=>"object"==typeof t&&t.every((t=>"object"==typeof t&&"string"==typeof t.label&&"function"==typeof t.mouseEventHandler||E(t))),E=t=>"object"==typeof t&&t.isDivider,j=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.name="mg-action-more",this.classBase="mg-c-action-more",this.mgPopoverIdentifier=a(this.name),this.button={variant:"flat",isIcon:!0},this.displayChevron=!1,this.expanded=!1,this.toggleExpanded=()=>{this.expanded=!this.expanded},this.handleDisplayChange=t=>{this.expanded=t.detail},this.handleButton=()=>{this.toggleExpanded()},this.handleItemClick=(t,e)=>{this.expanded=!1,e(t)}}validateItems(t){if(!k(t))throw Error(`<${this.name}> prop "items" is required and all values must be the same type, MgActionMoreItemType or MgActionMoreDividerType. Passed value: ${r(t)}.`);if(k(t)&&t.length>0&&(E(t[0])||E(t[t.length-1])))throw Error(`<${this.name}> prop "items" can’t have a divider at the beginning or the end of the array. Passed value: ${r(t)}.`)}validateIcon(t){if(t&&!(t=>"object"==typeof t&&"string"==typeof t.icon)(t))throw Error(`<${this.name}> prop "icon" must match MgActionMoreIconType. Passed value: ${r(t)}.`);void 0===(null==t?void 0:t.icon)&&this.button.isIcon&&(this.icon={icon:"ellipsis"})}validateButton(t){if(t&&!(t=>"object"==typeof t&&"string"==typeof t.variant&&"boolean"==typeof t.isIcon)(t))throw Error(`<${this.name}> prop "button" must match MgActionMoreButtonType. Passed value: ${r(t)}.`)}validateDisplayChevron(t){if(t&&!0===this.button.isIcon)throw Error(`<${this.name}> prop "displayChevron" can't be used with a 'button" prop "isIcon" attribute.`)}componentWillLoad(){this.messages=d(this.element).messages.actionMore,this.validateItems(this.items),this.validateButton(this.button),this.validateIcon(this.icon),this.validateDisplayChevron(this.displayChevron)}render(){const t=this.button.label||this.messages.label,e=[t];return!this.button.isIcon&&this.displayChevron&&e.push(o("span",{class:{[this.classBase+"__chevron"]:!0,[this.classBase+"__chevron--rotate"]:!0===this.expanded}},o("mg-icon",{icon:"chevron-down"}))),o(s,{key:"
|
|
1
|
+
import{transformTag as t,proxyCustomElement as e,HTMLElement as i,h as o,Host as s}from"@stencil/core/internal/client";import{c as a,t as r}from"./index2.js";import{d as n,a as m,S as c}from"./mg-menu-item2.js";import{i as d}from"./index3.js";import{d as p}from"./mg-badge2.js";import{d as h}from"./mg-button2.js";import{d as l}from"./mg-card2.js";import{d as g}from"./mg-divider2.js";import{d as v}from"./mg-icon2.js";import{b as u,d as b}from"./mg-item-more2.js";import{d as f}from"./mg-popover2.js";import{d as y}from"./mg-popover-content2.js";const k=t=>"object"==typeof t&&t.every((t=>"object"==typeof t&&"string"==typeof t.label&&"function"==typeof t.mouseEventHandler||E(t))),E=t=>"object"==typeof t&&t.isDivider,j=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.name="mg-action-more",this.classBase="mg-c-action-more",this.mgPopoverIdentifier=a(this.name),this.button={variant:"flat",isIcon:!0},this.displayChevron=!1,this.expanded=!1,this.toggleExpanded=()=>{this.expanded=!this.expanded},this.handleDisplayChange=t=>{this.expanded=t.detail},this.handleButton=()=>{this.toggleExpanded()},this.handleItemClick=(t,e)=>{this.expanded=!1,e(t)}}validateItems(t){if(!k(t))throw Error(`<${this.name}> prop "items" is required and all values must be the same type, MgActionMoreItemType or MgActionMoreDividerType. Passed value: ${r(t)}.`);if(k(t)&&t.length>0&&(E(t[0])||E(t[t.length-1])))throw Error(`<${this.name}> prop "items" can’t have a divider at the beginning or the end of the array. Passed value: ${r(t)}.`)}validateIcon(t){if(t&&!(t=>"object"==typeof t&&"string"==typeof t.icon)(t))throw Error(`<${this.name}> prop "icon" must match MgActionMoreIconType. Passed value: ${r(t)}.`);void 0===(null==t?void 0:t.icon)&&this.button.isIcon&&(this.icon={icon:"ellipsis"})}validateButton(t){if(t&&!(t=>"object"==typeof t&&"string"==typeof t.variant&&"boolean"==typeof t.isIcon)(t))throw Error(`<${this.name}> prop "button" must match MgActionMoreButtonType. Passed value: ${r(t)}.`)}validateDisplayChevron(t){if(t&&!0===this.button.isIcon)throw Error(`<${this.name}> prop "displayChevron" can't be used with a 'button" prop "isIcon" attribute.`)}componentWillLoad(){this.messages=d(this.element).messages.actionMore,this.validateItems(this.items),this.validateButton(this.button),this.validateIcon(this.icon),this.validateDisplayChevron(this.displayChevron)}render(){const t=this.button.label||this.messages.label,e=[t];return!this.button.isIcon&&this.displayChevron&&e.push(o("span",{class:{[this.classBase+"__chevron"]:!0,[this.classBase+"__chevron--rotate"]:!0===this.expanded}},o("mg-icon",{icon:"chevron-down"}))),o(s,{key:"184355435ec346d682c2df4aa8b33bf5f54e77e7","data-mg-popover-guard":this.mgPopoverIdentifier},o("span",{key:"8176489e5dd7741311745d015b8ef7f2a4f63ea9",class:this.classBase},o("mg-popover",{key:"3ee64b21556ee9e910939ad2fc9e3fbf8e4bd964",identifier:this.mgPopoverIdentifier,display:this.expanded,"onDisplay-change":this.handleDisplayChange},o("mg-button",{key:"cf8f7f4f736d6a8338a4f6eebce04b4e2be49825",variant:this.button.variant,isIcon:this.button.isIcon,disabled:this.button.disabled,type:"button",label:t,onClick:this.handleButton},this.icon&&o("mg-icon",Object.assign({key:"ee8b4f13bac85ccdd5e9d72edbaa957054c304ec"},this.icon)),!this.button.isIcon&&e),o("div",{key:"1c78fb9a98d59fa5422c5105ecb13d2f2884c7d2",slot:"content"},o("mg-menu",{key:"522d915d4a38529f7709640bb96eebb81ccc86af",direction:m.VERTICAL,label:this.messages.label},this.items.map((t=>{var e,i;return E(t)?o("mg-divider",{class:"mg-c-action-more__divider",key:"divider","full-width":!0}):o("mg-menu-item",{key:t.label,status:t.status||c.VISIBLE,target:t.target,href:t.href,onClick:e=>this.handleItemClick(e,t.mouseEventHandler)},(null===(e=t.icon)||void 0===e?void 0:e.icon)&&o("mg-icon",{icon:t.icon.icon,variant:t.icon.variant,variantStyle:t.icon.variantStyle,slot:"image"}),o("span",{slot:"label"},t.label),(null===(i=t.badge)||void 0===i?void 0:i.label)&&o("mg-badge",{label:t.badge.label,value:t.badge.value,slot:"information",variant:"text-color"}))})))))))}get element(){return this}static get watchers(){return{items:[{validateItems:0}],icon:[{validateIcon:0}],button:[{validateButton:0}],displayChevron:[{validateDisplayChevron:0}]}}static get style(){return".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host{--mg-c-popover-spacing-vertical:var(--mg-b-size-4);--mg-c-popover-spacing-horizontal:0;--mg-c-popover-max-width:unset;--mg-c-popover-overflow:hidden}.mg-c-action-more__divider{--mg-c-divider-spacing-vertical:0.2rem}.mg-c-action-more__chevron{transition:200ms}.mg-c-action-more__chevron--rotate.mg-c-action-more__chevron{transform:rotate(180deg)}.mg-c-action-more mg-menu-item{--mg-c-menu-item-button-margin-horizontal:var(--mg-b-size-4)}"}},[1,"mg-action-more",{items:[16],icon:[1040],button:[16],displayChevron:[4,"display-chevron"],expanded:[32]},void 0,{items:[{validateItems:0}],icon:[{validateIcon:0}],button:[{validateButton:0}],displayChevron:[{validateDisplayChevron:0}]}]);function w(){"undefined"!=typeof customElements&&["mg-action-more","mg-badge","mg-button","mg-card","mg-divider","mg-icon","mg-item-more","mg-menu","mg-menu-item","mg-popover","mg-popover-content"].forEach((e=>{switch(e){case"mg-action-more":customElements.get(t(e))||customElements.define(t(e),j);break;case"mg-badge":customElements.get(t(e))||p();break;case"mg-button":customElements.get(t(e))||h();break;case"mg-card":customElements.get(t(e))||l();break;case"mg-divider":customElements.get(t(e))||g();break;case"mg-icon":customElements.get(t(e))||v();break;case"mg-item-more":customElements.get(t(e))||b();break;case"mg-menu":customElements.get(t(e))||u();break;case"mg-menu-item":customElements.get(t(e))||n();break;case"mg-popover":customElements.get(t(e))||f();break;case"mg-popover-content":customElements.get(t(e))||y()}}))}w();const _=j,I=w;export{_ as MgActionMore,I as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as t,proxyCustomElement as s,HTMLElement as e,createEvent as i,forceUpdate as a,h as o}from"@stencil/core/internal/client";import{C as n,t as r}from"./index2.js";import{i as h}from"./index3.js";import{d as c}from"./mg-button2.js";import{d as m}from"./mg-card2.js";import{d as l}from"./mg-icon2.js";import{d}from"./mg-message2.js";const
|
|
1
|
+
import{transformTag as t,proxyCustomElement as s,HTMLElement as e,createEvent as i,forceUpdate as a,h as o}from"@stencil/core/internal/client";import{C as n,t as r}from"./index2.js";import{i as h}from"./index3.js";import{d as c}from"./mg-button2.js";import{d as m}from"./mg-card2.js";import{d as l}from"./mg-icon2.js";import{d as u}from"./mg-message2.js";const d=["info","warning","success","danger"],g=["bar-left","background"],f=s(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.componentShow=i(this,"component-show",3),this.componentHide=i(this,"component-hide",3),this.componentClose=i(this,"component-close",3),this.classCloseButton="mg-c-alert--close-button",this.storedTimer=null,this.isFocused=!1,this.isHovered=!1,this.variant="info",this.variantStyle="bar-left",this.classCollection=new n(["mg-c-alert"]),this.hasActions=!1,this.setTimer=()=>{this.storedTimer=setTimeout((()=>this.element.hidden=!0),1e3*this.delay)},this.clearTimer=()=>{clearTimeout(this.storedTimer)},this.timerEvents=t=>{this.clearTimer();const s="mouseenter"===t.type;this[s?"isHovered":"isFocused"]=!0,this.element.addEventListener(s?"mouseleave":"focusout",(t=>{this["mouseleave"===t.type?"isHovered":"isFocused"]=!1,this.isFocused||this.isHovered||this.setTimer()}),{once:!0})},this.handleClose=()=>{this.element.hidden=!0,this.componentClose.emit()}}watchDelay(t){if(void 0!==t&&t<2)throw Error(`<mg-alert> prop "delay" must be greater than 2 seconds. Passed value: ${r(t)}.`)}watchVariant(t){if(t&&!d.includes(t))throw Error(`<mg-alert> prop "variant" must be one of: ${d.join(", ")}. Passed value: ${r(t)}.`)}watchVariantStyle(t){if(t&&!g.includes(t))throw Error(`<mg-alert> prop "variantStyle" must be one of: ${g.join(", ")}. Passed value: ${r(t)}.`)}watchHidden(t){"string"==typeof t&&""===t&&(t=!0),t?(this.componentHide.emit(),["focusin","mouseenter"].forEach((t=>{this.element.removeEventListener(t,this.timerEvents)})),this.clearTimer()):(this.componentShow.emit(),this.delay>1&&(this.setTimer(),["focusin","mouseenter"].forEach((t=>{this.element.addEventListener(t,this.timerEvents)})))),a(this)}componentWillLoad(){this.messages=h(this.element).messages,this.watchVariant(this.variant),this.watchVariantStyle(this.variantStyle),this.watchDelay(this.delay),this.watchHidden(this.element.hidden),this.hasActions=null!==this.element.querySelector('[slot="actions"]'),this.hasActions||this.classCollection.add(this.classCloseButton)}render(){return o("mg-message",{key:"9041d8643bf4d0d44f20d30ac3c1d9aa46d6e060",class:this.classCollection.join(),role:["info","success"].includes(this.variant)?"status":"alert",variant:this.variant,variantStyle:this.variantStyle},o("slot",{key:"94d1a430e9af605fa2ea2b557e82fc15f1cc148b"}),this.hasActions?o("span",{slot:"actions"},o("slot",{name:"actions"})):o("span",{class:"mg-c-alert__close-button"},o("mg-button",{"is-icon":!0,variant:"flat",label:this.messages.alert.closeButton,onClick:this.handleClose},o("mg-icon",{icon:"cross"}))))}get element(){return this}static get watchers(){return{delay:[{watchDelay:0}],variant:[{watchVariant:0}],variantStyle:[{watchVariantStyle:0}],hidden:[{watchHidden:0}]}}static get style(){return".mg-c-alert__close-button{position:absolute;top:0;right:0}.mg-c-alert.mg-c-alert--close-button{--mg-c-card-spacing:0 var(--mg-b-size-min-height) 0 0}"}},[257,"mg-alert",{delay:[2],variant:[1],variantStyle:[1,"variant-style"],classCollection:[32],hasActions:[32]},void 0,{delay:[{watchDelay:0}],variant:[{watchVariant:0}],variantStyle:[{watchVariantStyle:0}],hidden:[{watchHidden:0}]}]);function p(){"undefined"!=typeof customElements&&["mg-alert","mg-button","mg-card","mg-icon","mg-message"].forEach((s=>{switch(s){case"mg-alert":customElements.get(t(s))||customElements.define(t(s),f);break;case"mg-button":customElements.get(t(s))||c();break;case"mg-card":customElements.get(t(s))||m();break;case"mg-icon":customElements.get(t(s))||l();break;case"mg-message":customElements.get(t(s))||u()}}))}p();const b=f,y=p;export{b as MgAlert,y as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as e,proxyCustomElement as t,HTMLElement as r,h as i}from"@stencil/core/internal/client";import{i as a}from"./index3.js";import{t as s,i as m}from"./index2.js";import{d as c}from"./mg-icon2.js";const n=t(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}validateItems(e){if(void 0===e||!(e=>Array.isArray(e)&&e.length>0&&e.every(((t,r)=>"object"==typeof t&&null!==t&&m(t.label)&&(r===e.length-1||m(t.href)))))(e))throw Error(`<mg-breadcrumb> prop "items" is required and all values must be the same type, BreadcrumbItemType. Passed value: ${s(e)}.`)}renderItem(e,t){return m(e.href)?i("a",{href:e.href,"aria-label":void 0!==e.icon?e.label:void 0,"aria-current":t?"page":void 0},void 0!==e.icon?i("mg-icon",{icon:e.icon}):e.label):i("span",null,e.label)}componentWillLoad(){this.validateItems(this.items),this.messages=a(this.element).messages.breadcrumb}render(){return i("nav",{key:"
|
|
1
|
+
import{transformTag as e,proxyCustomElement as t,HTMLElement as r,h as i}from"@stencil/core/internal/client";import{i as a}from"./index3.js";import{t as s,i as m}from"./index2.js";import{d as c}from"./mg-icon2.js";const n=t(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}validateItems(e){if(void 0===e||!(e=>Array.isArray(e)&&e.length>0&&e.every(((t,r)=>"object"==typeof t&&null!==t&&m(t.label)&&(r===e.length-1||m(t.href)))))(e))throw Error(`<mg-breadcrumb> prop "items" is required and all values must be the same type, BreadcrumbItemType. Passed value: ${s(e)}.`)}renderItem(e,t){return m(e.href)?i("a",{href:e.href,"aria-label":void 0!==e.icon?e.label:void 0,"aria-current":t?"page":void 0},void 0!==e.icon?i("mg-icon",{icon:e.icon}):e.label):i("span",null,e.label)}componentWillLoad(){this.validateItems(this.items),this.messages=a(this.element).messages.breadcrumb}render(){return i("nav",{key:"af5c541e6a268af67762eb9d384269511fe0be17","aria-label":this.messages.label,class:"mg-c-breadcrumb"},i("ol",{key:"b5fdfe61eb2c826b3462bdd65cacfb73d4f00484",class:"mg-c-breadcrumb__list"},this.items.map(((e,t)=>{var r;return i("li",{key:`${t}-${null!==(r=e.href)&&void 0!==r?r:e.label}`,class:"mg-c-breadcrumb__list-item"},this.renderItem(e,t===this.items.length-1))}))))}get element(){return this}static get watchers(){return{items:[{validateItems:0}]}}static get style(){return'a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}.mg-c-breadcrumb{display:block}.mg-c-breadcrumb__list{padding:0;margin:0;list-style:none}.mg-c-breadcrumb__list-item{display:inline;color:var(--mg-b-color-dark);font-weight:700}.mg-c-breadcrumb__list-item:not(:last-child)::after{content:"/";font-weight:600;margin-inline:var(--mg-b-size-8)}.mg-c-breadcrumb__list-item:has(mg-icon) a{padding:var(--mg-b-size-4);margin:calc(var(--mg-b-size-4)*-1)}.mg-c-breadcrumb__list-item mg-icon{margin-block-start:.2rem;vertical-align:top}'}},[1,"mg-breadcrumb",{items:[16]},void 0,{items:[{validateItems:0}]}]);function o(){"undefined"!=typeof customElements&&["mg-breadcrumb","mg-icon"].forEach((t=>{switch(t){case"mg-breadcrumb":customElements.get(e(t))||customElements.define(e(t),n);break;case"mg-icon":customElements.get(e(t))||c()}}))}o();const l=n,d=o;export{l as MgBreadcrumb,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as e,proxyCustomElement as t,HTMLElement as i,createEvent as a,h as s}from"@stencil/core/internal/client";import{i as n}from"./index2.js";import{d as m}from"./mg-icon2.js";const o=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expandedChange=a(this,"expanded-change",7),this.hideSummary=!1,this.expanded=!1,this.handleToggle=()=>{this.expanded=this.details.open}}validateTitles(e){if(!n(e))throw Error(`<mg-details> prop "toggleClosed" and "toggleOpened" is required and must be a valid string. Passed value: "toggleClosed='${this.toggleClosed}'" and "toggleOpened='${this.toggleOpened}'".`)}handleExpanded(e){this.expandedChange.emit(e)}componentWillLoad(){this.validateTitles(this.toggleClosed),this.validateTitles(this.toggleOpened);const e=this.element.querySelector('[slot="summary"]');this.isEmptySummary=null===e||!n(e.textContent),this.element.addEventListener("click",(e=>{null!==e.target.closest('[slot="summary"] mg-button, mg-button[slot="summary"]')&&e.preventDefault()}))}render(){return s("details",{key:"
|
|
1
|
+
import{transformTag as e,proxyCustomElement as t,HTMLElement as i,createEvent as a,h as s}from"@stencil/core/internal/client";import{i as n}from"./index2.js";import{d as m}from"./mg-icon2.js";const o=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expandedChange=a(this,"expanded-change",7),this.hideSummary=!1,this.expanded=!1,this.handleToggle=()=>{this.expanded=this.details.open}}validateTitles(e){if(!n(e))throw Error(`<mg-details> prop "toggleClosed" and "toggleOpened" is required and must be a valid string. Passed value: "toggleClosed='${this.toggleClosed}'" and "toggleOpened='${this.toggleOpened}'".`)}handleExpanded(e){this.expandedChange.emit(e)}componentWillLoad(){this.validateTitles(this.toggleClosed),this.validateTitles(this.toggleOpened);const e=this.element.querySelector('[slot="summary"]');this.isEmptySummary=null===e||!n(e.textContent),this.element.addEventListener("click",(e=>{null!==e.target.closest('[slot="summary"] mg-button, mg-button[slot="summary"]')&&e.preventDefault()}))}render(){return s("details",{key:"bbaac6909fa5f3fbd3236b2a8ace0f7c80b2580b",class:{"mg-c-details":!0,"mg-c-details--empty-summary":this.isEmptySummary},onToggle:this.handleToggle,open:this.expanded,ref:e=>this.details=e},s("summary",{key:"2ed8228b63403dd9b386bf3fa70c9094516b6f0e"},s("slot",{key:"5461d77d2b2869b14737a5c7cfc40a1f9584ee03",name:"summary"}),s("span",{key:"bb089365bdeaa7b934b97cff6f5f7c67587048e1",class:"mg-c-details__toggle"},s("mg-icon",{key:"dc1a30338703ad4182d50f9953a903ae0f68ecb1",icon:"chevron-up",class:{"mg-c-details__toggle-icon":!0,"mg-c-details__toggle-icon--reverse":!this.expanded}}),s("span",{key:"a32cbaf9e38b71540deeaa8980895c34a7288ecb",class:{"mg-u-visually-hidden":this.hideSummary}},this.expanded?this.toggleOpened:this.toggleClosed))),s("div",{key:"b9c2bc7d681da8ac8b4dec5ff25287bc68975fb6",class:"mg-c-details__details"},s("slot",{key:"069f05b4c133ff13055681e0b05bb98744303137",name:"details"})))}get element(){return this}static get watchers(){return{toggleClosed:[{validateTitles:0}],toggleOpened:[{validateTitles:0}],expanded:[{handleExpanded:0}]}}static get style(){return".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-details summary{display:inline-flex;align-items:baseline;cursor:pointer;gap:var(--mg-b-size-16)}.mg-c-details summary::-webkit-details-marker{display:none}.mg-c-details.mg-c-details--empty-summary summary{gap:unset}.mg-c-details__toggle{display:flex;min-height:calc(var(--mg-b-font-size)*var(--mg-b-line-height));flex-shrink:0;align-items:center;align-self:flex-start;gap:var(--mg-b-size-4)}.mg-c-details__toggle-icon.mg-c-details__toggle-icon--reverse{transform:rotate(180deg)}.mg-c-details__details{margin-top:var(--mg-c-details-spacing)}@media (width < 43.75rem){.mg-c-details:not(.mg-c-details--empty-summary) .mg-c-details__toggle>span{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}}"}},[257,"mg-details",{toggleClosed:[1,"toggle-closed"],toggleOpened:[1,"toggle-opened"],hideSummary:[4,"hide-summary"],expanded:[1028]},void 0,{toggleClosed:[{validateTitles:0}],toggleOpened:[{validateTitles:0}],expanded:[{handleExpanded:0}]}]);function l(){"undefined"!=typeof customElements&&["mg-details","mg-icon"].forEach((t=>{switch(t){case"mg-details":customElements.get(e(t))||customElements.define(e(t),o);break;case"mg-icon":customElements.get(e(t))||m()}}))}l();const r=o,d=l;export{r as MgDetails,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as t,proxyCustomElement as e,HTMLElement as i,h as s}from"@stencil/core/internal/client";import{C as o,i as n}from"./index2.js";import{i as d,c as a}from"./mg-input.conf.js";import{d as l}from"./mg-icon2.js";import{d as r}from"./mg-input2.js";import{d as h}from"./mg-input-title2.js";import{d as
|
|
1
|
+
import{transformTag as t,proxyCustomElement as e,HTMLElement as i,h as s}from"@stencil/core/internal/client";import{C as o,i as n}from"./index2.js";import{i as d,c as a}from"./mg-input.conf.js";import{d as l}from"./mg-icon2.js";import{d as r}from"./mg-input2.js";import{d as h}from"./mg-input-title2.js";import{d as c}from"./mg-tooltip2.js";import{d as m}from"./mg-tooltip-content2.js";const p=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.name=this.identifier,this.legendHide=!1,this.legendBorderDisplay=!1,this.readonly=!1,this.disabled=!1,this.classCollection=new o(["mg-c-input--fieldset"]),this.checkValidity=()=>{var t;this.valid=!(this.mgInputs.some((t=>t.invalid))||(null===(t=this.errorMessage)||void 0===t?void 0:t.length)>0)},this.setMgInputs=()=>{this.mgInputs=Array.from(this.element.querySelectorAll("*")).filter((t=>t.nodeName.startsWith("MG-INPUT"))),this.mgInputs.forEach((t=>{"MG-INPUT-FILE"===t.nodeName&&(this.readonly?t.setAttribute("hidden",""):t.removeAttribute("hidden")),this.readonly&&!d(t)?t.readonly=!0:this.disabled?t.disabled=!0:t.addEventListener("input-valid",this.checkValidity)}))}}watchLegendBorderDisplay(t){if(t&&!n(this.legendHeading))throw Error('<mg-fieldset> prop "legendBorderDisplay" must not be paired with the prop "legendHeading".')}watchReadonly(t){t?this.classCollection.add(a):this.classCollection.delete(a)}handleAttributeChange(){this.setMgInputs()}async setCustomValidity(t){this.errorMessage=n(t)?t:void 0,this.checkValidity()}async displayError(){this.readonly||this.mgInputs.forEach((t=>{t.displayError()}))}componentWillLoad(){this.watchReadonly(this.readonly),this.watchLegendBorderDisplay(this.legendBorderDisplay),this.setMgInputs()}componentDidLoad(){const t={childList:!0,subtree:!0};new MutationObserver((e=>{e.some((e=>Object.keys(t).includes(e.type)))&&this.setMgInputs()})).observe(this.element,t)}render(){return s("mg-input",{key:"a32d9d6e0a77eddf6dac1c741066cb600c2f27b3",label:this.legend,identifier:this.identifier,class:this.classCollection.join(),labelOnTop:!this.legendHide,labelHeading:this.legendHeading,labelBorderDisplay:this.legendHeading&&this.legendBorderDisplay,labelHide:this.legendHide,inputsOnBottom:void 0!==this.legendHeading,tooltip:this.tooltip,tooltipPosition:"label",helpText:this.helpText,errorMessage:!this.valid&&n(this.errorMessage)?this.errorMessage:void 0},s("span",{key:"5d05e51fd64fc43458bccb3287fcf3a4fe462c00",class:"mg-c-input__input-group"},s("slot",{key:"d641e3007cdd2adfa6115f639603de78caa63202"})))}get element(){return this}static get watchers(){return{legendBorderDisplay:[{watchLegendBorderDisplay:0}],readonly:[{watchReadonly:0},{handleAttributeChange:0}],disabled:[{handleAttributeChange:0}]}}},[257,"mg-fieldset",{identifier:[1],name:[1],legend:[1],legendHide:[4,"legend-hide"],legendHeading:[1,"legend-heading"],legendBorderDisplay:[4,"legend-border-display"],readonly:[4],disabled:[4],tooltip:[1],helpText:[1,"help-text"],errorMessage:[32],valid:[32],classCollection:[32],setCustomValidity:[64],displayError:[64]},void 0,{legendBorderDisplay:[{watchLegendBorderDisplay:0}],readonly:[{watchReadonly:0},{handleAttributeChange:0}],disabled:[{handleAttributeChange:0}]}]);function g(){"undefined"!=typeof customElements&&["mg-fieldset","mg-icon","mg-input","mg-input-title","mg-tooltip","mg-tooltip-content"].forEach((e=>{switch(e){case"mg-fieldset":customElements.get(t(e))||customElements.define(t(e),p);break;case"mg-icon":customElements.get(t(e))||l();break;case"mg-input":customElements.get(t(e))||r();break;case"mg-input-title":customElements.get(t(e))||h();break;case"mg-tooltip":customElements.get(t(e))||c();break;case"mg-tooltip-content":customElements.get(t(e))||m()}}))}g();const u=p,f=g;export{u as MgFieldset,f as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as i,proxyCustomElement as t,HTMLElement as e,createEvent as s,h as
|
|
1
|
+
import{transformTag as i,proxyCustomElement as t,HTMLElement as e,createEvent as s,h as a}from"@stencil/core/internal/client";import{c as r,C as h,a as o,t as n}from"./index2.js";import{i as l}from"./index3.js";import{i as d}from"./mg-input.conf.js";const m=["form","search","none","presentation"],c=["default","hide"],u=t(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.formValid=s(this,"form-valid",7),this.formSubmit=s(this,"form-submit",7),this.formReset=s(this,"form-reset",7),this.classAllRequired="mg-c-form--all-required",this.classLabelOnTop="mg-c-form--label-on-top",this.identifier=r("mg-form"),this.name=this.identifier,this.readonly=!1,this.labelOnTop=!1,this.disabled=!1,this.classCollection=new h(["mg-c-form"]),this.setRequiredMessage=()=>{if(this.requiredMessageText=null,this.classCollection.delete(this.classAllRequired),"hide"===this.requiredMessage)return;if("default"===this.requiredMessage)return void(this.requiredMessageText=this.messages.form.required);const i=i=>!(i.disabled||i.readonly),t=i=>"MG-INPUT-TOGGLE"===i.nodeName;if(!this.disabled&&!this.readonly&&this.mgInputs.some((e=>i(e)&&!t(e)))){const e=this.mgInputs.filter(i),s=e.filter((i=>!t(i)&&i.required));[s.length,e.length].every((i=>1===i))||s.length>1&&s.length===e.filter((i=>!t(i))).length?(this.requiredMessageText=this.getRequiredMessageBasedOnCount(s,"allRequiredSingle","allRequired"),this.classCollection.add(this.classAllRequired)):s.length>0&&(this.requiredMessageText=this.getRequiredMessageBasedOnCount(s,"requiredSingle","required"))}},this.getRequiredMessageBasedOnCount=(i,t,e)=>this.messages.form[1===i.length?t:e],this.checkValidity=()=>{this.setRequiredMessage(),this.valid=!this.mgInputs.some((i=>i.invalid)),this.invalid=!this.valid,this.formValid.emit(this.valid)},this.handleFormSubmit=i=>{i.preventDefault(),this.formSubmit.emit()},this.setMgInputs=()=>{this.mgInputs=Array.from(this.element.querySelectorAll("*")).filter((i=>i.nodeName.startsWith("MG-INPUT"))),this.mgInputs.forEach((i=>{this.labelOnTop&&(i.labelOnTop=!0),"MG-INPUT-FILE"===i.nodeName&&(this.readonly?i.setAttribute("hidden",""):i.removeAttribute("hidden")),this.readonly&&!d(i)?i.readonly=!0:this.disabled?i.disabled=!0:i.addEventListener("input-valid",this.checkValidity)}))}}watchIdentifier(i){o(i)||console.error(`<mg-form> prop "identifier" value is invalid. Passed value: ${n(i)}.`)}validateRequiredMessage(i){if(i&&!c.includes(i))throw Error(`<mg-form> prop "requiredMessage" must be one of: ${c.join(", ")}. Passed value: ${n(i)}.`)}validateAriaRole(i){if(i&&!m.includes(i))throw Error(`<mg-form> prop "ariaRole" must be one of: ${m.join(", ")}. Passed value: ${n(i)}.`)}handlelabelOnTop(i){i?this.classCollection.add(this.classLabelOnTop):this.classCollection.delete(this.classLabelOnTop)}handleAttributeChange(){this.setMgInputs(),this.setRequiredMessage()}async displayError(){this.readonly||([...Array.from(this.element.querySelectorAll("*")).filter((i=>i.nodeName.startsWith("MG-FIELDSET"))),...this.mgInputs].forEach((i=>{var t;null===(t=i.displayError)||void 0===t||t.call(i)})),this.checkValidity())}async reset(){this.readonly||(await Promise.all(this.mgInputs.map((async i=>{void 0!==i.reset&&await i.reset()}))),this.checkValidity(),this.formReset.emit(!0))}componentWillLoad(){this.messages=l(this.element).messages,this.watchIdentifier(this.identifier),this.validateAriaRole(this.ariaRole),this.validateRequiredMessage(this.requiredMessage),this.handlelabelOnTop(this.labelOnTop),this.mgButtons=Array.from(this.element.querySelectorAll("mg-button")),this.mgButtons.forEach((i=>{i.setAttribute("form",this.identifier),"reset"===i.type&&i.addEventListener("click",(()=>{this.reset()}))})),this.setMgInputs(),Promise.all(this.mgInputs.map((async i=>{try{await i.componentOnReady()}catch(i){}}))).then((()=>{this.checkValidity()}))}componentDidLoad(){const i={childList:!0,subtree:!0};new MutationObserver((t=>{t.some((t=>Object.keys(i).includes(t.type)))&&(this.setMgInputs(),this.checkValidity())})).observe(this.element,i)}render(){return a("form",{key:"e528a49eba4e57f809dd0a6dd5462c2be3677da5",class:this.classCollection.join(),id:this.identifier,name:this.name,onSubmit:this.handleFormSubmit,role:this.ariaRole},this.requiredMessageText&&a("p",{key:"37eb0c30984b998ef8d78ff8ae74949c4761c21a",innerHTML:this.requiredMessageText}),a("slot",{key:"8ae80522118a3e87ca735545a48844c1e4e3ab30"}),!this.readonly&&!this.disabled&&a("slot",{key:"4cdeba849881f9753ff08df6c456397e859c6a0d",name:"actions"}))}get element(){return this}static get watchers(){return{identifier:[{watchIdentifier:0}],requiredMessage:[{validateRequiredMessage:0},{handleAttributeChange:0}],ariaRole:[{validateAriaRole:0}],labelOnTop:[{handlelabelOnTop:0}],readonly:[{handleAttributeChange:0}],disabled:[{handleAttributeChange:0}]}}static get style(){return".mg-u-form-legacy{--mg-c-form-inputs-title-width:calc(100% / 3 - 20px)}.mg-u-is-asterisk{color:var(--mg-b-color-danger)}.mg-c-form{--mg-c-input-title-width:var(--mg-c-form-inputs-title-width, calc(28 * var(--mg-b-size-8)));--mg-c-input-margin-bottom:var(--mg-b-size-16);--mg-c-input-title-horizontal-space:var(--mg-b-size-32)}.mg-c-form.mg-c-form--all-required{--mg-c-input-title-display:none}.mg-c-form.mg-c-form--label-on-top{--mg-c-input-margin-bottom:var(--mg-b-size-24)}.mg-c-form>p{font-size:var(--mg-b-font-size-small)}"}},[257,"mg-form",{identifier:[1],name:[1],readonly:[4],requiredMessage:[1,"required-message"],ariaRole:[1,"aria-role"],labelOnTop:[4,"label-on-top"],disabled:[4],valid:[1028],invalid:[1028],classCollection:[32],requiredMessageText:[32],displayError:[64],reset:[64]},void 0,{identifier:[{watchIdentifier:0}],requiredMessage:[{validateRequiredMessage:0},{handleAttributeChange:0}],ariaRole:[{validateAriaRole:0}],labelOnTop:[{handlelabelOnTop:0}],readonly:[{handleAttributeChange:0}],disabled:[{handleAttributeChange:0}]}]);function f(){"undefined"!=typeof customElements&&["mg-form"].forEach((t=>{"mg-form"===t&&(customElements.get(i(t))||customElements.define(i(t),u))}))}f();const g=u,b=f;export{g as MgForm,b as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as e,proxyCustomElement as s,HTMLElement as t,h as i}from"@stencil/core/internal/client";import{C as l,t as a,b as m}from"./index2.js";const r=["small","medium","large"],g=["vertical","horizontal"],
|
|
1
|
+
import{transformTag as e,proxyCustomElement as s,HTMLElement as t,h as i}from"@stencil/core/internal/client";import{C as l,t as a,b as m}from"./index2.js";const r=["small","medium","large"],g=["vertical","horizontal"],c=s(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.size="medium",this.direction="vertical",this.classCollection=new l(["mg-c-illustrated-message"])}watchSize(e,s){if(!r.includes(e))throw Error(`<mg-illustrated-message> prop "size" must be one of: ${r.join(", ")}. Passed value: ${a(e)}.`);void 0!==s&&this.classCollection.delete("mg-c-illustrated-message--size-"+s),this.classCollection.add("mg-c-illustrated-message--size-"+e)}watchDirection(e,s){if(void 0!==e&&!g.includes(e))throw Error(`<mg-illustrated-message> prop "direction" must be one of: ${g.join(", ")}. Passed value: ${a(e)}.`);"horizontal"===e?this.classCollection.add("mg-c-illustrated-message--direction-horizontal"):"horizontal"===s&&this.classCollection.delete("mg-c-illustrated-message--direction-horizontal")}validateSlots(){const e=["h1","h2","h3","h4","h5","h6"],s=this.element.querySelector('[slot="title"]'),t=this.element.querySelectorAll('[slot="illustration"]');if(0===this.element.querySelectorAll('[slot="details"]').length&&null===s)throw Error('<mg-illustrated-message> Slot "title" or "details" must be present.');if(null!==s&&!m(s,e))throw Error(`<mg-illustrated-message> Slotted title must be a heading: ${e.join(", ")}.`);if(1!==t.length)throw Error("<mg-illustrated-message> Slotted illustration must be present and unique.");t[0].setAttribute("aria-hidden","true")}componentWillLoad(){this.watchDirection(this.direction),this.watchSize(this.size),this.validateSlots()}render(){return i("div",{key:"c9d8c8bfd2792b1cf5e78ab9d168d597b20e9a1e",class:this.classCollection.join()},i("div",{key:"cc8fa03147b9e59e6e8e015be9ed2b8dddd92ded",class:"mg-c-illustrated-message__illustration"},i("slot",{key:"83a4ec2223c4e74511beb7c0abfa10e77cee425d",name:"illustration"})),i("div",{key:"dbb4d13ca5324cab889fa2acc9b9b22522d7a8ec",class:"mg-c-illustrated-message__slots"},i("slot",{key:"9e74d84becf29539ec9c37e8ad1e317714f3c86c",name:"title"}),i("slot",{key:"ae97d25c19b76ca092560d2555ebd6a87f542ffe",name:"details"})))}get element(){return this}static get watchers(){return{size:[{watchSize:0}],direction:[{watchDirection:0}]}}static get style(){return".mg-c-illustrated-message{display:flex;box-sizing:border-box;flex-direction:column;justify-content:center;padding:var(--mg-c-illustrated-message-spacing-vertical) var(--mg-b-size-16);margin:auto;gap:var(--mg-b-size-16) var(--mg-b-size-64);max-inline-size:calc(60*var(--mg-b-size-8));text-align:center}.mg-c-illustrated-message__illustration{max-block-size:calc(15*var(--mg-b-size-8))}.mg-c-illustrated-message__illustration ::slotted([slot=illustration]){block-size:auto;inline-size:100%;max-block-size:calc(15*var(--mg-b-size-8));max-inline-size:calc(15*var(--mg-b-size-8))}.mg-c-illustrated-message__slots{display:flex;flex-direction:column;gap:var(--mg-b-size-8)}.mg-c-illustrated-message__slots ::slotted([slot=title]){margin:0;font-family:var(--mg-b-font-family-heading) !important;font-size:var(--mg-b-font-size-h2) !important}.mg-c-illustrated-message__slots ::slotted([slot=details]){margin:0}.mg-c-illustrated-message.mg-c-illustrated-message--size-small{--mg-c-illustrated-message-spacing-vertical:var(--mg-b-size-24)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__slots{gap:calc(var(--mg-b-size-4)/2)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__illustration{max-block-size:var(--mg-b-size-64)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__illustration ::slotted([slot=illustration]){max-block-size:var(--mg-b-size-64);max-inline-size:var(--mg-b-size-64)}.mg-c-illustrated-message.mg-c-illustrated-message--size-large .mg-c-illustrated-message__illustration{max-block-size:calc(23*var(--mg-b-size-8))}.mg-c-illustrated-message.mg-c-illustrated-message--size-large .mg-c-illustrated-message__illustration ::slotted([slot=illustration]){max-block-size:calc(23*var(--mg-b-size-8));max-inline-size:calc(23*var(--mg-b-size-8))}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal{max-inline-size:unset}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__slots{max-inline-size:calc(60*var(--mg-b-size-8))}@container (width > 52.8rem){.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal{flex-direction:row;align-items:center;column-gap:var(--mg-b-size-48);text-align:left}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__slots{max-inline-size:unset}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__illustration{flex:1 0 auto;max-inline-size:fit-content}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal.mg-c-illustrated-message--size-small{column-gap:var(--mg-b-size-24)}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal.mg-c-illustrated-message--size-large{column-gap:var(--mg-b-size-64)}}:host{display:block;container-type:inline-size}"}},[257,"mg-illustrated-message",{size:[1],direction:[1],classCollection:[32]},void 0,{size:[{watchSize:0}],direction:[{watchDirection:0}]}]);function o(){"undefined"!=typeof customElements&&["mg-illustrated-message"].forEach((s=>{"mg-illustrated-message"===s&&(customElements.get(e(s))||customElements.define(e(s),c))}))}o();const n=c,d=o;export{n as MgIllustratedMessage,d as defineCustomElement}
|