@terreno/ui 56.0.0-beta.0 → 56.0.0-beta.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.
@@ -0,0 +1,242 @@
1
+ // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
+
3
+ exports[`EditableCard renders correctly with all props 1`] = `
4
+ {
5
+ "$$typeof": Symbol(react.test.json),
6
+ "children": [
7
+ {
8
+ "$$typeof": Symbol(react.test.json),
9
+ "children": null,
10
+ "props": {
11
+ "onPointerEnter": [Function: AsyncFunction],
12
+ "onPointerLeave": [Function: AsyncFunction],
13
+ "style": {
14
+ "paddingBottom": 4,
15
+ "paddingTop": 4,
16
+ },
17
+ "testID": undefined,
18
+ },
19
+ "type": "View",
20
+ },
21
+ {
22
+ "$$typeof": Symbol(react.test.json),
23
+ "children": [
24
+ {
25
+ "$$typeof": Symbol(react.test.json),
26
+ "children": [
27
+ {
28
+ "$$typeof": Symbol(react.test.json),
29
+ "children": [
30
+ {
31
+ "$$typeof": Symbol(react.test.json),
32
+ "children": [
33
+ {
34
+ "$$typeof": Symbol(react.test.json),
35
+ "children": [
36
+ "Home Address",
37
+ ],
38
+ "props": {
39
+ "numberOfLines": 1,
40
+ "selectable": undefined,
41
+ "style": {
42
+ "color": "#1C1C1C",
43
+ "fontFamily": "text-bold",
44
+ "fontSize": 14,
45
+ "textAlign": "left",
46
+ },
47
+ "testID": undefined,
48
+ },
49
+ "type": "Text",
50
+ },
51
+ ],
52
+ "props": {},
53
+ "type": "View",
54
+ },
55
+ ],
56
+ "props": {
57
+ "onPointerEnter": [Function: AsyncFunction],
58
+ "onPointerLeave": [Function: AsyncFunction],
59
+ "style": {
60
+ "display": "flex",
61
+ "flexShrink": 1,
62
+ "minWidth": 0,
63
+ },
64
+ "testID": undefined,
65
+ },
66
+ "type": "View",
67
+ },
68
+ {
69
+ "$$typeof": Symbol(react.test.json),
70
+ "children": [
71
+ {
72
+ "$$typeof": Symbol(react.test.json),
73
+ "children": [
74
+ {
75
+ "$$typeof": Symbol(react.test.json),
76
+ "children": null,
77
+ "props": {
78
+ "style": {
79
+ "marginRight": 8,
80
+ },
81
+ "testID": "icon",
82
+ },
83
+ "type": "View",
84
+ },
85
+ {
86
+ "$$typeof": Symbol(react.test.json),
87
+ "children": [
88
+ "Verified",
89
+ ],
90
+ "props": {
91
+ "style": {
92
+ "color": "#1A7F36",
93
+ "fontFamily": "text",
94
+ "fontSize": 10,
95
+ "fontWeight": "700",
96
+ },
97
+ },
98
+ "type": "Text",
99
+ },
100
+ ],
101
+ "props": {
102
+ "style": [
103
+ {
104
+ "alignItems": "center",
105
+ "backgroundColor": "#DCF2E2",
106
+ "borderRadius": 4,
107
+ "flexDirection": "row",
108
+ "height": 20,
109
+ "justifyContent": "center",
110
+ "paddingHorizontal": 8,
111
+ "paddingVertical": 0,
112
+ "width": "auto",
113
+ },
114
+ false,
115
+ {
116
+ "borderColor": "#7FD898",
117
+ "borderWidth": 1,
118
+ },
119
+ ],
120
+ "testID": undefined,
121
+ },
122
+ "type": "View",
123
+ },
124
+ ],
125
+ "props": {
126
+ "style": {
127
+ "alignItems": "flex-start",
128
+ },
129
+ "testID": undefined,
130
+ },
131
+ "type": "View",
132
+ },
133
+ ],
134
+ "props": {
135
+ "onPointerEnter": [Function: AsyncFunction],
136
+ "onPointerLeave": [Function: AsyncFunction],
137
+ "style": {
138
+ "alignItems": "center",
139
+ "display": "flex",
140
+ "flexDirection": "row",
141
+ "gap": 8,
142
+ },
143
+ "testID": undefined,
144
+ },
145
+ "type": "View",
146
+ },
147
+ {
148
+ "$$typeof": Symbol(react.test.json),
149
+ "children": [
150
+ {
151
+ "$$typeof": Symbol(react.test.json),
152
+ "children": [
153
+ "123 Main Street",
154
+ ],
155
+ "props": {
156
+ "numberOfLines": 0,
157
+ "selectable": undefined,
158
+ "style": {
159
+ "color": "#1C1C1C",
160
+ "fontFamily": "text-regular",
161
+ "fontSize": 14,
162
+ "textAlign": "left",
163
+ },
164
+ "testID": undefined,
165
+ },
166
+ "type": "Text",
167
+ },
168
+ ],
169
+ "props": {},
170
+ "type": "View",
171
+ },
172
+ {
173
+ "$$typeof": Symbol(react.test.json),
174
+ "children": [
175
+ {
176
+ "$$typeof": Symbol(react.test.json),
177
+ "children": [
178
+ "Last updated 2 days ago",
179
+ ],
180
+ "props": {
181
+ "numberOfLines": 0,
182
+ "selectable": undefined,
183
+ "style": {
184
+ "color": "#686868",
185
+ "fontFamily": "text-regular",
186
+ "fontSize": 10,
187
+ "textAlign": "left",
188
+ },
189
+ "testID": undefined,
190
+ },
191
+ "type": "Text",
192
+ },
193
+ ],
194
+ "props": {},
195
+ "type": "View",
196
+ },
197
+ ],
198
+ "props": {
199
+ "onPointerEnter": [Function: AsyncFunction],
200
+ "onPointerLeave": [Function: AsyncFunction],
201
+ "style": {
202
+ "display": "flex",
203
+ "flexDirection": "column",
204
+ "flexGrow": 1,
205
+ "flexShrink": 1,
206
+ "gap": 4,
207
+ "minWidth": 0,
208
+ },
209
+ "testID": undefined,
210
+ },
211
+ "type": "View",
212
+ },
213
+ ],
214
+ "props": {
215
+ "onPointerEnter": [Function: AsyncFunction],
216
+ "onPointerLeave": [Function: AsyncFunction],
217
+ "style": {
218
+ "backgroundColor": "#FFFFFF",
219
+ "borderBottomColor": "#CDCDCD",
220
+ "borderBottomWidth": 1,
221
+ "borderLeftColor": "#CDCDCD",
222
+ "borderLeftWidth": 1,
223
+ "borderRadius": 4,
224
+ "borderRightColor": "#CDCDCD",
225
+ "borderRightWidth": 1,
226
+ "borderTopColor": "#CDCDCD",
227
+ "borderTopWidth": 1,
228
+ "display": "flex",
229
+ "flex": undefined,
230
+ "flexDirection": "row",
231
+ "gap": 8,
232
+ "maxWidth": "100%",
233
+ "minWidth": 0,
234
+ "overflow": "hidden",
235
+ "padding": 12,
236
+ "width": "100%",
237
+ },
238
+ "testID": undefined,
239
+ },
240
+ "type": "View",
241
+ }
242
+ `;
package/src/bunSetup.ts CHANGED
@@ -320,9 +320,12 @@ mock.module("react-native", () => {
320
320
  };
321
321
  const UIManager = {
322
322
  getViewManagerConfig: mock(() => ({})),
323
+ measure: mock(() => {}),
323
324
  setLayoutAnimationEnabledExperimental: mock(() => {}),
324
325
  };
325
- const findNodeHandle = mock(() => null);
326
+ // Node handles are opaque numbers in React Native; pass them through so code that
327
+ // measures the currently focused field can be exercised in tests.
328
+ const findNodeHandle = mock((node: unknown) => (typeof node === "number" ? node : null));
326
329
  const requireNativeComponent = mock((name: string) => name);
327
330
  const TurboModuleRegistry = {
328
331
  get: mock(() => null),
@@ -1136,12 +1139,13 @@ mock.module("react-native/Libraries/LayoutAnimation/LayoutAnimation", () => ({
1136
1139
  mock.module("react-native/Libraries/ReactNative/UIManager", () => ({
1137
1140
  default: {
1138
1141
  getViewManagerConfig: mock(() => ({})),
1142
+ measure: mock(() => {}),
1139
1143
  setLayoutAnimationEnabledExperimental: mock(() => {}),
1140
1144
  },
1141
1145
  }));
1142
1146
 
1143
1147
  mock.module("react-native/Libraries/Renderer/shims/ReactNative", () => ({
1144
- findNodeHandle: mock(() => null),
1148
+ findNodeHandle: mock((node: unknown) => (typeof node === "number" ? node : null)),
1145
1149
  }));
1146
1150
 
1147
1151
  mock.module("react-native/Libraries/Components/StatusBar/StatusBar", () => ({
package/src/index.tsx CHANGED
@@ -29,6 +29,7 @@ export * from "./DateUtilities";
29
29
  export * from "./DecimalRangeActionSheet";
30
30
  export * from "./DismissButton";
31
31
  export {DraggableList} from "./DraggableList";
32
+ export * from "./EditableCard";
32
33
  export * from "./EmailField";
33
34
  export {default as EmojiSelector} from "./EmojiSelector";
34
35
  export * from "./ErrorBoundary";