@gem-sdk/components 2.0.0-staging.778 → 2.0.0-staging.779
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/collection/components/collection-description/common/classes.js +1 -1
- package/dist/cjs/grid/settings/Section.js +1 -1
- package/dist/cjs/product/settings/product-variant/configs/settings.js +1 -1
- package/dist/esm/collection/components/collection-description/common/classes.js +1 -1
- package/dist/esm/grid/settings/Section.js +1 -1
- package/dist/esm/product/settings/product-variant/configs/settings.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getClassContainerCollectionDes=({setting:e})=>{let s=core.composeTypographyClassName(e?.typo,e?.typography);return composeClasses(core.cls("gp-relative p-description-wrapper gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",s,core.getGlobalColorClass("text",e?.color),"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white"))},getClassButtonViewMore=({setting:e})=>{let s=core.composeTypographyClassName(e?.typo,e?.typography);return composeClasses(core.cls("p-description-show-more","gp-mt-4 hover:gp-opacity-80 gp-transition-all gp-w-full",s,core.getGlobalColorClass("text",e?.showMoreColor)))},getDescriptionClasses=({advanced:e})=>composeClasses(core.cls("gp-collection-description",e?.cssClass)),getShowMoreIconClasses=()=>composeClasses(core.cls("gp-show-more-icon gp-ml-1 gp-flex gp-items-center")),getShowMoreTextClasses=()=>composeClasses(core.cls("gp-show-more-text")),getClassPreBuilt=()=>composeClasses(core.cls("gp-rotate-180 gp-hidden")),composeClasses=e=>e.trim().split(/\s+/).reduce((e,s)=>(e[s]=!0,e),{});exports.getClassButtonViewMore=getClassButtonViewMore,exports.getClassContainerCollectionDes=getClassContainerCollectionDes,exports.getClassPreBuilt=getClassPreBuilt,exports.getDescriptionClasses=getDescriptionClasses,exports.getShowMoreIconClasses=getShowMoreIconClasses,exports.getShowMoreTextClasses=getShowMoreTextClasses;
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getClassContainerCollectionDes=({setting:e})=>{let s=core.composeTypographyClassName(e?.typo,e?.typography);return composeClasses(core.cls("gp-relative p-description-wrapper gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",s,core.getGlobalColorClass("text",e?.color),"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white"))},getClassButtonViewMore=({setting:e})=>{let s=core.composeTypographyClassName(e?.typo,e?.typography);return composeClasses(core.cls("p-description-show-more","gp-mt-4 hover:gp-opacity-80 gp-transition-all gp-w-full gp-items-center",s,core.getGlobalColorClass("text",e?.showMoreColor)))},getDescriptionClasses=({advanced:e})=>composeClasses(core.cls("gp-collection-description",e?.cssClass)),getShowMoreIconClasses=()=>composeClasses(core.cls("gp-show-more-icon gp-ml-1 gp-flex gp-items-center")),getShowMoreTextClasses=()=>composeClasses(core.cls("gp-show-more-text")),getClassPreBuilt=()=>composeClasses(core.cls("gp-rotate-180 gp-hidden")),composeClasses=e=>e.trim().split(/\s+/).reduce((e,s)=>(e[s]=!0,e),{});exports.getClassButtonViewMore=getClassButtonViewMore,exports.getClassContainerCollectionDes=getClassContainerCollectionDes,exports.getClassPreBuilt=getClassPreBuilt,exports.getDescriptionClasses=getDescriptionClasses,exports.getShowMoreIconClasses=getShowMoreIconClasses,exports.getShowMoreTextClasses=getShowMoreTextClasses;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Row=require("./Row.js"),settings=require("./configs/section/settings.js"),uiV1=require("./configs/section/ui-v1.js"),uiV2=require("./configs/section/ui-v2.js");const config={...Row.default,tag:"Section",label:"Section",settings:settings.SectionSettings,ui:uiV1.SettingUIV1,uiV2:uiV2.SettingUIV2,init:[{tag:"Section",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{enablePagePadding:{desktop:!1,tablet:!1,mobile:!1}},advanced:{blockPadding:"base","spacing-setting":{desktop:{padding:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)"}}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Row=require("./Row.js"),settings=require("./configs/section/settings.js"),uiV1=require("./configs/section/ui-v1.js"),uiV2=require("./configs/section/ui-v2.js");const config={...Row.default,tag:"Section",label:"Section",settings:settings.SectionSettings,ui:uiV1.SettingUIV1,uiV2:uiV2.SettingUIV2,init:[{tag:"Section",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{enablePagePadding:{desktop:!1,tablet:!1,mobile:!1}},advanced:{blockPadding:"base","spacing-setting":{desktop:{padding:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)"}}}},childrens:[{tag:"Col",childrens:[]}]}],advanced:{blockPadding:"base","spacing-setting":{desktop:{padding:{top:"30px",bottom:"30px"}},mobile:{padding:{top:"20px",bottom:"20px"}}}},editorConfigs:{sideBar:{hide:!0},toolbar:{parent:!0}}};exports.default=config;
|
|
@@ -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:"
|
|
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"},mobile:{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-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0},custom:{fontFamily:"Assistant",letterSpacing:"0px"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"labelColor",type:"color-picker-v2",label:"Text Color",default:"text-2"}]},{id:"labelGroup",type:"group",label:"Option Value",controls:[{id:"optionTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2"},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0}]},{id:"behavior-state",type:"behavior-state",label:"Option Value",controls:[{id:"optionBgColor",type:"color-picker-v2",label:"Background Color",default:{normal:"bg-3"},state:{active:!0,hover:!0,normal:!0}},{id:"optionTextColor",type:"color-picker-v2",label:"Text Color",default:{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"}},state:{active:!0,hover:!0,normal:!0}},{id:"optionRounded",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},active:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},state:{active:!0,hover:!0,normal:!0}},{id:"optionHasShadow",type:"toggle",label:"Shadow Enable",default:{normal:!1,hover:!1,active:!1},state:{normal:!0,hover:!0,active:!0}},{id:"optionShadow",type:"shadow-v2",label:"Shadow",hideOnState:{normal:!0,hover:!0,active:!0},default:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1},hover:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1},active:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}},state:{normal:!0,hover:!0,active:!0}}]},{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 +1 @@
|
|
|
1
|
-
import{composeTypographyClassName as e,cls as s,getGlobalColorClass as t}from"@gem-sdk/core";let getClassContainerCollectionDes=({setting:r})=>{let a=e(r?.typo,r?.typography);return composeClasses(s("gp-relative p-description-wrapper gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",a,t("text",r?.color),"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white"))},getClassButtonViewMore=({setting:r})=>{let a=e(r?.typo,r?.typography);return composeClasses(s("p-description-show-more","gp-mt-4 hover:gp-opacity-80 gp-transition-all gp-w-full",a,t("text",r?.showMoreColor)))},getDescriptionClasses=({advanced:e})=>composeClasses(s("gp-collection-description",e?.cssClass)),getShowMoreIconClasses=()=>composeClasses(s("gp-show-more-icon gp-ml-1 gp-flex gp-items-center")),getShowMoreTextClasses=()=>composeClasses(s("gp-show-more-text")),getClassPreBuilt=()=>composeClasses(s("gp-rotate-180 gp-hidden")),composeClasses=e=>e.trim().split(/\s+/).reduce((e,s)=>(e[s]=!0,e),{});export{getClassButtonViewMore,getClassContainerCollectionDes,getClassPreBuilt,getDescriptionClasses,getShowMoreIconClasses,getShowMoreTextClasses};
|
|
1
|
+
import{composeTypographyClassName as e,cls as s,getGlobalColorClass as t}from"@gem-sdk/core";let getClassContainerCollectionDes=({setting:r})=>{let a=e(r?.typo,r?.typography);return composeClasses(s("gp-relative p-description-wrapper gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",a,t("text",r?.color),"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white"))},getClassButtonViewMore=({setting:r})=>{let a=e(r?.typo,r?.typography);return composeClasses(s("p-description-show-more","gp-mt-4 hover:gp-opacity-80 gp-transition-all gp-w-full gp-items-center",a,t("text",r?.showMoreColor)))},getDescriptionClasses=({advanced:e})=>composeClasses(s("gp-collection-description",e?.cssClass)),getShowMoreIconClasses=()=>composeClasses(s("gp-show-more-icon gp-ml-1 gp-flex gp-items-center")),getShowMoreTextClasses=()=>composeClasses(s("gp-show-more-text")),getClassPreBuilt=()=>composeClasses(s("gp-rotate-180 gp-hidden")),composeClasses=e=>e.trim().split(/\s+/).reduce((e,s)=>(e[s]=!0,e),{});export{getClassButtonViewMore,getClassContainerCollectionDes,getClassPreBuilt,getDescriptionClasses,getShowMoreIconClasses,getShowMoreTextClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"./Row.js";import{SectionSettings as o}from"./configs/section/settings.js";import{SettingUIV1 as i}from"./configs/section/ui-v1.js";import{SettingUIV2 as s}from"./configs/section/ui-v2.js";let config={...t,tag:"Section",label:"Section",settings:o,ui:i,uiV2:s,init:[{tag:"Section",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{enablePagePadding:{desktop:!1,tablet:!1,mobile:!1}},advanced:{blockPadding:"base","spacing-setting":{desktop:{padding:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)"}}
|
|
1
|
+
import t from"./Row.js";import{SectionSettings as o}from"./configs/section/settings.js";import{SettingUIV1 as i}from"./configs/section/ui-v1.js";import{SettingUIV2 as s}from"./configs/section/ui-v2.js";let config={...t,tag:"Section",label:"Section",settings:o,ui:i,uiV2:s,init:[{tag:"Section",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{enablePagePadding:{desktop:!1,tablet:!1,mobile:!1}},advanced:{blockPadding:"base","spacing-setting":{desktop:{padding:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)"}}}},childrens:[{tag:"Col",childrens:[]}]}],advanced:{blockPadding:"base","spacing-setting":{desktop:{padding:{top:"30px",bottom:"30px"}},mobile:{padding:{top:"20px",bottom:"20px"}}}},editorConfigs:{sideBar:{hide:!0},toolbar:{parent:!0}}};export{config as default};
|
|
@@ -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:"
|
|
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"},mobile:{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-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0},custom:{fontFamily:"Assistant",letterSpacing:"0px"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"labelColor",type:"color-picker-v2",label:"Text Color",default:"text-2"}]},{id:"labelGroup",type:"group",label:"Option Value",controls:[{id:"optionTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2"},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0}]},{id:"behavior-state",type:"behavior-state",label:"Option Value",controls:[{id:"optionBgColor",type:"color-picker-v2",label:"Background Color",default:{normal:"bg-3"},state:{active:!0,hover:!0,normal:!0}},{id:"optionTextColor",type:"color-picker-v2",label:"Text Color",default:{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"}},state:{active:!0,hover:!0,normal:!0}},{id:"optionRounded",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},active:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},state:{active:!0,hover:!0,normal:!0}},{id:"optionHasShadow",type:"toggle",label:"Shadow Enable",default:{normal:!1,hover:!1,active:!1},state:{normal:!0,hover:!0,active:!0}},{id:"optionShadow",type:"shadow-v2",label:"Shadow",hideOnState:{normal:!0,hover:!0,active:!0},default:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1},hover:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1},active:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}},state:{normal:!0,hover:!0,active:!0}}]},{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};
|