@terreno/ui 0.7.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 (31) 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/TextField.js +46 -41
  7. package/dist/TextField.js.map +1 -1
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.js +1 -0
  10. package/dist/index.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/AiSuggestionBox.test.tsx +373 -0
  13. package/src/AiSuggestionBox.tsx +233 -0
  14. package/src/Common.ts +14 -0
  15. package/src/TextField.tsx +87 -70
  16. package/src/__snapshots__/AddressField.test.tsx.snap +208 -156
  17. package/src/__snapshots__/AiSuggestionBox.test.tsx.snap +1031 -0
  18. package/src/__snapshots__/CustomSelectField.test.tsx.snap +51 -38
  19. package/src/__snapshots__/EmailField.test.tsx.snap +111 -85
  20. package/src/__snapshots__/Field.test.tsx.snap +616 -460
  21. package/src/__snapshots__/MobileAddressAutoComplete.test.tsx.snap +51 -38
  22. package/src/__snapshots__/NumberField.test.tsx.snap +51 -38
  23. package/src/__snapshots__/PhoneNumberField.test.tsx.snap +264 -199
  24. package/src/__snapshots__/TapToEdit.test.tsx.snap +51 -38
  25. package/src/__snapshots__/TextArea.test.tsx.snap +255 -190
  26. package/src/__snapshots__/TextField.test.tsx.snap +264 -199
  27. package/src/__snapshots__/UnifiedAddressAutoComplete.test.tsx.snap +204 -152
  28. package/src/__snapshots__/WebAddressAutocomplete.test.tsx.snap +153 -114
  29. package/src/index.tsx +1 -0
  30. package/src/login/__snapshots__/LoginScreen.test.tsx.snap +104 -78
  31. package/src/signUp/__snapshots__/SignUpScreen.test.tsx.snap +156 -117
@@ -9,57 +9,70 @@ exports[`WebAddressAutocomplete renders correctly without Google API key 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": [Function],
32
+ "onContentSizeChange": [Function],
33
+ "onFocus": [Function],
34
+ "onSubmitEditing": [Function],
35
+ "placeholder": "Enter an address",
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": "",
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": [Function],
29
- "onContentSizeChange": [Function],
30
- "onFocus": [Function],
31
- "onSubmitEditing": [Function],
32
- "placeholder": "Enter an address",
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": "",
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[`WebAddressAutocomplete renders with input value 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": "sentences",
116
+ "autoCorrect": true,
117
+ "blurOnSubmit": true,
118
+ "enterKeyHint": undefined,
119
+ "keyboardType": "default",
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": "Enter an address",
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": "none",
145
+ "underlineColorAndroid": "transparent",
146
+ "value": "123 Main St",
147
+ },
148
+ "type": "TextInput",
97
149
  },
98
- "aria-label": "Text input field",
99
- "autoCapitalize": "sentences",
100
- "autoCorrect": true,
101
- "blurOnSubmit": true,
102
- "enterKeyHint": undefined,
103
- "keyboardType": "default",
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": "Enter an address",
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": "none",
129
- "underlineColorAndroid": "transparent",
130
- "value": "123 Main St",
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,57 +195,70 @@ exports[`WebAddressAutocomplete renders disabled state 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": true,
198
+ "children": [
199
+ {
200
+ "$$typeof": Symbol(react.test.json),
201
+ "children": null,
202
+ "props": {
203
+ "accessibilityHint": "Enter text here",
204
+ "accessibilityState": {
205
+ "disabled": true,
206
+ },
207
+ "aria-label": "Text input field",
208
+ "autoCapitalize": "sentences",
209
+ "autoCorrect": true,
210
+ "blurOnSubmit": true,
211
+ "enterKeyHint": undefined,
212
+ "keyboardType": "default",
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": "Enter an address",
222
+ "placeholderTextColor": "#686868",
223
+ "readOnly": true,
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": "none",
238
+ "underlineColorAndroid": "transparent",
239
+ "value": "",
240
+ },
241
+ "type": "TextInput",
177
242
  },
178
- "aria-label": "Text input field",
179
- "autoCapitalize": "sentences",
180
- "autoCorrect": true,
181
- "blurOnSubmit": true,
182
- "enterKeyHint": undefined,
183
- "keyboardType": "default",
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": "Enter an address",
193
- "placeholderTextColor": "#686868",
194
- "readOnly": true,
195
- "ref": [Function],
196
- "secureTextEntry": false,
243
+ ],
244
+ "props": {
197
245
  "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%",
246
+ "alignItems": "center",
247
+ "flexDirection": "row",
206
248
  },
207
249
  "testID": undefined,
208
- "textContentType": "none",
209
- "underlineColorAndroid": "transparent",
210
- "value": "",
211
250
  },
212
- "type": "TextInput",
251
+ "type": "View",
213
252
  },
214
253
  ],
215
254
  "props": {
216
255
  "style": {
217
- "alignItems": "center",
218
256
  "backgroundColor": "#D9D9D9",
219
257
  "borderColor": "#4E4E4E",
220
258
  "borderRadius": 4,
221
259
  "borderWidth": 1,
222
- "flexDirection": "row",
260
+ "flexDirection": "column",
261
+ "gap": 0,
223
262
  "overflow": "hidden",
224
263
  "paddingHorizontal": 12,
225
264
  "paddingVertical": 8,
package/src/index.tsx CHANGED
@@ -4,6 +4,7 @@ export * from "./Accordion";
4
4
  export * from "./ActionSheet";
5
5
  export * from "./AddressField";
6
6
  export * from "./AIRequestExplorer";
7
+ export * from "./AiSuggestionBox";
7
8
  export * from "./AttachmentPreview";
8
9
  export * from "./Avatar";
9
10
  export * from "./Badge";
@@ -72,57 +72,70 @@ exports[`LoginScreen renders correctly with all props 1`] = `
72
72
  "children": [
73
73
  {
74
74
  "$$typeof": Symbol(react.test.json),
75
- "children": null,
76
- "props": {
77
- "accessibilityHint": "Enter text here",
78
- "accessibilityState": {
79
- "disabled": true,
75
+ "children": [
76
+ {
77
+ "$$typeof": Symbol(react.test.json),
78
+ "children": null,
79
+ "props": {
80
+ "accessibilityHint": "Enter text here",
81
+ "accessibilityState": {
82
+ "disabled": true,
83
+ },
84
+ "aria-label": "Text input field",
85
+ "autoCapitalize": "none",
86
+ "autoCorrect": false,
87
+ "blurOnSubmit": true,
88
+ "enterKeyHint": undefined,
89
+ "keyboardType": "email-address",
90
+ "multiline": undefined,
91
+ "nativeID": "login-screen-email-input",
92
+ "numberOfLines": 1,
93
+ "onBlur": [Function],
94
+ "onChangeText": [Function],
95
+ "onContentSizeChange": [Function],
96
+ "onFocus": [Function],
97
+ "onSubmitEditing": [Function],
98
+ "placeholder": "Email",
99
+ "placeholderTextColor": "#686868",
100
+ "readOnly": true,
101
+ "ref": [Function],
102
+ "secureTextEntry": false,
103
+ "style": {
104
+ "color": "#1C1C1C",
105
+ "flex": 1,
106
+ "fontFamily": "text",
107
+ "fontSize": 16,
108
+ "gap": 10,
109
+ "height": 20,
110
+ "paddingVertical": 0,
111
+ "width": "100%",
112
+ },
113
+ "testID": "login-screen-email-input",
114
+ "textContentType": "emailAddress",
115
+ "underlineColorAndroid": "transparent",
116
+ "value": "",
117
+ },
118
+ "type": "TextInput",
80
119
  },
81
- "aria-label": "Text input field",
82
- "autoCapitalize": "none",
83
- "autoCorrect": false,
84
- "blurOnSubmit": true,
85
- "enterKeyHint": undefined,
86
- "keyboardType": "email-address",
87
- "multiline": undefined,
88
- "nativeID": "login-screen-email-input",
89
- "numberOfLines": 1,
90
- "onBlur": [Function],
91
- "onChangeText": [Function],
92
- "onContentSizeChange": [Function],
93
- "onFocus": [Function],
94
- "onSubmitEditing": [Function],
95
- "placeholder": "Email",
96
- "placeholderTextColor": "#686868",
97
- "readOnly": true,
98
- "ref": [Function],
99
- "secureTextEntry": false,
120
+ ],
121
+ "props": {
100
122
  "style": {
101
- "color": "#1C1C1C",
102
- "flex": 1,
103
- "fontFamily": "text",
104
- "fontSize": 16,
105
- "gap": 10,
106
- "height": 20,
107
- "paddingVertical": 0,
108
- "width": "100%",
123
+ "alignItems": "center",
124
+ "flexDirection": "row",
109
125
  },
110
- "testID": "login-screen-email-input",
111
- "textContentType": "emailAddress",
112
- "underlineColorAndroid": "transparent",
113
- "value": "",
126
+ "testID": undefined,
114
127
  },
115
- "type": "TextInput",
128
+ "type": "View",
116
129
  },
117
130
  ],
118
131
  "props": {
119
132
  "style": {
120
- "alignItems": "center",
121
133
  "backgroundColor": "#D9D9D9",
122
134
  "borderColor": "#4E4E4E",
123
135
  "borderRadius": 4,
124
136
  "borderWidth": 1,
125
- "flexDirection": "row",
137
+ "flexDirection": "column",
138
+ "gap": 0,
126
139
  "overflow": "hidden",
127
140
  "paddingHorizontal": 12,
128
141
  "paddingVertical": 8,
@@ -164,57 +177,70 @@ exports[`LoginScreen renders correctly with all props 1`] = `
164
177
  "children": [
165
178
  {
166
179
  "$$typeof": Symbol(react.test.json),
167
- "children": null,
168
- "props": {
169
- "accessibilityHint": "Enter text here",
170
- "accessibilityState": {
171
- "disabled": true,
180
+ "children": [
181
+ {
182
+ "$$typeof": Symbol(react.test.json),
183
+ "children": null,
184
+ "props": {
185
+ "accessibilityHint": "Enter text here",
186
+ "accessibilityState": {
187
+ "disabled": true,
188
+ },
189
+ "aria-label": "Text input field",
190
+ "autoCapitalize": "none",
191
+ "autoCorrect": false,
192
+ "blurOnSubmit": true,
193
+ "enterKeyHint": undefined,
194
+ "keyboardType": "default",
195
+ "multiline": undefined,
196
+ "nativeID": "login-screen-password-input",
197
+ "numberOfLines": 1,
198
+ "onBlur": [Function],
199
+ "onChangeText": [Function],
200
+ "onContentSizeChange": [Function],
201
+ "onFocus": [Function],
202
+ "onSubmitEditing": [Function],
203
+ "placeholder": "Password",
204
+ "placeholderTextColor": "#686868",
205
+ "readOnly": true,
206
+ "ref": [Function],
207
+ "secureTextEntry": true,
208
+ "style": {
209
+ "color": "#1C1C1C",
210
+ "flex": 1,
211
+ "fontFamily": "text",
212
+ "fontSize": 16,
213
+ "gap": 10,
214
+ "height": 20,
215
+ "paddingVertical": 0,
216
+ "width": "100%",
217
+ },
218
+ "testID": "login-screen-password-input",
219
+ "textContentType": "password",
220
+ "underlineColorAndroid": "transparent",
221
+ "value": "",
222
+ },
223
+ "type": "TextInput",
172
224
  },
173
- "aria-label": "Text input field",
174
- "autoCapitalize": "none",
175
- "autoCorrect": false,
176
- "blurOnSubmit": true,
177
- "enterKeyHint": undefined,
178
- "keyboardType": "default",
179
- "multiline": undefined,
180
- "nativeID": "login-screen-password-input",
181
- "numberOfLines": 1,
182
- "onBlur": [Function],
183
- "onChangeText": [Function],
184
- "onContentSizeChange": [Function],
185
- "onFocus": [Function],
186
- "onSubmitEditing": [Function],
187
- "placeholder": "Password",
188
- "placeholderTextColor": "#686868",
189
- "readOnly": true,
190
- "ref": [Function],
191
- "secureTextEntry": true,
225
+ ],
226
+ "props": {
192
227
  "style": {
193
- "color": "#1C1C1C",
194
- "flex": 1,
195
- "fontFamily": "text",
196
- "fontSize": 16,
197
- "gap": 10,
198
- "height": 20,
199
- "paddingVertical": 0,
200
- "width": "100%",
228
+ "alignItems": "center",
229
+ "flexDirection": "row",
201
230
  },
202
- "testID": "login-screen-password-input",
203
- "textContentType": "password",
204
- "underlineColorAndroid": "transparent",
205
- "value": "",
231
+ "testID": undefined,
206
232
  },
207
- "type": "TextInput",
233
+ "type": "View",
208
234
  },
209
235
  ],
210
236
  "props": {
211
237
  "style": {
212
- "alignItems": "center",
213
238
  "backgroundColor": "#D9D9D9",
214
239
  "borderColor": "#4E4E4E",
215
240
  "borderRadius": 4,
216
241
  "borderWidth": 1,
217
- "flexDirection": "row",
242
+ "flexDirection": "column",
243
+ "gap": 0,
218
244
  "overflow": "hidden",
219
245
  "paddingHorizontal": 12,
220
246
  "paddingVertical": 8,