@gem-sdk/core 1.14.0-dev.327 → 1.14.0-dev.328

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.
@@ -6,12 +6,12 @@
6
6
  ${a?`letter-spacing: ${a};`:""}
7
7
  ${r?`line-height: ${r};`:""}
8
8
  `},composeTypographyV2Css=(e,o)=>{let t=e?.custom,{fontFamily:s,fontSize:p,fontWeight:y,lineHeight:r,letterSpacing:a}=t??{},l=e?.attrs,{bold:i,italic:n,underline:m,transform:g}=l??{},c=o?"!important":"";return`
9
- ${s?`font-family: var(--g-font-${s}, ${s})${c};`:""}
10
- ${p?.desktop?`font-size: ${p?.desktop}${c};`:""}
11
- ${i?"font-weight: bold;":y?`font-weight: ${y}${c};`:""}
12
- ${a?`letter-spacing: ${a}${c};`:""}
13
- ${r?`line-height: ${r}${c};`:""}
9
+ ${s?`font-family: var(--g-font-${s}, ${s}) ${c};`:""}
10
+ ${p?.desktop?`font-size: ${p?.desktop} ${c};`:""}
11
+ ${i?"font-weight: bold;":y?`font-weight: ${y} ${c};`:""}
12
+ ${a?`letter-spacing: ${a} ${c};`:""}
13
+ ${r?`line-height: ${r} ${c};`:""}
14
14
  ${n?`font-style: italic${c};`:""}
15
- ${m?`text-decoration-line: underline${c};`:""}
16
- ${g?`text-transform: ${g}${c};`:""}
15
+ ${m?`text-decoration-line: underline ${c};`:""}
16
+ ${g?`text-transform: ${g} ${c};`:""}
17
17
  `};function getCustomCSSByDevice(e,o){if(!e||!o)return{};let t="desktop"!==o&&o?`-${o}`:"",{fontFamily:s}=e?.[o]??{};return{[`--size${t}`]:e?.[o]?.fontSize,[`--lh${t}`]:e?.[o]?.lineHeight,[`--fs${t}`]:e?.[o]?.fontStyle,[`--ff${t}`]:s?`var(--g-font-${s}, ${s})`:void 0,[`--weight${t}`]:e?.[o]?.fontWeight,[`--ls${t}`]:e?.[o]?.letterSpacing}}const composeTypography=e=>e?makeStyle.removeNullUndefined({...getCustomCSSByDevice(e,"desktop"),...getCustomCSSByDevice(e,"tablet"),...getCustomCSSByDevice(e,"mobile")}):{},composeTypographyV2=(e,o)=>e?makeStyle.removeNullUndefined({...makeStyle.makeStyle({fs:o?.italic?void 0:e?.fontStyle,ff:e?.fontFamily?`var(--g-font-${e.fontFamily.replace(/ /g,"-")}, ${e.fontFamily})`:void 0,weight:o?.bold?void 0:e?.fontWeight,ls:e?.letterSpacing,lh:e?.lineHeight}),...makeStyle.makeStyleResponsive("size",e?.fontSize)}):{},composeTypographyAttr=e=>e?makeStyle.removeNullUndefined({...makeStyle.makeStyle({fs:e?.italic?"italic":void 0,weight:e?.bold?"bold":void 0,c:colors.getSingleColorVariable(e?.color),tt:e?.transform,tdl:e?.underline?"underline":void 0})}):{},composeTypographyClassName=(e,o)=>e?e?.type&&!e.custom?genTypoClass(e.type):"":o?.type&&genTypoClass(o?.type),composeTypographyStyle=(e,o,t)=>e?{...composeTypographyV2(e.custom,e.attrs),...!t&&composeTypographyAttr(e.attrs)}:{...o?.type?{}:composeTypography(o?.custom)};exports.composeTypography=composeTypography,exports.composeTypographyAttr=composeTypographyAttr,exports.composeTypographyClassName=composeTypographyClassName,exports.composeTypographyCss=composeTypographyCss,exports.composeTypographyStyle=composeTypographyStyle,exports.composeTypographyV2=composeTypographyV2,exports.composeTypographyV2Css=composeTypographyV2Css,exports.genTypoClass=genTypoClass;
@@ -6,12 +6,12 @@ import{getSingleColorVariable as o}from"./colors.js";import{removeNullUndefined
6
6
  ${r?`letter-spacing: ${r};`:""}
7
7
  ${y?`line-height: ${y};`:""}
8
8
  `},composeTypographyV2Css=(o,t)=>{let e=o?.custom,{fontFamily:p,fontSize:s,fontWeight:i,lineHeight:y,letterSpacing:r}=e??{},l=o?.attrs,{bold:a,italic:n,underline:$,transform:g}=l??{},m=t?"!important":"";return`
9
- ${p?`font-family: var(--g-font-${p}, ${p})${m};`:""}
10
- ${s?.desktop?`font-size: ${s?.desktop}${m};`:""}
11
- ${a?"font-weight: bold;":i?`font-weight: ${i}${m};`:""}
12
- ${r?`letter-spacing: ${r}${m};`:""}
13
- ${y?`line-height: ${y}${m};`:""}
9
+ ${p?`font-family: var(--g-font-${p}, ${p}) ${m};`:""}
10
+ ${s?.desktop?`font-size: ${s?.desktop} ${m};`:""}
11
+ ${a?"font-weight: bold;":i?`font-weight: ${i} ${m};`:""}
12
+ ${r?`letter-spacing: ${r} ${m};`:""}
13
+ ${y?`line-height: ${y} ${m};`:""}
14
14
  ${n?`font-style: italic${m};`:""}
15
- ${$?`text-decoration-line: underline${m};`:""}
16
- ${g?`text-transform: ${g}${m};`:""}
15
+ ${$?`text-decoration-line: underline ${m};`:""}
16
+ ${g?`text-transform: ${g} ${m};`:""}
17
17
  `};function getCustomCSSByDevice(o,t){if(!o||!t)return{};let e="desktop"!==t&&t?`-${t}`:"",{fontFamily:p}=o?.[t]??{};return{[`--size${e}`]:o?.[t]?.fontSize,[`--lh${e}`]:o?.[t]?.lineHeight,[`--fs${e}`]:o?.[t]?.fontStyle,[`--ff${e}`]:p?`var(--g-font-${p}, ${p})`:void 0,[`--weight${e}`]:o?.[t]?.fontWeight,[`--ls${e}`]:o?.[t]?.letterSpacing}}let composeTypography=o=>o?t({...getCustomCSSByDevice(o,"desktop"),...getCustomCSSByDevice(o,"tablet"),...getCustomCSSByDevice(o,"mobile")}):{},composeTypographyV2=(o,s)=>o?t({...e({fs:s?.italic?void 0:o?.fontStyle,ff:o?.fontFamily?`var(--g-font-${o.fontFamily.replace(/ /g,"-")}, ${o.fontFamily})`:void 0,weight:s?.bold?void 0:o?.fontWeight,ls:o?.letterSpacing,lh:o?.lineHeight}),...p("size",o?.fontSize)}):{},composeTypographyAttr=p=>p?t({...e({fs:p?.italic?"italic":void 0,weight:p?.bold?"bold":void 0,c:o(p?.color),tt:p?.transform,tdl:p?.underline?"underline":void 0})}):{},composeTypographyClassName=(o,t)=>o?o?.type&&!o.custom?genTypoClass(o.type):"":t?.type&&genTypoClass(t?.type),composeTypographyStyle=(o,t,e)=>o?{...composeTypographyV2(o.custom,o.attrs),...!e&&composeTypographyAttr(o.attrs)}:{...t?.type?{}:composeTypography(t?.custom)};export{composeTypography,composeTypographyAttr,composeTypographyClassName,composeTypographyCss,composeTypographyStyle,composeTypographyV2,composeTypographyV2Css,genTypoClass};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.14.0-dev.327",
3
+ "version": "1.14.0-dev.328",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",