@maggioli-design-system/mds-modal 6.3.0 → 6.4.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/loader.cjs.js +1 -1
- package/dist/cjs/mds-modal.cjs.entry.js +15 -5
- package/dist/cjs/mds-modal.cjs.js +1 -1
- package/dist/collection/common/number.js +5 -0
- package/dist/collection/common/unit.js +16 -1
- package/dist/collection/components/mds-modal/mds-modal.css +8 -1
- package/dist/collection/components/mds-modal/mds-modal.js +35 -3
- package/dist/collection/components/mds-modal/test/mds-modal.stories.js +10 -0
- package/dist/collection/dictionary/button.js +16 -1
- package/dist/components/mds-modal.js +18 -6
- package/dist/documentation.json +28 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mds-modal.entry.js +15 -5
- package/dist/esm/mds-modal.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-modal.entry.js +1 -1
- package/dist/esm-es5/mds-modal.js +1 -1
- package/dist/mds-modal/mds-modal.esm.js +1 -1
- package/dist/mds-modal/p-6a0cf4a1.system.entry.js +1 -0
- package/dist/mds-modal/p-c15fdaba.system.js +1 -1
- package/dist/mds-modal/p-c7a94334.entry.js +1 -0
- package/dist/stats.json +66 -16
- package/dist/types/common/number.d.ts +2 -0
- package/dist/types/common/unit.d.ts +3 -1
- package/dist/types/components/mds-modal/mds-modal.d.ts +5 -0
- package/dist/types/components/mds-modal/test/mds-modal.stories.d.ts +7 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/dictionary/button.d.ts +3 -1
- package/dist/types/type/button.d.ts +1 -0
- package/documentation.json +43 -2
- package/package.json +2 -2
- package/readme.md +3 -0
- package/src/common/number.ts +8 -0
- package/src/common/unit.ts +23 -0
- package/src/components/mds-modal/css/mds-modal-opened.css +1 -1
- package/src/components/mds-modal/css/mds-modal-position.css +6 -0
- package/src/components/mds-modal/css/mds-modal-window.css +1 -0
- package/src/components/mds-modal/mds-modal.tsx +14 -2
- package/src/components/mds-modal/readme.md +1 -0
- package/src/components/mds-modal/test/mds-modal.stories.tsx +11 -0
- package/src/components.d.ts +8 -0
- package/src/dictionary/button.ts +19 -0
- package/src/fixtures/icons.json +5 -0
- package/src/type/button.ts +11 -0
- package/www/build/mds-modal.esm.js +1 -1
- package/www/build/p-6a0cf4a1.system.entry.js +1 -0
- package/www/build/p-c15fdaba.system.js +1 -1
- package/www/build/p-c7a94334.entry.js +1 -0
- package/dist/mds-modal/p-1fadd55e.system.entry.js +0 -1
- package/dist/mds-modal/p-3ba00334.entry.js +0 -1
- package/www/build/p-1fadd55e.system.entry.js +0 -1
- package/www/build/p-3ba00334.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"position":[1537],"animating":[1537],"animation":[513],"overflow":[513],"close":[64]},null,{"opened":["handleOpenProp"]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"backdrop":[1540],"position":[1537],"animating":[1537],"animation":[513],"overflow":[513],"close":[64]},null,{"opened":["handleOpenProp"],"backdrop":["handleBackdropProp"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -18,7 +18,7 @@ const cssDurationToMilliseconds = (duration, defaultValue = 1000) => {
|
|
|
18
18
|
|
|
19
19
|
const miBaselineClose = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>`;
|
|
20
20
|
|
|
21
|
-
const mdsModalCss = "@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; :host{--mds-modal-custom-closed-transform:rotateX(10deg) rotateY(0) scale(1.25) translate(0, 10%);--mds-modal-custom-window-distance:1.5rem;--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-transition-duration:500ms;--mds-modal-transition-timing-funciton:cubic-bezier(0.86, 0, 0.07, 1);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-distance:0;--mds-modal-window-max-width:33%;--mds-modal-window-min-width:400px;--mds-modal-window-overflow:auto;--mds-modal-window-radius:0;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);--mds-modal-custom-opened-transform:translate(0, 0);--mds-modal-transition-window-transform:translate(0);--mds-modal-window-close-margin:5rem;-webkit-transition-timing-function:cubic-bezier(0.86, 0, 0.07, 1);transition-timing-function:cubic-bezier(0.86, 0, 0.07, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;-webkit-transition-duration:var(--mds-modal-transition-duration);transition-duration:var(--mds-modal-transition-duration);-webkit-transition-property:background-color;transition-property:background-color;-webkit-transition-timing-function:var(--mds-modal-transition-timing-funciton);transition-timing-function:var(--mds-modal-transition-timing-funciton);z-index:var(--mds-modal-z-index, 1000)}.action-close{border-radius:100px;opacity:0;pointer-events:none;position:absolute;-webkit-transition-duration:var(--mds-modal-transition-duration);transition-duration:var(--mds-modal-transition-duration);-webkit-transition-property:bottom, opacity, top, -webkit-transform;transition-property:bottom, opacity, top, -webkit-transform;transition-property:bottom, opacity, top, transform;transition-property:bottom, opacity, top, transform, -webkit-transform;-webkit-transition-timing-function:var(--mds-modal-transition-timing-function);transition-timing-function:var(--mds-modal-transition-timing-function)}.action-close::part(icon){height:2.25rem;width:2.25rem}:host([position=\"top-left\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%)}:host([position=\"top\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%)}:host([position=\"top-right\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%)}:host([position=\"left\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%)}:host([position=\"center\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%)}:host([position=\"right\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%)}:host([position=\"bottom-left\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%)}:host([position=\"bottom\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%)}:host([position=\"bottom-right\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%)}:host([animation=\"custom\"]:not([opened])){--mds-modal-transition-window-transform:var(--mds-modal-custom-closed-transform)}:host([animation=\"custom\"][opened]){--mds-modal-transition-window-transform:var(--mds-modal-custom-opened-transform)}:host([position=\"top-left\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(-50%, -100%)}:host([position=\"top\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(0, -100%)}:host([position=\"top-right\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(50%, -100%)}:host([position=\"left\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(-100%, 0%)}:host([position=\"center\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(0, 25%)}:host([position=\"right\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(100%, 0%)}:host([position=\"bottom-left\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(-50%, 100%)}:host([position=\"bottom\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translateY(50%)}:host([position=\"bottom-right\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(50%, 100%)}:host([opened]){--mds-modal-transition-window-transform:none;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}:host([position=\"top-left\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"top\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=\"top\"]) .window{height:auto;width:100vw}:host([position=\"top-right\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:end;justify-content:flex-end}:host([position=\"left\"]){-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"left\"]) .action-close{right:0.75rem;top:0.75rem}:host([position=\"left\"][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=\"left\"]:not([opened])) .action-close{-webkit-transform:translateX(-120%) rotate(-45deg);transform:translateX(-120%) rotate(-45deg)}:host([position=\"left\"]) .window{height:100%;max-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2));max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:0}@media (width > 480px){:host([position=\"left\"]) .window{max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:var(--mds-modal-window-min-width);width:var(--mds-modal-window-max-width)}}:host([position=\"center\"]){-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host([position=\"right\"]){-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}:host([position=\"right\"]) .action-close{left:0.75rem;top:0.75rem}:host([position=\"right\"]:not([opened])) .action-close{-webkit-transform:translateX(120%) rotate(45deg);transform:translateX(120%) rotate(45deg)}:host([position=\"right\"][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=\"right\"]) .window{height:100%;max-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2));max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:0}@media (width > 480px){:host([position=\"right\"]) .window{max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:var(--mds-modal-window-min-width);width:var(--mds-modal-window-max-width)}}:host([position=\"bottom-left\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"bottom\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host([position=\"bottom\"]) .window{height:auto;width:100vw}:host([position=\"bottom-right\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}:host ::slotted([slot=\"window\"]){margin:var(--mds-modal-custom-window-distance)}.window{gap:0rem;background-color:var(--mds-modal-window-background);border-radius:var(--mds-modal-window-radius);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;margin:var(--mds-modal-window-distance);overflow:var(--mds-modal-window-overflow)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host .window,:host>::slotted([slot=\"window\"]){opacity:0;-webkit-transform:var(--mds-modal-transition-window-transform);transform:var(--mds-modal-transition-window-transform);-webkit-transition-duration:var(--mds-modal-transition-duration);transition-duration:var(--mds-modal-transition-duration);-webkit-transition-property:opacity, -webkit-transform;transition-property:opacity, -webkit-transform;transition-property:transform, opacity;transition-property:transform, opacity, -webkit-transform;-webkit-transition-timing-function:var(--mds-modal-transition-timing-funciton);transition-timing-function:var(--mds-modal-transition-timing-funciton)}:host([opened]) .window,:host([opened])>::slotted([slot=\"window\"]){opacity:1;-webkit-transition-timing-function:var(--mds-modal-transition-timing-funciton);transition-timing-function:var(--mds-modal-transition-timing-funciton)}:host-context(.pref-animation-reduce){--mds-modal-transition-duration:0s}:host-context(.pref-animation-reduce),:host-context(.pref-animation-reduce) .action-close,:host-context(.pref-animation-reduce) .window{-webkit-transition-duration:0s !important;transition-duration:0s !important}@media (prefers-reduced-motion){:host-context(.pref-animation-system){--mds-modal-transition-duration:0s}:host-context(.pref-animation-system),:host-context(.pref-animation-system) .action-close,:host-context(.pref-animation-system) .window{-webkit-transition-duration:0s !important;transition-duration:0s !important}}:host-context(.pref-contrast-more){--mds-modal-window-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25)}@media (prefers-contrast: more){:host-context(.pref-contrast-system){--mds-modal-window-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25)}}:host-context(.pref-theme-dark){--mds-modal-window-background:rgb(var(--tone-neutral-09));--mds-modal-window-shadow:0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)}@media (prefers-color-scheme: dark){:host-context(.pref-theme-system){--mds-modal-window-background:rgb(var(--tone-neutral-09));--mds-modal-window-shadow:0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)}}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}";
|
|
21
|
+
const mdsModalCss = "@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; :host{--mds-modal-custom-closed-transform:rotateX(10deg) rotateY(0) scale(1.25) translate(0, 10%);--mds-modal-custom-window-distance:1.5rem;--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-transition-duration:500ms;--mds-modal-transition-timing-funciton:cubic-bezier(0.86, 0, 0.07, 1);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-distance:0;--mds-modal-window-max-width:33%;--mds-modal-window-min-width:400px;--mds-modal-window-overflow:auto;--mds-modal-window-radius:0;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);--mds-modal-custom-opened-transform:translate(0, 0);--mds-modal-transition-window-transform:translate(0);--mds-modal-window-close-margin:5rem;-webkit-transition-timing-function:cubic-bezier(0.86, 0, 0.07, 1);transition-timing-function:cubic-bezier(0.86, 0, 0.07, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;-webkit-transition-duration:var(--mds-modal-transition-duration);transition-duration:var(--mds-modal-transition-duration);-webkit-transition-property:background-color;transition-property:background-color;-webkit-transition-timing-function:var(--mds-modal-transition-timing-funciton);transition-timing-function:var(--mds-modal-transition-timing-funciton);z-index:var(--mds-modal-z-index, 1000)}.action-close{border-radius:100px;opacity:0;pointer-events:none;position:absolute;-webkit-transition-duration:var(--mds-modal-transition-duration);transition-duration:var(--mds-modal-transition-duration);-webkit-transition-property:bottom, opacity, top, -webkit-transform;transition-property:bottom, opacity, top, -webkit-transform;transition-property:bottom, opacity, top, transform;transition-property:bottom, opacity, top, transform, -webkit-transform;-webkit-transition-timing-function:var(--mds-modal-transition-timing-function);transition-timing-function:var(--mds-modal-transition-timing-function)}.action-close::part(icon){height:2.25rem;width:2.25rem}:host([position=\"top-left\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%)}:host([position=\"top\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%)}:host([position=\"top-right\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%)}:host([position=\"left\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%)}:host([position=\"center\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%)}:host([position=\"right\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%)}:host([position=\"bottom-left\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%)}:host([position=\"bottom\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%)}:host([position=\"bottom-right\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%)}:host([animation=\"custom\"]:not([opened])){--mds-modal-transition-window-transform:var(--mds-modal-custom-closed-transform)}:host([animation=\"custom\"][opened]){--mds-modal-transition-window-transform:var(--mds-modal-custom-opened-transform)}:host([position=\"top-left\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(-50%, -100%)}:host([position=\"top\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(0, -100%)}:host([position=\"top-right\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(50%, -100%)}:host([position=\"left\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(-100%, 0%)}:host([position=\"center\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(0, 25%)}:host([position=\"right\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(100%, 0%)}:host([position=\"bottom-left\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(-50%, 100%)}:host([position=\"bottom\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translateY(50%)}:host([position=\"bottom-right\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(50%, 100%)}:host([opened][backdrop]){--mds-modal-transition-window-transform:none;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}:host([position=\"top-left\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"top\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=\"top\"]) .window{height:auto;width:100vw}:host([position=\"top-right\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:end;justify-content:flex-end}:host([position=\"left\"]){-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"left\"]) .action-close{right:0.75rem;top:0.75rem}:host([position=\"left\"][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=\"left\"]:not([opened])) .action-close{-webkit-transform:translateX(-120%) rotate(-45deg);transform:translateX(-120%) rotate(-45deg)}:host([position=\"left\"]) .window{height:100%;max-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2));max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:0}@media (width > 480px){:host([position=\"left\"]) .window{max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:var(--mds-modal-window-min-width);width:var(--mds-modal-window-max-width)}}@media (width <= 480px){:host{--mds-modal-window-max-width:100%}}:host([position=\"center\"]){-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host([position=\"right\"]){-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}:host([position=\"right\"]) .action-close{left:0.75rem;top:0.75rem}:host([position=\"right\"]:not([opened])) .action-close{-webkit-transform:translateX(120%) rotate(45deg);transform:translateX(120%) rotate(45deg)}:host([position=\"right\"][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=\"right\"]) .window{height:100%;max-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2));max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:0}@media (width > 480px){:host([position=\"right\"]) .window{max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:var(--mds-modal-window-min-width);width:var(--mds-modal-window-max-width)}}:host([position=\"bottom-left\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"bottom\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host([position=\"bottom\"]) .window{height:auto;width:100vw}:host([position=\"bottom-right\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}:host ::slotted([slot=\"window\"]){margin:var(--mds-modal-custom-window-distance)}.window{gap:0rem;background-color:var(--mds-modal-window-background);border-radius:var(--mds-modal-window-radius);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;margin:var(--mds-modal-window-distance);overflow:var(--mds-modal-window-overflow)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host .window,:host>::slotted([slot=\"window\"]){opacity:0;-webkit-transform:var(--mds-modal-transition-window-transform);transform:var(--mds-modal-transition-window-transform);-webkit-transition-duration:var(--mds-modal-transition-duration);transition-duration:var(--mds-modal-transition-duration);-webkit-transition-property:opacity, -webkit-transform;transition-property:opacity, -webkit-transform;transition-property:transform, opacity;transition-property:transform, opacity, -webkit-transform;-webkit-transition-timing-function:var(--mds-modal-transition-timing-funciton);transition-timing-function:var(--mds-modal-transition-timing-funciton)}:host([opened]) .window,:host([opened])>::slotted([slot=\"window\"]){opacity:1;pointer-events:auto;-webkit-transition-timing-function:var(--mds-modal-transition-timing-funciton);transition-timing-function:var(--mds-modal-transition-timing-funciton)}:host-context(.pref-animation-reduce){--mds-modal-transition-duration:0s}:host-context(.pref-animation-reduce),:host-context(.pref-animation-reduce) .action-close,:host-context(.pref-animation-reduce) .window{-webkit-transition-duration:0s !important;transition-duration:0s !important}@media (prefers-reduced-motion){:host-context(.pref-animation-system){--mds-modal-transition-duration:0s}:host-context(.pref-animation-system),:host-context(.pref-animation-system) .action-close,:host-context(.pref-animation-system) .window{-webkit-transition-duration:0s !important;transition-duration:0s !important}}:host-context(.pref-contrast-more){--mds-modal-window-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25)}@media (prefers-contrast: more){:host-context(.pref-contrast-system){--mds-modal-window-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25)}}:host-context(.pref-theme-dark){--mds-modal-window-background:rgb(var(--tone-neutral-09));--mds-modal-window-shadow:0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)}@media (prefers-color-scheme: dark){:host-context(.pref-theme-system){--mds-modal-window-background:rgb(var(--tone-neutral-09));--mds-modal-window-shadow:0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)}}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}";
|
|
22
22
|
const MdsModalStyle0 = mdsModalCss;
|
|
23
23
|
|
|
24
24
|
const MdsModal = class {
|
|
@@ -34,6 +34,10 @@ const MdsModal = class {
|
|
|
34
34
|
* Specifies if the modal is opened or not
|
|
35
35
|
*/
|
|
36
36
|
this.opened = false;
|
|
37
|
+
/**
|
|
38
|
+
* Specifies if the modal shows the backdrop
|
|
39
|
+
*/
|
|
40
|
+
this.backdrop = true;
|
|
37
41
|
/**
|
|
38
42
|
* Specifies the animation position of the modal window
|
|
39
43
|
*/
|
|
@@ -174,19 +178,25 @@ const MdsModal = class {
|
|
|
174
178
|
}
|
|
175
179
|
this.animateCloseWindow();
|
|
176
180
|
}
|
|
181
|
+
handleBackdropProp(newValue) {
|
|
182
|
+
if (newValue === false) {
|
|
183
|
+
this.backdrop = undefined;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
177
186
|
async close() {
|
|
178
|
-
this.opened =
|
|
187
|
+
this.opened = undefined;
|
|
179
188
|
}
|
|
180
189
|
render() {
|
|
181
|
-
return (index.h(index.Host, { key: '
|
|
190
|
+
return (index.h(index.Host, { key: '283252e770fbff7530d25d7082895a6299ca576f', "aria-modal": clsx(this.opened ? 'true' : 'false'), onClick: (e) => { this.closeModal(e); } }, this.window
|
|
182
191
|
? index.h("slot", { name: "window" })
|
|
183
192
|
: index.h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), part: "window" }, this.top &&
|
|
184
193
|
index.h("slot", { name: "top" }), index.h("slot", null), this.bottom &&
|
|
185
|
-
index.h("slot", { name: "bottom" })), !this.window && index.h("mds-button", { key: '
|
|
194
|
+
index.h("slot", { name: "bottom" })), !this.window && index.h("mds-button", { key: '2535e00c309ff06ec952c1812867c68d4ec9bfdc', class: "action-close", icon: miBaselineClose, variant: "light", tone: "quiet", size: "xl", onClick: (e) => { this.closeModal(e); }, part: "action-close" })));
|
|
186
195
|
}
|
|
187
196
|
get host() { return index.getElement(this); }
|
|
188
197
|
static get watchers() { return {
|
|
189
|
-
"opened": ["handleOpenProp"]
|
|
198
|
+
"opened": ["handleOpenProp"],
|
|
199
|
+
"backdrop": ["handleBackdropProp"]
|
|
190
200
|
}; }
|
|
191
201
|
};
|
|
192
202
|
MdsModal.style = MdsModalStyle0;
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"position":[1537],"animating":[1537],"animation":[513],"overflow":[513],"close":[64]},null,{"opened":["handleOpenProp"]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"backdrop":[1540],"position":[1537],"animating":[1537],"animation":[513],"overflow":[513],"close":[64]},null,{"opened":["handleOpenProp"],"backdrop":["handleBackdropProp"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -7,6 +7,15 @@ const cssDurationToMilliseconds = (duration, defaultValue = 1000) => {
|
|
|
7
7
|
}
|
|
8
8
|
return defaultValue;
|
|
9
9
|
};
|
|
10
|
+
const cssDurationToSeconds = (duration, defaultValue = 1000) => {
|
|
11
|
+
if (duration.includes('ms')) {
|
|
12
|
+
return Number(duration.replace('ms', '')) / 1000;
|
|
13
|
+
}
|
|
14
|
+
if (duration.includes('s')) {
|
|
15
|
+
return Number(duration.replace('s', ''));
|
|
16
|
+
}
|
|
17
|
+
return defaultValue;
|
|
18
|
+
};
|
|
10
19
|
const cssSizeToNumber = (size, defaultValue = 0) => {
|
|
11
20
|
if (size.includes('px')) {
|
|
12
21
|
return Number(size.replace('px', ''));
|
|
@@ -19,4 +28,10 @@ const cssSizeToNumber = (size, defaultValue = 0) => {
|
|
|
19
28
|
}
|
|
20
29
|
return defaultValue;
|
|
21
30
|
};
|
|
22
|
-
|
|
31
|
+
const cssRotationToNumber = (size, defaultValue = 0) => {
|
|
32
|
+
if (size.includes('deg')) {
|
|
33
|
+
return Number(size.replace('deg', ''));
|
|
34
|
+
}
|
|
35
|
+
return defaultValue;
|
|
36
|
+
};
|
|
37
|
+
export { cssDurationToMilliseconds, cssDurationToSeconds, cssRotationToNumber, cssSizeToNumber, };
|
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
--mds-modal-transition-window-transform: translate(50%, 100%);
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
:host([opened]) {
|
|
267
|
+
:host([opened][backdrop]) {
|
|
268
268
|
--mds-modal-transition-window-transform: none;
|
|
269
269
|
|
|
270
270
|
background-color: rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));
|
|
@@ -351,6 +351,12 @@
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
+
@media (width <= 480px) {
|
|
355
|
+
:host {
|
|
356
|
+
--mds-modal-window-max-width: 100%;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
354
360
|
/*
|
|
355
361
|
- - -
|
|
356
362
|
- x -
|
|
@@ -480,6 +486,7 @@
|
|
|
480
486
|
:host([opened]) .window,
|
|
481
487
|
:host([opened]) > ::slotted([slot="window"]) {
|
|
482
488
|
opacity: 1;
|
|
489
|
+
pointer-events: auto;
|
|
483
490
|
transition-timing-function: var(--mds-modal-transition-timing-funciton);
|
|
484
491
|
}
|
|
485
492
|
|
|
@@ -20,6 +20,10 @@ export class MdsModal {
|
|
|
20
20
|
* Specifies if the modal is opened or not
|
|
21
21
|
*/
|
|
22
22
|
this.opened = false;
|
|
23
|
+
/**
|
|
24
|
+
* Specifies if the modal shows the backdrop
|
|
25
|
+
*/
|
|
26
|
+
this.backdrop = true;
|
|
23
27
|
/**
|
|
24
28
|
* Specifies the animation position of the modal window
|
|
25
29
|
*/
|
|
@@ -160,15 +164,20 @@ export class MdsModal {
|
|
|
160
164
|
}
|
|
161
165
|
this.animateCloseWindow();
|
|
162
166
|
}
|
|
167
|
+
handleBackdropProp(newValue) {
|
|
168
|
+
if (newValue === false) {
|
|
169
|
+
this.backdrop = undefined;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
163
172
|
async close() {
|
|
164
|
-
this.opened =
|
|
173
|
+
this.opened = undefined;
|
|
165
174
|
}
|
|
166
175
|
render() {
|
|
167
|
-
return (h(Host, { key: '
|
|
176
|
+
return (h(Host, { key: '283252e770fbff7530d25d7082895a6299ca576f', "aria-modal": clsx(this.opened ? 'true' : 'false'), onClick: (e) => { this.closeModal(e); } }, this.window
|
|
168
177
|
? h("slot", { name: "window" })
|
|
169
178
|
: h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), part: "window" }, this.top &&
|
|
170
179
|
h("slot", { name: "top" }), h("slot", null), this.bottom &&
|
|
171
|
-
h("slot", { name: "bottom" })), !this.window && h("mds-button", { key: '
|
|
180
|
+
h("slot", { name: "bottom" })), !this.window && h("mds-button", { key: '2535e00c309ff06ec952c1812867c68d4ec9bfdc', class: "action-close", icon: miBaselineClose, variant: "light", tone: "quiet", size: "xl", onClick: (e) => { this.closeModal(e); }, part: "action-close" })));
|
|
172
181
|
}
|
|
173
182
|
static get is() { return "mds-modal"; }
|
|
174
183
|
static get encapsulation() { return "shadow"; }
|
|
@@ -204,6 +213,26 @@ export class MdsModal {
|
|
|
204
213
|
"reflect": true,
|
|
205
214
|
"defaultValue": "false"
|
|
206
215
|
},
|
|
216
|
+
"backdrop": {
|
|
217
|
+
"type": "boolean",
|
|
218
|
+
"mutable": true,
|
|
219
|
+
"complexType": {
|
|
220
|
+
"original": "boolean",
|
|
221
|
+
"resolved": "boolean | undefined",
|
|
222
|
+
"references": {}
|
|
223
|
+
},
|
|
224
|
+
"required": false,
|
|
225
|
+
"optional": true,
|
|
226
|
+
"docs": {
|
|
227
|
+
"tags": [],
|
|
228
|
+
"text": "Specifies if the modal shows the backdrop"
|
|
229
|
+
},
|
|
230
|
+
"getter": false,
|
|
231
|
+
"setter": false,
|
|
232
|
+
"attribute": "backdrop",
|
|
233
|
+
"reflect": true,
|
|
234
|
+
"defaultValue": "true"
|
|
235
|
+
},
|
|
207
236
|
"position": {
|
|
208
237
|
"type": "string",
|
|
209
238
|
"mutable": true,
|
|
@@ -369,6 +398,9 @@ export class MdsModal {
|
|
|
369
398
|
return [{
|
|
370
399
|
"propName": "opened",
|
|
371
400
|
"methodName": "handleOpenProp"
|
|
401
|
+
}, {
|
|
402
|
+
"propName": "backdrop",
|
|
403
|
+
"methodName": "handleBackdropProp"
|
|
372
404
|
}];
|
|
373
405
|
}
|
|
374
406
|
}
|
|
@@ -14,6 +14,10 @@ export default {
|
|
|
14
14
|
description: 'Specifies if the modal is opened or not',
|
|
15
15
|
type: { name: 'boolean' },
|
|
16
16
|
},
|
|
17
|
+
backdrop: {
|
|
18
|
+
description: 'Specifies if the modal shows the backdrop',
|
|
19
|
+
type: { name: 'boolean' },
|
|
20
|
+
},
|
|
17
21
|
overflow: {
|
|
18
22
|
description: 'Specifies if the component prevents the body from scrolling when modal window is opened',
|
|
19
23
|
control: { type: 'select' },
|
|
@@ -162,6 +166,12 @@ Default.args = {
|
|
|
162
166
|
position: 'right',
|
|
163
167
|
opened: true,
|
|
164
168
|
};
|
|
169
|
+
export const Backdrop = Template.bind({});
|
|
170
|
+
Backdrop.args = {
|
|
171
|
+
position: 'right',
|
|
172
|
+
opened: true,
|
|
173
|
+
backdrop: undefined,
|
|
174
|
+
};
|
|
165
175
|
export const BodyOverflowDisabled = TemplateOverflow.bind({});
|
|
166
176
|
BodyOverflowDisabled.args = {
|
|
167
177
|
overflow: 'auto',
|
|
@@ -11,12 +11,27 @@ const buttonVariantDictionary = [
|
|
|
11
11
|
'success',
|
|
12
12
|
'warning',
|
|
13
13
|
];
|
|
14
|
+
const buttonDropdownVariantDictionary = [
|
|
15
|
+
'ai',
|
|
16
|
+
'dark',
|
|
17
|
+
'error',
|
|
18
|
+
'info',
|
|
19
|
+
'light',
|
|
20
|
+
'primary',
|
|
21
|
+
'secondary',
|
|
22
|
+
'success',
|
|
23
|
+
'warning',
|
|
24
|
+
];
|
|
14
25
|
const buttonToneVariantDictionary = [
|
|
15
26
|
'strong',
|
|
16
27
|
'weak',
|
|
17
28
|
'ghost',
|
|
18
29
|
'quiet',
|
|
19
30
|
];
|
|
31
|
+
const buttonToneMinimalVariantDictionary = [
|
|
32
|
+
'strong',
|
|
33
|
+
'weak',
|
|
34
|
+
];
|
|
20
35
|
const buttonTargetDictionary = [
|
|
21
36
|
'blank',
|
|
22
37
|
'self',
|
|
@@ -36,4 +51,4 @@ const buttonTypeDictionary = [
|
|
|
36
51
|
'submit',
|
|
37
52
|
'reset',
|
|
38
53
|
];
|
|
39
|
-
export { buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneVariantDictionary, buttonTypeDictionary, buttonVariantDictionary, };
|
|
54
|
+
export { buttonDropdownVariantDictionary, buttonIconPositionDictionary, buttonSizeDictionary, buttonTargetDictionary, buttonToneMinimalVariantDictionary, buttonToneVariantDictionary, buttonTypeDictionary, buttonVariantDictionary, };
|
|
@@ -14,7 +14,7 @@ const cssDurationToMilliseconds = (duration, defaultValue = 1000) => {
|
|
|
14
14
|
|
|
15
15
|
const miBaselineClose = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>`;
|
|
16
16
|
|
|
17
|
-
const mdsModalCss = "@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; :host{--mds-modal-custom-closed-transform:rotateX(10deg) rotateY(0) scale(1.25) translate(0, 10%);--mds-modal-custom-window-distance:1.5rem;--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-transition-duration:500ms;--mds-modal-transition-timing-funciton:cubic-bezier(0.86, 0, 0.07, 1);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-distance:0;--mds-modal-window-max-width:33%;--mds-modal-window-min-width:400px;--mds-modal-window-overflow:auto;--mds-modal-window-radius:0;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);--mds-modal-custom-opened-transform:translate(0, 0);--mds-modal-transition-window-transform:translate(0);--mds-modal-window-close-margin:5rem;-webkit-transition-timing-function:cubic-bezier(0.86, 0, 0.07, 1);transition-timing-function:cubic-bezier(0.86, 0, 0.07, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;-webkit-transition-duration:var(--mds-modal-transition-duration);transition-duration:var(--mds-modal-transition-duration);-webkit-transition-property:background-color;transition-property:background-color;-webkit-transition-timing-function:var(--mds-modal-transition-timing-funciton);transition-timing-function:var(--mds-modal-transition-timing-funciton);z-index:var(--mds-modal-z-index, 1000)}.action-close{border-radius:100px;opacity:0;pointer-events:none;position:absolute;-webkit-transition-duration:var(--mds-modal-transition-duration);transition-duration:var(--mds-modal-transition-duration);-webkit-transition-property:bottom, opacity, top, -webkit-transform;transition-property:bottom, opacity, top, -webkit-transform;transition-property:bottom, opacity, top, transform;transition-property:bottom, opacity, top, transform, -webkit-transform;-webkit-transition-timing-function:var(--mds-modal-transition-timing-function);transition-timing-function:var(--mds-modal-transition-timing-function)}.action-close::part(icon){height:2.25rem;width:2.25rem}:host([position=\"top-left\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%)}:host([position=\"top\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%)}:host([position=\"top-right\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%)}:host([position=\"left\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%)}:host([position=\"center\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%)}:host([position=\"right\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%)}:host([position=\"bottom-left\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%)}:host([position=\"bottom\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%)}:host([position=\"bottom-right\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%)}:host([animation=\"custom\"]:not([opened])){--mds-modal-transition-window-transform:var(--mds-modal-custom-closed-transform)}:host([animation=\"custom\"][opened]){--mds-modal-transition-window-transform:var(--mds-modal-custom-opened-transform)}:host([position=\"top-left\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(-50%, -100%)}:host([position=\"top\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(0, -100%)}:host([position=\"top-right\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(50%, -100%)}:host([position=\"left\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(-100%, 0%)}:host([position=\"center\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(0, 25%)}:host([position=\"right\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(100%, 0%)}:host([position=\"bottom-left\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(-50%, 100%)}:host([position=\"bottom\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translateY(50%)}:host([position=\"bottom-right\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(50%, 100%)}:host([opened]){--mds-modal-transition-window-transform:none;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}:host([position=\"top-left\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"top\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=\"top\"]) .window{height:auto;width:100vw}:host([position=\"top-right\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:end;justify-content:flex-end}:host([position=\"left\"]){-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"left\"]) .action-close{right:0.75rem;top:0.75rem}:host([position=\"left\"][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=\"left\"]:not([opened])) .action-close{-webkit-transform:translateX(-120%) rotate(-45deg);transform:translateX(-120%) rotate(-45deg)}:host([position=\"left\"]) .window{height:100%;max-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2));max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:0}@media (width > 480px){:host([position=\"left\"]) .window{max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:var(--mds-modal-window-min-width);width:var(--mds-modal-window-max-width)}}:host([position=\"center\"]){-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host([position=\"right\"]){-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}:host([position=\"right\"]) .action-close{left:0.75rem;top:0.75rem}:host([position=\"right\"]:not([opened])) .action-close{-webkit-transform:translateX(120%) rotate(45deg);transform:translateX(120%) rotate(45deg)}:host([position=\"right\"][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=\"right\"]) .window{height:100%;max-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2));max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:0}@media (width > 480px){:host([position=\"right\"]) .window{max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:var(--mds-modal-window-min-width);width:var(--mds-modal-window-max-width)}}:host([position=\"bottom-left\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"bottom\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host([position=\"bottom\"]) .window{height:auto;width:100vw}:host([position=\"bottom-right\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}:host ::slotted([slot=\"window\"]){margin:var(--mds-modal-custom-window-distance)}.window{gap:0rem;background-color:var(--mds-modal-window-background);border-radius:var(--mds-modal-window-radius);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;margin:var(--mds-modal-window-distance);overflow:var(--mds-modal-window-overflow)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host .window,:host>::slotted([slot=\"window\"]){opacity:0;-webkit-transform:var(--mds-modal-transition-window-transform);transform:var(--mds-modal-transition-window-transform);-webkit-transition-duration:var(--mds-modal-transition-duration);transition-duration:var(--mds-modal-transition-duration);-webkit-transition-property:opacity, -webkit-transform;transition-property:opacity, -webkit-transform;transition-property:transform, opacity;transition-property:transform, opacity, -webkit-transform;-webkit-transition-timing-function:var(--mds-modal-transition-timing-funciton);transition-timing-function:var(--mds-modal-transition-timing-funciton)}:host([opened]) .window,:host([opened])>::slotted([slot=\"window\"]){opacity:1;-webkit-transition-timing-function:var(--mds-modal-transition-timing-funciton);transition-timing-function:var(--mds-modal-transition-timing-funciton)}:host-context(.pref-animation-reduce){--mds-modal-transition-duration:0s}:host-context(.pref-animation-reduce),:host-context(.pref-animation-reduce) .action-close,:host-context(.pref-animation-reduce) .window{-webkit-transition-duration:0s !important;transition-duration:0s !important}@media (prefers-reduced-motion){:host-context(.pref-animation-system){--mds-modal-transition-duration:0s}:host-context(.pref-animation-system),:host-context(.pref-animation-system) .action-close,:host-context(.pref-animation-system) .window{-webkit-transition-duration:0s !important;transition-duration:0s !important}}:host-context(.pref-contrast-more){--mds-modal-window-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25)}@media (prefers-contrast: more){:host-context(.pref-contrast-system){--mds-modal-window-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25)}}:host-context(.pref-theme-dark){--mds-modal-window-background:rgb(var(--tone-neutral-09));--mds-modal-window-shadow:0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)}@media (prefers-color-scheme: dark){:host-context(.pref-theme-system){--mds-modal-window-background:rgb(var(--tone-neutral-09));--mds-modal-window-shadow:0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)}}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}";
|
|
17
|
+
const mdsModalCss = "@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; :host{--mds-modal-custom-closed-transform:rotateX(10deg) rotateY(0) scale(1.25) translate(0, 10%);--mds-modal-custom-window-distance:1.5rem;--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-transition-duration:500ms;--mds-modal-transition-timing-funciton:cubic-bezier(0.86, 0, 0.07, 1);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-distance:0;--mds-modal-window-max-width:33%;--mds-modal-window-min-width:400px;--mds-modal-window-overflow:auto;--mds-modal-window-radius:0;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);--mds-modal-custom-opened-transform:translate(0, 0);--mds-modal-transition-window-transform:translate(0);--mds-modal-window-close-margin:5rem;-webkit-transition-timing-function:cubic-bezier(0.86, 0, 0.07, 1);transition-timing-function:cubic-bezier(0.86, 0, 0.07, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;-webkit-transition-duration:var(--mds-modal-transition-duration);transition-duration:var(--mds-modal-transition-duration);-webkit-transition-property:background-color;transition-property:background-color;-webkit-transition-timing-function:var(--mds-modal-transition-timing-funciton);transition-timing-function:var(--mds-modal-transition-timing-funciton);z-index:var(--mds-modal-z-index, 1000)}.action-close{border-radius:100px;opacity:0;pointer-events:none;position:absolute;-webkit-transition-duration:var(--mds-modal-transition-duration);transition-duration:var(--mds-modal-transition-duration);-webkit-transition-property:bottom, opacity, top, -webkit-transform;transition-property:bottom, opacity, top, -webkit-transform;transition-property:bottom, opacity, top, transform;transition-property:bottom, opacity, top, transform, -webkit-transform;-webkit-transition-timing-function:var(--mds-modal-transition-timing-function);transition-timing-function:var(--mds-modal-transition-timing-function)}.action-close::part(icon){height:2.25rem;width:2.25rem}:host([position=\"top-left\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%)}:host([position=\"top\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%)}:host([position=\"top-right\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%)}:host([position=\"left\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%)}:host([position=\"center\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%)}:host([position=\"right\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%)}:host([position=\"bottom-left\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%)}:host([position=\"bottom\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%)}:host([position=\"bottom-right\"][animation=\"3d\"]:not([opened])){--mds-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%)}:host([animation=\"custom\"]:not([opened])){--mds-modal-transition-window-transform:var(--mds-modal-custom-closed-transform)}:host([animation=\"custom\"][opened]){--mds-modal-transition-window-transform:var(--mds-modal-custom-opened-transform)}:host([position=\"top-left\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(-50%, -100%)}:host([position=\"top\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(0, -100%)}:host([position=\"top-right\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(50%, -100%)}:host([position=\"left\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(-100%, 0%)}:host([position=\"center\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(0, 25%)}:host([position=\"right\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(100%, 0%)}:host([position=\"bottom-left\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(-50%, 100%)}:host([position=\"bottom\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translateY(50%)}:host([position=\"bottom-right\"][animation=\"slide\"]:not([opened])){--mds-modal-transition-window-transform:translate(50%, 100%)}:host([opened][backdrop]){--mds-modal-transition-window-transform:none;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}:host([position=\"top-left\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"top\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=\"top\"]) .window{height:auto;width:100vw}:host([position=\"top-right\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:end;justify-content:flex-end}:host([position=\"left\"]){-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"left\"]) .action-close{right:0.75rem;top:0.75rem}:host([position=\"left\"][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=\"left\"]:not([opened])) .action-close{-webkit-transform:translateX(-120%) rotate(-45deg);transform:translateX(-120%) rotate(-45deg)}:host([position=\"left\"]) .window{height:100%;max-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2));max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:0}@media (width > 480px){:host([position=\"left\"]) .window{max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:var(--mds-modal-window-min-width);width:var(--mds-modal-window-max-width)}}@media (width <= 480px){:host{--mds-modal-window-max-width:100%}}:host([position=\"center\"]){-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host([position=\"right\"]){-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}:host([position=\"right\"]) .action-close{left:0.75rem;top:0.75rem}:host([position=\"right\"]:not([opened])) .action-close{-webkit-transform:translateX(120%) rotate(45deg);transform:translateX(120%) rotate(45deg)}:host([position=\"right\"][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=\"right\"]) .window{height:100%;max-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2));max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:0}@media (width > 480px){:host([position=\"right\"]) .window{max-width:calc(100vw - var(--mds-modal-window-close-margin));min-width:var(--mds-modal-window-min-width);width:var(--mds-modal-window-max-width)}}:host([position=\"bottom-left\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"bottom\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host([position=\"bottom\"]) .window{height:auto;width:100vw}:host([position=\"bottom-right\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}:host ::slotted([slot=\"window\"]){margin:var(--mds-modal-custom-window-distance)}.window{gap:0rem;background-color:var(--mds-modal-window-background);border-radius:var(--mds-modal-window-radius);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;margin:var(--mds-modal-window-distance);overflow:var(--mds-modal-window-overflow)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host .window,:host>::slotted([slot=\"window\"]){opacity:0;-webkit-transform:var(--mds-modal-transition-window-transform);transform:var(--mds-modal-transition-window-transform);-webkit-transition-duration:var(--mds-modal-transition-duration);transition-duration:var(--mds-modal-transition-duration);-webkit-transition-property:opacity, -webkit-transform;transition-property:opacity, -webkit-transform;transition-property:transform, opacity;transition-property:transform, opacity, -webkit-transform;-webkit-transition-timing-function:var(--mds-modal-transition-timing-funciton);transition-timing-function:var(--mds-modal-transition-timing-funciton)}:host([opened]) .window,:host([opened])>::slotted([slot=\"window\"]){opacity:1;pointer-events:auto;-webkit-transition-timing-function:var(--mds-modal-transition-timing-funciton);transition-timing-function:var(--mds-modal-transition-timing-funciton)}:host-context(.pref-animation-reduce){--mds-modal-transition-duration:0s}:host-context(.pref-animation-reduce),:host-context(.pref-animation-reduce) .action-close,:host-context(.pref-animation-reduce) .window{-webkit-transition-duration:0s !important;transition-duration:0s !important}@media (prefers-reduced-motion){:host-context(.pref-animation-system){--mds-modal-transition-duration:0s}:host-context(.pref-animation-system),:host-context(.pref-animation-system) .action-close,:host-context(.pref-animation-system) .window{-webkit-transition-duration:0s !important;transition-duration:0s !important}}:host-context(.pref-contrast-more){--mds-modal-window-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25)}@media (prefers-contrast: more){:host-context(.pref-contrast-system){--mds-modal-window-shadow:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25)}}:host-context(.pref-theme-dark){--mds-modal-window-background:rgb(var(--tone-neutral-09));--mds-modal-window-shadow:0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)}@media (prefers-color-scheme: dark){:host-context(.pref-theme-system){--mds-modal-window-background:rgb(var(--tone-neutral-09));--mds-modal-window-shadow:0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)}}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}";
|
|
18
18
|
const MdsModalStyle0 = mdsModalCss;
|
|
19
19
|
|
|
20
20
|
const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class MdsModal extends HTMLElement {
|
|
@@ -32,6 +32,10 @@ const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class MdsModal extends HTMLE
|
|
|
32
32
|
* Specifies if the modal is opened or not
|
|
33
33
|
*/
|
|
34
34
|
this.opened = false;
|
|
35
|
+
/**
|
|
36
|
+
* Specifies if the modal shows the backdrop
|
|
37
|
+
*/
|
|
38
|
+
this.backdrop = true;
|
|
35
39
|
/**
|
|
36
40
|
* Specifies the animation position of the modal window
|
|
37
41
|
*/
|
|
@@ -172,30 +176,38 @@ const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class MdsModal extends HTMLE
|
|
|
172
176
|
}
|
|
173
177
|
this.animateCloseWindow();
|
|
174
178
|
}
|
|
179
|
+
handleBackdropProp(newValue) {
|
|
180
|
+
if (newValue === false) {
|
|
181
|
+
this.backdrop = undefined;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
175
184
|
async close() {
|
|
176
|
-
this.opened =
|
|
185
|
+
this.opened = undefined;
|
|
177
186
|
}
|
|
178
187
|
render() {
|
|
179
|
-
return (h(Host, { key: '
|
|
188
|
+
return (h(Host, { key: '283252e770fbff7530d25d7082895a6299ca576f', "aria-modal": clsx(this.opened ? 'true' : 'false'), onClick: (e) => { this.closeModal(e); } }, this.window
|
|
180
189
|
? h("slot", { name: "window" })
|
|
181
190
|
: h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), part: "window" }, this.top &&
|
|
182
191
|
h("slot", { name: "top" }), h("slot", null), this.bottom &&
|
|
183
|
-
h("slot", { name: "bottom" })), !this.window && h("mds-button", { key: '
|
|
192
|
+
h("slot", { name: "bottom" })), !this.window && h("mds-button", { key: '2535e00c309ff06ec952c1812867c68d4ec9bfdc', class: "action-close", icon: miBaselineClose, variant: "light", tone: "quiet", size: "xl", onClick: (e) => { this.closeModal(e); }, part: "action-close" })));
|
|
184
193
|
}
|
|
185
194
|
get host() { return this; }
|
|
186
195
|
static get watchers() { return {
|
|
187
|
-
"opened": ["handleOpenProp"]
|
|
196
|
+
"opened": ["handleOpenProp"],
|
|
197
|
+
"backdrop": ["handleBackdropProp"]
|
|
188
198
|
}; }
|
|
189
199
|
static get style() { return MdsModalStyle0; }
|
|
190
200
|
}, [1, "mds-modal", {
|
|
191
201
|
"opened": [1540],
|
|
202
|
+
"backdrop": [1540],
|
|
192
203
|
"position": [1537],
|
|
193
204
|
"animating": [1537],
|
|
194
205
|
"animation": [513],
|
|
195
206
|
"overflow": [513],
|
|
196
207
|
"close": [64]
|
|
197
208
|
}, undefined, {
|
|
198
|
-
"opened": ["handleOpenProp"]
|
|
209
|
+
"opened": ["handleOpenProp"],
|
|
210
|
+
"backdrop": ["handleBackdropProp"]
|
|
199
211
|
}]);
|
|
200
212
|
function defineCustomElement$1() {
|
|
201
213
|
if (typeof customElements === "undefined") {
|
package/dist/documentation.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2025-06-
|
|
2
|
+
"timestamp": "2025-06-23T14:22:11",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.27.2",
|
|
@@ -123,6 +123,33 @@
|
|
|
123
123
|
"getter": false,
|
|
124
124
|
"setter": false
|
|
125
125
|
},
|
|
126
|
+
{
|
|
127
|
+
"name": "backdrop",
|
|
128
|
+
"type": "boolean | undefined",
|
|
129
|
+
"complexType": {
|
|
130
|
+
"original": "boolean",
|
|
131
|
+
"resolved": "boolean | undefined",
|
|
132
|
+
"references": {}
|
|
133
|
+
},
|
|
134
|
+
"mutable": true,
|
|
135
|
+
"attr": "backdrop",
|
|
136
|
+
"reflectToAttr": true,
|
|
137
|
+
"docs": "Specifies if the modal shows the backdrop",
|
|
138
|
+
"docsTags": [],
|
|
139
|
+
"default": "true",
|
|
140
|
+
"values": [
|
|
141
|
+
{
|
|
142
|
+
"type": "boolean"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"type": "undefined"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"optional": true,
|
|
149
|
+
"required": false,
|
|
150
|
+
"getter": false,
|
|
151
|
+
"setter": false
|
|
152
|
+
},
|
|
126
153
|
{
|
|
127
154
|
"name": "opened",
|
|
128
155
|
"type": "boolean | undefined",
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["mds-modal",[[1,"mds-modal",{"opened":[1540],"position":[1537],"animating":[1537],"animation":[513],"overflow":[513],"close":[64]},null,{"opened":["handleOpenProp"]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["mds-modal",[[1,"mds-modal",{"opened":[1540],"backdrop":[1540],"position":[1537],"animating":[1537],"animation":[513],"overflow":[513],"close":[64]},null,{"opened":["handleOpenProp"],"backdrop":["handleBackdropProp"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|