@terreno/ui 0.6.0 → 0.7.1

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 (52) hide show
  1. package/README.md +5 -5
  2. package/dist/AiSuggestionBox.d.ts +6 -0
  3. package/dist/AiSuggestionBox.js +87 -0
  4. package/dist/AiSuggestionBox.js.map +1 -0
  5. package/dist/Common.d.ts +13 -0
  6. package/dist/Common.js.map +1 -1
  7. package/dist/CommonIconTypes.d.ts +1 -1
  8. package/dist/FlatList.js.map +1 -1
  9. package/dist/GPTChat.d.ts +2 -1
  10. package/dist/GPTChat.js +14 -4
  11. package/dist/GPTChat.js.map +1 -1
  12. package/dist/Page.js +2 -1
  13. package/dist/Page.js.map +1 -1
  14. package/dist/ScrollView.js.map +1 -1
  15. package/dist/TextField.js +46 -41
  16. package/dist/TextField.js.map +1 -1
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.js +1 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/login/LoginScreen.js +1 -1
  21. package/dist/login/LoginScreen.js.map +1 -1
  22. package/dist/signUp/SignUpScreen.js +1 -1
  23. package/dist/signUp/SignUpScreen.js.map +1 -1
  24. package/package.json +1 -1
  25. package/src/AiSuggestionBox.test.tsx +373 -0
  26. package/src/AiSuggestionBox.tsx +233 -0
  27. package/src/Common.ts +15 -0
  28. package/src/CommonIconTypes.ts +1 -1
  29. package/src/FlatList.tsx +1 -0
  30. package/src/GPTChat.tsx +40 -2
  31. package/src/Page.tsx +20 -9
  32. package/src/ScrollView.tsx +1 -0
  33. package/src/TextField.tsx +88 -69
  34. package/src/__snapshots__/AddressField.test.tsx.snap +208 -152
  35. package/src/__snapshots__/AiSuggestionBox.test.tsx.snap +1031 -0
  36. package/src/__snapshots__/CustomSelectField.test.tsx.snap +51 -37
  37. package/src/__snapshots__/EmailField.test.tsx.snap +111 -83
  38. package/src/__snapshots__/Field.test.tsx.snap +616 -448
  39. package/src/__snapshots__/MobileAddressAutoComplete.test.tsx.snap +51 -37
  40. package/src/__snapshots__/NumberField.test.tsx.snap +51 -37
  41. package/src/__snapshots__/Page.test.tsx.snap +15 -20
  42. package/src/__snapshots__/PhoneNumberField.test.tsx.snap +264 -194
  43. package/src/__snapshots__/TapToEdit.test.tsx.snap +51 -37
  44. package/src/__snapshots__/TextArea.test.tsx.snap +255 -185
  45. package/src/__snapshots__/TextField.test.tsx.snap +264 -194
  46. package/src/__snapshots__/UnifiedAddressAutoComplete.test.tsx.snap +204 -148
  47. package/src/__snapshots__/WebAddressAutocomplete.test.tsx.snap +153 -111
  48. package/src/index.tsx +1 -0
  49. package/src/login/LoginScreen.tsx +1 -0
  50. package/src/login/__snapshots__/LoginScreen.test.tsx.snap +104 -76
  51. package/src/signUp/SignUpScreen.tsx +1 -0
  52. package/src/signUp/__snapshots__/SignUpScreen.test.tsx.snap +156 -114
@@ -9,56 +9,70 @@ exports[`TextArea snapshots should match snapshot 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": "sentences",
23
+ "autoCorrect": true,
24
+ "blurOnSubmit": true,
25
+ "enterKeyHint": undefined,
26
+ "keyboardType": "default",
27
+ "multiline": true,
28
+ "nativeID": undefined,
29
+ "numberOfLines": 1,
30
+ "onBlur": [Function],
31
+ "onChangeText": [class 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": 40,
47
+ "paddingVertical": 0,
48
+ "width": "100%",
49
+ },
50
+ "testID": undefined,
51
+ "textContentType": "none",
52
+ "underlineColorAndroid": "transparent",
53
+ "value": "test content",
54
+ },
55
+ "type": "TextInput",
17
56
  },
18
- "aria-label": "Text input field",
19
- "autoCapitalize": "sentences",
20
- "autoCorrect": true,
21
- "blurOnSubmit": true,
22
- "enterKeyHint": undefined,
23
- "keyboardType": "default",
24
- "multiline": true,
25
- "numberOfLines": 1,
26
- "onBlur": [Function],
27
- "onChangeText": [class Function],
28
- "onContentSizeChange": [Function],
29
- "onFocus": [Function],
30
- "onSubmitEditing": [Function],
31
- "placeholder": undefined,
32
- "placeholderTextColor": "#686868",
33
- "readOnly": undefined,
34
- "ref": [Function],
35
- "secureTextEntry": false,
57
+ ],
58
+ "props": {
36
59
  "style": {
37
- "color": "#1C1C1C",
38
- "flex": 1,
39
- "fontFamily": "text",
40
- "fontSize": 16,
41
- "gap": 10,
42
- "height": 40,
43
- "paddingVertical": 0,
44
- "width": "100%",
60
+ "alignItems": "center",
61
+ "flexDirection": "row",
45
62
  },
46
63
  "testID": undefined,
47
- "textContentType": "none",
48
- "underlineColorAndroid": "transparent",
49
- "value": "test content",
50
64
  },
51
- "type": "TextInput",
65
+ "type": "View",
52
66
  },
53
67
  ],
54
68
  "props": {
55
69
  "style": {
56
- "alignItems": "center",
57
70
  "backgroundColor": "#FFFFFF",
58
71
  "borderColor": "#9A9A9A",
59
72
  "borderRadius": 4,
60
73
  "borderWidth": 1,
61
- "flexDirection": "row",
74
+ "flexDirection": "column",
75
+ "gap": 0,
62
76
  "overflow": "hidden",
63
77
  "paddingHorizontal": 12,
64
78
  "paddingVertical": 8,
@@ -103,56 +117,70 @@ exports[`TextArea snapshots should match snapshot with all props 1`] = `
103
117
  "children": [
104
118
  {
105
119
  "$$typeof": Symbol(react.test.json),
106
- "children": null,
107
- "props": {
108
- "accessibilityHint": "Enter text here",
109
- "accessibilityState": {
110
- "disabled": false,
120
+ "children": [
121
+ {
122
+ "$$typeof": Symbol(react.test.json),
123
+ "children": null,
124
+ "props": {
125
+ "accessibilityHint": "Enter text here",
126
+ "accessibilityState": {
127
+ "disabled": false,
128
+ },
129
+ "aria-label": "Text input field",
130
+ "autoCapitalize": "sentences",
131
+ "autoCorrect": true,
132
+ "blurOnSubmit": true,
133
+ "enterKeyHint": undefined,
134
+ "keyboardType": "default",
135
+ "multiline": true,
136
+ "nativeID": undefined,
137
+ "numberOfLines": 5,
138
+ "onBlur": [Function],
139
+ "onChangeText": [class Function],
140
+ "onContentSizeChange": [Function],
141
+ "onFocus": [Function],
142
+ "onSubmitEditing": [Function],
143
+ "placeholder": "Enter description",
144
+ "placeholderTextColor": "#686868",
145
+ "readOnly": false,
146
+ "ref": [Function],
147
+ "secureTextEntry": false,
148
+ "style": {
149
+ "color": "#1C1C1C",
150
+ "flex": 1,
151
+ "fontFamily": "text",
152
+ "fontSize": 16,
153
+ "gap": 10,
154
+ "height": 200,
155
+ "paddingVertical": 0,
156
+ "width": "100%",
157
+ },
158
+ "testID": undefined,
159
+ "textContentType": "none",
160
+ "underlineColorAndroid": "transparent",
161
+ "value": "test content",
162
+ },
163
+ "type": "TextInput",
111
164
  },
112
- "aria-label": "Text input field",
113
- "autoCapitalize": "sentences",
114
- "autoCorrect": true,
115
- "blurOnSubmit": true,
116
- "enterKeyHint": undefined,
117
- "keyboardType": "default",
118
- "multiline": true,
119
- "numberOfLines": 5,
120
- "onBlur": [Function],
121
- "onChangeText": [class Function],
122
- "onContentSizeChange": [Function],
123
- "onFocus": [Function],
124
- "onSubmitEditing": [Function],
125
- "placeholder": "Enter description",
126
- "placeholderTextColor": "#686868",
127
- "readOnly": false,
128
- "ref": [Function],
129
- "secureTextEntry": false,
165
+ ],
166
+ "props": {
130
167
  "style": {
131
- "color": "#1C1C1C",
132
- "flex": 1,
133
- "fontFamily": "text",
134
- "fontSize": 16,
135
- "gap": 10,
136
- "height": 200,
137
- "paddingVertical": 0,
138
- "width": "100%",
168
+ "alignItems": "center",
169
+ "flexDirection": "row",
139
170
  },
140
171
  "testID": undefined,
141
- "textContentType": "none",
142
- "underlineColorAndroid": "transparent",
143
- "value": "test content",
144
172
  },
145
- "type": "TextInput",
173
+ "type": "View",
146
174
  },
147
175
  ],
148
176
  "props": {
149
177
  "style": {
150
- "alignItems": "center",
151
178
  "backgroundColor": "#FFFFFF",
152
179
  "borderColor": "#9A9A9A",
153
180
  "borderRadius": 4,
154
181
  "borderWidth": 1,
155
- "flexDirection": "row",
182
+ "flexDirection": "column",
183
+ "gap": 0,
156
184
  "overflow": "hidden",
157
185
  "paddingHorizontal": 12,
158
186
  "paddingVertical": 8,
@@ -223,56 +251,70 @@ exports[`TextArea snapshots should match snapshot when disabled 1`] = `
223
251
  "children": [
224
252
  {
225
253
  "$$typeof": Symbol(react.test.json),
226
- "children": null,
227
- "props": {
228
- "accessibilityHint": "Enter text here",
229
- "accessibilityState": {
230
- "disabled": true,
254
+ "children": [
255
+ {
256
+ "$$typeof": Symbol(react.test.json),
257
+ "children": null,
258
+ "props": {
259
+ "accessibilityHint": "Enter text here",
260
+ "accessibilityState": {
261
+ "disabled": true,
262
+ },
263
+ "aria-label": "Text input field",
264
+ "autoCapitalize": "sentences",
265
+ "autoCorrect": true,
266
+ "blurOnSubmit": true,
267
+ "enterKeyHint": undefined,
268
+ "keyboardType": "default",
269
+ "multiline": true,
270
+ "nativeID": undefined,
271
+ "numberOfLines": 1,
272
+ "onBlur": [Function],
273
+ "onChangeText": [class Function],
274
+ "onContentSizeChange": [Function],
275
+ "onFocus": [Function],
276
+ "onSubmitEditing": [Function],
277
+ "placeholder": undefined,
278
+ "placeholderTextColor": "#686868",
279
+ "readOnly": true,
280
+ "ref": [Function],
281
+ "secureTextEntry": false,
282
+ "style": {
283
+ "color": "#1C1C1C",
284
+ "flex": 1,
285
+ "fontFamily": "text",
286
+ "fontSize": 16,
287
+ "gap": 10,
288
+ "height": 40,
289
+ "paddingVertical": 0,
290
+ "width": "100%",
291
+ },
292
+ "testID": undefined,
293
+ "textContentType": "none",
294
+ "underlineColorAndroid": "transparent",
295
+ "value": "disabled content",
296
+ },
297
+ "type": "TextInput",
231
298
  },
232
- "aria-label": "Text input field",
233
- "autoCapitalize": "sentences",
234
- "autoCorrect": true,
235
- "blurOnSubmit": true,
236
- "enterKeyHint": undefined,
237
- "keyboardType": "default",
238
- "multiline": true,
239
- "numberOfLines": 1,
240
- "onBlur": [Function],
241
- "onChangeText": [class Function],
242
- "onContentSizeChange": [Function],
243
- "onFocus": [Function],
244
- "onSubmitEditing": [Function],
245
- "placeholder": undefined,
246
- "placeholderTextColor": "#686868",
247
- "readOnly": true,
248
- "ref": [Function],
249
- "secureTextEntry": false,
299
+ ],
300
+ "props": {
250
301
  "style": {
251
- "color": "#1C1C1C",
252
- "flex": 1,
253
- "fontFamily": "text",
254
- "fontSize": 16,
255
- "gap": 10,
256
- "height": 40,
257
- "paddingVertical": 0,
258
- "width": "100%",
302
+ "alignItems": "center",
303
+ "flexDirection": "row",
259
304
  },
260
305
  "testID": undefined,
261
- "textContentType": "none",
262
- "underlineColorAndroid": "transparent",
263
- "value": "disabled content",
264
306
  },
265
- "type": "TextInput",
307
+ "type": "View",
266
308
  },
267
309
  ],
268
310
  "props": {
269
311
  "style": {
270
- "alignItems": "center",
271
312
  "backgroundColor": "#D9D9D9",
272
313
  "borderColor": "#4E4E4E",
273
314
  "borderRadius": 4,
274
315
  "borderWidth": 1,
275
- "flexDirection": "row",
316
+ "flexDirection": "column",
317
+ "gap": 0,
276
318
  "overflow": "hidden",
277
319
  "paddingHorizontal": 12,
278
320
  "paddingVertical": 8,
@@ -356,56 +398,70 @@ exports[`TextArea snapshots should match snapshot with error state 1`] = `
356
398
  "children": [
357
399
  {
358
400
  "$$typeof": Symbol(react.test.json),
359
- "children": null,
360
- "props": {
361
- "accessibilityHint": "Enter text here",
362
- "accessibilityState": {
363
- "disabled": undefined,
401
+ "children": [
402
+ {
403
+ "$$typeof": Symbol(react.test.json),
404
+ "children": null,
405
+ "props": {
406
+ "accessibilityHint": "Enter text here",
407
+ "accessibilityState": {
408
+ "disabled": undefined,
409
+ },
410
+ "aria-label": "Text input field",
411
+ "autoCapitalize": "sentences",
412
+ "autoCorrect": true,
413
+ "blurOnSubmit": true,
414
+ "enterKeyHint": undefined,
415
+ "keyboardType": "default",
416
+ "multiline": true,
417
+ "nativeID": undefined,
418
+ "numberOfLines": 1,
419
+ "onBlur": [Function],
420
+ "onChangeText": [class Function],
421
+ "onContentSizeChange": [Function],
422
+ "onFocus": [Function],
423
+ "onSubmitEditing": [Function],
424
+ "placeholder": undefined,
425
+ "placeholderTextColor": "#686868",
426
+ "readOnly": undefined,
427
+ "ref": [Function],
428
+ "secureTextEntry": false,
429
+ "style": {
430
+ "color": "#1C1C1C",
431
+ "flex": 1,
432
+ "fontFamily": "text",
433
+ "fontSize": 16,
434
+ "gap": 10,
435
+ "height": 40,
436
+ "paddingVertical": 0,
437
+ "width": "100%",
438
+ },
439
+ "testID": undefined,
440
+ "textContentType": "none",
441
+ "underlineColorAndroid": "transparent",
442
+ "value": "",
443
+ },
444
+ "type": "TextInput",
364
445
  },
365
- "aria-label": "Text input field",
366
- "autoCapitalize": "sentences",
367
- "autoCorrect": true,
368
- "blurOnSubmit": true,
369
- "enterKeyHint": undefined,
370
- "keyboardType": "default",
371
- "multiline": true,
372
- "numberOfLines": 1,
373
- "onBlur": [Function],
374
- "onChangeText": [class Function],
375
- "onContentSizeChange": [Function],
376
- "onFocus": [Function],
377
- "onSubmitEditing": [Function],
378
- "placeholder": undefined,
379
- "placeholderTextColor": "#686868",
380
- "readOnly": undefined,
381
- "ref": [Function],
382
- "secureTextEntry": false,
446
+ ],
447
+ "props": {
383
448
  "style": {
384
- "color": "#1C1C1C",
385
- "flex": 1,
386
- "fontFamily": "text",
387
- "fontSize": 16,
388
- "gap": 10,
389
- "height": 40,
390
- "paddingVertical": 0,
391
- "width": "100%",
449
+ "alignItems": "center",
450
+ "flexDirection": "row",
392
451
  },
393
452
  "testID": undefined,
394
- "textContentType": "none",
395
- "underlineColorAndroid": "transparent",
396
- "value": "",
397
453
  },
398
- "type": "TextInput",
454
+ "type": "View",
399
455
  },
400
456
  ],
401
457
  "props": {
402
458
  "style": {
403
- "alignItems": "center",
404
459
  "backgroundColor": "#FFFFFF",
405
460
  "borderColor": "#D33232",
406
461
  "borderRadius": 4,
407
462
  "borderWidth": 1,
408
- "flexDirection": "row",
463
+ "flexDirection": "column",
464
+ "gap": 0,
409
465
  "overflow": "hidden",
410
466
  "paddingHorizontal": 12,
411
467
  "paddingVertical": 8,
@@ -450,56 +506,70 @@ exports[`TextArea snapshots should match snapshot with multiline content 1`] = `
450
506
  "children": [
451
507
  {
452
508
  "$$typeof": Symbol(react.test.json),
453
- "children": null,
454
- "props": {
455
- "accessibilityHint": "Enter text here",
456
- "accessibilityState": {
457
- "disabled": undefined,
509
+ "children": [
510
+ {
511
+ "$$typeof": Symbol(react.test.json),
512
+ "children": null,
513
+ "props": {
514
+ "accessibilityHint": "Enter text here",
515
+ "accessibilityState": {
516
+ "disabled": undefined,
517
+ },
518
+ "aria-label": "Text input field",
519
+ "autoCapitalize": "sentences",
520
+ "autoCorrect": true,
521
+ "blurOnSubmit": true,
522
+ "enterKeyHint": undefined,
523
+ "keyboardType": "default",
524
+ "multiline": true,
525
+ "nativeID": undefined,
526
+ "numberOfLines": 4,
527
+ "onBlur": [Function],
528
+ "onChangeText": [class Function],
529
+ "onContentSizeChange": [Function],
530
+ "onFocus": [Function],
531
+ "onSubmitEditing": [Function],
532
+ "placeholder": undefined,
533
+ "placeholderTextColor": "#686868",
534
+ "readOnly": undefined,
535
+ "ref": [Function],
536
+ "secureTextEntry": false,
537
+ "style": {
538
+ "color": "#1C1C1C",
539
+ "flex": 1,
540
+ "fontFamily": "text",
541
+ "fontSize": 16,
542
+ "gap": 10,
543
+ "height": 160,
544
+ "paddingVertical": 0,
545
+ "width": "100%",
546
+ },
547
+ "testID": undefined,
548
+ "textContentType": "none",
549
+ "underlineColorAndroid": "transparent",
550
+ "value": "Line 1\\nLine 2\\nLine 3",
551
+ },
552
+ "type": "TextInput",
458
553
  },
459
- "aria-label": "Text input field",
460
- "autoCapitalize": "sentences",
461
- "autoCorrect": true,
462
- "blurOnSubmit": true,
463
- "enterKeyHint": undefined,
464
- "keyboardType": "default",
465
- "multiline": true,
466
- "numberOfLines": 4,
467
- "onBlur": [Function],
468
- "onChangeText": [class Function],
469
- "onContentSizeChange": [Function],
470
- "onFocus": [Function],
471
- "onSubmitEditing": [Function],
472
- "placeholder": undefined,
473
- "placeholderTextColor": "#686868",
474
- "readOnly": undefined,
475
- "ref": [Function],
476
- "secureTextEntry": false,
554
+ ],
555
+ "props": {
477
556
  "style": {
478
- "color": "#1C1C1C",
479
- "flex": 1,
480
- "fontFamily": "text",
481
- "fontSize": 16,
482
- "gap": 10,
483
- "height": 160,
484
- "paddingVertical": 0,
485
- "width": "100%",
557
+ "alignItems": "center",
558
+ "flexDirection": "row",
486
559
  },
487
560
  "testID": undefined,
488
- "textContentType": "none",
489
- "underlineColorAndroid": "transparent",
490
- "value": "Line 1\\nLine 2\\nLine 3",
491
561
  },
492
- "type": "TextInput",
562
+ "type": "View",
493
563
  },
494
564
  ],
495
565
  "props": {
496
566
  "style": {
497
- "alignItems": "center",
498
567
  "backgroundColor": "#FFFFFF",
499
568
  "borderColor": "#9A9A9A",
500
569
  "borderRadius": 4,
501
570
  "borderWidth": 1,
502
- "flexDirection": "row",
571
+ "flexDirection": "column",
572
+ "gap": 0,
503
573
  "overflow": "hidden",
504
574
  "paddingHorizontal": 12,
505
575
  "paddingVertical": 8,