decathlon-ui 0.3.2 → 0.3.4
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/components/button/button.component.d.ts.map +1 -1
- package/dist/components/button/button.component.js +1 -3
- package/dist/components/button/button.props.d.ts +3 -2
- package/dist/components/button/button.props.d.ts.map +1 -1
- package/dist/components/filter-chip/filter-chip.component.d.ts.map +1 -1
- package/dist/components/filter-chip/filter-chip.component.js +1 -1
- package/dist/components/filter-chip/filter-chip.styles.d.ts +6 -10
- package/dist/components/filter-chip/filter-chip.styles.d.ts.map +1 -1
- package/dist/components/filter-chip/filter-chip.styles.js +4 -5
- package/dist/components/information-card/information-card.component.d.ts.map +1 -1
- package/dist/components/information-card/information-card.component.js +1 -1
- package/dist/components/information-card/information-card.types.d.ts +1 -1
- package/dist/components/information-card/information-card.types.d.ts.map +1 -1
- package/dist/components/input/input.component.d.ts +1 -1
- package/dist/components/input/input.component.d.ts.map +1 -1
- package/dist/components/input/input.component.js +5 -5
- package/dist/components/input/input.types.d.ts +1 -1
- package/dist/components/input/input.types.d.ts.map +1 -1
- package/dist/components/product-card/product-card.component.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.component.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAiB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"button.component.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAiB,MAAM,gBAAgB,CAAC;AAqC5D,eAAO,MAAM,MAAM,yCAA8B,CAAC"}
|
|
@@ -12,9 +12,7 @@ const ButtonComponent = ({ label, loading, variant, fullWidth, size, disabled, .
|
|
|
12
12
|
});
|
|
13
13
|
const { icon: Icon } = rest;
|
|
14
14
|
const { colors } = useTheme();
|
|
15
|
-
return (_jsx(TouchableOpacity, { style: [buttonStyle.container, disabled && buttonStyle.disabled], ...rest, children: loading ? (
|
|
16
|
-
// <ActivityIndicator color="#fff" size="small" animating={true} />
|
|
17
|
-
_jsx(Loading, { size: 28, containerStyle: { padding: 0 } })) : (_jsxs(_Fragment, { children: [rest.icon && _jsx(Icon, { stroke: 0.5, color: colors.backgroundAction1 }), _jsx(Text, { style: buttonStyle.buttonText, children: label })] })) }));
|
|
15
|
+
return (_jsx(TouchableOpacity, { style: [buttonStyle.container, disabled && buttonStyle.disabled], ...rest, children: loading ? (_jsx(Loading, { size: 28, containerStyle: { padding: 0 } })) : (_jsxs(_Fragment, { children: [rest.icon && _jsx(Icon, { stroke: 0.5, color: colors.backgroundAction1 }), _jsx(Text, { style: buttonStyle.buttonText, children: label })] })) }));
|
|
18
16
|
};
|
|
19
17
|
export const Button = React.memo(ButtonComponent);
|
|
20
18
|
Button.displayName = "Button";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TouchableOpacityProps } from "react-native";
|
|
1
2
|
export type ButtonProps = {
|
|
2
3
|
onPress?: () => void;
|
|
3
4
|
label?: string;
|
|
@@ -5,9 +6,9 @@ export type ButtonProps = {
|
|
|
5
6
|
variant?: "primary" | "primary-inverted" | "secondary" | "secondary-inverted" | "converted" | "danger" | "danger-inverted" | "danger-outline";
|
|
6
7
|
fullWidth?: boolean;
|
|
7
8
|
size?: "small" | "medium" | "large";
|
|
8
|
-
icon?: any;
|
|
9
|
+
icon?: React.ReactNode | React.ReactElement | any;
|
|
9
10
|
disabled?: boolean;
|
|
10
|
-
};
|
|
11
|
+
} & TouchableOpacityProps;
|
|
11
12
|
export declare enum ButtonVariant {
|
|
12
13
|
primary = "primary",
|
|
13
14
|
primaryInverted = "primary-inverted",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.props.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.props.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EACJ,SAAS,GACT,kBAAkB,GAClB,WAAW,GACX,oBAAoB,GACpB,WAAW,GACX,QAAQ,GACR,iBAAiB,GACjB,gBAAgB,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,IAAI,CAAC,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"button.props.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EACJ,SAAS,GACT,kBAAkB,GAClB,WAAW,GACX,oBAAoB,GACpB,WAAW,GACX,QAAQ,GACR,iBAAiB,GACjB,gBAAgB,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,YAAY,GAAG,GAAG,CAAC;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,qBAAqB,CAAC;AAE1B,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,eAAe,qBAAqB;IACpC,SAAS,cAAc;IACvB,iBAAiB,uBAAuB;IACxC,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,cAAc,oBAAoB;IAClC,aAAa,mBAAmB;CACjC;AAED,oBAAY,UAAU;IACpB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-chip.component.d.ts","sourceRoot":"","sources":["../../../src/components/filter-chip/filter-chip.component.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"filter-chip.component.d.ts","sourceRoot":"","sources":["../../../src/components/filter-chip/filter-chip.component.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAkEtD,eAAO,MAAM,UAAU,6CAAkC,CAAC"}
|
|
@@ -13,7 +13,7 @@ const FilterChipComponent = ({ label, selected = false, count, onPress, style, t
|
|
|
13
13
|
const renderContent = () => {
|
|
14
14
|
// Caso 1: Chip com ícone de filtro e contador (sem label)
|
|
15
15
|
if (!label && count !== undefined) {
|
|
16
|
-
return (_jsxs(View, { style: styles.countContainer, children: [_jsx(SlidersIcon, { color: selected ? theme.colors.textPrimary : theme.colors.textSecondary, size: 20, style: styles.icon }), _jsx(Text, { style: styles.countText, children: count })] }));
|
|
16
|
+
return (_jsxs(View, { style: styles.countContainer, children: [_jsx(SlidersIcon, { color: selected ? theme.colors.textPrimary : theme.colors.textSecondary, size: 20, style: styles.icon }), count > 0 && _jsx(Text, { style: styles.countText, children: count })] }));
|
|
17
17
|
}
|
|
18
18
|
// Caso 2: Chip com label e botão de ação (+ ou X)
|
|
19
19
|
if (label) {
|
|
@@ -5,7 +5,7 @@ export declare const useFilterChipStyles: (variant?: FilterChipVariant) => {
|
|
|
5
5
|
flexDirection: "row";
|
|
6
6
|
alignItems: "center";
|
|
7
7
|
paddingHorizontal: 16;
|
|
8
|
-
paddingVertical:
|
|
8
|
+
paddingVertical: 16;
|
|
9
9
|
borderRadius: 360;
|
|
10
10
|
borderWidth: 1;
|
|
11
11
|
backgroundColor: "#FFFFFF";
|
|
@@ -22,14 +22,12 @@ export declare const useFilterChipStyles: (variant?: FilterChipVariant) => {
|
|
|
22
22
|
color: "#101010";
|
|
23
23
|
fontFamily: "Inter-Medium";
|
|
24
24
|
fontSize: 14;
|
|
25
|
-
marginLeft: 8;
|
|
26
|
-
};
|
|
27
|
-
icon: {
|
|
28
|
-
marginRight: 4;
|
|
29
25
|
};
|
|
26
|
+
icon: {};
|
|
30
27
|
countContainer: {
|
|
31
28
|
flexDirection: "row";
|
|
32
29
|
alignItems: "center";
|
|
30
|
+
gap: 8;
|
|
33
31
|
};
|
|
34
32
|
actionIcon: {
|
|
35
33
|
marginLeft: 8;
|
|
@@ -39,7 +37,7 @@ export declare const useFilterChipStyles: (variant?: FilterChipVariant) => {
|
|
|
39
37
|
flexDirection: "row";
|
|
40
38
|
alignItems: "center";
|
|
41
39
|
paddingHorizontal: 16;
|
|
42
|
-
paddingVertical:
|
|
40
|
+
paddingVertical: 16;
|
|
43
41
|
borderRadius: 360;
|
|
44
42
|
borderWidth: 1;
|
|
45
43
|
borderColor: "#D9DDE1";
|
|
@@ -53,18 +51,16 @@ export declare const useFilterChipStyles: (variant?: FilterChipVariant) => {
|
|
|
53
51
|
lineHeight: number;
|
|
54
52
|
letterSpacing: number;
|
|
55
53
|
};
|
|
56
|
-
icon: {
|
|
57
|
-
marginRight: 4;
|
|
58
|
-
};
|
|
54
|
+
icon: {};
|
|
59
55
|
countContainer: {
|
|
60
56
|
flexDirection: "row";
|
|
61
57
|
alignItems: "center";
|
|
58
|
+
gap: 8;
|
|
62
59
|
};
|
|
63
60
|
countText: {
|
|
64
61
|
fontFamily: "Inter-Medium";
|
|
65
62
|
fontSize: 14;
|
|
66
63
|
color: "#101010";
|
|
67
|
-
marginLeft: 8;
|
|
68
64
|
};
|
|
69
65
|
actionIcon: {
|
|
70
66
|
marginLeft: 8;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-chip.styles.d.ts","sourceRoot":"","sources":["../../../src/components/filter-chip/filter-chip.styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,eAAO,MAAM,mBAAmB,GAAI,UAAS,iBAA6B
|
|
1
|
+
{"version":3,"file":"filter-chip.styles.d.ts","sourceRoot":"","sources":["../../../src/components/filter-chip/filter-chip.styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,eAAO,MAAM,mBAAmB,GAAI,UAAS,iBAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFzE,CAAC"}
|
|
@@ -9,7 +9,7 @@ export const useFilterChipStyles = (variant = "default") => {
|
|
|
9
9
|
flexDirection: "row",
|
|
10
10
|
alignItems: "center",
|
|
11
11
|
paddingHorizontal: theme.spacing.md,
|
|
12
|
-
paddingVertical: theme.spacing.
|
|
12
|
+
paddingVertical: theme.spacing.md,
|
|
13
13
|
borderRadius: theme.radius.round,
|
|
14
14
|
borderWidth: theme.borderWidth.sm,
|
|
15
15
|
borderColor: theme.colors.borderSecondary,
|
|
@@ -23,18 +23,17 @@ export const useFilterChipStyles = (variant = "default") => {
|
|
|
23
23
|
lineHeight: 21,
|
|
24
24
|
letterSpacing: 0,
|
|
25
25
|
},
|
|
26
|
-
icon: {
|
|
27
|
-
marginRight: theme.spacing.xxs,
|
|
28
|
-
},
|
|
26
|
+
icon: {},
|
|
29
27
|
countContainer: {
|
|
30
28
|
flexDirection: "row",
|
|
31
29
|
alignItems: "center",
|
|
30
|
+
gap: theme.spacing.xs,
|
|
32
31
|
},
|
|
33
32
|
countText: {
|
|
34
33
|
fontFamily: theme.fonts.inter.medium,
|
|
35
34
|
fontSize: theme.fonts.sizes.xs,
|
|
36
35
|
color: theme.colors.textPrimary,
|
|
37
|
-
marginLeft: theme.spacing.xs,
|
|
36
|
+
// marginLeft: theme.spacing.xs,
|
|
38
37
|
},
|
|
39
38
|
actionIcon: {
|
|
40
39
|
marginLeft: theme.spacing.xs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"information-card.component.d.ts","sourceRoot":"","sources":["../../../src/components/information-card/information-card.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"information-card.component.d.ts","sourceRoot":"","sources":["../../../src/components/information-card/information-card.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAmFrE,eAAO,MAAM,eAAe,kDAAuC,CAAC"}
|
|
@@ -39,7 +39,7 @@ const processHighlightedText = (text, normalStyle, highlightedStyle) => {
|
|
|
39
39
|
};
|
|
40
40
|
const InformationCardComponent = ({ title, description, style, titleStyle, descriptionStyle, highlightedTextStyle, ...rest }) => {
|
|
41
41
|
const styles = useInformationCardStyles();
|
|
42
|
-
return (_jsxs(View, { style: [styles.container, style], ...rest, children: [_jsx(View, { style: { flexDirection: 'row', flexWrap: 'wrap' }, children: processHighlightedText(title, [styles.title, titleStyle], [styles.highlightedText, highlightedTextStyle]) }), _jsx(View, { style: { flexDirection: 'row', flexWrap: 'wrap' }, children: processHighlightedText(description, [styles.description, descriptionStyle], [styles.highlightedText, highlightedTextStyle]) })] }));
|
|
42
|
+
return (_jsxs(View, { style: [styles.container, style], ...rest, children: [title && (_jsx(View, { style: { flexDirection: 'row', flexWrap: 'wrap' }, children: processHighlightedText(title, [styles.title, titleStyle], [styles.highlightedText, highlightedTextStyle]) })), _jsx(View, { style: { flexDirection: 'row', flexWrap: 'wrap' }, children: processHighlightedText(description, [styles.description, descriptionStyle], [styles.highlightedText, highlightedTextStyle]) })] }));
|
|
43
43
|
};
|
|
44
44
|
export const InformationCard = React.memo(InformationCardComponent);
|
|
45
45
|
InformationCard.displayName = "InformationCard";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"information-card.types.d.ts","sourceRoot":"","sources":["../../../src/components/information-card/information-card.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"information-card.types.d.ts","sourceRoot":"","sources":["../../../src/components/information-card/information-card.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAE7B;;OAEG;IACH,oBAAoB,CAAC,EAAE,SAAS,CAAC;CAClC"}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { TextInputProps } from "react-native";
|
|
3
3
|
type MaskType = "cpf" | "phone" | "date" | "cep" | "custom";
|
|
4
4
|
interface InputProps extends TextInputProps {
|
|
5
|
-
label
|
|
5
|
+
label?: string;
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
error?: string;
|
|
8
8
|
value?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.component.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA6B,cAAc,EAAQ,MAAM,cAAc,CAAC;AAK/E,KAAK,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE5D,UAAU,UAAW,SAAQ,cAAc;IACzC,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"input.component.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA6B,cAAc,EAAQ,MAAM,cAAc,CAAC;AAK/E,KAAK,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE5D,UAAU,UAAW,SAAQ,cAAc;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA2KD,eAAO,MAAM,KAAK,wCAA6B,CAAC"}
|
|
@@ -87,18 +87,18 @@ const InputComponent = ({ label, placeholder, error, value, disabled = false, ma
|
|
|
87
87
|
inputRange: [0, 1],
|
|
88
88
|
outputRange: [1, 2],
|
|
89
89
|
});
|
|
90
|
-
return (_jsxs(View, { style: styles.container, accessible: true, testID: testID, accessibilityLabel: `${label} input field`, children: [_jsx(View, { style: styles.labelWrapper, children: _jsx(Text, { style: [
|
|
90
|
+
return (_jsxs(View, { style: styles.container, accessible: true, testID: testID, accessibilityLabel: `${label} input field`, children: [label && (_jsx(View, { style: styles.labelWrapper, children: _jsx(Text, { style: [
|
|
91
91
|
styles.labelText,
|
|
92
92
|
disabled && styles.disabledText,
|
|
93
|
-
], accessibilityRole: "text", children: label }) }),
|
|
93
|
+
], accessibilityRole: "text", children: label }) })), _jsx(Animated.View, { style: [
|
|
94
94
|
styles.inputContainer,
|
|
95
95
|
error && styles.inputError,
|
|
96
96
|
disabled && styles.inputDisabled,
|
|
97
97
|
isFocused && styles.inputFocused,
|
|
98
98
|
{ borderWidth },
|
|
99
|
-
], children:
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
], children: _jsx(TextInput, { style: [styles.input, disabled && styles.inputTextDisabled], placeholder: placeholder, value: value, onChangeText: handleChangeText, editable: !disabled, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), accessibilityLabel: label, accessibilityState: {
|
|
100
|
+
disabled: disabled,
|
|
101
|
+
}, placeholderTextColor: "#A4ADB7", ...rest }) }), error && _jsx(ErrorMessage, { message: error })] }));
|
|
102
102
|
};
|
|
103
103
|
export const Input = React.memo(InputComponent);
|
|
104
104
|
Input.displayName = "Input";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.types.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEnE,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"input.types.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEnE,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -14,7 +14,7 @@ const ProductCardComponent = ({ variant = "grid", imageUrl, brand, productName,
|
|
|
14
14
|
(flags === null || flags === void 0 ? void 0 : flags.length) > 0 &&
|
|
15
15
|
(flags === null || flags === void 0 ? void 0 : flags.map((flag, index) => (_jsx(Badge, { text: flag.text, style: { position: "absolute", top: 0, left: 0 }, icon: flag.icon }, flag.name + index + productName)))), variant === "grid" && (_jsx(TouchableOpacity, { style: [
|
|
16
16
|
isFavorite ? styles.favoriteButton : styles.unfavoriteButton,
|
|
17
|
-
], onPress: handleFavoritePress, accessibilityLabel: isFavorite ? "Remover dos favoritos" : "Adicionar aos favoritos", accessibilityRole: "button", children: _jsx(HeartIcon, { size: 20, color: "#101010", fill: isFavorite ? "#101010" : "transparent" }) }))] }), variant !== "lastViewed" && (_jsxs(View, { style: styles.detailsContainer, children: [_jsxs(View, { style: styles.productInfo, children: [
|
|
17
|
+
], onPress: handleFavoritePress, accessibilityLabel: isFavorite ? "Remover dos favoritos" : "Adicionar aos favoritos", accessibilityRole: "button", children: _jsx(HeartIcon, { size: 20, color: "#101010", fill: isFavorite ? "#101010" : "transparent" }) }))] }), variant !== "lastViewed" && (_jsxs(View, { style: styles.detailsContainer, children: [_jsxs(View, { style: styles.productInfo, children: [_jsx(Text, { style: styles.brandText, children: brand }), _jsx(View, { style: styles.nameContainer, children: _jsx(Text, { numberOfLines: 3, style: styles.nameText, accessibilityLabel: `Nome do produto: ${productName}`, children: productName }) })] }), variant === "grid" && (_jsxs(View, { style: styles.ratingContainer, accessibilityLabel: `Avaliação: ${rating} estrelas, ${reviewCount} avaliações`, children: [_jsx(StarIcon, { size: 11, color: "#101010", fill: "#101010" }), _jsxs(View, { style: styles.reviewCountWrapper, children: [_jsx(Text, { style: styles.ratingText, children: rating }), _jsxs(Text, { style: styles.reviewCountText, children: ["(", reviewCount, ")"] })] })] })), _jsx(View, { style: styles.priceContainer, children: _jsx(Text, { style: styles.priceText, accessibilityLabel: `Preço: ${price}`, children: price }) })] }))] })), [
|
|
18
18
|
brand,
|
|
19
19
|
handleFavoritePress,
|
|
20
20
|
imageUrl,
|