@mgdis/mg-components 5.13.0 → 5.14.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-03d2557d.js → index-fede8ee2.js} +8 -33
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_32.cjs.entry.js +289 -97
- package/dist/cjs/mg-components.cjs.js +2 -2
- package/dist/cjs/mg-item-more.cjs.entry.js +2 -2
- package/dist/cjs/{mg-menu.conf-857748e1.js → mg-menu.conf-f9d0ddec.js} +12 -6
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +20 -6
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +7 -4
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +4 -4
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +2 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +1 -1
- package/dist/collection/components/molecules/mg-details/mg-details.css +3 -0
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.css +4 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +64 -36
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -2
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +3 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
- package/dist/collection/locales/fr/messages.json +12 -6
- package/dist/collection/styles/global.scss +0 -7
- package/dist/collection/utils/unit.test.utils.js +27 -0
- package/dist/components/index2.js +12 -6
- package/dist/components/mg-details.js +2 -2
- package/dist/components/mg-form.js +1 -1
- package/dist/components/mg-icon2.js +207 -44
- package/dist/components/mg-input-checkbox-paginated2.js +4 -4
- package/dist/components/mg-input-select2.js +2 -2
- package/dist/components/mg-input-title2.js +6 -5
- package/dist/components/mg-message.js +1 -1
- package/dist/components/mg-modal.js +64 -36
- package/dist/components/mg-pagination2.js +2 -2
- package/dist/components/mg-panel.js +2 -2
- package/dist/esm/{index-407d5211.js → index-1d40b052.js} +8 -33
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_32.entry.js +289 -97
- package/dist/esm/mg-components.js +3 -3
- package/dist/esm/mg-item-more.entry.js +2 -2
- package/dist/esm/{mg-menu.conf-c31828ca.js → mg-menu.conf-2cc079ae.js} +12 -6
- package/dist/mg-components/locales/fr/messages.json +12 -6
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-622e2323.js → p-067080e4.js} +1 -1
- package/dist/mg-components/p-3bf1e2f0.js +2 -0
- package/dist/mg-components/{p-d37b29bb.entry.js → p-4ae1130f.entry.js} +1 -1
- package/dist/mg-components/p-aa298e17.entry.js +1 -0
- package/dist/mg-components/styles/global.scss +0 -7
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +12 -3
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +1 -1
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +19 -1
- package/dist/types/locales/index.d.ts +12 -6
- package/dist/types/utils/components.utils.d.ts +3 -0
- package/dist/types/utils/unit.test.utils.d.ts +4 -4
- package/package.json +6 -5
- package/readme.md +20 -25
- package/dist/collection/styles/components.scss +0 -3
- package/dist/mg-components/p-3bf533f7.js +0 -2
- package/dist/mg-components/p-bda0b795.entry.js +0 -1
- package/dist/mg-components/styles/components.scss +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$2 } from './mg-icon2.js';
|
|
3
3
|
|
|
4
|
-
const mgDetailsCss = ".sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){.mg-a11y-animation{animation:none !important;transition:none !important}}.mg-details summary{display:flex;align-items:baseline;cursor:pointer}.mg-details__toggle{margin-left:1.5rem;flex-shrink:0;display:flex;align-items:center;align-self:flex-start;gap:0.6rem;min-height:calc(var(--font-size) * var(--line-height))}.mg-details__details{margin-top:var(--mg-details-spacing)}@media (width < 43.75rem){.mg-details__toggle>span{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}}";
|
|
4
|
+
const mgDetailsCss = ".sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){.mg-a11y-animation{animation:none !important;transition:none !important}}.mg-details summary{display:flex;align-items:baseline;cursor:pointer}.mg-details__toggle{margin-left:1.5rem;flex-shrink:0;display:flex;align-items:center;align-self:flex-start;gap:0.6rem;min-height:calc(var(--font-size) * var(--line-height))}.mg-details__toggle-icon.mg-details__toggle-icon--reverse{transform:rotate(180deg)}.mg-details__details{margin-top:var(--mg-details-spacing)}@media (width < 43.75rem){.mg-details__toggle>span{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}}";
|
|
5
5
|
|
|
6
6
|
const MgDetails$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -43,7 +43,7 @@ const MgDetails$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
43
43
|
* @returns HTML Element
|
|
44
44
|
*/
|
|
45
45
|
render() {
|
|
46
|
-
return (h("details", { class: "mg-details", onToggle: this.handleToggle, open: this.expanded, ref: el => (this.details = el) }, h("summary", null, h("slot", { name: "summary" }), h("span", { class: "mg-details__toggle" }, h("mg-icon", { icon:
|
|
46
|
+
return (h("details", { class: "mg-details", onToggle: this.handleToggle, open: this.expanded, ref: el => (this.details = el) }, h("summary", null, h("slot", { name: "summary" }), h("span", { class: "mg-details__toggle" }, h("mg-icon", { icon: "chevron-up", size: "small", class: { 'mg-details__toggle-icon': true, 'mg-details__toggle-icon--reverse': !this.expanded } }), h("span", { class: { 'sr-only': this.hideSummary } }, this.expanded ? this.toggleOpened : this.toggleClosed))), h("div", { class: "mg-details__details" }, h("slot", { name: "details" }))));
|
|
47
47
|
}
|
|
48
48
|
static get watchers() { return {
|
|
49
49
|
"toggleClosed": ["validateTitles"],
|
|
@@ -134,7 +134,7 @@ const MgForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
134
134
|
// submit buttons should trigger form submition;
|
|
135
135
|
if (['submit', null].includes(mgButton.getAttribute('type'))) {
|
|
136
136
|
mgButton.addEventListener('click', () => {
|
|
137
|
-
this.form.dispatchEvent(new SubmitEvent('submit', { bubbles: true }));
|
|
137
|
+
this.form.dispatchEvent(new SubmitEvent('submit', { bubbles: true, cancelable: true }));
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
});
|