@jobber/components-native 0.66.2 → 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 +2 -2
- package/dist/src/Heading/Heading.js +2 -2
- package/dist/src/Heading/index.js +1 -1
- package/dist/src/Text/Text.js +2 -2
- package/dist/src/Text/index.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/Heading/Heading.d.ts +1 -0
- package/dist/types/src/Heading/index.d.ts +1 -1
- package/dist/types/src/Text/Text.d.ts +1 -0
- package/dist/types/src/Text/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/Heading/Heading.tsx +2 -2
- package/src/Heading/index.ts +1 -1
- package/src/Text/Text.tsx +2 -2
- package/src/Text/index.ts +1 -1
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -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": "
|
|
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
|
|
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:
|
|
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";
|
package/dist/src/Text/Text.js
CHANGED
|
@@ -12,13 +12,13 @@ const levelStyles = {
|
|
|
12
12
|
},
|
|
13
13
|
};
|
|
14
14
|
const MAX_TEXT_FONT_SIZE_SCALE = 50;
|
|
15
|
-
const
|
|
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 ||
|
|
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,
|
package/dist/src/Text/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Text } from "./Text";
|
|
1
|
+
export { Text, TEXT_MAX_SCALED_FONT_SIZES } from "./Text";
|