@artsy/palette-mobile 13.2.13 → 13.2.15

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.
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { TextVariant } from "@artsy/palette-tokens/dist/typography/v3";
2
3
  import { Insets, TouchableWithoutFeedbackProps } from "react-native";
3
4
  import { FlexProps } from "../Flex";
4
5
  export interface RadioButtonProps extends Omit<TouchableWithoutFeedbackProps, "hitSlop">, Omit<FlexProps, "hitSlop"> {
@@ -8,6 +9,7 @@ export interface RadioButtonProps extends Omit<TouchableWithoutFeedbackProps, "h
8
9
  disabled?: boolean;
9
10
  error?: boolean;
10
11
  text?: React.ReactElement | string;
12
+ textVariant?: TextVariant;
11
13
  subtitle?: React.ReactElement | string;
12
14
  accessibilityState?: {
13
15
  checked: boolean;
@@ -14,7 +14,7 @@ const Flex_1 = require("../Flex");
14
14
  const Text_1 = require("../Text");
15
15
  const RADIOBUTTON_SIZE = 20;
16
16
  const DURATION = 150;
17
- const RadioButton = ({ selected, disabled, error, onPress, text, subtitle, accessibilityState, ...restProps }) => {
17
+ const RadioButton = ({ selected, disabled, error, onPress, text, textVariant = "md", subtitle, accessibilityState, ...restProps }) => {
18
18
  const { color, space } = (0, useTheme_1.useTheme)();
19
19
  const fontScale = react_native_1.PixelRatio.getFontScale();
20
20
  const radioButtonSize = RADIOBUTTON_SIZE * fontScale;
@@ -55,7 +55,7 @@ const RadioButton = ({ selected, disabled, error, onPress, text, subtitle, acces
55
55
  { marginRight: space(1) * fontScale },
56
56
  radioButtonStyle,
57
57
  ], animate: ["borderColor"], duration: DURATION, children: !!selected &&
58
- (!!disabled ? ((0, jsx_runtime_1.jsx)(exports.DisabledDot, { size: radioButtonSize })) : ((0, jsx_runtime_1.jsx)(exports.RadioDot, { size: radioButtonSize }))) }) }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { justifyContent: "center", children: !!text && ((0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "md", color: textColor, children: text })) })] }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { ml: `${(RADIOBUTTON_SIZE + space(1)) * fontScale}px`, mt: "6px", children: !!subtitle && ((0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", color: subtitleColor, children: subtitle })) })] }) }));
58
+ (!!disabled ? ((0, jsx_runtime_1.jsx)(exports.DisabledDot, { size: radioButtonSize })) : ((0, jsx_runtime_1.jsx)(exports.RadioDot, { size: radioButtonSize }))) }) }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { justifyContent: "center", children: !!text && ((0, jsx_runtime_1.jsx)(Text_1.Text, { variant: textVariant, color: textColor, children: text })) })] }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { ml: `${(RADIOBUTTON_SIZE + space(1)) * fontScale}px`, mt: "6px", children: !!subtitle && ((0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", color: subtitleColor, children: subtitle })) })] }) }));
59
59
  };
60
60
  exports.RadioButton = RadioButton;
61
61
  // styled-component does not have support for Animated.View
package/dist/tokens.d.ts CHANGED
@@ -40,9 +40,11 @@ export declare const COLOR_LAYER_NAME: {
40
40
  black10: string;
41
41
  black5: string;
42
42
  white100: string;
43
+ blue200: string;
43
44
  blue150: string;
44
45
  blue100: string;
45
46
  brand: string;
47
+ blue15: string;
46
48
  blue10: string;
47
49
  green150: string;
48
50
  green100: string;
package/dist/types.d.ts CHANGED
@@ -13,4 +13,4 @@ export type ColorCSS = string & {};
13
13
  export type ColorDSValue = ColorLayerName | ColorLayerRole;
14
14
  export type Color = ColorLayerName | ColorLayerRole | ColorCSS;
15
15
  export declare const isRoleLayer: (name: Color) => name is "background" | "onBackground" | "onBackgroundHigh" | "onBackgroundMedium" | "onBackgroundLow" | "surface" | "onSurface" | "onSurfaceHigh" | "onSurfaceMedium" | "onSurfaceLow" | "primary" | "onPrimaryHigh" | "onPrimaryMedium" | "onPrimaryLow" | "secondary" | "onSecondaryHigh" | "onSecondaryMedium" | "onSecondaryLow" | "brand" | "onBrand";
16
- export declare const isNameLayer: (name: Color) => name is "brand" | "devpurple" | "black100" | "black60" | "black30" | "black15" | "black10" | "black5" | "white100" | "blue150" | "blue100" | "blue10" | "green150" | "green100" | "green10" | "yellow150" | "yellow100" | "yellow10" | "orange150" | "orange100" | "orange10" | "red150" | "red100" | "red10";
16
+ export declare const isNameLayer: (name: Color) => name is "brand" | "devpurple" | "black100" | "black60" | "black30" | "black15" | "black10" | "black5" | "white100" | "blue200" | "blue150" | "blue100" | "blue15" | "blue10" | "green150" | "green100" | "green10" | "yellow150" | "yellow100" | "yellow10" | "orange150" | "orange100" | "orange10" | "red150" | "red100" | "red10";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "13.2.13",
3
+ "version": "13.2.15",
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",
@@ -33,7 +33,7 @@
33
33
  "FOR DEPS NEEDED FOR THE STORYBOOK APP, ADD THEM AS DEV DEPS BELOW."
34
34
  ],
35
35
  "dependencies": {
36
- "@artsy/palette-tokens": "^5.0.0",
36
+ "@artsy/palette-tokens": "^6.0.3",
37
37
  "@shopify/flash-list": "^1.6.4",
38
38
  "@styled-system/core": "^5.1.2",
39
39
  "@styled-system/theme-get": "^5.1.2",