@artsy/palette-mobile 13.1.28 → 13.1.30

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.
@@ -4,6 +4,9 @@ exports.Collapse = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_native_1 = require("react-native");
6
6
  const Collapse = ({ opened, children }) => {
7
- return (0, jsx_runtime_1.jsx)(react_native_1.View, { style: { display: opened ? undefined : "none" }, children: children });
7
+ if (!opened) {
8
+ return null;
9
+ }
10
+ return (0, jsx_runtime_1.jsx)(react_native_1.View, { children: children });
8
11
  };
9
12
  exports.Collapse = Collapse;
@@ -15,19 +15,19 @@ const Flex_1 = require("../Flex");
15
15
  const Touchable_1 = require("../Touchable");
16
16
  const Popover = ({ variant = "dark", children, visible, onPressOutside, onDismiss, onCloseComplete, placement = "top", title, content, noCloseIcon, }) => {
17
17
  const style = exports.POPOVER_VARIANTS[variant];
18
- return ((0, jsx_runtime_1.jsx)(react_native_popover_view_1.default, { backgroundStyle: { opacity: 0.5, backgroundColor: palette_tokens_1.THEME.colors["black100"] }, popoverStyle: [{ backgroundColor: style.backgroundColor }, style.shadow], from: children, isVisible: visible,
18
+ return ((0, jsx_runtime_1.jsx)(react_native_popover_view_1.default, { backgroundStyle: { opacity: 0.5, backgroundColor: palette_tokens_1.THEME.colors.black100 }, popoverStyle: [{ backgroundColor: style.backgroundColor }, style.shadow], from: children, isVisible: visible,
19
19
  // this is required to make sure that the popover is positioned correctly on android
20
20
  verticalOffset: react_native_1.Platform.OS === "android" ? -(react_native_1.StatusBar.currentHeight ?? 0) : 0, onCloseComplete: onCloseComplete, onRequestClose: onPressOutside, placement: placement, arrowSize: { height: 11, width: 22 }, animationConfig: {
21
21
  duration: 400,
22
22
  easing: react_native_reanimated_1.Easing.out(react_native_reanimated_1.Easing.exp),
23
- }, children: (0, jsx_runtime_1.jsxs)(Container, { variant: variant, p: 1, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", justifyContent: "space-between", alignItems: "center", children: [title ? title : (0, jsx_runtime_1.jsx)(Flex_1.Flex, {}), !noCloseIcon && ((0, jsx_runtime_1.jsx)(Touchable_1.Touchable, { onPress: onDismiss, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { ml: 0.5, children: (0, jsx_runtime_1.jsx)(svgs_1.CloseIcon, { width: 18, height: 18, fill: style.fill }) }) }))] }), content] }) }));
23
+ }, children: (0, jsx_runtime_1.jsxs)(Container, { variant: variant, p: 1, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", justifyContent: "space-between", alignItems: "center", children: [title ? title : (0, jsx_runtime_1.jsx)(Flex_1.Flex, {}), !noCloseIcon && ((0, jsx_runtime_1.jsx)(Touchable_1.Touchable, { onPress: onDismiss, accessibilityRole: "button", "aria-label": "Dismiss popover", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { ml: 0.5, children: (0, jsx_runtime_1.jsx)(svgs_1.CloseIcon, { width: 18, height: 18, fill: style.fill }) }) }))] }), content] }) }));
24
24
  };
25
25
  exports.Popover = Popover;
26
26
  const Container = (0, styled_components_1.default)(Flex_1.Flex) `
27
27
  background-color: ${({ variant }) => exports.POPOVER_VARIANTS[variant].backgroundColor};
28
28
  `;
29
29
  const DROP_SHADOW = {
30
- shadowColor: palette_tokens_1.THEME.colors["black100"],
30
+ shadowColor: palette_tokens_1.THEME.colors.black100,
31
31
  shadowOffset: {
32
32
  width: 0,
33
33
  height: 2,
@@ -38,12 +38,12 @@ const DROP_SHADOW = {
38
38
  };
39
39
  exports.POPOVER_VARIANTS = {
40
40
  light: {
41
- backgroundColor: palette_tokens_1.THEME.colors["white100"],
41
+ backgroundColor: palette_tokens_1.THEME.colors.white100,
42
42
  fill: "black100",
43
43
  shadow: DROP_SHADOW,
44
44
  },
45
45
  dark: {
46
- backgroundColor: palette_tokens_1.THEME.colors["black100"],
46
+ backgroundColor: palette_tokens_1.THEME.colors.black100,
47
47
  fill: "white100",
48
48
  },
49
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "13.1.28",
3
+ "version": "13.1.30",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "scripts": {
6
6
  "android": "RCT_METRO_PORT=8082 react-native run-android --port 8082",