@jobber/components-native 0.65.5 → 0.66.1-JOB-101940.4

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.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.65.5",
3
+ "version": "0.66.1-JOB-101940.4+9be6e610",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -36,7 +36,7 @@
36
36
  "build:clean": "rm -rf ./dist"
37
37
  },
38
38
  "dependencies": {
39
- "@jobber/design": "^0.58.0",
39
+ "@jobber/design": "^0.59.0",
40
40
  "@jobber/hooks": "^2.9.5",
41
41
  "@react-native-clipboard/clipboard": "^1.11.2",
42
42
  "@react-native-picker/picker": "^2.4.10",
@@ -84,5 +84,5 @@
84
84
  "react-native-safe-area-context": "^4.5.2",
85
85
  "react-native-svg": ">=12.0.0"
86
86
  },
87
- "gitHead": "916a407845cf16c43e157df052605f4744c7f207"
87
+ "gitHead": "9be6e610f02772de62d13a01a945a74f89b0c184"
88
88
  }
@@ -18,7 +18,7 @@ export const Typography = React.memo(InternalTypography);
18
18
  function InternalTypography({ fontFamily, fontStyle, fontWeight, transform, color, align, size = "default", children, maxLines = "unlimited", allowFontScaling = true, maxFontScaleSize, adjustsFontSizeToFit = false, lineHeight, letterSpacing, reverseTheme = false, hideFromScreenReader = false, accessibilityRole = "text", strikeThrough = false, selectable = true, }) {
19
19
  const sizeAndHeight = getSizeAndHeightStyle(size, lineHeight);
20
20
  const style = [
21
- getFontStyle(fontFamily, fontStyle, fontWeight),
21
+ getFontStyle(fontFamily, fontWeight),
22
22
  getColorStyle(color, reverseTheme),
23
23
  getAlignStyle(align),
24
24
  sizeAndHeight,
@@ -27,6 +27,9 @@ function InternalTypography({ fontFamily, fontStyle, fontWeight, transform, colo
27
27
  if (strikeThrough) {
28
28
  style.push(styles.strikeThrough);
29
29
  }
30
+ if (fontStyle === "italic") {
31
+ style.push(styles.italic);
32
+ }
30
33
  const numberOfLinesForNativeText = maxNumberOfLines[maxLines];
31
34
  const text = getTransformedText(children, transform);
32
35
  const accessibilityProps = hideFromScreenReader
@@ -49,10 +52,10 @@ function getScaleMultiplier(maxFontScaleSize = 0, size = 1) {
49
52
  return undefined;
50
53
  return maxFontScaleSize / size;
51
54
  }
52
- function getFontStyle(fontFamily = "base", fontStyle = "regular", fontWeight = "regular") {
55
+ function getFontStyle(fontFamily = "base", fontWeight = "regular") {
53
56
  const defaultBaseFontStyling = styles.baseRegularRegular;
54
57
  const defaultDisplayFontStyling = styles.displayRegularBold;
55
- const styleKey = `${fontFamily}${capitalize(fontStyle)}${capitalize(fontWeight)}`;
58
+ const styleKey = `${fontFamily}Regular${capitalize(fontWeight)}`;
56
59
  const fontStyling = styles[styleKey];
57
60
  if (fontStyling) {
58
61
  return fontStyling;
@@ -48,7 +48,9 @@ const fonts = Platform.select({
48
48
  /**
49
49
  * Reusable typography tokens to ensure consistency for any client facing texts.
50
50
  */
51
- export const typographyTokens = Object.assign(Object.assign({}, fonts), { startAlign: {
51
+ export const typographyTokens = Object.assign(Object.assign({}, fonts), { italic: {
52
+ fontStyle: "italic",
53
+ }, startAlign: {
52
54
  textAlign: "left",
53
55
  }, endAlign: {
54
56
  textAlign: "right",