@maggioli-design-system/mds-modal 5.3.0 → 5.5.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 (92) hide show
  1. package/dist/cjs/{index-6f236cfa.js → index-a263ff04.js} +139 -101
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mds-modal.cjs.entry.js +35 -4
  4. package/dist/cjs/mds-modal.cjs.js +3 -3
  5. package/dist/collection/collection-manifest.json +1 -1
  6. package/dist/collection/common/floating-controller.js +3 -3
  7. package/dist/collection/common/slot.js +10 -1
  8. package/dist/collection/common/string.js +30 -0
  9. package/dist/collection/components/mds-modal/mds-modal.css +171 -73
  10. package/dist/collection/components/mds-modal/mds-modal.js +59 -2
  11. package/dist/collection/components/mds-modal/meta/dictionary.js +5 -1
  12. package/dist/collection/components/mds-modal/test/mds-modal.stories.js +20 -2
  13. package/dist/collection/dictionary/keyboard.js +84 -0
  14. package/dist/collection/type/keyboard.js +1 -0
  15. package/dist/components/mds-modal.js +36 -4
  16. package/dist/documentation.json +47 -2
  17. package/dist/esm/{index-f8d2dee4.js → index-efd0657a.js} +139 -101
  18. package/dist/esm/loader.js +3 -3
  19. package/dist/esm/mds-modal.entry.js +35 -4
  20. package/dist/esm/mds-modal.js +4 -4
  21. package/dist/esm-es5/index-efd0657a.js +1 -0
  22. package/dist/esm-es5/loader.js +1 -1
  23. package/dist/esm-es5/mds-modal.entry.js +1 -1
  24. package/dist/esm-es5/mds-modal.js +1 -1
  25. package/dist/mds-modal/mds-modal.esm.js +1 -1
  26. package/dist/mds-modal/mds-modal.js +1 -1
  27. package/dist/mds-modal/p-26971abb.js +2 -0
  28. package/dist/mds-modal/p-52bb21e4.system.entry.js +1 -0
  29. package/dist/mds-modal/p-785b3b47.system.js +2 -0
  30. package/dist/mds-modal/p-96b782c7.system.js +1 -0
  31. package/dist/mds-modal/p-df986a83.entry.js +1 -0
  32. package/dist/stats.json +100 -33
  33. package/dist/types/common/slot.d.ts +2 -1
  34. package/dist/types/common/string.d.ts +4 -0
  35. package/dist/types/components/mds-modal/mds-modal.d.ts +8 -1
  36. package/dist/types/components/mds-modal/meta/dictionary.d.ts +2 -1
  37. package/dist/types/components/mds-modal/meta/types.d.ts +1 -0
  38. package/dist/types/components/mds-modal/test/mds-modal.stories.d.ts +11 -0
  39. package/dist/types/components.d.ts +10 -2
  40. package/dist/types/dictionary/keyboard.d.ts +2 -0
  41. package/dist/types/type/keyboard.d.ts +12 -0
  42. package/documentation.json +62 -2
  43. package/package.json +4 -4
  44. package/readme.md +18 -16
  45. package/src/common/floating-controller.ts +6 -6
  46. package/src/common/slot.ts +11 -0
  47. package/src/common/string.ts +42 -0
  48. package/src/components/mds-modal/css/mds-modal-animate-bottom-left.css +2 -2
  49. package/src/components/mds-modal/css/mds-modal-animate-bottom-right.css +2 -2
  50. package/src/components/mds-modal/css/mds-modal-animate-bottom.css +2 -2
  51. package/src/components/mds-modal/css/mds-modal-animate-center.css +2 -2
  52. package/src/components/mds-modal/css/mds-modal-animate-left.css +2 -2
  53. package/src/components/mds-modal/css/mds-modal-animate-right.css +2 -2
  54. package/src/components/mds-modal/css/mds-modal-animate-top-left.css +2 -2
  55. package/src/components/mds-modal/css/mds-modal-animate-top-right.css +2 -2
  56. package/src/components/mds-modal/css/mds-modal-animate-top.css +2 -2
  57. package/src/components/mds-modal/css/mds-modal-animate.css +4 -4
  58. package/src/components/mds-modal/css/mds-modal-pref-animation.css +14 -23
  59. package/src/components/mds-modal/css/mds-modal-pref-contrast.css +5 -13
  60. package/src/components/mds-modal/css/mds-modal-pref-theme.css +6 -15
  61. package/src/components/mds-modal/mds-modal.css +9 -6
  62. package/src/components/mds-modal/mds-modal.tsx +36 -1
  63. package/src/components/mds-modal/meta/dictionary.ts +6 -0
  64. package/src/components/mds-modal/meta/types.ts +4 -0
  65. package/src/components/mds-modal/readme.md +18 -16
  66. package/src/components/mds-modal/test/mds-modal.stories.tsx +57 -3
  67. package/src/components.d.ts +10 -2
  68. package/src/dictionary/keyboard.ts +87 -0
  69. package/src/fixtures/icons.json +18 -1
  70. package/src/meta/keyboard/keys.json +83 -0
  71. package/src/tailwind/components.css +11 -46
  72. package/src/tailwind/fouc.css +118 -0
  73. package/src/tailwind/index.css +4 -0
  74. package/src/type/keyboard.ts +93 -0
  75. package/www/build/mds-modal.esm.js +1 -1
  76. package/www/build/mds-modal.js +1 -1
  77. package/www/build/p-26971abb.js +2 -0
  78. package/www/build/p-52bb21e4.system.entry.js +1 -0
  79. package/www/build/p-785b3b47.system.js +2 -0
  80. package/www/build/p-96b782c7.system.js +1 -0
  81. package/www/build/p-df986a83.entry.js +1 -0
  82. package/dist/esm-es5/index-f8d2dee4.js +0 -1
  83. package/dist/mds-modal/p-413a00c5.entry.js +0 -1
  84. package/dist/mds-modal/p-96958acc.system.entry.js +0 -1
  85. package/dist/mds-modal/p-bc1fa4e4.system.js +0 -2
  86. package/dist/mds-modal/p-c6899cb0.system.js +0 -1
  87. package/dist/mds-modal/p-ee90f86a.js +0 -2
  88. package/www/build/p-413a00c5.entry.js +0 -1
  89. package/www/build/p-96958acc.system.entry.js +0 -1
  90. package/www/build/p-bc1fa4e4.system.js +0 -2
  91. package/www/build/p-c6899cb0.system.js +0 -1
  92. package/www/build/p-ee90f86a.js +0 -2
@@ -21,10 +21,10 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'mds-modal';
24
- const BUILD = /* mds-modal */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: 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 };
24
+ const BUILD = /* mds-modal */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: 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.25.1 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.27.2 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
@@ -33,10 +33,15 @@ var __export = (target, all) => {
33
33
  };
34
34
 
35
35
  // src/client/client-host-ref.ts
36
- var hostRefs = /* @__PURE__ */ new WeakMap();
37
- var getHostRef = (ref) => hostRefs.get(ref);
36
+ var getHostRef = (ref) => {
37
+ if (ref.__stencil__getHostRef) {
38
+ return ref.__stencil__getHostRef();
39
+ }
40
+ return void 0;
41
+ };
38
42
  var registerInstance = (lazyInstance, hostRef) => {
39
- hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
43
+ lazyInstance.__stencil__getHostRef = () => hostRef;
44
+ hostRef.$lazyInstance$ = lazyInstance;
40
45
  };
41
46
  var registerHost = (hostElement, cmpMeta) => {
42
47
  const hostRef = {
@@ -50,7 +55,8 @@ var registerHost = (hostElement, cmpMeta) => {
50
55
  hostElement["s-p"] = [];
51
56
  hostElement["s-rc"] = [];
52
57
  }
53
- const ref = hostRefs.set(hostElement, hostRef);
58
+ const ref = hostRef;
59
+ hostElement.__stencil__getHostRef = () => ref;
54
60
  return ref;
55
61
  };
56
62
  var isMemberInElement = (elm, memberName) => memberName in elm;
@@ -107,7 +113,6 @@ var HYDRATED_STYLE_ID = "sty-id";
107
113
  var HYDRATED_CSS = "{visibility:hidden}[hydrated]{visibility:inherit}";
108
114
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
109
115
  var win = typeof window !== "undefined" ? window : {};
110
- var doc = win.document || { head: {} };
111
116
  var plt = {
112
117
  $flags$: 0,
113
118
  $resourcesUrl$: "",
@@ -118,9 +123,10 @@ var plt = {
118
123
  ce: (eventName, opts) => new CustomEvent(eventName, opts)
119
124
  };
120
125
  var supportsListenerOptions = /* @__PURE__ */ (() => {
126
+ var _a;
121
127
  let supportsListenerOptions2 = false;
122
128
  try {
123
- doc.addEventListener(
129
+ (_a = win.document) == null ? void 0 : _a.addEventListener(
124
130
  "e",
125
131
  null,
126
132
  Object.defineProperty({}, "passive", {
@@ -183,9 +189,9 @@ var isComplexType = (o) => {
183
189
  };
184
190
 
185
191
  // src/utils/query-nonce-meta-tag-content.ts
186
- function queryNonceMetaTagContent(doc2) {
192
+ function queryNonceMetaTagContent(doc) {
187
193
  var _a, _b, _c;
188
- return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
194
+ return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
189
195
  }
190
196
 
191
197
  // src/utils/result.ts
@@ -366,7 +372,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
366
372
  var _a;
367
373
  const scopeId2 = getScopeId(cmpMeta);
368
374
  const style = styles.get(scopeId2);
369
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
375
+ if (!win.document) {
376
+ return scopeId2;
377
+ }
378
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
370
379
  if (style) {
371
380
  if (typeof style === "string") {
372
381
  styleContainerNode = styleContainerNode.head || styleContainerNode;
@@ -377,9 +386,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
377
386
  }
378
387
  if (!appliedStyles.has(scopeId2)) {
379
388
  {
380
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
389
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
381
390
  styleElm.innerHTML = style;
382
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
391
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
383
392
  if (nonce != null) {
384
393
  styleElm.setAttribute("nonce", nonce);
385
394
  }
@@ -408,7 +417,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
408
417
  styleContainerNode.append(styleElm);
409
418
  }
410
419
  }
411
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
420
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
412
421
  styleContainerNode.insertBefore(styleElm, null);
413
422
  }
414
423
  }
@@ -433,7 +442,7 @@ var attachStyles = (hostRef) => {
433
442
  const scopeId2 = addStyle(
434
443
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
435
444
  cmpMeta);
436
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
445
+ if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
437
446
  elm["s-sc"] = scopeId2;
438
447
  elm.classList.add(scopeId2 + "-h");
439
448
  }
@@ -441,68 +450,69 @@ var attachStyles = (hostRef) => {
441
450
  };
442
451
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
443
452
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
444
- if (oldValue !== newValue) {
445
- let isProp = isMemberInElement(elm, memberName);
446
- let ln = memberName.toLowerCase();
447
- if (memberName === "class") {
448
- const classList = elm.classList;
449
- const oldClasses = parseClassList(oldValue);
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
- }
455
- } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
456
- if (memberName[2] === "-") {
457
- memberName = memberName.slice(3);
458
- } else if (isMemberInElement(win, ln)) {
459
- memberName = ln.slice(2);
460
- } else {
461
- memberName = ln[2] + memberName.slice(3);
453
+ if (oldValue === newValue) {
454
+ return;
455
+ }
456
+ let isProp = isMemberInElement(elm, memberName);
457
+ let ln = memberName.toLowerCase();
458
+ if (memberName === "class") {
459
+ const classList = elm.classList;
460
+ const oldClasses = parseClassList(oldValue);
461
+ let newClasses = parseClassList(newValue);
462
+ {
463
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
464
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
465
+ }
466
+ } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
467
+ if (memberName[2] === "-") {
468
+ memberName = memberName.slice(3);
469
+ } else if (isMemberInElement(win, ln)) {
470
+ memberName = ln.slice(2);
471
+ } else {
472
+ memberName = ln[2] + memberName.slice(3);
473
+ }
474
+ if (oldValue || newValue) {
475
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
476
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
477
+ if (oldValue) {
478
+ plt.rel(elm, memberName, oldValue, capture);
462
479
  }
463
- if (oldValue || newValue) {
464
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
465
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
466
- if (oldValue) {
467
- plt.rel(elm, memberName, oldValue, capture);
468
- }
469
- if (newValue) {
470
- plt.ael(elm, memberName, newValue, capture);
471
- }
480
+ if (newValue) {
481
+ plt.ael(elm, memberName, newValue, capture);
472
482
  }
473
- } else {
474
- const isComplex = isComplexType(newValue);
475
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
476
- try {
477
- if (!elm.tagName.includes("-")) {
478
- const n = newValue == null ? "" : newValue;
479
- if (memberName === "list") {
480
- isProp = false;
481
- } else if (oldValue == null || elm[memberName] != n) {
482
- if (typeof elm.__lookupSetter__(memberName) === "function") {
483
- elm[memberName] = n;
484
- } else {
485
- elm.setAttribute(memberName, n);
486
- }
483
+ }
484
+ } else {
485
+ const isComplex = isComplexType(newValue);
486
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
487
+ try {
488
+ if (!elm.tagName.includes("-")) {
489
+ const n = newValue == null ? "" : newValue;
490
+ if (memberName === "list") {
491
+ isProp = false;
492
+ } else if (oldValue == null || elm[memberName] != n) {
493
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
494
+ elm[memberName] = n;
495
+ } else {
496
+ elm.setAttribute(memberName, n);
487
497
  }
488
- } else if (elm[memberName] !== newValue) {
489
- elm[memberName] = newValue;
490
498
  }
491
- } catch (e) {
499
+ } else if (elm[memberName] !== newValue) {
500
+ elm[memberName] = newValue;
492
501
  }
502
+ } catch (e) {
493
503
  }
494
- if (newValue == null || newValue === false) {
495
- if (newValue !== false || elm.getAttribute(memberName) === "") {
496
- {
497
- elm.removeAttribute(memberName);
498
- }
499
- }
500
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
501
- newValue = newValue === true ? "" : newValue;
504
+ }
505
+ if (newValue == null || newValue === false) {
506
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
502
507
  {
503
- elm.setAttribute(memberName, newValue);
508
+ elm.removeAttribute(memberName);
504
509
  }
505
510
  }
511
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
512
+ newValue = newValue === true ? "" : newValue;
513
+ {
514
+ elm.setAttribute(memberName, newValue);
515
+ }
506
516
  }
507
517
  }
508
518
  };
@@ -565,9 +575,14 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
565
575
  let elm;
566
576
  let childNode;
567
577
  if (newVNode2.$text$ !== null) {
568
- elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
578
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
569
579
  } else {
570
- elm = newVNode2.$elm$ = doc.createElement(
580
+ if (!win.document) {
581
+ throw new Error(
582
+ "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
583
+ );
584
+ }
585
+ elm = newVNode2.$elm$ = win.document.createElement(
571
586
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
572
587
  );
573
588
  {
@@ -712,13 +727,10 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
712
727
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
713
728
  const oldChildren = oldVNode.$children$;
714
729
  const newChildren = newVNode2.$children$;
715
- const tag = newVNode2.$tag$;
716
730
  const text = newVNode2.$text$;
717
731
  if (text === null) {
718
732
  {
719
- if (tag === "slot" && !useNativeShadowDom) ; else {
720
- updateElement(oldVNode, newVNode2, isSvgMode);
721
- }
733
+ updateElement(oldVNode, newVNode2, isSvgMode);
722
734
  }
723
735
  if (oldChildren !== null && newChildren !== null) {
724
736
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -765,7 +777,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
765
777
  rootVnode.$flags$ |= 4 /* isHost */;
766
778
  hostRef.$vnode$ = rootVnode;
767
779
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
768
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
780
+ useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
769
781
  patch(oldVNode, rootVnode, isInitialLoad);
770
782
  };
771
783
 
@@ -812,13 +824,11 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
812
824
  hostRef.$queuedListeners$ = void 0;
813
825
  }
814
826
  }
815
- {
816
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
817
- }
818
- }
819
- {
820
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
827
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
828
+ } else {
829
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
821
830
  }
831
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
822
832
  endSchedule();
823
833
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
824
834
  };
@@ -884,14 +894,13 @@ var postUpdateComponent = (hostRef) => {
884
894
  const endPostUpdate = createTime("postUpdate", tagName);
885
895
  const instance = hostRef.$lazyInstance$ ;
886
896
  const ancestorComponent = hostRef.$ancestorComponent$;
897
+ safeCall(instance, "componentDidRender", void 0, elm);
887
898
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
888
899
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
889
900
  {
890
901
  addHydratedFlag(elm);
891
902
  }
892
- {
893
- safeCall(instance, "componentDidLoad", void 0, elm);
894
- }
903
+ safeCall(instance, "componentDidLoad", void 0, elm);
895
904
  endPostUpdate();
896
905
  {
897
906
  hostRef.$onReadyResolve$(elm);
@@ -900,6 +909,7 @@ var postUpdateComponent = (hostRef) => {
900
909
  }
901
910
  }
902
911
  } else {
912
+ safeCall(instance, "componentDidUpdate", void 0, elm);
903
913
  endPostUpdate();
904
914
  }
905
915
  {
@@ -914,9 +924,6 @@ var postUpdateComponent = (hostRef) => {
914
924
  }
915
925
  };
916
926
  var appDidLoad = (who) => {
917
- {
918
- addHydratedFlag(doc.documentElement);
919
- }
920
927
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
921
928
  };
922
929
  var safeCall = (instance, method, arg, elm) => {
@@ -940,7 +947,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
940
947
  const hostRef = getHostRef(ref);
941
948
  if (!hostRef) {
942
949
  throw new Error(
943
- `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
950
+ `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
944
951
  );
945
952
  }
946
953
  const elm = hostRef.$hostElement$ ;
@@ -966,6 +973,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
966
973
  }
967
974
  }
968
975
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
976
+ if (instance.componentShouldUpdate) {
977
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
978
+ return;
979
+ }
980
+ }
969
981
  scheduleUpdate(hostRef, false);
970
982
  }
971
983
  }
@@ -1105,7 +1117,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1105
1117
  let Cstr;
1106
1118
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1107
1119
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1108
- {
1120
+ const bundleId = cmpMeta.$lazyBundleId$;
1121
+ if (bundleId) {
1109
1122
  const CstrImport = loadModule(cmpMeta, hostRef);
1110
1123
  if (CstrImport && "then" in CstrImport) {
1111
1124
  const endLoad = uniqueTime();
@@ -1140,6 +1153,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1140
1153
  hostRef.$flags$ |= 128 /* isWatchReady */;
1141
1154
  }
1142
1155
  endNewInstance();
1156
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1157
+ } else {
1158
+ Cstr = elm.constructor;
1159
+ const cmpTag = elm.localName;
1160
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1143
1161
  }
1144
1162
  if (Cstr && Cstr.style) {
1145
1163
  let style;
@@ -1163,6 +1181,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1163
1181
  }
1164
1182
  };
1165
1183
  var fireConnectedCallback = (instance, elm) => {
1184
+ {
1185
+ safeCall(instance, "connectedCallback", void 0, elm);
1186
+ }
1166
1187
  };
1167
1188
 
1168
1189
  // src/runtime/connected-callback.ts
@@ -1196,14 +1217,19 @@ var connectedCallback = (elm) => {
1196
1217
  }
1197
1218
  } else {
1198
1219
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1199
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1200
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1220
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1221
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1222
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1223
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1201
1224
  }
1202
1225
  }
1203
1226
  endConnected();
1204
1227
  }
1205
1228
  };
1206
1229
  var disconnectInstance = (instance, elm) => {
1230
+ {
1231
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1232
+ }
1207
1233
  };
1208
1234
  var disconnectedCallback = async (elm) => {
1209
1235
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1214,8 +1240,10 @@ var disconnectedCallback = async (elm) => {
1214
1240
  hostRef.$rmListeners$ = void 0;
1215
1241
  }
1216
1242
  }
1217
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1218
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1243
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1244
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1245
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1246
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1219
1247
  }
1220
1248
  }
1221
1249
  if (rootAppliedStyles.has(elm)) {
@@ -1229,18 +1257,22 @@ var disconnectedCallback = async (elm) => {
1229
1257
  // src/runtime/bootstrap-lazy.ts
1230
1258
  var bootstrapLazy = (lazyBundles, options = {}) => {
1231
1259
  var _a;
1260
+ if (!win.document) {
1261
+ console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
1262
+ return;
1263
+ }
1232
1264
  const endBootstrap = createTime();
1233
1265
  const cmpTags = [];
1234
1266
  const exclude = options.exclude || [];
1235
1267
  const customElements2 = win.customElements;
1236
- const head = doc.head;
1268
+ const head = win.document.head;
1237
1269
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1238
- const dataStyles = /* @__PURE__ */ doc.createElement("style");
1270
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
1239
1271
  const deferredConnectedCallbacks = [];
1240
1272
  let appLoadFallback;
1241
1273
  let isBootstrapping = true;
1242
1274
  Object.assign(plt, options);
1243
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
1275
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1244
1276
  let hasSlotRelocation = false;
1245
1277
  lazyBundles.map((lazyBundle) => {
1246
1278
  lazyBundle[1].map((compactMeta) => {
@@ -1311,6 +1343,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1311
1343
  plt.raf(() => {
1312
1344
  var _a3;
1313
1345
  const hostRef = getHostRef(this);
1346
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1347
+ if (i2 > -1) {
1348
+ deferredConnectedCallbacks.splice(i2, 1);
1349
+ }
1314
1350
  if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1315
1351
  delete hostRef.$vnode$.$elm$;
1316
1352
  }
@@ -1339,7 +1375,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1339
1375
  }
1340
1376
  if (dataStyles.innerHTML.length) {
1341
1377
  dataStyles.setAttribute("data-styles", "");
1342
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1378
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1343
1379
  if (nonce != null) {
1344
1380
  dataStyles.setAttribute("nonce", nonce);
1345
1381
  }
@@ -1357,9 +1393,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1357
1393
  endBootstrap();
1358
1394
  };
1359
1395
  var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1360
- if (listeners) {
1396
+ if (listeners && win.document) {
1361
1397
  listeners.map(([flags, name, method]) => {
1362
- const target = getHostListenerTarget(elm, flags) ;
1398
+ const target = getHostListenerTarget(win.document, elm, flags) ;
1363
1399
  const handler = hostListenerProxy(hostRef, method);
1364
1400
  const opts = hostListenerOpts(flags);
1365
1401
  plt.ael(target, name, handler, opts);
@@ -1381,8 +1417,10 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1381
1417
  consoleError(e, hostRef.$hostElement$);
1382
1418
  }
1383
1419
  };
1384
- var getHostListenerTarget = (elm, flags) => {
1385
- if (flags & 4 /* TargetDocument */) return doc;
1420
+ var getHostListenerTarget = (doc, elm, flags) => {
1421
+ if (flags & 4 /* TargetDocument */) {
1422
+ return doc;
1423
+ }
1386
1424
  return elm;
1387
1425
  };
1388
1426
  var hostListenerOpts = (flags) => supportsListenerOptions ? {
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-6f236cfa.js');
5
+ const index = require('./index-a263ff04.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"position":[1537],"animating":[1537]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{"opened":["handleOpenProp"]}]]]], options);
11
+ return index.bootstrapLazy([["mds-modal.cjs",[[1,"mds-modal",{"opened":[1540],"position":[1537],"animating":[1537],"overflow":[513]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{"opened":["handleOpenProp"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;