@artsy/palette-mobile 13.2.11 → 13.2.13

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,6 +7,7 @@ export interface BackButtonProps {
7
7
  onPress?: () => void;
8
8
  showX?: boolean;
9
9
  style?: TouchableOpacityProps["style"];
10
+ iconSize?: number;
10
11
  }
11
12
  export declare const BackButton: React.FC<BackButtonProps>;
12
13
  export declare const BackButtonWithBackground: React.FC<BackButtonProps>;
@@ -6,8 +6,8 @@ const react_native_1 = require("react-native");
6
6
  const constants_1 = require("../../constants");
7
7
  const svgs_1 = require("../../svgs");
8
8
  const Flex_1 = require("../Flex");
9
- const BackButton = ({ color = "onBackgroundHigh", hitSlop = constants_1.DEFAULT_HIT_SLOP, onPress, showX = false, style, }) => {
10
- return ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { onPress: onPress, hitSlop: hitSlop, accessibilityRole: "button", accessibilityLabel: showX ? "Close" : "Go back", accessibilityHint: showX ? "Dismiss this screen" : "Go back to the previous screen", style: style, children: showX ? ((0, jsx_runtime_1.jsx)(svgs_1.CloseIcon, { fill: color, width: 26, height: 26 })) : ((0, jsx_runtime_1.jsx)(svgs_1.ChevronIcon, { direction: "left", fill: color })) }));
9
+ const BackButton = ({ color = "onBackgroundHigh", hitSlop = constants_1.DEFAULT_HIT_SLOP, onPress, showX = false, style, iconSize = 18, }) => {
10
+ return ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { onPress: onPress, hitSlop: hitSlop, accessibilityRole: "button", accessibilityLabel: showX ? "Close" : "Go back", accessibilityHint: showX ? "Dismiss this screen" : "Go back to the previous screen", style: style, children: showX ? ((0, jsx_runtime_1.jsx)(svgs_1.CloseIcon, { fill: color, width: iconSize, height: iconSize })) : ((0, jsx_runtime_1.jsx)(svgs_1.ChevronIcon, { direction: "left", fill: color, height: iconSize, width: iconSize })) }));
11
11
  };
12
12
  exports.BackButton = BackButton;
13
13
  const BackButtonWithBackground = ({ color = "onBackgroundHigh", hitSlop = constants_1.DEFAULT_HIT_SLOP, onPress, showX = false, style, }) => {
@@ -9,5 +9,6 @@ export interface ProgressBarProps {
9
9
  progress: number;
10
10
  trackColor?: Color;
11
11
  style?: ViewStyle;
12
+ progressBarStyle?: ViewStyle;
12
13
  }
13
- export declare const ProgressBar: ({ animationDuration, backgroundColor, height, onCompletion, progress: unclampedProgress, trackColor, style, }: ProgressBarProps) => JSX.Element;
14
+ export declare const ProgressBar: ({ animationDuration, backgroundColor, height, onCompletion, progress: unclampedProgress, trackColor, style, progressBarStyle, }: ProgressBarProps) => JSX.Element;
@@ -31,7 +31,7 @@ const hooks_1 = require("../../utils/hooks");
31
31
  const useColor_1 = require("../../utils/hooks/useColor");
32
32
  const Flex_1 = require("../Flex");
33
33
  const clamp = (num, min, max) => Math.max(min, Math.min(num, max));
34
- const ProgressBar = ({ animationDuration = 200, backgroundColor = "black30", height = 2, onCompletion, progress: unclampedProgress, trackColor = "blue100", style, }) => {
34
+ const ProgressBar = ({ animationDuration = 200, backgroundColor = "black30", height = 2, onCompletion, progress: unclampedProgress, trackColor = "blue100", style, progressBarStyle, }) => {
35
35
  const color = (0, useColor_1.useColor)();
36
36
  const space = (0, hooks_1.useSpace)();
37
37
  const width = (0, react_native_reanimated_1.useSharedValue)(0);
@@ -51,6 +51,6 @@ const ProgressBar = ({ animationDuration = 200, backgroundColor = "black30", hei
51
51
  marginVertical: space(1),
52
52
  width: "100%",
53
53
  ...style,
54
- }, children: (0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { testID: "progress-bar-track", style: [progressAnim, { height, backgroundColor: color(trackColor) }] }) }));
54
+ }, children: (0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { testID: "progress-bar-track", style: [progressAnim, { height, backgroundColor: color(trackColor) }, progressBarStyle] }) }));
55
55
  };
56
56
  exports.ProgressBar = ProgressBar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "13.2.11",
3
+ "version": "13.2.13",
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",