@ppg_pl/pallete 0.0.3 → 0.0.4

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 (97) hide show
  1. package/dist/pallete/app-globals-0f993ce5.js +3 -0
  2. package/dist/pallete/css-shim-60f618b9.js +4 -0
  3. package/dist/pallete/dom-4eeb3fee.js +73 -0
  4. package/dist/pallete/index-1ac7471e.js +3059 -0
  5. package/dist/pallete/index.esm.js +1 -0
  6. package/dist/pallete/my-backdrop.entry.js +15 -0
  7. package/dist/pallete/my-colorbox.entry.js +40 -0
  8. package/dist/{components/my-colorinfo2.js → pallete/my-colorinfo.entry.js} +7 -35
  9. package/dist/{components/my-component.js → pallete/my-component.entry.js} +10 -72
  10. package/dist/pallete/my-loader.entry.js +15 -0
  11. package/dist/{components/my-modal2.js → pallete/my-modal.entry.js} +84 -76
  12. package/dist/pallete/my-search.entry.js +36 -0
  13. package/dist/pallete/my-slider.entry.js +11333 -0
  14. package/dist/pallete/pallete.css +3 -1
  15. package/dist/pallete/pallete.esm.js +129 -1
  16. package/dist/pallete/shadow-css-02866686.js +387 -0
  17. package/package.json +1 -1
  18. package/www/build/app-globals-0f993ce5.js +3 -0
  19. package/www/build/css-shim-60f618b9.js +4 -0
  20. package/www/build/dom-4eeb3fee.js +73 -0
  21. package/www/build/gtmUtils-dcdac4ce.js +5 -0
  22. package/www/build/index-1ac7471e.js +3059 -0
  23. package/www/build/index.esm.js +1 -0
  24. package/www/build/my-backdrop.entry.js +15 -0
  25. package/www/build/my-colorbox.entry.js +40 -0
  26. package/www/build/my-colorinfo.entry.js +36 -0
  27. package/www/build/my-component.entry.js +154 -0
  28. package/www/build/my-loader.entry.js +15 -0
  29. package/www/build/my-modal.entry.js +2459 -0
  30. package/www/build/my-search.entry.js +36 -0
  31. package/www/build/my-slider.entry.js +11333 -0
  32. package/www/build/pallete.css +3 -1
  33. package/www/build/pallete.esm.js +129 -1
  34. package/www/build/shadow-css-02866686.js +387 -0
  35. package/www/index.html +40 -2
  36. package/dist/cjs/index-029079e0.js +0 -1365
  37. package/dist/cjs/index.cjs.js +0 -2
  38. package/dist/cjs/loader.cjs.js +0 -21
  39. package/dist/cjs/my-backdrop_8.cjs.entry.js +0 -8109
  40. package/dist/cjs/pallete.cjs.js +0 -19
  41. package/dist/collection/collection-manifest.json +0 -19
  42. package/dist/collection/components/api/index.js +0 -19
  43. package/dist/collection/components/api/services.js +0 -81
  44. package/dist/collection/components/my-backdrop/my-backdrop.css +0 -13
  45. package/dist/collection/components/my-backdrop/my-backdrop.js +0 -13
  46. package/dist/collection/components/my-colorbox/my-colorbox.css +0 -52
  47. package/dist/collection/components/my-colorbox/my-colorbox.js +0 -145
  48. package/dist/collection/components/my-colorinfo/my-colorinfo.js +0 -197
  49. package/dist/collection/components/my-component/my-component.css +0 -6
  50. package/dist/collection/components/my-component/my-component.js +0 -107
  51. package/dist/collection/components/my-loader/my-loader.css +0 -85
  52. package/dist/collection/components/my-loader/my-loader.js +0 -18
  53. package/dist/collection/components/my-modal/assets/arrow_down.png +0 -0
  54. package/dist/collection/components/my-modal/assets/close.png +0 -0
  55. package/dist/collection/components/my-modal/my-modal.css +0 -315
  56. package/dist/collection/components/my-modal/my-modal.js +0 -430
  57. package/dist/collection/components/my-search/assets/search.svg +0 -15
  58. package/dist/collection/components/my-search/my-search.css +0 -35
  59. package/dist/collection/components/my-search/my-search.js +0 -113
  60. package/dist/collection/components/my-slider/index.js +0 -145
  61. package/dist/collection/components/my-slider/my-slider.css +0 -88
  62. package/dist/collection/gtmUtils.js +0 -3
  63. package/dist/collection/index.js +0 -1
  64. package/dist/collection/types.js +0 -1
  65. package/dist/components/index.js +0 -9
  66. package/dist/components/index2.js +0 -5458
  67. package/dist/components/my-backdrop.js +0 -6
  68. package/dist/components/my-backdrop2.js +0 -29
  69. package/dist/components/my-colorbox.js +0 -6
  70. package/dist/components/my-colorbox2.js +0 -61
  71. package/dist/components/my-colorinfo.js +0 -6
  72. package/dist/components/my-loader.js +0 -6
  73. package/dist/components/my-loader2.js +0 -29
  74. package/dist/components/my-modal.js +0 -6
  75. package/dist/components/my-search.js +0 -6
  76. package/dist/components/my-search2.js +0 -55
  77. package/dist/components/my-slider.js +0 -6
  78. package/dist/esm/index-faf4241e.js +0 -1337
  79. package/dist/esm/index.js +0 -1
  80. package/dist/esm/loader.js +0 -17
  81. package/dist/esm/my-backdrop_8.entry.js +0 -8098
  82. package/dist/esm/pallete.js +0 -17
  83. package/dist/esm/polyfills/core-js.js +0 -11
  84. package/dist/esm/polyfills/css-shim.js +0 -1
  85. package/dist/esm/polyfills/dom.js +0 -79
  86. package/dist/esm/polyfills/es5-html-element.js +0 -1
  87. package/dist/esm/polyfills/index.js +0 -34
  88. package/dist/esm/polyfills/system.js +0 -6
  89. package/dist/index.cjs.js +0 -1
  90. package/dist/index.js +0 -1
  91. package/dist/pallete/p-562ae52f.js +0 -2
  92. package/dist/pallete/p-faa6539f.entry.js +0 -1
  93. package/www/build/p-4e631238.css +0 -1
  94. package/www/build/p-562ae52f.js +0 -2
  95. package/www/build/p-5ec8080b.js +0 -1
  96. package/www/build/p-faa6539f.entry.js +0 -1
  97. /package/dist/{components/gtmUtils.js → pallete/gtmUtils-dcdac4ce.js} +0 -0
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,15 @@
1
+ import { r as registerInstance } from './index-1ac7471e.js';
2
+
3
+ const myBackdropCss = ".pallete-wrapper *{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 = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ render() {
10
+ return null;
11
+ }
12
+ };
13
+ MyBackdrop.style = myBackdropCss;
14
+
15
+ export { MyBackdrop as my_backdrop };
@@ -0,0 +1,40 @@
1
+ import { r as registerInstance, h } from './index-1ac7471e.js';
2
+ import { s as setDataLayer } from './gtmUtils-dcdac4ce.js';
3
+
4
+ const myColorboxCss = ".pallete-wrapper *{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:10px;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 = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.colorCheck = () => {
10
+ this.checkTimeout = setTimeout(() => {
11
+ setDataLayer({
12
+ event: 'ColorCheck',
13
+ shop: this.shop,
14
+ product: this.product,
15
+ color: this.name,
16
+ });
17
+ }, 2000);
18
+ };
19
+ this.colorUnCheck = () => {
20
+ if (this.checkTimeout)
21
+ clearTimeout(this.checkTimeout);
22
+ this.checkTimeout = undefined;
23
+ };
24
+ this.darkenColor = (color) => {
25
+ const red = parseInt(color[1] + color[2], 16) - 20;
26
+ const green = parseInt(color[3] + color[4], 16) - 20;
27
+ const blue = parseInt(color[5] + color[6], 16) - 20;
28
+ return `rgb(${red},${green},${blue})`;
29
+ };
30
+ }
31
+ render() {
32
+ return (h("div", { onMouseEnter: () => this.colorCheck(), onMouseLeave: () => this.colorUnCheck(), class: `my-color-box ${this.isActive ? 'active' : ''} ${this.isCategoryActive ? 'categoryactive' : ''}`, style: {
33
+ background: this.color,
34
+ border: this.isCategoryActive ? `5px solid ${this.darkenColor(this.color)}` : '',
35
+ } }, h("div", { class: "color-name" }, this.name)));
36
+ }
37
+ };
38
+ MyColorBox.style = myColorboxCss;
39
+
40
+ export { MyColorBox as my_colorbox };
@@ -1,11 +1,9 @@
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';
1
+ import { r as registerInstance, e as createEvent, h, f as getAssetPath } from './index-1ac7471e.js';
2
+ import { s as setDataLayer } from './gtmUtils-dcdac4ce.js';
4
3
 
5
- const MyColorInfo = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
- constructor() {
7
- super();
8
- this.__registerHost();
4
+ const MyColorInfo = class {
5
+ constructor(hostRef) {
6
+ registerInstance(this, hostRef);
9
7
  this.closeInfoBox = createEvent(this, "closeInfoBox", 7);
10
8
  this.data = null;
11
9
  this.isMobile = false;
@@ -33,32 +31,6 @@ const MyColorInfo = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
33
31
  maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,
34
32
  } }, !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
33
  }
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
- }
34
+ };
63
35
 
64
- export { MyColorInfo as M, defineCustomElement as d };
36
+ export { MyColorInfo as my_colorinfo };
@@ -1,11 +1,4 @@
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';
1
+ import { r as registerInstance, h, g as getElement } from './index-1ac7471e.js';
9
2
 
10
3
  const isObject = (val) => !Array.isArray(val) && val !== null && typeof val === 'object';
11
4
  const hasAttributes = ({ vattrs }, requiredAttrs = []) => isObject(vattrs) && requiredAttrs.every(vattrs.hasOwnProperty.bind(vattrs));
@@ -111,8 +104,10 @@ const Helmet = (_props, children, utils) => {
111
104
  return null;
112
105
  }
113
106
  const rendered = [];
107
+ const validChildren = [];
114
108
  utils.forEach(children, (n) => {
115
109
  if (isValidNode(n)) {
110
+ validChildren.push(n);
116
111
  rendered.push(renderNode(n, utils));
117
112
  }
118
113
  });
@@ -125,10 +120,9 @@ const Helmet = (_props, children, utils) => {
125
120
 
126
121
  const myComponentCss = ".pallete-wrapper.sc-my-component{display:flex;flex-direction:column;align-items:center;justify-content:center}";
127
122
 
128
- const MyModalBundle = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
129
- constructor() {
130
- super();
131
- this.__registerHost();
123
+ const MyModalBundle = class {
124
+ constructor(hostRef) {
125
+ registerInstance(this, hostRef);
132
126
  this.show = false;
133
127
  }
134
128
  async open() {
@@ -153,64 +147,8 @@ const MyModalBundle = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
153
147
  f.parentNode.insertBefore(j, f);
154
148
  })(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
149
  }
156
- get modalEl() { return this; }
157
- static get style() { return myComponentCss; }
158
- }, [2, "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;
150
+ get modalEl() { return getElement(this); }
151
+ };
152
+ MyModalBundle.style = myComponentCss;
215
153
 
216
- export { MyComponent, defineCustomElement };
154
+ export { MyModalBundle as my_component };
@@ -0,0 +1,15 @@
1
+ import { r as registerInstance, h } from './index-1ac7471e.js';
2
+
3
+ const myLoaderCss = ".container.sc-my-loader{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.item.sc-my-loader{width:20px;height:20px;margin:3px;list-style-type:none;transition:0.5s all ease}.item.sc-my-loader: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.sc-my-loader: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.sc-my-loader: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.sc-my-loader: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.sc-my-loader: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 = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ render() {
10
+ 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" })));
11
+ }
12
+ };
13
+ MyLoader.style = myLoaderCss;
14
+
15
+ export { MyLoader as my_loader };
@@ -1,10 +1,5 @@
1
- import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h, getAssetPath } from '@stencil/core/internal/client';
2
- import { s as setDataLayer } from './gtmUtils.js';
3
- import { d as defineCustomElement$5 } from './my-colorbox2.js';
4
- import { d as defineCustomElement$4 } from './my-colorinfo2.js';
5
- import { d as defineCustomElement$3 } from './my-loader2.js';
6
- import { d as defineCustomElement$2 } from './my-search2.js';
7
- import { d as defineCustomElement$1 } from './index2.js';
1
+ import { r as registerInstance, e as createEvent, h, f as getAssetPath, g as getElement } from './index-1ac7471e.js';
2
+ import { s as setDataLayer } from './gtmUtils-dcdac4ce.js';
8
3
 
9
4
  const APIURL = 'https://pallete-colors-backend.herokuapp.com';
10
5
  class API {
@@ -26,6 +21,8 @@ class API {
26
21
  }
27
22
  const ApiService = new API();
28
23
 
24
+ 'use strict';
25
+
29
26
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
30
27
  var shams = function hasSymbols() {
31
28
  if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
@@ -67,6 +64,8 @@ var shams = function hasSymbols() {
67
64
  return true;
68
65
  };
69
66
 
67
+ 'use strict';
68
+
70
69
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
71
70
 
72
71
 
@@ -79,6 +78,8 @@ var hasSymbols$1 = function hasNativeSymbols() {
79
78
  return shams();
80
79
  };
81
80
 
81
+ 'use strict';
82
+
82
83
  /* eslint no-invalid-this: 1 */
83
84
 
84
85
  var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
@@ -130,10 +131,20 @@ var implementation = function bind(that) {
130
131
  return bound;
131
132
  };
132
133
 
134
+ 'use strict';
135
+
136
+
137
+
133
138
  var functionBind = Function.prototype.bind || implementation;
134
139
 
140
+ 'use strict';
141
+
142
+
143
+
135
144
  var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
136
145
 
146
+ 'use strict';
147
+
137
148
  var undefined$1;
138
149
 
139
150
  var $SyntaxError = SyntaxError;
@@ -148,6 +159,13 @@ var getEvalledConstructor = function (expressionSyntax) {
148
159
  };
149
160
 
150
161
  var $gOPD = Object.getOwnPropertyDescriptor;
162
+ if ($gOPD) {
163
+ try {
164
+ $gOPD({}, '');
165
+ } catch (e) {
166
+ $gOPD = null; // this is IE 8, which has a broken gOPD
167
+ }
168
+ }
151
169
 
152
170
  var throwTypeError = function () {
153
171
  throw new $TypeError$1();
@@ -155,6 +173,8 @@ var throwTypeError = function () {
155
173
  var ThrowTypeError = $gOPD
156
174
  ? (function () {
157
175
  try {
176
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
177
+ arguments.callee; // IE 8 does not throw here
158
178
  return throwTypeError;
159
179
  } catch (calleeThrows) {
160
180
  try {
@@ -458,16 +478,30 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
458
478
  return value;
459
479
  };
460
480
 
481
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
482
+
483
+ function getDefaultExportFromCjs (x) {
484
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
485
+ }
486
+
461
487
  function createCommonjsModule(fn, basedir, module) {
462
488
  return module = {
463
489
  path: basedir,
464
490
  exports: {},
465
491
  require: function (path, base) {
466
- return commonjsRequire();
492
+ return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
467
493
  }
468
494
  }, fn(module, module.exports), module.exports;
469
495
  }
470
496
 
497
+ function getDefaultExportFromNamespaceIfPresent (n) {
498
+ return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
499
+ }
500
+
501
+ function getDefaultExportFromNamespaceIfNotNamed (n) {
502
+ return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
503
+ }
504
+
471
505
  function getAugmentedNamespace(n) {
472
506
  if (n.__esModule) return n;
473
507
  var a = Object.defineProperty({}, '__esModule', {value: true});
@@ -488,6 +522,7 @@ function commonjsRequire () {
488
522
  }
489
523
 
490
524
  var callBind = createCommonjsModule(function (module) {
525
+ 'use strict';
491
526
 
492
527
 
493
528
 
@@ -536,6 +571,12 @@ if ($defineProperty) {
536
571
  }
537
572
  });
538
573
 
574
+ 'use strict';
575
+
576
+
577
+
578
+
579
+
539
580
  var $indexOf = callBind(getIntrinsic('String.prototype.indexOf'));
540
581
 
541
582
  var callBound = function callBoundIntrinsic(name, allowMissing) {
@@ -1068,6 +1109,12 @@ function arrObjKeys(obj, inspect) {
1068
1109
  return xs;
1069
1110
  }
1070
1111
 
1112
+ 'use strict';
1113
+
1114
+
1115
+
1116
+
1117
+
1071
1118
  var $TypeError = getIntrinsic('%TypeError%');
1072
1119
  var $WeakMap = getIntrinsic('%WeakMap%', true);
1073
1120
  var $Map = getIntrinsic('%Map%', true);
@@ -1187,6 +1234,8 @@ var sideChannel = function getSideChannel() {
1187
1234
  return channel;
1188
1235
  };
1189
1236
 
1237
+ 'use strict';
1238
+
1190
1239
  var replace = String.prototype.replace;
1191
1240
  var percentTwenties = /%20/g;
1192
1241
 
@@ -1209,6 +1258,10 @@ var formats = {
1209
1258
  RFC3986: Format.RFC3986
1210
1259
  };
1211
1260
 
1261
+ 'use strict';
1262
+
1263
+
1264
+
1212
1265
  var has$2 = Object.prototype.hasOwnProperty;
1213
1266
  var isArray$2 = Array.isArray;
1214
1267
 
@@ -1458,6 +1511,11 @@ var utils = {
1458
1511
  merge: merge
1459
1512
  };
1460
1513
 
1514
+ 'use strict';
1515
+
1516
+
1517
+
1518
+
1461
1519
  var has$1 = Object.prototype.hasOwnProperty;
1462
1520
 
1463
1521
  var arrayPrefixGenerators = {
@@ -1780,6 +1838,10 @@ var stringify_1 = function (object, opts) {
1780
1838
  return joined.length > 0 ? prefix + joined : '';
1781
1839
  };
1782
1840
 
1841
+ 'use strict';
1842
+
1843
+
1844
+
1783
1845
  var has = Object.prototype.hasOwnProperty;
1784
1846
  var isArray = Array.isArray;
1785
1847
 
@@ -2040,6 +2102,12 @@ var parse = function (str, opts) {
2040
2102
  return utils.compact(obj);
2041
2103
  };
2042
2104
 
2105
+ 'use strict';
2106
+
2107
+
2108
+
2109
+
2110
+
2043
2111
  var lib = {
2044
2112
  formats: formats,
2045
2113
  parse: parse,
@@ -2127,12 +2195,11 @@ const fetchColorByNumber = (productId, colorNumber) => lib.stringify({
2127
2195
  encodeValuesOnly: true, // prettify url
2128
2196
  });
2129
2197
 
2130
- const myModalCss = "*{font-family:\"Galatea\", sans-serif}.my-modal{box-shadow:1px 1px 1px #ccc;background-color:#fff;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);max-width:1555px;width:90%;z-index:1000;text-align:center;padding:35px 40px;max-height:calc(100vh - 100px);overflow-y:auto}@media (max-width: 1024px){.my-modal{padding:80px 20px 20px}}.my-modal::-webkit-scrollbar{display:none}.my-modal .loader{display:flex;flex-direction:column;align-items:center;justify-content:center;height:300px}.my-modal>img{width:300px;object-fit:cover}@media (max-width: 768px){.my-modal>img{width:200px}}.my-modal__close{position:absolute;right:20px;top:20px;background:transparent;border:none}.my-modal__close>img{width:45px;height:45px;object-fit:cover;cursor:pointer}@media (max-width: 1024px){.my-modal__close{top:65px}}.my-modal__see-more{font-size:22px;margin-bottom:27px;display:flex;justify-content:center;align-items:center}@media (max-width: 1024px){.my-modal__see-more{font-size:18px}}.my-modal__see-more img{width:45px;height:45px}@media (max-width: 1024px){.my-modal__see-more img{display:none}}.my-modal__wrapper{display:flex;flex-direction:column;position:relative}.my-modal__wrapper .boxes{display:flex;flex-direction:column;flex-wrap:wrap}.my-modal__wrapper .boxes__list{display:flex;flex-wrap:wrap;gap:5px 5px}.my-modal__wrapper .boxes__box-content{width:100%;margin-bottom:5px;height:500px;text-align:left;display:flex;flex-direction:row;justify-content:space-between;position:relative}.my-modal__wrapper .boxes__box-content .closebtn{position:absolute;right:10px;top:10px;width:53px;height:53px;cursor:pointer;object-fit:cover;z-index:9999}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content{flex-direction:column-reverse;height:350px}}.my-modal__wrapper .boxes__box-content__info{width:40%;padding:50px 40px;position:relative}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info{width:100%;padding:15px;min-height:100px}}.my-modal__wrapper .boxes__box-content__info h2{font-size:35px;font-weight:normal;text-transform:capitalize;margin-bottom:7px;color:#232323}.my-modal__wrapper .boxes__box-content__info h4{margin-top:0px;margin-bottom:15px;font-size:16px;color:#4c4c4c}.my-modal__wrapper .boxes__box-content__info .divider{border:1px solid #4c4c4c;opacity:0.2;margin-bottom:20px}.my-modal__wrapper .boxes__box-content__info__value{display:flex;flex-direction:row;justify-content:flex-start}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value{justify-content:flex-start}}.my-modal__wrapper .boxes__box-content__info__value-image img{width:114px;object-fit:cover}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-image img{width:75px}}.my-modal__wrapper .boxes__box-content__info__value-product{color:#232323;margin-left:10px}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product h2{font-size:26px;margin:0;margin-right:10px}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info__value-product h2{font-size:16px}}.my-modal__wrapper .boxes__box-content__info__value-product p{font-size:20px;margin-top:0px;margin-bottom:0px}.my-modal__wrapper .boxes__box-content__info__value-product p:last-of-type{margin-bottom:20px}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product p:last-of-type{margin-bottom:0}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info__value-product p{font-size:10px}}.my-modal__wrapper .boxes__box-content__info__value-product a{background-color:#fff;font-size:16px;box-shadow:0 10px 20px 0 rgba(0, 0, 0, 0.1);border-radius:22.5px;padding:15px 30px;color:#232323;text-decoration:none;display:block;text-align:center;transition:all 0.7s ease-in-out}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product a{max-width:150px;font-size:13px;padding:12px 25px}}.my-modal__wrapper .boxes__box-content__info__value-product a:hover{color:#fff;background-color:#232323}.my-modal__wrapper .boxes__box-content__info__value-product a.inverse{background-color:#232323;color:#fff}.my-modal__wrapper .boxes__box-content__info__value-product a.inverse:hover{color:#232323;background-color:#fff}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product>div{display:flex;justify-content:flex-start;align-items:center}}.my-modal__wrapper .boxes__box-content__slider{width:60%;position:relative}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__slider{width:100%;display:block}}.my-modal__wrapper .boxes__box-content__white *{color:#fff}.my-modal__wrapper .boxes__box-content__white h2{color:#fff}.my-modal__wrapper .pagination{margin:10px 0px;font-size:16px;display:flex;flex-direction:row;align-items:center;justify-content:center}.my-modal__wrapper .pagination>span{margin:0 3px;cursor:pointer;min-width:20px;padding:5px;box-shadow:1px 1px 1px #ccc}.my-modal__wrapper .pagination .current{background-color:wheat}.my-modal .categories{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid #dfdfdf;display:flex;flex-direction:column;align-items:flex-start}.my-modal .categories__container{display:flex;flex-wrap:nowrap;gap:5px 5px;overflow-x:auto;width:100%}@media (max-width: 1024px){.my-modal .categories__container{padding-bottom:5px}}.my-modal .categories__slide-information{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.my-modal .categories__slide-information span{color:#4c4c4c;font-size:16px;font-weight:normal}.my-modal .categories__slide-information span:first-of-type{margin-left:7px}.my-modal .categories__slide-information span:last-of-type{margin-right:7px}";
2198
+ const myModalCss = ".pallete-wrapper *{font-family:\"Galatea\", sans-serif}.my-modal{box-shadow:1px 1px 1px #ccc;background-color:#fff;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);max-width:1555px;width:90%;z-index:1000;text-align:center;padding:35px 40px;max-height:calc(100vh - 100px);overflow-y:auto}@media (max-width: 1024px){.my-modal{padding:80px 20px 20px}}.my-modal::-webkit-scrollbar{display:none}.my-modal .loader{display:flex;flex-direction:column;align-items:center;justify-content:center;height:300px}.my-modal>img{width:300px;object-fit:cover}@media (max-width: 768px){.my-modal>img{width:200px}}.my-modal__close{position:absolute;right:20px;top:20px;background:transparent;border:none}.my-modal__close>img{width:45px;height:45px;object-fit:cover;cursor:pointer}@media (max-width: 1024px){.my-modal__close{top:65px}}.my-modal__see-more{font-size:22px;margin-bottom:27px;display:flex;justify-content:center;align-items:center}@media (max-width: 1024px){.my-modal__see-more{font-size:18px}}.my-modal__see-more img{width:45px;height:45px}@media (max-width: 1024px){.my-modal__see-more img{display:none}}.my-modal__wrapper{display:flex;flex-direction:column;position:relative}.my-modal__wrapper .boxes{display:flex;flex-direction:column;flex-wrap:wrap}.my-modal__wrapper .boxes__list{display:flex;flex-wrap:wrap;gap:5px 5px}.my-modal__wrapper .boxes__box-content{width:100%;margin-bottom:5px;height:500px;text-align:left;display:flex;flex-direction:row;justify-content:space-between;position:relative}.my-modal__wrapper .boxes__box-content .closebtn{position:absolute;right:10px;top:10px;width:53px;height:53px;cursor:pointer;object-fit:cover;z-index:9999}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content{flex-direction:column-reverse;height:350px}}.my-modal__wrapper .boxes__box-content__info{width:40%;padding:50px 40px;position:relative}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info{width:100%;padding:15px;min-height:100px}}.my-modal__wrapper .boxes__box-content__info h2{font-size:35px;font-weight:normal;text-transform:capitalize;margin-bottom:7px;color:#232323}.my-modal__wrapper .boxes__box-content__info h4{margin-top:0px;margin-bottom:15px;font-size:16px;color:#4c4c4c}.my-modal__wrapper .boxes__box-content__info .divider{border:1px solid #4c4c4c;opacity:0.2;margin-bottom:20px}.my-modal__wrapper .boxes__box-content__info__value{display:flex;flex-direction:row;justify-content:flex-start}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value{justify-content:flex-start}}.my-modal__wrapper .boxes__box-content__info__value-image img{width:114px;object-fit:cover}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-image img{width:75px}}.my-modal__wrapper .boxes__box-content__info__value-product{color:#232323;margin-left:10px}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product h2{font-size:26px;margin:0;margin-right:10px}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info__value-product h2{font-size:16px}}.my-modal__wrapper .boxes__box-content__info__value-product p{font-size:20px;margin-top:0px;margin-bottom:0px}.my-modal__wrapper .boxes__box-content__info__value-product p:last-of-type{margin-bottom:20px}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product p:last-of-type{margin-bottom:0}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info__value-product p{font-size:10px}}.my-modal__wrapper .boxes__box-content__info__value-product a{background-color:#fff;font-size:16px;box-shadow:0 10px 20px 0 rgba(0, 0, 0, 0.1);border-radius:22.5px;padding:15px 30px;color:#232323;text-decoration:none;display:block;text-align:center;transition:all 0.7s ease-in-out}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product a{max-width:150px;font-size:13px;padding:12px 25px}}.my-modal__wrapper .boxes__box-content__info__value-product a:hover{color:#fff;background-color:#232323}.my-modal__wrapper .boxes__box-content__info__value-product a.inverse{background-color:#232323;color:#fff}.my-modal__wrapper .boxes__box-content__info__value-product a.inverse:hover{color:#232323;background-color:#fff}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product>div{display:flex;justify-content:flex-start;align-items:center}}.my-modal__wrapper .boxes__box-content__slider{width:60%;position:relative}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__slider{width:100%;display:block}}.my-modal__wrapper .boxes__box-content__white *{color:#fff}.my-modal__wrapper .boxes__box-content__white h2{color:#fff}.my-modal__wrapper .pagination{margin:10px 0px;font-size:16px;display:flex;flex-direction:row;align-items:center;justify-content:center}.my-modal__wrapper .pagination>span{margin:0 3px;cursor:pointer;min-width:20px;padding:5px;box-shadow:1px 1px 1px #ccc}.my-modal__wrapper .pagination .current{background-color:wheat}.my-modal .categories{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid #dfdfdf;display:flex;flex-direction:column;align-items:flex-start}.my-modal .categories__container{display:flex;flex-wrap:nowrap;gap:5px 5px;overflow-x:auto;width:100%}@media (max-width: 1024px){.my-modal .categories__container{padding-bottom:5px}}.my-modal .categories__slide-information{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.my-modal .categories__slide-information span{color:#4c4c4c;font-size:16px;font-weight:normal}.my-modal .categories__slide-information span:first-of-type{margin-left:7px}.my-modal .categories__slide-information span:last-of-type{margin-right:7px}";
2131
2199
 
2132
- const MyModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
2133
- constructor() {
2134
- super();
2135
- this.__registerHost();
2200
+ const MyModal = class {
2201
+ constructor(hostRef) {
2202
+ registerInstance(this, hostRef);
2136
2203
  this.close = createEvent(this, "close", 7);
2137
2204
  this.boxDesktopWidth = 130;
2138
2205
  this.boxMobileWidth = 85;
@@ -2381,71 +2448,12 @@ const MyModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
2381
2448
  }, key: `#${i + 1 + page}` }, i + 1))))))))));
2382
2449
  }
2383
2450
  static get assetsDirs() { return ["assets"]; }
2384
- get modalEl() { return this; }
2451
+ get modalEl() { return getElement(this); }
2385
2452
  static get watchers() { return {
2386
2453
  "chunksNum": ["setInfoBoxWidth"],
2387
2454
  "data": ["watchPropHandler"]
2388
2455
  }; }
2389
- static get style() { return myModalCss; }
2390
- }, [0, "my-modal", {
2391
- "shop": [1],
2392
- "product": [1],
2393
- "closeImage": [1, "close-image"],
2394
- "arrowDown": [1, "arrow-down"],
2395
- "chunksNum": [32],
2396
- "data": [32],
2397
- "preloader": [32],
2398
- "loading": [32],
2399
- "colors": [32],
2400
- "currentColor": [32],
2401
- "currentIndex": [32],
2402
- "infoBoxWidth": [32],
2403
- "boxWidth": [32],
2404
- "padding": [32],
2405
- "isMobile": [32],
2406
- "showRange": [32],
2407
- "colorCategories": [32],
2408
- "selectedCategory": [32],
2409
- "page": [32],
2410
- "open": [64]
2411
- }, [[0, "closeInfoBox", "closeInfoBoxHandler"], [9, "resize", "handleResize"], [0, "searchColors", "searchColorsHandler"]]]);
2412
- function defineCustomElement() {
2413
- if (typeof customElements === "undefined") {
2414
- return;
2415
- }
2416
- const components = ["my-modal", "my-colorbox", "my-colorinfo", "my-loader", "my-search", "my-slider"];
2417
- components.forEach(tagName => { switch (tagName) {
2418
- case "my-modal":
2419
- if (!customElements.get(tagName)) {
2420
- customElements.define(tagName, MyModal);
2421
- }
2422
- break;
2423
- case "my-colorbox":
2424
- if (!customElements.get(tagName)) {
2425
- defineCustomElement$5();
2426
- }
2427
- break;
2428
- case "my-colorinfo":
2429
- if (!customElements.get(tagName)) {
2430
- defineCustomElement$4();
2431
- }
2432
- break;
2433
- case "my-loader":
2434
- if (!customElements.get(tagName)) {
2435
- defineCustomElement$3();
2436
- }
2437
- break;
2438
- case "my-search":
2439
- if (!customElements.get(tagName)) {
2440
- defineCustomElement$2();
2441
- }
2442
- break;
2443
- case "my-slider":
2444
- if (!customElements.get(tagName)) {
2445
- defineCustomElement$1();
2446
- }
2447
- break;
2448
- } });
2449
- }
2456
+ };
2457
+ MyModal.style = myModalCss;
2450
2458
 
2451
- export { MyModal as M, defineCustomElement as d };
2459
+ export { MyModal as my_modal };
@@ -0,0 +1,36 @@
1
+ import { r as registerInstance, e as createEvent, h, f as getAssetPath } from './index-1ac7471e.js';
2
+
3
+ const mySearchCss = ".pallete-wrapper.sc-my-search *.sc-my-search{font-family:\"Galatea\", sans-serif}.search.sc-my-search{position:relative;width:400px}@media (max-width: 768px){.search.sc-my-search{width:100%}}.search.sc-my-search input.sc-my-search{margin-bottom:12px;font-size:16px;padding:19px;border-radius:27.35px;border:1px solid #dfdfdf;width:100%}.search.sc-my-search button.sc-my-search{position:absolute;border:none;background-color:transparent;right:-20px;top:0;width:50px;height:calc(100% - 12px);display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer}";
4
+
5
+ const MySearch = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.searchColors = createEvent(this, "searchColors", 7);
9
+ this.searchIcon = 'search.svg';
10
+ this.searchText = null;
11
+ this.fetchColorsByName = (text) => {
12
+ this.searchColors.emit(text);
13
+ };
14
+ }
15
+ onInputChangeValue(event) {
16
+ const value = event.target.value;
17
+ this.searchColors.emit(value);
18
+ this.searchText = value;
19
+ }
20
+ fetchColorsByNameHandle(newValue) {
21
+ this.fetchColorsByName(newValue);
22
+ }
23
+ render() {
24
+ return (h("div", { class: 'search' }, h("input", { placeholder: this.isMobile ? 'Wyszukaj kolor' : 'Wyszukaj kolor po nazwie bądź numerze', value: this.searchText || '', type: "text", onInput: this.onInputChangeValue.bind(this) }), h("button", { onClick: () => {
25
+ this.searchText && this.fetchColorsByName(this.searchText);
26
+ this.searchText = '';
27
+ } }, h("img", { src: getAssetPath(`./assets/${this.searchIcon}`), alt: "arrow_down" }))));
28
+ }
29
+ static get assetsDirs() { return ["assets"]; }
30
+ static get watchers() { return {
31
+ "searchText": ["fetchColorsByNameHandle"]
32
+ }; }
33
+ };
34
+ MySearch.style = mySearchCss;
35
+
36
+ export { MySearch as my_search };