@artsy/palette-mobile 13.0.19 → 13.0.20

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v13.0.20 (Tue Nov 14 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - feat(checkbox): expose custom accessibilityProps to the View wrapping the icon [#164](https://github.com/artsy/palette-mobile/pull/164) ([@araujobarret](https://github.com/araujobarret))
6
+
7
+ #### Authors: 1
8
+
9
+ - Carlos ([@araujobarret](https://github.com/araujobarret))
10
+
11
+ ---
12
+
1
13
  # v13.0.19 (Fri Oct 13 2023)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { TouchableWithoutFeedbackProps } from "react-native";
2
+ import { AccessibilityProps, TouchableWithoutFeedbackProps } from "react-native";
3
3
  import { FlexProps } from "../Flex";
4
4
  export interface CheckboxProps extends TouchableWithoutFeedbackProps, FlexProps {
5
5
  checked?: boolean;
@@ -8,6 +8,7 @@ export interface CheckboxProps extends TouchableWithoutFeedbackProps, FlexProps
8
8
  text?: React.ReactElement | string;
9
9
  subtitle?: React.ReactElement | string;
10
10
  children?: React.ReactElement | string;
11
+ checkboxAccessibilityProps?: AccessibilityProps;
11
12
  }
12
13
  export declare const Checkbox: React.FC<CheckboxProps>;
13
14
  interface CheckMarkProps {
@@ -16,7 +16,7 @@ const Flex_1 = require("../Flex");
16
16
  const Text_1 = require("../Text");
17
17
  const CHECKBOX_SIZE = 20;
18
18
  const DURATION = 250;
19
- const Checkbox = ({ checked: checkedProp, disabled, error, onPress, text, subtitle, children, ...restProps }) => {
19
+ const Checkbox = ({ checked: checkedProp, disabled, error, onPress, text, subtitle, children, checkboxAccessibilityProps, ...restProps }) => {
20
20
  const { color, space } = (0, useTheme_1.useTheme)();
21
21
  const fontScale = react_native_1.PixelRatio.getFontScale();
22
22
  const checkboxSize = CHECKBOX_SIZE * fontScale;
@@ -55,7 +55,7 @@ const Checkbox = ({ checked: checkedProp, disabled, error, onPress, text, subtit
55
55
  }
56
56
  setChecked(!checked);
57
57
  onPress?.(event);
58
- }, children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flex: 1, ...restProps, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { mt: "2px", children: (0, jsx_runtime_1.jsx)(CssTransition_1.CssTransition, { style: [
58
+ }, children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flex: 1, ...restProps, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { mt: "2px", ...checkboxAccessibilityProps, children: (0, jsx_runtime_1.jsx)(CssTransition_1.CssTransition, { style: [
59
59
  styles(fontScale).container,
60
60
  text || subtitle || children ? { marginRight: space(1) * fontScale } : {},
61
61
  checkboxStyle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "13.0.19",
3
+ "version": "13.0.20",
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",