decathlon-ui 1.0.0 → 2.0.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/.DS_Store +0 -0
- package/dist/components/badge/badge.component.d.ts +1 -1
- package/dist/components/badge/badge.component.d.ts.map +1 -1
- package/dist/components/badge/badge.component.js +53 -22
- package/dist/components/badge/badge.styles.d.ts +27 -1
- package/dist/components/badge/badge.styles.d.ts.map +1 -1
- package/dist/components/badge/badge.styles.js +76 -24
- package/dist/components/badge/badge.types.d.ts +15 -16
- package/dist/components/badge/badge.types.d.ts.map +1 -1
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/badge/index.d.ts.map +1 -1
- package/dist/components/delivery-option-card/delivery-option-card.component.d.ts +4 -0
- package/dist/components/delivery-option-card/delivery-option-card.component.d.ts.map +1 -0
- package/dist/components/delivery-option-card/delivery-option-card.component.js +26 -0
- package/dist/components/delivery-option-card/delivery-option-card.styles.d.ts +169 -0
- package/dist/components/delivery-option-card/delivery-option-card.styles.d.ts.map +1 -0
- package/dist/components/delivery-option-card/delivery-option-card.styles.js +168 -0
- package/dist/components/delivery-option-card/delivery-option-card.types.d.ts +32 -0
- package/dist/components/delivery-option-card/delivery-option-card.types.d.ts.map +1 -0
- package/dist/components/delivery-option-card/delivery-option-card.types.js +1 -0
- package/dist/components/delivery-option-card/index.d.ts +3 -0
- package/dist/components/delivery-option-card/index.d.ts.map +1 -0
- package/dist/components/delivery-option-card/index.js +1 -0
- package/dist/components/delivery-orientation-banner/delivery-orientation-banner.component.d.ts +4 -0
- package/dist/components/delivery-orientation-banner/delivery-orientation-banner.component.d.ts.map +1 -0
- package/dist/components/delivery-orientation-banner/delivery-orientation-banner.component.js +13 -0
- package/dist/components/delivery-orientation-banner/delivery-orientation-banner.styles.d.ts +38 -0
- package/dist/components/delivery-orientation-banner/delivery-orientation-banner.styles.d.ts.map +1 -0
- package/dist/components/delivery-orientation-banner/delivery-orientation-banner.styles.js +42 -0
- package/dist/components/delivery-orientation-banner/delivery-orientation-banner.types.d.ts +17 -0
- package/dist/components/delivery-orientation-banner/delivery-orientation-banner.types.d.ts.map +1 -0
- package/dist/components/delivery-orientation-banner/delivery-orientation-banner.types.js +1 -0
- package/dist/components/delivery-orientation-banner/index.d.ts +3 -0
- package/dist/components/delivery-orientation-banner/index.d.ts.map +1 -0
- package/dist/components/delivery-orientation-banner/index.js +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/themes/dark.d.ts +22 -0
- package/dist/themes/dark.d.ts.map +1 -1
- package/dist/themes/dark.js +22 -0
- package/dist/themes/index.d.ts +22 -0
- package/dist/themes/index.d.ts.map +1 -1
- package/dist/themes/light.d.ts +24 -0
- package/dist/themes/light.d.ts.map +1 -1
- package/dist/themes/light.js +24 -0
- package/package.json +1 -1
package/dist/.DS_Store
ADDED
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { BadgeProps } from "./badge.types";
|
|
3
|
-
export declare const Badge: React.MemoExoticComponent<({ text, variant, size, style, textStyle, icon, iconPosition, }: BadgeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export declare const Badge: React.MemoExoticComponent<({ text, children, variant, tone, filled, size, style, textStyle, icon, iconPosition, }: BadgeProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
4
4
|
//# sourceMappingURL=badge.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.component.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.component.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"badge.component.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.component.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAuIhD,eAAO,MAAM,KAAK,qHAnHf,UAAU,oDAmHkC,CAAC"}
|
|
@@ -1,50 +1,81 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Platform, Text, View } from "react-native";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { useBadgeStyles } from "./badge.styles";
|
|
4
|
+
import { useBadgeStyles, useCheckoutTagStyles } from "./badge.styles";
|
|
5
|
+
const isRenderable = (n) => n != null && n !== false && n !== true;
|
|
5
6
|
/**
|
|
6
|
-
* Badge
|
|
7
|
-
*
|
|
7
|
+
* Badge — etiquetas da lib; suporta o modelo de **Tag** do handoff de checkout
|
|
8
|
+
* (`tone`, `filled`, `children`, `icon`) e a API legada (`text`, `variant`).
|
|
8
9
|
*/
|
|
9
|
-
const BadgeComponent = ({ text, variant, size = "medium", style, textStyle, icon, iconPosition = "left", }) => {
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
10
|
+
const BadgeComponent = ({ text, children, variant, tone, filled = false, size = "medium", style, textStyle, icon, iconPosition = "left", }) => {
|
|
11
|
+
const label = children !== null && children !== void 0 ? children : text;
|
|
12
|
+
const tagMode = tone != null ||
|
|
13
|
+
(isRenderable(children) && text === undefined);
|
|
14
|
+
const tagToneResolved = tone !== null && tone !== void 0 ? tone : "neutral";
|
|
15
|
+
const legacyVariant = variant !== null && variant !== void 0 ? variant : "default";
|
|
16
|
+
const tagStyles = useCheckoutTagStyles(tagToneResolved, filled);
|
|
17
|
+
const legacyStyles = useBadgeStyles(legacyVariant, size);
|
|
18
|
+
const renderIconTag = (tagIcon) => {
|
|
19
|
+
if (typeof tagIcon === "string" && tagIcon.includes(".svg")) {
|
|
20
|
+
if (Platform.OS !== "web") {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
22
|
+
const { SvgUri } = require("react-native-svg");
|
|
23
|
+
if (SvgUri) {
|
|
24
|
+
return (_jsx(SvgUri, { uri: tagIcon, width: 12, height: 12 }));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
13
27
|
return null;
|
|
14
28
|
}
|
|
15
|
-
|
|
16
|
-
|
|
29
|
+
return tagIcon;
|
|
30
|
+
};
|
|
31
|
+
const renderIconLegacy = (tagIcon) => {
|
|
32
|
+
if (typeof tagIcon === "string" && tagIcon.includes(".svg")) {
|
|
17
33
|
if (Platform.OS !== "web") {
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
19
35
|
const { SvgUri } = require("react-native-svg");
|
|
20
36
|
if (SvgUri) {
|
|
21
|
-
return (_jsx(View, { style:
|
|
37
|
+
return (_jsx(View, { style: legacyStyles.iconContainer, children: _jsx(SvgUri, { uri: tagIcon, width: 12, height: 12 }) }));
|
|
22
38
|
}
|
|
23
39
|
}
|
|
24
|
-
// No ambiente web (storybook) ou quando SvgUri não estiver disponível,
|
|
25
|
-
// o ícone via string é ignorado para evitar erros de build.
|
|
26
40
|
return null;
|
|
27
41
|
}
|
|
28
|
-
return _jsx(View, { style:
|
|
42
|
+
return _jsx(View, { style: legacyStyles.iconContainer, children: tagIcon });
|
|
29
43
|
};
|
|
30
|
-
|
|
44
|
+
if (tagMode) {
|
|
45
|
+
if (!isRenderable(label)) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const primitiveLabel = typeof label === "string" || typeof label === "number";
|
|
49
|
+
return (_jsxs(View, { style: [tagStyles.container, style], accessibilityRole: "text", children: [icon != null && iconPosition === "left" ? (_jsx(View, { style: tagStyles.iconWrap, children: renderIconTag(icon) })) : null, primitiveLabel ? (_jsx(Text, { style: [tagStyles.label, textStyle], children: String(label) })) : (_jsx(View, { style: { flexShrink: 1 }, children: label })), icon != null && iconPosition === "right" ? (_jsx(View, { style: tagStyles.iconWrap, children: renderIconTag(icon) })) : null] }));
|
|
50
|
+
}
|
|
51
|
+
if (!isRenderable(text)) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
31
54
|
const getSizeStyle = () => {
|
|
32
55
|
switch (size) {
|
|
33
56
|
case "small":
|
|
34
|
-
return
|
|
57
|
+
return legacyStyles.small;
|
|
35
58
|
case "large":
|
|
36
|
-
return
|
|
59
|
+
return legacyStyles.large;
|
|
37
60
|
case "medium":
|
|
38
61
|
default:
|
|
39
|
-
return
|
|
62
|
+
return legacyStyles.medium;
|
|
40
63
|
}
|
|
41
64
|
};
|
|
42
|
-
return (_jsxs(View, { style: [
|
|
43
|
-
|
|
65
|
+
return (_jsxs(View, { style: [
|
|
66
|
+
legacyStyles.container,
|
|
67
|
+
!style && legacyVariant && legacyStyles[legacyVariant],
|
|
68
|
+
style,
|
|
69
|
+
], children: [icon != null && iconPosition === "left"
|
|
70
|
+
? renderIconLegacy(icon)
|
|
71
|
+
: null, _jsx(Text, { style: [
|
|
72
|
+
legacyStyles.text,
|
|
44
73
|
getSizeStyle(),
|
|
45
|
-
|
|
74
|
+
legacyVariant && legacyStyles[legacyVariant],
|
|
46
75
|
textStyle,
|
|
47
|
-
], children: text }), icon && iconPosition === "right"
|
|
76
|
+
], children: text }), icon != null && iconPosition === "right"
|
|
77
|
+
? renderIconLegacy(icon)
|
|
78
|
+
: null] }));
|
|
48
79
|
};
|
|
49
80
|
export const Badge = React.memo(BadgeComponent);
|
|
50
81
|
Badge.displayName = "Badge";
|
|
@@ -1,4 +1,30 @@
|
|
|
1
|
-
import type { BadgeSize, BadgeVariant } from "./badge.types";
|
|
1
|
+
import type { BadgeSize, BadgeTone, BadgeVariant } from "./badge.types";
|
|
2
|
+
export declare const useCheckoutTagStyles: (tone: BadgeTone, filled: boolean) => {
|
|
3
|
+
container: {
|
|
4
|
+
flexDirection: "row";
|
|
5
|
+
alignItems: "center";
|
|
6
|
+
alignSelf: "flex-start";
|
|
7
|
+
backgroundColor: string;
|
|
8
|
+
paddingHorizontal: 8;
|
|
9
|
+
paddingVertical: number;
|
|
10
|
+
gap: 4;
|
|
11
|
+
borderRadius: 360;
|
|
12
|
+
};
|
|
13
|
+
label: {
|
|
14
|
+
fontFamily: "Inter-Bold";
|
|
15
|
+
fontSize: 10;
|
|
16
|
+
lineHeight: number;
|
|
17
|
+
letterSpacing: number;
|
|
18
|
+
textTransform: "uppercase";
|
|
19
|
+
color: string;
|
|
20
|
+
};
|
|
21
|
+
iconWrap: {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
alignItems: "center";
|
|
25
|
+
justifyContent: "center";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
2
28
|
export declare const useBadgeStyles: (variant?: BadgeVariant, size?: BadgeSize) => {
|
|
3
29
|
container: {
|
|
4
30
|
padding: 6;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.styles.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"badge.styles.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAMxE,eAAO,MAAM,oBAAoB,GAAI,MAAM,SAAS,EAAE,QAAQ,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;CAqCpE,CAAC;AAiDF,eAAO,MAAM,cAAc,GACzB,UAAS,YAAwB,EACjC,OAAM,SAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoE3B,CAAC"}
|
|
@@ -1,20 +1,80 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { StyleSheet } from "react-native";
|
|
3
3
|
import { useTheme } from "../../themes";
|
|
4
|
+
export const useCheckoutTagStyles = (tone, filled) => {
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
return useMemo(() => {
|
|
7
|
+
const { backgroundColor, color } = resolveTagColors(theme.colors, tone, filled);
|
|
8
|
+
return StyleSheet.create({
|
|
9
|
+
container: {
|
|
10
|
+
flexDirection: "row",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
alignSelf: "flex-start",
|
|
13
|
+
backgroundColor,
|
|
14
|
+
paddingHorizontal: theme.spacing.xs,
|
|
15
|
+
paddingVertical: 5.5,
|
|
16
|
+
gap: theme.spacing.xxs,
|
|
17
|
+
borderRadius: theme.radius.round,
|
|
18
|
+
},
|
|
19
|
+
label: {
|
|
20
|
+
fontFamily: theme.fonts.inter.bold,
|
|
21
|
+
fontSize: theme.fonts.sizes.xxxs,
|
|
22
|
+
lineHeight: 15,
|
|
23
|
+
letterSpacing: 0.25,
|
|
24
|
+
textTransform: "uppercase",
|
|
25
|
+
color,
|
|
26
|
+
},
|
|
27
|
+
iconWrap: {
|
|
28
|
+
width: 12,
|
|
29
|
+
height: 12,
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
justifyContent: "center",
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}, [theme, tone, filled]);
|
|
35
|
+
};
|
|
36
|
+
function resolveTagColors(c, tone, filled) {
|
|
37
|
+
switch (tone) {
|
|
38
|
+
case "success":
|
|
39
|
+
return filled
|
|
40
|
+
? { backgroundColor: c.deliveryOptionFeatured, color: c.white }
|
|
41
|
+
: {
|
|
42
|
+
backgroundColor: c.backgroundDeliveryAdvantageBadge,
|
|
43
|
+
color: c.textDeliveryAdvantageBadge,
|
|
44
|
+
};
|
|
45
|
+
case "warning":
|
|
46
|
+
return filled
|
|
47
|
+
? { backgroundColor: c.backgroundTagWarningFilled, color: c.white }
|
|
48
|
+
: {
|
|
49
|
+
backgroundColor: c.backgroundDeliveryExpressBadge,
|
|
50
|
+
color: c.textDeliveryExpressBadge,
|
|
51
|
+
};
|
|
52
|
+
case "brand":
|
|
53
|
+
return filled
|
|
54
|
+
? { backgroundColor: c.primary, color: c.white }
|
|
55
|
+
: {
|
|
56
|
+
backgroundColor: c.backgroundTagBrandSubtle,
|
|
57
|
+
color: c.textTagBrandSubtle,
|
|
58
|
+
};
|
|
59
|
+
case "marketplace":
|
|
60
|
+
return filled
|
|
61
|
+
? { backgroundColor: c.backgroundTagMarketplaceFilled, color: c.white }
|
|
62
|
+
: {
|
|
63
|
+
backgroundColor: c.backgroundTagMarketplaceSubtle,
|
|
64
|
+
color: c.textTagMarketplaceSubtle,
|
|
65
|
+
};
|
|
66
|
+
case "neutral":
|
|
67
|
+
default:
|
|
68
|
+
return filled
|
|
69
|
+
? { backgroundColor: c.backgroundTagNeutralFilled, color: c.white }
|
|
70
|
+
: {
|
|
71
|
+
backgroundColor: c.backgroundSecondary,
|
|
72
|
+
color: c.textSecondary,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
4
76
|
export const useBadgeStyles = (variant = "default", size = "medium") => {
|
|
5
77
|
const theme = useTheme();
|
|
6
|
-
const getHeightStyle = () => {
|
|
7
|
-
switch (size) {
|
|
8
|
-
case "small":
|
|
9
|
-
return 19;
|
|
10
|
-
case "medium":
|
|
11
|
-
return 22;
|
|
12
|
-
case "large":
|
|
13
|
-
return 48;
|
|
14
|
-
default:
|
|
15
|
-
return 30;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
78
|
return useMemo(() => StyleSheet.create({
|
|
19
79
|
container: {
|
|
20
80
|
padding: theme.spacing.xxs2,
|
|
@@ -26,29 +86,26 @@ export const useBadgeStyles = (variant = "default", size = "medium") => {
|
|
|
26
86
|
text: {
|
|
27
87
|
color: theme.colors.textPrimary,
|
|
28
88
|
},
|
|
29
|
-
// Estilos de tamanho
|
|
30
89
|
medium: {
|
|
31
90
|
fontFamily: "Inter",
|
|
32
91
|
fontWeight: "500",
|
|
33
|
-
fontStyle: "normal",
|
|
92
|
+
fontStyle: "normal",
|
|
34
93
|
fontSize: 12,
|
|
35
|
-
lineHeight: 18,
|
|
94
|
+
lineHeight: 18,
|
|
36
95
|
letterSpacing: 0,
|
|
37
|
-
// leading-trim: NONE; // Não suportado no React Native
|
|
38
96
|
},
|
|
39
97
|
small: {
|
|
40
98
|
fontFamily: "Inter",
|
|
41
99
|
fontWeight: "400",
|
|
42
100
|
fontStyle: "normal",
|
|
43
101
|
fontSize: 10,
|
|
44
|
-
lineHeight: 10,
|
|
102
|
+
lineHeight: 10,
|
|
45
103
|
letterSpacing: 0,
|
|
46
|
-
// leading-trim: CAP_HEIGHT; // Não suportado diretamente no React Native
|
|
47
104
|
},
|
|
48
105
|
large: {
|
|
49
106
|
fontFamily: theme.fonts.inter.medium,
|
|
50
107
|
fontSize: 14,
|
|
51
|
-
lineHeight: 20,
|
|
108
|
+
lineHeight: 20,
|
|
52
109
|
letterSpacing: 0,
|
|
53
110
|
},
|
|
54
111
|
iconContainer: {
|
|
@@ -57,27 +114,22 @@ export const useBadgeStyles = (variant = "default", size = "medium") => {
|
|
|
57
114
|
alignItems: "center",
|
|
58
115
|
justifyContent: "center",
|
|
59
116
|
},
|
|
60
|
-
// Variante padrão
|
|
61
117
|
default: {
|
|
62
118
|
backgroundColor: theme.colors.backgroundAction1,
|
|
63
119
|
color: theme.colors.white,
|
|
64
120
|
},
|
|
65
|
-
// Variante black
|
|
66
121
|
black: {
|
|
67
122
|
backgroundColor: "#000000",
|
|
68
123
|
color: theme.colors.white,
|
|
69
124
|
},
|
|
70
|
-
// Variante discount
|
|
71
125
|
discount: {
|
|
72
126
|
backgroundColor: theme.colors.secondary,
|
|
73
127
|
color: "#000000",
|
|
74
128
|
},
|
|
75
|
-
// Variante cashback
|
|
76
129
|
cashback: {
|
|
77
130
|
backgroundColor: theme.colors.backgroundMint3,
|
|
78
131
|
color: theme.colors.black,
|
|
79
132
|
},
|
|
80
|
-
// Variante express
|
|
81
133
|
express: {
|
|
82
134
|
backgroundColor: theme.colors.black,
|
|
83
135
|
color: theme.colors.white,
|
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
import { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
export type BadgeVariant = "default" | "black" | "discount" | "cashback" | "express";
|
|
4
|
+
/** Tons do handoff (catálogo · <Tag />) — exposto como `Badge`. */
|
|
5
|
+
export type BadgeTone = "success" | "warning" | "brand" | "neutral" | "marketplace";
|
|
4
6
|
export type BadgeSize = "small" | "medium" | "large";
|
|
5
7
|
export type IconPosition = "left" | "right";
|
|
6
8
|
export interface BadgeProps {
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
10
|
+
* Legado — conteúdo em string. Se `children` existir sem `text`, ativa o modo Tag do handoff.
|
|
9
11
|
*/
|
|
10
|
-
text
|
|
12
|
+
text?: string;
|
|
11
13
|
/**
|
|
12
|
-
*
|
|
14
|
+
* Conteúdo do Tag (handoff). Com `tone`, composição canónica do DS de checkout.
|
|
13
15
|
*/
|
|
14
|
-
|
|
16
|
+
children?: ReactNode;
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
18
|
+
* Variante legada (cores do catálogo anterior)
|
|
17
19
|
*/
|
|
18
|
-
|
|
20
|
+
variant?: BadgeVariant;
|
|
19
21
|
/**
|
|
20
|
-
*
|
|
22
|
+
* Tom do Tag (handoff). Se omitido e só `children` for usado — default `neutral`.
|
|
21
23
|
*/
|
|
22
|
-
|
|
24
|
+
tone?: BadgeTone;
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
26
|
+
* Versão preenchida (texto branco sobre fundo sólido do tom)
|
|
27
|
+
* @default false
|
|
25
28
|
*/
|
|
29
|
+
filled?: boolean;
|
|
30
|
+
size?: BadgeSize;
|
|
31
|
+
style?: StyleProp<ViewStyle>;
|
|
26
32
|
textStyle?: StyleProp<TextStyle>;
|
|
27
|
-
/**
|
|
28
|
-
* Ícone SVG a ser exibido junto com o texto do badge
|
|
29
|
-
*/
|
|
30
33
|
icon?: ReactNode;
|
|
31
|
-
/**
|
|
32
|
-
* Posição do ícone em relação ao texto
|
|
33
|
-
* @default 'left'
|
|
34
|
-
*/
|
|
35
34
|
iconPosition?: IconPosition;
|
|
36
35
|
}
|
|
37
36
|
//# sourceMappingURL=badge.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.types.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,OAAO,GACP,UAAU,GACV,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAE5C,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"badge.types.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,OAAO,GACP,UAAU,GACV,UAAU,GACV,SAAS,CAAC;AAEd,yEAAyE;AACzE,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,GACT,aAAa,CAAC;AAElB,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAE5C,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAEjC,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/badge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,YAAY,EACV,UAAU,EACV,SAAS,EACT,YAAY,EACZ,YAAY,GACb,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/badge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,YAAY,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,YAAY,GACb,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-option-card.component.d.ts","sourceRoot":"","sources":["../../../src/components/delivery-option-card/delivery-option-card.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAuI5E,eAAO,MAAM,kBAAkB,qDAA0C,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Text, TouchableOpacity, View, } from "react-native";
|
|
4
|
+
import { BagIcon, ChevronRightIcon, StarIcon, } from "../../icons";
|
|
5
|
+
import { useTheme } from "../../themes";
|
|
6
|
+
import { useDeliveryOptionCardStyles } from "./delivery-option-card.styles";
|
|
7
|
+
const DeliveryOptionCardComponent = ({ testID, style, tone = "featured", disabled = false, selected = false, tags, onPress, leadingIcon, showRecommendedBadge, recommendedBadgeIcon, advantageousLabel, title, trailingTitle, subtitle, description, showAvailabilityIndicator, availabilitySummary, changeStoreLabel, onChangeStorePress, }) => {
|
|
8
|
+
const theme = useTheme();
|
|
9
|
+
const styles = useDeliveryOptionCardStyles({
|
|
10
|
+
tone,
|
|
11
|
+
selected,
|
|
12
|
+
disabled,
|
|
13
|
+
});
|
|
14
|
+
const subtitleContent = subtitle !== null && subtitle !== void 0 ? subtitle : description;
|
|
15
|
+
const effectiveSelected = selected && !disabled;
|
|
16
|
+
const badgesSection = tags !== null && tags !== void 0 ? tags : (_jsxs(_Fragment, { children: [showRecommendedBadge ? (_jsxs(View, { style: styles.recommendedBadge, children: [recommendedBadgeIcon !== null && recommendedBadgeIcon !== void 0 ? recommendedBadgeIcon : (_jsx(StarIcon, { size: 12, color: theme.colors.white })), _jsx(Text, { style: styles.recommendedText, children: "Recomendado" })] })) : null, advantageousLabel ? (_jsx(View, { style: styles.advantageousBadge, children: _jsx(Text, { style: styles.advantageousText, children: advantageousLabel }) })) : null] }));
|
|
17
|
+
const cardBody = (_jsxs(_Fragment, { children: [_jsxs(View, { style: styles.topRow, children: [_jsxs(View, { style: styles.leadingCluster, children: [leadingIcon !== null && leadingIcon !== void 0 ? leadingIcon : (_jsx(BagIcon, { size: 20, color: theme.colors.iconPrimary })), _jsx(View, { style: styles.badgesColumn, children: badgesSection })] }), _jsx(View, { style: effectiveSelected
|
|
18
|
+
? styles.radioOuterSelected
|
|
19
|
+
: styles.radioOuterIdle, children: effectiveSelected ? _jsx(View, { style: styles.radioInner }) : null })] }), _jsxs(View, { style: styles.titleRow, children: [_jsx(Text, { style: styles.title, numberOfLines: 2, children: title }), trailingTitle ? (_jsx(Text, { style: styles.trailingTitle, children: trailingTitle })) : null] }), subtitleContent ? (_jsx(View, { style: styles.subtitle, children: typeof subtitleContent === "string" ? (_jsx(Text, { style: styles.subtitleText, children: subtitleContent })) : (subtitleContent) })) : null, availabilitySummary ? (_jsxs(View, { style: styles.availabilityRow, children: [showAvailabilityIndicator ? (_jsx(View, { style: styles.availabilityBar })) : null, _jsx(View, { style: { flex: 1 }, children: availabilitySummary })] })) : null, changeStoreLabel && onChangeStorePress && !disabled ? (_jsxs(TouchableOpacity, { onPress: onChangeStorePress, style: styles.footerLink, hitSlop: { top: 8, bottom: 8, left: 4, right: 8 }, accessibilityRole: "link", children: [_jsx(Text, { style: styles.footerLinkText, children: changeStoreLabel }), _jsx(ChevronRightIcon, { size: 14, color: theme.colors.primary })] })) : null] }));
|
|
20
|
+
if (onPress && !disabled) {
|
|
21
|
+
return (_jsx(TouchableOpacity, { testID: testID, accessibilityRole: "button", accessibilityState: { disabled: false }, style: [styles.card, style], onPress: onPress, activeOpacity: 0.85, children: cardBody }));
|
|
22
|
+
}
|
|
23
|
+
return (_jsx(View, { testID: testID, accessibilityState: { disabled }, style: [styles.card, style], children: cardBody }));
|
|
24
|
+
};
|
|
25
|
+
export const DeliveryOptionCard = React.memo(DeliveryOptionCardComponent);
|
|
26
|
+
DeliveryOptionCard.displayName = "DeliveryOptionCard";
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { DeliveryOptionTone } from "./delivery-option-card.types";
|
|
2
|
+
type Options = {
|
|
3
|
+
tone: DeliveryOptionTone;
|
|
4
|
+
selected: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const useDeliveryOptionCardStyles: ({ tone, selected, disabled, }: Options) => {
|
|
8
|
+
card: {
|
|
9
|
+
shadowColor: "#3643BA" | "#00A859";
|
|
10
|
+
shadowOffset: {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
shadowOpacity: number;
|
|
15
|
+
shadowRadius: number;
|
|
16
|
+
backgroundColor: "#FFFFFF";
|
|
17
|
+
borderRadius: 0;
|
|
18
|
+
borderWidth: 1 | 2;
|
|
19
|
+
borderColor: "#3643BA" | "#00A859" | "#E5E7EB";
|
|
20
|
+
paddingHorizontal: 14;
|
|
21
|
+
paddingVertical: 12;
|
|
22
|
+
opacity: number;
|
|
23
|
+
} | {
|
|
24
|
+
shadowColor?: undefined;
|
|
25
|
+
shadowOffset?: undefined;
|
|
26
|
+
shadowOpacity?: undefined;
|
|
27
|
+
shadowRadius?: undefined;
|
|
28
|
+
backgroundColor: "#FFFFFF";
|
|
29
|
+
borderRadius: 0;
|
|
30
|
+
borderWidth: 1 | 2;
|
|
31
|
+
borderColor: "#3643BA" | "#00A859" | "#E5E7EB";
|
|
32
|
+
paddingHorizontal: 14;
|
|
33
|
+
paddingVertical: 12;
|
|
34
|
+
opacity: number;
|
|
35
|
+
};
|
|
36
|
+
topRow: {
|
|
37
|
+
flexDirection: "row";
|
|
38
|
+
alignItems: "flex-start";
|
|
39
|
+
justifyContent: "space-between";
|
|
40
|
+
};
|
|
41
|
+
leadingCluster: {
|
|
42
|
+
flexDirection: "row";
|
|
43
|
+
alignItems: "flex-start";
|
|
44
|
+
flex: number;
|
|
45
|
+
marginRight: 8;
|
|
46
|
+
};
|
|
47
|
+
badgesColumn: {
|
|
48
|
+
flex: number;
|
|
49
|
+
marginLeft: 8;
|
|
50
|
+
};
|
|
51
|
+
recommendedBadge: {
|
|
52
|
+
flexDirection: "row";
|
|
53
|
+
alignItems: "center";
|
|
54
|
+
alignSelf: "flex-start";
|
|
55
|
+
backgroundColor: "#00A859";
|
|
56
|
+
paddingHorizontal: 8;
|
|
57
|
+
paddingVertical: number;
|
|
58
|
+
gap: 4;
|
|
59
|
+
};
|
|
60
|
+
recommendedText: {
|
|
61
|
+
fontFamily: "Inter-Bold";
|
|
62
|
+
fontSize: 10;
|
|
63
|
+
lineHeight: number;
|
|
64
|
+
letterSpacing: number;
|
|
65
|
+
textTransform: "uppercase";
|
|
66
|
+
color: "#FFFFFF";
|
|
67
|
+
};
|
|
68
|
+
advantageousBadge: {
|
|
69
|
+
alignSelf: "flex-start";
|
|
70
|
+
marginTop: 4;
|
|
71
|
+
backgroundColor: "#E8F7EF";
|
|
72
|
+
paddingHorizontal: 8;
|
|
73
|
+
paddingVertical: number;
|
|
74
|
+
};
|
|
75
|
+
advantageousText: {
|
|
76
|
+
fontFamily: "Inter-Bold";
|
|
77
|
+
fontSize: 10;
|
|
78
|
+
lineHeight: number;
|
|
79
|
+
letterSpacing: number;
|
|
80
|
+
textTransform: "uppercase";
|
|
81
|
+
color: "#006B39";
|
|
82
|
+
};
|
|
83
|
+
radioOuterSelected: {
|
|
84
|
+
width: number;
|
|
85
|
+
height: number;
|
|
86
|
+
borderRadius: 360;
|
|
87
|
+
borderWidth: 2;
|
|
88
|
+
borderColor: "#3643BA" | "#00A859";
|
|
89
|
+
backgroundColor: "#3643BA" | "#00A859";
|
|
90
|
+
alignItems: "center";
|
|
91
|
+
justifyContent: "center";
|
|
92
|
+
marginLeft: 8;
|
|
93
|
+
};
|
|
94
|
+
radioOuterIdle: {
|
|
95
|
+
width: number;
|
|
96
|
+
height: number;
|
|
97
|
+
borderRadius: 360;
|
|
98
|
+
borderWidth: 2;
|
|
99
|
+
borderColor: "#D1D5DC";
|
|
100
|
+
backgroundColor: "#FFFFFF";
|
|
101
|
+
alignItems: "center";
|
|
102
|
+
justifyContent: "center";
|
|
103
|
+
marginLeft: 8;
|
|
104
|
+
};
|
|
105
|
+
radioInner: {
|
|
106
|
+
width: number;
|
|
107
|
+
height: number;
|
|
108
|
+
borderRadius: 360;
|
|
109
|
+
backgroundColor: "#FFFFFF";
|
|
110
|
+
};
|
|
111
|
+
titleRow: {
|
|
112
|
+
flexDirection: "row";
|
|
113
|
+
alignItems: "center";
|
|
114
|
+
justifyContent: "space-between";
|
|
115
|
+
marginTop: 12;
|
|
116
|
+
};
|
|
117
|
+
title: {
|
|
118
|
+
fontFamily: "Inter-SemiBold";
|
|
119
|
+
fontSize: number;
|
|
120
|
+
lineHeight: number;
|
|
121
|
+
color: "#101010";
|
|
122
|
+
flex: number;
|
|
123
|
+
marginRight: 12;
|
|
124
|
+
};
|
|
125
|
+
trailingTitle: {
|
|
126
|
+
fontFamily: "Inter-SemiBold";
|
|
127
|
+
fontSize: number;
|
|
128
|
+
lineHeight: number;
|
|
129
|
+
color: "#101010";
|
|
130
|
+
textAlign: "right";
|
|
131
|
+
};
|
|
132
|
+
subtitle: {
|
|
133
|
+
marginTop: 4;
|
|
134
|
+
};
|
|
135
|
+
subtitleText: {
|
|
136
|
+
fontFamily: "Inter-Regular";
|
|
137
|
+
fontSize: number;
|
|
138
|
+
lineHeight: number;
|
|
139
|
+
color: "#4A5565";
|
|
140
|
+
};
|
|
141
|
+
availabilityRow: {
|
|
142
|
+
flexDirection: "row";
|
|
143
|
+
alignItems: "flex-start";
|
|
144
|
+
marginTop: 12;
|
|
145
|
+
};
|
|
146
|
+
availabilityBar: {
|
|
147
|
+
width: number;
|
|
148
|
+
height: number;
|
|
149
|
+
marginRight: 8;
|
|
150
|
+
marginTop: number;
|
|
151
|
+
backgroundColor: "#E85D04";
|
|
152
|
+
borderRadius: 0;
|
|
153
|
+
};
|
|
154
|
+
footerLink: {
|
|
155
|
+
flexDirection: "row";
|
|
156
|
+
alignItems: "center";
|
|
157
|
+
marginTop: 12;
|
|
158
|
+
alignSelf: "flex-start";
|
|
159
|
+
gap: 4;
|
|
160
|
+
};
|
|
161
|
+
footerLinkText: {
|
|
162
|
+
fontFamily: "Inter-SemiBold";
|
|
163
|
+
fontSize: number;
|
|
164
|
+
lineHeight: number;
|
|
165
|
+
color: "#3643BA";
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
export {};
|
|
169
|
+
//# sourceMappingURL=delivery-option-card.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-option-card.styles.d.ts","sourceRoot":"","sources":["../../../src/components/delivery-option-card/delivery-option-card.styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,+BAIzC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8KT,CAAC"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { Platform, StyleSheet } from "react-native";
|
|
2
|
+
import { useTheme } from "../../themes";
|
|
3
|
+
export const useDeliveryOptionCardStyles = ({ tone, selected, disabled = false, }) => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const effectiveSelected = selected && !disabled;
|
|
6
|
+
const accent = tone === "featured"
|
|
7
|
+
? theme.colors.deliveryOptionFeatured
|
|
8
|
+
: theme.colors.primary;
|
|
9
|
+
const borderWidth = effectiveSelected
|
|
10
|
+
? theme.borderWidth.md
|
|
11
|
+
: theme.borderWidth.sm;
|
|
12
|
+
const borderColor = disabled || !effectiveSelected
|
|
13
|
+
? theme.colors.borderDeliveryIdle
|
|
14
|
+
: accent;
|
|
15
|
+
const ringShadow = Platform.OS === "ios" && effectiveSelected
|
|
16
|
+
? {
|
|
17
|
+
shadowColor: tone === "featured"
|
|
18
|
+
? theme.colors.deliveryOptionFeatured
|
|
19
|
+
: theme.colors.primary,
|
|
20
|
+
shadowOffset: { width: 0, height: 0 },
|
|
21
|
+
shadowOpacity: tone === "featured" ? 0.15 : 0.1,
|
|
22
|
+
shadowRadius: 2,
|
|
23
|
+
}
|
|
24
|
+
: {};
|
|
25
|
+
return StyleSheet.create({
|
|
26
|
+
card: {
|
|
27
|
+
backgroundColor: theme.colors.white,
|
|
28
|
+
borderRadius: theme.radius.none,
|
|
29
|
+
borderWidth,
|
|
30
|
+
borderColor,
|
|
31
|
+
paddingHorizontal: theme.spacing.default,
|
|
32
|
+
paddingVertical: theme.spacing.sm,
|
|
33
|
+
opacity: disabled ? 0.55 : 1,
|
|
34
|
+
...ringShadow,
|
|
35
|
+
},
|
|
36
|
+
topRow: {
|
|
37
|
+
flexDirection: "row",
|
|
38
|
+
alignItems: "flex-start",
|
|
39
|
+
justifyContent: "space-between",
|
|
40
|
+
},
|
|
41
|
+
leadingCluster: {
|
|
42
|
+
flexDirection: "row",
|
|
43
|
+
alignItems: "flex-start",
|
|
44
|
+
flex: 1,
|
|
45
|
+
marginRight: theme.spacing.xs,
|
|
46
|
+
},
|
|
47
|
+
badgesColumn: {
|
|
48
|
+
flex: 1,
|
|
49
|
+
marginLeft: theme.spacing.xs,
|
|
50
|
+
},
|
|
51
|
+
recommendedBadge: {
|
|
52
|
+
flexDirection: "row",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
alignSelf: "flex-start",
|
|
55
|
+
backgroundColor: theme.colors.backgroundDeliveryRecommendedBadge,
|
|
56
|
+
paddingHorizontal: theme.spacing.xs,
|
|
57
|
+
paddingVertical: 5.5,
|
|
58
|
+
gap: theme.spacing.xxs,
|
|
59
|
+
},
|
|
60
|
+
recommendedText: {
|
|
61
|
+
fontFamily: theme.fonts.inter.bold,
|
|
62
|
+
fontSize: theme.fonts.sizes.xxxs,
|
|
63
|
+
lineHeight: 15,
|
|
64
|
+
letterSpacing: 0.25,
|
|
65
|
+
textTransform: "uppercase",
|
|
66
|
+
color: theme.colors.white,
|
|
67
|
+
},
|
|
68
|
+
advantageousBadge: {
|
|
69
|
+
alignSelf: "flex-start",
|
|
70
|
+
marginTop: theme.spacing.xxs,
|
|
71
|
+
backgroundColor: theme.colors.backgroundDeliveryAdvantageBadge,
|
|
72
|
+
paddingHorizontal: theme.spacing.xs,
|
|
73
|
+
paddingVertical: 5.5,
|
|
74
|
+
},
|
|
75
|
+
advantageousText: {
|
|
76
|
+
fontFamily: theme.fonts.inter.bold,
|
|
77
|
+
fontSize: theme.fonts.sizes.xxxs,
|
|
78
|
+
lineHeight: 15,
|
|
79
|
+
letterSpacing: 0.25,
|
|
80
|
+
textTransform: "uppercase",
|
|
81
|
+
color: theme.colors.textDeliveryAdvantageBadge,
|
|
82
|
+
},
|
|
83
|
+
radioOuterSelected: {
|
|
84
|
+
width: 20,
|
|
85
|
+
height: 20,
|
|
86
|
+
borderRadius: theme.radius.round,
|
|
87
|
+
borderWidth: theme.borderWidth.md,
|
|
88
|
+
borderColor: accent,
|
|
89
|
+
backgroundColor: accent,
|
|
90
|
+
alignItems: "center",
|
|
91
|
+
justifyContent: "center",
|
|
92
|
+
marginLeft: theme.spacing.xs,
|
|
93
|
+
},
|
|
94
|
+
radioOuterIdle: {
|
|
95
|
+
width: 20,
|
|
96
|
+
height: 20,
|
|
97
|
+
borderRadius: theme.radius.round,
|
|
98
|
+
borderWidth: theme.borderWidth.md,
|
|
99
|
+
borderColor: theme.colors.borderDeliveryRadioIdle,
|
|
100
|
+
backgroundColor: theme.colors.white,
|
|
101
|
+
alignItems: "center",
|
|
102
|
+
justifyContent: "center",
|
|
103
|
+
marginLeft: theme.spacing.xs,
|
|
104
|
+
},
|
|
105
|
+
radioInner: {
|
|
106
|
+
width: 8,
|
|
107
|
+
height: 8,
|
|
108
|
+
borderRadius: theme.radius.round,
|
|
109
|
+
backgroundColor: theme.colors.white,
|
|
110
|
+
},
|
|
111
|
+
titleRow: {
|
|
112
|
+
flexDirection: "row",
|
|
113
|
+
alignItems: "center",
|
|
114
|
+
justifyContent: "space-between",
|
|
115
|
+
marginTop: theme.spacing.sm,
|
|
116
|
+
},
|
|
117
|
+
title: {
|
|
118
|
+
fontFamily: theme.fonts.inter.semiBold,
|
|
119
|
+
fontSize: 14,
|
|
120
|
+
lineHeight: 18.13,
|
|
121
|
+
color: theme.colors.textPrimary,
|
|
122
|
+
flex: 1,
|
|
123
|
+
marginRight: theme.spacing.sm,
|
|
124
|
+
},
|
|
125
|
+
trailingTitle: {
|
|
126
|
+
fontFamily: theme.fonts.inter.semiBold,
|
|
127
|
+
fontSize: 14,
|
|
128
|
+
lineHeight: 18.13,
|
|
129
|
+
color: theme.colors.textPrimary,
|
|
130
|
+
textAlign: "right",
|
|
131
|
+
},
|
|
132
|
+
subtitle: {
|
|
133
|
+
marginTop: theme.spacing.xxs,
|
|
134
|
+
},
|
|
135
|
+
subtitleText: {
|
|
136
|
+
fontFamily: theme.fonts.inter.regular,
|
|
137
|
+
fontSize: 13,
|
|
138
|
+
lineHeight: 17.88,
|
|
139
|
+
color: theme.colors.textDeliveryMuted,
|
|
140
|
+
},
|
|
141
|
+
availabilityRow: {
|
|
142
|
+
flexDirection: "row",
|
|
143
|
+
alignItems: "flex-start",
|
|
144
|
+
marginTop: theme.spacing.sm,
|
|
145
|
+
},
|
|
146
|
+
availabilityBar: {
|
|
147
|
+
width: 5,
|
|
148
|
+
height: 8,
|
|
149
|
+
marginRight: theme.spacing.xs,
|
|
150
|
+
marginTop: 4,
|
|
151
|
+
backgroundColor: theme.colors.deliveryAvailabilityIndicator,
|
|
152
|
+
borderRadius: theme.radius.none,
|
|
153
|
+
},
|
|
154
|
+
footerLink: {
|
|
155
|
+
flexDirection: "row",
|
|
156
|
+
alignItems: "center",
|
|
157
|
+
marginTop: theme.spacing.sm,
|
|
158
|
+
alignSelf: "flex-start",
|
|
159
|
+
gap: theme.spacing.xxs,
|
|
160
|
+
},
|
|
161
|
+
footerLinkText: {
|
|
162
|
+
fontFamily: theme.fonts.inter.semiBold,
|
|
163
|
+
fontSize: 13,
|
|
164
|
+
lineHeight: 19.5,
|
|
165
|
+
color: theme.colors.primary,
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
/** Tom visual da opção — handoff: featured = verde (sucesso), default = marca (azul). */
|
|
4
|
+
export type DeliveryOptionTone = "featured" | "default";
|
|
5
|
+
export type DeliveryOptionCardProps = {
|
|
6
|
+
testID?: string;
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
tone?: DeliveryOptionTone;
|
|
9
|
+
/** Equivalente ao handoff · bloqueia toque e aplica tratamento visual do estado indisponível */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** Estado selecionado (borda 2px + anel conforme DS checkout) — ignorado visualmente quando `disabled` */
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
/** Lista de tags / badges acima do título — substitui `showRecommendedBadge` + `advantageousLabel` quando definido */
|
|
14
|
+
tags?: ReactNode;
|
|
15
|
+
/** Ao tocar no cartão inteiro */
|
|
16
|
+
onPress?: () => void;
|
|
17
|
+
leadingIcon?: ReactNode;
|
|
18
|
+
showRecommendedBadge?: boolean;
|
|
19
|
+
recommendedBadgeIcon?: ReactNode;
|
|
20
|
+
advantageousLabel?: string;
|
|
21
|
+
title: string;
|
|
22
|
+
trailingTitle?: string;
|
|
23
|
+
subtitle?: ReactNode;
|
|
24
|
+
/** Alias de `subtitle` (layouts antigos) */
|
|
25
|
+
description?: ReactNode;
|
|
26
|
+
/** Barra lateral de contexto (ex.: aviso misto casa/loja) */
|
|
27
|
+
showAvailabilityIndicator?: boolean;
|
|
28
|
+
availabilitySummary?: ReactNode;
|
|
29
|
+
changeStoreLabel?: string;
|
|
30
|
+
onChangeStorePress?: () => void;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=delivery-option-card.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-option-card.types.d.ts","sourceRoot":"","sources":["../../../src/components/delivery-option-card/delivery-option-card.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,yFAAyF;AACzF,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,SAAS,CAAC;AAExD,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,gGAAgG;IAChG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0GAA0G;IAC1G,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sHAAsH;IACtH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,SAAS,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,6DAA6D;IAC7D,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,mBAAmB,CAAC,EAAE,SAAS,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/delivery-option-card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,YAAY,EACV,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DeliveryOptionCard } from "./delivery-option-card.component";
|
package/dist/components/delivery-orientation-banner/delivery-orientation-banner.component.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { DeliveryOrientationBannerProps } from "./delivery-orientation-banner.types";
|
|
3
|
+
export declare const DeliveryOrientationBanner: React.NamedExoticComponent<DeliveryOrientationBannerProps>;
|
|
4
|
+
//# sourceMappingURL=delivery-orientation-banner.component.d.ts.map
|
package/dist/components/delivery-orientation-banner/delivery-orientation-banner.component.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-orientation-banner.component.d.ts","sourceRoot":"","sources":["../../../src/components/delivery-orientation-banner/delivery-orientation-banner.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAiC1F,eAAO,MAAM,yBAAyB,4DAErC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Text, View } from "react-native";
|
|
4
|
+
import { InfoIcon } from "../../icons";
|
|
5
|
+
import { useTheme } from "../../themes";
|
|
6
|
+
import { useDeliveryOrientationBannerStyles } from "./delivery-orientation-banner.styles";
|
|
7
|
+
const DeliveryOrientationBannerComponent = ({ testID, style, icon, line1, emphasis, afterEmphasis = "", line3, }) => {
|
|
8
|
+
const styles = useDeliveryOrientationBannerStyles();
|
|
9
|
+
const { colors } = useTheme();
|
|
10
|
+
return (_jsxs(View, { style: [styles.container, style], testID: testID, children: [_jsx(View, { style: styles.iconWrap, children: icon !== null && icon !== void 0 ? icon : _jsx(InfoIcon, { size: 20, color: colors.iconInformation }) }), _jsxs(View, { style: styles.textBlock, children: [_jsx(Text, { style: styles.line1, children: line1 }), _jsxs(Text, { style: styles.regular, children: [_jsx(Text, { style: styles.emphasis, children: emphasis }), afterEmphasis] }), _jsx(Text, { style: styles.regular, children: line3 })] })] }));
|
|
11
|
+
};
|
|
12
|
+
export const DeliveryOrientationBanner = React.memo(DeliveryOrientationBannerComponent);
|
|
13
|
+
DeliveryOrientationBanner.displayName = "DeliveryOrientationBanner";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const useDeliveryOrientationBannerStyles: () => {
|
|
2
|
+
container: {
|
|
3
|
+
flexDirection: "row";
|
|
4
|
+
alignItems: "flex-start";
|
|
5
|
+
paddingVertical: 12;
|
|
6
|
+
paddingHorizontal: 14;
|
|
7
|
+
backgroundColor: "#EFF5FF";
|
|
8
|
+
borderWidth: 1;
|
|
9
|
+
borderColor: "#DBE7FF";
|
|
10
|
+
borderRadius: 0;
|
|
11
|
+
};
|
|
12
|
+
iconWrap: {
|
|
13
|
+
marginTop: number;
|
|
14
|
+
marginRight: 12;
|
|
15
|
+
};
|
|
16
|
+
textBlock: {
|
|
17
|
+
flex: number;
|
|
18
|
+
};
|
|
19
|
+
line1: {
|
|
20
|
+
fontFamily: "Inter-Regular";
|
|
21
|
+
fontSize: number;
|
|
22
|
+
lineHeight: number;
|
|
23
|
+
color: "#364153";
|
|
24
|
+
};
|
|
25
|
+
emphasis: {
|
|
26
|
+
fontFamily: "Inter-SemiBold";
|
|
27
|
+
fontSize: number;
|
|
28
|
+
lineHeight: number;
|
|
29
|
+
color: "#101010";
|
|
30
|
+
};
|
|
31
|
+
regular: {
|
|
32
|
+
fontFamily: "Inter-Regular";
|
|
33
|
+
fontSize: number;
|
|
34
|
+
lineHeight: number;
|
|
35
|
+
color: "#364153";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=delivery-orientation-banner.styles.d.ts.map
|
package/dist/components/delivery-orientation-banner/delivery-orientation-banner.styles.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-orientation-banner.styles.d.ts","sourceRoot":"","sources":["../../../src/components/delivery-orientation-banner/delivery-orientation-banner.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC9C,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { useTheme } from "../../themes";
|
|
3
|
+
export const useDeliveryOrientationBannerStyles = () => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
flexDirection: "row",
|
|
8
|
+
alignItems: "flex-start",
|
|
9
|
+
paddingVertical: theme.spacing.sm,
|
|
10
|
+
paddingHorizontal: theme.spacing.default,
|
|
11
|
+
backgroundColor: theme.colors.backgroundCheckoutOrientacao,
|
|
12
|
+
borderWidth: theme.borderWidth.sm,
|
|
13
|
+
borderColor: theme.colors.borderCheckoutOrientacao,
|
|
14
|
+
borderRadius: theme.radius.none,
|
|
15
|
+
},
|
|
16
|
+
iconWrap: {
|
|
17
|
+
marginTop: 2,
|
|
18
|
+
marginRight: theme.spacing.sm,
|
|
19
|
+
},
|
|
20
|
+
textBlock: {
|
|
21
|
+
flex: 1,
|
|
22
|
+
},
|
|
23
|
+
line1: {
|
|
24
|
+
fontFamily: theme.fonts.inter.regular,
|
|
25
|
+
fontSize: 13,
|
|
26
|
+
lineHeight: 17.88,
|
|
27
|
+
color: theme.colors.textCheckoutOrientacao,
|
|
28
|
+
},
|
|
29
|
+
emphasis: {
|
|
30
|
+
fontFamily: theme.fonts.inter.semiBold,
|
|
31
|
+
fontSize: 13,
|
|
32
|
+
lineHeight: 17.88,
|
|
33
|
+
color: theme.colors.textPrimary,
|
|
34
|
+
},
|
|
35
|
+
regular: {
|
|
36
|
+
fontFamily: theme.fonts.inter.regular,
|
|
37
|
+
fontSize: 13,
|
|
38
|
+
lineHeight: 17.88,
|
|
39
|
+
color: theme.colors.textCheckoutOrientacao,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
export type DeliveryOrientationBannerProps = {
|
|
4
|
+
testID?: string;
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
/** Ícone à esquerda (ex.: informação) */
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
/** Primeira linha do texto */
|
|
9
|
+
line1: string;
|
|
10
|
+
/** Trecho em destaque (peso semibold) */
|
|
11
|
+
emphasis: string;
|
|
12
|
+
/** Continuação na mesma linha, após o destaque */
|
|
13
|
+
afterEmphasis?: string;
|
|
14
|
+
/** Linha final */
|
|
15
|
+
line3: string;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=delivery-orientation-banner.types.d.ts.map
|
package/dist/components/delivery-orientation-banner/delivery-orientation-banner.types.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-orientation-banner.types.d.ts","sourceRoot":"","sources":["../../../src/components/delivery-orientation-banner/delivery-orientation-banner.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,8BAA8B,GAAG;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,yCAAyC;IACzC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/delivery-orientation-banner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,YAAY,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DeliveryOrientationBanner } from "./delivery-orientation-banner.component";
|
|
@@ -11,6 +11,8 @@ export * from "./card/index";
|
|
|
11
11
|
export * from "./cashback-banner/index";
|
|
12
12
|
export * from "./category-item/index";
|
|
13
13
|
export * from "./checkbox/index";
|
|
14
|
+
export * from "./delivery-option-card/index";
|
|
15
|
+
export * from "./delivery-orientation-banner/index";
|
|
14
16
|
export * from "./event-card/index";
|
|
15
17
|
export * from "./filter-chip/index";
|
|
16
18
|
export * from "./information-card/index";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AAEvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AAEvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -11,6 +11,8 @@ export * from "./card/index";
|
|
|
11
11
|
export * from "./cashback-banner/index";
|
|
12
12
|
export * from "./category-item/index";
|
|
13
13
|
export * from "./checkbox/index";
|
|
14
|
+
export * from "./delivery-option-card/index";
|
|
15
|
+
export * from "./delivery-orientation-banner/index";
|
|
14
16
|
export * from "./event-card/index";
|
|
15
17
|
export * from "./filter-chip/index";
|
|
16
18
|
export * from "./information-card/index";
|
package/dist/themes/dark.d.ts
CHANGED
|
@@ -90,6 +90,28 @@ declare const dark: {
|
|
|
90
90
|
readonly backgroundRecommendationTable: "#f5f5f5";
|
|
91
91
|
readonly backgroundRecommendationScroll: "#E1E4E7";
|
|
92
92
|
readonly backgroundRecommendationScrollText: "#687787";
|
|
93
|
+
readonly backgroundCheckoutOrientacao: "#EFF5FF";
|
|
94
|
+
readonly borderCheckoutOrientacao: "#DBE7FF";
|
|
95
|
+
readonly textCheckoutOrientacao: "#364153";
|
|
96
|
+
readonly deliveryOptionFeatured: "#00A859";
|
|
97
|
+
readonly deliveryOptionFeaturedRing: "rgba(0, 168, 89, 0.15)";
|
|
98
|
+
readonly deliveryOptionBrandRing: "rgba(59, 73, 223, 0.1)";
|
|
99
|
+
readonly backgroundDeliveryRecommendedBadge: "#00A859";
|
|
100
|
+
readonly backgroundDeliveryAdvantageBadge: "#E8F7EF";
|
|
101
|
+
readonly textDeliveryAdvantageBadge: "#006B39";
|
|
102
|
+
readonly textDeliveryMuted: "#4A5565";
|
|
103
|
+
readonly deliveryAvailabilityIndicator: "#E85D04";
|
|
104
|
+
readonly borderDeliveryIdle: "#E5E7EB";
|
|
105
|
+
readonly borderDeliveryRadioIdle: "#D1D5DC";
|
|
106
|
+
readonly backgroundDeliveryExpressBadge: "#FFF4EC";
|
|
107
|
+
readonly textDeliveryExpressBadge: "#A23F02";
|
|
108
|
+
readonly backgroundTagBrandSubtle: "#E8EAFF";
|
|
109
|
+
readonly textTagBrandSubtle: "#3643BA";
|
|
110
|
+
readonly backgroundTagMarketplaceSubtle: "#FDF2F8";
|
|
111
|
+
readonly textTagMarketplaceSubtle: "#9D174D";
|
|
112
|
+
readonly backgroundTagMarketplaceFilled: "#BE185D";
|
|
113
|
+
readonly backgroundTagNeutralFilled: "#383838";
|
|
114
|
+
readonly backgroundTagWarningFilled: "#EA580C";
|
|
93
115
|
readonly borderPrimary: "#B3BAC3";
|
|
94
116
|
readonly borderSecondary: "#D9DDE1";
|
|
95
117
|
readonly borderHover: "#949494";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dark.d.ts","sourceRoot":"","sources":["../../src/themes/dark.ts"],"names":[],"mappings":"AAaA,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"dark.d.ts","sourceRoot":"","sources":["../../src/themes/dark.ts"],"names":[],"mappings":"AAaA,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsNA,CAAC;AAEX,eAAe,IAAI,CAAC"}
|
package/dist/themes/dark.js
CHANGED
|
@@ -45,6 +45,28 @@ const dark = {
|
|
|
45
45
|
backgroundRecommendationTable: "#f5f5f5",
|
|
46
46
|
backgroundRecommendationScroll: "#E1E4E7",
|
|
47
47
|
backgroundRecommendationScrollText: "#687787",
|
|
48
|
+
backgroundCheckoutOrientacao: "#EFF5FF",
|
|
49
|
+
borderCheckoutOrientacao: "#DBE7FF",
|
|
50
|
+
textCheckoutOrientacao: "#364153",
|
|
51
|
+
deliveryOptionFeatured: "#00A859",
|
|
52
|
+
deliveryOptionFeaturedRing: "rgba(0, 168, 89, 0.15)",
|
|
53
|
+
deliveryOptionBrandRing: "rgba(59, 73, 223, 0.1)",
|
|
54
|
+
backgroundDeliveryRecommendedBadge: "#00A859",
|
|
55
|
+
backgroundDeliveryAdvantageBadge: "#E8F7EF",
|
|
56
|
+
textDeliveryAdvantageBadge: "#006B39",
|
|
57
|
+
textDeliveryMuted: "#4A5565",
|
|
58
|
+
deliveryAvailabilityIndicator: "#E85D04",
|
|
59
|
+
borderDeliveryIdle: "#E5E7EB",
|
|
60
|
+
borderDeliveryRadioIdle: "#D1D5DC",
|
|
61
|
+
backgroundDeliveryExpressBadge: "#FFF4EC",
|
|
62
|
+
textDeliveryExpressBadge: "#A23F02",
|
|
63
|
+
backgroundTagBrandSubtle: "#E8EAFF",
|
|
64
|
+
textTagBrandSubtle: "#3643BA",
|
|
65
|
+
backgroundTagMarketplaceSubtle: "#FDF2F8",
|
|
66
|
+
textTagMarketplaceSubtle: "#9D174D",
|
|
67
|
+
backgroundTagMarketplaceFilled: "#BE185D",
|
|
68
|
+
backgroundTagNeutralFilled: "#383838",
|
|
69
|
+
backgroundTagWarningFilled: "#EA580C",
|
|
48
70
|
borderPrimary: "#B3BAC3",
|
|
49
71
|
borderSecondary: "#D9DDE1",
|
|
50
72
|
borderHover: "#949494",
|
package/dist/themes/index.d.ts
CHANGED
|
@@ -92,6 +92,28 @@ declare const useTheme: () => {
|
|
|
92
92
|
readonly backgroundRecommendationTable: "#f5f5f5";
|
|
93
93
|
readonly backgroundRecommendationScroll: "#E1E4E7";
|
|
94
94
|
readonly backgroundRecommendationScrollText: "#687787";
|
|
95
|
+
readonly backgroundCheckoutOrientacao: "#EFF5FF";
|
|
96
|
+
readonly borderCheckoutOrientacao: "#DBE7FF";
|
|
97
|
+
readonly textCheckoutOrientacao: "#364153";
|
|
98
|
+
readonly deliveryOptionFeatured: "#00A859";
|
|
99
|
+
readonly deliveryOptionFeaturedRing: "rgba(0, 168, 89, 0.15)";
|
|
100
|
+
readonly deliveryOptionBrandRing: "rgba(59, 73, 223, 0.1)";
|
|
101
|
+
readonly backgroundDeliveryRecommendedBadge: "#00A859";
|
|
102
|
+
readonly backgroundDeliveryAdvantageBadge: "#E8F7EF";
|
|
103
|
+
readonly textDeliveryAdvantageBadge: "#006B39";
|
|
104
|
+
readonly textDeliveryMuted: "#4A5565";
|
|
105
|
+
readonly deliveryAvailabilityIndicator: "#E85D04";
|
|
106
|
+
readonly borderDeliveryIdle: "#E5E7EB";
|
|
107
|
+
readonly borderDeliveryRadioIdle: "#D1D5DC";
|
|
108
|
+
readonly backgroundDeliveryExpressBadge: "#FFF4EC";
|
|
109
|
+
readonly textDeliveryExpressBadge: "#A23F02";
|
|
110
|
+
readonly backgroundTagBrandSubtle: "#E8EAFF";
|
|
111
|
+
readonly textTagBrandSubtle: "#3643BA";
|
|
112
|
+
readonly backgroundTagMarketplaceSubtle: "#FDF2F8";
|
|
113
|
+
readonly textTagMarketplaceSubtle: "#9D174D";
|
|
114
|
+
readonly backgroundTagMarketplaceFilled: "#BE185D";
|
|
115
|
+
readonly backgroundTagNeutralFilled: "#383838";
|
|
116
|
+
readonly backgroundTagWarningFilled: "#EA580C";
|
|
95
117
|
readonly borderPrimary: "#B3BAC3";
|
|
96
118
|
readonly borderSecondary: "#D9DDE1";
|
|
97
119
|
readonly borderHover: "#949494";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/themes/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,QAAA,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/themes/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEb,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/themes/light.d.ts
CHANGED
|
@@ -90,6 +90,30 @@ declare const light: {
|
|
|
90
90
|
readonly backgroundRecommendationTable: "#f5f5f5";
|
|
91
91
|
readonly backgroundRecommendationScroll: "#E1E4E7";
|
|
92
92
|
readonly backgroundRecommendationScrollText: "#687787";
|
|
93
|
+
readonly backgroundCheckoutOrientacao: "#EFF5FF";
|
|
94
|
+
readonly borderCheckoutOrientacao: "#DBE7FF";
|
|
95
|
+
readonly textCheckoutOrientacao: "#364153";
|
|
96
|
+
readonly deliveryOptionFeatured: "#00A859";
|
|
97
|
+
readonly deliveryOptionFeaturedRing: "rgba(0, 168, 89, 0.15)";
|
|
98
|
+
readonly deliveryOptionBrandRing: "rgba(59, 73, 223, 0.1)";
|
|
99
|
+
readonly backgroundDeliveryRecommendedBadge: "#00A859";
|
|
100
|
+
readonly backgroundDeliveryAdvantageBadge: "#E8F7EF";
|
|
101
|
+
readonly textDeliveryAdvantageBadge: "#006B39";
|
|
102
|
+
readonly textDeliveryMuted: "#4A5565";
|
|
103
|
+
readonly deliveryAvailabilityIndicator: "#E85D04";
|
|
104
|
+
/** Checkout · DeliveryOptionCard (handoff idle / radio) */
|
|
105
|
+
readonly borderDeliveryIdle: "#E5E7EB";
|
|
106
|
+
readonly borderDeliveryRadioIdle: "#D1D5DC";
|
|
107
|
+
readonly backgroundDeliveryExpressBadge: "#FFF4EC";
|
|
108
|
+
readonly textDeliveryExpressBadge: "#A23F02";
|
|
109
|
+
/** Tag/Badge — handoff catálogo (outline + filled) */
|
|
110
|
+
readonly backgroundTagBrandSubtle: "#E8EAFF";
|
|
111
|
+
readonly textTagBrandSubtle: "#3643BA";
|
|
112
|
+
readonly backgroundTagMarketplaceSubtle: "#FDF2F8";
|
|
113
|
+
readonly textTagMarketplaceSubtle: "#9D174D";
|
|
114
|
+
readonly backgroundTagMarketplaceFilled: "#BE185D";
|
|
115
|
+
readonly backgroundTagNeutralFilled: "#383838";
|
|
116
|
+
readonly backgroundTagWarningFilled: "#EA580C";
|
|
93
117
|
readonly borderPrimary: "#B3BAC3";
|
|
94
118
|
readonly borderSecondary: "#D9DDE1";
|
|
95
119
|
readonly borderHover: "#949494";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../src/themes/light.ts"],"names":[],"mappings":"AAaA,QAAA,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../src/themes/light.ts"],"names":[],"mappings":"AAaA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAwDP,2DAA2D;;;;;QAK3D,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmKhD,CAAC;AAEX,eAAe,KAAK,CAAC"}
|
package/dist/themes/light.js
CHANGED
|
@@ -45,6 +45,30 @@ const light = {
|
|
|
45
45
|
backgroundRecommendationTable: "#f5f5f5",
|
|
46
46
|
backgroundRecommendationScroll: "#E1E4E7",
|
|
47
47
|
backgroundRecommendationScrollText: "#687787",
|
|
48
|
+
backgroundCheckoutOrientacao: "#EFF5FF",
|
|
49
|
+
borderCheckoutOrientacao: "#DBE7FF",
|
|
50
|
+
textCheckoutOrientacao: "#364153",
|
|
51
|
+
deliveryOptionFeatured: "#00A859",
|
|
52
|
+
deliveryOptionFeaturedRing: "rgba(0, 168, 89, 0.15)",
|
|
53
|
+
deliveryOptionBrandRing: "rgba(59, 73, 223, 0.1)",
|
|
54
|
+
backgroundDeliveryRecommendedBadge: "#00A859",
|
|
55
|
+
backgroundDeliveryAdvantageBadge: "#E8F7EF",
|
|
56
|
+
textDeliveryAdvantageBadge: "#006B39",
|
|
57
|
+
textDeliveryMuted: "#4A5565",
|
|
58
|
+
deliveryAvailabilityIndicator: "#E85D04",
|
|
59
|
+
/** Checkout · DeliveryOptionCard (handoff idle / radio) */
|
|
60
|
+
borderDeliveryIdle: "#E5E7EB",
|
|
61
|
+
borderDeliveryRadioIdle: "#D1D5DC",
|
|
62
|
+
backgroundDeliveryExpressBadge: "#FFF4EC",
|
|
63
|
+
textDeliveryExpressBadge: "#A23F02",
|
|
64
|
+
/** Tag/Badge — handoff catálogo (outline + filled) */
|
|
65
|
+
backgroundTagBrandSubtle: "#E8EAFF",
|
|
66
|
+
textTagBrandSubtle: "#3643BA",
|
|
67
|
+
backgroundTagMarketplaceSubtle: "#FDF2F8",
|
|
68
|
+
textTagMarketplaceSubtle: "#9D174D",
|
|
69
|
+
backgroundTagMarketplaceFilled: "#BE185D",
|
|
70
|
+
backgroundTagNeutralFilled: "#383838",
|
|
71
|
+
backgroundTagWarningFilled: "#EA580C",
|
|
48
72
|
borderPrimary: "#B3BAC3",
|
|
49
73
|
borderSecondary: "#D9DDE1",
|
|
50
74
|
borderHover: "#949494",
|