@terreno/ui 0.7.0 → 0.7.2

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 (37) hide show
  1. package/dist/AiSuggestionBox.d.ts +6 -0
  2. package/dist/AiSuggestionBox.js +87 -0
  3. package/dist/AiSuggestionBox.js.map +1 -0
  4. package/dist/Common.d.ts +12 -0
  5. package/dist/Common.js.map +1 -1
  6. package/dist/DateTimeActionSheet.js +2 -2
  7. package/dist/Slider.js +2 -8
  8. package/dist/Slider.js.map +1 -1
  9. package/dist/TextField.js +46 -41
  10. package/dist/TextField.js.map +1 -1
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.js +1 -0
  13. package/dist/index.js.map +1 -1
  14. package/package.json +1 -1
  15. package/src/AiSuggestionBox.test.tsx +373 -0
  16. package/src/AiSuggestionBox.tsx +233 -0
  17. package/src/Common.ts +14 -0
  18. package/src/DateTimeActionSheet.tsx +2 -2
  19. package/src/Slider.tsx +2 -1
  20. package/src/TextField.tsx +87 -70
  21. package/src/__snapshots__/AddressField.test.tsx.snap +208 -156
  22. package/src/__snapshots__/AiSuggestionBox.test.tsx.snap +1031 -0
  23. package/src/__snapshots__/CustomSelectField.test.tsx.snap +51 -38
  24. package/src/__snapshots__/EmailField.test.tsx.snap +111 -85
  25. package/src/__snapshots__/Field.test.tsx.snap +616 -460
  26. package/src/__snapshots__/MobileAddressAutoComplete.test.tsx.snap +51 -38
  27. package/src/__snapshots__/NumberField.test.tsx.snap +51 -38
  28. package/src/__snapshots__/PhoneNumberField.test.tsx.snap +264 -199
  29. package/src/__snapshots__/Slider.test.tsx.snap +0 -7
  30. package/src/__snapshots__/TapToEdit.test.tsx.snap +51 -38
  31. package/src/__snapshots__/TextArea.test.tsx.snap +255 -190
  32. package/src/__snapshots__/TextField.test.tsx.snap +264 -199
  33. package/src/__snapshots__/UnifiedAddressAutoComplete.test.tsx.snap +204 -152
  34. package/src/__snapshots__/WebAddressAutocomplete.test.tsx.snap +153 -114
  35. package/src/index.tsx +1 -0
  36. package/src/login/__snapshots__/LoginScreen.test.tsx.snap +104 -78
  37. package/src/signUp/__snapshots__/SignUpScreen.test.tsx.snap +156 -117
@@ -9,57 +9,70 @@ exports[`PhoneNumberField renders correctly with default props 1`] = `
9
9
  "children": [
10
10
  {
11
11
  "$$typeof": Symbol(react.test.json),
12
- "children": null,
13
- "props": {
14
- "accessibilityHint": "Enter text here",
15
- "accessibilityState": {
16
- "disabled": undefined,
12
+ "children": [
13
+ {
14
+ "$$typeof": Symbol(react.test.json),
15
+ "children": null,
16
+ "props": {
17
+ "accessibilityHint": "Enter text here",
18
+ "accessibilityState": {
19
+ "disabled": undefined,
20
+ },
21
+ "aria-label": "Text input field",
22
+ "autoCapitalize": "none",
23
+ "autoCorrect": false,
24
+ "blurOnSubmit": true,
25
+ "enterKeyHint": undefined,
26
+ "keyboardType": "number-pad",
27
+ "multiline": undefined,
28
+ "nativeID": undefined,
29
+ "numberOfLines": 1,
30
+ "onBlur": [Function],
31
+ "onChangeText": [Function],
32
+ "onContentSizeChange": [Function],
33
+ "onFocus": [Function],
34
+ "onSubmitEditing": [Function],
35
+ "placeholder": undefined,
36
+ "placeholderTextColor": "#686868",
37
+ "readOnly": undefined,
38
+ "ref": [Function],
39
+ "secureTextEntry": false,
40
+ "style": {
41
+ "color": "#1C1C1C",
42
+ "flex": 1,
43
+ "fontFamily": "text",
44
+ "fontSize": 16,
45
+ "gap": 10,
46
+ "height": 20,
47
+ "paddingVertical": 0,
48
+ "width": "100%",
49
+ },
50
+ "testID": undefined,
51
+ "textContentType": undefined,
52
+ "underlineColorAndroid": "transparent",
53
+ "value": "",
54
+ },
55
+ "type": "TextInput",
17
56
  },
18
- "aria-label": "Text input field",
19
- "autoCapitalize": "none",
20
- "autoCorrect": false,
21
- "blurOnSubmit": true,
22
- "enterKeyHint": undefined,
23
- "keyboardType": "number-pad",
24
- "multiline": undefined,
25
- "nativeID": undefined,
26
- "numberOfLines": 1,
27
- "onBlur": [Function],
28
- "onChangeText": [Function],
29
- "onContentSizeChange": [Function],
30
- "onFocus": [Function],
31
- "onSubmitEditing": [Function],
32
- "placeholder": undefined,
33
- "placeholderTextColor": "#686868",
34
- "readOnly": undefined,
35
- "ref": [Function],
36
- "secureTextEntry": false,
57
+ ],
58
+ "props": {
37
59
  "style": {
38
- "color": "#1C1C1C",
39
- "flex": 1,
40
- "fontFamily": "text",
41
- "fontSize": 16,
42
- "gap": 10,
43
- "height": 20,
44
- "paddingVertical": 0,
45
- "width": "100%",
60
+ "alignItems": "center",
61
+ "flexDirection": "row",
46
62
  },
47
63
  "testID": undefined,
48
- "textContentType": undefined,
49
- "underlineColorAndroid": "transparent",
50
- "value": "",
51
64
  },
52
- "type": "TextInput",
65
+ "type": "View",
53
66
  },
54
67
  ],
55
68
  "props": {
56
69
  "style": {
57
- "alignItems": "center",
58
70
  "backgroundColor": "#FFFFFF",
59
71
  "borderColor": "#9A9A9A",
60
72
  "borderRadius": 4,
61
73
  "borderWidth": 1,
62
- "flexDirection": "row",
74
+ "flexDirection": "column",
75
+ "gap": 0,
63
76
  "overflow": "hidden",
64
77
  "paddingHorizontal": 12,
65
78
  "paddingVertical": 8,
@@ -89,57 +102,70 @@ exports[`PhoneNumberField formats phone number as user types 1`] = `
89
102
  "children": [
90
103
  {
91
104
  "$$typeof": Symbol(react.test.json),
92
- "children": null,
93
- "props": {
94
- "accessibilityHint": "Enter text here",
95
- "accessibilityState": {
96
- "disabled": undefined,
105
+ "children": [
106
+ {
107
+ "$$typeof": Symbol(react.test.json),
108
+ "children": null,
109
+ "props": {
110
+ "accessibilityHint": "Enter text here",
111
+ "accessibilityState": {
112
+ "disabled": undefined,
113
+ },
114
+ "aria-label": "Text input field",
115
+ "autoCapitalize": "none",
116
+ "autoCorrect": false,
117
+ "blurOnSubmit": true,
118
+ "enterKeyHint": undefined,
119
+ "keyboardType": "number-pad",
120
+ "multiline": undefined,
121
+ "nativeID": undefined,
122
+ "numberOfLines": 1,
123
+ "onBlur": [Function],
124
+ "onChangeText": [Function],
125
+ "onContentSizeChange": [Function],
126
+ "onFocus": [Function],
127
+ "onSubmitEditing": [Function],
128
+ "placeholder": undefined,
129
+ "placeholderTextColor": "#686868",
130
+ "readOnly": undefined,
131
+ "ref": [Function],
132
+ "secureTextEntry": false,
133
+ "style": {
134
+ "color": "#1C1C1C",
135
+ "flex": 1,
136
+ "fontFamily": "text",
137
+ "fontSize": 16,
138
+ "gap": 10,
139
+ "height": 20,
140
+ "paddingVertical": 0,
141
+ "width": "100%",
142
+ },
143
+ "testID": undefined,
144
+ "textContentType": undefined,
145
+ "underlineColorAndroid": "transparent",
146
+ "value": "5551234567",
147
+ },
148
+ "type": "TextInput",
97
149
  },
98
- "aria-label": "Text input field",
99
- "autoCapitalize": "none",
100
- "autoCorrect": false,
101
- "blurOnSubmit": true,
102
- "enterKeyHint": undefined,
103
- "keyboardType": "number-pad",
104
- "multiline": undefined,
105
- "nativeID": undefined,
106
- "numberOfLines": 1,
107
- "onBlur": [Function],
108
- "onChangeText": [Function],
109
- "onContentSizeChange": [Function],
110
- "onFocus": [Function],
111
- "onSubmitEditing": [Function],
112
- "placeholder": undefined,
113
- "placeholderTextColor": "#686868",
114
- "readOnly": undefined,
115
- "ref": [Function],
116
- "secureTextEntry": false,
150
+ ],
151
+ "props": {
117
152
  "style": {
118
- "color": "#1C1C1C",
119
- "flex": 1,
120
- "fontFamily": "text",
121
- "fontSize": 16,
122
- "gap": 10,
123
- "height": 20,
124
- "paddingVertical": 0,
125
- "width": "100%",
153
+ "alignItems": "center",
154
+ "flexDirection": "row",
126
155
  },
127
156
  "testID": undefined,
128
- "textContentType": undefined,
129
- "underlineColorAndroid": "transparent",
130
- "value": "5551234567",
131
157
  },
132
- "type": "TextInput",
158
+ "type": "View",
133
159
  },
134
160
  ],
135
161
  "props": {
136
162
  "style": {
137
- "alignItems": "center",
138
163
  "backgroundColor": "#FFFFFF",
139
164
  "borderColor": "#9A9A9A",
140
165
  "borderRadius": 4,
141
166
  "borderWidth": 1,
142
- "flexDirection": "row",
167
+ "flexDirection": "column",
168
+ "gap": 0,
143
169
  "overflow": "hidden",
144
170
  "paddingHorizontal": 12,
145
171
  "paddingVertical": 8,
@@ -169,66 +195,79 @@ exports[`PhoneNumberField renders with icon 1`] = `
169
195
  "children": [
170
196
  {
171
197
  "$$typeof": Symbol(react.test.json),
172
- "children": null,
173
- "props": {
174
- "accessibilityHint": "Enter text here",
175
- "accessibilityState": {
176
- "disabled": undefined,
198
+ "children": [
199
+ {
200
+ "$$typeof": Symbol(react.test.json),
201
+ "children": null,
202
+ "props": {
203
+ "accessibilityHint": "Enter text here",
204
+ "accessibilityState": {
205
+ "disabled": undefined,
206
+ },
207
+ "aria-label": "Text input field",
208
+ "autoCapitalize": "none",
209
+ "autoCorrect": false,
210
+ "blurOnSubmit": true,
211
+ "enterKeyHint": undefined,
212
+ "keyboardType": "number-pad",
213
+ "multiline": undefined,
214
+ "nativeID": undefined,
215
+ "numberOfLines": 1,
216
+ "onBlur": [Function],
217
+ "onChangeText": [Function],
218
+ "onContentSizeChange": [Function],
219
+ "onFocus": [Function],
220
+ "onSubmitEditing": [Function],
221
+ "placeholder": undefined,
222
+ "placeholderTextColor": "#686868",
223
+ "readOnly": undefined,
224
+ "ref": [Function],
225
+ "secureTextEntry": false,
226
+ "style": {
227
+ "color": "#1C1C1C",
228
+ "flex": 1,
229
+ "fontFamily": "text",
230
+ "fontSize": 16,
231
+ "gap": 10,
232
+ "height": 20,
233
+ "paddingVertical": 0,
234
+ "width": "100%",
235
+ },
236
+ "testID": undefined,
237
+ "textContentType": undefined,
238
+ "underlineColorAndroid": "transparent",
239
+ "value": "",
240
+ },
241
+ "type": "TextInput",
242
+ },
243
+ {
244
+ "$$typeof": Symbol(react.test.json),
245
+ "children": null,
246
+ "props": {
247
+ "aria-role": "button",
248
+ "onPress": undefined,
249
+ },
250
+ "type": "Pressable",
177
251
  },
178
- "aria-label": "Text input field",
179
- "autoCapitalize": "none",
180
- "autoCorrect": false,
181
- "blurOnSubmit": true,
182
- "enterKeyHint": undefined,
183
- "keyboardType": "number-pad",
184
- "multiline": undefined,
185
- "nativeID": undefined,
186
- "numberOfLines": 1,
187
- "onBlur": [Function],
188
- "onChangeText": [Function],
189
- "onContentSizeChange": [Function],
190
- "onFocus": [Function],
191
- "onSubmitEditing": [Function],
192
- "placeholder": undefined,
193
- "placeholderTextColor": "#686868",
194
- "readOnly": undefined,
195
- "ref": [Function],
196
- "secureTextEntry": false,
252
+ ],
253
+ "props": {
197
254
  "style": {
198
- "color": "#1C1C1C",
199
- "flex": 1,
200
- "fontFamily": "text",
201
- "fontSize": 16,
202
- "gap": 10,
203
- "height": 20,
204
- "paddingVertical": 0,
205
- "width": "100%",
255
+ "alignItems": "center",
256
+ "flexDirection": "row",
206
257
  },
207
258
  "testID": undefined,
208
- "textContentType": undefined,
209
- "underlineColorAndroid": "transparent",
210
- "value": "",
211
- },
212
- "type": "TextInput",
213
- },
214
- {
215
- "$$typeof": Symbol(react.test.json),
216
- "children": null,
217
- "props": {
218
- "aria-role": "button",
219
- "onPress": undefined,
220
259
  },
221
- "type": "Pressable",
260
+ "type": "View",
222
261
  },
223
262
  ],
224
263
  "props": {
225
264
  "style": {
226
- "alignItems": "center",
227
265
  "backgroundColor": "#FFFFFF",
228
266
  "borderColor": "#9A9A9A",
229
267
  "borderRadius": 4,
230
268
  "borderWidth": 1,
231
- "flexDirection": "row",
269
+ "flexDirection": "column",
270
+ "gap": 0,
232
271
  "overflow": "hidden",
233
272
  "paddingHorizontal": 12,
234
273
  "paddingVertical": 8,
@@ -258,57 +297,70 @@ exports[`PhoneNumberField uses US as default country code 1`] = `
258
297
  "children": [
259
298
  {
260
299
  "$$typeof": Symbol(react.test.json),
261
- "children": null,
262
- "props": {
263
- "accessibilityHint": "Enter text here",
264
- "accessibilityState": {
265
- "disabled": undefined,
300
+ "children": [
301
+ {
302
+ "$$typeof": Symbol(react.test.json),
303
+ "children": null,
304
+ "props": {
305
+ "accessibilityHint": "Enter text here",
306
+ "accessibilityState": {
307
+ "disabled": undefined,
308
+ },
309
+ "aria-label": "Text input field",
310
+ "autoCapitalize": "none",
311
+ "autoCorrect": false,
312
+ "blurOnSubmit": true,
313
+ "enterKeyHint": undefined,
314
+ "keyboardType": "number-pad",
315
+ "multiline": undefined,
316
+ "nativeID": undefined,
317
+ "numberOfLines": 1,
318
+ "onBlur": [Function],
319
+ "onChangeText": [Function],
320
+ "onContentSizeChange": [Function],
321
+ "onFocus": [Function],
322
+ "onSubmitEditing": [Function],
323
+ "placeholder": undefined,
324
+ "placeholderTextColor": "#686868",
325
+ "readOnly": undefined,
326
+ "ref": [Function],
327
+ "secureTextEntry": false,
328
+ "style": {
329
+ "color": "#1C1C1C",
330
+ "flex": 1,
331
+ "fontFamily": "text",
332
+ "fontSize": 16,
333
+ "gap": 10,
334
+ "height": 20,
335
+ "paddingVertical": 0,
336
+ "width": "100%",
337
+ },
338
+ "testID": undefined,
339
+ "textContentType": undefined,
340
+ "underlineColorAndroid": "transparent",
341
+ "value": "5551234567",
342
+ },
343
+ "type": "TextInput",
266
344
  },
267
- "aria-label": "Text input field",
268
- "autoCapitalize": "none",
269
- "autoCorrect": false,
270
- "blurOnSubmit": true,
271
- "enterKeyHint": undefined,
272
- "keyboardType": "number-pad",
273
- "multiline": undefined,
274
- "nativeID": undefined,
275
- "numberOfLines": 1,
276
- "onBlur": [Function],
277
- "onChangeText": [Function],
278
- "onContentSizeChange": [Function],
279
- "onFocus": [Function],
280
- "onSubmitEditing": [Function],
281
- "placeholder": undefined,
282
- "placeholderTextColor": "#686868",
283
- "readOnly": undefined,
284
- "ref": [Function],
285
- "secureTextEntry": false,
345
+ ],
346
+ "props": {
286
347
  "style": {
287
- "color": "#1C1C1C",
288
- "flex": 1,
289
- "fontFamily": "text",
290
- "fontSize": 16,
291
- "gap": 10,
292
- "height": 20,
293
- "paddingVertical": 0,
294
- "width": "100%",
348
+ "alignItems": "center",
349
+ "flexDirection": "row",
295
350
  },
296
351
  "testID": undefined,
297
- "textContentType": undefined,
298
- "underlineColorAndroid": "transparent",
299
- "value": "5551234567",
300
352
  },
301
- "type": "TextInput",
353
+ "type": "View",
302
354
  },
303
355
  ],
304
356
  "props": {
305
357
  "style": {
306
- "alignItems": "center",
307
358
  "backgroundColor": "#FFFFFF",
308
359
  "borderColor": "#9A9A9A",
309
360
  "borderRadius": 4,
310
361
  "borderWidth": 1,
311
- "flexDirection": "row",
362
+ "flexDirection": "column",
363
+ "gap": 0,
312
364
  "overflow": "hidden",
313
365
  "paddingHorizontal": 12,
314
366
  "paddingVertical": 8,
@@ -338,57 +390,70 @@ exports[`PhoneNumberField accepts custom country code 1`] = `
338
390
  "children": [
339
391
  {
340
392
  "$$typeof": Symbol(react.test.json),
341
- "children": null,
342
- "props": {
343
- "accessibilityHint": "Enter text here",
344
- "accessibilityState": {
345
- "disabled": undefined,
393
+ "children": [
394
+ {
395
+ "$$typeof": Symbol(react.test.json),
396
+ "children": null,
397
+ "props": {
398
+ "accessibilityHint": "Enter text here",
399
+ "accessibilityState": {
400
+ "disabled": undefined,
401
+ },
402
+ "aria-label": "Text input field",
403
+ "autoCapitalize": "none",
404
+ "autoCorrect": false,
405
+ "blurOnSubmit": true,
406
+ "enterKeyHint": undefined,
407
+ "keyboardType": "number-pad",
408
+ "multiline": undefined,
409
+ "nativeID": undefined,
410
+ "numberOfLines": 1,
411
+ "onBlur": [Function],
412
+ "onChangeText": [Function],
413
+ "onContentSizeChange": [Function],
414
+ "onFocus": [Function],
415
+ "onSubmitEditing": [Function],
416
+ "placeholder": undefined,
417
+ "placeholderTextColor": "#686868",
418
+ "readOnly": undefined,
419
+ "ref": [Function],
420
+ "secureTextEntry": false,
421
+ "style": {
422
+ "color": "#1C1C1C",
423
+ "flex": 1,
424
+ "fontFamily": "text",
425
+ "fontSize": 16,
426
+ "gap": 10,
427
+ "height": 20,
428
+ "paddingVertical": 0,
429
+ "width": "100%",
430
+ },
431
+ "testID": undefined,
432
+ "textContentType": undefined,
433
+ "underlineColorAndroid": "transparent",
434
+ "value": "7911123456",
435
+ },
436
+ "type": "TextInput",
346
437
  },
347
- "aria-label": "Text input field",
348
- "autoCapitalize": "none",
349
- "autoCorrect": false,
350
- "blurOnSubmit": true,
351
- "enterKeyHint": undefined,
352
- "keyboardType": "number-pad",
353
- "multiline": undefined,
354
- "nativeID": undefined,
355
- "numberOfLines": 1,
356
- "onBlur": [Function],
357
- "onChangeText": [Function],
358
- "onContentSizeChange": [Function],
359
- "onFocus": [Function],
360
- "onSubmitEditing": [Function],
361
- "placeholder": undefined,
362
- "placeholderTextColor": "#686868",
363
- "readOnly": undefined,
364
- "ref": [Function],
365
- "secureTextEntry": false,
438
+ ],
439
+ "props": {
366
440
  "style": {
367
- "color": "#1C1C1C",
368
- "flex": 1,
369
- "fontFamily": "text",
370
- "fontSize": 16,
371
- "gap": 10,
372
- "height": 20,
373
- "paddingVertical": 0,
374
- "width": "100%",
441
+ "alignItems": "center",
442
+ "flexDirection": "row",
375
443
  },
376
444
  "testID": undefined,
377
- "textContentType": undefined,
378
- "underlineColorAndroid": "transparent",
379
- "value": "7911123456",
380
445
  },
381
- "type": "TextInput",
446
+ "type": "View",
382
447
  },
383
448
  ],
384
449
  "props": {
385
450
  "style": {
386
- "alignItems": "center",
387
451
  "backgroundColor": "#FFFFFF",
388
452
  "borderColor": "#9A9A9A",
389
453
  "borderRadius": 4,
390
454
  "borderWidth": 1,
391
- "flexDirection": "row",
455
+ "flexDirection": "column",
456
+ "gap": 0,
392
457
  "overflow": "hidden",
393
458
  "paddingHorizontal": 12,
394
459
  "paddingVertical": 8,
@@ -21,7 +21,6 @@ exports[`Slider snapshots should match snapshot with default props 1`] = `
21
21
  "thumbStyle": {
22
22
  "backgroundColor": "white",
23
23
  "borderRadius": 24,
24
- "boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
25
24
  "elevation": 5,
26
25
  "height": 48,
27
26
  "width": 48,
@@ -133,7 +132,6 @@ exports[`Slider snapshots should match snapshot with title and showSelection 1`]
133
132
  "thumbStyle": {
134
133
  "backgroundColor": "white",
135
134
  "borderRadius": 24,
136
- "boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
137
135
  "elevation": 5,
138
136
  "height": 48,
139
137
  "width": 48,
@@ -191,7 +189,6 @@ exports[`Slider snapshots should match snapshot with labels 1`] = `
191
189
  "thumbStyle": {
192
190
  "backgroundColor": "white",
193
191
  "borderRadius": 24,
194
- "boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
195
192
  "elevation": 5,
196
193
  "height": 48,
197
194
  "width": 48,
@@ -363,7 +360,6 @@ exports[`Slider snapshots should match snapshot with inline labels 1`] = `
363
360
  "thumbStyle": {
364
361
  "backgroundColor": "white",
365
362
  "borderRadius": 24,
366
- "boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
367
363
  "elevation": 5,
368
364
  "height": 48,
369
365
  "width": 48,
@@ -505,7 +501,6 @@ exports[`Slider snapshots should match snapshot with helper text 1`] = `
505
501
  "thumbStyle": {
506
502
  "backgroundColor": "white",
507
503
  "borderRadius": 24,
508
- "boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
509
504
  "elevation": 5,
510
505
  "height": 48,
511
506
  "width": 48,
@@ -604,7 +599,6 @@ exports[`Slider snapshots should match snapshot with error text 1`] = `
604
599
  "thumbStyle": {
605
600
  "backgroundColor": "white",
606
601
  "borderRadius": 24,
607
- "boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
608
602
  "elevation": 5,
609
603
  "height": 48,
610
604
  "width": 48,
@@ -755,7 +749,6 @@ exports[`Slider snapshots should match snapshot when disabled 1`] = `
755
749
  "thumbStyle": {
756
750
  "backgroundColor": "white",
757
751
  "borderRadius": 24,
758
- "boxShadow": "0px 2px 4px rgba(0, 0, 0, 0.25)",
759
752
  "elevation": 5,
760
753
  "height": 48,
761
754
  "width": 48,