@ppg_pl/pallete 0.0.1

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 (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +51 -0
  3. package/dist/cjs/index-f418fc60.js +1340 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +21 -0
  6. package/dist/cjs/my-backdrop_8.cjs.entry.js +8109 -0
  7. package/dist/cjs/pallete.cjs.js +19 -0
  8. package/dist/collection/collection-manifest.json +19 -0
  9. package/dist/collection/components/api/index.js +19 -0
  10. package/dist/collection/components/api/services.js +81 -0
  11. package/dist/collection/components/my-backdrop/my-backdrop.css +21 -0
  12. package/dist/collection/components/my-backdrop/my-backdrop.js +13 -0
  13. package/dist/collection/components/my-colorbox/my-colorbox.css +60 -0
  14. package/dist/collection/components/my-colorbox/my-colorbox.js +145 -0
  15. package/dist/collection/components/my-colorinfo/my-colorinfo.js +197 -0
  16. package/dist/collection/components/my-component/my-component.css +18 -0
  17. package/dist/collection/components/my-component/my-component.js +106 -0
  18. package/dist/collection/components/my-loader/my-loader.css +85 -0
  19. package/dist/collection/components/my-loader/my-loader.js +18 -0
  20. package/dist/collection/components/my-modal/assets/arrow_down.png +0 -0
  21. package/dist/collection/components/my-modal/assets/close.png +0 -0
  22. package/dist/collection/components/my-modal/my-modal.css +323 -0
  23. package/dist/collection/components/my-modal/my-modal.js +430 -0
  24. package/dist/collection/components/my-search/assets/search.svg +15 -0
  25. package/dist/collection/components/my-search/my-search.css +43 -0
  26. package/dist/collection/components/my-search/my-search.js +112 -0
  27. package/dist/collection/components/my-slider/index.js +145 -0
  28. package/dist/collection/components/my-slider/my-slider.css +96 -0
  29. package/dist/collection/gtmUtils.js +3 -0
  30. package/dist/collection/index.js +1 -0
  31. package/dist/collection/types.js +1 -0
  32. package/dist/components/gtmUtils.js +5 -0
  33. package/dist/components/index.d.ts +29 -0
  34. package/dist/components/index.js +9 -0
  35. package/dist/components/index2.js +5458 -0
  36. package/dist/components/my-backdrop.d.ts +11 -0
  37. package/dist/components/my-backdrop.js +6 -0
  38. package/dist/components/my-backdrop2.js +29 -0
  39. package/dist/components/my-colorbox.d.ts +11 -0
  40. package/dist/components/my-colorbox.js +6 -0
  41. package/dist/components/my-colorbox2.js +61 -0
  42. package/dist/components/my-colorinfo.d.ts +11 -0
  43. package/dist/components/my-colorinfo.js +6 -0
  44. package/dist/components/my-colorinfo2.js +64 -0
  45. package/dist/components/my-component.d.ts +11 -0
  46. package/dist/components/my-component.js +216 -0
  47. package/dist/components/my-loader.d.ts +11 -0
  48. package/dist/components/my-loader.js +6 -0
  49. package/dist/components/my-loader2.js +29 -0
  50. package/dist/components/my-modal.d.ts +11 -0
  51. package/dist/components/my-modal.js +6 -0
  52. package/dist/components/my-modal2.js +2451 -0
  53. package/dist/components/my-search.d.ts +11 -0
  54. package/dist/components/my-search.js +6 -0
  55. package/dist/components/my-search2.js +55 -0
  56. package/dist/components/my-slider.d.ts +11 -0
  57. package/dist/components/my-slider.js +6 -0
  58. package/dist/esm/index-367ea408.js +1312 -0
  59. package/dist/esm/index.js +1 -0
  60. package/dist/esm/loader.js +17 -0
  61. package/dist/esm/my-backdrop_8.entry.js +8098 -0
  62. package/dist/esm/pallete.js +17 -0
  63. package/dist/esm/polyfills/core-js.js +11 -0
  64. package/dist/esm/polyfills/css-shim.js +1 -0
  65. package/dist/esm/polyfills/dom.js +79 -0
  66. package/dist/esm/polyfills/es5-html-element.js +1 -0
  67. package/dist/esm/polyfills/index.js +34 -0
  68. package/dist/esm/polyfills/system.js +6 -0
  69. package/dist/index.cjs.js +1 -0
  70. package/dist/index.js +1 -0
  71. package/dist/pallete/assets/arrow_down.png +0 -0
  72. package/dist/pallete/assets/close.png +0 -0
  73. package/dist/pallete/assets/search.svg +15 -0
  74. package/dist/pallete/index.esm.js +0 -0
  75. package/dist/pallete/p-02fc334c.js +2 -0
  76. package/dist/pallete/p-9f47a4e8.entry.js +1 -0
  77. package/dist/pallete/pallete.css +1 -0
  78. package/dist/pallete/pallete.esm.js +1 -0
  79. package/dist/types/components/api/index.d.ts +6 -0
  80. package/dist/types/components/api/services.d.ts +4 -0
  81. package/dist/types/components/my-backdrop/my-backdrop.d.ts +3 -0
  82. package/dist/types/components/my-colorbox/my-colorbox.d.ts +13 -0
  83. package/dist/types/components/my-colorinfo/my-colorinfo.d.ts +15 -0
  84. package/dist/types/components/my-component/my-component.d.ts +9 -0
  85. package/dist/types/components/my-loader/my-loader.d.ts +3 -0
  86. package/dist/types/components/my-modal/my-modal.d.ts +56 -0
  87. package/dist/types/components/my-search/my-search.d.ts +12 -0
  88. package/dist/types/components/my-slider/index.d.ts +15 -0
  89. package/dist/types/components.d.ts +198 -0
  90. package/dist/types/gtmUtils.d.ts +1 -0
  91. package/dist/types/index.d.ts +1 -0
  92. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  93. package/dist/types/types.d.ts +56 -0
  94. package/loader/cdn.js +3 -0
  95. package/loader/index.cjs.js +3 -0
  96. package/loader/index.d.ts +12 -0
  97. package/loader/index.es2017.js +3 -0
  98. package/loader/index.js +4 -0
  99. package/loader/package.json +10 -0
  100. package/package.json +49 -0
  101. package/www/build/assets/arrow_down.png +0 -0
  102. package/www/build/assets/close.png +0 -0
  103. package/www/build/assets/fonts/Galatea-Regular.eot +0 -0
  104. package/www/build/assets/fonts/Galatea-Regular.ttf +0 -0
  105. package/www/build/assets/fonts/Galatea-Regular.woff +0 -0
  106. package/www/build/assets/fonts/Galatea-Regular.woff2 +0 -0
  107. package/www/build/assets/search.svg +15 -0
  108. package/www/build/index.esm.js +0 -0
  109. package/www/build/p-02fc334c.js +2 -0
  110. package/www/build/p-95e95ceb.css +1 -0
  111. package/www/build/p-9f47a4e8.entry.js +1 -0
  112. package/www/build/p-b0b8b976.js +1 -0
  113. package/www/build/pallete.css +1 -0
  114. package/www/build/pallete.esm.js +1 -0
  115. package/www/build/pallete.js +33 -0
  116. package/www/host.config.json +15 -0
  117. package/www/index.html +22 -0
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MyBackdrop extends Components.MyBackdrop, HTMLElement {}
4
+ export const MyBackdrop: {
5
+ prototype: MyBackdrop;
6
+ new (): MyBackdrop;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { M as MyBackdrop$1, d as defineCustomElement$1 } from './my-backdrop2.js';
2
+
3
+ const MyBackdrop = MyBackdrop$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { MyBackdrop, defineCustomElement };
@@ -0,0 +1,29 @@
1
+ import { proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
2
+
3
+ const myBackdropCss = "html{font-size:62.5%}body{font-size:1.5rem}*{font-family:\"Galatea\", sans-serif}my-backdrop{width:100%;height:100%;background-color:rgba(0, 0, 0, 0.7);position:fixed;z-index:100;left:0;top:0}";
4
+
5
+ const MyBackdrop = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ }
10
+ render() {
11
+ return null;
12
+ }
13
+ static get style() { return myBackdropCss; }
14
+ }, [0, "my-backdrop"]);
15
+ function defineCustomElement() {
16
+ if (typeof customElements === "undefined") {
17
+ return;
18
+ }
19
+ const components = ["my-backdrop"];
20
+ components.forEach(tagName => { switch (tagName) {
21
+ case "my-backdrop":
22
+ if (!customElements.get(tagName)) {
23
+ customElements.define(tagName, MyBackdrop);
24
+ }
25
+ break;
26
+ } });
27
+ }
28
+
29
+ export { MyBackdrop as M, defineCustomElement as d };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MyColorbox extends Components.MyColorbox, HTMLElement {}
4
+ export const MyColorbox: {
5
+ prototype: MyColorbox;
6
+ new (): MyColorbox;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { M as MyColorBox, d as defineCustomElement$1 } from './my-colorbox2.js';
2
+
3
+ const MyColorbox = MyColorBox;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { MyColorbox, defineCustomElement };
@@ -0,0 +1,61 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+ import { s as setDataLayer } from './gtmUtils.js';
3
+
4
+ const myColorboxCss = "html{font-size:62.5%}body{font-size:1.5rem}*{font-family:\"Galatea\", sans-serif}.my-color-box{width:125px;height:125px;display:block;margin-bottom:5px;cursor:pointer;display:flex;flex-direction:column;justify-content:flex-end;position:relative}@media (max-width: 1024px){.my-color-box{width:80px;height:80px}}.my-color-box .color-name{width:100%;background-color:#fff;padding:15px 0px 10px;border-top-left-radius:15px;border-top-right-radius:15px;opacity:0;transition:0.3s opacity ease-in-out;font-size:1rem;color:#232323;text-transform:lowercase}.my-color-box.active .color-name{opacity:1}.my-color-box.categoryactive{width:120px;height:115px}.my-color-box.categoryactive .color-name{opacity:1}@media (max-width: 1024px){.my-color-box.categoryactive{width:72px;height:72px}}.my-color-box:hover .color-name{opacity:1}";
5
+
6
+ const MyColorBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.colorCheck = () => {
11
+ this.checkTimeout = setTimeout(() => {
12
+ setDataLayer({
13
+ event: 'ColorCheck',
14
+ shop: this.shop,
15
+ product: this.product,
16
+ color: this.name,
17
+ });
18
+ }, 2000);
19
+ };
20
+ this.colorUnCheck = () => {
21
+ if (this.checkTimeout)
22
+ clearTimeout(this.checkTimeout);
23
+ this.checkTimeout = undefined;
24
+ };
25
+ this.darkenColor = (color) => {
26
+ const red = parseInt(color[1] + color[2], 16) - 20;
27
+ const green = parseInt(color[3] + color[4], 16) - 20;
28
+ const blue = parseInt(color[5] + color[6], 16) - 20;
29
+ return `rgb(${red},${green},${blue})`;
30
+ };
31
+ }
32
+ render() {
33
+ return (h("div", { onMouseEnter: () => this.colorCheck(), onMouseLeave: () => this.colorUnCheck(), class: `my-color-box ${this.isActive ? 'active' : ''} ${this.isCategoryActive ? 'categoryactive' : ''}`, style: {
34
+ background: this.color,
35
+ border: this.isCategoryActive ? `5px solid ${this.darkenColor(this.color)}` : '',
36
+ } }, h("div", { class: "color-name" }, this.name)));
37
+ }
38
+ static get style() { return myColorboxCss; }
39
+ }, [0, "my-colorbox", {
40
+ "color": [1],
41
+ "name": [1],
42
+ "shop": [1],
43
+ "product": [1],
44
+ "isActive": [4, "is-active"],
45
+ "isCategoryActive": [4, "is-category-active"]
46
+ }]);
47
+ function defineCustomElement() {
48
+ if (typeof customElements === "undefined") {
49
+ return;
50
+ }
51
+ const components = ["my-colorbox"];
52
+ components.forEach(tagName => { switch (tagName) {
53
+ case "my-colorbox":
54
+ if (!customElements.get(tagName)) {
55
+ customElements.define(tagName, MyColorBox);
56
+ }
57
+ break;
58
+ } });
59
+ }
60
+
61
+ export { MyColorBox as M, defineCustomElement as d };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MyColorinfo extends Components.MyColorinfo, HTMLElement {}
4
+ export const MyColorinfo: {
5
+ prototype: MyColorinfo;
6
+ new (): MyColorinfo;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { M as MyColorInfo, d as defineCustomElement$1 } from './my-colorinfo2.js';
2
+
3
+ const MyColorinfo = MyColorInfo;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { MyColorinfo, defineCustomElement };
@@ -0,0 +1,64 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, getAssetPath } from '@stencil/core/internal/client';
2
+ import { s as setDataLayer } from './gtmUtils.js';
3
+ import { d as defineCustomElement$1 } from './index2.js';
4
+
5
+ const MyColorInfo = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.closeInfoBox = createEvent(this, "closeInfoBox", 7);
10
+ this.data = null;
11
+ this.isMobile = false;
12
+ this.closeImage = 'close.png';
13
+ this.goToProduct = () => {
14
+ var _a;
15
+ this.currentColor &&
16
+ setDataLayer({
17
+ event: 'GoToProduct',
18
+ shop: this.shop,
19
+ product: this.product,
20
+ color: (_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.name,
21
+ });
22
+ };
23
+ this.onCloseButtonClick = () => {
24
+ this.closeInfoBox.emit();
25
+ };
26
+ }
27
+ render() {
28
+ var _a, _b, _c, _d, _e, _f, _g;
29
+ return (h("div", { class: `boxes__box-content ${this.currentColor.textWhite ? 'boxes__box-content__white' : ''}`, style: {
30
+ background: this.currentColor.hex,
31
+ maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,
32
+ } }, this.isMobile && h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), h("div", { class: "boxes__box-content__info", style: {
33
+ maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,
34
+ } }, !this.isMobile && h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), !this.isMobile && h("h2", null, this.currentColor.name), !this.isMobile && h("h4", null, this.currentColor.number), !this.isMobile && h("div", { class: "divider" }), h("div", { class: "boxes__box-content__info__value" }, h("div", { class: "boxes__box-content__info__value-image" }, ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.image.data) && h("img", { src: `${(_e = (_d = (_c = (_b = this.currentColor) === null || _b === void 0 ? void 0 : _b.image) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.attributes) === null || _e === void 0 ? void 0 : _e.formats.thumbnail.url}`, alt: "color-image" })), h("div", { class: "boxes__box-content__info__value-product" }, h("div", null, !this.isMobile && h("p", null, "Produkt:"), this.isMobile && h("h2", null, this.currentColor.name), " ", h("p", null, this.product)), this.isMobile && h("div", { class: 'divider' }), this.currentColor && this.currentColor.links.find((link) => { var _a, _b, _c; return ((_c = (_b = (_a = link === null || link === void 0 ? void 0 : link.shop) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.name) === this.shop; }) && (h("a", { onClick: this.goToProduct, class: `${this.currentColor.buttonInverse ? 'inverse' : ''}`, target: "_blank", href: (_f = this === null || this === void 0 ? void 0 : this.currentColor.links.find((link) => { var _a, _b, _c; return ((_c = (_b = (_a = link === null || link === void 0 ? void 0 : link.shop) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.name) === this.shop; })) === null || _f === void 0 ? void 0 : _f.path }, "przejd\u017A do produktu"))))), h("div", { class: "boxes__box-content__slider" }, h("my-slider", { color: this.currentColor.name, shop: this.shop, product: this.product, slides: (_g = this.data) === null || _g === void 0 ? void 0 : _g.images.data }), ' ')));
35
+ }
36
+ }, [0, "my-colorinfo", {
37
+ "currentColor": [16],
38
+ "shop": [1],
39
+ "product": [1],
40
+ "data": [16],
41
+ "isMobile": [4, "is-mobile"],
42
+ "infoBoxWidth": [2, "info-box-width"],
43
+ "closeImage": [1, "close-image"]
44
+ }]);
45
+ function defineCustomElement() {
46
+ if (typeof customElements === "undefined") {
47
+ return;
48
+ }
49
+ const components = ["my-colorinfo", "my-slider"];
50
+ components.forEach(tagName => { switch (tagName) {
51
+ case "my-colorinfo":
52
+ if (!customElements.get(tagName)) {
53
+ customElements.define(tagName, MyColorInfo);
54
+ }
55
+ break;
56
+ case "my-slider":
57
+ if (!customElements.get(tagName)) {
58
+ defineCustomElement$1();
59
+ }
60
+ break;
61
+ } });
62
+ }
63
+
64
+ export { MyColorInfo as M, defineCustomElement as d };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MyComponent extends Components.MyComponent, HTMLElement {}
4
+ export const MyComponent: {
5
+ prototype: MyComponent;
6
+ new (): MyComponent;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,216 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$8 } from './my-backdrop2.js';
3
+ import { d as defineCustomElement$7 } from './my-colorbox2.js';
4
+ import { d as defineCustomElement$6 } from './my-colorinfo2.js';
5
+ import { d as defineCustomElement$5 } from './my-loader2.js';
6
+ import { d as defineCustomElement$4 } from './my-modal2.js';
7
+ import { d as defineCustomElement$3 } from './my-search2.js';
8
+ import { d as defineCustomElement$2 } from './index2.js';
9
+
10
+ const isObject = (val) => !Array.isArray(val) && val !== null && typeof val === 'object';
11
+ const hasAttributes = ({ vattrs }, requiredAttrs = []) => isObject(vattrs) && requiredAttrs.every(vattrs.hasOwnProperty.bind(vattrs));
12
+ const isTextNode = ({ vtext }) => typeof vtext === 'string';
13
+ // Can't use instanceof HTMLElement because MockHTMLElement during pre-rendering isn't
14
+ const isElement = (val) => typeof val === 'object' && val.nodeType === 1 && typeof val.ownerDocument === 'object';
15
+ const isElementArray = (val) => Array.isArray(val) && val.every(isElement);
16
+
17
+ const createElement = ({ vtag, vattrs, vchildren, vtext }, utils) => {
18
+ if (vtext != null) {
19
+ return document.createTextNode(vtext);
20
+ }
21
+ const element = document.createElement(vtag);
22
+ if (vattrs != null) {
23
+ for (const key in vattrs) {
24
+ element.setAttribute(key, vattrs[key]);
25
+ }
26
+ }
27
+ if (vchildren != null) {
28
+ utils.forEach(vchildren, (child) => {
29
+ element.appendChild(createElement(child, utils));
30
+ });
31
+ }
32
+ return element;
33
+ };
34
+ const shouldApplyToHead = (val) => isElement(val) || (isElementArray(val) && val.length === 2);
35
+ const applyToHead = (element) => {
36
+ if (Array.isArray(element)) {
37
+ return document.head.replaceChild(element[0], element[1]);
38
+ }
39
+ return document.head.appendChild(element);
40
+ };
41
+
42
+ const hasChildren = (node) => Array.isArray(node.vchildren);
43
+ const getFirstChild = (vchildren, utils) => {
44
+ let firstChild = null;
45
+ utils.forEach(vchildren || [], (c, i) => {
46
+ if (i === 0) {
47
+ firstChild = c;
48
+ return;
49
+ }
50
+ });
51
+ return firstChild;
52
+ };
53
+ function title(node, head, utils) {
54
+ const firstChild = getFirstChild(node.vchildren || [], utils);
55
+ if (firstChild && isTextNode(firstChild)) {
56
+ return [createElement(node, utils), head.querySelector('title')];
57
+ }
58
+ }
59
+ function meta(node, head, utils) {
60
+ var _a, _b, _c;
61
+ const namePropKey = ((_a = node.vattrs) === null || _a === void 0 ? void 0 : _a.property) ? 'property' : 'name';
62
+ const namePropValue = ((_b = node.vattrs) === null || _b === void 0 ? void 0 : _b.property) || ((_c = node.vattrs) === null || _c === void 0 ? void 0 : _c.name);
63
+ const existingElement = head.querySelector(`meta[${namePropKey}="${namePropValue}"]`);
64
+ if (existingElement !== null) {
65
+ return [createElement(node, utils), existingElement];
66
+ }
67
+ else {
68
+ return createElement(node, utils);
69
+ }
70
+ }
71
+ function link(node, _head, utils) {
72
+ if (!hasChildren(node)) {
73
+ return createElement(node, utils);
74
+ }
75
+ }
76
+ function style(node, _head, utils) {
77
+ const firstChild = getFirstChild(node.vchildren || [], utils);
78
+ if (firstChild && isTextNode(firstChild)) {
79
+ return createElement(node, utils);
80
+ }
81
+ }
82
+ function script(node, _head, utils) {
83
+ if (hasChildren(node) || hasAttributes(node)) {
84
+ return createElement(node, utils);
85
+ }
86
+ }
87
+ function base(node, _head, utils) {
88
+ if (!hasChildren(node) && hasAttributes(node)) {
89
+ return createElement(node, utils);
90
+ }
91
+ }
92
+ const template = createElement;
93
+ const noscript = createElement; // SSR only
94
+ const types = {
95
+ title,
96
+ meta,
97
+ link,
98
+ style,
99
+ script,
100
+ base,
101
+ template,
102
+ noscript,
103
+ };
104
+
105
+ const headExists = document && document.head;
106
+ const validTagNames = Object.keys(types);
107
+ const isValidNode = (node) => validTagNames.indexOf(node.vtag) > -1;
108
+ const renderNode = (node, utils) => types[node.vtag](node, document.head, utils);
109
+ const Helmet = (_props, children, utils) => {
110
+ if (!headExists) {
111
+ return null;
112
+ }
113
+ const rendered = [];
114
+ utils.forEach(children, (n) => {
115
+ if (isValidNode(n)) {
116
+ rendered.push(renderNode(n, utils));
117
+ }
118
+ });
119
+ // Build an HTMLElement for each provided virtual child
120
+ rendered
121
+ .filter(shouldApplyToHead)
122
+ .forEach(applyToHead);
123
+ return null;
124
+ };
125
+
126
+ const myComponentCss = "html{font-size:62.5%}body{font-size:1.5rem}*{font-family:\"Galatea\", sans-serif}.pallete-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:center}";
127
+
128
+ const MyModalBundle = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
129
+ constructor() {
130
+ super();
131
+ this.__registerHost();
132
+ this.show = false;
133
+ }
134
+ async open() {
135
+ this.show = true;
136
+ }
137
+ closeModalHandler() {
138
+ this.show = false;
139
+ }
140
+ render() {
141
+ let content = null;
142
+ if (this.show) {
143
+ content = [h("my-backdrop", null), h("my-modal", { shop: this.shop, product: this.product })];
144
+ }
145
+ return (h("div", null, h(Helmet, null, h("script", null, `(function (w, d, s, l, i) {
146
+ w[l] = w[l] || [];
147
+ w[l].push({ 'gtm.start': new Date().getTime(), 'event': 'gtm.js' });
148
+ var f = d.getElementsByTagName(s)[0],
149
+ j = d.createElement(s),
150
+ dl = l != 'dataLayer' ? '&l=' + l : '';
151
+ j.async = true;
152
+ j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
153
+ f.parentNode.insertBefore(j, f);
154
+ })(window, document, 'script', 'dataLayer', 'GTM-PMTKHDX');`)), h("div", { class: "pallete-wrapper" }, content), h("noscript", null, h("iframe", { src: "https://www.googletagmanager.com/ns.html?id=GTM-PMTKHDX", height: "0", width: "0", style: { display: 'none', visibility: 'hidden' } }))));
155
+ }
156
+ get modalEl() { return this; }
157
+ static get style() { return myComponentCss; }
158
+ }, [0, "my-component", {
159
+ "shop": [1],
160
+ "product": [1],
161
+ "show": [32],
162
+ "open": [64]
163
+ }, [[0, "close", "closeModalHandler"]]]);
164
+ function defineCustomElement$1() {
165
+ if (typeof customElements === "undefined") {
166
+ return;
167
+ }
168
+ const components = ["my-component", "my-backdrop", "my-colorbox", "my-colorinfo", "my-loader", "my-modal", "my-search", "my-slider"];
169
+ components.forEach(tagName => { switch (tagName) {
170
+ case "my-component":
171
+ if (!customElements.get(tagName)) {
172
+ customElements.define(tagName, MyModalBundle);
173
+ }
174
+ break;
175
+ case "my-backdrop":
176
+ if (!customElements.get(tagName)) {
177
+ defineCustomElement$8();
178
+ }
179
+ break;
180
+ case "my-colorbox":
181
+ if (!customElements.get(tagName)) {
182
+ defineCustomElement$7();
183
+ }
184
+ break;
185
+ case "my-colorinfo":
186
+ if (!customElements.get(tagName)) {
187
+ defineCustomElement$6();
188
+ }
189
+ break;
190
+ case "my-loader":
191
+ if (!customElements.get(tagName)) {
192
+ defineCustomElement$5();
193
+ }
194
+ break;
195
+ case "my-modal":
196
+ if (!customElements.get(tagName)) {
197
+ defineCustomElement$4();
198
+ }
199
+ break;
200
+ case "my-search":
201
+ if (!customElements.get(tagName)) {
202
+ defineCustomElement$3();
203
+ }
204
+ break;
205
+ case "my-slider":
206
+ if (!customElements.get(tagName)) {
207
+ defineCustomElement$2();
208
+ }
209
+ break;
210
+ } });
211
+ }
212
+
213
+ const MyComponent = MyModalBundle;
214
+ const defineCustomElement = defineCustomElement$1;
215
+
216
+ export { MyComponent, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MyLoader extends Components.MyLoader, HTMLElement {}
4
+ export const MyLoader: {
5
+ prototype: MyLoader;
6
+ new (): MyLoader;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { M as MyLoader$1, d as defineCustomElement$1 } from './my-loader2.js';
2
+
3
+ const MyLoader = MyLoader$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { MyLoader, defineCustomElement };
@@ -0,0 +1,29 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+
3
+ const myLoaderCss = ".container{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.item{width:20px;height:20px;margin:3px;list-style-type:none;transition:0.5s all ease}.item:nth-child(1){animation:right-1 1s infinite alternate;background-color:#b8cf40;animation-delay:20ms}@keyframes right-1{0%{transform:translateY(-18px)}100%{transform:translateY(18px)}}.item:nth-child(2){animation:right-2 1s infinite alternate;background-color:#ee4b5e;animation-delay:40ms}@keyframes right-2{0%{transform:translateY(-21px)}100%{transform:translateY(21px)}}.item:nth-child(3){animation:right-3 1s infinite alternate;background-color:#ea0f47;animation-delay:60ms}@keyframes right-3{0%{transform:translateY(-24px)}100%{transform:translateY(24px)}}.item:nth-child(4){animation:right-4 1s infinite alternate;background-color:#d42840;animation-delay:80ms}@keyframes right-4{0%{transform:translateY(-27px)}100%{transform:translateY(27px)}}.item:nth-child(5){animation:right-5 1s infinite alternate;background-color:#8b2850;animation-delay:100ms}@keyframes right-5{0%{transform:translateY(-30px)}100%{transform:translateY(30px)}}";
4
+
5
+ const MyLoader = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ }
10
+ render() {
11
+ return (h("div", { class: "container" }, h("div", { class: "item" }), h("div", { class: "item" }), h("div", { class: "item" }), h("div", { class: "item" }), h("div", { class: "item" })));
12
+ }
13
+ static get style() { return myLoaderCss; }
14
+ }, [0, "my-loader"]);
15
+ function defineCustomElement() {
16
+ if (typeof customElements === "undefined") {
17
+ return;
18
+ }
19
+ const components = ["my-loader"];
20
+ components.forEach(tagName => { switch (tagName) {
21
+ case "my-loader":
22
+ if (!customElements.get(tagName)) {
23
+ customElements.define(tagName, MyLoader);
24
+ }
25
+ break;
26
+ } });
27
+ }
28
+
29
+ export { MyLoader as M, defineCustomElement as d };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MyModal extends Components.MyModal, HTMLElement {}
4
+ export const MyModal: {
5
+ prototype: MyModal;
6
+ new (): MyModal;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { M as MyModal$1, d as defineCustomElement$1 } from './my-modal2.js';
2
+
3
+ const MyModal = MyModal$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { MyModal, defineCustomElement };