@gem-sdk/components 3.0.27 → 3.1.0-staging.1137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/article/components/ArticleImage.js +1 -1
- package/dist/cjs/article/components/ArticleImage.liquid.js +4 -4
- package/dist/cjs/article/settings/configs/article-list/presets.js +1 -1
- package/dist/cjs/dialog/common/classes.js +1 -1
- package/dist/cjs/dialog/components/Dialog.js +1 -1
- package/dist/cjs/dialog/components/Dialog.liquid.js +1 -1
- package/dist/cjs/grid/components/row/common/classes.js +1 -1
- package/dist/cjs/grid/components/row/common/helpers.js +1 -1
- package/dist/cjs/grid/components/row/common/styles.js +1 -1
- package/dist/cjs/hero-banner/common/classes.js +1 -1
- package/dist/cjs/hero-banner/common/helpers.js +1 -1
- package/dist/cjs/hero-banner/common/styles.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +7 -7
- package/dist/cjs/hero-banner/settings/configs/settings.js +1 -1
- package/dist/cjs/icon-list-v2/common/helpers.js +1 -1
- package/dist/cjs/icon-list-v2/components/IconList.js +1 -1
- package/dist/cjs/icon-list-v2/hooks/useIconLineHeight.js +1 -1
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/product/components/dynamic-checkout/Button.liquid.js +1 -1
- package/dist/cjs/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/common.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.liquid.js +30 -22
- package/dist/cjs/product/components/product-list/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-quantity/common/classes.js +1 -1
- package/dist/cjs/product/settings/product-list/configs/settings-v2.js +1 -1
- package/dist/cjs/text/common/styles.js +1 -1
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +6 -6
- package/dist/esm/article/components/ArticleImage.js +1 -1
- package/dist/esm/article/components/ArticleImage.liquid.js +4 -4
- package/dist/esm/article/settings/configs/article-list/presets.js +1 -1
- package/dist/esm/dialog/common/classes.js +1 -1
- package/dist/esm/dialog/components/Dialog.js +1 -1
- package/dist/esm/dialog/components/Dialog.liquid.js +1 -1
- package/dist/esm/grid/components/row/common/classes.js +1 -1
- package/dist/esm/grid/components/row/common/helpers.js +1 -1
- package/dist/esm/grid/components/row/common/styles.js +1 -1
- package/dist/esm/hero-banner/common/classes.js +1 -1
- package/dist/esm/hero-banner/common/helpers.js +1 -1
- package/dist/esm/hero-banner/common/styles.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +10 -10
- package/dist/esm/hero-banner/settings/configs/settings.js +1 -1
- package/dist/esm/icon-list-v2/common/helpers.js +1 -1
- package/dist/esm/icon-list-v2/components/IconList.js +1 -1
- package/dist/esm/icon-list-v2/hooks/useIconLineHeight.js +1 -1
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/product/components/dynamic-checkout/Button.liquid.js +1 -1
- package/dist/esm/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/common.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.liquid.js +32 -24
- package/dist/esm/product/components/product-list/common/helpers.js +1 -1
- package/dist/esm/product/components/product-quantity/common/classes.js +1 -1
- package/dist/esm/product/settings/product-list/configs/settings-v2.js +1 -1
- package/dist/esm/text/common/styles.js +1 -1
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +5 -5
- package/dist/types/index.d.ts +1 -0
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as u}from"./common/helpers.js";let ProductList=g=>{let{setting:p,styles:f,pageContext:m}=g
|
|
1
|
+
import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as u}from"./common/helpers.js";let ProductList=g=>{let{setting:p,styles:f,pageContext:m}=g,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:x,sortedBy:S,isReverse:b,productSrc:L,productNumber:A,isSorted:R,relatedTag:I,collectionHandle:F}=u(g),j=()=>e`
|
|
2
2
|
${s("RelatedProduct"===L,`
|
|
3
3
|
assign relatedTag = '${I}'
|
|
4
4
|
assign assignProduct = product
|
|
@@ -9,7 +9,7 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
|
|
|
9
9
|
assign handleAssignProduct = assignProduct.handle
|
|
10
10
|
case relatedTag
|
|
11
11
|
when 'collection'
|
|
12
|
-
assign hasRelatedExclude = ${
|
|
12
|
+
assign hasRelatedExclude = ${P}
|
|
13
13
|
if hasRelatedExclude
|
|
14
14
|
assign relatedExclude = '${h}'
|
|
15
15
|
else
|
|
@@ -63,7 +63,7 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
|
|
|
63
63
|
endfor
|
|
64
64
|
when 'tags'
|
|
65
65
|
assign tagsAssignProduct = assignProduct.tags
|
|
66
|
-
assign hasRelatedExclude = ${
|
|
66
|
+
assign hasRelatedExclude = ${P}
|
|
67
67
|
if hasRelatedExclude
|
|
68
68
|
assign relatedExclude = '${h}'
|
|
69
69
|
else
|
|
@@ -95,7 +95,24 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
|
|
|
95
95
|
assign products = products
|
|
96
96
|
endpaginate
|
|
97
97
|
`)}
|
|
98
|
-
`,
|
|
98
|
+
`,w=()=>{let s=F?`
|
|
99
|
+
assign target_collection = collections['${F}']
|
|
100
|
+
if target_collection == empty
|
|
101
|
+
for collection in collections
|
|
102
|
+
if collection.id == ${_}
|
|
103
|
+
assign target_collection = collection
|
|
104
|
+
break
|
|
105
|
+
endif
|
|
106
|
+
endfor
|
|
107
|
+
endif
|
|
108
|
+
`:`
|
|
109
|
+
for collection in collections
|
|
110
|
+
if collection.id == ${_}
|
|
111
|
+
assign target_collection = collection
|
|
112
|
+
break
|
|
113
|
+
endif
|
|
114
|
+
endfor
|
|
115
|
+
`;return e`
|
|
99
116
|
{%- liquid
|
|
100
117
|
assign productHandles = '${x.toString()}'| split: ','
|
|
101
118
|
assign products = null
|
|
@@ -103,18 +120,14 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
|
|
|
103
120
|
assign productSrc = '${L}'
|
|
104
121
|
assign c = 0
|
|
105
122
|
assign limit = ${A??4}
|
|
123
|
+
|
|
106
124
|
if request.page_type == 'collection' or preview_page_type == 'collection'
|
|
107
125
|
assign target_collection = collection
|
|
108
126
|
if target_collection == empty or target_collection == null
|
|
109
127
|
if '${_.toLowerCase()}' == 'latest'
|
|
110
128
|
assign target_collection = collections | sort: 'updated_at' ${b?"| reverse":""} | first
|
|
111
129
|
else
|
|
112
|
-
|
|
113
|
-
if collection.id == ${_}
|
|
114
|
-
assign target_collection = collection
|
|
115
|
-
break
|
|
116
|
-
endif
|
|
117
|
-
endfor
|
|
130
|
+
${s}
|
|
118
131
|
endif
|
|
119
132
|
endif
|
|
120
133
|
paginate target_collection.products by ${E||4}
|
|
@@ -122,7 +135,7 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
|
|
|
122
135
|
endpaginate
|
|
123
136
|
else
|
|
124
137
|
if productSrc == 'RelatedProduct'
|
|
125
|
-
${
|
|
138
|
+
${j()}
|
|
126
139
|
elsif productSrc == 'PickProduct'
|
|
127
140
|
unless ${y}
|
|
128
141
|
assign products = null | sort
|
|
@@ -142,12 +155,7 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
|
|
|
142
155
|
if '${_.toLowerCase()}' == 'latest'
|
|
143
156
|
assign target_collection = collections | sort: 'updated_at' ${b?"| reverse":""} | first
|
|
144
157
|
else
|
|
145
|
-
|
|
146
|
-
if collection.id == ${_}
|
|
147
|
-
assign target_collection = collection
|
|
148
|
-
break
|
|
149
|
-
endif
|
|
150
|
-
endfor
|
|
158
|
+
${s}
|
|
151
159
|
endif
|
|
152
160
|
paginate target_collection.products by ${E||4}
|
|
153
161
|
assign products = target_collection.products ${R?S:""} ${b?"| reverse":""}
|
|
@@ -155,7 +163,7 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
|
|
|
155
163
|
endif
|
|
156
164
|
endif
|
|
157
165
|
-%}
|
|
158
|
-
|
|
166
|
+
`},{productListWrapStyle:H,productListContentStyle:q,productListWrapAlignStyle:G}=c(g),{productListWrapClass:B}=l(g),T=()=>e`
|
|
159
167
|
{%- if products == null -%}
|
|
160
168
|
{%- if count == 0 and ${k.length} == 0 -%}
|
|
161
169
|
{% if '${L}' == 'RelatedProduct' -%}
|
|
@@ -178,17 +186,17 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
|
|
|
178
186
|
|
|
179
187
|
${s(!!f?.preloadBgImage,`${s(!!f?.backgroundImage?.desktop?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.desktop?.image?.src}" as="image" />`)}${s(!!f?.backgroundImage?.tablet?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.tablet?.image?.src}" as="image" />`)}${s(!!f?.backgroundImage?.mobile?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.mobile?.image?.src}" as="image" />`)}`)}
|
|
180
188
|
<div
|
|
181
|
-
class="${
|
|
182
|
-
style="${
|
|
189
|
+
class="${B}"
|
|
190
|
+
style="${H}"
|
|
183
191
|
>
|
|
184
|
-
<div class='gp-flex gp-w-full' style="${
|
|
192
|
+
<div class='gp-flex gp-w-full' style="${G}">
|
|
185
193
|
<div
|
|
186
|
-
style="${
|
|
194
|
+
style="${q}"
|
|
187
195
|
>
|
|
188
196
|
{%- assign gpBkProduct = product -%}
|
|
189
197
|
{%- assign gpBkProducts = products -%}
|
|
190
|
-
${
|
|
191
|
-
${
|
|
198
|
+
${w()}
|
|
199
|
+
${T()}
|
|
192
200
|
{%- assign product = gpBkProduct -%}
|
|
193
201
|
{%- assign products = gpBkProducts -%}
|
|
194
202
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getSizeSetting as t}from"../../../helpers/product.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getUpdatedDotStyle as o}from"../../../../carousel/components/dot/common/helpers.js";let getData=e=>{let{setting:
|
|
1
|
+
import{getSizeSetting as t}from"../../../helpers/product.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getUpdatedDotStyle as o}from"../../../../carousel/components/dot/common/helpers.js";let getData=e=>{let{setting:d,styles:r}=e,c=d?.productSetting??{},l="RelatedProduct"===c.productSrc,i=o(d?.dot,d?.dotStyle),a={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...d};delete a.childItem;let u={...r,sizeSetting:{...t({adaptiveHeight:r?.adaptiveHeight,height:r?.height,fullWidth:{desktop:!0}})},spacing:r?.spacing};return delete u.backgroundColor,delete u.backgroundImage,{isRelatedProduct:l,productSetting:c,dotStyle:i,carouselConfigSetting:a,carouselConfigStyle:u}},getDataLiquid=t=>{let{setting:o,styles:d}=t,r=o?.productSetting,c=r?.relatedTag,l=r?.hasRelatedExclude,i=(c&&"collection"===c[0]?r?.relatedCollectionExclude:r?.relatedTagsExclude)??"",a=i?.split(",").map(t=>t.trim()).toString(),u=r?.productSrc??"Collection",p=r?.collectionId?.replace(PREFIX_COLLECTION_ID,"")??"latest",n=r?.productSrc==="PickProduct"&&r?.productIds?.length===0,s=d?.layout==="grid",g=e(o?.numberOfProducts,4),I="PickProduct"===u&&r?.productIds?.length?r?.productIds.map(t=>t.replace(PREFIX_PRODUCT_ID,"")):[],m="PickProduct"===u&&r?.productHandles?.length?r?.productHandles:[],P=o?.orderBy&&o?.orderBy!=="none",h=(r?.productSrc==="Collection"||r?.productSrc==="DynamicCollection")&&P?o?.orderBy?.split("_"):"none",C=P&&h?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",D=h?.[h.length-1]==="DESC",E=()=>"PickProduct"===u?n?4:r?.numOfSelectedProducts??4:g;return{hasRelatedExclude:l,relatedExcludeTrim:a,collectionID:p,isLatestProducts:n,isGrid:s,numberOfProducts:g,productListId:I,productListHandles:m,sortedBy:C,isReverse:D,productSrc:u,productSetting:r,isSorted:P,relatedTag:c,productNumber:E(),collectionHandle:r?.collectionHandle}},PREFIX_COLLECTION_ID="gid://shopify/Collection/",PREFIX_PRODUCT_ID="gid://shopify/Product/";export{PREFIX_COLLECTION_ID,PREFIX_PRODUCT_ID,getData,getDataLiquid};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeTypographyClassName as e,handleConvertClassColor as t,getGlobalColorStateClass as p,composeClasses as l}from"@gem-sdk/core";let getInputClasses=({styles:
|
|
1
|
+
import{composeTypographyClassName as e,handleConvertClassColor as t,getGlobalColorStateClass as p,composeClasses as l}from"@gem-sdk/core";let getInputClasses=({styles:s,borderBtn:g,inputBackgroundColor:n,textColor:r,isDisabled:a})=>{let o="gp-flex gp-w-full gp-shrink-[99999] gp-appearance-none gp-items-center gp-text-center gp-outline-none focus-visible:gp-shadow-none focus-visible:gp-outline-none gp-transition-all gp-duration-150 hover:gp-text-black disabled:gp-cursor-not-allowed",i=e(s?.typo,s?.typography),u=t(g),c=p("bg",n),f=p("text",r);return u&&(o+=` ${u} `),i&&(o+=` ${i} `),c&&(o+=` ${c} `),f&&(o+=` ${f} `),a&&(o+="gp-cursor-not-allowed"),{...l(o)}},getButtonClass=({borderBtn:e,buttonBackgroundColor:s,iconColor:g,buttonSide:n,isDisabled:r})=>{let a=`gp-flex gp-aspect-square gp-h-full disabled:gp-cursor-not-allowed ${r?"gp-cursor-not-allowed":"gp-cursor-pointer"} gp-items-center gp-justify-center gp-outline-none ${"left"===n?"gp-minus":"gp-plus"} `,o=t(e),i=p("bg",s),u=p("text",g);return o&&(a+=` ${o} `),i&&(a+=` ${i} `),u&&(a+=` ${u} `),{...l(a)}},getContainerClasses=e=>({...l(`quantityClass gp-relative gp-inline-flex gp-h-12 gp-w-full gp-bg-transparent gp-transition-all gp-duration-150 data-[disabled=true]:gp-opacity-60 ${e??""}`)}),getWrapperClasses=()=>({...l("gp-inline-flex gp-w-full gp-overflow-hidden")}),getIconWrapperClasses=()=>({...l("gp-inline-flex gp-items-center gp-justify-center [&>*]:gp-h-full [&>*]:gp-w-full")});export{getButtonClass,getContainerClasses,getIconWrapperClasses,getInputClasses,getWrapperClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CarouselSettingsV2Setting as e,CarouselSettingsV2Style as t}from"../../../../carousel/settings/configs/settings-v2.js";let ProductListSettingsV2=[{id:"setting",controls:[{id:"productSetting",type:"product-list",label:"Select product list",default:{productSrc:"PickProduct",productIds:[],collectionId:"Latest",relatedType:"related-product",relatedTag:["collection"],hasRelatedExclude:!1}},{id:"slidesToShow",type:"input:slider",min:1,max:6,isNumber:!0,label:"Products per rows ",devices:{desktop:{default:4},tablet:{default:3},mobile:{default:2}}},{id:"numberOfProducts",type:"input:slider",min:1,max:50,label:"Number of products",isNumber:!0,default:10,ignoreMax:!0},{id:"sameHeight",label:"Enable same height",type:"select",options:[{label:"Same height",value:!0},{label:"Fit content height",value:!1}],default:!0},...e]},{id:"style",controls:[{id:"layout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 78 52",itemPerRow:2,itemSpacing:"large",default:"grid",options:[{label:"Grid",value:"grid",iconName:"gp-grid-layout"},{label:"Slider",value:"slider",iconName:"gp-slider-layout"}]},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"height",label:"Height",type:"dropdown:input",inputType:"number",units:["px"],displayOptions:[{label:"Fit content",value:"Auto"}],devices:{}},{id:"horizontalGutter",label:"Row gap",type:"input:unit",fallbackValue:!0,min:0,units:["px","%"],devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"verticalGutter",label:"Column gap",type:"input:unit",units:["px","%"],fallbackValue:!0,min:0,devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0},repeat:"no-repeat",size:"cover",position:{x:50,y:50},attachment:"scroll",preload:!1}}}},{id:"preloadBgImage",type:"toggle",label:"Preload",default:!1},{id:"align",label:"Align",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"center"}}},...t]}];export{ProductListSettingsV2};
|
|
1
|
+
import{CarouselSettingsV2Setting as e,CarouselSettingsV2Style as t}from"../../../../carousel/settings/configs/settings-v2.js";let ProductListSettingsV2=[{id:"setting",controls:[{id:"productSetting",type:"product-list",label:"Select product list",default:{productSrc:"PickProduct",productIds:[],collectionId:"Latest",collectionHandle:"",relatedType:"related-product",relatedTag:["collection"],hasRelatedExclude:!1}},{id:"slidesToShow",type:"input:slider",min:1,max:6,isNumber:!0,label:"Products per rows ",devices:{desktop:{default:4},tablet:{default:3},mobile:{default:2}}},{id:"numberOfProducts",type:"input:slider",min:1,max:50,label:"Number of products",isNumber:!0,default:10,ignoreMax:!0},{id:"sameHeight",label:"Enable same height",type:"select",options:[{label:"Same height",value:!0},{label:"Fit content height",value:!1}],default:!0},...e]},{id:"style",controls:[{id:"layout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 78 52",itemPerRow:2,itemSpacing:"large",default:"grid",options:[{label:"Grid",value:"grid",iconName:"gp-grid-layout"},{label:"Slider",value:"slider",iconName:"gp-slider-layout"}]},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"height",label:"Height",type:"dropdown:input",inputType:"number",units:["px"],displayOptions:[{label:"Fit content",value:"Auto"}],devices:{}},{id:"horizontalGutter",label:"Row gap",type:"input:unit",fallbackValue:!0,min:0,units:["px","%"],devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"verticalGutter",label:"Column gap",type:"input:unit",units:["px","%"],fallbackValue:!0,min:0,devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0},repeat:"no-repeat",size:"cover",position:{x:50,y:50},attachment:"scroll",preload:!1}}}},{id:"preloadBgImage",type:"toggle",label:"Preload",default:!1},{id:"align",label:"Align",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"center"}}},...t]}];export{ProductListSettingsV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyle as e,makeStyleResponsive as t,makeGlobalSize as r,getSingleColorVariable as o,composeBorderResponsive as l,composeRadiusResponsive as i,getResponsiveStyleShadowWithoutState as n,getStyleShadow as a,makeLineClamp as d,getGlobalColorStyle as
|
|
1
|
+
import{makeStyle as e,makeStyleResponsive as t,makeGlobalSize as r,getSingleColorVariable as o,composeBorderResponsive as l,composeRadiusResponsive as i,getResponsiveStyleShadowWithoutState as n,getStyleShadow as a,makeLineClamp as d,getGlobalColorStyle as y,getGlobalColorStateStyle as h,composeTypographyStyle as s,getStyleBackgroundByDevice as p,getGradientBgrStyleByDevice as c,filterHoverVariables as u}from"@gem-sdk/core";import{formatThickness as g}from"./helpers.js";function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}let getStyle=(r,o)=>{let l={...e({mr:r?.spacing,mb:r?.spacing}),...t("ta",r?.align),...o,"--dynamic-source-color":"#F4F4F4"};return filterTruthyStyles(l)},getContainerStyle=(e,r)=>{let{tagWidth:o}=r??{},l={...t("jc",e?.align),...o};return filterTruthyStyles(l)},getTextStyle=(S,w)=>{let m=r(w?.globalSize),b=[S?.lineThrough&&"line-through",S?.typo?.attrs?.underline&&"underline"].filter(Boolean),f={...m?.width?.["--w"]?m.width:{"--w":"100%"},...e({tdc:o(S?.lineColor?.normal),tdt:g(S?.thickness)}),...l(S?.shapeBorder),...i(S?.shapeRounded),...n(S?.shapeBoxShadow,"box-shadow",S?.shapeBoxShadow),...a({value:S?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:S?.typo?.custom?.hasShadowText}),...t("ta",S?.textAlign),...t("line-clamp",d(S?.lineClamp,S?.hasLineClamp)),...S?.textColor?y(S.textColor):h("c",S?.color),...s(S?.typo,S?.typography),"word-break":"break-word",...p(w?.background),...m.padding,...c(w?.background,{desktop:!0,tablet:!0,mobile:!0}),overflow:"hidden",...S?.opacityPrice&&{opacity:`${S?.opacityPrice}%`},...e({tdl:b.join(" ")})};return S?.enableHoverEffect?filterTruthyStyles(f):u(f)},getTextStyleInline=e=>{let t={...s(e?.typo),"word-break":"break-word",overflow:"hidden"};return filterTruthyStyles(t)};export{getContainerStyle,getStyle,getTextStyle,getTextStyleInline};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as
|
|
1
|
+
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as i}from"@gem-sdk/core";import{getSettingPreloadData as l}from"../../helpers.js";import{createStateOrContext as r,createStyle as a,createClass as m,If as o}from"@gem-sdk/system";import{getArticleVimeoClasses as p,getImageVimeoClasses as c,getButtonVimeoClasses as d,getIframeVimeoClasses as g}from"../common/classes.js";import{getIframeVimeoStyle as f,getArticleVimeoStyle as n}from"../common/styles.js";import{getVimeoParams as y}from"../common/helpers.js";import $ from"../../image/components/NextImage.liquid.js";let LiteVimeoEmbed=b=>{let{title:h,id:u,lazy:v,aspectRatio:S,autoplay:j,muted:w,thumbnailLink:E,poster:x}=b,{iframeSrc:L}=y(b),k=!v,I=b.thumbnail,N=r({id:u,thumbnail:E,lazy:v,iframeSrc:L,title:h,autoplay:j,muted:w,style:b?.vimeoStyleIframe||""}),V=a({...f(S)}),A=a({...n(S,"")}),T=m({...p(I,S)}),C=m({...c(k)}),G=m({...d(k)}),M=m({...g()});return e`
|
|
2
2
|
<gp-lite-vimeo-embed gp-data='${JSON.stringify(N)}'>
|
|
3
3
|
<article
|
|
4
4
|
aria-hidden
|
|
5
5
|
class="${T}"
|
|
6
|
-
data-title="${
|
|
6
|
+
data-title="${h}"
|
|
7
7
|
style="${A}"
|
|
8
8
|
>
|
|
9
|
-
${$({src:I,alt:x?.altText,title:x?.imageTitle,className:C,isDisableAspectStyle:!0,enableLazyLoadImage:!0,priority:x?.preload})}
|
|
9
|
+
${$({src:I,alt:x?.altText,title:x?.imageTitle,className:C,isDisableAspectStyle:!0,enableLazyLoadImage:!0,priority:x?.preload,height:x?.height,width:x?.width})}
|
|
10
10
|
${o(!k,e`
|
|
11
11
|
<button type="button" class="${G}" aria-label="Play">
|
|
12
12
|
<svg class="gp-w-5 gp-text-white" viewBox="0 0 24 24">
|
|
@@ -19,7 +19,7 @@ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as l}from"@gem-s
|
|
|
19
19
|
${o(k,e`
|
|
20
20
|
<iframe
|
|
21
21
|
style="${V}"
|
|
22
|
-
title="${
|
|
22
|
+
title="${h}"
|
|
23
23
|
frameborder="0"
|
|
24
24
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
25
25
|
allowfullscreen
|
|
@@ -28,5 +28,5 @@ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as l}from"@gem-s
|
|
|
28
28
|
></iframe>`)}
|
|
29
29
|
</article>
|
|
30
30
|
</gp-lite-vimeo-embed>
|
|
31
|
-
${t(s,`<script ${
|
|
31
|
+
${t(s,`<script ${l('class="gps-link" delay',"src")}="{{ 'gp-lite-vimeo-embed-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${l('class="gps-link" delay',"src")}="${i}/assets-v2/gp-lite-vimeo-embed-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
32
32
|
`};export{LiteVimeoEmbed as default};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3622,6 +3622,7 @@ type OriginalSettingProps$2 = {
|
|
|
3622
3622
|
productSrc?: ProductSource;
|
|
3623
3623
|
productIds?: string[];
|
|
3624
3624
|
collectionId?: string;
|
|
3625
|
+
collectionHandle?: string;
|
|
3625
3626
|
productHandles?: string[];
|
|
3626
3627
|
numOfSelectedProducts?: number;
|
|
3627
3628
|
relatedTag?: RelatedCondition[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.1.0-staging.1137",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
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.
|
|
29
|
-
"@gem-sdk/styles": "3.0.
|
|
30
|
-
"@gem-sdk/system": "3.0.
|
|
28
|
+
"@gem-sdk/core": "3.1.0-staging.1137",
|
|
29
|
+
"@gem-sdk/styles": "3.1.0-staging.1137",
|
|
30
|
+
"@gem-sdk/system": "3.1.0-staging.1137",
|
|
31
31
|
"tsup": "^8.5.0",
|
|
32
32
|
"@types/react-transition-group": "^4.4.12",
|
|
33
33
|
"xlsx": "^0.18.5"
|