@terreno/ui 57.0.0 → 57.1.0
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/dist/DateTimeField.js +6 -2
- package/dist/DateTimeField.js.map +1 -1
- package/dist/DraggableList.js +7 -4
- package/dist/DraggableList.js.map +1 -1
- package/dist/Filter.js +14 -9
- package/dist/Filter.js.map +1 -1
- package/dist/GPTChat.d.ts +7 -1
- package/dist/GPTChat.js +26 -16
- package/dist/GPTChat.js.map +1 -1
- package/dist/ModalSheet.js +1 -1
- package/dist/ModalSheet.js.map +1 -1
- package/dist/PortalHost.d.ts +24 -0
- package/dist/PortalHost.js +52 -0
- package/dist/PortalHost.js.map +1 -0
- package/dist/SidebarNavigation.native.js +2 -1
- package/dist/SidebarNavigation.native.js.map +1 -1
- package/dist/TerrenoProvider.js +1 -1
- package/dist/TerrenoProvider.js.map +1 -1
- package/dist/ToastNotifications.js +8 -5
- package/dist/ToastNotifications.js.map +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/Tooltip.js.map +1 -1
- package/dist/Utilities.d.ts +24 -0
- package/dist/Utilities.js +51 -0
- package/dist/Utilities.js.map +1 -1
- package/dist/WebDropdownMenu.js +11 -15
- package/dist/WebDropdownMenu.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/DateTimeField.tsx +6 -3
- package/src/DraggableList.tsx +7 -4
- package/src/Filter.test.tsx +154 -1
- package/src/Filter.tsx +16 -7
- package/src/GPTChat.tsx +89 -16
- package/src/ModalSheet.tsx +2 -1
- package/src/PortalHost.tsx +105 -0
- package/src/SidebarNavigation.native.tsx +1 -1
- package/src/TerrenoProvider.tsx +1 -1
- package/src/ToastNotifications.tsx +4 -5
- package/src/Tooltip.tsx +1 -1
- package/src/Utilities.test.tsx +47 -0
- package/src/Utilities.tsx +78 -0
- package/src/WebDropdownMenu.test.tsx +54 -0
- package/src/WebDropdownMenu.tsx +11 -10
- package/src/__snapshots__/AddressField.test.tsx.snap +1 -7
- package/src/__snapshots__/CustomSelectField.test.tsx.snap +7 -49
- package/src/__snapshots__/Field.test.tsx.snap +9 -51
- package/src/__snapshots__/SelectField.test.tsx.snap +6 -42
- package/src/__snapshots__/TerrenoProvider.test.tsx.snap +4 -4
- package/src/__snapshots__/TimezonePicker.test.tsx.snap +6 -42
- package/src/bunSetup.ts +2 -2
- package/src/index.tsx +1 -0
- package/src/shadowStyleProps.test.ts +30 -0
- package/src/table/__snapshots__/TableBadge.test.tsx.snap +1 -7
|
@@ -397,7 +397,6 @@ const ToastItem: FC<ToastProps> = (props) => {
|
|
|
397
397
|
|
|
398
398
|
return (
|
|
399
399
|
<Animated.View
|
|
400
|
-
pointerEvents={"box-none"}
|
|
401
400
|
ref={containerRef}
|
|
402
401
|
{...(swipeEnabled ? getPanResponder().panHandlers : null)}
|
|
403
402
|
style={[toastStyles.container, animationStyle]}
|
|
@@ -429,7 +428,7 @@ const ToastItem: FC<ToastProps> = (props) => {
|
|
|
429
428
|
};
|
|
430
429
|
|
|
431
430
|
const toastStyles = StyleSheet.create({
|
|
432
|
-
container: {alignItems: "center", width: "100%"},
|
|
431
|
+
container: {alignItems: "center", pointerEvents: "box-none", width: "100%"},
|
|
433
432
|
iconContainer: {
|
|
434
433
|
marginRight: 5,
|
|
435
434
|
},
|
|
@@ -640,7 +639,6 @@ const ToastContainer = forwardRef<ToastContainerRef, ToastContainerProps>((props
|
|
|
640
639
|
return (
|
|
641
640
|
<KeyboardAvoidingView
|
|
642
641
|
behavior={Platform.OS === "ios" ? "position" : undefined}
|
|
643
|
-
pointerEvents="box-none"
|
|
644
642
|
style={[containerStyles.container, style]}
|
|
645
643
|
>
|
|
646
644
|
<SafeAreaView>
|
|
@@ -664,7 +662,6 @@ const ToastContainer = forwardRef<ToastContainerRef, ToastContainerProps>((props
|
|
|
664
662
|
return (
|
|
665
663
|
<KeyboardAvoidingView
|
|
666
664
|
behavior={Platform.OS === "ios" ? "position" : undefined}
|
|
667
|
-
pointerEvents="box-none"
|
|
668
665
|
style={[containerStyles.container, style]}
|
|
669
666
|
>
|
|
670
667
|
<SafeAreaView>
|
|
@@ -695,7 +692,6 @@ const ToastContainer = forwardRef<ToastContainerRef, ToastContainerProps>((props
|
|
|
695
692
|
return (
|
|
696
693
|
<KeyboardAvoidingView
|
|
697
694
|
behavior={Platform.OS === "ios" ? "position" : undefined}
|
|
698
|
-
pointerEvents="box-none"
|
|
699
695
|
style={[containerStyles.container, style]}
|
|
700
696
|
>
|
|
701
697
|
{toasts
|
|
@@ -724,6 +720,9 @@ const containerStyles = StyleSheet.create({
|
|
|
724
720
|
elevation: 999999,
|
|
725
721
|
flex: 0,
|
|
726
722
|
maxWidth: "100%",
|
|
723
|
+
// box-none lets clicks pass through the full-width container to the page below,
|
|
724
|
+
// while individual toasts stay interactive.
|
|
725
|
+
pointerEvents: "box-none",
|
|
727
726
|
// @ts-expect-error: fixed is available on web.
|
|
728
727
|
position: Platform.OS === "web" ? "fixed" : "absolute",
|
|
729
728
|
zIndex: 999999,
|
package/src/Tooltip.tsx
CHANGED
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
View,
|
|
9
9
|
type ViewStyle,
|
|
10
10
|
} from "react-native";
|
|
11
|
-
import {Portal} from "react-native-portalize";
|
|
12
11
|
|
|
13
12
|
import type {TooltipPosition, TooltipProps} from "./Common";
|
|
13
|
+
import {Portal} from "./PortalHost";
|
|
14
14
|
import {Text} from "./Text";
|
|
15
15
|
import {useTheme} from "./Theme";
|
|
16
16
|
|
package/src/Utilities.test.tsx
CHANGED
|
@@ -2,8 +2,10 @@ import {describe, expect, it} from "bun:test";
|
|
|
2
2
|
|
|
3
3
|
import type {APIError, BaseProfile} from "./Common";
|
|
4
4
|
import {
|
|
5
|
+
applyColorOpacity,
|
|
5
6
|
bind,
|
|
6
7
|
concat,
|
|
8
|
+
createBoxShadow,
|
|
7
9
|
findAddressComponent,
|
|
8
10
|
formattedCountyCode,
|
|
9
11
|
fromClassName,
|
|
@@ -425,4 +427,49 @@ describe("Utilities", () => {
|
|
|
425
427
|
expect(printAPIError(error as unknown as APIError, true)).toBe("Not Found");
|
|
426
428
|
});
|
|
427
429
|
});
|
|
430
|
+
|
|
431
|
+
describe("applyColorOpacity", () => {
|
|
432
|
+
it("converts six digit hex colors", () => {
|
|
433
|
+
expect(applyColorOpacity({color: "#1C1C1C", opacity: 0.15})).toBe("rgba(28, 28, 28, 0.15)");
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
it("expands shorthand hex colors", () => {
|
|
437
|
+
expect(applyColorOpacity({color: "#abc", opacity: 1})).toBe("rgba(170, 187, 204, 1)");
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
it("multiplies an existing alpha channel by the opacity", () => {
|
|
441
|
+
expect(applyColorOpacity({color: "#00000080", opacity: 0.5})).toBe("rgba(0, 0, 0, 0.251)");
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
it("converts rgb and rgba colors", () => {
|
|
445
|
+
expect(applyColorOpacity({color: "rgb(10, 20, 30)", opacity: 0.4})).toBe(
|
|
446
|
+
"rgba(10, 20, 30, 0.4)"
|
|
447
|
+
);
|
|
448
|
+
expect(applyColorOpacity({color: "rgba(10, 20, 30, 0.5)", opacity: 0.5})).toBe(
|
|
449
|
+
"rgba(10, 20, 30, 0.25)"
|
|
450
|
+
);
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
it("clamps opacity to the 0-1 range", () => {
|
|
454
|
+
expect(applyColorOpacity({color: "#000000", opacity: 5})).toBe("rgba(0, 0, 0, 1)");
|
|
455
|
+
expect(applyColorOpacity({color: "#000000", opacity: -1})).toBe("rgba(0, 0, 0, 0)");
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
it("returns unparseable colors unchanged", () => {
|
|
459
|
+
expect(applyColorOpacity({color: "papayawhip", opacity: 0.5})).toBe("papayawhip");
|
|
460
|
+
expect(applyColorOpacity({color: "#12345", opacity: 0.5})).toBe("#12345");
|
|
461
|
+
});
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
describe("createBoxShadow", () => {
|
|
465
|
+
it("builds a box shadow value with defaults", () => {
|
|
466
|
+
expect(createBoxShadow({blurRadius: 8})).toBe("0px 0px 8px rgba(0, 0, 0, 1)");
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
it("applies offsets, color, and opacity", () => {
|
|
470
|
+
expect(
|
|
471
|
+
createBoxShadow({blurRadius: 12, color: "#1C1C1C", offsetX: 1, offsetY: 4, opacity: 0.15})
|
|
472
|
+
).toBe("1px 4px 12px rgba(28, 28, 28, 0.15)");
|
|
473
|
+
});
|
|
474
|
+
});
|
|
428
475
|
});
|
package/src/Utilities.tsx
CHANGED
|
@@ -193,6 +193,84 @@ export const isNative = (): boolean => {
|
|
|
193
193
|
return ["android", "ios"].includes(Platform.OS);
|
|
194
194
|
};
|
|
195
195
|
|
|
196
|
+
interface ColorWithOpacityOptions {
|
|
197
|
+
color: string;
|
|
198
|
+
opacity: number;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Applies an opacity to a color, returning an `rgba()` string. Supports `#rgb`,
|
|
203
|
+
* `#rgba`, `#rrggbb`, `#rrggbbaa`, `rgb()`, and `rgba()` inputs. Colors that
|
|
204
|
+
* can't be parsed (e.g. named CSS colors) are returned unchanged.
|
|
205
|
+
*/
|
|
206
|
+
export const applyColorOpacity = ({color, opacity}: ColorWithOpacityOptions): string => {
|
|
207
|
+
const clampedOpacity = Math.max(0, Math.min(1, opacity));
|
|
208
|
+
|
|
209
|
+
if (color.startsWith("#")) {
|
|
210
|
+
const hex = color.slice(1);
|
|
211
|
+
const isShorthand = hex.length === 3 || hex.length === 4;
|
|
212
|
+
if (!isShorthand && hex.length !== 6 && hex.length !== 8) {
|
|
213
|
+
return color;
|
|
214
|
+
}
|
|
215
|
+
const expanded = isShorthand
|
|
216
|
+
? hex
|
|
217
|
+
.split("")
|
|
218
|
+
.map((char) => `${char}${char}`)
|
|
219
|
+
.join("")
|
|
220
|
+
: hex;
|
|
221
|
+
const red = Number.parseInt(expanded.slice(0, 2), 16);
|
|
222
|
+
const green = Number.parseInt(expanded.slice(2, 4), 16);
|
|
223
|
+
const blue = Number.parseInt(expanded.slice(4, 6), 16);
|
|
224
|
+
if (Number.isNaN(red) || Number.isNaN(green) || Number.isNaN(blue)) {
|
|
225
|
+
return color;
|
|
226
|
+
}
|
|
227
|
+
// An alpha channel on the input color multiplies with the requested opacity,
|
|
228
|
+
// matching how react-native-web combined a shadow's color and opacity.
|
|
229
|
+
const alphaChannel =
|
|
230
|
+
expanded.length === 8 ? Number.parseInt(expanded.slice(6, 8), 16) / 255 : 1;
|
|
231
|
+
const alpha = Number.isNaN(alphaChannel) ? clampedOpacity : alphaChannel * clampedOpacity;
|
|
232
|
+
return `rgba(${red}, ${green}, ${blue}, ${roundOpacity(alpha)})`;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const rgbMatch = /^rgba?\(([^)]+)\)$/i.exec(color);
|
|
236
|
+
if (!rgbMatch) {
|
|
237
|
+
return color;
|
|
238
|
+
}
|
|
239
|
+
const parts = rgbMatch[1].split(",").map((part) => part.trim());
|
|
240
|
+
if (parts.length !== 3 && parts.length !== 4) {
|
|
241
|
+
return color;
|
|
242
|
+
}
|
|
243
|
+
const existingAlpha = parts.length === 4 ? Number.parseFloat(parts[3]) : 1;
|
|
244
|
+
const alpha = Number.isNaN(existingAlpha) ? clampedOpacity : existingAlpha * clampedOpacity;
|
|
245
|
+
return `rgba(${parts[0]}, ${parts[1]}, ${parts[2]}, ${roundOpacity(alpha)})`;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
const roundOpacity = (alpha: number): number => Math.round(alpha * 1000) / 1000;
|
|
249
|
+
|
|
250
|
+
interface BoxShadowOptions {
|
|
251
|
+
blurRadius: number;
|
|
252
|
+
/** Shadow color. Defaults to black, matching the platform shadow default. */
|
|
253
|
+
color?: string;
|
|
254
|
+
offsetX?: number;
|
|
255
|
+
offsetY?: number;
|
|
256
|
+
/** Shadow alpha, folded into the color since `boxShadow` has no opacity field. */
|
|
257
|
+
opacity?: number;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Builds a CSS `box-shadow` value for the `boxShadow` style prop, which replaces
|
|
262
|
+
* the deprecated `shadow*` style props (color, offset, opacity, and radius).
|
|
263
|
+
*/
|
|
264
|
+
export const createBoxShadow = ({
|
|
265
|
+
blurRadius,
|
|
266
|
+
color = "#000000",
|
|
267
|
+
offsetX = 0,
|
|
268
|
+
offsetY = 0,
|
|
269
|
+
opacity = 1,
|
|
270
|
+
}: BoxShadowOptions): string => {
|
|
271
|
+
return `${offsetX}px ${offsetY}px ${blurRadius}px ${applyColorOpacity({color, opacity})}`;
|
|
272
|
+
};
|
|
273
|
+
|
|
196
274
|
// Find more information about the address component types here: https://developers.google.com/maps/documentation/javascript/place-autocomplete
|
|
197
275
|
export type AddressComponentType = {
|
|
198
276
|
long_name: string;
|
|
@@ -647,6 +647,60 @@ describe("WebDropdownMenu centered presentation", () => {
|
|
|
647
647
|
expect(style.top).toBeUndefined();
|
|
648
648
|
expect(style.maxHeight).toBe(Math.round(812 * 0.55));
|
|
649
649
|
});
|
|
650
|
+
|
|
651
|
+
it("uses elevation without boxShadow on Android", () => {
|
|
652
|
+
const PlatformModule = require("react-native").Platform;
|
|
653
|
+
const savedOS = PlatformModule.OS;
|
|
654
|
+
try {
|
|
655
|
+
PlatformModule.OS = "android";
|
|
656
|
+
const {getByTestId} = renderWithTheme(
|
|
657
|
+
<WebDropdownMenu
|
|
658
|
+
anchor={anchor}
|
|
659
|
+
disableSearch
|
|
660
|
+
onClose={() => {}}
|
|
661
|
+
onSelect={() => {}}
|
|
662
|
+
options={options}
|
|
663
|
+
presentation="centered"
|
|
664
|
+
visible
|
|
665
|
+
/>
|
|
666
|
+
);
|
|
667
|
+
const menu = getByTestId("web_dropdown_menu");
|
|
668
|
+
const style = Array.isArray(menu.props.style)
|
|
669
|
+
? Object.assign({}, ...menu.props.style)
|
|
670
|
+
: menu.props.style;
|
|
671
|
+
expect(style.elevation).toBe(8);
|
|
672
|
+
expect(style.boxShadow).toBeUndefined();
|
|
673
|
+
} finally {
|
|
674
|
+
PlatformModule.OS = savedOS;
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
|
|
678
|
+
it("uses boxShadow without elevation on iOS", () => {
|
|
679
|
+
const PlatformModule = require("react-native").Platform;
|
|
680
|
+
const savedOS = PlatformModule.OS;
|
|
681
|
+
try {
|
|
682
|
+
PlatformModule.OS = "ios";
|
|
683
|
+
const {getByTestId} = renderWithTheme(
|
|
684
|
+
<WebDropdownMenu
|
|
685
|
+
anchor={anchor}
|
|
686
|
+
disableSearch
|
|
687
|
+
onClose={() => {}}
|
|
688
|
+
onSelect={() => {}}
|
|
689
|
+
options={options}
|
|
690
|
+
presentation="centered"
|
|
691
|
+
visible
|
|
692
|
+
/>
|
|
693
|
+
);
|
|
694
|
+
const menu = getByTestId("web_dropdown_menu");
|
|
695
|
+
const style = Array.isArray(menu.props.style)
|
|
696
|
+
? Object.assign({}, ...menu.props.style)
|
|
697
|
+
: menu.props.style;
|
|
698
|
+
expect(style.elevation).toBeUndefined();
|
|
699
|
+
expect(style.boxShadow).toBe("0px 4px 12px rgba(0, 0, 0, 0.25)");
|
|
700
|
+
} finally {
|
|
701
|
+
PlatformModule.OS = savedOS;
|
|
702
|
+
}
|
|
703
|
+
});
|
|
650
704
|
});
|
|
651
705
|
|
|
652
706
|
describe("useWebDropdownAnchor", () => {
|
package/src/WebDropdownMenu.tsx
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
|
|
16
16
|
import {createWebPortal} from "./createWebPortal";
|
|
17
17
|
import {useTheme} from "./Theme";
|
|
18
|
+
import {createBoxShadow} from "./Utilities";
|
|
18
19
|
|
|
19
20
|
export const scheduleAfterPaint = (callback: () => void): void => {
|
|
20
21
|
if (typeof requestAnimationFrame === "function") {
|
|
@@ -244,31 +245,29 @@ export const WebDropdownMenu = ({
|
|
|
244
245
|
borderColor: theme.border.dark,
|
|
245
246
|
borderRadius: 4,
|
|
246
247
|
borderWidth: 1,
|
|
248
|
+
boxShadow: createBoxShadow({blurRadius: 8, offsetY: 2, opacity: 0.15}),
|
|
247
249
|
left: anchor.x,
|
|
248
250
|
maxHeight: clampedMaxHeight,
|
|
249
251
|
minWidth,
|
|
250
252
|
overflow: "hidden" as const,
|
|
251
|
-
shadowColor: "#000",
|
|
252
|
-
shadowOffset: {height: 2, width: 0},
|
|
253
|
-
shadowOpacity: 0.15,
|
|
254
|
-
shadowRadius: 8,
|
|
255
253
|
...(isOpenAbove ? {bottom: menuBottom} : {top: menuTop}),
|
|
256
254
|
width: width ?? anchor.width,
|
|
257
255
|
zIndex: 2,
|
|
258
256
|
};
|
|
259
257
|
|
|
258
|
+
// Centered presentation is the Android native-picker path. `boxShadow` and
|
|
259
|
+
// `elevation` both paint on Android, so keep elevation-only there — matching
|
|
260
|
+
// Box's `shadow` prop. iOS/web get `boxShadow`.
|
|
260
261
|
const centeredMenuLayoutStyle = {
|
|
261
262
|
backgroundColor: theme.surface.base,
|
|
262
263
|
borderRadius: 8,
|
|
263
|
-
elevation: 8,
|
|
264
264
|
maxHeight: clampedMaxHeight,
|
|
265
265
|
maxWidth: Math.min(400, windowWidth - 48),
|
|
266
266
|
overflow: "hidden" as const,
|
|
267
|
-
shadowColor: "#000",
|
|
268
|
-
shadowOffset: {height: 4, width: 0},
|
|
269
|
-
shadowOpacity: 0.25,
|
|
270
|
-
shadowRadius: 12,
|
|
271
267
|
width: Math.min(400, windowWidth - 48),
|
|
268
|
+
...(Platform.OS === "android"
|
|
269
|
+
? {elevation: 8}
|
|
270
|
+
: {boxShadow: createBoxShadow({blurRadius: 12, offsetY: 4, opacity: 0.25})}),
|
|
272
271
|
};
|
|
273
272
|
|
|
274
273
|
const menuLayoutStyle = isCenteredPresentation
|
|
@@ -410,6 +409,8 @@ export const WebDropdownMenu = ({
|
|
|
410
409
|
|
|
411
410
|
const webFixedOverlayStyle = {
|
|
412
411
|
inset: 0,
|
|
412
|
+
// box-none lets clicks pass to the backdrop / menu but not the empty overlay.
|
|
413
|
+
pointerEvents: "box-none",
|
|
413
414
|
position: "fixed",
|
|
414
415
|
zIndex: 9999,
|
|
415
416
|
} as unknown as ViewStyle;
|
|
@@ -426,7 +427,7 @@ export const WebDropdownMenu = ({
|
|
|
426
427
|
} as unknown as ViewStyle;
|
|
427
428
|
|
|
428
429
|
const overlay = (
|
|
429
|
-
<View
|
|
430
|
+
<View style={webFixedOverlayStyle}>
|
|
430
431
|
<Pressable
|
|
431
432
|
aria-role="button"
|
|
432
433
|
onPress={onClose}
|
|
@@ -2477,18 +2477,12 @@ exports[`AddressField renders correctly with default props 1`] = `
|
|
|
2477
2477
|
"borderColor": "#9A9A9A",
|
|
2478
2478
|
"borderRadius": 4,
|
|
2479
2479
|
"borderWidth": 1,
|
|
2480
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
2480
2481
|
"left": 0,
|
|
2481
2482
|
"maxHeight": 300,
|
|
2482
2483
|
"minWidth": undefined,
|
|
2483
2484
|
"overflow": "hidden",
|
|
2484
2485
|
"position": "absolute",
|
|
2485
|
-
"shadowColor": "#000",
|
|
2486
|
-
"shadowOffset": {
|
|
2487
|
-
"height": 2,
|
|
2488
|
-
"width": 0,
|
|
2489
|
-
},
|
|
2490
|
-
"shadowOpacity": 0.15,
|
|
2491
|
-
"shadowRadius": 8,
|
|
2492
2486
|
"top": 4,
|
|
2493
2487
|
"width": 0,
|
|
2494
2488
|
"zIndex": 1,
|
|
@@ -324,18 +324,12 @@ exports[`CustomSelectField renders correctly with default props 1`] = `
|
|
|
324
324
|
"borderColor": "#9A9A9A",
|
|
325
325
|
"borderRadius": 4,
|
|
326
326
|
"borderWidth": 1,
|
|
327
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
327
328
|
"left": 0,
|
|
328
329
|
"maxHeight": 300,
|
|
329
330
|
"minWidth": undefined,
|
|
330
331
|
"overflow": "hidden",
|
|
331
332
|
"position": "absolute",
|
|
332
|
-
"shadowColor": "#000",
|
|
333
|
-
"shadowOffset": {
|
|
334
|
-
"height": 2,
|
|
335
|
-
"width": 0,
|
|
336
|
-
},
|
|
337
|
-
"shadowOpacity": 0.15,
|
|
338
|
-
"shadowRadius": 8,
|
|
339
333
|
"top": 4,
|
|
340
334
|
"width": 0,
|
|
341
335
|
"zIndex": 1,
|
|
@@ -764,18 +758,12 @@ exports[`CustomSelectField renders with title 1`] = `
|
|
|
764
758
|
"borderColor": "#9A9A9A",
|
|
765
759
|
"borderRadius": 4,
|
|
766
760
|
"borderWidth": 1,
|
|
761
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
767
762
|
"left": 0,
|
|
768
763
|
"maxHeight": 300,
|
|
769
764
|
"minWidth": undefined,
|
|
770
765
|
"overflow": "hidden",
|
|
771
766
|
"position": "absolute",
|
|
772
|
-
"shadowColor": "#000",
|
|
773
|
-
"shadowOffset": {
|
|
774
|
-
"height": 2,
|
|
775
|
-
"width": 0,
|
|
776
|
-
},
|
|
777
|
-
"shadowOpacity": 0.15,
|
|
778
|
-
"shadowRadius": 8,
|
|
779
767
|
"top": 4,
|
|
780
768
|
"width": 0,
|
|
781
769
|
"zIndex": 1,
|
|
@@ -1189,18 +1177,12 @@ exports[`CustomSelectField renders with placeholder 1`] = `
|
|
|
1189
1177
|
"borderColor": "#9A9A9A",
|
|
1190
1178
|
"borderRadius": 4,
|
|
1191
1179
|
"borderWidth": 1,
|
|
1180
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
1192
1181
|
"left": 0,
|
|
1193
1182
|
"maxHeight": 300,
|
|
1194
1183
|
"minWidth": undefined,
|
|
1195
1184
|
"overflow": "hidden",
|
|
1196
1185
|
"position": "absolute",
|
|
1197
|
-
"shadowColor": "#000",
|
|
1198
|
-
"shadowOffset": {
|
|
1199
|
-
"height": 2,
|
|
1200
|
-
"width": 0,
|
|
1201
|
-
},
|
|
1202
|
-
"shadowOpacity": 0.15,
|
|
1203
|
-
"shadowRadius": 8,
|
|
1204
1186
|
"top": 4,
|
|
1205
1187
|
"width": 0,
|
|
1206
1188
|
"zIndex": 1,
|
|
@@ -1614,18 +1596,12 @@ exports[`CustomSelectField renders with selected value 1`] = `
|
|
|
1614
1596
|
"borderColor": "#9A9A9A",
|
|
1615
1597
|
"borderRadius": 4,
|
|
1616
1598
|
"borderWidth": 1,
|
|
1599
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
1617
1600
|
"left": 0,
|
|
1618
1601
|
"maxHeight": 300,
|
|
1619
1602
|
"minWidth": undefined,
|
|
1620
1603
|
"overflow": "hidden",
|
|
1621
1604
|
"position": "absolute",
|
|
1622
|
-
"shadowColor": "#000",
|
|
1623
|
-
"shadowOffset": {
|
|
1624
|
-
"height": 2,
|
|
1625
|
-
"width": 0,
|
|
1626
|
-
},
|
|
1627
|
-
"shadowOpacity": 0.15,
|
|
1628
|
-
"shadowRadius": 8,
|
|
1629
1605
|
"top": 4,
|
|
1630
1606
|
"width": 0,
|
|
1631
1607
|
"zIndex": 1,
|
|
@@ -2039,18 +2015,12 @@ exports[`CustomSelectField renders with custom value (not in options) 1`] = `
|
|
|
2039
2015
|
"borderColor": "#9A9A9A",
|
|
2040
2016
|
"borderRadius": 4,
|
|
2041
2017
|
"borderWidth": 1,
|
|
2018
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
2042
2019
|
"left": 0,
|
|
2043
2020
|
"maxHeight": 300,
|
|
2044
2021
|
"minWidth": undefined,
|
|
2045
2022
|
"overflow": "hidden",
|
|
2046
2023
|
"position": "absolute",
|
|
2047
|
-
"shadowColor": "#000",
|
|
2048
|
-
"shadowOffset": {
|
|
2049
|
-
"height": 2,
|
|
2050
|
-
"width": 0,
|
|
2051
|
-
},
|
|
2052
|
-
"shadowOpacity": 0.15,
|
|
2053
|
-
"shadowRadius": 8,
|
|
2054
2024
|
"top": 4,
|
|
2055
2025
|
"width": 0,
|
|
2056
2026
|
"zIndex": 1,
|
|
@@ -2568,18 +2538,12 @@ exports[`CustomSelectField renders disabled state 1`] = `
|
|
|
2568
2538
|
"borderColor": "#9A9A9A",
|
|
2569
2539
|
"borderRadius": 4,
|
|
2570
2540
|
"borderWidth": 1,
|
|
2541
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
2571
2542
|
"left": 0,
|
|
2572
2543
|
"maxHeight": 300,
|
|
2573
2544
|
"minWidth": undefined,
|
|
2574
2545
|
"overflow": "hidden",
|
|
2575
2546
|
"position": "absolute",
|
|
2576
|
-
"shadowColor": "#000",
|
|
2577
|
-
"shadowOffset": {
|
|
2578
|
-
"height": 2,
|
|
2579
|
-
"width": 0,
|
|
2580
|
-
},
|
|
2581
|
-
"shadowOpacity": 0.15,
|
|
2582
|
-
"shadowRadius": 8,
|
|
2583
2547
|
"top": 4,
|
|
2584
2548
|
"width": 0,
|
|
2585
2549
|
"zIndex": 1,
|
|
@@ -2995,18 +2959,12 @@ exports[`CustomSelectField includes custom option in dropdown 1`] = `
|
|
|
2995
2959
|
"borderColor": "#9A9A9A",
|
|
2996
2960
|
"borderRadius": 4,
|
|
2997
2961
|
"borderWidth": 1,
|
|
2962
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
2998
2963
|
"left": 0,
|
|
2999
2964
|
"maxHeight": 300,
|
|
3000
2965
|
"minWidth": undefined,
|
|
3001
2966
|
"overflow": "hidden",
|
|
3002
2967
|
"position": "absolute",
|
|
3003
|
-
"shadowColor": "#000",
|
|
3004
|
-
"shadowOffset": {
|
|
3005
|
-
"height": 2,
|
|
3006
|
-
"width": 0,
|
|
3007
|
-
},
|
|
3008
|
-
"shadowOpacity": 0.15,
|
|
3009
|
-
"shadowRadius": 8,
|
|
3010
2968
|
"top": 4,
|
|
3011
2969
|
"width": 0,
|
|
3012
2970
|
"zIndex": 1,
|
|
@@ -1001,10 +1001,10 @@ exports[`Field renders date field 1`] = `
|
|
|
1001
1001
|
},
|
|
1002
1002
|
],
|
|
1003
1003
|
"props": {
|
|
1004
|
-
"pointerEvents": "auto",
|
|
1005
1004
|
"style": {
|
|
1006
1005
|
"alignItems": "center",
|
|
1007
1006
|
"flexDirection": "row",
|
|
1007
|
+
"pointerEvents": "auto",
|
|
1008
1008
|
},
|
|
1009
1009
|
"testID": undefined,
|
|
1010
1010
|
},
|
|
@@ -1379,18 +1379,12 @@ exports[`Field renders time field 1`] = `
|
|
|
1379
1379
|
"borderColor": "#9A9A9A",
|
|
1380
1380
|
"borderRadius": 4,
|
|
1381
1381
|
"borderWidth": 1,
|
|
1382
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
1382
1383
|
"left": 0,
|
|
1383
1384
|
"maxHeight": 300,
|
|
1384
1385
|
"minWidth": undefined,
|
|
1385
1386
|
"overflow": "hidden",
|
|
1386
1387
|
"position": "absolute",
|
|
1387
|
-
"shadowColor": "#000",
|
|
1388
|
-
"shadowOffset": {
|
|
1389
|
-
"height": 2,
|
|
1390
|
-
"width": 0,
|
|
1391
|
-
},
|
|
1392
|
-
"shadowOpacity": 0.15,
|
|
1393
|
-
"shadowRadius": 8,
|
|
1394
1388
|
"top": 4,
|
|
1395
1389
|
"width": 0,
|
|
1396
1390
|
"zIndex": 1,
|
|
@@ -1905,18 +1899,12 @@ exports[`Field renders time field 1`] = `
|
|
|
1905
1899
|
"borderColor": "#9A9A9A",
|
|
1906
1900
|
"borderRadius": 4,
|
|
1907
1901
|
"borderWidth": 1,
|
|
1902
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
1908
1903
|
"left": 0,
|
|
1909
1904
|
"maxHeight": 300,
|
|
1910
1905
|
"minWidth": undefined,
|
|
1911
1906
|
"overflow": "hidden",
|
|
1912
1907
|
"position": "absolute",
|
|
1913
|
-
"shadowColor": "#000",
|
|
1914
|
-
"shadowOffset": {
|
|
1915
|
-
"height": 2,
|
|
1916
|
-
"width": 0,
|
|
1917
|
-
},
|
|
1918
|
-
"shadowOpacity": 0.15,
|
|
1919
|
-
"shadowRadius": 8,
|
|
1920
1908
|
"top": 4,
|
|
1921
1909
|
"width": 0,
|
|
1922
1910
|
"zIndex": 1,
|
|
@@ -2248,10 +2236,10 @@ exports[`Field renders datetime field 1`] = `
|
|
|
2248
2236
|
},
|
|
2249
2237
|
],
|
|
2250
2238
|
"props": {
|
|
2251
|
-
"pointerEvents": "auto",
|
|
2252
2239
|
"style": {
|
|
2253
2240
|
"alignItems": "center",
|
|
2254
2241
|
"flexDirection": "row",
|
|
2242
|
+
"pointerEvents": "auto",
|
|
2255
2243
|
},
|
|
2256
2244
|
"testID": undefined,
|
|
2257
2245
|
},
|
|
@@ -2599,18 +2587,12 @@ exports[`Field renders datetime field 1`] = `
|
|
|
2599
2587
|
"borderColor": "#9A9A9A",
|
|
2600
2588
|
"borderRadius": 4,
|
|
2601
2589
|
"borderWidth": 1,
|
|
2590
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
2602
2591
|
"left": 0,
|
|
2603
2592
|
"maxHeight": 300,
|
|
2604
2593
|
"minWidth": undefined,
|
|
2605
2594
|
"overflow": "hidden",
|
|
2606
2595
|
"position": "absolute",
|
|
2607
|
-
"shadowColor": "#000",
|
|
2608
|
-
"shadowOffset": {
|
|
2609
|
-
"height": 2,
|
|
2610
|
-
"width": 0,
|
|
2611
|
-
},
|
|
2612
|
-
"shadowOpacity": 0.15,
|
|
2613
|
-
"shadowRadius": 8,
|
|
2614
2596
|
"top": 4,
|
|
2615
2597
|
"width": 0,
|
|
2616
2598
|
"zIndex": 1,
|
|
@@ -3125,18 +3107,12 @@ exports[`Field renders datetime field 1`] = `
|
|
|
3125
3107
|
"borderColor": "#9A9A9A",
|
|
3126
3108
|
"borderRadius": 4,
|
|
3127
3109
|
"borderWidth": 1,
|
|
3110
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
3128
3111
|
"left": 0,
|
|
3129
3112
|
"maxHeight": 300,
|
|
3130
3113
|
"minWidth": undefined,
|
|
3131
3114
|
"overflow": "hidden",
|
|
3132
3115
|
"position": "absolute",
|
|
3133
|
-
"shadowColor": "#000",
|
|
3134
|
-
"shadowOffset": {
|
|
3135
|
-
"height": 2,
|
|
3136
|
-
"width": 0,
|
|
3137
|
-
},
|
|
3138
|
-
"shadowOpacity": 0.15,
|
|
3139
|
-
"shadowRadius": 8,
|
|
3140
3116
|
"top": 4,
|
|
3141
3117
|
"width": 0,
|
|
3142
3118
|
"zIndex": 1,
|
|
@@ -3503,18 +3479,12 @@ exports[`Field renders select field 1`] = `
|
|
|
3503
3479
|
"borderColor": "#9A9A9A",
|
|
3504
3480
|
"borderRadius": 4,
|
|
3505
3481
|
"borderWidth": 1,
|
|
3482
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
3506
3483
|
"left": 0,
|
|
3507
3484
|
"maxHeight": 300,
|
|
3508
3485
|
"minWidth": undefined,
|
|
3509
3486
|
"overflow": "hidden",
|
|
3510
3487
|
"position": "absolute",
|
|
3511
|
-
"shadowColor": "#000",
|
|
3512
|
-
"shadowOffset": {
|
|
3513
|
-
"height": 2,
|
|
3514
|
-
"width": 0,
|
|
3515
|
-
},
|
|
3516
|
-
"shadowOpacity": 0.15,
|
|
3517
|
-
"shadowRadius": 8,
|
|
3518
3488
|
"top": 4,
|
|
3519
3489
|
"width": 0,
|
|
3520
3490
|
"zIndex": 1,
|
|
@@ -6301,18 +6271,12 @@ exports[`Field renders address field 1`] = `
|
|
|
6301
6271
|
"borderColor": "#9A9A9A",
|
|
6302
6272
|
"borderRadius": 4,
|
|
6303
6273
|
"borderWidth": 1,
|
|
6274
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
6304
6275
|
"left": 0,
|
|
6305
6276
|
"maxHeight": 300,
|
|
6306
6277
|
"minWidth": undefined,
|
|
6307
6278
|
"overflow": "hidden",
|
|
6308
6279
|
"position": "absolute",
|
|
6309
|
-
"shadowColor": "#000",
|
|
6310
|
-
"shadowOffset": {
|
|
6311
|
-
"height": 2,
|
|
6312
|
-
"width": 0,
|
|
6313
|
-
},
|
|
6314
|
-
"shadowOpacity": 0.15,
|
|
6315
|
-
"shadowRadius": 8,
|
|
6316
6280
|
"top": 4,
|
|
6317
6281
|
"width": 0,
|
|
6318
6282
|
"zIndex": 1,
|
|
@@ -6887,18 +6851,12 @@ exports[`Field renders customSelect field 1`] = `
|
|
|
6887
6851
|
"borderColor": "#9A9A9A",
|
|
6888
6852
|
"borderRadius": 4,
|
|
6889
6853
|
"borderWidth": 1,
|
|
6854
|
+
"boxShadow": "0px 2px 8px rgba(0, 0, 0, 0.15)",
|
|
6890
6855
|
"left": 0,
|
|
6891
6856
|
"maxHeight": 300,
|
|
6892
6857
|
"minWidth": undefined,
|
|
6893
6858
|
"overflow": "hidden",
|
|
6894
6859
|
"position": "absolute",
|
|
6895
|
-
"shadowColor": "#000",
|
|
6896
|
-
"shadowOffset": {
|
|
6897
|
-
"height": 2,
|
|
6898
|
-
"width": 0,
|
|
6899
|
-
},
|
|
6900
|
-
"shadowOpacity": 0.15,
|
|
6901
|
-
"shadowRadius": 8,
|
|
6902
6860
|
"top": 4,
|
|
6903
6861
|
"width": 0,
|
|
6904
6862
|
"zIndex": 1,
|