@gem-sdk/components 2.0.0-staging.921 → 2.0.0-staging.922
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/common/helpers.js +13 -1
- package/dist/cjs/article/components/ArticleContent.js +3 -2
- package/dist/cjs/article/components/ArticleContent.liquid.js +4 -3
- package/dist/cjs/icon-list-v2/common/styles.js +1 -1
- package/dist/cjs/icon-list-v2/settings/IconList.js +1 -1
- package/dist/cjs/icon-list-v2/settings/configs/settings.js +1 -1
- package/dist/cjs/icon-list-v2/settings/configs/ui-v2.js +1 -1
- package/dist/esm/article/common/helpers.js +13 -1
- package/dist/esm/article/components/ArticleContent.js +3 -2
- package/dist/esm/article/components/ArticleContent.liquid.js +5 -4
- package/dist/esm/icon-list-v2/common/styles.js +1 -1
- package/dist/esm/icon-list-v2/settings/IconList.js +1 -1
- package/dist/esm/icon-list-v2/settings/configs/settings.js +1 -1
- package/dist/esm/icon-list-v2/settings/configs/ui-v2.js +1 -1
- package/dist/types/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1 +1,13 @@
|
|
|
1
|
-
"use strict";const convertSpecialCharacter=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")
|
|
1
|
+
"use strict";const convertSpecialCharacter=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),styleOverride=`
|
|
2
|
+
.gp-content-text-override.gp-p-description-text p,
|
|
3
|
+
.gp-content-text-override.gp-p-description-text div,
|
|
4
|
+
.gp-content-text-override.gp-p-description-text span,
|
|
5
|
+
.gp-content-text-override.gp-p-description-text h1,
|
|
6
|
+
.gp-content-text-override.gp-p-description-text h2,
|
|
7
|
+
.gp-content-text-override.gp-p-description-text h3,
|
|
8
|
+
.gp-content-text-override.gp-p-description-text h4,
|
|
9
|
+
.gp-content-text-override.gp-p-description-text h5,
|
|
10
|
+
.gp-content-text-override.gp-p-description-text h6,
|
|
11
|
+
.gp-content-text-override.gp-p-description-text * {
|
|
12
|
+
line-height: inherit !important;
|
|
13
|
+
}`;exports.convertSpecialCharacter=convertSpecialCharacter,exports.styleOverride=styleOverride;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),NoDataState=require("../../common/components/NoDataState.js");const ArticleContent=({styles:e,builderProps:t})=>{let
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),NoDataState=require("../../common/components/NoDataState.js"),helpers=require("../common/helpers.js");const ArticleContent=({styles:e,builderProps:t})=>{let r=core.useArticleStore(e=>e.article),[i,o]=React.useState(!1),p=React.useRef(null),s=core.useCurrentDevice(),c=core.useShopStore(e=>e.storefrontUrl),n=core.getResponsiveValueByScreen(e?.hasLineClamp,s),a=core.getResponsiveValueByScreen(e?.lineClamp,s),l=()=>{if(!c)return;let e=new URL(c);window.open(`${e.protocol}//${e.host}/admin/content/articles`)};React.useEffect(()=>{o(!1)},[n,a,r?.description]);let d=core.composeTypographyClassName(e?.typo,e?.typography),m=core.composeTypographyStyle(e?.typo,e?.typography),y=`
|
|
3
3
|
.gp-p-description-text a:empty,
|
|
4
4
|
.gp-p-description-text ul:empty,
|
|
5
5
|
.gp-p-description-text dl:empty,
|
|
@@ -15,4 +15,5 @@
|
|
|
15
15
|
.gp-p-description-text h6:empty {
|
|
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;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers=require("../../helpers.js");const ArticleContent=({styles:e,builderProps:t})=>{let r=core.composeTypographyClassName(e?.typo,e?.typography),a=core.composeTypographyStyle(e?.typo,e?.typography),s={...core.makeStyleResponsive("ta",e?.textAlign),...core.getGlobalColorStateStyle("c",e?.color),...core.makeStyle({tt:e?.transform}),...a},o={...s,...core.makeStyleResponsive("line-clamp",core.makeLineClamp(e?.lineClamp,e?.hasLineClamp)),...core.getStyleShadow({value:e?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:e?.typo?.custom?.hasShadowText})};return core.template`
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers$1=require("../../helpers.js"),helpers=require("../common/helpers.js");const ArticleContent=({styles:e,builderProps:t})=>{let r=core.composeTypographyClassName(e?.typo,e?.typography),a=core.composeTypographyStyle(e?.typo,e?.typography),s={...core.makeStyleResponsive("ta",e?.textAlign),...core.getGlobalColorStateStyle("c",e?.color),...core.makeStyle({tt:e?.transform}),...a},o={...s,...core.makeStyleResponsive("line-clamp",core.makeLineClamp(e?.lineClamp,e?.hasLineClamp)),...core.getStyleShadow({value:e?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:e?.typo?.custom?.hasShadowText})};return core.template`
|
|
3
3
|
<gp-article-content data-id="${t?.uid}" >
|
|
4
4
|
<div
|
|
5
|
-
class="${core.cls("gp-relative gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",r,core.getGlobalColorStateClass("text",e?.color),"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white")}"
|
|
5
|
+
class="${core.cls("gp-relative gp-p-description-text gp-content-text-override gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",r,core.getGlobalColorStateClass("text",e?.color),"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white")}"
|
|
6
6
|
style="${o}"
|
|
7
7
|
>
|
|
8
8
|
{{article.content}}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
.gp-p-description-text * {
|
|
12
12
|
color: inherit
|
|
13
13
|
}
|
|
14
|
+
${helpers.styleOverride}
|
|
14
15
|
{% endstyle %}
|
|
15
16
|
</gp-article-content>
|
|
16
|
-
${core.RenderIf(core.isLocalEnv,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-article-content.js' | asset_url }}" defer="defer"></script>`,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="${core.baseAssetURL}/assets-v2/gp-article-content.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
17
|
+
${core.RenderIf(core.isLocalEnv,`<script ${helpers$1.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-article-content.js' | asset_url }}" defer="defer"></script>`,`<script ${helpers$1.getSettingPreloadData('class="gps-link" delay',"src")}="${core.baseAssetURL}/assets-v2/gp-article-content.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
17
18
|
`};exports.default=ArticleContent;
|
|
@@ -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:
|
|
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})=>{let{background:l,align:r}=e??{};return{...t="react"===o?filterStyles(t):t,...core.getStyleBackgroundByDevice(l),...core.makeStyleResponsive("jc",r),...core.makeStyleResponsive("d",{desktop:"flex",tablet:"flex",mobile:"flex"}),...core.getGradientBgrStyleByDevice(l,{desktop:!0,tablet:!0,mobile:!0})}},getStyleWraplistIcon=({styles:e})=>{let{panelAlign:t,contentBoxPadding:o,contentBoxWidth:l}=e??{};return{...core.getResponsiveStylePadding(o),...core.makeStyleResponsive("w",l),...core.makeStyleResponsive("jc",t)}},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:l,iconRounded:r}=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:l,bblr:r?.bblr,bbrr:r?.bbrr,btlr:r?.btlr,btrr:r?.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:l}=t??{};return{"--c":core.getSingleColorVariable(o),"--w":"100%","--h":"100%","--size-desktop":`${l?.desktop}px`,"--size-tablet":`${l?.tablet||l?.desktop}px`,"--size-mobile":`${l?.mobile||l?.tablet||l?.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;
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99997 1.26318C8.19029 1.26318 8.36411 1.37123 8.44834 1.5419L10.3585 5.41227L14.6297 6.03292C14.818 6.06028 14.9745 6.1922 15.0333 6.37321C15.0921 6.55422 15.0431 6.75292 14.9068 6.88576L11.8161 9.89843L12.5457 14.1524C12.5779 14.34 12.5008 14.5295 12.3468 14.6414C12.1928 14.7533 11.9887 14.768 11.8203 14.6795L7.99997 12.671L4.17969 14.6795C4.01123 14.768 3.8071 14.7533 3.65312 14.6414C3.49915 14.5295 3.42204 14.34 3.45421 14.1524L4.18382 9.89843L1.09315 6.88576C0.956861 6.75292 0.907813 6.55422 0.966625 6.37321C1.02544 6.1922 1.18191 6.06028 1.37025 6.03292L5.64146 5.41227L7.55161 1.5419C7.63584 1.37123 7.80965 1.26318 7.99997 1.26318ZM7.99997 2.89296L6.42186 6.09056C6.34903 6.23813 6.20825 6.34042 6.04539 6.36408L2.51663 6.87684L5.07007 9.36582C5.18791 9.48069 5.24169 9.64619 5.21387 9.80839L4.61108 13.3229L7.7673 11.6636C7.91297 11.587 8.08698 11.587 8.23264 11.6636L11.3889 13.3229L10.7861 9.80839C10.7583 9.64619 10.812 9.48069 10.9299 9.36582L13.4833 6.87684L9.95455 6.36408C9.7917 6.34042 9.65092 6.23813 9.57808 6.09056L7.99997 2.89296Z" fill="#F9F9F9"/>
|
|
29
29
|
<path d="M6.42186 6.09056L7.99997 2.89296L9.57808 6.09056C9.65092 6.23813 9.7917 6.34042 9.95455 6.36408L13.4833 6.87684L10.9299 9.36582C10.812 9.48069 10.7583 9.64619 10.7861 9.80839L11.3889 13.3229L8.23264 11.6636C8.08698 11.587 7.91297 11.587 7.7673 11.6636L4.61108 13.3229L5.21387 9.80839C5.24169 9.64619 5.18791 9.48069 5.07007 9.36582L2.51663 6.87684L6.04539 6.36408C6.20825 6.34042 6.34903 6.23813 6.42186 6.09056Z" fill="currentColor"/>
|
|
30
30
|
</svg>
|
|
31
|
-
`]},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}}]}],locales:{editor:{en:{icons_not_found:"Icons not found"}}},rootOverride:{styles:{align:{desktop:"center"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}}}};exports.default=config;
|
|
31
|
+
`]},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}}]}],locales:{editor:{en:{icons_not_found:"Icons not found"}}},rootOverride:{styles:{align:{desktop:"center"},contentBoxWidth:{desktop:"1200px"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}}}};exports.default=config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var items=require("./items.js");const IconListSettings=[{id:"setting",controls:[{id:"childItem",label:"Item management",type:"child-item",default:["Icon 1","Icon 2"],childTemplate:items.itemControlTemplate},{id:"translate",type:"input",default:"childItem"},{id:"textTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"iconSvg",type:"icon",label:"Icon Parent",hideInput:!0,info:"Choose from list or paste any SVG icon",default:'<svg data-name="check-circle-filled" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>'},{id:"iconWidth",type:"input:stepper",label:"Icon Width",devices:{desktop:{default:24}},min:0},{id:"childConfig",type:"child-icon",label:"",default:[,,,].fill('<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>')},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{padding:{type:"custom",top:"0px",bottom:"0px",left:"0px",right:"0px"}}}},hiddenShowMore:!0,hiddenSettings:["shape","width","height","gap"]},{id:"iconType",type:"layout-segment",iconViewBox:"0 0 66 48",enableItemBackground:!0,enableTooltip:!0,label:"Icon type",options:[{label:"Matching icons",value:"matching",type:"icon-type"},{label:"Different icons",value:"different",type:"icon-type"}],default:"matching"}]},{id:"style",controls:[{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"iconColor",type:"color-picker-v2",label:"Icon color",default:"text-1"},{id:"backgroundColor",type:"color-picker-v2",label:"Background color",default:"transparent",compoDefaultValue:"bg-1"},{id:"iconBorder",label:"Border",type:"border-v2",default:{},compoDefaultValue:{border:"solid",width:"1px 1px 1px 1px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"}},{id:"iconRounded",type:"corner-v2",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"horizontalSpacing",label:"Horizontal Spacing",type:"input:slider",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"position",type:"option:illustration",enableTooltip:!0,label:"Position",options:[{label:"Align center",value:"center",type:"align-pos",svgName:"gp-align-position-center"},{label:"Align top",value:"baseline",type:"align-pos",svgName:"gp-align-position-top"}],devices:{desktop:{default:"center"},tablet:{default:"center"},mobile:{default:"center"}}},{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:"verticalSpacing",type:"input:slider",label:"Item gap",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"12px"}}}]}];exports.IconListSettings=IconListSettings;
|
|
1
|
+
"use strict";var items=require("./items.js");const IconListSettings=[{id:"setting",controls:[{id:"childItem",label:"Item management",type:"child-item",default:["Icon 1","Icon 2"],childTemplate:items.itemControlTemplate},{id:"translate",type:"input",default:"childItem"},{id:"textTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"iconSvg",type:"icon",label:"Icon Parent",hideInput:!0,info:"Choose from list or paste any SVG icon",default:'<svg data-name="check-circle-filled" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>'},{id:"iconWidth",type:"input:stepper",label:"Icon Width",devices:{desktop:{default:24}},min:0},{id:"childConfig",type:"child-icon",label:"",default:[,,,].fill('<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>')},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{padding:{type:"custom",top:"0px",bottom:"0px",left:"0px",right:"0px"}}}},hiddenShowMore:!0,hiddenSettings:["shape","width","height","gap"]},{id:"iconType",type:"layout-segment",iconViewBox:"0 0 66 48",enableItemBackground:!0,enableTooltip:!0,label:"Icon type",options:[{label:"Matching icons",value:"matching",type:"icon-type"},{label:"Different icons",value:"different",type:"icon-type"}],default:"matching"}]},{id:"style",controls:[{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"iconColor",type:"color-picker-v2",label:"Icon color",default:"text-1"},{id:"backgroundColor",type:"color-picker-v2",label:"Background color",default:"transparent",compoDefaultValue:"bg-1"},{id:"iconBorder",label:"Border",type:"border-v2",default:{},compoDefaultValue:{border:"solid",width:"1px 1px 1px 1px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"}},{id:"iconRounded",type:"corner-v2",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"horizontalSpacing",label:"Horizontal Spacing",type:"input:slider",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"position",type:"option:illustration",enableTooltip:!0,label:"Position",options:[{label:"Align center",value:"center",type:"align-pos",svgName:"gp-align-position-center"},{label:"Align top",value:"baseline",type:"align-pos",svgName:"gp-align-position-top"}],devices:{desktop:{default:"center"},tablet:{default:"center"},mobile:{default:"center"}}},{id:"contentBoxWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"100%"}}},{id:"contentBoxPadding",label:"Padding",type:"padding-v2",devices:{desktop:{}},compoDefaultValue:{desktop:{default:{top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},{id:"panelAlign",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:"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:"verticalSpacing",type:"input:slider",label:"Item gap",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"12px"}}}]}];exports.IconListSettings=IconListSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Item management"},controls:[{label:{en:"Order"},setting:{id:"childItem"}}]},{label:{en:"Icon style"},controls:[{label:{en:"Icon type "},setting:{id:"iconType"}},{conditionDisplay:'iconType === "matching"',label:{en:"Icon"},setting:{id:"iconSvg"}},{conditionDisplay:'iconType === "different"',layout:"vertical",setting:{id:"childConfig"}},{label:{en:"Icon color"},setting:{id:"iconColor"}},{label:{en:"Icon size"},setting:{id:"iconWidth"}}],moreSettings:{type:"collapse",controls:[{label:{en:"Position"},setting:{id:"position"}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"}}},{label:{en:"Background"},setting:{id:"backgroundColor"}},{label:{en:"Border"},setting:{id:"iconBorder"}},{label:{en:"Corner"},setting:{id:"iconRounded"}}]}},{label:{en:"Text"},controls:[{setting:{id:"textTypo"},layout:"vertical"}]},{label:{en:"Item spacing"},controls:[{label:{en:"Gap"},setting:{id:"verticalSpacing"}}]},{label:{en:"Item style"},controls:[{label:{en:"Icon & text gap"},setting:{id:"horizontalSpacing"}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical"}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Align"},setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];exports.SettingUIV2=SettingUIV2;
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Item management"},controls:[{label:{en:"Order"},setting:{id:"childItem"}}]},{label:{en:"Icon style"},controls:[{label:{en:"Icon type "},setting:{id:"iconType"}},{conditionDisplay:'iconType === "matching"',label:{en:"Icon"},setting:{id:"iconSvg"}},{conditionDisplay:'iconType === "different"',layout:"vertical",setting:{id:"childConfig"}},{label:{en:"Icon color"},setting:{id:"iconColor"}},{label:{en:"Icon size"},setting:{id:"iconWidth"}}],moreSettings:{type:"collapse",controls:[{label:{en:"Position"},setting:{id:"position"}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"}}},{label:{en:"Background"},setting:{id:"backgroundColor"}},{label:{en:"Border"},setting:{id:"iconBorder"}},{label:{en:"Corner"},setting:{id:"iconRounded"}}]}},{label:{en:"Text"},controls:[{setting:{id:"textTypo"},layout:"vertical"}]},{label:{en:"Item spacing"},controls:[{label:{en:"Gap"},setting:{id:"verticalSpacing"}}]},{label:{en:"Item style"},controls:[{label:{en:"Icon & text gap"},setting:{id:"horizontalSpacing"}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical"}]},{label:{en:"Size"},controls:[{label:{en:"Width"},setting:{id:"contentBoxWidth"},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentBoxPadding"},layout:"horizontal"},{label:{en:"Arrange"},setting:{id:"panelAlign"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Align"},setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},conditionEnable:'!contentBoxWidth?.includes("%") || (parseInt(contentBoxWidth) < 100 && contentBoxWidth?.includes("%"))'}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
let convertSpecialCharacter=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")
|
|
1
|
+
let convertSpecialCharacter=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),styleOverride=`
|
|
2
|
+
.gp-content-text-override.gp-p-description-text p,
|
|
3
|
+
.gp-content-text-override.gp-p-description-text div,
|
|
4
|
+
.gp-content-text-override.gp-p-description-text span,
|
|
5
|
+
.gp-content-text-override.gp-p-description-text h1,
|
|
6
|
+
.gp-content-text-override.gp-p-description-text h2,
|
|
7
|
+
.gp-content-text-override.gp-p-description-text h3,
|
|
8
|
+
.gp-content-text-override.gp-p-description-text h4,
|
|
9
|
+
.gp-content-text-override.gp-p-description-text h5,
|
|
10
|
+
.gp-content-text-override.gp-p-description-text h6,
|
|
11
|
+
.gp-content-text-override.gp-p-description-text * {
|
|
12
|
+
line-height: inherit !important;
|
|
13
|
+
}`;export{convertSpecialCharacter,styleOverride};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as t,jsxs as e,Fragment as p}from"react/jsx-runtime";import{useArticleStore as i,useCurrentDevice as o,useShopStore as
|
|
2
|
+
import{jsx as t,jsxs as e,Fragment as p}from"react/jsx-runtime";import{useArticleStore as i,useCurrentDevice as o,useShopStore as r,getResponsiveValueByScreen as n,composeTypographyClassName as c,composeTypographyStyle as a,isSafari as l,cls as s,getGlobalColorStateStyle as d,makeStyleResponsive as m,getStyleShadow as y,makeStyle as h}from"@gem-sdk/core";import{useState as g,useRef as x,useEffect as f}from"react";import u from"../../common/components/NoDataState.js";import{styleOverride as w}from"../common/helpers.js";let ArticleContent=({styles:v,builderProps:A})=>{let S=i(t=>t.article),[b,C]=g(!1),k=x(null),$=o(),_=r(t=>t.storefrontUrl),j=n(v?.hasLineClamp,$),I=n(v?.lineClamp,$),L=()=>{if(!_)return;let t=new URL(_);window.open(`${t.protocol}//${t.host}/admin/content/articles`)};f(()=>{C(!1)},[j,I,S?.description]);let N=c(v?.typo,v?.typography),T=a(v?.typo,v?.typography),D=`
|
|
3
3
|
.gp-p-description-text a:empty,
|
|
4
4
|
.gp-p-description-text ul:empty,
|
|
5
5
|
.gp-p-description-text dl:empty,
|
|
@@ -15,4 +15,5 @@ import{jsx as t,jsxs as e,Fragment as p}from"react/jsx-runtime";import{useArticl
|
|
|
15
15
|
.gp-p-description-text h6:empty {
|
|
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};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{composeTypographyClassName as t,composeTypographyStyle as e,makeStyleResponsive as
|
|
2
|
+
import{composeTypographyClassName as t,composeTypographyStyle as e,makeStyleResponsive as r,getGlobalColorStateStyle as a,makeStyle as s,makeLineClamp as o,getStyleShadow as p,template as i,cls as l,getGlobalColorStateClass as c,RenderIf as n,isLocalEnv as d,baseAssetURL as f}from"@gem-sdk/core";import{getSettingPreloadData as g}from"../../helpers.js";import{styleOverride as m}from"../common/helpers.js";let ArticleContent=({styles:w,builderProps:h})=>{let b=t(w?.typo,w?.typography),y=e(w?.typo,w?.typography),u={...r("ta",w?.textAlign),...a("c",w?.color),...s({tt:w?.transform}),...y},x={...u,...r("line-clamp",o(w?.lineClamp,w?.hasLineClamp)),...p({value:w?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:w?.typo?.custom?.hasShadowText})};return i`
|
|
3
3
|
<gp-article-content data-id="${h?.uid}" >
|
|
4
4
|
<div
|
|
5
|
-
class="${l("gp-relative gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",b,c("text",w?.color),"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white")}"
|
|
6
|
-
style="${
|
|
5
|
+
class="${l("gp-relative gp-p-description-text gp-content-text-override gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",b,c("text",w?.color),"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white")}"
|
|
6
|
+
style="${x}"
|
|
7
7
|
>
|
|
8
8
|
{{article.content}}
|
|
9
9
|
</div>
|
|
@@ -11,7 +11,8 @@ import{composeTypographyClassName as t,composeTypographyStyle as e,makeStyleResp
|
|
|
11
11
|
.gp-p-description-text * {
|
|
12
12
|
color: inherit
|
|
13
13
|
}
|
|
14
|
+
${m}
|
|
14
15
|
{% endstyle %}
|
|
15
16
|
</gp-article-content>
|
|
16
|
-
${d
|
|
17
|
+
${n(d,`<script ${g('class="gps-link" delay',"src")}="{{ 'gp-article-content.js' | asset_url }}" defer="defer"></script>`,`<script ${g('class="gps-link" delay',"src")}="${f}/assets-v2/gp-article-content.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
17
18
|
`};export{ArticleContent as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getStyleBackgroundByDevice as t,
|
|
1
|
+
import{getStyleBackgroundByDevice as t,makeStyleResponsive as e,getGradientBgrStyleByDevice as l,getResponsiveStylePadding as r,makeGlobalSize as o,makeStyle as b,getSingleColorVariable as i}from"@gem-sdk/core";let filterStyles=t=>{let e=["--mb","--mb-mobile","--mb-tablet"];return e.forEach(e=>{delete t?.[e]}),t},getStyleContainerIconlistMain=({styles:r,style:o,type:b})=>{let{background:i,align:n}=r??{};return{...o="react"===b?filterStyles(o):o,...t(i),...e("jc",n),...e("d",{desktop:"flex",tablet:"flex",mobile:"flex"}),...l(i,{desktop:!0,tablet:!0,mobile:!0})}},getStyleWraplistIcon=({styles:t})=>{let{panelAlign:l,contentBoxPadding:o,contentBoxWidth:b}=t??{};return{...r(o),...e("w",b),...e("jc",l)}},getStyleColListIcon=({styles:t})=>{let{verticalSpacing:l}=t??{};return{...e("rg",l)}},getStyleWrapItemIcon=({styles:t})=>{let{horizontalSpacing:l,position:r}=t??{};return{...e("cg",l),...e("ai",r)}},getStyleWrapIcon=({styles:t,setting:l})=>{let{iconBorder:r,backgroundColor:n,iconRounded:p}=t??{},{globalSize:a}=l??{},s=o(a);return{...s.padding,...b({bs:r?.border,bw:r?.width,bc:i(r?.color),bg:n,bblr:p?.bblr,bbrr:p?.bbrr,btlr:p?.btlr,btrr:p?.btrr}),...e("pos",{desktop:"relative",tablet:"relative",mobile:"relative"}),...e("top",{desktop:"inherit",tablet:"inherit",mobile:"inherit"})}},getStyleIcon=({styles:t,setting:e})=>{let{iconColor:l}=t||{},{iconWidth:r}=e??{};return{"--c":i(l),"--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:t})=>({typo:t?.textTypo});export{getStyleColListIcon,getStyleContainerIconlistMain,getStyleIcon,getStyleTypoText,getStyleWrapIcon,getStyleWrapItemIcon,getStyleWraplistIcon};
|
|
@@ -28,4 +28,4 @@ import{IconListSettings as e}from"./configs/settings.js";import{SettingUIV1 as t
|
|
|
28
28
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99997 1.26318C8.19029 1.26318 8.36411 1.37123 8.44834 1.5419L10.3585 5.41227L14.6297 6.03292C14.818 6.06028 14.9745 6.1922 15.0333 6.37321C15.0921 6.55422 15.0431 6.75292 14.9068 6.88576L11.8161 9.89843L12.5457 14.1524C12.5779 14.34 12.5008 14.5295 12.3468 14.6414C12.1928 14.7533 11.9887 14.768 11.8203 14.6795L7.99997 12.671L4.17969 14.6795C4.01123 14.768 3.8071 14.7533 3.65312 14.6414C3.49915 14.5295 3.42204 14.34 3.45421 14.1524L4.18382 9.89843L1.09315 6.88576C0.956861 6.75292 0.907813 6.55422 0.966625 6.37321C1.02544 6.1922 1.18191 6.06028 1.37025 6.03292L5.64146 5.41227L7.55161 1.5419C7.63584 1.37123 7.80965 1.26318 7.99997 1.26318ZM7.99997 2.89296L6.42186 6.09056C6.34903 6.23813 6.20825 6.34042 6.04539 6.36408L2.51663 6.87684L5.07007 9.36582C5.18791 9.48069 5.24169 9.64619 5.21387 9.80839L4.61108 13.3229L7.7673 11.6636C7.91297 11.587 8.08698 11.587 8.23264 11.6636L11.3889 13.3229L10.7861 9.80839C10.7583 9.64619 10.812 9.48069 10.9299 9.36582L13.4833 6.87684L9.95455 6.36408C9.7917 6.34042 9.65092 6.23813 9.57808 6.09056L7.99997 2.89296Z" fill="#F9F9F9"/>
|
|
29
29
|
<path d="M6.42186 6.09056L7.99997 2.89296L9.57808 6.09056C9.65092 6.23813 9.7917 6.34042 9.95455 6.36408L13.4833 6.87684L10.9299 9.36582C10.812 9.48069 10.7583 9.64619 10.7861 9.80839L11.3889 13.3229L8.23264 11.6636C8.08698 11.587 7.91297 11.587 7.7673 11.6636L4.61108 13.3229L5.21387 9.80839C5.24169 9.64619 5.18791 9.48069 5.07007 9.36582L2.51663 6.87684L6.04539 6.36408C6.20825 6.34042 6.34903 6.23813 6.42186 6.09056Z" fill="currentColor"/>
|
|
30
30
|
</svg>
|
|
31
|
-
`]},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}}]}],locales:{editor:{en:{icons_not_found:"Icons not found"}}},rootOverride:{styles:{align:{desktop:"center"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}}}};export{config as default};
|
|
31
|
+
`]},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}}}]}],locales:{editor:{en:{icons_not_found:"Icons not found"}}},rootOverride:{styles:{align:{desktop:"center"},contentBoxWidth:{desktop:"1200px"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}}}};export{config as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{itemControlTemplate as e}from"./items.js";let IconListSettings=[{id:"setting",controls:[{id:"childItem",label:"Item management",type:"child-item",default:["Icon 1","Icon 2"],childTemplate:e},{id:"translate",type:"input",default:"childItem"},{id:"textTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"iconSvg",type:"icon",label:"Icon Parent",hideInput:!0,info:"Choose from list or paste any SVG icon",default:'<svg data-name="check-circle-filled" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>'},{id:"iconWidth",type:"input:stepper",label:"Icon Width",devices:{desktop:{default:24}},min:0},{id:"childConfig",type:"child-icon",label:"",default:[,,,].fill('<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>')},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{padding:{type:"custom",top:"0px",bottom:"0px",left:"0px",right:"0px"}}}},hiddenShowMore:!0,hiddenSettings:["shape","width","height","gap"]},{id:"iconType",type:"layout-segment",iconViewBox:"0 0 66 48",enableItemBackground:!0,enableTooltip:!0,label:"Icon type",options:[{label:"Matching icons",value:"matching",type:"icon-type"},{label:"Different icons",value:"different",type:"icon-type"}],default:"matching"}]},{id:"style",controls:[{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"iconColor",type:"color-picker-v2",label:"Icon color",default:"text-1"},{id:"backgroundColor",type:"color-picker-v2",label:"Background color",default:"transparent",compoDefaultValue:"bg-1"},{id:"iconBorder",label:"Border",type:"border-v2",default:{},compoDefaultValue:{border:"solid",width:"1px 1px 1px 1px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"}},{id:"iconRounded",type:"corner-v2",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"horizontalSpacing",label:"Horizontal Spacing",type:"input:slider",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"position",type:"option:illustration",enableTooltip:!0,label:"Position",options:[{label:"Align center",value:"center",type:"align-pos",svgName:"gp-align-position-center"},{label:"Align top",value:"baseline",type:"align-pos",svgName:"gp-align-position-top"}],devices:{desktop:{default:"center"},tablet:{default:"center"},mobile:{default:"center"}}},{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:"verticalSpacing",type:"input:slider",label:"Item gap",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"12px"}}}]}];export{IconListSettings};
|
|
1
|
+
import{itemControlTemplate as e}from"./items.js";let IconListSettings=[{id:"setting",controls:[{id:"childItem",label:"Item management",type:"child-item",default:["Icon 1","Icon 2"],childTemplate:e},{id:"translate",type:"input",default:"childItem"},{id:"textTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"iconSvg",type:"icon",label:"Icon Parent",hideInput:!0,info:"Choose from list or paste any SVG icon",default:'<svg data-name="check-circle-filled" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>'},{id:"iconWidth",type:"input:stepper",label:"Icon Width",devices:{desktop:{default:24}},min:0},{id:"childConfig",type:"child-icon",label:"",default:[,,,].fill('<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>')},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{padding:{type:"custom",top:"0px",bottom:"0px",left:"0px",right:"0px"}}}},hiddenShowMore:!0,hiddenSettings:["shape","width","height","gap"]},{id:"iconType",type:"layout-segment",iconViewBox:"0 0 66 48",enableItemBackground:!0,enableTooltip:!0,label:"Icon type",options:[{label:"Matching icons",value:"matching",type:"icon-type"},{label:"Different icons",value:"different",type:"icon-type"}],default:"matching"}]},{id:"style",controls:[{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"iconColor",type:"color-picker-v2",label:"Icon color",default:"text-1"},{id:"backgroundColor",type:"color-picker-v2",label:"Background color",default:"transparent",compoDefaultValue:"bg-1"},{id:"iconBorder",label:"Border",type:"border-v2",default:{},compoDefaultValue:{border:"solid",width:"1px 1px 1px 1px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"}},{id:"iconRounded",type:"corner-v2",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"horizontalSpacing",label:"Horizontal Spacing",type:"input:slider",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"position",type:"option:illustration",enableTooltip:!0,label:"Position",options:[{label:"Align center",value:"center",type:"align-pos",svgName:"gp-align-position-center"},{label:"Align top",value:"baseline",type:"align-pos",svgName:"gp-align-position-top"}],devices:{desktop:{default:"center"},tablet:{default:"center"},mobile:{default:"center"}}},{id:"contentBoxWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"100%"}}},{id:"contentBoxPadding",label:"Padding",type:"padding-v2",devices:{desktop:{}},compoDefaultValue:{desktop:{default:{top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},{id:"panelAlign",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:"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:"verticalSpacing",type:"input:slider",label:"Item gap",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"12px"}}}]}];export{IconListSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Item management"},controls:[{label:{en:"Order"},setting:{id:"childItem"}}]},{label:{en:"Icon style"},controls:[{label:{en:"Icon type "},setting:{id:"iconType"}},{conditionDisplay:'iconType === "matching"',label:{en:"Icon"},setting:{id:"iconSvg"}},{conditionDisplay:'iconType === "different"',layout:"vertical",setting:{id:"childConfig"}},{label:{en:"Icon color"},setting:{id:"iconColor"}},{label:{en:"Icon size"},setting:{id:"iconWidth"}}],moreSettings:{type:"collapse",controls:[{label:{en:"Position"},setting:{id:"position"}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"}}},{label:{en:"Background"},setting:{id:"backgroundColor"}},{label:{en:"Border"},setting:{id:"iconBorder"}},{label:{en:"Corner"},setting:{id:"iconRounded"}}]}},{label:{en:"Text"},controls:[{setting:{id:"textTypo"},layout:"vertical"}]},{label:{en:"Item spacing"},controls:[{label:{en:"Gap"},setting:{id:"verticalSpacing"}}]},{label:{en:"Item style"},controls:[{label:{en:"Icon & text gap"},setting:{id:"horizontalSpacing"}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical"}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Align"},setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];export{SettingUIV2};
|
|
1
|
+
let SettingUIV2=[{label:{en:"Item management"},controls:[{label:{en:"Order"},setting:{id:"childItem"}}]},{label:{en:"Icon style"},controls:[{label:{en:"Icon type "},setting:{id:"iconType"}},{conditionDisplay:'iconType === "matching"',label:{en:"Icon"},setting:{id:"iconSvg"}},{conditionDisplay:'iconType === "different"',layout:"vertical",setting:{id:"childConfig"}},{label:{en:"Icon color"},setting:{id:"iconColor"}},{label:{en:"Icon size"},setting:{id:"iconWidth"}}],moreSettings:{type:"collapse",controls:[{label:{en:"Position"},setting:{id:"position"}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"}}},{label:{en:"Background"},setting:{id:"backgroundColor"}},{label:{en:"Border"},setting:{id:"iconBorder"}},{label:{en:"Corner"},setting:{id:"iconRounded"}}]}},{label:{en:"Text"},controls:[{setting:{id:"textTypo"},layout:"vertical"}]},{label:{en:"Item spacing"},controls:[{label:{en:"Gap"},setting:{id:"verticalSpacing"}}]},{label:{en:"Item style"},controls:[{label:{en:"Icon & text gap"},setting:{id:"horizontalSpacing"}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical"}]},{label:{en:"Size"},controls:[{label:{en:"Width"},setting:{id:"contentBoxWidth"},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentBoxPadding"},layout:"horizontal"},{label:{en:"Arrange"},setting:{id:"panelAlign"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Align"},setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},conditionEnable:'!contentBoxWidth?.includes("%") || (parseInt(contentBoxWidth) < 100 && contentBoxWidth?.includes("%"))'}]}];export{SettingUIV2};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1899,6 +1899,9 @@ type IconListStyleProps = {
|
|
|
1899
1899
|
iconBorder?: Border;
|
|
1900
1900
|
iconRounded?: CornerRadius;
|
|
1901
1901
|
background?: ObjectDevices<Background>;
|
|
1902
|
+
panelAlign?: ObjectDevices<AlignProp>;
|
|
1903
|
+
contentBoxWidth?: ObjectDevices<string | number>;
|
|
1904
|
+
contentBoxPadding?: ObjectDevices<PaddingType$1>;
|
|
1902
1905
|
};
|
|
1903
1906
|
type IconListProps = BasePropsWrap<IconListSettingProps, IconListStyleProps> & {
|
|
1904
1907
|
pageContext?: PageContext;
|