xv-webcomponents 0.1.5 → 0.1.7

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 (46) hide show
  1. package/dist/cjs/{index-ff2499dc.js → index-888a60d0.js} +113 -80
  2. package/dist/cjs/index-888a60d0.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/xv-button-v2_2.cjs.entry.js +3 -8
  5. package/dist/cjs/xv-button-v2_2.cjs.entry.js.map +1 -1
  6. package/dist/cjs/xv-webcomponents.cjs.js +3 -3
  7. package/dist/cjs/xv-webcomponents.cjs.js.map +1 -1
  8. package/dist/collection/collection-manifest.json +1 -1
  9. package/dist/collection/components/xv-button/xv-button.js +1 -30
  10. package/dist/collection/components/xv-button/xv-button.js.map +1 -1
  11. package/dist/collection/components/xv-checkbox/xv-checkbox.js +1 -9
  12. package/dist/collection/components/xv-checkbox/xv-checkbox.js.map +1 -1
  13. package/dist/esm/{index-48e3f7fe.js → index-5147034e.js} +113 -80
  14. package/dist/esm/index-5147034e.js.map +1 -0
  15. package/dist/esm/loader.js +3 -3
  16. package/dist/esm/xv-button-v2_2.entry.js +3 -8
  17. package/dist/esm/xv-button-v2_2.entry.js.map +1 -1
  18. package/dist/esm/xv-webcomponents.js +4 -4
  19. package/dist/esm/xv-webcomponents.js.map +1 -1
  20. package/dist/types/components/xv-button/xv-button.d.ts +0 -4
  21. package/dist/types/components/xv-checkbox/xv-checkbox.d.ts +0 -1
  22. package/dist/types/components.d.ts +0 -8
  23. package/dist/xv-webcomponents/p-02843f6e.entry.js +2 -0
  24. package/dist/xv-webcomponents/p-02843f6e.entry.js.map +1 -0
  25. package/dist/xv-webcomponents/p-b6c1c52d.js +3 -0
  26. package/dist/xv-webcomponents/p-b6c1c52d.js.map +1 -0
  27. package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
  28. package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
  29. package/package.json +2 -2
  30. package/dist/cjs/index-ff2499dc.js.map +0 -1
  31. package/dist/components/index.d.ts +0 -33
  32. package/dist/components/index.js +0 -9
  33. package/dist/components/index.js.map +0 -1
  34. package/dist/components/p-892a2cc1.js +0 -958
  35. package/dist/components/p-892a2cc1.js.map +0 -1
  36. package/dist/components/xv-button-v2.d.ts +0 -11
  37. package/dist/components/xv-button-v2.js +0 -70
  38. package/dist/components/xv-button-v2.js.map +0 -1
  39. package/dist/components/xv-checkbox-v2.d.ts +0 -11
  40. package/dist/components/xv-checkbox-v2.js +0 -49
  41. package/dist/components/xv-checkbox-v2.js.map +0 -1
  42. package/dist/esm/index-48e3f7fe.js.map +0 -1
  43. package/dist/xv-webcomponents/p-690a0beb.js +0 -3
  44. package/dist/xv-webcomponents/p-690a0beb.js.map +0 -1
  45. package/dist/xv-webcomponents/p-757d39ae.entry.js +0 -2
  46. package/dist/xv-webcomponents/p-757d39ae.entry.js.map +0 -1
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-ff2499dc.js');
5
+ const index = require('./index-888a60d0.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.26.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.27.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('xv-webcomponents.cjs.js', document.baseURI).href));
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["xv-button-v2_2.cjs",[[1,"xv-button-v2",{"label":[1],"variant":[1],"size":[1],"disabled":[4],"detectedBrand":[32]}],[1,"xv-checkbox-v2",{"detectedBrand":[32]}]]]], options);
22
+ return index.bootstrapLazy([["xv-button-v2_2.cjs",[[1,"xv-button-v2",{"label":[1],"variant":[1],"disabled":[4]}],[1,"xv-checkbox-v2"]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -1 +1 @@
1
- {"file":"xv-webcomponents.cjs.js","mappings":";;;;;;;AAAA;AACA;AACA;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,kNAAe,CAAC;AACrC,EAAE,MAAM,IAAI,GAAiE,EAAE,CAAC;AAChF,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AACtD,GAAG;AACH,EAAE,OAAOA,oBAAc,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAMC,wBAAa,EAAE,CAAC;AACxB,EAAE,OAAOC,mBAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC;;;;","names":["promiseResolve","globalScripts","bootstrapLazy"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.26.0 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"version":3}
1
+ {"file":"xv-webcomponents.cjs.js","mappings":";;;;;;;AAAA;AACA;AACA;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,kNAAe,CAAC;AACrC,EAAE,MAAM,IAAI,GAAiE,EAAE,CAAC;AAChF,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AACtD,GAAG;AACH,EAAE,OAAOA,oBAAc,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAMC,wBAAa,EAAE,CAAC;AACxB,EAAE,OAAOC,mBAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC;;;;","names":["promiseResolve","globalScripts","bootstrapLazy"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.27.1 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"version":3}
@@ -5,7 +5,7 @@
5
5
  ],
6
6
  "compiler": {
7
7
  "name": "@stencil/core",
8
- "version": "4.26.0",
8
+ "version": "4.27.1",
9
9
  "typescriptVersion": "5.5.4"
10
10
  },
11
11
  "collections": [],
@@ -5,12 +5,8 @@ export class XvButton {
5
5
  this.label = '';
6
6
  /** Variant */
7
7
  this.variant = 'primary';
8
- /** Size */
9
- this.size = 'medium';
10
8
  /** Disabled state */
11
9
  this.disabled = false;
12
- /** Automatically detected brand */
13
- this.detectedBrand = 'default-brand';
14
10
  /** Handle click only if not disabled */
15
11
  this.handleClick = () => {
16
12
  if (this.disabled) {
@@ -32,7 +28,7 @@ export class XvButton {
32
28
  this.applyGlobalStyles();
33
29
  }
34
30
  render() {
35
- return (h("button", { key: '9ee0920fec8f44e6d1f9785bbf575881f1d039d9', class: `xv-button ${this.variant} ${this.size}`, disabled: this.disabled, onClick: this.handleClick }, this.label));
31
+ return (h("button", { key: '7f3af3f4e73a964d9742313bb63ded06ccdb4ea9', class: `xv-button ${this.variant} ${this.disabled ? 'disabled' : ''}`, onClick: this.handleClick }, this.label));
36
32
  }
37
33
  static get is() { return "xv-button-v2"; }
38
34
  static get encapsulation() { return "shadow"; }
@@ -78,26 +74,6 @@ export class XvButton {
78
74
  "reflect": false,
79
75
  "defaultValue": "'primary'"
80
76
  },
81
- "size": {
82
- "type": "string",
83
- "mutable": false,
84
- "complexType": {
85
- "original": "'small' | 'medium' | 'large'",
86
- "resolved": "\"large\" | \"medium\" | \"small\"",
87
- "references": {}
88
- },
89
- "required": false,
90
- "optional": false,
91
- "docs": {
92
- "tags": [],
93
- "text": "Size"
94
- },
95
- "getter": false,
96
- "setter": false,
97
- "attribute": "size",
98
- "reflect": false,
99
- "defaultValue": "'medium'"
100
- },
101
77
  "disabled": {
102
78
  "type": "boolean",
103
79
  "mutable": false,
@@ -120,11 +96,6 @@ export class XvButton {
120
96
  }
121
97
  };
122
98
  }
123
- static get states() {
124
- return {
125
- "detectedBrand": {}
126
- };
127
- }
128
99
  static get events() {
129
100
  return [{
130
101
  "method": "buttonClick",
@@ -1 +1 @@
1
- {"version":3,"file":"xv-button.js","sourceRoot":"","sources":["../../../src/components/xv-button/xv-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOxF,MAAM,OAAO,QAAQ;IAJrB;QAOE,mBAAmB;QACX,UAAK,GAAW,EAAE,CAAC;QAE3B,cAAc;QACN,YAAO,GAA8D,SAAS,CAAC;QAEvF,WAAW;QACH,SAAI,GAAiC,QAAQ,CAAC;QAEtD,qBAAqB;QACb,aAAQ,GAAY,KAAK,CAAC;QAElC,mCAAmC;QAC1B,kBAAa,GAAW,eAAe,CAAC;QAejD,wCAAwC;QAChC,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,OAAO;YACT,CAAC;YACD,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QAC1B,CAAC,CAAC;KAiBH;IAhCS,iBAAiB;;QACrB,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAoB,CAAC;QAC9E,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACnD,UAAU,CAAC,SAAS,GAAG,gBAAgB,WAAW,CAAC,IAAI,KAAK,CAAC;YAC7D,MAAA,IAAI,CAAC,EAAE,CAAC,UAAU,0CAAE,WAAW,CAAC,UAAU,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAUD,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAED,MAAM;QACJ,OAAO,CACL,+DACE,KAAK,EAAE,aAAa,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,EAC/C,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,WAAW,IAExB,IAAI,CAAC,KAAK,CACJ,CACV,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, State, Event, EventEmitter, h, Element } from '@stencil/core';\r\n\r\n\r\n@Component({\r\n tag: 'xv-button-v2',\r\n shadow: true,\r\n})\r\nexport class XvButton {\r\n @Element() el!: HTMLElement;\r\n\r\n /** Button label */\r\n @Prop() label: string = '';\r\n\r\n /** Variant */\r\n @Prop() variant: 'accent' | 'primary' | 'secondary' | 'tertiary' | 'ghost' = 'primary';\r\n\r\n /** Size */\r\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\r\n\r\n /** Disabled state */\r\n @Prop() disabled: boolean = false;\r\n\r\n /** Automatically detected brand */\r\n @State() detectedBrand: string = 'default-brand';\r\n\r\n /** Emits when the button is clicked */\r\n @Event() buttonClick!: EventEmitter<void>;\r\n\r\n\r\n private applyGlobalStyles() {\r\n const globalStyle = document.getElementById(\"brand-style\") as HTMLLinkElement;\r\n if (globalStyle) {\r\n const styleClone = document.createElement(\"style\");\r\n styleClone.innerHTML = `@import url('${globalStyle.href}');`;\r\n this.el.shadowRoot?.appendChild(styleClone);\r\n }\r\n }\r\n\r\n /** Handle click only if not disabled */\r\n private handleClick = () => {\r\n if (this.disabled) {\r\n return;\r\n }\r\n this.buttonClick.emit();\r\n };\r\n\r\n componentWillLoad() {\r\n this.applyGlobalStyles();\r\n }\r\n\r\n render() {\r\n return (\r\n <button\r\n class={`xv-button ${this.variant} ${this.size}`}\r\n disabled={this.disabled}\r\n onClick={this.handleClick}\r\n >\r\n {this.label}\r\n </button>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"xv-button.js","sourceRoot":"","sources":["../../../src/components/xv-button/xv-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAgB,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOjF,MAAM,OAAO,QAAQ;IAJrB;QAOE,mBAAmB;QACX,UAAK,GAAW,EAAE,CAAC;QAE3B,cAAc;QACN,YAAO,GAA8D,SAAS,CAAC;QAEvF,qBAAqB;QACb,aAAQ,GAAY,KAAK,CAAC;QAelC,wCAAwC;QAChC,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,OAAO;YACT,CAAC;YACD,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QAC1B,CAAC,CAAC;KAgBH;IA/BS,iBAAiB;;QACrB,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAoB,CAAC;QAC9E,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACnD,UAAU,CAAC,SAAS,GAAG,gBAAgB,WAAW,CAAC,IAAI,KAAK,CAAC;YAC7D,MAAA,IAAI,CAAC,EAAE,CAAC,UAAU,0CAAE,WAAW,CAAC,UAAU,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAUD,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAED,MAAM;QACJ,OAAO,CACL,+DACE,KAAK,EAAE,aAAa,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EACrE,OAAO,EAAE,IAAI,CAAC,WAAW,IAExB,IAAI,CAAC,KAAK,CACJ,CACV,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, Event, EventEmitter, h, Element } from '@stencil/core';\r\n\r\n\r\n@Component({\r\n tag: 'xv-button-v2',\r\n shadow: true,\r\n})\r\nexport class XvButton {\r\n @Element() el!: HTMLElement;\r\n\r\n /** Button label */\r\n @Prop() label: string = '';\r\n\r\n /** Variant */\r\n @Prop() variant: 'accent' | 'primary' | 'secondary' | 'tertiary' | 'ghost' = 'primary';\r\n\r\n /** Disabled state */\r\n @Prop() disabled: boolean = false;\r\n\r\n /** Emits when the button is clicked */\r\n @Event() buttonClick!: EventEmitter<void>;\r\n\r\n\r\n private applyGlobalStyles() {\r\n const globalStyle = document.getElementById(\"brand-style\") as HTMLLinkElement;\r\n if (globalStyle) {\r\n const styleClone = document.createElement(\"style\");\r\n styleClone.innerHTML = `@import url('${globalStyle.href}');`;\r\n this.el.shadowRoot?.appendChild(styleClone);\r\n }\r\n }\r\n\r\n /** Handle click only if not disabled */\r\n private handleClick = () => {\r\n if (this.disabled) {\r\n return;\r\n }\r\n this.buttonClick.emit();\r\n };\r\n\r\n componentWillLoad() {\r\n this.applyGlobalStyles();\r\n }\r\n\r\n render() {\r\n return (\r\n <button\r\n class={`xv-button ${this.variant} ${this.disabled ? 'disabled' : ''}`}\r\n onClick={this.handleClick}\r\n >\r\n {this.label}\r\n </button>\r\n );\r\n }\r\n}\r\n"]}
@@ -1,8 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
2
  export class XvCheckbox {
3
- constructor() {
4
- this.detectedBrand = 'default-brand';
5
- }
6
3
  applyGlobalStyles() {
7
4
  var _a;
8
5
  const globalStyle = document.getElementById("brand-style");
@@ -16,15 +13,10 @@ export class XvCheckbox {
16
13
  this.applyGlobalStyles();
17
14
  }
18
15
  render() {
19
- return (h("label", { key: '5b52e52e84e105f1e438161646f405cb51b9b12d', class: "checkbox-container" }, h("input", { key: '4aabb597947bf1433df13eec5a92be5d7b12cc93', type: "checkbox" }), h("span", { key: '42b26aaf91da25599dea3451210c328092b69f48', class: "checkmark" }), h("slot", { key: '1ad84ced058884114ce67cca80228d23dbd0dd16' })));
16
+ return (h("label", { key: 'ec72f67055064e97584c34606c997b671db5c4a6', class: "checkbox-container" }, h("input", { key: '5473f8ce3e1b85bbfc7ba2cfa56ed9dc3fc09254', type: "checkbox" }), h("span", { key: '9384407aa8a34a9c20cf46f68d508d71c3e0efa8', class: "checkmark" }), h("slot", { key: 'a3d8a7c8a242da4cdf71deddf2349c088bab4785' })));
20
17
  }
21
18
  static get is() { return "xv-checkbox-v2"; }
22
19
  static get encapsulation() { return "shadow"; }
23
- static get states() {
24
- return {
25
- "detectedBrand": {}
26
- };
27
- }
28
20
  static get elementRef() { return "el"; }
29
21
  }
30
22
  //# sourceMappingURL=xv-checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"xv-checkbox.js","sourceRoot":"","sources":["../../../src/components/xv-checkbox/xv-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAM7D,MAAM,OAAO,UAAU;IAJvB;QAMW,kBAAa,GAAW,eAAe,CAAC;KAwBlD;IAtBS,iBAAiB;;QACvB,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAoB,CAAC;QAC9E,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACnD,UAAU,CAAC,SAAS,GAAG,gBAAgB,WAAW,CAAC,IAAI,KAAK,CAAC;YAC7D,MAAA,IAAI,CAAC,EAAE,CAAC,UAAU,0CAAE,WAAW,CAAC,UAAU,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAED,MAAM;QACJ,OAAO,CACL,8DAAO,KAAK,EAAC,oBAAoB;YAC/B,8DAAO,IAAI,EAAC,UAAU,GAAG;YACzB,6DAAM,KAAK,EAAC,WAAW,GAAQ;YAC/B,8DAAa,CACP,CACT,CAAC;IACJ,CAAC;;;;;;;CACF","sourcesContent":["import { Component, h, Element, State } from '@stencil/core';\n\n@Component({\n tag: 'xv-checkbox-v2',\n shadow: true, // ✅ Shadow DOM aktiviert\n})\nexport class XvCheckbox {\n @Element() el!: HTMLElement;\n @State() detectedBrand: string = 'default-brand';\n\n private applyGlobalStyles() {\n const globalStyle = document.getElementById(\"brand-style\") as HTMLLinkElement;\n if (globalStyle) {\n const styleClone = document.createElement(\"style\");\n styleClone.innerHTML = `@import url('${globalStyle.href}');`;\n this.el.shadowRoot?.appendChild(styleClone);\n }\n }\n\n componentWillLoad() {\n this.applyGlobalStyles();\n }\n\n render() {\n return (\n <label class=\"checkbox-container\">\n <input type=\"checkbox\" />\n <span class=\"checkmark\"></span>\n <slot></slot>\n </label>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"xv-checkbox.js","sourceRoot":"","sources":["../../../src/components/xv-checkbox/xv-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAMtD,MAAM,OAAO,UAAU;IAGb,iBAAiB;;QACvB,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAoB,CAAC;QAC9E,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACnD,UAAU,CAAC,SAAS,GAAG,gBAAgB,WAAW,CAAC,IAAI,KAAK,CAAC;YAC7D,MAAA,IAAI,CAAC,EAAE,CAAC,UAAU,0CAAE,WAAW,CAAC,UAAU,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAED,MAAM;QACJ,OAAO,CACL,8DAAO,KAAK,EAAC,oBAAoB;YAC/B,8DAAO,IAAI,EAAC,UAAU,GAAG;YACzB,6DAAM,KAAK,EAAC,WAAW,GAAQ;YAC/B,8DAAa,CACP,CACT,CAAC;IACJ,CAAC;;;;CACF","sourcesContent":["import { Component, h, Element } from '@stencil/core';\n\n@Component({\n tag: 'xv-checkbox-v2',\n shadow: true, // ✅ Shadow DOM aktiviert\n})\nexport class XvCheckbox {\n @Element() el!: HTMLElement;\n\n private applyGlobalStyles() {\n const globalStyle = document.getElementById(\"brand-style\") as HTMLLinkElement;\n if (globalStyle) {\n const styleClone = document.createElement(\"style\");\n styleClone.innerHTML = `@import url('${globalStyle.href}');`;\n this.el.shadowRoot?.appendChild(styleClone);\n }\n }\n\n componentWillLoad() {\n this.applyGlobalStyles();\n }\n\n render() {\n return (\n <label class=\"checkbox-container\">\n <input type=\"checkbox\" />\n <span class=\"checkmark\"></span>\n <slot></slot>\n </label>\n );\n }\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  const NAMESPACE = 'xv-webcomponents';
2
- const BUILD = /* xv-webcomponents */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, 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: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, 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: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: false, 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: false };
2
+ const BUILD = /* xv-webcomponents */ { 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: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, 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: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: false, style: false, 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: false };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.27.1 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
@@ -11,10 +11,15 @@ var __export = (target, all) => {
11
11
  };
12
12
 
13
13
  // src/client/client-host-ref.ts
14
- var hostRefs = /* @__PURE__ */ new WeakMap();
15
- var getHostRef = (ref) => hostRefs.get(ref);
14
+ var getHostRef = (ref) => {
15
+ if (ref.__stencil__getHostRef) {
16
+ return ref.__stencil__getHostRef();
17
+ }
18
+ return void 0;
19
+ };
16
20
  var registerInstance = (lazyInstance, hostRef) => {
17
- hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
21
+ lazyInstance.__stencil__getHostRef = () => hostRef;
22
+ hostRef.$lazyInstance$ = lazyInstance;
18
23
  };
19
24
  var registerHost = (hostElement, cmpMeta) => {
20
25
  const hostRef = {
@@ -28,7 +33,8 @@ var registerHost = (hostElement, cmpMeta) => {
28
33
  hostElement["s-p"] = [];
29
34
  hostElement["s-rc"] = [];
30
35
  }
31
- const ref = hostRefs.set(hostElement, hostRef);
36
+ const ref = hostRef;
37
+ hostElement.__stencil__getHostRef = () => ref;
32
38
  return ref;
33
39
  };
34
40
  var isMemberInElement = (elm, memberName) => memberName in elm;
@@ -68,7 +74,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
68
74
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
69
75
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
70
76
  var win = typeof window !== "undefined" ? window : {};
71
- var doc = win.document || { head: {} };
72
77
  var plt = {
73
78
  $flags$: 0,
74
79
  $resourcesUrl$: "",
@@ -120,9 +125,9 @@ var isComplexType = (o) => {
120
125
  };
121
126
 
122
127
  // src/utils/query-nonce-meta-tag-content.ts
123
- function queryNonceMetaTagContent(doc2) {
128
+ function queryNonceMetaTagContent(doc) {
124
129
  var _a, _b, _c;
125
- 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;
130
+ 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;
126
131
  }
127
132
 
128
133
  // src/utils/result.ts
@@ -286,68 +291,69 @@ var emitEvent = (elm, name, opts) => {
286
291
  };
287
292
  var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
288
293
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
289
- if (oldValue !== newValue) {
290
- let isProp = isMemberInElement(elm, memberName);
291
- let ln = memberName.toLowerCase();
292
- if (memberName === "class") {
293
- const classList = elm.classList;
294
- const oldClasses = parseClassList(oldValue);
295
- let newClasses = parseClassList(newValue);
296
- {
297
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
298
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
299
- }
300
- } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
301
- if (memberName[2] === "-") {
302
- memberName = memberName.slice(3);
303
- } else if (isMemberInElement(win, ln)) {
304
- memberName = ln.slice(2);
305
- } else {
306
- memberName = ln[2] + memberName.slice(3);
294
+ if (oldValue === newValue) {
295
+ return;
296
+ }
297
+ let isProp = isMemberInElement(elm, memberName);
298
+ let ln = memberName.toLowerCase();
299
+ if (memberName === "class") {
300
+ const classList = elm.classList;
301
+ const oldClasses = parseClassList(oldValue);
302
+ let newClasses = parseClassList(newValue);
303
+ {
304
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
305
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
306
+ }
307
+ } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
308
+ if (memberName[2] === "-") {
309
+ memberName = memberName.slice(3);
310
+ } else if (isMemberInElement(win, ln)) {
311
+ memberName = ln.slice(2);
312
+ } else {
313
+ memberName = ln[2] + memberName.slice(3);
314
+ }
315
+ if (oldValue || newValue) {
316
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
317
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
318
+ if (oldValue) {
319
+ plt.rel(elm, memberName, oldValue, capture);
307
320
  }
308
- if (oldValue || newValue) {
309
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
310
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
311
- if (oldValue) {
312
- plt.rel(elm, memberName, oldValue, capture);
313
- }
314
- if (newValue) {
315
- plt.ael(elm, memberName, newValue, capture);
316
- }
321
+ if (newValue) {
322
+ plt.ael(elm, memberName, newValue, capture);
317
323
  }
318
- } else {
319
- const isComplex = isComplexType(newValue);
320
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
321
- try {
322
- if (!elm.tagName.includes("-")) {
323
- const n = newValue == null ? "" : newValue;
324
- if (memberName === "list") {
325
- isProp = false;
326
- } else if (oldValue == null || elm[memberName] != n) {
327
- if (typeof elm.__lookupSetter__(memberName) === "function") {
328
- elm[memberName] = n;
329
- } else {
330
- elm.setAttribute(memberName, n);
331
- }
324
+ }
325
+ } else {
326
+ const isComplex = isComplexType(newValue);
327
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
328
+ try {
329
+ if (!elm.tagName.includes("-")) {
330
+ const n = newValue == null ? "" : newValue;
331
+ if (memberName === "list") {
332
+ isProp = false;
333
+ } else if (oldValue == null || elm[memberName] != n) {
334
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
335
+ elm[memberName] = n;
336
+ } else {
337
+ elm.setAttribute(memberName, n);
332
338
  }
333
- } else if (elm[memberName] !== newValue) {
334
- elm[memberName] = newValue;
335
339
  }
336
- } catch (e) {
340
+ } else if (elm[memberName] !== newValue) {
341
+ elm[memberName] = newValue;
337
342
  }
343
+ } catch (e) {
338
344
  }
339
- if (newValue == null || newValue === false) {
340
- if (newValue !== false || elm.getAttribute(memberName) === "") {
341
- {
342
- elm.removeAttribute(memberName);
343
- }
344
- }
345
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
346
- newValue = newValue === true ? "" : newValue;
345
+ }
346
+ if (newValue == null || newValue === false) {
347
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
347
348
  {
348
- elm.setAttribute(memberName, newValue);
349
+ elm.removeAttribute(memberName);
349
350
  }
350
351
  }
352
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
353
+ newValue = newValue === true ? "" : newValue;
354
+ {
355
+ elm.setAttribute(memberName, newValue);
356
+ }
351
357
  }
352
358
  }
353
359
  };
@@ -410,9 +416,14 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
410
416
  let elm;
411
417
  let childNode;
412
418
  if (newVNode2.$text$ !== null) {
413
- elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
419
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
414
420
  } else {
415
- elm = newVNode2.$elm$ = doc.createElement(
421
+ if (!win.document) {
422
+ throw new Error(
423
+ "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."
424
+ );
425
+ }
426
+ elm = newVNode2.$elm$ = win.document.createElement(
416
427
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
417
428
  );
418
429
  {
@@ -557,13 +568,10 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
557
568
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
558
569
  const oldChildren = oldVNode.$children$;
559
570
  const newChildren = newVNode2.$children$;
560
- const tag = newVNode2.$tag$;
561
571
  const text = newVNode2.$text$;
562
572
  if (text === null) {
563
573
  {
564
- if (tag === "slot" && !useNativeShadowDom) ; else {
565
- updateElement(oldVNode, newVNode2, isSvgMode);
566
- }
574
+ updateElement(oldVNode, newVNode2, isSvgMode);
567
575
  }
568
576
  if (oldChildren !== null && newChildren !== null) {
569
577
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -644,10 +652,11 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
644
652
  }
645
653
  let maybePromise;
646
654
  if (isInitialLoad) {
647
- {
648
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
649
- }
655
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
656
+ } else {
657
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
650
658
  }
659
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
651
660
  endSchedule();
652
661
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
653
662
  };
@@ -708,12 +717,15 @@ var postUpdateComponent = (hostRef) => {
708
717
  const tagName = hostRef.$cmpMeta$.$tagName$;
709
718
  const elm = hostRef.$hostElement$;
710
719
  const endPostUpdate = createTime("postUpdate", tagName);
720
+ const instance = hostRef.$lazyInstance$ ;
711
721
  const ancestorComponent = hostRef.$ancestorComponent$;
722
+ safeCall(instance, "componentDidRender", void 0, elm);
712
723
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
713
724
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
714
725
  {
715
726
  addHydratedFlag(elm);
716
727
  }
728
+ safeCall(instance, "componentDidLoad", void 0, elm);
717
729
  endPostUpdate();
718
730
  {
719
731
  hostRef.$onReadyResolve$(elm);
@@ -722,6 +734,7 @@ var postUpdateComponent = (hostRef) => {
722
734
  }
723
735
  }
724
736
  } else {
737
+ safeCall(instance, "componentDidUpdate", void 0, elm);
725
738
  endPostUpdate();
726
739
  }
727
740
  {
@@ -772,6 +785,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
772
785
  hostRef.$instanceValues$.set(propName, newVal);
773
786
  if (instance) {
774
787
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
788
+ if (instance.componentShouldUpdate) {
789
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
790
+ return;
791
+ }
792
+ }
775
793
  scheduleUpdate(hostRef, false);
776
794
  }
777
795
  }
@@ -934,6 +952,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
934
952
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
935
953
  }
936
954
  endNewInstance();
955
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
937
956
  } else {
938
957
  Cstr = elm.constructor;
939
958
  const cmpTag = elm.localName;
@@ -949,6 +968,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
949
968
  }
950
969
  };
951
970
  var fireConnectedCallback = (instance, elm) => {
971
+ {
972
+ safeCall(instance, "connectedCallback", void 0, elm);
973
+ }
952
974
  };
953
975
 
954
976
  // src/runtime/connected-callback.ts
@@ -981,20 +1003,27 @@ var connectedCallback = (elm) => {
981
1003
  initializeComponent(elm, hostRef, cmpMeta);
982
1004
  }
983
1005
  } else {
984
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
985
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1006
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1007
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1008
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1009
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
986
1010
  }
987
1011
  }
988
1012
  endConnected();
989
1013
  }
990
1014
  };
991
1015
  var disconnectInstance = (instance, elm) => {
1016
+ {
1017
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1018
+ }
992
1019
  };
993
1020
  var disconnectedCallback = async (elm) => {
994
1021
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
995
1022
  const hostRef = getHostRef(elm);
996
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
997
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1023
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1024
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1025
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1026
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
998
1027
  }
999
1028
  }
1000
1029
  if (rootAppliedStyles.has(elm)) {
@@ -1008,18 +1037,22 @@ var disconnectedCallback = async (elm) => {
1008
1037
  // src/runtime/bootstrap-lazy.ts
1009
1038
  var bootstrapLazy = (lazyBundles, options = {}) => {
1010
1039
  var _a;
1040
+ if (!win.document) {
1041
+ console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
1042
+ return;
1043
+ }
1011
1044
  const endBootstrap = createTime();
1012
1045
  const cmpTags = [];
1013
1046
  const exclude = options.exclude || [];
1014
1047
  const customElements2 = win.customElements;
1015
- const head = doc.head;
1048
+ const head = win.document.head;
1016
1049
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1017
- const dataStyles = /* @__PURE__ */ doc.createElement("style");
1050
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
1018
1051
  const deferredConnectedCallbacks = [];
1019
1052
  let appLoadFallback;
1020
1053
  let isBootstrapping = true;
1021
1054
  Object.assign(plt, options);
1022
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
1055
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1023
1056
  let hasSlotRelocation = false;
1024
1057
  lazyBundles.map((lazyBundle) => {
1025
1058
  lazyBundle[1].map((compactMeta) => {
@@ -1111,7 +1144,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1111
1144
  }
1112
1145
  if (dataStyles.innerHTML.length) {
1113
1146
  dataStyles.setAttribute("data-styles", "");
1114
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1147
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1115
1148
  if (nonce != null) {
1116
1149
  dataStyles.setAttribute("nonce", nonce);
1117
1150
  }
@@ -1134,4 +1167,4 @@ var setNonce = (nonce) => plt.$nonce$ = nonce;
1134
1167
 
1135
1168
  export { bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
1136
1169
 
1137
- //# sourceMappingURL=index-48e3f7fe.js.map
1170
+ //# sourceMappingURL=index-5147034e.js.map