@maggioli-design-system/mds-modal 4.4.0 → 4.4.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 (62) hide show
  1. package/dist/cjs/{index-0ac65212.js → index-7b67ecdb.js} +117 -22
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mds-modal.cjs.entry.js +4 -4
  4. package/dist/cjs/mds-modal.cjs.js +3 -3
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/common/aria.js +9 -1
  7. package/dist/collection/common/keyboard-manager.js +2 -2
  8. package/dist/collection/components/mds-modal/mds-modal.css +37 -39
  9. package/dist/collection/components/mds-modal/test/mds-modal.e2e.js +1 -1
  10. package/dist/components/mds-modal.js +7 -4
  11. package/dist/documentation.json +3 -3
  12. package/dist/esm/{index-6f346db2.js → index-5f4fd73d.js} +117 -22
  13. package/dist/esm/loader.js +3 -3
  14. package/dist/esm/mds-modal.entry.js +4 -4
  15. package/dist/esm/mds-modal.js +4 -4
  16. package/dist/esm-es5/index-5f4fd73d.js +1 -0
  17. package/dist/esm-es5/loader.js +1 -1
  18. package/dist/esm-es5/mds-modal.entry.js +1 -1
  19. package/dist/esm-es5/mds-modal.js +1 -1
  20. package/dist/mds-modal/mds-modal.esm.js +1 -1
  21. package/dist/mds-modal/mds-modal.js +1 -1
  22. package/dist/mds-modal/p-3289100c.system.js +1 -0
  23. package/dist/mds-modal/p-b327d4c0.js +2 -0
  24. package/dist/mds-modal/p-bc48f1e8.system.js +2 -0
  25. package/dist/mds-modal/p-e441efd8.entry.js +1 -0
  26. package/dist/mds-modal/p-ff89867f.system.entry.js +1 -0
  27. package/dist/stats.json +32 -30
  28. package/dist/types/common/aria.d.ts +2 -1
  29. package/dist/types/stencil-public-runtime.d.ts +19 -0
  30. package/documentation.json +15 -5
  31. package/package.json +4 -4
  32. package/readme.md +3 -1
  33. package/src/common/aria.ts +12 -0
  34. package/src/common/keyboard-manager.ts +2 -2
  35. package/src/components/mds-modal/css/mds-modal-animate-bottom.css +2 -1
  36. package/src/components/mds-modal/css/mds-modal-animate-center.css +2 -1
  37. package/src/components/mds-modal/css/mds-modal-animate-left.css +1 -1
  38. package/src/components/mds-modal/css/mds-modal-animate-right.css +1 -1
  39. package/src/components/mds-modal/css/mds-modal-animate-top.css +2 -1
  40. package/src/components/mds-modal/mds-modal.css +18 -21
  41. package/src/components/mds-modal/readme.md +1 -1
  42. package/src/components/mds-modal/test/mds-modal.e2e.ts +1 -1
  43. package/src/components/mds-modal/test/mds-modal.stories.mdx +1 -3
  44. package/src/fixtures/icons.json +2 -0
  45. package/www/build/mds-modal.esm.js +1 -1
  46. package/www/build/mds-modal.js +1 -1
  47. package/www/build/p-3289100c.system.js +1 -0
  48. package/www/build/p-b327d4c0.js +2 -0
  49. package/www/build/p-bc48f1e8.system.js +2 -0
  50. package/www/build/p-e441efd8.entry.js +1 -0
  51. package/www/build/p-ff89867f.system.entry.js +1 -0
  52. package/dist/esm-es5/index-6f346db2.js +0 -2
  53. package/dist/mds-modal/p-3bcc29b0.js +0 -2
  54. package/dist/mds-modal/p-5561703a.system.js +0 -1
  55. package/dist/mds-modal/p-5c4c27fb.entry.js +0 -1
  56. package/dist/mds-modal/p-7a7afece.system.entry.js +0 -1
  57. package/dist/mds-modal/p-d94af3e0.system.js +0 -2
  58. package/www/build/p-3bcc29b0.js +0 -2
  59. package/www/build/p-5561703a.system.js +0 -1
  60. package/www/build/p-5c4c27fb.entry.js +0 -1
  61. package/www/build/p-7a7afece.system.entry.js +0 -1
  62. package/www/build/p-d94af3e0.system.js +0 -2
@@ -1010,6 +1010,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1010
1010
  */
1011
1011
  const callRender = (hostRef, instance, elm, isInitialLoad) => {
1012
1012
  try {
1013
+ /**
1014
+ * minification optimization: `allRenderFn` is `true` if all components have a `render`
1015
+ * method, so we can call the method immediately. If not, check before calling it.
1016
+ */
1013
1017
  instance = instance.render() ;
1014
1018
  {
1015
1019
  hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
@@ -1083,6 +1087,16 @@ const appDidLoad = (who) => {
1083
1087
  }
1084
1088
  nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1085
1089
  };
1090
+ /**
1091
+ * Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
1092
+ * e.g. custom element node. If a build figures out that e.g. no component
1093
+ * has a `componentDidLoad` method, the instance method gets removed from the
1094
+ * output bundle and this function returns `undefined`.
1095
+ * @param instance any object that may or may not contain methods
1096
+ * @param method method name
1097
+ * @param arg single arbitrary argument
1098
+ * @returns result of method call if it exists, otherwise `undefined`
1099
+ */
1086
1100
  const safeCall = (instance, method, arg) => {
1087
1101
  if (instance && instance[method]) {
1088
1102
  try {
@@ -1150,6 +1164,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1150
1164
  * @returns a reference to the same constructor passed in (but now mutated)
1151
1165
  */
1152
1166
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1167
+ var _a;
1153
1168
  if (cmpMeta.$members$) {
1154
1169
  if (Cstr.watchers) {
1155
1170
  cmpMeta.$watchers$ = Cstr.watchers;
@@ -1177,7 +1192,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1177
1192
  });
1178
1193
  if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1179
1194
  const attrNameToPropName = new Map();
1180
- prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1195
+ prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1181
1196
  plt.jmp(() => {
1182
1197
  const propName = attrNameToPropName.get(attrName);
1183
1198
  // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
@@ -1225,26 +1240,65 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1225
1240
  // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1226
1241
  return;
1227
1242
  }
1243
+ else if (propName == null) {
1244
+ // At this point we should know this is not a "member", so we can treat it like watching an attribute
1245
+ // on a vanilla web component
1246
+ const hostRef = getHostRef(this);
1247
+ const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
1248
+ // We only want to trigger the callback(s) if:
1249
+ // 1. The instance is ready
1250
+ // 2. The watchers are ready
1251
+ // 3. The value has changed
1252
+ if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1253
+ flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1254
+ newValue !== oldValue) {
1255
+ const instance = hostRef.$lazyInstance$ ;
1256
+ const entry = cmpMeta.$watchers$[attrName];
1257
+ entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1258
+ if (instance[callbackName] != null) {
1259
+ instance[callbackName].call(instance, newValue, oldValue, attrName);
1260
+ }
1261
+ });
1262
+ }
1263
+ return;
1264
+ }
1228
1265
  this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1229
1266
  });
1230
1267
  };
1231
- // create an array of attributes to observe
1232
- // and also create a map of html attribute name to js property name
1233
- Cstr.observedAttributes = members
1234
- .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
1235
- .map(([propName, m]) => {
1236
- const attrName = m[1] || propName;
1237
- attrNameToPropName.set(attrName, propName);
1238
- if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1239
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
1240
- }
1241
- return attrName;
1242
- });
1268
+ // Create an array of attributes to observe
1269
+ // This list in comprised of all strings used within a `@Watch()` decorator
1270
+ // on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
1271
+ // As such, there is no way to guarantee type-safety here that a user hasn't entered
1272
+ // an invalid attribute.
1273
+ Cstr.observedAttributes = Array.from(new Set([
1274
+ ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
1275
+ ...members
1276
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
1277
+ .map(([propName, m]) => {
1278
+ const attrName = m[1] || propName;
1279
+ attrNameToPropName.set(attrName, propName);
1280
+ if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1281
+ cmpMeta.$attrsToReflect$.push([propName, attrName]);
1282
+ }
1283
+ return attrName;
1284
+ }),
1285
+ ]));
1243
1286
  }
1244
1287
  }
1245
1288
  return Cstr;
1246
1289
  };
1247
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1290
+ /**
1291
+ * Initialize a Stencil component given a reference to its host element, its
1292
+ * runtime bookkeeping data structure, runtime metadata about the component,
1293
+ * and (optionally) an HMR version ID.
1294
+ *
1295
+ * @param elm a host element
1296
+ * @param hostRef the element's runtime bookkeeping object
1297
+ * @param cmpMeta runtime metadata for the Stencil component
1298
+ * @param hmrVersionId an (optional) HMR version ID
1299
+ */
1300
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1301
+ let Cstr;
1248
1302
  // initializeComponent
1249
1303
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1250
1304
  // Let the runtime know that the component has been initialized
@@ -1414,6 +1468,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1414
1468
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1415
1469
  lazyBundles.map((lazyBundle) => {
1416
1470
  lazyBundle[1].map((compactMeta) => {
1471
+ var _a;
1417
1472
  const cmpMeta = {
1418
1473
  $flags$: compactMeta[0],
1419
1474
  $tagName$: compactMeta[1],
@@ -1430,7 +1485,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1430
1485
  cmpMeta.$attrsToReflect$ = [];
1431
1486
  }
1432
1487
  {
1433
- cmpMeta.$watchers$ = {};
1488
+ cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
1434
1489
  }
1435
1490
  const tagName = cmpMeta.$tagName$;
1436
1491
  const HostElement = class extends HTMLElement {
@@ -1543,23 +1598,50 @@ const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !==
1543
1598
  * @returns void
1544
1599
  */
1545
1600
  const setNonce = (nonce) => (plt.$nonce$ = nonce);
1601
+ /**
1602
+ * A WeakMap mapping runtime component references to their corresponding host reference
1603
+ * instances.
1604
+ */
1546
1605
  const hostRefs = /*@__PURE__*/ new WeakMap();
1606
+ /**
1607
+ * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
1608
+ *
1609
+ * @param ref the runtime ref of interest
1610
+ * @returns the Host reference (if found) or undefined
1611
+ */
1547
1612
  const getHostRef = (ref) => hostRefs.get(ref);
1613
+ /**
1614
+ * Register a lazy instance with the {@link hostRefs} object so it's
1615
+ * corresponding {@link d.HostRef} can be retrieved later.
1616
+ *
1617
+ * @param lazyInstance the lazy instance of interest
1618
+ * @param hostRef that instances `HostRef` object
1619
+ * @returns a reference to the host ref WeakMap
1620
+ */
1548
1621
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1549
- const registerHost = (elm, cmpMeta) => {
1622
+ /**
1623
+ * Register a host element for a Stencil component, setting up various metadata
1624
+ * and callbacks based on {@link BUILD} flags as well as the component's runtime
1625
+ * metadata.
1626
+ *
1627
+ * @param hostElement the host element to register
1628
+ * @param cmpMeta runtime metadata for that component
1629
+ * @returns a reference to the host ref WeakMap
1630
+ */
1631
+ const registerHost = (hostElement, cmpMeta) => {
1550
1632
  const hostRef = {
1551
1633
  $flags$: 0,
1552
- $hostElement$: elm,
1634
+ $hostElement$: hostElement,
1553
1635
  $cmpMeta$: cmpMeta,
1554
1636
  $instanceValues$: new Map(),
1555
1637
  };
1556
1638
  {
1557
1639
  hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1558
- elm['s-p'] = [];
1559
- elm['s-rc'] = [];
1640
+ hostElement['s-p'] = [];
1641
+ hostElement['s-rc'] = [];
1560
1642
  }
1561
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1562
- return hostRefs.set(elm, hostRef);
1643
+ addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$);
1644
+ return hostRefs.set(hostElement, hostRef);
1563
1645
  };
1564
1646
  const isMemberInElement = (elm, memberName) => memberName in elm;
1565
1647
  const consoleError = (e, el) => (0, console.error)(e, el);
@@ -1572,7 +1654,20 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1572
1654
  if (module) {
1573
1655
  return module[exportName];
1574
1656
  }
1575
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
1657
+
1658
+ if (!hmrVersionId || !BUILD.hotModuleReplacement) {
1659
+ const processMod = importedModule => {
1660
+ cmpModules.set(bundleId, importedModule);
1661
+ return importedModule[exportName];
1662
+ }
1663
+ switch(bundleId) {
1664
+
1665
+ case 'mds-modal.cjs':
1666
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1667
+ /* webpackMode: "lazy" */
1668
+ './mds-modal.cjs.entry.js')); }).then(processMod, consoleError);
1669
+ }
1670
+ }
1576
1671
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1577
1672
  /* @vite-ignore */
1578
1673
  /* webpackInclude: /\.entry\.js$/ */
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0ac65212.js');
5
+ const index = require('./index-7b67ecdb.js');
6
6
 
7
7
  const defineCustomElements = (win, options) => {
8
8
  if (typeof window === 'undefined') return undefined;
9
- return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"position":[1537],"stateOpened":[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]]]]]], options);
9
+ return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"position":[1537],"stateOpened":[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{"position":["positionChange"],"opened":["openedChange"]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0ac65212.js');
5
+ const index = require('./index-7b67ecdb.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
 
@@ -36,20 +36,20 @@ class KeyboardManager {
36
36
  };
37
37
  this.attachEscapeBehavior = (callBack) => {
38
38
  this.escapeCallback = callBack;
39
- if (typeof window !== undefined) {
39
+ if (window !== undefined) {
40
40
  window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
41
41
  }
42
42
  };
43
43
  this.detachEscapeBehavior = () => {
44
44
  this.escapeCallback = () => { return; };
45
- if (typeof window !== undefined) {
45
+ if (window !== undefined) {
46
46
  window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
47
47
  }
48
48
  };
49
49
  }
50
50
  }
51
51
 
52
- const mdsModalCss = "@tailwind components; @tailwind utilities; .focus-off,.focusable,.focusable-light,.focusable-light-off{-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);outline-offset:var(--magma-outline-blur-offset);outline:var(--magma-outline-blur);-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform}.focus-on,.focusable-light:focus-visible,.focusable:focus-visible{--magma-outline-blur-offset:var(--magma-outline-focus-offset);--magma-outline-blur:var(--magma-outline-focus)}.focus-light-on,.focusable-light:focus-visible{--magma-outline-blur:2px solid rgb(var(--tone-neutral))}.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:rgba(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:rgba(var(--tone-neutral-02), var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgba(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);pointer-events:none;position:fixed;inset:0px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-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);background-color:rgba(var(--mds-modal-overlay-color) / 0);fill:rgb(var(--tone-neutral));-webkit-perspective:600px;perspective:600px;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){pointer-events:auto;-webkit-transition-duration:500ms;transition-duration:500ms;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity))}.close{position:absolute;top:0px;height:2.25rem;width:2.25rem;-webkit-transform-origin:center;transform-origin:center;cursor:pointer;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);fill:inherit;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-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{display:grid;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);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){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.to-bottom){padding:1rem}}: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){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.to-center){padding:1rem}}: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){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.to-top){padding:1rem}}: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 = "@tailwind components; @tailwind utilities; .focus-off,.focusable,.focusable-light,.focusable-light-off{-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);outline-offset:var(--magma-outline-blur-offset);outline:var(--magma-outline-blur);-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform}.focus-on,.focusable-light:focus-visible,.focusable:focus-visible{--magma-outline-blur-offset:var(--magma-outline-focus-offset);--magma-outline-blur:var(--magma-outline-focus)}.focus-light-on,.focusable-light:focus-visible{--magma-outline-blur:2px solid rgb(var(--tone-neutral))}.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:rgba(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:rgba(var(--tone-neutral-02), var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgba(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-origin:center;transform-origin:center;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-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}}";
53
53
 
54
54
  const MdsModal = class {
55
55
  constructor(hostRef) {
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0ac65212.js');
5
+ const index = require('./index-7b67ecdb.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Browser v4.2.1 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v4.5.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));
@@ -17,7 +17,7 @@ const patchBrowser = () => {
17
17
  };
18
18
 
19
19
  patchBrowser().then(options => {
20
- return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"position":[1537],"stateOpened":[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]]]]]], options);
20
+ return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"position":[1537],"stateOpened":[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{"position":["positionChange"],"opened":["openedChange"]}]]]], options);
21
21
  });
22
22
 
23
23
  exports.setNonce = index.setNonce;
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.2.1",
8
- "typescriptVersion": "5.1.6"
7
+ "version": "4.5.0",
8
+ "typescriptVersion": "5.2.2"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -5,6 +5,7 @@ const hash = (s) => {
5
5
  }
6
6
  return h.toString();
7
7
  };
8
+ const randomInt = (max) => Math.floor(Math.random() * max);
8
9
  const unslugName = (name) => {
9
10
  var _a, _b, _c;
10
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;
@@ -18,4 +19,11 @@ const setAttributeIfEmpty = (element, attribute, value) => {
18
19
  return value;
19
20
  };
20
21
  const hashValue = (value) => `${value}-${hash(value)}`;
21
- export { unslugName, setAttributeIfEmpty, hashValue, };
22
+ const hashRandomValue = (value) => {
23
+ const randomValue = randomInt(1000000);
24
+ if (value) {
25
+ return `${value}-${hash(randomValue.toString())}`;
26
+ }
27
+ return hash(randomValue.toString());
28
+ };
29
+ export { unslugName, setAttributeIfEmpty, hashRandomValue, hashValue, };
@@ -26,13 +26,13 @@ export class KeyboardManager {
26
26
  };
27
27
  this.attachEscapeBehavior = (callBack) => {
28
28
  this.escapeCallback = callBack;
29
- if (typeof window !== undefined) {
29
+ if (window !== undefined) {
30
30
  window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
31
31
  }
32
32
  };
33
33
  this.detachEscapeBehavior = () => {
34
34
  this.escapeCallback = () => { return; };
35
- if (typeof window !== undefined) {
35
+ if (window !== undefined) {
36
36
  window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
37
37
  }
38
38
  };
@@ -170,7 +170,7 @@
170
170
  * @prop --mds-modal-window-overflow: Set the overflow of the window
171
171
  * @prop --mds-modal-window-shadow: Set the box shadow of the window
172
172
  * @prop --mds-modal-z-index: Set the z-index of the window when the component is opened
173
- */
173
+ */
174
174
 
175
175
  :host {
176
176
 
@@ -180,33 +180,29 @@
180
180
  --mds-modal-window-overflow: auto;
181
181
  --mds-modal-window-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
182
182
  --mds-modal-z-index: var(--magma-modal-z-index);
183
- pointer-events: none;
184
- position: fixed;
185
- inset: 0px;
186
- display: flex;
187
- align-items: center;
188
- justify-content: center;
189
183
  transition-duration: 700ms;
190
184
  transition-timing-function: cubic-bezier(1, 0, 0, 1);
191
185
 
186
+ align-items: center;
192
187
  background-color: rgba(var(--mds-modal-overlay-color) / 0);
188
+ display: flex;
193
189
  fill: rgb(var(--tone-neutral));
190
+ inset: 0;
191
+ justify-content: center;
194
192
  perspective: 600px;
193
+ pointer-events: none;
194
+ position: fixed;
195
195
  z-index: var(--mds-modal-z-index, 1000);
196
196
  }
197
197
 
198
- :host( [position=top] ){
199
-
200
- align-items: flex-start;
201
-
202
- justify-content: center;
198
+ :host( [position=top] ) {
199
+ align-items: flex-start;
200
+ justify-content: center;
203
201
  }
204
202
 
205
- :host( [position=bottom] ){
206
-
207
- align-items: flex-end;
208
-
209
- justify-content: center;
203
+ :host( [position=bottom] ) {
204
+ align-items: flex-end;
205
+ justify-content: center;
210
206
  }
211
207
 
212
208
  :host( .to-bottom-opened ),
@@ -215,27 +211,20 @@
215
211
  :host( .to-right-opened ),
216
212
  :host( .to-top-opened ){
217
213
 
218
- pointer-events: auto;
219
-
220
214
  transition-duration: 500ms;
221
215
 
222
216
  background-color: rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));
217
+ pointer-events: auto;
223
218
  }
224
219
 
225
220
  .close{
226
221
 
227
- position: absolute;
228
-
229
222
  top: 0px;
230
223
 
231
224
  height: 2.25rem;
232
225
 
233
226
  width: 2.25rem;
234
227
 
235
- transform-origin: center;
236
-
237
- cursor: pointer;
238
-
239
228
  border-radius: 9999px;
240
229
 
241
230
  font-size: 2.25rem;
@@ -248,21 +237,23 @@
248
237
 
249
238
  transition-timing-function: cubic-bezier(0.77, 0, 0.175, 1);
250
239
 
240
+ cursor: pointer;
251
241
  fill: inherit;
242
+ position: absolute;
243
+ transform-origin: center;
252
244
  transform: translate(0, 24px) rotate(90deg);
253
245
  transition-property: opacity, outline, outline-offset, transform;
254
246
  }
255
247
 
256
248
  .window{
257
249
 
258
- display: grid;
259
-
260
250
  height: 100%;
261
251
 
262
252
  gap: 0px;
263
253
 
264
254
  background-color: var(--mds-modal-window-background);
265
255
  box-shadow: var(--mds-modal-window-shadow);
256
+ display: grid;
266
257
  grid-template-rows: 1fr;
267
258
  max-width: calc(100vw - 80px);
268
259
  overflow: var(--mds-modal-window-overflow);
@@ -282,8 +273,6 @@
282
273
 
283
274
  :host( .to-bottom ){
284
275
 
285
- justify-content: center;
286
-
287
276
  padding: 2rem;
288
277
  }
289
278
 
@@ -296,6 +285,11 @@
296
285
  }
297
286
  }
298
287
 
288
+ :host( .to-bottom ) {
289
+
290
+ justify-content: center;
291
+ }
292
+
299
293
  :host( .to-bottom ) .window,
300
294
  :host( .to-bottom ) > ::slotted( [slot="window"] ){
301
295
 
@@ -332,8 +326,6 @@
332
326
 
333
327
  :host( .to-center ){
334
328
 
335
- justify-content: center;
336
-
337
329
  padding: 2rem;
338
330
  }
339
331
 
@@ -346,6 +338,11 @@
346
338
  }
347
339
  }
348
340
 
341
+ :host( .to-center ) {
342
+
343
+ justify-content: center;
344
+ }
345
+
349
346
  :host( .to-center ) .window,
350
347
  :host( .to-center ) > ::slotted( [slot="window"] ){
351
348
 
@@ -380,9 +377,8 @@
380
377
  transform: rotateX(-22deg) scale(0.5) translateY(-40%);
381
378
  }
382
379
 
383
- :host( .to-left ){
384
-
385
- justify-content: flex-start;
380
+ :host( .to-left ) {
381
+ justify-content: flex-start;
386
382
  }
387
383
 
388
384
  :host( .to-left ) .window,
@@ -438,9 +434,8 @@
438
434
  transform: translate(36px, 24px) rotate(90deg);
439
435
  }
440
436
 
441
- :host( .to-right ){
442
-
443
- justify-content: flex-end;
437
+ :host( .to-right ) {
438
+ justify-content: flex-end;
444
439
  }
445
440
 
446
441
  :host( .to-right ) .window,
@@ -498,8 +493,6 @@
498
493
 
499
494
  :host( .to-top ){
500
495
 
501
- justify-content: center;
502
-
503
496
  padding: 2rem;
504
497
  }
505
498
 
@@ -512,6 +505,11 @@
512
505
  }
513
506
  }
514
507
 
508
+ :host( .to-top ) {
509
+
510
+ justify-content: center;
511
+ }
512
+
515
513
  :host( .to-top ) .window,
516
514
  :host( .to-top ) > ::slotted( [slot="window"] ){
517
515
 
@@ -50,6 +50,6 @@ describe('mds-modal', () => {
50
50
  // console.info('closeButton', closeButton)
51
51
  // closeButton.click()
52
52
  await page.waitForChanges();
53
- expect(element).not.toHaveAttribute('opened');
53
+ expect(element).not.toHaveClass('opened');
54
54
  });
55
55
  });