@gem-sdk/components 2.0.0-staging.976 → 2.0.0-staging.977
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"),helpers=require("./helpers.js");const getProgressBarStyles=(e,t)=>{let r;let{progressBarHeight:o,color:s}=e??{},{remainingPercentage:l}=t??{};return o&&(r=Object.fromEntries(Object.entries(o).map(([e,t])=>[e,Number((t+"").replace("px",""))]))),{...core.makeStyleResponsive("h",core.makeWidth(r),"px"),...core.makeStyle({bg:"linear-gradient(90deg, #eee 50%, transparent 50%)",bgc:core.getSingleColorVariable(s),bgp:`${l}% center`})}},getContainerStyles=e=>{let{width:t,textColor:r}=e??{};return{...core.makeStyleResponsive("w",core.makeWidth(t)),...core.makeStyle({c:core.getSingleColorVariable(r)})}},getWrapperStyles=e=>{let{alignment:t}=e??{};return{...core.makeStyleResponsive("jc",t)}},getIconStyles=(e,t,r)=>{let{iconColor:o,oosIconColor:s}=e??{};return{...core.makeStyle({c:core.getSingleColorVariable(r?s:o)}),...getIconSize(e,t)}},getTextStyles=(e,t)=>{let{typo:r,oosTextColor:o}=e??{},s={...r,attrs:{...r?.attrs,color:t?o:r?.attrs?.color}},l=core.composeTypographyStyle(s,e?.typography);return{...l,...core.getStyleShadow({value:r?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:r?.custom?.hasShadowText})}};function getIconSize(e,t){let{typo:r}=e??{},{iconSize:o}=t??{};if(o?.desktop)return{...core.makeStyleResponsive("w",core.makeWidth(o),"px")};let s=r&&!r.custom?core.genVariable(core.getShortName(`typography-${r.type}-fontSize`)):void 0,l=r&&r.custom?helpers.convertSizeToWidth(core.composeTypographyV2(r.custom)):{};return s?core.makeStyle({w:s}):l}exports.getContainerStyles=getContainerStyles,exports.getIconStyles=getIconStyles,exports.getProgressBarStyles=getProgressBarStyles,exports.getTextStyles=getTextStyles,exports.getWrapperStyles=getWrapperStyles;
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");const getProgressBarStyles=(e,t)=>{let r;let{progressBarHeight:o,color:s}=e??{},{remainingPercentage:l}=t??{};return o&&(r=Object.fromEntries(Object.entries(o).map(([e,t])=>[e,Number((t+"").replace("px",""))]))),{...core.makeStyleResponsive("h",core.makeWidth(r),"px"),...core.makeStyle({bg:"linear-gradient(90deg, #eee 50%, transparent 50%)",bgc:core.getSingleColorVariable(s),bgp:`${parseInt(String(l||0))}% center`})}},getContainerStyles=e=>{let{width:t,textColor:r}=e??{};return{...core.makeStyleResponsive("w",core.makeWidth(t)),...core.makeStyle({c:core.getSingleColorVariable(r)})}},getWrapperStyles=e=>{let{alignment:t}=e??{};return{...core.makeStyleResponsive("jc",t)}},getIconStyles=(e,t,r)=>{let{iconColor:o,oosIconColor:s}=e??{};return{...core.makeStyle({c:core.getSingleColorVariable(r?s:o)}),...getIconSize(e,t)}},getTextStyles=(e,t)=>{let{typo:r,oosTextColor:o}=e??{},s={...r,attrs:{...r?.attrs,color:t?o:r?.attrs?.color}},l=core.composeTypographyStyle(s,e?.typography);return{...l,...core.getStyleShadow({value:r?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:r?.custom?.hasShadowText})}};function getIconSize(e,t){let{typo:r}=e??{},{iconSize:o}=t??{};if(o?.desktop)return{...core.makeStyleResponsive("w",core.makeWidth(o),"px")};let s=r&&!r.custom?core.genVariable(core.getShortName(`typography-${r.type}-fontSize`)):void 0,l=r&&r.custom?helpers.convertSizeToWidth(core.composeTypographyV2(r.custom)):{};return s?core.makeStyle({w:s}):l}exports.getContainerStyles=getContainerStyles,exports.getIconStyles=getIconStyles,exports.getProgressBarStyles=getProgressBarStyles,exports.getTextStyles=getTextStyles,exports.getWrapperStyles=getWrapperStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,makeWidth as t,makeStyle as r,getSingleColorVariable as o,composeTypographyStyle as s,getStyleShadow as l,genVariable as n,getShortName as a,composeTypographyV2 as p}from"@gem-sdk/core";import{convertSizeToWidth as g}from"./helpers.js";let getProgressBarStyles=(s,l)=>{let n;let{progressBarHeight:a,color:p}=s??{},{remainingPercentage:g}=l??{};return a&&(n=Object.fromEntries(Object.entries(a).map(([e,t])=>[e,Number((t+"").replace("px",""))]))),{...e("h",t(n),"px"),...r({bg:"linear-gradient(90deg, #eee 50%, transparent 50%)",bgc:o(p),bgp:`${g}% center`})}},getContainerStyles=s=>{let{width:l,textColor:n}=s??{};return{...e("w",t(l)),...r({c:o(n)})}},getWrapperStyles=t=>{let{alignment:r}=t??{};return{...e("jc",r)}},getIconStyles=(e,t,s)=>{let{iconColor:l,oosIconColor:n}=e??{};return{...r({c:o(s?n:l)}),...getIconSize(e,t)}},getTextStyles=(e,t)=>{let{typo:r,oosTextColor:o}=e??{},n={...r,attrs:{...r?.attrs,color:t?o:r?.attrs?.color}},a=s(n,e?.typography);return{...a,...l({value:r?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:r?.custom?.hasShadowText})}};function getIconSize(o,s){let{typo:l}=o??{},{iconSize:c}=s??{};if(c?.desktop)return{...e("w",t(c),"px")};let i=l&&!l.custom?n(a(`typography-${l.type}-fontSize`)):void 0,
|
|
1
|
+
import{makeStyleResponsive as e,makeWidth as t,makeStyle as r,getSingleColorVariable as o,composeTypographyStyle as s,getStyleShadow as l,genVariable as n,getShortName as a,composeTypographyV2 as p}from"@gem-sdk/core";import{convertSizeToWidth as g}from"./helpers.js";let getProgressBarStyles=(s,l)=>{let n;let{progressBarHeight:a,color:p}=s??{},{remainingPercentage:g}=l??{};return a&&(n=Object.fromEntries(Object.entries(a).map(([e,t])=>[e,Number((t+"").replace("px",""))]))),{...e("h",t(n),"px"),...r({bg:"linear-gradient(90deg, #eee 50%, transparent 50%)",bgc:o(p),bgp:`${parseInt(String(g||0))}% center`})}},getContainerStyles=s=>{let{width:l,textColor:n}=s??{};return{...e("w",t(l)),...r({c:o(n)})}},getWrapperStyles=t=>{let{alignment:r}=t??{};return{...e("jc",r)}},getIconStyles=(e,t,s)=>{let{iconColor:l,oosIconColor:n}=e??{};return{...r({c:o(s?n:l)}),...getIconSize(e,t)}},getTextStyles=(e,t)=>{let{typo:r,oosTextColor:o}=e??{},n={...r,attrs:{...r?.attrs,color:t?o:r?.attrs?.color}},a=s(n,e?.typography);return{...a,...l({value:r?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:r?.custom?.hasShadowText})}};function getIconSize(o,s){let{typo:l}=o??{},{iconSize:c}=s??{};if(c?.desktop)return{...e("w",t(c),"px")};let i=l&&!l.custom?n(a(`typography-${l.type}-fontSize`)):void 0,S=l&&l.custom?g(p(l.custom)):{};return i?r({w:i}):S}export{getContainerStyles,getIconStyles,getProgressBarStyles,getTextStyles,getWrapperStyles};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -660,7 +660,7 @@ type HeroBannerStyleProps = {
|
|
|
660
660
|
height?: ObjectDevices<string>;
|
|
661
661
|
overlayEnable?: boolean;
|
|
662
662
|
overlayColor?: StateProp<ColorValueType>;
|
|
663
|
-
overlayOpacity?: StateProp<string>;
|
|
663
|
+
overlayOpacity?: StateProp<string | number>;
|
|
664
664
|
contentPosition1Col?: ObjectDevices<'center' | 'top' | 'bottom' | 'space-between'>;
|
|
665
665
|
contentPosition2Col?: ObjectDevices<'center' | 'top' | 'bottom' | 'space-between'>;
|
|
666
666
|
container?: boolean;
|
|
@@ -1524,7 +1524,7 @@ type FormEmailProps = BasePropsWrap<FormEmailSettingProps, FormEmailStyleProps,
|
|
|
1524
1524
|
type NewsLetterSettingProps = {
|
|
1525
1525
|
afterSubmitAction?: 'stay-on-page' | 'open-url';
|
|
1526
1526
|
callbackURL?: {
|
|
1527
|
-
type
|
|
1527
|
+
type?: string;
|
|
1528
1528
|
link?: string;
|
|
1529
1529
|
target?: string;
|
|
1530
1530
|
};
|
|
@@ -5505,7 +5505,7 @@ declare const thirdPartyInstantSetting: {
|
|
|
5505
5505
|
type StockCounterSettingProps = {
|
|
5506
5506
|
displayByDefault?: boolean;
|
|
5507
5507
|
scarcityThreshold?: number;
|
|
5508
|
-
remainingPercentage?: number;
|
|
5508
|
+
remainingPercentage?: number | string;
|
|
5509
5509
|
showIcon?: boolean;
|
|
5510
5510
|
hiddenCounterWhenOutOfStock?: boolean;
|
|
5511
5511
|
icon?: string;
|