@jobber/components-native 0.66.2-design-css.5 → 0.67.0

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.66.2-design-css.5+3db05143",
3
+ "version": "0.67.0",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -36,8 +36,8 @@
36
36
  "build:clean": "rm -rf ./dist"
37
37
  },
38
38
  "dependencies": {
39
- "@jobber/design": "^0.59.1-design-css.7+3db05143",
40
- "@jobber/hooks": "^2.9.6",
39
+ "@jobber/design": "^0.59.0",
40
+ "@jobber/hooks": "^2.9.7",
41
41
  "@react-native-clipboard/clipboard": "^1.11.2",
42
42
  "@react-native-picker/picker": "^2.4.10",
43
43
  "autolinker": "^4.0.0",
@@ -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": "3db0514327c1a046e50aa3a202283440a19c71ea"
87
+ "gitHead": "40221a402c4da0c8b71d5efd064004675b791a9a"
88
88
  }
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { Typography, } from "../Typography";
3
3
  import { tokens } from "../utils/design";
4
- const maxScaledFontSize = {
4
+ export const HEADING_MAX_SCALED_FONT_SIZE = {
5
5
  subHeading: tokens["typography--fontSize-base"] * 1.375,
6
6
  heading: tokens["typography--fontSize-base"] * 1.5,
7
7
  subtitle: tokens["typography--fontSize-base"] * 1.5,
@@ -14,7 +14,7 @@ export function Heading({ children, level, variation = "heading", reverseTheme =
14
14
  reverseTheme,
15
15
  align,
16
16
  maxLines,
17
- allowFontScaling }), { maxFontScaleSize: maxScaledFontSize[level], selectable: selectable }), children));
17
+ allowFontScaling }), { maxFontScaleSize: HEADING_MAX_SCALED_FONT_SIZE[level], selectable: selectable }), children));
18
18
  }
19
19
  function getHeadingStyle(level = "heading", variation) {
20
20
  const headingLevelToStyle = {
@@ -1 +1 @@
1
- export { Heading } from "./Heading";
1
+ export { Heading, HEADING_MAX_SCALED_FONT_SIZE } from "./Heading";
@@ -12,13 +12,13 @@ const levelStyles = {
12
12
  },
13
13
  };
14
14
  const MAX_TEXT_FONT_SIZE_SCALE = 50;
15
- const maxScaledFontSize = {
15
+ 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
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, }) {
20
20
  const accessibilityRole = "text";
21
- return (React.createElement(Typography, Object.assign({ color: variation, fontFamily: "base", fontStyle: "regular", fontWeight: getFontWeight({ level, emphasis }), maxFontScaleSize: maxFontScaleSize || maxScaledFontSize[level], selectable: selectable }, Object.assign(Object.assign({}, levelStyles[level]), { allowFontScaling,
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,
22
22
  align,
23
23
  adjustsFontSizeToFit,
24
24
  accessibilityRole,
@@ -1 +1 @@
1
- export { Text } from "./Text";
1
+ export { Text, TEXT_MAX_SCALED_FONT_SIZES } from "./Text";