@terreno/ui 0.29.0 → 0.31.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/LICENSE +21 -203
- package/dist/AiSuggestionBox.js +7 -12
- package/dist/AiSuggestionBox.js.map +1 -1
- package/dist/Common.d.ts +65 -0
- package/dist/Common.js.map +1 -1
- package/dist/EditableCard.d.ts +3 -0
- package/dist/EditableCard.js +23 -0
- package/dist/EditableCard.js.map +1 -0
- package/dist/Theme.js +1 -0
- package/dist/Theme.js.map +1 -1
- package/dist/ThumbsUpDownFeedback.d.ts +8 -0
- package/dist/ThumbsUpDownFeedback.js +60 -0
- package/dist/ThumbsUpDownFeedback.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/src/ActionSheet.test.tsx +80 -37
- package/src/AiSuggestionBox.test.tsx +2 -2
- package/src/AiSuggestionBox.tsx +17 -48
- package/src/Common.ts +75 -0
- package/src/ConsentHistory.test.tsx +224 -0
- package/src/ConsentNavigator.test.tsx +6 -8
- package/src/DataTable.test.tsx +15 -21
- package/src/DateTimeField.test.tsx +36 -0
- package/src/DraggableList.test.tsx +377 -0
- package/src/EditableCard.test.tsx +69 -0
- package/src/EditableCard.tsx +73 -0
- package/src/PickerSelect.test.tsx +23 -12
- package/src/SidebarNavigation.test.tsx +339 -0
- package/src/SignatureCaptureField.test.tsx +30 -0
- package/src/TapToEdit.test.tsx +8 -14
- package/src/Theme.tsx +1 -0
- package/src/ThumbsUpDownFeedback.test.tsx +100 -0
- package/src/ThumbsUpDownFeedback.tsx +118 -0
- package/src/Tooltip.test.tsx +1 -0
- package/src/__snapshots__/AiSuggestionBox.test.tsx.snap +108 -30
- package/src/__snapshots__/Card.test.tsx.snap +1 -0
- package/src/__snapshots__/EditableCard.test.tsx.snap +242 -0
- package/src/__snapshots__/SignatureCaptureField.test.tsx.snap +45 -0
- package/src/bunSetup.ts +11 -2
- package/src/generateConsentHistoryPdf.test.ts +253 -0
- package/src/index.tsx +2 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import MaterialIcons from "@expo/vector-icons/MaterialIcons";
|
|
2
|
+
import {type FC, useCallback} from "react";
|
|
3
|
+
import {Pressable} from "react-native";
|
|
4
|
+
|
|
5
|
+
import {Box} from "./Box";
|
|
6
|
+
import type {ThumbsUpDownFeedbackProps, ThumbsUpDownFeedbackValue} from "./Common";
|
|
7
|
+
import {useTheme} from "./Theme";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* MaterialIcons pads its artwork inside the em box and the thumbs are wider than they are tall, so
|
|
11
|
+
* this font size is the one that paints a 16px wide thumb — the Figma bounding box.
|
|
12
|
+
*/
|
|
13
|
+
const ICON_SIZE = 19.2;
|
|
14
|
+
|
|
15
|
+
const ICON_NAME_MAP = {
|
|
16
|
+
negative: {selected: "thumb-down-alt", unselected: "thumb-down-off-alt"},
|
|
17
|
+
positive: {selected: "thumb-up-alt", unselected: "thumb-up-off-alt"},
|
|
18
|
+
} as const;
|
|
19
|
+
|
|
20
|
+
const TAP_TARGET_SIZE = 32;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* react-native-web only activates a Pressable on the spacebar when the element is a native button or
|
|
24
|
+
* has role="button", so a checkbox needs its own spacebar handler (per ARIA, spacebar is the
|
|
25
|
+
* activation key for a checkbox). Not typed by react-native, so it is spread in separately.
|
|
26
|
+
*/
|
|
27
|
+
interface WebKeyDownEvent {
|
|
28
|
+
key: string;
|
|
29
|
+
preventDefault: () => void;
|
|
30
|
+
repeat?: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface WebKeyDownProps {
|
|
34
|
+
onKeyDown?: (event: WebKeyDownEvent) => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A pair of thumbs up / thumbs down options for collecting binary feedback, e.g. on an AI
|
|
39
|
+
* generated response. The selected option switches from an outlined to a filled thumb; pressing it
|
|
40
|
+
* again clears the selection and calls `onChange` with undefined.
|
|
41
|
+
*/
|
|
42
|
+
export const ThumbsUpDownFeedback: FC<ThumbsUpDownFeedbackProps> = ({
|
|
43
|
+
disabled = false,
|
|
44
|
+
negativeAccessibilityLabel = "Thumbs down",
|
|
45
|
+
onChange,
|
|
46
|
+
positiveAccessibilityLabel = "Thumbs up",
|
|
47
|
+
testID,
|
|
48
|
+
value,
|
|
49
|
+
}) => {
|
|
50
|
+
const {theme} = useTheme();
|
|
51
|
+
|
|
52
|
+
const handlePress = useCallback(
|
|
53
|
+
async (pressedValue: ThumbsUpDownFeedbackValue) => {
|
|
54
|
+
if (disabled) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
await onChange(value === pressedValue ? undefined : pressedValue);
|
|
58
|
+
},
|
|
59
|
+
[disabled, onChange, value]
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
const handleKeyDown = useCallback(
|
|
63
|
+
async (optionValue: ThumbsUpDownFeedbackValue, event: WebKeyDownEvent) => {
|
|
64
|
+
if (event.key !== " " && event.key !== "Spacebar") {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
// A native button activates once per press, so ignore auto-repeat from a held spacebar.
|
|
69
|
+
if (event.repeat) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
await handlePress(optionValue);
|
|
73
|
+
},
|
|
74
|
+
[handlePress]
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
const renderOption = (optionValue: ThumbsUpDownFeedbackValue) => {
|
|
78
|
+
const isSelected = value === optionValue;
|
|
79
|
+
const isPositive = optionValue === "positive";
|
|
80
|
+
const iconColor = disabled ? theme.surface.disabled : theme.surface.secondaryDark;
|
|
81
|
+
const iconName =
|
|
82
|
+
ICON_NAME_MAP[isPositive ? "positive" : "negative"][isSelected ? "selected" : "unselected"];
|
|
83
|
+
const webKeyDownProps: WebKeyDownProps = {
|
|
84
|
+
onKeyDown: async (event) => handleKeyDown(optionValue, event),
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<Pressable
|
|
89
|
+
{...webKeyDownProps}
|
|
90
|
+
accessibilityLabel={isPositive ? positiveAccessibilityLabel : negativeAccessibilityLabel}
|
|
91
|
+
accessibilityRole="checkbox"
|
|
92
|
+
accessibilityState={{checked: isSelected, disabled, selected: isSelected}}
|
|
93
|
+
aria-checked={isSelected}
|
|
94
|
+
aria-disabled={disabled}
|
|
95
|
+
disabled={disabled}
|
|
96
|
+
onPress={async () => handlePress(optionValue)}
|
|
97
|
+
style={{
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
backgroundColor: "transparent",
|
|
100
|
+
borderRadius: TAP_TARGET_SIZE / 2,
|
|
101
|
+
height: TAP_TARGET_SIZE,
|
|
102
|
+
justifyContent: "center",
|
|
103
|
+
width: TAP_TARGET_SIZE,
|
|
104
|
+
}}
|
|
105
|
+
testID={testID ? `${testID}-${isPositive ? "positive" : "negative"}` : undefined}
|
|
106
|
+
>
|
|
107
|
+
<MaterialIcons color={iconColor} name={iconName} selectable={undefined} size={ICON_SIZE} />
|
|
108
|
+
</Pressable>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<Box alignItems="center" direction="row" testID={testID}>
|
|
114
|
+
{renderOption("positive")}
|
|
115
|
+
{renderOption("negative")}
|
|
116
|
+
</Box>
|
|
117
|
+
);
|
|
118
|
+
};
|
package/src/Tooltip.test.tsx
CHANGED
|
@@ -775,6 +775,7 @@ describe("Tooltip", () => {
|
|
|
775
775
|
const wrapper = (treeAfter.children as TestNode[]).find(
|
|
776
776
|
(c: TestNode) => c.props && (c.props as {hitSlop?: object}).hitSlop !== undefined
|
|
777
777
|
) as TestNode | undefined;
|
|
778
|
+
expect(wrapper).toBeTruthy();
|
|
778
779
|
await act(async () => {
|
|
779
780
|
(wrapper?.props as {onPress?: () => void} | undefined)?.onPress?.();
|
|
780
781
|
});
|
|
@@ -444,15 +444,26 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for ready s
|
|
|
444
444
|
"children": null,
|
|
445
445
|
"props": {
|
|
446
446
|
"accessibilityLabel": "Thumbs up",
|
|
447
|
-
"accessibilityRole": "
|
|
448
|
-
"
|
|
447
|
+
"accessibilityRole": "checkbox",
|
|
448
|
+
"accessibilityState": {
|
|
449
|
+
"checked": false,
|
|
450
|
+
"disabled": false,
|
|
451
|
+
"selected": false,
|
|
452
|
+
},
|
|
453
|
+
"aria-checked": false,
|
|
454
|
+
"aria-disabled": false,
|
|
455
|
+
"disabled": false,
|
|
456
|
+
"onKeyDown": [Function: AsyncFunction],
|
|
457
|
+
"onPress": [Function: AsyncFunction],
|
|
449
458
|
"style": {
|
|
450
459
|
"alignItems": "center",
|
|
451
|
-
"
|
|
460
|
+
"backgroundColor": "transparent",
|
|
461
|
+
"borderRadius": 16,
|
|
462
|
+
"height": 32,
|
|
452
463
|
"justifyContent": "center",
|
|
453
|
-
"width":
|
|
464
|
+
"width": 32,
|
|
454
465
|
},
|
|
455
|
-
"testID": "test-ai-suggestion-
|
|
466
|
+
"testID": "test-ai-suggestion-feedback-positive",
|
|
456
467
|
},
|
|
457
468
|
"type": "Pressable",
|
|
458
469
|
},
|
|
@@ -461,23 +472,38 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for ready s
|
|
|
461
472
|
"children": null,
|
|
462
473
|
"props": {
|
|
463
474
|
"accessibilityLabel": "Thumbs down",
|
|
464
|
-
"accessibilityRole": "
|
|
465
|
-
"
|
|
475
|
+
"accessibilityRole": "checkbox",
|
|
476
|
+
"accessibilityState": {
|
|
477
|
+
"checked": false,
|
|
478
|
+
"disabled": false,
|
|
479
|
+
"selected": false,
|
|
480
|
+
},
|
|
481
|
+
"aria-checked": false,
|
|
482
|
+
"aria-disabled": false,
|
|
483
|
+
"disabled": false,
|
|
484
|
+
"onKeyDown": [Function: AsyncFunction],
|
|
485
|
+
"onPress": [Function: AsyncFunction],
|
|
466
486
|
"style": {
|
|
467
487
|
"alignItems": "center",
|
|
468
|
-
"
|
|
488
|
+
"backgroundColor": "transparent",
|
|
489
|
+
"borderRadius": 16,
|
|
490
|
+
"height": 32,
|
|
469
491
|
"justifyContent": "center",
|
|
470
|
-
"width":
|
|
492
|
+
"width": 32,
|
|
471
493
|
},
|
|
472
|
-
"testID": "test-ai-suggestion-
|
|
494
|
+
"testID": "test-ai-suggestion-feedback-negative",
|
|
473
495
|
},
|
|
474
496
|
"type": "Pressable",
|
|
475
497
|
},
|
|
476
498
|
],
|
|
477
499
|
"props": {
|
|
500
|
+
"onPointerEnter": [Function: AsyncFunction],
|
|
501
|
+
"onPointerLeave": [Function: AsyncFunction],
|
|
478
502
|
"style": {
|
|
479
503
|
"alignItems": "center",
|
|
504
|
+
"display": "flex",
|
|
480
505
|
"flexDirection": "row",
|
|
506
|
+
"testID": "test-ai-suggestion-feedback",
|
|
481
507
|
},
|
|
482
508
|
"testID": "test-ai-suggestion-feedback",
|
|
483
509
|
},
|
|
@@ -939,15 +965,26 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for hidden
|
|
|
939
965
|
"children": null,
|
|
940
966
|
"props": {
|
|
941
967
|
"accessibilityLabel": "Thumbs up",
|
|
942
|
-
"accessibilityRole": "
|
|
943
|
-
"
|
|
968
|
+
"accessibilityRole": "checkbox",
|
|
969
|
+
"accessibilityState": {
|
|
970
|
+
"checked": false,
|
|
971
|
+
"disabled": false,
|
|
972
|
+
"selected": false,
|
|
973
|
+
},
|
|
974
|
+
"aria-checked": false,
|
|
975
|
+
"aria-disabled": false,
|
|
976
|
+
"disabled": false,
|
|
977
|
+
"onKeyDown": [Function: AsyncFunction],
|
|
978
|
+
"onPress": [Function: AsyncFunction],
|
|
944
979
|
"style": {
|
|
945
980
|
"alignItems": "center",
|
|
946
|
-
"
|
|
981
|
+
"backgroundColor": "transparent",
|
|
982
|
+
"borderRadius": 16,
|
|
983
|
+
"height": 32,
|
|
947
984
|
"justifyContent": "center",
|
|
948
|
-
"width":
|
|
985
|
+
"width": 32,
|
|
949
986
|
},
|
|
950
|
-
"testID": "test-ai-suggestion-
|
|
987
|
+
"testID": "test-ai-suggestion-feedback-positive",
|
|
951
988
|
},
|
|
952
989
|
"type": "Pressable",
|
|
953
990
|
},
|
|
@@ -956,23 +993,38 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for hidden
|
|
|
956
993
|
"children": null,
|
|
957
994
|
"props": {
|
|
958
995
|
"accessibilityLabel": "Thumbs down",
|
|
959
|
-
"accessibilityRole": "
|
|
960
|
-
"
|
|
996
|
+
"accessibilityRole": "checkbox",
|
|
997
|
+
"accessibilityState": {
|
|
998
|
+
"checked": false,
|
|
999
|
+
"disabled": false,
|
|
1000
|
+
"selected": false,
|
|
1001
|
+
},
|
|
1002
|
+
"aria-checked": false,
|
|
1003
|
+
"aria-disabled": false,
|
|
1004
|
+
"disabled": false,
|
|
1005
|
+
"onKeyDown": [Function: AsyncFunction],
|
|
1006
|
+
"onPress": [Function: AsyncFunction],
|
|
961
1007
|
"style": {
|
|
962
1008
|
"alignItems": "center",
|
|
963
|
-
"
|
|
1009
|
+
"backgroundColor": "transparent",
|
|
1010
|
+
"borderRadius": 16,
|
|
1011
|
+
"height": 32,
|
|
964
1012
|
"justifyContent": "center",
|
|
965
|
-
"width":
|
|
1013
|
+
"width": 32,
|
|
966
1014
|
},
|
|
967
|
-
"testID": "test-ai-suggestion-
|
|
1015
|
+
"testID": "test-ai-suggestion-feedback-negative",
|
|
968
1016
|
},
|
|
969
1017
|
"type": "Pressable",
|
|
970
1018
|
},
|
|
971
1019
|
],
|
|
972
1020
|
"props": {
|
|
1021
|
+
"onPointerEnter": [Function: AsyncFunction],
|
|
1022
|
+
"onPointerLeave": [Function: AsyncFunction],
|
|
973
1023
|
"style": {
|
|
974
1024
|
"alignItems": "center",
|
|
1025
|
+
"display": "flex",
|
|
975
1026
|
"flexDirection": "row",
|
|
1027
|
+
"testID": "test-ai-suggestion-feedback",
|
|
976
1028
|
},
|
|
977
1029
|
"testID": "test-ai-suggestion-feedback",
|
|
978
1030
|
},
|
|
@@ -1253,15 +1305,26 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for added s
|
|
|
1253
1305
|
"children": null,
|
|
1254
1306
|
"props": {
|
|
1255
1307
|
"accessibilityLabel": "Thumbs up",
|
|
1256
|
-
"accessibilityRole": "
|
|
1257
|
-
"
|
|
1308
|
+
"accessibilityRole": "checkbox",
|
|
1309
|
+
"accessibilityState": {
|
|
1310
|
+
"checked": true,
|
|
1311
|
+
"disabled": false,
|
|
1312
|
+
"selected": true,
|
|
1313
|
+
},
|
|
1314
|
+
"aria-checked": true,
|
|
1315
|
+
"aria-disabled": false,
|
|
1316
|
+
"disabled": false,
|
|
1317
|
+
"onKeyDown": [Function: AsyncFunction],
|
|
1318
|
+
"onPress": [Function: AsyncFunction],
|
|
1258
1319
|
"style": {
|
|
1259
1320
|
"alignItems": "center",
|
|
1260
|
-
"
|
|
1321
|
+
"backgroundColor": "transparent",
|
|
1322
|
+
"borderRadius": 16,
|
|
1323
|
+
"height": 32,
|
|
1261
1324
|
"justifyContent": "center",
|
|
1262
|
-
"width":
|
|
1325
|
+
"width": 32,
|
|
1263
1326
|
},
|
|
1264
|
-
"testID": "test-ai-suggestion-
|
|
1327
|
+
"testID": "test-ai-suggestion-feedback-positive",
|
|
1265
1328
|
},
|
|
1266
1329
|
"type": "Pressable",
|
|
1267
1330
|
},
|
|
@@ -1270,23 +1333,38 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for added s
|
|
|
1270
1333
|
"children": null,
|
|
1271
1334
|
"props": {
|
|
1272
1335
|
"accessibilityLabel": "Thumbs down",
|
|
1273
|
-
"accessibilityRole": "
|
|
1274
|
-
"
|
|
1336
|
+
"accessibilityRole": "checkbox",
|
|
1337
|
+
"accessibilityState": {
|
|
1338
|
+
"checked": false,
|
|
1339
|
+
"disabled": false,
|
|
1340
|
+
"selected": false,
|
|
1341
|
+
},
|
|
1342
|
+
"aria-checked": false,
|
|
1343
|
+
"aria-disabled": false,
|
|
1344
|
+
"disabled": false,
|
|
1345
|
+
"onKeyDown": [Function: AsyncFunction],
|
|
1346
|
+
"onPress": [Function: AsyncFunction],
|
|
1275
1347
|
"style": {
|
|
1276
1348
|
"alignItems": "center",
|
|
1277
|
-
"
|
|
1349
|
+
"backgroundColor": "transparent",
|
|
1350
|
+
"borderRadius": 16,
|
|
1351
|
+
"height": 32,
|
|
1278
1352
|
"justifyContent": "center",
|
|
1279
|
-
"width":
|
|
1353
|
+
"width": 32,
|
|
1280
1354
|
},
|
|
1281
|
-
"testID": "test-ai-suggestion-
|
|
1355
|
+
"testID": "test-ai-suggestion-feedback-negative",
|
|
1282
1356
|
},
|
|
1283
1357
|
"type": "Pressable",
|
|
1284
1358
|
},
|
|
1285
1359
|
],
|
|
1286
1360
|
"props": {
|
|
1361
|
+
"onPointerEnter": [Function: AsyncFunction],
|
|
1362
|
+
"onPointerLeave": [Function: AsyncFunction],
|
|
1287
1363
|
"style": {
|
|
1288
1364
|
"alignItems": "center",
|
|
1365
|
+
"display": "flex",
|
|
1289
1366
|
"flexDirection": "row",
|
|
1367
|
+
"testID": "test-ai-suggestion-feedback",
|
|
1290
1368
|
},
|
|
1291
1369
|
"testID": "test-ai-suggestion-feedback",
|
|
1292
1370
|
},
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
|
|
2
|
+
|
|
3
|
+
exports[`EditableCard renders correctly with all props 1`] = `
|
|
4
|
+
{
|
|
5
|
+
"$$typeof": Symbol(react.test.json),
|
|
6
|
+
"children": [
|
|
7
|
+
{
|
|
8
|
+
"$$typeof": Symbol(react.test.json),
|
|
9
|
+
"children": null,
|
|
10
|
+
"props": {
|
|
11
|
+
"onPointerEnter": [Function: AsyncFunction],
|
|
12
|
+
"onPointerLeave": [Function: AsyncFunction],
|
|
13
|
+
"style": {
|
|
14
|
+
"paddingBottom": 4,
|
|
15
|
+
"paddingTop": 4,
|
|
16
|
+
},
|
|
17
|
+
"testID": undefined,
|
|
18
|
+
},
|
|
19
|
+
"type": "View",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"$$typeof": Symbol(react.test.json),
|
|
23
|
+
"children": [
|
|
24
|
+
{
|
|
25
|
+
"$$typeof": Symbol(react.test.json),
|
|
26
|
+
"children": [
|
|
27
|
+
{
|
|
28
|
+
"$$typeof": Symbol(react.test.json),
|
|
29
|
+
"children": [
|
|
30
|
+
{
|
|
31
|
+
"$$typeof": Symbol(react.test.json),
|
|
32
|
+
"children": [
|
|
33
|
+
{
|
|
34
|
+
"$$typeof": Symbol(react.test.json),
|
|
35
|
+
"children": [
|
|
36
|
+
"Home Address",
|
|
37
|
+
],
|
|
38
|
+
"props": {
|
|
39
|
+
"numberOfLines": 1,
|
|
40
|
+
"selectable": undefined,
|
|
41
|
+
"style": {
|
|
42
|
+
"color": "#1C1C1C",
|
|
43
|
+
"fontFamily": "text-bold",
|
|
44
|
+
"fontSize": 14,
|
|
45
|
+
"textAlign": "left",
|
|
46
|
+
},
|
|
47
|
+
"testID": undefined,
|
|
48
|
+
},
|
|
49
|
+
"type": "Text",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
"props": {},
|
|
53
|
+
"type": "View",
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
"props": {
|
|
57
|
+
"onPointerEnter": [Function: AsyncFunction],
|
|
58
|
+
"onPointerLeave": [Function: AsyncFunction],
|
|
59
|
+
"style": {
|
|
60
|
+
"display": "flex",
|
|
61
|
+
"flexShrink": 1,
|
|
62
|
+
"minWidth": 0,
|
|
63
|
+
},
|
|
64
|
+
"testID": undefined,
|
|
65
|
+
},
|
|
66
|
+
"type": "View",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"$$typeof": Symbol(react.test.json),
|
|
70
|
+
"children": [
|
|
71
|
+
{
|
|
72
|
+
"$$typeof": Symbol(react.test.json),
|
|
73
|
+
"children": [
|
|
74
|
+
{
|
|
75
|
+
"$$typeof": Symbol(react.test.json),
|
|
76
|
+
"children": null,
|
|
77
|
+
"props": {
|
|
78
|
+
"style": {
|
|
79
|
+
"marginRight": 8,
|
|
80
|
+
},
|
|
81
|
+
"testID": "icon",
|
|
82
|
+
},
|
|
83
|
+
"type": "View",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"$$typeof": Symbol(react.test.json),
|
|
87
|
+
"children": [
|
|
88
|
+
"Verified",
|
|
89
|
+
],
|
|
90
|
+
"props": {
|
|
91
|
+
"style": {
|
|
92
|
+
"color": "#1A7F36",
|
|
93
|
+
"fontFamily": "text",
|
|
94
|
+
"fontSize": 10,
|
|
95
|
+
"fontWeight": "700",
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
"type": "Text",
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
"props": {
|
|
102
|
+
"style": [
|
|
103
|
+
{
|
|
104
|
+
"alignItems": "center",
|
|
105
|
+
"backgroundColor": "#DCF2E2",
|
|
106
|
+
"borderRadius": 4,
|
|
107
|
+
"flexDirection": "row",
|
|
108
|
+
"height": 20,
|
|
109
|
+
"justifyContent": "center",
|
|
110
|
+
"paddingHorizontal": 8,
|
|
111
|
+
"paddingVertical": 0,
|
|
112
|
+
"width": "auto",
|
|
113
|
+
},
|
|
114
|
+
false,
|
|
115
|
+
{
|
|
116
|
+
"borderColor": "#7FD898",
|
|
117
|
+
"borderWidth": 1,
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
"testID": undefined,
|
|
121
|
+
},
|
|
122
|
+
"type": "View",
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
"props": {
|
|
126
|
+
"style": {
|
|
127
|
+
"alignItems": "flex-start",
|
|
128
|
+
},
|
|
129
|
+
"testID": undefined,
|
|
130
|
+
},
|
|
131
|
+
"type": "View",
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
"props": {
|
|
135
|
+
"onPointerEnter": [Function: AsyncFunction],
|
|
136
|
+
"onPointerLeave": [Function: AsyncFunction],
|
|
137
|
+
"style": {
|
|
138
|
+
"alignItems": "center",
|
|
139
|
+
"display": "flex",
|
|
140
|
+
"flexDirection": "row",
|
|
141
|
+
"gap": 8,
|
|
142
|
+
},
|
|
143
|
+
"testID": undefined,
|
|
144
|
+
},
|
|
145
|
+
"type": "View",
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"$$typeof": Symbol(react.test.json),
|
|
149
|
+
"children": [
|
|
150
|
+
{
|
|
151
|
+
"$$typeof": Symbol(react.test.json),
|
|
152
|
+
"children": [
|
|
153
|
+
"123 Main Street",
|
|
154
|
+
],
|
|
155
|
+
"props": {
|
|
156
|
+
"numberOfLines": 0,
|
|
157
|
+
"selectable": undefined,
|
|
158
|
+
"style": {
|
|
159
|
+
"color": "#1C1C1C",
|
|
160
|
+
"fontFamily": "text-regular",
|
|
161
|
+
"fontSize": 14,
|
|
162
|
+
"textAlign": "left",
|
|
163
|
+
},
|
|
164
|
+
"testID": undefined,
|
|
165
|
+
},
|
|
166
|
+
"type": "Text",
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
"props": {},
|
|
170
|
+
"type": "View",
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"$$typeof": Symbol(react.test.json),
|
|
174
|
+
"children": [
|
|
175
|
+
{
|
|
176
|
+
"$$typeof": Symbol(react.test.json),
|
|
177
|
+
"children": [
|
|
178
|
+
"Last updated 2 days ago",
|
|
179
|
+
],
|
|
180
|
+
"props": {
|
|
181
|
+
"numberOfLines": 0,
|
|
182
|
+
"selectable": undefined,
|
|
183
|
+
"style": {
|
|
184
|
+
"color": "#686868",
|
|
185
|
+
"fontFamily": "text-regular",
|
|
186
|
+
"fontSize": 10,
|
|
187
|
+
"textAlign": "left",
|
|
188
|
+
},
|
|
189
|
+
"testID": undefined,
|
|
190
|
+
},
|
|
191
|
+
"type": "Text",
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
"props": {},
|
|
195
|
+
"type": "View",
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
"props": {
|
|
199
|
+
"onPointerEnter": [Function: AsyncFunction],
|
|
200
|
+
"onPointerLeave": [Function: AsyncFunction],
|
|
201
|
+
"style": {
|
|
202
|
+
"display": "flex",
|
|
203
|
+
"flexDirection": "column",
|
|
204
|
+
"flexGrow": 1,
|
|
205
|
+
"flexShrink": 1,
|
|
206
|
+
"gap": 4,
|
|
207
|
+
"minWidth": 0,
|
|
208
|
+
},
|
|
209
|
+
"testID": undefined,
|
|
210
|
+
},
|
|
211
|
+
"type": "View",
|
|
212
|
+
},
|
|
213
|
+
],
|
|
214
|
+
"props": {
|
|
215
|
+
"onPointerEnter": [Function: AsyncFunction],
|
|
216
|
+
"onPointerLeave": [Function: AsyncFunction],
|
|
217
|
+
"style": {
|
|
218
|
+
"backgroundColor": "#FFFFFF",
|
|
219
|
+
"borderBottomColor": "#CDCDCD",
|
|
220
|
+
"borderBottomWidth": 1,
|
|
221
|
+
"borderLeftColor": "#CDCDCD",
|
|
222
|
+
"borderLeftWidth": 1,
|
|
223
|
+
"borderRadius": 4,
|
|
224
|
+
"borderRightColor": "#CDCDCD",
|
|
225
|
+
"borderRightWidth": 1,
|
|
226
|
+
"borderTopColor": "#CDCDCD",
|
|
227
|
+
"borderTopWidth": 1,
|
|
228
|
+
"display": "flex",
|
|
229
|
+
"flex": undefined,
|
|
230
|
+
"flexDirection": "row",
|
|
231
|
+
"gap": 8,
|
|
232
|
+
"maxWidth": "100%",
|
|
233
|
+
"minWidth": 0,
|
|
234
|
+
"overflow": "hidden",
|
|
235
|
+
"padding": 12,
|
|
236
|
+
"width": "100%",
|
|
237
|
+
},
|
|
238
|
+
"testID": undefined,
|
|
239
|
+
},
|
|
240
|
+
"type": "View",
|
|
241
|
+
}
|
|
242
|
+
`;
|
|
@@ -49,3 +49,48 @@ exports[`SignatureCaptureField renders a read-only drawn image when disabled wit
|
|
|
49
49
|
"type": "View",
|
|
50
50
|
}
|
|
51
51
|
`;
|
|
52
|
+
|
|
53
|
+
exports[`SignatureCaptureField renders a placeholder box when disabled with a drawn value that has no image 1`] = `
|
|
54
|
+
{
|
|
55
|
+
"$$typeof": Symbol(react.test.json),
|
|
56
|
+
"children": [
|
|
57
|
+
{
|
|
58
|
+
"$$typeof": Symbol(react.test.json),
|
|
59
|
+
"children": [
|
|
60
|
+
"Signature",
|
|
61
|
+
],
|
|
62
|
+
"props": {
|
|
63
|
+
"style": {
|
|
64
|
+
"color": "#1C1C1C",
|
|
65
|
+
"fontSize": 14,
|
|
66
|
+
"fontWeight": 600,
|
|
67
|
+
"lineHeight": 22.4,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
"type": "Text",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"$$typeof": Symbol(react.test.json),
|
|
74
|
+
"children": null,
|
|
75
|
+
"props": {
|
|
76
|
+
"style": {
|
|
77
|
+
"backgroundColor": "#D9D9D9",
|
|
78
|
+
"height": 90,
|
|
79
|
+
"marginVertical": 8,
|
|
80
|
+
"width": 300,
|
|
81
|
+
},
|
|
82
|
+
"testID": undefined,
|
|
83
|
+
},
|
|
84
|
+
"type": "View",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
"props": {
|
|
88
|
+
"style": {
|
|
89
|
+
"flexDirection": "column",
|
|
90
|
+
"width": "100%",
|
|
91
|
+
},
|
|
92
|
+
"testID": undefined,
|
|
93
|
+
},
|
|
94
|
+
"type": "View",
|
|
95
|
+
}
|
|
96
|
+
`;
|