decathlon-ui 0.3.37 → 0.3.39
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/blue-product-filter/blue-product-filter.component.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/product-card/product-card.component.js +1 -1
- package/dist/components/search-pill/index.d.ts +2 -0
- package/dist/components/search-pill/index.d.ts.map +1 -0
- package/dist/components/search-pill/index.js +1 -0
- package/dist/components/search-pill/search-pill.component.d.ts +7 -0
- package/dist/components/search-pill/search-pill.component.d.ts.map +1 -0
- package/dist/components/search-pill/search-pill.component.js +11 -0
- package/dist/components/search-pill/search-pill.styles.d.ts +22 -0
- package/dist/components/search-pill/search-pill.styles.d.ts.map +1 -0
- package/dist/components/search-pill/search-pill.styles.js +26 -0
- package/package.json +1 -1
|
@@ -5,5 +5,5 @@ import { ToggleSwitch } from "../toggle-switch";
|
|
|
5
5
|
import { useBlueProductFilterStyles } from "./blue-product-filter.styles";
|
|
6
6
|
export function BlueProductFilter({ selected, onChange, disabled = false, }) {
|
|
7
7
|
const styles = useBlueProductFilterStyles();
|
|
8
|
-
return (_jsxs(View, { style: styles.container, children: [_jsxs(View, { style: styles.leftContent, children: [_jsx(View, { style: styles.iconContainer, children: _jsx(BlueProductRoundedIcon, { viewBox: "0 0 50 50", size: 48 }) }), _jsxs(View, { style: styles.textContent, children: [_jsx(Text, { style: styles.title, children: "Produto Azul" }), _jsxs(Text, { style: styles.description, children: ["Produtos Decathlon com o", "\n", "
|
|
8
|
+
return (_jsxs(View, { style: styles.container, children: [_jsxs(View, { style: styles.leftContent, children: [_jsx(View, { style: styles.iconContainer, children: _jsx(BlueProductRoundedIcon, { viewBox: "0 0 50 50", size: 48 }) }), _jsxs(View, { style: styles.textContent, children: [_jsx(Text, { style: styles.title, children: "Produto Azul" }), _jsxs(Text, { style: styles.description, children: ["Produtos Decathlon com o", "\n", "melhor custo-benef\u00EDcio"] })] })] }), _jsx(View, { style: styles.toggleContainer, children: _jsx(ToggleSwitch, { isOn: selected, onToggle: () => onChange(!selected), disabled: disabled, activeCircleColor: "#fff", inactiveBackgroundColor: "#D9DDE1", inactiveBorderColor: "#D9DDE1", inactiveCircleColor: "#fff" }) })] }));
|
|
9
9
|
}
|
|
@@ -26,6 +26,7 @@ export * from "./quick-add-product-card/index";
|
|
|
26
26
|
export * from "./radio/index";
|
|
27
27
|
export * from "./range-slider/index";
|
|
28
28
|
export * from "./search-button/index";
|
|
29
|
+
export * from "./search-pill/index";
|
|
29
30
|
export * from "./select/index";
|
|
30
31
|
export * from "./seller-box/index";
|
|
31
32
|
export * from "./stars-rating/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,e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C9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export * from "./quick-add-product-card/index";
|
|
|
26
26
|
export * from "./radio/index";
|
|
27
27
|
export * from "./range-slider/index";
|
|
28
28
|
export * from "./search-button/index";
|
|
29
|
+
export * from "./search-pill/index";
|
|
29
30
|
export * from "./select/index";
|
|
30
31
|
export * from "./seller-box/index";
|
|
31
32
|
export * from "./stars-rating/index";
|
|
@@ -38,7 +38,7 @@ const ProductCardComponent = ({ variant = "grid", imageUrl, brand, productName,
|
|
|
38
38
|
}, icon: flag.icon }, flag.name + index + productName));
|
|
39
39
|
})), showFavoriteButton && (_jsx(TouchableOpacity, { style: [
|
|
40
40
|
isFavorite ? styles.favoriteButton : styles.unfavoriteButton,
|
|
41
|
-
], onPress: handleFavoritePress, accessibilityLabel: isFavorite ? "Remover dos favoritos" : "Adicionar aos favoritos", accessibilityRole: "button", children: isLoadingFavorite ? (_jsx(Loading, { size: 16 })) : isFavorite ? (_jsx(HeartFillIcon, { size: 16, color: "#101010" })) : (_jsx(HeartIcon, { size: 16, color: "#101010" })) }))] }), 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" && showRating && (_jsxs(View, { style: styles.ratingContainer, accessibilityLabel: `Avaliação: ${rating} estrelas, ${reviewCount} avaliações`, children: [_jsx(StarIcon, { size: 11, color: "#15181B", filled: true }), _jsxs(View, { style: styles.reviewCountWrapper, children: [_jsx(Text, { style: styles.ratingText, children: rating === null || rating === void 0 ? void 0 : rating.toString().replace(/\./g, ",") }), _jsx(Text, { style: styles.reviewCountText, children: reviewCount })] })] })), _jsxs(View, { style: styles.priceContainer, children: [_jsx(Text, { style: styles.priceText, accessibilityLabel: `Preço: ${price}`, children: `${price}
|
|
41
|
+
], onPress: handleFavoritePress, accessibilityLabel: isFavorite ? "Remover dos favoritos" : "Adicionar aos favoritos", accessibilityRole: "button", children: isLoadingFavorite ? (_jsx(Loading, { size: 16 })) : isFavorite ? (_jsx(HeartFillIcon, { size: 16, color: "#101010" })) : (_jsx(HeartIcon, { size: 16, color: "#101010" })) }))] }), 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" && showRating && (_jsxs(View, { style: styles.ratingContainer, accessibilityLabel: `Avaliação: ${rating} estrelas, ${reviewCount} avaliações`, children: [_jsx(StarIcon, { size: 11, color: "#15181B", filled: true }), _jsxs(View, { style: styles.reviewCountWrapper, children: [_jsx(Text, { style: styles.ratingText, children: rating === null || rating === void 0 ? void 0 : rating.toString().replace(/\./g, ",") }), _jsx(Text, { style: styles.reviewCountText, children: reviewCount })] })] })), _jsxs(View, { style: styles.priceContainer, children: [_jsx(Text, { style: styles.priceText, accessibilityLabel: `Preço: ${price}`, children: `${price} ${discountPrice ? `à vista` : ''}` }), discountPrice && (_jsx(Text, { style: styles.priceDiscountText, children: discountPrice }))] }), colorsVariants && (_jsx(Text, { style: styles.colorsText, children: colorsVariants }))] }))] })), [
|
|
42
42
|
brand,
|
|
43
43
|
handleFavoritePress,
|
|
44
44
|
imageUrl,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/search-pill/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './search-pill.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-pill.component.d.ts","sourceRoot":"","sources":["../../../src/components/search-pill/search-pill.component.tsx"],"names":[],"mappings":"AAKA,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,iBAAS,UAAU,CAAC,EAAE,OAAO,EAAE,KAAiB,EAAE,EAAE,eAAe,2CAYlE;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text, TouchableOpacity, View } from "react-native";
|
|
3
|
+
import { SearchIcon } from "../../icons";
|
|
4
|
+
import { useTheme } from "../../themes";
|
|
5
|
+
import { useSearchPillStyles } from "./search-pill.styles";
|
|
6
|
+
function SearchPill({ onPress, label = "Barraca" }) {
|
|
7
|
+
const { colors } = useTheme();
|
|
8
|
+
const styles = useSearchPillStyles();
|
|
9
|
+
return (_jsx(TouchableOpacity, { onPress: onPress, style: styles.container, children: _jsxs(View, { style: styles.content, children: [_jsx(SearchIcon, { size: 18, color: colors.textSecondary }), _jsx(Text, { style: styles.text, children: label })] }) }));
|
|
10
|
+
}
|
|
11
|
+
export { SearchPill };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const useSearchPillStyles: () => {
|
|
2
|
+
container: {
|
|
3
|
+
backgroundColor: "#F7F8F9";
|
|
4
|
+
borderRadius: number;
|
|
5
|
+
paddingHorizontal: 12;
|
|
6
|
+
paddingVertical: 14;
|
|
7
|
+
};
|
|
8
|
+
content: {
|
|
9
|
+
flexDirection: "row";
|
|
10
|
+
alignItems: "center";
|
|
11
|
+
gap: 8;
|
|
12
|
+
};
|
|
13
|
+
text: {
|
|
14
|
+
fontFamily: "Inter-Regular";
|
|
15
|
+
color: "#383838";
|
|
16
|
+
fontSize: 14;
|
|
17
|
+
fontWeight: "400";
|
|
18
|
+
lineHeight: 21;
|
|
19
|
+
textAlign: "left";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=search-pill.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-pill.styles.d.ts","sourceRoot":"","sources":["../../../src/components/search-pill/search-pill.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;CAwB/B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { useTheme } from "../../themes";
|
|
3
|
+
export const useSearchPillStyles = () => {
|
|
4
|
+
const { colors, spacing, fonts } = useTheme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
backgroundColor: colors.backgroundSecondary,
|
|
8
|
+
borderRadius: 32,
|
|
9
|
+
paddingHorizontal: spacing.sm,
|
|
10
|
+
paddingVertical: spacing.default,
|
|
11
|
+
},
|
|
12
|
+
content: {
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
alignItems: "center",
|
|
15
|
+
gap: spacing.xs,
|
|
16
|
+
},
|
|
17
|
+
text: {
|
|
18
|
+
fontFamily: fonts.inter.regular,
|
|
19
|
+
color: colors.textSecondary,
|
|
20
|
+
fontSize: fonts.sizes.xs,
|
|
21
|
+
fontWeight: "400",
|
|
22
|
+
lineHeight: spacing.mmd,
|
|
23
|
+
textAlign: "left",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
};
|