@terreno/ui 0.10.0 → 0.11.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 (74) hide show
  1. package/dist/Banner.js +7 -5
  2. package/dist/Banner.js.map +1 -1
  3. package/dist/Common.d.ts +3 -1
  4. package/dist/Common.js.map +1 -1
  5. package/dist/TextFieldNumberActionSheet.d.ts +1 -1
  6. package/dist/Toast.d.ts +1 -1
  7. package/dist/Toast.js +2 -2
  8. package/dist/Toast.js.map +1 -1
  9. package/dist/index.d.ts +2 -2
  10. package/package.json +2 -1
  11. package/src/ActionSheet.test.tsx +262 -3
  12. package/src/AddressField.test.tsx +50 -0
  13. package/src/Banner.test.tsx +65 -0
  14. package/src/Banner.tsx +7 -5
  15. package/src/Box.test.tsx +218 -0
  16. package/src/Button.test.tsx +71 -0
  17. package/src/Common.ts +3 -1
  18. package/src/ConsentFormScreen.test.tsx +167 -0
  19. package/src/ConsentNavigator.test.tsx +206 -0
  20. package/src/DecimalRangeActionSheet.test.tsx +53 -2
  21. package/src/EmailField.test.tsx +81 -0
  22. package/src/EmojiSelector.test.tsx +262 -1
  23. package/src/HeightActionSheet.test.tsx +57 -2
  24. package/src/InfoModalIcon.test.tsx +16 -0
  25. package/src/InfoTooltipButton.test.tsx +53 -1
  26. package/src/MobileAddressAutoComplete.test.tsx +137 -7
  27. package/src/Modal.test.tsx +188 -0
  28. package/src/NumberPickerActionSheet.test.tsx +59 -2
  29. package/src/Page.test.tsx +162 -1
  30. package/src/Pagination.test.tsx +16 -0
  31. package/src/PhoneNumberField.test.tsx +46 -9
  32. package/src/PickerSelect.test.tsx +230 -0
  33. package/src/SegmentedControl.test.tsx +38 -0
  34. package/src/SelectBadge.test.tsx +52 -1
  35. package/src/SideDrawer.test.tsx +69 -0
  36. package/src/Signature.test.tsx +42 -5
  37. package/src/SignatureField.test.tsx +35 -0
  38. package/src/Slider.test.tsx +59 -0
  39. package/src/Spinner.test.tsx +6 -0
  40. package/src/SplitPage.test.tsx +228 -2
  41. package/src/TapToEdit.test.tsx +171 -1
  42. package/src/TerrenoProvider.test.tsx +42 -2
  43. package/src/TextFieldNumberActionSheet.tsx +1 -1
  44. package/src/Theme.test.tsx +118 -28
  45. package/src/Toast.test.tsx +95 -2
  46. package/src/Toast.tsx +3 -3
  47. package/src/Tooltip.test.tsx +204 -1
  48. package/src/UnifiedAddressAutoComplete.test.tsx +38 -19
  49. package/src/UserInactivity.test.tsx +73 -1
  50. package/src/Utilities.test.tsx +190 -2
  51. package/src/WebAddressAutocomplete.test.tsx +148 -1
  52. package/src/__snapshots__/ActionSheet.test.tsx.snap +1736 -0
  53. package/src/__snapshots__/Button.test.tsx.snap +68 -0
  54. package/src/__snapshots__/EmojiSelector.test.tsx.snap +1363 -0
  55. package/src/__snapshots__/InfoTooltipButton.test.tsx.snap +72 -3
  56. package/src/__snapshots__/MobileAddressAutoComplete.test.tsx.snap +60 -9
  57. package/src/__snapshots__/Modal.test.tsx.snap +181 -0
  58. package/src/__snapshots__/Page.test.tsx.snap +48 -2
  59. package/src/__snapshots__/PhoneNumberField.test.tsx.snap +0 -93
  60. package/src/__snapshots__/PickerSelect.test.tsx.snap +706 -0
  61. package/src/__snapshots__/SideDrawer.test.tsx.snap +533 -1399
  62. package/src/__snapshots__/Signature.test.tsx.snap +0 -3
  63. package/src/__snapshots__/SplitPage.test.tsx.snap +970 -0
  64. package/src/__snapshots__/UnifiedAddressAutoComplete.test.tsx.snap +220 -4
  65. package/src/__snapshots__/WebAddressAutocomplete.test.tsx.snap +93 -0
  66. package/src/bunSetup.ts +204 -121
  67. package/src/index.tsx +2 -2
  68. package/src/table/TableHeaderCell.test.tsx +142 -0
  69. package/src/table/TableRow.test.tsx +33 -0
  70. package/src/table/__snapshots__/TableRow.test.tsx.snap +403 -0
  71. package/src/table/tableContext.test.tsx +96 -0
  72. package/src/test-utils.tsx +1 -1
  73. package/src/useConsentForms.test.ts +130 -0
  74. package/src/useSubmitConsent.test.ts +64 -0
@@ -1,7 +1,76 @@
1
1
  // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
2
 
3
- exports[`InfoTooltipButton renders correctly with text 1`] = `null`;
3
+ exports[`InfoTooltipButton renders correctly with text 1`] = `
4
+ {
5
+ "$$typeof": Symbol(react.test.json),
6
+ "children": [
7
+ {
8
+ "$$typeof": Symbol(react.test.json),
9
+ "children": [
10
+ "Help information",
11
+ ],
12
+ "props": {
13
+ "style": undefined,
14
+ },
15
+ "type": "Text",
16
+ },
17
+ ],
18
+ "props": {
19
+ "accessibilityHint": "Show info tooltip",
20
+ "accessibilityLabel": "info",
21
+ "onPress": [Function],
22
+ "testID": "icon-button-exclamation",
23
+ },
24
+ "type": "Pressable",
25
+ }
26
+ `;
4
27
 
5
- exports[`InfoTooltipButton renders with different tooltip text 1`] = `null`;
28
+ exports[`InfoTooltipButton renders with different tooltip text 1`] = `
29
+ {
30
+ "$$typeof": Symbol(react.test.json),
31
+ "children": [
32
+ {
33
+ "$$typeof": Symbol(react.test.json),
34
+ "children": [
35
+ "Click for more details",
36
+ ],
37
+ "props": {
38
+ "style": undefined,
39
+ },
40
+ "type": "Text",
41
+ },
42
+ ],
43
+ "props": {
44
+ "accessibilityHint": "Show info tooltip",
45
+ "accessibilityLabel": "info",
46
+ "onPress": [Function],
47
+ "testID": "icon-button-exclamation",
48
+ },
49
+ "type": "Pressable",
50
+ }
51
+ `;
6
52
 
7
- exports[`InfoTooltipButton renders info icon 1`] = `null`;
53
+ exports[`InfoTooltipButton renders info icon 1`] = `
54
+ {
55
+ "$$typeof": Symbol(react.test.json),
56
+ "children": [
57
+ {
58
+ "$$typeof": Symbol(react.test.json),
59
+ "children": [
60
+ "Tooltip content",
61
+ ],
62
+ "props": {
63
+ "style": undefined,
64
+ },
65
+ "type": "Text",
66
+ },
67
+ ],
68
+ "props": {
69
+ "accessibilityHint": "Show info tooltip",
70
+ "accessibilityLabel": "info",
71
+ "onPress": [Function],
72
+ "testID": "icon-button-exclamation",
73
+ },
74
+ "type": "Pressable",
75
+ }
76
+ `;
@@ -20,11 +20,28 @@ exports[`MobileAddressAutocomplete renders correctly with Google API key 1`] = `
20
20
  },
21
21
  "type": "Text",
22
22
  },
23
+ {
24
+ "$$typeof": Symbol(react.test.json),
25
+ "children": [
26
+ {
27
+ "$$typeof": Symbol(react.test.json),
28
+ "children": [
29
+ "Select",
30
+ ],
31
+ "props": {
32
+ "style": undefined,
33
+ },
34
+ "type": "Text",
35
+ },
36
+ ],
37
+ "props": {
38
+ "onPress": [Function],
39
+ "testID": "mock-google-places-select",
40
+ },
41
+ "type": "Pressable",
42
+ },
23
43
  ],
24
44
  "props": {
25
- "ref": {
26
- "current": null,
27
- },
28
45
  "style": undefined,
29
46
  "testID": "google-places-autocomplete",
30
47
  },
@@ -163,11 +180,28 @@ exports[`MobileAddressAutocomplete renders disabled state 1`] = `
163
180
  },
164
181
  "type": "Text",
165
182
  },
183
+ {
184
+ "$$typeof": Symbol(react.test.json),
185
+ "children": [
186
+ {
187
+ "$$typeof": Symbol(react.test.json),
188
+ "children": [
189
+ "Select",
190
+ ],
191
+ "props": {
192
+ "style": undefined,
193
+ },
194
+ "type": "Text",
195
+ },
196
+ ],
197
+ "props": {
198
+ "onPress": [Function],
199
+ "testID": "mock-google-places-select",
200
+ },
201
+ "type": "Pressable",
202
+ },
166
203
  ],
167
204
  "props": {
168
- "ref": {
169
- "current": null,
170
- },
171
205
  "style": undefined,
172
206
  "testID": "google-places-autocomplete",
173
207
  },
@@ -213,11 +247,28 @@ exports[`MobileAddressAutocomplete renders with input value 1`] = `
213
247
  },
214
248
  "type": "Text",
215
249
  },
250
+ {
251
+ "$$typeof": Symbol(react.test.json),
252
+ "children": [
253
+ {
254
+ "$$typeof": Symbol(react.test.json),
255
+ "children": [
256
+ "Select",
257
+ ],
258
+ "props": {
259
+ "style": undefined,
260
+ },
261
+ "type": "Text",
262
+ },
263
+ ],
264
+ "props": {
265
+ "onPress": [Function],
266
+ "testID": "mock-google-places-select",
267
+ },
268
+ "type": "Pressable",
269
+ },
216
270
  ],
217
271
  "props": {
218
- "ref": {
219
- "current": null,
220
- },
221
272
  "style": undefined,
222
273
  "testID": "google-places-autocomplete",
223
274
  },
@@ -1475,3 +1475,184 @@ exports[`Modal renders with large size 1`] = `
1475
1475
  "type": "Modal",
1476
1476
  }
1477
1477
  `;
1478
+
1479
+ exports[`Modal renders with persistOnBackgroundClick 1`] = `
1480
+ {
1481
+ "$$typeof": Symbol(react.test.json),
1482
+ "children": [
1483
+ {
1484
+ "$$typeof": Symbol(react.test.json),
1485
+ "children": [
1486
+ {
1487
+ "$$typeof": Symbol(react.test.json),
1488
+ "children": [
1489
+ {
1490
+ "$$typeof": Symbol(react.test.json),
1491
+ "children": [
1492
+ {
1493
+ "$$typeof": Symbol(react.test.json),
1494
+ "children": [
1495
+ {
1496
+ "$$typeof": Symbol(react.test.json),
1497
+ "children": null,
1498
+ "props": {
1499
+ "accessibilityHint": "Closes the modal",
1500
+ "aria-label": "Close modal",
1501
+ "aria-role": "button",
1502
+ "onPress": [Function],
1503
+ "style": {
1504
+ "alignItems": "center",
1505
+ "bottom": -8,
1506
+ "flex": 1,
1507
+ "justifyContent": "center",
1508
+ "left": -8,
1509
+ "position": "absolute",
1510
+ "right": -8,
1511
+ "top": -8,
1512
+ },
1513
+ },
1514
+ "type": "Pressable",
1515
+ },
1516
+ ],
1517
+ "props": {
1518
+ "style": {
1519
+ "alignSelf": "flex-end",
1520
+ "position": "relative",
1521
+ },
1522
+ "testID": undefined,
1523
+ },
1524
+ "type": "View",
1525
+ },
1526
+ {
1527
+ "$$typeof": Symbol(react.test.json),
1528
+ "children": [
1529
+ {
1530
+ "$$typeof": Symbol(react.test.json),
1531
+ "children": [
1532
+ "Persistent",
1533
+ ],
1534
+ "props": {
1535
+ "numberOfLines": 0,
1536
+ "style": {
1537
+ "color": "#1C1C1C",
1538
+ "fontFamily": "heading-bold",
1539
+ "fontSize": 20,
1540
+ },
1541
+ "testID": undefined,
1542
+ },
1543
+ "type": "Text",
1544
+ },
1545
+ ],
1546
+ "props": {
1547
+ "accessibilityHint": "Modal title",
1548
+ "aria-label": "Persistent",
1549
+ "aria-role": "header",
1550
+ "style": {
1551
+ "alignSelf": "flex-start",
1552
+ },
1553
+ "testID": undefined,
1554
+ },
1555
+ "type": "View",
1556
+ },
1557
+ {
1558
+ "$$typeof": Symbol(react.test.json),
1559
+ "children": [
1560
+ {
1561
+ "$$typeof": Symbol(react.test.json),
1562
+ "children": [
1563
+ {
1564
+ "$$typeof": Symbol(react.test.json),
1565
+ "children": [
1566
+ "Content",
1567
+ ],
1568
+ "props": {
1569
+ "numberOfLines": 0,
1570
+ "selectable": undefined,
1571
+ "style": {
1572
+ "color": "#1C1C1C",
1573
+ "fontFamily": "text-regular",
1574
+ "fontSize": 14,
1575
+ "textAlign": "left",
1576
+ },
1577
+ "testID": undefined,
1578
+ },
1579
+ "type": "Text",
1580
+ },
1581
+ ],
1582
+ "props": {},
1583
+ "type": "View",
1584
+ },
1585
+ ],
1586
+ "props": {
1587
+ "style": {
1588
+ "flex": 1,
1589
+ "marginTop": 12,
1590
+ "width": "100%",
1591
+ },
1592
+ "testID": undefined,
1593
+ },
1594
+ "type": "View",
1595
+ },
1596
+ {
1597
+ "$$typeof": Symbol(react.test.json),
1598
+ "children": null,
1599
+ "props": {
1600
+ "style": {
1601
+ "alignSelf": "flex-end",
1602
+ "flexDirection": "row",
1603
+ "marginTop": 32,
1604
+ },
1605
+ "testID": undefined,
1606
+ },
1607
+ "type": "View",
1608
+ },
1609
+ ],
1610
+ "props": {
1611
+ "style": {
1612
+ "alignItems": "center",
1613
+ "alignSelf": "center",
1614
+ "backgroundColor": "#FFFFFF",
1615
+ "borderRadius": 4,
1616
+ "boxShadow": "0px 4px 24px rgba(0, 0, 0, 0.5)",
1617
+ "elevation": 24,
1618
+ "margin": "auto",
1619
+ "maxHeight": "100%",
1620
+ "padding": 32,
1621
+ "width": "90%",
1622
+ "zIndex": 1,
1623
+ },
1624
+ "testID": undefined,
1625
+ },
1626
+ "type": "View",
1627
+ },
1628
+ ],
1629
+ "props": {
1630
+ "onPress": [Function],
1631
+ "style": {
1632
+ "cursor": "auto",
1633
+ },
1634
+ },
1635
+ "type": "Pressable",
1636
+ },
1637
+ ],
1638
+ "props": {
1639
+ "onPress": undefined,
1640
+ "style": {
1641
+ "alignItems": "center",
1642
+ "backgroundColor": "rgba(0, 0, 0, 0.5)",
1643
+ "flex": 1,
1644
+ "justifyContent": "center",
1645
+ },
1646
+ },
1647
+ "type": "Pressable",
1648
+ },
1649
+ ],
1650
+ "props": {
1651
+ "animationType": "none",
1652
+ "onRequestClose": [Function],
1653
+ "transparent": true,
1654
+ "visible": true,
1655
+ },
1656
+ "type": "Modal",
1657
+ }
1658
+ `;
@@ -307,7 +307,30 @@ exports[`Page renders with back button 1`] = `
307
307
  "children": [
308
308
  {
309
309
  "$$typeof": Symbol(react.test.json),
310
- "children": null,
310
+ "children": [
311
+ {
312
+ "$$typeof": Symbol(react.test.json),
313
+ "children": [
314
+ {
315
+ "$$typeof": Symbol(react.test.json),
316
+ "children": [
317
+ "chevron-left",
318
+ ],
319
+ "props": {
320
+ "style": undefined,
321
+ },
322
+ "type": "Text",
323
+ },
324
+ ],
325
+ "props": {
326
+ "accessibilityHint": "Navigate back",
327
+ "accessibilityLabel": "",
328
+ "onPress": [Function],
329
+ "testID": "icon-button-chevron-left",
330
+ },
331
+ "type": "Pressable",
332
+ },
333
+ ],
311
334
  "props": {
312
335
  "onPointerEnter": [Function: AsyncFunction],
313
336
  "onPointerLeave": [Function: AsyncFunction],
@@ -496,7 +519,30 @@ exports[`Page renders with close button 1`] = `
496
519
  "children": [
497
520
  {
498
521
  "$$typeof": Symbol(react.test.json),
499
- "children": null,
522
+ "children": [
523
+ {
524
+ "$$typeof": Symbol(react.test.json),
525
+ "children": [
526
+ {
527
+ "$$typeof": Symbol(react.test.json),
528
+ "children": [
529
+ "xmark",
530
+ ],
531
+ "props": {
532
+ "style": undefined,
533
+ },
534
+ "type": "Text",
535
+ },
536
+ ],
537
+ "props": {
538
+ "accessibilityHint": "Close page",
539
+ "accessibilityLabel": "",
540
+ "onPress": [Function],
541
+ "testID": "icon-button-xmark",
542
+ },
543
+ "type": "Pressable",
544
+ },
545
+ ],
500
546
  "props": {
501
547
  "onPointerEnter": [Function: AsyncFunction],
502
548
  "onPointerLeave": [Function: AsyncFunction],
@@ -93,99 +93,6 @@ exports[`PhoneNumberField renders correctly with default props 1`] = `
93
93
  }
94
94
  `;
95
95
 
96
- exports[`PhoneNumberField formats phone number as user types 1`] = `
97
- {
98
- "$$typeof": Symbol(react.test.json),
99
- "children": [
100
- {
101
- "$$typeof": Symbol(react.test.json),
102
- "children": [
103
- {
104
- "$$typeof": Symbol(react.test.json),
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": 24,
140
- "paddingVertical": 0,
141
- "width": "100%",
142
- },
143
- "testID": undefined,
144
- "textContentType": undefined,
145
- "underlineColorAndroid": "transparent",
146
- "value": "5551234567",
147
- },
148
- "type": "TextInput",
149
- },
150
- ],
151
- "props": {
152
- "style": {
153
- "alignItems": "center",
154
- "flexDirection": "row",
155
- },
156
- "testID": undefined,
157
- },
158
- "type": "View",
159
- },
160
- ],
161
- "props": {
162
- "style": {
163
- "backgroundColor": "#FFFFFF",
164
- "borderColor": "#9A9A9A",
165
- "borderRadius": 4,
166
- "borderWidth": 1,
167
- "flexDirection": "column",
168
- "gap": 0,
169
- "overflow": "hidden",
170
- "paddingHorizontal": 12,
171
- "paddingVertical": 8,
172
- },
173
- "testID": undefined,
174
- },
175
- "type": "View",
176
- },
177
- ],
178
- "props": {
179
- "style": {
180
- "flexDirection": "column",
181
- "width": "100%",
182
- },
183
- "testID": undefined,
184
- },
185
- "type": "View",
186
- }
187
- `;
188
-
189
96
  exports[`PhoneNumberField renders with icon 1`] = `
190
97
  {
191
98
  "$$typeof": Symbol(react.test.json),