@artsy/palette-mobile 14.0.43 → 14.0.45--canary.331.3541.0
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/dist/elements/Avatar/Avatar.js +2 -2
- package/dist/elements/Banner/Banner.js +7 -7
- package/dist/elements/Banner/Banner.stories.js +1 -1
- package/dist/elements/BorderBox/BorderBox.js +1 -1
- package/dist/elements/Box/Box.stories.js +2 -2
- package/dist/elements/Button/Button.js +50 -50
- package/dist/elements/Button/FollowButton.js +1 -1
- package/dist/elements/Button/colors.js +27 -27
- package/dist/elements/ButtonNew/Button.js +1 -1
- package/dist/elements/ButtonNew/Button.stories.js +2 -2
- package/dist/elements/ButtonNew/FollowButton.js +1 -1
- package/dist/elements/ButtonNew/colors.js +27 -27
- package/dist/elements/Checkbox/Check.js +12 -12
- package/dist/elements/Checkbox/Checkbox.js +12 -12
- package/dist/elements/Chip/Chip.js +3 -3
- package/dist/elements/CollapsibleMenuItem/CollapsibleMenuItem.js +1 -1
- package/dist/elements/Dialog/Dialog.js +3 -3
- package/dist/elements/EntityHeader/EntityHeader.js +3 -3
- package/dist/elements/Histogram/Histogram.js +1 -1
- package/dist/elements/Image/Image.js +2 -2
- package/dist/elements/Input/Input.js +10 -10
- package/dist/elements/Input/helpers.js +19 -19
- package/dist/elements/LegacyScreen/LegacyScreen.js +2 -2
- package/dist/elements/LegacyTabs/StepTabs.js +1 -1
- package/dist/elements/LegacyTabs/Tab.js +1 -1
- package/dist/elements/LegacyTabs/TabBarContainer.js +2 -2
- package/dist/elements/List/BulletedItem.js +1 -1
- package/dist/elements/List/List.stories.js +1 -1
- package/dist/elements/MenuItem/MenuItem.js +2 -2
- package/dist/elements/Message/Message.js +17 -17
- package/dist/elements/Pill/Pill.js +19 -19
- package/dist/elements/Popover/Popover.js +6 -6
- package/dist/elements/Popover/Popover.stories.js +3 -3
- package/dist/elements/ProgressBar/ProgressBar.js +1 -1
- package/dist/elements/Radio/RadioButton.js +11 -11
- package/dist/elements/Radio/RadioDot.js +7 -7
- package/dist/elements/Screen/Screen.stories.js +5 -5
- package/dist/elements/Screen/StickySubHeader.js +2 -2
- package/dist/elements/SearchInput/RoundSearchInput.js +4 -4
- package/dist/elements/SearchInput/SearchInput.js +1 -1
- package/dist/elements/SimpleMessage/SimpleMessage.js +2 -2
- package/dist/elements/Skeleton/Skeleton.js +2 -2
- package/dist/elements/Spinner/Spinner.js +1 -1
- package/dist/elements/Switch/Switch.js +5 -5
- package/dist/elements/Switch/Switch.stories.js +1 -1
- package/dist/elements/Tabs/TabsContainer.js +1 -1
- package/dist/elements/Text/LinkText.js +1 -1
- package/dist/elements/ToolTip/ToolTipFlyout.js +3 -3
- package/dist/elements/Touchable/TouchableHighlightColor.js +1 -1
- package/dist/elements/VisualClue/VisualClue.stories.js +1 -1
- package/dist/svgs/AddCircleFillIcon.js +1 -1
- package/dist/svgs/AddCircleIcon.js +1 -1
- package/dist/svgs/AddIcon.js +1 -1
- package/dist/svgs/AlertCircleFillIcon.js +1 -1
- package/dist/svgs/AlertIcon.js +1 -1
- package/dist/svgs/AppleIcon.js +1 -1
- package/dist/svgs/ArrowBackIcon.js +2 -2
- package/dist/svgs/ArrowCircleFillIcons.js +1 -1
- package/dist/svgs/ArrowDownCircleIcon.js +1 -1
- package/dist/svgs/ArrowDownIcon.js +1 -1
- package/dist/svgs/ArrowLeftCircleIcon.js +1 -1
- package/dist/svgs/ArrowLeftIcon.js +1 -1
- package/dist/svgs/ArrowRightCircleIcon.js +1 -1
- package/dist/svgs/ArrowRightIcon.js +1 -1
- package/dist/svgs/ArrowUpCircleIcon.js +1 -1
- package/dist/svgs/ArrowUpIcon.js +1 -1
- package/dist/svgs/ArrowUpRightIcon.js +1 -1
- package/dist/svgs/ArtsyLogoBlackIcon.js +1 -1
- package/dist/svgs/ArtsyLogoWhiteIcon.js +1 -1
- package/dist/svgs/ArtsyMarkBlackIcon.js +1 -1
- package/dist/svgs/ArtsyMarkWhiteIcon.js +1 -1
- package/dist/svgs/ArtworkIcon.js +1 -1
- package/dist/svgs/AuctionIcon.js +1 -1
- package/dist/svgs/BellFillIcon.js +1 -1
- package/dist/svgs/BellIcon.js +1 -1
- package/dist/svgs/BlueChipIcon.js +1 -1
- package/dist/svgs/BoltCircleFill.js +2 -2
- package/dist/svgs/BoltFill.js +1 -1
- package/dist/svgs/BookmarkFill.js +1 -1
- package/dist/svgs/BriefcaseIcon.js +1 -1
- package/dist/svgs/CertificateIcon.js +1 -1
- package/dist/svgs/CheckCircleFillIcon.js +1 -1
- package/dist/svgs/CheckCircleIcon.js +1 -1
- package/dist/svgs/CheckIcon.js +1 -1
- package/dist/svgs/ClockFill.js +1 -1
- package/dist/svgs/CloseCircleFillIcon.js +1 -1
- package/dist/svgs/CloseCircleIcon.js +1 -1
- package/dist/svgs/CloseIcon.js +1 -1
- package/dist/svgs/CollapseIcon.js +1 -1
- package/dist/svgs/CreditCardIcon.js +1 -1
- package/dist/svgs/DecreaseIcon.js +1 -1
- package/dist/svgs/DocumentIcon.js +1 -1
- package/dist/svgs/DownloadIcon.js +1 -1
- package/dist/svgs/EditIcon.js +1 -1
- package/dist/svgs/EmptyCheckCircleIcon.js +1 -1
- package/dist/svgs/EnterIcon.js +1 -1
- package/dist/svgs/EnvelopeIcon.js +1 -1
- package/dist/svgs/EstablishedIcon.js +1 -1
- package/dist/svgs/ExclamationMarkCircleFill.js +1 -1
- package/dist/svgs/ExpandIcon.js +1 -1
- package/dist/svgs/EyeClosedIcon.js +1 -1
- package/dist/svgs/EyeOpenedIcon.js +1 -1
- package/dist/svgs/FacebookIcon.js +1 -1
- package/dist/svgs/FairIcon.js +1 -1
- package/dist/svgs/FilterIcon.js +1 -1
- package/dist/svgs/FireIcon.js +1 -1
- package/dist/svgs/FollowArtistFillIcon.js +1 -1
- package/dist/svgs/FollowArtistIcon.js +1 -1
- package/dist/svgs/FullWidthIcon.js +1 -1
- package/dist/svgs/GenomeIcon.js +1 -1
- package/dist/svgs/GraphIcon.js +1 -1
- package/dist/svgs/GridIcon.js +1 -1
- package/dist/svgs/GuaranteeIcon.js +1 -1
- package/dist/svgs/HeartFillIcon.js +1 -1
- package/dist/svgs/HeartIcon.js +1 -1
- package/dist/svgs/HideIcon.js +1 -1
- package/dist/svgs/HomeIcon.js +1 -1
- package/dist/svgs/ImageIcon.js +1 -1
- package/dist/svgs/ImageSetIcon.js +1 -1
- package/dist/svgs/IncreaseIcon.js +1 -1
- package/dist/svgs/InfoCircleIcon.js +1 -1
- package/dist/svgs/InstagramAppIcon.js +1 -1
- package/dist/svgs/InstitutionIcon.js +1 -1
- package/dist/svgs/LinkIcon.js +1 -1
- package/dist/svgs/LoaderIcon.js +1 -1
- package/dist/svgs/LockIcon.js +1 -1
- package/dist/svgs/LogoutIcon.js +1 -1
- package/dist/svgs/MagnifyingGlassIcon.js +1 -1
- package/dist/svgs/MapPinIcon.js +1 -1
- package/dist/svgs/MenuIcon.js +1 -1
- package/dist/svgs/MessageIcon.js +1 -1
- package/dist/svgs/MessagesAppIcon.js +1 -1
- package/dist/svgs/MoneyCircleIcon.js +1 -1
- package/dist/svgs/MoneyFillIcon.js +1 -1
- package/dist/svgs/MoreIcon.js +1 -1
- package/dist/svgs/MultiplePersonsIcon.js +1 -1
- package/dist/svgs/NewFillHeartIcon.js +1 -1
- package/dist/svgs/NewHeartIcon.js +1 -1
- package/dist/svgs/NoArtworkIcon.js +1 -1
- package/dist/svgs/NoImageIcon.js +1 -1
- package/dist/svgs/PageIcon.js +1 -1
- package/dist/svgs/Payment2Icon.js +1 -1
- package/dist/svgs/PaymentIcon.js +1 -1
- package/dist/svgs/PersonIcon.js +1 -1
- package/dist/svgs/PublicationIcon.js +1 -1
- package/dist/svgs/QuestionCircleIcon.js +1 -1
- package/dist/svgs/ReloadIcon.js +1 -1
- package/dist/svgs/SecureLockIcon.js +1 -1
- package/dist/svgs/SettingsIcon.js +1 -1
- package/dist/svgs/ShareIcon.js +1 -1
- package/dist/svgs/ShieldFilledIcon.js +1 -1
- package/dist/svgs/ShieldIcon.js +1 -1
- package/dist/svgs/SortIcon.js +1 -1
- package/dist/svgs/StarCircleFill.js +2 -2
- package/dist/svgs/StarCircleIcon.js +1 -1
- package/dist/svgs/Stopwatch.js +1 -1
- package/dist/svgs/Tag2Icon.js +1 -1
- package/dist/svgs/TagIcon.js +1 -1
- package/dist/svgs/TimerIcon.js +1 -1
- package/dist/svgs/TopEmergingIcon.js +1 -1
- package/dist/svgs/TrashIcon.js +1 -1
- package/dist/svgs/TrendingIcon.js +1 -1
- package/dist/svgs/TriangleDown.js +1 -1
- package/dist/svgs/TwitterIcon.js +1 -1
- package/dist/svgs/UserMultiIcon.js +1 -1
- package/dist/svgs/UserSingleIcon.js +1 -1
- package/dist/svgs/VerifiedIcon.js +1 -1
- package/dist/svgs/VerifiedPersonIcon.js +1 -1
- package/dist/svgs/WhatsAppAppIcon.js +1 -1
- package/dist/svgs/WorldGlobeCircleIcon.js +1 -1
- package/dist/svgs/XCircleIcon.js +1 -1
- package/dist/tokens.d.ts +7 -7
- package/dist/tokens.js +36 -36
- package/dist/types.d.ts +1 -1
- package/dist/utils/colors.stories.js +1 -1
- package/package.json +4 -4
|
@@ -17,16 +17,16 @@ export const Checkbox = ({ checked: checkedProp, disabled, error, onPress, text,
|
|
|
17
17
|
const [checked, setChecked] = useState(checkedProp);
|
|
18
18
|
const isChecked = checkedProp ?? checked;
|
|
19
19
|
const defaultCheckboxStyle = {
|
|
20
|
-
backgroundColor: color("
|
|
21
|
-
borderColor: color("
|
|
20
|
+
backgroundColor: color("mono0"),
|
|
21
|
+
borderColor: color("mono60"),
|
|
22
22
|
};
|
|
23
23
|
const checkedCheckboxStyle = {
|
|
24
|
-
backgroundColor: color("
|
|
25
|
-
borderColor: color("
|
|
24
|
+
backgroundColor: color("mono100"),
|
|
25
|
+
borderColor: color("mono100"),
|
|
26
26
|
};
|
|
27
27
|
const disabledCheckboxStyle = {
|
|
28
|
-
backgroundColor: color("
|
|
29
|
-
borderColor: color("
|
|
28
|
+
backgroundColor: color("mono5"),
|
|
29
|
+
borderColor: color("mono10"),
|
|
30
30
|
};
|
|
31
31
|
const checkboxStyles = {
|
|
32
32
|
default: {
|
|
@@ -34,15 +34,15 @@ export const Checkbox = ({ checked: checkedProp, disabled, error, onPress, text,
|
|
|
34
34
|
checked: checkedCheckboxStyle,
|
|
35
35
|
},
|
|
36
36
|
error: {
|
|
37
|
-
unchecked: { backgroundColor: color("
|
|
37
|
+
unchecked: { backgroundColor: color("mono0"), borderColor: color("red100") },
|
|
38
38
|
checked: checkedCheckboxStyle,
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
41
|
const checkboxStyle = disabled
|
|
42
42
|
? disabledCheckboxStyle
|
|
43
43
|
: checkboxStyles[error ? "error" : "default"][isChecked ? "checked" : "unchecked"];
|
|
44
|
-
const textColor = error ? color("red100") : disabled ? color("
|
|
45
|
-
const subtitleColor = error ? color("red100") : disabled ? color("
|
|
44
|
+
const textColor = error ? color("red100") : disabled ? color("mono30") : color("mono100");
|
|
45
|
+
const subtitleColor = error ? color("red100") : disabled ? color("mono30") : color("mono60");
|
|
46
46
|
return (_jsx(TouchableWithoutFeedback, { onPress: (event) => {
|
|
47
47
|
if (disabled) {
|
|
48
48
|
return;
|
|
@@ -70,8 +70,8 @@ const styles = (fontScale) => StyleSheet.create({
|
|
|
70
70
|
});
|
|
71
71
|
// This component represents the √ mark in CSS. We are not using styled-system since it's easier to specify raw CSS
|
|
72
72
|
// properties with styled-component.
|
|
73
|
-
export const CheckMark = ({ size }) => (_jsx(Box, { style: { transform: [{ rotate: "-45deg" }] }, top: "-12%", width: size * 0.625, height: size * 0.3125, borderBottomWidth: "2px", borderBottomColor: "
|
|
73
|
+
export const CheckMark = ({ size }) => (_jsx(Box, { style: { transform: [{ rotate: "-45deg" }] }, top: "-12%", width: size * 0.625, height: size * 0.3125, borderBottomWidth: "2px", borderBottomColor: "mono0", borderLeftWidth: "2px", borderLeftColor: "mono0" }));
|
|
74
74
|
export const DisabledMark = styled(CheckMark) `
|
|
75
|
-
border-bottom-color: ${themeGet("colors.
|
|
76
|
-
border-left-color: ${themeGet("colors.
|
|
75
|
+
border-bottom-color: ${themeGet("colors.mono30")};
|
|
76
|
+
border-left-color: ${themeGet("colors.mono30")};
|
|
77
77
|
`;
|
|
@@ -9,8 +9,8 @@ export const Chip = ({ image, title, subtitle, onPress }) => {
|
|
|
9
9
|
const color = useColor();
|
|
10
10
|
const space = useSpace();
|
|
11
11
|
const animatedState = useAnimationState({
|
|
12
|
-
from: { backgroundColor: color("
|
|
13
|
-
to: { backgroundColor: color("
|
|
12
|
+
from: { backgroundColor: color("mono10") },
|
|
13
|
+
to: { backgroundColor: color("mono5") },
|
|
14
14
|
});
|
|
15
15
|
const handleOnPressIn = () => {
|
|
16
16
|
animatedState.transitionTo("from");
|
|
@@ -22,5 +22,5 @@ export const Chip = ({ image, title, subtitle, onPress }) => {
|
|
|
22
22
|
flex: 1,
|
|
23
23
|
padding: space(1),
|
|
24
24
|
justifyContent: "center",
|
|
25
|
-
}, children: [!!subtitle && (_jsx(Text, { variant: "xs", color: "
|
|
25
|
+
}, children: [!!subtitle && (_jsx(Text, { variant: "xs", color: "mono60", selectable: false, children: subtitle })), _jsx(Text, { variant: "sm-display", selectable: false, children: title })] })] }) }));
|
|
26
26
|
};
|
|
@@ -39,5 +39,5 @@ export const CollapsibleMenuItem = forwardRef(({ children, overtitle, title, isE
|
|
|
39
39
|
return (_jsxs(Flex, { ref: componentRef, collapsable: false, children: [_jsxs(Touchable, { onPress: () => {
|
|
40
40
|
setIsOpen(!isOpen);
|
|
41
41
|
isOpen ? onCollapse?.() : onExpand?.();
|
|
42
|
-
}, disabled: disabled, children: [!!overtitle && (_jsx(Text, { variant: "sm", color: disabled ? "
|
|
42
|
+
}, disabled: disabled, children: [!!overtitle && (_jsx(Text, { variant: "sm", color: disabled ? "mono30" : "mono100", children: overtitle })), _jsxs(Flex, { flexDirection: "row", justifyContent: "space-between", alignItems: "center", children: [_jsx(Text, { variant: "lg", color: disabled ? "mono30" : "mono100", style: { maxWidth: "90%" }, children: title }), _jsxs(Flex, { flexDirection: "row", alignItems: "center", children: [!!isCompleted && (_jsx(CheckCircleIcon, { fill: "green100", height: 24, width: 24, style: { marginRight: 5 } })), _jsx(ChevronIcon, { direction: isOpen ? "up" : "down", fill: disabled ? "mono30" : "mono60" })] })] })] }), _jsx(Collapse, { opened: isOpen, children: children })] }));
|
|
43
43
|
});
|
|
@@ -54,9 +54,9 @@ export const Dialog = (props) => {
|
|
|
54
54
|
width: "100%",
|
|
55
55
|
maxHeight: "100%",
|
|
56
56
|
opacity: value,
|
|
57
|
-
backgroundColor: color("
|
|
57
|
+
backgroundColor: color("mono0"),
|
|
58
58
|
borderWidth: 1,
|
|
59
|
-
borderColor: color("
|
|
59
|
+
borderColor: color("mono5"),
|
|
60
60
|
shadowColor: "rgba(0, 0, 0, 0.06)",
|
|
61
61
|
shadowOffset: {
|
|
62
62
|
height: 2,
|
|
@@ -64,5 +64,5 @@ export const Dialog = (props) => {
|
|
|
64
64
|
},
|
|
65
65
|
shadowOpacity: 1,
|
|
66
66
|
shadowRadius: 10,
|
|
67
|
-
}, children: [_jsx(Text, { testID: "dialog-title", variant: "sm-display", mb: 0.5, mt: 2, mx: 2, children: title }), !!detail && (_jsx(ScrollView, { alwaysBounceVertical: false, contentContainerStyle: { paddingHorizontal: space(2) }, children: _jsx(Text, { testID: "dialog-detail", variant: "sm", color: "
|
|
67
|
+
}, children: [_jsx(Text, { testID: "dialog-title", variant: "sm-display", mb: 0.5, mt: 2, mx: 2, children: title }), !!detail && (_jsx(ScrollView, { alwaysBounceVertical: false, contentContainerStyle: { paddingHorizontal: space(2) }, children: _jsx(Text, { testID: "dialog-detail", variant: "sm", color: "mono60", children: detail }) })), _jsxs(Flex, { mt: 2, mb: 2, mx: 2, flexDirection: "row", justifyContent: "flex-end", children: [!!secondaryCta && (_jsx(Button, { size: "small", testID: "dialog-secondary-action-button", variant: "text", onPress: secondaryCta.onPress, children: secondaryCta.text })), _jsx(Button, { size: "small", variant: "fillDark", testID: "dialog-primary-action-button", ml: 2, onPress: primaryCta.onPress, children: primaryCta.text })] })] }) })] }));
|
|
68
68
|
};
|
|
@@ -8,15 +8,15 @@ import { Flex } from "../Flex";
|
|
|
8
8
|
import { Text } from "../Text";
|
|
9
9
|
export const EntityHeader = ({ avatarSize = "xs", FollowButton, RightButton, imageUrl, initials, meta, name, smallVariant = false, displayPrivateIcon, theme = "light", ...restProps }) => {
|
|
10
10
|
const rightButton = (RightButton || FollowButton) && (_jsx(Flex, { ml: smallVariant ? 0.5 : 1, flexDirection: "row", alignItems: "center", justifyContent: "flex-end", children: RightButton || FollowButton }));
|
|
11
|
-
const headerName = (_jsxs(Flex, { flexDirection: "row", alignItems: "center", children: [_jsx(RNText, { ellipsizeMode: "tail", numberOfLines: 1, children: _jsx(Text, { color: theme === "light" ? "
|
|
11
|
+
const headerName = (_jsxs(Flex, { flexDirection: "row", alignItems: "center", children: [_jsx(RNText, { ellipsizeMode: "tail", numberOfLines: 1, children: _jsx(Text, { color: theme === "light" ? "mono100" : "mono0", variant: "sm", lineHeight: "18px", style: { flexShrink: 1 }, children: name }) }), displayPrivateIcon && (_jsx(LockIcon, { ml: "2px", width: 16, height: 16, testID: "lock-icon", fill: theme === "light" ? "mono100" : "mono0" }))] }));
|
|
12
12
|
const headerMeta = useMemo(() => {
|
|
13
13
|
if (meta) {
|
|
14
14
|
if (isValidElement(meta)) {
|
|
15
15
|
return meta;
|
|
16
16
|
}
|
|
17
|
-
return (_jsx(Text, { ellipsizeMode: "tail", numberOfLines: 1, variant: "xs", color: theme === "light" ? "
|
|
17
|
+
return (_jsx(Text, { ellipsizeMode: "tail", numberOfLines: 1, variant: "xs", color: theme === "light" ? "mono60" : "mono0", style: { flexShrink: 1 }, children: meta }));
|
|
18
18
|
}
|
|
19
19
|
return null;
|
|
20
20
|
}, [meta, theme]);
|
|
21
|
-
return (_jsxs(Flex, { flexDirection: "row", flexWrap: "nowrap", ...restProps, children: [!!(imageUrl || initials) && (_jsx(Flex, { mr: 1, justifyContent: "center", children: _jsx(Avatar, { size: avatarSize, src: imageUrl, initials: initials, color: theme === "light" ? "
|
|
21
|
+
return (_jsxs(Flex, { flexDirection: "row", flexWrap: "nowrap", ...restProps, children: [!!(imageUrl || initials) && (_jsx(Flex, { mr: 1, justifyContent: "center", children: _jsx(Avatar, { size: avatarSize, src: imageUrl, initials: initials, color: theme === "light" ? "mono100" : "mono0" }) })), smallVariant ? (_jsxs(Flex, { flexDirection: "row", justifyContent: "flex-start", flexGrow: 1, alignItems: "center", children: [headerName, _jsx(Text, { variant: "sm", ml: "0.5", color: theme === "light" ? "mono100" : "mono0", children: bullet }), rightButton] })) : (_jsxs(Flex, { justifyContent: "space-between", width: 0, flexGrow: 1, flexDirection: "row", children: [_jsxs(Flex, { alignSelf: "center", flexShrink: 1, children: [headerName, headerMeta] }), rightButton] }))] }));
|
|
22
22
|
};
|
|
@@ -18,6 +18,6 @@ export const Histogram = ({ bars, selectedRange }) => {
|
|
|
18
18
|
return (_jsx(Flex, { height: 110, flexDirection: "row", justifyContent: "space-between", alignItems: "flex-end", children: bars.map((entity, index) => {
|
|
19
19
|
const percent = getPercentByEntity(maxValue, entity.count);
|
|
20
20
|
const selected = isSelected(entity.value, min, max);
|
|
21
|
-
return (_jsx(Box, { height: `${percent}%`, bg: selected ? "blue100" : "
|
|
21
|
+
return (_jsx(Box, { height: `${percent}%`, bg: selected ? "blue100" : "mono15", width: BAR_WIDTH, borderTopLeftRadius: BAR_ROUNDNESS, borderTopRightRadius: BAR_ROUNDNESS }, `bar-${index}`));
|
|
22
22
|
}) }));
|
|
23
23
|
};
|
|
@@ -41,7 +41,7 @@ export const Image = memo(({ aspectRatio, width, height, performResize = true, s
|
|
|
41
41
|
style,
|
|
42
42
|
// If we have a blurhash, we don't want to show a background color
|
|
43
43
|
// That might flash before the image loads
|
|
44
|
-
{ backgroundColor: blurhash ? "transparent" : color("
|
|
44
|
+
{ backgroundColor: blurhash ? "transparent" : color("mono30") },
|
|
45
45
|
], resizeMode: resizeMode, onLoadEnd: onAnimationEnd, source: {
|
|
46
46
|
priority: FastImage.priority.normal,
|
|
47
47
|
uri,
|
|
@@ -69,7 +69,7 @@ const useImageDimensions = (props) => {
|
|
|
69
69
|
};
|
|
70
70
|
const ImageSkeleton = ({ dimensions, blurhash }) => {
|
|
71
71
|
if (!!blurhash) {
|
|
72
|
-
return (_jsx(Flex, { position: "absolute", backgroundColor: "
|
|
72
|
+
return (_jsx(Flex, { position: "absolute", backgroundColor: "mono10", ...dimensions, children: _jsx(Blurhash, { blurhash: blurhash, style: { flex: 1 }, decodeWidth: 16, decodeHeight: 16 }) }));
|
|
73
73
|
}
|
|
74
74
|
return (_jsx(Flex, { position: "absolute", children: _jsx(Skeleton, { children: _jsx(SkeletonBox, { ...dimensions }) }) }));
|
|
75
75
|
};
|
|
@@ -203,7 +203,7 @@ export const Input = forwardRef(({ addClearListener = false, defaultValue, disab
|
|
|
203
203
|
...leftComponentSharedStyles,
|
|
204
204
|
justifyContent: "center",
|
|
205
205
|
width: leftComponentWidth,
|
|
206
|
-
}, children: [unit && (_jsx(Text, { color: disabled ? "
|
|
206
|
+
}, children: [unit && (_jsx(Text, { color: disabled ? "mono30" : "mono60", variant: "sm-display", children: unit })), icon] }));
|
|
207
207
|
}
|
|
208
208
|
if (onSelectTap) {
|
|
209
209
|
return (_jsx(TouchableOpacity, { onPress: onSelectTap, style: [
|
|
@@ -222,7 +222,7 @@ export const Input = forwardRef(({ addClearListener = false, defaultValue, disab
|
|
|
222
222
|
justifyContent: "space-between",
|
|
223
223
|
},
|
|
224
224
|
selectComponentStyles,
|
|
225
|
-
], children: [_jsx(Text, { color: disabled ? "
|
|
225
|
+
], children: [_jsx(Text, { color: disabled ? "mono30" : "mono100", children: selectDisplayLabel }), _jsx(TriangleDown, { fill: "mono60", width: 10 })] }) }));
|
|
226
226
|
}
|
|
227
227
|
return null;
|
|
228
228
|
}, [
|
|
@@ -238,17 +238,17 @@ export const Input = forwardRef(({ addClearListener = false, defaultValue, disab
|
|
|
238
238
|
]);
|
|
239
239
|
const renderRightComponent = useCallback(() => {
|
|
240
240
|
if (fixedRightPlaceholder) {
|
|
241
|
-
return (_jsx(Flex, { justifyContent: "center", position: "absolute", right: `${HORIZONTAL_PADDING}px`, top: hasTitle ? LABEL_HEIGHT : 0, height: INPUT_MIN_HEIGHT, ref: rightComponentRef, children: _jsx(Text, { color: disabled ? "
|
|
241
|
+
return (_jsx(Flex, { justifyContent: "center", position: "absolute", right: `${HORIZONTAL_PADDING}px`, top: hasTitle ? LABEL_HEIGHT : 0, height: INPUT_MIN_HEIGHT, ref: rightComponentRef, children: _jsx(Text, { color: disabled ? "mono30" : "mono60", children: fixedRightPlaceholder }) }));
|
|
242
242
|
}
|
|
243
243
|
if (loading) {
|
|
244
244
|
return (_jsx(Flex, { justifyContent: "center", position: "absolute", right: `${HORIZONTAL_PADDING}px`, top: hasTitle ? LABEL_HEIGHT : 0, height: INPUT_MIN_HEIGHT, ref: rightComponentRef, children: _jsx(Spinner, { size: "medium", style: {
|
|
245
245
|
right: 0,
|
|
246
246
|
width: 15,
|
|
247
|
-
backgroundColor: color("
|
|
247
|
+
backgroundColor: color("mono60"),
|
|
248
248
|
} }) }));
|
|
249
249
|
}
|
|
250
250
|
if (enableClearButton && value) {
|
|
251
|
-
return (_jsx(Flex, { justifyContent: "center", position: "absolute", right: `${HORIZONTAL_PADDING}px`, top: hasTitle ? LABEL_HEIGHT : 0, height: INPUT_MIN_HEIGHT, zIndex: 100, ref: rightComponentRef, children: _jsx(Touchable, { haptic: "impactMedium", onPress: handleClear, hitSlop: { bottom: 40, right: 40, left: 0, top: 40 }, accessibilityLabel: "Clear input button", testID: "clear-input-button", children: _jsx(XCircleIcon, { fill: "
|
|
251
|
+
return (_jsx(Flex, { justifyContent: "center", position: "absolute", right: `${HORIZONTAL_PADDING}px`, top: hasTitle ? LABEL_HEIGHT : 0, height: INPUT_MIN_HEIGHT, zIndex: 100, ref: rightComponentRef, children: _jsx(Touchable, { haptic: "impactMedium", onPress: handleClear, hitSlop: { bottom: 40, right: 40, left: 0, top: 40 }, accessibilityLabel: "Clear input button", testID: "clear-input-button", children: _jsx(XCircleIcon, { fill: "mono30" }) }) }));
|
|
252
252
|
}
|
|
253
253
|
if (secureTextEntry) {
|
|
254
254
|
return (_jsx(Flex, { justifyContent: "center", position: "absolute", right: `${HORIZONTAL_PADDING}px`, top: hasTitle ? LABEL_HEIGHT : 0, height: INPUT_MIN_HEIGHT, zIndex: 100, ref: rightComponentRef, children: _jsx(Touchable, { haptic: true, onPress: () => {
|
|
@@ -257,7 +257,7 @@ export const Input = forwardRef(({ addClearListener = false, defaultValue, disab
|
|
|
257
257
|
duration: 200,
|
|
258
258
|
});
|
|
259
259
|
setShowPassword(!showPassword);
|
|
260
|
-
}, accessibilityLabel: showPassword ? "hide password button" : "show password button", hitSlop: { bottom: 40, right: 40, left: 0, top: 40 }, children: !showPassword ? _jsx(EyeClosedIcon, { fill: "
|
|
260
|
+
}, accessibilityLabel: showPassword ? "hide password button" : "show password button", hitSlop: { bottom: 40, right: 40, left: 0, top: 40 }, children: !showPassword ? _jsx(EyeClosedIcon, { fill: "mono30" }) : _jsx(EyeOpenedIcon, { fill: "mono60" }) }) }));
|
|
261
261
|
}
|
|
262
262
|
return null;
|
|
263
263
|
}, [
|
|
@@ -276,9 +276,9 @@ export const Input = forwardRef(({ addClearListener = false, defaultValue, disab
|
|
|
276
276
|
if (!!props.error) {
|
|
277
277
|
return (_jsx(Text, { color: "red100", variant: "xs", px: `${HORIZONTAL_PADDING}px`, mt: 0.5, children: props.error }));
|
|
278
278
|
}
|
|
279
|
-
return (_jsxs(Flex, { flexDirection: "row", justifyContent: "space-between", children: [!!props.required || !!props.optional ? (_jsxs(Text, { color: "
|
|
279
|
+
return (_jsxs(Flex, { flexDirection: "row", justifyContent: "space-between", children: [!!props.required || !!props.optional ? (_jsxs(Text, { color: "mono60", variant: "xs", pl: `${HORIZONTAL_PADDING}px`, mt: 0.5, children: [!!props.required && "* Required", !!props.optional && "* Optional"] })) : (
|
|
280
280
|
// Adding this empty flex to make sure that the maxLength text is always on the right
|
|
281
|
-
_jsx(Flex, {})), !!props.maxLength && !!props.showLimit && (_jsxs(Text, { color: "
|
|
281
|
+
_jsx(Flex, {})), !!props.maxLength && !!props.showLimit && (_jsxs(Text, { color: "mono60", variant: "xs", pr: `${HORIZONTAL_PADDING}px`, mt: 0.5, children: [(value || "").length, " / ", props.maxLength] }))] }));
|
|
282
282
|
}, [props.error, props.maxLength, props.optional, props.required, props.showLimit, value]);
|
|
283
283
|
const renderHint = useCallback(() => {
|
|
284
284
|
if (!props.onHintPress) {
|
|
@@ -292,7 +292,7 @@ export const Input = forwardRef(({ addClearListener = false, defaultValue, disab
|
|
|
292
292
|
right: 10,
|
|
293
293
|
bottom: 5,
|
|
294
294
|
left: 10,
|
|
295
|
-
}, children: _jsx(Text, { underline: true, variant: "xs", color: "
|
|
295
|
+
}, children: _jsx(Text, { underline: true, variant: "xs", color: "mono60", children: hintText }) }) }));
|
|
296
296
|
}, [hintText, props.onHintPress, space]);
|
|
297
297
|
const getPlatformSpecificPlaceholder = useCallback(() => {
|
|
298
298
|
if (!placeholder) {
|
|
@@ -357,7 +357,7 @@ export const Input = forwardRef(({ addClearListener = false, defaultValue, disab
|
|
|
357
357
|
// Only use a controlled input if specified
|
|
358
358
|
, { ...((propValue !== undefined && propValue !== null) || mask ? { value } : {}), onChangeText: handleChangeText, style: [styles, textInputAnimatedStyles], onFocus: handleFocus, onBlur: handleBlur, onLayout: (event) => {
|
|
359
359
|
setInputWidth(event.nativeEvent.layout.width);
|
|
360
|
-
}, scrollEnabled: props.multiline, editable: !disabled, textAlignVertical: props.multiline ? "top" : "center", ref: inputRef, placeholderTextColor: color("
|
|
360
|
+
}, scrollEnabled: props.multiline, editable: !disabled, textAlignVertical: props.multiline ? "top" : "center", ref: inputRef, placeholderTextColor: color("mono60"), placeholder: getPlaceholder(), defaultValue: defaultValue, secureTextEntry: !showPassword, ...props }), renderRightComponent(), renderLeftComponent(), renderBottomComponent()] }));
|
|
361
361
|
});
|
|
362
362
|
const StyledInput = styled(TextInput) `
|
|
363
363
|
padding: ${HORIZONTAL_PADDING}px;
|
|
@@ -5,19 +5,19 @@ const getDefaultVariantStates = (theme) => {
|
|
|
5
5
|
return {
|
|
6
6
|
// Unfocused input with no value
|
|
7
7
|
untouched: {
|
|
8
|
-
inputBorderColor: theme.colors.
|
|
8
|
+
inputBorderColor: theme.colors.mono30,
|
|
9
9
|
labelFontSize: parseInt(THEME.textVariants["sm-display"].fontSize, 10),
|
|
10
|
-
labelColor: theme.colors.
|
|
10
|
+
labelColor: theme.colors.mono60,
|
|
11
11
|
labelTop: EXPANDED_LABEL_TOP,
|
|
12
|
-
inputTextColor: theme.colors.
|
|
12
|
+
inputTextColor: theme.colors.mono100,
|
|
13
13
|
},
|
|
14
14
|
// Unfocused input with value
|
|
15
15
|
touched: {
|
|
16
|
-
inputBorderColor: theme.colors.
|
|
16
|
+
inputBorderColor: theme.colors.mono60,
|
|
17
17
|
labelFontSize: parseInt(THEME.textVariants.xs.fontSize, 10),
|
|
18
|
-
labelColor: theme.colors.
|
|
18
|
+
labelColor: theme.colors.mono60,
|
|
19
19
|
labelTop: SHRINKED_LABEL_TOP,
|
|
20
|
-
inputTextColor: theme.colors.
|
|
20
|
+
inputTextColor: theme.colors.mono100,
|
|
21
21
|
},
|
|
22
22
|
// Focused input with or without value
|
|
23
23
|
focused: {
|
|
@@ -25,7 +25,7 @@ const getDefaultVariantStates = (theme) => {
|
|
|
25
25
|
labelFontSize: parseInt(THEME.textVariants.xs.fontSize, 10),
|
|
26
26
|
labelColor: theme.colors.blue100,
|
|
27
27
|
labelTop: SHRINKED_LABEL_TOP,
|
|
28
|
-
inputTextColor: theme.colors.
|
|
28
|
+
inputTextColor: theme.colors.mono100,
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -37,7 +37,7 @@ const getErrorVariantStates = (theme) => {
|
|
|
37
37
|
labelFontSize: parseInt(THEME.textVariants["sm-display"].fontSize, 10),
|
|
38
38
|
labelColor: theme.colors.red100,
|
|
39
39
|
labelTop: EXPANDED_LABEL_TOP,
|
|
40
|
-
inputTextColor: theme.colors.
|
|
40
|
+
inputTextColor: theme.colors.mono100,
|
|
41
41
|
},
|
|
42
42
|
// Unfocused error input with value
|
|
43
43
|
touched: {
|
|
@@ -45,7 +45,7 @@ const getErrorVariantStates = (theme) => {
|
|
|
45
45
|
labelFontSize: parseInt(THEME.textVariants.xs.fontSize, 10),
|
|
46
46
|
labelColor: theme.colors.red100,
|
|
47
47
|
labelTop: SHRINKED_LABEL_TOP,
|
|
48
|
-
inputTextColor: theme.colors.
|
|
48
|
+
inputTextColor: theme.colors.mono100,
|
|
49
49
|
},
|
|
50
50
|
// Focused error input with or without value
|
|
51
51
|
focused: {
|
|
@@ -53,7 +53,7 @@ const getErrorVariantStates = (theme) => {
|
|
|
53
53
|
labelFontSize: parseInt(THEME.textVariants.xs.fontSize, 10),
|
|
54
54
|
labelColor: theme.colors.red100,
|
|
55
55
|
labelTop: SHRINKED_LABEL_TOP,
|
|
56
|
-
inputTextColor: theme.colors.
|
|
56
|
+
inputTextColor: theme.colors.mono100,
|
|
57
57
|
},
|
|
58
58
|
};
|
|
59
59
|
};
|
|
@@ -61,28 +61,28 @@ const getDisabledVariantStates = (theme) => {
|
|
|
61
61
|
return {
|
|
62
62
|
// Unfocused disabled input with no value
|
|
63
63
|
untouched: {
|
|
64
|
-
inputBorderColor: theme.colors.
|
|
64
|
+
inputBorderColor: theme.colors.mono30,
|
|
65
65
|
labelFontSize: parseInt(THEME.textVariants["sm-display"].fontSize, 10),
|
|
66
|
-
labelColor: theme.colors.
|
|
66
|
+
labelColor: theme.colors.mono30,
|
|
67
67
|
labelTop: EXPANDED_LABEL_TOP,
|
|
68
|
-
inputTextColor: theme.colors.
|
|
68
|
+
inputTextColor: theme.colors.mono30,
|
|
69
69
|
},
|
|
70
70
|
// Unfocused disabled input with value
|
|
71
71
|
touched: {
|
|
72
|
-
inputBorderColor: theme.colors.
|
|
72
|
+
inputBorderColor: theme.colors.mono30,
|
|
73
73
|
labelFontSize: parseInt(THEME.textVariants.xs.fontSize, 10),
|
|
74
|
-
labelColor: theme.colors.
|
|
74
|
+
labelColor: theme.colors.mono30,
|
|
75
75
|
labelTop: SHRINKED_LABEL_TOP,
|
|
76
|
-
inputTextColor: theme.colors.
|
|
76
|
+
inputTextColor: theme.colors.mono30,
|
|
77
77
|
},
|
|
78
78
|
// Focused disabled input with or without value
|
|
79
79
|
// Adding this just to satisfy typescript because a disabled input can't be focused
|
|
80
80
|
focused: {
|
|
81
|
-
inputBorderColor: theme.colors.
|
|
81
|
+
inputBorderColor: theme.colors.mono30,
|
|
82
82
|
labelFontSize: parseInt(THEME.textVariants.xs.fontSize, 10),
|
|
83
|
-
labelColor: theme.colors.
|
|
83
|
+
labelColor: theme.colors.mono30,
|
|
84
84
|
labelTop: SHRINKED_LABEL_TOP,
|
|
85
|
-
inputTextColor: theme.colors.
|
|
85
|
+
inputTextColor: theme.colors.mono30,
|
|
86
86
|
},
|
|
87
87
|
};
|
|
88
88
|
};
|
|
@@ -34,7 +34,7 @@ const ScreenRoot = ({ children }) => {
|
|
|
34
34
|
const headerFloating = getChildByType(children, LegacyScreen.FloatingHeader);
|
|
35
35
|
const background = getChildByType(children, LegacyScreen.Background);
|
|
36
36
|
const bodyChildren = getChildrenByTypeDeep(children, LegacyScreen.Body);
|
|
37
|
-
return (_jsxs(Flex, { flex: 1, backgroundColor: "
|
|
37
|
+
return (_jsxs(Flex, { flex: 1, backgroundColor: "mono0", children: [background /* fullscreen */, header, bodyChildren, headerFloating /* floating, so keep close to the bottom */] }));
|
|
38
38
|
};
|
|
39
39
|
const useUpdateScreenContext = ({ header }) => {
|
|
40
40
|
const { setOptions } = useScreenContext();
|
|
@@ -98,7 +98,7 @@ const BottomView = ({ children }) => {
|
|
|
98
98
|
return (_jsxs(Flex, { position: "absolute", bottom: keyboardShowing ? keyboardHeight - insets.bottom : 0, left: 0, right: 0, onLayout: (evt) => void setOptions({ bottomViewHeight: evt.nativeEvent.layout.height }), children: [_jsx(LinearGradient, { colors: ["rgba(255,255,255,0)", "rgba(255,255,255,1)"], start: { x: 0, y: 0 }, end: { x: 0, y: 1 }, style: {
|
|
99
99
|
width: "100%",
|
|
100
100
|
height: 30,
|
|
101
|
-
}, pointerEvents: "none" }), _jsx(Flex, { px: SCREEN_HORIZONTAL_PADDING, py: keyboardShowing ? 1 : undefined, backgroundColor: "
|
|
101
|
+
}, pointerEvents: "none" }), _jsx(Flex, { px: SCREEN_HORIZONTAL_PADDING, py: keyboardShowing ? 1 : undefined, backgroundColor: "mono0", children: children }), keyboardShowing ? null : _jsx(SafeBottomPadding, {})] }));
|
|
102
102
|
};
|
|
103
103
|
/**
|
|
104
104
|
* Only use with `<Screen.Body fullwidth>`.
|
|
@@ -29,6 +29,6 @@ export const StepTabs = ({ onTabPress, activeTab, tabs }) => {
|
|
|
29
29
|
});
|
|
30
30
|
}, children: [_jsxs(Box, { flexDirection: "row", alignItems: "center", children: [_jsx(Tab, { label: label, onPress: () => onTabSelect(label, index), active: activeTab === index, style: { paddingHorizontal: 0, paddingLeft: 8, paddingRight: 5 }, onLayout: () => {
|
|
31
31
|
// noop
|
|
32
|
-
} }), !!completed && _jsx(CheckIcon, { fill: "green100", height: 15, width: 15 })] }), _jsx(ChevronIcon, { fill: "
|
|
32
|
+
} }), !!completed && _jsx(CheckIcon, { fill: "green100", height: 15, width: 15 })] }), _jsx(ChevronIcon, { fill: "mono60", height: 10, width: 10 })] }) }, label + index));
|
|
33
33
|
}) }));
|
|
34
34
|
};
|
|
@@ -11,7 +11,7 @@ export const TabV3 = ({ label, superscript, active, onLayout, onPress, style })
|
|
|
11
11
|
paddingVertical: 10,
|
|
12
12
|
flexDirection: "row",
|
|
13
13
|
...style,
|
|
14
|
-
}, children: [_jsx(Text, { fontSize: 16, color: active ? color("
|
|
14
|
+
}, children: [_jsx(Text, { fontSize: 16, color: active ? color("mono100") : pressed ? color("blue100") : color("mono60"), style: {
|
|
15
15
|
textDecorationLine: pressed ? "underline" : "none",
|
|
16
16
|
}, children: label }), !!superscript && (_jsx(Text, { fontSize: 12, color: color("blue100"), style: {
|
|
17
17
|
textDecorationLine: pressed ? "underline" : "none",
|
|
@@ -35,7 +35,7 @@ export const TabBarContainer = ({ children, activeTabIndex, scrollEnabled, tabLa
|
|
|
35
35
|
left: 0,
|
|
36
36
|
right: 0,
|
|
37
37
|
borderBottomWidth: 1,
|
|
38
|
-
borderBottomColor: color("
|
|
38
|
+
borderBottomColor: color("mono30"),
|
|
39
39
|
} }), _jsxs(View, { style: {
|
|
40
40
|
flex: 1,
|
|
41
41
|
minWidth: "100%",
|
|
@@ -68,7 +68,7 @@ export const ActiveTabBorder = ({ tabLayouts, activeTabIndex, }) => {
|
|
|
68
68
|
return (_jsx(Animated.View, { style: {
|
|
69
69
|
height: 1,
|
|
70
70
|
width: preTransformSpan,
|
|
71
|
-
backgroundColor: color("
|
|
71
|
+
backgroundColor: color("mono100"),
|
|
72
72
|
position: "absolute",
|
|
73
73
|
bottom: 0,
|
|
74
74
|
transform: [
|
|
@@ -3,6 +3,6 @@ import { bullet } from "../../utils/text";
|
|
|
3
3
|
import { Flex } from "../Flex";
|
|
4
4
|
import { Spacer } from "../Spacer";
|
|
5
5
|
import { Text } from "../Text";
|
|
6
|
-
export const BulletedItem = ({ children, color = "
|
|
6
|
+
export const BulletedItem = ({ children, color = "mono60", ...otherFlexProps }) => {
|
|
7
7
|
return (_jsxs(Flex, { flexDirection: "row", px: 1, ...otherFlexProps, children: [_jsx(Text, { variant: "sm", color: color, children: bullet }), _jsx(Spacer, { x: 1 }), _jsx(Text, { variant: "sm", color: color, children: children })] }));
|
|
8
8
|
};
|
|
@@ -5,4 +5,4 @@ import { List } from "../../storybook/helpers";
|
|
|
5
5
|
import { Flex } from "../Flex";
|
|
6
6
|
import { Spacer } from "../Spacer";
|
|
7
7
|
import { Text } from "../Text";
|
|
8
|
-
storiesOf("List", module).add("Bulleted Item", () => (_jsx(List, { children: _jsxs(Flex, { children: [_jsx(BulletedItem, { children: "Bulleted Item text" }), _jsx(BulletedItem, { children: "The good thing about Bulleted Item text is that the bullet is aligned separately from the rest of the text" }), _jsx(Spacer, { y: 2 }), _jsx(Text, { variant: "sm", mx: 1, color: "
|
|
8
|
+
storiesOf("List", module).add("Bulleted Item", () => (_jsx(List, { children: _jsxs(Flex, { children: [_jsx(BulletedItem, { children: "Bulleted Item text" }), _jsx(BulletedItem, { children: "The good thing about Bulleted Item text is that the bullet is aligned separately from the rest of the text" }), _jsx(Spacer, { y: 2 }), _jsx(Text, { variant: "sm", mx: 1, color: "mono60", children: "\u2022 Simple text acting as bulleted item" }), _jsx(Text, { variant: "sm", mx: 1, color: "mono60", children: "\u2022 Simple text acting as bulleted item longer text with a bullet infront of it, just like that. and that ain't so pretty, riiiight?!" })] }) })));
|
|
@@ -4,7 +4,7 @@ import { useColor } from "../../utils/hooks";
|
|
|
4
4
|
import { Flex } from "../Flex";
|
|
5
5
|
import { Text } from "../Text";
|
|
6
6
|
import { Touchable } from "../Touchable";
|
|
7
|
-
export const MenuItem = ({ title, text, value, onPress, disabled = false, chevron = _jsx(ChevronIcon, { direction: "right", fill: "
|
|
7
|
+
export const MenuItem = ({ title, text, value, onPress, disabled = false, chevron = _jsx(ChevronIcon, { direction: "right", fill: "mono60" }), }) => {
|
|
8
8
|
const color = useColor();
|
|
9
|
-
return (_jsx(Touchable, { onPress: onPress, underlayColor: color("
|
|
9
|
+
return (_jsx(Touchable, { onPress: onPress, underlayColor: color("mono5"), disabled: disabled, children: _jsxs(Flex, { flexDirection: "row", alignItems: "center", justifyContent: "space-between", py: 2, px: 2, pr: "15px", children: [_jsx(Flex, { flexDirection: "row", mr: 2, children: _jsx(Text, { variant: "md", color: "onBackgroundHigh", children: title }) }), !!value && (_jsx(Flex, { flex: 1, children: _jsx(Text, { variant: "md", color: "mono60", numberOfLines: 1, textAlign: "right", children: value }) })), !!(onPress && chevron) && _jsx(Flex, { ml: 1, children: chevron }), !!text && (_jsx(Text, { variant: "md", color: color("mono60"), children: text }))] }) }));
|
|
10
10
|
};
|
|
@@ -34,10 +34,10 @@ export const Message = ({ bodyTextStyle, children, containerStyle, IconComponent
|
|
|
34
34
|
};
|
|
35
35
|
const colors = {
|
|
36
36
|
default: {
|
|
37
|
-
background: "
|
|
38
|
-
title: "
|
|
39
|
-
text: "
|
|
40
|
-
icon: "
|
|
37
|
+
background: "mono5",
|
|
38
|
+
title: "mono100",
|
|
39
|
+
text: "mono60",
|
|
40
|
+
icon: "mono100",
|
|
41
41
|
},
|
|
42
42
|
info: {
|
|
43
43
|
background: "blue10",
|
|
@@ -45,36 +45,36 @@ const colors = {
|
|
|
45
45
|
// The text should be black regardless of the theme
|
|
46
46
|
// @ts-expect-error
|
|
47
47
|
text: "black",
|
|
48
|
-
icon: "
|
|
48
|
+
icon: "mono100",
|
|
49
49
|
},
|
|
50
50
|
success: {
|
|
51
51
|
background: "green10",
|
|
52
52
|
title: "green150",
|
|
53
|
-
text: "
|
|
54
|
-
icon: "
|
|
53
|
+
text: "mono100",
|
|
54
|
+
icon: "mono100",
|
|
55
55
|
},
|
|
56
56
|
alert: {
|
|
57
57
|
background: "orange10",
|
|
58
58
|
title: "orange150",
|
|
59
|
-
text: "
|
|
60
|
-
icon: "
|
|
59
|
+
text: "mono100",
|
|
60
|
+
icon: "mono100",
|
|
61
61
|
},
|
|
62
62
|
warning: {
|
|
63
63
|
background: "yellow10",
|
|
64
64
|
title: "yellow150",
|
|
65
|
-
text: "
|
|
66
|
-
icon: "
|
|
65
|
+
text: "mono100",
|
|
66
|
+
icon: "mono100",
|
|
67
67
|
},
|
|
68
68
|
error: {
|
|
69
69
|
background: "red10",
|
|
70
70
|
title: "red100",
|
|
71
|
-
text: "
|
|
72
|
-
icon: "
|
|
71
|
+
text: "mono100",
|
|
72
|
+
icon: "mono100",
|
|
73
73
|
},
|
|
74
74
|
dark: {
|
|
75
|
-
background: "
|
|
76
|
-
title: "
|
|
77
|
-
text: "
|
|
78
|
-
icon: "
|
|
75
|
+
background: "mono100",
|
|
76
|
+
title: "mono0",
|
|
77
|
+
text: "mono0",
|
|
78
|
+
icon: "mono0",
|
|
79
79
|
},
|
|
80
80
|
};
|
|
@@ -30,7 +30,7 @@ export const Pill = ({ variant = "default", src, selected, disabled, Icon, child
|
|
|
30
30
|
};
|
|
31
31
|
const Container = styled(MotiPressable) `
|
|
32
32
|
align-items: center;
|
|
33
|
-
border: 1px solid ${themeGet("colors.
|
|
33
|
+
border: 1px solid ${themeGet("colors.mono15")};
|
|
34
34
|
flex-direction: row;
|
|
35
35
|
justify-content: center;
|
|
36
36
|
text-align: center;
|
|
@@ -45,7 +45,7 @@ const Container = styled(MotiPressable) `
|
|
|
45
45
|
}}
|
|
46
46
|
`;
|
|
47
47
|
const Thumbnail = styled(Image) `
|
|
48
|
-
background-color: ${themeGet("colors.
|
|
48
|
+
background-color: ${themeGet("colors.mono30")};
|
|
49
49
|
`;
|
|
50
50
|
const PILL_STATES = {
|
|
51
51
|
default: css `
|
|
@@ -58,8 +58,8 @@ const PILL_STATES = {
|
|
|
58
58
|
background-color: ${themeGet("colors.blue100")};
|
|
59
59
|
`,
|
|
60
60
|
disabled: css `
|
|
61
|
-
background-color: ${themeGet("colors.
|
|
62
|
-
border-color: ${themeGet("colors.
|
|
61
|
+
background-color: ${themeGet("colors.mono5")};
|
|
62
|
+
border-color: ${themeGet("colors.mono5")};
|
|
63
63
|
`,
|
|
64
64
|
};
|
|
65
65
|
const PILL_VARIANTS = {
|
|
@@ -70,7 +70,7 @@ const PILL_VARIANTS = {
|
|
|
70
70
|
${PILL_STATES.default}
|
|
71
71
|
border-radius: 20px;
|
|
72
72
|
height: 40px;
|
|
73
|
-
border-color: ${themeGet("colors.
|
|
73
|
+
border-color: ${themeGet("colors.mono60")};
|
|
74
74
|
`,
|
|
75
75
|
},
|
|
76
76
|
dotted: {
|
|
@@ -81,8 +81,8 @@ const PILL_VARIANTS = {
|
|
|
81
81
|
`,
|
|
82
82
|
selected: css `
|
|
83
83
|
${PILL_STATES.selected}
|
|
84
|
-
background-color: ${themeGet("colors.
|
|
85
|
-
border-color: ${themeGet("colors.
|
|
84
|
+
background-color: ${themeGet("colors.mono10")};
|
|
85
|
+
border-color: ${themeGet("colors.mono10")};
|
|
86
86
|
`,
|
|
87
87
|
},
|
|
88
88
|
search: {
|
|
@@ -91,8 +91,8 @@ const PILL_VARIANTS = {
|
|
|
91
91
|
profile: {
|
|
92
92
|
...PILL_STATES,
|
|
93
93
|
default: css `
|
|
94
|
-
background-color: ${themeGet("colors.
|
|
95
|
-
border-color: ${themeGet("colors.
|
|
94
|
+
background-color: ${themeGet("colors.mono5")};
|
|
95
|
+
border-color: ${themeGet("colors.mono5")};
|
|
96
96
|
border-radius: 25px;
|
|
97
97
|
height: 50px;
|
|
98
98
|
padding: 0 ${themeGet("space.1")}};
|
|
@@ -124,43 +124,43 @@ const PILL_VARIANTS = {
|
|
|
124
124
|
padding: 0 ${themeGet("space.1")};
|
|
125
125
|
`,
|
|
126
126
|
disabled: css `
|
|
127
|
-
border-color: ${themeGet("colors.
|
|
127
|
+
border-color: ${themeGet("colors.mono60")};
|
|
128
128
|
`,
|
|
129
129
|
},
|
|
130
130
|
link: {
|
|
131
131
|
...PILL_STATES,
|
|
132
132
|
default: css `
|
|
133
133
|
${PILL_STATES.default}
|
|
134
|
-
border-color: ${themeGet("colors.
|
|
135
|
-
background-color: ${themeGet("colors.
|
|
134
|
+
border-color: ${themeGet("colors.mono5")};
|
|
135
|
+
background-color: ${themeGet("colors.mono5")};
|
|
136
136
|
`,
|
|
137
137
|
},
|
|
138
138
|
};
|
|
139
139
|
const defaultColors = {
|
|
140
|
-
default: "
|
|
141
|
-
selected: "
|
|
142
|
-
disabled: "
|
|
140
|
+
default: "mono100",
|
|
141
|
+
selected: "mono0",
|
|
142
|
+
disabled: "mono60",
|
|
143
143
|
};
|
|
144
144
|
const TEXT_COLOR = {
|
|
145
145
|
default: defaultColors,
|
|
146
146
|
onboarding: defaultColors,
|
|
147
147
|
dotted: {
|
|
148
148
|
...defaultColors,
|
|
149
|
-
selected: "
|
|
149
|
+
selected: "mono100",
|
|
150
150
|
},
|
|
151
151
|
search: defaultColors,
|
|
152
152
|
profile: {
|
|
153
153
|
...defaultColors,
|
|
154
|
-
selected: "
|
|
154
|
+
selected: "mono100",
|
|
155
155
|
},
|
|
156
156
|
badge: {
|
|
157
157
|
default: "blue100",
|
|
158
|
-
selected: "
|
|
158
|
+
selected: "mono0",
|
|
159
159
|
disabled: "blue100",
|
|
160
160
|
},
|
|
161
161
|
filter: {
|
|
162
162
|
...defaultColors,
|
|
163
|
-
disabled: "
|
|
163
|
+
disabled: "mono100",
|
|
164
164
|
},
|
|
165
165
|
link: defaultColors,
|
|
166
166
|
};
|