@gem-sdk/components 2.0.0-staging.933 → 2.0.0-staging.934
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},getArrowPositionStyle=({vertical:e,arrowType:t,gapToEachSize:o,left:l})=>{let i={};return core.DEVICES.forEach(r=>{let a=core.getResponsiveValueByScreen(e,r,!1),p="desktop"===r?"":`-${r}`;a?(i[`top${p}`]="inside"===t[r]&&l?o+"px":"initial",i[`left${p}`]=l?"initial":"",i[`bottom${p}`]="inside"!==t[r]||l?"initial":o+"px",i[`right${p}`]=l?"":"initial"):(l?(i[`left${p}`]="inside"===t[r]?o+"px":"3px",i[`right${p}`]="initial"):(i[`right${p}`]="inside"===t[r]?o+"px":"3px",i[`left${p}`]="initial"),i[`top${p}`]=l?"initial":"",i[`bottom${p}`]=l?"":"initial")}),i},getClassArrowRotate=(e,t)=>{let o={},l={vertical:{left:{desktop:"gp-rotate-[-90deg]",tablet:"tablet:gp-rotate-[-90deg]",mobile:"mobile:gp-rotate-[-90deg]"},right:{desktop:"gp-rotate-90",tablet:"tablet:gp-rotate-90",mobile:"mobile:gp-rotate-90"}},horizontal:{left:{desktop:"gp-rotate-180",tablet:"tablet:gp-rotate-180",mobile:"mobile:gp-rotate-180"},right:{desktop:"gp-rotate-0",tablet:"tablet:gp-rotate-0",mobile:"mobile:gp-rotate-0"}}};return core.DEVICES.forEach(i=>{let r=core.getResponsiveValueByScreen(t,i,!1),a=r?"vertical":"horizontal",p=e?"left":"right",g=l[a][p][i];o[g]=!0}),o},getClassArrowDisplay=(e,t)=>{let o={inside:{desktop:"!gp-flex !gp-absolute gp-z-2",tablet:"tablet:!gp-flex tablet:!gp-absolute tablet:gp-z-2",mobile:"mobile:!gp-flex mobile:!gp-absolute mobile:gp-z-2"},outside:{desktop:"!gp-flex !gp-relative",tablet:"tablet:!gp-flex tablet:!gp-relative",mobile:"mobile:!gp-flex mobile:!gp-relative"},none:{desktop:"!gp-hidden",tablet:"tablet:!gp-hidden",mobile:"mobile:!gp-hidden"},vertical:{desktop:"!gp-flex !gp-absolute gp-z-2",tablet:"tablet:!gp-flex tablet:!gp-absolute tablet:gp-z-2",mobile:"mobile:!gp-flex mobile:!gp-absolute mobile:gp-z-2"}},l={};return core.DEVICES.forEach(i=>{let r=core.getResponsiveValueByScreen(t,i,!1),a=e[i];a||(a="none"),r&&(a="vertical");let p=o[a][i];l[p]=!0}),l},getArrowDisplayStyle=e=>{let t={};return core.DEVICES.forEach(o=>{let l=core.getResponsiveValueByScreen(e,o,"none");t={...t,[o]:"none"===l?"none":"flex"}}),t},mappingNavigationCarousel=e=>{let t=e=>{let t={...e},o=core.DEVICES.filter(e=>!Object.keys(t).includes(e));return o.forEach(e=>{"tablet"===e&&(t[e]=t.desktop),"mobile"===e&&(t[e]=t.tablet)}),t};if(e?.layout==="vertical"){let{controlOverContent:o,arrow:l}=e,i=t(l),r=t(o),a={};return core.DEVICES.forEach(e=>{i[e]?i[e]&&r[e]?a[e]="inside":a[e]="outside":a[e]="none"}),{...e,navigationStyle:a}}return e},getData=e=>{let t=!!e.custom&&""!==e.custom;return{isRenderCustomIcon:t}};exports.getArrowDisplayStyle=getArrowDisplayStyle,exports.getArrowPositionStyle=getArrowPositionStyle,exports.getClassArrowDisplay=getClassArrowDisplay,exports.getClassArrowRotate=getClassArrowRotate,exports.getData=getData,exports.getResponsiveSetting=getResponsiveSetting,exports.mappingNavigationCarousel=mappingNavigationCarousel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),helpers=require("./helpers.js");const getClass=e=>{let l=["mobile","tablet","desktop"],{setting:t,builderProps:
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),helpers=require("./helpers.js");const getClass=e=>{let l=["mobile","tablet","desktop"],{setting:t,builderProps:o,wrapperClass:p,rootClass:r,advanced:a,fullHeight:s,slidesClass:i}=e,{sliderSelector:g}=helpers.getData(e),b=()=>{let e={flex:{desktop:"gp-flex",tablet:"tablet:gp-flex",mobile:"mobile:gp-flex"},block:{desktop:"gp-block",tablet:"tablet:gp-block",mobile:"mobile:gp-block"}},o={};return l.forEach(l=>{let p=t?.vertical?.[l]?"flex":"block",r=e[p][l];o[r]=!0}),o},c=()=>{let e={fullHeight:{desktop:"gp-h-full",tablet:"tablet:gp-h-full",mobile:"mobile:gp-h-full"},flex1:{desktop:"gp-flex-1",tablet:"tablet:gp-flex-1",mobile:"mobile:gp-flex-1"}},o={};return l.forEach(l=>{o[e.fullHeight[l]]=t?.vertical?.[l],o[e.flex1[l]]=t?.vertical?.[l]}),o},f=()=>{let e={flexCol:{desktop:"!gp-flex-col",tablet:"tablet:!gp-flex-col",mobile:"mobile:!gp-flex-col"},flexRow:{desktop:"!gp-flex-row",tablet:"tablet:!gp-flex-row",mobile:"mobile:!gp-flex-row"}},o={};return l.forEach(l=>{let p=t?.vertical?.[l]?"flexCol":"flexRow",r=e[p][l];o[r]=!0}),o},m=()=>{let e={wrap:{desktop:"!gp-flex-wrap",tablet:"tablet:!gp-flex-wrap",mobile:"mobile:!gp-flex-wrap"},nowrap:{desktop:"!gp-flex-nowrap",tablet:"tablet:!gp-flex-nowrap",mobile:"mobile:!gp-flex-nowrap"}},o={};return l.forEach(l=>{let p=t?.vertical?.[l]?"wrap":"nowrap",r=e[p][l];o[r]=!0}),o},n=()=>{let e={minHeightNone:{desktop:"!gp-min-h-0",tablet:"tablet:!gp-min-h-0",mobile:"mobile:!gp-min-h-0"},minHeightFull:{desktop:"!gp-min-h-full",tablet:"tablet:!gp-min-h-full",mobile:"mobile:!gp-min-h-full"}},o={};return l.forEach(l=>{let p=t?.vertical?.[l]?"minHeightNone":"minHeightFull",r=e[p][l];o[r]=!0}),o},x=system.createClass({...o?.uid&&{[o.uid]:!0},...p&&{[p]:!0},"gp-relative gp-my-0 tablet:gp-px-0 gp-max-w-full mobile:gp-px-0 gp-carousel-wrapper":!0,"!gp-flex":core.getResponsiveValueByScreen(t?.vertical,"desktop"),"tablet:!gp-flex":core.getResponsiveValueByScreen(t?.vertical,"tablet"),"mobile:!gp-flex":core.getResponsiveValueByScreen(t?.vertical,"mobile"),...b()}),u=system.createClass({"gp-relative gp-flex gp-items-center gp-justify-between":!0,"!gp-h-full":s,...c(),...f()}),h=system.createClass({"gp-group/carousel gp-w-full gp-flex":!0,"!gp-flex-col":core.getResponsiveValueByScreen(t?.vertical,"desktop"),"tablet:!flex-col":core.getResponsiveValueByScreen(t?.vertical,"tablet"),"mobile:!flex-col":core.getResponsiveValueByScreen(t?.vertical,"mobile"),...r&&{[r]:!0},...a?.cssClass&&{[a.cssClass]:!0}}),v=system.createClass({"gem-slider gp-h-full gp-overflow-hidden gp-select-none":!0,[g]:!0,...i&&{[i]:!0},...m(),...n()});return{rootClassRender:h,wrapperClassRender:x,wrapperInnerClass:u,sliderClass:v}};exports.getClass=getClass;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEVICES as t,getResponsiveValueByScreen as e}from"@gem-sdk/core";let getResponsiveSetting=t=>{let e=t.desktop,
|
|
1
|
+
import{DEVICES as t,getResponsiveValueByScreen as e}from"@gem-sdk/core";let getResponsiveSetting=t=>{let e=t.desktop,l=t.tablet?t.tablet:e,o=t.mobile?t.mobile:l;return{desktop:e,tablet:l,mobile:o}},getArrowPositionStyle=({vertical:l,arrowType:o,gapToEachSize:i,left:a})=>{let r={};return t.forEach(t=>{let p=e(l,t,!1),g="desktop"===t?"":`-${t}`;p?(r[`top${g}`]="inside"===o[t]&&a?i+"px":"initial",r[`left${g}`]=a?"initial":"",r[`bottom${g}`]="inside"!==o[t]||a?"initial":i+"px",r[`right${g}`]=a?"":"initial"):(a?(r[`left${g}`]="inside"===o[t]?i+"px":"3px",r[`right${g}`]="initial"):(r[`right${g}`]="inside"===o[t]?i+"px":"3px",r[`left${g}`]="initial"),r[`top${g}`]=a?"initial":"",r[`bottom${g}`]=a?"":"initial")}),r},getClassArrowRotate=(l,o)=>{let i={},a={vertical:{left:{desktop:"gp-rotate-[-90deg]",tablet:"tablet:gp-rotate-[-90deg]",mobile:"mobile:gp-rotate-[-90deg]"},right:{desktop:"gp-rotate-90",tablet:"tablet:gp-rotate-90",mobile:"mobile:gp-rotate-90"}},horizontal:{left:{desktop:"gp-rotate-180",tablet:"tablet:gp-rotate-180",mobile:"mobile:gp-rotate-180"},right:{desktop:"gp-rotate-0",tablet:"tablet:gp-rotate-0",mobile:"mobile:gp-rotate-0"}}};return t.forEach(t=>{let r=e(o,t,!1),p=r?"vertical":"horizontal",g=l?"left":"right",b=a[p][g][t];i[b]=!0}),i},getClassArrowDisplay=(l,o)=>{let i={inside:{desktop:"!gp-flex !gp-absolute gp-z-2",tablet:"tablet:!gp-flex tablet:!gp-absolute tablet:gp-z-2",mobile:"mobile:!gp-flex mobile:!gp-absolute mobile:gp-z-2"},outside:{desktop:"!gp-flex !gp-relative",tablet:"tablet:!gp-flex tablet:!gp-relative",mobile:"mobile:!gp-flex mobile:!gp-relative"},none:{desktop:"!gp-hidden",tablet:"tablet:!gp-hidden",mobile:"mobile:!gp-hidden"},vertical:{desktop:"!gp-flex !gp-absolute gp-z-2",tablet:"tablet:!gp-flex tablet:!gp-absolute tablet:gp-z-2",mobile:"mobile:!gp-flex mobile:!gp-absolute mobile:gp-z-2"}},a={};return t.forEach(t=>{let r=e(o,t,!1),p=l[t];p||(p="none"),r&&(p="vertical");let g=i[p][t];a[g]=!0}),a},getArrowDisplayStyle=l=>{let o={};return t.forEach(t=>{let i=e(l,t,"none");o={...o,[t]:"none"===i?"none":"flex"}}),o},mappingNavigationCarousel=e=>{let l=e=>{let l={...e},o=t.filter(t=>!Object.keys(l).includes(t));return o.forEach(t=>{"tablet"===t&&(l[t]=l.desktop),"mobile"===t&&(l[t]=l.tablet)}),l};if(e?.layout==="vertical"){let{controlOverContent:o,arrow:i}=e,a=l(i),r=l(o),p={};return t.forEach(t=>{a[t]?a[t]&&r[t]?p[t]="inside":p[t]="outside":p[t]="none"}),{...e,navigationStyle:p}}return e},getData=t=>{let e=!!t.custom&&""!==t.custom;return{isRenderCustomIcon:e}};export{getArrowDisplayStyle,getArrowPositionStyle,getClassArrowDisplay,getClassArrowRotate,getData,getResponsiveSetting,mappingNavigationCarousel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getResponsiveValueByScreen as e}from"@gem-sdk/core";import{createClass as l}from"@gem-sdk/system";import{getData as t}from"./helpers.js";let getClass=
|
|
1
|
+
import{getResponsiveValueByScreen as e}from"@gem-sdk/core";import{createClass as l}from"@gem-sdk/system";import{getData as t}from"./helpers.js";let getClass=p=>{let o=["mobile","tablet","desktop"],{setting:i,builderProps:a,wrapperClass:g,rootClass:r,advanced:b,fullHeight:f,slidesClass:m}=p,{sliderSelector:x}=t(p),s=()=>{let e={flex:{desktop:"gp-flex",tablet:"tablet:gp-flex",mobile:"mobile:gp-flex"},block:{desktop:"gp-block",tablet:"tablet:gp-block",mobile:"mobile:gp-block"}},l={};return o.forEach(t=>{let p=i?.vertical?.[t]?"flex":"block",o=e[p][t];l[o]=!0}),l},c=()=>{let e={fullHeight:{desktop:"gp-h-full",tablet:"tablet:gp-h-full",mobile:"mobile:gp-h-full"},flex1:{desktop:"gp-flex-1",tablet:"tablet:gp-flex-1",mobile:"mobile:gp-flex-1"}},l={};return o.forEach(t=>{l[e.fullHeight[t]]=i?.vertical?.[t],l[e.flex1[t]]=i?.vertical?.[t]}),l},n=()=>{let e={flexCol:{desktop:"!gp-flex-col",tablet:"tablet:!gp-flex-col",mobile:"mobile:!gp-flex-col"},flexRow:{desktop:"!gp-flex-row",tablet:"tablet:!gp-flex-row",mobile:"mobile:!gp-flex-row"}},l={};return o.forEach(t=>{let p=i?.vertical?.[t]?"flexCol":"flexRow",o=e[p][t];l[o]=!0}),l},u=()=>{let e={wrap:{desktop:"!gp-flex-wrap",tablet:"tablet:!gp-flex-wrap",mobile:"mobile:!gp-flex-wrap"},nowrap:{desktop:"!gp-flex-nowrap",tablet:"tablet:!gp-flex-nowrap",mobile:"mobile:!gp-flex-nowrap"}},l={};return o.forEach(t=>{let p=i?.vertical?.[t]?"wrap":"nowrap",o=e[p][t];l[o]=!0}),l},h=()=>{let e={minHeightNone:{desktop:"!gp-min-h-0",tablet:"tablet:!gp-min-h-0",mobile:"mobile:!gp-min-h-0"},minHeightFull:{desktop:"!gp-min-h-full",tablet:"tablet:!gp-min-h-full",mobile:"mobile:!gp-min-h-full"}},l={};return o.forEach(t=>{let p=i?.vertical?.[t]?"minHeightNone":"minHeightFull",o=e[p][t];l[o]=!0}),l},d=l({...a?.uid&&{[a.uid]:!0},...g&&{[g]:!0},"gp-relative gp-my-0 tablet:gp-px-0 gp-max-w-full mobile:gp-px-0 gp-carousel-wrapper":!0,"!gp-flex":e(i?.vertical,"desktop"),"tablet:!gp-flex":e(i?.vertical,"tablet"),"mobile:!gp-flex":e(i?.vertical,"mobile"),...s()}),k=l({"gp-relative gp-flex gp-items-center gp-justify-between":!0,"!gp-h-full":f,...c(),...n()}),w=l({"gp-group/carousel gp-w-full gp-flex":!0,"!gp-flex-col":e(i?.vertical,"desktop"),"tablet:!flex-col":e(i?.vertical,"tablet"),"mobile:!flex-col":e(i?.vertical,"mobile"),...r&&{[r]:!0},...b?.cssClass&&{[b.cssClass]:!0}}),v=l({"gem-slider gp-h-full gp-overflow-hidden gp-select-none":!0,[x]:!0,...m&&{[m]:!0},...u(),...h()});return{rootClassRender:w,wrapperClassRender:d,wrapperInnerClass:k,sliderClass:v}};export{getClass};
|