@gem-sdk/components 3.0.4 → 3.0.7

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.
@@ -16,4 +16,4 @@
16
16
  display: none;
17
17
  }
18
18
  ${helpers.styleOverride}
19
- `;return jsxRuntime.jsx("div",{"data-id":t?.uid,id:`shopify-text-element-${t?.uid}`,className:"gp-article-description","data-article-id":r?.baseID?.replace("gid://shopify/OnlineStoreArticle/",""),children:r?.content.html?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!core.isSafari()&&jsxRuntime.jsx("style",{children:y}),jsxRuntime.jsx("div",{ref:p,className:core.cls("gp-p-description-text gp-content-text-override gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",d),style:{...core.getGlobalColorStateStyle("c",e?.color),...core.makeStyleResponsive("ta",e?.textAlign),...n&&!i?core.makeStyleResponsive("line-clamp",e?.lineClamp):{},...core.getStyleShadow({value:e?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:e?.typo?.custom?.hasShadowText}),...core.makeStyle({tt:e?.transform}),...m},dangerouslySetInnerHTML:{__html:r?.content.html}})]}):jsxRuntime.jsx("div",{children:jsxRuntime.jsx(NoDataState.default,{elementType:"secondary",description:"Inform and provide value to the audience with article content.",descriptionActions:[{text:"Add article content",callback:l},{text:"sync data",callback:"syncArticle"}]})})})};exports.default=ArticleContent;
19
+ `;return jsxRuntime.jsx("div",{"data-id":t?.uid,id:`shopify-text-element-${t?.uid}`,className:"gp-article-description","data-article-id":r?.baseID?.replace("gid://shopify/OnlineStoreArticle/",""),children:r?.content?.html?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!core.isSafari()&&jsxRuntime.jsx("style",{children:y}),jsxRuntime.jsx("div",{ref:p,className:core.cls("gp-p-description-text gp-content-text-override gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",d),style:{...core.getGlobalColorStateStyle("c",e?.color),...core.makeStyleResponsive("ta",e?.textAlign),...n&&!i?core.makeStyleResponsive("line-clamp",e?.lineClamp):{},...core.getStyleShadow({value:e?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:e?.typo?.custom?.hasShadowText}),...core.makeStyle({tt:e?.transform}),...m},dangerouslySetInnerHTML:{__html:r?.content?.html}})]}):jsxRuntime.jsx("div",{children:jsxRuntime.jsx(NoDataState.default,{elementType:"secondary",description:"Inform and provide value to the audience with article content.",descriptionActions:[{text:"Add article content",callback:l},{text:"sync data",callback:"syncArticle"}]})})})};exports.default=ArticleContent;
@@ -1,2 +1,2 @@
1
1
  "use strict";const IconSettings=[{id:"setting",controls:[{id:"iconSvg",type:"icon",label:"Icon",info:"Choose from list or paste any SVG icon",default:`<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" data-name="star-filled" viewBox="0 0 256 256" fill="currentColor" data-id="508414815326568808">
2
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"></path></svg>`},{id:"iconLinkEnable",type:"toggle",default:!1},{id:"iconLink",type:"pick-link",label:"Source URL",default:{type:"open-page",link:"",target:"_self",title:""},hiddenOptions:{"stay-on-page":!0}}]},{id:"style",controls:[{id:"iconWidth",type:"input:unit",label:"Icon Width",units:["px"],devices:{desktop:{default:"20px"}}},{id:"iconSpacing",label:"Icon Spacing",type:"size",hasNoneValue:!0,emptyOnClear:!0,default:{type:"none"},ignoreReRender:!0},{id:"bgColor",type:"color-picker-v2",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"bg-1"}},{id:"color",type:"color-picker-v2",label:"Color",default:{normal:"text-1"},state:{hover:!0,normal:!0},compoDefaultValue:{normal:"text-1"}},{id:"iconBorder",type:"border-v2",label:"Border",state:{hover:!0,normal:!0},compoDefaultValue:{normal:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px",color:"text-1",isCustom:!1}}},{id:"iconRounded",type:"corner-v2",label:"Border Radius",default:{hover:{radiusType:"none"},normal:{radiusType:"none"}},state:{hover:!0,normal:!0}},{id:"iconShadow",type:"shadow-v2",default:{enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"spin",type:"toggle",label:"Spin",default:!1},{id:"iconRotate",type:"angle",label:"Icon Rotate",info:"Rotate this icon",default:0,max:359,min:0},{id:"align",label:"Alignment",type:"option:value",devices:{desktop:{default:"left"}},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"}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"24px",padding:{type:"custom"},isDropDownWidth:!0}}},settingConfig:{padding:{paddingConfig:{small:{vertical:"8px",horizontal:"8px"},medium:{vertical:"16px",horizontal:"16px"},large:{vertical:"24px",horizontal:"24px"},custom:{vertical:"0px",horizontal:"0px"}}}},hiddenSettings:["shape","height","gap"]}]}];exports.IconSettings=IconSettings;
2
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"></path></svg>`},{id:"iconLinkEnable",type:"toggle",default:!1},{id:"iconLink",type:"pick-link",label:"Source URL",default:{type:"open-page",link:"",target:"_self",title:""},hiddenOptions:{"stay-on-page":!0}}]},{id:"style",controls:[{id:"iconWidth",type:"input:unit",label:"Icon Width",units:["px"],devices:{desktop:{default:"20px"}}},{id:"iconSpacing",label:"Icon Spacing",type:"size",hasNoneValue:!0,emptyOnClear:!0,default:{type:"none"},ignoreReRender:!0},{id:"bgColor",type:"color-picker-v2",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"bg-1"}},{id:"color",type:"color-picker-v2",label:"Color",default:{normal:"text-1"},state:{hover:!0,normal:!0},compoDefaultValue:{normal:"text-1"}},{id:"iconBorder",type:"border-v2",label:"Border",state:{hover:!0,normal:!0},compoDefaultValue:{normal:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px",color:"line-3",isCustom:!1}}},{id:"iconRounded",type:"corner-v2",label:"Border Radius",default:{hover:{radiusType:"none"},normal:{radiusType:"none"}},state:{hover:!0,normal:!0}},{id:"iconShadow",type:"shadow-v2",default:{enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"spin",type:"toggle",label:"Spin",default:!1},{id:"iconRotate",type:"angle",label:"Icon Rotate",info:"Rotate this icon",default:0,max:359,min:0},{id:"align",label:"Alignment",type:"option:value",devices:{desktop:{default:"left"}},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"}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"24px",padding:{type:"custom"},isDropDownWidth:!0}}},settingConfig:{padding:{paddingConfig:{small:{vertical:"8px",horizontal:"8px"},medium:{vertical:"16px",horizontal:"16px"},large:{vertical:"24px",horizontal:"24px"},custom:{vertical:"0px",horizontal:"0px"}}}},hiddenSettings:["shape","height","gap"]}]}];exports.IconSettings=IconSettings;
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),classes=require("./common/classes.js"),styles=require("./common/styles.js");const ProductListItem=e=>{let{pageContext:t,rawChildren:o}=e,{productItemStyle:r}=styles.getStyle(e),{productItemClass:s,gpProductClass:a}=classes.getClass(e),n=()=>core.template`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),classes=require("./common/classes.js");const ProductListItem=e=>{let{pageContext:t,rawChildren:o}=e,{productItemClass:r,gpProductClass:a}=classes.getClass(e),n=()=>core.template`
2
2
  ${o?.map((e,t)=>{if(e)return core.template`
3
- ${core.RenderChildren({...e,index:t,style:{...e.style,...r}})}
3
+ ${core.RenderChildren({...e,index:t})}
4
4
  `})}
5
5
  `;return core.template`
6
6
  <gp-product
@@ -9,7 +9,7 @@
9
9
  class="${a}"
10
10
 
11
11
  >
12
- {%- form 'product', product, id: product_form_id, class: 'form contents ${s}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
12
+ {%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
13
13
  <input type="hidden" name="id" value="{{ variant.id }}" />
14
14
  <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
15
15
  <button type="submit" onclick="return false;" style="display:none;"></button>
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),core=require("@gem-sdk/core"),ChildrenDroppable=require("../../../grid/components/ChildrenDroppable.js"),styles=require("./common/styles.js"),classes=require("./common/classes.js"),attrs=require("./common/attrs.js");const ProductListGridLayout=e=>{let{children:r,productSortedById:t,generateGridRowArray:s,setting:i}=e,l=core.useEditorMode(),{gridLayoutStyle:a,productItemStyle:o}=styles.getStyle(e),{gridLayoutClass:c,productItemClass:d}=classes.getClass(e),{productListAttr:n,getAttrProductItemEditor:u}=attrs.getAttr(e);return jsxRuntime.jsx("div",{...n,style:a,className:c,children:t?.length?t?.map((e,t)=>jsxRuntime.jsx(core.ProductProvider,{product:e,readOnly:!0,children:jsxRuntime.jsx("div",{..."edit"===l?u(e?.baseID):{},className:d,style:{"--grchild":i?.sameHeight?s?.[t]?.gridRow:void 0,"--mbchild":s?.[t]?.marginBottom},children:core.isEmptyChildren(r)?jsxRuntime.jsx(ChildrenDroppable.default,{}):React.Children.map(r,e=>React.isValidElement(e)?React.createElement(e.type,{...e.props,parentStyle:o,key:e.key}):null)})},e?.baseID)):null})};exports.default=ProductListGridLayout;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),core=require("@gem-sdk/core"),ChildrenDroppable=require("../../../grid/components/ChildrenDroppable.js"),styles=require("./common/styles.js"),classes=require("./common/classes.js"),attrs=require("./common/attrs.js");const ProductListGridLayout=e=>{let{children:r,productSortedById:t,generateGridRowArray:s,setting:i}=e,l=core.useEditorMode(),{gridLayoutStyle:a}=styles.getStyle(e),{gridLayoutClass:o,productItemClass:c}=classes.getClass(e),{productListAttr:d,getAttrProductItemEditor:n}=attrs.getAttr(e);return jsxRuntime.jsx("div",{...d,style:a,className:o,children:t?.length?t?.map((e,t)=>jsxRuntime.jsx(core.ProductProvider,{product:e,readOnly:!0,children:jsxRuntime.jsx("div",{..."edit"===l?n(e?.baseID):{},className:c,style:{"--grchild":i?.sameHeight?s?.[t]?.gridRow:void 0,"--mbchild":s?.[t]?.marginBottom},children:core.isEmptyChildren(r)?jsxRuntime.jsx(ChildrenDroppable.default,{}):React.Children.map(r,e=>React.isValidElement(e)?React.createElement(e.type,{...e.props,key:e.key}):null)})},e?.baseID)):null})};exports.default=ProductListGridLayout;
@@ -35,6 +35,6 @@
35
35
  {% elsif request.design_mode or request.visual_preview_mode %}
36
36
  ${i}
37
37
  {% else %}
38
- <div class="${r}"/>
38
+ <div class="${r}"></div>
39
39
  {% endif %}
40
40
  `};exports.ICON_SHOPIFY_SLOT=ICON_SHOPIFY_SLOT,exports.renderThirdPartySlot=renderThirdPartySlot;
@@ -16,4 +16,4 @@ import{jsx as t,jsxs as e,Fragment as p}from"react/jsx-runtime";import{useArticl
16
16
  display: none;
17
17
  }
18
18
  ${w}
19
- `;return t("div",{"data-id":A?.uid,id:`shopify-text-element-${A?.uid}`,className:"gp-article-description","data-article-id":S?.baseID?.replace("gid://shopify/OnlineStoreArticle/",""),children:S?.content.html?e(p,{children:[!l()&&t("style",{children:D}),t("div",{ref:k,className:s("gp-p-description-text gp-content-text-override gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",N),style:{...d("c",v?.color),...m("ta",v?.textAlign),...j&&!b?m("line-clamp",v?.lineClamp):{},...y({value:v?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:v?.typo?.custom?.hasShadowText}),...h({tt:v?.transform}),...T},dangerouslySetInnerHTML:{__html:S?.content.html}})]}):t("div",{children:t(u,{elementType:"secondary",description:"Inform and provide value to the audience with article content.",descriptionActions:[{text:"Add article content",callback:L},{text:"sync data",callback:"syncArticle"}]})})})};export{ArticleContent as default};
19
+ `;return t("div",{"data-id":A?.uid,id:`shopify-text-element-${A?.uid}`,className:"gp-article-description","data-article-id":S?.baseID?.replace("gid://shopify/OnlineStoreArticle/",""),children:S?.content?.html?e(p,{children:[!l()&&t("style",{children:D}),t("div",{ref:k,className:s("gp-p-description-text gp-content-text-override gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",N),style:{...d("c",v?.color),...m("ta",v?.textAlign),...j&&!b?m("line-clamp",v?.lineClamp):{},...y({value:v?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:v?.typo?.custom?.hasShadowText}),...h({tt:v?.transform}),...T},dangerouslySetInnerHTML:{__html:S?.content?.html}})]}):t("div",{children:t(u,{elementType:"secondary",description:"Inform and provide value to the audience with article content.",descriptionActions:[{text:"Add article content",callback:L},{text:"sync data",callback:"syncArticle"}]})})})};export{ArticleContent as default};
@@ -1,2 +1,2 @@
1
1
  let IconSettings=[{id:"setting",controls:[{id:"iconSvg",type:"icon",label:"Icon",info:"Choose from list or paste any SVG icon",default:`<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" data-name="star-filled" viewBox="0 0 256 256" fill="currentColor" data-id="508414815326568808">
2
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"></path></svg>`},{id:"iconLinkEnable",type:"toggle",default:!1},{id:"iconLink",type:"pick-link",label:"Source URL",default:{type:"open-page",link:"",target:"_self",title:""},hiddenOptions:{"stay-on-page":!0}}]},{id:"style",controls:[{id:"iconWidth",type:"input:unit",label:"Icon Width",units:["px"],devices:{desktop:{default:"20px"}}},{id:"iconSpacing",label:"Icon Spacing",type:"size",hasNoneValue:!0,emptyOnClear:!0,default:{type:"none"},ignoreReRender:!0},{id:"bgColor",type:"color-picker-v2",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"bg-1"}},{id:"color",type:"color-picker-v2",label:"Color",default:{normal:"text-1"},state:{hover:!0,normal:!0},compoDefaultValue:{normal:"text-1"}},{id:"iconBorder",type:"border-v2",label:"Border",state:{hover:!0,normal:!0},compoDefaultValue:{normal:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px",color:"text-1",isCustom:!1}}},{id:"iconRounded",type:"corner-v2",label:"Border Radius",default:{hover:{radiusType:"none"},normal:{radiusType:"none"}},state:{hover:!0,normal:!0}},{id:"iconShadow",type:"shadow-v2",default:{enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"spin",type:"toggle",label:"Spin",default:!1},{id:"iconRotate",type:"angle",label:"Icon Rotate",info:"Rotate this icon",default:0,max:359,min:0},{id:"align",label:"Alignment",type:"option:value",devices:{desktop:{default:"left"}},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"}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"24px",padding:{type:"custom"},isDropDownWidth:!0}}},settingConfig:{padding:{paddingConfig:{small:{vertical:"8px",horizontal:"8px"},medium:{vertical:"16px",horizontal:"16px"},large:{vertical:"24px",horizontal:"24px"},custom:{vertical:"0px",horizontal:"0px"}}}},hiddenSettings:["shape","height","gap"]}]}];export{IconSettings};
2
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"></path></svg>`},{id:"iconLinkEnable",type:"toggle",default:!1},{id:"iconLink",type:"pick-link",label:"Source URL",default:{type:"open-page",link:"",target:"_self",title:""},hiddenOptions:{"stay-on-page":!0}}]},{id:"style",controls:[{id:"iconWidth",type:"input:unit",label:"Icon Width",units:["px"],devices:{desktop:{default:"20px"}}},{id:"iconSpacing",label:"Icon Spacing",type:"size",hasNoneValue:!0,emptyOnClear:!0,default:{type:"none"},ignoreReRender:!0},{id:"bgColor",type:"color-picker-v2",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"bg-1"}},{id:"color",type:"color-picker-v2",label:"Color",default:{normal:"text-1"},state:{hover:!0,normal:!0},compoDefaultValue:{normal:"text-1"}},{id:"iconBorder",type:"border-v2",label:"Border",state:{hover:!0,normal:!0},compoDefaultValue:{normal:{borderType:"none",border:"solid",borderWidth:"1px",width:"1px",color:"line-3",isCustom:!1}}},{id:"iconRounded",type:"corner-v2",label:"Border Radius",default:{hover:{radiusType:"none"},normal:{radiusType:"none"}},state:{hover:!0,normal:!0}},{id:"iconShadow",type:"shadow-v2",default:{enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"spin",type:"toggle",label:"Spin",default:!1},{id:"iconRotate",type:"angle",label:"Icon Rotate",info:"Rotate this icon",default:0,max:359,min:0},{id:"align",label:"Alignment",type:"option:value",devices:{desktop:{default:"left"}},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"}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"24px",padding:{type:"custom"},isDropDownWidth:!0}}},settingConfig:{padding:{paddingConfig:{small:{vertical:"8px",horizontal:"8px"},medium:{vertical:"16px",horizontal:"16px"},large:{vertical:"24px",horizontal:"24px"},custom:{vertical:"0px",horizontal:"0px"}}}},hiddenSettings:["shape","height","gap"]}]}];export{IconSettings};
@@ -1,19 +1,19 @@
1
- import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as o}from"./common/classes.js";import{getStyle as n}from"./common/styles.js";let ProductListItem=a=>{let{pageContext:r,rawChildren:c}=a,{productItemStyle:d}=n(a),{productItemClass:i,gpProductClass:s}=o(a),l=()=>t`
2
- ${c?.map((o,n)=>{if(o)return t`
3
- ${e({...o,index:n,style:{...o.style,...d}})}
1
+ import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as o}from"./common/classes.js";let ProductListItem=n=>{let{pageContext:a,rawChildren:r}=n,{productItemClass:c,gpProductClass:d}=o(n),i=()=>t`
2
+ ${r?.map((o,n)=>{if(o)return t`
3
+ ${e({...o,index:n})}
4
4
  `})}
5
5
  `;return t`
6
6
  <gp-product
7
7
  gp-context='{"variantSelected": {{ variant | json | escape }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
8
- gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(r)}}'
9
- class="${s}"
8
+ gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(a)}}'
9
+ class="${d}"
10
10
 
11
11
  >
12
- {%- form 'product', product, id: product_form_id, class: 'form contents ${i}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
12
+ {%- form 'product', product, id: product_form_id, class: 'form contents ${c}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
13
13
  <input type="hidden" name="id" value="{{ variant.id }}" />
14
14
  <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
15
15
  <button type="submit" onclick="return false;" style="display:none;"></button>
16
- ${l()}
16
+ ${i()}
17
17
  {%- endform -%}
18
18
  </gp-product>
19
19
  `};export{ProductListItem as default};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Children as t,isValidElement as o,createElement as e}from"react";import{useEditorMode as m,ProductProvider as i,isEmptyChildren as s}from"@gem-sdk/core";import l from"../../../grid/components/ChildrenDroppable.js";import{getStyle as a}from"./common/styles.js";import{getClass as d}from"./common/classes.js";import{getAttr as c}from"./common/attrs.js";let ProductListGridLayout=p=>{let{children:n,productSortedById:u,generateGridRowArray:y,setting:f}=p,h=m(),{gridLayoutStyle:g,productItemStyle:j}=a(p),{gridLayoutClass:b,productItemClass:L}=d(p),{productListAttr:k,getAttrProductItemEditor:v}=c(p);return r("div",{...k,style:g,className:b,children:u?.length?u?.map((m,a)=>r(i,{product:m,readOnly:!0,children:r("div",{..."edit"===h?v(m?.baseID):{},className:L,style:{"--grchild":f?.sameHeight?y?.[a]?.gridRow:void 0,"--mbchild":y?.[a]?.marginBottom},children:s(n)?r(l,{}):t.map(n,r=>o(r)?e(r.type,{...r.props,parentStyle:j,key:r.key}):null)})},m?.baseID)):null})};export{ProductListGridLayout as default};
1
+ import{jsx as r}from"react/jsx-runtime";import{Children as o,isValidElement as t,createElement as e}from"react";import{useEditorMode as m,ProductProvider as i,isEmptyChildren as s}from"@gem-sdk/core";import l from"../../../grid/components/ChildrenDroppable.js";import{getStyle as a}from"./common/styles.js";import{getClass as d}from"./common/classes.js";import{getAttr as c}from"./common/attrs.js";let ProductListGridLayout=p=>{let{children:n,productSortedById:u,generateGridRowArray:y,setting:f}=p,h=m(),{gridLayoutStyle:g}=a(p),{gridLayoutClass:j,productItemClass:b}=d(p),{productListAttr:L,getAttrProductItemEditor:k}=c(p);return r("div",{...L,style:g,className:j,children:u?.length?u?.map((m,a)=>r(i,{product:m,readOnly:!0,children:r("div",{..."edit"===h?k(m?.baseID):{},className:b,style:{"--grchild":f?.sameHeight?y?.[a]?.gridRow:void 0,"--mbchild":y?.[a]?.marginBottom},children:s(n)?r(l,{}):o.map(n,r=>t(r)?e(r.type,{...r.props,key:r.key}):null)})},m?.baseID)):null})};export{ProductListGridLayout as default};
@@ -35,6 +35,6 @@ import{template as e}from"@gem-sdk/core";import{createClass as i}from"@gem-sdk/s
35
35
  {% elsif request.design_mode or request.visual_preview_mode %}
36
36
  ${r}
37
37
  {% else %}
38
- <div class="${t}"/>
38
+ <div class="${t}"></div>
39
39
  {% endif %}
40
40
  `};export{ICON_SHOPIFY_SLOT,renderThirdPartySlot};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "3.0.4",
3
+ "version": "3.0.7",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -25,7 +25,7 @@
25
25
  "scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
26
26
  },
27
27
  "devDependencies": {
28
- "@gem-sdk/core": "3.0.0",
28
+ "@gem-sdk/core": "3.0.6",
29
29
  "@gem-sdk/styles": "3.0.0",
30
30
  "@gem-sdk/system": "3.0.0",
31
31
  "tsup": "^8.5.0",