@maggioli-design-system/mds-modal 6.5.2 → 6.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/cjs/{index-608e964b.js → index-58bba9e7.js} +22 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mds-modal.cjs.entry.js +27 -10
  4. package/dist/cjs/mds-modal.cjs.js +2 -2
  5. package/dist/collection/components/mds-modal/mds-modal.css +31 -6
  6. package/dist/collection/components/mds-modal/mds-modal.js +51 -8
  7. package/dist/collection/components/mds-modal/meta/dictionary.js +5 -1
  8. package/dist/collection/components/mds-modal/test/mds-modal.stories.js +136 -13
  9. package/dist/components/mds-modal.js +27 -9
  10. package/dist/documentation.json +41 -1
  11. package/dist/esm/{index-135d7cb6.js → index-01d79020.js} +22 -1
  12. package/dist/esm/loader.js +3 -3
  13. package/dist/esm/mds-modal.entry.js +27 -10
  14. package/dist/esm/mds-modal.js +3 -3
  15. package/dist/esm-es5/index-01d79020.js +1 -0
  16. package/dist/esm-es5/loader.js +1 -1
  17. package/dist/esm-es5/mds-modal.entry.js +1 -1
  18. package/dist/esm-es5/mds-modal.js +1 -1
  19. package/dist/mds-modal/mds-modal.esm.js +1 -1
  20. package/dist/mds-modal/mds-modal.js +1 -1
  21. package/dist/mds-modal/p-58e5c4e1.system.js +2 -0
  22. package/dist/mds-modal/p-5b786cf1.entry.js +1 -0
  23. package/dist/mds-modal/p-89e1a012.js +2 -0
  24. package/dist/mds-modal/p-b8e1e50b.system.entry.js +1 -0
  25. package/dist/mds-modal/{p-c15fdaba.system.js → p-fceffab5.system.js} +1 -1
  26. package/dist/stats.json +88 -31
  27. package/dist/types/components/mds-modal/mds-modal.d.ts +11 -1
  28. package/dist/types/components/mds-modal/meta/dictionary.d.ts +2 -1
  29. package/dist/types/components/mds-modal/meta/types.d.ts +1 -0
  30. package/dist/types/components/mds-modal/test/mds-modal.stories.d.ts +44 -2
  31. package/dist/types/components.d.ts +10 -2
  32. package/dist/types/dictionary/icon.d.ts +1 -1
  33. package/documentation.json +46 -1
  34. package/package.json +2 -2
  35. package/readme.md +9 -8
  36. package/src/components/mds-modal/css/mds-modal-position-center.css +2 -2
  37. package/src/components/mds-modal/css/mds-modal-window.css +28 -3
  38. package/src/components/mds-modal/mds-modal.css +1 -1
  39. package/src/components/mds-modal/mds-modal.tsx +39 -11
  40. package/src/components/mds-modal/meta/dictionary.ts +6 -0
  41. package/src/components/mds-modal/meta/types.ts +4 -0
  42. package/src/components/mds-modal/readme.md +9 -8
  43. package/src/components/mds-modal/test/mds-modal.stories.tsx +269 -121
  44. package/src/components.d.ts +10 -2
  45. package/www/build/mds-modal.esm.js +1 -1
  46. package/www/build/mds-modal.js +1 -1
  47. package/www/build/p-58e5c4e1.system.js +2 -0
  48. package/www/build/p-5b786cf1.entry.js +1 -0
  49. package/www/build/p-89e1a012.js +2 -0
  50. package/www/build/p-b8e1e50b.system.entry.js +1 -0
  51. package/www/build/{p-c15fdaba.system.js → p-fceffab5.system.js} +1 -1
  52. package/dist/esm-es5/index-135d7cb6.js +0 -1
  53. package/dist/mds-modal/p-3963a8e4.entry.js +0 -1
  54. package/dist/mds-modal/p-3f4fe943.system.entry.js +0 -1
  55. package/dist/mds-modal/p-57e2fbd5.js +0 -2
  56. package/dist/mds-modal/p-625ef015.system.js +0 -2
  57. package/src/fixtures/icons.json +0 -474
  58. package/www/build/p-3963a8e4.entry.js +0 -1
  59. package/www/build/p-3f4fe943.system.entry.js +0 -1
  60. package/www/build/p-57e2fbd5.js +0 -2
  61. package/www/build/p-625ef015.system.js +0 -2
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'mds-modal';
24
- const BUILD = /* mds-modal */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* mds-modal */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.27.2 | MIT Licensed | https://stenciljs.com
@@ -449,6 +449,27 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
449
449
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
450
450
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
451
451
  }
452
+ } else if (memberName === "style") {
453
+ {
454
+ for (const prop in oldValue) {
455
+ if (!newValue || newValue[prop] == null) {
456
+ if (prop.includes("-")) {
457
+ elm.style.removeProperty(prop);
458
+ } else {
459
+ elm.style[prop] = "";
460
+ }
461
+ }
462
+ }
463
+ }
464
+ for (const prop in newValue) {
465
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
466
+ if (prop.includes("-")) {
467
+ elm.style.setProperty(prop, newValue[prop]);
468
+ } else {
469
+ elm.style[prop] = newValue[prop];
470
+ }
471
+ }
472
+ }
452
473
  } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
453
474
  if (memberName[2] === "-") {
454
475
  memberName = memberName.slice(3);
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-608e964b.js');
5
+ const index = require('./index-58bba9e7.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
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],"backdrop":[1540],"position":[1537],"animating":[1537],"animation":[513],"overflow":[513],"close":[64]},null,{"opened":["handleOpenProp"],"backdrop":["handleBackdropProp"]}]]]], options);
11
+ return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"backdrop":[1540],"position":[1537],"animating":[1537],"animation":[513],"overflow":[513],"interaction":[513],"close":[64]},null,{"opened":["handleOpenProp"],"backdrop":["handleBackdropProp"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-608e964b.js');
5
+ const index = require('./index-58bba9e7.js');
6
6
 
7
7
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
8
8
 
@@ -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-height:100dvh;--mds-modal-window-max-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2));--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:rgb(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:rgb(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}: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)}.window{height:var(--mds-modal-window-height);max-height:var(--mds-modal-window-max-height);max-width:var(--mds-modal-window-max-width);min-width:var(--mds-modal-window-min-width);width:var(--mds-modal-window-max-width)}@media (width <= 480px){:host{--mds-modal-window-min-width:0}:host([position=\"bottom\"]),:host([position=\"bottom-left\"]),:host([position=\"bottom-right\"]),:host([position=\"center\"]),:host([position=\"left\"]),:host([position=\"right\"]),:host([position=\"top\"]),:host([position=\"top-left\"]),:host([position=\"top-right\"]){--mds-modal-window-max-width:calc(100vw - var(--mds-modal-window-close-margin))}}@media (width > 480px){:host([position=\"bottom\"]),:host([position=\"bottom-left\"]),:host([position=\"bottom-right\"]),:host([position=\"center\"]),:host([position=\"top\"]),:host([position=\"top-left\"]),:host([position=\"top-right\"]){--mds-modal-window-height:auto}}:host([position=\"top-left\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"top\"]){--mds-modal-window-height:auto;--mds-modal-window-max-width:100vw;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=\"top-right\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:end;justify-content:flex-end}:host([position=\"right\"]),:host([position=\"left\"]){--mds-modal-window-height:100dvh;--mds-modal-window-max-height:100dvh}: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=\"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=\"bottom-left\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"bottom\"]){--mds-modal-window-height:auto;--mds-modal-window-max-width:100vw;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host([position=\"bottom-right\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}: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-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2));--mds-modal-window-max-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2));--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:rgb(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:rgb(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}: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);-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;grid-template-columns:repeat(1, minmax(0, 100%));margin:var(--mds-modal-window-distance);overflow:var(--mds-modal-window-overflow);position:relative}.window-content--empty{display:none}.window-content-wrapper{max-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2));overflow:auto}.window-header,.window-footer{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute}.window-header{inset:0 0 auto}.window-footer{inset:auto 0 0}: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)}.window{height:var(--mds-modal-window-height);max-height:var(--mds-modal-window-max-height);max-width:var(--mds-modal-window-max-width);min-width:var(--mds-modal-window-min-width);width:var(--mds-modal-window-max-width)}@media (width <= 480px){:host{--mds-modal-window-min-width:0}:host([position=\"bottom\"]),:host([position=\"bottom-left\"]),:host([position=\"bottom-right\"]),:host([position=\"center\"]),:host([position=\"left\"]),:host([position=\"right\"]),:host([position=\"top\"]),:host([position=\"top-left\"]),:host([position=\"top-right\"]){--mds-modal-window-max-width:calc(100vw - var(--mds-modal-window-close-margin))}}@media (width > 480px){:host([position=\"bottom\"]),:host([position=\"bottom-left\"]),:host([position=\"bottom-right\"]),:host([position=\"center\"]),:host([position=\"top\"]),:host([position=\"top-left\"]),:host([position=\"top-right\"]){--mds-modal-window-height:auto}}:host([position=\"top-left\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"top\"]){--mds-modal-window-height:auto;--mds-modal-window-max-width:100vw;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=\"top-right\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:end;justify-content:flex-end}:host([position=\"right\"]),:host([position=\"left\"]){--mds-modal-window-height:100%;--mds-modal-window-max-height:calc(100dvh - calc(var(--mds-modal-window-distance) * 2))}: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=\"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=\"bottom-left\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}:host([position=\"bottom\"]){--mds-modal-window-height:auto;--mds-modal-window-max-width:100vw;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host([position=\"bottom-right\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}: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 {
@@ -57,6 +57,12 @@ const MdsModal = class {
57
57
  * Specifies if the component prevents the body from scrolling when modal window is opened
58
58
  */
59
59
  this.overflow = 'auto';
60
+ /**
61
+ * Specifies if the component can be closed with close button, or also if the backdrop background is cliccked.
62
+ * If `strict` is selected only the close button can dismiss the component via UI.
63
+ * If `relaxed` is selected the component can be dismissed also by cliccking the backdrop area.
64
+ */
65
+ this.interaction = 'relaxed';
60
66
  this.updateCSSCustomProps = () => {
61
67
  var _a;
62
68
  if (typeof window === 'undefined')
@@ -128,10 +134,14 @@ const MdsModal = class {
128
134
  this.windowElement.addEventListener('touchstart', this.setTouchStart);
129
135
  this.windowElement.addEventListener('touchend', this.setTouchEnd);
130
136
  };
131
- this.closeModal = (e) => {
137
+ this.closeModal = (e, force) => {
132
138
  var _a;
133
- if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.localName) !== 'mds-modal') {
134
- return;
139
+ if (!force) {
140
+ if (this.interaction === 'strict')
141
+ return;
142
+ if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.localName) !== 'mds-modal') {
143
+ return;
144
+ }
135
145
  }
136
146
  this.opened = e.target !== e.currentTarget;
137
147
  if (!this.opened) {
@@ -155,14 +165,23 @@ const MdsModal = class {
155
165
  this.animating = this.opened ? 'intro' : 'outro';
156
166
  }
157
167
  componentDidLoad() {
158
- var _a;
168
+ var _a, _b, _c;
159
169
  this.windowElement = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.window');
170
+ this.windowHeaderElement = (_b = this.host.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.window-header');
171
+ this.windowFooterElement = (_c = this.host.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('.window-footer');
172
+ if (this.windowHeaderElement) {
173
+ this.windowHeaderHeight = this.windowHeaderElement.offsetHeight;
174
+ }
175
+ if (this.windowFooterElement) {
176
+ this.windowFooterHeight = this.windowFooterElement.offsetHeight;
177
+ }
160
178
  if (this.windowElement) {
161
179
  this.addMobileEvents();
162
180
  }
163
181
  this.updateCSSCustomProps();
164
182
  }
165
183
  disconnectedCallback() {
184
+ this.enableOverflow();
166
185
  if (this.windowElement) {
167
186
  this.windowElement.removeEventListener('touchstart', this.setTouchStart);
168
187
  this.windowElement.removeEventListener('touchend', this.setTouchEnd);
@@ -193,11 +212,9 @@ const MdsModal = class {
193
212
  this.opened = undefined;
194
213
  }
195
214
  render() {
196
- return (index.h(index.Host, { key: 'eb82add25a2823337d044608cf3af97f5b7df87b', "aria-modal": clsx(this.opened ? 'true' : 'false'), onMouseDown: (e) => { this.closeModal(e); } }, this.window
215
+ return (index.h(index.Host, { key: '90f5903397d6923531cc4e20719095ba8cf38ad8', "aria-modal": clsx(this.opened ? 'true' : 'false'), onMouseDown: (e) => { this.closeModal(e); } }, this.window
197
216
  ? index.h("slot", { name: "window" })
198
- : index.h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), part: "window" }, this.top &&
199
- index.h("slot", { name: "top" }), index.h("slot", null), this.bottom &&
200
- index.h("slot", { name: "bottom" })), !this.window && index.h("mds-button", { key: '26186870cde7d27239d10c043d1110efcf18a64a', class: "action-close", icon: miBaselineClose, variant: "light", tone: "quiet", size: "xl", onClick: (e) => { this.closeModal(e); }, part: "action-close" })));
217
+ : index.h("div", { class: "window", part: "window" }, index.h("div", { class: clsx('window-header', this.top ? '' : 'window-content--empty') }, index.h("slot", { name: "top" })), index.h("div", { class: "window-content-wrapper" }, index.h("div", { class: "window-content", style: { paddingTop: `${this.windowHeaderHeight}px`, paddingBottom: `${this.windowFooterHeight}px` } }, index.h("slot", null))), index.h("div", { class: clsx('window-footer', this.bottom ? '' : 'window-content--empty') }, index.h("slot", { name: "bottom" }))), !this.window && index.h("mds-button", { key: '8e99b196e9e8877ec9ac413a7d3e0ce39cb5cc47', class: "action-close", icon: miBaselineClose, variant: "light", tone: "quiet", size: "xl", onClick: (e) => { this.closeModal(e, true); }, part: "action-close" })));
201
218
  }
202
219
  get host() { return index.getElement(this); }
203
220
  static get watchers() { return {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-608e964b.js');
5
+ const index = require('./index-58bba9e7.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
@@ -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],"backdrop":[1540],"position":[1537],"animating":[1537],"animation":[513],"overflow":[513],"close":[64]},null,{"opened":["handleOpenProp"],"backdrop":["handleBackdropProp"]}]]]], options);
22
+ return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"backdrop":[1540],"position":[1537],"animating":[1537],"animation":[513],"overflow":[513],"interaction":[513],"close":[64]},null,{"opened":["handleOpenProp"],"backdrop":["handleBackdropProp"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -37,7 +37,7 @@
37
37
  --mds-modal-window-background: rgb(var(--tone-neutral));
38
38
  --mds-modal-window-distance: 0;
39
39
  --mds-modal-window-max-width: 33%;
40
- --mds-modal-window-height: 100dvh;
40
+ --mds-modal-window-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));
41
41
  --mds-modal-window-max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));
42
42
  --mds-modal-window-min-width: 400px;
43
43
  --mds-modal-window-overflow: auto;
@@ -285,13 +285,38 @@
285
285
  background-color: var(--mds-modal-window-background);
286
286
  border-radius: var(--mds-modal-window-radius);
287
287
  box-shadow: var(--mds-modal-window-shadow);
288
+ box-sizing: border-box;
288
289
  display: grid;
289
- grid-template-rows: 1fr;
290
+ grid-template-columns: repeat(1, minmax(0, 100%));
290
291
  margin: var(--mds-modal-window-distance);
291
292
  overflow: var(--mds-modal-window-overflow);
293
+ position: relative;
292
294
  }
293
295
 
294
- .window--top {
296
+ .window-content--empty {
297
+ display: none;
298
+ }
299
+
300
+ .window-content-wrapper {
301
+ max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));
302
+ overflow: auto;
303
+ }
304
+
305
+ .window-header,
306
+ .window-footer {
307
+ box-sizing: border-box;
308
+ position: absolute;
309
+ }
310
+
311
+ .window-header {
312
+ inset: 0 0 auto;
313
+ }
314
+
315
+ .window-footer {
316
+ inset: auto 0 0;
317
+ }
318
+
319
+ /* .window--top {
295
320
  grid-template-rows: auto 1fr;
296
321
  }
297
322
 
@@ -301,7 +326,7 @@
301
326
 
302
327
  .window--top-bottom {
303
328
  grid-template-rows: auto 1fr auto;
304
- }
329
+ } */
305
330
 
306
331
  :host .window,
307
332
  :host > ::slotted([slot="window"]) {
@@ -396,8 +421,8 @@
396
421
 
397
422
  :host([position="right"]),
398
423
  :host([position="left"]) {
399
- --mds-modal-window-height: 100dvh;
400
- --mds-modal-window-max-height: 100dvh;
424
+ --mds-modal-window-height: 100%;
425
+ --mds-modal-window-max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));
401
426
  }
402
427
 
403
428
  /*
@@ -41,6 +41,12 @@ export class MdsModal {
41
41
  * Specifies if the component prevents the body from scrolling when modal window is opened
42
42
  */
43
43
  this.overflow = 'auto';
44
+ /**
45
+ * Specifies if the component can be closed with close button, or also if the backdrop background is cliccked.
46
+ * If `strict` is selected only the close button can dismiss the component via UI.
47
+ * If `relaxed` is selected the component can be dismissed also by cliccking the backdrop area.
48
+ */
49
+ this.interaction = 'relaxed';
44
50
  this.updateCSSCustomProps = () => {
45
51
  var _a;
46
52
  if (typeof window === 'undefined')
@@ -112,10 +118,14 @@ export class MdsModal {
112
118
  this.windowElement.addEventListener('touchstart', this.setTouchStart);
113
119
  this.windowElement.addEventListener('touchend', this.setTouchEnd);
114
120
  };
115
- this.closeModal = (e) => {
121
+ this.closeModal = (e, force) => {
116
122
  var _a;
117
- if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.localName) !== 'mds-modal') {
118
- return;
123
+ if (!force) {
124
+ if (this.interaction === 'strict')
125
+ return;
126
+ if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.localName) !== 'mds-modal') {
127
+ return;
128
+ }
119
129
  }
120
130
  this.opened = e.target !== e.currentTarget;
121
131
  if (!this.opened) {
@@ -139,14 +149,23 @@ export class MdsModal {
139
149
  this.animating = this.opened ? 'intro' : 'outro';
140
150
  }
141
151
  componentDidLoad() {
142
- var _a;
152
+ var _a, _b, _c;
143
153
  this.windowElement = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.window');
154
+ this.windowHeaderElement = (_b = this.host.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.window-header');
155
+ this.windowFooterElement = (_c = this.host.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('.window-footer');
156
+ if (this.windowHeaderElement) {
157
+ this.windowHeaderHeight = this.windowHeaderElement.offsetHeight;
158
+ }
159
+ if (this.windowFooterElement) {
160
+ this.windowFooterHeight = this.windowFooterElement.offsetHeight;
161
+ }
144
162
  if (this.windowElement) {
145
163
  this.addMobileEvents();
146
164
  }
147
165
  this.updateCSSCustomProps();
148
166
  }
149
167
  disconnectedCallback() {
168
+ this.enableOverflow();
150
169
  if (this.windowElement) {
151
170
  this.windowElement.removeEventListener('touchstart', this.setTouchStart);
152
171
  this.windowElement.removeEventListener('touchend', this.setTouchEnd);
@@ -177,11 +196,9 @@ export class MdsModal {
177
196
  this.opened = undefined;
178
197
  }
179
198
  render() {
180
- return (h(Host, { key: 'eb82add25a2823337d044608cf3af97f5b7df87b', "aria-modal": clsx(this.opened ? 'true' : 'false'), onMouseDown: (e) => { this.closeModal(e); } }, this.window
199
+ return (h(Host, { key: '90f5903397d6923531cc4e20719095ba8cf38ad8', "aria-modal": clsx(this.opened ? 'true' : 'false'), onMouseDown: (e) => { this.closeModal(e); } }, this.window
181
200
  ? h("slot", { name: "window" })
182
- : h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), part: "window" }, this.top &&
183
- h("slot", { name: "top" }), h("slot", null), this.bottom &&
184
- h("slot", { name: "bottom" })), !this.window && h("mds-button", { key: '26186870cde7d27239d10c043d1110efcf18a64a', class: "action-close", icon: miBaselineClose, variant: "light", tone: "quiet", size: "xl", onClick: (e) => { this.closeModal(e); }, part: "action-close" })));
201
+ : h("div", { class: "window", part: "window" }, h("div", { class: clsx('window-header', this.top ? '' : 'window-content--empty') }, h("slot", { name: "top" })), h("div", { class: "window-content-wrapper" }, h("div", { class: "window-content", style: { paddingTop: `${this.windowHeaderHeight}px`, paddingBottom: `${this.windowFooterHeight}px` } }, h("slot", null))), h("div", { class: clsx('window-footer', this.bottom ? '' : 'window-content--empty') }, h("slot", { name: "bottom" }))), !this.window && h("mds-button", { key: '8e99b196e9e8877ec9ac413a7d3e0ce39cb5cc47', class: "action-close", icon: miBaselineClose, variant: "light", tone: "quiet", size: "xl", onClick: (e) => { this.closeModal(e, true); }, part: "action-close" })));
185
202
  }
186
203
  static get is() { return "mds-modal"; }
187
204
  static get encapsulation() { return "shadow"; }
@@ -340,6 +357,32 @@ export class MdsModal {
340
357
  "attribute": "overflow",
341
358
  "reflect": true,
342
359
  "defaultValue": "'auto'"
360
+ },
361
+ "interaction": {
362
+ "type": "string",
363
+ "mutable": false,
364
+ "complexType": {
365
+ "original": "ModalInteractionType",
366
+ "resolved": "\"relaxed\" | \"strict\"",
367
+ "references": {
368
+ "ModalInteractionType": {
369
+ "location": "import",
370
+ "path": "./meta/types",
371
+ "id": "src/components/mds-modal/meta/types.ts::ModalInteractionType"
372
+ }
373
+ }
374
+ },
375
+ "required": false,
376
+ "optional": false,
377
+ "docs": {
378
+ "tags": [],
379
+ "text": "Specifies if the component can be closed with close button, or also if the backdrop background is cliccked.\nIf `strict` is selected only the close button can dismiss the component via UI.\nIf `relaxed` is selected the component can be dismissed also by cliccking the backdrop area."
380
+ },
381
+ "getter": false,
382
+ "setter": false,
383
+ "attribute": "interaction",
384
+ "reflect": true,
385
+ "defaultValue": "'relaxed'"
343
386
  }
344
387
  };
345
388
  }
@@ -13,9 +13,13 @@ const modalOverflowDictionary = [
13
13
  'auto',
14
14
  'manual',
15
15
  ];
16
+ const modalInteractionDictionary = [
17
+ 'strict',
18
+ 'relaxed',
19
+ ];
16
20
  const modalAnimationStyleDictionary = [
17
21
  'slide',
18
22
  'custom',
19
23
  '3d',
20
24
  ];
21
- export { modalOverflowDictionary, modalPositionDictionary, modalAnimationStyleDictionary, };
25
+ export { modalOverflowDictionary, modalPositionDictionary, modalInteractionDictionary, modalAnimationStyleDictionary, };