@maggioli-design-system/mds-modal 4.7.0 → 4.7.2

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 (71) hide show
  1. package/dist/cjs/{index-a75ae767.js → index-95c329c0.js} +60 -23
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mds-modal.cjs.entry.js +129 -129
  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 +8 -27
  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 +149 -149
  25. package/dist/documentation.json +2 -2
  26. package/dist/esm/{index-67f67ae4.js → index-2bd481c0.js} +60 -23
  27. package/dist/esm/loader.js +2 -2
  28. package/dist/esm/mds-modal.entry.js +129 -129
  29. package/dist/esm/mds-modal.js +3 -3
  30. package/dist/esm-es5/index-2bd481c0.js +1 -0
  31. package/dist/esm-es5/loader.js +1 -1
  32. package/dist/esm-es5/mds-modal.entry.js +1 -1
  33. package/dist/esm-es5/mds-modal.js +1 -1
  34. package/dist/mds-modal/mds-modal.esm.js +1 -1
  35. package/dist/mds-modal/mds-modal.js +15 -15
  36. package/dist/mds-modal/p-0a4de21e.system.js +2 -0
  37. package/dist/mds-modal/p-2f9a631d.js +2 -0
  38. package/dist/mds-modal/p-68c3fe7d.system.entry.js +1 -0
  39. package/dist/mds-modal/{p-8b71f825.system.js → p-969424eb.system.js} +1 -1
  40. package/dist/mds-modal/p-fe6df5e2.entry.js +1 -0
  41. package/dist/stats.json +30 -30
  42. package/dist/types/common/keyboard-manager.d.ts +9 -9
  43. package/dist/types/components/mds-modal/test/mds-modal.stories.d.ts +20 -20
  44. package/dist/types/dictionary/input.d.ts +2 -1
  45. package/dist/types/interface/input-value.d.ts +1 -1
  46. package/dist/types/stencil-public-runtime.d.ts +8 -0
  47. package/documentation.json +14 -4
  48. package/package.json +3 -3
  49. package/src/components/mds-modal/css/mds-modal-animate-bottom.css +2 -2
  50. package/src/components/mds-modal/css/mds-modal-animate-center.css +2 -2
  51. package/src/components/mds-modal/css/mds-modal-animate-top.css +2 -2
  52. package/src/components/mds-modal/mds-modal.css +2 -2
  53. package/src/dictionary/input.ts +18 -0
  54. package/src/fixtures/icons.json +3 -0
  55. package/src/fixtures/iconsauce.json +3 -0
  56. package/www/build/mds-modal.esm.js +1 -1
  57. package/www/build/mds-modal.js +15 -15
  58. package/www/build/p-0a4de21e.system.js +2 -0
  59. package/www/build/p-2f9a631d.js +2 -0
  60. package/www/build/p-68c3fe7d.system.entry.js +1 -0
  61. package/www/build/{p-8b71f825.system.js → p-969424eb.system.js} +1 -1
  62. package/www/build/p-fe6df5e2.entry.js +1 -0
  63. package/dist/esm-es5/index-67f67ae4.js +0 -1
  64. package/dist/mds-modal/p-7a54ebc0.system.entry.js +0 -1
  65. package/dist/mds-modal/p-9bfc9516.js +0 -2
  66. package/dist/mds-modal/p-e765d0c2.entry.js +0 -1
  67. package/dist/mds-modal/p-f6c96de9.system.js +0 -2
  68. package/www/build/p-7a54ebc0.system.entry.js +0 -1
  69. package/www/build/p-9bfc9516.js +0 -2
  70. package/www/build/p-e765d0c2.entry.js +0 -1
  71. package/www/build/p-f6c96de9.system.js +0 -2
@@ -49,6 +49,13 @@ const uniqueTime = (key, measureText) => {
49
49
  }
50
50
  };
51
51
  const HYDRATED_CSS = '{visibility:hidden}[hydrated]{visibility:inherit}';
52
+ /**
53
+ * Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
54
+ *
55
+ * Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
56
+ * support as of Stencil v4.
57
+ */
58
+ const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
52
59
  /**
53
60
  * Default style mode id
54
61
  */
@@ -282,6 +289,10 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
282
289
  }
283
290
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
284
291
  }
292
+ // Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
293
+ if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
294
+ styleElm.innerHTML += SLOT_FB_CSS;
295
+ }
285
296
  if (appliedStyles) {
286
297
  appliedStyles.add(scopeId);
287
298
  }
@@ -413,7 +424,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
413
424
  elm[memberName] = newValue;
414
425
  }
415
426
  }
416
- 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
+ }
417
432
  }
418
433
  if (newValue == null || newValue === false) {
419
434
  if (newValue !== false || elm.getAttribute(memberName) === '') {
@@ -432,6 +447,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
432
447
  }
433
448
  };
434
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
+ */
435
455
  const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
436
456
  const CAPTURE_EVENT_SUFFIX = 'Capture';
437
457
  const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
@@ -1175,13 +1195,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1175
1195
  */
1176
1196
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1177
1197
  var _a;
1198
+ const prototype = Cstr.prototype;
1178
1199
  if (cmpMeta.$members$) {
1179
1200
  if (Cstr.watchers) {
1180
1201
  cmpMeta.$watchers$ = Cstr.watchers;
1181
1202
  }
1182
1203
  // It's better to have a const than two Object.entries()
1183
1204
  const members = Object.entries(cmpMeta.$members$);
1184
- const prototype = Cstr.prototype;
1185
1205
  members.map(([memberName, [memberFlags]]) => {
1186
1206
  if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1187
1207
  ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
@@ -1204,6 +1224,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1204
1224
  const attrNameToPropName = new Map();
1205
1225
  prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1206
1226
  plt.jmp(() => {
1227
+ var _a;
1207
1228
  const propName = attrNameToPropName.get(attrName);
1208
1229
  // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1209
1230
  // in the case where an attribute was set inline.
@@ -1259,11 +1280,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1259
1280
  // 1. The instance is ready
1260
1281
  // 2. The watchers are ready
1261
1282
  // 3. The value has changed
1262
- if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1283
+ if (flags &&
1284
+ !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1263
1285
  flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1264
1286
  newValue !== oldValue) {
1265
1287
  const instance = hostRef.$lazyInstance$ ;
1266
- const entry = cmpMeta.$watchers$[attrName];
1288
+ const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
1267
1289
  entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1268
1290
  if (instance[callbackName] != null) {
1269
1291
  instance[callbackName].call(instance, newValue, oldValue, attrName);
@@ -1285,10 +1307,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1285
1307
  ...members
1286
1308
  .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
1287
1309
  .map(([propName, m]) => {
1310
+ var _a;
1288
1311
  const attrName = m[1] || propName;
1289
1312
  attrNameToPropName.set(attrName, propName);
1290
1313
  if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1291
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
1314
+ (_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);
1292
1315
  }
1293
1316
  return attrName;
1294
1317
  }),
@@ -1470,12 +1493,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1470
1493
  const customElements = win.customElements;
1471
1494
  const head = doc.head;
1472
1495
  const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1473
- const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1496
+ const dataStyles = /*@__PURE__*/ doc.createElement('style');
1474
1497
  const deferredConnectedCallbacks = [];
1475
1498
  let appLoadFallback;
1476
1499
  let isBootstrapping = true;
1477
1500
  Object.assign(plt, options);
1478
1501
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1502
+ let hasSlotRelocation = false;
1479
1503
  lazyBundles.map((lazyBundle) => {
1480
1504
  lazyBundle[1].map((compactMeta) => {
1481
1505
  var _a;
@@ -1485,6 +1509,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1485
1509
  $members$: compactMeta[2],
1486
1510
  $listeners$: compactMeta[3],
1487
1511
  };
1512
+ // Check if we are using slots outside the shadow DOM in this component.
1513
+ // We'll use this information later to add styles for `slot-fb` elements
1514
+ if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
1515
+ hasSlotRelocation = true;
1516
+ }
1488
1517
  {
1489
1518
  cmpMeta.$members$ = compactMeta[2];
1490
1519
  }
@@ -1544,15 +1573,23 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1544
1573
  }
1545
1574
  });
1546
1575
  });
1576
+ // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
1577
+ if (hasSlotRelocation) {
1578
+ dataStyles.innerHTML += SLOT_FB_CSS;
1579
+ }
1580
+ // Add hydration styles
1547
1581
  {
1548
- visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1549
- visibilityStyle.setAttribute('data-styles', '');
1582
+ dataStyles.innerHTML += cmpTags + HYDRATED_CSS;
1583
+ }
1584
+ // If we have styles, add them to the DOM
1585
+ if (dataStyles.innerHTML.length) {
1586
+ dataStyles.setAttribute('data-styles', '');
1587
+ head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1550
1588
  // Apply CSP nonce to the style tag if it exists
1551
1589
  const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1552
1590
  if (nonce != null) {
1553
- visibilityStyle.setAttribute('nonce', nonce);
1591
+ dataStyles.setAttribute('nonce', nonce);
1554
1592
  }
1555
- head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1556
1593
  }
1557
1594
  // Process deferred connectedCallbacks now all components have been registered
1558
1595
  isBootstrapping = false;
@@ -1665,19 +1702,19 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1665
1702
  return module[exportName];
1666
1703
  }
1667
1704
 
1668
- if (!hmrVersionId || !BUILD.hotModuleReplacement) {
1669
- const processMod = importedModule => {
1670
- cmpModules.set(bundleId, importedModule);
1671
- return importedModule[exportName];
1672
- }
1673
- switch(bundleId) {
1674
-
1675
- case 'mds-modal.cjs':
1676
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1677
- /* webpackMode: "lazy" */
1678
- './mds-modal.cjs.entry.js')); }).then(processMod, consoleError);
1705
+ if (!hmrVersionId || !BUILD.hotModuleReplacement) {
1706
+ const processMod = importedModule => {
1707
+ cmpModules.set(bundleId, importedModule);
1708
+ return importedModule[exportName];
1709
+ }
1710
+ switch(bundleId) {
1711
+
1712
+ case 'mds-modal.cjs':
1713
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1714
+ /* webpackMode: "lazy" */
1715
+ './mds-modal.cjs.entry.js')); }).then(processMod, consoleError);
1716
+ }
1679
1717
  }
1680
- }
1681
1718
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1682
1719
  /* @vite-ignore */
1683
1720
  /* webpackInclude: /\.entry\.js$/ */
@@ -1752,7 +1789,7 @@ const flush = () => {
1752
1789
  }
1753
1790
  }
1754
1791
  };
1755
- const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1792
+ const nextTick = (cb) => promiseResolve().then(cb);
1756
1793
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1757
1794
 
1758
1795
  exports.Host = Host;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-a75ae767.js');
5
+ const index = require('./index-95c329c0.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-a75ae767.js');
5
+ const index = require('./index-95c329c0.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))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}
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{font-size:1rem}.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: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: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-a75ae767.js');
5
+ const index = require('./index-95c329c0.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Browser v4.7.1 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v4.8.0 | 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.1",
7
+ "version": "4.8.0",
8
8
  "typescriptVersion": "5.2.2"
9
9
  },
10
10
  "collections": [],
@@ -1,29 +1,29 @@
1
1
  const hash = (s) => {
2
- let i, h;
3
- for (i = 0, h = 0; i < s.length; i++) {
4
- h = Math.imul(31, h) + s.charCodeAt(i) | 0;
5
- }
6
- return h.toString();
2
+ let i, h;
3
+ for (i = 0, h = 0; i < s.length; i++) {
4
+ h = Math.imul(31, h) + s.charCodeAt(i) | 0;
5
+ }
6
+ return h.toString();
7
7
  };
8
8
  const randomInt = (max) => Math.floor(Math.random() * max);
9
9
  const unslugName = (name) => {
10
- var _a, _b, _c;
11
- return (_c = (_b = (_a = name.split('/')) === null || _a === void 0 ? void 0 : _a.slice(-1).pop()) === null || _b === void 0 ? void 0 : _b.replace(/-/g, ' ')) !== null && _c !== void 0 ? _c : name;
10
+ var _a, _b, _c;
11
+ return (_c = (_b = (_a = name.split('/')) === null || _a === void 0 ? void 0 : _a.slice(-1).pop()) === null || _b === void 0 ? void 0 : _b.replace(/-/g, ' ')) !== null && _c !== void 0 ? _c : name;
12
12
  };
13
13
  const setAttributeIfEmpty = (element, attribute, value) => {
14
- var _a;
15
- if (element.hasAttribute(attribute)) {
16
- return (_a = element.getAttribute(attribute)) !== null && _a !== void 0 ? _a : '';
17
- }
18
- element.setAttribute(attribute, value);
19
- return value;
14
+ var _a;
15
+ if (element.hasAttribute(attribute)) {
16
+ return (_a = element.getAttribute(attribute)) !== null && _a !== void 0 ? _a : '';
17
+ }
18
+ element.setAttribute(attribute, value);
19
+ return value;
20
20
  };
21
21
  const hashValue = (value) => `${value}-${hash(value)}`;
22
22
  const hashRandomValue = (value) => {
23
- const randomValue = randomInt(1000000);
24
- if (value) {
25
- return `${value}-${hash(randomValue.toString())}`;
26
- }
27
- return hash(randomValue.toString());
23
+ const randomValue = randomInt(1000000);
24
+ if (value) {
25
+ return `${value}-${hash(randomValue.toString())}`;
26
+ }
27
+ return hash(randomValue.toString());
28
28
  };
29
29
  export { unslugName, setAttributeIfEmpty, hashRandomValue, hashValue, };