@gem-sdk/components 2.0.0-staging.1011 → 2.0.0-staging.1014

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 helpers=require("../../helpers.js");const getTextIconNotFound=e=>"react"===e?"Icons not found":helpers.getStaticLocale("IconList","icons_not_found"),getTextIconTranslations=({setting:e,builderProps:t,pageContext:n,key:o,type:r})=>{let{childItem:a,translate:s}=e??{};return"react"===r?a?.[o]:helpers.getDynamicSourceLocales({val:a?.[o],uid:t?.uid,settingId:`childItem_${o}`,pageContext:n,translate:s,isReplaceLocationOrigin:!0})},getvalueMap=({setting:e})=>{let{childConfig:t,iconType:n,iconSvg:o}=e??{};return n&&"matching"!==n?"different"===n?t:void 0:Array(t?.length).fill(o)};exports.getTextIconNotFound=getTextIconNotFound,exports.getTextIconTranslations=getTextIconTranslations,exports.getvalueMap=getvalueMap;
1
+ "use strict";var core=require("@gem-sdk/core"),helpers=require("../../helpers.js");const getTextIconNotFound=e=>"react"===e?"Icons not found":helpers.getStaticLocale("IconList","icons_not_found"),getTextIconTranslations=({setting:e,builderProps:o,pageContext:t,key:n,type:i})=>{let{childItem:s,translate:c}=e??{};return"react"===i?s?.[n]:helpers.getDynamicSourceLocales({val:s?.[n],uid:o?.uid,settingId:`childItem_${n}`,pageContext:t,translate:c,isReplaceLocationOrigin:!0})},getvalueMap=({setting:e})=>{let{childConfig:o,iconType:t,iconSvg:n}=e??{};return t&&"matching"!==t?"different"===t?o:void 0:Array(o?.length).fill(n)},composePostionIconList=(e,o,t)=>{let n={};return core.composePositionLineHeight({compose:n,lineHeight:e,device:"desktop",position:o,iconWidth:t}),core.composePositionLineHeight({compose:n,lineHeight:e,device:"tablet",position:o,iconWidth:t}),core.composePositionLineHeight({compose:n,lineHeight:e,device:"mobile",position:o,iconWidth:t}),n};exports.composePostionIconList=composePostionIconList,exports.getTextIconNotFound=getTextIconNotFound,exports.getTextIconTranslations=getTextIconTranslations,exports.getvalueMap=getvalueMap;
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core");const filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet"];return t.forEach(t=>{delete e?.[t]}),e},getStyleContainerIconlistMain=({styles:e,style:t,type:o,advanced:r})=>{let{align:l}=e??{};return{...t="react"===o?filterStyles(t):t,...core.makeStyleResponsive("jc",l),...core.makeStyleResponsive("d",{desktop:r?.d?.desktop?"flex":"none",tablet:r?.d?.tablet?"flex":"none",mobile:r?.d?.mobile?"flex":"none"})}},getStyleWraplistIcon=({styles:e})=>{let{panelAlign:t,contentBoxPadding:o,contentBoxWidth:r,background:l,contentBoxBorder:i,contentBoxRounded:s,contentBoxShadow:n}=e??{};return{...core.composeBorderResponsive(i),...core.getResponsiveStyleShadowWithoutState(n,"box-shadow",n),...core.composeRadiusResponsive(s),...core.getStyleBackgroundByDevice(l),...core.getResponsiveStylePadding(o),...core.makeStyleResponsive("w",r),...core.makeStyleResponsive("jc",t),...core.getGradientBgrStyleByDevice(l,{desktop:!0,tablet:!0,mobile:!0})}},getStyleColListIcon=({styles:e})=>{let{verticalSpacing:t}=e??{};return{...core.makeStyleResponsive("rg",t)}},getStyleWrapItemIcon=({styles:e})=>{let{horizontalSpacing:t,position:o}=e??{};return{...core.makeStyleResponsive("cg",t),...core.makeStyleResponsive("ai",o)}},getStyleWrapIcon=({styles:e,setting:t})=>{let{iconBorder:o,backgroundColor:r,iconRounded:l}=e??{},{globalSize:i}=t??{},s=core.makeGlobalSize(i);return{...s.padding,...core.makeStyle({bs:o?.border,bw:o?.width,bc:core.getSingleColorVariable(o?.color),bg:r,bblr:l?.bblr,bbrr:l?.bbrr,btlr:l?.btlr,btrr:l?.btrr}),...core.makeStyleResponsive("pos",{desktop:"relative",tablet:"relative",mobile:"relative"}),...core.makeStyleResponsive("top",{desktop:"inherit",tablet:"inherit",mobile:"inherit"})}},getStyleIcon=({styles:e,setting:t})=>{let{iconColor:o}=e||{},{iconWidth:r}=t??{};return{"--c":core.getSingleColorVariable(o),"--w":"100%","--h":"100%","--size-desktop":`${r?.desktop}px`,"--size-tablet":`${r?.tablet||r?.desktop}px`,"--size-mobile":`${r?.mobile||r?.tablet||r?.desktop}px`}},getStyleTypoText=({setting:e})=>({typo:e?.textTypo});exports.getStyleColListIcon=getStyleColListIcon,exports.getStyleContainerIconlistMain=getStyleContainerIconlistMain,exports.getStyleIcon=getStyleIcon,exports.getStyleTypoText=getStyleTypoText,exports.getStyleWrapIcon=getStyleWrapIcon,exports.getStyleWrapItemIcon=getStyleWrapItemIcon,exports.getStyleWraplistIcon=getStyleWraplistIcon;
1
+ "use strict";var core=require("@gem-sdk/core");const filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet"];return t.forEach(t=>{delete e?.[t]}),e},getStyleContainerIconlistMain=({styles:e,style:t,type:o,advanced:r})=>{let{align:l}=e??{};return{...t="react"===o?filterStyles(t):t,...core.makeStyleResponsive("jc",l),...core.makeStyleResponsive("d",{desktop:r?.d?.desktop?"flex":"none",tablet:r?.d?.tablet?"flex":"none",mobile:r?.d?.mobile?"flex":"none"})}},getStyleWraplistIcon=({styles:e})=>{let{panelAlign:t,contentBoxPadding:o,contentBoxWidth:r,background:l,contentBoxBorder:n,contentBoxRounded:s,contentBoxShadow:c}=e??{};return{...core.composeBorderResponsive(n),...core.getResponsiveStyleShadowWithoutState(c,"box-shadow",c),...core.composeRadiusResponsive(s),...core.getStyleBackgroundByDevice(l),...core.getResponsiveStylePadding(o),...core.makeStyleResponsive("w",r),...core.makeStyleResponsive("jc",t),...core.getGradientBgrStyleByDevice(l,{desktop:!0,tablet:!0,mobile:!0})}},getStyleColListIcon=({styles:e})=>{let{verticalSpacing:t}=e??{};return{...core.makeStyleResponsive("rg",t)}},getStyleWrapItemIcon=({styles:e})=>{let{horizontalSpacing:t}=e??{};return{...core.makeStyleResponsive("cg",t)}},getStyleWrapIcon=({styles:e,setting:t})=>{let{iconBorder:o,backgroundColor:r,iconRounded:l}=e??{},{globalSize:n}=t??{},s=core.makeGlobalSize(n);return{...s.padding,...core.makeStyle({bs:o?.border,bw:o?.width,bc:core.getSingleColorVariable(o?.color),bg:r,bblr:l?.bblr,bbrr:l?.bbrr,btlr:l?.btlr,btrr:l?.btrr})}},getStyleIcon=({styles:e,setting:t})=>{let{iconColor:o}=e||{},{iconWidth:r}=t??{};return{"--c":core.getSingleColorVariable(o),"--w":"100%","--h":"100%","--size-desktop":`${r?.desktop}px`,"--size-tablet":`${r?.tablet||r?.desktop}px`,"--size-mobile":`${r?.mobile||r?.tablet||r?.desktop}px`}},getStyleTypoText=({setting:e})=>({typo:e?.textTypo});exports.getStyleColListIcon=getStyleColListIcon,exports.getStyleContainerIconlistMain=getStyleContainerIconlistMain,exports.getStyleIcon=getStyleIcon,exports.getStyleTypoText=getStyleTypoText,exports.getStyleWrapIcon=getStyleWrapIcon,exports.getStyleWrapItemIcon=getStyleWrapItemIcon,exports.getStyleWraplistIcon=getStyleWraplistIcon;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),useGetProductId=require("../../hooks/useGetProductId.js"),React=require("react"),Text=require("../../text/components/Text.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),helpers=require("../common/helpers.js");const IconListV2=e=>{let{builderProps:s,builderAttrs:t,style:l,setting:a,styles:r,pageContext:c,advanced:y}=e,n=system.createClass({[s?.uid??""]:!0}),i=system.createClass(classes.getClassWraplistIcon()),m=system.createClass(classes.getClassColListIcon()),o=system.createClass(classes.getClassWrapItemIcon({builderProps:s})),u=system.createClass(classes.getClassWrapIcon()),d=system.createClass(classes.getClassIcon()),x=system.createClass(classes.getClassTextItem({setting:a})),p=system.createStyle(styles.getStyleContainerIconlistMain({styles:r,style:l,type:"react",advanced:y})),I=system.createStyle(styles.getStyleWraplistIcon({styles:r})),j=system.createStyle(styles.getStyleColListIcon({styles:r})),g=system.createStyle(styles.getStyleWrapIcon({styles:r,setting:a})),C=system.createStyle(styles.getStyleWrapItemIcon({styles:r})),S=system.createStyle(styles.getStyleIcon({styles:r,setting:a})),h=styles.getStyleTypoText({setting:a}),R=system.createAttr({...t}),T=helpers.getTextIconNotFound("react"),v=helpers.getvalueMap({setting:a}),q=React.useRef(null),{refContainer:f,productID:N}=useGetProductId.useGetProductId();return jsxRuntime.jsx("div",{...R,...s,"data-id":s?.uid,style:p,className:n,ref:f,children:system.If(!v||!v.length,jsxRuntime.jsx("div",{children:T}),jsxRuntime.jsx("div",{className:i,style:I,children:jsxRuntime.jsx("div",{className:m,style:j,children:v?.map((e,t)=>{let l=helpers.getTextIconTranslations({setting:a,builderProps:s,pageContext:c,key:t,type:"react"});return jsxRuntime.jsxs("div",{"data-index":t,className:o,style:C,children:[jsxRuntime.jsx("div",{className:u,style:g,children:jsxRuntime.jsx("span",{style:S,className:d,dangerouslySetInnerHTML:{__html:e}})}),jsxRuntime.jsx(Text.default,{setting:{text:l?.toString(),htmlTag:"div",options:{useState:!0,uniqueId:`${s?.uid}-${t}-${N}`,productID:N,customClass:{wrapper:"gp-w-full"}}},styles:h,className:x,ref:q})]},t)})})}))})};exports.default=IconListV2;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),useGetProductId=require("../../hooks/useGetProductId.js"),Text=require("../../text/components/Text.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),helpers=require("../common/helpers.js"),useIconLineHeight=require("../hooks/useIconLineHeight.js");const IconListV2=e=>{let{builderProps:s,builderAttrs:t,style:l,setting:a,styles:r,pageContext:c,advanced:n}=e,i=system.createClass({[s?.uid??""]:!0}),o=system.createClass(classes.getClassWraplistIcon()),y=system.createClass(classes.getClassColListIcon()),m=system.createClass(classes.getClassWrapItemIcon({builderProps:s})),u=system.createClass(classes.getClassWrapIcon()),d=system.createClass(classes.getClassIcon()),p=system.createClass(classes.getClassTextItem({setting:a})),x=system.createStyle(styles.getStyleContainerIconlistMain({styles:r,style:l,type:"react",advanced:n})),I=system.createStyle(styles.getStyleWraplistIcon({styles:r})),g=system.createStyle(styles.getStyleColListIcon({styles:r})),j=system.createStyle(styles.getStyleIcon({styles:r,setting:a})),h=styles.getStyleTypoText({setting:a}),C=system.createAttr({...t}),S=helpers.getTextIconNotFound("react"),T=helpers.getvalueMap({setting:a}),{ref:v,lineHeight:L}=useIconLineHeight.useIconLineHeight({iconWidth:a?.iconWidth}),q=helpers.composePostionIconList(L,r?.position,a?.iconWidth),{refContainer:R,productID:W}=useGetProductId.useGetProductId(),N=system.createStyle({...styles.getStyleWrapIcon({styles:r,setting:a}),...q.content}),f=system.createStyle({...styles.getStyleWrapItemIcon({styles:r}),...q.wrapper});return jsxRuntime.jsx("div",{...C,...s,"data-id":s?.uid,style:x,className:i,ref:R,children:system.If(!T||!T.length,jsxRuntime.jsx("div",{children:S}),jsxRuntime.jsx("div",{className:o,style:I,children:jsxRuntime.jsx("div",{className:y,style:g,children:T?.map((e,t)=>{let l=helpers.getTextIconTranslations({setting:a,builderProps:s,pageContext:c,key:t,type:"react"});return jsxRuntime.jsxs("div",{"data-index":t,className:m,style:f,children:[jsxRuntime.jsx("div",{className:u,style:N,children:jsxRuntime.jsx("span",{style:j,className:d,dangerouslySetInnerHTML:{__html:e}})}),jsxRuntime.jsx(Text.default,{setting:{text:l?.toString(),htmlTag:"div",options:{useState:!0,uniqueId:`${s?.uid}-${t}-${W}`,productID:W,customClass:{wrapper:"gp-w-full"}}},styles:h,className:p,ref:v})]},t)})})}))})};exports.default=IconListV2;
@@ -1,32 +1,32 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers$1=require("../../helpers.js"),Text_liquid=require("../../text/components/Text.liquid.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),helpers=require("../common/helpers.js");const IconListV2=e=>{let{builderProps:s,builderAttrs:t,style:l,setting:a,styles:r,pageContext:i}=e,c=system.createClass({[s?.uid??""]:!0}),o=system.createClass(classes.getClassWraplistIcon()),y=system.createClass(classes.getClassColListIcon()),n=system.createClass(classes.getClassWrapItemIcon({builderProps:s})),p=system.createClass(classes.getClassWrapIcon()),d=system.createClass(classes.getClassIcon()),m=system.createClass(classes.getClassTextItem({setting:a})),g=system.createStyle(styles.getStyleContainerIconlistMain({styles:r,style:l,type:"liquid"})),u=system.createStyle(styles.getStyleWraplistIcon({styles:r})),$=system.createStyle(styles.getStyleColListIcon({styles:r})),S=system.createStyle(styles.getStyleWrapIcon({styles:r,setting:a})),I=system.createStyle(styles.getStyleWrapItemIcon({styles:r})),v=system.createStyle(styles.getStyleIcon({styles:r,setting:a})),C=styles.getStyleTypoText({setting:a}),h=system.createAttr({...t}),q=helpers.getTextIconNotFound("liquid"),f=helpers.getvalueMap({setting:a});return core.template`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers$1=require("../../helpers.js"),Text_liquid=require("../../text/components/Text.liquid.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),helpers=require("../common/helpers.js");const IconListV2=e=>{let{builderProps:s,builderAttrs:t,style:l,setting:a,styles:r,pageContext:i}=e,c=s?.builderData?.advanced,o=system.createClass({[s?.uid??""]:!0}),y=system.createClass(classes.getClassWraplistIcon()),n=system.createClass(classes.getClassColListIcon()),p=system.createClass(classes.getClassWrapItemIcon({builderProps:s})),d=system.createClass(classes.getClassWrapIcon()),m=system.createClass(classes.getClassIcon()),g=system.createClass(classes.getClassTextItem({setting:a})),u=system.createStyle(styles.getStyleContainerIconlistMain({styles:r,style:l,type:"liquid",advanced:c})),$=system.createStyle(styles.getStyleWraplistIcon({styles:r})),S=system.createStyle(styles.getStyleColListIcon({styles:r})),I=system.createStyle(styles.getStyleWrapIcon({styles:r,setting:a})),v=system.createStyle(styles.getStyleWrapItemIcon({styles:r})),C=system.createStyle(styles.getStyleIcon({styles:r,setting:a})),h=styles.getStyleTypoText({setting:a}),q=system.createAttr({...t}),f=helpers.getTextIconNotFound("liquid"),x=helpers.getvalueMap({setting:a});return core.template`
2
2
  {% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
3
3
  <gp-icon-list
4
- ${{...h}}
4
+ ${{...q}}
5
5
  ${{...s}}
6
6
  data-id="${s?.uid}"
7
- style="${g}"
8
- className="${c}"
7
+ style="${u}"
8
+ className="${o}"
9
9
  gp-data='${core.dataStringify({position:r?.position,iconWidth:a?.iconWidth}).replaceAll("'","&#039;")}'
10
10
  >
11
- ${system.If(!f||!f.length,core.template`<div>${q}</div>`,core.template`
12
- <div class="${o}" style="${u}">
13
- <div class="${y}" style="${$}">
14
- ${f?.map((e,t)=>{let l=helpers.getTextIconTranslations({setting:a,builderProps:s,pageContext:i,key:t,type:"liquid"});return core.template`
11
+ ${system.If(!x||!x.length,core.template`<div>${f}</div>`,core.template`
12
+ <div class="${y}" style="${$}">
13
+ <div class="${n}" style="${S}">
14
+ ${x?.map((e,t)=>{let l=helpers.getTextIconTranslations({setting:a,builderProps:s,pageContext:i,key:t,type:"liquid"});return core.template`
15
15
  <div
16
16
  key="${t}"
17
17
  data-index="${t}"
18
- class="${n}"
19
- style="${I}"
18
+ class="${p}"
19
+ style="${v}"
20
20
  >
21
- <div class="${p}" style="${S}">
21
+ <div class="${d}" style="${I}">
22
22
  <span
23
- class="${d}"
24
- style="${v}"
23
+ class="${m}"
24
+ style="${C}"
25
25
  >
26
26
  ${e}
27
27
  </span>
28
28
  </div>
29
- ${Text_liquid.default({setting:{text:l?.toString(),htmlTag:"div",options:{customClass:{wrapper:"gp-w-full"}},isForceValue:!0},styles:C,className:m})}
29
+ ${Text_liquid.default({setting:{text:l?.toString(),htmlTag:"div",options:{customClass:{wrapper:"gp-w-full"}},isForceValue:!0},styles:h,className:g})}
30
30
  </div>`}).join(" ")}
31
31
  </div>
32
32
  </div>`)}
@@ -0,0 +1 @@
1
+ "use strict";var React=require("react");const useIconLineHeight=({iconWidth:e})=>{let t=React.useRef(null),[r,u]=React.useState("");return React.useEffect(()=>{if(t?.current&&e?.desktop){let e=window.getComputedStyle(t?.current).getPropertyValue("line-height");u(e)}},[e?.desktop]),{ref:t,lineHeight:r}};exports.useIconLineHeight=useIconLineHeight;
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core");const addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,`${t}px`])),getDividerWidth=(e,t)=>{if(!e||!t)return{};let o=addPxToValues(e),r={...core.makeStyleState("brw",o),...core.makeStyleState("blw",o)};return r},getDividerColorStyle=e=>{if(!e)return{};let t={...e,normal:e?.normal??"transparent"},o={...core.getGlobalColorStateStyle("brc",t),...core.getGlobalColorStateStyle("blc",t)},r=Object.fromEntries(Object.entries(o).filter(([e,t])=>void 0!==t));return r},getInputStyle=e=>{let{styles:t,setting:o}=e,{inputBackgroundColor:r,textColor:l,dividerColor:a,dividerStroke:s,inputBoxShadow:n}=t??{},{enableHoverInput:S,hasButton:d}=o??{},c=core.composeTypographyStyle(t?.typo,t?.typography),i=core.getStyleShadowState(n,"box-shadow",{normal:!!n?.normal,hover:!!n?.hover}),p={...getDividerWidth(s,a),...getDividerColorStyle(a)},y={...core.getGlobalColorStateStyle("bg",r),...i,...core.getGlobalColorStateStyle("c",{...l,hover:l?.hover??l?.normal}),...d?p:{}},h={...core.makeStyle({}),...c,...y,...core.getStyleShadow({value:t?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:t?.typo?.custom?.hasShadowText})};return S?h:core.filterHoverVariables(h)},getButtonStyle=({borderBtn:e,buttonWidth:t,buttonBackgroundColor:o,iconColor:r,corner:l,enableHoverButton:a})=>{let s={...core.makeStyleResponsive("w",t),...core.handleConvertBorderStyle(e),...core.handleConvertBorderWidth(e),...core.handleConvertBorderColor(e),...core.getGlobalColorStateStyle("bg",o),...core.getGlobalColorStateStyle("c",r),...core.composeRadius(l)};return a?s:core.filterHoverVariables(s)},getContainerStyles=({inputHeight:e,align:t})=>({...core.makeStyleResponsive("h",e),...core.makeStyleResponsive("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:t,setting:o})=>{let{enableHoverInput:r,hasButton:l}=o??{},a=t?.shapeShadow,s=core.getResponsiveStyleShadowWithoutState(a,"box-shadow",{desktop:a?.desktop??{},tablet:a?.tablet??a?.desktop??{},mobile:a?.mobile??a?.tablet??a?.desktop??{}}),n=t?.inputBorder,S=r&&!l,d={...core.handleConvertBorderStyle(n),...core.handleConvertBorderWidth(n),...core.handleConvertBorderColor(n)};return{...S?d:{},...core.getGlobalColorStateStyle("bg",e),...core.makeStyleResponsive("maxw",t?.quantityWidth),...core.composeBorderResponsive(t?.shapeBorder),...core.composeRadiusResponsive(t?.shapeRounded),...s}};exports.getButtonStyle=getButtonStyle,exports.getContainerStyles=getContainerStyles,exports.getInputStyle=getInputStyle,exports.getWrapperStyles=getWrapperStyles;
1
+ "use strict";var core=require("@gem-sdk/core");const addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,`${t}px`])),getDividerWidth=(e,t)=>{if(!e||!t)return{};let o=addPxToValues(e),r={...core.makeStyleState("brw",o),...core.makeStyleState("blw",o)};return r},getDividerColorStyle=e=>{if(!e)return{};let t={...e,normal:e?.normal??"transparent"},o={...core.getGlobalColorStateStyle("brc",t),...core.getGlobalColorStateStyle("blc",t)},r=Object.fromEntries(Object.entries(o).filter(([e,t])=>void 0!==t));return r},getInputStyle=e=>{let{styles:t,setting:o}=e,{inputBackgroundColor:r,textColor:l,dividerColor:a,dividerStroke:s,inputBoxShadow:n}=t??{},{enableHoverInput:S,hasButton:d}=o??{},c=core.composeTypographyStyle(t?.typo,t?.typography),i=core.getStyleShadowState(n,"box-shadow",{normal:!!n?.normal,hover:!!n?.hover}),p={...getDividerWidth(s,a),...getDividerColorStyle(a)},y={...core.getGlobalColorStateStyle("bg",{...r,normal:r?.normal??"transparent"}),...i,...core.getGlobalColorStateStyle("c",{...l,hover:l?.hover??l?.normal}),...d?p:{}},h={...core.makeStyle({}),...c,...y,...core.getStyleShadow({value:t?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:t?.typo?.custom?.hasShadowText})};return S?h:core.filterHoverVariables(h)},getButtonStyle=({borderBtn:e,buttonWidth:t,buttonBackgroundColor:o,iconColor:r,corner:l,enableHoverButton:a})=>{let s={...core.makeStyleResponsive("w",t),...core.handleConvertBorderStyle(e),...core.handleConvertBorderWidth(e),...core.handleConvertBorderColor(e),...core.getGlobalColorStateStyle("bg",o),...core.getGlobalColorStateStyle("c",r),...core.composeRadius(l)};return a?s:core.filterHoverVariables(s)},getContainerStyles=({inputHeight:e,align:t})=>({...core.makeStyleResponsive("h",e),...core.makeStyleResponsive("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:t,setting:o})=>{let{enableHoverInput:r,hasButton:l}=o??{},a=t?.shapeShadow,s=core.getResponsiveStyleShadowWithoutState(a,"box-shadow",{desktop:a?.desktop??{},tablet:a?.tablet??a?.desktop??{},mobile:a?.mobile??a?.tablet??a?.desktop??{}}),n=t?.inputBorder,S=r&&!l,d={...core.handleConvertBorderStyle(n),...core.handleConvertBorderWidth(n),...core.handleConvertBorderColor(n)};return{...S?d:{},...core.getGlobalColorResponsiveStyle("bg",e),...core.makeStyleResponsive("maxw",t?.quantityWidth),...core.composeBorderResponsive(t?.shapeBorder),...core.composeRadiusResponsive(t?.shapeRounded),...s}};exports.getButtonStyle=getButtonStyle,exports.getContainerStyles=getContainerStyles,exports.getInputStyle=getInputStyle,exports.getWrapperStyles=getWrapperStyles;
@@ -1,3 +1,3 @@
1
1
  "use strict";const ProductQuantitySettings=[{id:"setting",controls:[{id:"updatePrice",label:"Update price",type:"toggle",default:!0},{id:"hasButton",label:"Button",type:"toggle",default:!0},{id:"defaultQtyValue",label:"Text",type:"input:stepper",min:1,default:1},{id:"plusIcon",type:"icon",isHideClear:!0,customLabel:"Plus",info:"Choose from list or paste any SVG icon",default:`<svg height="20px" width="20px" data-name="plus-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817698760687976">
2
2
  <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"></path></svg>`},{id:"minusIcon",type:"icon",isHideClear:!0,customLabel:"Minus",info:"Choose from list or paste any SVG icon",default:`<svg height="20px" width="20px" data-name="minus-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817690725712232">
3
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"></path></svg>`},{id:"enableHoverInput",label:"Enable hover input",type:"toggle",default:!1},{id:"enableHoverButton",label:"Enable hover input",type:"toggle",default:!1}]},{id:"style",controls:[{id:"quantityLayout",label:"Style",type:"layout-selector",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"Square",value:"product-quantity-square",type:"p-quantity-layout",iconName:"gp-product-quantity-square"},{label:"Square with divider",value:"product-quantity-square-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-square-divider"},{label:"Rounded",value:"product-quantity-rounded",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded"},{label:"Rounded with divider",value:"product-quantity-rounded-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-divider"},{label:"Square input only",value:"product-quantity-square-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-square-input-only"},{label:"Rounded input only",value:"product-quantity-rounded-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-input-only"}],default:"product-quantity-square"},{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"quantityWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"160px"}}},{id:"inputHeight",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"buttonWidth",type:"dropdown:input",label:"Button Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"iconSizeCustom",type:"input:stepper",includeUnit:"px",min:1,devices:{desktop:{default:"16px"}}}]},{id:"inputStyle",type:"group",label:"Input Style",controls:[{id:"typo",type:"typography-combo",default:{type:"paragraph-1",attrs:{color:"#121212"},custom:{fontSize:{desktop:"16px",tablet:"16px",mobile:"14px"},lineHeight:{desktop:"120%",tablet:"180%",mobile:"180%"},fontWeight:"400",fontFamily:{value:"Assistant",type:"google"},hasShadowText:!1,textShadow:{enable:!1}}},ignoreReRender:!0,hiddenSetting:{transform:!0,textAlign:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"button-behavior-state",type:"behavior-state",label:"Button Style",hide:!0,controls:[{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"inputBackgroundColor",type:"color-picker-v2",label:"Background Color",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"highlight",hover:"highlight"},enableGradient:!0},{id:"buttonBackgroundColor",type:"color-picker-v2",label:"Button Background Color",state:{hover:!0,normal:!0},enableGradient:!0,compoDefaultValue:{normal:"brand",hover:"highlight"}},{id:"iconColor",type:"color-picker-v2",label:"Icon Color",default:{normal:"#121212"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0}]},{id:"borderBtn",label:"Border",type:"border-v2",default:{normal:{}},compoDefaultValue:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}},state:{hover:!0,normal:!0}},{id:"corner",label:"Corner",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},{id:"inputBoxShadow",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}},{id:"backgroundColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF",hover:"#FFFFFF"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerColor",type:"color-picker-v2",label:"Divider Color",default:{normal:"line-3"},compoDefaultValue:{normal:"line-3"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerStroke",label:"Thickness",type:"input:stepper",min:1,default:{normal:1,hover:1},state:{hover:!0,normal:!0}},{id:"inputBorder",label:"Input Border",type:"border-v2",default:{hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}},state:{hover:!0,normal:!1}},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{radiusType:"none"}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45,enable:!0}}}}]}];exports.ProductQuantitySettings=ProductQuantitySettings;
3
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"></path></svg>`},{id:"enableHoverInput",label:"Enable hover input",type:"toggle",default:!1},{id:"enableHoverButton",label:"Enable hover input",type:"toggle",default:!1}]},{id:"style",controls:[{id:"quantityLayout",label:"Style",type:"layout-selector",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"Square",value:"product-quantity-square",type:"p-quantity-layout",iconName:"gp-product-quantity-square"},{label:"Square with divider",value:"product-quantity-square-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-square-divider"},{label:"Rounded",value:"product-quantity-rounded",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded"},{label:"Rounded with divider",value:"product-quantity-rounded-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-divider"},{label:"Square input only",value:"product-quantity-square-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-square-input-only"},{label:"Rounded input only",value:"product-quantity-rounded-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-input-only"}],default:"product-quantity-square"},{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"quantityWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"160px"}}},{id:"inputHeight",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"buttonWidth",type:"dropdown:input",label:"Button Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"iconSizeCustom",type:"input:stepper",includeUnit:"px",min:1,devices:{desktop:{default:"16px"}}}]},{id:"inputStyle",type:"group",label:"Input Style",controls:[{id:"typo",type:"typography-combo",default:{type:"paragraph-1",attrs:{color:"#121212"},custom:{fontSize:{desktop:"16px",tablet:"16px",mobile:"14px"},lineHeight:{desktop:"120%",tablet:"180%",mobile:"180%"},fontWeight:"400",fontFamily:{value:"Assistant",type:"google"},hasShadowText:!1,textShadow:{enable:!1}}},ignoreReRender:!0,hiddenSetting:{transform:!0,textAlign:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"button-behavior-state",type:"behavior-state",label:"Button Style",hide:!0,controls:[{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"inputBackgroundColor",type:"color-picker-v2",label:"Background Color",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"highlight",hover:"highlight"},enableGradient:!0},{id:"buttonBackgroundColor",type:"color-picker-v2",label:"Button Background Color",state:{hover:!0,normal:!0},enableGradient:!0,compoDefaultValue:{normal:"brand",hover:"highlight"}},{id:"iconColor",type:"color-picker-v2",label:"Icon Color",default:{normal:"#121212"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0}]},{id:"borderBtn",label:"Border",type:"border-v2",default:{normal:{}},compoDefaultValue:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}},state:{hover:!0,normal:!0}},{id:"corner",label:"Corner",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},{id:"inputBoxShadow",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}},{id:"backgroundColor",type:"color-picker-v2",label:"Background Color",devices:{desktop:{default:"#FFFFFF"}},enableGradient:!0},{id:"dividerColor",type:"color-picker-v2",label:"Divider Color",default:{normal:"line-3"},compoDefaultValue:{normal:"line-3"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerStroke",label:"Thickness",type:"input:stepper",min:1,default:{normal:1,hover:1},state:{hover:!0,normal:!0}},{id:"inputBorder",label:"Input Border",type:"border-v2",default:{hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}},state:{hover:!0,normal:!1}},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{radiusType:"none"}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45,enable:!0}}}}]}];exports.ProductQuantitySettings=ProductQuantitySettings;
@@ -1 +1 @@
1
- "use strict";const SettingUIV2=[{controls:[{label:{en:"Button"},setting:{id:"hasButton"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Width"},setting:{id:"buttonWidth"},conditionDisplay:"hasButton === true"},{label:{en:"Background"},setting:{id:"buttonBackgroundColor",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Plus icon"},setting:{id:"plusIcon"},conditionDisplay:"hasButton === true"},{label:{en:"Minus icon"},setting:{id:"minusIcon"},conditionDisplay:"hasButton === true"},{label:{en:"Icon color"},setting:{id:"iconColor",state:"normal"},conditionDisplay:"hasButton === true"}],moreSettings:{type:"collapse",controls:[{label:{en:"Icon size"},setting:{id:"iconSizeCustom"},conditionDisplay:"hasButton === true"},{label:{en:"Border"},setting:{id:"borderBtn",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Corner"},setting:{id:"corner",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Hover"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableHoverButton"},popoverLabel:{en:"Hover effect"},state:"hover",conditionDisplay:"hasButton === true",controls:[{label:{en:"Background"},setting:{id:"buttonBackgroundColor",state:"hover"},compoDefaultValue:{default:"highlight"}},{label:{en:"Icon color"},setting:{id:"iconColor",state:"hover"}},{label:{en:"Border"},setting:{id:"borderBtn",state:"hover"}},{label:{en:"Corner"},setting:{id:"corner",state:"hover"}}]}]}},{label:{en:"Input"},controls:[{label:{en:"Background"},setting:{id:"inputBackgroundColor",state:"normal"}},{label:{en:"Text style"},setting:{id:"typo"},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:"Divider"},type:"combo",conditionDisplay:"hasButton === true",comboType:"color",getValueFromSettingID:"dividerColor.normal",compoDefaultValue:"line-3",controls:[{label:{en:"Color"},setting:{id:"dividerColor",state:"normal"}},{label:{en:"Thickness"},setting:{id:"dividerStroke",state:"normal"}}]},{label:{en:"Shadow"},setting:{id:"inputBoxShadow",state:"normal"}},{label:{en:"Hover"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",popoverLabel:{en:"Hover effect"},setting:{id:"enableHoverInput"},state:"hover",controls:[{label:{en:"Background"},setting:{id:"inputBackgroundColor",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColor",state:"hover"}},{id:"divider-hover",label:{en:"Divider"},type:"combo",iconName:"polaris-edit",getValueFromSettingID:"dividerColor.hover",comboType:"color",compoDefaultValue:"line-3",controls:[{label:{en:"Color"},setting:{id:"dividerColor",state:"hover"}},{label:{en:"Thickness"},setting:{id:"dividerStroke",state:"hover"}}],conditionDisplay:"hasButton === true"},{label:{en:"Border"},setting:{id:"inputBorder",state:"hover"},conditionDisplay:"hasButton === false"},{label:{en:"Shadow"},setting:{id:"inputBoxShadow",state:"hover"}}]}]},{label:{en:"Size"},controls:[{label:{en:"Width"},setting:{id:"quantityWidth"}},{label:{en:"Height"},setting:{id:"inputHeight"}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColor",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"shapeBorder"}},{label:{en:"Corner"},setting:{id:"shapeRounded"}},{label:{en:"Shadow"},setting:{id:"shapeShadow"}}]},{label:{en:"Display condition"},controls:[{label:{en:"Default quantity"},setting:{id:"defaultQtyValue"}},{label:{en:"Update price"},setting:{id:"updatePrice"}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(quantityWidth) >= 100 && quantityWidth?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];exports.SettingUIV2=SettingUIV2;
1
+ "use strict";const SettingUIV2=[{controls:[{label:{en:"Button"},setting:{id:"hasButton"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Width"},setting:{id:"buttonWidth"},conditionDisplay:"hasButton === true"},{label:{en:"Background"},setting:{id:"buttonBackgroundColor",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Plus icon"},setting:{id:"plusIcon"},conditionDisplay:"hasButton === true"},{label:{en:"Minus icon"},setting:{id:"minusIcon"},conditionDisplay:"hasButton === true"},{label:{en:"Icon color"},setting:{id:"iconColor",state:"normal"},conditionDisplay:"hasButton === true"}],moreSettings:{type:"collapse",controls:[{label:{en:"Icon size"},setting:{id:"iconSizeCustom"},conditionDisplay:"hasButton === true"},{label:{en:"Border"},setting:{id:"borderBtn",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Corner"},setting:{id:"corner",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Hover"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableHoverButton"},popoverLabel:{en:"Hover effect"},state:"hover",conditionDisplay:"hasButton === true",controls:[{label:{en:"Background"},setting:{id:"buttonBackgroundColor",state:"hover"},compoDefaultValue:{default:"highlight"}},{label:{en:"Icon color"},setting:{id:"iconColor",state:"hover"}},{label:{en:"Border"},setting:{id:"borderBtn",state:"hover"}},{label:{en:"Corner"},setting:{id:"corner",state:"hover"}}]}]}},{label:{en:"Input"},controls:[{label:{en:"Background"},setting:{id:"inputBackgroundColor",state:"normal"}},{label:{en:"Text style"},setting:{id:"typo"},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:"Divider"},type:"combo",conditionDisplay:"hasButton === true",comboType:"color",getValueFromSettingID:"dividerColor.normal",compoDefaultValue:"line-3",controls:[{label:{en:"Color"},setting:{id:"dividerColor",state:"normal"}},{label:{en:"Thickness"},setting:{id:"dividerStroke",state:"normal"}}]},{label:{en:"Shadow"},setting:{id:"inputBoxShadow",state:"normal"}},{label:{en:"Hover"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",popoverLabel:{en:"Hover effect"},setting:{id:"enableHoverInput"},state:"hover",controls:[{label:{en:"Background"},setting:{id:"inputBackgroundColor",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColor",state:"hover"}},{label:{en:"Divider color"},setting:{id:"dividerColor",state:"hover"},conditionDisplay:"hasButton === true"},{label:{en:"Divider stroke"},setting:{id:"dividerStroke",state:"hover"},conditionDisplay:"hasButton === true"},{label:{en:"Border"},setting:{id:"inputBorder",state:"hover"},conditionDisplay:"hasButton === false"},{label:{en:"Shadow"},setting:{id:"inputBoxShadow",state:"hover"}}]}]},{label:{en:"Size"},controls:[{label:{en:"Width"},setting:{id:"quantityWidth"}},{label:{en:"Height"},setting:{id:"inputHeight"}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColor"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"shapeBorder"}},{label:{en:"Corner"},setting:{id:"shapeRounded"}},{label:{en:"Shadow"},setting:{id:"shapeShadow"}}]},{label:{en:"Display condition"},controls:[{label:{en:"Default quantity"},setting:{id:"defaultQtyValue"}},{label:{en:"Update price"},setting:{id:"updatePrice"}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(quantityWidth) >= 100 && quantityWidth?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];exports.SettingUIV2=SettingUIV2;
@@ -1 +1 @@
1
- import{getDynamicSourceLocales as t,getStaticLocale as e}from"../../helpers.js";let getTextIconNotFound=t=>"react"===t?"Icons not found":e("IconList","icons_not_found"),getTextIconTranslations=({setting:e,builderProps:n,pageContext:o,key:i,type:r})=>{let{childItem:a,translate:l}=e??{};return"react"===r?a?.[i]:t({val:a?.[i],uid:n?.uid,settingId:`childItem_${i}`,pageContext:o,translate:l,isReplaceLocationOrigin:!0})},getvalueMap=({setting:t})=>{let{childConfig:e,iconType:n,iconSvg:o}=t??{};return n&&"matching"!==n?"different"===n?e:void 0:Array(e?.length).fill(o)};export{getTextIconNotFound,getTextIconTranslations,getvalueMap};
1
+ import{composePositionLineHeight as e}from"@gem-sdk/core";import{getDynamicSourceLocales as t,getStaticLocale as o}from"../../helpers.js";let getTextIconNotFound=e=>"react"===e?"Icons not found":o("IconList","icons_not_found"),getTextIconTranslations=({setting:e,builderProps:o,pageContext:n,key:i,type:c})=>{let{childItem:r,translate:s}=e??{};return"react"===c?r?.[i]:t({val:r?.[i],uid:o?.uid,settingId:`childItem_${i}`,pageContext:n,translate:s,isReplaceLocationOrigin:!0})},getvalueMap=({setting:e})=>{let{childConfig:t,iconType:o,iconSvg:n}=e??{};return o&&"matching"!==o?"different"===o?t:void 0:Array(t?.length).fill(n)},composePostionIconList=(t,o,n)=>{let i={};return e({compose:i,lineHeight:t,device:"desktop",position:o,iconWidth:n}),e({compose:i,lineHeight:t,device:"tablet",position:o,iconWidth:n}),e({compose:i,lineHeight:t,device:"mobile",position:o,iconWidth:n}),i};export{composePostionIconList,getTextIconNotFound,getTextIconTranslations,getvalueMap};
@@ -1 +1 @@
1
- import{makeStyleResponsive as e,composeBorderResponsive as t,getResponsiveStyleShadowWithoutState as l,composeRadiusResponsive as o,getStyleBackgroundByDevice as r,getResponsiveStylePadding as b,getGradientBgrStyleByDevice as i,makeGlobalSize as n,makeStyle as a,getSingleColorVariable as p}from"@gem-sdk/core";let filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet"];return t.forEach(t=>{delete e?.[t]}),e},getStyleContainerIconlistMain=({styles:t,style:l,type:o,advanced:r})=>{let{align:b}=t??{};return{...l="react"===o?filterStyles(l):l,...e("jc",b),...e("d",{desktop:r?.d?.desktop?"flex":"none",tablet:r?.d?.tablet?"flex":"none",mobile:r?.d?.mobile?"flex":"none"})}},getStyleWraplistIcon=({styles:n})=>{let{panelAlign:a,contentBoxPadding:p,contentBoxWidth:s,background:c,contentBoxBorder:d,contentBoxRounded:y,contentBoxShadow:g}=n??{};return{...t(d),...l(g,"box-shadow",g),...o(y),...r(c),...b(p),...e("w",s),...e("jc",a),...i(c,{desktop:!0,tablet:!0,mobile:!0})}},getStyleColListIcon=({styles:t})=>{let{verticalSpacing:l}=t??{};return{...e("rg",l)}},getStyleWrapItemIcon=({styles:t})=>{let{horizontalSpacing:l,position:o}=t??{};return{...e("cg",l),...e("ai",o)}},getStyleWrapIcon=({styles:t,setting:l})=>{let{iconBorder:o,backgroundColor:r,iconRounded:b}=t??{},{globalSize:i}=l??{},s=n(i);return{...s.padding,...a({bs:o?.border,bw:o?.width,bc:p(o?.color),bg:r,bblr:b?.bblr,bbrr:b?.bbrr,btlr:b?.btlr,btrr:b?.btrr}),...e("pos",{desktop:"relative",tablet:"relative",mobile:"relative"}),...e("top",{desktop:"inherit",tablet:"inherit",mobile:"inherit"})}},getStyleIcon=({styles:e,setting:t})=>{let{iconColor:l}=e||{},{iconWidth:o}=t??{};return{"--c":p(l),"--w":"100%","--h":"100%","--size-desktop":`${o?.desktop}px`,"--size-tablet":`${o?.tablet||o?.desktop}px`,"--size-mobile":`${o?.mobile||o?.tablet||o?.desktop}px`}},getStyleTypoText=({setting:e})=>({typo:e?.textTypo});export{getStyleColListIcon,getStyleContainerIconlistMain,getStyleIcon,getStyleTypoText,getStyleWrapIcon,getStyleWrapItemIcon,getStyleWraplistIcon};
1
+ import{makeStyleResponsive as t,composeBorderResponsive as e,getResponsiveStyleShadowWithoutState as l,composeRadiusResponsive as o,getStyleBackgroundByDevice as r,getResponsiveStylePadding as b,getGradientBgrStyleByDevice as n,makeGlobalSize as i,makeStyle as p,getSingleColorVariable as a}from"@gem-sdk/core";let filterStyles=t=>{let e=["--mb","--mb-mobile","--mb-tablet"];return e.forEach(e=>{delete t?.[e]}),t},getStyleContainerIconlistMain=({styles:e,style:l,type:o,advanced:r})=>{let{align:b}=e??{};return{...l="react"===o?filterStyles(l):l,...t("jc",b),...t("d",{desktop:r?.d?.desktop?"flex":"none",tablet:r?.d?.tablet?"flex":"none",mobile:r?.d?.mobile?"flex":"none"})}},getStyleWraplistIcon=({styles:i})=>{let{panelAlign:p,contentBoxPadding:a,contentBoxWidth:c,background:s,contentBoxBorder:y,contentBoxRounded:g,contentBoxShadow:d}=i??{};return{...e(y),...l(d,"box-shadow",d),...o(g),...r(s),...b(a),...t("w",c),...t("jc",p),...n(s,{desktop:!0,tablet:!0,mobile:!0})}},getStyleColListIcon=({styles:e})=>{let{verticalSpacing:l}=e??{};return{...t("rg",l)}},getStyleWrapItemIcon=({styles:e})=>{let{horizontalSpacing:l}=e??{};return{...t("cg",l)}},getStyleWrapIcon=({styles:t,setting:e})=>{let{iconBorder:l,backgroundColor:o,iconRounded:r}=t??{},{globalSize:b}=e??{},n=i(b);return{...n.padding,...p({bs:l?.border,bw:l?.width,bc:a(l?.color),bg:o,bblr:r?.bblr,bbrr:r?.bbrr,btlr:r?.btlr,btrr:r?.btrr})}},getStyleIcon=({styles:t,setting:e})=>{let{iconColor:l}=t||{},{iconWidth:o}=e??{};return{"--c":a(l),"--w":"100%","--h":"100%","--size-desktop":`${o?.desktop}px`,"--size-tablet":`${o?.tablet||o?.desktop}px`,"--size-mobile":`${o?.mobile||o?.tablet||o?.desktop}px`}},getStyleTypoText=({setting:t})=>({typo:t?.textTypo});export{getStyleColListIcon,getStyleContainerIconlistMain,getStyleIcon,getStyleTypoText,getStyleWrapIcon,getStyleWrapItemIcon,getStyleWraplistIcon};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useGetProductId as s}from"../../hooks/useGetProductId.js";import{useRef as r}from"react";import m from"../../text/components/Text.js";import{createClass as l,createStyle as o,createAttr as a,If as i}from"@gem-sdk/system";import{getClassWraplistIcon as c,getClassColListIcon as n,getClassWrapItemIcon as d,getClassWrapIcon as p,getClassIcon as u,getClassTextItem as f}from"../common/classes.js";import{getStyleContainerIconlistMain as y,getStyleWraplistIcon as h,getStyleColListIcon as g,getStyleWrapIcon as v,getStyleWrapItemIcon as N,getStyleIcon as j,getStyleTypoText as x}from"../common/styles.js";import{getvalueMap as I,getTextIconTranslations as L,getTextIconNotFound as S}from"../common/helpers.js";let IconListV2=T=>{let{builderProps:$,builderAttrs:k,style:w,setting:V,styles:_,pageContext:q,advanced:C}=T,G=l({[$?.uid??""]:!0}),H=l(c()),M=l(n()),P=l(d({builderProps:$})),b=l(p()),z=l(u()),A=l(f({setting:V})),B=o(y({styles:_,style:w,type:"react",advanced:C})),D=o(h({styles:_})),E=o(g({styles:_})),F=o(v({styles:_,setting:V})),J=o(N({styles:_})),K=o(j({styles:_,setting:V})),O=x({setting:V}),Q=a({...k}),R=S("react"),U=I({setting:V}),W=r(null),{refContainer:X,productID:Y}=s();return e("div",{...Q,...$,"data-id":$?.uid,style:B,className:G,ref:X,children:i(!U||!U.length,e("div",{children:R}),e("div",{className:H,style:D,children:e("div",{className:M,style:E,children:U?.map((s,r)=>{let l=L({setting:V,builderProps:$,pageContext:q,key:r,type:"react"});return t("div",{"data-index":r,className:P,style:J,children:[e("div",{className:b,style:F,children:e("span",{style:K,className:z,dangerouslySetInnerHTML:{__html:s}})}),e(m,{setting:{text:l?.toString(),htmlTag:"div",options:{useState:!0,uniqueId:`${$?.uid}-${r}-${Y}`,productID:Y,customClass:{wrapper:"gp-w-full"}}},styles:O,className:A,ref:W})]},r)})})}))})};export{IconListV2 as default};
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useGetProductId as s}from"../../hooks/useGetProductId.js";import o from"../../text/components/Text.js";import{createClass as i,createStyle as r,createAttr as m,If as l}from"@gem-sdk/system";import{getClassWraplistIcon as n,getClassColListIcon as a,getClassWrapItemIcon as c,getClassWrapIcon as d,getClassIcon as p,getClassTextItem as h}from"../common/classes.js";import{getStyleContainerIconlistMain as u,getStyleWraplistIcon as f,getStyleColListIcon as y,getStyleIcon as g,getStyleWrapIcon as j,getStyleWrapItemIcon as v,getStyleTypoText as N}from"../common/styles.js";import{getvalueMap as x,composePostionIconList as I,getTextIconTranslations as L,getTextIconNotFound as k}from"../common/helpers.js";import{useIconLineHeight as w}from"../hooks/useIconLineHeight.js";let IconListV2=S=>{let{builderProps:T,builderAttrs:W,style:$,setting:H,styles:V,pageContext:_,advanced:q}=S,C=i({[T?.uid??""]:!0}),G=i(n()),M=i(a()),P=i(c({builderProps:T})),b=i(d()),z=i(p()),A=i(h({setting:H})),B=r(u({styles:V,style:$,type:"react",advanced:q})),D=r(f({styles:V})),E=r(y({styles:V})),F=r(g({styles:V,setting:H})),J=N({setting:H}),K=m({...W}),O=k("react"),Q=x({setting:H}),{ref:R,lineHeight:U}=w({iconWidth:H?.iconWidth}),X=I(U,V?.position,H?.iconWidth),{refContainer:Y,productID:Z}=s(),ee=r({...j({styles:V,setting:H}),...X.content}),et=r({...v({styles:V}),...X.wrapper});return e("div",{...K,...T,"data-id":T?.uid,style:B,className:C,ref:Y,children:l(!Q||!Q.length,e("div",{children:O}),e("div",{className:G,style:D,children:e("div",{className:M,style:E,children:Q?.map((s,i)=>{let r=L({setting:H,builderProps:T,pageContext:_,key:i,type:"react"});return t("div",{"data-index":i,className:P,style:et,children:[e("div",{className:b,style:ee,children:e("span",{style:F,className:z,dangerouslySetInnerHTML:{__html:s}})}),e(o,{setting:{text:r?.toString(),htmlTag:"div",options:{useState:!0,uniqueId:`${T?.uid}-${i}-${Z}`,productID:Z,customClass:{wrapper:"gp-w-full"}}},styles:J,className:A,ref:R})]},i)})})}))})};export{IconListV2 as default};
@@ -1,32 +1,32 @@
1
- import{template as s,dataStringify as i,RenderIf as t,isLocalEnv as e,baseAssetURL as l}from"@gem-sdk/core";import{getSettingPreloadData as o}from"../../helpers.js";import r from"../../text/components/Text.liquid.js";import{createClass as p,createStyle as a,createAttr as d,If as c}from"@gem-sdk/system";import{getClassWraplistIcon as n,getClassColListIcon as m,getClassWrapItemIcon as $,getClassWrapIcon as g,getClassIcon as u,getClassTextItem as f}from"../common/classes.js";import{getStyleContainerIconlistMain as y,getStyleWraplistIcon as v,getStyleColListIcon as j,getStyleWrapIcon as h,getStyleWrapItemIcon as S,getStyleIcon as k,getStyleTypoText as q}from"../common/styles.js";import{getvalueMap as x,getTextIconTranslations as E,getTextIconNotFound as V}from"../common/helpers.js";let IconListV2=A=>{let{builderProps:I,builderAttrs:N,style:T,setting:_,styles:w,pageContext:G}=A,L=p({[I?.uid??""]:!0}),O=p(n()),W=p(m()),C=p($({builderProps:I})),F=p(g()),M=p(u()),P=p(f({setting:_})),R=a(y({styles:w,style:T,type:"liquid"})),b=a(v({styles:w})),z=a(j({styles:w})),B=a(h({styles:w,setting:_})),D=a(S({styles:w})),H=a(k({styles:w,setting:_})),J=q({setting:_}),K=d({...N}),Q=V("liquid"),U=x({setting:_});return s`
1
+ import{template as s,dataStringify as i,RenderIf as t,isLocalEnv as e,baseAssetURL as l}from"@gem-sdk/core";import{getSettingPreloadData as o}from"../../helpers.js";import r from"../../text/components/Text.liquid.js";import{createClass as a,createStyle as d,createAttr as p,If as c}from"@gem-sdk/system";import{getClassWraplistIcon as n,getClassColListIcon as m,getClassWrapItemIcon as $,getClassWrapIcon as g,getClassIcon as u,getClassTextItem as f}from"../common/classes.js";import{getStyleContainerIconlistMain as v,getStyleWraplistIcon as y,getStyleColListIcon as j,getStyleWrapIcon as h,getStyleWrapItemIcon as S,getStyleIcon as k,getStyleTypoText as q}from"../common/styles.js";import{getvalueMap as x,getTextIconTranslations as E,getTextIconNotFound as V}from"../common/helpers.js";let IconListV2=A=>{let{builderProps:I,builderAttrs:N,style:T,setting:_,styles:w,pageContext:G}=A,L=I?.builderData?.advanced,O=a({[I?.uid??""]:!0}),W=a(n()),b=a(m()),C=a($({builderProps:I})),D=a(g()),F=a(u()),M=a(f({setting:_})),P=d(v({styles:w,style:T,type:"liquid",advanced:L})),R=d(y({styles:w})),z=d(j({styles:w})),B=d(h({styles:w,setting:_})),H=d(S({styles:w})),J=d(k({styles:w,setting:_})),K=q({setting:_}),Q=p({...N}),U=V("liquid"),X=x({setting:_});return s`
2
2
  {% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
3
3
  <gp-icon-list
4
- ${{...K}}
4
+ ${{...Q}}
5
5
  ${{...I}}
6
6
  data-id="${I?.uid}"
7
- style="${R}"
8
- className="${L}"
7
+ style="${P}"
8
+ className="${O}"
9
9
  gp-data='${i({position:w?.position,iconWidth:_?.iconWidth}).replaceAll("'","&#039;")}'
10
10
  >
11
- ${c(!U||!U.length,s`<div>${Q}</div>`,s`
12
- <div class="${O}" style="${b}">
13
- <div class="${W}" style="${z}">
14
- ${U?.map((i,t)=>{let e=E({setting:_,builderProps:I,pageContext:G,key:t,type:"liquid"});return s`
11
+ ${c(!X||!X.length,s`<div>${U}</div>`,s`
12
+ <div class="${W}" style="${R}">
13
+ <div class="${b}" style="${z}">
14
+ ${X?.map((i,t)=>{let e=E({setting:_,builderProps:I,pageContext:G,key:t,type:"liquid"});return s`
15
15
  <div
16
16
  key="${t}"
17
17
  data-index="${t}"
18
18
  class="${C}"
19
- style="${D}"
19
+ style="${H}"
20
20
  >
21
- <div class="${F}" style="${B}">
21
+ <div class="${D}" style="${B}">
22
22
  <span
23
- class="${M}"
24
- style="${H}"
23
+ class="${F}"
24
+ style="${J}"
25
25
  >
26
26
  ${i}
27
27
  </span>
28
28
  </div>
29
- ${r({setting:{text:e?.toString(),htmlTag:"div",options:{customClass:{wrapper:"gp-w-full"}},isForceValue:!0},styles:J,className:P})}
29
+ ${r({setting:{text:e?.toString(),htmlTag:"div",options:{customClass:{wrapper:"gp-w-full"}},isForceValue:!0},styles:K,className:M})}
30
30
  </div>`}).join(" ")}
31
31
  </div>
32
32
  </div>`)}
@@ -0,0 +1 @@
1
+ import{useRef as e,useState as t,useEffect as r}from"react";let useIconLineHeight=({iconWidth:n})=>{let o=e(null),[i,l]=t("");return r(()=>{if(o?.current&&n?.desktop){let e=window.getComputedStyle(o?.current).getPropertyValue("line-height");l(e)}},[n?.desktop]),{ref:o,lineHeight:i}};export{useIconLineHeight};
@@ -1 +1 @@
1
- import{composeTypographyStyle as e,getStyleShadowState as t,getGlobalColorStateStyle as r,makeStyle as o,getStyleShadow as l,filterHoverVariables as a,makeStyleResponsive as n,handleConvertBorderStyle as d,handleConvertBorderWidth as i,handleConvertBorderColor as s,composeRadius as p,getResponsiveStyleShadowWithoutState as h,composeBorderResponsive as b,composeRadiusResponsive as u,makeStyleState as g}from"@gem-sdk/core";let addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,`${t}px`])),getDividerWidth=(e,t)=>{if(!e||!t)return{};let r=addPxToValues(e),o={...g("brw",r),...g("blw",r)};return o},getDividerColorStyle=e=>{if(!e)return{};let t={...e,normal:e?.normal??"transparent"},o={...r("brc",t),...r("blc",t)},l=Object.fromEntries(Object.entries(o).filter(([e,t])=>void 0!==t));return l},getInputStyle=n=>{let{styles:d,setting:i}=n,{inputBackgroundColor:s,textColor:p,dividerColor:h,dividerStroke:b,inputBoxShadow:u}=d??{},{enableHoverInput:g,hasButton:y}=i??{},m=e(d?.typo,d?.typography),S=t(u,"box-shadow",{normal:!!u?.normal,hover:!!u?.hover}),c={...getDividerWidth(b,h),...getDividerColorStyle(h)},w={...r("bg",s),...S,...r("c",{...p,hover:p?.hover??p?.normal}),...y?c:{}},v={...o({}),...m,...w,...l({value:d?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:d?.typo?.custom?.hasShadowText})};return g?v:a(v)},getButtonStyle=({borderBtn:e,buttonWidth:t,buttonBackgroundColor:o,iconColor:l,corner:h,enableHoverButton:b})=>{let u={...n("w",t),...d(e),...i(e),...s(e),...r("bg",o),...r("c",l),...p(h)};return b?u:a(u)},getContainerStyles=({inputHeight:e,align:t})=>({...n("h",e),...n("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:t,setting:o})=>{let{enableHoverInput:l,hasButton:a}=o??{},p=t?.shapeShadow,g=h(p,"box-shadow",{desktop:p?.desktop??{},tablet:p?.tablet??p?.desktop??{},mobile:p?.mobile??p?.tablet??p?.desktop??{}}),y=t?.inputBorder,m=l&&!a,S={...d(y),...i(y),...s(y)};return{...m?S:{},...r("bg",e),...n("maxw",t?.quantityWidth),...b(t?.shapeBorder),...u(t?.shapeRounded),...g}};export{getButtonStyle,getContainerStyles,getInputStyle,getWrapperStyles};
1
+ import{composeTypographyStyle as e,getStyleShadowState as t,getGlobalColorStateStyle as r,makeStyle as o,getStyleShadow as a,filterHoverVariables as l,makeStyleResponsive as n,handleConvertBorderStyle as d,handleConvertBorderWidth as i,handleConvertBorderColor as s,composeRadius as p,getResponsiveStyleShadowWithoutState as h,getGlobalColorResponsiveStyle as b,composeBorderResponsive as u,composeRadiusResponsive as m,makeStyleState as g}from"@gem-sdk/core";let addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,`${t}px`])),getDividerWidth=(e,t)=>{if(!e||!t)return{};let r=addPxToValues(e),o={...g("brw",r),...g("blw",r)};return o},getDividerColorStyle=e=>{if(!e)return{};let t={...e,normal:e?.normal??"transparent"},o={...r("brc",t),...r("blc",t)},a=Object.fromEntries(Object.entries(o).filter(([e,t])=>void 0!==t));return a},getInputStyle=n=>{let{styles:d,setting:i}=n,{inputBackgroundColor:s,textColor:p,dividerColor:h,dividerStroke:b,inputBoxShadow:u}=d??{},{enableHoverInput:m,hasButton:g}=i??{},y=e(d?.typo,d?.typography),S=t(u,"box-shadow",{normal:!!u?.normal,hover:!!u?.hover}),c={...getDividerWidth(b,h),...getDividerColorStyle(h)},w={...r("bg",{...s,normal:s?.normal??"transparent"}),...S,...r("c",{...p,hover:p?.hover??p?.normal}),...g?c:{}},v={...o({}),...y,...w,...a({value:d?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:d?.typo?.custom?.hasShadowText})};return m?v:l(v)},getButtonStyle=({borderBtn:e,buttonWidth:t,buttonBackgroundColor:o,iconColor:a,corner:h,enableHoverButton:b})=>{let u={...n("w",t),...d(e),...i(e),...s(e),...r("bg",o),...r("c",a),...p(h)};return b?u:l(u)},getContainerStyles=({inputHeight:e,align:t})=>({...n("h",e),...n("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:t,setting:r})=>{let{enableHoverInput:o,hasButton:a}=r??{},l=t?.shapeShadow,p=h(l,"box-shadow",{desktop:l?.desktop??{},tablet:l?.tablet??l?.desktop??{},mobile:l?.mobile??l?.tablet??l?.desktop??{}}),g=t?.inputBorder,y=o&&!a,S={...d(g),...i(g),...s(g)};return{...y?S:{},...b("bg",e),...n("maxw",t?.quantityWidth),...u(t?.shapeBorder),...m(t?.shapeRounded),...p}};export{getButtonStyle,getContainerStyles,getInputStyle,getWrapperStyles};
@@ -1,3 +1,3 @@
1
1
  let ProductQuantitySettings=[{id:"setting",controls:[{id:"updatePrice",label:"Update price",type:"toggle",default:!0},{id:"hasButton",label:"Button",type:"toggle",default:!0},{id:"defaultQtyValue",label:"Text",type:"input:stepper",min:1,default:1},{id:"plusIcon",type:"icon",isHideClear:!0,customLabel:"Plus",info:"Choose from list or paste any SVG icon",default:`<svg height="20px" width="20px" data-name="plus-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817698760687976">
2
2
  <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"></path></svg>`},{id:"minusIcon",type:"icon",isHideClear:!0,customLabel:"Minus",info:"Choose from list or paste any SVG icon",default:`<svg height="20px" width="20px" data-name="minus-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817690725712232">
3
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"></path></svg>`},{id:"enableHoverInput",label:"Enable hover input",type:"toggle",default:!1},{id:"enableHoverButton",label:"Enable hover input",type:"toggle",default:!1}]},{id:"style",controls:[{id:"quantityLayout",label:"Style",type:"layout-selector",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"Square",value:"product-quantity-square",type:"p-quantity-layout",iconName:"gp-product-quantity-square"},{label:"Square with divider",value:"product-quantity-square-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-square-divider"},{label:"Rounded",value:"product-quantity-rounded",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded"},{label:"Rounded with divider",value:"product-quantity-rounded-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-divider"},{label:"Square input only",value:"product-quantity-square-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-square-input-only"},{label:"Rounded input only",value:"product-quantity-rounded-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-input-only"}],default:"product-quantity-square"},{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"quantityWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"160px"}}},{id:"inputHeight",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"buttonWidth",type:"dropdown:input",label:"Button Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"iconSizeCustom",type:"input:stepper",includeUnit:"px",min:1,devices:{desktop:{default:"16px"}}}]},{id:"inputStyle",type:"group",label:"Input Style",controls:[{id:"typo",type:"typography-combo",default:{type:"paragraph-1",attrs:{color:"#121212"},custom:{fontSize:{desktop:"16px",tablet:"16px",mobile:"14px"},lineHeight:{desktop:"120%",tablet:"180%",mobile:"180%"},fontWeight:"400",fontFamily:{value:"Assistant",type:"google"},hasShadowText:!1,textShadow:{enable:!1}}},ignoreReRender:!0,hiddenSetting:{transform:!0,textAlign:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"button-behavior-state",type:"behavior-state",label:"Button Style",hide:!0,controls:[{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"inputBackgroundColor",type:"color-picker-v2",label:"Background Color",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"highlight",hover:"highlight"},enableGradient:!0},{id:"buttonBackgroundColor",type:"color-picker-v2",label:"Button Background Color",state:{hover:!0,normal:!0},enableGradient:!0,compoDefaultValue:{normal:"brand",hover:"highlight"}},{id:"iconColor",type:"color-picker-v2",label:"Icon Color",default:{normal:"#121212"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0}]},{id:"borderBtn",label:"Border",type:"border-v2",default:{normal:{}},compoDefaultValue:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}},state:{hover:!0,normal:!0}},{id:"corner",label:"Corner",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},{id:"inputBoxShadow",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}},{id:"backgroundColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF",hover:"#FFFFFF"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerColor",type:"color-picker-v2",label:"Divider Color",default:{normal:"line-3"},compoDefaultValue:{normal:"line-3"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerStroke",label:"Thickness",type:"input:stepper",min:1,default:{normal:1,hover:1},state:{hover:!0,normal:!0}},{id:"inputBorder",label:"Input Border",type:"border-v2",default:{hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}},state:{hover:!0,normal:!1}},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{radiusType:"none"}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45,enable:!0}}}}]}];export{ProductQuantitySettings};
3
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"></path></svg>`},{id:"enableHoverInput",label:"Enable hover input",type:"toggle",default:!1},{id:"enableHoverButton",label:"Enable hover input",type:"toggle",default:!1}]},{id:"style",controls:[{id:"quantityLayout",label:"Style",type:"layout-selector",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"Square",value:"product-quantity-square",type:"p-quantity-layout",iconName:"gp-product-quantity-square"},{label:"Square with divider",value:"product-quantity-square-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-square-divider"},{label:"Rounded",value:"product-quantity-rounded",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded"},{label:"Rounded with divider",value:"product-quantity-rounded-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-divider"},{label:"Square input only",value:"product-quantity-square-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-square-input-only"},{label:"Rounded input only",value:"product-quantity-rounded-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-input-only"}],default:"product-quantity-square"},{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"quantityWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"160px"}}},{id:"inputHeight",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"buttonWidth",type:"dropdown:input",label:"Button Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"iconSizeCustom",type:"input:stepper",includeUnit:"px",min:1,devices:{desktop:{default:"16px"}}}]},{id:"inputStyle",type:"group",label:"Input Style",controls:[{id:"typo",type:"typography-combo",default:{type:"paragraph-1",attrs:{color:"#121212"},custom:{fontSize:{desktop:"16px",tablet:"16px",mobile:"14px"},lineHeight:{desktop:"120%",tablet:"180%",mobile:"180%"},fontWeight:"400",fontFamily:{value:"Assistant",type:"google"},hasShadowText:!1,textShadow:{enable:!1}}},ignoreReRender:!0,hiddenSetting:{transform:!0,textAlign:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"button-behavior-state",type:"behavior-state",label:"Button Style",hide:!0,controls:[{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"inputBackgroundColor",type:"color-picker-v2",label:"Background Color",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"highlight",hover:"highlight"},enableGradient:!0},{id:"buttonBackgroundColor",type:"color-picker-v2",label:"Button Background Color",state:{hover:!0,normal:!0},enableGradient:!0,compoDefaultValue:{normal:"brand",hover:"highlight"}},{id:"iconColor",type:"color-picker-v2",label:"Icon Color",default:{normal:"#121212"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0}]},{id:"borderBtn",label:"Border",type:"border-v2",default:{normal:{}},compoDefaultValue:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}},state:{hover:!0,normal:!0}},{id:"corner",label:"Corner",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},{id:"inputBoxShadow",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}},{id:"backgroundColor",type:"color-picker-v2",label:"Background Color",devices:{desktop:{default:"#FFFFFF"}},enableGradient:!0},{id:"dividerColor",type:"color-picker-v2",label:"Divider Color",default:{normal:"line-3"},compoDefaultValue:{normal:"line-3"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerStroke",label:"Thickness",type:"input:stepper",min:1,default:{normal:1,hover:1},state:{hover:!0,normal:!0}},{id:"inputBorder",label:"Input Border",type:"border-v2",default:{hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}},state:{hover:!0,normal:!1}},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{radiusType:"none"}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45,enable:!0}}}}]}];export{ProductQuantitySettings};
@@ -1 +1 @@
1
- let SettingUIV2=[{controls:[{label:{en:"Button"},setting:{id:"hasButton"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Width"},setting:{id:"buttonWidth"},conditionDisplay:"hasButton === true"},{label:{en:"Background"},setting:{id:"buttonBackgroundColor",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Plus icon"},setting:{id:"plusIcon"},conditionDisplay:"hasButton === true"},{label:{en:"Minus icon"},setting:{id:"minusIcon"},conditionDisplay:"hasButton === true"},{label:{en:"Icon color"},setting:{id:"iconColor",state:"normal"},conditionDisplay:"hasButton === true"}],moreSettings:{type:"collapse",controls:[{label:{en:"Icon size"},setting:{id:"iconSizeCustom"},conditionDisplay:"hasButton === true"},{label:{en:"Border"},setting:{id:"borderBtn",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Corner"},setting:{id:"corner",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Hover"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableHoverButton"},popoverLabel:{en:"Hover effect"},state:"hover",conditionDisplay:"hasButton === true",controls:[{label:{en:"Background"},setting:{id:"buttonBackgroundColor",state:"hover"},compoDefaultValue:{default:"highlight"}},{label:{en:"Icon color"},setting:{id:"iconColor",state:"hover"}},{label:{en:"Border"},setting:{id:"borderBtn",state:"hover"}},{label:{en:"Corner"},setting:{id:"corner",state:"hover"}}]}]}},{label:{en:"Input"},controls:[{label:{en:"Background"},setting:{id:"inputBackgroundColor",state:"normal"}},{label:{en:"Text style"},setting:{id:"typo"},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:"Divider"},type:"combo",conditionDisplay:"hasButton === true",comboType:"color",getValueFromSettingID:"dividerColor.normal",compoDefaultValue:"line-3",controls:[{label:{en:"Color"},setting:{id:"dividerColor",state:"normal"}},{label:{en:"Thickness"},setting:{id:"dividerStroke",state:"normal"}}]},{label:{en:"Shadow"},setting:{id:"inputBoxShadow",state:"normal"}},{label:{en:"Hover"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",popoverLabel:{en:"Hover effect"},setting:{id:"enableHoverInput"},state:"hover",controls:[{label:{en:"Background"},setting:{id:"inputBackgroundColor",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColor",state:"hover"}},{id:"divider-hover",label:{en:"Divider"},type:"combo",iconName:"polaris-edit",getValueFromSettingID:"dividerColor.hover",comboType:"color",compoDefaultValue:"line-3",controls:[{label:{en:"Color"},setting:{id:"dividerColor",state:"hover"}},{label:{en:"Thickness"},setting:{id:"dividerStroke",state:"hover"}}],conditionDisplay:"hasButton === true"},{label:{en:"Border"},setting:{id:"inputBorder",state:"hover"},conditionDisplay:"hasButton === false"},{label:{en:"Shadow"},setting:{id:"inputBoxShadow",state:"hover"}}]}]},{label:{en:"Size"},controls:[{label:{en:"Width"},setting:{id:"quantityWidth"}},{label:{en:"Height"},setting:{id:"inputHeight"}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColor",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"shapeBorder"}},{label:{en:"Corner"},setting:{id:"shapeRounded"}},{label:{en:"Shadow"},setting:{id:"shapeShadow"}}]},{label:{en:"Display condition"},controls:[{label:{en:"Default quantity"},setting:{id:"defaultQtyValue"}},{label:{en:"Update price"},setting:{id:"updatePrice"}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(quantityWidth) >= 100 && quantityWidth?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];export{SettingUIV2};
1
+ let SettingUIV2=[{controls:[{label:{en:"Button"},setting:{id:"hasButton"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Width"},setting:{id:"buttonWidth"},conditionDisplay:"hasButton === true"},{label:{en:"Background"},setting:{id:"buttonBackgroundColor",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Plus icon"},setting:{id:"plusIcon"},conditionDisplay:"hasButton === true"},{label:{en:"Minus icon"},setting:{id:"minusIcon"},conditionDisplay:"hasButton === true"},{label:{en:"Icon color"},setting:{id:"iconColor",state:"normal"},conditionDisplay:"hasButton === true"}],moreSettings:{type:"collapse",controls:[{label:{en:"Icon size"},setting:{id:"iconSizeCustom"},conditionDisplay:"hasButton === true"},{label:{en:"Border"},setting:{id:"borderBtn",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Corner"},setting:{id:"corner",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Hover"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableHoverButton"},popoverLabel:{en:"Hover effect"},state:"hover",conditionDisplay:"hasButton === true",controls:[{label:{en:"Background"},setting:{id:"buttonBackgroundColor",state:"hover"},compoDefaultValue:{default:"highlight"}},{label:{en:"Icon color"},setting:{id:"iconColor",state:"hover"}},{label:{en:"Border"},setting:{id:"borderBtn",state:"hover"}},{label:{en:"Corner"},setting:{id:"corner",state:"hover"}}]}]}},{label:{en:"Input"},controls:[{label:{en:"Background"},setting:{id:"inputBackgroundColor",state:"normal"}},{label:{en:"Text style"},setting:{id:"typo"},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:"Divider"},type:"combo",conditionDisplay:"hasButton === true",comboType:"color",getValueFromSettingID:"dividerColor.normal",compoDefaultValue:"line-3",controls:[{label:{en:"Color"},setting:{id:"dividerColor",state:"normal"}},{label:{en:"Thickness"},setting:{id:"dividerStroke",state:"normal"}}]},{label:{en:"Shadow"},setting:{id:"inputBoxShadow",state:"normal"}},{label:{en:"Hover"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",popoverLabel:{en:"Hover effect"},setting:{id:"enableHoverInput"},state:"hover",controls:[{label:{en:"Background"},setting:{id:"inputBackgroundColor",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColor",state:"hover"}},{label:{en:"Divider color"},setting:{id:"dividerColor",state:"hover"},conditionDisplay:"hasButton === true"},{label:{en:"Divider stroke"},setting:{id:"dividerStroke",state:"hover"},conditionDisplay:"hasButton === true"},{label:{en:"Border"},setting:{id:"inputBorder",state:"hover"},conditionDisplay:"hasButton === false"},{label:{en:"Shadow"},setting:{id:"inputBoxShadow",state:"hover"}}]}]},{label:{en:"Size"},controls:[{label:{en:"Width"},setting:{id:"quantityWidth"}},{label:{en:"Height"},setting:{id:"inputHeight"}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColor"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"shapeBorder"}},{label:{en:"Corner"},setting:{id:"shapeRounded"}},{label:{en:"Shadow"},setting:{id:"shapeShadow"}}]},{label:{en:"Display condition"},controls:[{label:{en:"Default quantity"},setting:{id:"defaultQtyValue"}},{label:{en:"Update price"},setting:{id:"updatePrice"}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(quantityWidth) >= 100 && quantityWidth?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];export{SettingUIV2};
@@ -3998,7 +3998,7 @@ type ProductQuantityStyleProps = {
3998
3998
  iconSizeCustom?: ObjectDevices<string>;
3999
3999
  corner?: StateProp<CornerRadius>;
4000
4000
  inputBoxShadow?: StateProp<ShadowProps>;
4001
- backgroundColor?: StateProp<ColorValueType>;
4001
+ backgroundColor?: ObjectDevices<ColorValueType>;
4002
4002
  dividerColor?: StateProp<ColorValueType>;
4003
4003
  dividerStroke?: StateProp<number>;
4004
4004
  inputBorder?: StateProp<Border>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.1011",
3
+ "version": "2.0.0-staging.1014",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",