@assaabloy/amarr-wc-color-list 2.0.13 → 2.0.16
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/color-list.js +1 -1
- package/package.json +2 -2
package/color-list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){function t(t){for(var a,i,l=t[0],c=t[1],d=t[2],u=0,m=[];u<l.length;u++)i=l[u],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&m.push(o[i][0]),o[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(s&&s(t);m.length;)m.shift()();return r.push.apply(r,d||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],a=!0,l=1;l<n.length;l++){var c=n[l];0!==o[c]&&(a=!1)}a&&(r.splice(t--,1),e=i(i.s=n[0]))}return e}var a={},o={11:0},r=[];function i(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=a,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/";var l=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],c=l.push.bind(l);l.push=t,l=l.slice();for(var d=0;d<l.length;d++)t(l[d]);var s=c;r.push([472,0]),n()}({0:function(e,t){e.exports=React},1:function(e,t,n){"use strict";n.d(t,"g",(function(){return o})),n.d(t,"T",(function(){return r})),n.d(t,"i",(function(){return i})),n.d(t,"C",(function(){return l})),n.d(t,"F",(function(){return c})),n.d(t,"u",(function(){return d})),n.d(t,"A",(function(){return s})),n.d(t,"n",(function(){return u})),n.d(t,"q",(function(){return m})),n.d(t,"H",(function(){return p})),n.d(t,"G",(function(){return f})),n.d(t,"O",(function(){return h})),n.d(t,"D",(function(){return g})),n.d(t,"t",(function(){return b})),n.d(t,"h",(function(){return w})),n.d(t,"s",(function(){return v})),n.d(t,"x",(function(){return x})),n.d(t,"v",(function(){return y})),n.d(t,"B",(function(){return E})),n.d(t,"r",(function(){return N})),n.d(t,"P",(function(){return O})),n.d(t,"p",(function(){return k})),n.d(t,"I",(function(){return j})),n.d(t,"E",(function(){return A})),n.d(t,"Q",(function(){return z})),n.d(t,"l",(function(){return _})),n.d(t,"j",(function(){return D})),n.d(t,"m",(function(){return L})),n.d(t,"k",(function(){return M})),n.d(t,"y",(function(){return I})),n.d(t,"K",(function(){return Z})),n.d(t,"w",(function(){return P})),n.d(t,"R",(function(){return R})),n.d(t,"S",(function(){return $})),n.d(t,"b",(function(){return H})),n.d(t,"N",(function(){return T})),n.d(t,"z",(function(){return U})),n.d(t,"a",(function(){return B})),n.d(t,"d",(function(){return F})),n.d(t,"f",(function(){return J})),n.d(t,"e",(function(){return V})),n.d(t,"V",(function(){return W})),n.d(t,"c",(function(){return G})),n.d(t,"U",(function(){return q})),n.d(t,"J",(function(){return K})),n.d(t,"L",(function(){return Q})),n.d(t,"M",(function(){return X})),n.d(t,"o",(function(){return Y}));var a=n(3),o=function(e){return JSON.parse(decodeURIComponent(escape(atob(e))))},r=function(e){return btoa(unescape(encodeURIComponent(e)))},i=function(e){return e.toUpperCase()},l=function(e){return e.replaceAll(" ","-").toLowerCase()},c=new a.a(!1),d=new a.a(!1),s=new a.a(!1),u=new a.a(!1),m=new a.a(""),p=new a.a(!1),f=new a.a(!1),h=new a.a(!1),g=new a.a(!1),b=new a.a(!1),w=new a.a(!1),v=new a.a(""),x=new a.a(!0),y=new a.a(!0),E=new a.a(!0),N=new a.a(!0),O=new a.a(!0),k=new a.a(!0),j=new a.a({}),S=new a.a(!1),C=0,A=new a.a(!1),z=new a.a(""),_=new a.a(""),D=new a.a(""),L=new a.a(""),M=new a.a(""),I=new a.a(""),Z=new a.a(""),P=new a.a(!1),R=new a.a(!1),$=new a.a(!1),H=function(){setTimeout((function(){C++,S.next(!0)}),0)},T=function(){setTimeout((function(){C>0&&C--,0==C&&S.next(!1)}),0)},U=function(){return S.asObservable()},B=function(e){return!!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},F=function(e){return e.match(/^[a-zA-Z\xc0-\xff-. ]*$/)},J=function(e){return/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e)},V=function(e){return/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e)},W=function(e){return/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/.test(e)},G=function(e){return/^[0-9]*$/.test(e)},q=function(e){return!!/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e)},K=function(e){if(e&&""!==e&&-1===e.indexOf("(")&&-1===e.indexOf(") ")&&-1===e.indexOf("-")){return"("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6,e.length)}return e},Q=function(e){return e&&(e=e.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==e&&"0"!==e||(e=e.toFixed(2)),e},X=function(e,t){return e=e?Number(e):0,(0===(t=t?Number(t):0)||"0"===t?0:(e-t)/t*100).toFixed(2)},Y=function(e){var t={tabs:!0,type:"designer",clavos:!1,download:!0,quote:!0,srcUrl:"/DoorApp",id:"AmarrDoorDesigner",panel:e.selectedPanel,brand:"",myGuid:"d-608280c6f378f8.36911414",email:!0,height:e.selectedHeight,glass:e.selectedGlass,collection:e.selectedCollection,print:!0,baseUrl:"",gplacement:e.selectedWindowPlacement,width:e.selectedWidth,srcDir:"DoorApp",MosaicName:"Mosaic",logooption:""};return e.selectedColor&&(t.color=e.selectedColor),e.colorHex&&(t.colorHex=e.colorHex),e.colorZone&&(t.colorZone=e.colorZone),e.selectedConstruction&&(t.model=e.selectedConstruction),e.selectedWindowDesign&&(t.top=e.selectedWindowDesign),e.glazepattern&&(t.glazepattern=e.glazepattern),e.selectedHardware&&(t.hardware=e.selectedHardware),t}},17:function(e,t){e.exports=ReactDOM},381:function(e,t,n){"use strict";n.r(t);var a=n(13),o=n(78);t.default=a.a.create({component:o.a,configuration:{tagname:"amarr-color-list",useShadow:!1},plugins:[]})},5:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(22),o=n(0),r=n.n(o),i=n(4),l=i.default.div.withConfig({displayName:"styles__View",componentId:"sc-1jt3i0i-0"})([""]),c=i.default.button.withConfig({displayName:"styles__Button",componentId:"sc-1jt3i0i-1"})(['font-size:12px;font-family:"Open Sans";font-weight:600;font-stretch:normal;font-style:normal;line-height:1.5;letter-spacing:normal;text-align:center;color:#fff;padding:12px 19px 12px 20px;border-radius:4px;background-color:#006166;box-shadow:none;border:none;transition:all ease 300ms;&:hover{transform:scale(1.1);background-color:#338084;color:#fff;}&:focus{transform:scale(1);box-shadow:none !important;background-color:#004347;}&:active{background-color:#006166 !important;box-shadow:none !important;transform:scale(1);border:none !important;}&.btn-inverse{color:#333333;background:#b2cfd1;&:hover{background:#8EB8BB;}&:focus{background:#8EA5A7;border:none;transform:scale(1);box-shadow:none !important;}&:active{background-color:#8EA5A7 !important;border:none !important;transform:scale(1.1);box-shadow:none !important;}}@media(min-width:1201px){font-size:16px;}.button-icon{vertical-align:top;padding-right:8px;}']),d=n(19),s=n(18),u=function(e){var t=e.label,n=void 0===t?"label":t,o=e.classStyle,i=void 0===o?"default":o,u=e.link,m=void 0!==u&&u,p=e.disabled,f=void 0!==p&&p,h=e.datatoggle,g=void 0===h?"":h,b=e.datatarget,w=void 0===b?"":b,v=e.linkHref,x=e.target,y=void 0===x?"_self":x,E=e.downloadLink,N=void 0!==E&&E,O=e.inverse,k=void 0!==O&&O,j=e.icon,S=void 0===j?"":j,C=e.iconAlt,A=void 0===C?"":C,z=e.dataItemName,_=void 0===z?"":z,D=e.id,L=void 0===D?"":D,M=e.type,I=void 0===M?"button":M,Z=e.showDisabledMessage,P=void 0===Z?"":Z,R=Object(a.a)(e,["label","classStyle","link","disabled","datatoggle","datatarget","linkHref","target","downloadLink","inverse","icon","iconAlt","dataItemName","id","type","showDisabledMessage"]);return r.a.createElement(l,null,r.a.createElement("div",{className:"".concat(f&&P&&"disabled-button-parent")},m?r.a.createElement("a",{href:v,download:N,target:y,"data-item-name":_,id:L},r.a.createElement(c,Object.assign({disabled:f,classStyle:"".concat(i)},R,{type:I,className:k?"btn-inverse btn btn-success":"btn btn-success"}),""!=S?r.a.createElement("div",{"data-toggle":g,"data-target":w},r.a.createElement("img",{className:"button-icon",src:S,alt:A}),r.a.createElement("span",null,n)):r.a.createElement("span",null,n))):r.a.createElement(c,Object.assign({disabled:f,classStyle:i,className:k?"btn-inverse btn btn-success":"btn btn-success",id:L,"data-item-name":_,type:I},R),r.a.createElement("span",null,n)),f&&P&&r.a.createElement(d.a,{placement:"top",delay:{show:250,hide:250},overlay:r.a.createElement(s.a,{id:"button-tooltip"},r.a.createElement("div",{className:"p-1 amarr-h6"},P))},r.a.createElement("div",{className:"disabled-button-overlay"}))))}},78:function(e,t,n){"use strict";var a=n(2),o=n(0),r=n.n(o),i=n(4),l=i.default.section.withConfig({displayName:"styles__Content",componentId:"sc-1imynuy-0"})([".color-page-des{padding-bottom:28px;}.section-heading-color{padding-bottom:20px;}@media screen and (max-width:767px){.section-heading-color{padding-bottom:8px;}.color-list-mobile:nth-child(odd){padding-right:11px !important;}.color-list-mobile:nth-child(even){padding-left:11px !important;}}"]),c=n(1),d=i.default.section.withConfig({displayName:"styles__Content",componentId:"sc-2gyuc7-0"})([".modal{&-dialog{&-centered{display:flex;align-items:center;justify-content:center;height:100%;margin-top:0px;margin-bottom:0px;@media(min-width:1280px){width:700px;}}}.close{font-size:30px;color:#333;cursor:pointer;@media(min-width:1681px){font-size:40px;}}&-body{max-height:80vh;overflow-y:auto;}}.tile-container{padding-bottom:36px;}.color-name{margin-top:18px;}.hover-div{display:none;}.color-tile{border-radius:4px;height:calc(18vw);display:flex;justify-content:center;align-items:center;}.color-tile:hover{.hover-div{display:block;text-align:center;}.product-img{opacity:40%;}}button{width:calc(100%);opacity:70%;word-wrap:break-word;white-space:normal;}button:hover{opacity:100%;transform:scale(1) !important;}li{display:inline;}.modal-body{padding-top:0px;}.modal-header{border-bottom:0px;}@media (min-width:1600px){.modal-dialog{max-width:calc(56%) !important;}}.modal-header button{width:auto;}.padding-tile{display:flex;column-gap:20px;}.font-weight-semi{font-weight:600;}.show-more{width:100%;height:100%;display:flex;justify-content:center;align-items:center;cursor:pointer;}@media (max-width:1024px){button{width:80%;height:auto;}}@media screen and (max-width:767px){.color-tile{height:calc(38vw);}.tile-container{padding-bottom:20px;}.color-name{text-align:center;margin-top:8px;}.door-images{flex-wrap:wrap;gap:20px;li{flex:0 0 46%;}}}@media (min-width:1921px){.color-tile{height:346px !important;}}"]),s=n(5),u=function(e){var t=e.item,n=e.viewMoreLabel,i=e.ctaLabel,l=e.modelDescription,u=e.showOneRowOnly,m=e.index,p=e.onShowMoreClick,f=Object(o.useState)(!1),h=Object(a.a)(f,2),g=h[0],b=h[1];Object(o.useEffect)((function(){u&&b(!0)}),[]);return r.a.createElement(d,null,r.a.createElement("div",{className:"tile-container"},r.a.createElement("div",{className:"color-tile",style:t.colorImage?{backgroundImage:"url("+t.colorImage+")",backgroundRepeat:"no-repeat",backgroundSize:"cover"}:{backgroundColor:"#"+t.hexCode}},(g&&3!==m||!g)&&r.a.createElement("div",{className:"hover-div"},r.a.createElement("span",{"data-toggle":"modal","data-target":"#colortile-popup-".concat(t.colorValue)},r.a.createElement(s.a,{label:Object(c.i)(i),link:!0,dataItemName:t.colorTitle}))),g&&3===m&&r.a.createElement("a",{className:"show-more",onClick:function(e){b(!1),p(!0)},"aria-label":"Show more",role:"button"},r.a.createElement("span",null,n))),r.a.createElement("div",{className:"color-name body-text1 amarr-h5"},t.colorTitle),r.a.createElement("div",{className:"modal fade",id:"colortile-popup-".concat(t.colorValue),role:"dialog","aria-hidden":"true"},r.a.createElement("div",{className:"modal-dialog modal-dialog-centered modal-dialog-scrollable",role:"document"},r.a.createElement("div",{className:"modal-content"},r.a.createElement("div",{className:"modal-header"},r.a.createElement("div",{className:"amarr-h4"},t.colorTitle),r.a.createElement("button",{type:"button",className:"close cursor-pointer","data-dismiss":"modal","aria-label":"Close"},r.a.createElement("span",{"aria-hidden":"true"},"\xd7"))),r.a.createElement("div",{className:"modal-body"},r.a.createElement("div",{className:"mb-4 pb-2 body-text1"},l),r.a.createElement("ul",{className:"text-center padding-tile ml-0 door-images"},t.doors&&t.doors.length>0&&t.doors.map((function(e,t){return r.a.createElement("li",null,r.a.createElement("img",{src:e.url,alt:e.altText}))})))))))))},m=function(e){var t=e.colorListData,n=Object(c.g)(t),i=Object(o.useState)([]),d=Object(a.a)(i,2),s=d[0],m=d[1];function p(e){var t;t=n.colorList,m(t)}return Object(o.useEffect)((function(){var e;n.showOneRowOnly?(e=n.colorList.splice(0,4),m(e)):(e=n.colorList,m(e))}),[]),r.a.createElement(l,null,r.a.createElement("div",{className:"container"},r.a.createElement("div",{className:"section-heading-color text-center"},"h1"===n.headingStyle&&r.a.createElement("h1",{className:"heading-style-1"},n.header&&n.header.text),"h2"===n.headingStyle&&r.a.createElement("h2",{className:"heading-style-1"},n.header&&n.header.text),"h3"===n.headingStyle&&r.a.createElement("h3",{className:"heading-style-1"},n.header&&n.header.text),"h4"===n.headingStyle&&r.a.createElement("h4",{className:"heading-style-1"},n.header&&n.header.text),"h5"===n.headingStyle&&r.a.createElement("h5",{className:"heading-style-1"},n.header&&n.header.text),"h6"===n.headingStyle&&r.a.createElement("h6",{className:"heading-style-1"},n.header&&n.header.text)),r.a.createElement("div",{className:"row"},s&&s.length>0&&s.map((function(e,t){return r.a.createElement("div",{className:"col-md-3 col-6 color-list-mobile",key:t},r.a.createElement(u,{item:e,index:t,showOneRowOnly:n.showOneRowOnly,viewMoreLabel:n.viewMoreLabel.replace("{count}",(n.colorList.length-4).toString()),ctaLabel:n.ctaLabel,modelDescription:n.modelDescription,onShowMoreClick:p}))})))))};m.defaultProps={theme:"",colorListData:""};t.a=m}});
|
|
1
|
+
!function(e){function t(t){for(var a,i,l=t[0],c=t[1],d=t[2],u=0,m=[];u<l.length;u++)i=l[u],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&m.push(o[i][0]),o[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(s&&s(t);m.length;)m.shift()();return r.push.apply(r,d||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],a=!0,l=1;l<n.length;l++){var c=n[l];0!==o[c]&&(a=!1)}a&&(r.splice(t--,1),e=i(i.s=n[0]))}return e}var a={},o={11:0},r=[];function i(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=a,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/";var l=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],c=l.push.bind(l);l.push=t,l=l.slice();for(var d=0;d<l.length;d++)t(l[d]);var s=c;r.push([800,0]),n()}({0:function(e,t){e.exports=React},1:function(e,t,n){"use strict";n.d(t,"g",(function(){return o})),n.d(t,"U",(function(){return r})),n.d(t,"i",(function(){return i})),n.d(t,"D",(function(){return l})),n.d(t,"G",(function(){return c})),n.d(t,"v",(function(){return d})),n.d(t,"B",(function(){return s})),n.d(t,"o",(function(){return u})),n.d(t,"r",(function(){return m})),n.d(t,"I",(function(){return p})),n.d(t,"H",(function(){return f})),n.d(t,"P",(function(){return h})),n.d(t,"E",(function(){return g})),n.d(t,"u",(function(){return b})),n.d(t,"h",(function(){return w})),n.d(t,"t",(function(){return v})),n.d(t,"y",(function(){return x})),n.d(t,"w",(function(){return y})),n.d(t,"C",(function(){return E})),n.d(t,"s",(function(){return N})),n.d(t,"Q",(function(){return O})),n.d(t,"q",(function(){return k})),n.d(t,"J",(function(){return j})),n.d(t,"F",(function(){return z})),n.d(t,"R",(function(){return A})),n.d(t,"m",(function(){return _})),n.d(t,"j",(function(){return D})),n.d(t,"n",(function(){return L})),n.d(t,"k",(function(){return M})),n.d(t,"l",(function(){return I})),n.d(t,"z",(function(){return Z})),n.d(t,"L",(function(){return P})),n.d(t,"x",(function(){return R})),n.d(t,"S",(function(){return $})),n.d(t,"T",(function(){return H})),n.d(t,"b",(function(){return T})),n.d(t,"O",(function(){return U})),n.d(t,"A",(function(){return B})),n.d(t,"a",(function(){return W})),n.d(t,"d",(function(){return F})),n.d(t,"f",(function(){return J})),n.d(t,"e",(function(){return V})),n.d(t,"W",(function(){return G})),n.d(t,"c",(function(){return q})),n.d(t,"V",(function(){return K})),n.d(t,"K",(function(){return Q})),n.d(t,"M",(function(){return X})),n.d(t,"N",(function(){return Y})),n.d(t,"p",(function(){return ee}));var a=n(3),o=function(e){return JSON.parse(decodeURIComponent(escape(atob(e))))},r=function(e){return btoa(unescape(encodeURIComponent(e)))},i=function(e){return e.toUpperCase()},l=function(e){return e.replaceAll(" ","-").toLowerCase()},c=new a.a(!1),d=new a.a(!1),s=new a.a(!1),u=new a.a(!1),m=new a.a(""),p=new a.a(!1),f=new a.a(!1),h=new a.a(!1),g=new a.a(!1),b=new a.a(!1),w=new a.a(!1),v=new a.a(""),x=new a.a(!0),y=new a.a(!0),E=new a.a(!0),N=new a.a(!0),O=new a.a(!0),k=new a.a(!0),j=new a.a({}),S=new a.a(!1),C=0,z=new a.a(!1),A=new a.a(""),_=new a.a(""),D=new a.a(""),L=new a.a(""),M=new a.a(""),I=new a.a(""),Z=new a.a(""),P=new a.a(""),R=new a.a(!1),$=new a.a(!1),H=new a.a(!1),T=function(){setTimeout((function(){C++,S.next(!0)}),0)},U=function(){setTimeout((function(){C>0&&C--,0==C&&S.next(!1)}),0)},B=function(){return S.asObservable()},W=function(e){return!!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},F=function(e){return e.match(/^[a-zA-Z\xc0-\xff-. ]*$/)},J=function(e){return/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e)},V=function(e){return/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e)},G=function(e){return/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/.test(e)},q=function(e){return/^[0-9]*$/.test(e)},K=function(e){return!!/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e)},Q=function(e){if(e&&""!==e&&-1===e.indexOf("(")&&-1===e.indexOf(") ")&&-1===e.indexOf("-")){return"("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6,e.length)}return e},X=function(e){return e&&(e=e.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==e&&"0"!==e||(e=e.toFixed(2)),e},Y=function(e,t){return e=e?Number(e):0,(0===(t=t?Number(t):0)||"0"===t?0:(e-t)/t*100).toFixed(2)},ee=function(e){var t={tabs:!0,type:"designer",clavos:!1,download:!0,quote:!0,srcUrl:"/DoorApp",id:"AmarrDoorDesigner",panel:e.selectedPanel,brand:"",myGuid:"d-608280c6f378f8.36911414",email:!0,height:e.selectedHeight,glass:e.selectedGlass,collection:e.selectedCollection,print:!0,baseUrl:"",gplacement:e.selectedWindowPlacement,width:e.selectedWidth,srcDir:"DoorApp",MosaicName:"Mosaic",logooption:""};return e.selectedColor&&(t.color=e.selectedColor),e.colorHex&&(t.colorHex=e.colorHex),e.colorZone&&(t.colorZone=e.colorZone),e.selectedConstruction&&(t.model=e.selectedConstruction),e.selectedWindowDesign&&(t.top=e.selectedWindowDesign),e.glazepattern&&(t.glazepattern=e.glazepattern),e.selectedHardware&&(t.hardware=e.selectedHardware),t}},19:function(e,t){e.exports=ReactDOM},5:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(22),o=n(0),r=n.n(o),i=n(4),l=i.default.div.withConfig({displayName:"styles__View",componentId:"sc-1jt3i0i-0"})([""]),c=i.default.button.withConfig({displayName:"styles__Button",componentId:"sc-1jt3i0i-1"})(['font-size:12px;font-family:"Open Sans";font-weight:600;font-stretch:normal;font-style:normal;line-height:1.5;letter-spacing:normal;text-align:center;color:#fff;padding:12px 19px 12px 20px;border-radius:4px;background-color:#006166;box-shadow:none;border:none;transition:all ease 300ms;&:hover{transform:scale(1.1);background-color:#338084;color:#fff;}&:focus{transform:scale(1);box-shadow:none !important;background-color:#004347;}&:active{background-color:#006166 !important;box-shadow:none !important;transform:scale(1);border:none !important;}&.btn-inverse{color:#333333;background:#b2cfd1;&:hover{background:#8EB8BB;}&:focus{background:#8EA5A7;border:none;transform:scale(1);box-shadow:none !important;}&:active{background-color:#8EA5A7 !important;border:none !important;transform:scale(1.1);box-shadow:none !important;}}@media(min-width:1201px){font-size:16px;}.button-icon{vertical-align:top;padding-right:8px;}']),d=n(18),s=n(17),u=function(e){var t=e.label,n=void 0===t?"label":t,o=e.classStyle,i=void 0===o?"default":o,u=e.link,m=void 0!==u&&u,p=e.disabled,f=void 0!==p&&p,h=e.datatoggle,g=void 0===h?"":h,b=e.datatarget,w=void 0===b?"":b,v=e.linkHref,x=e.target,y=void 0===x?"_self":x,E=e.downloadLink,N=void 0!==E&&E,O=e.inverse,k=void 0!==O&&O,j=e.icon,S=void 0===j?"":j,C=e.iconAlt,z=void 0===C?"":C,A=e.dataItemName,_=void 0===A?"":A,D=e.id,L=void 0===D?"":D,M=e.type,I=void 0===M?"button":M,Z=e.showDisabledMessage,P=void 0===Z?"":Z,R=Object(a.a)(e,["label","classStyle","link","disabled","datatoggle","datatarget","linkHref","target","downloadLink","inverse","icon","iconAlt","dataItemName","id","type","showDisabledMessage"]);return r.a.createElement(l,null,r.a.createElement("div",{className:"".concat(f&&P&&"disabled-button-parent")},m?r.a.createElement("a",{href:v,download:N,target:y,"data-item-name":_,id:L},r.a.createElement(c,Object.assign({disabled:f,classStyle:"".concat(i)},R,{type:I,className:k?"btn-inverse btn btn-success":"btn btn-success"}),""!=S?r.a.createElement("div",{"data-toggle":g,"data-target":w},r.a.createElement("img",{loading:"lazy",className:"button-icon",src:S,alt:z}),r.a.createElement("span",null,n)):r.a.createElement("span",null,n))):r.a.createElement(c,Object.assign({disabled:f,classStyle:i,className:k?"btn-inverse btn btn-success":"btn btn-success",id:L,"data-item-name":_,type:I},R),r.a.createElement("span",null,n)),f&&P&&r.a.createElement(d.a,{placement:"top",delay:{show:250,hide:250},overlay:r.a.createElement(s.a,{id:"button-tooltip"},r.a.createElement("div",{className:"p-1 amarr-h6"},P))},r.a.createElement("div",{className:"disabled-button-overlay"}))))}},707:function(e,t,n){"use strict";n.r(t);var a=n(14),o=n(79);t.default=a.a.create({component:o.a,configuration:{tagname:"amarr-color-list",useShadow:!1},plugins:[]})},79:function(e,t,n){"use strict";var a=n(2),o=n(0),r=n.n(o),i=n(4),l=i.default.section.withConfig({displayName:"styles__Content",componentId:"sc-1imynuy-0"})([".color-page-des{padding-bottom:28px;}.section-heading-color{padding-bottom:20px;}@media screen and (max-width:767px){.section-heading-color{padding-bottom:8px;}.color-list-mobile:nth-child(odd){padding-right:11px !important;}.color-list-mobile:nth-child(even){padding-left:11px !important;}}"]),c=n(1),d=i.default.section.withConfig({displayName:"styles__Content",componentId:"sc-2gyuc7-0"})([".modal{&-dialog{&-centered{display:flex;align-items:center;justify-content:center;height:100%;margin-top:0px;margin-bottom:0px;@media(min-width:1280px){width:700px;}}}.close{font-size:30px;color:#333;cursor:pointer;@media(min-width:1681px){font-size:40px;}}&-body{max-height:80vh;overflow-y:auto;}}.tile-container{padding-bottom:36px;}.color-name{margin-top:18px;}.hover-div{display:none;}.color-tile{border-radius:4px;height:calc(18vw);display:flex;justify-content:center;align-items:center;}.color-tile:hover{.hover-div{display:block;text-align:center;}.product-img{opacity:40%;}}button{width:calc(100%);opacity:70%;word-wrap:break-word;white-space:normal;}button:hover{opacity:100%;transform:scale(1) !important;}li{display:inline;}.modal-body{padding-top:0px;}.modal-header{border-bottom:0px;}@media (min-width:1600px){.modal-dialog{max-width:calc(56%) !important;}}.modal-header button{width:auto;}.padding-tile{display:flex;column-gap:20px;}.font-weight-semi{font-weight:600;}.show-more{width:100%;height:100%;display:flex;justify-content:center;align-items:center;cursor:pointer;}@media (max-width:1024px){button{width:80%;height:auto;}}@media screen and (max-width:767px){.color-tile{height:calc(38vw);}.tile-container{padding-bottom:20px;}.color-name{text-align:center;margin-top:8px;}.door-images{flex-wrap:wrap;gap:20px;li{flex:0 0 46%;}}}@media (min-width:1921px){.color-tile{height:346px !important;}}"]),s=n(5),u=function(e){var t=e.item,n=e.viewMoreLabel,i=e.ctaLabel,l=e.modelDescription,u=e.showOneRowOnly,m=e.index,p=e.onShowMoreClick,f=Object(o.useState)(!1),h=Object(a.a)(f,2),g=h[0],b=h[1];Object(o.useEffect)((function(){u&&b(!0)}),[]);return r.a.createElement(d,null,r.a.createElement("div",{className:"tile-container"},r.a.createElement("div",{className:"color-tile",style:t.colorImage?{backgroundImage:"url("+t.colorImage+")",backgroundRepeat:"no-repeat",backgroundSize:"cover"}:{backgroundColor:"#"+t.hexCode}},(g&&3!==m||!g)&&r.a.createElement("div",{className:"hover-div"},r.a.createElement("span",{"data-toggle":"modal","data-target":"#colortile-popup-".concat(t.colorValue)},r.a.createElement(s.a,{label:Object(c.i)(i),link:!0,dataItemName:t.colorTitle}))),g&&3===m&&r.a.createElement("a",{className:"show-more",onClick:function(e){b(!1),p(!0)},"aria-label":"Show more",role:"button"},r.a.createElement("span",null,n))),r.a.createElement("div",{className:"color-name body-text1 amarr-h5"},t.colorTitle),r.a.createElement("div",{className:"modal fade",id:"colortile-popup-".concat(t.colorValue),role:"dialog","aria-hidden":"true"},r.a.createElement("div",{className:"modal-dialog modal-dialog-centered modal-dialog-scrollable",role:"document"},r.a.createElement("div",{className:"modal-content"},r.a.createElement("div",{className:"modal-header"},r.a.createElement("div",{className:"amarr-h4"},t.colorTitle),r.a.createElement("button",{type:"button",className:"close cursor-pointer","data-dismiss":"modal","aria-label":"Close"},r.a.createElement("span",{"aria-hidden":"true"},"\xd7"))),r.a.createElement("div",{className:"modal-body"},r.a.createElement("div",{className:"mb-4 pb-2 body-text1"},l),r.a.createElement("ul",{className:"text-center padding-tile ml-0 door-images"},t.doors&&t.doors.length>0&&t.doors.map((function(e,t){return r.a.createElement("li",null,r.a.createElement("img",{loading:"lazy",src:e.url,alt:e.altText}))})))))))))},m=function(e){var t=e.colorListData,n=Object(c.g)(t),i=Object(o.useState)([]),d=Object(a.a)(i,2),s=d[0],m=d[1];function p(e){var t;t=n.colorList,m(t)}return Object(o.useEffect)((function(){var e;n.showOneRowOnly?(e=n.colorList.splice(0,4),m(e)):(e=n.colorList,m(e))}),[]),r.a.createElement(l,null,r.a.createElement("div",{className:"container"},r.a.createElement("div",{className:"section-heading-color text-center"},"h1"===n.headingStyle&&r.a.createElement("h1",{className:"heading-style-1"},n.header&&n.header.text),"h2"===n.headingStyle&&r.a.createElement("h2",{className:"heading-style-1"},n.header&&n.header.text),"h3"===n.headingStyle&&r.a.createElement("h3",{className:"heading-style-1"},n.header&&n.header.text),"h4"===n.headingStyle&&r.a.createElement("h4",{className:"heading-style-1"},n.header&&n.header.text),"h5"===n.headingStyle&&r.a.createElement("h5",{className:"heading-style-1"},n.header&&n.header.text),"h6"===n.headingStyle&&r.a.createElement("h6",{className:"heading-style-1"},n.header&&n.header.text)),r.a.createElement("div",{className:"row"},s&&s.length>0&&s.map((function(e,t){return r.a.createElement("div",{className:"col-md-3 col-6 color-list-mobile",key:t},r.a.createElement(u,{item:e,index:t,showOneRowOnly:n.showOneRowOnly,viewMoreLabel:n.viewMoreLabel.replace("{count}",(n.colorList.length-4).toString()),ctaLabel:n.ctaLabel,modelDescription:n.modelDescription,onShowMoreClick:p}))})))))};m.defaultProps={theme:"",colorListData:""};t.a=m}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assaabloy/amarr-wc-color-list",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.16",
|
|
4
4
|
"description": "Web component - Color-list",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "color-list.js",
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
},
|
|
12
12
|
"author": "Nagarro",
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "7bbf0c0df7df5c71c35eea64eb7f8ec7ea230f04"
|
|
15
15
|
}
|