@gem-sdk/components 19.1.0-staging.33 → 19.1.0-staging.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var e=require("@gem-sdk/core");exports.getButtonClass=p=>({...e.composeClasses("gp-rounded-[4px] gp-text-center gp-flex gp-justify-center gp-max-w-full gp-w-full"),"gp-px-0":p?.buttonType==="link","gp-px-[26px]":p?.buttonType!=="link","gp-py-[21px]":p?.buttonType!=="link"}),exports.getContainerClass=()=>e.composeClasses("gp-flex gp-flex-wrap gp-justify-center gp-w-full"),exports.getSpaceClass=()=>e.composeClasses("gp-py-[13px] hidden"),exports.getTextClass=p=>({...e.composeClasses("!gp-inline-flex gp-py-2 gp-leading-[1.3]"),"button-text":"edit"===p}),exports.getTextClassWrapper=()=>e.composeClasses("gp-leading-[15px] gp-w-fit"),exports.getWrapperClass=()=>e.composeClasses("gp-flex gp-items-start gp-h-full");
1
+ "use strict";var e=require("@gem-sdk/core");exports.getButtonClass=p=>({...e.composeClasses("gp-rounded-[4px] gp-text-center gp-flex gp-justify-center gp-max-w-full gp-w-full"),"gp-px-0":p?.buttonType==="link","gp-px-[26px]":p?.buttonType!=="link","gp-py-[21px]":p?.buttonType!=="link"}),exports.getContainerClass=()=>e.composeClasses("gp-flex gp-flex-wrap gp-justify-center gp-w-full"),exports.getSpaceClass=()=>e.composeClasses("gp-py-[13px] hidden"),exports.getTextClass=(p,s)=>{let t="shopify"===s;return{...e.composeClasses("!gp-inline-flex gp-py-2"),"gp-leading-[15px]":t,"gp-leading-[1.3]":!t,"button-text":"edit"===p}},exports.getTextClassWrapper=()=>e.composeClasses("gp-leading-[15px] gp-w-fit"),exports.getWrapperClass=()=>e.composeClasses("gp-flex gp-items-start gp-h-full");
@@ -0,0 +1 @@
1
+ "use strict";const s=/\sstyle\s*=\s*("[^"]*"|'[^']*')/gi;exports.stripInlineStyles=t=>"string"==typeof t?t.replace(s,""):t;
@@ -1 +1 @@
1
- "use strict";var t=require("@gem-sdk/core"),e=require("../../../helpers.js"),r=require("../../common/helper.js");exports.getButtonStyles=(o,n)=>{let l=()=>o?t.makeStyle({bg:r.buttonColor.secondary}):n?.buttonType==="primary"?t.makeStyle({bg:r.buttonColor.primary}):n?.buttonType==="secondary"?{boxShadow:`inset 0 0 0 1px ${r.buttonColor.secondary}`}:void 0,i=l()?l():{};return e.filterTruthyStyles({...i})},exports.getContainerStyle=r=>e.filterTruthyStyles({...t.makeStyleResponsive("maxw",r?.width)}),exports.getTextStyles=(t,e,o)=>({typo:{...o?.typo,fontWeight:e?.buttonType==="link"?r.postPurchaseFontWeight.normal:r.postPurchaseFontWeight.bold,textColor:e?.buttonType==="primary"||t?"defaultButton":"defaultLink"},direction:o?.direction}),exports.getWrapperStyle=r=>{let o={...t.makeStyle({jc:r?.align==="center"?"center":r?.align==="end"?"end":"start"})};return e.filterTruthyStyles(o)};
1
+ "use strict";var t=require("@gem-sdk/core"),e=require("../../../helpers.js"),r=require("../../common/helper.js");exports.getButtonStyles=(o,n)=>{let l=()=>o?t.makeStyle({bg:r.buttonColor.secondary}):n?.buttonType==="primary"?t.makeStyle({bg:r.buttonColor.primary}):n?.buttonType==="secondary"?{boxShadow:`inset 0 0 0 1px ${r.buttonColor.secondary}`}:void 0,i=l()?l():{};return e.filterTruthyStyles({...i})},exports.getContainerStyle=r=>e.filterTruthyStyles({...t.makeStyleResponsive("maxw",r?.width)}),exports.getTextStyles=(t,e,o)=>{let n=o?.textStyle==="shopify";return{typo:{...n?{fontSize:"default"}:o?.typo,fontWeight:e?.buttonType==="link"?r.postPurchaseFontWeight.normal:r.postPurchaseFontWeight.bold,textColor:e?.buttonType==="primary"||t?"defaultButton":"defaultLink"},direction:n?"ltr":o?.direction}},exports.getWrapperStyle=r=>{let o={...t.makeStyle({jc:r?.align==="center"?"center":r?.align==="end"?"end":"start"})};return e.filterTruthyStyles(o)};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("@gem-sdk/core"),t=require("../../text/components/Text.js"),r=require("@gem-sdk/system"),a=require("../common/styles.js"),l=require("../common/classes.js");exports.default=({styles:c,builderAttrs:i,style:n,setting:o,advanced:u,builderProps:C,disabled:x,...y})=>{let d=s.useEditorMode(),{text:g}=o??{},m=r.createStyle({...a.getButtonStyles(x,o)}),p=a.getTextStyles(x,o,c),j=r.createStyle({...a.getContainerStyle(c)}),S=r.createStyle({...a.getWrapperStyle(c)}),q=r.createClass(l.getButtonClass(o)),v=r.createClass(l.getTextClass(d)),N=r.createClass(l.getSpaceClass()),T=r.createClass(l.getContainerClass()),W=r.createClass(l.getTextClassWrapper()),f=r.createClass(l.getWrapperClass()),h=r.createAttr({...i});return e.jsxs("div",{...y,...h,className:f,style:S,children:[e.jsx("div",{className:N}),e.jsx("div",{className:T,style:j,children:e.jsx("button",{className:q,style:m,children:e.jsx(t.default,{setting:{text:g},textClassWrapper:W,textClass:v,styles:p})})})]})};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),s=require("../../text/components/Text.js"),r=require("@gem-sdk/system"),a=require("../common/styles.js"),l=require("../common/classes.js"),c=require("../common/helper.js");exports.default=({styles:i,builderAttrs:n,style:o,setting:y,advanced:u,builderProps:x,disabled:p,...C})=>{let m=t.useEditorMode(),{text:d}=y??{},g=i?.textStyle==="shopify",j=r.createStyle({...a.getButtonStyles(p,y)}),S=a.getTextStyles(p,y,i),q=r.createStyle({...a.getContainerStyle(i)}),h=r.createStyle({...a.getWrapperStyle(i)}),v=r.createClass(l.getButtonClass(y)),f=r.createClass(l.getTextClass(m,i?.textStyle)),N=r.createClass(l.getSpaceClass()),T=r.createClass(l.getContainerClass()),W=r.createClass(l.getTextClassWrapper()),b=r.createClass(l.getWrapperClass()),k=r.createAttr({...n});return e.jsxs("div",{...C,...k,className:b,style:h,children:[e.jsx("div",{className:N}),e.jsx("div",{className:T,style:q,children:e.jsx("button",{className:v,style:j,children:e.jsx(s.default,{setting:{text:g?c.stripInlineStyles(d):d},textClassWrapper:W,textClass:f,styles:S})})})]})};
@@ -1 +1 @@
1
- "use strict";exports.DeclineButtonSettings=[{id:"setting",controls:[{id:"text",label:"Content",type:"select",options:[{value:"No thanks",label:"No thanks"},{value:"Decline offer",label:"Decline offer"}],default:"No thanks"},{id:"buttonType",type:"layout-selector",label:"Style",iconViewBox:"0 0 80 48",enableItemBackground:!0,enableItemOpacity:!0,itemPerRow:2,itemSpacing:"large",default:"secondary",options:[{label:"Outline",value:"secondary",type:"post-purchase-button",iconName:"gp-secondary-button"},{label:"Text link",value:"link",type:"post-purchase-button",iconName:"gp-link-button"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];
1
+ "use strict";exports.DeclineButtonSettings=[{id:"setting",controls:[{id:"text",label:"Content",type:"select",options:[{value:"No thanks",label:"No thanks"},{value:"Decline offer",label:"Decline offer"}],default:"No thanks"},{id:"buttonType",type:"layout-selector",label:"Style",iconViewBox:"0 0 80 48",enableItemBackground:!0,enableItemOpacity:!0,itemPerRow:2,itemSpacing:"large",default:"secondary",options:[{label:"Outline",value:"secondary",type:"post-purchase-button",iconName:"gp-secondary-button"},{label:"Text link",value:"link",type:"post-purchase-button",iconName:"gp-link-button"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"textStyle",label:"Type",type:"option:value",options:[{label:"Shopify",value:"shopify"},{label:"Custom",value:"custom"}],default:"custom"}]}];
@@ -1 +1 @@
1
- "use strict";exports.SettingUIV2=[{label:"Style",controls:[{setting:{id:"buttonType"},layout:"vertical",popoverLabel:"Style"}]},{label:"Size",controls:[{label:"Width",setting:{id:"width"},layout:"horizontal"}]},{label:"Text",controls:[{type:"control",label:"Direction",setting:{id:"direction"},layout:"horizontal"},{type:"control",setting:{id:"typo"},layout:"vertical"}]},{controls:[{type:"control",label:"Align",setting:{id:"align"},conditionEnable:'!(parseInt(width) >= 100 && width?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];
1
+ "use strict";exports.SettingUIV2=[{label:"Style",controls:[{setting:{id:"buttonType"},layout:"vertical",popoverLabel:"Style"}]},{label:"Size",controls:[{label:"Width",setting:{id:"width"},layout:"horizontal"}]},{label:"Text",controls:[{type:"control",label:"Preset",setting:{id:"textStyle"},layout:"horizontal"},{type:"control",label:"Direction",setting:{id:"direction"},layout:"horizontal",conditionDisplay:'textStyle !== "shopify"'},{type:"control",setting:{id:"typo"},layout:"vertical",conditionDisplay:'textStyle !== "shopify"'}]},{controls:[{type:"control",label:"Align",setting:{id:"align"},conditionEnable:'!(parseInt(width) >= 100 && width?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];
@@ -1 +1 @@
1
- "use strict";exports.AcceptButtonSettings=[{id:"setting",controls:[{id:"outOfStockLabel",type:"input",label:"Out Of Stock Message",default:"Out of stock",clearButton:!1},{id:"text",label:"Content",type:"select",options:[{value:"Take the deal",label:"Take the deal"},{value:"Buy",label:"Buy"}],default:"Take the deal"},{id:"buttonType",label:"Style",type:"layout-segment",iconViewBox:"0 0 120 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"secondary",value:"secondary",type:"post-purchase-button"},{label:"link",value:"link",type:"post-purchase-button"}],default:"primary"}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];
1
+ "use strict";exports.AcceptButtonSettings=[{id:"setting",controls:[{id:"outOfStockLabel",type:"input",label:"Out Of Stock Message",default:"Out of stock",clearButton:!1},{id:"text",label:"Content",type:"select",options:[{value:"Take the deal",label:"Take the deal"},{value:"Buy",label:"Buy"}],default:"Take the deal"},{id:"buttonType",label:"Style",type:"layout-segment",iconViewBox:"0 0 120 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"secondary",value:"secondary",type:"post-purchase-button"},{label:"link",value:"link",type:"post-purchase-button"}],default:"primary"}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"textStyle",label:"Type",type:"option:value",options:[{label:"Shopify",value:"shopify"},{label:"Custom",value:"custom"}],default:"custom"}]}];
@@ -1 +1 @@
1
- "use strict";exports.SettingUIV2=[{label:"Size",controls:[{type:"control",label:"Width",setting:{id:"width"},layout:"horizontal"}]},{label:"Text",controls:[{type:"control",label:"Direction",setting:{id:"direction"},layout:"horizontal"},{type:"control",setting:{id:"typo"},layout:"vertical"}]},{label:"Out of stock button",controls:[{type:"control",label:"Message",setting:{id:"outOfStockLabel"},layout:"horizontal"}]},{controls:[{type:"control",label:"Align",setting:{id:"align"},conditionEnable:'!(parseInt(width) >= 100 && width?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];
1
+ "use strict";exports.SettingUIV2=[{label:"Size",controls:[{type:"control",label:"Width",setting:{id:"width"},layout:"horizontal"}]},{label:"Text",controls:[{type:"control",label:"Preset",setting:{id:"textStyle"},layout:"horizontal"},{type:"control",label:"Direction",setting:{id:"direction"},layout:"horizontal",conditionDisplay:'textStyle !== "shopify"'},{type:"control",setting:{id:"typo"},layout:"vertical",conditionDisplay:'textStyle !== "shopify"'}]},{label:"Out of stock button",controls:[{type:"control",label:"Message",setting:{id:"outOfStockLabel"},layout:"horizontal"}]},{controls:[{type:"control",label:"Align",setting:{id:"align"},conditionEnable:'!(parseInt(width) >= 100 && width?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];
@@ -1 +1 @@
1
- import{composeClasses as p}from"@gem-sdk/core";let e=()=>p("gp-py-[13px] hidden"),t=()=>p("gp-flex gp-flex-wrap gp-justify-center gp-w-full"),g=()=>p("gp-leading-[15px] gp-w-fit"),l=()=>p("gp-flex gp-items-start gp-h-full"),n=e=>({...p("gp-rounded-[4px] gp-text-center gp-flex gp-justify-center gp-max-w-full gp-w-full"),"gp-px-0":e?.buttonType==="link","gp-px-[26px]":e?.buttonType!=="link","gp-py-[21px]":e?.buttonType!=="link"}),x=e=>({...p("!gp-inline-flex gp-py-2 gp-leading-[1.3]"),"button-text":"edit"===e});export{n as getButtonClass,t as getContainerClass,e as getSpaceClass,x as getTextClass,g as getTextClassWrapper,l as getWrapperClass};
1
+ import{composeClasses as p}from"@gem-sdk/core";let e=()=>p("gp-py-[13px] hidden"),t=()=>p("gp-flex gp-flex-wrap gp-justify-center gp-w-full"),g=()=>p("gp-leading-[15px] gp-w-fit"),l=()=>p("gp-flex gp-items-start gp-h-full"),n=e=>({...p("gp-rounded-[4px] gp-text-center gp-flex gp-justify-center gp-max-w-full gp-w-full"),"gp-px-0":e?.buttonType==="link","gp-px-[26px]":e?.buttonType!=="link","gp-py-[21px]":e?.buttonType!=="link"}),x=(e,t)=>{let g="shopify"===t;return{...p("!gp-inline-flex gp-py-2"),"gp-leading-[15px]":g,"gp-leading-[1.3]":!g,"button-text":"edit"===e}};export{n as getButtonClass,t as getContainerClass,e as getSpaceClass,x as getTextClass,g as getTextClassWrapper,l as getWrapperClass};
@@ -0,0 +1 @@
1
+ let e=/\sstyle\s*=\s*("[^"]*"|'[^']*')/gi,s=s=>"string"==typeof s?s.replace(e,""):s;export{s as stripInlineStyles};
@@ -1 +1 @@
1
- import{makeStyleResponsive as t,makeStyle as e}from"@gem-sdk/core";import{filterTruthyStyles as r}from"../../../helpers.js";import{buttonColor as o,postPurchaseFontWeight as n}from"../../common/helper.js";let i=(t,n)=>{let i=()=>t?e({bg:o.secondary}):n?.buttonType==="primary"?e({bg:o.primary}):n?.buttonType==="secondary"?{boxShadow:`inset 0 0 0 1px ${o.secondary}`}:void 0,p=i()?i():{};return r({...p})},p=e=>r({...t("maxw",e?.width)}),l=t=>{let o={...e({jc:t?.align==="center"?"center":t?.align==="end"?"end":"start"})};return r(o)},a=(t,e,r)=>({typo:{...r?.typo,fontWeight:e?.buttonType==="link"?n.normal:n.bold,textColor:e?.buttonType==="primary"||t?"defaultButton":"defaultLink"},direction:r?.direction});export{i as getButtonStyles,p as getContainerStyle,a as getTextStyles,l as getWrapperStyle};
1
+ import{makeStyleResponsive as t,makeStyle as e}from"@gem-sdk/core";import{filterTruthyStyles as r}from"../../../helpers.js";import{buttonColor as o,postPurchaseFontWeight as n}from"../../common/helper.js";let i=(t,n)=>{let i=()=>t?e({bg:o.secondary}):n?.buttonType==="primary"?e({bg:o.primary}):n?.buttonType==="secondary"?{boxShadow:`inset 0 0 0 1px ${o.secondary}`}:void 0,l=i()?i():{};return r({...l})},l=e=>r({...t("maxw",e?.width)}),p=t=>{let o={...e({jc:t?.align==="center"?"center":t?.align==="end"?"end":"start"})};return r(o)},y=(t,e,r)=>{let o=r?.textStyle==="shopify";return{typo:{...o?{fontSize:"default"}:r?.typo,fontWeight:e?.buttonType==="link"?n.normal:n.bold,textColor:e?.buttonType==="primary"||t?"defaultButton":"defaultLink"},direction:o?"ltr":r?.direction}};export{i as getButtonStyles,l as getContainerStyle,y as getTextStyles,p as getWrapperStyle};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as s,jsx as t}from"react/jsx-runtime";import{useEditorMode as e}from"@gem-sdk/core";import m from"../../text/components/Text.js";import{createStyle as r,createClass as o,createAttr as l}from"@gem-sdk/system";import{getButtonStyles as a,getContainerStyle as i,getWrapperStyle as c,getTextStyles as n}from"../common/styles.js";import{getButtonClass as p,getTextClass as d,getSpaceClass as f,getContainerClass as x,getTextClassWrapper as y,getWrapperClass as u}from"../common/classes.js";let j=({styles:j,builderAttrs:N,style:g,setting:h,advanced:v,builderProps:k,disabled:C,...b})=>{let B=e(),{text:T}=h??{},W=r({...a(C,h)}),q=n(C,h,j),w=r({...i(j)}),z=r({...c(j)}),A=o(p(h)),D=o(d(B)),E=o(f()),F=o(x()),G=o(y()),H=o(u()),I=l({...N});return s("div",{...b,...I,className:H,style:z,children:[t("div",{className:E}),t("div",{className:F,style:w,children:t("button",{className:A,style:W,children:t(m,{setting:{text:T},textClassWrapper:G,textClass:D,styles:q})})})]})};export{j as default};
2
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useEditorMode as s}from"@gem-sdk/core";import m from"../../text/components/Text.js";import{createStyle as o,createClass as r,createAttr as l}from"@gem-sdk/system";import{getButtonStyles as i,getContainerStyle as a,getWrapperStyle as c,getTextStyles as n}from"../common/styles.js";import{getButtonClass as p,getTextClass as d,getSpaceClass as f,getContainerClass as x,getTextClassWrapper as y,getWrapperClass as h}from"../common/classes.js";import{stripInlineStyles as j}from"../common/helper.js";let u=({styles:u,builderAttrs:N,style:g,setting:v,advanced:k,builderProps:C,disabled:S,...b})=>{let B=s(),{text:T}=v??{},W=u?.textStyle==="shopify",q=o({...i(S,v)}),w=n(S,v,u),z=o({...a(u)}),A=o({...c(u)}),D=r(p(v)),E=r(d(B,u?.textStyle)),F=r(f()),G=r(x()),H=r(y()),I=r(h()),J=l({...N});return t("div",{...b,...J,className:I,style:A,children:[e("div",{className:F}),e("div",{className:G,style:z,children:e("button",{className:D,style:q,children:e(m,{setting:{text:W?j(T):T},textClassWrapper:H,textClass:E,styles:w})})})]})};export{u as default};
@@ -1 +1 @@
1
- let e=[{id:"setting",controls:[{id:"text",label:"Content",type:"select",options:[{value:"No thanks",label:"No thanks"},{value:"Decline offer",label:"Decline offer"}],default:"No thanks"},{id:"buttonType",type:"layout-selector",label:"Style",iconViewBox:"0 0 80 48",enableItemBackground:!0,enableItemOpacity:!0,itemPerRow:2,itemSpacing:"large",default:"secondary",options:[{label:"Outline",value:"secondary",type:"post-purchase-button",iconName:"gp-secondary-button"},{label:"Text link",value:"link",type:"post-purchase-button",iconName:"gp-link-button"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];export{e as DeclineButtonSettings};
1
+ let e=[{id:"setting",controls:[{id:"text",label:"Content",type:"select",options:[{value:"No thanks",label:"No thanks"},{value:"Decline offer",label:"Decline offer"}],default:"No thanks"},{id:"buttonType",type:"layout-selector",label:"Style",iconViewBox:"0 0 80 48",enableItemBackground:!0,enableItemOpacity:!0,itemPerRow:2,itemSpacing:"large",default:"secondary",options:[{label:"Outline",value:"secondary",type:"post-purchase-button",iconName:"gp-secondary-button"},{label:"Text link",value:"link",type:"post-purchase-button",iconName:"gp-link-button"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"textStyle",label:"Type",type:"option:value",options:[{label:"Shopify",value:"shopify"},{label:"Custom",value:"custom"}],default:"custom"}]}];export{e as DeclineButtonSettings};
@@ -1 +1 @@
1
- let t=[{label:"Style",controls:[{setting:{id:"buttonType"},layout:"vertical",popoverLabel:"Style"}]},{label:"Size",controls:[{label:"Width",setting:{id:"width"},layout:"horizontal"}]},{label:"Text",controls:[{type:"control",label:"Direction",setting:{id:"direction"},layout:"horizontal"},{type:"control",setting:{id:"typo"},layout:"vertical"}]},{controls:[{type:"control",label:"Align",setting:{id:"align"},conditionEnable:'!(parseInt(width) >= 100 && width?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];export{t as SettingUIV2};
1
+ let t=[{label:"Style",controls:[{setting:{id:"buttonType"},layout:"vertical",popoverLabel:"Style"}]},{label:"Size",controls:[{label:"Width",setting:{id:"width"},layout:"horizontal"}]},{label:"Text",controls:[{type:"control",label:"Preset",setting:{id:"textStyle"},layout:"horizontal"},{type:"control",label:"Direction",setting:{id:"direction"},layout:"horizontal",conditionDisplay:'textStyle !== "shopify"'},{type:"control",setting:{id:"typo"},layout:"vertical",conditionDisplay:'textStyle !== "shopify"'}]},{controls:[{type:"control",label:"Align",setting:{id:"align"},conditionEnable:'!(parseInt(width) >= 100 && width?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];export{t as SettingUIV2};
@@ -1 +1 @@
1
- let e=[{id:"setting",controls:[{id:"outOfStockLabel",type:"input",label:"Out Of Stock Message",default:"Out of stock",clearButton:!1},{id:"text",label:"Content",type:"select",options:[{value:"Take the deal",label:"Take the deal"},{value:"Buy",label:"Buy"}],default:"Take the deal"},{id:"buttonType",label:"Style",type:"layout-segment",iconViewBox:"0 0 120 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"secondary",value:"secondary",type:"post-purchase-button"},{label:"link",value:"link",type:"post-purchase-button"}],default:"primary"}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];export{e as AcceptButtonSettings};
1
+ let e=[{id:"setting",controls:[{id:"outOfStockLabel",type:"input",label:"Out Of Stock Message",default:"Out of stock",clearButton:!1},{id:"text",label:"Content",type:"select",options:[{value:"Take the deal",label:"Take the deal"},{value:"Buy",label:"Buy"}],default:"Take the deal"},{id:"buttonType",label:"Style",type:"layout-segment",iconViewBox:"0 0 120 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"secondary",value:"secondary",type:"post-purchase-button"},{label:"link",value:"link",type:"post-purchase-button"}],default:"primary"}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"textStyle",label:"Type",type:"option:value",options:[{label:"Shopify",value:"shopify"},{label:"Custom",value:"custom"}],default:"custom"}]}];export{e as AcceptButtonSettings};
@@ -1 +1 @@
1
- let t=[{label:"Size",controls:[{type:"control",label:"Width",setting:{id:"width"},layout:"horizontal"}]},{label:"Text",controls:[{type:"control",label:"Direction",setting:{id:"direction"},layout:"horizontal"},{type:"control",setting:{id:"typo"},layout:"vertical"}]},{label:"Out of stock button",controls:[{type:"control",label:"Message",setting:{id:"outOfStockLabel"},layout:"horizontal"}]},{controls:[{type:"control",label:"Align",setting:{id:"align"},conditionEnable:'!(parseInt(width) >= 100 && width?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];export{t as SettingUIV2};
1
+ let t=[{label:"Size",controls:[{type:"control",label:"Width",setting:{id:"width"},layout:"horizontal"}]},{label:"Text",controls:[{type:"control",label:"Preset",setting:{id:"textStyle"},layout:"horizontal"},{type:"control",label:"Direction",setting:{id:"direction"},layout:"horizontal",conditionDisplay:'textStyle !== "shopify"'},{type:"control",setting:{id:"typo"},layout:"vertical",conditionDisplay:'textStyle !== "shopify"'}]},{label:"Out of stock button",controls:[{type:"control",label:"Message",setting:{id:"outOfStockLabel"},layout:"horizontal"}]},{controls:[{type:"control",label:"Align",setting:{id:"align"},conditionEnable:'!(parseInt(width) >= 100 && width?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];export{t as SettingUIV2};
@@ -2501,11 +2501,13 @@ type PostPurchaseButtonSettingProps = {
2501
2501
  outOfStockLabel?: string;
2502
2502
  requireAcceptTermLabel?: string;
2503
2503
  };
2504
+ type PostPurchaseButtonTextStyle = 'custom' | 'shopify';
2504
2505
  type PostPurchaseButtonStyleProps = {
2505
2506
  typo?: PostPurchaseTypo;
2506
2507
  align?: 'start' | 'end' | 'center';
2507
2508
  width?: ObjectDevices<string>;
2508
2509
  direction?: 'ltr' | 'rtl';
2510
+ textStyle?: PostPurchaseButtonTextStyle;
2509
2511
  };
2510
2512
  type PostPurchaseButtonProps = BasePropsWrap<PostPurchaseButtonSettingProps, PostPurchaseButtonStyleProps>;
2511
2513
 
@@ -6324,6 +6326,7 @@ declare const _default$4: {
6324
6326
  align?: "start" | "end" | "center";
6325
6327
  width?: _gem_sdk_core.ObjectDevices<string>;
6326
6328
  direction?: "ltr" | "rtl";
6329
+ textStyle?: PostPurchaseButtonTextStyle;
6327
6330
  }, Record<string, any>> & {
6328
6331
  builderAttrs?: Record<string, any>;
6329
6332
  style?: React.CSSProperties;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "19.1.0-staging.33",
3
+ "version": "19.1.0-staging.34",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",