@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[`TextField 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": undefined,
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": 20,
47
+ "paddingVertical": 0,
48
+ "width": "100%",
49
+ },
50
+ "testID": undefined,
51
+ "textContentType": "none",
52
+ "underlineColorAndroid": "transparent",
53
+ "value": "test value",
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": undefined,
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": 20,
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 value",
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,
@@ -142,65 +156,79 @@ exports[`TextField snapshots should match snapshot with all props 1`] = `
142
156
  "children": [
143
157
  {
144
158
  "$$typeof": Symbol(react.test.json),
145
- "children": null,
146
- "props": {
147
- "accessibilityHint": "Enter text here",
148
- "accessibilityState": {
149
- "disabled": false,
159
+ "children": [
160
+ {
161
+ "$$typeof": Symbol(react.test.json),
162
+ "children": null,
163
+ "props": {
164
+ "accessibilityHint": "Enter text here",
165
+ "accessibilityState": {
166
+ "disabled": false,
167
+ },
168
+ "aria-label": "Text input field",
169
+ "autoCapitalize": "sentences",
170
+ "autoCorrect": true,
171
+ "blurOnSubmit": true,
172
+ "enterKeyHint": undefined,
173
+ "keyboardType": "default",
174
+ "multiline": false,
175
+ "nativeID": undefined,
176
+ "numberOfLines": 1,
177
+ "onBlur": [Function],
178
+ "onChangeText": [class Function],
179
+ "onContentSizeChange": [Function],
180
+ "onFocus": [Function],
181
+ "onSubmitEditing": [Function],
182
+ "placeholder": "Enter text",
183
+ "placeholderTextColor": "#686868",
184
+ "readOnly": false,
185
+ "ref": [Function],
186
+ "secureTextEntry": false,
187
+ "style": {
188
+ "color": "#1C1C1C",
189
+ "flex": 1,
190
+ "fontFamily": "text",
191
+ "fontSize": 16,
192
+ "gap": 10,
193
+ "height": 20,
194
+ "paddingVertical": 0,
195
+ "width": "100%",
196
+ },
197
+ "testID": undefined,
198
+ "textContentType": "none",
199
+ "underlineColorAndroid": "transparent",
200
+ "value": "test value",
201
+ },
202
+ "type": "TextInput",
150
203
  },
151
- "aria-label": "Text input field",
152
- "autoCapitalize": "sentences",
153
- "autoCorrect": true,
154
- "blurOnSubmit": true,
155
- "enterKeyHint": undefined,
156
- "keyboardType": "default",
157
- "multiline": false,
158
- "numberOfLines": 1,
159
- "onBlur": [Function],
160
- "onChangeText": [class Function],
161
- "onContentSizeChange": [Function],
162
- "onFocus": [Function],
163
- "onSubmitEditing": [Function],
164
- "placeholder": "Enter text",
165
- "placeholderTextColor": "#686868",
166
- "readOnly": false,
167
- "ref": [Function],
168
- "secureTextEntry": false,
204
+ {
205
+ "$$typeof": Symbol(react.test.json),
206
+ "children": null,
207
+ "props": {
208
+ "aria-role": "button",
209
+ "onPress": [class Function],
210
+ },
211
+ "type": "Pressable",
212
+ },
213
+ ],
214
+ "props": {
169
215
  "style": {
170
- "color": "#1C1C1C",
171
- "flex": 1,
172
- "fontFamily": "text",
173
- "fontSize": 16,
174
- "gap": 10,
175
- "height": 20,
176
- "paddingVertical": 0,
177
- "width": "100%",
216
+ "alignItems": "center",
217
+ "flexDirection": "row",
178
218
  },
179
219
  "testID": undefined,
180
- "textContentType": "none",
181
- "underlineColorAndroid": "transparent",
182
- "value": "test value",
183
220
  },
184
- "type": "TextInput",
185
- },
186
- {
187
- "$$typeof": Symbol(react.test.json),
188
- "children": null,
189
- "props": {
190
- "aria-role": "button",
191
- "onPress": [class Function],
192
- },
193
- "type": "Pressable",
221
+ "type": "View",
194
222
  },
195
223
  ],
196
224
  "props": {
197
225
  "style": {
198
- "alignItems": "center",
199
226
  "backgroundColor": "#FFFFFF",
200
227
  "borderColor": "#D33232",
201
228
  "borderRadius": 4,
202
229
  "borderWidth": 1,
203
- "flexDirection": "row",
230
+ "flexDirection": "column",
231
+ "gap": 0,
204
232
  "overflow": "hidden",
205
233
  "paddingHorizontal": 12,
206
234
  "paddingVertical": 8,
@@ -271,56 +299,70 @@ exports[`TextField snapshots should match snapshot when disabled 1`] = `
271
299
  "children": [
272
300
  {
273
301
  "$$typeof": Symbol(react.test.json),
274
- "children": null,
275
- "props": {
276
- "accessibilityHint": "Enter text here",
277
- "accessibilityState": {
278
- "disabled": true,
302
+ "children": [
303
+ {
304
+ "$$typeof": Symbol(react.test.json),
305
+ "children": null,
306
+ "props": {
307
+ "accessibilityHint": "Enter text here",
308
+ "accessibilityState": {
309
+ "disabled": true,
310
+ },
311
+ "aria-label": "Text input field",
312
+ "autoCapitalize": "sentences",
313
+ "autoCorrect": true,
314
+ "blurOnSubmit": true,
315
+ "enterKeyHint": undefined,
316
+ "keyboardType": "default",
317
+ "multiline": undefined,
318
+ "nativeID": undefined,
319
+ "numberOfLines": 1,
320
+ "onBlur": [Function],
321
+ "onChangeText": [class Function],
322
+ "onContentSizeChange": [Function],
323
+ "onFocus": [Function],
324
+ "onSubmitEditing": [Function],
325
+ "placeholder": undefined,
326
+ "placeholderTextColor": "#686868",
327
+ "readOnly": true,
328
+ "ref": [Function],
329
+ "secureTextEntry": false,
330
+ "style": {
331
+ "color": "#1C1C1C",
332
+ "flex": 1,
333
+ "fontFamily": "text",
334
+ "fontSize": 16,
335
+ "gap": 10,
336
+ "height": 20,
337
+ "paddingVertical": 0,
338
+ "width": "100%",
339
+ },
340
+ "testID": undefined,
341
+ "textContentType": "none",
342
+ "underlineColorAndroid": "transparent",
343
+ "value": "disabled value",
344
+ },
345
+ "type": "TextInput",
279
346
  },
280
- "aria-label": "Text input field",
281
- "autoCapitalize": "sentences",
282
- "autoCorrect": true,
283
- "blurOnSubmit": true,
284
- "enterKeyHint": undefined,
285
- "keyboardType": "default",
286
- "multiline": undefined,
287
- "numberOfLines": 1,
288
- "onBlur": [Function],
289
- "onChangeText": [class Function],
290
- "onContentSizeChange": [Function],
291
- "onFocus": [Function],
292
- "onSubmitEditing": [Function],
293
- "placeholder": undefined,
294
- "placeholderTextColor": "#686868",
295
- "readOnly": true,
296
- "ref": [Function],
297
- "secureTextEntry": false,
347
+ ],
348
+ "props": {
298
349
  "style": {
299
- "color": "#1C1C1C",
300
- "flex": 1,
301
- "fontFamily": "text",
302
- "fontSize": 16,
303
- "gap": 10,
304
- "height": 20,
305
- "paddingVertical": 0,
306
- "width": "100%",
350
+ "alignItems": "center",
351
+ "flexDirection": "row",
307
352
  },
308
353
  "testID": undefined,
309
- "textContentType": "none",
310
- "underlineColorAndroid": "transparent",
311
- "value": "disabled value",
312
354
  },
313
- "type": "TextInput",
355
+ "type": "View",
314
356
  },
315
357
  ],
316
358
  "props": {
317
359
  "style": {
318
- "alignItems": "center",
319
360
  "backgroundColor": "#D9D9D9",
320
361
  "borderColor": "#4E4E4E",
321
362
  "borderRadius": 4,
322
363
  "borderWidth": 1,
323
- "flexDirection": "row",
364
+ "flexDirection": "column",
365
+ "gap": 0,
324
366
  "overflow": "hidden",
325
367
  "paddingHorizontal": 12,
326
368
  "paddingVertical": 8,
@@ -365,56 +407,70 @@ exports[`TextField snapshots should match snapshot with multiline 1`] = `
365
407
  "children": [
366
408
  {
367
409
  "$$typeof": Symbol(react.test.json),
368
- "children": null,
369
- "props": {
370
- "accessibilityHint": "Enter text here",
371
- "accessibilityState": {
372
- "disabled": undefined,
410
+ "children": [
411
+ {
412
+ "$$typeof": Symbol(react.test.json),
413
+ "children": null,
414
+ "props": {
415
+ "accessibilityHint": "Enter text here",
416
+ "accessibilityState": {
417
+ "disabled": undefined,
418
+ },
419
+ "aria-label": "Text input field",
420
+ "autoCapitalize": "sentences",
421
+ "autoCorrect": true,
422
+ "blurOnSubmit": true,
423
+ "enterKeyHint": undefined,
424
+ "keyboardType": "default",
425
+ "multiline": true,
426
+ "nativeID": undefined,
427
+ "numberOfLines": 3,
428
+ "onBlur": [Function],
429
+ "onChangeText": [class Function],
430
+ "onContentSizeChange": [Function],
431
+ "onFocus": [Function],
432
+ "onSubmitEditing": [Function],
433
+ "placeholder": undefined,
434
+ "placeholderTextColor": "#686868",
435
+ "readOnly": undefined,
436
+ "ref": [Function],
437
+ "secureTextEntry": false,
438
+ "style": {
439
+ "color": "#1C1C1C",
440
+ "flex": 1,
441
+ "fontFamily": "text",
442
+ "fontSize": 16,
443
+ "gap": 10,
444
+ "height": 120,
445
+ "paddingVertical": 0,
446
+ "width": "100%",
447
+ },
448
+ "testID": undefined,
449
+ "textContentType": "none",
450
+ "underlineColorAndroid": "transparent",
451
+ "value": "line 1\\nline 2",
452
+ },
453
+ "type": "TextInput",
373
454
  },
374
- "aria-label": "Text input field",
375
- "autoCapitalize": "sentences",
376
- "autoCorrect": true,
377
- "blurOnSubmit": true,
378
- "enterKeyHint": undefined,
379
- "keyboardType": "default",
380
- "multiline": true,
381
- "numberOfLines": 3,
382
- "onBlur": [Function],
383
- "onChangeText": [class Function],
384
- "onContentSizeChange": [Function],
385
- "onFocus": [Function],
386
- "onSubmitEditing": [Function],
387
- "placeholder": undefined,
388
- "placeholderTextColor": "#686868",
389
- "readOnly": undefined,
390
- "ref": [Function],
391
- "secureTextEntry": false,
455
+ ],
456
+ "props": {
392
457
  "style": {
393
- "color": "#1C1C1C",
394
- "flex": 1,
395
- "fontFamily": "text",
396
- "fontSize": 16,
397
- "gap": 10,
398
- "height": 120,
399
- "paddingVertical": 0,
400
- "width": "100%",
458
+ "alignItems": "center",
459
+ "flexDirection": "row",
401
460
  },
402
461
  "testID": undefined,
403
- "textContentType": "none",
404
- "underlineColorAndroid": "transparent",
405
- "value": "line 1\\nline 2",
406
462
  },
407
- "type": "TextInput",
463
+ "type": "View",
408
464
  },
409
465
  ],
410
466
  "props": {
411
467
  "style": {
412
- "alignItems": "center",
413
468
  "backgroundColor": "#FFFFFF",
414
469
  "borderColor": "#9A9A9A",
415
470
  "borderRadius": 4,
416
471
  "borderWidth": 1,
417
- "flexDirection": "row",
472
+ "flexDirection": "column",
473
+ "gap": 0,
418
474
  "overflow": "hidden",
419
475
  "paddingHorizontal": 12,
420
476
  "paddingVertical": 8,
@@ -498,56 +554,70 @@ exports[`TextField snapshots should match snapshot with error state 1`] = `
498
554
  "children": [
499
555
  {
500
556
  "$$typeof": Symbol(react.test.json),
501
- "children": null,
502
- "props": {
503
- "accessibilityHint": "Enter text here",
504
- "accessibilityState": {
505
- "disabled": undefined,
557
+ "children": [
558
+ {
559
+ "$$typeof": Symbol(react.test.json),
560
+ "children": null,
561
+ "props": {
562
+ "accessibilityHint": "Enter text here",
563
+ "accessibilityState": {
564
+ "disabled": undefined,
565
+ },
566
+ "aria-label": "Text input field",
567
+ "autoCapitalize": "sentences",
568
+ "autoCorrect": true,
569
+ "blurOnSubmit": true,
570
+ "enterKeyHint": undefined,
571
+ "keyboardType": "default",
572
+ "multiline": undefined,
573
+ "nativeID": undefined,
574
+ "numberOfLines": 1,
575
+ "onBlur": [Function],
576
+ "onChangeText": [class Function],
577
+ "onContentSizeChange": [Function],
578
+ "onFocus": [Function],
579
+ "onSubmitEditing": [Function],
580
+ "placeholder": undefined,
581
+ "placeholderTextColor": "#686868",
582
+ "readOnly": undefined,
583
+ "ref": [Function],
584
+ "secureTextEntry": false,
585
+ "style": {
586
+ "color": "#1C1C1C",
587
+ "flex": 1,
588
+ "fontFamily": "text",
589
+ "fontSize": 16,
590
+ "gap": 10,
591
+ "height": 20,
592
+ "paddingVertical": 0,
593
+ "width": "100%",
594
+ },
595
+ "testID": undefined,
596
+ "textContentType": "none",
597
+ "underlineColorAndroid": "transparent",
598
+ "value": "",
599
+ },
600
+ "type": "TextInput",
506
601
  },
507
- "aria-label": "Text input field",
508
- "autoCapitalize": "sentences",
509
- "autoCorrect": true,
510
- "blurOnSubmit": true,
511
- "enterKeyHint": undefined,
512
- "keyboardType": "default",
513
- "multiline": undefined,
514
- "numberOfLines": 1,
515
- "onBlur": [Function],
516
- "onChangeText": [class Function],
517
- "onContentSizeChange": [Function],
518
- "onFocus": [Function],
519
- "onSubmitEditing": [Function],
520
- "placeholder": undefined,
521
- "placeholderTextColor": "#686868",
522
- "readOnly": undefined,
523
- "ref": [Function],
524
- "secureTextEntry": false,
602
+ ],
603
+ "props": {
525
604
  "style": {
526
- "color": "#1C1C1C",
527
- "flex": 1,
528
- "fontFamily": "text",
529
- "fontSize": 16,
530
- "gap": 10,
531
- "height": 20,
532
- "paddingVertical": 0,
533
- "width": "100%",
605
+ "alignItems": "center",
606
+ "flexDirection": "row",
534
607
  },
535
608
  "testID": undefined,
536
- "textContentType": "none",
537
- "underlineColorAndroid": "transparent",
538
- "value": "",
539
609
  },
540
- "type": "TextInput",
610
+ "type": "View",
541
611
  },
542
612
  ],
543
613
  "props": {
544
614
  "style": {
545
- "alignItems": "center",
546
615
  "backgroundColor": "#FFFFFF",
547
616
  "borderColor": "#D33232",
548
617
  "borderRadius": 4,
549
618
  "borderWidth": 1,
550
- "flexDirection": "row",
619
+ "flexDirection": "column",
620
+ "gap": 0,
551
621
  "overflow": "hidden",
552
622
  "paddingHorizontal": 12,
553
623
  "paddingVertical": 8,