@artsy/palette-mobile 11.0.5 → 11.0.6
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.
|
@@ -36,8 +36,8 @@ const Avatar = ({ src, initials, size = DEFAULT_SIZE }) => {
|
|
|
36
36
|
borderRadius: diameter / 2,
|
|
37
37
|
borderColor: color("white100"),
|
|
38
38
|
borderWidth: 1,
|
|
39
|
-
}, source: { uri: src } }));
|
|
39
|
+
}, source: { uri: src }, accessibilityLabel: "AvatarImage" }));
|
|
40
40
|
}
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { width: diameter, height: diameter, borderColor: "black10", borderWidth: 1, borderRadius: diameter, overflow: "hidden", alignItems: "center", justifyContent: "center", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: textSize, children: initials }) }));
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { width: diameter, height: diameter, borderColor: "black10", borderWidth: 1, borderRadius: diameter, overflow: "hidden", alignItems: "center", justifyContent: "center", accessibilityLabel: "Avatar", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: textSize, children: initials }) }));
|
|
42
42
|
};
|
|
43
43
|
exports.Avatar = Avatar;
|
|
@@ -35,7 +35,7 @@ const Flex_1 = require("../Flex");
|
|
|
35
35
|
const Text_1 = require("../Text");
|
|
36
36
|
const CHECKBOX_SIZEx1 = 20;
|
|
37
37
|
const ANIMATION_DURATION = 250;
|
|
38
|
-
const Checkbox = ({ checked: checkedProp, disabled = false, error = false, onPress, text, subtitle, ...flexProps }) => {
|
|
38
|
+
const Checkbox = ({ children, checked: checkedProp, disabled = false, error = false, onPress, text, subtitle, ...flexProps }) => {
|
|
39
39
|
const { color, space } = (0, useTheme_1.useTheme)();
|
|
40
40
|
const fontScale = react_native_1.PixelRatio.getFontScale();
|
|
41
41
|
const checkboxSize = CHECKBOX_SIZEx1 * fontScale;
|
|
@@ -87,7 +87,7 @@ const Checkbox = ({ checked: checkedProp, disabled = false, error = false, onPre
|
|
|
87
87
|
borderWidth: 1,
|
|
88
88
|
},
|
|
89
89
|
toggleAnim,
|
|
90
|
-
], children: checked && (0, jsx_runtime_1.jsx)(Checkmark, { size: checkboxSize }) }), (0, jsx_runtime_1.
|
|
90
|
+
], children: checked && (0, jsx_runtime_1.jsx)(Checkmark, { size: checkboxSize }) }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { ml: 1, flex: 1, children: [text !== undefined && ((0, jsx_runtime_1.jsxs)(AnimatedText, { variant: "sm-display", color: textColor, numberOfLines: 2, underline: displayState === "pressed", style: pressAnim, children: [text, " ", displayState] })), children] })] }), subtitle !== undefined && ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { ml: `${(checkboxSize + space(1)) * fontScale}px`, mt: 0.5, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", color: subtitleColor, children: subtitle }) }))] }) }) }));
|
|
91
91
|
};
|
|
92
92
|
exports.Checkbox = Checkbox;
|
|
93
93
|
const AnimatedText = react_native_reanimated_1.default.createAnimatedComponent(Text_1.Text);
|