@terreno/ui 0.27.0 → 0.29.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 (49) hide show
  1. package/dist/Common.d.ts +97 -7
  2. package/dist/Common.js.map +1 -1
  3. package/dist/CustomSelectField.js +2 -2
  4. package/dist/CustomSelectField.js.map +1 -1
  5. package/dist/PickerSelect.d.ts +4 -5
  6. package/dist/PickerSelect.js +4 -3
  7. package/dist/PickerSelect.js.map +1 -1
  8. package/dist/SelectBadge.js +1 -1
  9. package/dist/SelectBadge.js.map +1 -1
  10. package/dist/SelectField.js +3 -3
  11. package/dist/SelectField.js.map +1 -1
  12. package/dist/Signature.d.ts +3 -1
  13. package/dist/Signature.js +4 -3
  14. package/dist/Signature.js.map +1 -1
  15. package/dist/Signature.native.d.ts +2 -0
  16. package/dist/Signature.native.js +2 -2
  17. package/dist/Signature.native.js.map +1 -1
  18. package/dist/SignatureCaptureField.d.ts +13 -0
  19. package/dist/SignatureCaptureField.js +69 -0
  20. package/dist/SignatureCaptureField.js.map +1 -0
  21. package/dist/TypedSignatureField.d.ts +18 -0
  22. package/dist/TypedSignatureField.js +102 -0
  23. package/dist/TypedSignatureField.js.map +1 -0
  24. package/dist/WebDropdownMenu.d.ts +7 -8
  25. package/dist/WebDropdownMenu.js +4 -3
  26. package/dist/WebDropdownMenu.js.map +1 -1
  27. package/dist/index.d.ts +2 -0
  28. package/dist/index.js +2 -0
  29. package/dist/index.js.map +1 -1
  30. package/package.json +5 -1
  31. package/src/Common.ts +105 -7
  32. package/src/CustomSelectField.test.tsx +3 -8
  33. package/src/CustomSelectField.tsx +2 -2
  34. package/src/PickerSelect.test.tsx +22 -18
  35. package/src/PickerSelect.tsx +6 -6
  36. package/src/SelectBadge.tsx +1 -1
  37. package/src/SelectField.tsx +2 -2
  38. package/src/Signature.native.tsx +10 -2
  39. package/src/Signature.tsx +5 -0
  40. package/src/SignatureCaptureField.test.tsx +135 -0
  41. package/src/SignatureCaptureField.tsx +172 -0
  42. package/src/TypedSignatureField.test.tsx +113 -0
  43. package/src/TypedSignatureField.tsx +181 -0
  44. package/src/WebDropdownMenu.test.tsx +14 -19
  45. package/src/WebDropdownMenu.tsx +8 -8
  46. package/src/__snapshots__/SignatureCaptureField.test.tsx.snap +51 -0
  47. package/src/__snapshots__/TypedSignatureField.test.tsx.snap +372 -0
  48. package/src/bunSetup.ts +28 -0
  49. package/src/index.tsx +2 -0
@@ -0,0 +1,372 @@
1
+ // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
+
3
+ exports[`TypedSignatureField renders correctly with default props 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": [
25
+ {
26
+ "$$typeof": Symbol(react.test.json),
27
+ "children": [
28
+ {
29
+ "$$typeof": Symbol(react.test.json),
30
+ "children": [
31
+ "Full name",
32
+ ],
33
+ "props": {
34
+ "style": {
35
+ "color": "#1C1C1C",
36
+ "fontSize": 14,
37
+ "fontWeight": 600,
38
+ "lineHeight": 22.4,
39
+ },
40
+ },
41
+ "type": "Text",
42
+ },
43
+ {
44
+ "$$typeof": Symbol(react.test.json),
45
+ "children": [
46
+ {
47
+ "$$typeof": Symbol(react.test.json),
48
+ "children": [
49
+ {
50
+ "$$typeof": Symbol(react.test.json),
51
+ "children": null,
52
+ "props": {
53
+ "accessibilityHint": "Enter text here",
54
+ "accessibilityState": {
55
+ "disabled": false,
56
+ },
57
+ "aria-label": "Text input field",
58
+ "autoCapitalize": "sentences",
59
+ "autoCorrect": true,
60
+ "blurOnSubmit": true,
61
+ "enterKeyHint": undefined,
62
+ "keyboardType": "default",
63
+ "multiline": undefined,
64
+ "nativeID": undefined,
65
+ "numberOfLines": 1,
66
+ "onBlur": [Function],
67
+ "onChangeText": [Function],
68
+ "onContentSizeChange": [Function],
69
+ "onFocus": [Function],
70
+ "onSubmitEditing": [Function],
71
+ "placeholder": "Type your full name",
72
+ "placeholderTextColor": "#686868",
73
+ "readOnly": false,
74
+ "ref": [Function],
75
+ "secureTextEntry": false,
76
+ "style": {
77
+ "color": "#1C1C1C",
78
+ "flex": 1,
79
+ "fontFamily": "text",
80
+ "fontSize": 16,
81
+ "gap": 10,
82
+ "height": 24,
83
+ "paddingVertical": 0,
84
+ "width": "100%",
85
+ },
86
+ "testID": undefined,
87
+ "textContentType": "none",
88
+ "underlineColorAndroid": "transparent",
89
+ "value": "",
90
+ },
91
+ "type": "TextInput",
92
+ },
93
+ ],
94
+ "props": {
95
+ "style": {
96
+ "alignItems": "center",
97
+ "flexDirection": "row",
98
+ },
99
+ "testID": undefined,
100
+ },
101
+ "type": "View",
102
+ },
103
+ ],
104
+ "props": {
105
+ "style": {
106
+ "backgroundColor": "#FFFFFF",
107
+ "borderColor": "#9A9A9A",
108
+ "borderRadius": 4,
109
+ "borderWidth": 1,
110
+ "flexDirection": "column",
111
+ "gap": 0,
112
+ "overflow": "hidden",
113
+ "paddingHorizontal": 12,
114
+ "paddingVertical": 8,
115
+ },
116
+ "testID": undefined,
117
+ },
118
+ "type": "View",
119
+ },
120
+ ],
121
+ "props": {
122
+ "style": {
123
+ "flexDirection": "column",
124
+ "width": "100%",
125
+ },
126
+ "testID": undefined,
127
+ },
128
+ "type": "View",
129
+ },
130
+ ],
131
+ "props": {
132
+ "style": {
133
+ "marginTop": 8,
134
+ },
135
+ "testID": undefined,
136
+ },
137
+ "type": "View",
138
+ },
139
+ {
140
+ "$$typeof": Symbol(react.test.json),
141
+ "children": [
142
+ {
143
+ "$$typeof": Symbol(react.test.json),
144
+ "children": [
145
+ {
146
+ "$$typeof": Symbol(react.test.json),
147
+ "children": [
148
+ "Dancing Script",
149
+ ],
150
+ "props": {
151
+ "numberOfLines": 1,
152
+ "style": {
153
+ "color": "#1C1C1C",
154
+ "fontFamily": "signature-dancing-script",
155
+ "fontSize": 22,
156
+ },
157
+ },
158
+ "type": "Text",
159
+ },
160
+ ],
161
+ "props": {
162
+ "accessibilityHint": "Sets the style of your signature",
163
+ "accessibilityLabel": "Signature font Dancing Script",
164
+ "accessibilityState": {
165
+ "disabled": false,
166
+ "selected": true,
167
+ },
168
+ "aria-role": "button",
169
+ "disabled": false,
170
+ "hitSlop": 8,
171
+ "onPress": [Function],
172
+ "style": {
173
+ "backgroundColor": "#D9D9D9",
174
+ "borderColor": "#D69C0E",
175
+ "borderRadius": 8,
176
+ "borderWidth": 2,
177
+ "minWidth": 96,
178
+ "opacity": 1,
179
+ "paddingHorizontal": 12,
180
+ "paddingVertical": 8,
181
+ },
182
+ },
183
+ "type": "Pressable",
184
+ },
185
+ {
186
+ "$$typeof": Symbol(react.test.json),
187
+ "children": [
188
+ {
189
+ "$$typeof": Symbol(react.test.json),
190
+ "children": [
191
+ "Great Vibes",
192
+ ],
193
+ "props": {
194
+ "numberOfLines": 1,
195
+ "style": {
196
+ "color": "#1C1C1C",
197
+ "fontFamily": "signature-great-vibes",
198
+ "fontSize": 22,
199
+ },
200
+ },
201
+ "type": "Text",
202
+ },
203
+ ],
204
+ "props": {
205
+ "accessibilityHint": "Sets the style of your signature",
206
+ "accessibilityLabel": "Signature font Great Vibes",
207
+ "accessibilityState": {
208
+ "disabled": false,
209
+ "selected": false,
210
+ },
211
+ "aria-role": "button",
212
+ "disabled": false,
213
+ "hitSlop": 8,
214
+ "onPress": [Function],
215
+ "style": {
216
+ "backgroundColor": "#FFFFFF",
217
+ "borderColor": "#CDCDCD",
218
+ "borderRadius": 8,
219
+ "borderWidth": 1,
220
+ "minWidth": 96,
221
+ "opacity": 1,
222
+ "paddingHorizontal": 12,
223
+ "paddingVertical": 8,
224
+ },
225
+ },
226
+ "type": "Pressable",
227
+ },
228
+ {
229
+ "$$typeof": Symbol(react.test.json),
230
+ "children": [
231
+ {
232
+ "$$typeof": Symbol(react.test.json),
233
+ "children": [
234
+ "Sacramento",
235
+ ],
236
+ "props": {
237
+ "numberOfLines": 1,
238
+ "style": {
239
+ "color": "#1C1C1C",
240
+ "fontFamily": "signature-sacramento",
241
+ "fontSize": 22,
242
+ },
243
+ },
244
+ "type": "Text",
245
+ },
246
+ ],
247
+ "props": {
248
+ "accessibilityHint": "Sets the style of your signature",
249
+ "accessibilityLabel": "Signature font Sacramento",
250
+ "accessibilityState": {
251
+ "disabled": false,
252
+ "selected": false,
253
+ },
254
+ "aria-role": "button",
255
+ "disabled": false,
256
+ "hitSlop": 8,
257
+ "onPress": [Function],
258
+ "style": {
259
+ "backgroundColor": "#FFFFFF",
260
+ "borderColor": "#CDCDCD",
261
+ "borderRadius": 8,
262
+ "borderWidth": 1,
263
+ "minWidth": 96,
264
+ "opacity": 1,
265
+ "paddingHorizontal": 12,
266
+ "paddingVertical": 8,
267
+ },
268
+ },
269
+ "type": "Pressable",
270
+ },
271
+ {
272
+ "$$typeof": Symbol(react.test.json),
273
+ "children": [
274
+ {
275
+ "$$typeof": Symbol(react.test.json),
276
+ "children": [
277
+ "Caveat",
278
+ ],
279
+ "props": {
280
+ "numberOfLines": 1,
281
+ "style": {
282
+ "color": "#1C1C1C",
283
+ "fontFamily": "signature-caveat",
284
+ "fontSize": 22,
285
+ },
286
+ },
287
+ "type": "Text",
288
+ },
289
+ ],
290
+ "props": {
291
+ "accessibilityHint": "Sets the style of your signature",
292
+ "accessibilityLabel": "Signature font Caveat",
293
+ "accessibilityState": {
294
+ "disabled": false,
295
+ "selected": false,
296
+ },
297
+ "aria-role": "button",
298
+ "disabled": false,
299
+ "hitSlop": 8,
300
+ "onPress": [Function],
301
+ "style": {
302
+ "backgroundColor": "#FFFFFF",
303
+ "borderColor": "#CDCDCD",
304
+ "borderRadius": 8,
305
+ "borderWidth": 1,
306
+ "minWidth": 96,
307
+ "opacity": 1,
308
+ "paddingHorizontal": 12,
309
+ "paddingVertical": 8,
310
+ },
311
+ },
312
+ "type": "Pressable",
313
+ },
314
+ ],
315
+ "props": {
316
+ "style": {
317
+ "flexDirection": "row",
318
+ "flexWrap": "wrap",
319
+ "gap": 8,
320
+ "marginTop": 12,
321
+ },
322
+ "testID": undefined,
323
+ },
324
+ "type": "View",
325
+ },
326
+ {
327
+ "$$typeof": Symbol(react.test.json),
328
+ "children": [
329
+ {
330
+ "$$typeof": Symbol(react.test.json),
331
+ "children": [
332
+ "Type your full name",
333
+ ],
334
+ "props": {
335
+ "numberOfLines": 1,
336
+ "style": {
337
+ "color": "#686868",
338
+ "fontFamily": "signature-dancing-script",
339
+ "fontSize": 40,
340
+ },
341
+ },
342
+ "type": "Text",
343
+ },
344
+ ],
345
+ "props": {
346
+ "style": {
347
+ "alignItems": "center",
348
+ "backgroundColor": "#FFFFFF",
349
+ "borderColor": "#9A9A9A",
350
+ "borderRadius": 4,
351
+ "borderWidth": 1,
352
+ "justifyContent": "center",
353
+ "marginTop": 12,
354
+ "minHeight": 96,
355
+ "paddingHorizontal": 16,
356
+ "paddingVertical": 12,
357
+ },
358
+ "testID": undefined,
359
+ },
360
+ "type": "View",
361
+ },
362
+ ],
363
+ "props": {
364
+ "style": {
365
+ "flexDirection": "column",
366
+ "width": "100%",
367
+ },
368
+ "testID": undefined,
369
+ },
370
+ "type": "View",
371
+ }
372
+ `;
package/src/bunSetup.ts CHANGED
@@ -609,6 +609,34 @@ mock.module("@expo-google-fonts/titillium-web", () => ({
609
609
  useFonts: mock(() => [true, null]),
610
610
  }));
611
611
 
612
+ // Mock the signature font packages used by TypedSignatureField. The real packages import .ttf
613
+ // assets, which the bun test runner cannot parse, so stub each exported font module as a string.
614
+ mock.module("@expo-google-fonts/dancing-script", () => ({
615
+ DancingScript_400Regular: "DancingScript_400Regular",
616
+ DancingScript_500Medium: "DancingScript_500Medium",
617
+ DancingScript_600SemiBold: "DancingScript_600SemiBold",
618
+ DancingScript_700Bold: "DancingScript_700Bold",
619
+ useFonts: mock(() => [true, null]),
620
+ }));
621
+
622
+ mock.module("@expo-google-fonts/great-vibes", () => ({
623
+ GreatVibes_400Regular: "GreatVibes_400Regular",
624
+ useFonts: mock(() => [true, null]),
625
+ }));
626
+
627
+ mock.module("@expo-google-fonts/sacramento", () => ({
628
+ Sacramento_400Regular: "Sacramento_400Regular",
629
+ useFonts: mock(() => [true, null]),
630
+ }));
631
+
632
+ mock.module("@expo-google-fonts/caveat", () => ({
633
+ Caveat_400Regular: "Caveat_400Regular",
634
+ Caveat_500Medium: "Caveat_500Medium",
635
+ Caveat_600SemiBold: "Caveat_600SemiBold",
636
+ Caveat_700Bold: "Caveat_700Bold",
637
+ useFonts: mock(() => [true, null]),
638
+ }));
639
+
612
640
  // Mock DateTimeActionSheet
613
641
  mock.module("./DateTimeActionSheet", () => ({
614
642
  DateTimeActionSheet: mock(() => null),
package/src/index.tsx CHANGED
@@ -76,6 +76,7 @@ export * from "./SelectField";
76
76
  export * from "./SidebarNavigation";
77
77
  export * from "./SideDrawer";
78
78
  export * from "./Signature";
79
+ export * from "./SignatureCaptureField";
79
80
  export * from "./SignatureField";
80
81
  export * from "./Slider";
81
82
  export * from "./SocialLoginButton";
@@ -105,6 +106,7 @@ export * from "./TextField";
105
106
  export * from "./Theme";
106
107
  export * from "./Toast";
107
108
  export {Tooltip} from "./Tooltip";
109
+ export * from "./TypedSignatureField";
108
110
  export * from "./table/Table";
109
111
  export * from "./table/Table";
110
112
  export * from "./table/TableBadge";