@gem-sdk/components 2.0.0-staging.987 → 2.0.0-staging.989
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/button/common/styles.js +1 -1
- package/dist/cjs/coupon/common/styles.js +12 -12
- package/dist/cjs/coupon/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/hero-banner/common/helpers.js +1 -1
- package/dist/cjs/product/components/dynamic-checkout/common/styles.js +2 -2
- package/dist/cjs/product/settings/product-variant/configs/presets.js +2 -2
- package/dist/cjs/third-party/components/ThirdPartyPreview.js +1 -1
- package/dist/esm/button/common/styles.js +3 -3
- package/dist/esm/coupon/common/styles.js +12 -12
- package/dist/esm/coupon/settings/configs/ui-v2.js +1 -1
- package/dist/esm/hero-banner/common/helpers.js +1 -1
- package/dist/esm/product/components/dynamic-checkout/common/styles.js +2 -2
- package/dist/esm/product/settings/product-variant/configs/presets.js +2 -2
- package/dist/esm/third-party/components/ThirdPartyPreview.js +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getButtonWrapperStyles=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getButtonStyles=(e,t)=>{let o={...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle};return t?o:core.filterHoverVariables(o)},getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.enable !== undefined");return{...core.getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},"value?.
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getButtonWrapperStyles=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getButtonStyles=(e,t)=>{let o={...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle};return t?o:core.filterHoverVariables(o)},getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.enable !== undefined");return{...core.getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},"value?.radiusType !== undefined");return core.composeRadius(t)},getIconSpacingStyle=(e,t)=>{let o=e?.iconSpacing||{desktop:"8px"};return t?.iconAlign==="left"?core.makeStyleResponsive("mr",o):core.makeStyleResponsive("ml",o)},getSizeStyles=e=>{let t=core.makeGlobalSize(e?.globalSize);return{...t.width,...t.height,...t.padding}},getTypographyStyles=e=>{let t=core.composeTypographyStyle(e?.typo,e?.typography),o={"--c":t?.["--c"]},r={...t};return delete r["--c"],{textColorStyle:{"--hvr-c":core.getColor(e?.textColor?.hover),...o},withoutTextColorStyles:r}},getTypoStyles=e=>({...getTypographyStyles(e).withoutTextColorStyles,...core.getStyleShadow({styleAppliedFor:"text-shadow",value:e?.typo?.custom?.textShadow,isEnableShadow:e?.typo?.custom?.hasShadowText}),"word-break":"break-word"}),getBgImageUrl=(e,t)=>{let{backgroundImage:o,backgroundColorV2:r}=e||{},s=o?.[t],a=r?.[t];if(!s&&!a)return"";let l=`url(${s?.image?.src})`,n=a?`, ${a}`:"";return a?.includes(core.GRADIENT_BGR_KEY)&&s?.image?.src?`${l}${n}`:a?.includes(core.GRADIENT_BGR_KEY)&&!s?.image?.src?a:s?.image?.src?l:""},getBackgroundImageSource=e=>{let t={normal:getBgImageUrl(e,"normal"),hover:getBgImageUrl(e,"hover")};return core.makeStyleState("bgi",t)},getBackgroundStyles=e=>{let{backgroundColorV2:t,backgroundImage:o}=e||{},r={...o,hover:o?.hover||o?.normal},s={...t,hover:t?.hover||t?.normal};return{...core.getStyleBackgroundImage(r,{ignoreBackgroundImage:!0}),...getBackgroundImageSource({backgroundImage:r,backgroundColorV2:s}),...core.getGlobalColorStateStyle("bg",t)}},getCustomCssStyles=({styles:e,uid:t,builderAttrs:o,enableHoverEffect:r})=>{if(!t)return"";let{borderBtnV2:s,roundedBtnV2:a}=e??{},l=ignoreStateNoneValue(s||{},'value?.borderType !== "none"'),n=ignoreStateNoneValue(a||{},"value?.radiusType !== undefined"),g=generateBorderCornerStyles({uid:t,borderBtn:l,roundedBtn:n,builderAttrs:o,enableHoverEffect:r});return`
|
|
2
2
|
${g.normalStyles}
|
|
3
3
|
${g.hoverStyles}
|
|
4
4
|
`.trim()},generateBorderCornerStyles=({uid:e,borderBtn:t,roundedBtn:o,builderAttrs:r,enableHoverEffect:s})=>{let a=r?.["data-component-tag"],l=({styleObj:e,state:t})=>{if(e)return e?.[t]},n=l({styleObj:t,state:"normal"}),g=l({styleObj:s?t:void 0,state:"hover"}),d=l({styleObj:o,state:"normal"}),i=l({styleObj:o,state:"hover"}),u=`
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getButtonStyles=(e,t)=>{let o=JSON.parse(JSON.stringify(e||{}));return delete o?.borderBtnV2?.normal?.borderType,delete o?.borderBtnV2?.hover?.borderType,delete o?.borderBtnV2?.active?.borderType,{...o,enableTextStyle:!0,...t&&{boxShadowBtn:{...o?.boxShadowBtn,focus:void 0}}}},getButtonStyle=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getInnerBorderCornerCss=e=>{let{uid:t,styles:o}=e
|
|
2
|
-
|
|
3
|
-
.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getButtonStyles=(e,t)=>{let o=JSON.parse(JSON.stringify(e||{}));return delete o?.borderBtnV2?.normal?.borderType,delete o?.borderBtnV2?.hover?.borderType,delete o?.borderBtnV2?.active?.borderType,{...o,enableTextStyle:!0,...t&&{boxShadowBtn:{...o?.boxShadowBtn,focus:void 0}}}},getButtonStyle=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getInnerBorderCornerCss=e=>{let{uid:t,styles:o}=e;if(!t||!o)return"";let{borderBtnV2:r,roundedBtnV2:n,boxShadowBtn:a}=o,s=e=>e?core.getStyleShadow({value:e,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:!0})["--shadow"]:"none",d=a?.active?.enable!==void 0?s(a?.active??{}):"",c={desktop:"",tablet:"@media only screen and (max-width: 1024px) and (min-width: 768px)",mobile:"@media only screen and (max-width: 768px)"},i=e=>{let o=c[e],a=!!o,s=`
|
|
2
|
+
.gp-coupon[data-active="true"] .${t}::before {
|
|
3
|
+
${core.composeBorderCss(r?.active,{important:!0})};
|
|
4
|
+
${core.composeCornerCss(n?.active,!0)};
|
|
5
|
+
box-shadow: ${d} !important;
|
|
6
|
+
}
|
|
7
|
+
.gp-coupon[data-active="true"] .${t} {
|
|
8
|
+
${core.composeCornerCss(n?.active,!0)};
|
|
9
|
+
}
|
|
10
|
+
`.trim();return a?`${o} {
|
|
11
|
+
${s}
|
|
12
|
+
}`:s};return i("desktop")},getInnerActiveStyles=e=>`
|
|
13
13
|
.gp-coupon[data-active="true"] button {
|
|
14
14
|
background-color: ${e?.backgroundColorV2?.active||""};
|
|
15
15
|
color: ${e?.textColor?.active||""};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Styled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Hover"},controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableActiveEffect"},popoverLabel:{en:"Clicked"},controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"focus"},options:{updateFields:[{field:"focus.enable",settingId:"hasBoxShadowBtn",state:"focus"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.focus.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"focus",newValue:!0}},{condition:"boxShadowBtn.focus.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"focus",newValue:!1}}],options:{noRecordHistory:!0}}}]}]}]},{conditionDisplay:"globalSize.width !== '100%'",controls:[{label:{en:"Align"},type:"control",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];exports.SettingUIV2=SettingUIV2;
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Styled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Hover"},state:"hover",controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableActiveEffect"},popoverLabel:{en:"Clicked"},state:"active",controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"focus"},options:{updateFields:[{field:"focus.enable",settingId:"hasBoxShadowBtn",state:"focus"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.focus.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"focus",newValue:!0}},{condition:"boxShadowBtn.focus.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"focus",newValue:!1}}],options:{noRecordHistory:!0}}}]}]}]},{conditionDisplay:"globalSize.width !== '100%'",controls:[{label:{en:"Align"},type:"control",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../image/common/helpers.js"),constant=require("../../constant.js");const getContentPosition=(e,t,o)=>{let l={};return core.DEVICES.map(n=>{let i=core.getResponsiveValueByScreen(e,n),a=core.getResponsiveValueByScreen(t,n),s=core.getResponsiveValueByScreen(o,n);l={...l,[n]:1>=(i?.cols?.length||1)?a:s}}),l},getAspectRatioSettings=(e,t)=>{let o={desktop:e?.desktop?.width,tablet:e?.tablet?.width,mobile:e?.mobile?.width},l={desktop:e?.desktop?.height,tablet:e?.tablet?.height,mobile:e?.mobile?.height},n={desktop:t?.desktop==="custom"?`${core.getResponsiveValueByScreen(o,"desktop")}/${core.getResponsiveValueByScreen(l,"desktop")}`:t?.desktop==="cover"?"unset":t?.desktop,tablet:t?.tablet==="custom"?`${core.getResponsiveValueByScreen(o,"tablet")}/${core.getResponsiveValueByScreen(l,"tablet")}`:t?.tablet==="cover"?"unset":t?.tablet,mobile:t?.mobile==="custom"?`${core.getResponsiveValueByScreen(o,"mobile")}/${core.getResponsiveValueByScreen(l,"mobile")}`:t?.mobile==="cover"?"unset":t?.mobile};return n},getEnableBgImageByDevice=(e,t)=>{if(!core.getResponsiveValueByScreen(getBgImage(t),e))return!1;if(!t?.[e]){if("mobile"===e)return t?.tablet?.type==="image"||t?.desktop?.type==="image"&&!t?.tablet;if("tablet"===e)return t?.desktop?.type==="image"}return t?.[e]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:helpers.createBlurDataURL(t?.desktop?.width??0,t?.desktop?.height??0),tablet:helpers.createBlurDataURL(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:helpers.createBlurDataURL(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(e,t,o,l)=>{if(!e)return"";let n=getBgImage(e),i=core.getResponsiveValueByScreen(e,t),a=o?`url(${imagePlaceholder(e)[t]})`:`url(${helpers.getImageSrc(core.getResponsiveValueByScreen(n,t),t,l)})`,s=i?.color?`, ${i.color}`:"";return i?.color?.includes(core.GRADIENT_BGR_KEY)&&i?.type==="image"?`${a}${s}`:i?.color?.includes(core.GRADIENT_BGR_KEY)&&i?.type!=="image"?`${i.color}`:i?.type==="image"?a:"url()"},getBackgroundImageHeroBanner=(e,t=!1,o=!1)=>{if(!e)return;let l={};return core.DEVICES.forEach(n=>{l={...l,[n]:getBgImageByScreen(e,n,t,o)}}),core.makeStyleResponsive("bgi",l)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(e,t,o)=>{let l=core.getAspectRatioGlobalSize(t),n=["desktop","mobile","tablet"];return n.forEach(n=>{let i=core.getResponsiveValueByScreen(t,n),a=!!getDataVideoHeroBannerResponsive(n,e),s=i?.shape,r=i?.height,g="original"===s&&"fit-content"!==r,p=g&&a;p&&(l={...l,[n]:"16/9"}),o&&o[n]&&getDataVideoHeroBannerResponsive(n,e)?.data?.videoType==="html5"&&(l={...l,[n]:o[n]})}),core.makeStyleResponsive("aspect",l)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(e,t)=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let n=core.getResponsiveValueByScreen(e,l),i=!!getDataVideoHeroBannerResponsive(l,t),a=n?.shape,s=n?.height,r="original"===a&&"fit-content"!==s&&!i;o={...o,[l]:r?"block":"none"}}),core.makeStyleResponsive("d",o)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,n=-l;if(o<n)return 0;if(o>t)return 100;let i=(o-n)/(t-n)*100;return Math.min(Math.max(i,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let o={},l=["desktop","mobile","tablet"];return l.forEach(l=>{let n=isScaleImage({enableParallax:t,attachment:e[l]?.attachment});o={...o,[l]:t?"150%":n?"100vh":"100%"}}),core.makeStyleResponsive("h",o)},getWidthHeroBanner=(e,t)=>{let o={},l=["desktop","mobile","tablet"];return l.forEach(l=>{let n=isScaleImage({enableParallax:t,attachment:e[l]?.attachment});o={...o,[l]:n?"100vw":"100%"}}),core.makeStyleResponsive("w",o)},getTopHeroBanner=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),core.makeStyleResponsive("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),n=getTopHeroBanner(e);return{...o,...l,...n}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,n=t;if(t>o?l=o:n=o,e>=999){let t=e-l;return t>0?t:0}let i=e-n;return i>0?i:0},getClipPath=(e,t)=>{if(!t||!e)return"inset(0 0 0)";let[o,l,n,i]=e.split(" ").map(e=>parseInt(e??"0")),{btlr:a,btrr:s,bbrr:r,bblr:g}=t,p=calcRounderClipPath(parseInt(a??"0"),o,i),c=calcRounderClipPath(parseInt(s??"0"),o,l),b=calcRounderClipPath(parseInt(r??"0"),l,n),m=calcRounderClipPath(parseInt(g??"0"),n,i);return`inset(0 0 0 round ${p}px ${c}px ${b}px ${m}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),n=getResponsiveSetting(t),i=getResponsiveSetting(o),a=1>=(l?.desktop?.cols?.length||1)?n.desktop:i.desktop,s=1>=(l?.tablet?.cols?.length||1)?n.tablet:i.tablet,r=1>=(l?.mobile?.cols?.length||1)?n.mobile:i.mobile;return{"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between":l.desktop?.cols?.length===1&&"space-between"===a,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===a,"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between":l.tablet?.cols?.length===1&&"space-between"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===s,"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between":l.mobile?.cols?.length===1&&"space-between"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===r}},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",n=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"!gp-h-full [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":n}},getClassForStretchContent=e=>{let t={desktop:"none",tablet:"none",mobile:"none"},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=core.getResponsiveValueByScreen(e,o);t={...t,[o]:l}}),core.cls("space-between"===t.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===t.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===t.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},getClassForContentByFitContent=(e,t)=>{let o={desktop:!1,tablet:!1,mobile:!1},l=["desktop","mobile","tablet"];return l.forEach(l=>{let n=core.getResponsiveValueByScreen(e,l),i=!!getDataVideoHeroBannerResponsive(l,t),a=n?.shape,s=n?.height,r="original"===a&&"fit-content"!==s;o={...o,[l]:r&&!i}}),core.cls(o.desktop?"!gp-absolute":"",o.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",o.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,n=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[n||"center"]}`]:!!n}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>core.DEVICES.some(t=>{let o=core.getValueByDevice(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}const fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:constant.HREF_TO_SALES_PAGE,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o,hoverEffect:l}=e??{},n=!t?.normal||o?.normal=="0%"||!o?.normal,i=!t?.hover||o?.hover=="0%"||!l||!o?.hover;return{disableOpacity:n,disableHoverOpacity:i}};exports.debounce=debounce,exports.fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",exports.formatHoverScale=formatHoverScale,exports.getAspectRatioSettings=getAspectRatioSettings,exports.getAttachmentDevice=getAttachmentDevice,exports.getBackgroundImageHeroBanner=getBackgroundImageHeroBanner,exports.getBannerLink=getBannerLink,exports.getBgImage=getBgImage,exports.getClassAlignBanner=getClassAlignBanner,exports.getClassContentPosition=getClassContentPosition,exports.getClassForContentByFitContent=getClassForContentByFitContent,exports.getClassForStretchContent=getClassForStretchContent,exports.getClassSpaceBetween=getClassSpaceBetween,exports.getClassSpaceBetweenLeftRight=getClassSpaceBetweenLeftRight,exports.getClipPath=getClipPath,exports.getContentPosition=getContentPosition,exports.getDataVideoHeroBannerResponsive=getDataVideoHeroBannerResponsive,exports.getDisplayStyleByFitContent=getDisplayStyleByFitContent,exports.getEnableBgImageByDevice=getEnableBgImageByDevice,exports.getPercentageVisible=getPercentageVisible,exports.getResponsiveSetting=getResponsiveSetting,exports.getStyleAspectRatioHeroBannerCustom=getStyleAspectRatioHeroBannerCustom,exports.getStyleHeroBannerBg=getStyleHeroBannerBg,exports.getVisibilityStyle=getVisibilityStyle,exports.getWidth=getWidth,exports.horizontalAlign=horizontalAlign,exports.imagePlaceholder=imagePlaceholder,exports.isScaleImage=isScaleImage,exports.mapContentPositionToHorizontal=mapContentPositionToHorizontal,exports.opacityEnabledData=opacityEnabledData,exports.scrollToContentBanner=scrollToContentBanner,exports.showVideoType=showVideoType;
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../image/common/helpers.js"),constant=require("../../constant.js");const getContentPosition=(e,t,o)=>{let l={};return core.DEVICES.map(i=>{let n=core.getResponsiveValueByScreen(e,i),a=core.getResponsiveValueByScreen(t,i),s=core.getResponsiveValueByScreen(o,i);l={...l,[i]:1>=(n?.cols?.length||1)?a:s}}),l},getAspectRatioSettings=(e,t)=>{let o={desktop:e?.desktop?.width,tablet:e?.tablet?.width,mobile:e?.mobile?.width},l={desktop:e?.desktop?.height,tablet:e?.tablet?.height,mobile:e?.mobile?.height},i={desktop:t?.desktop==="custom"?`${core.getResponsiveValueByScreen(o,"desktop")}/${core.getResponsiveValueByScreen(l,"desktop")}`:t?.desktop==="cover"?"unset":t?.desktop,tablet:t?.tablet==="custom"?`${core.getResponsiveValueByScreen(o,"tablet")}/${core.getResponsiveValueByScreen(l,"tablet")}`:t?.tablet==="cover"?"unset":t?.tablet,mobile:t?.mobile==="custom"?`${core.getResponsiveValueByScreen(o,"mobile")}/${core.getResponsiveValueByScreen(l,"mobile")}`:t?.mobile==="cover"?"unset":t?.mobile};return i},getEnableBgImageByDevice=(e,t)=>{if(!core.getResponsiveValueByScreen(getBgImage(t),e))return!1;if(!t?.[e]){if("mobile"===e)return t?.tablet?.type==="image"||t?.desktop?.type==="image"&&!t?.tablet;if("tablet"===e)return t?.desktop?.type==="image"}return t?.[e]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:helpers.createBlurDataURL(t?.desktop?.width??0,t?.desktop?.height??0),tablet:helpers.createBlurDataURL(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:helpers.createBlurDataURL(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(e,t,o,l)=>{if(!e)return"";let i=getBgImage(e),n=core.getResponsiveValueByScreen(e,t),a=o?`url(${imagePlaceholder(e)[t]})`:`url(${helpers.getImageSrc(core.getResponsiveValueByScreen(i,t),t,l)})`,s=n?.color?`, ${n.color}`:"";return n?.color?.includes(core.GRADIENT_BGR_KEY)&&n?.type==="image"?`${a}${s}`:n?.color?.includes(core.GRADIENT_BGR_KEY)&&n?.type!=="image"?`${n.color}`:n?.type==="image"?a:"url()"},getBackgroundImageHeroBanner=(e,t=!1,o=!1)=>{if(!e)return;let l={};return core.DEVICES.forEach(i=>{l={...l,[i]:getBgImageByScreen(e,i,t,o)}}),core.makeStyleResponsive("bgi",l)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(e,t,o)=>{let l=core.getAspectRatioGlobalSize(t),i=["desktop","mobile","tablet"];return i.forEach(i=>{let n=core.getResponsiveValueByScreen(t,i),a=!!getDataVideoHeroBannerResponsive(i,e),s=n?.shape,r=n?.height,g="original"===s&&"fit-content"!==r,p=g&&a;p&&(l={...l,[i]:"16/9"}),o&&o[i]&&getDataVideoHeroBannerResponsive(i,e)?.data?.videoType==="html5"&&(l={...l,[i]:o[i]})}),core.makeStyleResponsive("aspect",l)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(e,t)=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=core.getResponsiveValueByScreen(e,l),n=!!getDataVideoHeroBannerResponsive(l,t),a=i?.shape,s=i?.height,r="original"===a&&"fit-content"!==s&&!n;o={...o,[l]:r?"block":"none"}}),core.makeStyleResponsive("d",o)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,i=-l;if(o<i)return 0;if(o>t)return 100;let n=(o-i)/(t-i)*100;return Math.min(Math.max(n,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let o={},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=isScaleImage({enableParallax:t,attachment:e[l]?.attachment});o={...o,[l]:t?"150%":i?"100vh":"100%"}}),core.makeStyleResponsive("h",o)},getWidthHeroBanner=(e,t)=>{let o={},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=isScaleImage({enableParallax:t,attachment:e[l]?.attachment});o={...o,[l]:i?"100vw":"100%"}}),core.makeStyleResponsive("w",o)},getTopHeroBanner=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),core.makeStyleResponsive("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),i=getTopHeroBanner(e);return{...o,...l,...i}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let n=e-i;return n>0?n:0},getClipPath=(e,t)=>{if(!t||!e)return"inset(0 0 0)";let[o,l,i,n]=e.split(" ").map(e=>parseInt(e??"0")),{btlr:a,btrr:s,bbrr:r,bblr:g}=t,p=calcRounderClipPath(parseInt(a??"0"),o,n),c=calcRounderClipPath(parseInt(s??"0"),o,l),b=calcRounderClipPath(parseInt(r??"0"),l,i),m=calcRounderClipPath(parseInt(g??"0"),i,n);return`inset(0 0 0 round ${p}px ${c}px ${b}px ${m}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),i=getResponsiveSetting(t),n=getResponsiveSetting(o),a=1>=(l?.desktop?.cols?.length||1)?i.desktop:n.desktop,s=1>=(l?.tablet?.cols?.length||1)?i.tablet:n.tablet,r=1>=(l?.mobile?.cols?.length||1)?i.mobile:n.mobile;return{"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between":l.desktop?.cols?.length===1&&"space-between"===a,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===a,"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between":l.tablet?.cols?.length===1&&"space-between"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===s,"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between":l.mobile?.cols?.length===1&&"space-between"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===r}},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i,"mobile:!gp-h-auto":!i}},getClassForStretchContent=e=>{let t={desktop:"none",tablet:"none",mobile:"none"},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=core.getResponsiveValueByScreen(e,o);t={...t,[o]:l}}),core.cls("space-between"===t.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===t.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===t.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},getClassForContentByFitContent=(e,t)=>{let o={desktop:!1,tablet:!1,mobile:!1},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=core.getResponsiveValueByScreen(e,l),n=!!getDataVideoHeroBannerResponsive(l,t),a=i?.shape,s=i?.height,r="original"===a&&"fit-content"!==s;o={...o,[l]:r&&!n}}),core.cls(o.desktop?"!gp-absolute":"",o.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",o.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[i||"center"]}`]:!!i}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>core.DEVICES.some(t=>{let o=core.getValueByDevice(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}const fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:constant.HREF_TO_SALES_PAGE,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o,hoverEffect:l}=e??{},i=!t?.normal||o?.normal=="0%"||!o?.normal,n=!t?.hover||o?.hover=="0%"||!l||!o?.hover;return{disableOpacity:i,disableHoverOpacity:n}};exports.debounce=debounce,exports.fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",exports.formatHoverScale=formatHoverScale,exports.getAspectRatioSettings=getAspectRatioSettings,exports.getAttachmentDevice=getAttachmentDevice,exports.getBackgroundImageHeroBanner=getBackgroundImageHeroBanner,exports.getBannerLink=getBannerLink,exports.getBgImage=getBgImage,exports.getClassAlignBanner=getClassAlignBanner,exports.getClassContentPosition=getClassContentPosition,exports.getClassForContentByFitContent=getClassForContentByFitContent,exports.getClassForStretchContent=getClassForStretchContent,exports.getClassSpaceBetween=getClassSpaceBetween,exports.getClassSpaceBetweenLeftRight=getClassSpaceBetweenLeftRight,exports.getClipPath=getClipPath,exports.getContentPosition=getContentPosition,exports.getDataVideoHeroBannerResponsive=getDataVideoHeroBannerResponsive,exports.getDisplayStyleByFitContent=getDisplayStyleByFitContent,exports.getEnableBgImageByDevice=getEnableBgImageByDevice,exports.getPercentageVisible=getPercentageVisible,exports.getResponsiveSetting=getResponsiveSetting,exports.getStyleAspectRatioHeroBannerCustom=getStyleAspectRatioHeroBannerCustom,exports.getStyleHeroBannerBg=getStyleHeroBannerBg,exports.getVisibilityStyle=getVisibilityStyle,exports.getWidth=getWidth,exports.horizontalAlign=horizontalAlign,exports.imagePlaceholder=imagePlaceholder,exports.isScaleImage=isScaleImage,exports.mapContentPositionToHorizontal=mapContentPositionToHorizontal,exports.opacityEnabledData=opacityEnabledData,exports.scrollToContentBanner=scrollToContentBanner,exports.showVideoType=showVideoType;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
`:""}
|
|
25
25
|
${composeSpacing(t,n.padding)}
|
|
26
26
|
${composeSize(n.width[t]??"auto",n.height[t]??"auto",!1)}
|
|
27
|
-
${core.composeShadowCss({boxShadowValue:e?.boxShadowBtn?.normal,hasBoxShadow:e?.
|
|
27
|
+
${core.composeShadowCss({boxShadowValue:e?.boxShadowBtn?.normal,hasBoxShadow:e?.hasBoxShadowBtn?.normal})||""}
|
|
28
28
|
${core.composeCornerCss(e?.roundedBtnV2?.normal,!0)}
|
|
29
29
|
${"desktop"===t?core.composeTypographyV2Css(e?.typo,!0):""}
|
|
30
30
|
}
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
${core.composeCornerCss(e?.roundedBtnV2?.normal)}
|
|
41
41
|
${composeBackgroundStyle(e?.backgroundColorV2?.normal,{forceIgnore:!!e?.backgroundImage?.normal?.image})}
|
|
42
42
|
${core.composeBackgroundImageCss(e?.backgroundImage,{device:t,state:"normal"})}
|
|
43
|
-
${core.composeShadowCss({boxShadowValue:e?.boxShadowBtn?.normal,hasBoxShadow:e?.
|
|
43
|
+
${core.composeShadowCss({boxShadowValue:e?.boxShadowBtn?.normal,hasBoxShadow:e?.hasBoxShadowBtn?.normal})||""}
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const ProductVariantPreset=[{id:"product-swatches",name:{en:"Product Swatches"},icon:{desktop:`
|
|
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 ProductVariantPreset=[{id:"product-swatches",name:{en:"Product Swatches"},icon:{desktop:`
|
|
2
2
|
<svg width="96" height="42" viewBox="0 0 96 42" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M7.08159 6.5H6.20091C6.14882 6.24669 6.05768 6.02415 5.92747 5.83239C5.79963 5.64062 5.64338 5.47964 5.45872 5.34943C5.27643 5.21686 5.07401 5.11742 4.85147 5.05114C4.62894 4.98485 4.39693 4.9517 4.15545 4.9517C3.71511 4.9517 3.3162 5.06297 2.95872 5.28551C2.6036 5.50805 2.3207 5.83594 2.11 6.26918C1.90166 6.70241 1.7975 7.2339 1.7975 7.86364C1.7975 8.49337 1.90166 9.02486 2.11 9.4581C2.3207 9.89134 2.6036 10.2192 2.95872 10.4418C3.3162 10.6643 3.71511 10.7756 4.15545 10.7756C4.39693 10.7756 4.62894 10.7424 4.85147 10.6761C5.07401 10.6098 5.27643 10.5116 5.45872 10.3814C5.64338 10.2488 5.79963 10.0866 5.92747 9.89489C6.05768 9.70076 6.14882 9.47822 6.20091 9.22727H7.08159C7.0153 9.59896 6.89456 9.93158 6.71937 10.2251C6.54418 10.5187 6.32638 10.7685 6.06596 10.9744C5.80555 11.178 5.51317 11.3331 5.18883 11.4396C4.86686 11.5462 4.5224 11.5994 4.15545 11.5994C3.53519 11.5994 2.98358 11.4479 2.50062 11.1449C2.01767 10.8419 1.6377 10.411 1.36071 9.85227C1.08372 9.29356 0.945224 8.63068 0.945224 7.86364C0.945224 7.09659 1.08372 6.43371 1.36071 5.875C1.6377 5.31629 2.01767 4.88542 2.50062 4.58239C2.98358 4.27936 3.53519 4.12784 4.15545 4.12784C4.5224 4.12784 4.86686 4.18111 5.18883 4.28764C5.51317 4.39418 5.80555 4.55043 6.06596 4.75639C6.32638 4.95999 6.54418 5.20857 6.71937 5.50213C6.89456 5.79332 7.0153 6.12595 7.08159 6.5ZM10.607 11.6136C10.1146 11.6136 9.6825 11.4964 9.31081 11.2621C8.9415 11.0277 8.65267 10.6998 8.44434 10.2784C8.23837 9.85701 8.13539 9.36458 8.13539 8.80114C8.13539 8.23295 8.23837 7.73698 8.44434 7.31321C8.65267 6.88944 8.9415 6.56037 9.31081 6.32599C9.6825 6.09162 10.1146 5.97443 10.607 5.97443C11.0994 5.97443 11.5303 6.09162 11.8996 6.32599C12.2713 6.56037 12.5601 6.88944 12.7661 7.31321C12.9744 7.73698 13.0786 8.23295 13.0786 8.80114C13.0786 9.36458 12.9744 9.85701 12.7661 10.2784C12.5601 10.6998 12.2713 11.0277 11.8996 11.2621C11.5303 11.4964 11.0994 11.6136 10.607 11.6136ZM10.607 10.8608C10.981 10.8608 11.2888 10.7649 11.5303 10.5732C11.7718 10.3814 11.9505 10.1293 12.0665 9.81676C12.1825 9.50426 12.2405 9.16572 12.2405 8.80114C12.2405 8.43655 12.1825 8.09683 12.0665 7.78196C11.9505 7.46709 11.7718 7.21259 11.5303 7.01847C11.2888 6.82434 10.981 6.72727 10.607 6.72727C10.2329 6.72727 9.92516 6.82434 9.68368 7.01847C9.44221 7.21259 9.26346 7.46709 9.14746 7.78196C9.03146 8.09683 8.97346 8.43655 8.97346 8.80114C8.97346 9.16572 9.03146 9.50426 9.14746 9.81676C9.26346 10.1293 9.44221 10.3814 9.68368 10.5732C9.92516 10.7649 10.2329 10.8608 10.607 10.8608ZM15.1959 4.22727V11.5H14.3579V4.22727H15.1959ZM18.9468 11.6136C18.4544 11.6136 18.0223 11.4964 17.6507 11.2621C17.2813 11.0277 16.9925 10.6998 16.7842 10.2784C16.5782 9.85701 16.4752 9.36458 16.4752 8.80114C16.4752 8.23295 16.5782 7.73698 16.7842 7.31321C16.9925 6.88944 17.2813 6.56037 17.6507 6.32599C18.0223 6.09162 18.4544 5.97443 18.9468 5.97443C19.4392 5.97443 19.8701 6.09162 20.2394 6.32599C20.6111 6.56037 20.8999 6.88944 21.1059 7.31321C21.3142 7.73698 21.4184 8.23295 21.4184 8.80114C21.4184 9.36458 21.3142 9.85701 21.1059 10.2784C20.8999 10.6998 20.6111 11.0277 20.2394 11.2621C19.8701 11.4964 19.4392 11.6136 18.9468 11.6136ZM18.9468 10.8608C19.3209 10.8608 19.6286 10.7649 19.8701 10.5732C20.1116 10.3814 20.2903 10.1293 20.4063 9.81676C20.5223 9.50426 20.5803 9.16572 20.5803 8.80114C20.5803 8.43655 20.5223 8.09683 20.4063 7.78196C20.2903 7.46709 20.1116 7.21259 19.8701 7.01847C19.6286 6.82434 19.3209 6.72727 18.9468 6.72727C18.5728 6.72727 18.265 6.82434 18.0235 7.01847C17.782 7.21259 17.6033 7.46709 17.4873 7.78196C17.3713 8.09683 17.3133 8.43655 17.3133 8.80114C17.3133 9.16572 17.3713 9.50426 17.4873 9.81676C17.6033 10.1293 17.782 10.3814 18.0235 10.5732C18.265 10.7649 18.5728 10.8608 18.9468 10.8608ZM22.6977 11.5V6.04545H23.5074V6.86932H23.5642C23.6636 6.59943 23.8435 6.38045 24.104 6.21236C24.3644 6.04427 24.6579 5.96023 24.9846 5.96023C25.0462 5.96023 25.1231 5.96141 25.2155 5.96378C25.3078 5.96615 25.3776 5.9697 25.425 5.97443V6.8267C25.3966 6.8196 25.3315 6.80895 25.2297 6.79474C25.1302 6.77817 25.0249 6.76989 24.9136 6.76989C24.6485 6.76989 24.4117 6.82552 24.2034 6.93679C23.9974 7.04569 23.8341 7.19721 23.7133 7.39134C23.595 7.5831 23.5358 7.80208 23.5358 8.0483V11.5H22.6977Z" fill="#D6D6D6"/>
|
|
4
4
|
<g clip-path="url(#clip0_9753_94241)">
|
|
@@ -21,4 +21,4 @@
|
|
|
21
21
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M86.1928 30.9268C86.0863 31.0244 85.9137 31.0244 85.8072 30.9268L83.0799 28.4268C82.9734 28.3291 82.9734 28.1709 83.0799 28.0732C83.1864 27.9756 83.3591 27.9756 83.4656 28.0732L86 30.3964L88.5344 28.0732C88.6409 27.9756 88.8136 27.9756 88.9201 28.0732C89.0266 28.1709 89.0266 28.3291 88.9201 28.4268L86.1928 30.9268Z" fill="#AAABAC"/>
|
|
22
22
|
<rect x="0.5" y="19.5" width="95" height="20" rx="2.5" stroke="#5B5B5B"/>
|
|
23
23
|
</svg>
|
|
24
|
-
`},components:[{tag:"ProductVariants",settings:{variantPresets:[{optionName:"base",optionType:"dropdown",presets:{
|
|
24
|
+
`},components:[{tag:"ProductVariants",settings:{variantPresets:[{optionName:"base",optionType:"dropdown",presets:{...color.colorPresetConfig,...rectangleList.rectangleListPresetConfig,...image.imagePresetConfig,...imageShopify.imageShopifyPresetConfig,...dropdown.dropdownPresetConfig}}]},styles:{optionRounded:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}}]}];exports.ProductVariantPreset=ProductVariantPreset;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Button=require("../../button/components/Button.js");const ThirdPartyPreview=({setting:t,styles:e})=>jsxRuntime.jsx(Button.default,{setting:{...t,iconAlign:"left",iconVisible:!0,options:{isCannotEditing:!0}},styles:{...e,roundedBtn:{normal:{radiusType:"
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Button=require("../../button/components/Button.js");const ThirdPartyPreview=({setting:t,styles:e})=>jsxRuntime.jsx(Button.default,{setting:{...t,iconAlign:"left",iconVisible:!0,options:{isCannotEditing:!0}},styles:{...e,roundedBtn:{normal:{radiusType:"rounded",bblr:"3px",bbrr:"3px",btlr:"3px",btrr:"3px"},hover:{radiusType:"rounded",bblr:"3px",bbrr:"3px",btlr:"3px",btrr:"3px"}},iconSpacing:{desktop:"16px"},size:{desktop:"48px",tablet:"48px",mobile:"48px"},globalSize:{desktop:{padding:{top:"12px",bottom:"12px",left:"16px",right:"16px",type:"custom"}}},typo:{custom:{fontSize:{desktop:"14px"}},attrs:{color:"#E2E2E2"}},backgroundColorV2:{normal:"#252525",hover:"#252525"},textOverFlow:!0}});exports.default=ThirdPartyPreview;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{makeStyleResponsive,filterHoverVariables,getStyleShadowState,composeRadius,makeGlobalSize,composeTypographyStyle,getColor,getStyleShadow,getStyleBackgroundImage,getGlobalColorStateStyle,makeStyleState,composeBorderCss,composeCornerCss,GRADIENT_BGR_KEY}from"@gem-sdk/core";let getButtonWrapperStyles=(e,t)=>({...e,...makeStyleResponsive("ta",t?.align)}),getButtonStyles=(e,t)=>{let o={...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle};return t?o:filterHoverVariables(o)},getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.enable !== undefined");return{...getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},"value?.
|
|
1
|
+
import{makeStyleResponsive,filterHoverVariables,getStyleShadowState,composeRadius,makeGlobalSize,composeTypographyStyle,getColor,getStyleShadow,getStyleBackgroundImage,getGlobalColorStateStyle,makeStyleState,composeBorderCss,composeCornerCss,GRADIENT_BGR_KEY}from"@gem-sdk/core";let getButtonWrapperStyles=(e,t)=>({...e,...makeStyleResponsive("ta",t?.align)}),getButtonStyles=(e,t)=>{let o={...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle};return t?o:filterHoverVariables(o)},getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.enable !== undefined");return{...getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},"value?.radiusType !== undefined");return composeRadius(t)},getIconSpacingStyle=(e,t)=>{let o=e?.iconSpacing||{desktop:"8px"};return t?.iconAlign==="left"?makeStyleResponsive("mr",o):makeStyleResponsive("ml",o)},getSizeStyles=e=>{let t=makeGlobalSize(e?.globalSize);return{...t.width,...t.height,...t.padding}},getTypographyStyles=e=>{let t=composeTypographyStyle(e?.typo,e?.typography),o={"--c":t?.["--c"]},r={...t};return delete r["--c"],{textColorStyle:{"--hvr-c":getColor(e?.textColor?.hover),...o},withoutTextColorStyles:r}},getTypoStyles=e=>({...getTypographyStyles(e).withoutTextColorStyles,...getStyleShadow({styleAppliedFor:"text-shadow",value:e?.typo?.custom?.textShadow,isEnableShadow:e?.typo?.custom?.hasShadowText}),"word-break":"break-word"}),getBgImageUrl=(e,t)=>{let{backgroundImage:o,backgroundColorV2:r}=e||{},a=o?.[t],n=r?.[t];if(!a&&!n)return"";let l=`url(${a?.image?.src})`,s=n?`, ${n}`:"";return n?.includes(GRADIENT_BGR_KEY)&&a?.image?.src?`${l}${s}`:n?.includes(GRADIENT_BGR_KEY)&&!a?.image?.src?n:a?.image?.src?l:""},getBackgroundImageSource=e=>{let t={normal:getBgImageUrl(e,"normal"),hover:getBgImageUrl(e,"hover")};return makeStyleState("bgi",t)},getBackgroundStyles=e=>{let{backgroundColorV2:t,backgroundImage:o}=e||{},r={...o,hover:o?.hover||o?.normal},a={...t,hover:t?.hover||t?.normal};return{...getStyleBackgroundImage(r,{ignoreBackgroundImage:!0}),...getBackgroundImageSource({backgroundImage:r,backgroundColorV2:a}),...getGlobalColorStateStyle("bg",t)}},getCustomCssStyles=({styles:e,uid:t,builderAttrs:o,enableHoverEffect:r})=>{if(!t)return"";let{borderBtnV2:a,roundedBtnV2:n}=e??{},l=ignoreStateNoneValue(a||{},'value?.borderType !== "none"'),s=ignoreStateNoneValue(n||{},"value?.radiusType !== undefined"),g=generateBorderCornerStyles({uid:t,borderBtn:l,roundedBtn:s,builderAttrs:o,enableHoverEffect:r});return`
|
|
2
2
|
${g.normalStyles}
|
|
3
3
|
${g.hoverStyles}
|
|
4
|
-
`.trim()},generateBorderCornerStyles=({uid:e,borderBtn:t,roundedBtn:o,builderAttrs:r,enableHoverEffect:
|
|
4
|
+
`.trim()},generateBorderCornerStyles=({uid:e,borderBtn:t,roundedBtn:o,builderAttrs:r,enableHoverEffect:a})=>{let n=r?.["data-component-tag"],l=({styleObj:e,state:t})=>{if(e)return e?.[t]},s=l({styleObj:t,state:"normal"}),g=l({styleObj:a?t:void 0,state:"hover"}),d=l({styleObj:o,state:"normal"}),i=l({styleObj:o,state:"hover"}),u=`
|
|
5
5
|
content: "";
|
|
6
6
|
height: 100%;
|
|
7
7
|
width: 100%;
|
|
@@ -20,7 +20,7 @@ import{makeStyleResponsive,filterHoverVariables,getStyleShadowState,composeRadiu
|
|
|
20
20
|
${composeBorderCss(g)}
|
|
21
21
|
${composeCornerCss(i)}
|
|
22
22
|
}
|
|
23
|
-
`;if("ProductButton"===
|
|
23
|
+
`;if("ProductButton"===n){let t=r?.["data-is-in-stock"]??!1;y=`
|
|
24
24
|
[data-is-in-stock="${t}"]>.${e}.gp-button-base::before {
|
|
25
25
|
${u}
|
|
26
26
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import{makeStyleResponsive as e,getStyleShadow as t,composeBorderCss as o,composeCornerCss as r}from"@gem-sdk/core";let getButtonStyles=(e,t)=>{let o=JSON.parse(JSON.stringify(e||{}));return delete o?.borderBtnV2?.normal?.borderType,delete o?.borderBtnV2?.hover?.borderType,delete o?.borderBtnV2?.active?.borderType,{...o,enableTextStyle:!0,...t&&{boxShadowBtn:{...o?.boxShadowBtn,focus:void 0}}}},getButtonStyle=(t,o)=>({...t,...e("ta",o?.align)}),getInnerBorderCornerCss=e=>{let{uid:n,styles:a}=e;if(!n||!a)return"";let{borderBtnV2:d,roundedBtnV2:i,boxShadowBtn:l}=a,c=e=>e?t({value:e,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:!0})["--shadow"]:"none",s=l?.active?.enable!==void 0?c(l?.active??{}):"",p={desktop:"",tablet:"@media only screen and (max-width: 1024px) and (min-width: 768px)",mobile:"@media only screen and (max-width: 768px)"},b=e=>{let t=p[e],a=!!t,l=`
|
|
2
|
+
.gp-coupon[data-active="true"] .${n}::before {
|
|
3
|
+
${o(d?.active,{important:!0})};
|
|
4
|
+
${r(i?.active,!0)};
|
|
5
|
+
box-shadow: ${s} !important;
|
|
6
|
+
}
|
|
7
|
+
.gp-coupon[data-active="true"] .${n} {
|
|
8
|
+
${r(i?.active,!0)};
|
|
9
|
+
}
|
|
10
|
+
`.trim();return a?`${t} {
|
|
11
|
+
${l}
|
|
12
|
+
}`:l};return b("desktop")},getInnerActiveStyles=e=>`
|
|
13
13
|
.gp-coupon[data-active="true"] button {
|
|
14
14
|
background-color: ${e?.backgroundColorV2?.active||""};
|
|
15
15
|
color: ${e?.textColor?.active||""};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Styled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Hover"},controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableActiveEffect"},popoverLabel:{en:"Clicked"},controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"focus"},options:{updateFields:[{field:"focus.enable",settingId:"hasBoxShadowBtn",state:"focus"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.focus.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"focus",newValue:!0}},{condition:"boxShadowBtn.focus.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"focus",newValue:!1}}],options:{noRecordHistory:!0}}}]}]}]},{conditionDisplay:"globalSize.width !== '100%'",controls:[{label:{en:"Align"},type:"control",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];export{SettingUIV2};
|
|
1
|
+
let SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Styled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Hover"},state:"hover",controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableActiveEffect"},popoverLabel:{en:"Clicked"},state:"active",controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"focus"},options:{updateFields:[{field:"focus.enable",settingId:"hasBoxShadowBtn",state:"focus"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.focus.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"focus",newValue:!0}},{condition:"boxShadowBtn.focus.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"focus",newValue:!1}}],options:{noRecordHistory:!0}}}]}]}]},{conditionDisplay:"globalSize.width !== '100%'",controls:[{label:{en:"Align"},type:"control",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];export{SettingUIV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getResponsiveValueByScreen as e,getAspectRatioGlobalSize as t,makeStyleResponsive as o,DEVICES as l,getValueByDevice as i,GRADIENT_BGR_KEY as n,cls as a}from"@gem-sdk/core";import{getImageSrc as r,createBlurDataURL as s}from"../../image/common/helpers.js";import{HREF_TO_SALES_PAGE as g}from"../../constant.js";let getContentPosition=(t,o,i)=>{let n={};return l.map(l=>{let a=e(t,l),r=e(o,l),s=e(i,l);n={...n,[l]:1>=(a?.cols?.length||1)?r:s}}),n},getAspectRatioSettings=(t,o)=>{let l={desktop:t?.desktop?.width,tablet:t?.tablet?.width,mobile:t?.mobile?.width},i={desktop:t?.desktop?.height,tablet:t?.tablet?.height,mobile:t?.mobile?.height},n={desktop:o?.desktop==="custom"?`${e(l,"desktop")}/${e(i,"desktop")}`:o?.desktop==="cover"?"unset":o?.desktop,tablet:o?.tablet==="custom"?`${e(l,"tablet")}/${e(i,"tablet")}`:o?.tablet==="cover"?"unset":o?.tablet,mobile:o?.mobile==="custom"?`${e(l,"mobile")}/${e(i,"mobile")}`:o?.mobile==="cover"?"unset":o?.mobile};return n},getEnableBgImageByDevice=(t,o)=>{if(!e(getBgImage(o),t))return!1;if(!o?.[t]){if("mobile"===t)return o?.tablet?.type==="image"||o?.desktop?.type==="image"&&!o?.tablet;if("tablet"===t)return o?.desktop?.type==="image"}return o?.[t]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:s(t?.desktop?.width??0,t?.desktop?.height??0),tablet:s(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:s(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(t,o,l,i)=>{if(!t)return"";let a=getBgImage(t),s=e(t,o),g=l?`url(${imagePlaceholder(t)[o]})`:`url(${r(e(a,o),o,i)})`,p=s?.color?`, ${s.color}`:"";return s?.color?.includes(n)&&s?.type==="image"?`${g}${p}`:s?.color?.includes(n)&&s?.type!=="image"?`${s.color}`:s?.type==="image"?g:"url()"},getBackgroundImageHeroBanner=(e,t=!1,i=!1)=>{if(!e)return;let n={};return l.forEach(o=>{n={...n,[o]:getBgImageByScreen(e,o,t,i)}}),o("bgi",n)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(l,i,n)=>{let a=t(i),r=["desktop","mobile","tablet"];return r.forEach(t=>{let o=e(i,t),r=!!getDataVideoHeroBannerResponsive(t,l),s=o?.shape,g=o?.height,p="original"===s&&"fit-content"!==g,b=p&&r;b&&(a={...a,[t]:"16/9"}),n&&n[t]&&getDataVideoHeroBannerResponsive(t,l)?.data?.videoType==="html5"&&(a={...a,[t]:n[t]})}),o("aspect",a)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(t,l)=>{let i={desktop:"none",tablet:"none",mobile:"none"},n=["desktop","mobile","tablet"];return n.forEach(o=>{let n=e(t,o),a=!!getDataVideoHeroBannerResponsive(o,l),r=n?.shape,s=n?.height,g="original"===r&&"fit-content"!==s&&!a;i={...i,[o]:g?"block":"none"}}),o("d",i)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,i=-l;if(o<i)return 0;if(o>t)return 100;let n=(o-i)/(t-i)*100;return Math.min(Math.max(n,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:t?"150%":i?"100vh":"100%"}}),o("h",l)},getWidthHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:i?"100vw":"100%"}}),o("w",l)},getTopHeroBanner=e=>{let t={},l=["desktop","mobile","tablet"];return l.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),o("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),i=getTopHeroBanner(e);return{...o,...l,...i}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let n=e-i;return n>0?n:0},getClipPath=(e,t)=>{if(!t||!e)return"inset(0 0 0)";let[o,l,i,n]=e.split(" ").map(e=>parseInt(e??"0")),{btlr:a,btrr:r,bbrr:s,bblr:g}=t,p=calcRounderClipPath(parseInt(a??"0"),o,n),b=calcRounderClipPath(parseInt(r??"0"),o,l),c=calcRounderClipPath(parseInt(s??"0"),l,i),d=calcRounderClipPath(parseInt(g??"0"),i,n);return`inset(0 0 0 round ${p}px ${b}px ${c}px ${d}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),i=getResponsiveSetting(t),n=getResponsiveSetting(o),a=1>=(l?.desktop?.cols?.length||1)?i.desktop:n.desktop,r=1>=(l?.tablet?.cols?.length||1)?i.tablet:n.tablet,s=1>=(l?.mobile?.cols?.length||1)?i.mobile:n.mobile;return{"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between":l.desktop?.cols?.length===1&&"space-between"===a,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===a,"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between":l.tablet?.cols?.length===1&&"space-between"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===r,"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between":l.mobile?.cols?.length===1&&"space-between"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===s}},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"!gp-h-full [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i}},getClassForStretchContent=t=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=e(t,l);o={...o,[l]:i}}),a("space-between"===o.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===o.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${t?.tablet}`,"space-between"===o.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${t?.mobile}`)},getClassForContentByFitContent=(t,o)=>{let l={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(i=>{let n=e(t,i),a=!!getDataVideoHeroBannerResponsive(i,o),r=n?.shape,s=n?.height,g="original"===r&&"fit-content"!==s;l={...l,[i]:g&&!a}}),a(l.desktop?"!gp-absolute":"",l.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",l.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[i||"center"]}`]:!!i}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>l.some(t=>{let o=i(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}let fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:g,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o,hoverEffect:l}=e??{},i=!t?.normal||o?.normal=="0%"||!o?.normal,n=!t?.hover||o?.hover=="0%"||!l||!o?.hover;return{disableOpacity:i,disableHoverOpacity:n}};export{debounce,fallbackImg,formatHoverScale,getAspectRatioSettings,getAttachmentDevice,getBackgroundImageHeroBanner,getBannerLink,getBgImage,getClassAlignBanner,getClassContentPosition,getClassForContentByFitContent,getClassForStretchContent,getClassSpaceBetween,getClassSpaceBetweenLeftRight,getClipPath,getContentPosition,getDataVideoHeroBannerResponsive,getDisplayStyleByFitContent,getEnableBgImageByDevice,getPercentageVisible,getResponsiveSetting,getStyleAspectRatioHeroBannerCustom,getStyleHeroBannerBg,getVisibilityStyle,getWidth,horizontalAlign,imagePlaceholder,isScaleImage,mapContentPositionToHorizontal,opacityEnabledData,scrollToContentBanner,showVideoType};
|
|
1
|
+
import{getResponsiveValueByScreen as e,getAspectRatioGlobalSize as t,makeStyleResponsive as o,DEVICES as l,getValueByDevice as i,GRADIENT_BGR_KEY as n,cls as a}from"@gem-sdk/core";import{getImageSrc as r,createBlurDataURL as s}from"../../image/common/helpers.js";import{HREF_TO_SALES_PAGE as g}from"../../constant.js";let getContentPosition=(t,o,i)=>{let n={};return l.map(l=>{let a=e(t,l),r=e(o,l),s=e(i,l);n={...n,[l]:1>=(a?.cols?.length||1)?r:s}}),n},getAspectRatioSettings=(t,o)=>{let l={desktop:t?.desktop?.width,tablet:t?.tablet?.width,mobile:t?.mobile?.width},i={desktop:t?.desktop?.height,tablet:t?.tablet?.height,mobile:t?.mobile?.height},n={desktop:o?.desktop==="custom"?`${e(l,"desktop")}/${e(i,"desktop")}`:o?.desktop==="cover"?"unset":o?.desktop,tablet:o?.tablet==="custom"?`${e(l,"tablet")}/${e(i,"tablet")}`:o?.tablet==="cover"?"unset":o?.tablet,mobile:o?.mobile==="custom"?`${e(l,"mobile")}/${e(i,"mobile")}`:o?.mobile==="cover"?"unset":o?.mobile};return n},getEnableBgImageByDevice=(t,o)=>{if(!e(getBgImage(o),t))return!1;if(!o?.[t]){if("mobile"===t)return o?.tablet?.type==="image"||o?.desktop?.type==="image"&&!o?.tablet;if("tablet"===t)return o?.desktop?.type==="image"}return o?.[t]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:s(t?.desktop?.width??0,t?.desktop?.height??0),tablet:s(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:s(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(t,o,l,i)=>{if(!t)return"";let a=getBgImage(t),s=e(t,o),g=l?`url(${imagePlaceholder(t)[o]})`:`url(${r(e(a,o),o,i)})`,p=s?.color?`, ${s.color}`:"";return s?.color?.includes(n)&&s?.type==="image"?`${g}${p}`:s?.color?.includes(n)&&s?.type!=="image"?`${s.color}`:s?.type==="image"?g:"url()"},getBackgroundImageHeroBanner=(e,t=!1,i=!1)=>{if(!e)return;let n={};return l.forEach(o=>{n={...n,[o]:getBgImageByScreen(e,o,t,i)}}),o("bgi",n)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(l,i,n)=>{let a=t(i),r=["desktop","mobile","tablet"];return r.forEach(t=>{let o=e(i,t),r=!!getDataVideoHeroBannerResponsive(t,l),s=o?.shape,g=o?.height,p="original"===s&&"fit-content"!==g,b=p&&r;b&&(a={...a,[t]:"16/9"}),n&&n[t]&&getDataVideoHeroBannerResponsive(t,l)?.data?.videoType==="html5"&&(a={...a,[t]:n[t]})}),o("aspect",a)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(t,l)=>{let i={desktop:"none",tablet:"none",mobile:"none"},n=["desktop","mobile","tablet"];return n.forEach(o=>{let n=e(t,o),a=!!getDataVideoHeroBannerResponsive(o,l),r=n?.shape,s=n?.height,g="original"===r&&"fit-content"!==s&&!a;i={...i,[o]:g?"block":"none"}}),o("d",i)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,i=-l;if(o<i)return 0;if(o>t)return 100;let n=(o-i)/(t-i)*100;return Math.min(Math.max(n,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:t?"150%":i?"100vh":"100%"}}),o("h",l)},getWidthHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:i?"100vw":"100%"}}),o("w",l)},getTopHeroBanner=e=>{let t={},l=["desktop","mobile","tablet"];return l.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),o("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),i=getTopHeroBanner(e);return{...o,...l,...i}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let n=e-i;return n>0?n:0},getClipPath=(e,t)=>{if(!t||!e)return"inset(0 0 0)";let[o,l,i,n]=e.split(" ").map(e=>parseInt(e??"0")),{btlr:a,btrr:r,bbrr:s,bblr:g}=t,p=calcRounderClipPath(parseInt(a??"0"),o,n),b=calcRounderClipPath(parseInt(r??"0"),o,l),c=calcRounderClipPath(parseInt(s??"0"),l,i),d=calcRounderClipPath(parseInt(g??"0"),i,n);return`inset(0 0 0 round ${p}px ${b}px ${c}px ${d}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),i=getResponsiveSetting(t),n=getResponsiveSetting(o),a=1>=(l?.desktop?.cols?.length||1)?i.desktop:n.desktop,r=1>=(l?.tablet?.cols?.length||1)?i.tablet:n.tablet,s=1>=(l?.mobile?.cols?.length||1)?i.mobile:n.mobile;return{"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between":l.desktop?.cols?.length===1&&"space-between"===a,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===a,"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between":l.tablet?.cols?.length===1&&"space-between"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===r,"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between":l.mobile?.cols?.length===1&&"space-between"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===s}},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i,"mobile:!gp-h-auto":!i}},getClassForStretchContent=t=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=e(t,l);o={...o,[l]:i}}),a("space-between"===o.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===o.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${t?.tablet}`,"space-between"===o.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${t?.mobile}`)},getClassForContentByFitContent=(t,o)=>{let l={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(i=>{let n=e(t,i),a=!!getDataVideoHeroBannerResponsive(i,o),r=n?.shape,s=n?.height,g="original"===r&&"fit-content"!==s;l={...l,[i]:g&&!a}}),a(l.desktop?"!gp-absolute":"",l.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",l.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[i||"center"]}`]:!!i}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>l.some(t=>{let o=i(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}let fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:g,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o,hoverEffect:l}=e??{},i=!t?.normal||o?.normal=="0%"||!o?.normal,n=!t?.hover||o?.hover=="0%"||!l||!o?.hover;return{disableOpacity:i,disableHoverOpacity:n}};export{debounce,fallbackImg,formatHoverScale,getAspectRatioSettings,getAttachmentDevice,getBackgroundImageHeroBanner,getBannerLink,getBgImage,getClassAlignBanner,getClassContentPosition,getClassForContentByFitContent,getClassForStretchContent,getClassSpaceBetween,getClassSpaceBetweenLeftRight,getClipPath,getContentPosition,getDataVideoHeroBannerResponsive,getDisplayStyleByFitContent,getEnableBgImageByDevice,getPercentageVisible,getResponsiveSetting,getStyleAspectRatioHeroBannerCustom,getStyleHeroBannerBg,getVisibilityStyle,getWidth,horizontalAlign,imagePlaceholder,isScaleImage,mapContentPositionToHorizontal,opacityEnabledData,scrollToContentBanner,showVideoType};
|
|
@@ -24,7 +24,7 @@ import{getWidthHeightGlobalSize as t,getPaddingGlobalSize as o,composeShadowCss
|
|
|
24
24
|
`:""}
|
|
25
25
|
${composeSpacing(o,b.padding)}
|
|
26
26
|
${composeSize(b.width[o]??"auto",b.height[o]??"auto",!1)}
|
|
27
|
-
${n({boxShadowValue:p?.boxShadowBtn?.normal,hasBoxShadow:p?.
|
|
27
|
+
${n({boxShadowValue:p?.boxShadowBtn?.normal,hasBoxShadow:p?.hasBoxShadowBtn?.normal})||""}
|
|
28
28
|
${e(p?.roundedBtnV2?.normal,!0)}
|
|
29
29
|
${"desktop"===o?a(p?.typo,!0):""}
|
|
30
30
|
}
|
|
@@ -40,7 +40,7 @@ import{getWidthHeightGlobalSize as t,getPaddingGlobalSize as o,composeShadowCss
|
|
|
40
40
|
${e(p?.roundedBtnV2?.normal)}
|
|
41
41
|
${composeBackgroundStyle(p?.backgroundColorV2?.normal,{forceIgnore:!!p?.backgroundImage?.normal?.image})}
|
|
42
42
|
${i(p?.backgroundImage,{device:o,state:"normal"})}
|
|
43
|
-
${n({boxShadowValue:p?.boxShadowBtn?.normal,hasBoxShadow:p?.
|
|
43
|
+
${n({boxShadowValue:p?.boxShadowBtn?.normal,hasBoxShadow:p?.hasBoxShadowBtn?.normal})||""}
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
let ProductVariantPreset=[{id:"product-swatches",name:{en:"Product Swatches"},icon:{desktop:`
|
|
1
|
+
import{rectangleListPresetConfig as C}from"../swatches-style-config/rectangle-list.js";import{colorPresetConfig as t}from"../swatches-style-config/color.js";import{imagePresetConfig as e}from"../swatches-style-config/image.js";import{imageShopifyPresetConfig as i}from"../swatches-style-config/image-shopify.js";import{dropdownPresetConfig as o}from"../swatches-style-config/dropdown.js";let ProductVariantPreset=[{id:"product-swatches",name:{en:"Product Swatches"},icon:{desktop:`
|
|
2
2
|
<svg width="96" height="42" viewBox="0 0 96 42" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M7.08159 6.5H6.20091C6.14882 6.24669 6.05768 6.02415 5.92747 5.83239C5.79963 5.64062 5.64338 5.47964 5.45872 5.34943C5.27643 5.21686 5.07401 5.11742 4.85147 5.05114C4.62894 4.98485 4.39693 4.9517 4.15545 4.9517C3.71511 4.9517 3.3162 5.06297 2.95872 5.28551C2.6036 5.50805 2.3207 5.83594 2.11 6.26918C1.90166 6.70241 1.7975 7.2339 1.7975 7.86364C1.7975 8.49337 1.90166 9.02486 2.11 9.4581C2.3207 9.89134 2.6036 10.2192 2.95872 10.4418C3.3162 10.6643 3.71511 10.7756 4.15545 10.7756C4.39693 10.7756 4.62894 10.7424 4.85147 10.6761C5.07401 10.6098 5.27643 10.5116 5.45872 10.3814C5.64338 10.2488 5.79963 10.0866 5.92747 9.89489C6.05768 9.70076 6.14882 9.47822 6.20091 9.22727H7.08159C7.0153 9.59896 6.89456 9.93158 6.71937 10.2251C6.54418 10.5187 6.32638 10.7685 6.06596 10.9744C5.80555 11.178 5.51317 11.3331 5.18883 11.4396C4.86686 11.5462 4.5224 11.5994 4.15545 11.5994C3.53519 11.5994 2.98358 11.4479 2.50062 11.1449C2.01767 10.8419 1.6377 10.411 1.36071 9.85227C1.08372 9.29356 0.945224 8.63068 0.945224 7.86364C0.945224 7.09659 1.08372 6.43371 1.36071 5.875C1.6377 5.31629 2.01767 4.88542 2.50062 4.58239C2.98358 4.27936 3.53519 4.12784 4.15545 4.12784C4.5224 4.12784 4.86686 4.18111 5.18883 4.28764C5.51317 4.39418 5.80555 4.55043 6.06596 4.75639C6.32638 4.95999 6.54418 5.20857 6.71937 5.50213C6.89456 5.79332 7.0153 6.12595 7.08159 6.5ZM10.607 11.6136C10.1146 11.6136 9.6825 11.4964 9.31081 11.2621C8.9415 11.0277 8.65267 10.6998 8.44434 10.2784C8.23837 9.85701 8.13539 9.36458 8.13539 8.80114C8.13539 8.23295 8.23837 7.73698 8.44434 7.31321C8.65267 6.88944 8.9415 6.56037 9.31081 6.32599C9.6825 6.09162 10.1146 5.97443 10.607 5.97443C11.0994 5.97443 11.5303 6.09162 11.8996 6.32599C12.2713 6.56037 12.5601 6.88944 12.7661 7.31321C12.9744 7.73698 13.0786 8.23295 13.0786 8.80114C13.0786 9.36458 12.9744 9.85701 12.7661 10.2784C12.5601 10.6998 12.2713 11.0277 11.8996 11.2621C11.5303 11.4964 11.0994 11.6136 10.607 11.6136ZM10.607 10.8608C10.981 10.8608 11.2888 10.7649 11.5303 10.5732C11.7718 10.3814 11.9505 10.1293 12.0665 9.81676C12.1825 9.50426 12.2405 9.16572 12.2405 8.80114C12.2405 8.43655 12.1825 8.09683 12.0665 7.78196C11.9505 7.46709 11.7718 7.21259 11.5303 7.01847C11.2888 6.82434 10.981 6.72727 10.607 6.72727C10.2329 6.72727 9.92516 6.82434 9.68368 7.01847C9.44221 7.21259 9.26346 7.46709 9.14746 7.78196C9.03146 8.09683 8.97346 8.43655 8.97346 8.80114C8.97346 9.16572 9.03146 9.50426 9.14746 9.81676C9.26346 10.1293 9.44221 10.3814 9.68368 10.5732C9.92516 10.7649 10.2329 10.8608 10.607 10.8608ZM15.1959 4.22727V11.5H14.3579V4.22727H15.1959ZM18.9468 11.6136C18.4544 11.6136 18.0223 11.4964 17.6507 11.2621C17.2813 11.0277 16.9925 10.6998 16.7842 10.2784C16.5782 9.85701 16.4752 9.36458 16.4752 8.80114C16.4752 8.23295 16.5782 7.73698 16.7842 7.31321C16.9925 6.88944 17.2813 6.56037 17.6507 6.32599C18.0223 6.09162 18.4544 5.97443 18.9468 5.97443C19.4392 5.97443 19.8701 6.09162 20.2394 6.32599C20.6111 6.56037 20.8999 6.88944 21.1059 7.31321C21.3142 7.73698 21.4184 8.23295 21.4184 8.80114C21.4184 9.36458 21.3142 9.85701 21.1059 10.2784C20.8999 10.6998 20.6111 11.0277 20.2394 11.2621C19.8701 11.4964 19.4392 11.6136 18.9468 11.6136ZM18.9468 10.8608C19.3209 10.8608 19.6286 10.7649 19.8701 10.5732C20.1116 10.3814 20.2903 10.1293 20.4063 9.81676C20.5223 9.50426 20.5803 9.16572 20.5803 8.80114C20.5803 8.43655 20.5223 8.09683 20.4063 7.78196C20.2903 7.46709 20.1116 7.21259 19.8701 7.01847C19.6286 6.82434 19.3209 6.72727 18.9468 6.72727C18.5728 6.72727 18.265 6.82434 18.0235 7.01847C17.782 7.21259 17.6033 7.46709 17.4873 7.78196C17.3713 8.09683 17.3133 8.43655 17.3133 8.80114C17.3133 9.16572 17.3713 9.50426 17.4873 9.81676C17.6033 10.1293 17.782 10.3814 18.0235 10.5732C18.265 10.7649 18.5728 10.8608 18.9468 10.8608ZM22.6977 11.5V6.04545H23.5074V6.86932H23.5642C23.6636 6.59943 23.8435 6.38045 24.104 6.21236C24.3644 6.04427 24.6579 5.96023 24.9846 5.96023C25.0462 5.96023 25.1231 5.96141 25.2155 5.96378C25.3078 5.96615 25.3776 5.9697 25.425 5.97443V6.8267C25.3966 6.8196 25.3315 6.80895 25.2297 6.79474C25.1302 6.77817 25.0249 6.76989 24.9136 6.76989C24.6485 6.76989 24.4117 6.82552 24.2034 6.93679C23.9974 7.04569 23.8341 7.19721 23.7133 7.39134C23.595 7.5831 23.5358 7.80208 23.5358 8.0483V11.5H22.6977Z" fill="#D6D6D6"/>
|
|
4
4
|
<g clip-path="url(#clip0_9753_94241)">
|
|
@@ -21,4 +21,4 @@ let ProductVariantPreset=[{id:"product-swatches",name:{en:"Product Swatches"},ic
|
|
|
21
21
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M86.1928 30.9268C86.0863 31.0244 85.9137 31.0244 85.8072 30.9268L83.0799 28.4268C82.9734 28.3291 82.9734 28.1709 83.0799 28.0732C83.1864 27.9756 83.3591 27.9756 83.4656 28.0732L86 30.3964L88.5344 28.0732C88.6409 27.9756 88.8136 27.9756 88.9201 28.0732C89.0266 28.1709 89.0266 28.3291 88.9201 28.4268L86.1928 30.9268Z" fill="#AAABAC"/>
|
|
22
22
|
<rect x="0.5" y="19.5" width="95" height="20" rx="2.5" stroke="#5B5B5B"/>
|
|
23
23
|
</svg>
|
|
24
|
-
`},components:[{tag:"ProductVariants",settings:{variantPresets:[{optionName:"base",optionType:"dropdown",presets:{
|
|
24
|
+
`},components:[{tag:"ProductVariants",settings:{variantPresets:[{optionName:"base",optionType:"dropdown",presets:{...t,...C,...e,...i,...o}}]},styles:{optionRounded:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}}]}];export{ProductVariantPreset};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as t}from"react/jsx-runtime";import o from"../../button/components/Button.js";let ThirdPartyPreview=({setting:r,styles:e})=>t(o,{setting:{...r,iconAlign:"left",iconVisible:!0,options:{isCannotEditing:!0}},styles:{...e,roundedBtn:{normal:{radiusType:"
|
|
2
|
+
import{jsx as t}from"react/jsx-runtime";import o from"../../button/components/Button.js";let ThirdPartyPreview=({setting:r,styles:e})=>t(o,{setting:{...r,iconAlign:"left",iconVisible:!0,options:{isCannotEditing:!0}},styles:{...e,roundedBtn:{normal:{radiusType:"rounded",bblr:"3px",bbrr:"3px",btlr:"3px",btrr:"3px"},hover:{radiusType:"rounded",bblr:"3px",bbrr:"3px",btlr:"3px",btrr:"3px"}},iconSpacing:{desktop:"16px"},size:{desktop:"48px",tablet:"48px",mobile:"48px"},globalSize:{desktop:{padding:{top:"12px",bottom:"12px",left:"16px",right:"16px",type:"custom"}}},typo:{custom:{fontSize:{desktop:"14px"}},attrs:{color:"#E2E2E2"}},backgroundColorV2:{normal:"#252525",hover:"#252525"},textOverFlow:!0}});export{ThirdPartyPreview as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-staging.
|
|
3
|
+
"version": "2.0.0-staging.989",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@gem-sdk/core": "2.0.0-staging.
|
|
28
|
+
"@gem-sdk/core": "2.0.0-staging.989",
|
|
29
29
|
"@gem-sdk/styles": "2.0.0-staging.987",
|
|
30
30
|
"@gem-sdk/system": "2.0.0-staging.711",
|
|
31
31
|
"tsup": "^8.5.0",
|