decathlon-ui 0.3.26 → 0.3.28

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.
Files changed (51) hide show
  1. package/dist/components/accordion/accordion.component.d.ts.map +1 -1
  2. package/dist/components/accordion/accordion.component.js +3 -2
  3. package/dist/components/accordion/accordion.styles.d.ts +9 -0
  4. package/dist/components/accordion/accordion.styles.d.ts.map +1 -1
  5. package/dist/components/accordion/accordion.styles.js +9 -0
  6. package/dist/components/accordion/accordion.types.d.ts +7 -0
  7. package/dist/components/accordion/accordion.types.d.ts.map +1 -1
  8. package/dist/components/badge/badge.component.d.ts.map +1 -1
  9. package/dist/components/badge/badge.component.js +1 -4
  10. package/dist/components/badge/badge.styles.d.ts +11 -2
  11. package/dist/components/badge/badge.styles.d.ts.map +1 -1
  12. package/dist/components/badge/badge.styles.js +28 -4
  13. package/dist/components/badge/badge.types.d.ts +1 -1
  14. package/dist/components/badge/badge.types.d.ts.map +1 -1
  15. package/dist/components/button/button.component.d.ts.map +1 -1
  16. package/dist/components/button/button.component.js +2 -1
  17. package/dist/components/button/button.props.d.ts +3 -1
  18. package/dist/components/button/button.props.d.ts.map +1 -1
  19. package/dist/components/button/button.props.js +2 -0
  20. package/dist/components/button/button.styles.d.ts +9 -208
  21. package/dist/components/button/button.styles.d.ts.map +1 -1
  22. package/dist/components/button/button.styles.js +25 -1
  23. package/dist/components/loading/loading.component.d.ts +2 -2
  24. package/dist/components/loading/loading.component.d.ts.map +1 -1
  25. package/dist/components/loading/loading.component.js +9 -11
  26. package/dist/components/product-card/product-card.component.d.ts.map +1 -1
  27. package/dist/components/product-card/product-card.component.js +2 -2
  28. package/dist/components/product-card/product-card.styles.d.ts +21 -0
  29. package/dist/components/product-card/product-card.styles.d.ts.map +1 -1
  30. package/dist/components/product-card/product-card.styles.js +23 -0
  31. package/dist/components/product-card/product-card.types.d.ts +2 -0
  32. package/dist/components/product-card/product-card.types.d.ts.map +1 -1
  33. package/dist/components/range-slider/range-slider.component.d.ts.map +1 -1
  34. package/dist/components/range-slider/range-slider.component.js +35 -37
  35. package/dist/components/range-slider/range-slider.styles.d.ts +4 -0
  36. package/dist/components/range-slider/range-slider.styles.d.ts.map +1 -1
  37. package/dist/components/range-slider/range-slider.styles.js +4 -0
  38. package/dist/components/store-card/store-card.component.d.ts.map +1 -1
  39. package/dist/components/store-card/store-card.component.js +9 -2
  40. package/dist/icons/components/Star.d.ts +5 -2
  41. package/dist/icons/components/Star.d.ts.map +1 -1
  42. package/dist/icons/components/Star.js +6 -2
  43. package/dist/icons/components/StarFill.d.ts +4 -0
  44. package/dist/icons/components/StarFill.d.ts.map +1 -0
  45. package/dist/icons/components/StarFill.js +4 -0
  46. package/dist/icons/index.d.ts +1 -0
  47. package/dist/icons/index.d.ts.map +1 -1
  48. package/dist/icons/index.js +1 -0
  49. package/dist/icons/types.d.ts +2 -1
  50. package/dist/icons/types.d.ts.map +1 -1
  51. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.component.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAsFnD,eAAO,MAAM,SAAS,4CAAiC,CAAC"}
1
+ {"version":3,"file":"accordion.component.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA8FnD,eAAO,MAAM,SAAS,4CAAiC,CAAC"}
@@ -4,7 +4,7 @@ import { LayoutAnimation, Text, TouchableOpacity, View } from "react-native";
4
4
  import { MinusIcon, PlusIcon } from "../../icons";
5
5
  import { useTheme } from "../../themes";
6
6
  import { useAccordionStyles } from "./accordion.styles";
7
- const AccordionComponent = ({ items = [], initialExpandedItems = [], allowMultiple = true, testID, }) => {
7
+ const AccordionComponent = ({ items = [], initialExpandedItems = [], allowMultiple = true, testID, selectedValues, }) => {
8
8
  const styles = useAccordionStyles();
9
9
  const { colors } = useTheme();
10
10
  const [expandedItems, setExpandedItems] = React.useState(initialExpandedItems);
@@ -32,7 +32,8 @@ const AccordionComponent = ({ items = [], initialExpandedItems = [], allowMultip
32
32
  if (!items || items.length === 0) {
33
33
  return null;
34
34
  }
35
- return (_jsx(View, { style: styles.container, testID: testID, children: items.map((item) => (_jsxs(View, { style: styles.item, children: [_jsxs(TouchableOpacity, { style: styles.header, onPress: () => handleToggle(item.id), activeOpacity: 0.7, accessibilityRole: "button", accessibilityState: { expanded: isExpanded(item.id) }, accessibilityHint: "Toque para expandir ou recolher", children: [_jsx(Text, { style: styles.title, children: item.title }), isExpanded(item.id) ? (_jsx(MinusIcon, { size: 20, color: colors.textPrimary, style: styles.icon })) : (_jsx(PlusIcon, { size: 20, color: colors.textPrimary, style: styles.icon }))] }), isExpanded(item.id) && (_jsx(View, { style: styles.content, children: renderContent(item.content) }))] }, item.id))) }));
35
+ return (_jsx(View, { style: styles.container, testID: testID, children: items.map((item) => (_jsxs(View, { style: styles.item, children: [_jsxs(TouchableOpacity, { style: styles.header, onPress: () => handleToggle(item.id), activeOpacity: 0.7, accessibilityRole: "button", accessibilityState: { expanded: isExpanded(item.id) }, accessibilityHint: "Toque para expandir ou recolher", children: [_jsx(Text, { style: styles.title, children: item.title }), isExpanded(item.id) ? (_jsx(MinusIcon, { size: 20, color: colors.textPrimary, style: styles.icon })) : (_jsx(PlusIcon, { size: 20, color: colors.textPrimary, style: styles.icon }))] }), (selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.some((value) => value.id === item.id)) &&
36
+ (selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.map((value) => (_jsx(View, { style: styles.selectedItems, children: _jsx(Text, { style: styles.selectedItemsText, children: value.value }) })))), isExpanded(item.id) && (_jsx(View, { style: styles.content, children: renderContent(item.content) }))] }, item.id))) }));
36
37
  };
37
38
  export const Accordion = React.memo(AccordionComponent);
38
39
  Accordion.displayName = "Accordion";
@@ -26,5 +26,14 @@ export declare const useAccordionStyles: () => {
26
26
  paddingHorizontal: 16;
27
27
  paddingBottom: 16;
28
28
  };
29
+ selectedItems: {
30
+ paddingHorizontal: 16;
31
+ paddingBottom: 16;
32
+ };
33
+ selectedItemsText: {
34
+ fontSize: number;
35
+ lineHeight: number;
36
+ color: "#616161";
37
+ };
29
38
  };
30
39
  //# sourceMappingURL=accordion.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.styles.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoC9B,CAAC"}
1
+ {"version":3,"file":"accordion.styles.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6C9B,CAAC"}
@@ -31,5 +31,14 @@ export const useAccordionStyles = () => {
31
31
  paddingHorizontal: spacing.md,
32
32
  paddingBottom: spacing.md,
33
33
  },
34
+ selectedItems: {
35
+ paddingHorizontal: spacing.md,
36
+ paddingBottom: spacing.md,
37
+ },
38
+ selectedItemsText: {
39
+ fontSize: 14,
40
+ lineHeight: 20,
41
+ color: colors.textTertiary,
42
+ },
34
43
  }), [colors, spacing]);
35
44
  };
@@ -31,5 +31,12 @@ export interface AccordionProps {
31
31
  * @default true
32
32
  */
33
33
  allowMultiple?: boolean;
34
+ /**
35
+ * Itens selecionados
36
+ */
37
+ selectedValues?: [{
38
+ id: string;
39
+ value: string;
40
+ }];
34
41
  }
35
42
  //# sourceMappingURL=accordion.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.types.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;IAExB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}
1
+ {"version":3,"file":"accordion.types.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;IAExB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClD"}
@@ -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;AAkEhD,eAAO,MAAM,KAAK,6FApDf,UAAU,6CAoDkC,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;AA+DhD,eAAO,MAAM,KAAK,6FAjDf,UAAU,6CAiDkC,CAAC"}
@@ -26,10 +26,7 @@ const BadgeComponent = ({ text, variant, size = "medium", style, textStyle, icon
26
26
  return styles.medium;
27
27
  }
28
28
  };
29
- return (_jsxs(View, { style: [
30
- !variant && style ? style : styles.container,
31
- variant && styles[variant],
32
- ], children: [icon && iconPosition === "left" && renderIcon(), _jsx(Text, { style: [
29
+ return (_jsxs(View, { style: [styles.container, !style && variant && styles[variant], style], children: [icon && iconPosition === "left" && renderIcon(), _jsx(Text, { style: [
33
30
  styles.text,
34
31
  getSizeStyle(),
35
32
  variant && styles[variant],
@@ -6,18 +6,23 @@ export declare const useBadgeStyles: (variant?: BadgeVariant, size?: BadgeSize)
6
6
  alignItems: "center";
7
7
  justifyContent: "center";
8
8
  gap: 8;
9
+ height: number;
9
10
  };
10
11
  text: {
11
12
  color: "#101010";
12
13
  };
13
14
  medium: {
14
- fontFamily: "Inter-Medium";
15
+ fontFamily: string;
16
+ fontWeight: "500";
17
+ fontStyle: "normal";
15
18
  fontSize: number;
16
19
  lineHeight: number;
17
20
  letterSpacing: number;
18
21
  };
19
22
  small: {
20
- fontFamily: "Inter-Regular";
23
+ fontFamily: string;
24
+ fontWeight: "400";
25
+ fontStyle: "normal";
21
26
  fontSize: number;
22
27
  lineHeight: number;
23
28
  letterSpacing: number;
@@ -50,5 +55,9 @@ export declare const useBadgeStyles: (variant?: BadgeVariant, size?: BadgeSize)
50
55
  backgroundColor: "#7AFFA6";
51
56
  color: "#101010";
52
57
  };
58
+ express: {
59
+ backgroundColor: "#101010";
60
+ color: "#FFFFFF";
61
+ };
53
62
  };
54
63
  //# sourceMappingURL=badge.styles.d.ts.map
@@ -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;AAM7D,eAAO,MAAM,cAAc,GACzB,UAAS,YAAwB,EACjC,OAAM,SAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiE3B,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,YAAY,EAAE,MAAM,eAAe,CAAC;AAM7D,eAAO,MAAM,cAAc,GACzB,UAAS,YAAwB,EACjC,OAAM,SAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0F3B,CAAC"}
@@ -3,6 +3,18 @@ import { StyleSheet } from "react-native";
3
3
  import { useTheme } from "../../themes";
4
4
  export const useBadgeStyles = (variant = "default", size = "medium") => {
5
5
  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
+ };
6
18
  return useMemo(() => StyleSheet.create({
7
19
  container: {
8
20
  padding: theme.spacing.xxs2,
@@ -10,22 +22,29 @@ export const useBadgeStyles = (variant = "default", size = "medium") => {
10
22
  alignItems: "center",
11
23
  justifyContent: "center",
12
24
  gap: theme.spacing.xs,
25
+ height: size === "small" ? 19 : size === "medium" ? 30 : 48,
13
26
  },
14
27
  text: {
15
28
  color: theme.colors.textPrimary,
16
29
  },
17
30
  // Estilos de tamanho
18
31
  medium: {
19
- fontFamily: theme.fonts.inter.medium,
32
+ fontFamily: "Inter",
33
+ fontWeight: "500",
34
+ fontStyle: "normal", // "Medium" não é um valor válido para fontStyle no React Native
20
35
  fontSize: 12,
21
36
  lineHeight: 18, // 150% de 12px
22
37
  letterSpacing: 0,
38
+ // leading-trim: NONE; // Não suportado no React Native
23
39
  },
24
40
  small: {
25
- fontFamily: theme.fonts.inter.regular,
41
+ fontFamily: "Inter",
42
+ fontWeight: "400",
43
+ fontStyle: "normal",
26
44
  fontSize: 10,
27
45
  lineHeight: 10, // 100% de 10px
28
46
  letterSpacing: 0,
47
+ // leading-trim: CAP_HEIGHT; // Não suportado diretamente no React Native
29
48
  },
30
49
  large: {
31
50
  fontFamily: theme.fonts.inter.medium,
@@ -34,8 +53,8 @@ export const useBadgeStyles = (variant = "default", size = "medium") => {
34
53
  letterSpacing: 0,
35
54
  },
36
55
  iconContainer: {
37
- height: size === "small" ? 12 : size === "large" ? 20 : 16,
38
- width: size === "small" ? 12 : size === "large" ? 20 : 16,
56
+ height: size === "small" ? 12 : size === "medium" ? 20 : 32,
57
+ width: size === "small" ? 12 : size === "medium" ? 20 : 32,
39
58
  alignItems: "center",
40
59
  justifyContent: "center",
41
60
  },
@@ -59,5 +78,10 @@ export const useBadgeStyles = (variant = "default", size = "medium") => {
59
78
  backgroundColor: theme.colors.backgroundMint3,
60
79
  color: theme.colors.black,
61
80
  },
81
+ // Variante express
82
+ express: {
83
+ backgroundColor: theme.colors.black,
84
+ color: theme.colors.white,
85
+ },
62
86
  }), [theme, size]);
63
87
  };
@@ -1,6 +1,6 @@
1
1
  import { StyleProp, TextStyle, ViewStyle } from "react-native";
2
2
  import { ReactNode } from "react";
3
- export type BadgeVariant = "default" | "black" | "discount" | "cashback";
3
+ export type BadgeVariant = "default" | "black" | "discount" | "cashback" | "express";
4
4
  export type BadgeSize = "small" | "medium" | "large";
5
5
  export type IconPosition = "left" | "right";
6
6
  export interface BadgeProps {
@@ -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,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;AAEzE,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;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAEjC;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B"}
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;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAEjC;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B"}
@@ -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;AAqC5D,eAAO,MAAM,MAAM,yCAA8B,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;AAsC5D,eAAO,MAAM,MAAM,yCAA8B,CAAC"}
@@ -9,10 +9,11 @@ const ButtonComponent = ({ label, loading, variant, fullWidth, size, disabled, .
9
9
  variant: variant,
10
10
  fullWidth,
11
11
  size,
12
+ disabled,
12
13
  });
13
14
  const { icon: Icon } = rest;
14
15
  const { colors } = useTheme();
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 })] })) }));
16
+ 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: buttonStyle.icon.color }), _jsx(Text, { style: buttonStyle.buttonText, children: label })] })) }));
16
17
  };
17
18
  export const Button = React.memo(ButtonComponent);
18
19
  Button.displayName = "Button";
@@ -3,7 +3,7 @@ export type ButtonProps = {
3
3
  onPress?: () => void;
4
4
  label?: string;
5
5
  loading?: boolean;
6
- variant?: "primary" | "primary-inverted" | "secondary" | "secondary-inverted" | "converted" | "danger" | "danger-inverted" | "danger-outline";
6
+ variant?: "primary" | "primary-inverted" | "secondary" | "secondary-inverted" | "tertiary" | "tertiary-inverted" | "converted" | "danger" | "danger-inverted" | "danger-outline";
7
7
  fullWidth?: boolean;
8
8
  size?: "small" | "medium" | "large";
9
9
  icon?: React.ReactNode | React.ReactElement | any;
@@ -14,6 +14,8 @@ export declare enum ButtonVariant {
14
14
  primaryInverted = "primary-inverted",
15
15
  secondary = "secondary",
16
16
  secondaryInverted = "secondary-inverted",
17
+ tertiary = "tertiary",
18
+ tertiaryInverted = "tertiary-inverted",
17
19
  converted = "converted",
18
20
  danger = "danger",
19
21
  dangerInverted = "danger-inverted",
@@ -1 +1 @@
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
+ {"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,UAAU,GACV,mBAAmB,GACnB,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,QAAQ,aAAa;IACrB,gBAAgB,sBAAsB;IACtC,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"}
@@ -4,6 +4,8 @@ export var ButtonVariant;
4
4
  ButtonVariant["primaryInverted"] = "primary-inverted";
5
5
  ButtonVariant["secondary"] = "secondary";
6
6
  ButtonVariant["secondaryInverted"] = "secondary-inverted";
7
+ ButtonVariant["tertiary"] = "tertiary";
8
+ ButtonVariant["tertiaryInverted"] = "tertiary-inverted";
7
9
  ButtonVariant["converted"] = "converted";
8
10
  ButtonVariant["danger"] = "danger";
9
11
  ButtonVariant["dangerInverted"] = "danger-inverted";
@@ -1,34 +1,11 @@
1
1
  import { ButtonVariant } from "./button.props";
2
- export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
2
+ export declare const useButtonStyles: ({ variant, fullWidth, size, disabled, }: {
3
3
  variant?: ButtonVariant | undefined;
4
4
  fullWidth?: boolean | undefined;
5
5
  size?: string | undefined;
6
+ disabled?: boolean | undefined;
6
7
  }) => {
7
8
  container: {
8
- width: "auto" | "100%";
9
- borderRadius: number;
10
- justifyContent: "center";
11
- alignItems: "center";
12
- flexDirection: "row";
13
- gap: number;
14
- backgroundColor: "#101010";
15
- borderWidth?: undefined;
16
- borderColor?: undefined;
17
- paddingHorizontal: 16;
18
- paddingVertical: number;
19
- } | {
20
- width: "auto" | "100%";
21
- borderRadius: number;
22
- justifyContent: "center";
23
- alignItems: "center";
24
- flexDirection: "row";
25
- gap: number;
26
- backgroundColor: "#FFFFFF";
27
- borderWidth?: undefined;
28
- borderColor?: undefined;
29
- paddingHorizontal: 16;
30
- paddingVertical: number;
31
- } | {
32
9
  width: "auto" | "100%";
33
10
  borderRadius: number;
34
11
  justifyContent: "center";
@@ -59,31 +36,7 @@ export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
59
36
  alignItems: "center";
60
37
  flexDirection: "row";
61
38
  gap: number;
62
- backgroundColor: "#3643BA";
63
- borderWidth?: undefined;
64
- borderColor?: undefined;
65
- paddingHorizontal: 16;
66
- paddingVertical: number;
67
- } | {
68
- width: "auto" | "100%";
69
- borderRadius: number;
70
- justifyContent: "center";
71
- alignItems: "center";
72
- flexDirection: "row";
73
- gap: number;
74
- backgroundColor: "#FFE4D6";
75
- borderWidth?: undefined;
76
- borderColor?: undefined;
77
- paddingHorizontal: 16;
78
- paddingVertical: number;
79
- } | {
80
- width: "auto" | "100%";
81
- borderRadius: number;
82
- justifyContent: "center";
83
- alignItems: "center";
84
- flexDirection: "row";
85
- gap: number;
86
- backgroundColor: "#FFFFFF";
39
+ backgroundColor: string;
87
40
  borderWidth?: undefined;
88
41
  borderColor?: undefined;
89
42
  paddingHorizontal: 16;
@@ -112,30 +65,6 @@ export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
112
65
  borderColor: "#E3262F";
113
66
  paddingHorizontal: 16;
114
67
  paddingVertical: number;
115
- } | {
116
- width: "auto" | "100%";
117
- borderRadius: number;
118
- justifyContent: "center";
119
- alignItems: "center";
120
- flexDirection: "row";
121
- gap: number;
122
- backgroundColor: "#101010";
123
- borderWidth?: undefined;
124
- borderColor?: undefined;
125
- paddingHorizontal: 16;
126
- paddingVertical: 12;
127
- } | {
128
- width: "auto" | "100%";
129
- borderRadius: number;
130
- justifyContent: "center";
131
- alignItems: "center";
132
- flexDirection: "row";
133
- gap: number;
134
- backgroundColor: "#FFFFFF";
135
- borderWidth?: undefined;
136
- borderColor?: undefined;
137
- paddingHorizontal: 16;
138
- paddingVertical: 12;
139
68
  } | {
140
69
  width: "auto" | "100%";
141
70
  borderRadius: number;
@@ -167,31 +96,7 @@ export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
167
96
  alignItems: "center";
168
97
  flexDirection: "row";
169
98
  gap: number;
170
- backgroundColor: "#3643BA";
171
- borderWidth?: undefined;
172
- borderColor?: undefined;
173
- paddingHorizontal: 16;
174
- paddingVertical: 12;
175
- } | {
176
- width: "auto" | "100%";
177
- borderRadius: number;
178
- justifyContent: "center";
179
- alignItems: "center";
180
- flexDirection: "row";
181
- gap: number;
182
- backgroundColor: "#FFE4D6";
183
- borderWidth?: undefined;
184
- borderColor?: undefined;
185
- paddingHorizontal: 16;
186
- paddingVertical: 12;
187
- } | {
188
- width: "auto" | "100%";
189
- borderRadius: number;
190
- justifyContent: "center";
191
- alignItems: "center";
192
- flexDirection: "row";
193
- gap: number;
194
- backgroundColor: "#FFFFFF";
99
+ backgroundColor: string;
195
100
  borderWidth?: undefined;
196
101
  borderColor?: undefined;
197
102
  paddingHorizontal: 16;
@@ -220,30 +125,6 @@ export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
220
125
  borderColor: "#E3262F";
221
126
  paddingHorizontal: 16;
222
127
  paddingVertical: 12;
223
- } | {
224
- width: "auto" | "100%";
225
- borderRadius: number;
226
- justifyContent: "center";
227
- alignItems: "center";
228
- flexDirection: "row";
229
- gap: number;
230
- backgroundColor: "#101010";
231
- borderWidth?: undefined;
232
- borderColor?: undefined;
233
- paddingHorizontal: 16;
234
- paddingVertical: 16;
235
- } | {
236
- width: "auto" | "100%";
237
- borderRadius: number;
238
- justifyContent: "center";
239
- alignItems: "center";
240
- flexDirection: "row";
241
- gap: number;
242
- backgroundColor: "#FFFFFF";
243
- borderWidth?: undefined;
244
- borderColor?: undefined;
245
- paddingHorizontal: 16;
246
- paddingVertical: 16;
247
128
  } | {
248
129
  width: "auto" | "100%";
249
130
  borderRadius: number;
@@ -275,31 +156,7 @@ export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
275
156
  alignItems: "center";
276
157
  flexDirection: "row";
277
158
  gap: number;
278
- backgroundColor: "#3643BA";
279
- borderWidth?: undefined;
280
- borderColor?: undefined;
281
- paddingHorizontal: 16;
282
- paddingVertical: 16;
283
- } | {
284
- width: "auto" | "100%";
285
- borderRadius: number;
286
- justifyContent: "center";
287
- alignItems: "center";
288
- flexDirection: "row";
289
- gap: number;
290
- backgroundColor: "#FFE4D6";
291
- borderWidth?: undefined;
292
- borderColor?: undefined;
293
- paddingHorizontal: 16;
294
- paddingVertical: 16;
295
- } | {
296
- width: "auto" | "100%";
297
- borderRadius: number;
298
- justifyContent: "center";
299
- alignItems: "center";
300
- flexDirection: "row";
301
- gap: number;
302
- backgroundColor: "#FFFFFF";
159
+ backgroundColor: string;
303
160
  borderWidth?: undefined;
304
161
  borderColor?: undefined;
305
162
  paddingHorizontal: 16;
@@ -330,14 +187,6 @@ export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
330
187
  paddingVertical: 16;
331
188
  };
332
189
  buttonText: {
333
- fontWeight: "600";
334
- color: "#FFFFFF";
335
- fontSize: 14;
336
- } | {
337
- fontWeight: "600";
338
- color: "#101010";
339
- fontSize: 14;
340
- } | {
341
190
  fontWeight: "600";
342
191
  color: "#101010";
343
192
  fontSize: 14;
@@ -347,15 +196,7 @@ export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
347
196
  fontSize: 14;
348
197
  } | {
349
198
  fontWeight: "600";
350
- color: "#FFFFFF";
351
- fontSize: 14;
352
- } | {
353
- fontWeight: "600";
354
- color: "#FFFFFF";
355
- fontSize: 14;
356
- } | {
357
- fontWeight: "600";
358
- color: "#FFE4D6";
199
+ color: string;
359
200
  fontSize: 14;
360
201
  } | {
361
202
  fontWeight: "600";
@@ -365,14 +206,6 @@ export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
365
206
  fontWeight: "600";
366
207
  color: "#AB0009";
367
208
  fontSize: 14;
368
- } | {
369
- fontWeight: "600";
370
- color: "#FFFFFF";
371
- fontSize: 16;
372
- } | {
373
- fontWeight: "600";
374
- color: "#101010";
375
- fontSize: 16;
376
209
  } | {
377
210
  fontWeight: "600";
378
211
  color: "#101010";
@@ -383,15 +216,7 @@ export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
383
216
  fontSize: 16;
384
217
  } | {
385
218
  fontWeight: "600";
386
- color: "#FFFFFF";
387
- fontSize: 16;
388
- } | {
389
- fontWeight: "600";
390
- color: "#FFFFFF";
391
- fontSize: 16;
392
- } | {
393
- fontWeight: "600";
394
- color: "#FFE4D6";
219
+ color: string;
395
220
  fontSize: 16;
396
221
  } | {
397
222
  fontWeight: "600";
@@ -401,14 +226,6 @@ export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
401
226
  fontWeight: "600";
402
227
  color: "#AB0009";
403
228
  fontSize: 16;
404
- } | {
405
- fontWeight: "600";
406
- color: "#FFFFFF";
407
- fontSize: 18;
408
- } | {
409
- fontWeight: "600";
410
- color: "#101010";
411
- fontSize: 18;
412
229
  } | {
413
230
  fontWeight: "600";
414
231
  color: "#101010";
@@ -419,15 +236,7 @@ export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
419
236
  fontSize: 18;
420
237
  } | {
421
238
  fontWeight: "600";
422
- color: "#FFFFFF";
423
- fontSize: 18;
424
- } | {
425
- fontWeight: "600";
426
- color: "#FFFFFF";
427
- fontSize: 18;
428
- } | {
429
- fontWeight: "600";
430
- color: "#FFE4D6";
239
+ color: string;
431
240
  fontSize: 18;
432
241
  } | {
433
242
  fontWeight: "600";
@@ -439,19 +248,11 @@ export declare const useButtonStyles: ({ variant, fullWidth, size, }: {
439
248
  fontSize: 18;
440
249
  };
441
250
  icon: {
442
- color: "#FFFFFF";
443
- } | {
444
251
  color: "#101010";
445
- } | {
446
- color: "#101010";
447
- } | {
448
- color: "#FFFFFF";
449
- } | {
450
- color: "#FFFFFF";
451
252
  } | {
452
253
  color: "#FFFFFF";
453
254
  } | {
454
- color: "#FFE4D6";
255
+ color: string;
455
256
  } | {
456
257
  color: "#AB0009";
457
258
  } | {
@@ -1 +1 @@
1
- {"version":3,"file":"button.styles.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAO,MAAM,eAAe,GAAI;;;;CAI/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoLA,CAAC"}
1
+ {"version":3,"file":"button.styles.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAO,MAAM,eAAe,GAAI;;;;;CAK/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4MA,CAAC"}
@@ -2,7 +2,7 @@ import { StyleSheet } from "react-native";
2
2
  import { useTheme } from "../../themes";
3
3
  import { ButtonVariant } from "./button.props";
4
4
  export const useButtonStyles = ({ variant = ButtonVariant.primary, // Padrão é ButtonVariant.primary
5
- fullWidth = true, size = "medium", }) => {
5
+ fullWidth = true, size = "medium", disabled = false, }) => {
6
6
  const theme = useTheme();
7
7
  const getSizeStyles = () => {
8
8
  switch (size) {
@@ -98,6 +98,30 @@ fullWidth = true, size = "medium", }) => {
98
98
  color: theme.colors.white,
99
99
  },
100
100
  };
101
+ case ButtonVariant.tertiary:
102
+ return {
103
+ container: {
104
+ backgroundColor: disabled
105
+ ? theme.colors.neutral4
106
+ : theme.colors.backgroundTertiary,
107
+ },
108
+ buttonText: { color: theme.colors.textActionHover },
109
+ icon: {
110
+ color: theme.colors.textActionHover,
111
+ },
112
+ };
113
+ case ButtonVariant.tertiaryInverted:
114
+ return {
115
+ container: {
116
+ backgroundColor: disabled
117
+ ? theme.colors.neutral4
118
+ : theme.colors.backgroundTertiary,
119
+ },
120
+ buttonText: { color: theme.colors.blue1 },
121
+ icon: {
122
+ color: theme.colors.blue1,
123
+ },
124
+ };
101
125
  case ButtonVariant.converted:
102
126
  return {
103
127
  container: { backgroundColor: theme.colors.primary },
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { LoadingProps } from './loading.types';
1
+ import React from "react";
2
+ import { LoadingProps } from "./loading.types";
3
3
  export declare const Loading: React.NamedExoticComponent<LoadingProps>;
4
4
  export default Loading;
5
5
  //# sourceMappingURL=loading.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"loading.component.d.ts","sourceRoot":"","sources":["../../../src/components/loading/loading.component.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAuC/C,eAAO,MAAM,OAAO,0CAA+B,CAAC;AAEpD,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"loading.component.d.ts","sourceRoot":"","sources":["../../../src/components/loading/loading.component.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAwC/C,eAAO,MAAM,OAAO,0CAA+B,CAAC;AAEpD,eAAe,OAAO,CAAC"}