decathlon-ui 0.3.41 → 0.3.43
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.
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"badge.component.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.component.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAsEhD,eAAO,MAAM,KAAK,6FAxDf,UAAU,6CAwDkC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Text, View } from "react-native";
|
|
3
3
|
import React from "react";
|
|
4
|
+
import { SvgUri } from "react-native-svg";
|
|
4
5
|
import { useBadgeStyles } from "./badge.styles";
|
|
5
6
|
/**
|
|
6
7
|
* Badge - Componente para exibição de etiquetas ou marcadores
|
|
@@ -12,6 +13,9 @@ const BadgeComponent = ({ text, variant, size = "medium", style, textStyle, icon
|
|
|
12
13
|
if (!icon) {
|
|
13
14
|
return null;
|
|
14
15
|
}
|
|
16
|
+
if (typeof icon === "string" && icon.includes(".svg")) {
|
|
17
|
+
return (_jsx(View, { style: styles.iconContainer, children: _jsx(SvgUri, { uri: icon, width: 24, height: 24 }) }));
|
|
18
|
+
}
|
|
15
19
|
return _jsx(View, { style: styles.iconContainer, children: icon });
|
|
16
20
|
};
|
|
17
21
|
// Determina os estilos de tamanho do texto com base no parâmetro size
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-card.component.d.ts","sourceRoot":"","sources":["../../../src/components/product-card/product-card.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"product-card.component.d.ts","sourceRoot":"","sources":["../../../src/components/product-card/product-card.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAyO7D,eAAO,MAAM,WAAW,8CAAmC,CAAC"}
|
|
@@ -51,7 +51,7 @@ const ProductCardComponent = ({ variant = "grid", imageUrl, brand, productName,
|
|
|
51
51
|
}, icon: flag.icon }, flag.name + index + productName));
|
|
52
52
|
})), showFavoriteButton && (_jsx(TouchableOpacity, { style: [
|
|
53
53
|
isFavorite ? styles.favoriteButton : styles.unfavoriteButton,
|
|
54
|
-
], 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 })] })] })), _jsx(View, { style: styles.priceContainer, children: cashPrice && parsePriceToNumber(cashPrice) < parsePriceToNumber(offerPrice || price) ? (_jsxs(_Fragment, { children: [_jsx(Text, { style: styles.priceText, accessibilityLabel: `Preço à vista: ${cashPrice}`, children: `${cashPrice} à vista` }), _jsx(Text, { style: styles.priceDiscountText, accessibilityLabel: `Preço original: ${offerPrice || price}`, children: offerPrice || price })] })) : (_jsx(Text, { style: styles.priceText, accessibilityLabel: `Preço: ${offerPrice || price}`, children: offerPrice || price })) }), colorsVariants && (_jsx(Text, { style: styles.colorsText, children: colorsVariants }))] }))] })), [
|
|
54
|
+
], 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 })] })] })), _jsx(View, { style: styles.priceContainer, children: cashPrice && parsePriceToNumber(cashPrice) < parsePriceToNumber(offerPrice || price) ? (_jsxs(_Fragment, { children: [_jsx(Text, { style: styles.priceText, accessibilityLabel: `Preço à vista: ${cashPrice}`, children: `${cashPrice} à vista` }), _jsx(Text, { style: styles.priceDiscountText, accessibilityLabel: `Preço original: ${offerPrice || price}`, children: offerPrice || price })] })) : (_jsxs(_Fragment, { children: [_jsx(Text, { style: styles.priceText, accessibilityLabel: `Preço: ${offerPrice || price}`, children: offerPrice || price }), discountPrice && (_jsx(Text, { style: styles.priceDiscountText, children: discountPrice }))] })) }), colorsVariants && (_jsx(Text, { style: styles.colorsText, children: colorsVariants }))] }))] })), [
|
|
55
55
|
brand,
|
|
56
56
|
cashPrice,
|
|
57
57
|
handleFavoritePress,
|