@ppg_pl/pallete 2.0.23 → 2.0.26
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.
- package/README.md +12 -5
- package/dist/cjs/{index-53e78fc8.js → index-d74cbc0d.js} +33 -2
- package/dist/cjs/index-d74cbc0d.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/my-backdrop_8.cjs.entry.js +1651 -1286
- package/dist/cjs/my-backdrop_8.cjs.entry.js.map +1 -1
- package/dist/cjs/pallete.cjs.js +2 -2
- package/dist/cjs/pallete.cjs.js.map +1 -1
- package/dist/collection/components/my-backdrop/my-backdrop.css +7 -0
- package/dist/collection/components/my-colorbox/my-colorbox.css +7 -0
- package/dist/collection/components/my-colorinfo/assets/Shape.svg +4 -0
- package/dist/collection/components/my-colorinfo/assets/close.png +0 -0
- package/dist/collection/components/my-colorinfo/assets/shape.png +0 -0
- package/dist/collection/components/my-colorinfo/my-colorinfo.css +350 -0
- package/dist/collection/components/my-colorinfo/my-colorinfo.js +135 -1
- package/dist/collection/components/my-colorinfo/my-colorinfo.js.map +1 -1
- package/dist/collection/components/my-component/my-component.js +68 -1
- package/dist/collection/components/my-component/my-component.js.map +1 -1
- package/dist/collection/components/my-modal/my-modal.css +8 -239
- package/dist/collection/components/my-modal/my-modal.js +42 -2
- package/dist/collection/components/my-modal/my-modal.js.map +1 -1
- package/dist/collection/components/my-search/my-search.css +7 -0
- package/dist/collection/components/my-slider/index.js +9 -6
- package/dist/collection/components/my-slider/index.js.map +1 -1
- package/dist/collection/components/my-slider/my-slider.css +12 -3
- package/dist/collection/types.js.map +1 -1
- package/dist/components/index3.js +10 -7
- package/dist/components/index3.js.map +1 -1
- package/dist/components/my-backdrop2.js +1 -1
- package/dist/components/my-backdrop2.js.map +1 -1
- package/dist/components/my-colorbox2.js +1 -1
- package/dist/components/my-colorbox2.js.map +1 -1
- package/dist/components/my-colorinfo2.js +46 -3
- package/dist/components/my-colorinfo2.js.map +1 -1
- package/dist/components/my-component.js +15 -3
- package/dist/components/my-component.js.map +1 -1
- package/dist/components/my-modal2.js +1589 -1274
- package/dist/components/my-modal2.js.map +1 -1
- package/dist/components/my-search2.js +1 -1
- package/dist/components/my-search2.js.map +1 -1
- package/dist/esm/{index-b0145abf.js → index-45a30349.js} +33 -2
- package/dist/esm/index-45a30349.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/my-backdrop_8.entry.js +1651 -1286
- package/dist/esm/my-backdrop_8.entry.js.map +1 -1
- package/dist/esm/pallete.js +3 -3
- package/dist/esm/pallete.js.map +1 -1
- package/dist/pallete/assets/Shape.svg +4 -0
- package/dist/pallete/assets/shape.png +0 -0
- package/dist/pallete/p-2394bcec.entry.js +2 -0
- package/dist/pallete/p-2394bcec.entry.js.map +1 -0
- package/dist/pallete/p-a3449132.js +3 -0
- package/dist/pallete/p-a3449132.js.map +1 -0
- package/dist/pallete/pallete.css +1 -1
- package/dist/pallete/pallete.esm.js +1 -1
- package/dist/pallete/pallete.esm.js.map +1 -1
- package/dist/types/components/my-colorinfo/my-colorinfo.d.ts +11 -1
- package/dist/types/components/my-component/my-component.d.ts +9 -0
- package/dist/types/components/my-modal/my-modal.d.ts +3 -1
- package/dist/types/components.d.ts +24 -2
- package/dist/types/types.d.ts +4 -0
- package/package.json +5 -4
- package/www/build/assets/Shape.svg +4 -0
- package/www/build/assets/shape.png +0 -0
- package/www/build/p-2394bcec.entry.js +2 -0
- package/www/build/p-2394bcec.entry.js.map +1 -0
- package/www/build/p-a3449132.js +3 -0
- package/www/build/p-a3449132.js.map +1 -0
- package/www/build/p-c5910eb7.js +2 -0
- package/www/build/p-f8a0208d.css +1 -0
- package/www/build/pallete.css +1 -1
- package/www/build/pallete.esm.js +1 -1
- package/www/build/pallete.esm.js.map +1 -1
- package/www/index.html +62 -10
- package/dist/cjs/index-53e78fc8.js.map +0 -1
- package/dist/esm/index-b0145abf.js.map +0 -1
- package/dist/pallete/p-bdb05818.entry.js +0 -2
- package/dist/pallete/p-bdb05818.entry.js.map +0 -1
- package/dist/pallete/p-c6a049a2.js +0 -3
- package/dist/pallete/p-c6a049a2.js.map +0 -1
- package/www/build/p-bdb05818.entry.js +0 -2
- package/www/build/p-bdb05818.entry.js.map +0 -1
- package/www/build/p-c6a049a2.js +0 -3
- package/www/build/p-c6a049a2.js.map +0 -1
- /package/www/{build/assets → assets}/fonts/Galatea-Regular.eot +0 -0
- /package/www/{build/assets → assets}/fonts/Galatea-Regular.ttf +0 -0
- /package/www/{build/assets → assets}/fonts/Galatea-Regular.woff +0 -0
- /package/www/{build/assets → assets}/fonts/Galatea-Regular.woff2 +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, getAssetPath } from '@stencil/core/internal/client';
|
|
2
2
|
import { s as setDataLayer } from './gtmUtils.js';
|
|
3
3
|
|
|
4
|
-
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{font-size:16px;padding:19px;border-radius:27.35px;border:1px solid #dfdfdf;width:100%;color:#4c4c4c}.search.sc-my-search button.sc-my-search{position:absolute;border:none;background-color:transparent;right:10px;top:0;width:50px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer}";
|
|
4
|
+
const mySearchCss = "@font-face{font-family:\"Galatea\";src:url(\"/assets/fonts/Galatea-Regular.woff2\") format(\"woff2\"), url(\"/assets/fonts/Galatea-Regular.woff\") format(\"woff\"), url(\"/assets/fonts/Galatea-Regular.ttf\") format(\"truetype\");font-weight:normal;font-style:normal;font-display:swap}.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{font-size:16px;padding:19px;border-radius:27.35px;border:1px solid #dfdfdf;width:100%;color:#4c4c4c}.search.sc-my-search button.sc-my-search{position:absolute;border:none;background-color:transparent;right:10px;top:0;width:50px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer}";
|
|
5
5
|
|
|
6
6
|
function debounce(func, wait) {
|
|
7
7
|
let timeout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"my-search2.js","mappings":";;;AAAA,MAAM,WAAW,GAAG,
|
|
1
|
+
{"file":"my-search2.js","mappings":";;;AAAA,MAAM,WAAW,GAAG,i1BAAi1B;;ACGr2B,SAAS,QAAQ,CAAC,IAAc,EAAE,IAAY;EAC5C,IAAI,OAAsC,CAAC;EAC3C,OAAO,SAAS,gBAAgB,CAAC,GAAG,IAAW;IAC7C,MAAM,KAAK,GAAG;MACZ,YAAY,CAAC,OAAO,CAAC,CAAC;MACtB,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;KACf,CAAC;IACF,YAAY,CAAC,OAAO,CAAC,CAAC;IACtB,OAAO,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;GACnC,CAAC;AACJ,CAAC;MAQY,QAAQ;;;;;IAQnB,sBAAiB,GAAG,CAAC,IAAY;MAC/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC9B,CAAC;IAEM,8BAAyB,GAAG,QAAQ,CAAC,CAAC,KAAa;MACzD,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;MAC9B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;KACzB,EAAE,GAAG,CAAC,CAAC;;;;sBAXa,YAAY;sBACI,IAAI;;EAYjC,kBAAkB,CAAC,KAAY;IACrC,MAAM,KAAK,GAAI,KAAK,CAAC,MAA2B,CAAC,KAAK,CAAC;IACvD,IAAI,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC;GACvC;EAGD,uBAAuB,CAAC,QAAgB;IACtC,IAAI,QAAQ,CAAC,MAAM,IAAI,CAAC,EAAE;MACxB,YAAY,CAAC;QACX,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,IAAI,CAAC,QAAQ;QACnB,OAAO,EAAE,IAAI,CAAC,WAAW;QACzB,WAAW,EAAE,QAAQ;OACtB,CAAC,CAAC;KACJ;IAED,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;GAClC;EAGD,sBAAsB;IACpB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;GACxB;EAED,MAAM;IACJ,QACE,WAAK,KAAK,EAAE,QAAQ,IAClB,aAAO,WAAW,EAAE,IAAI,CAAC,QAAQ,GAAG,gBAAgB,GAAG,0BAA0B,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE,EAAE,IAAI,EAAC,MAAM,EAAC,OAAO,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAI,EAE5K,cACE,OAAO,EAAE;QACP,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAE3D,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;OACtB,IAED,WAAK,GAAG,EAAE,YAAY,CAAC,YAAY,IAAI,CAAC,UAAU,EAAE,CAAC,EAAE,GAAG,EAAC,YAAY,GAAG,CACnE,CACL,EACN;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/my-search/my-search.scss?tag=my-search&encapsulation=scoped","./src/components/my-search/my-search.tsx"],"sourcesContent":["@import '../../global/app.scss';\n\n.search {\n position: relative;\n width: 400px;\n @media (max-width: $small) {\n width: 100%;\n }\n input {\n font-size: 16px;\n padding: 19px;\n border-radius: 27.35px;\n border: 1px solid #dfdfdf;\n width: 100%;\n color: #4c4c4c;\n }\n\n button {\n position: absolute;\n border: none;\n background-color: transparent;\n right: 10px;\n top: 0;\n width: 50px;\n height: calc(100%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n}\n","import { Component, Prop, h, State, Listen, getAssetPath, EventEmitter, Event, Watch } from '@stencil/core';\nimport { setDataLayer } from '../../gtmUtils';\n\nfunction debounce(func: Function, wait: number) {\n let timeout: ReturnType<typeof setTimeout>;\n return function executedFunction(...args: any[]) {\n const later = () => {\n clearTimeout(timeout);\n func(...args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n };\n}\n\n@Component({\n tag: 'my-search',\n styleUrl: 'my-search.scss',\n assetsDirs: ['assets'],\n scoped: true,\n})\nexport class MySearch {\n @Prop() productname: string;\n @Prop() shopname: string;\n @Prop() isMobile: boolean;\n @Prop() searchIcon = 'search.svg';\n @State() searchText: string | null = null;\n @Event() searchColors: EventEmitter;\n\n fetchColorsByName = (text: string) => {\n this.searchColors.emit(text);\n };\n\n private debouncedInputChangeValue = debounce((value: string) => {\n this.fetchColorsByName(value);\n this.searchText = value;\n }, 500);\n\n private onInputChangeValue(event: Event) {\n const value = (event.target as HTMLInputElement).value;\n this.debouncedInputChangeValue(value);\n }\n\n @Watch('searchText')\n fetchColorsByNameHandle(newValue: string) {\n if (newValue.length >= 3) {\n setDataLayer({\n event: 'ColorSearch',\n shop: this.shopname,\n product: this.productname,\n search_term: newValue,\n });\n }\n\n this.fetchColorsByName(newValue);\n }\n\n @Listen('clearSearchText', { target: 'document' })\n clearSearchTextHandler() {\n this.searchText = null;\n }\n\n render() {\n return (\n <div class={'search'}>\n <input placeholder={this.isMobile ? 'Wyszukaj kolor' : 'Wyszukaj kolor po nazwie'} value={this.searchText || ''} type=\"text\" onInput={this.onInputChangeValue.bind(this)} />\n\n <button\n onClick={() => {\n this.searchText && this.fetchColorsByName(this.searchText);\n\n this.searchText = '';\n }}\n >\n <img src={getAssetPath(`./assets/${this.searchIcon}`)} alt=\"arrow_down\" />\n </button>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -38,6 +38,11 @@ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
|
38
38
|
* Don't add values to these!!
|
|
39
39
|
*/
|
|
40
40
|
const EMPTY_OBJ = {};
|
|
41
|
+
/**
|
|
42
|
+
* Namespaces
|
|
43
|
+
*/
|
|
44
|
+
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
45
|
+
const HTML_NS = 'http://www.w3.org/1999/xhtml';
|
|
41
46
|
const isDef = (v) => v != null;
|
|
42
47
|
/**
|
|
43
48
|
* Check whether a value is a 'complex type', defined here as an object or a
|
|
@@ -539,8 +544,15 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
539
544
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
540
545
|
}
|
|
541
546
|
else {
|
|
547
|
+
if (!isSvgMode) {
|
|
548
|
+
isSvgMode = newVNode.$tag$ === 'svg';
|
|
549
|
+
}
|
|
542
550
|
// create element
|
|
543
|
-
elm = newVNode.$elm$ = (doc.
|
|
551
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
|
|
552
|
+
);
|
|
553
|
+
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
554
|
+
isSvgMode = false;
|
|
555
|
+
}
|
|
544
556
|
// add css classes, attrs, props, listeners, etc.
|
|
545
557
|
{
|
|
546
558
|
updateElement(null, newVNode, isSvgMode);
|
|
@@ -561,6 +573,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
561
573
|
}
|
|
562
574
|
}
|
|
563
575
|
}
|
|
576
|
+
{
|
|
577
|
+
if (newVNode.$tag$ === 'svg') {
|
|
578
|
+
// Only reset the SVG context when we're exiting <svg> element
|
|
579
|
+
isSvgMode = false;
|
|
580
|
+
}
|
|
581
|
+
else if (elm.tagName === 'foreignObject') {
|
|
582
|
+
// Reenter SVG context when we're exiting <foreignObject> element
|
|
583
|
+
isSvgMode = true;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
564
586
|
}
|
|
565
587
|
return elm;
|
|
566
588
|
};
|
|
@@ -863,8 +885,14 @@ const patch = (oldVNode, newVNode) => {
|
|
|
863
885
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
864
886
|
const oldChildren = oldVNode.$children$;
|
|
865
887
|
const newChildren = newVNode.$children$;
|
|
888
|
+
const tag = newVNode.$tag$;
|
|
866
889
|
const text = newVNode.$text$;
|
|
867
890
|
if (text === null) {
|
|
891
|
+
{
|
|
892
|
+
// test if we're rendering an svg element, or still rendering nodes inside of one
|
|
893
|
+
// only add this to the when the compiler sees we're using an svg somewhere
|
|
894
|
+
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
895
|
+
}
|
|
868
896
|
{
|
|
869
897
|
{
|
|
870
898
|
// either this is the first render of an element OR it's an update
|
|
@@ -891,6 +919,9 @@ const patch = (oldVNode, newVNode) => {
|
|
|
891
919
|
// no new child vnodes, but there are old child vnodes to remove
|
|
892
920
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
893
921
|
}
|
|
922
|
+
if (isSvgMode && tag === 'svg') {
|
|
923
|
+
isSvgMode = false;
|
|
924
|
+
}
|
|
894
925
|
}
|
|
895
926
|
else if (oldVNode.$text$ !== text) {
|
|
896
927
|
// update the text content for the text only vnode
|
|
@@ -1631,4 +1662,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
|
1631
1662
|
|
|
1632
1663
|
export { getElement as a, bootstrapLazy as b, createEvent as c, getAssetPath as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1633
1664
|
|
|
1634
|
-
//# sourceMappingURL=index-
|
|
1665
|
+
//# sourceMappingURL=index-45a30349.js.map
|