@gem-sdk/core 1.48.0-dev.83 → 1.48.0-dev.86

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.
@@ -28,7 +28,8 @@ const composeTypographyV2Css = (typography, isImportant)=>{
28
28
  const composeImportant = isImportant ? '!important' : '';
29
29
  return `
30
30
  ${fontFamily ? `font-family: ${composeFontFamilyTypographyV2({
31
- fontFamily
31
+ fontFamily,
32
+ type: typography?.type
32
33
  })} ${composeImportant}` : ''};
33
34
  ${fontSize?.desktop ? `font-size: ${fontSize?.desktop} ${composeImportant}` : ''};
34
35
  ${bold ? `font-weight: bold ${composeImportant}` : fontWeight ? `font-weight: ${fontWeight} ${composeImportant}` : ''};
@@ -76,7 +77,7 @@ const composeTypographyV2 = (value, attrs)=>{
76
77
  });
77
78
  };
78
79
  const composeFontFamilyTypographyV2 = (value)=>{
79
- const { fontFamily, isCustom, fallbackFontFamily } = value || {};
80
+ const { fontFamily, isCustom, fallbackFontFamily, type } = value || {};
80
81
  if (!fontFamily) {
81
82
  return isCustom ? fallbackFontFamily : undefined;
82
83
  }
@@ -93,7 +94,7 @@ const composeFontFamilyTypographyV2 = (value)=>{
93
94
  default:
94
95
  return getFontUsedByTypographyV2({
95
96
  fontFamily: fontFamily.value,
96
- fallbackFontFamily: value?.fallbackFontFamily
97
+ fallbackFontFamily: composeFallbackTypographyStyle(type ?? 'heading')
97
98
  });
98
99
  }
99
100
  }
@@ -26,7 +26,8 @@ const composeTypographyV2Css = (typography, isImportant)=>{
26
26
  const composeImportant = isImportant ? '!important' : '';
27
27
  return `
28
28
  ${fontFamily ? `font-family: ${composeFontFamilyTypographyV2({
29
- fontFamily
29
+ fontFamily,
30
+ type: typography?.type
30
31
  })} ${composeImportant}` : ''};
31
32
  ${fontSize?.desktop ? `font-size: ${fontSize?.desktop} ${composeImportant}` : ''};
32
33
  ${bold ? `font-weight: bold ${composeImportant}` : fontWeight ? `font-weight: ${fontWeight} ${composeImportant}` : ''};
@@ -74,7 +75,7 @@ const composeTypographyV2 = (value, attrs)=>{
74
75
  });
75
76
  };
76
77
  const composeFontFamilyTypographyV2 = (value)=>{
77
- const { fontFamily, isCustom, fallbackFontFamily } = value || {};
78
+ const { fontFamily, isCustom, fallbackFontFamily, type } = value || {};
78
79
  if (!fontFamily) {
79
80
  return isCustom ? fallbackFontFamily : undefined;
80
81
  }
@@ -91,7 +92,7 @@ const composeFontFamilyTypographyV2 = (value)=>{
91
92
  default:
92
93
  return getFontUsedByTypographyV2({
93
94
  fontFamily: fontFamily.value,
94
- fallbackFontFamily: value?.fallbackFontFamily
95
+ fallbackFontFamily: composeFallbackTypographyStyle(type ?? 'heading')
95
96
  });
96
97
  }
97
98
  }
@@ -37470,7 +37470,9 @@ declare const composeTypographyCss: (typography: TypographySetting | undefined)
37470
37470
  declare const composeTypographyV2Css: (typography: TypographySettingV2 | undefined, isImportant?: boolean) => string;
37471
37471
  declare const composeTypography: (typography?: ObjectDevices<TypographyProps>) => React.CSSProperties;
37472
37472
  declare const composeTypographyV2: (value?: TypographyV2Props, attrs?: TypographyV2Attrs) => React.CSSProperties;
37473
- declare const composeFontFamilyTypographyV2: (value?: TypographyV2Props) => string | undefined;
37473
+ declare const composeFontFamilyTypographyV2: (value?: TypographyV2Props & {
37474
+ type?: string;
37475
+ }) => string | undefined;
37474
37476
  declare const composeTypographyAttr: (attrs?: TypographyV2Attrs) => React.CSSProperties;
37475
37477
  declare const composeTypographyClassName: (typo?: TypographySettingV2, typography?: TypographySetting) => "" | "gp-g-heading-1" | "gp-g-heading-2" | "gp-g-heading-3" | "gp-g-subheading-1" | "gp-g-subheading-2" | "gp-g-subheading-3" | "gp-g-paragraph-1" | "gp-g-paragraph-2" | "gp-g-paragraph-3" | undefined;
37476
37478
  declare const composeFallbackTypographyStyle: (tag: string) => "var(--g-font-heading, heading)" | "var(--g-font-body, body)";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.48.0-dev.83",
3
+ "version": "1.48.0-dev.86",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "@gem-sdk/adapter-shopify": "1.48.0-dev.3",
31
- "@gem-sdk/styles": "1.48.0-dev.72",
31
+ "@gem-sdk/styles": "1.48.0-dev.86",
32
32
  "@types/classnames": "^2.3.1"
33
33
  },
34
34
  "dependencies": {