@jobber/components-native 0.82.0 → 0.82.1-JOB-131123-e5eeb18.39

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.82.0",
3
+ "version": "0.82.1-JOB-131123-e5eeb18.39+e5eeb18c",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -79,5 +79,5 @@
79
79
  "react-native-safe-area-context": "^5.4.0",
80
80
  "react-native-svg": ">=12.0.0"
81
81
  },
82
- "gitHead": "aeb1668b7f54843f828fbeda0c30bcc968cdfb64"
82
+ "gitHead": "e5eeb18c68dd0ac545e56ef87cd7ca8f1edac8e9"
83
83
  }
@@ -16,9 +16,9 @@ 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, italic = false, hideFromScreenReader = false, maxFontScaleSize, UNSAFE_style, underline, 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, UNSAFE_style, underline, selectable, onTextLayout, }) {
20
20
  const accessibilityRole = "text";
21
- return (React.createElement(Typography, Object.assign({ color: variation, UNSAFE_style: UNSAFE_style, fontFamily: "base", fontStyle: italic ? "italic" : "regular", fontWeight: getFontWeight({ level, emphasis }), maxFontScaleSize: maxFontScaleSize || TEXT_MAX_SCALED_FONT_SIZES[level], selectable: selectable, underline: underline }, levelStyles[level], { allowFontScaling,
21
+ return (React.createElement(Typography, Object.assign({ color: variation, UNSAFE_style: UNSAFE_style, fontFamily: "base", fontStyle: italic ? "italic" : "regular", fontWeight: getFontWeight({ level, emphasis }), maxFontScaleSize: maxFontScaleSize || TEXT_MAX_SCALED_FONT_SIZES[level], selectable: selectable, underline: underline, onTextLayout: onTextLayout }, levelStyles[level], { allowFontScaling,
22
22
  align,
23
23
  adjustsFontSizeToFit,
24
24
  accessibilityRole,
@@ -14,7 +14,7 @@ const maxNumberOfLines = {
14
14
  };
15
15
  export const Typography = React.memo(InternalTypography);
16
16
  // eslint-disable-next-line max-statements
17
- function InternalTypography({ fontFamily, fontStyle, fontWeight, transform, color, align, size = "default", children, maxLines = "unlimited", allowFontScaling = true, maxFontScaleSize, adjustsFontSizeToFit = false, lineHeight, letterSpacing = "base", reverseTheme = false, hideFromScreenReader = false, accessibilityRole = "text", strikeThrough = false, underline, UNSAFE_style, selectable = true, }) {
17
+ function InternalTypography({ fontFamily, fontStyle, fontWeight, transform, color, align, size = "default", children, maxLines = "unlimited", allowFontScaling = true, maxFontScaleSize, adjustsFontSizeToFit = false, lineHeight, letterSpacing = "base", reverseTheme = false, hideFromScreenReader = false, accessibilityRole = "text", strikeThrough = false, underline, UNSAFE_style, selectable = true, onTextLayout, }) {
18
18
  const styles = useTypographyStyles();
19
19
  const sizeAndHeight = getSizeAndHeightStyle(size, styles, lineHeight);
20
20
  const style = [
@@ -51,7 +51,7 @@ function InternalTypography({ fontFamily, fontStyle, fontWeight, transform, colo
51
51
  React.createElement(Text, Object.assign({ allowFontScaling,
52
52
  adjustsFontSizeToFit,
53
53
  style,
54
- numberOfLines: numberOfLinesForNativeText }, accessibilityProps, { maxFontSizeMultiplier: getScaleMultiplier(maxFontScaleSize, sizeAndHeight.fontSize), selectable: selectable, selectionColor: tokens["color-brand--highlight"] }), text)));
54
+ numberOfLines: numberOfLinesForNativeText }, accessibilityProps, { maxFontSizeMultiplier: getScaleMultiplier(maxFontScaleSize, sizeAndHeight.fontSize), selectable: selectable, selectionColor: tokens["color-brand--highlight"], onTextLayout: onTextLayout }), text)));
55
55
  }
56
56
  function getScaleMultiplier(maxFontScaleSize = 0, size = 1) {
57
57
  if (maxFontScaleSize === 0)