@artsy/palette-mobile 13.0.32 → 13.0.34

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.
@@ -7,3 +7,8 @@ export declare const DEFAULT_HIT_SLOP: {
7
7
  left: number;
8
8
  right: number;
9
9
  };
10
+ /**
11
+ * Default active opacity for elements that use Palette's <Touchable />
12
+ */
13
+ export declare let DEFAULT_ACTIVE_OPACITY: number;
14
+ export declare const setGlobalActiveOpacity: (opacity: number) => void;
package/dist/constants.js CHANGED
@@ -1,7 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_HIT_SLOP = void 0;
3
+ exports.setGlobalActiveOpacity = exports.DEFAULT_ACTIVE_OPACITY = exports.DEFAULT_HIT_SLOP = void 0;
4
4
  /**
5
5
  * Touch area box for UI elements
6
6
  */
7
7
  exports.DEFAULT_HIT_SLOP = { top: 20, bottom: 20, left: 20, right: 20 };
8
+ /**
9
+ * Default active opacity for elements that use Palette's <Touchable />
10
+ */
11
+ exports.DEFAULT_ACTIVE_OPACITY = 0.8;
12
+ // Set things globally
13
+ const setGlobalActiveOpacity = (opacity) => {
14
+ exports.DEFAULT_ACTIVE_OPACITY = opacity;
15
+ };
16
+ exports.setGlobalActiveOpacity = setGlobalActiveOpacity;
@@ -9,4 +9,4 @@ export interface BorderBoxProps extends FlexProps, BorderProps, SpaceProps<Spaci
9
9
  * A `View` or `div` (depending on the platform) that has a common border
10
10
  * and padding set by default
11
11
  */
12
- export declare const BorderBox: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").BoxProps & import("react").RefAttributes<import("react-native").View>>, any, BorderBoxProps, never>;
12
+ export declare const BorderBox: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").BoxProps & import("react").RefAttributes<import("react-native/types").View>>, any, BorderBoxProps, never>;
@@ -1,3 +1,3 @@
1
1
  export declare const useListenForScreenScroll: () => {
2
- scrollHandler: (event: import("react-native").NativeSyntheticEvent<import("react-native").NativeScrollEvent>) => void;
2
+ scrollHandler: (event: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeScrollEvent>) => void;
3
3
  };
@@ -16,10 +16,10 @@ export declare const Screen: import("react").FC<import("./ScreenBase").ScreenBas
16
16
  ScreenScrollContextProvider: import("react").FC<{
17
17
  children?: import("react").ReactNode;
18
18
  }>;
19
- ScrollView: import("react").FC<import("react-native").ScrollViewProps>;
19
+ ScrollView: import("react").FC<import("react-native/types").ScrollViewProps>;
20
20
  StickySubHeader: import("react").FC<import("./StickySubHeader").StickySubHeaderProps>;
21
21
  useListenForScreenScroll: () => {
22
- scrollHandler: (event: import("react-native").NativeSyntheticEvent<import("react-native").NativeScrollEvent>) => void;
22
+ scrollHandler: (event: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeScrollEvent>) => void;
23
23
  };
24
24
  useScreenScrollContext: () => import("./ScreenScrollContext").ScreenScrollContextProps;
25
25
  };
@@ -5,4 +5,4 @@ export interface SeparatorProps extends SpaceProps, WidthProps, BorderProps {
5
5
  /**
6
6
  * A horizontal divider whose width and spacing can be adjusted
7
7
  */
8
- export declare const Separator: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, SeparatorProps, never>;
8
+ export declare const Separator: import("styled-components").StyledComponent<typeof import("react-native/types").View, import("styled-components").DefaultTheme, SeparatorProps, never>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  declare const _default: {
3
3
  title: string;
4
- component: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, import("./Separator").SeparatorProps, never>;
4
+ component: import("styled-components").StyledComponent<typeof import("react-native/types").View, import("styled-components").DefaultTheme, import("./Separator").SeparatorProps, never>;
5
5
  };
6
6
  export default _default;
7
7
  export declare const Styled: () => JSX.Element;
@@ -1 +1 @@
1
- export declare const ShadowSeparator: import("styled-components").StyledComponent<typeof import("react-native").View, any, import("./Separator").SeparatorProps, never>;
1
+ export declare const ShadowSeparator: import("styled-components").StyledComponent<typeof import("react-native/types").View, any, import("./Separator").SeparatorProps, never>;
@@ -11,9 +11,9 @@ export declare const Tabs: import("react").FC<import("./TabsContainer").TabsCont
11
11
  startMounted?: boolean | undefined;
12
12
  children: import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
13
13
  }>;
14
- ScrollView: import("react").FC<import("react-native").ScrollViewProps>;
15
- SectionList: <T_1>(p: import("react-native").SectionListProps<T_1, import("react-native").DefaultSectionT> & {
16
- ref?: ((instance: import("react-native").SectionList<T_1, import("react-native").DefaultSectionT> | null) => void) | import("react").RefObject<import("react-native").SectionList<T_1, import("react-native").DefaultSectionT>> | null | undefined;
14
+ ScrollView: import("react").FC<import("react-native/types").ScrollViewProps>;
15
+ SectionList: <T_1>(p: import("react-native/types").SectionListProps<T_1, import("react-native/types").DefaultSectionT> & {
16
+ ref?: ((instance: import("react-native/types").SectionList<T_1, import("react-native/types").DefaultSectionT> | null) => void) | import("react").RefObject<import("react-native/types").SectionList<T_1, import("react-native/types").DefaultSectionT>> | null | undefined;
17
17
  }) => import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
18
18
  SubTabBar: import("react").FC<{
19
19
  children?: import("react").ReactNode;
@@ -8,6 +8,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = __importDefault(require("react"));
9
9
  const react_native_1 = require("react-native");
10
10
  const react_native_haptic_feedback_1 = __importDefault(require("react-native-haptic-feedback"));
11
+ const constants_1 = require("../../constants");
11
12
  const useColor_1 = require("../../utils/hooks/useColor");
12
13
  const Flex_1 = require("../Flex");
13
14
  /**
@@ -28,6 +29,6 @@ const Touchable = ({ children, flex, haptic, noFeedback, onPress, underlayColor,
28
29
  }
29
30
  onPress(evt);
30
31
  };
31
- return noFeedback ? ((0, jsx_runtime_1.jsx)(react_native_1.TouchableWithoutFeedback, { ...props, onPress: onPressWrapped, children: inner })) : ((0, jsx_runtime_1.jsx)(react_native_1.TouchableHighlight, { underlayColor: underlayColor ?? "transparent", activeOpacity: 0.8, ...props, onPress: onPressWrapped, children: inner }));
32
+ return noFeedback ? ((0, jsx_runtime_1.jsx)(react_native_1.TouchableWithoutFeedback, { ...props, onPress: onPressWrapped, children: inner })) : ((0, jsx_runtime_1.jsx)(react_native_1.TouchableHighlight, { underlayColor: underlayColor ?? "transparent", activeOpacity: constants_1.DEFAULT_ACTIVE_OPACITY, ...props, onPress: onPressWrapped, children: inner }));
32
33
  };
33
34
  exports.Touchable = Touchable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "13.0.32",
3
+ "version": "13.0.34",
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",
@@ -124,7 +124,7 @@
124
124
  "react-native-linear-gradient": "2.6.2",
125
125
  "react-native-reanimated": "^3.3.0",
126
126
  "react-native-safe-area-context": "4.5.0",
127
- "react-native-svg": "13.7.0",
127
+ "react-native-svg": "14.1.0",
128
128
  "react-test-renderer": "18.2.0",
129
129
  "rimraf": "4.1.2",
130
130
  "rn-flipper-async-storage-advanced": "1.0.4",