@maggioli-design-system/mds-modal 4.11.4 → 5.0.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.
Files changed (109) hide show
  1. package/dist/cjs/{index-6721d3e5.js → index-7b5471f5.js} +17 -14
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mds-modal.cjs.entry.js +48 -91
  4. package/dist/cjs/mds-modal.cjs.js +3 -3
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/common/locale.js +17 -5
  7. package/dist/collection/components/mds-modal/mds-modal.css +200 -443
  8. package/dist/collection/components/mds-modal/mds-modal.js +78 -53
  9. package/dist/collection/components/mds-modal/meta/dictionary.js +4 -0
  10. package/dist/collection/components/mds-modal/test/mds-modal.stories.js +4 -1
  11. package/dist/collection/dictionary/button.js +1 -0
  12. package/dist/collection/dictionary/variant.js +10 -1
  13. package/dist/collection/type/variant-file-format.js +0 -34
  14. package/dist/components/mds-modal.js +49 -93
  15. package/dist/documentation.json +81 -6
  16. package/dist/esm/{index-56ba5ebb.js → index-1c34ac95.js} +17 -14
  17. package/dist/esm/loader.js +3 -3
  18. package/dist/esm/mds-modal.entry.js +48 -91
  19. package/dist/esm/mds-modal.js +4 -4
  20. package/dist/esm-es5/index-1c34ac95.js +1 -0
  21. package/dist/esm-es5/loader.js +1 -1
  22. package/dist/esm-es5/mds-modal.entry.js +1 -1
  23. package/dist/esm-es5/mds-modal.js +1 -1
  24. package/dist/mds-modal/mds-modal.esm.js +1 -1
  25. package/dist/mds-modal/mds-modal.js +1 -1
  26. package/dist/mds-modal/p-0ed6e0c8.js +2 -0
  27. package/dist/mds-modal/p-423dac35.system.js +2 -0
  28. package/dist/mds-modal/p-63a918d2.system.entry.js +1 -0
  29. package/dist/mds-modal/p-67200987.entry.js +1 -0
  30. package/dist/mds-modal/p-67c6f337.system.js +1 -0
  31. package/dist/stats.json +133 -58
  32. package/dist/types/common/date.d.ts +1 -1
  33. package/dist/types/common/file.d.ts +3 -4
  34. package/dist/types/common/locale.d.ts +3 -1
  35. package/dist/types/components/mds-modal/mds-modal.d.ts +20 -13
  36. package/dist/types/components/mds-modal/meta/types.d.ts +2 -2
  37. package/dist/types/components.d.ts +15 -2
  38. package/dist/types/dictionary/file-extensions.d.ts +2 -1
  39. package/dist/types/dictionary/variant.d.ts +2 -1
  40. package/dist/types/stencil-public-runtime.d.ts +6 -0
  41. package/dist/types/type/autocomplete.d.ts +1 -1
  42. package/dist/types/type/button.d.ts +1 -1
  43. package/dist/types/type/header-bar.d.ts +2 -0
  44. package/dist/types/type/input.d.ts +3 -0
  45. package/dist/types/type/variant-file-format.d.ts +4 -4
  46. package/dist/types/type/variant.d.ts +2 -1
  47. package/documentation.json +113 -28
  48. package/package.json +5 -5
  49. package/readme.md +23 -8
  50. package/src/common/file.ts +2 -3
  51. package/src/common/locale.ts +20 -6
  52. package/src/common/unit.ts +1 -1
  53. package/src/components/mds-modal/.gitlab-ci.yml +5 -10
  54. package/src/components/mds-modal/css/mds-modal-animate-bottom-left.css +19 -0
  55. package/src/components/mds-modal/css/mds-modal-animate-bottom-right.css +19 -0
  56. package/src/components/mds-modal/css/mds-modal-animate-bottom.css +11 -21
  57. package/src/components/mds-modal/css/mds-modal-animate-center.css +10 -21
  58. package/src/components/mds-modal/css/mds-modal-animate-left.css +17 -30
  59. package/src/components/mds-modal/css/mds-modal-animate-right.css +17 -30
  60. package/src/components/mds-modal/css/mds-modal-animate-top-left.css +19 -0
  61. package/src/components/mds-modal/css/mds-modal-animate-top-right.css +19 -0
  62. package/src/components/mds-modal/css/mds-modal-animate-top.css +11 -21
  63. package/src/components/mds-modal/css/mds-modal-animate.css +35 -0
  64. package/src/components/mds-modal/css/mds-modal-pref-animation.css +12 -2
  65. package/src/components/mds-modal/mds-modal.css +35 -49
  66. package/src/components/mds-modal/mds-modal.tsx +60 -57
  67. package/src/components/mds-modal/meta/dictionary.ts +4 -0
  68. package/src/components/mds-modal/meta/types.ts +5 -0
  69. package/src/components/mds-modal/readme.md +9 -7
  70. package/src/components/mds-modal/test/mds-modal.e2e.ts +2 -5
  71. package/src/components/mds-modal/test/mds-modal.stories.tsx +6 -3
  72. package/src/components.d.ts +15 -2
  73. package/src/dictionary/button.ts +1 -0
  74. package/src/dictionary/file-extensions.ts +3 -1
  75. package/src/dictionary/variant.ts +11 -0
  76. package/src/fixtures/icons.json +29 -3
  77. package/src/fixtures/iconsauce.json +21 -1
  78. package/src/tailwind/components.css +1 -1
  79. package/src/type/autocomplete.ts +0 -1
  80. package/src/type/button.ts +1 -0
  81. package/src/type/header-bar.ts +11 -0
  82. package/src/type/input.ts +4 -0
  83. package/src/type/variant-file-format.ts +20 -37
  84. package/src/type/variant.ts +9 -1
  85. package/www/build/mds-modal.esm.js +1 -1
  86. package/www/build/mds-modal.js +1 -1
  87. package/www/build/p-0ed6e0c8.js +2 -0
  88. package/www/build/p-423dac35.system.js +2 -0
  89. package/www/build/p-63a918d2.system.entry.js +1 -0
  90. package/www/build/p-67200987.entry.js +1 -0
  91. package/www/build/p-67c6f337.system.js +1 -0
  92. package/dist/collection/type/language.js +0 -1
  93. package/dist/esm-es5/index-56ba5ebb.js +0 -1
  94. package/dist/mds-modal/p-3a04d26f.system.entry.js +0 -1
  95. package/dist/mds-modal/p-40ee28e3.js +0 -2
  96. package/dist/mds-modal/p-92688c52.system.js +0 -1
  97. package/dist/mds-modal/p-c93e3da8.system.js +0 -2
  98. package/dist/mds-modal/p-cb3a151e.entry.js +0 -1
  99. package/dist/types/interface/input-value.d.ts +0 -4
  100. package/dist/types/type/language.d.ts +0 -1
  101. package/src/components/mds-modal/css/components.css +0 -49
  102. package/src/interface/input-value.ts +0 -5
  103. package/src/type/language.ts +0 -4
  104. package/www/build/p-3a04d26f.system.entry.js +0 -1
  105. package/www/build/p-40ee28e3.js +0 -2
  106. package/www/build/p-92688c52.system.js +0 -1
  107. package/www/build/p-c93e3da8.system.js +0 -2
  108. package/www/build/p-cb3a151e.entry.js +0 -1
  109. /package/dist/collection/{interface/input-value.js → type/header-bar.js} +0 -0
@@ -21,10 +21,10 @@ 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, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, 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: false, mode: 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: true, 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, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, 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: false, mode: 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 };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.21.0 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.22.2 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
@@ -381,10 +381,21 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
381
381
  if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
382
382
  if (styleContainerNode.nodeName === "HEAD") {
383
383
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
384
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : document.querySelector("style");
384
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
385
385
  styleContainerNode.insertBefore(styleElm, referenceNode2);
386
386
  } else if ("host" in styleContainerNode) {
387
- styleContainerNode.prepend(styleElm);
387
+ if (supportsConstructableStylesheets) {
388
+ const stylesheet = new CSSStyleSheet();
389
+ stylesheet.replaceSync(style);
390
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
391
+ } else {
392
+ const existingStyleContainer = styleContainerNode.querySelector("style");
393
+ if (existingStyleContainer) {
394
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
395
+ } else {
396
+ styleContainerNode.prepend(styleElm);
397
+ }
398
+ }
388
399
  } else {
389
400
  styleContainerNode.append(styleElm);
390
401
  }
@@ -843,9 +854,6 @@ var postUpdateComponent = (hostRef) => {
843
854
  const endPostUpdate = createTime("postUpdate", tagName);
844
855
  const instance = hostRef.$lazyInstance$ ;
845
856
  const ancestorComponent = hostRef.$ancestorComponent$;
846
- {
847
- safeCall(instance, "componentDidRender");
848
- }
849
857
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
850
858
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
851
859
  {
@@ -1114,9 +1122,6 @@ var connectedCallback = (elm) => {
1114
1122
  }
1115
1123
  };
1116
1124
  var disconnectInstance = (instance) => {
1117
- {
1118
- safeCall(instance, "disconnectedCallback");
1119
- }
1120
1125
  };
1121
1126
  var disconnectedCallback = async (elm) => {
1122
1127
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1127,10 +1132,8 @@ var disconnectedCallback = async (elm) => {
1127
1132
  hostRef.$rmListeners$ = void 0;
1128
1133
  }
1129
1134
  }
1130
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1131
- disconnectInstance(hostRef.$lazyInstance$);
1132
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1133
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1135
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1136
+ hostRef.$onReadyPromise$.then(() => disconnectInstance());
1134
1137
  }
1135
1138
  }
1136
1139
  };
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-6721d3e5.js');
5
+ const index = require('./index-7b5471f5.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],"position":[1537],"stateOpened":[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{"position":["positionChange"],"opened":["openedChange"]}]]]], options);
11
+ return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"position":[1537],"animating":[1537]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{"opened":["handleOpenProp"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -2,72 +2,56 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-6721d3e5.js');
5
+ const index = require('./index-7b5471f5.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
 
9
- 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>`;
10
-
11
- class KeyboardManager {
12
- constructor() {
13
- this.elements = new Map();
14
- this.handleClickBehaviorDispatchEvent = (event) => {
15
- if (event.code === 'Enter' || event.code === 'NumpadEnter') {
16
- event.target.click();
17
- }
18
- };
19
- this.handleEscapeBehaviorDispatchEvent = (event) => {
20
- if (event.code === 'Escape' && this.escapeCallback) {
21
- this.escapeCallback();
22
- }
23
- };
24
- this.addElement = (el, name = 'element') => {
25
- if (!el) {
26
- throw Error(`Passed an ${el} element parameter to KeyboardManager.addElement`);
27
- }
28
- this.elements.set(name, el);
29
- };
30
- this.removeElement = (name = 'element') => {
31
- this.detachClickBehavior(name);
32
- this.elements.delete(name);
33
- };
34
- this.attachClickBehavior = (name = 'element') => {
35
- var _a;
36
- (_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
37
- };
38
- this.detachClickBehavior = (name = 'element') => {
39
- var _a;
40
- (_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
41
- };
42
- this.attachEscapeBehavior = (callback) => {
43
- this.escapeCallback = callback;
44
- if (window !== undefined) {
45
- window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
46
- }
47
- };
48
- this.detachEscapeBehavior = () => {
49
- this.escapeCallback = () => { return; };
50
- if (window !== undefined) {
51
- window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
52
- }
53
- };
9
+ const cssDurationToMilliseconds = (duration, defaultValue = 1000) => {
10
+ if (duration.includes('ms')) {
11
+ return Number(duration.replace('ms', ''));
12
+ }
13
+ if (duration.includes('s')) {
14
+ return Number(duration.replace('s', '')) * 1000;
54
15
  }
55
- }
16
+ return defaultValue;
17
+ };
56
18
 
57
- const mdsModalCss = "@-webkit-keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n @keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n /* included for focus effect */\n@tailwind components;\n@tailwind utilities;\n\n@tailwind components;\n@tailwind utilities;\n\n\n.svg {\n display: -ms-flexbox;\n display: flex;\n}\n\n\n.svg svg {\n aspect-ratio: 1/1;\n height: 100%;\n width: 100%;\n}\n\n\n.animate-right-intro,\n .animate-right-outro {\n -webkit-transform: translateX(calc(100% + 50px));\n transform: translateX(calc(100% + 50px));\n }\n@tailwind utilities;\n\n/**\n * @prop --mds-modal-close-icon-color: Set the color of the close icon button to the top left.\n * @prop --mds-modal-overlay-color: Set the overlay color of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.\n * @prop --mds-modal-overlay-opacity: Set the overlay color opacity of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.\n * @prop --mds-modal-window-background: Set the background color of the window\n * @prop --mds-modal-window-overflow: Set the overflow of the window\n * @prop --mds-modal-window-shadow: Set the box shadow of the window\n * @prop --mds-modal-z-index: Set the z-index of the window when the component is opened\n */\n\n:host {\n\n --mds-modal-close-icon-color: rgb(var(--tone-neutral));\n --mds-modal-overlay-color: var(--magma-overlay-color, 0 0 0);\n --mds-modal-overlay-opacity: var(--magma-overlay-opacity, 0.5);\n --mds-modal-window-background: rgb(var(--tone-neutral));\n --mds-modal-window-overflow: auto;\n --mds-modal-window-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --mds-modal-z-index: var(--magma-modal-z-index);\n -webkit-transition-duration: 700ms;\n transition-duration: 700ms;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n\n -ms-flex-align: center;\n\n align-items: center;\n background-color: rgba(var(--mds-modal-overlay-color) / 0);\n display: -ms-flexbox;\n display: flex;\n fill: rgb(var(--tone-neutral));\n inset: 0;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-perspective: 600px;\n perspective: 600px;\n pointer-events: none;\n position: fixed;\n z-index: var(--mds-modal-z-index, 1000);\n}\n\n:host( [position=\"top\"] ) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host( [position=\"bottom\"] ) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host( .to-bottom-opened ),\n:host( .to-center-opened ),\n:host( .to-left-opened ),\n:host( .to-right-opened ),\n:host( .to-top-opened ) {\n -webkit-transition-duration: 500ms;\n transition-duration: 500ms;\n\n background-color: rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));\n pointer-events: auto;\n}\n\n.button-close {\n top: 0rem;\n border-radius: 9999px;\n opacity: 0;\n -webkit-transition-duration: 500ms;\n transition-duration: 500ms;\n -webkit-transition-timing-function: cubic-bezier(0.77, 0, 0.175, 1);\n transition-timing-function: cubic-bezier(0.77, 0, 0.175, 1);\n\n fill: var(--mds-modal-close-icon-color);\n --mds-button-background: transparent;\n\n height: auto;\n position: absolute;\n -webkit-transform: translate(0, 24px) rotate(90deg);\n transform: translate(0, 24px) rotate(90deg);\n -webkit-transform-origin: center;\n transform-origin: center;\n -webkit-transition-property: opacity, outline, outline-offset, -webkit-transform;\n transition-property: opacity, outline, outline-offset, -webkit-transform;\n transition-property: opacity, outline, outline-offset, transform;\n transition-property: opacity, outline, outline-offset, transform, -webkit-transform;\n}\n\n.button-close::part(icon) {\n height: 2.25rem;\n width: 2.25rem;\n}\n\n.window {\n height: 100%;\n gap: 0rem;\n\n background-color: var(--mds-modal-window-background);\n -webkit-box-shadow: var(--mds-modal-window-shadow);\n box-shadow: var(--mds-modal-window-shadow);\n display: grid;\n grid-template-rows: 1fr;\n max-width: calc(100vw - 80px);\n overflow: var(--mds-modal-window-overflow);\n}\n\n.window--top {\n grid-template-rows: auto 1fr;\n}\n\n.window--bottom {\n grid-template-rows: 1fr auto;\n}\n\n.window--top-bottom {\n grid-template-rows: auto 1fr auto;\n}\n\n/* xx */\n\n:host( .to-bottom ) {\n padding: 2rem;\n}\n\n@media (max-width: 767px) {\n :host( .to-bottom ) {\n padding: 1rem;\n }\n}\n\n:host( .to-bottom ) {\n\n -ms-flex-pack: center;\n\n justify-content: center;\n}\n\n:host( .to-bottom ) .window,\n:host( .to-bottom ) > ::slotted( [slot=\"window\"] ) {\n opacity: 0;\n -webkit-transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n -webkit-transition-duration: 500ms;\n transition-duration: 500ms;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n}\n\n:host( .to-bottom-intro ) .window,\n:host( .to-bottom-intro ) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) scale(0.5) translateY(40%);\n transform: rotateX(-22deg) scale(0.5) translateY(40%);\n }\n\n:host( .to-bottom-opened.to-bottom-outro ) .window,\n:host( .to-bottom-opened.to-bottom-outro ) > ::slotted( [slot=\"window\"] ),\n:host( .to-bottom-opened ) .window,\n:host( .to-bottom-opened ) > ::slotted( [slot=\"window\"] ) {\n opacity: 1;\n\n -webkit-transform: rotateX(0) scale(1) translateY(0);\n\n transform: rotateX(0) scale(1) translateY(0);\n}\n\n:host( .to-bottom-outro ) .window,\n:host( .to-bottom-outro ) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) scale(0.5) translateY(-40%);\n transform: rotateX(-22deg) scale(0.5) translateY(-40%);\n }\n\n:host( .to-center ) {\n padding: 2rem;\n}\n\n@media (max-width: 767px) {\n :host( .to-center ) {\n padding: 1rem;\n }\n}\n\n:host( .to-center ) {\n\n -ms-flex-pack: center;\n\n justify-content: center;\n}\n\n:host( .to-center ) .window,\n:host( .to-center ) > ::slotted( [slot=\"window\"] ) {\n opacity: 0;\n -webkit-transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n -webkit-transition-duration: 500ms;\n transition-duration: 500ms;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n}\n\n:host( .to-center-intro ) .window,\n:host( .to-center-intro ) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) scale(0.5) translateY(40%);\n transform: rotateX(-22deg) scale(0.5) translateY(40%);\n }\n\n:host( .to-center-opened.to-center-outro ) .window,\n:host( .to-center-opened.to-center-outro ) > ::slotted( [slot=\"window\"] ),\n:host( .to-center-opened ) .window,\n:host( .to-center-opened ) > ::slotted( [slot=\"window\"] ) {\n opacity: 1;\n\n -webkit-transform: rotateX(0) scale(1) translateY(0);\n\n transform: rotateX(0) scale(1) translateY(0);\n}\n\n:host( .to-center-outro ) .window,\n:host( .to-center-outro ) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) scale(0.5) translateY(-40%);\n transform: rotateX(-22deg) scale(0.5) translateY(-40%);\n }\n\n:host( .to-left ) {\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host( .to-left ) .window,\n:host( .to-left ) > ::slotted( [slot=\"window\"] ) {\n opacity: 0;\n -webkit-transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n -webkit-transition-duration: 500ms;\n transition-duration: 500ms;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n}\n\n:host( .to-left-intro ) .window,\n:host( .to-left-intro ) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: translateX(calc(-100% - 50px));\n transform: translateX(calc(-100% - 50px));\n }\n\n:host( .to-left-opened.to-left-outro ) .window,\n:host( .to-left-opened.to-left-outro ) > ::slotted( [slot=\"window\"] ),\n:host( .to-left-opened ) .window,\n:host( .to-left-opened ) > ::slotted( [slot=\"window\"] ) {\n opacity: 1;\n\n -webkit-transform: translateX(0);\n\n transform: translateX(0);\n}\n\n:host( .to-left-opened ) .button-close,\n:host( .to-left-opened.to-left-outro ) .button-close {\n opacity: 1;\n\n -webkit-transform: translate(-24px, 24px) rotate(0);\n\n transform: translate(-24px, 24px) rotate(0);\n}\n\n:host( .to-left-outro ) .window,\n:host( .to-left-outro ) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: translateX(calc(-100% - 50px));\n transform: translateX(calc(-100% - 50px));\n }\n\n:host( .to-left-outro ) .button-close {\n -webkit-transform: translate(24px, 24px) rotate(-90deg);\n transform: translate(24px, 24px) rotate(-90deg);\n}\n\n:host( .to-left ) .button-close {\n right: 0rem;\n\n -webkit-transform: translate(36px, 24px) rotate(90deg);\n\n transform: translate(36px, 24px) rotate(90deg);\n}\n\n:host( .to-right ) {\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host( .to-right ) .window,\n:host( .to-right ) > ::slotted([slot=\"window\"]) {\n opacity: 0;\n -webkit-transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n -webkit-transition-duration: 500ms;\n transition-duration: 500ms;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n}\n\n:host( .to-right-intro ) .window,\n:host( .to-right-intro ) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: translateX(calc(100% + 50px));\n transform: translateX(calc(100% + 50px));\n }\n\n:host( .to-right-opened.to-right-outro ) .window,\n:host( .to-right-opened.to-right-outro ) > ::slotted( [slot=\"window\"] ),\n:host( .to-right-opened ) .window,\n:host( .to-right-opened ) > ::slotted( [slot=\"window\"] ) {\n opacity: 1;\n\n -webkit-transform: translateX(0);\n\n transform: translateX(0);\n}\n\n:host( .to-right-opened ) .button-close,\n:host( .to-right-opened.to-right-outro ) .button-close {\n opacity: 1;\n\n -webkit-transform: translate(24px, 24px) rotate(0);\n\n transform: translate(24px, 24px) rotate(0);\n}\n\n:host( .to-right-outro ) .window,\n:host( .to-right-outro ) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: translateX(calc(100% + 50px));\n transform: translateX(calc(100% + 50px));\n }\n\n:host( .to-right-outro ) .button-close {\n -webkit-transform: translate(-24px, 24px) rotate(90deg);\n transform: translate(-24px, 24px) rotate(90deg);\n}\n\n:host( .to-right ) .button-close {\n left: 0rem;\n\n -webkit-transform: translate(-36px, 24px) rotate(-90deg);\n\n transform: translate(-36px, 24px) rotate(-90deg);\n}\n\n:host( .to-top ) {\n padding: 2rem;\n}\n\n@media (max-width: 767px) {\n :host( .to-top ) {\n padding: 1rem;\n }\n}\n\n:host( .to-top ) {\n\n -ms-flex-pack: center;\n\n justify-content: center;\n}\n\n:host( .to-top ) .window,\n:host( .to-top ) > ::slotted( [slot=\"window\"] ) {\n opacity: 0;\n -webkit-transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n -webkit-transition-duration: 500ms;\n transition-duration: 500ms;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n}\n\n:host( .to-top-intro ) .window,\n:host( .to-top-intro ) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) scale(0.5) translateY(40%);\n transform: rotateX(-22deg) scale(0.5) translateY(40%);\n }\n\n:host( .to-top-opened.to-top-outro ) .window,\n:host( .to-top-opened.to-top-outro ) > ::slotted( [slot=\"window\"] ),\n:host( .to-top-opened ) .window,\n:host( .to-top-opened ) > ::slotted( [slot=\"window\"] ) {\n opacity: 1;\n\n -webkit-transform: rotateX(0) scale(1) translateY(0);\n\n transform: rotateX(0) scale(1) translateY(0);\n}\n\n:host( .to-top-outro ) .window,\n:host( .to-top-outro ) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) scale(0.5) translateY(-40%);\n transform: rotateX(-22deg) scale(0.5) translateY(-40%);\n }\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .button-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .button-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --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);\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --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);\n }\n }\n}\n\n.static {\n position: static;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.flex {\n display: -ms-flexbox;\n display: flex;\n}\n\n.w-1600 {\n width: 4rem;\n}\n\n.min-w-0 {\n min-width: 0rem;\n}\n\n.max-w-lg {\n max-width: 32rem;\n}\n\n.max-w-xl {\n max-width: 36rem;\n}\n\n.flex-grow {\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n\n.items-center {\n -ms-flex-align: center;\n align-items: center;\n}\n\n.gap-400 {\n gap: 1rem;\n}\n\n.truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-0 {\n border-width: 0rem;\n}\n\n.border-b {\n border-bottom-width: 1px;\n}\n\n.border-t {\n border-top-width: 1px;\n}\n\n.border-solid {\n border-style: solid;\n}\n\n.border-tone-neutral-09 {\n --tw-border-opacity: 1;\n border-color: rgb(var(--tone-neutral-09) / var(--tw-border-opacity));\n}\n\n.bg-label-amaranth-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-amaranth-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-aqua-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-aqua-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-blue-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-blue-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-green-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-green-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-lime-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-lime-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-orange-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-orange-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-orchid-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-orchid-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-violet-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-violet-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-yellow-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-yellow-10) / var(--tw-bg-opacity));\n}\n\n.bg-tone-neutral-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--tone-neutral-10) / var(--tw-bg-opacity));\n}\n\n.fill-label-amaranth-04 {\n fill: rgb(var(--label-amaranth-04));\n}\n\n.fill-label-aqua-04 {\n fill: rgb(var(--label-aqua-04));\n}\n\n.fill-label-blue-04 {\n fill: rgb(var(--label-blue-04));\n}\n\n.fill-label-green-04 {\n fill: rgb(var(--label-green-04));\n}\n\n.fill-label-lime-04 {\n fill: rgb(var(--label-lime-04));\n}\n\n.fill-label-orange-04 {\n fill: rgb(var(--label-orange-04));\n}\n\n.fill-label-orchid-04 {\n fill: rgb(var(--label-orchid-04));\n}\n\n.fill-label-violet-04 {\n fill: rgb(var(--label-violet-04));\n}\n\n.fill-label-yellow-04 {\n fill: rgb(var(--label-yellow-04));\n}\n\n.fill-tone-neutral-04 {\n fill: rgb(var(--tone-neutral-04));\n}\n\n.p-800 {\n padding: 2rem;\n}\n\n.text-label-amaranth-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-amaranth-04) / var(--tw-text-opacity));\n}\n\n.text-label-aqua-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-aqua-04) / var(--tw-text-opacity));\n}\n\n.text-label-blue-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-blue-04) / var(--tw-text-opacity));\n}\n\n.text-label-green-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-green-04) / var(--tw-text-opacity));\n}\n\n.text-label-lime-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-lime-04) / var(--tw-text-opacity));\n}\n\n.text-label-orange-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-orange-04) / var(--tw-text-opacity));\n}\n\n.text-label-orchid-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-orchid-04) / var(--tw-text-opacity));\n}\n\n.text-label-violet-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-violet-04) / var(--tw-text-opacity));\n}\n\n.text-label-yellow-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-yellow-04) / var(--tw-text-opacity));\n}\n\n.text-tone-neutral-02 {\n --tw-text-opacity: 1;\n color: rgb(var(--tone-neutral-02) / var(--tw-text-opacity));\n}\n\n.text-tone-neutral-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--tone-neutral-04) / var(--tw-text-opacity));\n}\n\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n -webkit-box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --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);\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --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);\n }\n }\n}\n\n@media (max-width: 767px) {\n .mobile\\:w-1200 {\n width: 3rem;\n }\n}\n\n\n";
19
+ const mdsModalCss = "@-webkit-keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n @keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n /* included for focus effect */\n@tailwind components;\n@tailwind utilities;\n\n/**\n * @prop --mds-modal-close-icon-color: Set the color of the close icon button to the top left.\n * @prop --mds-modal-overlay-color: Set the overlay color of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.\n * @prop --mds-modal-overlay-opacity: Set the overlay color opacity of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.\n * @prop --mds-modal-window-background: Set the background color of the window\n * @prop --mds-modal-window-overflow: Set the overflow of the window\n * @prop --mds-modal-window-shadow: Set the box shadow of the window\n * @prop --mds-modal-z-index: Set the z-index of the window when the component is opened\n */\n\n:host {\n\n --mds-modal-overlay-color: var(--magma-overlay-color, 0 0 0);\n --mds-modal-overlay-opacity: var(--magma-overlay-opacity, 0.5);\n --mds-modal-transition-duration: 500ms;\n --mds-modal-transition-intro-ease: cubic-bezier(0.19, 1, 0.22, 1);\n --mds-modal-transition-outro-ease: cubic-bezier(0.86, 0, 0.07, 1);\n --mds-modal-window-background: rgb(var(--tone-neutral));\n --mds-modal-window-overflow: auto;\n --mds-modal-window-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --mds-modal-z-index: var(--magma-modal-z-index);\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n\n -ms-flex-align: center;\n\n align-items: center;\n background-color: rgba(var(--mds-modal-overlay-color) / 0);\n display: -ms-flexbox;\n display: flex;\n fill: rgb(var(--tone-neutral));\n inset: 0;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-perspective: 600px;\n perspective: 600px;\n pointer-events: none;\n position: fixed;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: background-color;\n transition-property: background-color;\n z-index: var(--mds-modal-z-index, 1000);\n}\n\n:host( [position=\"top\"] ) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host( [position=\"bottom\"] ) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.action-close {\n border-radius: 100px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, transform;\n transition-property: bottom, opacity, top, transform, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n}\n\n:host([opened]:not([opened=\"false\"])) .action-close {\n opacity: 1;\n pointer-events: auto;\n}\n\n.action-close::part(icon) {\n height: 2.25rem;\n width: 2.25rem;\n}\n\n.window {\n gap: 0rem;\n\n background-color: var(--mds-modal-window-background);\n -webkit-box-shadow: var(--mds-modal-window-shadow);\n box-shadow: var(--mds-modal-window-shadow);\n display: grid;\n grid-template-rows: 1fr;\n overflow: var(--mds-modal-window-overflow);\n}\n\n.window--top {\n grid-template-rows: auto 1fr;\n}\n\n.window--bottom {\n grid-template-rows: 1fr auto;\n}\n\n.window--top-bottom {\n grid-template-rows: auto 1fr auto;\n}\n\n:host {\n padding: 2rem;\n}\n\n@media (max-width: 767px) {\n :host {\n padding: 1rem;\n }\n}\n\n:host .window {\n margin: -2rem;\n}\n\n@media (max-width: 767px) {\n :host .window {\n margin: -1rem;\n }\n}\n\n:host .window {\n\n -webkit-transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n\n transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n}\n\n\n:host([opened]:not([opened=\"false\"]) ) {\n background-color: rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));\n pointer-events: auto;\n}\n\n:host .window,\n:host > ::slotted( [slot=\"window\"] ) {\n opacity: 0;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: opacity, -webkit-transform;\n transition-property: opacity, -webkit-transform;\n transition-property: transform, opacity;\n transition-property: transform, opacity, -webkit-transform;\n -webkit-transition-timing-function: var(--mds-modal-transition-outro-ease);\n transition-timing-function: var(--mds-modal-transition-outro-ease);\n}\n\n:host([opened]:not([opened=\"false\"]) ) .window,\n:host([opened]:not([opened=\"false\"]) ) > ::slotted( [slot=\"window\"] ) {\n opacity: 1;\n -webkit-transform: rotate(0) scale(1) translateY(0);\n transform: rotate(0) scale(1) translateY(0);\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-timing-function: var(--mds-modal-transition-intro-ease);\n transition-timing-function: var(--mds-modal-transition-intro-ease);\n}\n\n:host([position=\"bottom-left\"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"bottom-left\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"bottom-left\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position=\"bottom-left\"][opened=\"false\"]) .window,\n:host([position=\"bottom-left\"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position=\"bottom-right\"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"bottom-right\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"bottom-right\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position=\"bottom-right\"][opened=\"false\"]) .window,\n:host([position=\"bottom-right\"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position=\"bottom\"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"bottom\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"bottom\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n}\n\n:host([position=\"bottom\"][opened=\"false\"]) .window,\n:host([position=\"bottom\"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position=\"center\"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position=\"center\"]) .window {\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n}\n\n:host([position=\"center\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"center\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n}\n\n:host([position=\"center\"][opened=\"false\"]) .window,\n:host([position=\"center\"]:not([opened])) .window {\n -webkit-transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n}\n\n:host([position=\"left\"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position=\"left\"]) .window {\n height: 100dvh;\n max-width: calc(100vw - 80px);\n}\n\n:host([position=\"left\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"left\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n}\n\n:host([position=\"left\"][opened=\"false\"]) .window,\n:host([position=\"left\"]:not([opened])) .window {\n -webkit-transform: translate(-100%, 0%);\n transform: translate(-100%, 0%);\n}\n\n:host([position=\"left\"]) .action-close {\n right: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(-120%) rotate(-45deg);\n transform: translateX(-120%) rotate(-45deg);\n}\n\n:host([position=\"left\"][opened]:not([opened=\"false\"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position=\"right\"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position=\"right\"]) .window {\n height: 100dvh;\n max-width: calc(100vw - 80px);\n}\n\n:host([position=\"right\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"right\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n}\n\n:host([position=\"right\"][opened=\"false\"]) .window,\n:host([position=\"right\"]:not([opened])) .window {\n -webkit-transform: translate(100%, 0%);\n transform: translate(100%, 0%);\n}\n\n:host([position=\"right\"]) .action-close {\n left: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(120%) rotate(45deg);\n transform: translateX(120%) rotate(45deg);\n}\n\n:host([position=\"right\"][opened]:not([opened=\"false\"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position=\"top-left\"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"top-left\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"top-left\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position=\"top-left\"][opened=\"false\"]) .window,\n:host([position=\"top-left\"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n:host([position=\"top-right\"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"top-right\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"top-right\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position=\"top-right\"][opened=\"false\"]) .window,\n:host([position=\"top-right\"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position=\"top\"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position=\"bottom\"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position=\"top\"][opened=\"false\"]) > ::slotted( [slot=\"window\"] ),\n:host([position=\"top\"]:not([opened])) > ::slotted( [slot=\"window\"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n}\n\n:host([position=\"top\"][opened=\"false\"]) .window,\n:host([position=\"top\"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --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);\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --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);\n }\n }\n}\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --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);\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --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);\n }\n }\n}\n\n\n";
58
20
  const MdsModalStyle0 = mdsModalCss;
59
21
 
60
22
  const MdsModal = class {
61
23
  constructor(hostRef) {
62
24
  index.registerInstance(this, hostRef);
63
25
  this.closeEvent = index.createEvent(this, "mdsModalClose", 7);
26
+ this.hideEvent = index.createEvent(this, "mdsModalHide", 7);
64
27
  this.window = false;
65
28
  this.top = false;
66
29
  this.bottom = false;
67
- this.animationState = 'intro';
68
- this.km = new KeyboardManager();
69
- this.animationName = (customState = '', customPosition = '') => {
70
- return `to-${customPosition !== '' ? customPosition : this.position}${customState !== '' ? '-' + customState : ''}`;
30
+ this.updateCSSCustomProps = () => {
31
+ var _a;
32
+ const elementStyles = window.getComputedStyle(this.host);
33
+ this.cssTransitionDuration = (_a = elementStyles.getPropertyValue('--mds-modal-transition-duration')) !== null && _a !== void 0 ? _a : '500';
34
+ };
35
+ this.stopIntroAnimationWindow = () => {
36
+ this.animating = 'none';
37
+ this.host.setAttribute('animating', 'none'); // wtf?
38
+ clearTimeout(this.animationDelayTimeout);
39
+ };
40
+ this.stopOutroAnimationWindow = () => {
41
+ this.animating = 'none';
42
+ this.host.setAttribute('animating', 'none');
43
+ this.hideEvent.emit();
44
+ clearTimeout(this.animationDelayTimeout);
45
+ };
46
+ this.animateOpenWindow = () => {
47
+ this.animating = 'intro';
48
+ clearTimeout(this.animationDelayTimeout);
49
+ this.animationDelayTimeout = setTimeout(this.stopIntroAnimationWindow.bind(this), cssDurationToMilliseconds(this.cssTransitionDuration));
50
+ };
51
+ this.animateCloseWindow = () => {
52
+ this.animating = 'outro';
53
+ clearTimeout(this.animationDelayTimeout);
54
+ this.animationDelayTimeout = setTimeout(this.stopOutroAnimationWindow.bind(this), cssDurationToMilliseconds(this.cssTransitionDuration));
71
55
  };
72
56
  this.closeModal = (e) => {
73
57
  var _a;
@@ -79,57 +63,31 @@ const MdsModal = class {
79
63
  this.closeEvent.emit();
80
64
  }
81
65
  };
82
- this.stateOpened = undefined;
83
66
  this.opened = false;
84
67
  this.position = 'center';
68
+ this.animating = 'none';
85
69
  }
86
70
  componentWillLoad() {
87
71
  var _a;
88
72
  this.bottom = this.host.querySelector('[slot="bottom"]') !== null;
89
73
  this.top = this.host.querySelector('[slot="top"]') !== null;
90
74
  this.window = this.host.querySelector('[slot="window"]') !== null;
91
- this.stateOpened = this.opened;
92
- if (!this.window) {
93
- this.position = 'right';
94
- }
95
75
  if (this.window) {
96
76
  (_a = this.host.querySelector('[slot="window"]')) === null || _a === void 0 ? void 0 : _a.setAttribute('role', 'modal');
97
77
  }
98
78
  }
99
79
  componentWillRender() {
100
- this.animationState = this.opened ? 'intro' : 'outro';
101
- this.host.classList.add(this.animationName());
102
- }
103
- componentDidRender() {
104
- this.animationDeelay = window.setTimeout(() => {
105
- this.animationState = this.animationState === 'intro' ? 'outro' : 'intro';
106
- this.host.classList.remove(this.animationName(this.animationState === 'intro' ? 'outro' : 'intro'));
107
- this.host.classList.add(this.animationName(this.animationState));
108
- window.clearTimeout(this.animationDeelay);
109
- }, 500);
80
+ this.animating = this.opened ? 'intro' : 'outro';
110
81
  }
111
82
  componentDidLoad() {
112
- var _a;
113
- this.km.addElement(this.host, 'host');
114
- const close = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.close');
115
- if (close)
116
- this.km.addElement(close, 'close');
117
- this.km.attachEscapeBehavior(() => this.closeEvent.emit());
118
- this.km.attachClickBehavior('close');
83
+ this.updateCSSCustomProps();
119
84
  }
120
- disconnectedCallback() {
121
- this.km.detachEscapeBehavior();
122
- this.km.detachClickBehavior('close');
123
- }
124
- positionChange(_newValue, oldValue) {
125
- window.clearTimeout(this.animationDeelay);
126
- this.host.classList.remove(this.animationName('', oldValue));
127
- this.host.classList.remove(this.animationName('intro', oldValue));
128
- this.host.classList.remove(this.animationName('outro', oldValue));
129
- }
130
- openedChange(newValue) {
131
- this.stateOpened = newValue;
132
- window.clearTimeout(this.animationDeelay);
85
+ handleOpenProp(newValue) {
86
+ if (newValue) {
87
+ this.animateOpenWindow();
88
+ return;
89
+ }
90
+ this.animateCloseWindow();
133
91
  }
134
92
  onModalCloseListener() {
135
93
  this.opened = false;
@@ -138,16 +96,15 @@ const MdsModal = class {
138
96
  this.opened = false;
139
97
  }
140
98
  render() {
141
- return (index.h(index.Host, { key: 'a019a83e46044ef3f9a8a7ce067075572883eeb5', "aria-modal": clsx(this.opened ? 'true' : 'false'), class: clsx(this.stateOpened && this.animationName('opened')), onClick: (e) => { this.closeModal(e); } }, this.window
99
+ return (index.h(index.Host, { key: 'b47115bdc428fd9d0d7357ed96efd09ed7cf034f', "aria-modal": clsx(this.opened ? 'true' : 'false'), onClick: (e) => { this.closeModal(e); } }, this.window
142
100
  ? index.h("slot", { name: "window" })
143
101
  : index.h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), role: "dialog", part: "window" }, this.top &&
144
102
  index.h("slot", { name: "top" }), index.h("slot", null), this.bottom &&
145
- index.h("slot", { name: "bottom" })), !this.window && index.h("mds-button", { key: '85cd20e29302e815996cf1b736fc108c05f2ec4a', icon: miBaselineClose, onClick: (e) => { this.closeModal(e); }, class: "button-close" })));
103
+ index.h("slot", { name: "bottom" })), !this.window && index.h("mds-button", { key: 'f53c045a86dd3db6d1ca7cfdf07aa448b6278e9f', class: "action-close", icon: "mi/baseline/close", variant: "light", tone: "quiet", size: "xl", onClick: (e) => { this.closeModal(e); } })));
146
104
  }
147
105
  get host() { return index.getElement(this); }
148
106
  static get watchers() { return {
149
- "position": ["positionChange"],
150
- "opened": ["openedChange"]
107
+ "opened": ["handleOpenProp"]
151
108
  }; }
152
109
  };
153
110
  MdsModal.style = MdsModalStyle0;
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-6721d3e5.js');
5
+ const index = require('./index-7b5471f5.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.22.2 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-modal.cjs.js', document.baseURI).href));
@@ -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],"stateOpened":[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{"position":["positionChange"],"opened":["openedChange"]}]]]], options);
22
+ return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"position":[1537],"animating":[1537]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{"opened":["handleOpenProp"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.21.0",
8
- "typescriptVersion": "5.5.3"
7
+ "version": "4.22.2",
8
+ "typescriptVersion": "5.5.4"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -1,12 +1,13 @@
1
- import Handlebars from "handlebars";
1
+ import { render } from "mustache";
2
2
  export class Locale {
3
3
  constructor(configData) {
4
4
  this.rollbackLanguage = 'en';
5
5
  this.set = (configData) => {
6
6
  this.config = configData;
7
7
  };
8
- this.lang = (element) => {
9
- this.closestElement = element.closest('[lang]');
8
+ this.lang = (el) => {
9
+ this.element = el;
10
+ this.closestElement = this.element.closest('[lang]');
10
11
  if (this.closestElement) {
11
12
  if (this.closestElement.lang) {
12
13
  this.language = this.closestElement.lang;
@@ -16,6 +17,18 @@ export class Locale {
16
17
  this.language = this.rollbackLanguage;
17
18
  return this.language;
18
19
  };
20
+ this.update = (doc) => {
21
+ const context = doc !== null && doc !== void 0 ? doc : this.element.shadowRoot;
22
+ context && context.querySelectorAll('*').forEach(el => {
23
+ if (el.tagName.toLowerCase().startsWith('mds-')) {
24
+ // eslint-disable-next-line no-restricted-syntax
25
+ if (el && 'updateLang' in el) {
26
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
+ el.updateLang();
28
+ }
29
+ }
30
+ });
31
+ };
19
32
  this.pluralize = (tag, context) => {
20
33
  const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
21
34
  const phrases = [];
@@ -38,8 +51,7 @@ export class Locale {
38
51
  }
39
52
  }
40
53
  }
41
- const template = Handlebars.compile(translatePhrase);
42
- return template(context);
54
+ return render(translatePhrase, context);
43
55
  };
44
56
  this.get = (tag, context) => {
45
57
  if (context) {