@gem-sdk/components 2.0.0-staging.1039 → 2.0.0-staging.1040

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 getContainerClasses=e=>{let{uid:t,isScrollToTop:s,cssClass:r,isLiquid:n}=e,o=s&&n?"!gp-pointer-events-none [&_gp-button_button]:!gp-pointer-events-auto":"";return core.composeClasses(`sticky-wrapper ${o} ${t} ${r}`)};exports.getContainerClasses=getContainerClasses;
1
+ "use strict";var core=require("@gem-sdk/core");const getContainerClasses=e=>{let{uid:t,isScrollToTop:s,cssClass:r,isLiquid:n}=e,o=s&&n?"!gp-pointer-events-none [&_gp-button-v7-5_button]:!gp-pointer-events-auto":"";return core.composeClasses(`sticky-wrapper ${o} ${t} ${r}`)};exports.getContainerClasses=getContainerClasses;
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core");require("react/jsx-runtime"),require("react");var _const=require("../../common/const.js");const getCSSPosition=t=>"top"==t?"sticky":"fixed",getDisplayStyle=(t,e,l)=>{let i={[`--top${t}`]:"auto",[`--${l+t}`]:"0",[`--pos${t}`]:getCSSPosition(l)};switch(e){case"after-first-cart-button":i[`--d${t}`]="none";break;case"always":i[`--d${t}`]="block"}return i},displayConditionStyle=(t,e)=>({...getDisplayStyle("",t?.desktop,e?.desktop),...getDisplayStyle("-tablet",t?.tablet??t?.desktop,e?.tablet??e?.desktop),...getDisplayStyle("-mobile",t?.mobile??t?.tablet??t?.desktop,e?.mobile??e?.tablet??e?.desktop)}),getCSSAlignByDevice=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),getCSSAlign=t=>({...getCSSAlignByDevice(t?.desktop,""),...getCSSAlignByDevice(t?.tablet??t?.desktop,"-tablet"),...getCSSAlignByDevice(t?.mobile??t?.tablet??t?.desktop,"-mobile")}),getContainerStyles=t=>{let{position:e,display:l}=t;return{margin:"0 auto",...getCSSAlign(e),...displayConditionStyle(l,e),"z-index":_const.ELEMENT_Z_INDEX.STICKY}},getContentStyles=t=>{let{style:e,background:l}=t;return{...core.makeStyle({m:"0 auto"}),...getStylePadding(e),...filterStyles(e),...core.getStyleBackgroundByDevice(l),...core.getGradientBgrStyleByDevice(l)}},getStylePadding=t=>{let e=["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"],l={};return e.forEach(e=>{t?.[e]&&(l[e]=t[e])}),l},filterStyles=t=>{let e={...t},l=["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"];return l.forEach(t=>{delete e?.[t]}),e};exports.displayConditionStyle=displayConditionStyle,exports.filterStyles=filterStyles,exports.getContainerStyles=getContainerStyles,exports.getContentStyles=getContentStyles,exports.getDisplayStyle=getDisplayStyle,exports.getStylePadding=getStylePadding;
1
+ "use strict";var core=require("@gem-sdk/core");require("react/jsx-runtime"),require("react");var _const=require("../../common/const.js");const getCSSPosition=t=>"top"==t?"sticky":"fixed",getDisplayStyle=(t,e,l)=>{let i={[`--top${t}`]:"auto",[`--${l+t}`]:"0",[`--pos${t}`]:getCSSPosition(l)};switch(e){case"after-first-cart-button":i[`--d${t}`]="none";break;case"always":i[`--d${t}`]="block"}return i},displayConditionStyle=(t,e)=>({...getDisplayStyle("",t?.desktop,e?.desktop),...getDisplayStyle("-tablet",t?.tablet??t?.desktop,e?.tablet??e?.desktop),...getDisplayStyle("-mobile",t?.mobile??t?.tablet??t?.desktop,e?.mobile??e?.tablet??e?.desktop)}),getCSSAlignByDevice=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),getCSSAlign=t=>({...getCSSAlignByDevice(t?.desktop,""),...getCSSAlignByDevice(t?.tablet??t?.desktop,"-tablet"),...getCSSAlignByDevice(t?.mobile??t?.tablet??t?.desktop,"-mobile")}),getContainerStyles=t=>{let{position:e,display:l}=t;return{margin:"0 auto",...getCSSAlign(e),...displayConditionStyle(l,e),"z-index":_const.ELEMENT_Z_INDEX.STICKY}},getContentStyles=t=>{let{style:e,background:l}=t;return{...core.makeStyle({m:"0 auto"}),...getStylePadding(e),...filterStyles(e),...core.getStyleBackgroundByDevice(l),...core.getGradientImageBgrStyleByDevice(l)}},getStylePadding=t=>{let e=["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"],l={};return e.forEach(e=>{t?.[e]&&(l[e]=t[e])}),l},filterStyles=t=>{let e={...t},l=["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"];return l.forEach(t=>{delete e?.[t]}),e};exports.displayConditionStyle=displayConditionStyle,exports.filterStyles=filterStyles,exports.getContainerStyles=getContainerStyles,exports.getContentStyles=getContentStyles,exports.getDisplayStyle=getDisplayStyle,exports.getStylePadding=getStylePadding;
@@ -1 +1 @@
1
- import{composeClasses as e}from"@gem-sdk/core";let getContainerClasses=t=>{let{uid:n,isScrollToTop:o,cssClass:r,isLiquid:s}=t,p=o&&s?"!gp-pointer-events-none [&_gp-button_button]:!gp-pointer-events-auto":"";return e(`sticky-wrapper ${p} ${n} ${r}`)};export{getContainerClasses};
1
+ import{composeClasses as e}from"@gem-sdk/core";let getContainerClasses=t=>{let{uid:n,isScrollToTop:o,cssClass:r,isLiquid:s}=t,p=o&&s?"!gp-pointer-events-none [&_gp-button-v7-5_button]:!gp-pointer-events-auto":"";return e(`sticky-wrapper ${p} ${n} ${r}`)};export{getContainerClasses};
@@ -1 +1 @@
1
- import{makeStyle as t,getStyleBackgroundByDevice as e,getGradientBgrStyleByDevice as l}from"@gem-sdk/core";import"react/jsx-runtime";import"react";import{ELEMENT_Z_INDEX as i}from"../../common/const.js";let getCSSPosition=t=>"top"==t?"sticky":"fixed",getDisplayStyle=(t,e,l)=>{let i={[`--top${t}`]:"auto",[`--${l+t}`]:"0",[`--pos${t}`]:getCSSPosition(l)};switch(e){case"after-first-cart-button":i[`--d${t}`]="none";break;case"always":i[`--d${t}`]="block"}return i},displayConditionStyle=(t,e)=>({...getDisplayStyle("",t?.desktop,e?.desktop),...getDisplayStyle("-tablet",t?.tablet??t?.desktop,e?.tablet??e?.desktop),...getDisplayStyle("-mobile",t?.mobile??t?.tablet??t?.desktop,e?.mobile??e?.tablet??e?.desktop)}),getCSSAlignByDevice=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),getCSSAlign=t=>({...getCSSAlignByDevice(t?.desktop,""),...getCSSAlignByDevice(t?.tablet??t?.desktop,"-tablet"),...getCSSAlignByDevice(t?.mobile??t?.tablet??t?.desktop,"-mobile")}),getContainerStyles=t=>{let{position:e,display:l}=t;return{margin:"0 auto",...getCSSAlign(e),...displayConditionStyle(l,e),"z-index":i.STICKY}},getContentStyles=i=>{let{style:o,background:p}=i;return{...t({m:"0 auto"}),...getStylePadding(o),...filterStyles(o),...e(p),...l(p)}},getStylePadding=t=>{let e=["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"],l={};return e.forEach(e=>{t?.[e]&&(l[e]=t[e])}),l},filterStyles=t=>{let e={...t},l=["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"];return l.forEach(t=>{delete e?.[t]}),e};export{displayConditionStyle,filterStyles,getContainerStyles,getContentStyles,getDisplayStyle,getStylePadding};
1
+ import{makeStyle as t,getStyleBackgroundByDevice as e,getGradientImageBgrStyleByDevice as l}from"@gem-sdk/core";import"react/jsx-runtime";import"react";import{ELEMENT_Z_INDEX as i}from"../../common/const.js";let getCSSPosition=t=>"top"==t?"sticky":"fixed",getDisplayStyle=(t,e,l)=>{let i={[`--top${t}`]:"auto",[`--${l+t}`]:"0",[`--pos${t}`]:getCSSPosition(l)};switch(e){case"after-first-cart-button":i[`--d${t}`]="none";break;case"always":i[`--d${t}`]="block"}return i},displayConditionStyle=(t,e)=>({...getDisplayStyle("",t?.desktop,e?.desktop),...getDisplayStyle("-tablet",t?.tablet??t?.desktop,e?.tablet??e?.desktop),...getDisplayStyle("-mobile",t?.mobile??t?.tablet??t?.desktop,e?.mobile??e?.tablet??e?.desktop)}),getCSSAlignByDevice=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),getCSSAlign=t=>({...getCSSAlignByDevice(t?.desktop,""),...getCSSAlignByDevice(t?.tablet??t?.desktop,"-tablet"),...getCSSAlignByDevice(t?.mobile??t?.tablet??t?.desktop,"-mobile")}),getContainerStyles=t=>{let{position:e,display:l}=t;return{margin:"0 auto",...getCSSAlign(e),...displayConditionStyle(l,e),"z-index":i.STICKY}},getContentStyles=i=>{let{style:o,background:p}=i;return{...t({m:"0 auto"}),...getStylePadding(o),...filterStyles(o),...e(p),...l(p)}},getStylePadding=t=>{let e=["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"],l={};return e.forEach(e=>{t?.[e]&&(l[e]=t[e])}),l},filterStyles=t=>{let e={...t},l=["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"];return l.forEach(t=>{delete e?.[t]}),e};export{displayConditionStyle,filterStyles,getContainerStyles,getContentStyles,getDisplayStyle,getStylePadding};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.1039",
3
+ "version": "2.0.0-staging.1040",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -25,7 +25,7 @@
25
25
  "scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
26
26
  },
27
27
  "devDependencies": {
28
- "@gem-sdk/core": "2.0.0-staging.1037",
28
+ "@gem-sdk/core": "2.0.0-staging.1040",
29
29
  "@gem-sdk/styles": "2.0.0-staging.1037",
30
30
  "@gem-sdk/system": "2.0.0-staging.1037",
31
31
  "tsup": "^8.5.0",