@jobber/components-native 0.40.0 → 0.41.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.
Files changed (95) hide show
  1. package/dist/src/FormatFile/FormatFile.js +114 -0
  2. package/dist/src/FormatFile/FormatFile.style.js +16 -0
  3. package/dist/src/FormatFile/components/ErrorIcon/ErrorIcon.js +8 -0
  4. package/dist/src/FormatFile/components/ErrorIcon/ErrorIcon.style.js +10 -0
  5. package/dist/src/FormatFile/components/ErrorIcon/index.js +1 -0
  6. package/dist/src/FormatFile/components/FileView/FileView.js +67 -0
  7. package/dist/src/FormatFile/components/FileView/FileView.style.js +64 -0
  8. package/dist/src/FormatFile/components/FileView/index.js +1 -0
  9. package/dist/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.js +22 -0
  10. package/dist/src/FormatFile/components/FormatFileBottomSheet/index.js +1 -0
  11. package/dist/src/FormatFile/components/FormatFileBottomSheet/messages.js +13 -0
  12. package/dist/src/FormatFile/components/MediaView/MediaView.js +56 -0
  13. package/dist/src/FormatFile/components/MediaView/MediaView.style.js +27 -0
  14. package/dist/src/FormatFile/components/MediaView/index.js +1 -0
  15. package/dist/src/FormatFile/components/ProgressBar/ProgressBar.js +29 -0
  16. package/dist/src/FormatFile/components/ProgressBar/ProgressBar.style.js +15 -0
  17. package/dist/src/FormatFile/components/ProgressBar/index.js +1 -0
  18. package/dist/src/FormatFile/components/_mocks/mockFiles.js +78 -0
  19. package/dist/src/FormatFile/constants.js +14 -0
  20. package/dist/src/FormatFile/context/FormatFileContext.js +8 -0
  21. package/dist/src/FormatFile/context/types.js +1 -0
  22. package/dist/src/FormatFile/index.js +1 -0
  23. package/dist/src/FormatFile/messages.js +23 -0
  24. package/dist/src/FormatFile/types.js +8 -0
  25. package/dist/src/FormatFile/utils/computeA11yLabel.js +12 -0
  26. package/dist/src/FormatFile/utils/createUseCreateThumbnail.js +22 -0
  27. package/dist/src/FormatFile/utils/index.js +1 -0
  28. package/dist/src/InputText/InputText.js +8 -1
  29. package/dist/src/index.js +1 -0
  30. package/dist/src/utils/test/wait.js +1 -1
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/dist/types/src/Form/components/FormMessage/FormMessage.d.ts +1 -0
  33. package/dist/types/src/FormatFile/FormatFile.d.ts +47 -0
  34. package/dist/types/src/FormatFile/FormatFile.style.d.ts +14 -0
  35. package/dist/types/src/FormatFile/components/ErrorIcon/ErrorIcon.d.ts +2 -0
  36. package/dist/types/src/FormatFile/components/ErrorIcon/ErrorIcon.style.d.ts +8 -0
  37. package/dist/types/src/FormatFile/components/ErrorIcon/index.d.ts +1 -0
  38. package/dist/types/src/FormatFile/components/FileView/FileView.d.ts +12 -0
  39. package/dist/types/src/FormatFile/components/FileView/FileView.style.d.ts +62 -0
  40. package/dist/types/src/FormatFile/components/FileView/index.d.ts +1 -0
  41. package/dist/types/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.d.ts +11 -0
  42. package/dist/types/src/FormatFile/components/FormatFileBottomSheet/index.d.ts +2 -0
  43. package/dist/types/src/FormatFile/components/FormatFileBottomSheet/messages.d.ts +12 -0
  44. package/dist/types/src/FormatFile/components/MediaView/MediaView.d.ts +12 -0
  45. package/dist/types/src/FormatFile/components/MediaView/MediaView.style.d.ts +25 -0
  46. package/dist/types/src/FormatFile/components/MediaView/index.d.ts +1 -0
  47. package/dist/types/src/FormatFile/components/ProgressBar/ProgressBar.d.ts +19 -0
  48. package/dist/types/src/FormatFile/components/ProgressBar/ProgressBar.style.d.ts +13 -0
  49. package/dist/types/src/FormatFile/components/ProgressBar/index.d.ts +1 -0
  50. package/dist/types/src/FormatFile/components/_mocks/mockFiles.d.ts +18 -0
  51. package/dist/types/src/FormatFile/constants.d.ts +6 -0
  52. package/dist/types/src/FormatFile/context/FormatFileContext.d.ts +10 -0
  53. package/dist/types/src/FormatFile/context/types.d.ts +9 -0
  54. package/dist/types/src/FormatFile/index.d.ts +3 -0
  55. package/dist/types/src/FormatFile/messages.d.ts +22 -0
  56. package/dist/types/src/FormatFile/types.d.ts +105 -0
  57. package/dist/types/src/FormatFile/utils/computeA11yLabel.d.ts +9 -0
  58. package/dist/types/src/FormatFile/utils/createUseCreateThumbnail.d.ts +5 -0
  59. package/dist/types/src/FormatFile/utils/index.d.ts +1 -0
  60. package/dist/types/src/InputCurrency/InputCurrency.d.ts +1 -1
  61. package/dist/types/src/index.d.ts +1 -0
  62. package/package.json +3 -2
  63. package/src/FormatFile/FormatFile.style.ts +17 -0
  64. package/src/FormatFile/FormatFile.test.tsx +333 -0
  65. package/src/FormatFile/FormatFile.tsx +300 -0
  66. package/src/FormatFile/components/ErrorIcon/ErrorIcon.style.ts +11 -0
  67. package/src/FormatFile/components/ErrorIcon/ErrorIcon.tsx +12 -0
  68. package/src/FormatFile/components/ErrorIcon/index.ts +1 -0
  69. package/src/FormatFile/components/FileView/FileView.style.ts +65 -0
  70. package/src/FormatFile/components/FileView/FileView.tsx +134 -0
  71. package/src/FormatFile/components/FileView/index.ts +1 -0
  72. package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.test.tsx +108 -0
  73. package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.tsx +56 -0
  74. package/src/FormatFile/components/FormatFileBottomSheet/index.ts +2 -0
  75. package/src/FormatFile/components/FormatFileBottomSheet/messages.ts +14 -0
  76. package/src/FormatFile/components/MediaView/MediaView.style.ts +28 -0
  77. package/src/FormatFile/components/MediaView/MediaView.tsx +145 -0
  78. package/src/FormatFile/components/MediaView/index.ts +1 -0
  79. package/src/FormatFile/components/ProgressBar/ProgressBar.style.tsx +16 -0
  80. package/src/FormatFile/components/ProgressBar/ProgressBar.tsx +57 -0
  81. package/src/FormatFile/components/ProgressBar/index.ts +1 -0
  82. package/src/FormatFile/components/_mocks/mockFiles.ts +105 -0
  83. package/src/FormatFile/constants.ts +15 -0
  84. package/src/FormatFile/context/FormatFileContext.ts +13 -0
  85. package/src/FormatFile/context/types.ts +12 -0
  86. package/src/FormatFile/index.ts +13 -0
  87. package/src/FormatFile/messages.ts +24 -0
  88. package/src/FormatFile/types.ts +126 -0
  89. package/src/FormatFile/utils/computeA11yLabel.ts +26 -0
  90. package/src/FormatFile/utils/createUseCreateThumbnail.ts +33 -0
  91. package/src/FormatFile/utils/index.ts +1 -0
  92. package/src/InputCurrency/InputCurrency.tsx +1 -1
  93. package/src/InputText/InputText.tsx +8 -1
  94. package/src/index.ts +1 -0
  95. package/src/utils/test/wait.ts +3 -1
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  import { EmptyStateProps } from "../../../EmptyState";
3
4
  type FormMessageData = EmptyStateProps;
4
5
  /**
@@ -0,0 +1,47 @@
1
+ /// <reference types="react" />
2
+ import { BottomSheetOptionsSuffix } from "./components/FormatFileBottomSheet";
3
+ import { CreateThumbnail, File, FileUpload, FormattedFile } from "./types";
4
+ export interface FormatFileProps<T> {
5
+ /**
6
+ * File upload details object. Can be a File or a FileUpload
7
+ */
8
+ file: T;
9
+ /**
10
+ * Accessibility label
11
+ */
12
+ readonly accessibilityLabel?: string;
13
+ /**
14
+ * Accessibility hint
15
+ */
16
+ readonly accessibilityHint?: string;
17
+ /**
18
+ * A function which handles the onTap event.
19
+ */
20
+ onTap?: (file: T) => void;
21
+ /**
22
+ * A function to be called on "Remove" Bottom Sheet Option press
23
+ */
24
+ onRemove?: () => void;
25
+ /**
26
+ * Handler for the "Preview" Bottom Sheet Option press
27
+ */
28
+ onPreviewPress?: (formattedFile: FormattedFile) => void;
29
+ /**
30
+ * A file type to show at Bottom Sheet options
31
+ */
32
+ bottomSheetOptionsSuffix?: BottomSheetOptionsSuffix;
33
+ /**
34
+ * Uses a grid layout when multi-file upload is supported
35
+ */
36
+ styleInGrid?: boolean;
37
+ /**
38
+ * A reference to the element in the rendered output
39
+ */
40
+ readonly testID?: string;
41
+ /**
42
+ * Set false to hide the filetype icon
43
+ */
44
+ readonly showFileTypeIndicator?: boolean;
45
+ readonly createThumbnail?: CreateThumbnail;
46
+ }
47
+ export declare function FormatFile<T extends File | FileUpload>({ file, accessibilityLabel, accessibilityHint, onTap, onRemove, bottomSheetOptionsSuffix, styleInGrid, testID, showFileTypeIndicator, createThumbnail, onPreviewPress, }: FormatFileProps<T>): JSX.Element;
@@ -0,0 +1,14 @@
1
+ export declare const styles: {
2
+ thumbnailContainer: {
3
+ backgroundColor: string;
4
+ borderWidth: number;
5
+ borderColor: string;
6
+ borderRadius: number;
7
+ marginBottom: number;
8
+ };
9
+ thumbnailContainerGrid: {
10
+ width: number;
11
+ height: number;
12
+ marginRight: number;
13
+ };
14
+ };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function ErrorIcon(): JSX.Element;
@@ -0,0 +1,8 @@
1
+ export declare const styles: {
2
+ circle: {
3
+ width: number;
4
+ height: number;
5
+ borderRadius: number;
6
+ backgroundColor: string;
7
+ };
8
+ };
@@ -0,0 +1 @@
1
+ export { ErrorIcon } from "./ErrorIcon";
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { FormattedFile } from "../../types";
3
+ interface FileViewProps {
4
+ accessibilityLabel?: string;
5
+ showOverlay: boolean;
6
+ showError: boolean;
7
+ file: FormattedFile;
8
+ styleInGrid: boolean;
9
+ onUploadComplete: () => void;
10
+ }
11
+ export declare function FileView({ accessibilityLabel, styleInGrid, file, showOverlay, showError, onUploadComplete, }: FileViewProps): JSX.Element;
12
+ export {};
@@ -0,0 +1,62 @@
1
+ export declare const styles: {
2
+ overlay: {
3
+ backgroundColor: string;
4
+ };
5
+ overlayError: {
6
+ backgroundColor: string;
7
+ borderColor: string;
8
+ borderWidth: number;
9
+ };
10
+ iconCenter: {
11
+ marginBottom: number;
12
+ };
13
+ fileBackground: {
14
+ width: string;
15
+ display: "flex";
16
+ alignItems: "center";
17
+ };
18
+ fileBackgroundGrid: {
19
+ height: string;
20
+ };
21
+ fileBackgroundFlat: {
22
+ justifyContent: "center";
23
+ height: number;
24
+ };
25
+ fileIconGrid: {
26
+ top: number;
27
+ };
28
+ fileIconFlat: {
29
+ top: number;
30
+ };
31
+ fileNameError: {
32
+ alignItems: "center";
33
+ borderTopColor: string;
34
+ borderTopWidth: number;
35
+ width: string;
36
+ marginTop: number;
37
+ };
38
+ fileName: {
39
+ alignItems: "center";
40
+ borderTopColor: string;
41
+ borderTopWidth: number;
42
+ width: string;
43
+ };
44
+ fileNameGrid: {
45
+ position: "absolute";
46
+ right: number;
47
+ bottom: number;
48
+ left: number;
49
+ };
50
+ fileNameFlat: {
51
+ top: number;
52
+ };
53
+ fileOverlay: {
54
+ position: "absolute";
55
+ justifyContent: "center";
56
+ right: number;
57
+ bottom: number;
58
+ left: number;
59
+ height: string;
60
+ paddingHorizontal: number;
61
+ };
62
+ };
@@ -0,0 +1 @@
1
+ export { FileView } from "./FileView";
@@ -0,0 +1,11 @@
1
+ import { RefObject } from "react";
2
+ import { BottomSheetRef } from "../../../BottomSheet/BottomSheet";
3
+ export type BottomSheetOptionsSuffix = "receipt" | "image" | "file" | "video";
4
+ interface FormatFileBottomSheetProps {
5
+ bottomSheetRef: RefObject<BottomSheetRef>;
6
+ onPreviewPress?: () => void;
7
+ onRemovePress?: () => void;
8
+ bottomSheetOptionsSuffix?: BottomSheetOptionsSuffix;
9
+ }
10
+ export declare const FormatFileBottomSheet: ({ bottomSheetRef, onPreviewPress, onRemovePress, bottomSheetOptionsSuffix, }: FormatFileBottomSheetProps) => JSX.Element;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ export { FormatFileBottomSheet } from "./FormatFileBottomSheet";
2
+ export type { BottomSheetOptionsSuffix } from "./FormatFileBottomSheet";
@@ -0,0 +1,12 @@
1
+ export declare const messages: {
2
+ lightBoxPreviewButton: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ removeButton: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ };
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { FormattedFile } from "../../types";
3
+ interface MediaViewProps {
4
+ accessibilityLabel?: string;
5
+ showOverlay: boolean;
6
+ showError: boolean;
7
+ file: FormattedFile;
8
+ styleInGrid: boolean;
9
+ onUploadComplete: () => void;
10
+ }
11
+ export declare function MediaView({ accessibilityLabel, showOverlay, showError, file, styleInGrid, onUploadComplete, }: MediaViewProps): JSX.Element;
12
+ export {};
@@ -0,0 +1,25 @@
1
+ export declare const styles: {
2
+ imageBackground: {
3
+ width: string;
4
+ justifyContent: "center";
5
+ alignItems: "center";
6
+ };
7
+ imageBackgroundFlat: {
8
+ aspectRatio: number;
9
+ };
10
+ imageBackgroundGrid: {
11
+ height: string;
12
+ };
13
+ overlay: {
14
+ height: string;
15
+ backgroundColor: string;
16
+ paddingHorizontal: number;
17
+ };
18
+ overlayError: {
19
+ height: string;
20
+ backgroundColor: string;
21
+ paddingHorizontal: number;
22
+ borderColor: string;
23
+ borderWidth: number;
24
+ };
25
+ };
@@ -0,0 +1 @@
1
+ export { MediaView } from "./MediaView";
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ /// <reference types="react" />
3
+ import { StatusCode } from "../../types";
4
+ interface ProgressBarProps {
5
+ /**
6
+ * Upload progress value from 0 to 1
7
+ */
8
+ progress: number;
9
+ /**
10
+ * Upload status
11
+ */
12
+ status: StatusCode;
13
+ /**
14
+ * Function to be called when the progress is finished
15
+ */
16
+ onComplete?: () => void;
17
+ }
18
+ export declare const ProgressBar: ({ progress, status, onComplete, }: ProgressBarProps) => JSX.Element;
19
+ export {};
@@ -0,0 +1,13 @@
1
+ export declare const styles: {
2
+ container: {
3
+ width: string;
4
+ height: number;
5
+ borderRadius: number;
6
+ overflow: "hidden";
7
+ backgroundColor: string;
8
+ };
9
+ progress: {
10
+ height: string;
11
+ backgroundColor: string;
12
+ };
13
+ };
@@ -0,0 +1 @@
1
+ export { ProgressBar } from "./ProgressBar";
@@ -0,0 +1,18 @@
1
+ import { File, FileUpload, StatusCode } from "../../types";
2
+ export declare const FILE_UPLOAD_MOCK_FILE: ({ progress, status, }: {
3
+ progress: number;
4
+ status?: StatusCode | undefined;
5
+ }) => FileUpload;
6
+ export declare const FILE_UPLOAD_MOCK_IMAGE: ({ progress, size, status, }: {
7
+ progress: number;
8
+ size?: number | undefined;
9
+ status?: StatusCode | undefined;
10
+ }) => FileUpload;
11
+ export declare const FILE_UPLOAD_MOCK_PDF: ({ progress, status, }: {
12
+ progress: number;
13
+ status?: StatusCode | undefined;
14
+ }) => FileUpload;
15
+ export declare const FILE_MOCK_PDF: File;
16
+ export declare const FILE_MOCK_VIDEO: File;
17
+ export declare const FILE_MOCK_FILE: File;
18
+ export declare const FILE_MOCK_IMAGE: File;
@@ -0,0 +1,6 @@
1
+ export declare const acceptedExtensions: {
2
+ name: string;
3
+ }[];
4
+ export declare const videoExtensions: {
5
+ type: string;
6
+ }[];
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { AtlantisFormatFileContextProps } from "./types";
3
+ export declare const formatFileContextDefaultValues: {
4
+ useCreateThumbnail: () => {
5
+ thumbnail: undefined;
6
+ error: boolean;
7
+ };
8
+ };
9
+ export declare const AtlantisFormatFileContext: import("react").Context<AtlantisFormatFileContextProps>;
10
+ export declare function useAtlantisFormatFileContext(): AtlantisFormatFileContextProps;
@@ -0,0 +1,9 @@
1
+ import { FormattedFile } from "../types";
2
+ export interface UseCreateThumbnailResponse {
3
+ readonly thumbnail: string | undefined;
4
+ readonly error: boolean;
5
+ }
6
+ export type UseCreateThumbnail = (formattedFile: FormattedFile) => UseCreateThumbnailResponse;
7
+ export interface AtlantisFormatFileContextProps {
8
+ useCreateThumbnail: UseCreateThumbnail;
9
+ }
@@ -0,0 +1,3 @@
1
+ export { FormatFile, FormatFileProps } from "./FormatFile";
2
+ export type { FormattedFile, File, CreateThumbnail, CreateThumbnailResponse, FileUpload, StatusCode, } from "./types";
3
+ export type { UseCreateThumbnail, UseCreateThumbnailResponse, } from "./context/types";
@@ -0,0 +1,22 @@
1
+ export declare const messages: {
2
+ defaultAccessibilityLabel: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ defaultAccessibilityHint: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ errorAccessibilityLabel: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ inProgressAccessibilityLabel: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
22
+ };
@@ -0,0 +1,105 @@
1
+ export declare enum StatusCode {
2
+ Pending = 0,
3
+ Started = 1,
4
+ InProgress = 2,
5
+ Completed = 3,
6
+ Failed = 4
7
+ }
8
+ export interface FileUpload {
9
+ /**
10
+ * File Identifier
11
+ */
12
+ key?: string;
13
+ /**
14
+ * Universally unique identifier
15
+ */
16
+ readonly uuid: string;
17
+ /**
18
+ * The name of the file.
19
+ */
20
+ readonly name: string;
21
+ /**
22
+ * The [MIME](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) type of the file
23
+ */
24
+ readonly type: string;
25
+ /**
26
+ * The size of the file in bytes.
27
+ */
28
+ readonly size: number;
29
+ /**
30
+ * The progress of a file upload between 0 and 1.
31
+ * - `0` represents Upload just started.
32
+ * - `1` represents a complete upload.
33
+ */
34
+ readonly progress: number;
35
+ /**
36
+ * The upload status of the file
37
+ */
38
+ status: StatusCode;
39
+ /**
40
+ * Represents the width and height for images
41
+ */
42
+ readonly dimension?: {
43
+ width: number;
44
+ height: number;
45
+ };
46
+ /**
47
+ * Provides context about multi-file upload batch
48
+ */
49
+ readonly batchContext: {
50
+ /**
51
+ * Batch id
52
+ */
53
+ readonly batchId: string;
54
+ /**
55
+ * Number of files in batch
56
+ */
57
+ readonly batchCount: number;
58
+ };
59
+ /**
60
+ * Url file was uploaded to, used to send in mutation to JO
61
+ */
62
+ uploadUrl?: string;
63
+ /**
64
+ * The url of the file.
65
+ */
66
+ sourcePath: string;
67
+ /**
68
+ * Cancel uploading this file
69
+ */
70
+ cancel: () => void;
71
+ /**
72
+ * Number of retries to upload
73
+ */
74
+ retries?: number;
75
+ /**
76
+ * Error message when upload fails
77
+ */
78
+ errorMessage?: string;
79
+ }
80
+ export interface File {
81
+ contentType?: string;
82
+ fileName?: string;
83
+ thumbnailUrl?: string;
84
+ url?: string;
85
+ fileSize: number;
86
+ }
87
+ export interface FormattedFile {
88
+ showPreview: boolean;
89
+ source?: string;
90
+ thumbnailUrl?: string;
91
+ name?: string;
92
+ size: number;
93
+ external: boolean;
94
+ progress: number;
95
+ status: StatusCode;
96
+ error: boolean;
97
+ type?: string;
98
+ isMedia?: boolean;
99
+ showFileTypeIndicator: boolean;
100
+ }
101
+ export interface CreateThumbnailResponse {
102
+ readonly thumbnail: string | undefined;
103
+ readonly error: boolean;
104
+ }
105
+ export type CreateThumbnail = (formattedFile: FormattedFile) => Promise<CreateThumbnailResponse>;
@@ -0,0 +1,9 @@
1
+ import { MessageDescriptor } from "react-intl";
2
+ interface params {
3
+ accessibilityLabel?: string;
4
+ showOverlay: boolean;
5
+ showError: boolean;
6
+ formatMessage: (message: MessageDescriptor) => string;
7
+ }
8
+ export declare function computeA11yLabel({ accessibilityLabel, showOverlay, showError, formatMessage, }: params): string;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ import { UseCreateThumbnail } from "../context/types";
2
+ import { CreateThumbnail } from "../types";
3
+ export declare function createUseCreateThumbnail(createThumbnail: CreateThumbnail): {
4
+ useCreateThumbnail: UseCreateThumbnail;
5
+ };
@@ -0,0 +1 @@
1
+ export { computeA11yLabel } from "./computeA11yLabel";
@@ -28,5 +28,5 @@ export interface InputCurrencyProps extends Omit<InputTextProps, "keyboard" | "o
28
28
  defaultValue?: number;
29
29
  keyboard?: "decimal-pad" | "numbers-and-punctuation";
30
30
  }
31
- export declare const getInternalValue: (props: InputCurrencyProps, field: ControllerRenderProps<FieldValues, string>, formatNumber: (value: number | bigint, opts?: FormatNumberOptions | undefined) => string) => string;
31
+ export declare const getInternalValue: (props: InputCurrencyProps, field: ControllerRenderProps<FieldValues, string>, formatNumber: (value: number, opts?: FormatNumberOptions | undefined) => string) => string;
32
32
  export declare function InputCurrency(props: InputCurrencyProps): JSX.Element;
@@ -16,6 +16,7 @@ export * from "./Divider";
16
16
  export * from "./EmptyState";
17
17
  export * from "./ErrorMessageWrapper";
18
18
  export * from "./Flex";
19
+ export * from "./FormatFile";
19
20
  export * from "./Form";
20
21
  export * from "./FormField";
21
22
  export * from "./Heading";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.40.0",
3
+ "version": "0.41.0",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -36,6 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@jobber/design": "^0.42.0",
39
+ "@jobber/hooks": "^2.1.4",
39
40
  "@react-native-picker/picker": "^2.4.10",
40
41
  "deepmerge": "^4.2.2",
41
42
  "lodash": "^4.17.21",
@@ -76,5 +77,5 @@
76
77
  "react-native": ">=0.69.2",
77
78
  "react-native-modal-datetime-picker": " >=13.0.0"
78
79
  },
79
- "gitHead": "1693e3ec2d25c6d53581ea586364fa5d651bd210"
80
+ "gitHead": "8e761f04a43fe434f3b2ba0285958d94d14ffa7f"
80
81
  }
@@ -0,0 +1,17 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { tokens } from "../utils/design";
3
+
4
+ export const styles = StyleSheet.create({
5
+ thumbnailContainer: {
6
+ backgroundColor: tokens["color-surface--background"],
7
+ borderWidth: tokens["border-base"],
8
+ borderColor: tokens["color-border"],
9
+ borderRadius: tokens["radius-base"],
10
+ marginBottom: tokens["space-small"],
11
+ },
12
+ thumbnailContainerGrid: {
13
+ width: tokens["space-extravagant"],
14
+ height: tokens["space-extravagant"],
15
+ marginRight: tokens["space-small"],
16
+ },
17
+ });