@jobber/components-native 0.84.0 → 0.84.1-JOB-131539-d38df57.11

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.84.0",
3
+ "version": "0.84.1-JOB-131539-d38df57.11+d38df57b9",
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": "5fcbf313b34c60eb45e8985527acb880421690e3"
82
+ "gitHead": "d38df57b93ea7712e1a5c0e901c7469b2d9f3da5"
83
83
  }
@@ -28,10 +28,10 @@ export function Select({ value, defaultValue, onChange, children, placeholder, l
28
28
  React.createElement(View, { testID: getTestID(testID), accessible: true, accessibilityLabel: getA11yLabel(), accessibilityValue: { text: getValue() }, accessibilityHint: t("Select.a11yHint"), accessibilityRole: "button", accessibilityState: { disabled: disabled } },
29
29
  React.createElement(SelectInternalPicker, { disabled: disabled, options: getOptions(), onChange: handleChange },
30
30
  React.createElement(View, { style: [styles.container, (invalid || !!error) && styles.invalid] },
31
- label && (React.createElement(Text, { level: "textSupporting", variation: textVariation, hideFromScreenReader: true }, label)),
31
+ label && (React.createElement(Text, { level: "textSupporting", variation: textVariation, hideFromScreenReader: true, selectable: false }, label)),
32
32
  React.createElement(View, { style: styles.input },
33
33
  React.createElement(View, { style: styles.value },
34
- React.createElement(Text, { variation: disabled ? "disabled" : "base", hideFromScreenReader: true }, getValue())),
34
+ React.createElement(Text, { variation: disabled ? "disabled" : "base", hideFromScreenReader: true, selectable: false }, getValue())),
35
35
  React.createElement(View, { style: styles.icon },
36
36
  React.createElement(Icon, { name: "arrowDown", color: valueTextVariation }))))))));
37
37
  function getA11yLabel() {
@@ -47,11 +47,16 @@ function InternalTypography({ fontFamily, fontStyle, fontWeight, transform, colo
47
47
  }
48
48
  : { accessibilityRole };
49
49
  const { tokens } = useAtlantisTheme();
50
- return (React.createElement(TypographyGestureDetector, null,
51
- React.createElement(Text, Object.assign({ allowFontScaling,
52
- adjustsFontSizeToFit,
53
- style,
54
- numberOfLines: numberOfLinesForNativeText }, accessibilityProps, { maxFontSizeMultiplier: getScaleMultiplier(maxFontScaleSize, sizeAndHeight.fontSize), selectable: selectable, selectionColor: tokens["color-brand--highlight"], onTextLayout: onTextLayout }), text)));
50
+ const textComponent = (React.createElement(Text, Object.assign({ allowFontScaling,
51
+ adjustsFontSizeToFit,
52
+ style,
53
+ numberOfLines: numberOfLinesForNativeText }, accessibilityProps, { maxFontSizeMultiplier: getScaleMultiplier(maxFontScaleSize, sizeAndHeight.fontSize), selectable: selectable, selectionColor: tokens["color-brand--highlight"], onTextLayout: onTextLayout }), text));
54
+ // If text is not selectable, there's no need for TypographyGestureDetector
55
+ // since it only prevents accidental highlighting of selectable text
56
+ if (!selectable) {
57
+ return textComponent;
58
+ }
59
+ return React.createElement(TypographyGestureDetector, null, textComponent);
55
60
  }
56
61
  function getScaleMultiplier(maxFontScaleSize = 0, size = 1) {
57
62
  if (maxFontScaleSize === 0)