@maggioli-design-system/mds-modal 4.7.1 → 4.7.3

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 (72) hide show
  1. package/dist/cjs/{index-1c3a970e.js → index-b3e2062a.js} +51 -31
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mds-modal.cjs.entry.js +130 -130
  4. package/dist/cjs/mds-modal.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +1 -1
  6. package/dist/collection/common/aria.js +18 -18
  7. package/dist/collection/common/keyboard-manager.js +38 -38
  8. package/dist/collection/common/unit.js +7 -7
  9. package/dist/collection/components/mds-modal/mds-modal.css +7 -30
  10. package/dist/collection/components/mds-modal/mds-modal.js +188 -188
  11. package/dist/collection/components/mds-modal/meta/dictionary.js +5 -5
  12. package/dist/collection/components/mds-modal/test/mds-modal.e2e.js +34 -34
  13. package/dist/collection/components/mds-modal/test/mds-modal.stories.js +16 -16
  14. package/dist/collection/dictionary/autocomplete.js +56 -56
  15. package/dist/collection/dictionary/button.js +19 -19
  16. package/dist/collection/dictionary/color.js +14 -14
  17. package/dist/collection/dictionary/floating-ui.js +14 -14
  18. package/dist/collection/dictionary/input.js +31 -15
  19. package/dist/collection/dictionary/loading.js +2 -2
  20. package/dist/collection/dictionary/typography.js +46 -46
  21. package/dist/collection/dictionary/variant.js +54 -54
  22. package/dist/collection/fixtures/cities.js +107 -107
  23. package/dist/components/mds-modal.d.ts +2 -2
  24. package/dist/components/mds-modal.js +150 -150
  25. package/dist/documentation.d.ts +1 -21
  26. package/dist/documentation.json +2 -2
  27. package/dist/esm/{index-a33ffd58.js → index-fd30d325.js} +51 -31
  28. package/dist/esm/loader.js +2 -2
  29. package/dist/esm/mds-modal.entry.js +130 -130
  30. package/dist/esm/mds-modal.js +3 -3
  31. package/dist/esm-es5/index-fd30d325.js +1 -0
  32. package/dist/esm-es5/loader.js +1 -1
  33. package/dist/esm-es5/mds-modal.entry.js +1 -1
  34. package/dist/esm-es5/mds-modal.js +1 -1
  35. package/dist/mds-modal/mds-modal.esm.js +1 -1
  36. package/dist/mds-modal/mds-modal.js +15 -15
  37. package/dist/mds-modal/p-14f0bf74.system.js +2 -0
  38. package/dist/mds-modal/p-59a0095c.system.entry.js +1 -0
  39. package/dist/mds-modal/p-6086db8a.entry.js +1 -0
  40. package/dist/mds-modal/{p-7ead5b8b.system.js → p-88c57c56.system.js} +1 -1
  41. package/dist/mds-modal/p-aff993b4.js +2 -0
  42. package/dist/stats.json +37 -34
  43. package/dist/types/common/keyboard-manager.d.ts +9 -9
  44. package/dist/types/components/mds-modal/test/mds-modal.stories.d.ts +20 -20
  45. package/dist/types/dictionary/input.d.ts +2 -1
  46. package/dist/types/interface/input-value.d.ts +1 -1
  47. package/dist/types/stencil-public-runtime.d.ts +8 -0
  48. package/documentation.json +14 -4
  49. package/package.json +4 -4
  50. package/src/components/mds-modal/css/mds-modal-animate-bottom.css +2 -2
  51. package/src/components/mds-modal/css/mds-modal-animate-center.css +2 -2
  52. package/src/components/mds-modal/css/mds-modal-animate-top.css +2 -2
  53. package/src/components/mds-modal/mds-modal.css +2 -2
  54. package/src/dictionary/input.ts +18 -0
  55. package/src/fixtures/icons.json +3 -0
  56. package/src/fixtures/iconsauce.json +3 -0
  57. package/www/build/mds-modal.esm.js +1 -1
  58. package/www/build/mds-modal.js +15 -15
  59. package/www/build/p-14f0bf74.system.js +2 -0
  60. package/www/build/p-59a0095c.system.entry.js +1 -0
  61. package/www/build/p-6086db8a.entry.js +1 -0
  62. package/www/build/{p-7ead5b8b.system.js → p-88c57c56.system.js} +1 -1
  63. package/www/build/p-aff993b4.js +2 -0
  64. package/dist/esm-es5/index-a33ffd58.js +0 -1
  65. package/dist/mds-modal/p-506f8ff7.system.js +0 -2
  66. package/dist/mds-modal/p-602c50be.js +0 -2
  67. package/dist/mds-modal/p-a0636f54.system.entry.js +0 -1
  68. package/dist/mds-modal/p-c5a84e4d.entry.js +0 -1
  69. package/www/build/p-506f8ff7.system.js +0 -2
  70. package/www/build/p-602c50be.js +0 -2
  71. package/www/build/p-a0636f54.system.entry.js +0 -1
  72. package/www/build/p-c5a84e4d.entry.js +0 -1
@@ -424,7 +424,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
424
424
  elm[memberName] = newValue;
425
425
  }
426
426
  }
427
- catch (e) { }
427
+ catch (e) {
428
+ /**
429
+ * in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
430
+ */
431
+ }
428
432
  }
429
433
  if (newValue == null || newValue === false) {
430
434
  if (newValue !== false || elm.getAttribute(memberName) === '') {
@@ -443,6 +447,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
443
447
  }
444
448
  };
445
449
  const parseClassListRegex = /\s/;
450
+ /**
451
+ * Parsed a string of classnames into an array
452
+ * @param value className string, e.g. "foo bar baz"
453
+ * @returns list of classes, e.g. ["foo", "bar", "baz"]
454
+ */
446
455
  const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
447
456
  const CAPTURE_EVENT_SUFFIX = 'Capture';
448
457
  const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
@@ -512,6 +521,9 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
512
521
  }
513
522
  }
514
523
  }
524
+ // This needs to always happen so we can hide nodes that are projected
525
+ // to another component but don't end up in a slot
526
+ elm['s-hn'] = hostTagName;
515
527
  return elm;
516
528
  };
517
529
  /**
@@ -635,8 +647,9 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
635
647
  * @param oldCh the old children of the parent node
636
648
  * @param newVNode the new VNode which will replace the parent
637
649
  * @param newCh the new children of the parent node
650
+ * @param isInitialRender whether or not this is the first render of the vdom
638
651
  */
639
- const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
652
+ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
640
653
  let oldStartIdx = 0;
641
654
  let newStartIdx = 0;
642
655
  let oldEndIdx = oldCh.length - 1;
@@ -660,25 +673,25 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
660
673
  else if (newEndVnode == null) {
661
674
  newEndVnode = newCh[--newEndIdx];
662
675
  }
663
- else if (isSameVnode(oldStartVnode, newStartVnode)) {
676
+ else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
664
677
  // if the start nodes are the same then we should patch the new VNode
665
678
  // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
666
679
  // indices to reflect that. We don't need to move any DOM Nodes around
667
680
  // since things are matched up in order.
668
- patch(oldStartVnode, newStartVnode);
681
+ patch(oldStartVnode, newStartVnode, isInitialRender);
669
682
  oldStartVnode = oldCh[++oldStartIdx];
670
683
  newStartVnode = newCh[++newStartIdx];
671
684
  }
672
- else if (isSameVnode(oldEndVnode, newEndVnode)) {
685
+ else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
673
686
  // likewise, if the end nodes are the same we patch new onto old and
674
687
  // decrement our end indices, and also likewise in this case we don't
675
688
  // need to move any DOM Nodes.
676
- patch(oldEndVnode, newEndVnode);
689
+ patch(oldEndVnode, newEndVnode, isInitialRender);
677
690
  oldEndVnode = oldCh[--oldEndIdx];
678
691
  newEndVnode = newCh[--newEndIdx];
679
692
  }
680
- else if (isSameVnode(oldStartVnode, newEndVnode)) {
681
- patch(oldStartVnode, newEndVnode);
693
+ else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
694
+ patch(oldStartVnode, newEndVnode, isInitialRender);
682
695
  // We need to move the element for `oldStartVnode` into a position which
683
696
  // will be appropriate for `newEndVnode`. For this we can use
684
697
  // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
@@ -700,8 +713,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
700
713
  oldStartVnode = oldCh[++oldStartIdx];
701
714
  newEndVnode = newCh[--newEndIdx];
702
715
  }
703
- else if (isSameVnode(oldEndVnode, newStartVnode)) {
704
- patch(oldEndVnode, newStartVnode);
716
+ else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
717
+ patch(oldEndVnode, newStartVnode, isInitialRender);
705
718
  // We've already checked above if `oldStartVnode` and `newStartVnode` are
706
719
  // the same node, so since we're here we know that they are not. Thus we
707
720
  // can move the element for `oldEndVnode` _before_ the element for
@@ -755,9 +768,10 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
755
768
  *
756
769
  * @param leftVNode the first VNode to check
757
770
  * @param rightVNode the second VNode to check
771
+ * @param isInitialRender whether or not this is the first render of the vdom
758
772
  * @returns whether they're equal or not
759
773
  */
760
- const isSameVnode = (leftVNode, rightVNode) => {
774
+ const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
761
775
  // compare if two vnode to see if they're "technically" the same
762
776
  // need to have the same element tag, and same key to be the same
763
777
  if (leftVNode.$tag$ === rightVNode.$tag$) {
@@ -772,8 +786,9 @@ const isSameVnode = (leftVNode, rightVNode) => {
772
786
  *
773
787
  * @param oldVNode an old VNode whose DOM element and children we want to update
774
788
  * @param newVNode a new VNode representing an updated version of the old one
789
+ * @param isInitialRender whether or not this is the first render of the vdom
775
790
  */
776
- const patch = (oldVNode, newVNode) => {
791
+ const patch = (oldVNode, newVNode, isInitialRender = false) => {
777
792
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
778
793
  const oldChildren = oldVNode.$children$;
779
794
  const newChildren = newVNode.$children$;
@@ -793,7 +808,7 @@ const patch = (oldVNode, newVNode) => {
793
808
  if (oldChildren !== null && newChildren !== null) {
794
809
  // looks like there's child vnodes for both the old and new vnodes
795
810
  // so we need to call `updateChildren` to reconcile them
796
- updateChildren(elm, oldChildren, newVNode, newChildren);
811
+ updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
797
812
  }
798
813
  else if (newChildren !== null) {
799
814
  // no old child vnodes, but there are new child vnodes to add
@@ -872,7 +887,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
872
887
  scopeId = hostElm['s-sc'];
873
888
  }
874
889
  // synchronous patch
875
- patch(oldVNode, rootVnode);
890
+ patch(oldVNode, rootVnode, isInitialLoad);
876
891
  };
877
892
  const attachToAncestor = (hostRef, ancestorComponent) => {
878
893
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
@@ -1186,13 +1201,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1186
1201
  */
1187
1202
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1188
1203
  var _a;
1204
+ const prototype = Cstr.prototype;
1189
1205
  if (cmpMeta.$members$) {
1190
1206
  if (Cstr.watchers) {
1191
1207
  cmpMeta.$watchers$ = Cstr.watchers;
1192
1208
  }
1193
1209
  // It's better to have a const than two Object.entries()
1194
1210
  const members = Object.entries(cmpMeta.$members$);
1195
- const prototype = Cstr.prototype;
1196
1211
  members.map(([memberName, [memberFlags]]) => {
1197
1212
  if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1198
1213
  ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
@@ -1215,6 +1230,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1215
1230
  const attrNameToPropName = new Map();
1216
1231
  prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1217
1232
  plt.jmp(() => {
1233
+ var _a;
1218
1234
  const propName = attrNameToPropName.get(attrName);
1219
1235
  // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1220
1236
  // in the case where an attribute was set inline.
@@ -1270,11 +1286,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1270
1286
  // 1. The instance is ready
1271
1287
  // 2. The watchers are ready
1272
1288
  // 3. The value has changed
1273
- if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1289
+ if (flags &&
1290
+ !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1274
1291
  flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1275
1292
  newValue !== oldValue) {
1276
1293
  const instance = hostRef.$lazyInstance$ ;
1277
- const entry = cmpMeta.$watchers$[attrName];
1294
+ const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
1278
1295
  entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1279
1296
  if (instance[callbackName] != null) {
1280
1297
  instance[callbackName].call(instance, newValue, oldValue, attrName);
@@ -1296,10 +1313,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1296
1313
  ...members
1297
1314
  .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
1298
1315
  .map(([propName, m]) => {
1316
+ var _a;
1299
1317
  const attrName = m[1] || propName;
1300
1318
  attrNameToPropName.set(attrName, propName);
1301
1319
  if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1302
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
1320
+ (_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);
1303
1321
  }
1304
1322
  return attrName;
1305
1323
  }),
@@ -1572,12 +1590,14 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1572
1590
  // If we have styles, add them to the DOM
1573
1591
  if (dataStyles.innerHTML.length) {
1574
1592
  dataStyles.setAttribute('data-styles', '');
1575
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1576
1593
  // Apply CSP nonce to the style tag if it exists
1577
1594
  const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1578
1595
  if (nonce != null) {
1579
1596
  dataStyles.setAttribute('nonce', nonce);
1580
1597
  }
1598
+ // Insert the styles into the document head
1599
+ // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
1600
+ head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1581
1601
  }
1582
1602
  // Process deferred connectedCallbacks now all components have been registered
1583
1603
  isBootstrapping = false;
@@ -1690,19 +1710,19 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1690
1710
  return module[exportName];
1691
1711
  }
1692
1712
 
1693
- if (!hmrVersionId || !BUILD.hotModuleReplacement) {
1694
- const processMod = importedModule => {
1695
- cmpModules.set(bundleId, importedModule);
1696
- return importedModule[exportName];
1697
- }
1698
- switch(bundleId) {
1699
-
1700
- case 'mds-modal.cjs':
1701
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1702
- /* webpackMode: "lazy" */
1703
- './mds-modal.cjs.entry.js')); }).then(processMod, consoleError);
1713
+ if (!hmrVersionId || !BUILD.hotModuleReplacement) {
1714
+ const processMod = importedModule => {
1715
+ cmpModules.set(bundleId, importedModule);
1716
+ return importedModule[exportName];
1717
+ }
1718
+ switch(bundleId) {
1719
+
1720
+ case 'mds-modal.cjs':
1721
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1722
+ /* webpackMode: "lazy" */
1723
+ './mds-modal.cjs.entry.js')); }).then(processMod, consoleError);
1724
+ }
1704
1725
  }
1705
- }
1706
1726
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1707
1727
  /* @vite-ignore */
1708
1728
  /* webpackInclude: /\.entry\.js$/ */
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1c3a970e.js');
5
+ const index = require('./index-b3e2062a.js');
6
6
 
7
7
  const defineCustomElements = (win, options) => {
8
8
  if (typeof window === 'undefined') return undefined;
@@ -2,147 +2,147 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1c3a970e.js');
5
+ const index = require('./index-b3e2062a.js');
6
6
 
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))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
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
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
10
 
11
11
  class KeyboardManager {
12
- constructor() {
13
- this.elements = [];
14
- this.handleClickBehaviorDispatchEvent = (event) => {
15
- if (event.code === 'Space' || 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
- this.elements[name] = el;
26
- };
27
- this.attachClickBehavior = (name = 'element') => {
28
- if (this.elements[name]) {
29
- this.elements[name].addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
30
- }
31
- };
32
- this.detachClickBehavior = (name = 'element') => {
33
- if (this.elements[name]) {
34
- this.elements[name].removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
35
- }
36
- };
37
- this.attachEscapeBehavior = (callBack) => {
38
- this.escapeCallback = callBack;
39
- if (window !== undefined) {
40
- window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
41
- }
42
- };
43
- this.detachEscapeBehavior = () => {
44
- this.escapeCallback = () => { return; };
45
- if (window !== undefined) {
46
- window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
47
- }
48
- };
49
- }
12
+ constructor() {
13
+ this.elements = [];
14
+ this.handleClickBehaviorDispatchEvent = (event) => {
15
+ if (event.code === 'Space' || 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
+ this.elements[name] = el;
26
+ };
27
+ this.attachClickBehavior = (name = 'element') => {
28
+ if (this.elements[name]) {
29
+ this.elements[name].addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
30
+ }
31
+ };
32
+ this.detachClickBehavior = (name = 'element') => {
33
+ if (this.elements[name]) {
34
+ this.elements[name].removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
35
+ }
36
+ };
37
+ this.attachEscapeBehavior = (callBack) => {
38
+ this.escapeCallback = callBack;
39
+ if (window !== undefined) {
40
+ window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
41
+ }
42
+ };
43
+ this.detachEscapeBehavior = () => {
44
+ this.escapeCallback = () => { return; };
45
+ if (window !== undefined) {
46
+ window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
47
+ }
48
+ };
49
+ }
50
50
  }
51
51
 
52
- const mdsModalCss = "@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset)}50%{outline-offset:var(--magma-outline-blur-offset)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset)}50%{outline-offset:var(--magma-outline-blur-offset)}}@tailwind components; @tailwind utilities; .svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1 / 1;height:100%;width:100%}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}.fixed{position:fixed}.absolute{position:absolute}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.ml-auto{margin-left:auto}.flex{display:-ms-flexbox;display:flex}.w-16{width:4rem}.min-w-0{min-width:0px}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.items-center{-ms-flex-align:center;align-items:center}.gap-4{gap:1rem}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-tone-neutral-09{--tw-border-opacity:1;border-color:rgb(var(--tone-neutral-09) / var(--tw-border-opacity))}.bg-transparent{background-color:transparent}.p-4{padding:1rem}.p-8{padding:2rem}.text-tone-neutral-02{--tw-text-opacity:1;color:rgb(var(--tone-neutral-02) / var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgb(var(--tone-neutral-04) / var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-overflow:auto;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);-webkit-transition-duration:700ms;transition-duration:700ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;z-index:var(--mds-modal-z-index, 1000)}:host([position=\"top\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=\"bottom\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host(.to-bottom-opened),:host(.to-center-opened),:host(.to-left-opened),:host(.to-right-opened),:host(.to-top-opened){-webkit-transition-duration:500ms;transition-duration:500ms;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}.close{top:0px;height:2.25rem;width:2.25rem;border-radius:9999px;font-size:2.25rem;line-height:2.5rem;opacity:0;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);cursor:pointer;fill:inherit;position:absolute;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-webkit-transform-origin:center;transform-origin:center;-webkit-transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, transform;transition-property:opacity, outline, outline-offset, transform, -webkit-transform}.window{height:100%;gap:0px;background-color:var(--mds-modal-window-background);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;max-width:calc(100vw - 80px);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(.to-bottom){padding:2rem}@media (max-width: 767px){:host(.to-bottom){padding:1rem}}:host(.to-bottom){-ms-flex-pack:center;justify-content:center}:host(.to-bottom) .window,:host(.to-bottom)>::slotted([slot=\"window\"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-bottom-intro) .window,:host(.to-bottom-intro)>::slotted([slot=\"window\"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-bottom-opened.to-bottom-outro) .window,:host(.to-bottom-opened.to-bottom-outro)>::slotted([slot=\"window\"]),:host(.to-bottom-opened) .window,:host(.to-bottom-opened)>::slotted([slot=\"window\"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-bottom-outro) .window,:host(.to-bottom-outro)>::slotted([slot=\"window\"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-center){padding:2rem}@media (max-width: 767px){:host(.to-center){padding:1rem}}:host(.to-center){-ms-flex-pack:center;justify-content:center}:host(.to-center) .window,:host(.to-center)>::slotted([slot=\"window\"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-center-intro) .window,:host(.to-center-intro)>::slotted([slot=\"window\"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-center-opened.to-center-outro) .window,:host(.to-center-opened.to-center-outro)>::slotted([slot=\"window\"]),:host(.to-center-opened) .window,:host(.to-center-opened)>::slotted([slot=\"window\"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-center-outro) .window,:host(.to-center-outro)>::slotted([slot=\"window\"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-left){-ms-flex-pack:start;justify-content:flex-start}:host(.to-left) .window,:host(.to-left)>::slotted([slot=\"window\"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-left-intro) .window,:host(.to-left-intro)>::slotted([slot=\"window\"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-opened.to-left-outro) .window,:host(.to-left-opened.to-left-outro)>::slotted([slot=\"window\"]),:host(.to-left-opened) .window,:host(.to-left-opened)>::slotted([slot=\"window\"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-left-opened) .close,:host(.to-left-opened.to-left-outro) .close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.to-left-outro) .window,:host(.to-left-outro)>::slotted([slot=\"window\"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-outro) .close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.to-left) .close{right:0px;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}:host(.to-right){-ms-flex-pack:end;justify-content:flex-end}:host(.to-right) .window,:host(.to-right)>::slotted([slot=\"window\"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-right-intro) .window,:host(.to-right-intro)>::slotted([slot=\"window\"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-opened.to-right-outro) .window,:host(.to-right-opened.to-right-outro)>::slotted([slot=\"window\"]),:host(.to-right-opened) .window,:host(.to-right-opened)>::slotted([slot=\"window\"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-right-opened) .close,:host(.to-right-opened.to-right-outro) .close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.to-right-outro) .window,:host(.to-right-outro)>::slotted([slot=\"window\"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-outro) .close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.to-right) .close{left:0px;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.to-top){padding:2rem}@media (max-width: 767px){:host(.to-top){padding:1rem}}:host(.to-top){-ms-flex-pack:center;justify-content:center}:host(.to-top) .window,:host(.to-top)>::slotted([slot=\"window\"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-top-intro) .window,:host(.to-top-intro)>::slotted([slot=\"window\"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-top-opened.to-top-outro) .window,:host(.to-top-opened.to-top-outro)>::slotted([slot=\"window\"]),:host(.to-top-opened) .window,:host(.to-top-opened)>::slotted([slot=\"window\"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-top-outro) .window,:host(.to-top-outro)>::slotted([slot=\"window\"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}@media (max-width: 767px){.mobile\\:w-12{width:3rem}}";
52
+ const mdsModalCss = "@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset)}50%{outline-offset:var(--magma-outline-blur-offset)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset)}50%{outline-offset:var(--magma-outline-blur-offset)}}@tailwind components; @tailwind utilities; .svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1/1;height:100%;width:100%}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}.fixed{position:fixed}.absolute{position:absolute}.ml-auto{margin-left:auto}.flex{display:-ms-flexbox;display:flex}.min-w-0{min-width:0rem}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.items-center{-ms-flex-align:center;align-items:center}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-tone-neutral-09{--tw-border-opacity:1;border-color:rgb(var(--tone-neutral-09) / var(--tw-border-opacity))}.bg-transparent{background-color:transparent}.text-tone-neutral-02{--tw-text-opacity:1;color:rgb(var(--tone-neutral-02) / var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgb(var(--tone-neutral-04) / var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-overflow:auto;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);-webkit-transition-duration:700ms;transition-duration:700ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;z-index:var(--mds-modal-z-index, 1000)}:host([position=\"top\"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position=\"bottom\"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host(.to-bottom-opened),:host(.to-center-opened),:host(.to-left-opened),:host(.to-right-opened),:host(.to-top-opened){-webkit-transition-duration:500ms;transition-duration:500ms;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}.close{top:0rem;height:2.25rem;width:2.25rem;border-radius:9999px;font-size:3rem;opacity:0;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);cursor:pointer;fill:inherit;position:absolute;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-webkit-transform-origin:center;transform-origin:center;-webkit-transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, transform;transition-property:opacity, outline, outline-offset, transform, -webkit-transform}.window{height:100%;gap:0rem;background-color:var(--mds-modal-window-background);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;max-width:calc(100vw - 80px);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(.to-bottom){padding:2rem}@media (max-width: 767px){:host(.to-bottom){padding:1rem}}:host(.to-bottom){-ms-flex-pack:center;justify-content:center}:host(.to-bottom) .window,:host(.to-bottom)>::slotted([slot=\"window\"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-bottom-intro) .window,:host(.to-bottom-intro)>::slotted([slot=\"window\"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-bottom-opened.to-bottom-outro) .window,:host(.to-bottom-opened.to-bottom-outro)>::slotted([slot=\"window\"]),:host(.to-bottom-opened) .window,:host(.to-bottom-opened)>::slotted([slot=\"window\"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-bottom-outro) .window,:host(.to-bottom-outro)>::slotted([slot=\"window\"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-center){padding:2rem}@media (max-width: 767px){:host(.to-center){padding:1rem}}:host(.to-center){-ms-flex-pack:center;justify-content:center}:host(.to-center) .window,:host(.to-center)>::slotted([slot=\"window\"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-center-intro) .window,:host(.to-center-intro)>::slotted([slot=\"window\"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-center-opened.to-center-outro) .window,:host(.to-center-opened.to-center-outro)>::slotted([slot=\"window\"]),:host(.to-center-opened) .window,:host(.to-center-opened)>::slotted([slot=\"window\"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-center-outro) .window,:host(.to-center-outro)>::slotted([slot=\"window\"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-left){-ms-flex-pack:start;justify-content:flex-start}:host(.to-left) .window,:host(.to-left)>::slotted([slot=\"window\"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-left-intro) .window,:host(.to-left-intro)>::slotted([slot=\"window\"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-opened.to-left-outro) .window,:host(.to-left-opened.to-left-outro)>::slotted([slot=\"window\"]),:host(.to-left-opened) .window,:host(.to-left-opened)>::slotted([slot=\"window\"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-left-opened) .close,:host(.to-left-opened.to-left-outro) .close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.to-left-outro) .window,:host(.to-left-outro)>::slotted([slot=\"window\"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-outro) .close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.to-left) .close{right:0rem;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}:host(.to-right){-ms-flex-pack:end;justify-content:flex-end}:host(.to-right) .window,:host(.to-right)>::slotted([slot=\"window\"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-right-intro) .window,:host(.to-right-intro)>::slotted([slot=\"window\"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-opened.to-right-outro) .window,:host(.to-right-opened.to-right-outro)>::slotted([slot=\"window\"]),:host(.to-right-opened) .window,:host(.to-right-opened)>::slotted([slot=\"window\"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-right-opened) .close,:host(.to-right-opened.to-right-outro) .close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.to-right-outro) .window,:host(.to-right-outro)>::slotted([slot=\"window\"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-outro) .close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.to-right) .close{left:0rem;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.to-top){padding:2rem}@media (max-width: 767px){:host(.to-top){padding:1rem}}:host(.to-top){-ms-flex-pack:center;justify-content:center}:host(.to-top) .window,:host(.to-top)>::slotted([slot=\"window\"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-top-intro) .window,:host(.to-top-intro)>::slotted([slot=\"window\"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-top-opened.to-top-outro) .window,:host(.to-top-opened.to-top-outro)>::slotted([slot=\"window\"]),:host(.to-top-opened) .window,:host(.to-top-opened)>::slotted([slot=\"window\"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-top-outro) .window,:host(.to-top-outro)>::slotted([slot=\"window\"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}";
53
53
 
54
54
  const MdsModal = class {
55
- constructor(hostRef) {
56
- index.registerInstance(this, hostRef);
57
- this.closeEvent = index.createEvent(this, "mdsModalClose", 7);
58
- this.window = false;
59
- this.top = false;
60
- this.bottom = false;
61
- this.animationState = 'intro';
62
- this.km = new KeyboardManager();
63
- this.componentDidLoad = () => {
64
- var _a;
65
- this.km.addElement(this.host, 'host');
66
- const close = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.close');
67
- if (close)
68
- this.km.addElement(close, 'close');
69
- this.km.attachEscapeBehavior(() => this.closeEvent.emit());
70
- this.km.attachClickBehavior('close');
71
- };
72
- this.animationName = (customState = '', customPosition = '') => {
73
- return `to-${customPosition !== '' ? customPosition : this.position}${customState !== '' ? '-' + customState : ''}`;
74
- };
75
- this.closeModal = (e) => {
76
- var _a;
77
- if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.localName) !== 'mds-modal') {
78
- return;
79
- }
80
- this.opened = e.target !== e.currentTarget;
81
- if (!this.opened) {
82
- this.closeEvent.emit();
83
- }
84
- };
85
- this.stateOpened = undefined;
86
- this.opened = false;
87
- this.position = 'center';
88
- }
89
- componentWillLoad() {
90
- var _a;
91
- this.bottom = this.host.querySelector('[slot="bottom"]') !== null;
92
- this.top = this.host.querySelector('[slot="top"]') !== null;
93
- this.window = this.host.querySelector('[slot="window"]') !== null;
94
- this.stateOpened = this.opened;
95
- if (!this.window) {
96
- this.position = 'right';
55
+ constructor(hostRef) {
56
+ index.registerInstance(this, hostRef);
57
+ this.closeEvent = index.createEvent(this, "mdsModalClose", 7);
58
+ this.window = false;
59
+ this.top = false;
60
+ this.bottom = false;
61
+ this.animationState = 'intro';
62
+ this.km = new KeyboardManager();
63
+ this.componentDidLoad = () => {
64
+ var _a;
65
+ this.km.addElement(this.host, 'host');
66
+ const close = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.close');
67
+ if (close)
68
+ this.km.addElement(close, 'close');
69
+ this.km.attachEscapeBehavior(() => this.closeEvent.emit());
70
+ this.km.attachClickBehavior('close');
71
+ };
72
+ this.animationName = (customState = '', customPosition = '') => {
73
+ return `to-${customPosition !== '' ? customPosition : this.position}${customState !== '' ? '-' + customState : ''}`;
74
+ };
75
+ this.closeModal = (e) => {
76
+ var _a;
77
+ if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.localName) !== 'mds-modal') {
78
+ return;
79
+ }
80
+ this.opened = e.target !== e.currentTarget;
81
+ if (!this.opened) {
82
+ this.closeEvent.emit();
83
+ }
84
+ };
85
+ this.stateOpened = undefined;
86
+ this.opened = false;
87
+ this.position = 'center';
88
+ }
89
+ componentWillLoad() {
90
+ var _a;
91
+ this.bottom = this.host.querySelector('[slot="bottom"]') !== null;
92
+ this.top = this.host.querySelector('[slot="top"]') !== null;
93
+ this.window = this.host.querySelector('[slot="window"]') !== null;
94
+ this.stateOpened = this.opened;
95
+ if (!this.window) {
96
+ this.position = 'right';
97
+ }
98
+ if (this.window) {
99
+ (_a = this.host.querySelector('[slot="window"]')) === null || _a === void 0 ? void 0 : _a.setAttribute('role', 'modal');
100
+ }
101
+ }
102
+ componentWillRender() {
103
+ this.animationState = this.opened ? 'intro' : 'outro';
104
+ this.host.classList.add(this.animationName());
105
+ }
106
+ componentDidRender() {
107
+ this.animationDeelay = window.setTimeout(() => {
108
+ this.animationState = this.animationState === 'intro' ? 'outro' : 'intro';
109
+ this.host.classList.remove(this.animationName(this.animationState === 'intro' ? 'outro' : 'intro'));
110
+ this.host.classList.add(this.animationName(this.animationState));
111
+ window.clearTimeout(this.animationDeelay);
112
+ }, 500);
113
+ }
114
+ disconnectedCallback() {
115
+ this.km.detachEscapeBehavior();
116
+ this.km.detachClickBehavior('close');
117
+ }
118
+ positionChange(_newValue, oldValue) {
119
+ window.clearTimeout(this.animationDeelay);
120
+ this.host.classList.remove(this.animationName('', oldValue));
121
+ this.host.classList.remove(this.animationName('intro', oldValue));
122
+ this.host.classList.remove(this.animationName('outro', oldValue));
123
+ }
124
+ openedChange(newValue) {
125
+ this.stateOpened = newValue;
126
+ window.clearTimeout(this.animationDeelay);
127
+ }
128
+ onModalCloseListener() {
129
+ this.opened = false;
130
+ }
131
+ onBannerCloseListener() {
132
+ this.opened = false;
97
133
  }
98
- if (this.window) {
99
- (_a = this.host.querySelector('[slot="window"]')) === null || _a === void 0 ? void 0 : _a.setAttribute('role', 'modal');
134
+ render() {
135
+ return (index.h(index.Host, { "aria-modal": clsx(this.opened ? 'true' : 'false'), class: clsx(this.stateOpened && this.animationName('opened')), onClick: (e) => { this.closeModal(e); } }, this.window
136
+ ? index.h("slot", { name: "window" })
137
+ : index.h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), role: "dialog", part: "window" }, this.top &&
138
+ index.h("slot", { name: "top" }), index.h("slot", null), this.bottom &&
139
+ index.h("slot", { name: "bottom" })), !this.window && index.h("i", { innerHTML: miBaselineClose, tabindex: "0", onClick: (e) => { this.closeModal(e); }, class: "svg close focus-bounce-light" })));
100
140
  }
101
- }
102
- componentWillRender() {
103
- this.animationState = this.opened ? 'intro' : 'outro';
104
- this.host.classList.add(this.animationName());
105
- }
106
- componentDidRender() {
107
- this.animationDeelay = window.setTimeout(() => {
108
- this.animationState = this.animationState === 'intro' ? 'outro' : 'intro';
109
- this.host.classList.remove(this.animationName(this.animationState === 'intro' ? 'outro' : 'intro'));
110
- this.host.classList.add(this.animationName(this.animationState));
111
- window.clearTimeout(this.animationDeelay);
112
- }, 500);
113
- }
114
- disconnectedCallback() {
115
- this.km.detachEscapeBehavior();
116
- this.km.detachClickBehavior('close');
117
- }
118
- positionChange(_newValue, oldValue) {
119
- window.clearTimeout(this.animationDeelay);
120
- this.host.classList.remove(this.animationName('', oldValue));
121
- this.host.classList.remove(this.animationName('intro', oldValue));
122
- this.host.classList.remove(this.animationName('outro', oldValue));
123
- }
124
- openedChange(newValue) {
125
- this.stateOpened = newValue;
126
- window.clearTimeout(this.animationDeelay);
127
- }
128
- onModalCloseListener() {
129
- this.opened = false;
130
- }
131
- onBannerCloseListener() {
132
- this.opened = false;
133
- }
134
- render() {
135
- return (index.h(index.Host, { "aria-modal": clsx(this.opened ? 'true' : 'false'), class: clsx(this.stateOpened && this.animationName('opened')), onClick: (e) => { this.closeModal(e); } }, this.window
136
- ? index.h("slot", { name: "window" })
137
- : index.h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`), role: "dialog", part: "window" }, this.top &&
138
- index.h("slot", { name: "top" }), index.h("slot", null), this.bottom &&
139
- index.h("slot", { name: "bottom" })), !this.window && index.h("i", { innerHTML: miBaselineClose, tabindex: "0", onClick: (e) => { this.closeModal(e); }, class: "svg close focus-bounce-light" })));
140
- }
141
- get host() { return index.getElement(this); }
142
- static get watchers() { return {
143
- "position": ["positionChange"],
144
- "opened": ["openedChange"]
145
- }; }
141
+ get host() { return index.getElement(this); }
142
+ static get watchers() { return {
143
+ "position": ["positionChange"],
144
+ "opened": ["openedChange"]
145
+ }; }
146
146
  };
147
147
  MdsModal.style = mdsModalCss;
148
148
 
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1c3a970e.js');
5
+ const index = require('./index-b3e2062a.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Browser v4.7.2 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v4.9.1 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchBrowser = () => {
11
11
  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));
@@ -4,7 +4,7 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.7.2",
7
+ "version": "4.9.1",
8
8
  "typescriptVersion": "5.2.2"
9
9
  },
10
10
  "collections": [],