@gem-sdk/components 3.1.4 → 3.1.6

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 getInputClasses=({styles:e,borderBtn:s,inputBackgroundColor:t,textColor:o,isDisabled:l})=>{let p="gp-flex gp-w-full gp-px-1 gp-min-w-[45px] gp-shrink-[99999] gp-appearance-none gp-items-center gp-text-center gp-outline-none focus-visible:gp-shadow-none focus-visible:gp-outline-none gp-transition-all gp-duration-150 hover:gp-text-black disabled:gp-cursor-not-allowed",r=core.composeTypographyClassName(e?.typo,e?.typography),a=core.handleConvertClassColor(s),g=core.getGlobalColorStateClass("bg",t),n=core.getGlobalColorStateClass("text",o);return a&&(p+=` ${a} `),r&&(p+=` ${r} `),g&&(p+=` ${g} `),n&&(p+=` ${n} `),l&&(p+="gp-cursor-not-allowed"),{...core.composeClasses(p)}},getButtonClass=({borderBtn:e,buttonBackgroundColor:s,iconColor:t,buttonSide:o,isDisabled:l})=>{let p=`gp-flex gp-aspect-square gp-h-full disabled:gp-cursor-not-allowed ${l?"gp-cursor-not-allowed":"gp-cursor-pointer"} gp-items-center gp-justify-center gp-outline-none ${"left"===o?"gp-minus":"gp-plus"} `,r=core.handleConvertClassColor(e),a=core.getGlobalColorStateClass("bg",s),g=core.getGlobalColorStateClass("text",t);return r&&(p+=` ${r} `),a&&(p+=` ${a} `),g&&(p+=` ${g} `),{...core.composeClasses(p)}},getContainerClasses=e=>({...core.composeClasses(`quantityClass gp-relative gp-inline-flex gp-h-12 gp-w-full gp-bg-transparent gp-transition-all gp-duration-150 data-[disabled=true]:gp-opacity-60 ${e??""}`)}),getWrapperClasses=()=>({...core.composeClasses("gp-inline-flex gp-w-full gp-overflow-hidden")}),getIconWrapperClasses=()=>({...core.composeClasses("gp-inline-flex gp-items-center gp-justify-center [&>*]:gp-h-full [&>*]:gp-w-full")});exports.getButtonClass=getButtonClass,exports.getContainerClasses=getContainerClasses,exports.getIconWrapperClasses=getIconWrapperClasses,exports.getInputClasses=getInputClasses,exports.getWrapperClasses=getWrapperClasses;
1
+ "use strict";var core=require("@gem-sdk/core");const getInputClasses=({styles:e,borderBtn:s,inputBackgroundColor:t,textColor:o,isDisabled:l})=>{let p="gp-flex gp-w-full gp-px-1 gp-min-w-[45px] gp-shrink-[99999] gp-appearance-none gp-items-center gp-text-center gp-outline-none focus-visible:gp-shadow-none focus-visible:gp-outline-none gp-transition-all gp-duration-150 hover:gp-text-black disabled:gp-cursor-not-allowed gp-min-h-0 gp-rounded-none",r=core.composeTypographyClassName(e?.typo,e?.typography),a=core.handleConvertClassColor(s),g=core.getGlobalColorStateClass("bg",t),n=core.getGlobalColorStateClass("text",o);return a&&(p+=` ${a} `),r&&(p+=` ${r} `),g&&(p+=` ${g} `),n&&(p+=` ${n} `),l&&(p+="gp-cursor-not-allowed"),{...core.composeClasses(p)}},getButtonClass=({borderBtn:e,buttonBackgroundColor:s,iconColor:t,buttonSide:o,isDisabled:l})=>{let p=`gp-flex gp-aspect-square gp-h-full disabled:gp-cursor-not-allowed ${l?"gp-cursor-not-allowed":"gp-cursor-pointer"} gp-items-center gp-justify-center gp-outline-none ${"left"===o?"gp-minus":"gp-plus"} `,r=core.handleConvertClassColor(e),a=core.getGlobalColorStateClass("bg",s),g=core.getGlobalColorStateClass("text",t);return r&&(p+=` ${r} `),a&&(p+=` ${a} `),g&&(p+=` ${g} `),{...core.composeClasses(p)}},getContainerClasses=e=>({...core.composeClasses(`quantityClass gp-relative gp-inline-flex gp-h-12 gp-w-full gp-bg-transparent gp-transition-all gp-duration-150 data-[disabled=true]:gp-opacity-60 ${e??""}`)}),getWrapperClasses=()=>({...core.composeClasses("gp-inline-flex gp-w-full gp-overflow-hidden")}),getIconWrapperClasses=()=>({...core.composeClasses("gp-inline-flex gp-items-center gp-justify-center [&>*]:gp-h-full [&>*]:gp-w-full")});exports.getButtonClass=getButtonClass,exports.getContainerClasses=getContainerClasses,exports.getIconWrapperClasses=getIconWrapperClasses,exports.getInputClasses=getInputClasses,exports.getWrapperClasses=getWrapperClasses;
@@ -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)=>{let o={...core.makeStyle({mr:e?.spacing,mb:e?.spacing}),...core.makeStyleResponsive("ta",e?.align),...t,"--dynamic-source-color":"#F4F4F4"};return filterTruthyStyles(o)},getContainerStyle=(e,t)=>{let{tagWidth:o}=t??{},r={...core.makeStyleResponsive("jc",e?.align),...o};return filterTruthyStyles(r)},getTextStyle=(e,t)=>{let o=core.makeGlobalSize(t?.globalSize),r=[e?.lineThrough&&"line-through",e?.typo?.attrs?.underline&&"underline"].filter(Boolean),l={...o?.width?.["--w"]?o.width:{"--w":"100%"},...core.makeStyle({tdc:core.getSingleColorVariable(e?.lineColor?.normal),tdt:helpers.formatThickness(e?.thickness)}),...core.composeBorderResponsive(e?.shapeBorder),...core.composeRadiusResponsive(e?.shapeRounded),...core.getResponsiveStyleShadowWithoutState(e?.shapeBoxShadow,"box-shadow",e?.shapeBoxShadow),...core.getStyleShadow({value:e?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:e?.typo?.custom?.hasShadowText}),...core.makeStyleResponsive("ta",e?.textAlign),...core.makeStyleResponsive("line-clamp",core.makeLineClamp(e?.lineClamp,e?.hasLineClamp)),...e?.textColor?core.getGlobalColorStyle(e.textColor):core.getGlobalColorStateStyle("c",e?.color),...core.composeTypographyStyle(e?.typo),"word-break":"break-word",...core.getStyleBackgroundByDevice(t?.background),...o.padding,...core.getGradientBgrStyleByDevice(t?.background,{desktop:!0,tablet:!0,mobile:!0}),overflow:"hidden",...e?.opacityPrice&&{opacity:`${e?.opacityPrice}%`},...core.makeStyle({tdl:r.join(" ")})};return e?.enableHoverEffect?filterTruthyStyles(l):core.filterHoverVariables(l)},getTextStyleInline=e=>{let t={...core.composeTypographyStyle(e?.typo),"word-break":"break-word",overflow:"hidden"};return filterTruthyStyles(t)};exports.getContainerStyle=getContainerStyle,exports.getStyle=getStyle,exports.getTextStyle=getTextStyle,exports.getTextStyleInline=getTextStyleInline;
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)=>{let o={...core.makeStyle({mr:e?.spacing,mb:e?.spacing}),...core.makeStyleResponsive("ta",e?.align),...t,"--dynamic-source-color":"#F4F4F4"};return filterTruthyStyles(o)},getContainerStyle=(e,t)=>{let{tagWidth:o}=t??{},r={...core.makeStyleResponsive("jc",e?.align),...o};return filterTruthyStyles(r)},getTextStyle=(e,t)=>{let o=core.makeGlobalSize(t?.globalSize),r=[e?.lineThrough&&"line-through",e?.typo?.attrs?.underline&&"underline"].filter(Boolean),l={...o?.width?.["--w"]?o.width:{"--w":"100%"},...core.makeStyle({tdc:core.getSingleColorVariable(e?.lineColor?.normal),tdt:helpers.formatThickness(e?.thickness)}),...core.composeBorderResponsive(e?.shapeBorder),...core.composeRadiusResponsive(e?.shapeRounded),...core.getResponsiveStyleShadowWithoutState(e?.shapeBoxShadow,"box-shadow",e?.shapeBoxShadow),...core.getStyleShadow({value:e?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:e?.typo?.custom?.hasShadowText}),...core.makeStyleResponsive("ta",e?.textAlign),...core.makeStyleResponsive("line-clamp",core.makeLineClamp(e?.lineClamp,e?.hasLineClamp)),...e?.textColor?core.getGlobalColorStyle(e.textColor):core.getGlobalColorStateStyle("c",e?.color),...core.composeTypographyStyle(e?.typo,e?.typography),"word-break":"break-word",...core.getStyleBackgroundByDevice(t?.background),...o.padding,...core.getGradientBgrStyleByDevice(t?.background,{desktop:!0,tablet:!0,mobile:!0}),overflow:"hidden",...e?.opacityPrice&&{opacity:`${e?.opacityPrice}%`},...core.makeStyle({tdl:r.join(" ")})};return e?.enableHoverEffect?filterTruthyStyles(l):core.filterHoverVariables(l)},getTextStyleInline=e=>{let t={...core.composeTypographyStyle(e?.typo),"word-break":"break-word",overflow:"hidden"};return filterTruthyStyles(t)};exports.getContainerStyle=getContainerStyle,exports.getStyle=getStyle,exports.getTextStyle=getTextStyle,exports.getTextStyleInline=getTextStyleInline;
@@ -1 +1 @@
1
- import{composeTypographyClassName as e,handleConvertClassColor as t,getGlobalColorStateClass as p,composeClasses as l}from"@gem-sdk/core";let getInputClasses=({styles:g,borderBtn:s,inputBackgroundColor:n,textColor:r,isDisabled:a})=>{let o="gp-flex gp-w-full gp-px-1 gp-min-w-[45px] gp-shrink-[99999] gp-appearance-none gp-items-center gp-text-center gp-outline-none focus-visible:gp-shadow-none focus-visible:gp-outline-none gp-transition-all gp-duration-150 hover:gp-text-black disabled:gp-cursor-not-allowed",i=e(g?.typo,g?.typography),u=t(s),c=p("bg",n),f=p("text",r);return u&&(o+=` ${u} `),i&&(o+=` ${i} `),c&&(o+=` ${c} `),f&&(o+=` ${f} `),a&&(o+="gp-cursor-not-allowed"),{...l(o)}},getButtonClass=({borderBtn:e,buttonBackgroundColor:g,iconColor:s,buttonSide:n,isDisabled:r})=>{let a=`gp-flex gp-aspect-square gp-h-full disabled:gp-cursor-not-allowed ${r?"gp-cursor-not-allowed":"gp-cursor-pointer"} gp-items-center gp-justify-center gp-outline-none ${"left"===n?"gp-minus":"gp-plus"} `,o=t(e),i=p("bg",g),u=p("text",s);return o&&(a+=` ${o} `),i&&(a+=` ${i} `),u&&(a+=` ${u} `),{...l(a)}},getContainerClasses=e=>({...l(`quantityClass gp-relative gp-inline-flex gp-h-12 gp-w-full gp-bg-transparent gp-transition-all gp-duration-150 data-[disabled=true]:gp-opacity-60 ${e??""}`)}),getWrapperClasses=()=>({...l("gp-inline-flex gp-w-full gp-overflow-hidden")}),getIconWrapperClasses=()=>({...l("gp-inline-flex gp-items-center gp-justify-center [&>*]:gp-h-full [&>*]:gp-w-full")});export{getButtonClass,getContainerClasses,getIconWrapperClasses,getInputClasses,getWrapperClasses};
1
+ import{composeTypographyClassName as e,handleConvertClassColor as t,getGlobalColorStateClass as p,composeClasses as g}from"@gem-sdk/core";let getInputClasses=({styles:n,borderBtn:l,inputBackgroundColor:s,textColor:r,isDisabled:o})=>{let a="gp-flex gp-w-full gp-px-1 gp-min-w-[45px] gp-shrink-[99999] gp-appearance-none gp-items-center gp-text-center gp-outline-none focus-visible:gp-shadow-none focus-visible:gp-outline-none gp-transition-all gp-duration-150 hover:gp-text-black disabled:gp-cursor-not-allowed gp-min-h-0 gp-rounded-none",i=e(n?.typo,n?.typography),u=t(l),c=p("bg",s),d=p("text",r);return u&&(a+=` ${u} `),i&&(a+=` ${i} `),c&&(a+=` ${c} `),d&&(a+=` ${d} `),o&&(a+="gp-cursor-not-allowed"),{...g(a)}},getButtonClass=({borderBtn:e,buttonBackgroundColor:n,iconColor:l,buttonSide:s,isDisabled:r})=>{let o=`gp-flex gp-aspect-square gp-h-full disabled:gp-cursor-not-allowed ${r?"gp-cursor-not-allowed":"gp-cursor-pointer"} gp-items-center gp-justify-center gp-outline-none ${"left"===s?"gp-minus":"gp-plus"} `,a=t(e),i=p("bg",n),u=p("text",l);return a&&(o+=` ${a} `),i&&(o+=` ${i} `),u&&(o+=` ${u} `),{...g(o)}},getContainerClasses=e=>({...g(`quantityClass gp-relative gp-inline-flex gp-h-12 gp-w-full gp-bg-transparent gp-transition-all gp-duration-150 data-[disabled=true]:gp-opacity-60 ${e??""}`)}),getWrapperClasses=()=>({...g("gp-inline-flex gp-w-full gp-overflow-hidden")}),getIconWrapperClasses=()=>({...g("gp-inline-flex gp-items-center gp-justify-center [&>*]:gp-h-full [&>*]:gp-w-full")});export{getButtonClass,getContainerClasses,getIconWrapperClasses,getInputClasses,getWrapperClasses};
@@ -1 +1 @@
1
- import{makeStyle as e,makeStyleResponsive as t,makeGlobalSize as r,getSingleColorVariable as o,composeBorderResponsive as l,composeRadiusResponsive as i,getResponsiveStyleShadowWithoutState as n,getStyleShadow as a,makeLineClamp as d,getGlobalColorStyle as s,getGlobalColorStateStyle as h,composeTypographyStyle as y,getStyleBackgroundByDevice as c,getGradientBgrStyleByDevice as p,filterHoverVariables as u}from"@gem-sdk/core";import{formatThickness as g}from"./helpers.js";function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}let getStyle=(r,o)=>{let l={...e({mr:r?.spacing,mb:r?.spacing}),...t("ta",r?.align),...o,"--dynamic-source-color":"#F4F4F4"};return filterTruthyStyles(l)},getContainerStyle=(e,r)=>{let{tagWidth:o}=r??{},l={...t("jc",e?.align),...o};return filterTruthyStyles(l)},getTextStyle=(S,w)=>{let m=r(w?.globalSize),b=[S?.lineThrough&&"line-through",S?.typo?.attrs?.underline&&"underline"].filter(Boolean),f={...m?.width?.["--w"]?m.width:{"--w":"100%"},...e({tdc:o(S?.lineColor?.normal),tdt:g(S?.thickness)}),...l(S?.shapeBorder),...i(S?.shapeRounded),...n(S?.shapeBoxShadow,"box-shadow",S?.shapeBoxShadow),...a({value:S?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:S?.typo?.custom?.hasShadowText}),...t("ta",S?.textAlign),...t("line-clamp",d(S?.lineClamp,S?.hasLineClamp)),...S?.textColor?s(S.textColor):h("c",S?.color),...y(S?.typo),"word-break":"break-word",...c(w?.background),...m.padding,...p(w?.background,{desktop:!0,tablet:!0,mobile:!0}),overflow:"hidden",...S?.opacityPrice&&{opacity:`${S?.opacityPrice}%`},...e({tdl:b.join(" ")})};return S?.enableHoverEffect?filterTruthyStyles(f):u(f)},getTextStyleInline=e=>{let t={...y(e?.typo),"word-break":"break-word",overflow:"hidden"};return filterTruthyStyles(t)};export{getContainerStyle,getStyle,getTextStyle,getTextStyleInline};
1
+ import{makeStyle as e,makeStyleResponsive as t,makeGlobalSize as r,getSingleColorVariable as o,composeBorderResponsive as l,composeRadiusResponsive as i,getResponsiveStyleShadowWithoutState as n,getStyleShadow as a,makeLineClamp as d,getGlobalColorStyle as y,getGlobalColorStateStyle as h,composeTypographyStyle as s,getStyleBackgroundByDevice as p,getGradientBgrStyleByDevice as c,filterHoverVariables as u}from"@gem-sdk/core";import{formatThickness as g}from"./helpers.js";function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}let getStyle=(r,o)=>{let l={...e({mr:r?.spacing,mb:r?.spacing}),...t("ta",r?.align),...o,"--dynamic-source-color":"#F4F4F4"};return filterTruthyStyles(l)},getContainerStyle=(e,r)=>{let{tagWidth:o}=r??{},l={...t("jc",e?.align),...o};return filterTruthyStyles(l)},getTextStyle=(S,w)=>{let m=r(w?.globalSize),b=[S?.lineThrough&&"line-through",S?.typo?.attrs?.underline&&"underline"].filter(Boolean),f={...m?.width?.["--w"]?m.width:{"--w":"100%"},...e({tdc:o(S?.lineColor?.normal),tdt:g(S?.thickness)}),...l(S?.shapeBorder),...i(S?.shapeRounded),...n(S?.shapeBoxShadow,"box-shadow",S?.shapeBoxShadow),...a({value:S?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:S?.typo?.custom?.hasShadowText}),...t("ta",S?.textAlign),...t("line-clamp",d(S?.lineClamp,S?.hasLineClamp)),...S?.textColor?y(S.textColor):h("c",S?.color),...s(S?.typo,S?.typography),"word-break":"break-word",...p(w?.background),...m.padding,...c(w?.background,{desktop:!0,tablet:!0,mobile:!0}),overflow:"hidden",...S?.opacityPrice&&{opacity:`${S?.opacityPrice}%`},...e({tdl:b.join(" ")})};return S?.enableHoverEffect?filterTruthyStyles(f):u(f)},getTextStyleInline=e=>{let t={...s(e?.typo),"word-break":"break-word",overflow:"hidden"};return filterTruthyStyles(t)};export{getContainerStyle,getStyle,getTextStyle,getTextStyleInline};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "3.1.4",
3
+ "version": "3.1.6",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",