@ppg_pl/pallete 0.0.4 → 0.0.6

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 (154) hide show
  1. package/dist/cjs/index-160fcb6c.js +1661 -0
  2. package/dist/cjs/index-160fcb6c.js.map +1 -0
  3. package/dist/cjs/index.cjs.js +4 -0
  4. package/dist/cjs/index.cjs.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +24 -0
  6. package/dist/cjs/loader.cjs.js.map +1 -0
  7. package/dist/cjs/my-backdrop_8.cjs.entry.js +7985 -0
  8. package/dist/cjs/my-backdrop_8.cjs.entry.js.map +1 -0
  9. package/dist/cjs/pallete.cjs.js +28 -0
  10. package/dist/cjs/pallete.cjs.js.map +1 -0
  11. package/dist/collection/collection-manifest.json +19 -0
  12. package/dist/collection/components/api/index.js +20 -0
  13. package/dist/collection/components/api/index.js.map +1 -0
  14. package/dist/collection/components/api/services.js +82 -0
  15. package/dist/collection/components/api/services.js.map +1 -0
  16. package/dist/collection/components/my-backdrop/my-backdrop.css +13 -0
  17. package/dist/collection/components/my-backdrop/my-backdrop.js +17 -0
  18. package/dist/collection/components/my-backdrop/my-backdrop.js.map +1 -0
  19. package/dist/collection/components/my-colorbox/my-colorbox.css +52 -0
  20. package/dist/collection/components/my-colorbox/my-colorbox.js +157 -0
  21. package/dist/collection/components/my-colorbox/my-colorbox.js.map +1 -0
  22. package/dist/collection/components/my-colorinfo/my-colorinfo.js +187 -0
  23. package/dist/collection/components/my-colorinfo/my-colorinfo.js.map +1 -0
  24. package/dist/collection/components/my-component/my-component.css +6 -0
  25. package/dist/collection/components/my-component/my-component.js +133 -0
  26. package/dist/collection/components/my-component/my-component.js.map +1 -0
  27. package/dist/collection/components/my-loader/my-loader.css +85 -0
  28. package/dist/collection/components/my-loader/my-loader.js +19 -0
  29. package/dist/collection/components/my-loader/my-loader.js.map +1 -0
  30. package/dist/collection/components/my-modal/__mocks__/index.js +759 -0
  31. package/dist/collection/components/my-modal/__mocks__/index.js.map +1 -0
  32. package/dist/collection/components/my-modal/assets/arrow_down.png +0 -0
  33. package/dist/collection/components/my-modal/assets/close.png +0 -0
  34. package/dist/collection/components/my-modal/my-modal.css +367 -0
  35. package/dist/collection/components/my-modal/my-modal.js +448 -0
  36. package/dist/collection/components/my-modal/my-modal.js.map +1 -0
  37. package/dist/collection/components/my-search/assets/search.svg +15 -0
  38. package/dist/collection/components/my-search/my-search.css +35 -0
  39. package/dist/collection/components/my-search/my-search.js +125 -0
  40. package/dist/collection/components/my-search/my-search.js.map +1 -0
  41. package/dist/collection/components/my-slider/index.js +148 -0
  42. package/dist/collection/components/my-slider/index.js.map +1 -0
  43. package/dist/collection/components/my-slider/my-slider.css +88 -0
  44. package/dist/collection/gtmUtils.js +4 -0
  45. package/dist/collection/gtmUtils.js.map +1 -0
  46. package/dist/collection/index.js +2 -0
  47. package/dist/collection/index.js.map +1 -0
  48. package/dist/collection/types.js +2 -0
  49. package/dist/collection/types.js.map +1 -0
  50. package/{www/build/gtmUtils-dcdac4ce.js → dist/components/gtmUtils.js} +2 -0
  51. package/dist/components/gtmUtils.js.map +1 -0
  52. package/dist/components/index.d.ts +9 -11
  53. package/dist/components/index.js +3 -0
  54. package/dist/components/index.js.map +1 -0
  55. package/dist/components/index2.js +5305 -0
  56. package/dist/components/index2.js.map +1 -0
  57. package/dist/components/my-backdrop.js +8 -0
  58. package/dist/components/my-backdrop.js.map +1 -0
  59. package/dist/components/my-backdrop2.js +31 -0
  60. package/dist/components/my-backdrop2.js.map +1 -0
  61. package/dist/components/my-colorbox.js +8 -0
  62. package/dist/components/my-colorbox.js.map +1 -0
  63. package/dist/{pallete/my-colorbox.entry.js → components/my-colorbox2.js} +37 -8
  64. package/dist/components/my-colorbox2.js.map +1 -0
  65. package/dist/components/my-colorinfo.js +8 -0
  66. package/dist/components/my-colorinfo.js.map +1 -0
  67. package/dist/{pallete/my-colorinfo.entry.js → components/my-colorinfo2.js} +44 -10
  68. package/dist/components/my-colorinfo2.js.map +1 -0
  69. package/dist/{pallete/my-component.entry.js → components/my-component.js} +87 -11
  70. package/dist/components/my-component.js.map +1 -0
  71. package/dist/components/my-loader.js +8 -0
  72. package/dist/components/my-loader.js.map +1 -0
  73. package/{www/build/my-loader.entry.js → dist/components/my-loader2.js} +23 -7
  74. package/dist/components/my-loader2.js.map +1 -0
  75. package/dist/components/my-modal.js +8 -0
  76. package/dist/components/my-modal.js.map +1 -0
  77. package/dist/{pallete/my-modal.entry.js → components/my-modal2.js} +120 -120
  78. package/dist/components/my-modal2.js.map +1 -0
  79. package/dist/components/my-search.js +8 -0
  80. package/dist/components/my-search.js.map +1 -0
  81. package/{www/build/my-search.entry.js → dist/components/my-search2.js} +32 -9
  82. package/dist/components/my-search2.js.map +1 -0
  83. package/dist/components/my-slider.js +8 -0
  84. package/dist/components/my-slider.js.map +1 -0
  85. package/dist/esm/index-943c259f.js +1632 -0
  86. package/dist/esm/index-943c259f.js.map +1 -0
  87. package/dist/esm/index.js +3 -0
  88. package/dist/esm/index.js.map +1 -0
  89. package/dist/esm/loader.js +20 -0
  90. package/dist/esm/loader.js.map +1 -0
  91. package/dist/esm/my-backdrop_8.entry.js +7974 -0
  92. package/dist/esm/my-backdrop_8.entry.js.map +1 -0
  93. package/dist/esm/pallete.js +23 -0
  94. package/dist/esm/pallete.js.map +1 -0
  95. package/dist/esm/polyfills/core-js.js +11 -0
  96. package/dist/esm/polyfills/css-shim.js +1 -0
  97. package/dist/esm/polyfills/dom.js +79 -0
  98. package/dist/esm/polyfills/es5-html-element.js +1 -0
  99. package/dist/esm/polyfills/index.js +34 -0
  100. package/dist/esm/polyfills/system.js +6 -0
  101. package/dist/index.cjs.js +1 -0
  102. package/dist/index.js +1 -0
  103. package/dist/pallete/index.esm.js +1 -0
  104. package/dist/pallete/index.esm.js.map +1 -0
  105. package/dist/pallete/p-9a7eff4f.entry.js +2 -0
  106. package/dist/pallete/p-9a7eff4f.entry.js.map +1 -0
  107. package/dist/pallete/p-c77aaa54.js +3 -0
  108. package/dist/pallete/p-c77aaa54.js.map +1 -0
  109. package/dist/pallete/pallete.css +1 -3
  110. package/dist/pallete/pallete.esm.js +2 -129
  111. package/dist/pallete/pallete.esm.js.map +1 -0
  112. package/dist/types/components/api/services.d.ts +1 -1
  113. package/dist/types/components/my-component/my-component.d.ts +2 -0
  114. package/dist/types/components/my-modal/__mocks__/index.d.ts +415 -0
  115. package/dist/types/components/my-modal/my-modal.d.ts +3 -1
  116. package/dist/types/components.d.ts +2 -0
  117. package/dist/types/stencil-public-runtime.d.ts +91 -19
  118. package/dist/types/types.d.ts +8 -8
  119. package/loader/index.d.ts +9 -0
  120. package/loader/package.json +1 -0
  121. package/package.json +21 -5
  122. package/www/build/index.esm.js +1 -0
  123. package/www/build/index.esm.js.map +1 -0
  124. package/www/build/p-825a7d1d.js +163 -0
  125. package/www/build/p-9a7eff4f.entry.js +2 -0
  126. package/www/build/p-9a7eff4f.entry.js.map +1 -0
  127. package/www/build/p-c77aaa54.js +3 -0
  128. package/www/build/p-c77aaa54.js.map +1 -0
  129. package/www/build/p-fd390eef.css +3 -0
  130. package/www/build/pallete.css +1 -3
  131. package/www/build/pallete.esm.js +2 -129
  132. package/www/build/pallete.esm.js.map +1 -0
  133. package/www/index.html +2 -40
  134. package/dist/pallete/app-globals-0f993ce5.js +0 -3
  135. package/dist/pallete/css-shim-60f618b9.js +0 -4
  136. package/dist/pallete/dom-4eeb3fee.js +0 -73
  137. package/dist/pallete/gtmUtils-dcdac4ce.js +0 -5
  138. package/dist/pallete/index-1ac7471e.js +0 -3059
  139. package/dist/pallete/my-backdrop.entry.js +0 -15
  140. package/dist/pallete/my-loader.entry.js +0 -15
  141. package/dist/pallete/my-search.entry.js +0 -36
  142. package/dist/pallete/my-slider.entry.js +0 -11333
  143. package/dist/pallete/shadow-css-02866686.js +0 -387
  144. package/www/build/app-globals-0f993ce5.js +0 -3
  145. package/www/build/css-shim-60f618b9.js +0 -4
  146. package/www/build/dom-4eeb3fee.js +0 -73
  147. package/www/build/index-1ac7471e.js +0 -3059
  148. package/www/build/my-backdrop.entry.js +0 -15
  149. package/www/build/my-colorbox.entry.js +0 -40
  150. package/www/build/my-colorinfo.entry.js +0 -36
  151. package/www/build/my-component.entry.js +0 -154
  152. package/www/build/my-modal.entry.js +0 -2459
  153. package/www/build/my-slider.entry.js +0 -11333
  154. package/www/build/shadow-css-02866686.js +0 -387
@@ -1,15 +0,0 @@
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 };
@@ -1,40 +0,0 @@
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,36 +0,0 @@
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';
3
-
4
- const MyColorInfo = class {
5
- constructor(hostRef) {
6
- registerInstance(this, hostRef);
7
- this.closeInfoBox = createEvent(this, "closeInfoBox", 7);
8
- this.data = null;
9
- this.isMobile = false;
10
- this.closeImage = 'close.png';
11
- this.goToProduct = () => {
12
- var _a;
13
- this.currentColor &&
14
- setDataLayer({
15
- event: 'GoToProduct',
16
- shop: this.shop,
17
- product: this.product,
18
- color: (_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.name,
19
- });
20
- };
21
- this.onCloseButtonClick = () => {
22
- this.closeInfoBox.emit();
23
- };
24
- }
25
- render() {
26
- var _a, _b, _c, _d, _e, _f, _g;
27
- return (h("div", { class: `boxes__box-content ${this.currentColor.textWhite ? 'boxes__box-content__white' : ''}`, style: {
28
- background: this.currentColor.hex,
29
- maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,
30
- } }, this.isMobile && h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), h("div", { class: "boxes__box-content__info", style: {
31
- maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,
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 }), ' ')));
33
- }
34
- };
35
-
36
- export { MyColorInfo as my_colorinfo };
@@ -1,154 +0,0 @@
1
- import { r as registerInstance, h, g as getElement } from './index-1ac7471e.js';
2
-
3
- const isObject = (val) => !Array.isArray(val) && val !== null && typeof val === 'object';
4
- const hasAttributes = ({ vattrs }, requiredAttrs = []) => isObject(vattrs) && requiredAttrs.every(vattrs.hasOwnProperty.bind(vattrs));
5
- const isTextNode = ({ vtext }) => typeof vtext === 'string';
6
- // Can't use instanceof HTMLElement because MockHTMLElement during pre-rendering isn't
7
- const isElement = (val) => typeof val === 'object' && val.nodeType === 1 && typeof val.ownerDocument === 'object';
8
- const isElementArray = (val) => Array.isArray(val) && val.every(isElement);
9
-
10
- const createElement = ({ vtag, vattrs, vchildren, vtext }, utils) => {
11
- if (vtext != null) {
12
- return document.createTextNode(vtext);
13
- }
14
- const element = document.createElement(vtag);
15
- if (vattrs != null) {
16
- for (const key in vattrs) {
17
- element.setAttribute(key, vattrs[key]);
18
- }
19
- }
20
- if (vchildren != null) {
21
- utils.forEach(vchildren, (child) => {
22
- element.appendChild(createElement(child, utils));
23
- });
24
- }
25
- return element;
26
- };
27
- const shouldApplyToHead = (val) => isElement(val) || (isElementArray(val) && val.length === 2);
28
- const applyToHead = (element) => {
29
- if (Array.isArray(element)) {
30
- return document.head.replaceChild(element[0], element[1]);
31
- }
32
- return document.head.appendChild(element);
33
- };
34
-
35
- const hasChildren = (node) => Array.isArray(node.vchildren);
36
- const getFirstChild = (vchildren, utils) => {
37
- let firstChild = null;
38
- utils.forEach(vchildren || [], (c, i) => {
39
- if (i === 0) {
40
- firstChild = c;
41
- return;
42
- }
43
- });
44
- return firstChild;
45
- };
46
- function title(node, head, utils) {
47
- const firstChild = getFirstChild(node.vchildren || [], utils);
48
- if (firstChild && isTextNode(firstChild)) {
49
- return [createElement(node, utils), head.querySelector('title')];
50
- }
51
- }
52
- function meta(node, head, utils) {
53
- var _a, _b, _c;
54
- const namePropKey = ((_a = node.vattrs) === null || _a === void 0 ? void 0 : _a.property) ? 'property' : 'name';
55
- const namePropValue = ((_b = node.vattrs) === null || _b === void 0 ? void 0 : _b.property) || ((_c = node.vattrs) === null || _c === void 0 ? void 0 : _c.name);
56
- const existingElement = head.querySelector(`meta[${namePropKey}="${namePropValue}"]`);
57
- if (existingElement !== null) {
58
- return [createElement(node, utils), existingElement];
59
- }
60
- else {
61
- return createElement(node, utils);
62
- }
63
- }
64
- function link(node, _head, utils) {
65
- if (!hasChildren(node)) {
66
- return createElement(node, utils);
67
- }
68
- }
69
- function style(node, _head, utils) {
70
- const firstChild = getFirstChild(node.vchildren || [], utils);
71
- if (firstChild && isTextNode(firstChild)) {
72
- return createElement(node, utils);
73
- }
74
- }
75
- function script(node, _head, utils) {
76
- if (hasChildren(node) || hasAttributes(node)) {
77
- return createElement(node, utils);
78
- }
79
- }
80
- function base(node, _head, utils) {
81
- if (!hasChildren(node) && hasAttributes(node)) {
82
- return createElement(node, utils);
83
- }
84
- }
85
- const template = createElement;
86
- const noscript = createElement; // SSR only
87
- const types = {
88
- title,
89
- meta,
90
- link,
91
- style,
92
- script,
93
- base,
94
- template,
95
- noscript,
96
- };
97
-
98
- const headExists = document && document.head;
99
- const validTagNames = Object.keys(types);
100
- const isValidNode = (node) => validTagNames.indexOf(node.vtag) > -1;
101
- const renderNode = (node, utils) => types[node.vtag](node, document.head, utils);
102
- const Helmet = (_props, children, utils) => {
103
- if (!headExists) {
104
- return null;
105
- }
106
- const rendered = [];
107
- const validChildren = [];
108
- utils.forEach(children, (n) => {
109
- if (isValidNode(n)) {
110
- validChildren.push(n);
111
- rendered.push(renderNode(n, utils));
112
- }
113
- });
114
- // Build an HTMLElement for each provided virtual child
115
- rendered
116
- .filter(shouldApplyToHead)
117
- .forEach(applyToHead);
118
- return null;
119
- };
120
-
121
- const myComponentCss = ".pallete-wrapper.sc-my-component{display:flex;flex-direction:column;align-items:center;justify-content:center}";
122
-
123
- const MyModalBundle = class {
124
- constructor(hostRef) {
125
- registerInstance(this, hostRef);
126
- this.show = false;
127
- }
128
- async open() {
129
- this.show = true;
130
- }
131
- closeModalHandler() {
132
- this.show = false;
133
- }
134
- render() {
135
- let content = null;
136
- if (this.show) {
137
- content = [h("my-backdrop", null), h("my-modal", { shop: this.shop, product: this.product })];
138
- }
139
- return (h("div", null, h(Helmet, null, h("script", null, `(function (w, d, s, l, i) {
140
- w[l] = w[l] || [];
141
- w[l].push({ 'gtm.start': new Date().getTime(), 'event': 'gtm.js' });
142
- var f = d.getElementsByTagName(s)[0],
143
- j = d.createElement(s),
144
- dl = l != 'dataLayer' ? '&l=' + l : '';
145
- j.async = true;
146
- j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
147
- f.parentNode.insertBefore(j, f);
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' } }))));
149
- }
150
- get modalEl() { return getElement(this); }
151
- };
152
- MyModalBundle.style = myComponentCss;
153
-
154
- export { MyModalBundle as my_component };