@artsy/palette-mobile 11.0.22 → 11.0.24

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/CHANGELOG.md +24 -0
  2. package/dist/elements/ButtonNew/Button.js +6 -2
  3. package/dist/elements/{Screen/Screen.d.ts → LegacyScreen/LegacyScreen.d.ts} +3 -3
  4. package/dist/elements/{Screen/Screen.js → LegacyScreen/LegacyScreen.js} +12 -10
  5. package/dist/elements/LegacyScreen/index.d.ts +1 -0
  6. package/dist/elements/LegacyScreen/index.js +17 -0
  7. package/dist/elements/ProgressBar/ProgressBar.js +3 -1
  8. package/dist/elements/Screen/Background.d.ts +4 -0
  9. package/dist/elements/Screen/Background.js +7 -0
  10. package/dist/elements/Screen/Body.d.ts +8 -0
  11. package/dist/elements/Screen/Body.js +13 -0
  12. package/dist/elements/Screen/BottomView.d.ts +6 -0
  13. package/dist/elements/Screen/BottomView.js +19 -0
  14. package/dist/elements/Screen/FloatingHeader.d.ts +6 -0
  15. package/dist/elements/Screen/FloatingHeader.js +14 -0
  16. package/dist/elements/Screen/FullWidthDivider.d.ts +3 -0
  17. package/dist/elements/Screen/FullWidthDivider.js +10 -0
  18. package/dist/elements/Screen/FullWidthItem.d.ts +3 -0
  19. package/dist/elements/Screen/FullWidthItem.js +10 -0
  20. package/dist/elements/Screen/Header.d.ts +14 -0
  21. package/dist/elements/Screen/Header.js +38 -0
  22. package/dist/elements/Screen/ScreenBase.d.ts +4 -0
  23. package/dist/elements/Screen/ScreenBase.js +14 -0
  24. package/dist/elements/Screen/constants.d.ts +12 -0
  25. package/dist/elements/Screen/constants.js +14 -0
  26. package/dist/elements/Screen/index.d.ts +14 -1
  27. package/dist/elements/Screen/index.js +18 -15
  28. package/dist/elements/Skeleton/Skeleton.js +3 -1
  29. package/dist/elements/index.d.ts +1 -0
  30. package/dist/elements/index.js +1 -0
  31. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ # v11.0.24 (Thu May 04 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - feat(screen): Add screen component from energy [#98](https://github.com/artsy/palette-mobile/pull/98) ([@damassi](https://github.com/damassi))
6
+
7
+ #### Authors: 1
8
+
9
+ - Christopher Pappas ([@damassi](https://github.com/damassi))
10
+
11
+ ---
12
+
13
+ # v11.0.23 (Thu May 04 2023)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - fix: no more implicit returns in reanimated hooks [#97](https://github.com/artsy/palette-mobile/pull/97) ([@brainbicycle](https://github.com/brainbicycle))
18
+
19
+ #### Authors: 1
20
+
21
+ - Brian Beckerle ([@brainbicycle](https://github.com/brainbicycle))
22
+
23
+ ---
24
+
1
25
  # v11.0.22 (Wed May 03 2023)
2
26
 
3
27
  :tada: This release contains work from a new contributor! :tada:
@@ -45,8 +45,12 @@ const Button = ({ children, disabled: disabledProp, haptic, icon, iconPosition =
45
45
  const [loading, setLoading, loadingV] = useStateWithProp(!!loadingProp);
46
46
  const [pressed, setPressed, pressedV] = useStateWithProp(!!testOnly_pressed);
47
47
  const pressAnimationProgress = (0, react_native_reanimated_1.useSharedValue)(0);
48
- (0, react_native_reanimated_1.useAnimatedReaction)(() => pressedV.value, (pressedVal) => {
49
- pressAnimationProgress.value = (0, react_native_reanimated_1.withTiming)(pressedVal, { duration: ANIMATION_DURATION });
48
+ (0, react_native_reanimated_1.useAnimatedReaction)(() => {
49
+ return pressedV.value;
50
+ }, (pressedVal) => {
51
+ return (pressAnimationProgress.value = (0, react_native_reanimated_1.withTiming)(pressedVal, {
52
+ duration: ANIMATION_DURATION,
53
+ }));
50
54
  });
51
55
  const textStyle = (0, Text_1.useTextStyleForPalette)(size === "small" ? "xs" : "sm");
52
56
  const [longestTextMeasurements, setLongestTextMeasurements] = (0, react_1.useState)({
@@ -7,7 +7,7 @@ interface RawHeaderProps {
7
7
  children: ReactNode;
8
8
  nosafe?: boolean;
9
9
  }
10
- interface BodyProps extends Partial<Pick<FlexProps, "backgroundColor">> {
10
+ interface LegacyBodyProps extends Partial<Pick<FlexProps, "backgroundColor">> {
11
11
  children?: ReactNode;
12
12
  scroll?: boolean;
13
13
  nosafe?: boolean;
@@ -15,10 +15,10 @@ interface BodyProps extends Partial<Pick<FlexProps, "backgroundColor">> {
15
15
  noBottomSafe?: boolean;
16
16
  fullwidth?: boolean;
17
17
  }
18
- export declare const Screen: (({ children }: {
18
+ export declare const LegacyScreen: (({ children }: {
19
19
  children?: ReactNode;
20
20
  }) => JSX.Element) & {
21
- Body: ({ scroll, nosafe, noTopSafe, noBottomSafe, fullwidth, children, ...restFlexProps }: BodyProps) => JSX.Element;
21
+ Body: ({ scroll, nosafe, noTopSafe, noBottomSafe, fullwidth, children, ...restFlexProps }: LegacyBodyProps) => JSX.Element;
22
22
  Header: ({ onBack }: HeaderProps) => JSX.Element;
23
23
  FloatingHeader: FC<HeaderProps>;
24
24
  RawHeader: ({ children, nosafe }: RawHeaderProps) => JSX.Element;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Screen = void 0;
6
+ exports.LegacyScreen = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("react");
9
9
  const react_nanny_1 = require("react-nanny");
@@ -36,18 +36,20 @@ const ScreenWrapper = ({ children }) => {
36
36
  }, children: (0, jsx_runtime_1.jsx)(ScreenRoot, { children: children }) }));
37
37
  };
38
38
  const ScreenRoot = ({ children }) => {
39
- const header = (0, react_nanny_1.getChildByType)(children, exports.Screen.Header);
40
- const headerFloating = (0, react_nanny_1.getChildByType)(children, exports.Screen.FloatingHeader);
41
- const rawHeader = (0, react_nanny_1.getChildByType)(children, exports.Screen.RawHeader);
42
- const background = (0, react_nanny_1.getChildByType)(children, exports.Screen.Background);
43
- const bodyChildren = (0, react_nanny_1.getChildrenByTypeDeep)(children, exports.Screen.Body);
39
+ const header = (0, react_nanny_1.getChildByType)(children, exports.LegacyScreen.Header);
40
+ const headerFloating = (0, react_nanny_1.getChildByType)(children, exports.LegacyScreen.FloatingHeader);
41
+ const rawHeader = (0, react_nanny_1.getChildByType)(children, exports.LegacyScreen.RawHeader);
42
+ const background = (0, react_nanny_1.getChildByType)(children, exports.LegacyScreen.Background);
43
+ const bodyChildren = (0, react_nanny_1.getChildrenByTypeDeep)(children, exports.LegacyScreen.Body);
44
44
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flex: 1, backgroundColor: "background", children: [background /* fullscreen */, header, rawHeader, bodyChildren, headerFloating /* floating, so keep close to the bottom */] }));
45
45
  };
46
46
  const useUpdateScreenContext = ({ header, }) => {
47
47
  const { setOptions } = useScreenContext();
48
48
  (0, react_1.useEffect)(() => void setOptions({
49
49
  handleTopSafeArea: header === "none" || header === "floating" || header === "raw-safe",
50
- }), [header]);
50
+ }),
51
+ // eslint-disable-next-line react-hooks/exhaustive-deps
52
+ [header]);
51
53
  };
52
54
  const NAVBAR_HEIGHT = 44;
53
55
  const Header = ({ onBack }) => {
@@ -76,8 +78,8 @@ const RawHeader = ({ children, nosafe = false }) => {
76
78
  };
77
79
  const SCREEN_HORIZONTAL_PADDING = 2;
78
80
  const Body = ({ scroll = false, nosafe = false, noTopSafe = false, noBottomSafe = false, fullwidth = false, children, ...restFlexProps }) => {
79
- const childrenExceptBottomView = (0, react_nanny_1.removeChildrenByType)(children, exports.Screen.BottomView);
80
- const bottomView = (0, react_nanny_1.getChildrenByType)(children, exports.Screen.BottomView);
81
+ const childrenExceptBottomView = (0, react_nanny_1.removeChildrenByType)(children, exports.LegacyScreen.BottomView);
82
+ const bottomView = (0, react_nanny_1.getChildrenByType)(children, exports.LegacyScreen.BottomView);
81
83
  const { options } = useScreenContext();
82
84
  const insets = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
83
85
  const withTopSafeArea = options.handleTopSafeArea && !noTopSafe;
@@ -136,7 +138,7 @@ const SafeBottomPadding = () => {
136
138
  }
137
139
  return (0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { y: 2 });
138
140
  };
139
- exports.Screen = Object.assign(ScreenWrapper, {
141
+ exports.LegacyScreen = Object.assign(ScreenWrapper, {
140
142
  Body,
141
143
  Header,
142
144
  FloatingHeader,
@@ -0,0 +1 @@
1
+ export * from "./LegacyScreen";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./LegacyScreen"), exports);
@@ -34,7 +34,9 @@ const ProgressBar = ({ animationDuration = 200, backgroundColor = "black30", hei
34
34
  const color = (0, useColor_1.useColor)();
35
35
  const width = (0, react_native_reanimated_1.useSharedValue)("0%");
36
36
  const progress = clamp(unclampedProgress, 0, 100);
37
- const progressAnim = (0, react_native_reanimated_1.useAnimatedStyle)(() => ({ width: width.value }));
37
+ const progressAnim = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
38
+ return { width: width.value };
39
+ });
38
40
  const [onCompletionCalled, setOnCompletionCalled] = (0, react_1.useState)(false);
39
41
  (0, react_1.useEffect)(() => {
40
42
  width.value = (0, react_native_reanimated_1.withTiming)(`${progress}%`, { duration: animationDuration });
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const Background: React.FC<{
3
+ children: React.ReactNode;
4
+ }>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Background = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Flex_1 = require("../Flex");
6
+ const Background = ({ children }) => ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { position: "absolute", top: 0, bottom: 0, left: 0, right: 0, children: children }));
7
+ exports.Background = Background;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { FlexProps } from "../Flex";
3
+ export interface BodyProps extends FlexProps {
4
+ fullwidth?: boolean;
5
+ safeArea?: boolean;
6
+ scroll?: boolean;
7
+ }
8
+ export declare const Body: React.FC<BodyProps>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Body = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_native_1 = require("react-native");
6
+ const react_native_safe_area_context_1 = require("react-native-safe-area-context");
7
+ const constants_1 = require("./constants");
8
+ const Flex_1 = require("../Flex");
9
+ const Body = ({ children, fullwidth, safeArea = true, scroll, ...flexProps }) => {
10
+ const insets = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
11
+ return ((0, jsx_runtime_1.jsx)(react_native_1.KeyboardAvoidingView, { style: { flex: 1 }, behavior: react_native_1.Platform.OS === "ios" ? "padding" : "height", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flex: 1, mt: `${insets.top}px`, pb: safeArea ? `${insets.bottom}px` : undefined, ...flexProps, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flex: 1, px: fullwidth ? undefined : constants_1.SCREEN_HORIZONTAL_PADDING, children: scroll ? (0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { children: children }) : children }) }) }));
12
+ };
13
+ exports.Body = Body;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface BottomViewProps {
3
+ children: React.ReactNode;
4
+ darkMode?: boolean;
5
+ }
6
+ export declare const BottomView: React.FC<BottomViewProps>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BottomView = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_native_linear_gradient_1 = __importDefault(require("react-native-linear-gradient"));
9
+ const constants_1 = require("./constants");
10
+ const useColor_1 = require("../../utils/hooks/useColor");
11
+ const Flex_1 = require("../Flex");
12
+ const BottomView = ({ children, darkMode }) => {
13
+ const color = (0, useColor_1.useColor)();
14
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_native_linear_gradient_1.default, { colors: [darkMode ? "rgba(0,0,0,0)" : "rgba(255,255,255,0)", color("background")], start: { x: 0, y: 0 }, end: { x: 0, y: 1 }, style: {
15
+ width: "100%",
16
+ height: 20,
17
+ }, pointerEvents: "none" }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { px: constants_1.SCREEN_HORIZONTAL_PADDING, pt: 1, pb: 1, backgroundColor: "background", children: children })] }));
18
+ };
19
+ exports.BottomView = BottomView;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface FloatingHeaderProps {
3
+ onBack?: () => void;
4
+ rightElements?: React.ReactNode;
5
+ }
6
+ export declare const FloatingHeader: ({ onBack, rightElements }: FloatingHeaderProps) => JSX.Element;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FloatingHeader = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_native_safe_area_context_1 = require("react-native-safe-area-context");
6
+ const constants_1 = require("./constants");
7
+ const BackButton_1 = require("../BackButton");
8
+ const Flex_1 = require("../Flex");
9
+ const Spacer_1 = require("../Spacer");
10
+ const FloatingHeader = ({ onBack, rightElements }) => {
11
+ const insets = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
12
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { position: "absolute", pointerEvents: "box-none", top: insets.top, left: 0, right: 0, zIndex: constants_1.ZINDEX.floatingHeader, height: constants_1.NAVBAR_HEIGHT, px: 1, flexDirection: "row", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(BackButton_1.BackButtonWithBackground, { onPress: onBack }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flex: 1 }), rightElements && ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { x: 1 }), rightElements] }))] }));
13
+ };
14
+ exports.FloatingHeader = FloatingHeader;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { FlexProps } from "../Flex";
3
+ export declare const FullWidthDivider: React.FC<FlexProps>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FullWidthDivider = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Screen_1 = require("../Screen");
6
+ const Separator_1 = require("../Separator");
7
+ const FullWidthDivider = (flexProps) => {
8
+ return ((0, jsx_runtime_1.jsx)(Screen_1.Screen.FullWidthItem, { children: (0, jsx_runtime_1.jsx)(Separator_1.Separator, { my: 2, ...flexProps }) }));
9
+ };
10
+ exports.FullWidthDivider = FullWidthDivider;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { FlexProps } from "../Flex";
3
+ export declare const FullWidthItem: React.FC<FlexProps>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FullWidthItem = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const constants_1 = require("./constants");
6
+ const Flex_1 = require("../Flex");
7
+ const FullWidthItem = (props) => {
8
+ return (0, jsx_runtime_1.jsx)(Flex_1.Flex, { ...props, mx: -constants_1.SCREEN_HORIZONTAL_PADDING });
9
+ };
10
+ exports.FullWidthItem = FullWidthItem;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ export interface HeaderProps {
3
+ animated?: boolean;
4
+ hideLeftElements?: boolean;
5
+ hideRightElements?: boolean;
6
+ hideTitle?: boolean;
7
+ leftElements?: React.ReactNode;
8
+ onBack?: () => void;
9
+ rightElements?: React.ReactNode;
10
+ scrollY?: number;
11
+ title?: string;
12
+ titleShown?: boolean;
13
+ }
14
+ export declare const Header: React.FC<HeaderProps>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Header = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_native_device_info_1 = require("react-native-device-info");
6
+ const react_native_safe_area_context_1 = require("react-native-safe-area-context");
7
+ const constants_1 = require("./constants");
8
+ const constants_2 = require("../../constants");
9
+ const ArrowLeftIcon_1 = require("../../svgs/ArrowLeftIcon");
10
+ const Flex_1 = require("../Flex");
11
+ const Spacer_1 = require("../Spacer");
12
+ const Text_1 = require("../Text");
13
+ const Touchable_1 = require("../Touchable");
14
+ const Header = ({ hideLeftElements, hideRightElements, hideTitle, leftElements, onBack, rightElements, title, }) => {
15
+ const insets = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
16
+ const Left = () => {
17
+ if (hideLeftElements) {
18
+ return null;
19
+ }
20
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [leftElements ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: leftElements })) : (
21
+ // If no left elements passed, show back button
22
+ (0, jsx_runtime_1.jsx)(Touchable_1.Touchable, { onPress: onBack, underlayColor: "transparent", hitSlop: constants_2.DEFAULT_HIT_SLOP, children: (0, jsx_runtime_1.jsx)(ArrowLeftIcon_1.ArrowLeftIcon, { fill: "onBackgroundHigh", marginLeft: "-4px", top: "1px" }) })), (0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { x: 1 })] }));
23
+ };
24
+ const Center = () => {
25
+ if (hideTitle) {
26
+ return null;
27
+ }
28
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { width: (0, react_native_device_info_1.isTablet)() ? "100%" : "70%", flex: 1, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "md", numberOfLines: 1, children: title }) }));
29
+ };
30
+ const Right = () => {
31
+ if (hideRightElements) {
32
+ return null;
33
+ }
34
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { x: 1 }), rightElements] }));
35
+ };
36
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { height: constants_1.NAVBAR_HEIGHT, flexDirection: "row", px: 2, top: insets.top, zIndex: constants_1.ZINDEX.header, backgroundColor: "background", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(Left, {}), (0, jsx_runtime_1.jsx)(Center, {}), (0, jsx_runtime_1.jsx)(Right, {})] }));
37
+ };
38
+ exports.Header = Header;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const ScreenBase: React.FC<{
3
+ children: React.ReactNode;
4
+ }>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScreenBase = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_native_safe_area_context_1 = require("react-native-safe-area-context");
6
+ const Flex_1 = require("../Flex");
7
+ const ScreenBase = ({ children }) => {
8
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flex: 1, backgroundColor: "background", children: [children, (0, jsx_runtime_1.jsx)(SafeAreaCover, {})] }));
9
+ };
10
+ exports.ScreenBase = ScreenBase;
11
+ const SafeAreaCover = () => {
12
+ const insets = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
13
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { position: "absolute", left: 0, right: 0, top: 0, height: insets.top, backgroundColor: "background" }));
14
+ };
@@ -0,0 +1,12 @@
1
+ import { SpacingUnitDSValueNumber } from "../../types";
2
+ export declare const LARGE_TITLE_HEIGHT = 64;
3
+ export declare const NAVBAR_HEIGHT = 44;
4
+ export declare const SCREEN_HORIZONTAL_PADDING: SpacingUnitDSValueNumber;
5
+ export declare const SCREEN_TRANSITION_TIME = 400;
6
+ export declare const ZINDEX: {
7
+ artworkContent: number;
8
+ bottomSheetModalView: number;
9
+ floatingHeader: number;
10
+ header: number;
11
+ selectMode: number;
12
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZINDEX = exports.SCREEN_TRANSITION_TIME = exports.SCREEN_HORIZONTAL_PADDING = exports.NAVBAR_HEIGHT = exports.LARGE_TITLE_HEIGHT = void 0;
4
+ exports.LARGE_TITLE_HEIGHT = 64;
5
+ exports.NAVBAR_HEIGHT = 44;
6
+ exports.SCREEN_HORIZONTAL_PADDING = 2;
7
+ exports.SCREEN_TRANSITION_TIME = 400;
8
+ exports.ZINDEX = {
9
+ artworkContent: 10,
10
+ bottomSheetModalView: 1,
11
+ floatingHeader: 2,
12
+ header: 1,
13
+ selectMode: 1,
14
+ };
@@ -1 +1,14 @@
1
- export * from "./Screen";
1
+ /// <reference types="react" />
2
+ export declare const Screen: import("react").FC<{
3
+ children: import("react").ReactNode;
4
+ }> & {
5
+ Background: import("react").FC<{
6
+ children: import("react").ReactNode;
7
+ }>;
8
+ Body: import("react").FC<import("./Body").BodyProps>;
9
+ BottomView: import("react").FC<import("./BottomView").BottomViewProps>;
10
+ FloatingHeader: ({ onBack, rightElements }: import("./FloatingHeader").FloatingHeaderProps) => JSX.Element;
11
+ FullWidthDivider: import("react").FC<import("..").BoxProps>;
12
+ FullWidthItem: import("react").FC<import("..").BoxProps>;
13
+ Header: import("react").FC<import("./Header").HeaderProps>;
14
+ };
@@ -1,17 +1,20 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Screen"), exports);
3
+ exports.Screen = void 0;
4
+ const Background_1 = require("./Background");
5
+ const Body_1 = require("./Body");
6
+ const BottomView_1 = require("./BottomView");
7
+ const FloatingHeader_1 = require("./FloatingHeader");
8
+ const FullWidthDivider_1 = require("./FullWidthDivider");
9
+ const FullWidthItem_1 = require("./FullWidthItem");
10
+ const Header_1 = require("./Header");
11
+ const ScreenBase_1 = require("./ScreenBase");
12
+ exports.Screen = Object.assign(ScreenBase_1.ScreenBase, {
13
+ Background: Background_1.Background,
14
+ Body: Body_1.Body,
15
+ BottomView: BottomView_1.BottomView,
16
+ FloatingHeader: FloatingHeader_1.FloatingHeader,
17
+ FullWidthDivider: FullWidthDivider_1.FullWidthDivider,
18
+ FullWidthItem: FullWidthItem_1.FullWidthItem,
19
+ Header: Header_1.Header,
20
+ });
@@ -42,7 +42,9 @@ const Text_1 = require("../Text");
42
42
  const Skeleton = ({ children }) => {
43
43
  const opacity = (0, react_native_reanimated_1.useSharedValue)(0.5);
44
44
  opacity.value = (0, react_native_reanimated_1.withRepeat)((0, react_native_reanimated_1.withTiming)(1, { duration: 1000, easing: react_native_reanimated_1.Easing.ease }), -1, true);
45
- const fadeLoopAnim = (0, react_native_reanimated_1.useAnimatedStyle)(() => ({ opacity: opacity.value }), []);
45
+ const fadeLoopAnim = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
46
+ return { opacity: opacity.value };
47
+ }, []);
46
48
  return (0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { style: fadeLoopAnim, children: children });
47
49
  };
48
50
  exports.Skeleton = Skeleton;
@@ -17,6 +17,7 @@ export * from "./Header";
17
17
  export * from "./Histogram";
18
18
  export * from "./Input";
19
19
  export * from "./Join";
20
+ export * from "./LegacyScreen";
20
21
  export * from "./List";
21
22
  export * from "./Message";
22
23
  export * from "./MeasuredView";
@@ -33,6 +33,7 @@ __exportStar(require("./Header"), exports);
33
33
  __exportStar(require("./Histogram"), exports);
34
34
  __exportStar(require("./Input"), exports);
35
35
  __exportStar(require("./Join"), exports);
36
+ __exportStar(require("./LegacyScreen"), exports);
36
37
  __exportStar(require("./List"), exports);
37
38
  __exportStar(require("./Message"), exports);
38
39
  __exportStar(require("./MeasuredView"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "11.0.22",
3
+ "version": "11.0.24",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "scripts": {
6
6
  "android": "react-native run-android",
@@ -108,6 +108,7 @@
108
108
  "react": "18.2.0",
109
109
  "react-dom": "18.2.0",
110
110
  "react-native": "0.70.8",
111
+ "react-native-device-info": "10.3.0",
111
112
  "react-native-flipper": "0.178.1",
112
113
  "react-native-haptic-feedback": "1.14.0",
113
114
  "react-native-linear-gradient": "2.6.2",