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