@terreno/ui 56.0.0-beta.0 → 57.0.0-beta.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.
- package/LICENSE +21 -203
- package/dist/Badge.d.ts +1 -1
- package/dist/Badge.js +37 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Common.d.ts +149 -3
- package/dist/Common.js.map +1 -1
- package/dist/DateTimeField.js +5 -21
- package/dist/DateTimeField.js.map +1 -1
- package/dist/EditableCard.d.ts +3 -0
- package/dist/EditableCard.js +23 -0
- package/dist/EditableCard.js.map +1 -0
- package/dist/Filter.d.ts +13 -0
- package/dist/Filter.js +120 -0
- package/dist/Filter.js.map +1 -0
- package/dist/FilterAccordion.d.ts +8 -0
- package/dist/FilterAccordion.js +59 -0
- package/dist/FilterAccordion.js.map +1 -0
- package/dist/FilterBoolean.d.ts +8 -0
- package/dist/FilterBoolean.js +74 -0
- package/dist/FilterBoolean.js.map +1 -0
- package/dist/FilterChangesBadge.d.ts +8 -0
- package/dist/FilterChangesBadge.js +11 -0
- package/dist/FilterChangesBadge.js.map +1 -0
- package/dist/FilterSelectMenu.d.ts +8 -0
- package/dist/FilterSelectMenu.js +37 -0
- package/dist/FilterSelectMenu.js.map +1 -0
- package/dist/IconRegistry.js +11 -6
- package/dist/IconRegistry.js.map +1 -1
- package/dist/Page.d.ts +2 -1
- package/dist/Page.js +0 -2
- package/dist/Page.js.map +1 -1
- package/dist/PickerSelect.d.ts +8 -1
- package/dist/PickerSelect.js +2 -2
- package/dist/PickerSelect.js.map +1 -1
- package/dist/SelectField.js +2 -2
- package/dist/SelectField.js.map +1 -1
- package/dist/Theme.js +3 -0
- package/dist/Theme.js.map +1 -1
- package/dist/WebDropdownMenu.d.ts +5 -1
- package/dist/WebDropdownMenu.js +24 -10
- package/dist/WebDropdownMenu.js.map +1 -1
- package/dist/icons/BarsFilterIcon.d.ts +9 -0
- package/dist/icons/BarsFilterIcon.js +12 -0
- package/dist/icons/BarsFilterIcon.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +26 -25
- package/src/ActionSheet.test.tsx +202 -172
- package/src/Badge.test.tsx +22 -1
- package/src/Badge.tsx +43 -0
- package/src/Box.test.tsx +31 -23
- package/src/Common.ts +167 -5
- package/src/ConsentFormScreen.test.tsx +22 -0
- package/src/ConsentNavigator.test.tsx +6 -8
- package/src/DateTimeField.test.tsx +66 -18
- package/src/DateTimeField.tsx +5 -19
- package/src/DraggableList.test.tsx +377 -0
- package/src/EditableCard.test.tsx +69 -0
- package/src/EditableCard.tsx +73 -0
- package/src/Filter.test.tsx +94 -0
- package/src/Filter.tsx +257 -0
- package/src/FilterAccordion.test.tsx +58 -0
- package/src/FilterAccordion.tsx +113 -0
- package/src/FilterBoolean.test.tsx +65 -0
- package/src/FilterBoolean.tsx +130 -0
- package/src/FilterChangesBadge.test.tsx +16 -0
- package/src/FilterChangesBadge.tsx +13 -0
- package/src/FilterSelectMenu.test.tsx +56 -0
- package/src/FilterSelectMenu.tsx +76 -0
- package/src/IconRegistry.test.tsx +6 -4
- package/src/IconRegistry.tsx +13 -8
- package/src/Page.tsx +2 -3
- package/src/PickerSelect.test.tsx +43 -12
- package/src/PickerSelect.tsx +10 -0
- package/src/SelectField.tsx +2 -0
- package/src/SidebarNavigation.test.tsx +339 -0
- package/src/Theme.tsx +3 -0
- package/src/WebDropdownMenu.test.tsx +214 -1
- package/src/WebDropdownMenu.tsx +43 -21
- package/src/__snapshots__/Card.test.tsx.snap +1 -0
- package/src/__snapshots__/EditableCard.test.tsx.snap +242 -0
- package/src/__snapshots__/Filter.test.tsx.snap +161 -0
- package/src/__snapshots__/FilterAccordion.test.tsx.snap +83 -0
- package/src/__snapshots__/FilterBoolean.test.tsx.snap +109 -0
- package/src/__snapshots__/FilterChangesBadge.test.tsx.snap +18 -0
- package/src/__snapshots__/FilterSelectMenu.test.tsx.snap +359 -0
- package/src/bunSetup.ts +6 -2
- package/src/conflictFieldDiff.test.ts +43 -0
- package/src/icons/BarsFilterIcon.tsx +18 -0
- package/src/index.tsx +7 -0
package/src/WebDropdownMenu.tsx
CHANGED
|
@@ -24,6 +24,13 @@ export const scheduleAfterPaint = (callback: () => void): void => {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
export const resolveDocumentBodyPortalTarget = (): HTMLElement | null => {
|
|
28
|
+
if (typeof document === "undefined" || typeof HTMLElement === "undefined") {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return document.body instanceof HTMLElement ? document.body : null;
|
|
32
|
+
};
|
|
33
|
+
|
|
27
34
|
export interface WebDropdownMenuOption {
|
|
28
35
|
key?: string | number;
|
|
29
36
|
label: string;
|
|
@@ -85,6 +92,8 @@ export interface WebDropdownMenuProps {
|
|
|
85
92
|
* Web only.
|
|
86
93
|
*/
|
|
87
94
|
keepTriggerFocus?: boolean;
|
|
95
|
+
/** Web only. Renders the menu in a fixed portal attached to `document.body`. */
|
|
96
|
+
renderInBodyPortal?: boolean;
|
|
88
97
|
/**
|
|
89
98
|
* `anchored` positions the menu below/above the trigger (web-style).
|
|
90
99
|
* `centered` shows a centered dialog, matching Android's native picker modal.
|
|
@@ -124,6 +133,7 @@ export const WebDropdownMenu = ({
|
|
|
124
133
|
disableSearch = false,
|
|
125
134
|
showEmptyStateWhenNoOptions = false,
|
|
126
135
|
keepTriggerFocus = false,
|
|
136
|
+
renderInBodyPortal = false,
|
|
127
137
|
presentation = "anchored",
|
|
128
138
|
}: WebDropdownMenuProps): ReactElement => {
|
|
129
139
|
const searchable = !disableSearch;
|
|
@@ -264,6 +274,7 @@ export const WebDropdownMenu = ({
|
|
|
264
274
|
const menuLayoutStyle = isCenteredPresentation
|
|
265
275
|
? centeredMenuLayoutStyle
|
|
266
276
|
: anchoredMenuLayoutStyle;
|
|
277
|
+
const usesWebPortal = keepTriggerFocus || renderInBodyPortal;
|
|
267
278
|
|
|
268
279
|
const menuContent = (
|
|
269
280
|
<>
|
|
@@ -375,7 +386,7 @@ export const WebDropdownMenu = ({
|
|
|
375
386
|
|
|
376
387
|
// Close on Escape when using the portal overlay (Modal handles this itself).
|
|
377
388
|
useEffect(() => {
|
|
378
|
-
if (!visible || !
|
|
389
|
+
if (!visible || !usesWebPortal || Platform.OS !== "web" || typeof document === "undefined") {
|
|
379
390
|
return;
|
|
380
391
|
}
|
|
381
392
|
const closeOnEscape = (event: KeyboardEvent): void => {
|
|
@@ -390,9 +401,9 @@ export const WebDropdownMenu = ({
|
|
|
390
401
|
document.removeEventListener("keyup", closeOnEscape, false);
|
|
391
402
|
}
|
|
392
403
|
};
|
|
393
|
-
}, [
|
|
404
|
+
}, [onClose, usesWebPortal, visible]);
|
|
394
405
|
|
|
395
|
-
if (Platform.OS === "web" &&
|
|
406
|
+
if (Platform.OS === "web" && usesWebPortal) {
|
|
396
407
|
if (!visible) {
|
|
397
408
|
return <View testID={`${testIDPrefix}_modal`} />;
|
|
398
409
|
}
|
|
@@ -428,10 +439,7 @@ export const WebDropdownMenu = ({
|
|
|
428
439
|
</View>
|
|
429
440
|
);
|
|
430
441
|
|
|
431
|
-
const portalTarget =
|
|
432
|
-
typeof document !== "undefined" && document.body instanceof HTMLElement
|
|
433
|
-
? document.body
|
|
434
|
-
: null;
|
|
442
|
+
const portalTarget = resolveDocumentBodyPortalTarget();
|
|
435
443
|
|
|
436
444
|
if (portalTarget) {
|
|
437
445
|
return createWebPortal({children: overlay, container: portalTarget});
|
|
@@ -506,23 +514,37 @@ export const WebDropdownMenu = ({
|
|
|
506
514
|
export const useWebDropdownAnchor = (): {
|
|
507
515
|
triggerRef: React.RefObject<View | null>;
|
|
508
516
|
anchor: WebDropdownAnchor;
|
|
517
|
+
cancelPendingMeasurement: () => void;
|
|
509
518
|
measure: (onMeasured: (anchor: WebDropdownAnchor) => void) => void;
|
|
510
519
|
} => {
|
|
511
520
|
const triggerRef = useRef<View>(null);
|
|
512
521
|
const [anchor, setAnchor] = useState<WebDropdownAnchor>({height: 0, width: 0, x: 0, y: 0});
|
|
522
|
+
const measurementRequestRef = useRef(0);
|
|
523
|
+
|
|
524
|
+
const cancelPendingMeasurement = useCallback((): void => {
|
|
525
|
+
measurementRequestRef.current += 1;
|
|
526
|
+
}, []);
|
|
527
|
+
|
|
528
|
+
const measure = useCallback(
|
|
529
|
+
(onMeasured: (next: WebDropdownAnchor) => void): void => {
|
|
530
|
+
const requestId = measurementRequestRef.current + 1;
|
|
531
|
+
measurementRequestRef.current = requestId;
|
|
532
|
+
const node = triggerRef.current;
|
|
533
|
+
if (node && typeof node.measureInWindow === "function") {
|
|
534
|
+
node.measureInWindow((x, y, w, h) => {
|
|
535
|
+
if (requestId !== measurementRequestRef.current) {
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
const next = {height: h, width: w, x, y};
|
|
539
|
+
setAnchor(next);
|
|
540
|
+
onMeasured(next);
|
|
541
|
+
});
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
onMeasured(anchor);
|
|
545
|
+
},
|
|
546
|
+
[anchor]
|
|
547
|
+
);
|
|
513
548
|
|
|
514
|
-
|
|
515
|
-
const node = triggerRef.current;
|
|
516
|
-
if (node && typeof node.measureInWindow === "function") {
|
|
517
|
-
node.measureInWindow((x, y, w, h) => {
|
|
518
|
-
const next = {height: h, width: w, x, y};
|
|
519
|
-
setAnchor(next);
|
|
520
|
-
onMeasured(next);
|
|
521
|
-
});
|
|
522
|
-
return;
|
|
523
|
-
}
|
|
524
|
-
onMeasured(anchor);
|
|
525
|
-
};
|
|
526
|
-
|
|
527
|
-
return {anchor, measure, triggerRef};
|
|
549
|
+
return {anchor, cancelPendingMeasurement, measure, triggerRef};
|
|
528
550
|
};
|
|
@@ -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
|
+
`;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
|
|
2
|
+
|
|
3
|
+
exports[`Filter renders correctly with default props 1`] = `
|
|
4
|
+
{
|
|
5
|
+
"$$typeof": Symbol(react.test.json),
|
|
6
|
+
"children": [
|
|
7
|
+
{
|
|
8
|
+
"$$typeof": Symbol(react.test.json),
|
|
9
|
+
"children": [
|
|
10
|
+
{
|
|
11
|
+
"$$typeof": Symbol(react.test.json),
|
|
12
|
+
"children": [
|
|
13
|
+
{
|
|
14
|
+
"$$typeof": Symbol(react.test.json),
|
|
15
|
+
"children": [
|
|
16
|
+
{
|
|
17
|
+
"$$typeof": Symbol(react.test.json),
|
|
18
|
+
"children": [
|
|
19
|
+
{
|
|
20
|
+
"$$typeof": Symbol(react.test.json),
|
|
21
|
+
"children": [
|
|
22
|
+
{
|
|
23
|
+
"$$typeof": Symbol(react.test.json),
|
|
24
|
+
"children": [
|
|
25
|
+
{
|
|
26
|
+
"$$typeof": Symbol(react.test.json),
|
|
27
|
+
"children": null,
|
|
28
|
+
"props": {
|
|
29
|
+
"height": 56,
|
|
30
|
+
"rx": 28,
|
|
31
|
+
"width": 512,
|
|
32
|
+
"x": 0,
|
|
33
|
+
"y": 120,
|
|
34
|
+
},
|
|
35
|
+
"type": "Rect",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"$$typeof": Symbol(react.test.json),
|
|
39
|
+
"children": null,
|
|
40
|
+
"props": {
|
|
41
|
+
"height": 56,
|
|
42
|
+
"rx": 28,
|
|
43
|
+
"width": 320,
|
|
44
|
+
"x": 96,
|
|
45
|
+
"y": 228,
|
|
46
|
+
},
|
|
47
|
+
"type": "Rect",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"$$typeof": Symbol(react.test.json),
|
|
51
|
+
"children": null,
|
|
52
|
+
"props": {
|
|
53
|
+
"height": 56,
|
|
54
|
+
"rx": 28,
|
|
55
|
+
"width": 160,
|
|
56
|
+
"x": 176,
|
|
57
|
+
"y": 336,
|
|
58
|
+
},
|
|
59
|
+
"type": "Rect",
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
"props": {
|
|
63
|
+
"fill": "#FFFFFF",
|
|
64
|
+
"height": 16,
|
|
65
|
+
"testID": undefined,
|
|
66
|
+
"viewBox": "0 0 512 512",
|
|
67
|
+
"width": 16,
|
|
68
|
+
},
|
|
69
|
+
"type": "Svg",
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
"props": {
|
|
73
|
+
"style": {
|
|
74
|
+
"alignSelf": "center",
|
|
75
|
+
"marginLeft": 0,
|
|
76
|
+
"marginRight": 8,
|
|
77
|
+
},
|
|
78
|
+
"testID": undefined,
|
|
79
|
+
},
|
|
80
|
+
"type": "View",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"$$typeof": Symbol(react.test.json),
|
|
84
|
+
"children": [
|
|
85
|
+
"Filter",
|
|
86
|
+
],
|
|
87
|
+
"props": {
|
|
88
|
+
"style": {
|
|
89
|
+
"color": "#FFFFFF",
|
|
90
|
+
"fontSize": 16,
|
|
91
|
+
"fontWeight": "700",
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
"type": "Text",
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
"props": {
|
|
98
|
+
"style": {
|
|
99
|
+
"flexDirection": "row",
|
|
100
|
+
},
|
|
101
|
+
"testID": undefined,
|
|
102
|
+
},
|
|
103
|
+
"type": "View",
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
"props": {
|
|
107
|
+
"style": {
|
|
108
|
+
"flexDirection": "row",
|
|
109
|
+
},
|
|
110
|
+
"testID": undefined,
|
|
111
|
+
},
|
|
112
|
+
"type": "View",
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
"props": {
|
|
116
|
+
"accessibilityHint": "Press to perform action",
|
|
117
|
+
"accessibilityLabel": "Filter",
|
|
118
|
+
"accessibilityRole": "button",
|
|
119
|
+
"accessibilityState": {
|
|
120
|
+
"disabled": false,
|
|
121
|
+
},
|
|
122
|
+
"disabled": false,
|
|
123
|
+
"onPress": [Function: debounced],
|
|
124
|
+
"style": {
|
|
125
|
+
"alignItems": "center",
|
|
126
|
+
"alignSelf": "flex-start",
|
|
127
|
+
"backgroundColor": "#0E9DCD",
|
|
128
|
+
"borderColor": undefined,
|
|
129
|
+
"borderRadius": 360,
|
|
130
|
+
"borderWidth": undefined,
|
|
131
|
+
"flexDirection": "column",
|
|
132
|
+
"height": undefined,
|
|
133
|
+
"justifyContent": "center",
|
|
134
|
+
"paddingHorizontal": 20,
|
|
135
|
+
"paddingVertical": 8,
|
|
136
|
+
"width": "auto",
|
|
137
|
+
},
|
|
138
|
+
"testID": undefined,
|
|
139
|
+
},
|
|
140
|
+
"type": "PressableScale",
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
"props": {
|
|
144
|
+
"ref": {
|
|
145
|
+
"current": null,
|
|
146
|
+
},
|
|
147
|
+
"style": undefined,
|
|
148
|
+
"testID": undefined,
|
|
149
|
+
},
|
|
150
|
+
"type": "View",
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
"props": {
|
|
154
|
+
"style": {
|
|
155
|
+
"position": "relative",
|
|
156
|
+
},
|
|
157
|
+
"testID": undefined,
|
|
158
|
+
},
|
|
159
|
+
"type": "View",
|
|
160
|
+
}
|
|
161
|
+
`;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
|
|
2
|
+
|
|
3
|
+
exports[`FilterAccordion renders correctly with default props 1`] = `
|
|
4
|
+
{
|
|
5
|
+
"$$typeof": Symbol(react.test.json),
|
|
6
|
+
"children": [
|
|
7
|
+
{
|
|
8
|
+
"$$typeof": Symbol(react.test.json),
|
|
9
|
+
"children": [
|
|
10
|
+
{
|
|
11
|
+
"$$typeof": Symbol(react.test.json),
|
|
12
|
+
"children": [
|
|
13
|
+
{
|
|
14
|
+
"$$typeof": Symbol(react.test.json),
|
|
15
|
+
"children": [
|
|
16
|
+
{
|
|
17
|
+
"$$typeof": Symbol(react.test.json),
|
|
18
|
+
"children": [
|
|
19
|
+
"Status",
|
|
20
|
+
],
|
|
21
|
+
"props": {
|
|
22
|
+
"numberOfLines": 0,
|
|
23
|
+
"selectable": undefined,
|
|
24
|
+
"style": {
|
|
25
|
+
"color": "#1C1C1C",
|
|
26
|
+
"fontFamily": "text-regular",
|
|
27
|
+
"fontSize": 14,
|
|
28
|
+
"textAlign": "left",
|
|
29
|
+
},
|
|
30
|
+
"testID": undefined,
|
|
31
|
+
},
|
|
32
|
+
"type": "Text",
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
"props": {},
|
|
36
|
+
"type": "View",
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
"props": {
|
|
40
|
+
"style": {
|
|
41
|
+
"alignItems": "center",
|
|
42
|
+
"flex": 1,
|
|
43
|
+
"flexDirection": "row",
|
|
44
|
+
"gap": 6,
|
|
45
|
+
},
|
|
46
|
+
"testID": undefined,
|
|
47
|
+
},
|
|
48
|
+
"type": "View",
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
"props": {
|
|
52
|
+
"accessibilityRole": "button",
|
|
53
|
+
"accessibilityState": {
|
|
54
|
+
"expanded": false,
|
|
55
|
+
},
|
|
56
|
+
"aria-expanded": false,
|
|
57
|
+
"onHoverIn": [Function],
|
|
58
|
+
"onHoverOut": [Function],
|
|
59
|
+
"onKeyDown": [Function],
|
|
60
|
+
"onPress": [Function],
|
|
61
|
+
"style": {
|
|
62
|
+
"alignItems": "center",
|
|
63
|
+
"flexDirection": "row",
|
|
64
|
+
"justifyContent": "space-between",
|
|
65
|
+
},
|
|
66
|
+
"testID": undefined,
|
|
67
|
+
},
|
|
68
|
+
"type": "Pressable",
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
"props": {
|
|
72
|
+
"style": {
|
|
73
|
+
"backgroundColor": "#FFFFFF",
|
|
74
|
+
"borderRadius": 4,
|
|
75
|
+
"gap": 16,
|
|
76
|
+
"paddingHorizontal": 8,
|
|
77
|
+
"paddingVertical": 12,
|
|
78
|
+
},
|
|
79
|
+
"testID": undefined,
|
|
80
|
+
},
|
|
81
|
+
"type": "View",
|
|
82
|
+
}
|
|
83
|
+
`;
|