@terreno/ui 0.28.0 → 0.30.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/AiSuggestionBox.js +7 -12
- package/dist/AiSuggestionBox.js.map +1 -1
- package/dist/Common.d.ts +115 -0
- package/dist/Common.js.map +1 -1
- package/dist/Signature.d.ts +3 -1
- package/dist/Signature.js +4 -3
- package/dist/Signature.js.map +1 -1
- package/dist/Signature.native.d.ts +2 -0
- package/dist/Signature.native.js +2 -2
- package/dist/Signature.native.js.map +1 -1
- package/dist/SignatureCaptureField.d.ts +13 -0
- package/dist/SignatureCaptureField.js +69 -0
- package/dist/SignatureCaptureField.js.map +1 -0
- package/dist/ThumbsUpDownFeedback.d.ts +8 -0
- package/dist/ThumbsUpDownFeedback.js +60 -0
- package/dist/ThumbsUpDownFeedback.js.map +1 -0
- package/dist/TypedSignatureField.d.ts +18 -0
- package/dist/TypedSignatureField.js +102 -0
- package/dist/TypedSignatureField.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
- package/src/AiSuggestionBox.test.tsx +2 -2
- package/src/AiSuggestionBox.tsx +17 -48
- package/src/Common.ts +125 -0
- package/src/ConsentHistory.test.tsx +161 -0
- package/src/Signature.native.tsx +10 -2
- package/src/Signature.tsx +5 -0
- package/src/SignatureCaptureField.test.tsx +165 -0
- package/src/SignatureCaptureField.tsx +172 -0
- package/src/ThumbsUpDownFeedback.test.tsx +100 -0
- package/src/ThumbsUpDownFeedback.tsx +118 -0
- package/src/TypedSignatureField.test.tsx +113 -0
- package/src/TypedSignatureField.tsx +181 -0
- package/src/__snapshots__/AiSuggestionBox.test.tsx.snap +108 -30
- package/src/__snapshots__/SignatureCaptureField.test.tsx.snap +96 -0
- package/src/__snapshots__/TypedSignatureField.test.tsx.snap +372 -0
- package/src/bunSetup.ts +33 -0
- package/src/index.tsx +3 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import {Caveat_400Regular} from "@expo-google-fonts/caveat";
|
|
2
|
+
import {DancingScript_400Regular} from "@expo-google-fonts/dancing-script";
|
|
3
|
+
import {GreatVibes_400Regular} from "@expo-google-fonts/great-vibes";
|
|
4
|
+
import {Sacramento_400Regular} from "@expo-google-fonts/sacramento";
|
|
5
|
+
import {useFonts} from "expo-font";
|
|
6
|
+
import type {ReactElement} from "react";
|
|
7
|
+
import {Text as NativeText, Pressable, View} from "react-native";
|
|
8
|
+
|
|
9
|
+
import type {SignatureFont, TypedSignatureFieldProps, TypedSignatureValue} from "./Common";
|
|
10
|
+
import {FieldError} from "./fieldElements/FieldError";
|
|
11
|
+
import {FieldHelperText} from "./fieldElements/FieldHelperText";
|
|
12
|
+
import {FieldTitle} from "./fieldElements/FieldTitle";
|
|
13
|
+
import {TextField} from "./TextField";
|
|
14
|
+
import {useTheme} from "./Theme";
|
|
15
|
+
import {resolveFieldTestIDsFromProps} from "./testing/resolveTestId";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Font families registered by this component via expo-font. Prefixed with "signature-" to
|
|
19
|
+
* avoid colliding with the app's text/heading font families.
|
|
20
|
+
*/
|
|
21
|
+
const SIGNATURE_FONT_MODULES = {
|
|
22
|
+
"signature-caveat": Caveat_400Regular,
|
|
23
|
+
"signature-dancing-script": DancingScript_400Regular,
|
|
24
|
+
"signature-great-vibes": GreatVibes_400Regular,
|
|
25
|
+
"signature-sacramento": Sacramento_400Regular,
|
|
26
|
+
} as const;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The default set of signature typefaces bundled with the library. Consumers persist the
|
|
30
|
+
* `key`; the `fontFamily` values match the families loaded by this component.
|
|
31
|
+
*/
|
|
32
|
+
export const DEFAULT_SIGNATURE_FONTS: SignatureFont[] = [
|
|
33
|
+
{fontFamily: "signature-dancing-script", key: "dancing-script", label: "Dancing Script"},
|
|
34
|
+
{fontFamily: "signature-great-vibes", key: "great-vibes", label: "Great Vibes"},
|
|
35
|
+
{fontFamily: "signature-sacramento", key: "sacramento", label: "Sacramento"},
|
|
36
|
+
{fontFamily: "signature-caveat", key: "caveat", label: "Caveat"},
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Resolves the currently selected font from the value, falling back to the first font when
|
|
41
|
+
* the stored `fontKey` is unknown (e.g. a font was removed) or no value is set yet.
|
|
42
|
+
*/
|
|
43
|
+
const resolveSelectedFont = (
|
|
44
|
+
fonts: SignatureFont[],
|
|
45
|
+
fontKey: string | undefined
|
|
46
|
+
): SignatureFont => {
|
|
47
|
+
return fonts.find((font) => font.key === fontKey) ?? fonts[0];
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A cross-platform typed signature field. The signer types their name and picks a font from a
|
|
52
|
+
* live-previewing picker; the same UI and output are produced on web and native. Emits a
|
|
53
|
+
* {@link TypedSignatureValue} (typed name + font key) on every change so parents can gate
|
|
54
|
+
* "signature required" and persist the result directly.
|
|
55
|
+
*
|
|
56
|
+
* Font fidelity depends on the chosen font families being loaded. The bundled default fonts
|
|
57
|
+
* are loaded by this component; when a custom `fonts` list is supplied the consumer must load
|
|
58
|
+
* those families themselves.
|
|
59
|
+
*/
|
|
60
|
+
export const TypedSignatureField = ({
|
|
61
|
+
title = "Signature",
|
|
62
|
+
value,
|
|
63
|
+
onChange,
|
|
64
|
+
fonts = DEFAULT_SIGNATURE_FONTS,
|
|
65
|
+
nameLabel = "Full name",
|
|
66
|
+
placeholder = "Type your full name",
|
|
67
|
+
helperText,
|
|
68
|
+
errorText,
|
|
69
|
+
disabled = false,
|
|
70
|
+
testID,
|
|
71
|
+
testIDs,
|
|
72
|
+
}: TypedSignatureFieldProps): ReactElement => {
|
|
73
|
+
const {theme} = useTheme();
|
|
74
|
+
// Load the bundled signature fonts. Rendering is not blocked on load — previews fall back to
|
|
75
|
+
// the system font briefly, then re-render once the families are available.
|
|
76
|
+
useFonts(SIGNATURE_FONT_MODULES);
|
|
77
|
+
|
|
78
|
+
const fieldTestIDs = resolveFieldTestIDsFromProps({testID, testIDs});
|
|
79
|
+
|
|
80
|
+
// Guard against an empty `fonts` list: `fonts` is a public prop, so a caller can legitimately
|
|
81
|
+
// pass `[]`. Fall back to the bundled defaults so the field always has a usable font rather
|
|
82
|
+
// than dereferencing `undefined` on the first render.
|
|
83
|
+
const resolvedFonts = fonts.length > 0 ? fonts : DEFAULT_SIGNATURE_FONTS;
|
|
84
|
+
|
|
85
|
+
const typedName = value?.typedName ?? "";
|
|
86
|
+
const selectedFont = resolveSelectedFont(resolvedFonts, value?.fontKey);
|
|
87
|
+
const hasName = typedName.trim().length > 0;
|
|
88
|
+
|
|
89
|
+
const emitChange = (next: Partial<TypedSignatureValue>): void => {
|
|
90
|
+
onChange({
|
|
91
|
+
fontKey: next.fontKey ?? selectedFont.key,
|
|
92
|
+
typedName: next.typedName ?? typedName,
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
return (
|
|
97
|
+
<View style={{flexDirection: "column", width: "100%"}} {...(testID ? {testID} : {})}>
|
|
98
|
+
{Boolean(title) && <FieldTitle testID={fieldTestIDs.label} text={title} />}
|
|
99
|
+
{Boolean(errorText) && <FieldError testID={fieldTestIDs.error} text={errorText!} />}
|
|
100
|
+
|
|
101
|
+
<View style={{marginTop: 8}}>
|
|
102
|
+
<TextField
|
|
103
|
+
disabled={disabled}
|
|
104
|
+
onChange={(nextName) => emitChange({typedName: nextName})}
|
|
105
|
+
placeholder={placeholder}
|
|
106
|
+
testID={fieldTestIDs.input}
|
|
107
|
+
title={nameLabel}
|
|
108
|
+
type="text"
|
|
109
|
+
value={typedName}
|
|
110
|
+
/>
|
|
111
|
+
</View>
|
|
112
|
+
|
|
113
|
+
{/* Font picker: each option renders its own label in its own typeface so the signer can
|
|
114
|
+
compare styles before selecting. */}
|
|
115
|
+
<View style={{flexDirection: "row", flexWrap: "wrap", gap: 8, marginTop: 12}}>
|
|
116
|
+
{resolvedFonts.map((font) => {
|
|
117
|
+
const isSelected = font.key === selectedFont.key;
|
|
118
|
+
return (
|
|
119
|
+
<Pressable
|
|
120
|
+
accessibilityHint="Sets the style of your signature"
|
|
121
|
+
accessibilityLabel={`Signature font ${font.label}`}
|
|
122
|
+
accessibilityState={{disabled, selected: isSelected}}
|
|
123
|
+
aria-role="button"
|
|
124
|
+
disabled={disabled}
|
|
125
|
+
hitSlop={8}
|
|
126
|
+
key={font.key}
|
|
127
|
+
onPress={() => emitChange({fontKey: font.key})}
|
|
128
|
+
style={{
|
|
129
|
+
backgroundColor: isSelected ? theme.surface.neutralLight : theme.surface.base,
|
|
130
|
+
borderColor: isSelected ? theme.border.activeAccent : theme.border.default,
|
|
131
|
+
borderRadius: 8,
|
|
132
|
+
borderWidth: isSelected ? 2 : 1,
|
|
133
|
+
minWidth: 96,
|
|
134
|
+
opacity: disabled ? 0.5 : 1,
|
|
135
|
+
paddingHorizontal: 12,
|
|
136
|
+
paddingVertical: 8,
|
|
137
|
+
}}
|
|
138
|
+
>
|
|
139
|
+
<NativeText
|
|
140
|
+
numberOfLines={1}
|
|
141
|
+
style={{color: theme.text.primary, fontFamily: font.fontFamily, fontSize: 22}}
|
|
142
|
+
>
|
|
143
|
+
{font.label}
|
|
144
|
+
</NativeText>
|
|
145
|
+
</Pressable>
|
|
146
|
+
);
|
|
147
|
+
})}
|
|
148
|
+
</View>
|
|
149
|
+
|
|
150
|
+
{/* Live preview of the finished signature in the selected font. */}
|
|
151
|
+
<View
|
|
152
|
+
style={{
|
|
153
|
+
alignItems: "center",
|
|
154
|
+
backgroundColor: theme.surface.base,
|
|
155
|
+
borderColor: theme.border.dark,
|
|
156
|
+
borderRadius: 4,
|
|
157
|
+
borderWidth: 1,
|
|
158
|
+
justifyContent: "center",
|
|
159
|
+
marginTop: 12,
|
|
160
|
+
minHeight: 96,
|
|
161
|
+
paddingHorizontal: 16,
|
|
162
|
+
paddingVertical: 12,
|
|
163
|
+
}}
|
|
164
|
+
testID={fieldTestIDs.helper ? `${fieldTestIDs.helper}-preview` : undefined}
|
|
165
|
+
>
|
|
166
|
+
<NativeText
|
|
167
|
+
numberOfLines={1}
|
|
168
|
+
style={{
|
|
169
|
+
color: hasName ? theme.text.primary : theme.text.secondaryLight,
|
|
170
|
+
fontFamily: selectedFont.fontFamily,
|
|
171
|
+
fontSize: 40,
|
|
172
|
+
}}
|
|
173
|
+
>
|
|
174
|
+
{hasName ? typedName : placeholder}
|
|
175
|
+
</NativeText>
|
|
176
|
+
</View>
|
|
177
|
+
|
|
178
|
+
{Boolean(helperText) && <FieldHelperText testID={fieldTestIDs.helper} text={helperText!} />}
|
|
179
|
+
</View>
|
|
180
|
+
);
|
|
181
|
+
};
|
|
@@ -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,96 @@
|
|
|
1
|
+
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
|
|
2
|
+
|
|
3
|
+
exports[`SignatureCaptureField renders a read-only drawn image when disabled with a drawn value 1`] = `
|
|
4
|
+
{
|
|
5
|
+
"$$typeof": Symbol(react.test.json),
|
|
6
|
+
"children": [
|
|
7
|
+
{
|
|
8
|
+
"$$typeof": Symbol(react.test.json),
|
|
9
|
+
"children": [
|
|
10
|
+
"Signature",
|
|
11
|
+
],
|
|
12
|
+
"props": {
|
|
13
|
+
"style": {
|
|
14
|
+
"color": "#1C1C1C",
|
|
15
|
+
"fontSize": 14,
|
|
16
|
+
"fontWeight": 600,
|
|
17
|
+
"lineHeight": 22.4,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
"type": "Text",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"$$typeof": Symbol(react.test.json),
|
|
24
|
+
"children": null,
|
|
25
|
+
"props": {
|
|
26
|
+
"accessibilityIgnoresInvertColors": false,
|
|
27
|
+
"resizeMode": "contain",
|
|
28
|
+
"source": {
|
|
29
|
+
"uri": "data:image/png;base64,xyz",
|
|
30
|
+
},
|
|
31
|
+
"style": {
|
|
32
|
+
"borderColor": "#9A9A9A",
|
|
33
|
+
"borderWidth": 1,
|
|
34
|
+
"height": 80,
|
|
35
|
+
"marginVertical": 8,
|
|
36
|
+
"width": 300,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
"type": "Image",
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
"props": {
|
|
43
|
+
"style": {
|
|
44
|
+
"flexDirection": "column",
|
|
45
|
+
"width": "100%",
|
|
46
|
+
},
|
|
47
|
+
"testID": undefined,
|
|
48
|
+
},
|
|
49
|
+
"type": "View",
|
|
50
|
+
}
|
|
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
|
+
`;
|