@gem-sdk/components 2.0.0-staging.1049 → 2.0.0-staging.1050

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");function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}const getStyle=(e,t,r)=>{let{sizeSetting:l,background:o}=e??{},{ratioOptions:i,aspectRatio:a}=t??{},s={...r,...helpers.getVisibilityStyle(r),...core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(l,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...helpers.getStyleAspectRatioHeroBannerCustom(o,l,helpers.getAspectRatioSettings(i,a)),...core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(l))};return filterTruthyStyles(s)},getContainerStyle=(e,t)=>{let{sizeSetting:r,background:l,borderBg:o,cornerBg:i,shadowBg:a,hasActiveShadow:s}=e??{},{ratioOptions:y,aspectRatio:g}=t??{},S={...helpers.getStyleAspectRatioHeroBannerCustom(l,r,helpers.getAspectRatioSettings(y,g)),...core.makeStyle({bs:o?.border??o?.border,bw:o?.width??o?.width,bc:core.getSingleColorVariable(o?.color)}),...core.getRadiusStyleActiveState({...i,active:{...i||{},radiusType:"custom"}}),...core.getStyleShadow({value:a,styleAppliedFor:"box-shadow",isEnableShadow:s})};return filterTruthyStyles(S)},getOverlayStyle=e=>{let{overlayColor:t,overlayOpacity:r}=e??{},l=core.getGlobalColorStateStyle("bgc",t),o=core.makeStyleState("op",r),{disableOpacity:i,disableHoverOpacity:a}=helpers.opacityEnabledData(e);i&&(delete l?.["--bgc"],delete o?.["--op"]),a&&(delete l?.["--hvr-bgc"],delete o?.["--hvr-op"]);let s={...l,...o,"--top":"0","--left":"0"};return filterTruthyStyles(s)},getRowStyle=e=>{let{contentPadding:t}=e??{},r={...core.getResponsiveStylePadding(t)};return filterTruthyStyles(r)},getAdaptiveStyle=e=>{let{sizeSetting:t,background:r}=e??{},l={...helpers.getDisplayStyleByFitContent(t,r),...core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(t)),...core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(t,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),"--op":0,"--z":-1};return filterTruthyStyles(l)},getBackgroundStyle=(e,t,r)=>{let{hoverEffectScale:l,background:o,hoverEffectDuration:i}=e??{},a={...helpers.getStyleHeroBannerBg(helpers.getResponsiveSetting(o||{}),t),...core.getStyleBackgroundByDevice(o,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":`${i??0}s`,"--scale":helpers.formatHoverScale(l),...core.makeStyleResponsive("pos",helpers.getAttachmentDevice(o)),transform:r,transition:"transform 300ms cubic-bezier(0,0,0,1)"};return filterTruthyStyles(a)},getContainBackgroundStyle=e=>{let{borderBg:t,cornerBg:r}=e??{},l={"clip-path":helpers.getClipPath(t?.width,r)};return filterTruthyStyles(l)},getHtml5VideoStyle=e=>{let t={...core.makeStyleResponsive("aspect",e)};return filterTruthyStyles(t)},getYoutubeIframeStyle=e=>{let t={...core.makeStyleResponsive("aspect",e),"pointer-event":"none"};return filterTruthyStyles(t)};exports.getAdaptiveStyle=getAdaptiveStyle,exports.getBackgroundStyle=getBackgroundStyle,exports.getContainBackgroundStyle=getContainBackgroundStyle,exports.getContainerStyle=getContainerStyle,exports.getHtml5VideoStyle=getHtml5VideoStyle,exports.getOverlayStyle=getOverlayStyle,exports.getRowStyle=getRowStyle,exports.getStyle=getStyle,exports.getYoutubeIframeStyle=getYoutubeIframeStyle;
1
+ "use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}const getStyle=(e,t,r)=>{let{sizeSetting:l,background:o}=e??{},{ratioOptions:i,aspectRatio:a}=t??{},s={...r,...helpers.getVisibilityStyle(r),...core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(l,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...helpers.getStyleAspectRatioHeroBannerCustom(o,l,helpers.getAspectRatioSettings(i,a)),...core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(l))};return filterTruthyStyles(s)},getContainerStyle=(e,t)=>{let{sizeSetting:r,background:l,borderBg:o,cornerBg:i,shadowBg:a,hasActiveShadow:s}=e??{},{ratioOptions:y,aspectRatio:g}=t??{},S={...helpers.getStyleAspectRatioHeroBannerCustom(l,r,helpers.getAspectRatioSettings(y,g)),...core.makeStyle({bs:o?.border??o?.border,bw:o?.width??o?.width,bc:core.getSingleColorVariable(o?.color)}),...core.getRadiusStyleActiveState({...i,active:{...i||{},radiusType:"custom"}}),...l?{...core.getStyleBgColor(l)}:{},...core.getStyleShadow({value:a,styleAppliedFor:"box-shadow",isEnableShadow:s})};return filterTruthyStyles(S)},getOverlayStyle=e=>{let{overlayColor:t,overlayOpacity:r}=e??{},l=core.getGlobalColorStateStyle("bgc",t),o=core.makeStyleState("op",r),{disableOpacity:i,disableHoverOpacity:a}=helpers.opacityEnabledData(e);i&&(delete l?.["--bgc"],delete o?.["--op"]),a&&(delete l?.["--hvr-bgc"],delete o?.["--hvr-op"]);let s={...l,...o,"--top":"0","--left":"0"};return filterTruthyStyles(s)},getRowStyle=e=>{let{contentPadding:t}=e??{},r={...core.getResponsiveStylePadding(t)};return filterTruthyStyles(r)},getAdaptiveStyle=e=>{let{sizeSetting:t,background:r}=e??{},l={...helpers.getDisplayStyleByFitContent(t,r),...core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(t)),...core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(t,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),"--op":0,"--z":-1};return filterTruthyStyles(l)},getBackgroundStyle=(e,t,r)=>{let{hoverEffectScale:l,background:o,hoverEffectDuration:i}=e??{},a={...helpers.getStyleHeroBannerBg(helpers.getResponsiveSetting(o||{}),t),...core.getStyleBackgroundByDevice(o,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":`${i??0}s`,"--scale":helpers.formatHoverScale(l),...core.makeStyleResponsive("pos",helpers.getAttachmentDevice(o)),transform:r,transition:"transform 300ms cubic-bezier(0,0,0,1)"};return filterTruthyStyles(a)},getContainBackgroundStyle=e=>{let{borderBg:t,cornerBg:r}=e??{},l={"clip-path":helpers.getClipPath(t?.width,r)};return filterTruthyStyles(l)},getHtml5VideoStyle=e=>{let t={...core.makeStyleResponsive("aspect",e)};return filterTruthyStyles(t)},getYoutubeIframeStyle=e=>{let t={...core.makeStyleResponsive("aspect",e),"pointer-event":"none"};return filterTruthyStyles(t)};exports.getAdaptiveStyle=getAdaptiveStyle,exports.getBackgroundStyle=getBackgroundStyle,exports.getContainBackgroundStyle=getContainBackgroundStyle,exports.getContainerStyle=getContainerStyle,exports.getHtml5VideoStyle=getHtml5VideoStyle,exports.getOverlayStyle=getOverlayStyle,exports.getRowStyle=getRowStyle,exports.getStyle=getStyle,exports.getYoutubeIframeStyle=getYoutubeIframeStyle;
@@ -3,7 +3,7 @@
3
3
  assign current_variant = product.selected_or_first_available_variant
4
4
  assign available = current_variant.available | default: false
5
5
  -%}
6
- <gp-product-quantity-
6
+ <gp-product-quantity
7
7
  ${{...h}}
8
8
  data-price="${n}"
9
9
  class="${q}"
@@ -1 +1 @@
1
- import{makeStyleWithDefault as t,getWidthByShapeGlobalSize as e,makeStyleResponsive as r,getHeightByShapeGlobalSize as l,makeStyle as o,getSingleColorVariable as i,getRadiusStyleActiveState as y,getStyleShadow as n,getGlobalColorStateStyle as g,makeStyleState as u,getResponsiveStylePadding as a,getStyleBackgroundByDevice as s}from"@gem-sdk/core";import{getVisibilityStyle as c,getStyleAspectRatioHeroBannerCustom as S,getAspectRatioSettings as d,getDisplayStyleByFitContent as h,getStyleHeroBannerBg as p,formatHoverScale as b,getAttachmentDevice as f,getClipPath as m,opacityEnabledData as w,getResponsiveSetting as T}from"./helpers.js";function filterTruthyStyles(t){return Object.fromEntries(Object.entries(t||{}).filter(([,t])=>!!t))}let getStyle=(o,i,y)=>{let{sizeSetting:n,background:g}=o??{},{ratioOptions:u,aspectRatio:a}=i??{},s={...y,...c(y),...t("w",e(n,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...S(g,n,d(u,a)),...r("h",l(n))};return filterTruthyStyles(s)},getContainerStyle=(t,e)=>{let{sizeSetting:r,background:l,borderBg:g,cornerBg:u,shadowBg:a,hasActiveShadow:s}=t??{},{ratioOptions:c,aspectRatio:h}=e??{},p={...S(l,r,d(c,h)),...o({bs:g?.border??g?.border,bw:g?.width??g?.width,bc:i(g?.color)}),...y({...u,active:{...u||{},radiusType:"custom"}}),...n({value:a,styleAppliedFor:"box-shadow",isEnableShadow:s})};return filterTruthyStyles(p)},getOverlayStyle=t=>{let{overlayColor:e,overlayOpacity:r}=t??{},l=g("bgc",e),o=u("op",r),{disableOpacity:i,disableHoverOpacity:y}=w(t);i&&(delete l?.["--bgc"],delete o?.["--op"]),y&&(delete l?.["--hvr-bgc"],delete o?.["--hvr-op"]);let n={...l,...o,"--top":"0","--left":"0"};return filterTruthyStyles(n)},getRowStyle=t=>{let{contentPadding:e}=t??{},r={...a(e)};return filterTruthyStyles(r)},getAdaptiveStyle=o=>{let{sizeSetting:i,background:y}=o??{},n={...h(i,y),...r("h",l(i)),...t("w",e(i,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),"--op":0,"--z":-1};return filterTruthyStyles(n)},getBackgroundStyle=(t,e,l)=>{let{hoverEffectScale:o,background:i,hoverEffectDuration:y}=t??{},n={...p(T(i||{}),e),...s(i,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":`${y??0}s`,"--scale":b(o),...r("pos",f(i)),transform:l,transition:"transform 300ms cubic-bezier(0,0,0,1)"};return filterTruthyStyles(n)},getContainBackgroundStyle=t=>{let{borderBg:e,cornerBg:r}=t??{},l={"clip-path":m(e?.width,r)};return filterTruthyStyles(l)},getHtml5VideoStyle=t=>{let e={...r("aspect",t)};return filterTruthyStyles(e)},getYoutubeIframeStyle=t=>{let e={...r("aspect",t),"pointer-event":"none"};return filterTruthyStyles(e)};export{getAdaptiveStyle,getBackgroundStyle,getContainBackgroundStyle,getContainerStyle,getHtml5VideoStyle,getOverlayStyle,getRowStyle,getStyle,getYoutubeIframeStyle};
1
+ import{makeStyleWithDefault as t,getWidthByShapeGlobalSize as e,makeStyleResponsive as r,getHeightByShapeGlobalSize as l,makeStyle as o,getSingleColorVariable as i,getRadiusStyleActiveState as y,getStyleBgColor as n,getStyleShadow as g,getGlobalColorStateStyle as u,makeStyleState as a,getResponsiveStylePadding as s,getStyleBackgroundByDevice as c}from"@gem-sdk/core";import{getVisibilityStyle as S,getStyleAspectRatioHeroBannerCustom as d,getAspectRatioSettings as h,getDisplayStyleByFitContent as p,getStyleHeroBannerBg as b,formatHoverScale as f,getAttachmentDevice as m,getClipPath as w,opacityEnabledData as T,getResponsiveSetting as v}from"./helpers.js";function filterTruthyStyles(t){return Object.fromEntries(Object.entries(t||{}).filter(([,t])=>!!t))}let getStyle=(o,i,y)=>{let{sizeSetting:n,background:g}=o??{},{ratioOptions:u,aspectRatio:a}=i??{},s={...y,...S(y),...t("w",e(n,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...d(g,n,h(u,a)),...r("h",l(n))};return filterTruthyStyles(s)},getContainerStyle=(t,e)=>{let{sizeSetting:r,background:l,borderBg:u,cornerBg:a,shadowBg:s,hasActiveShadow:c}=t??{},{ratioOptions:S,aspectRatio:p}=e??{},b={...d(l,r,h(S,p)),...o({bs:u?.border??u?.border,bw:u?.width??u?.width,bc:i(u?.color)}),...y({...a,active:{...a||{},radiusType:"custom"}}),...l?{...n(l)}:{},...g({value:s,styleAppliedFor:"box-shadow",isEnableShadow:c})};return filterTruthyStyles(b)},getOverlayStyle=t=>{let{overlayColor:e,overlayOpacity:r}=t??{},l=u("bgc",e),o=a("op",r),{disableOpacity:i,disableHoverOpacity:y}=T(t);i&&(delete l?.["--bgc"],delete o?.["--op"]),y&&(delete l?.["--hvr-bgc"],delete o?.["--hvr-op"]);let n={...l,...o,"--top":"0","--left":"0"};return filterTruthyStyles(n)},getRowStyle=t=>{let{contentPadding:e}=t??{},r={...s(e)};return filterTruthyStyles(r)},getAdaptiveStyle=o=>{let{sizeSetting:i,background:y}=o??{},n={...p(i,y),...r("h",l(i)),...t("w",e(i,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),"--op":0,"--z":-1};return filterTruthyStyles(n)},getBackgroundStyle=(t,e,l)=>{let{hoverEffectScale:o,background:i,hoverEffectDuration:y}=t??{},n={...b(v(i||{}),e),...c(i,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":`${y??0}s`,"--scale":f(o),...r("pos",m(i)),transform:l,transition:"transform 300ms cubic-bezier(0,0,0,1)"};return filterTruthyStyles(n)},getContainBackgroundStyle=t=>{let{borderBg:e,cornerBg:r}=t??{},l={"clip-path":w(e?.width,r)};return filterTruthyStyles(l)},getHtml5VideoStyle=t=>{let e={...r("aspect",t)};return filterTruthyStyles(e)},getYoutubeIframeStyle=t=>{let e={...r("aspect",t),"pointer-event":"none"};return filterTruthyStyles(e)};export{getAdaptiveStyle,getBackgroundStyle,getContainBackgroundStyle,getContainerStyle,getHtml5VideoStyle,getOverlayStyle,getRowStyle,getStyle,getYoutubeIframeStyle};
@@ -3,7 +3,7 @@ import{template as t,RenderIf as s,isLocalEnv as e,baseAssetURL as a}from"@gem-s
3
3
  assign current_variant = product.selected_or_first_available_variant
4
4
  assign available = current_variant.available | default: false
5
5
  -%}
6
- <gp-product-quantity-
6
+ <gp-product-quantity
7
7
  ${{...z}}
8
8
  data-price="${P}"
9
9
  class="${F}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.1049",
3
+ "version": "2.0.0-staging.1050",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",