@jobber/components-native 0.1.3 → 0.2.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/src/Divider/Divider.style.js +6 -7
- package/dist/src/Typography/Typography.js +98 -0
- package/dist/src/Typography/Typography.style.js +280 -0
- package/dist/src/Typography/TypographyGestureDetector.js +10 -0
- package/dist/src/Typography/index.js +3 -0
- package/dist/src/index.js +1 -0
- package/dist/src/utils/design/index.js +6 -0
- package/dist/src/utils/intl/capitalize.js +6 -0
- package/dist/src/utils/intl/index.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/Typography/Typography.d.ts +101 -0
- package/dist/types/src/Typography/Typography.style.d.ts +20 -0
- package/dist/types/src/Typography/TypographyGestureDetector.d.ts +7 -0
- package/dist/types/src/Typography/index.d.ts +4 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/utils/design/index.d.ts +2 -0
- package/dist/types/src/utils/intl/capitalize.d.ts +1 -0
- package/dist/types/src/utils/intl/index.d.ts +1 -0
- package/package.json +6 -3
- package/src/Divider/Divider.style.ts +6 -7
- package/src/Divider/Divider.test.tsx +34 -0
- package/src/Icon/Icon.test.tsx +39 -0
- package/src/Icon/__snapshots__/Icon.test.tsx.snap +403 -0
- package/src/Typography/Typography.style.ts +364 -0
- package/src/Typography/Typography.tsx +368 -0
- package/src/Typography/TypographyGestureDetector.tsx +13 -0
- package/src/Typography/index.ts +22 -0
- package/src/index.ts +1 -0
- package/src/utils/design/index.ts +8 -0
- package/src/utils/intl/capitalize.ts +6 -0
- package/src/utils/intl/index.ts +1 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from "react";
|
|
2
|
+
import { Gesture, GestureDetector } from "react-native-gesture-handler";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This is a workaround suggested by react-native-gesture-handler to prevent
|
|
6
|
+
* accidental highlighting of text in Android devices
|
|
7
|
+
* https://github.com/software-mansion/react-native-gesture-handler/issues/1372
|
|
8
|
+
*/
|
|
9
|
+
export function TypographyGestureDetector(
|
|
10
|
+
props: PropsWithChildren<unknown>,
|
|
11
|
+
): JSX.Element {
|
|
12
|
+
return <GestureDetector {...props} gesture={Gesture.Native()} />;
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { Typography } from "./Typography";
|
|
2
|
+
export type {
|
|
3
|
+
FontFamily,
|
|
4
|
+
FontStyle,
|
|
5
|
+
FontWeight,
|
|
6
|
+
BaseWeight,
|
|
7
|
+
DisplayWeight,
|
|
8
|
+
BaseStyle,
|
|
9
|
+
DisplayStyle,
|
|
10
|
+
TextColor,
|
|
11
|
+
TextTransform,
|
|
12
|
+
TextSize,
|
|
13
|
+
TextAlign,
|
|
14
|
+
LineHeight,
|
|
15
|
+
LetterSpacing,
|
|
16
|
+
TextAccessibilityRole,
|
|
17
|
+
TextVariation,
|
|
18
|
+
TypographyProps,
|
|
19
|
+
TruncateLength,
|
|
20
|
+
} from "./Typography";
|
|
21
|
+
export { typographyStyles } from "./Typography.style";
|
|
22
|
+
export { TypographyGestureDetector } from "./TypographyGestureDetector";
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JobberStyle as mobileFoundationBase } from "@jobber/design/foundation.native";
|
|
2
|
+
import { Platform } from "react-native";
|
|
3
|
+
|
|
4
|
+
export const tokens: typeof mobileFoundationBase = Platform.select({
|
|
5
|
+
ios: () => require("@jobber/design/foundation.ios").JobberStyle,
|
|
6
|
+
android: () => require("@jobber/design/foundation.android").JobberStyle,
|
|
7
|
+
default: () => require("@jobber/design/foundation.native").JobberStyle,
|
|
8
|
+
})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { capitalize } from "./capitalize";
|