@gem-sdk/components 8.0.0-staging.22 → 8.0.0-staging.24

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,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Text=require("../../../text/components/Text.js"),system=require("@gem-sdk/system"),classes=require("./common/classes.js"),attrs=require("./common/attrs.js"),helpers=require("./common/helpers.js"),useGpPrice=require("./hooks/useGpPrice.js"),core=require("@gem-sdk/core");const ProductPrice=e=>{let{style:s,children:r}=e,t=core.useEditorMode(),i="edit"===t,{elementRef:c,moneyFormatted:u,currentProductId:a,isNoComparePrice:m,isNoComparePriceILP:o,emitNoDataSignal:l}=useGpPrice.useGpPrice(e),n=system.createClass(classes.getWrapperClasses(e)),x=system.createAttr(attrs.getAttrs(e,a)),p=helpers.getTextProps(e,u),d={visibility:"hidden",opacity:0,maxWidth:0,maxHeight:0},j=o?d:s;return jsxRuntime.jsxs("div",{ref:c,...x,className:n,style:j,"aria-hidden":"true",onClick:l,children:[m&&i?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{className:"gp-flex-col gp-flex gp-justify-between gp-p-2",children:jsxRuntime.jsx("p",{className:"gp-text-[#212121] gp-text-[12px] gp-leading-3 ",children:"No compare price"})})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Text.default,{...p}),r]}),core.filterToolbarPreview(r,!0)]})};exports.default=ProductPrice;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Text=require("../../../text/components/Text.js"),system=require("@gem-sdk/system"),classes=require("./common/classes.js"),attrs=require("./common/attrs.js"),helpers=require("./common/helpers.js"),useGpPrice=require("./hooks/useGpPrice.js"),core=require("@gem-sdk/core");const ProductPrice=e=>{let{style:s,children:r}=e,t=core.useEditorMode(),i="edit"===t,{elementRef:c,moneyFormatted:u,currentProductId:o,isNoComparePrice:a,isNoComparePriceILP:m,shouldHiddenComparePrice:l,emitNoDataSignal:n}=useGpPrice.useGpPrice(e),x=system.createClass(classes.getWrapperClasses(e)),d=system.createAttr(attrs.getAttrs(e,{isILP:!i,productId:o,shouldHiddenComparePrice:l})),p=helpers.getTextProps(e,u),j={visibility:"hidden",opacity:0,maxWidth:0,maxHeight:0},g=m?j:s;return jsxRuntime.jsxs("div",{ref:c,...d,className:x,style:g,"aria-hidden":"true",onClick:n,children:[a&&i?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{className:"gp-flex-col gp-flex gp-justify-between gp-p-2",children:jsxRuntime.jsx("p",{className:"gp-text-[#212121] gp-text-[12px] gp-leading-3 ",children:"No compare price"})})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Text.default,{...p}),r]}),core.filterToolbarPreview(r,!0)]})};exports.default=ProductPrice;
@@ -1 +1 @@
1
- "use strict";var helpers=require("../../../../helpers.js");const getAttrs=(e,t)=>{let{builderAttrs:r,setting:a,builderProps:i}=e,p=a?.priceType==="compare";return helpers.filterTruthyObject({...r,id:`shopify-text-element-${i?.uid}`,"data-id":i?.uid,"data-product-id":t,"data-hidden":!!p&&"{% if variant.compare_at_price > variant.price and variant.compare_at_price >= 0 %}false{% else %}true{% endif %}"})};exports.getAttrs=getAttrs;
1
+ "use strict";var helpers=require("../../../../helpers.js");const getAttrs=(e,{isILP:t,productId:r,shouldHiddenComparePrice:a}={})=>{let{builderAttrs:i,setting:p,builderProps:s}=e,d=p?.priceType==="compare",c=()=>!!d&&(t?String(a):"{% if variant.compare_at_price > variant.price and variant.compare_at_price >= 0 %}false{% else %}true{% endif %}");return helpers.filterTruthyObject({...i,id:`shopify-text-element-${s?.uid}`,"data-id":s?.uid,"data-product-id":r,"data-hidden":c()})};exports.getAttrs=getAttrs;
@@ -1 +1 @@
1
- "use strict";const getWrapperClasses=s=>{let{builderProps:e,classNames:t,advanced:a}=s;return{"gp-product-price group-data-[state=loading]:gp-invisible data-[hidden=true]:gp-hidden":!0,...e?.uid&&{[e.uid]:!0},...a?.cssClass&&{[a.cssClass]:!0},...t&&{[t]:!0}}};exports.getWrapperClasses=getWrapperClasses;
1
+ "use strict";const getWrapperClasses=s=>{let{builderProps:e,classNames:t,advanced:a}=s;return{"gp-product-price group-data-[state=loading]:gp-invisible data-[hidden=true]:!gp-hidden":!0,...e?.uid&&{[e.uid]:!0},...a?.cssClass&&{[a.cssClass]:!0},...t&&{[t]:!0}}};exports.getWrapperClasses=getWrapperClasses;
@@ -1 +1 @@
1
- "use strict";var React=require("react"),common=require("../../product-variants/common/common.js"),core=require("@gem-sdk/core");const useGpPrice=e=>{let{setting:r,builderProps:t}=e,c=React.useRef(null),o=core.useEditorMode(),{quantity:u,hasUpdatePrice:i}=core.useQuantity(),a=core.useCurrentVariant(),{useProductCompareAtPrice:n}=core.useProductBundleDiscount(),s=e["bundle-item"],d=a?.price??0,p=a?.salePrice??0,l=r?.priceType==="compare",{trigger:m}=core.useInteraction(),g=core.useProduct(),y=g?.baseID?.replace("gid://shopify/Product/",""),P=core.useShopStore(e=>e.showPriceCurrency),h=React.useMemo(()=>s?.quantity?s.quantity:i&&u||1,[u,i,s?.quantity]),b=React.useMemo(()=>{let e=Number(s?.discountValue);return s?.discountType==="percentage"?d*h*e/100:e},[s?.discountType,s?.discountValue,d,h]),v=React.useMemo(()=>s?.discountValue?n?(p||d)*h:d*h:p*h,[s?.discountValue,d,h,p,n]),M=React.useMemo(()=>{let e=d*h;return l?v:b?Math.max(0,e-b):e},[d,h,b,v,l]),R=(e,r)=>{m({event:"price"===r?"gp:rollback:price-change":"gp:rollback:compare-price-change",selector:`[data-id="${t?.uid}"]`,element:c.current}),m({event:"price"===r?"gp:price-change":"gp:compare-price-change",data:e,selector:`[data-id="${t?.uid}"]`,element:c.current})};common.useTransition(e=>{e!==d&&R(d,"price")},[d]),common.useTransition(e=>{e!==p&&R(p,"compare")},[p]);let q=()=>{if("edit"!==o)return;let e=new CustomEvent("editor:product-source-no-data-warning",{bubbles:!0,detail:{uid:t?.uid,value:!M&&l,tag:"ProductPrice"}});window.dispatchEvent(e)},w=core.useFormatMoney(M??0,P||!1),T=l&&!M,V="edit"!==o&&T;return{elementRef:c,moneyFormatted:w,currentProductId:y,isNoComparePrice:T,isNoComparePriceILP:V,emitNoDataSignal:q}};exports.useGpPrice=useGpPrice;
1
+ "use strict";var React=require("react"),common=require("../../product-variants/common/common.js"),core=require("@gem-sdk/core");const useGpPrice=e=>{let{setting:r,builderProps:t}=e,c=React.useRef(null),o=core.useEditorMode(),{quantity:u,hasUpdatePrice:i}=core.useQuantity(),a=core.useCurrentVariant(),{useProductCompareAtPrice:n}=core.useProductBundleDiscount(),s=e["bundle-item"],d=a?.price??0,p=a?.salePrice??0,m=r?.priceType==="compare",{trigger:l}=core.useInteraction(),g=core.useProduct(),y=g?.baseID?.replace("gid://shopify/Product/",""),P=core.useShopStore(e=>e.showPriceCurrency),h=React.useMemo(()=>s?.quantity?s.quantity:i&&u||1,[u,i,s?.quantity]),b=React.useMemo(()=>{let e=Number(s?.discountValue);return s?.discountType==="percentage"?d*h*e/100:e},[s?.discountType,s?.discountValue,d,h]),M=React.useMemo(()=>s?.discountValue?n?(p||d)*h:d*h:p*h,[s?.discountValue,d,h,p,n]),R=React.useMemo(()=>{let e=d*h;return m?M:b?Math.max(0,e-b):e},[d,h,b,M,m]),v=React.useMemo(()=>!!m&&(!(p>d)||!(p>=0)),[m,p,d]),q=(e,r)=>{l({event:"price"===r?"gp:rollback:price-change":"gp:rollback:compare-price-change",selector:`[data-id="${t?.uid}"]`,element:c.current}),l({event:"price"===r?"gp:price-change":"gp:compare-price-change",data:e,selector:`[data-id="${t?.uid}"]`,element:c.current})};common.useTransition(e=>{e!==d&&q(d,"price")},[d]),common.useTransition(e=>{e!==p&&q(p,"compare")},[p]);let w=()=>{if("edit"!==o)return;let e=new CustomEvent("editor:product-source-no-data-warning",{bubbles:!0,detail:{uid:t?.uid,value:!R&&m,tag:"ProductPrice"}});window.dispatchEvent(e)},T=core.useFormatMoney(R??0,P||!1),V=m&&!R,f="edit"!==o&&V;return{elementRef:c,moneyFormatted:T,currentProductId:y,isNoComparePrice:V,isNoComparePriceILP:f,emitNoDataSignal:w,shouldHiddenComparePrice:v}};exports.useGpPrice=useGpPrice;
@@ -1 +1 @@
1
- "use strict";var rectangleList=require("../swatches-style-config/rectangle-list.js"),color=require("../swatches-style-config/color.js"),image=require("../swatches-style-config/image.js"),imageShopify=require("../swatches-style-config/image-shopify.js"),dropdown=require("../swatches-style-config/dropdown.js");const ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...color.colorPresetConfig,...rectangleList.rectangleListPresetConfig,...image.imagePresetConfig,...imageShopify.imageShopifyPresetConfig,...dropdown.dropdownPresetConfig}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"gp-cross-out-one-line"}]}]},{id:"options",type:"group",label:"Options",controls:[{id:"layout",label:"Layout",type:"option:illustration",iconViewBox:"0 0 66 45",enableItemBackground:!0,devices:{desktop:{default:"vertical"}},options:[{label:"Vertical",value:"vertical",type:"arrange",svgName:"gp-arrange-vertical"},{label:"Horizontal",value:"horizontal",type:"arrange",svgName:"gp-arrange-horizontal"}]},{id:"column",label:"Column",type:"select",devices:{desktop:{default:1}},options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}]}]},{id:"variantDisplay",type:"group",label:"Variant Display",controls:[{id:"hasPreSelected",type:"toggle",label:"hasPreSelected",default:!0},{id:"selectVariantDefault",type:"select-variant",label:"Select Default Variant",hide:!0}]},{id:"blankText",label:"Blank Option Text",type:"input",hide:!0,default:"Please select an option"},{id:"hasOnlyDefaultVariant",label:"Blank Option Text",type:"variant:default",hide:!0,default:!1}]},{id:"style",controls:[{id:"dimension",type:"group",label:"Variants Dimension",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",type:"input:unit",label:"Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"optionSpacing",label:"Option Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"30px"},{id:"labelGap",label:"Gap",type:"input:slider",units:["px"],ignoreMax:!0,max:40,default:"8px"}]},{id:"swatchDimension",type:"group",label:"Swatch Dimension",controls:[{id:"swatchAutoWidth",label:"Auto Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"swatchWidth",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"80px"}}},{id:"swatchHeight",type:"input:unit",label:"Height",placeholder:"Auto Height",min:0,units:["px"],devices:{desktop:{default:"45px"}}},{id:"swatchSpacing",label:"Swatch Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"var(--g-s-m)"},{id:"marginBottom",label:"Margin Bottom",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"16px"}}}]},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"labelGroup",type:"group",label:"Label",controls:[{id:"labelTypo",type:"typography-combo",label:"Typography",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0},custom:{fontFamily:"Assistant",letterSpacing:{desktop:"0.6px"}}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"labelColor",type:"color-picker-v2",label:"Text Color",default:"text-1"}]},{id:"labelGroup",type:"group",label:"Option Value",controls:[{id:"optionTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2"},compoDefaultValue:{attrs:{color:"text-2"}},hiddenSetting:{},ignoreReRender:!0}]},{id:"behavior-state",type:"behavior-state",label:"Option Value",controls:[{id:"optionBgColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF"},compoDefaultValue:{normal:"#FFFFFF",hover:"highlight",active:"highlight"},state:{active:!0,hover:!0,normal:!0}},{id:"optionTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{normal:"text-2"},state:{active:!0,hover:!0,normal:!0}},{id:"optionBorder",type:"border",label:"Border",default:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},compoDefaultValue:{normal:{borderType:"style-2",border:"solid",color:"line-2"}}},{id:"optionRounded",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},{id:"optionHasShadow",type:"toggle",default:{normal:!1}},{id:"optionShadow",type:"shadow-v2",label:"Shadow",default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45,enable:!1}},compoDefaultValue:{normal:{type:"shadow-1",enable:!0,distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45}}}]},{id:"dropdownItemWidth",type:"segment",label:"Dropdown Width",devices:{desktop:{default:"fill"},mobile:{default:"fill"},tablet:{default:"fill"}},options:[{label:"Fill",value:"fill"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"},mobile:{default:"240px"},tablet:{default:"240px"}}},{id:"swatchItemWidth",type:"segment",label:"Swatch Width",devices:{desktop:{default:"auto"}},options:[{label:"Fill",value:"auto"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"}}}]}];exports.ProductVariantSettings=ProductVariantSettings;
1
+ "use strict";var rectangleList=require("../swatches-style-config/rectangle-list.js"),color=require("../swatches-style-config/color.js"),image=require("../swatches-style-config/image.js"),imageShopify=require("../swatches-style-config/image-shopify.js"),dropdown=require("../swatches-style-config/dropdown.js");const ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...color.colorPresetConfig,...rectangleList.rectangleListPresetConfig,...image.imagePresetConfig,...imageShopify.imageShopifyPresetConfig,...dropdown.dropdownPresetConfig}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"gp-cross-out-one-line"}]}]},{id:"options",type:"group",label:"Options",controls:[{id:"layout",label:"Layout",type:"option:illustration",iconViewBox:"0 0 66 45",enableItemBackground:!0,devices:{desktop:{default:"vertical"}},options:[{label:"Vertical",value:"vertical",type:"arrange",svgName:"gp-arrange-vertical"},{label:"Horizontal",value:"horizontal",type:"arrange",svgName:"gp-arrange-horizontal"}]},{id:"column",label:"Column",type:"select",devices:{desktop:{default:1}},options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}]}]},{id:"variantDisplay",type:"group",label:"Variant Display",controls:[{id:"hasPreSelected",type:"toggle",label:"hasPreSelected",default:!0},{id:"selectVariantDefault",type:"select-variant",label:"Select Default Variant",hide:!0}]},{id:"blankText",label:"Blank Option Text",type:"input",hide:!0,default:"Please select an option"},{id:"hasOnlyDefaultVariant",label:"Blank Option Text",type:"variant:default",hide:!0,default:!1}]},{id:"style",controls:[{id:"dimension",type:"group",label:"Variants Dimension",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",type:"input:unit",label:"Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"optionSpacing",label:"Option Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"30px"},{id:"labelGap",label:"Gap",type:"input:slider",units:["px"],ignoreMax:!0,max:40,default:"8px"}]},{id:"swatchDimension",type:"group",label:"Swatch Dimension",controls:[{id:"swatchAutoWidth",label:"Auto Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"swatchWidth",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"80px"}}},{id:"swatchHeight",type:"input:unit",label:"Height",placeholder:"Auto Height",min:0,units:["px"],devices:{desktop:{default:"45px"}}},{id:"swatchSpacing",label:"Swatch Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"var(--g-s-m)"},{id:"marginBottom",label:"Margin Bottom",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"16px"}}}]},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"labelGroup",type:"group",label:"Label",controls:[{id:"labelTypo",type:"typography-combo",label:"Typography",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"labelColor",type:"color-picker-v2",label:"Text Color",default:"text-1"}]},{id:"labelGroup",type:"group",label:"Option Value",controls:[{id:"optionTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2"},compoDefaultValue:{attrs:{color:"text-2"}},hiddenSetting:{},ignoreReRender:!0}]},{id:"behavior-state",type:"behavior-state",label:"Option Value",controls:[{id:"optionBgColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF"},compoDefaultValue:{normal:"#FFFFFF",hover:"highlight",active:"highlight"},state:{active:!0,hover:!0,normal:!0}},{id:"optionTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{normal:"text-2"},state:{active:!0,hover:!0,normal:!0}},{id:"optionBorder",type:"border",label:"Border",default:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},compoDefaultValue:{normal:{borderType:"style-2",border:"solid",color:"line-2"}}},{id:"optionRounded",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},{id:"optionHasShadow",type:"toggle",default:{normal:!1}},{id:"optionShadow",type:"shadow-v2",label:"Shadow",default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45,enable:!1}},compoDefaultValue:{normal:{type:"shadow-1",enable:!0,distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45}}}]},{id:"dropdownItemWidth",type:"segment",label:"Dropdown Width",devices:{desktop:{default:"fill"},mobile:{default:"fill"},tablet:{default:"fill"}},options:[{label:"Fill",value:"fill"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"},mobile:{default:"240px"},tablet:{default:"240px"}}},{id:"swatchItemWidth",type:"segment",label:"Swatch Width",devices:{desktop:{default:"auto"}},options:[{label:"Fill",value:"auto"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"}}}]}];exports.ProductVariantSettings=ProductVariantSettings;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import o from"../../../text/components/Text.js";import{createClass as i,createAttr as m}from"@gem-sdk/system";import{getWrapperClasses as s}from"./common/classes.js";import{getAttrs as c}from"./common/attrs.js";import{getTextProps as p}from"./common/helpers.js";import{useGpPrice as l}from"./hooks/useGpPrice.js";import{useEditorMode as d,filterToolbarPreview as a}from"@gem-sdk/core";let ProductPrice=n=>{let{style:f,children:g}=n,h=d(),x="edit"===h,{elementRef:u,moneyFormatted:j,currentProductId:y,isNoComparePrice:P,isNoComparePriceILP:k,emitNoDataSignal:N}=l(n),v=i(s(n)),b=m(c(n,y)),w=p(n,j),C={visibility:"hidden",opacity:0,maxWidth:0,maxHeight:0},G=k?C:f;return e("div",{ref:u,...b,className:v,style:G,"aria-hidden":"true",onClick:N,children:[P&&x?r(t,{children:r("div",{className:"gp-flex-col gp-flex gp-justify-between gp-p-2",children:r("p",{className:"gp-text-[#212121] gp-text-[12px] gp-leading-3 ",children:"No compare price"})})}):e(t,{children:[r(o,{...w}),g]}),a(g,!0)]})};export{ProductPrice as default};
2
+ import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"../../../text/components/Text.js";import{createClass as i,createAttr as m}from"@gem-sdk/system";import{getWrapperClasses as s}from"./common/classes.js";import{getAttrs as c}from"./common/attrs.js";import{getTextProps as p}from"./common/helpers.js";import{useGpPrice as d}from"./hooks/useGpPrice.js";import{useEditorMode as l,filterToolbarPreview as a}from"@gem-sdk/core";let ProductPrice=n=>{let{style:f,children:h}=n,g=l(),x="edit"===g,{elementRef:u,moneyFormatted:j,currentProductId:P,isNoComparePrice:y,isNoComparePriceILP:k,shouldHiddenComparePrice:N,emitNoDataSignal:v}=d(n),b=i(s(n)),C=m(c(n,{isILP:!x,productId:P,shouldHiddenComparePrice:N})),H=p(n,j),I={visibility:"hidden",opacity:0,maxWidth:0,maxHeight:0},w=k?I:f;return e("div",{ref:u,...C,className:b,style:w,"aria-hidden":"true",onClick:v,children:[y&&x?r(o,{children:r("div",{className:"gp-flex-col gp-flex gp-justify-between gp-p-2",children:r("p",{className:"gp-text-[#212121] gp-text-[12px] gp-leading-3 ",children:"No compare price"})})}):e(o,{children:[r(t,{...H}),h]}),a(h,!0)]})};export{ProductPrice as default};
@@ -1 +1 @@
1
- import{filterTruthyObject as e}from"../../../../helpers.js";let getAttrs=(t,r)=>{let{builderAttrs:a,setting:i,builderProps:d}=t,p=i?.priceType==="compare";return e({...a,id:`shopify-text-element-${d?.uid}`,"data-id":d?.uid,"data-product-id":r,"data-hidden":!!p&&"{% if variant.compare_at_price > variant.price and variant.compare_at_price >= 0 %}false{% else %}true{% endif %}"})};export{getAttrs};
1
+ import{filterTruthyObject as e}from"../../../../helpers.js";let getAttrs=(t,{isILP:r,productId:a,shouldHiddenComparePrice:i}={})=>{let{builderAttrs:d,setting:p,builderProps:n}=t,c=p?.priceType==="compare",o=()=>!!c&&(r?String(i):"{% if variant.compare_at_price > variant.price and variant.compare_at_price >= 0 %}false{% else %}true{% endif %}");return e({...d,id:`shopify-text-element-${n?.uid}`,"data-id":n?.uid,"data-product-id":a,"data-hidden":o()})};export{getAttrs};
@@ -1 +1 @@
1
- let getWrapperClasses=e=>{let{builderProps:s,classNames:a,advanced:t}=e;return{"gp-product-price group-data-[state=loading]:gp-invisible data-[hidden=true]:gp-hidden":!0,...s?.uid&&{[s.uid]:!0},...t?.cssClass&&{[t.cssClass]:!0},...a&&{[a]:!0}}};export{getWrapperClasses};
1
+ let getWrapperClasses=e=>{let{builderProps:s,classNames:a,advanced:t}=e;return{"gp-product-price group-data-[state=loading]:gp-invisible data-[hidden=true]:!gp-hidden":!0,...s?.uid&&{[s.uid]:!0},...t?.cssClass&&{[t.cssClass]:!0},...a&&{[a]:!0}}};export{getWrapperClasses};
@@ -1 +1 @@
1
- import{useRef as e,useMemo as r}from"react";import{useTransition as t}from"../../product-variants/common/common.js";import{useEditorMode as c,useQuantity as i,useCurrentVariant as a,useProductBundleDiscount as n,useInteraction as o,useProduct as u,useShopStore as p,useFormatMoney as d}from"@gem-sdk/core";let useGpPrice=l=>{let{setting:m,builderProps:s}=l,g=e(null),b=c(),{quantity:h,hasUpdatePrice:y}=i(),P=a(),{useProductCompareAtPrice:v}=n(),f=l["bundle-item"],w=P?.price??0,V=P?.salePrice??0,k=m?.priceType==="compare",{trigger:q}=o(),T=u(),x=T?.baseID?.replace("gid://shopify/Product/",""),C=p(e=>e.showPriceCurrency),E=r(()=>f?.quantity?f.quantity:y&&h||1,[h,y,f?.quantity]),G=r(()=>{let e=Number(f?.discountValue);return f?.discountType==="percentage"?w*E*e/100:e},[f?.discountType,f?.discountValue,w,E]),$=r(()=>f?.discountValue?v?(V||w)*E:w*E:V*E,[f?.discountValue,w,E,V,v]),j=r(()=>{let e=w*E;return k?$:G?Math.max(0,e-G):e},[w,E,G,$,k]),D=(e,r)=>{q({event:"price"===r?"gp:rollback:price-change":"gp:rollback:compare-price-change",selector:`[data-id="${s?.uid}"]`,element:g.current}),q({event:"price"===r?"gp:price-change":"gp:compare-price-change",data:e,selector:`[data-id="${s?.uid}"]`,element:g.current})};t(e=>{e!==w&&D(w,"price")},[w]),t(e=>{e!==V&&D(V,"compare")},[V]);let I=()=>{if("edit"!==b)return;let e=new CustomEvent("editor:product-source-no-data-warning",{bubbles:!0,detail:{uid:s?.uid,value:!j&&k,tag:"ProductPrice"}});window.dispatchEvent(e)},M=d(j??0,C||!1),N=k&&!j,z="edit"!==b&&N;return{elementRef:g,moneyFormatted:M,currentProductId:x,isNoComparePrice:N,isNoComparePriceILP:z,emitNoDataSignal:I}};export{useGpPrice};
1
+ import{useRef as e,useMemo as r}from"react";import{useTransition as t}from"../../product-variants/common/common.js";import{useEditorMode as c,useQuantity as i,useCurrentVariant as a,useProductBundleDiscount as n,useInteraction as o,useProduct as u,useShopStore as p,useFormatMoney as d}from"@gem-sdk/core";let useGpPrice=l=>{let{setting:m,builderProps:s}=l,g=e(null),b=c(),{quantity:h,hasUpdatePrice:y}=i(),P=a(),{useProductCompareAtPrice:v}=n(),f=l["bundle-item"],w=P?.price??0,V=P?.salePrice??0,k=m?.priceType==="compare",{trigger:q}=o(),T=u(),x=T?.baseID?.replace("gid://shopify/Product/",""),C=p(e=>e.showPriceCurrency),E=r(()=>f?.quantity?f.quantity:y&&h||1,[h,y,f?.quantity]),G=r(()=>{let e=Number(f?.discountValue);return f?.discountType==="percentage"?w*E*e/100:e},[f?.discountType,f?.discountValue,w,E]),$=r(()=>f?.discountValue?v?(V||w)*E:w*E:V*E,[f?.discountValue,w,E,V,v]),j=r(()=>{let e=w*E;return k?$:G?Math.max(0,e-G):e},[w,E,G,$,k]),D=r(()=>!!k&&(!(V>w)||!(V>=0)),[k,V,w]),I=(e,r)=>{q({event:"price"===r?"gp:rollback:price-change":"gp:rollback:compare-price-change",selector:`[data-id="${s?.uid}"]`,element:g.current}),q({event:"price"===r?"gp:price-change":"gp:compare-price-change",data:e,selector:`[data-id="${s?.uid}"]`,element:g.current})};t(e=>{e!==w&&I(w,"price")},[w]),t(e=>{e!==V&&I(V,"compare")},[V]);let M=()=>{if("edit"!==b)return;let e=new CustomEvent("editor:product-source-no-data-warning",{bubbles:!0,detail:{uid:s?.uid,value:!j&&k,tag:"ProductPrice"}});window.dispatchEvent(e)},N=d(j??0,C||!1),z=k&&!j,A="edit"!==b&&z;return{elementRef:g,moneyFormatted:N,currentProductId:x,isNoComparePrice:z,isNoComparePriceILP:A,emitNoDataSignal:M,shouldHiddenComparePrice:D}};export{useGpPrice};
@@ -1 +1 @@
1
- import{rectangleListPresetConfig as e}from"../swatches-style-config/rectangle-list.js";import{colorPresetConfig as t}from"../swatches-style-config/color.js";import{imagePresetConfig as l}from"../swatches-style-config/image.js";import{imageShopifyPresetConfig as a}from"../swatches-style-config/image-shopify.js";import{dropdownPresetConfig as i}from"../swatches-style-config/dropdown.js";let ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...t,...e,...l,...a,...i}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"gp-cross-out-one-line"}]}]},{id:"options",type:"group",label:"Options",controls:[{id:"layout",label:"Layout",type:"option:illustration",iconViewBox:"0 0 66 45",enableItemBackground:!0,devices:{desktop:{default:"vertical"}},options:[{label:"Vertical",value:"vertical",type:"arrange",svgName:"gp-arrange-vertical"},{label:"Horizontal",value:"horizontal",type:"arrange",svgName:"gp-arrange-horizontal"}]},{id:"column",label:"Column",type:"select",devices:{desktop:{default:1}},options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}]}]},{id:"variantDisplay",type:"group",label:"Variant Display",controls:[{id:"hasPreSelected",type:"toggle",label:"hasPreSelected",default:!0},{id:"selectVariantDefault",type:"select-variant",label:"Select Default Variant",hide:!0}]},{id:"blankText",label:"Blank Option Text",type:"input",hide:!0,default:"Please select an option"},{id:"hasOnlyDefaultVariant",label:"Blank Option Text",type:"variant:default",hide:!0,default:!1}]},{id:"style",controls:[{id:"dimension",type:"group",label:"Variants Dimension",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",type:"input:unit",label:"Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"optionSpacing",label:"Option Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"30px"},{id:"labelGap",label:"Gap",type:"input:slider",units:["px"],ignoreMax:!0,max:40,default:"8px"}]},{id:"swatchDimension",type:"group",label:"Swatch Dimension",controls:[{id:"swatchAutoWidth",label:"Auto Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"swatchWidth",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"80px"}}},{id:"swatchHeight",type:"input:unit",label:"Height",placeholder:"Auto Height",min:0,units:["px"],devices:{desktop:{default:"45px"}}},{id:"swatchSpacing",label:"Swatch Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"var(--g-s-m)"},{id:"marginBottom",label:"Margin Bottom",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"16px"}}}]},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"labelGroup",type:"group",label:"Label",controls:[{id:"labelTypo",type:"typography-combo",label:"Typography",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0},custom:{fontFamily:"Assistant",letterSpacing:{desktop:"0.6px"}}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"labelColor",type:"color-picker-v2",label:"Text Color",default:"text-1"}]},{id:"labelGroup",type:"group",label:"Option Value",controls:[{id:"optionTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2"},compoDefaultValue:{attrs:{color:"text-2"}},hiddenSetting:{},ignoreReRender:!0}]},{id:"behavior-state",type:"behavior-state",label:"Option Value",controls:[{id:"optionBgColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF"},compoDefaultValue:{normal:"#FFFFFF",hover:"highlight",active:"highlight"},state:{active:!0,hover:!0,normal:!0}},{id:"optionTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{normal:"text-2"},state:{active:!0,hover:!0,normal:!0}},{id:"optionBorder",type:"border",label:"Border",default:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},compoDefaultValue:{normal:{borderType:"style-2",border:"solid",color:"line-2"}}},{id:"optionRounded",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},{id:"optionHasShadow",type:"toggle",default:{normal:!1}},{id:"optionShadow",type:"shadow-v2",label:"Shadow",default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45,enable:!1}},compoDefaultValue:{normal:{type:"shadow-1",enable:!0,distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45}}}]},{id:"dropdownItemWidth",type:"segment",label:"Dropdown Width",devices:{desktop:{default:"fill"},mobile:{default:"fill"},tablet:{default:"fill"}},options:[{label:"Fill",value:"fill"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"},mobile:{default:"240px"},tablet:{default:"240px"}}},{id:"swatchItemWidth",type:"segment",label:"Swatch Width",devices:{desktop:{default:"auto"}},options:[{label:"Fill",value:"auto"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"}}}]}];export{ProductVariantSettings};
1
+ import{rectangleListPresetConfig as e}from"../swatches-style-config/rectangle-list.js";import{colorPresetConfig as t}from"../swatches-style-config/color.js";import{imagePresetConfig as l}from"../swatches-style-config/image.js";import{imageShopifyPresetConfig as a}from"../swatches-style-config/image-shopify.js";import{dropdownPresetConfig as i}from"../swatches-style-config/dropdown.js";let ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...t,...e,...l,...a,...i}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"gp-cross-out-one-line"}]}]},{id:"options",type:"group",label:"Options",controls:[{id:"layout",label:"Layout",type:"option:illustration",iconViewBox:"0 0 66 45",enableItemBackground:!0,devices:{desktop:{default:"vertical"}},options:[{label:"Vertical",value:"vertical",type:"arrange",svgName:"gp-arrange-vertical"},{label:"Horizontal",value:"horizontal",type:"arrange",svgName:"gp-arrange-horizontal"}]},{id:"column",label:"Column",type:"select",devices:{desktop:{default:1}},options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}]}]},{id:"variantDisplay",type:"group",label:"Variant Display",controls:[{id:"hasPreSelected",type:"toggle",label:"hasPreSelected",default:!0},{id:"selectVariantDefault",type:"select-variant",label:"Select Default Variant",hide:!0}]},{id:"blankText",label:"Blank Option Text",type:"input",hide:!0,default:"Please select an option"},{id:"hasOnlyDefaultVariant",label:"Blank Option Text",type:"variant:default",hide:!0,default:!1}]},{id:"style",controls:[{id:"dimension",type:"group",label:"Variants Dimension",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",type:"input:unit",label:"Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"optionSpacing",label:"Option Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"30px"},{id:"labelGap",label:"Gap",type:"input:slider",units:["px"],ignoreMax:!0,max:40,default:"8px"}]},{id:"swatchDimension",type:"group",label:"Swatch Dimension",controls:[{id:"swatchAutoWidth",label:"Auto Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"swatchWidth",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"80px"}}},{id:"swatchHeight",type:"input:unit",label:"Height",placeholder:"Auto Height",min:0,units:["px"],devices:{desktop:{default:"45px"}}},{id:"swatchSpacing",label:"Swatch Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"var(--g-s-m)"},{id:"marginBottom",label:"Margin Bottom",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"16px"}}}]},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"labelGroup",type:"group",label:"Label",controls:[{id:"labelTypo",type:"typography-combo",label:"Typography",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"labelColor",type:"color-picker-v2",label:"Text Color",default:"text-1"}]},{id:"labelGroup",type:"group",label:"Option Value",controls:[{id:"optionTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2"},compoDefaultValue:{attrs:{color:"text-2"}},hiddenSetting:{},ignoreReRender:!0}]},{id:"behavior-state",type:"behavior-state",label:"Option Value",controls:[{id:"optionBgColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF"},compoDefaultValue:{normal:"#FFFFFF",hover:"highlight",active:"highlight"},state:{active:!0,hover:!0,normal:!0}},{id:"optionTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{normal:"text-2"},state:{active:!0,hover:!0,normal:!0}},{id:"optionBorder",type:"border",label:"Border",default:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},compoDefaultValue:{normal:{borderType:"style-2",border:"solid",color:"line-2"}}},{id:"optionRounded",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},{id:"optionHasShadow",type:"toggle",default:{normal:!1}},{id:"optionShadow",type:"shadow-v2",label:"Shadow",default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45,enable:!1}},compoDefaultValue:{normal:{type:"shadow-1",enable:!0,distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45}}}]},{id:"dropdownItemWidth",type:"segment",label:"Dropdown Width",devices:{desktop:{default:"fill"},mobile:{default:"fill"},tablet:{default:"fill"}},options:[{label:"Fill",value:"fill"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"},mobile:{default:"240px"},tablet:{default:"240px"}}},{id:"swatchItemWidth",type:"segment",label:"Swatch Width",devices:{desktop:{default:"auto"}},options:[{label:"Fill",value:"auto"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"}}}]}];export{ProductVariantSettings};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "8.0.0-staging.22",
3
+ "version": "8.0.0-staging.24",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",