@maggioli-design-system/mds-modal 5.2.1 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/cjs/{index-7b5471f5.js → index-6f236cfa.js} +164 -69
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mds-modal.cjs.entry.js +13 -4
  4. package/dist/cjs/mds-modal.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +1 -1
  6. package/dist/collection/common/floating-controller.js +180 -0
  7. package/dist/collection/common/slot.js +10 -4
  8. package/dist/collection/components/mds-modal/mds-modal.js +18 -3
  9. package/dist/collection/dictionary/tree.js +13 -0
  10. package/dist/collection/type/tree.js +1 -0
  11. package/dist/components/mds-modal.js +12 -3
  12. package/dist/documentation.d.ts +8 -0
  13. package/dist/documentation.json +11 -5
  14. package/dist/esm/{index-1c34ac95.js → index-f8d2dee4.js} +164 -69
  15. package/dist/esm/loader.js +2 -2
  16. package/dist/esm/mds-modal.entry.js +13 -4
  17. package/dist/esm/mds-modal.js +3 -3
  18. package/dist/esm-es5/index-f8d2dee4.js +1 -0
  19. package/dist/esm-es5/loader.js +1 -1
  20. package/dist/esm-es5/mds-modal.entry.js +1 -1
  21. package/dist/esm-es5/mds-modal.js +1 -1
  22. package/dist/mds-modal/mds-modal.esm.js +1 -1
  23. package/dist/mds-modal/mds-modal.js +1 -1
  24. package/{www/build/p-08a99956.entry.js → dist/mds-modal/p-413a00c5.entry.js} +1 -1
  25. package/dist/mds-modal/{p-0d78ea55.system.entry.js → p-96958acc.system.entry.js} +1 -1
  26. package/dist/mds-modal/p-bc1fa4e4.system.js +2 -0
  27. package/dist/mds-modal/p-c6899cb0.system.js +1 -0
  28. package/dist/mds-modal/p-ee90f86a.js +2 -0
  29. package/dist/stats.json +60 -38
  30. package/dist/types/common/floating-controller.d.ts +46 -0
  31. package/dist/types/common/slot.d.ts +2 -1
  32. package/dist/types/dictionary/tree.d.ts +4 -0
  33. package/dist/types/type/tree.d.ts +3 -0
  34. package/documentation.json +36 -10
  35. package/package.json +4 -4
  36. package/src/common/floating-controller.ts +263 -0
  37. package/src/common/slot.ts +12 -3
  38. package/src/dictionary/tree.ts +21 -0
  39. package/src/fixtures/icons.json +20 -0
  40. package/src/fixtures/iconsauce.json +6 -0
  41. package/src/type/tree.ts +12 -0
  42. package/www/build/mds-modal.esm.js +1 -1
  43. package/www/build/mds-modal.js +1 -1
  44. package/{dist/mds-modal/p-08a99956.entry.js → www/build/p-413a00c5.entry.js} +1 -1
  45. package/www/build/{p-0d78ea55.system.entry.js → p-96958acc.system.entry.js} +1 -1
  46. package/www/build/p-bc1fa4e4.system.js +2 -0
  47. package/www/build/p-c6899cb0.system.js +1 -0
  48. package/www/build/p-ee90f86a.js +2 -0
  49. package/dist/esm-es5/index-1c34ac95.js +0 -1
  50. package/dist/mds-modal/p-0ed6e0c8.js +0 -2
  51. package/dist/mds-modal/p-423dac35.system.js +0 -2
  52. package/dist/mds-modal/p-67c6f337.system.js +0 -1
  53. package/www/build/p-0ed6e0c8.js +0 -2
  54. package/www/build/p-423dac35.system.js +0 -2
  55. package/www/build/p-67c6f337.system.js +0 -1
@@ -21,19 +21,23 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'mds-modal';
24
- const BUILD = /* mds-modal */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* mds-modal */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.22.2 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
31
31
  for (var name in all)
32
32
  __defProp(target, name, { get: all[name], enumerable: true });
33
33
  };
34
+
35
+ // src/client/client-host-ref.ts
34
36
  var hostRefs = /* @__PURE__ */ new WeakMap();
35
37
  var getHostRef = (ref) => hostRefs.get(ref);
36
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
38
+ var registerInstance = (lazyInstance, hostRef) => {
39
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
40
+ };
37
41
  var registerHost = (hostElement, cmpMeta) => {
38
42
  const hostRef = {
39
43
  $flags$: 0,
@@ -46,7 +50,8 @@ var registerHost = (hostElement, cmpMeta) => {
46
50
  hostElement["s-p"] = [];
47
51
  hostElement["s-rc"] = [];
48
52
  }
49
- return hostRefs.set(hostElement, hostRef);
53
+ const ref = hostRefs.set(hostElement, hostRef);
54
+ return ref;
50
55
  };
51
56
  var isMemberInElement = (elm, memberName) => memberName in elm;
52
57
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -83,16 +88,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
83
88
  /* webpackExclude: /\.system\.entry\.js$/ */
84
89
  /* webpackMode: "lazy" */
85
90
  `./${bundleId}.entry.js${""}`
86
- )); }).then((importedModule) => {
87
- {
88
- cmpModules.set(bundleId, importedModule);
91
+ )); }).then(
92
+ (importedModule) => {
93
+ {
94
+ cmpModules.set(bundleId, importedModule);
95
+ }
96
+ return importedModule[exportName];
97
+ },
98
+ (e) => {
99
+ consoleError(e, hostRef.$hostElement$);
89
100
  }
90
- return importedModule[exportName];
91
- }, consoleError);
101
+ );
92
102
  };
93
103
 
94
104
  // src/client/client-style.ts
95
105
  var styles = /* @__PURE__ */ new Map();
106
+ var HYDRATED_STYLE_ID = "sty-id";
96
107
  var HYDRATED_CSS = "{visibility:hidden}[hydrated]{visibility:inherit}";
97
108
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
98
109
  var win = typeof window !== "undefined" ? window : {};
@@ -166,12 +177,6 @@ var flush = () => {
166
177
  };
167
178
  var nextTick = (cb) => promiseResolve().then(cb);
168
179
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
169
-
170
- // src/utils/constants.ts
171
- var EMPTY_OBJ = {};
172
-
173
- // src/utils/helpers.ts
174
- var isDef = (v) => v != null;
175
180
  var isComplexType = (o) => {
176
181
  o = typeof o;
177
182
  return o === "object" || o === "function";
@@ -372,7 +377,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
372
377
  }
373
378
  if (!appliedStyles.has(scopeId2)) {
374
379
  {
375
- styleElm = doc.createElement("style");
380
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
376
381
  styleElm.innerHTML = style;
377
382
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
378
383
  if (nonce != null) {
@@ -382,7 +387,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
382
387
  if (styleContainerNode.nodeName === "HEAD") {
383
388
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
384
389
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
385
- styleContainerNode.insertBefore(styleElm, referenceNode2);
390
+ styleContainerNode.insertBefore(
391
+ styleElm,
392
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
393
+ );
386
394
  } else if ("host" in styleContainerNode) {
387
395
  if (supportsConstructableStylesheets) {
388
396
  const stylesheet = new CSSStyleSheet();
@@ -432,16 +440,18 @@ var attachStyles = (hostRef) => {
432
440
  endAttachStyles();
433
441
  };
434
442
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
435
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
443
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
436
444
  if (oldValue !== newValue) {
437
445
  let isProp = isMemberInElement(elm, memberName);
438
446
  let ln = memberName.toLowerCase();
439
447
  if (memberName === "class") {
440
448
  const classList = elm.classList;
441
449
  const oldClasses = parseClassList(oldValue);
442
- const newClasses = parseClassList(newValue);
443
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
444
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
450
+ let newClasses = parseClassList(newValue);
451
+ {
452
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
453
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
454
+ }
445
455
  } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
446
456
  if (memberName[2] === "-") {
447
457
  memberName = memberName.slice(3);
@@ -475,7 +485,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
475
485
  elm.setAttribute(memberName, n);
476
486
  }
477
487
  }
478
- } else {
488
+ } else if (elm[memberName] !== newValue) {
479
489
  elm[memberName] = newValue;
480
490
  }
481
491
  } catch (e) {
@@ -497,24 +507,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
497
507
  }
498
508
  };
499
509
  var parseClassListRegex = /\s/;
500
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
510
+ var parseClassList = (value) => {
511
+ if (typeof value === "object" && value && "baseVal" in value) {
512
+ value = value.baseVal;
513
+ }
514
+ if (!value || typeof value !== "string") {
515
+ return [];
516
+ }
517
+ return value.split(parseClassListRegex);
518
+ };
501
519
  var CAPTURE_EVENT_SUFFIX = "Capture";
502
520
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
503
521
 
504
522
  // src/runtime/vdom/update-element.ts
505
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
523
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
506
524
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
507
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
508
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
525
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
526
+ const newVnodeAttrs = newVnode.$attrs$ || {};
509
527
  {
510
528
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
511
529
  if (!(memberName in newVnodeAttrs)) {
512
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
530
+ setAccessor(
531
+ elm,
532
+ memberName,
533
+ oldVnodeAttrs[memberName],
534
+ void 0,
535
+ isSvgMode2,
536
+ newVnode.$flags$);
513
537
  }
514
538
  }
515
539
  }
516
540
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
517
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
541
+ setAccessor(
542
+ elm,
543
+ memberName,
544
+ oldVnodeAttrs[memberName],
545
+ newVnodeAttrs[memberName],
546
+ isSvgMode2,
547
+ newVnode.$flags$);
518
548
  }
519
549
  };
520
550
  function sortedAttrNames(attrNames) {
@@ -526,13 +556,10 @@ function sortedAttrNames(attrNames) {
526
556
  attrNames
527
557
  );
528
558
  }
529
-
530
- // src/runtime/vdom/vdom-render.ts
531
- var scopeId;
532
559
  var hostTagName;
533
560
  var useNativeShadowDom = false;
534
561
  var isSvgMode = false;
535
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
562
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
536
563
  const newVNode2 = newParentVNode.$children$[childIndex];
537
564
  let i2 = 0;
538
565
  let elm;
@@ -546,11 +573,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
546
573
  {
547
574
  updateElement(null, newVNode2, isSvgMode);
548
575
  }
549
- const rootNode = elm.getRootNode();
550
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
551
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
552
- elm.classList.add(elm["s-si"] = scopeId);
553
- }
554
576
  if (newVNode2.$children$) {
555
577
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
556
578
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -679,6 +701,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
679
701
  if (!isInitialRender) {
680
702
  return leftVNode.$key$ === rightVNode.$key$;
681
703
  }
704
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
705
+ leftVNode.$key$ = rightVNode.$key$;
706
+ }
682
707
  return true;
683
708
  }
684
709
  return false;
@@ -713,8 +738,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
713
738
  }
714
739
  };
715
740
  var insertBefore = (parent, newNode, reference) => {
716
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
717
- return inserted;
741
+ {
742
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
743
+ }
718
744
  };
719
745
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
720
746
  const hostElm = hostRef.$hostElement$;
@@ -739,9 +765,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
739
765
  rootVnode.$flags$ |= 4 /* isHost */;
740
766
  hostRef.$vnode$ = rootVnode;
741
767
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
742
- {
743
- scopeId = hostElm["s-sc"];
744
- }
745
768
  useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
746
769
  patch(oldVNode, rootVnode, isInitialLoad);
747
770
  };
@@ -749,7 +772,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
749
772
  // src/runtime/update-component.ts
750
773
  var attachToAncestor = (hostRef, ancestorComponent) => {
751
774
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
752
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
775
+ const index = ancestorComponent["s-p"].push(
776
+ new Promise(
777
+ (r) => hostRef.$onRenderResolve$ = () => {
778
+ ancestorComponent["s-p"].splice(index - 1, 1);
779
+ r();
780
+ }
781
+ )
782
+ );
753
783
  }
754
784
  };
755
785
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -778,16 +808,16 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
778
808
  {
779
809
  hostRef.$flags$ |= 256 /* isListenReady */;
780
810
  if (hostRef.$queuedListeners$) {
781
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
811
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
782
812
  hostRef.$queuedListeners$ = void 0;
783
813
  }
784
814
  }
785
815
  {
786
- maybePromise = safeCall(instance, "componentWillLoad");
816
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
787
817
  }
788
818
  }
789
819
  {
790
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
820
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
791
821
  }
792
822
  endSchedule();
793
823
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
@@ -860,7 +890,7 @@ var postUpdateComponent = (hostRef) => {
860
890
  addHydratedFlag(elm);
861
891
  }
862
892
  {
863
- safeCall(instance, "componentDidLoad");
893
+ safeCall(instance, "componentDidLoad", void 0, elm);
864
894
  }
865
895
  endPostUpdate();
866
896
  {
@@ -889,12 +919,12 @@ var appDidLoad = (who) => {
889
919
  }
890
920
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
891
921
  };
892
- var safeCall = (instance, method, arg) => {
922
+ var safeCall = (instance, method, arg, elm) => {
893
923
  if (instance && instance[method]) {
894
924
  try {
895
925
  return instance[method](arg);
896
926
  } catch (e) {
897
- consoleError(e);
927
+ consoleError(e, elm);
898
928
  }
899
929
  }
900
930
  return void 0;
@@ -953,15 +983,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
953
983
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
954
984
  members.map(([memberName, [memberFlags]]) => {
955
985
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
986
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
987
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
988
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
989
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
990
+ Object.defineProperty(prototype, memberName, {
991
+ get() {
992
+ {
993
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
994
+ return getValue(this, memberName);
995
+ }
996
+ const ref = getHostRef(this);
997
+ const instance = ref ? ref.$lazyInstance$ : prototype;
998
+ if (!instance) return;
999
+ return instance[memberName];
1000
+ }
1001
+ },
1002
+ configurable: true,
1003
+ enumerable: true
1004
+ });
1005
+ }
956
1006
  Object.defineProperty(prototype, memberName, {
957
- get() {
958
- return getValue(this, memberName);
959
- },
960
1007
  set(newValue) {
961
- setValue(this, memberName, newValue, cmpMeta);
962
- },
963
- configurable: true,
964
- enumerable: true
1008
+ const ref = getHostRef(this);
1009
+ if (origSetter) {
1010
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1011
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1012
+ newValue = ref.$instanceValues$.get(memberName);
1013
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1014
+ ref.$instanceValues$.set(memberName, currentValue);
1015
+ }
1016
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1017
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1018
+ setValue(this, memberName, newValue, cmpMeta);
1019
+ return;
1020
+ }
1021
+ {
1022
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1023
+ setValue(this, memberName, newValue, cmpMeta);
1024
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1025
+ ref.$onReadyPromise$.then(() => {
1026
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1027
+ ref.$lazyInstance$[memberName] = newValue;
1028
+ }
1029
+ });
1030
+ }
1031
+ return;
1032
+ }
1033
+ const setterSetVal = () => {
1034
+ const currentValue = ref.$lazyInstance$[memberName];
1035
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1036
+ ref.$instanceValues$.set(memberName, currentValue);
1037
+ }
1038
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1039
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1040
+ };
1041
+ if (ref.$lazyInstance$) {
1042
+ setterSetVal();
1043
+ } else {
1044
+ ref.$onReadyPromise$.then(() => setterSetVal());
1045
+ }
1046
+ }
1047
+ }
965
1048
  });
966
1049
  }
967
1050
  });
@@ -971,7 +1054,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
971
1054
  plt.jmp(() => {
972
1055
  var _a2;
973
1056
  const propName = attrNameToPropName.get(attrName);
974
- if (this.hasOwnProperty(propName)) {
1057
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
975
1058
  newValue = this[propName];
976
1059
  delete this[propName];
977
1060
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -991,7 +1074,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
991
1074
  }
992
1075
  return;
993
1076
  }
994
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1077
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1078
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1079
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1080
+ this[propName] = newValue;
1081
+ }
995
1082
  });
996
1083
  };
997
1084
  Cstr.observedAttributes = Array.from(
@@ -1018,9 +1105,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1018
1105
  let Cstr;
1019
1106
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1020
1107
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1021
- const bundleId = cmpMeta.$lazyBundleId$;
1022
- if (bundleId) {
1023
- const CstrImport = loadModule(cmpMeta);
1108
+ {
1109
+ const CstrImport = loadModule(cmpMeta, hostRef);
1024
1110
  if (CstrImport && "then" in CstrImport) {
1025
1111
  const endLoad = uniqueTime();
1026
1112
  Cstr = await CstrImport;
@@ -1045,7 +1131,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1045
1131
  try {
1046
1132
  new Cstr(hostRef);
1047
1133
  } catch (e) {
1048
- consoleError(e);
1134
+ consoleError(e, elm);
1049
1135
  }
1050
1136
  {
1051
1137
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1054,10 +1140,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1054
1140
  hostRef.$flags$ |= 128 /* isWatchReady */;
1055
1141
  }
1056
1142
  endNewInstance();
1057
- } else {
1058
- Cstr = elm.constructor;
1059
- const cmpTag = elm.localName;
1060
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1061
1143
  }
1062
1144
  if (Cstr && Cstr.style) {
1063
1145
  let style;
@@ -1080,7 +1162,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1080
1162
  schedule();
1081
1163
  }
1082
1164
  };
1083
- var fireConnectedCallback = (instance) => {
1165
+ var fireConnectedCallback = (instance, elm) => {
1084
1166
  };
1085
1167
 
1086
1168
  // src/runtime/connected-callback.ts
@@ -1121,7 +1203,7 @@ var connectedCallback = (elm) => {
1121
1203
  endConnected();
1122
1204
  }
1123
1205
  };
1124
- var disconnectInstance = (instance) => {
1206
+ var disconnectInstance = (instance, elm) => {
1125
1207
  };
1126
1208
  var disconnectedCallback = async (elm) => {
1127
1209
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1136,6 +1218,12 @@ var disconnectedCallback = async (elm) => {
1136
1218
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1137
1219
  }
1138
1220
  }
1221
+ if (rootAppliedStyles.has(elm)) {
1222
+ rootAppliedStyles.delete(elm);
1223
+ }
1224
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1225
+ rootAppliedStyles.delete(elm.shadowRoot);
1226
+ }
1139
1227
  };
1140
1228
 
1141
1229
  // src/runtime/bootstrap-lazy.ts
@@ -1220,6 +1308,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1220
1308
  }
1221
1309
  disconnectedCallback() {
1222
1310
  plt.jmp(() => disconnectedCallback(this));
1311
+ plt.raf(() => {
1312
+ var _a3;
1313
+ const hostRef = getHostRef(this);
1314
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1315
+ delete hostRef.$vnode$.$elm$;
1316
+ }
1317
+ });
1223
1318
  }
1224
1319
  componentOnReady() {
1225
1320
  return getHostRef(this).$onReadyPromise$;
@@ -1283,7 +1378,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1283
1378
  }
1284
1379
  }
1285
1380
  } catch (e) {
1286
- consoleError(e);
1381
+ consoleError(e, hostRef.$hostElement$);
1287
1382
  }
1288
1383
  };
1289
1384
  var getHostListenerTarget = (elm, flags) => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-7b5471f5.js');
5
+ const index = require('./index-6f236cfa.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-7b5471f5.js');
5
+ const index = require('./index-6f236cfa.js');
6
6
 
7
7
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
8
8
 
@@ -27,6 +27,18 @@ const MdsModal = class {
27
27
  this.window = false;
28
28
  this.top = false;
29
29
  this.bottom = false;
30
+ /**
31
+ * Specifies if the modal is opened or not
32
+ */
33
+ this.opened = false;
34
+ /**
35
+ * Specifies the animation position of the modal window
36
+ */
37
+ this.position = 'center';
38
+ /**
39
+ * Specifies if the component is animating itself or not
40
+ */
41
+ this.animating = 'none';
30
42
  this.updateCSSCustomProps = () => {
31
43
  var _a;
32
44
  if (typeof window === 'undefined')
@@ -65,9 +77,6 @@ const MdsModal = class {
65
77
  this.closeEvent.emit();
66
78
  }
67
79
  };
68
- this.opened = false;
69
- this.position = 'center';
70
- this.animating = 'none';
71
80
  }
72
81
  componentWillLoad() {
73
82
  var _a;
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-7b5471f5.js');
5
+ const index = require('./index-6f236cfa.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.22.2 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-modal.cjs.js', document.baseURI).href));
@@ -4,7 +4,7 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.22.2",
7
+ "version": "4.25.1",
8
8
  "typescriptVersion": "5.5.4"
9
9
  },
10
10
  "collections": [],