@gem-sdk/components 17.0.0-dev.86 → 17.0.0-dev.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";var e=require("@gem-sdk/core"),t=require("@gem-sdk/system"),
|
|
2
|
+
"use strict";var e=require("@gem-sdk/core"),t=require("@gem-sdk/system"),r=require("./helpers.js"),o=require("../../../../post-purchase/common/helper.js");exports.getRowStyle=({rowProps:i,isPostPurchase:s,type:l="React",translatedBackground:a})=>{let{children:p,setting:n,builderProps:d,styles:m,style:c,advanced:y,isNotFullWidth:u,parentStyle:b}=i,{isSection:g,layout:k,horizontalAlign:v,responsive:S,inlineAlignment:h}=n??{},{width:R,columnGap:f,rowGap:x,background:B,verticalGutter:w,verticalGutterMobile:q,enablePagePadding:D,height:j}=m??{},V=r.getInnerRadiusExcludeBorder(y?.border,y?.rounded),L=(e,t)=>{let r=e?.normal,o=t?.normal;if(!r||!o||o?.borderType=="none"||"square"===r.radiusType||"none"===r.radiusType)return!1;for(let e in r)if(Object.hasOwn(r,e)&&"0px"!==r[e])return!0;return!1},O=e.makeStyleResponsive("of",{desktop:L(V.desktop,e.getValueByDevice(y?.border,"desktop"))?"hidden":void 0,tablet:L(V.tablet,e.getValueByDevice(y?.border,"tablet"))?"hidden":void 0,mobile:L(V.mobile,e.getValueByDevice(y?.border,"mobile"))?"hidden":void 0}),T=d?.builderData?.childrens?.length,C={...e.makeStyleResponsive("aspect",{desktop:"16/9"})},E=e.isEmptyChildren(p)||!T,G={desktop:R?.desktop==="default"?"1200px":R?.desktop,tablet:R?.tablet==="default"?"1200px":R?.tablet,mobile:R?.mobile==="default"?"1200px":R?.mobile},z=r.createStyleObject(s?G:R),[H,I]=e.splitStyle(["pos","top","left","bottom","right","z"],c),P=()=>({...g?I:c,...e.makeStyleResponsive("cg",w),...e.makeStyleResponsive("rg",q),...k?e.composeGridLayout(k):e.makeStyleResponsive("gtc",S),...e.makeStyleResponsive("w",z.content),...e.makeStyleResponsive("h",j),...g?{}:O}),Y=()=>({"--mb":"0px","--mt":"0px",...e.makeStyleResponsive("cg",f),...e.makeStyle({pc:h,rg:x?o.postPurchaseViewSpacing[x]:"0px"})}),A=t=>{let r=B;return"Liquid"===l&&(r=a),{...e.getStyleBackgroundByDevice(r,t),...e.getGradientBgrStyleByDevice(r,{desktop:!0,tablet:!0,mobile:!0}),...e.makeStyleResponsive("pc",v)}},F=()=>u&&!E?{marginLeft:"0px",marginRight:"0px"}:{},J=t.createStyle({...{...e.composeRadius(V)}}),K=t.createStyle({...C,"pointer-events":"none",transform:"translateY(-50%)",height:"100%","object-fit":"cover",top:"50%"}),M=e=>{if(void 0!==e)return e?"var(--g-ct-p, 15px)":"none"},N={desktop:M(D?.desktop),tablet:M(D?.tablet),mobile:M(D?.mobile)},Q=t.createStyle({...H,...e.makeStyleResponsive("w",z.wrapper),...e.makeStyleResponsive("pl",N),...e.makeStyleResponsive("pr",N)});return{embedVideoStyle:K,backgroundBoxStyle:J,rowStyle:(e=!1)=>t.createStyle({...P(),...A(),...F(),...e?Y():{},...n?.sameHeightSubgridContainer&&b}),sectionStyle:Q}};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{makeStyleResponsive as e,getValueByDevice as t,isEmptyChildren as o,splitStyle as r,composeRadius as
|
|
2
|
+
import{makeStyleResponsive as e,getValueByDevice as t,isEmptyChildren as o,splitStyle as r,composeRadius as p,makeStyle as i,getGradientBgrStyleByDevice as d,getStyleBackgroundByDevice as l,composeGridLayout as n}from"@gem-sdk/core";import{createStyle as a}from"@gem-sdk/system";import{getInnerRadiusExcludeBorder as m,createStyleObject as s}from"./helpers.js";import{postPurchaseViewSpacing as b}from"../../../../post-purchase/common/helper.js";let g=({rowProps:g,isPostPurchase:u,type:c="React",translatedBackground:f})=>{let{children:h,setting:k,builderProps:x,styles:v,style:w,advanced:y,isNotFullWidth:j,parentStyle:R}=g,{isSection:S,layout:T,horizontalAlign:q,responsive:L,inlineAlignment:O}=k??{},{width:z,columnGap:C,rowGap:D,background:H,verticalGutter:Y,verticalGutterMobile:A,enablePagePadding:B,height:E}=v??{},F=m(y?.border,y?.rounded),G=(e,t)=>{let o=e?.normal,r=t?.normal;if(!o||!r||r?.borderType=="none"||"square"===o.radiusType||"none"===o.radiusType)return!1;for(let e in o)if(Object.hasOwn(o,e)&&"0px"!==o[e])return!0;return!1},I=e("of",{desktop:G(F.desktop,t(y?.border,"desktop"))?"hidden":void 0,tablet:G(F.tablet,t(y?.border,"tablet"))?"hidden":void 0,mobile:G(F.mobile,t(y?.border,"mobile"))?"hidden":void 0}),J=x?.builderData?.childrens?.length,K={...e("aspect",{desktop:"16/9"})},M=o(h)||!J,N={desktop:z?.desktop==="default"?"1200px":z?.desktop,tablet:z?.tablet==="default"?"1200px":z?.tablet,mobile:z?.mobile==="default"?"1200px":z?.mobile},P=s(u?N:z),[Q,U]=r(["pos","top","left","bottom","right","z"],w),V=()=>({...S?U:w,...e("cg",Y),...e("rg",A),...T?n(T):e("gtc",L),...e("w",P.content),...e("h",E),...S?{}:I}),W=()=>({"--mb":"0px","--mt":"0px",...e("cg",C),...i({pc:O,rg:D?b[D]:"0px"})}),X=t=>{let o=H;return"Liquid"===c&&(o=f),{...l(o,t),...d(o,{desktop:!0,tablet:!0,mobile:!0}),...e("pc",q)}},Z=()=>j&&!M?{marginLeft:"0px",marginRight:"0px"}:{},$=a({...{...p(F)}}),_=a({...K,"pointer-events":"none",transform:"translateY(-50%)",height:"100%","object-fit":"cover",top:"50%"}),ee=e=>{if(void 0!==e)return e?"var(--g-ct-p, 15px)":"none"},et={desktop:ee(B?.desktop),tablet:ee(B?.tablet),mobile:ee(B?.mobile)},eo=a({...Q,...e("w",P.wrapper),...e("pl",et),...e("pr",et)});return{embedVideoStyle:_,backgroundBoxStyle:$,rowStyle:(e=!1)=>a({...V(),...X(),...Z(),...e?W():{},...k?.sameHeightSubgridContainer&&R}),sectionStyle:eo}};export{g as getRowStyle};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "17.0.0-dev.
|
|
3
|
+
"version": "17.0.0-dev.91",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"i18n:extract": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/translate/extract-texts-to-locales.js && node ./scripts/translate/en-keys-usage.js"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "17.0.0-dev.
|
|
30
|
-
"@gem-sdk/styles": "17.0.0-dev.
|
|
29
|
+
"@gem-sdk/core": "17.0.0-dev.90",
|
|
30
|
+
"@gem-sdk/styles": "17.0.0-dev.89",
|
|
31
31
|
"@gem-sdk/system": "17.0.0-dev.84",
|
|
32
32
|
"@types/react-transition-group": "^4.4.12",
|
|
33
33
|
"postcss-import": "16.1.1",
|