@gem-sdk/components 2.0.0-dev.895 → 2.0.0-dev.898

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.
@@ -1 +1,11 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const config={tag:"Breadcrumb",label:"Breadcrumb",settings:[{id:"setting",controls:[{id:"dataBreadcrumb",type:"input",label:"Data Breadcrumb",info:"Set Breadcrumb items of the component",default:JSON.stringify([{href:"/",title:"Link 1",separator:"/"},{href:"/",title:"Link 2",separator:"/"},{title:"Link 3"}])}]}]};exports.default=config;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const config={tag:"Breadcrumb",label:"Breadcrumb",settings:[{id:"setting",controls:[{id:"dataBreadcrumb",type:"input",label:"Data Breadcrumb",info:"Set Breadcrumb items of the component",default:JSON.stringify([{href:"/",title:"Link 1",separator:"/"},{href:"/",title:"Link 2",separator:"/"},{title:"Link 3"}])},{id:"iconSvg",type:"icon",label:"Separator icon",info:"Choose from list or paste any SVG icon",default:`<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M13.2718 2.54722C13.5879 2.68597 13.7316 3.05467 13.5929 3.37073L7.55181 17.132C7.41306 17.4481 7.04436 17.5918 6.7283 17.4531C6.41224 17.3143 6.26849 16.9456 6.40724 16.6296L12.4483 2.86828C12.5871 2.55221 12.9558 2.40847 13.2718 2.54722Z" fill="white"/>
3
+ </svg>
4
+ `},{id:"background",type:"background",ignoreReRender:!0,allowBackgroundImageAndVideo:!1,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"align",label:"Align",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]},{id:"style",controls:[{id:"iconWidth",type:"input:number",label:"Icon Width",devices:{desktop:{default:16}}},{id:"color",type:"colorpicker",label:"Color",default:{normal:"#595959"},state:{hover:!0,normal:!0}},{id:"spacing",label:"Spacing",type:"input:unit-spacing",units:["px"],devices:{desktop:{default:"4px"}}}]}],ui:[{type:"group",options:{label:"large"},label:{en:"Icon"},controls:[{type:"control",setting:{id:"iconSvg"},layout:"vertical",options:{styleControl:{"max-width":"100%"}}},{type:"control",label:{en:"Size"},setting:{id:"iconWidth"}},{type:"control",label:{en:"Icon color"},setting:{id:"color",state:"normal"}}]},{type:"control",label:{en:"Spacing"},setting:{id:"spacing"}},{type:"control",label:{en:"Background"},options:{label:"large",styleLabel:{marginBottom:"4px"}},setting:{id:"background"},layout:"vertical"},{type:"control",label:{en:"Align"},setting:{id:"align"},options:{label:"large"}}],presets:[{id:"breadcrumb",name:{en:"Breadcrumb"},icon:{desktop:`
5
+ <svg width="76" height="20" viewBox="0 0 76 20" fill="none" xmlns="http://www.w3.org/2000/svg">
6
+ <path d="M1.05682 14V5.27273H2.11364V9.15909H6.76705V5.27273H7.82386V14H6.76705V10.0966H2.11364V14H1.05682ZM12.4624 14.1364C11.8714 14.1364 11.353 13.9957 10.907 13.7145C10.4638 13.4332 10.1172 13.0398 9.86719 12.5341C9.62003 12.0284 9.49645 11.4375 9.49645 10.7614C9.49645 10.0795 9.62003 9.48437 9.86719 8.97585C10.1172 8.46733 10.4638 8.07244 10.907 7.79119C11.353 7.50994 11.8714 7.36932 12.4624 7.36932C13.0533 7.36932 13.5703 7.50994 14.0135 7.79119C14.4595 8.07244 14.8061 8.46733 15.0533 8.97585C15.3033 9.48437 15.4283 10.0795 15.4283 10.7614C15.4283 11.4375 15.3033 12.0284 15.0533 12.5341C14.8061 13.0398 14.4595 13.4332 14.0135 13.7145C13.5703 13.9957 13.0533 14.1364 12.4624 14.1364ZM12.4624 13.233C12.9112 13.233 13.2805 13.1179 13.5703 12.8878C13.8601 12.6577 14.0746 12.3551 14.2138 11.9801C14.353 11.6051 14.4226 11.1989 14.4226 10.7614C14.4226 10.3239 14.353 9.91619 14.2138 9.53835C14.0746 9.16051 13.8601 8.85511 13.5703 8.62216C13.2805 8.3892 12.9112 8.27273 12.4624 8.27273C12.0135 8.27273 11.6442 8.3892 11.3544 8.62216C11.0646 8.85511 10.8501 9.16051 10.7109 9.53835C10.5717 9.91619 10.5021 10.3239 10.5021 10.7614C10.5021 11.1989 10.5717 11.6051 10.7109 11.9801C10.8501 12.3551 11.0646 12.6577 11.3544 12.8878C11.6442 13.1179 12.0135 13.233 12.4624 13.233ZM16.9634 14V7.45455H17.935V8.47727H18.0202C18.1566 8.12784 18.3768 7.85653 18.6808 7.66335C18.9847 7.46733 19.3498 7.36932 19.7759 7.36932C20.2077 7.36932 20.5671 7.46733 20.854 7.66335C21.1438 7.85653 21.3697 8.12784 21.5316 8.47727H21.5998C21.7674 8.1392 22.0188 7.87074 22.354 7.67188C22.6893 7.47017 23.0913 7.36932 23.56 7.36932C24.1452 7.36932 24.6239 7.55256 24.9961 7.91903C25.3683 8.28267 25.5543 8.84943 25.5543 9.61932V14H24.5487V9.61932C24.5487 9.13636 24.4165 8.79119 24.1523 8.58381C23.8881 8.37642 23.5771 8.27273 23.2191 8.27273C22.7589 8.27273 22.4023 8.41193 22.1495 8.69034C21.8967 8.96591 21.7702 9.31534 21.7702 9.73864V14H20.7475V9.51705C20.7475 9.14489 20.6268 8.84517 20.3853 8.6179C20.1438 8.38778 19.8327 8.27273 19.4521 8.27273C19.1907 8.27273 18.9464 8.34233 18.7191 8.48153C18.4947 8.62074 18.3129 8.81392 18.1737 9.06108C18.0373 9.3054 17.9691 9.58807 17.9691 9.90909V14H16.9634ZM30.1374 14.1364C29.5067 14.1364 28.9627 13.9972 28.5053 13.7188C28.0508 13.4375 27.6999 13.0455 27.4528 12.5426C27.2085 12.0369 27.0863 11.4489 27.0863 10.7784C27.0863 10.108 27.2085 9.51705 27.4528 9.00568C27.6999 8.49148 28.0437 8.09091 28.484 7.80398C28.9272 7.5142 29.4442 7.36932 30.0352 7.36932C30.3761 7.36932 30.7127 7.42614 31.0451 7.53977C31.3775 7.65341 31.68 7.83807 31.9528 8.09375C32.2255 8.34659 32.4428 8.68182 32.6048 9.09943C32.7667 9.51705 32.8477 10.0312 32.8477 10.642V11.0682H27.8022V10.1989H31.8249C31.8249 9.82955 31.7511 9.5 31.6033 9.21023C31.4585 8.92045 31.2511 8.69176 30.9812 8.52415C30.7141 8.35653 30.3988 8.27273 30.0352 8.27273C29.6346 8.27273 29.288 8.37216 28.9954 8.57102C28.7056 8.76705 28.4826 9.02273 28.3263 9.33807C28.1701 9.65341 28.092 9.99148 28.092 10.3523V10.9318C28.092 11.4261 28.1772 11.8452 28.3477 12.1889C28.521 12.5298 28.761 12.7898 29.0678 12.9688C29.3746 13.1449 29.7312 13.233 30.1374 13.233C30.4016 13.233 30.6403 13.196 30.8533 13.1222C31.0692 13.0455 31.2553 12.9318 31.4116 12.7812C31.5678 12.6278 31.6886 12.4375 31.7738 12.2102L32.7454 12.483C32.6431 12.8125 32.4712 13.1023 32.2298 13.3523C31.9883 13.5994 31.69 13.7926 31.3349 13.9318C30.9798 14.0682 30.5806 14.1364 30.1374 14.1364Z" fill="#F9F9F9"/>
7
+ <path d="M42.0057 4.86364L39.1932 15.3125H38.2727L41.0852 4.86364H42.0057Z" fill="#F9F9F9"/>
8
+ <path d="M48.0568 14V5.27273H51.0057C51.6903 5.27273 52.25 5.39631 52.6847 5.64347C53.1222 5.88778 53.446 6.21875 53.6562 6.63636C53.8665 7.05398 53.9716 7.51989 53.9716 8.03409C53.9716 8.5483 53.8665 9.01562 53.6562 9.43608C53.4489 9.85653 53.1278 10.1918 52.6932 10.4418C52.2585 10.6889 51.7017 10.8125 51.0227 10.8125H48.9091V9.875H50.9886C51.4574 9.875 51.8338 9.79403 52.1179 9.6321C52.402 9.47017 52.608 9.25142 52.7358 8.97585C52.8665 8.69744 52.9318 8.38352 52.9318 8.03409C52.9318 7.68466 52.8665 7.37216 52.7358 7.09659C52.608 6.82102 52.4006 6.60511 52.1136 6.44886C51.8267 6.28977 51.446 6.21023 50.9716 6.21023H49.1136V14H48.0568ZM57.4638 14.1534C57.049 14.1534 56.6726 14.0753 56.3345 13.919C55.9964 13.7599 55.728 13.5312 55.5291 13.233C55.3303 12.9318 55.2308 12.5682 55.2308 12.142C55.2308 11.767 55.3047 11.4631 55.4524 11.2301C55.6001 10.9943 55.7976 10.8097 56.0447 10.6761C56.2919 10.5426 56.5646 10.4432 56.8629 10.3778C57.1641 10.3097 57.4666 10.2557 57.7706 10.2159C58.1683 10.1648 58.4908 10.1264 58.7379 10.1009C58.9879 10.0724 59.1697 10.0256 59.2834 9.96023C59.3999 9.89489 59.4581 9.78125 59.4581 9.61932V9.58523C59.4581 9.16477 59.343 8.83807 59.1129 8.60511C58.8857 8.37216 58.5405 8.25568 58.0774 8.25568C57.5973 8.25568 57.2209 8.3608 56.9482 8.57102C56.6754 8.78125 56.4837 9.00568 56.3729 9.24432L55.4183 8.90341C55.5888 8.50568 55.8161 8.19602 56.1001 7.97443C56.3871 7.75 56.6996 7.59375 57.0376 7.50568C57.3786 7.41477 57.7138 7.36932 58.0433 7.36932C58.2536 7.36932 58.495 7.39489 58.7678 7.44602C59.0433 7.49432 59.3089 7.59517 59.5646 7.74858C59.8232 7.90199 60.0376 8.13352 60.2081 8.44318C60.3786 8.75284 60.4638 9.16761 60.4638 9.6875V14H59.4581V13.1136H59.407C59.3388 13.2557 59.2251 13.4077 59.0661 13.5696C58.907 13.7315 58.6953 13.8693 58.4311 13.983C58.1669 14.0966 57.8445 14.1534 57.4638 14.1534ZM57.6172 13.25C58.0149 13.25 58.3501 13.1719 58.6229 13.0156C58.8984 12.8594 59.1058 12.6577 59.245 12.4105C59.3871 12.1634 59.4581 11.9034 59.4581 11.6307V10.7102C59.4155 10.7614 59.3217 10.8082 59.1768 10.8509C59.0348 10.8906 58.87 10.9261 58.6825 10.9574C58.4979 10.9858 58.3175 11.0114 58.1413 11.0341C57.968 11.054 57.8274 11.071 57.7195 11.0852C57.4581 11.1193 57.2138 11.1747 56.9865 11.2514C56.7621 11.3253 56.5803 11.4375 56.4411 11.5881C56.3047 11.7358 56.2365 11.9375 56.2365 12.1932C56.2365 12.5426 56.3658 12.8068 56.6243 12.9858C56.8857 13.1619 57.2166 13.25 57.6172 13.25ZM64.9414 16.5909C64.4556 16.5909 64.038 16.5284 63.6886 16.4034C63.3391 16.2812 63.0479 16.1193 62.815 15.9176C62.5849 15.7188 62.4016 15.5057 62.2653 15.2784L63.0664 14.7159C63.1573 14.8352 63.2724 14.9716 63.4116 15.125C63.5508 15.2812 63.7411 15.4162 63.9826 15.5298C64.2269 15.6463 64.5465 15.7045 64.9414 15.7045C65.4698 15.7045 65.9059 15.5767 66.2496 15.321C66.5934 15.0653 66.7653 14.6648 66.7653 14.1193V12.7898H66.68C66.6062 12.9091 66.5011 13.0568 66.3647 13.233C66.2312 13.4062 66.038 13.5611 65.7852 13.6974C65.5352 13.831 65.1971 13.8977 64.771 13.8977C64.2425 13.8977 63.7681 13.7727 63.3477 13.5227C62.93 13.2727 62.5991 12.9091 62.3548 12.4318C62.1133 11.9545 61.9925 11.375 61.9925 10.6932C61.9925 10.0227 62.1104 9.43892 62.3462 8.94176C62.582 8.44176 62.9102 8.0554 63.3306 7.78267C63.7511 7.5071 64.2369 7.36932 64.788 7.36932C65.2141 7.36932 65.5522 7.44034 65.8022 7.58239C66.055 7.72159 66.2482 7.88068 66.3817 8.05966C66.5181 8.2358 66.6232 8.38068 66.6971 8.49432H66.7994V7.45455H67.771V14.1875C67.771 14.75 67.6431 15.2074 67.3874 15.5597C67.1346 15.9148 66.7937 16.1747 66.3647 16.3395C65.9386 16.5071 65.4641 16.5909 64.9414 16.5909ZM64.9073 12.9943C65.3107 12.9943 65.6516 12.902 65.93 12.7173C66.2085 12.5327 66.4201 12.267 66.565 11.9205C66.7099 11.5739 66.7823 11.1591 66.7823 10.6761C66.7823 10.2045 66.7113 9.78835 66.5692 9.42756C66.4272 9.06676 66.217 8.78409 65.9386 8.57955C65.6602 8.375 65.3164 8.27273 64.9073 8.27273C64.4812 8.27273 64.1261 8.38068 63.842 8.59659C63.5607 8.8125 63.3491 9.10227 63.207 9.46591C63.0678 9.82955 62.9982 10.233 62.9982 10.6761C62.9982 11.1307 63.0692 11.5327 63.2113 11.8821C63.3562 12.2287 63.5692 12.5014 63.8505 12.7003C64.1346 12.8963 64.4869 12.9943 64.9073 12.9943ZM72.3562 14.1364C71.7255 14.1364 71.1815 13.9972 70.7241 13.7188C70.2695 13.4375 69.9187 13.0455 69.6715 12.5426C69.4272 12.0369 69.305 11.4489 69.305 10.7784C69.305 10.108 69.4272 9.51705 69.6715 9.00568C69.9187 8.49148 70.2624 8.09091 70.7028 7.80398C71.146 7.5142 71.663 7.36932 72.2539 7.36932C72.5948 7.36932 72.9315 7.42614 73.2638 7.53977C73.5962 7.65341 73.8988 7.83807 74.1715 8.09375C74.4442 8.34659 74.6616 8.68182 74.8235 9.09943C74.9854 9.51705 75.0664 10.0312 75.0664 10.642V11.0682H70.021V10.1989H74.0437C74.0437 9.82955 73.9698 9.5 73.8221 9.21023C73.6772 8.92045 73.4698 8.69176 73.1999 8.52415C72.9329 8.35653 72.6175 8.27273 72.2539 8.27273C71.8533 8.27273 71.5067 8.37216 71.2141 8.57102C70.9244 8.76705 70.7013 9.02273 70.5451 9.33807C70.3888 9.65341 70.3107 9.99148 70.3107 10.3523V10.9318C70.3107 11.4261 70.396 11.8452 70.5664 12.1889C70.7397 12.5298 70.9798 12.7898 71.2866 12.9688C71.5934 13.1449 71.9499 13.233 72.3562 13.233C72.6204 13.233 72.859 13.196 73.0721 13.1222C73.288 13.0455 73.4741 12.9318 73.6303 12.7812C73.7866 12.6278 73.9073 12.4375 73.9925 12.2102L74.9641 12.483C74.8619 12.8125 74.69 13.1023 74.4485 13.3523C74.207 13.5994 73.9087 13.7926 73.5536 13.9318C73.1985 14.0682 72.7994 14.1364 72.3562 14.1364Z" fill="#F9F9F9"/>
9
+ </svg>
10
+
11
+ `},components:[{tag:"Breadcrumb",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}},editorData:{rootClassName:"{{rootClassName}}"}}}]}]};exports.default=config;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers=require("../../helpers.js");const Button=({className:e,builderProps:t,builderAttrs:o,pageContext:a,setting:r={},styles:l={},style:s,wrapClassName:p="",advanced:i})=>{let n=["#","mailto:","tel:"],g=["product.url"],{align:c,size:d,backgroundColor:h,textColor:u,roundedBtn:b,spacing:m,globalSize:y}=l,{label:v,iconSvg:$,btnLink:f,htmlType:S,disabled:w,loading:k,iconAlign:C,iconVisible:x,translate:B}=r,z=f?.link!==void 0&&""!==f.link,[G,j]=core.splitStyle(["pos","top","left","bottom","right","z"],s),R=f?.link||"",_=new RegExp(/^https?:\/\//i),q=new RegExp(/^\/?(?:collections|pages|products|blogs)\/?/i),A=z&&!_.test(R)&&q.test(R),E=z&&_.test(R);A&&(R="{{ shop.url }}{{ routes.root_url | split: '/' | join: '/' }}"+R);let I=()=>!!(n.find(e=>R.startsWith(e))||g.find(e=>R.includes(e))),M=E||A||I()||"/"===R?"a":"button",T=E||A||I()||"/"===R?{href:R,target:f?.target}:z?{href:R,target:f?.target,type:S}:{type:S},D="left"===C?core.makeStyle({mr:m}):core.makeStyle({ml:m});w&&(delete h?.hover,delete h?.focus);let F=core.makeGlobalSize(y),H=core.composeTypographyClassName(l?.typo,l?.typography),L=core.composeTypographyStyle(l?.typo,l?.typography),N=`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers=require("../../helpers.js");const Button=({className:e,builderProps:t,builderAttrs:o,pageContext:a,setting:r={},styles:l={},style:s,wrapClassName:i="",advanced:p})=>{let n=["#","mailto:","tel:"],g=["product.url"],{align:c,size:d,backgroundColor:h,textColor:u,roundedBtn:b,spacing:m,globalSize:y}=l,{label:v,iconSvg:$,btnLink:f,htmlType:S,disabled:w,loading:k,iconAlign:C,iconVisible:x,translate:B}=r,z=f?.link!==void 0&&""!==f.link,[G,j]=core.splitStyle(["pos","top","left","bottom","right","z"],s),R=f?.link||"",_=new RegExp(/^https?:\/\//i),q=new RegExp(/^\/?(?:collections|pages|products|blogs)\/?/i),A=z&&!_.test(R)&&q.test(R),E=z&&_.test(R);A&&(R="{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}"+R);let I=()=>!!(n.find(e=>R.startsWith(e))||g.find(e=>R.includes(e))),M=E||A||I()||"/"===R?"a":"button",T=E||A||I()||"/"===R?{href:R,target:f?.target}:z?{href:R,target:f?.target,type:S}:{type:S},D="left"===C?core.makeStyle({mr:m}):core.makeStyle({ml:m});w&&(delete h?.hover,delete h?.focus);let F=core.makeGlobalSize(y),H=core.composeTypographyClassName(l?.typo,l?.typography),L=core.composeTypographyStyle(l?.typo,l?.typography),N=`
2
2
  .${t?.uid}.gp-button-base::before {
3
3
  content: "";
4
4
  height: 100%;
@@ -18,13 +18,13 @@
18
18
  <div
19
19
  ${{...o}}
20
20
  style="${{...j,...core.makeStyleResponsive("ta",c)}}"
21
- class="${core.cls(p,e?.includes("gp-button-atc")?"":i?.cssClass)}"
21
+ class="${core.cls(i,e?.includes("gp-button-atc")?"":p?.cssClass)}"
22
22
  >
23
23
  <style>${N}</style>
24
24
  <${M}
25
25
  ${{...T,"data-id":t?.uid,"aria-label":r?.label?.toString().replaceAll("'","&#039;"),...w&&"boolean"==typeof w||w?{disabled:"disabled"}:{}}}
26
26
  data-state="${k?"loading":"idle"}"
27
- class="${core.cls(t?.uid,"gp-button-base gp-rounded-none gp-max-w-full gp-relative gp-group gp-inline-flex gp-items-center gp-justify-center gp-no-underline gp-transition-colors gp-duration-300 disabled:gp-btn-disabled disabled:gp-opacity-30 disabled:gp-pointer-events-none",core.getGlobalColorStateClass("bg",h),{"gp-animate-bounce":l?.animation?.normal==="bounce","hover:gp-animate-bounce":l?.animation?.hover==="bounce","gp-scale-[1.1]":l?.animation?.normal==="grow","hover:gp-scale-[1.1]":l?.animation?.hover==="grow","gp-flex-row-reverse":"right"===C},core.getGlobalColorStateClass("text",u),H,e,e?.includes("gp-button-atc")&&i?i?.cssClass:"")}"
27
+ class="${core.cls(t?.uid,"gp-button-base gp-rounded-none gp-max-w-full gp-relative gp-group gp-inline-flex gp-items-center gp-justify-center gp-no-underline gp-transition-colors gp-duration-300 disabled:gp-btn-disabled disabled:gp-opacity-30 disabled:gp-pointer-events-none",core.getGlobalColorStateClass("bg",h),{"gp-animate-bounce":l?.animation?.normal==="bounce","hover:gp-animate-bounce":l?.animation?.hover==="bounce","gp-scale-[1.1]":l?.animation?.normal==="grow","hover:gp-scale-[1.1]":l?.animation?.hover==="grow","gp-flex-row-reverse":"right"===C},core.getGlobalColorStateClass("text",u),H,e,e?.includes("gp-button-atc")&&p?p?.cssClass:"")}"
28
28
  style="${{...core.getGlobalColorStateStyle("bg",h),...core.composeRadius(b),...core.getStyleShadowState(l?.boxShadowBtn,"box-shadow",l?.hasBoxShadowBtn),...core.getGlobalColorStateStyle("c",u),...l?.btnSpacing?.type?{}:core.composeSize(l?.btnSpacing?.custom),...F.width,...F.height,...F.padding,...core.makeStyle({tt:l.transform}),...L,...core.getGradientBgrStyleForButton(h)}}"
29
29
  >
30
30
  <svg
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),Text=require("../../text/components/Text.js"),productBundle=require("./constants/product-bundle.js");const ProductTag=({setting:e,styles:t,builderProps:r,bundleItem:s})=>{let{customContent:u}=e??{},{textAlign:o,backgroundColor:i,roundedTag:n,borderTag:c,textColor:a}=t??{},l=core.useEditorMode(),d=core.useProduct(),p=core.useCurrentVariant(),{quantity:x}=core.useQuantity(),g=React.useMemo(()=>s?.quantity?s.quantity:x??1,[x,s?.quantity]),m=p?.price??0,y=p?.salePrice??0,f=y-m,j=core.useFormatMoney(f<0?0:f,e?.moneyWithCurrentFormat||!1),b=React.useMemo(()=>{if(!y||!m)return`${u?.unit==="percentage"?"0%":j}`;if(u?.unit==="percentage"){let e=Math.round(f/(y/100));return`${e<0?0:e}%`}return`${j}`},[u?.unit,j,m,f,y]),R=React.useMemo(()=>{let e=parseInt(s?.discountValue);return s?.discountType===productBundle.DiscountType.Percentage?m*g*e/100:s?.discountType===productBundle.DiscountType.FixedAmount?e:0},[s?.discountType,s?.discountValue,m,g]),T=React.useMemo(()=>{if(!s)return b;if(s?.discountType===productBundle.DiscountType.NoDiscount)return 0;if(u?.unit==="percentage"){let e=Math.round(R/(g*m)*100);return`${e<0?0:e}%`}return Math.round(100*R)/100},[s,u?.unit,R,b,g,m]),h=core.getGlobalColorClass("border",c?.color),M=core.getGlobalColorClass("text",a),C=core.getGlobalColorClass("bg",i);function S(e){return"none"===e?"gp-g-s-none":`gp-g-s-tag-${e}`}let q=d?.baseID?.replace("gid://shopify/Product/","");return jsxRuntime.jsx("div",{className:core.cls({"gp-opacity-0 ":"edit"!==l&&(y<=0||0>=Math.ceil(f/(y/100))),"gp-opacity-20 ":"edit"===l&&(y<=0||0>=Math.ceil(f/(y/100)))}),style:{...core.makeStyleResponsive("ta",o)},id:`shopify-text-element-${r?.uid}`,"data-product-id":q,children:d?jsxRuntime.jsx("div",{className:core.cls("gp-inline-flex gp-flex-wrap gp-items-end gp-gap-3"),style:{},children:jsxRuntime.jsx("div",{className:core.cls("gp-inline-block",h,M,C,t?.tagSpacing?.type?S(t?.tagSpacing?.type):""),style:{...core.makeStyle({bs:c?.border,bw:c?.width,bc:""===h?c?.color:void 0,c:""===M?a:void 0,bg:""===C?i:void 0}),...n?.radiusType!=="custom"?core.getRadiusCSSFromGlobal("normal",n?.radiusType):{},...core.getCustomRadius("normal",n),...t?.tagSpacing?.type?{}:core.composeSize(t?.tagSpacing?.custom)},children:jsxRuntime.jsxs("div",{className:"gp-flex gp-break-all",children:[jsxRuntime.jsx(Text.default,{styles:t,setting:{...e,text:u?.prefix?.replaceAll(" ","&nbsp;"),options:{useState:!0,uniqueId:`${r?.uid}-prefix`},excludeFlex:!0}}),jsxRuntime.jsx(Text.default,{styles:t,setting:{...e,text:T,options:{isCannotEditing:!0},excludeFlex:!0}}),jsxRuntime.jsx(Text.default,{styles:t,setting:{...e,text:u?.suffix?.replaceAll(" ","&nbsp;"),excludeFlex:!0,options:{useState:!0,uniqueId:`${r?.uid}-suffix`}}})]})})}):null})};exports.default=ProductTag;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),Text=require("../../text/components/Text.js"),productBundle=require("./constants/product-bundle.js");const ProductTag=({setting:e,styles:t,builderProps:r,bundleItem:s})=>{let{customContent:u}=e??{},{textAlign:o,backgroundColor:i,roundedTag:n,borderTag:c,textColor:a}=t??{},l=core.useEditorMode(),d=core.useProduct(),p=core.useCurrentVariant(),{quantity:x}=core.useQuantity(),g=React.useMemo(()=>s?.quantity?s.quantity:x??1,[x,s?.quantity]),m=p?.price??0,y=p?.salePrice??0,f=y-m,j=core.useFormatMoney(f<0?0:f,e?.moneyWithCurrentFormat||!1),b=React.useMemo(()=>{if(!y&&0!==y||!m&&0!==m)return`${u?.unit==="percentage"?"0%":j}`;if(u?.unit==="percentage"){let e=Math.round(f/(y/100));return`${e<0?0:e}%`}return`${j}`},[u?.unit,j,m,f,y]),R=React.useMemo(()=>{let e=parseInt(s?.discountValue);return s?.discountType===productBundle.DiscountType.Percentage?m*g*e/100:s?.discountType===productBundle.DiscountType.FixedAmount?e:0},[s?.discountType,s?.discountValue,m,g]),T=React.useMemo(()=>{if(!s)return b;if(s?.discountType===productBundle.DiscountType.NoDiscount)return 0;if(u?.unit==="percentage"){let e=Math.round(R/(g*m)*100);return`${e<0?0:e}%`}return Math.round(100*R)/100},[s,u?.unit,R,b,g,m]),h=core.getGlobalColorClass("border",c?.color),M=core.getGlobalColorClass("text",a),C=core.getGlobalColorClass("bg",i);function S(e){return"none"===e?"gp-g-s-none":`gp-g-s-tag-${e}`}let q=d?.baseID?.replace("gid://shopify/Product/","");return jsxRuntime.jsx("div",{className:core.cls({"gp-opacity-0 ":"edit"!==l&&(y<=0||0>=Math.ceil(f/(y/100))),"gp-opacity-20 ":"edit"===l&&(y<=0||0>=Math.ceil(f/(y/100)))}),style:{...core.makeStyleResponsive("ta",o)},id:`shopify-text-element-${r?.uid}`,"data-product-id":q,children:d?jsxRuntime.jsx("div",{className:core.cls("gp-inline-flex gp-flex-wrap gp-items-end gp-gap-3"),style:{},children:jsxRuntime.jsx("div",{className:core.cls("gp-inline-block",h,M,C,t?.tagSpacing?.type?S(t?.tagSpacing?.type):""),style:{...core.makeStyle({bs:c?.border,bw:c?.width,bc:""===h?c?.color:void 0,c:""===M?a:void 0,bg:""===C?i:void 0}),...n?.radiusType!=="custom"?core.getRadiusCSSFromGlobal("normal",n?.radiusType):{},...core.getCustomRadius("normal",n),...t?.tagSpacing?.type?{}:core.composeSize(t?.tagSpacing?.custom)},children:jsxRuntime.jsxs("div",{className:"gp-flex gp-break-all",children:[jsxRuntime.jsx(Text.default,{styles:t,setting:{...e,text:u?.prefix?.replaceAll(" ","&nbsp;"),options:{useState:!0,uniqueId:`${r?.uid}-prefix`},excludeFlex:!0}}),jsxRuntime.jsx(Text.default,{styles:t,setting:{...e,text:T,options:{isCannotEditing:!0},excludeFlex:!0}}),jsxRuntime.jsx(Text.default,{styles:t,setting:{...e,text:u?.suffix?.replaceAll(" ","&nbsp;"),excludeFlex:!0,options:{useState:!0,uniqueId:`${r?.uid}-suffix`}}})]})})}):null})};exports.default=ProductTag;
@@ -1 +1,11 @@
1
- let config={tag:"Breadcrumb",label:"Breadcrumb",settings:[{id:"setting",controls:[{id:"dataBreadcrumb",type:"input",label:"Data Breadcrumb",info:"Set Breadcrumb items of the component",default:JSON.stringify([{href:"/",title:"Link 1",separator:"/"},{href:"/",title:"Link 2",separator:"/"},{title:"Link 3"}])}]}]};export{config as default};
1
+ let config={tag:"Breadcrumb",label:"Breadcrumb",settings:[{id:"setting",controls:[{id:"dataBreadcrumb",type:"input",label:"Data Breadcrumb",info:"Set Breadcrumb items of the component",default:JSON.stringify([{href:"/",title:"Link 1",separator:"/"},{href:"/",title:"Link 2",separator:"/"},{title:"Link 3"}])},{id:"iconSvg",type:"icon",label:"Separator icon",info:"Choose from list or paste any SVG icon",default:`<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M13.2718 2.54722C13.5879 2.68597 13.7316 3.05467 13.5929 3.37073L7.55181 17.132C7.41306 17.4481 7.04436 17.5918 6.7283 17.4531C6.41224 17.3143 6.26849 16.9456 6.40724 16.6296L12.4483 2.86828C12.5871 2.55221 12.9558 2.40847 13.2718 2.54722Z" fill="white"/>
3
+ </svg>
4
+ `},{id:"background",type:"background",ignoreReRender:!0,allowBackgroundImageAndVideo:!1,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"align",label:"Align",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]},{id:"style",controls:[{id:"iconWidth",type:"input:number",label:"Icon Width",devices:{desktop:{default:16}}},{id:"color",type:"colorpicker",label:"Color",default:{normal:"#595959"},state:{hover:!0,normal:!0}},{id:"spacing",label:"Spacing",type:"input:unit-spacing",units:["px"],devices:{desktop:{default:"4px"}}}]}],ui:[{type:"group",options:{label:"large"},label:{en:"Icon"},controls:[{type:"control",setting:{id:"iconSvg"},layout:"vertical",options:{styleControl:{"max-width":"100%"}}},{type:"control",label:{en:"Size"},setting:{id:"iconWidth"}},{type:"control",label:{en:"Icon color"},setting:{id:"color",state:"normal"}}]},{type:"control",label:{en:"Spacing"},setting:{id:"spacing"}},{type:"control",label:{en:"Background"},options:{label:"large",styleLabel:{marginBottom:"4px"}},setting:{id:"background"},layout:"vertical"},{type:"control",label:{en:"Align"},setting:{id:"align"},options:{label:"large"}}],presets:[{id:"breadcrumb",name:{en:"Breadcrumb"},icon:{desktop:`
5
+ <svg width="76" height="20" viewBox="0 0 76 20" fill="none" xmlns="http://www.w3.org/2000/svg">
6
+ <path d="M1.05682 14V5.27273H2.11364V9.15909H6.76705V5.27273H7.82386V14H6.76705V10.0966H2.11364V14H1.05682ZM12.4624 14.1364C11.8714 14.1364 11.353 13.9957 10.907 13.7145C10.4638 13.4332 10.1172 13.0398 9.86719 12.5341C9.62003 12.0284 9.49645 11.4375 9.49645 10.7614C9.49645 10.0795 9.62003 9.48437 9.86719 8.97585C10.1172 8.46733 10.4638 8.07244 10.907 7.79119C11.353 7.50994 11.8714 7.36932 12.4624 7.36932C13.0533 7.36932 13.5703 7.50994 14.0135 7.79119C14.4595 8.07244 14.8061 8.46733 15.0533 8.97585C15.3033 9.48437 15.4283 10.0795 15.4283 10.7614C15.4283 11.4375 15.3033 12.0284 15.0533 12.5341C14.8061 13.0398 14.4595 13.4332 14.0135 13.7145C13.5703 13.9957 13.0533 14.1364 12.4624 14.1364ZM12.4624 13.233C12.9112 13.233 13.2805 13.1179 13.5703 12.8878C13.8601 12.6577 14.0746 12.3551 14.2138 11.9801C14.353 11.6051 14.4226 11.1989 14.4226 10.7614C14.4226 10.3239 14.353 9.91619 14.2138 9.53835C14.0746 9.16051 13.8601 8.85511 13.5703 8.62216C13.2805 8.3892 12.9112 8.27273 12.4624 8.27273C12.0135 8.27273 11.6442 8.3892 11.3544 8.62216C11.0646 8.85511 10.8501 9.16051 10.7109 9.53835C10.5717 9.91619 10.5021 10.3239 10.5021 10.7614C10.5021 11.1989 10.5717 11.6051 10.7109 11.9801C10.8501 12.3551 11.0646 12.6577 11.3544 12.8878C11.6442 13.1179 12.0135 13.233 12.4624 13.233ZM16.9634 14V7.45455H17.935V8.47727H18.0202C18.1566 8.12784 18.3768 7.85653 18.6808 7.66335C18.9847 7.46733 19.3498 7.36932 19.7759 7.36932C20.2077 7.36932 20.5671 7.46733 20.854 7.66335C21.1438 7.85653 21.3697 8.12784 21.5316 8.47727H21.5998C21.7674 8.1392 22.0188 7.87074 22.354 7.67188C22.6893 7.47017 23.0913 7.36932 23.56 7.36932C24.1452 7.36932 24.6239 7.55256 24.9961 7.91903C25.3683 8.28267 25.5543 8.84943 25.5543 9.61932V14H24.5487V9.61932C24.5487 9.13636 24.4165 8.79119 24.1523 8.58381C23.8881 8.37642 23.5771 8.27273 23.2191 8.27273C22.7589 8.27273 22.4023 8.41193 22.1495 8.69034C21.8967 8.96591 21.7702 9.31534 21.7702 9.73864V14H20.7475V9.51705C20.7475 9.14489 20.6268 8.84517 20.3853 8.6179C20.1438 8.38778 19.8327 8.27273 19.4521 8.27273C19.1907 8.27273 18.9464 8.34233 18.7191 8.48153C18.4947 8.62074 18.3129 8.81392 18.1737 9.06108C18.0373 9.3054 17.9691 9.58807 17.9691 9.90909V14H16.9634ZM30.1374 14.1364C29.5067 14.1364 28.9627 13.9972 28.5053 13.7188C28.0508 13.4375 27.6999 13.0455 27.4528 12.5426C27.2085 12.0369 27.0863 11.4489 27.0863 10.7784C27.0863 10.108 27.2085 9.51705 27.4528 9.00568C27.6999 8.49148 28.0437 8.09091 28.484 7.80398C28.9272 7.5142 29.4442 7.36932 30.0352 7.36932C30.3761 7.36932 30.7127 7.42614 31.0451 7.53977C31.3775 7.65341 31.68 7.83807 31.9528 8.09375C32.2255 8.34659 32.4428 8.68182 32.6048 9.09943C32.7667 9.51705 32.8477 10.0312 32.8477 10.642V11.0682H27.8022V10.1989H31.8249C31.8249 9.82955 31.7511 9.5 31.6033 9.21023C31.4585 8.92045 31.2511 8.69176 30.9812 8.52415C30.7141 8.35653 30.3988 8.27273 30.0352 8.27273C29.6346 8.27273 29.288 8.37216 28.9954 8.57102C28.7056 8.76705 28.4826 9.02273 28.3263 9.33807C28.1701 9.65341 28.092 9.99148 28.092 10.3523V10.9318C28.092 11.4261 28.1772 11.8452 28.3477 12.1889C28.521 12.5298 28.761 12.7898 29.0678 12.9688C29.3746 13.1449 29.7312 13.233 30.1374 13.233C30.4016 13.233 30.6403 13.196 30.8533 13.1222C31.0692 13.0455 31.2553 12.9318 31.4116 12.7812C31.5678 12.6278 31.6886 12.4375 31.7738 12.2102L32.7454 12.483C32.6431 12.8125 32.4712 13.1023 32.2298 13.3523C31.9883 13.5994 31.69 13.7926 31.3349 13.9318C30.9798 14.0682 30.5806 14.1364 30.1374 14.1364Z" fill="#F9F9F9"/>
7
+ <path d="M42.0057 4.86364L39.1932 15.3125H38.2727L41.0852 4.86364H42.0057Z" fill="#F9F9F9"/>
8
+ <path d="M48.0568 14V5.27273H51.0057C51.6903 5.27273 52.25 5.39631 52.6847 5.64347C53.1222 5.88778 53.446 6.21875 53.6562 6.63636C53.8665 7.05398 53.9716 7.51989 53.9716 8.03409C53.9716 8.5483 53.8665 9.01562 53.6562 9.43608C53.4489 9.85653 53.1278 10.1918 52.6932 10.4418C52.2585 10.6889 51.7017 10.8125 51.0227 10.8125H48.9091V9.875H50.9886C51.4574 9.875 51.8338 9.79403 52.1179 9.6321C52.402 9.47017 52.608 9.25142 52.7358 8.97585C52.8665 8.69744 52.9318 8.38352 52.9318 8.03409C52.9318 7.68466 52.8665 7.37216 52.7358 7.09659C52.608 6.82102 52.4006 6.60511 52.1136 6.44886C51.8267 6.28977 51.446 6.21023 50.9716 6.21023H49.1136V14H48.0568ZM57.4638 14.1534C57.049 14.1534 56.6726 14.0753 56.3345 13.919C55.9964 13.7599 55.728 13.5312 55.5291 13.233C55.3303 12.9318 55.2308 12.5682 55.2308 12.142C55.2308 11.767 55.3047 11.4631 55.4524 11.2301C55.6001 10.9943 55.7976 10.8097 56.0447 10.6761C56.2919 10.5426 56.5646 10.4432 56.8629 10.3778C57.1641 10.3097 57.4666 10.2557 57.7706 10.2159C58.1683 10.1648 58.4908 10.1264 58.7379 10.1009C58.9879 10.0724 59.1697 10.0256 59.2834 9.96023C59.3999 9.89489 59.4581 9.78125 59.4581 9.61932V9.58523C59.4581 9.16477 59.343 8.83807 59.1129 8.60511C58.8857 8.37216 58.5405 8.25568 58.0774 8.25568C57.5973 8.25568 57.2209 8.3608 56.9482 8.57102C56.6754 8.78125 56.4837 9.00568 56.3729 9.24432L55.4183 8.90341C55.5888 8.50568 55.8161 8.19602 56.1001 7.97443C56.3871 7.75 56.6996 7.59375 57.0376 7.50568C57.3786 7.41477 57.7138 7.36932 58.0433 7.36932C58.2536 7.36932 58.495 7.39489 58.7678 7.44602C59.0433 7.49432 59.3089 7.59517 59.5646 7.74858C59.8232 7.90199 60.0376 8.13352 60.2081 8.44318C60.3786 8.75284 60.4638 9.16761 60.4638 9.6875V14H59.4581V13.1136H59.407C59.3388 13.2557 59.2251 13.4077 59.0661 13.5696C58.907 13.7315 58.6953 13.8693 58.4311 13.983C58.1669 14.0966 57.8445 14.1534 57.4638 14.1534ZM57.6172 13.25C58.0149 13.25 58.3501 13.1719 58.6229 13.0156C58.8984 12.8594 59.1058 12.6577 59.245 12.4105C59.3871 12.1634 59.4581 11.9034 59.4581 11.6307V10.7102C59.4155 10.7614 59.3217 10.8082 59.1768 10.8509C59.0348 10.8906 58.87 10.9261 58.6825 10.9574C58.4979 10.9858 58.3175 11.0114 58.1413 11.0341C57.968 11.054 57.8274 11.071 57.7195 11.0852C57.4581 11.1193 57.2138 11.1747 56.9865 11.2514C56.7621 11.3253 56.5803 11.4375 56.4411 11.5881C56.3047 11.7358 56.2365 11.9375 56.2365 12.1932C56.2365 12.5426 56.3658 12.8068 56.6243 12.9858C56.8857 13.1619 57.2166 13.25 57.6172 13.25ZM64.9414 16.5909C64.4556 16.5909 64.038 16.5284 63.6886 16.4034C63.3391 16.2812 63.0479 16.1193 62.815 15.9176C62.5849 15.7188 62.4016 15.5057 62.2653 15.2784L63.0664 14.7159C63.1573 14.8352 63.2724 14.9716 63.4116 15.125C63.5508 15.2812 63.7411 15.4162 63.9826 15.5298C64.2269 15.6463 64.5465 15.7045 64.9414 15.7045C65.4698 15.7045 65.9059 15.5767 66.2496 15.321C66.5934 15.0653 66.7653 14.6648 66.7653 14.1193V12.7898H66.68C66.6062 12.9091 66.5011 13.0568 66.3647 13.233C66.2312 13.4062 66.038 13.5611 65.7852 13.6974C65.5352 13.831 65.1971 13.8977 64.771 13.8977C64.2425 13.8977 63.7681 13.7727 63.3477 13.5227C62.93 13.2727 62.5991 12.9091 62.3548 12.4318C62.1133 11.9545 61.9925 11.375 61.9925 10.6932C61.9925 10.0227 62.1104 9.43892 62.3462 8.94176C62.582 8.44176 62.9102 8.0554 63.3306 7.78267C63.7511 7.5071 64.2369 7.36932 64.788 7.36932C65.2141 7.36932 65.5522 7.44034 65.8022 7.58239C66.055 7.72159 66.2482 7.88068 66.3817 8.05966C66.5181 8.2358 66.6232 8.38068 66.6971 8.49432H66.7994V7.45455H67.771V14.1875C67.771 14.75 67.6431 15.2074 67.3874 15.5597C67.1346 15.9148 66.7937 16.1747 66.3647 16.3395C65.9386 16.5071 65.4641 16.5909 64.9414 16.5909ZM64.9073 12.9943C65.3107 12.9943 65.6516 12.902 65.93 12.7173C66.2085 12.5327 66.4201 12.267 66.565 11.9205C66.7099 11.5739 66.7823 11.1591 66.7823 10.6761C66.7823 10.2045 66.7113 9.78835 66.5692 9.42756C66.4272 9.06676 66.217 8.78409 65.9386 8.57955C65.6602 8.375 65.3164 8.27273 64.9073 8.27273C64.4812 8.27273 64.1261 8.38068 63.842 8.59659C63.5607 8.8125 63.3491 9.10227 63.207 9.46591C63.0678 9.82955 62.9982 10.233 62.9982 10.6761C62.9982 11.1307 63.0692 11.5327 63.2113 11.8821C63.3562 12.2287 63.5692 12.5014 63.8505 12.7003C64.1346 12.8963 64.4869 12.9943 64.9073 12.9943ZM72.3562 14.1364C71.7255 14.1364 71.1815 13.9972 70.7241 13.7188C70.2695 13.4375 69.9187 13.0455 69.6715 12.5426C69.4272 12.0369 69.305 11.4489 69.305 10.7784C69.305 10.108 69.4272 9.51705 69.6715 9.00568C69.9187 8.49148 70.2624 8.09091 70.7028 7.80398C71.146 7.5142 71.663 7.36932 72.2539 7.36932C72.5948 7.36932 72.9315 7.42614 73.2638 7.53977C73.5962 7.65341 73.8988 7.83807 74.1715 8.09375C74.4442 8.34659 74.6616 8.68182 74.8235 9.09943C74.9854 9.51705 75.0664 10.0312 75.0664 10.642V11.0682H70.021V10.1989H74.0437C74.0437 9.82955 73.9698 9.5 73.8221 9.21023C73.6772 8.92045 73.4698 8.69176 73.1999 8.52415C72.9329 8.35653 72.6175 8.27273 72.2539 8.27273C71.8533 8.27273 71.5067 8.37216 71.2141 8.57102C70.9244 8.76705 70.7013 9.02273 70.5451 9.33807C70.3888 9.65341 70.3107 9.99148 70.3107 10.3523V10.9318C70.3107 11.4261 70.396 11.8452 70.5664 12.1889C70.7397 12.5298 70.9798 12.7898 71.2866 12.9688C71.5934 13.1449 71.9499 13.233 72.3562 13.233C72.6204 13.233 72.859 13.196 73.0721 13.1222C73.288 13.0455 73.4741 12.9318 73.6303 12.7812C73.7866 12.6278 73.9073 12.4375 73.9925 12.2102L74.9641 12.483C74.8619 12.8125 74.69 13.1023 74.4485 13.3523C74.207 13.5994 73.9087 13.7926 73.5536 13.9318C73.1985 14.0682 72.7994 14.1364 72.3562 14.1364Z" fill="#F9F9F9"/>
9
+ </svg>
10
+
11
+ `},components:[{tag:"Breadcrumb",advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}},editorData:{rootClassName:"{{rootClassName}}"}}}]}]};export{config as default};
@@ -1,4 +1,4 @@
1
- import{splitStyle as t,makeStyle as e,makeGlobalSize as o,composeTypographyClassName as a,composeTypographyStyle as i,composeBorderCss as p,composeCornerCss as l,template as s,makeStyleResponsive as n,cls as r,getGlobalColorStateClass as g,getGlobalColorStateStyle as d,composeRadius as h,getStyleShadowState as c,composeSize as b,getGradientBgrStyleForButton as u,RenderIf as m}from"@gem-sdk/core";import{getDynamicSourceLocales as v}from"../../helpers.js";let Button=({className:$,builderProps:f,builderAttrs:y,pageContext:w,setting:x={},styles:k={},style:B,wrapClassName:z="",advanced:C})=>{let S=["#","mailto:","tel:"],j=["product.url"],{align:_,size:A,backgroundColor:E,textColor:R,roundedBtn:H,spacing:I,globalSize:M}=k,{label:V,iconSvg:W,btnLink:q,htmlType:D,disabled:F,loading:G,iconAlign:J,iconVisible:K,translate:L}=x,N=q?.link!==void 0&&""!==q.link,[O,P]=t(["pos","top","left","bottom","right","z"],B),Q=q?.link||"",T=new RegExp(/^https?:\/\//i),U=new RegExp(/^\/?(?:collections|pages|products|blogs)\/?/i),X=N&&!T.test(Q)&&U.test(Q),Y=N&&T.test(Q);X&&(Q="{{ shop.url }}{{ routes.root_url | split: '/' | join: '/' }}"+Q);let Z=()=>!!(S.find(t=>Q.startsWith(t))||j.find(t=>Q.includes(t))),tt=Y||X||Z()||"/"===Q?"a":"button",te=Y||X||Z()||"/"===Q?{href:Q,target:q?.target}:N?{href:Q,target:q?.target,type:D}:{type:D},to="left"===J?e({mr:I}):e({ml:I});F&&(delete E?.hover,delete E?.focus);let ta=o(M),ti=a(k?.typo,k?.typography),tp=i(k?.typo,k?.typography),tl=`
1
+ import{splitStyle as t,makeStyle as e,makeGlobalSize as o,composeTypographyClassName as a,composeTypographyStyle as i,composeBorderCss as p,composeCornerCss as s,template as l,makeStyleResponsive as n,cls as r,getGlobalColorStateClass as g,getGlobalColorStateStyle as d,composeRadius as h,getStyleShadowState as c,composeSize as b,getGradientBgrStyleForButton as u,RenderIf as m}from"@gem-sdk/core";import{getDynamicSourceLocales as v}from"../../helpers.js";let Button=({className:$,builderProps:f,builderAttrs:y,pageContext:w,setting:x={},styles:k={},style:B,wrapClassName:z="",advanced:C})=>{let S=["#","mailto:","tel:"],j=["product.url"],{align:_,size:A,backgroundColor:E,textColor:R,roundedBtn:q,spacing:H,globalSize:I}=k,{label:M,iconSvg:V,btnLink:W,htmlType:D,disabled:F,loading:G,iconAlign:J,iconVisible:K,translate:L}=x,N=W?.link!==void 0&&""!==W.link,[O,P]=t(["pos","top","left","bottom","right","z"],B),Q=W?.link||"",T=new RegExp(/^https?:\/\//i),U=new RegExp(/^\/?(?:collections|pages|products|blogs)\/?/i),X=N&&!T.test(Q)&&U.test(Q),Y=N&&T.test(Q);X&&(Q="{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}"+Q);let Z=()=>!!(S.find(t=>Q.startsWith(t))||j.find(t=>Q.includes(t))),tt=Y||X||Z()||"/"===Q?"a":"button",te=Y||X||Z()||"/"===Q?{href:Q,target:W?.target}:N?{href:Q,target:W?.target,type:D}:{type:D},to="left"===J?e({mr:H}):e({ml:H});F&&(delete E?.hover,delete E?.focus);let ta=o(I),ti=a(k?.typo,k?.typography),tp=i(k?.typo,k?.typography),ts=`
2
2
  .${f?.uid}.gp-button-base::before {
3
3
  content: "";
4
4
  height: 100%;
@@ -6,26 +6,26 @@ import{splitStyle as t,makeStyle as e,makeGlobalSize as o,composeTypographyClass
6
6
  position: absolute;
7
7
  pointer-events: none;
8
8
  ${p(k?.borderBtn?.normal)}
9
- ${l(k?.roundedBtn?.normal)}
9
+ ${s(k?.roundedBtn?.normal)}
10
10
  }
11
11
 
12
12
  .${f?.uid}:hover::before {
13
13
  ${p(k?.borderBtn?.hover)}
14
- ${l(k?.roundedBtn?.hover)}
14
+ ${s(k?.roundedBtn?.hover)}
15
15
  }
16
- `,ts=v({val:V,uid:f?.uid,settingId:L??"label",pageContext:w,isCapitalize:k?.typo?.attrs?.transform==="capitalize"});return s`
16
+ `,tl=v({val:M,uid:f?.uid,settingId:L??"label",pageContext:w,isCapitalize:k?.typo?.attrs?.transform==="capitalize"});return l`
17
17
  <gp-button style="${{...O}}">
18
18
  <div
19
19
  ${{...y}}
20
20
  style="${{...P,...n("ta",_)}}"
21
21
  class="${r(z,$?.includes("gp-button-atc")?"":C?.cssClass)}"
22
22
  >
23
- <style>${tl}</style>
23
+ <style>${ts}</style>
24
24
  <${tt}
25
25
  ${{...te,"data-id":f?.uid,"aria-label":x?.label?.toString().replaceAll("'","&#039;"),...F&&"boolean"==typeof F||F?{disabled:"disabled"}:{}}}
26
26
  data-state="${G?"loading":"idle"}"
27
27
  class="${r(f?.uid,"gp-button-base gp-rounded-none gp-max-w-full gp-relative gp-group gp-inline-flex gp-items-center gp-justify-center gp-no-underline gp-transition-colors gp-duration-300 disabled:gp-btn-disabled disabled:gp-opacity-30 disabled:gp-pointer-events-none",g("bg",E),{"gp-animate-bounce":k?.animation?.normal==="bounce","hover:gp-animate-bounce":k?.animation?.hover==="bounce","gp-scale-[1.1]":k?.animation?.normal==="grow","hover:gp-scale-[1.1]":k?.animation?.hover==="grow","gp-flex-row-reverse":"right"===J},g("text",R),ti,$,$?.includes("gp-button-atc")&&C?C?.cssClass:"")}"
28
- style="${{...d("bg",E),...h(H),...c(k?.boxShadowBtn,"box-shadow",k?.hasBoxShadowBtn),...d("c",R),...k?.btnSpacing?.type?{}:b(k?.btnSpacing?.custom),...ta.width,...ta.height,...ta.padding,...e({tt:k.transform}),...tp,...u(E)}}"
28
+ style="${{...d("bg",E),...h(q),...c(k?.boxShadowBtn,"box-shadow",k?.hasBoxShadowBtn),...d("c",R),...k?.btnSpacing?.type?{}:b(k?.btnSpacing?.custom),...ta.width,...ta.height,...ta.padding,...e({tt:k.transform}),...tp,...u(E)}}"
29
29
  >
30
30
  <svg
31
31
  class="gp-invisible gp-absolute gp-h-5 gp-w-5 group-data-[state=loading]:gp-animate-spin group-data-[state=loading]:gp-visible"
@@ -48,15 +48,15 @@ import{splitStyle as t,makeStyle as e,makeGlobalSize as o,composeTypographyClass
48
48
  ></path>
49
49
  </svg>
50
50
 
51
- ${m(!!W&&K,s`<span
51
+ ${m(!!V&&K,l`<span
52
52
  class="${"gp-inline-flex gp-shrink-0 gp-items-center gp-justify-center group-data-[state=loading]:gp-invisible gp-z-1 [&>*]:!gp-h-[var(--height-desktop)] [&>*]:!gp-w-auto tablet:[&>*]:!gp-h-[var(--height-tablet)] mobile:[&>*]:!gp-h-[var(--height-mobile)]"}"
53
- style="${{...V?to:{},"--height-desktop":`${A?.desktop}`,"--height-tablet":`${A?.desktop??A?.tablet}`,"--height-mobile":`${A?.mobile??A?.tablet??A?.desktop}`}}"
54
- >${W}</span>`)}
53
+ style="${{...M?to:{},"--height-desktop":`${A?.desktop}`,"--height-tablet":`${A?.desktop??A?.tablet}`,"--height-mobile":`${A?.mobile??A?.tablet??A?.desktop}`}}"
54
+ >${V}</span>`)}
55
55
  <span
56
56
  class="${`gp-break-words group-data-[state=loading]:gp-invisible [&_p]:gp-whitespace-pre-line gp-z-1 gp-h-full gp-flex gp-items-center gp-overflow-hidden ${k?.typo?.attrs?.italic?"[&:not(:has(p))]:gp-pr-[0.2em] [&_p]:[&:has(p)]:gp-pr-[0.2em]":""}`}"
57
57
  style="${{...e({tt:k?.transform})}}"
58
58
  >
59
- ${ts}
59
+ ${tl}
60
60
  </span>
61
61
  </${tt}>
62
62
  </div>
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useEditorMode as i,useProduct as n,useCurrentVariant as r,useQuantity as o,useFormatMoney as a,getGlobalColorClass as u,cls as s,makeStyleResponsive as l,makeStyle as p,getRadiusCSSFromGlobal as c,getCustomRadius as d,composeSize as g}from"@gem-sdk/core";import{useMemo as m}from"react";import f from"../../text/components/Text.js";import{DiscountType as x}from"./constants/product-bundle.js";let ProductTag=({setting:y,styles:b,builderProps:h,bundleItem:T})=>{let{customContent:$}=y??{},{textAlign:v,backgroundColor:S,roundedTag:q,borderTag:F,textColor:M}=b??{},N=i(),P=n(),I=r(),{quantity:j}=o(),k=m(()=>T?.quantity?T.quantity:j??1,[j,T?.quantity]),w=I?.price??0,A=I?.salePrice??0,C=A-w,D=a(C<0?0:C,y?.moneyWithCurrentFormat||!1),V=m(()=>{if(!A||!w)return`${$?.unit==="percentage"?"0%":D}`;if($?.unit==="percentage"){let e=Math.round(C/(A/100));return`${e<0?0:e}%`}return`${D}`},[$?.unit,D,w,C,A]),E=m(()=>{let e=parseInt(T?.discountValue);return T?.discountType===x.Percentage?w*k*e/100:T?.discountType===x.FixedAmount?e:0},[T?.discountType,T?.discountValue,w,k]),W=m(()=>{if(!T)return V;if(T?.discountType===x.NoDiscount)return 0;if($?.unit==="percentage"){let e=Math.round(E/(k*w)*100);return`${e<0?0:e}%`}return Math.round(100*E)/100},[T,$?.unit,E,V,k,w]),z=u("border",F?.color),B=u("text",M),G=u("bg",S);function H(e){return"none"===e?"gp-g-s-none":`gp-g-s-tag-${e}`}let J=P?.baseID?.replace("gid://shopify/Product/","");return e("div",{className:s({"gp-opacity-0 ":"edit"!==N&&(A<=0||0>=Math.ceil(C/(A/100))),"gp-opacity-20 ":"edit"===N&&(A<=0||0>=Math.ceil(C/(A/100)))}),style:{...l("ta",v)},id:`shopify-text-element-${h?.uid}`,"data-product-id":J,children:P?e("div",{className:s("gp-inline-flex gp-flex-wrap gp-items-end gp-gap-3"),style:{},children:e("div",{className:s("gp-inline-block",z,B,G,b?.tagSpacing?.type?H(b?.tagSpacing?.type):""),style:{...p({bs:F?.border,bw:F?.width,bc:""===z?F?.color:void 0,c:""===B?M:void 0,bg:""===G?S:void 0}),...q?.radiusType!=="custom"?c("normal",q?.radiusType):{},...d("normal",q),...b?.tagSpacing?.type?{}:g(b?.tagSpacing?.custom)},children:t("div",{className:"gp-flex gp-break-all",children:[e(f,{styles:b,setting:{...y,text:$?.prefix?.replaceAll(" ","&nbsp;"),options:{useState:!0,uniqueId:`${h?.uid}-prefix`},excludeFlex:!0}}),e(f,{styles:b,setting:{...y,text:W,options:{isCannotEditing:!0},excludeFlex:!0}}),e(f,{styles:b,setting:{...y,text:$?.suffix?.replaceAll(" ","&nbsp;"),excludeFlex:!0,options:{useState:!0,uniqueId:`${h?.uid}-suffix`}}})]})})}):null})};export{ProductTag as default};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useEditorMode as i,useProduct as n,useCurrentVariant as r,useQuantity as o,useFormatMoney as a,getGlobalColorClass as u,cls as s,makeStyleResponsive as l,makeStyle as p,getRadiusCSSFromGlobal as c,getCustomRadius as d,composeSize as g}from"@gem-sdk/core";import{useMemo as m}from"react";import f from"../../text/components/Text.js";import{DiscountType as x}from"./constants/product-bundle.js";let ProductTag=({setting:y,styles:b,builderProps:h,bundleItem:T})=>{let{customContent:$}=y??{},{textAlign:v,backgroundColor:S,roundedTag:q,borderTag:F,textColor:M}=b??{},N=i(),P=n(),I=r(),{quantity:j}=o(),k=m(()=>T?.quantity?T.quantity:j??1,[j,T?.quantity]),w=I?.price??0,A=I?.salePrice??0,C=A-w,D=a(C<0?0:C,y?.moneyWithCurrentFormat||!1),V=m(()=>{if(!A&&0!==A||!w&&0!==w)return`${$?.unit==="percentage"?"0%":D}`;if($?.unit==="percentage"){let e=Math.round(C/(A/100));return`${e<0?0:e}%`}return`${D}`},[$?.unit,D,w,C,A]),E=m(()=>{let e=parseInt(T?.discountValue);return T?.discountType===x.Percentage?w*k*e/100:T?.discountType===x.FixedAmount?e:0},[T?.discountType,T?.discountValue,w,k]),W=m(()=>{if(!T)return V;if(T?.discountType===x.NoDiscount)return 0;if($?.unit==="percentage"){let e=Math.round(E/(k*w)*100);return`${e<0?0:e}%`}return Math.round(100*E)/100},[T,$?.unit,E,V,k,w]),z=u("border",F?.color),B=u("text",M),G=u("bg",S);function H(e){return"none"===e?"gp-g-s-none":`gp-g-s-tag-${e}`}let J=P?.baseID?.replace("gid://shopify/Product/","");return e("div",{className:s({"gp-opacity-0 ":"edit"!==N&&(A<=0||0>=Math.ceil(C/(A/100))),"gp-opacity-20 ":"edit"===N&&(A<=0||0>=Math.ceil(C/(A/100)))}),style:{...l("ta",v)},id:`shopify-text-element-${h?.uid}`,"data-product-id":J,children:P?e("div",{className:s("gp-inline-flex gp-flex-wrap gp-items-end gp-gap-3"),style:{},children:e("div",{className:s("gp-inline-block",z,B,G,b?.tagSpacing?.type?H(b?.tagSpacing?.type):""),style:{...p({bs:F?.border,bw:F?.width,bc:""===z?F?.color:void 0,c:""===B?M:void 0,bg:""===G?S:void 0}),...q?.radiusType!=="custom"?c("normal",q?.radiusType):{},...d("normal",q),...b?.tagSpacing?.type?{}:g(b?.tagSpacing?.custom)},children:t("div",{className:"gp-flex gp-break-all",children:[e(f,{styles:b,setting:{...y,text:$?.prefix?.replaceAll(" ","&nbsp;"),options:{useState:!0,uniqueId:`${h?.uid}-prefix`},excludeFlex:!0}}),e(f,{styles:b,setting:{...y,text:W,options:{isCannotEditing:!0},excludeFlex:!0}}),e(f,{styles:b,setting:{...y,text:$?.suffix?.replaceAll(" ","&nbsp;"),excludeFlex:!0,options:{useState:!0,uniqueId:`${h?.uid}-suffix`}}})]})})}):null})};export{ProductTag as default};
@@ -1,5 +1,5 @@
1
1
  import * as _gem_sdk_core from '@gem-sdk/core';
2
- import { BaseProps, TypographySettingV2, ObjectDevices, Background, SizeSettingGlobal, StateProp, ColorValueType, TypographySetting, Border, SizeSetting, CornerRadius, ShadowProps, BasePropsWrap, AlignProp, NameDevices, ResponsiveStateProp, Ratio, ObjectLayoutValue, TransformProp, PageContext, ProductProviderProps, JudgeMeReviewsWidgetType, LooxReviewsWidgetType, ProductReviewsWidgetType, RyviuWidgetType, RivyoWidgetType, VitalsWidgetType, OmnisendWidgetType, TrustooWidgetType, FeraReviewsWidgetType, FeraReviewsV3WidgetType, BoldSubscriptionsWidgetType, PickyStoryWidgetType, WiserWidgetType, StampedWidgetType, LaiProductReviewsWidgetType, LaiProductReviewsAdvancedWidgetType, GrowaveWidgetType, UltimateSalesBoostWidgetType, OpinewWidgetType, OpinewDesignWidgetType, YotpoReviewsWidgetType, AliReviewsWidgetType, InstantJudgeMeReviewsWidgetType, InstantLooxReviewsWidgetType, PostPurchaseTypo, AdvancedType, RawChild } from '@gem-sdk/core';
2
+ import { BaseProps, TypographySettingV2, ObjectDevices, Background, SizeSettingGlobal, StateProp, ColorValueType, TypographySetting, Border, SizeSetting, CornerRadius, ShadowProps, BasePropsWrap, AlignProp, Ratio, NameDevices, ResponsiveStateProp, ObjectLayoutValue, TransformProp, PageContext, ProductProviderProps, JudgeMeReviewsWidgetType, LooxReviewsWidgetType, ProductReviewsWidgetType, RyviuWidgetType, RivyoWidgetType, VitalsWidgetType, OmnisendWidgetType, TrustooWidgetType, FeraReviewsWidgetType, FeraReviewsV3WidgetType, BoldSubscriptionsWidgetType, PickyStoryWidgetType, WiserWidgetType, StampedWidgetType, LaiProductReviewsWidgetType, LaiProductReviewsAdvancedWidgetType, GrowaveWidgetType, UltimateSalesBoostWidgetType, OpinewWidgetType, OpinewDesignWidgetType, YotpoReviewsWidgetType, AliReviewsWidgetType, InstantJudgeMeReviewsWidgetType, InstantLooxReviewsWidgetType, PostPurchaseTypo, AdvancedType, RawChild } from '@gem-sdk/core';
3
3
  import { Property } from 'csstype';
4
4
  import * as keen_slider_react from 'keen-slider/react';
5
5
  import { KeenSliderInstance } from 'keen-slider/react';
@@ -75,9 +75,31 @@ declare const AccordionItem$1: React.FC<AccordionItemProps>;
75
75
 
76
76
  type BreadcrumbProps = BaseProps<{
77
77
  /**
78
- * List of Breadcrumb
78
+ * List of Breadcrumb demo
79
79
  */
80
80
  dataBreadcrumb?: string;
81
+ align?: ObjectDevices<AlignProp>;
82
+ background?: ObjectDevices<Background>;
83
+ }> & BasePropsWrap<{
84
+ iconSvg?: string;
85
+ }, {
86
+ /**
87
+ Set height icon
88
+ */
89
+ iconHeight?: string | number;
90
+ /**
91
+ Set the icon of component
92
+ */
93
+ iconSize?: ObjectDevices<Ratio>;
94
+ align?: ObjectDevices<AlignProp>;
95
+ iconWidth?: ObjectDevices<number>;
96
+ color?: StateProp<ColorValueType>;
97
+ iconBorder?: StateProp<Border>;
98
+ iconRotate?: number;
99
+ spin?: boolean;
100
+ iconRounded?: StateProp<CornerRadius>;
101
+ iconSpacing?: SizeSetting;
102
+ spacing?: ObjectDevices<string>;
81
103
  }> & {
82
104
  className?: string;
83
105
  style?: React.CSSProperties;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.895",
3
+ "version": "2.0.0-dev.898",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -21,7 +21,7 @@
21
21
  "format": "prettier --write \"./src/**/*.{ts,tsx}\""
22
22
  },
23
23
  "devDependencies": {
24
- "@gem-sdk/core": "2.0.0-dev.895",
24
+ "@gem-sdk/core": "2.0.0-dev.896",
25
25
  "@gem-sdk/styles": "2.0.0-dev.895",
26
26
  "@types/react-transition-group": "^4.4.5"
27
27
  },