@jobber/components-native 0.69.2 → 0.69.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.69.2",
3
+ "version": "0.69.4",
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.62.2",
39
+ "@jobber/design": "^0.63.0",
40
40
  "@jobber/hooks": "^2.10.2",
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": "286b357ffa0945aad45139fa031bee27bbb479eb"
87
+ "gitHead": "540ed88344aa92c9f29d99113173d6278c54b55a"
88
88
  }
@@ -16,15 +16,16 @@ export const TEXT_MAX_SCALED_FONT_SIZES = {
16
16
  text: MAX_TEXT_FONT_SIZE_SCALE,
17
17
  textSupporting: tokens["typography--fontSize-base"],
18
18
  };
19
- export function Text({ level = "text", variation = "base", emphasis, allowFontScaling = true, adjustsFontSizeToFit = false, maxLines = "unlimited", align, children, reverseTheme = false, strikeThrough = false, hideFromScreenReader = false, maxFontScaleSize, selectable, }) {
19
+ export function Text({ level = "text", variation = "base", emphasis, allowFontScaling = true, adjustsFontSizeToFit = false, maxLines = "unlimited", align, children, reverseTheme = false, strikeThrough = false, italic = false, hideFromScreenReader = false, maxFontScaleSize, selectable, }) {
20
20
  const accessibilityRole = "text";
21
- return (React.createElement(Typography, Object.assign({ color: variation, fontFamily: "base", fontStyle: "regular", fontWeight: getFontWeight({ level, emphasis }), maxFontScaleSize: maxFontScaleSize || TEXT_MAX_SCALED_FONT_SIZES[level], selectable: selectable }, Object.assign(Object.assign({}, levelStyles[level]), { allowFontScaling,
21
+ return (React.createElement(Typography, Object.assign({ color: variation, fontFamily: "base", fontStyle: italic ? "italic" : "regular", fontWeight: getFontWeight({ level, emphasis }), maxFontScaleSize: maxFontScaleSize || TEXT_MAX_SCALED_FONT_SIZES[level], selectable: selectable }, Object.assign(Object.assign({}, levelStyles[level]), { allowFontScaling,
22
22
  align,
23
23
  adjustsFontSizeToFit,
24
24
  accessibilityRole,
25
25
  reverseTheme,
26
26
  maxLines,
27
27
  strikeThrough,
28
+ italic,
28
29
  hideFromScreenReader })), children));
29
30
  }
30
31
  function getFontWeight({ level, emphasis, }) {
@@ -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
@@ -25,6 +25,21 @@ const deviceFonts = {
25
25
  baseRegularExtraBold: {
26
26
  fontFamily: "inter-extrabold",
27
27
  },
28
+ baseItalicRegular: {
29
+ fontFamily: "inter-italic",
30
+ },
31
+ baseItalicMedium: {
32
+ fontFamily: "inter-italic-medium",
33
+ },
34
+ baseItalicBold: {
35
+ fontFamily: "inter-italic-bold",
36
+ },
37
+ baseItalicSemiBold: {
38
+ fontFamily: "inter-italic-semibold",
39
+ },
40
+ baseItalicExtraBold: {
41
+ fontFamily: "inter-italic-extrabold",
42
+ },
28
43
  displayRegularBold: {
29
44
  fontFamily: "jobberpro-bd",
30
45
  },
@@ -48,7 +63,9 @@ const fonts = Platform.select({
48
63
  /**
49
64
  * Reusable typography tokens to ensure consistency for any client facing texts.
50
65
  */
51
- export const typographyTokens = Object.assign(Object.assign({}, fonts), { startAlign: {
66
+ export const typographyTokens = Object.assign(Object.assign({}, fonts), { italic: {
67
+ fontStyle: "italic",
68
+ }, startAlign: {
52
69
  textAlign: "left",
53
70
  }, endAlign: {
54
71
  textAlign: "right",