@mgdis/mg-components 6.20.0 → 6.22.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-TUElr4Wv.js → index-BxB20_Vw.js} +54 -0
- package/dist/cjs/{index-Bp6wZzau.js → index-C2viYwrR.js} +1761 -80
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_37.cjs.entry.js +761 -371
- package/dist/cjs/mg-alert.cjs.entry.js +17 -9
- package/dist/cjs/mg-breadcrumb.cjs.entry.js +63 -0
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-fieldset.cjs.entry.js +24 -7
- package/dist/cjs/mg-input-combobox.cjs.entry.js +49 -19
- package/dist/cjs/mg-input-file.cjs.entry.js +384 -0
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +40096 -15821
- package/dist/cjs/{mg-input.conf-D7jmj_lh.js → mg-input.conf-BNpeATnq.js} +7 -0
- package/dist/cjs/mg-loader.cjs.entry.js +8 -6
- package/dist/cjs/mg-progress.cjs.entry.js +19 -9
- package/dist/collection/assets/icons/index.js +1 -1
- package/dist/collection/collection-manifest.json +5 -3
- package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +1 -1
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +1 -1
- package/dist/collection/components/atoms/mg-card/mg-card.js +1 -1
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +2 -2
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +6 -0
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +2 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +2 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +877 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +2 -2
- 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/editor/custom-properties.scss +212 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js +300 -94
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.js +29 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +163 -53
- 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 +3 -36
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.conf.js +0 -4
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +21 -43
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +65 -38
- 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-breadcrumb/mg-breadcrumb.conf.js +1 -0
- package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +92 -0
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +12 -3
- package/dist/collection/components/molecules/mg-form/mg-form.js +12 -2
- 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 +37 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +0 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +13 -33
- package/dist/collection/locales/en/messages.json +14 -0
- package/dist/collection/locales/fr/messages.json +14 -0
- package/dist/components/events.utils.js +1 -23
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -408
- package/dist/components/index3.js +1 -476
- package/dist/components/mg-action-more.js +1 -254
- package/dist/components/mg-alert.js +1 -224
- package/dist/components/mg-badge.js +1 -6
- package/dist/components/mg-badge2.js +1 -113
- package/dist/components/mg-breadcrumb.d.ts +11 -0
- package/dist/components/mg-breadcrumb.js +1 -0
- package/dist/components/mg-button.js +1 -6
- package/dist/components/mg-button2.js +1 -275
- package/dist/components/mg-card.js +1 -6
- package/dist/components/mg-card2.js +1 -92
- package/dist/components/mg-character-left.js +1 -6
- package/dist/components/mg-character-left2.js +1 -75
- package/dist/components/mg-details.js +1 -104
- package/dist/components/mg-divider.js +1 -6
- package/dist/components/mg-divider2.js +1 -49
- package/dist/components/mg-fieldset.js +1 -209
- package/dist/components/mg-form.js +1 -302
- package/dist/components/mg-icon.js +1 -6
- package/dist/components/mg-icon2.js +1 -188
- package/dist/components/mg-illustrated-message.js +1 -129
- package/dist/components/mg-input-checkbox-paginated.js +1 -6
- package/dist/components/mg-input-checkbox-paginated2.js +1 -135
- package/dist/components/mg-input-checkbox.js +1 -762
- package/dist/components/mg-input-combobox.js +1 -940
- package/dist/components/mg-input-date.js +1 -463
- package/dist/components/mg-input-file.d.ts +11 -0
- package/dist/components/mg-input-file.js +1 -0
- package/dist/components/mg-input-numeric.js +1 -592
- package/dist/components/mg-input-password.js +1 -360
- package/dist/components/mg-input-radio.js +1 -392
- package/dist/components/mg-input-rich-text-editor.js +1663 -16797
- package/dist/components/mg-input-select.js +1 -6
- package/dist/components/mg-input-select2.js +1 -481
- package/dist/components/mg-input-text.js +1 -6
- package/dist/components/mg-input-text2.js +1 -514
- package/dist/components/mg-input-textarea.js +1 -412
- package/dist/components/mg-input-title.js +1 -6
- package/dist/components/mg-input-title2.js +1 -81
- package/dist/components/mg-input-toggle.js +1 -371
- package/dist/components/mg-input.conf.js +1 -0
- package/dist/components/mg-input.js +1 -6
- package/dist/components/mg-input2.js +1 -459
- package/dist/components/mg-item-more.js +1 -6
- package/dist/components/mg-item-more2.js +1 -505
- package/dist/components/mg-loader.js +1 -6
- package/dist/components/mg-loader2.js +1 -74
- package/dist/components/mg-menu-item.js +1 -6
- package/dist/components/mg-menu-item2.js +1 -485
- package/dist/components/mg-menu.js +1 -6
- package/dist/components/mg-message.js +1 -6
- package/dist/components/mg-message2.js +1 -146
- package/dist/components/mg-modal.js +1 -184
- package/dist/components/mg-pagination.js +1 -234
- package/dist/components/mg-panel.js +1 -350
- package/dist/components/mg-popover-content.js +1 -6
- package/dist/components/mg-popover-content2.js +1 -96
- package/dist/components/mg-popover.js +1 -6
- package/dist/components/mg-popover2.js +1 -312
- package/dist/components/mg-progress.js +1 -123
- package/dist/components/mg-skip-links.js +1 -78
- package/dist/components/mg-table.js +1 -319
- package/dist/components/mg-tabs.js +1 -6
- package/dist/components/mg-tabs2.js +1 -315
- package/dist/components/mg-tag.js +1 -133
- package/dist/components/mg-tooltip-content.js +1 -6
- package/dist/components/mg-tooltip-content2.js +1 -42
- package/dist/components/mg-tooltip.js +1 -6
- package/dist/components/mg-tooltip2.js +1 -421
- package/dist/components/popper.js +1 -1790
- package/dist/esm/{index-BluNKQ3L.js → index-DFwaH2hS.js} +1761 -80
- package/dist/esm/{index-CNX6lq0x.js → index-DSEloqPn.js} +54 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_37.entry.js +761 -371
- package/dist/esm/mg-alert.entry.js +17 -9
- package/dist/esm/mg-breadcrumb.entry.js +61 -0
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-fieldset.entry.js +24 -7
- package/dist/esm/mg-input-combobox.entry.js +49 -19
- package/dist/esm/mg-input-file.entry.js +382 -0
- package/dist/esm/mg-input-rich-text-editor.entry.js +40083 -15808
- package/dist/esm/{mg-input.conf-DDnrE1hD.js → mg-input.conf-C9rmNQIL.js} +7 -1
- package/dist/esm/mg-loader.entry.js +8 -6
- package/dist/esm/mg-progress.entry.js +19 -9
- package/dist/mg-components/locales/en/messages.json +14 -0
- package/dist/mg-components/locales/fr/messages.json +14 -0
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-0482eb9f.entry.js +1 -0
- package/dist/mg-components/{p-7132bca1.entry.js → p-2ee92f38.entry.js} +1 -1
- package/dist/mg-components/{p-916dfb6d.entry.js → p-3b653226.entry.js} +1 -1
- package/dist/mg-components/p-5745fbea.entry.js +1 -0
- package/dist/mg-components/p-C9rmNQIL.js +1 -0
- package/dist/mg-components/p-DFwaH2hS.js +2 -0
- package/dist/mg-components/p-DSEloqPn.js +1 -0
- package/dist/mg-components/p-adec7fcc.entry.js +1 -0
- package/dist/mg-components/p-c63f97f0.entry.js +1658 -0
- package/dist/mg-components/p-c8c8cfc1.entry.js +1 -0
- package/dist/mg-components/p-cc793586.entry.js +1 -0
- package/dist/mg-components/p-d5e69c95.entry.js +1 -0
- package/dist/types/assets/icons/index.d.ts +2 -0
- package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +7 -1
- package/dist/types/components/molecules/inputs/mg-input-file/mg-input-file.d.ts +210 -0
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.d.ts +17 -0
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/index.d.ts +27 -19
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.d.ts +3 -0
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +50 -16
- package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.conf.d.ts +0 -5
- package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.d.ts +1 -6
- package/dist/types/components/molecules/menus/mg-menu/mg-menu.conf.d.ts +2 -10
- package/dist/types/components/molecules/menus/mg-menu/mg-menu.d.ts +7 -7
- package/dist/types/components/molecules/menus/mg-menu-item/mg-menu-item.d.ts +12 -8
- package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.conf.d.ts +18 -0
- package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.d.ts +34 -0
- package/dist/types/components/molecules/mg-table/mg-table.d.ts +6 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +1 -9
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +4 -4
- package/dist/types/components.d.ts +302 -46
- package/dist/types/stencil-public-runtime.d.ts +76 -12
- package/ide/intellij/web-types.json +483 -51
- package/ide/vscode/css-custom-data.json +10 -2
- package/ide/vscode/html-custom-data.json +445 -104
- package/package.json +24 -23
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.scss +0 -1
- package/dist/mg-components/p-016bd291.entry.js +0 -1
- package/dist/mg-components/p-186a6139.entry.js +0 -1
- package/dist/mg-components/p-BluNKQ3L.js +0 -2
- package/dist/mg-components/p-CNX6lq0x.js +0 -1
- package/dist/mg-components/p-DDnrE1hD.js +0 -1
- package/dist/mg-components/p-cd061b38.entry.js +0 -1
- package/dist/mg-components/p-d2c72f09.entry.js +0 -1
- package/dist/mg-components/p-d5a276eb.entry.js +0 -1
- package/ide/vscode/custom.css-data.json +0 -425
|
@@ -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: '516691c613b30edf92d43fb9596169459dd8058a', class: this.classCollection.join() }, h("mg-card", { key: '2be929dd6ed5458927b155d2f4c94fa15f9717e9', shadow: true }, this.variantStyle === 'bar-left' && h("span", { key: '604d5a7bd37abc571b40f8be09ac5dadbde69ec1', class: "mg-c-message__bar" }), h("span", { key: '837cce7c506997955de6efb4cffc53e5107fb602', class: "mg-c-message__icon" }, h("mg-icon", { key: '3fd70f747cad5605f129bec491aa1bfd5ea42a95', icon: this.getIcon() })), h("div", { key: 'bf0b166fee2c94014fc35980b06a45dfc91b8596', class: "mg-c-message__content" }, h("span", { key: '305f79545b87055a954831c7355e7685340d1aa6', class: "mg-c-message__content-slot" }, h("slot", { key: 'd25113f6305d8ceaa39d12672fecc4e4bf6ffb49' })), 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: '744098ecfdcc8bb5f5e0b913884126498c21d3f0', name: "actions" })),
|
|
92
92
|
]))));
|
|
93
93
|
}
|
|
94
94
|
static get is() { return "mg-message"; }
|
|
@@ -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: 'fe7c7abaf53fbc5c87d2855cc72de2212dfe8642', 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: '4b361ad45cd0b20253cf82e8f68c574429dd451c', shadow: true }, h("div", { key: '90f5490fb82f2900403f0a7549b338e884eea171', class: "mg-c-modal__dialog" }, h("header", { key: 'a58be90f41ad4448c387b1d18372aa31522d8d35', class: "mg-c-modal__header" }, this.closeButton && (h("span", { key: 'd9a0f9c1944b89b4a64f35fc9c1b70bea60f5423', class: "mg-c-modal__close-button" }, h("mg-button", { key: 'd7ecae6a2c2b2b094fea6b4a6d3c761f0f975b29', "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { key: '54b91decfd0deb5e452e03c23f68bac58d97677a', icon: "cross" })))), h("h1", { key: '7dc2519bdf97ebc5cc18505fbbd347c7b1a4c336', class: "mg-c-modal__title", id: this.titleId }, this.modalTitle)), h("article", { key: 'b6a27c0bb6e5a350e10addbd0325b04626b07239', class: "mg-c-modal__content" }, h("slot", { key: '41acebdafae6289d2f03fc3226eb7f3c4334e33f' })), this.hasActions && (h("footer", { key: '04a934a044bfbfa64f65642361e1962d2f599bf9', class: "mg-c-modal__footer" }, h("slot", { key: '8d72488a4095c245b638d7d0e5fdbda77fa5ab01', name: "actions" })))))));
|
|
114
114
|
}
|
|
115
115
|
static get is() { return "mg-modal"; }
|
|
116
116
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: 'e92b270e15717a1b6ab7d938674ccd785fe3ee97', class: this.classCollection.join(), id: this.identifier }, h("mg-card", { key: '40647ea277463f5e915c2fb5aa982f22527545ea', shadow: this.shadow }, h("header", { key: '604611af47d683cf1f0d3ffc8b5873be390e3fb9', class: { 'mg-c-panel__header': true, 'mg-c-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { key: 'ff640071dd4813aa113f5928b2a0350f4528a22c', class: "mg-c-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", { key: 'fe54d2ca332c573e8dfa782a3e72454501b47adf' })))));
|
|
228
228
|
}
|
|
229
229
|
static get is() { return "mg-panel"; }
|
|
230
230
|
static get encapsulation() { return "shadow"; }
|
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: '56962c792e0015e1b52f8121914829b7da136283' }, h("mg-card", { key: '05b557704fd10e1be87e1931fe672f5c29d3afc4', class: this.classCollection.join(), shadow: true }, this.closeButton && (h("mg-button", { key: 'd2fc38c5be7ea92d0d0efc36133d6c683baa4e68', "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { key: '5d2091d064f3908a291af3b90acaddc59e2b9268', icon: "cross" }))), h("div", { key: 'd599231cfe330cdbc73f4bf7553b2cc66baf4889', class: "mg-c-popover-content__title" }, h("slot", { key: 'fbb836bac9d9f5f2327ecba13ddc3b1cab974930', name: "title" })), h("slot", { key: 'bdb29d255f35931efa24be57c13c4303ba326778', name: "content" })), h("slot", { key: 'b09b667ea04096baaeac07fac9097a3a22335f2b', 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: '530971c84be3edae39c5aed0013d0c5b9005a1c1' }, h("slot", { key: '6e717bc8c5aa3d58fc048c4232e706cc78ab66ec' }), h("slot", { key: 'e779db01e55a28ffaedde21e9944f5ef3c79fa29', name: "content" })));
|
|
246
246
|
}
|
|
247
247
|
static get is() { return "mg-popover"; }
|
|
248
248
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: '02466f9df3e5204eef158b9f733ba0af811ad9ed', role: this.ariaRole, "aria-label": this.label, "aria-valuenow": this.value, "aria-valuemin": this.min, "aria-valuemax": this.max }, h("div", { key: '88c2eafe55d169502ef5afccfbde3371fee5165f', class: "mg-c-progress" }, h("div", { key: 'b46159dbed388c58b198bdc330096669c454bcd3', class: { 'mg-c-progress__bar': true, 'mg-c-progress__bar--active': this.value > this.min } }, h("div", { key: '0faebcc86cc7a55ccab3d9fb8dce4403bff16ebf', class: "mg-c-progress__fill", style: {
|
|
69
69
|
width: `${Math.round(((this.value - this.min) / (this.max - this.min)) * 100)}%`,
|
|
70
70
|
} })))));
|
|
71
71
|
}
|
|
@@ -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: 'b126d6fe3aa2553562fe18a0d4340205e178fbe0', class: "mg-c-skip-links", role: "navigation", "aria-label": this.messages.skipLinks.navLabel }, h("ul", { key: '1028704238d5119f67cf2e7a77282dec504bbc4f', 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"; }
|
|
@@ -53,6 +53,7 @@ export class MgTable {
|
|
|
53
53
|
this.componentClass = 'mg-c-table';
|
|
54
54
|
this.componentWrapperClass = 'mg-c-table-wrapper';
|
|
55
55
|
this.classFullWidth = 'mg-c-table--full-width';
|
|
56
|
+
this.classBorderHide = 'mg-c-table--border-hide';
|
|
56
57
|
// Alignment stylesheet
|
|
57
58
|
this.alignmentStylesheet = new CSSStyleSheet();
|
|
58
59
|
/**
|
|
@@ -63,6 +64,10 @@ export class MgTable {
|
|
|
63
64
|
* Define if table fits its parent element
|
|
64
65
|
*/
|
|
65
66
|
this.fullWidth = false;
|
|
67
|
+
/**
|
|
68
|
+
* Define if table has no outer border
|
|
69
|
+
*/
|
|
70
|
+
this.borderHide = false;
|
|
66
71
|
/**
|
|
67
72
|
* Class collection
|
|
68
73
|
*/
|
|
@@ -87,6 +92,14 @@ export class MgTable {
|
|
|
87
92
|
this.classCollection.delete(this.classFullWidth);
|
|
88
93
|
}
|
|
89
94
|
}
|
|
95
|
+
watchBorderHide(newValue) {
|
|
96
|
+
if (newValue) {
|
|
97
|
+
this.classCollection.add(this.classBorderHide);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
this.classCollection.delete(this.classBorderHide);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
90
103
|
watchColumns(newValue) {
|
|
91
104
|
if (newValue !== undefined && !isValidColumnsObject(newValue)) {
|
|
92
105
|
throw new Error(`<mg-table> prop "columns" must be a ColumnsType object. Passed value: ${toString(newValue)}.`);
|
|
@@ -248,6 +261,7 @@ export class MgTable {
|
|
|
248
261
|
componentDidLoad() {
|
|
249
262
|
this.watchSize(this.size);
|
|
250
263
|
this.watchFullWidth(this.fullWidth);
|
|
264
|
+
this.watchBorderHide(this.borderHide);
|
|
251
265
|
this.watchColumns(this.columns);
|
|
252
266
|
this.renderTable(this.element.querySelector('table'));
|
|
253
267
|
}
|
|
@@ -317,6 +331,26 @@ export class MgTable {
|
|
|
317
331
|
"attribute": "full-width",
|
|
318
332
|
"defaultValue": "false"
|
|
319
333
|
},
|
|
334
|
+
"borderHide": {
|
|
335
|
+
"type": "boolean",
|
|
336
|
+
"mutable": false,
|
|
337
|
+
"complexType": {
|
|
338
|
+
"original": "boolean",
|
|
339
|
+
"resolved": "boolean",
|
|
340
|
+
"references": {}
|
|
341
|
+
},
|
|
342
|
+
"required": false,
|
|
343
|
+
"optional": false,
|
|
344
|
+
"docs": {
|
|
345
|
+
"tags": [],
|
|
346
|
+
"text": "Define if table has no outer border"
|
|
347
|
+
},
|
|
348
|
+
"getter": false,
|
|
349
|
+
"setter": false,
|
|
350
|
+
"reflect": false,
|
|
351
|
+
"attribute": "border-hide",
|
|
352
|
+
"defaultValue": "false"
|
|
353
|
+
},
|
|
320
354
|
"columns": {
|
|
321
355
|
"type": "unknown",
|
|
322
356
|
"mutable": false,
|
|
@@ -355,6 +389,9 @@ export class MgTable {
|
|
|
355
389
|
}, {
|
|
356
390
|
"propName": "fullWidth",
|
|
357
391
|
"methodName": "watchFullWidth"
|
|
392
|
+
}, {
|
|
393
|
+
"propName": "borderHide",
|
|
394
|
+
"methodName": "watchBorderHide"
|
|
358
395
|
}, {
|
|
359
396
|
"propName": "columns",
|
|
360
397
|
"methodName": "watchColumns"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { createID, ClassList, allItemsAreString, isValidString, nextTick, toString, isValideID } from "@mgdis/core-ui-helpers/dist/utils";
|
|
3
|
-
import {
|
|
3
|
+
import { Status } from "./mg-tabs.conf";
|
|
4
4
|
import { Keys } from "../../../utils/events.utils";
|
|
5
5
|
/**
|
|
6
6
|
* type TabItem validation function
|
|
@@ -25,10 +25,6 @@ export class MgTabs {
|
|
|
25
25
|
* If not set, it will be created.
|
|
26
26
|
*/
|
|
27
27
|
this.identifier = createID('mg-tabs');
|
|
28
|
-
/**
|
|
29
|
-
* Define tabs size
|
|
30
|
-
*/
|
|
31
|
-
this.size = 'medium';
|
|
32
28
|
/**
|
|
33
29
|
* Component tabs
|
|
34
30
|
*/
|
|
@@ -160,12 +156,6 @@ export class MgTabs {
|
|
|
160
156
|
throw new Error(`<mg-tabs> prop "label" is required and must be a string. Passed value: ${toString(newValue)}.`);
|
|
161
157
|
}
|
|
162
158
|
}
|
|
163
|
-
validateSize(newValue) {
|
|
164
|
-
if (!sizes.includes(newValue)) {
|
|
165
|
-
throw new Error(`<mg-tabs> prop "size" must be one of: ${sizes.join(', ')}. Passed value: ${toString(newValue)}.`);
|
|
166
|
-
}
|
|
167
|
-
this.classCollection.add(`mg-c-tabs--size-${this.size}`);
|
|
168
|
-
}
|
|
169
159
|
validateItems(newValue) {
|
|
170
160
|
// String array
|
|
171
161
|
if (allItemsAreString(newValue))
|
|
@@ -214,7 +204,6 @@ export class MgTabs {
|
|
|
214
204
|
this.validateLabel(this.label);
|
|
215
205
|
this.validateItems(this.items);
|
|
216
206
|
this.validateActiveTab(this.activeTab);
|
|
217
|
-
this.validateSize(this.size);
|
|
218
207
|
this.validateSlots();
|
|
219
208
|
}
|
|
220
209
|
/**
|
|
@@ -234,13 +223,13 @@ export class MgTabs {
|
|
|
234
223
|
* @returns HTML Element
|
|
235
224
|
*/
|
|
236
225
|
render() {
|
|
237
|
-
return (h("div", { key: '
|
|
226
|
+
return (h("div", { key: 'c971ca94267dd64a173740d9d7a81c0ea00852b9', class: this.classCollection.join() }, h("header", { key: 'd160fdca50842a310fe2b710f8ffcc6f7cd1bd3d', role: "tablist", "aria-label": this.label, class: "mg-c-tabs__header" }, this.tabs.map((tab, index) => (h("button", { key: tab.label, role: "tab", id: this.getElementId(this.identifier, index), class: {
|
|
238
227
|
[`${this.buttonTabBaseClass}`]: true,
|
|
239
228
|
[`${this.buttonTabBaseClass}--horizontal`]: true,
|
|
240
229
|
[`${this.getNavigationButtonClass(Status.ACTIVE)}`]: this.tabHasStatus(tab, Status.ACTIVE),
|
|
241
230
|
[`${this.getNavigationButtonClass(Status.DISABLED)}`]: this.tabHasStatus(tab, Status.DISABLED),
|
|
242
231
|
[`${this.getNavigationButtonClass(Status.HIDDEN)}`]: this.tabHasStatus(tab, Status.HIDDEN),
|
|
243
|
-
}, tabindex: this.tabHasStatus(tab, Status.ACTIVE) ? 0 : -1, "aria-selected": this.tabHasStatus(tab, Status.ACTIVE).toString(), "aria-controls": this.getElementId(this.tabPanel, index), "aria-disabled": this.tabHasStatus(tab, Status.DISABLED), onClick: this.handleClick, onKeyDown: this.handleKeydown, "data-index": this.getTabItemIndex(index) }, tab.icon !== undefined && h("mg-icon", { icon: tab.icon }), tab.label, tab.badge !== undefined && h("mg-badge", { variant: "text-color", value: tab.badge.value, label: tab.badge.label, outline: tab.badge.role === 'information' }))))), this.tabs.map((tab, index) => (h("article", { key: tab.label, role: "tabpanel", id: this.getElementId(this.tabPanel, index), hidden: !this.tabHasStatus(tab, Status.ACTIVE), "aria-labelledby": this.getElementId(this.identifier, index), tabindex: this.tabHasStatus(tab, Status.ACTIVE) ? 0 : -1, class: "mg-c-tabs__content-container" }, h("slot", { name: this.getElementId('tab_content', index) }))))));
|
|
232
|
+
}, tabindex: this.tabHasStatus(tab, Status.ACTIVE) ? 0 : -1, "aria-selected": this.tabHasStatus(tab, Status.ACTIVE).toString(), "aria-controls": this.getElementId(this.tabPanel, index), "aria-disabled": this.tabHasStatus(tab, Status.DISABLED), onClick: this.handleClick, onKeyDown: this.handleKeydown, "data-index": this.getTabItemIndex(index) }, tab.icon !== undefined && h("mg-icon", { icon: tab.icon, size: "small" }), tab.label, tab.badge !== undefined && h("mg-badge", { variant: "text-color", value: tab.badge.value, label: tab.badge.label, outline: tab.badge.role === 'information' }))))), this.tabs.map((tab, index) => (h("article", { key: tab.label, role: "tabpanel", id: this.getElementId(this.tabPanel, index), hidden: !this.tabHasStatus(tab, Status.ACTIVE), "aria-labelledby": this.getElementId(this.identifier, index), tabindex: this.tabHasStatus(tab, Status.ACTIVE) ? 0 : -1, class: "mg-c-tabs__content-container" }, h("slot", { name: this.getElementId('tab_content', index) }))))));
|
|
244
233
|
}
|
|
245
234
|
static get is() { return "mg-tabs"; }
|
|
246
235
|
static get encapsulation() { return "shadow"; }
|
|
@@ -296,30 +285,24 @@ export class MgTabs {
|
|
|
296
285
|
"attribute": "label"
|
|
297
286
|
},
|
|
298
287
|
"size": {
|
|
299
|
-
"type": "
|
|
288
|
+
"type": "unknown",
|
|
300
289
|
"mutable": false,
|
|
301
290
|
"complexType": {
|
|
302
|
-
"original": "
|
|
303
|
-
"resolved": "
|
|
304
|
-
"references": {
|
|
305
|
-
"SizeType": {
|
|
306
|
-
"location": "import",
|
|
307
|
-
"path": "./mg-tabs.conf",
|
|
308
|
-
"id": "src/components/molecules/mg-tabs/mg-tabs.conf.ts::SizeType"
|
|
309
|
-
}
|
|
310
|
-
}
|
|
291
|
+
"original": "never",
|
|
292
|
+
"resolved": "never",
|
|
293
|
+
"references": {}
|
|
311
294
|
},
|
|
312
295
|
"required": false,
|
|
313
296
|
"optional": false,
|
|
314
297
|
"docs": {
|
|
315
|
-
"tags": [
|
|
316
|
-
|
|
298
|
+
"tags": [{
|
|
299
|
+
"name": "deprecated",
|
|
300
|
+
"text": "this prop is deprecated and will be removed in future releases. Please use CSS custom properties to set the size of tabs items."
|
|
301
|
+
}],
|
|
302
|
+
"text": "Size of the tabs items."
|
|
317
303
|
},
|
|
318
304
|
"getter": false,
|
|
319
|
-
"setter": false
|
|
320
|
-
"reflect": false,
|
|
321
|
-
"attribute": "size",
|
|
322
|
-
"defaultValue": "'medium'"
|
|
305
|
+
"setter": false
|
|
323
306
|
},
|
|
324
307
|
"items": {
|
|
325
308
|
"type": "unknown",
|
|
@@ -402,9 +385,6 @@ export class MgTabs {
|
|
|
402
385
|
}, {
|
|
403
386
|
"propName": "label",
|
|
404
387
|
"methodName": "validateLabel"
|
|
405
|
-
}, {
|
|
406
|
-
"propName": "size",
|
|
407
|
-
"methodName": "validateSize"
|
|
408
388
|
}, {
|
|
409
389
|
"propName": "items",
|
|
410
390
|
"methodName": "validateItems"
|
|
@@ -83,6 +83,17 @@
|
|
|
83
83
|
"url": "The value is incorrect, the expected format is https://example.com"
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
},
|
|
87
|
+
"file": {
|
|
88
|
+
"helpText": {
|
|
89
|
+
"accept": "Accepted extensions: {{accept}}",
|
|
90
|
+
"maxSize": "Maximum size: {{maxSize}}"
|
|
91
|
+
},
|
|
92
|
+
"errors": {
|
|
93
|
+
"maxSize": "The file size exceeds the maximum allowed size of {{maxSize}}"
|
|
94
|
+
},
|
|
95
|
+
"browse": "Browse…",
|
|
96
|
+
"deleteButton": "Delete file"
|
|
86
97
|
}
|
|
87
98
|
},
|
|
88
99
|
"form": {
|
|
@@ -111,6 +122,9 @@
|
|
|
111
122
|
"skipLinks": {
|
|
112
123
|
"navLabel": "Quick access"
|
|
113
124
|
},
|
|
125
|
+
"breadcrumb": {
|
|
126
|
+
"label": "Breadcrumb"
|
|
127
|
+
},
|
|
114
128
|
"general": {
|
|
115
129
|
"confirm": "Confirm",
|
|
116
130
|
"cancel": "Cancel",
|
|
@@ -83,6 +83,17 @@
|
|
|
83
83
|
"url": "La valeur est incorrecte, le format attendu est https://exemple.fr"
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
},
|
|
87
|
+
"file": {
|
|
88
|
+
"helpText": {
|
|
89
|
+
"accept": "Extensions autorisée : {{acceptedFormat}}",
|
|
90
|
+
"maxSize": "Taille maximale : {{maxSize}}"
|
|
91
|
+
},
|
|
92
|
+
"errors": {
|
|
93
|
+
"maxSize": "La taille du fichier dépasse la taille maximale autorisée de {{maxSize}}"
|
|
94
|
+
},
|
|
95
|
+
"browse": "Parcourir…",
|
|
96
|
+
"deleteButton": "Supprimer le fichier"
|
|
86
97
|
}
|
|
87
98
|
},
|
|
88
99
|
"form": {
|
|
@@ -111,6 +122,9 @@
|
|
|
111
122
|
"skipLinks": {
|
|
112
123
|
"navLabel": "Accès rapide"
|
|
113
124
|
},
|
|
125
|
+
"breadcrumb": {
|
|
126
|
+
"label": "Fil d'Ariane"
|
|
127
|
+
},
|
|
114
128
|
"general": {
|
|
115
129
|
"confirm": "Valider",
|
|
116
130
|
"cancel": "Annuler",
|
|
@@ -1,23 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Keyboard keys
|
|
3
|
-
*/
|
|
4
|
-
const Keys = {
|
|
5
|
-
TAB: 'Tab',
|
|
6
|
-
ENTER: 'Enter',
|
|
7
|
-
DOWN: 'Down',
|
|
8
|
-
UP: 'Up',
|
|
9
|
-
LEFT: 'Left',
|
|
10
|
-
RIGHT: 'Right',
|
|
11
|
-
ARROWDOWN: 'ArrowDown',
|
|
12
|
-
ARROWUP: 'ArrowUp',
|
|
13
|
-
ARROWRIGHT: 'ArrowRight',
|
|
14
|
-
ARROWLEFT: 'ArrowLeft',
|
|
15
|
-
HOME: 'Home',
|
|
16
|
-
END: 'End',
|
|
17
|
-
ESC: 'Esc',
|
|
18
|
-
ESCAPE: 'Escape',
|
|
19
|
-
NUMPADENTER: 'NumpadEnter',
|
|
20
|
-
SPACE: 'Space',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export { Keys as K };
|
|
1
|
+
const E={TAB:"Tab",ENTER:"Enter",DOWN:"Down",UP:"Up",LEFT:"Left",RIGHT:"Right",ARROWDOWN:"ArrowDown",ARROWUP:"ArrowUp",ARROWRIGHT:"ArrowRight",ARROWLEFT:"ArrowLeft",HOME:"Home",END:"End",ESC:"Esc",ESCAPE:"Escape",NUMPADENTER:"NumpadEnter",SPACE:"Space"};export{E as K}
|
|
@@ -31,3 +31,5 @@ export interface SetPlatformOptions {
|
|
|
31
31
|
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
32
32
|
}
|
|
33
33
|
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
34
|
+
|
|
35
|
+
export * from '../types';
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export{getAssetPath,render,setAssetPath,setNonce,setPlatformOptions}from"@stencil/core/internal/client";
|