decathlon-ui 0.2.2 → 0.2.3

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 (165) hide show
  1. package/dist/components/accordion/accordion.component.d.ts +1 -1
  2. package/dist/components/accordion/accordion.component.d.ts.map +1 -1
  3. package/dist/components/accordion/accordion.component.js +5 -15
  4. package/dist/components/action-button/action-button.component.d.ts +1 -1
  5. package/dist/components/action-button/action-button.component.d.ts.map +1 -1
  6. package/dist/components/action-button/action-button.component.js +7 -8
  7. package/dist/components/badge/badge.component.d.ts +2 -5
  8. package/dist/components/badge/badge.component.d.ts.map +1 -1
  9. package/dist/components/badge/badge.component.js +4 -1
  10. package/dist/components/banner-carousel/banner-carousel.component.d.ts +5 -0
  11. package/dist/components/banner-carousel/banner-carousel.component.d.ts.map +1 -0
  12. package/dist/components/banner-carousel/banner-carousel.component.js +68 -0
  13. package/dist/components/banner-carousel/banner-carousel.styles.d.ts +17 -0
  14. package/dist/components/banner-carousel/banner-carousel.styles.d.ts.map +1 -0
  15. package/dist/components/banner-carousel/banner-carousel.styles.js +20 -0
  16. package/dist/components/banner-carousel/banner-carousel.types.d.ts +11 -0
  17. package/dist/components/banner-carousel/banner-carousel.types.d.ts.map +1 -0
  18. package/dist/components/banner-carousel/banner-carousel.types.js +1 -0
  19. package/dist/components/banner-carousel/index.d.ts +3 -0
  20. package/dist/components/banner-carousel/index.d.ts.map +1 -0
  21. package/dist/components/banner-carousel/index.js +1 -0
  22. package/dist/components/button/button.component.d.ts +1 -1
  23. package/dist/components/button/button.component.d.ts.map +1 -1
  24. package/dist/components/button/button.component.js +7 -3
  25. package/dist/components/card/card.component.d.ts +1 -1
  26. package/dist/components/card/card.component.d.ts.map +1 -1
  27. package/dist/components/card/card.component.js +4 -1
  28. package/dist/components/cashback-banner/cashback-banner.component.d.ts +1 -1
  29. package/dist/components/cashback-banner/cashback-banner.component.d.ts.map +1 -1
  30. package/dist/components/cashback-banner/cashback-banner.component.js +4 -1
  31. package/dist/components/category-item/category-item.component.d.ts +1 -4
  32. package/dist/components/category-item/category-item.component.d.ts.map +1 -1
  33. package/dist/components/category-item/category-item.component.js +9 -7
  34. package/dist/components/category-item/category-item.styles.d.ts +2 -2
  35. package/dist/components/category-item/category-item.styles.js +2 -2
  36. package/dist/components/category-item/category-item.types.d.ts +2 -2
  37. package/dist/components/category-item/category-item.types.d.ts.map +1 -1
  38. package/dist/components/checkbox/checkbox.component.d.ts +1 -1
  39. package/dist/components/checkbox/checkbox.component.d.ts.map +1 -1
  40. package/dist/components/checkbox/checkbox.component.js +3 -1
  41. package/dist/components/event-card/event-card.component.d.ts +4 -0
  42. package/dist/components/event-card/event-card.component.d.ts.map +1 -0
  43. package/dist/components/event-card/event-card.component.js +23 -0
  44. package/dist/components/event-card/event-card.styles.d.ts +15 -0
  45. package/dist/components/event-card/event-card.styles.d.ts.map +1 -0
  46. package/dist/components/event-card/event-card.styles.js +62 -0
  47. package/dist/components/event-card/event-card.types.d.ts +25 -0
  48. package/dist/components/event-card/event-card.types.d.ts.map +1 -0
  49. package/dist/components/event-card/event-card.types.js +1 -0
  50. package/dist/components/event-card/index.d.ts +3 -0
  51. package/dist/components/event-card/index.d.ts.map +1 -0
  52. package/dist/components/event-card/index.js +1 -0
  53. package/dist/components/filter-chip/filter-chip.component.d.ts +1 -4
  54. package/dist/components/filter-chip/filter-chip.component.d.ts.map +1 -1
  55. package/dist/components/filter-chip/filter-chip.component.js +4 -1
  56. package/dist/components/image-gallery/image-gallery.component.d.ts +3 -0
  57. package/dist/components/image-gallery/image-gallery.component.d.ts.map +1 -0
  58. package/dist/components/image-gallery/image-gallery.component.js +50 -0
  59. package/dist/components/image-gallery/image-gallery.styles.d.ts +58 -0
  60. package/dist/components/image-gallery/image-gallery.styles.d.ts.map +1 -0
  61. package/dist/components/image-gallery/image-gallery.styles.js +62 -0
  62. package/dist/components/image-gallery/image-gallery.types.d.ts +11 -0
  63. package/dist/components/image-gallery/image-gallery.types.d.ts.map +1 -0
  64. package/dist/components/image-gallery/image-gallery.types.js +1 -0
  65. package/dist/components/image-viewing/components/image-default-header.d.ts +13 -0
  66. package/dist/components/image-viewing/components/image-default-header.d.ts.map +1 -0
  67. package/dist/components/image-viewing/components/image-default-header.js +27 -0
  68. package/dist/components/image-viewing/components/image-item/image-item.component.android.d.ts +14 -0
  69. package/dist/components/image-viewing/components/image-item/image-item.component.android.d.ts.map +1 -0
  70. package/dist/components/image-viewing/components/image-item/image-item.component.android.js +74 -0
  71. package/dist/components/image-viewing/components/image-item/image-item.component.d.ts +11 -0
  72. package/dist/components/image-viewing/components/image-item/image-item.component.d.ts.map +1 -0
  73. package/dist/components/image-viewing/components/image-item/image-item.component.ios.d.ts +14 -0
  74. package/dist/components/image-viewing/components/image-item/image-item.component.ios.d.ts.map +1 -0
  75. package/dist/components/image-viewing/components/image-item/image-item.component.ios.js +66 -0
  76. package/dist/components/image-viewing/components/image-item/image-item.component.js +5 -0
  77. package/dist/components/image-viewing/components/image-item/image-item.constants.d.ts +4 -0
  78. package/dist/components/image-viewing/components/image-item/image-item.constants.d.ts.map +1 -0
  79. package/dist/components/image-viewing/components/image-item/image-item.constants.js +5 -0
  80. package/dist/components/image-viewing/components/image-item/image-loading.component.d.ts +2 -0
  81. package/dist/components/image-viewing/components/image-item/image-loading.component.d.ts.map +1 -0
  82. package/dist/components/image-viewing/components/image-item/image-loading.component.js +14 -0
  83. package/dist/components/image-viewing/components/status-bar-manager.d.ts +6 -0
  84. package/dist/components/image-viewing/components/status-bar-manager.d.ts.map +1 -0
  85. package/dist/components/image-viewing/components/status-bar-manager.js +14 -0
  86. package/dist/components/image-viewing/hooks/index.d.ts +8 -0
  87. package/dist/components/image-viewing/hooks/index.d.ts.map +1 -0
  88. package/dist/components/image-viewing/hooks/index.js +7 -0
  89. package/dist/components/image-viewing/hooks/useAnimatedComponents.d.ts +19 -0
  90. package/dist/components/image-viewing/hooks/useAnimatedComponents.d.ts.map +1 -0
  91. package/dist/components/image-viewing/hooks/useAnimatedComponents.js +41 -0
  92. package/dist/components/image-viewing/hooks/useDoubleTapToZoom.d.ts +17 -0
  93. package/dist/components/image-viewing/hooks/useDoubleTapToZoom.d.ts.map +1 -0
  94. package/dist/components/image-viewing/hooks/useDoubleTapToZoom.js +49 -0
  95. package/dist/components/image-viewing/hooks/useImageDimensions.d.ts +11 -0
  96. package/dist/components/image-viewing/hooks/useImageDimensions.d.ts.map +1 -0
  97. package/dist/components/image-viewing/hooks/useImageDimensions.js +64 -0
  98. package/dist/components/image-viewing/hooks/useImageIndexChange.d.ts +12 -0
  99. package/dist/components/image-viewing/hooks/useImageIndexChange.d.ts.map +1 -0
  100. package/dist/components/image-viewing/hooks/useImageIndexChange.js +20 -0
  101. package/dist/components/image-viewing/hooks/useImagePrefetch.d.ts +11 -0
  102. package/dist/components/image-viewing/hooks/useImagePrefetch.d.ts.map +1 -0
  103. package/dist/components/image-viewing/hooks/useImagePrefetch.js +21 -0
  104. package/dist/components/image-viewing/hooks/usePanResponder.d.ts +20 -0
  105. package/dist/components/image-viewing/hooks/usePanResponder.d.ts.map +1 -0
  106. package/dist/components/image-viewing/hooks/usePanResponder.js +273 -0
  107. package/dist/components/image-viewing/hooks/useRequestClose.d.ts +10 -0
  108. package/dist/components/image-viewing/hooks/useRequestClose.d.ts.map +1 -0
  109. package/dist/components/image-viewing/hooks/useRequestClose.js +20 -0
  110. package/dist/components/image-viewing/image-viewing.component.d.ts +34 -0
  111. package/dist/components/image-viewing/image-viewing.component.d.ts.map +1 -0
  112. package/dist/components/image-viewing/image-viewing.component.js +74 -0
  113. package/dist/components/image-viewing/image-viewing.types.d.ts +11 -0
  114. package/dist/components/image-viewing/image-viewing.types.d.ts.map +1 -0
  115. package/dist/components/image-viewing/image-viewing.types.js +1 -0
  116. package/dist/components/image-viewing/util.d.ts +47 -0
  117. package/dist/components/image-viewing/util.d.ts.map +1 -0
  118. package/dist/components/image-viewing/util.js +99 -0
  119. package/dist/components/index.d.ts +2 -0
  120. package/dist/components/index.d.ts.map +1 -1
  121. package/dist/components/index.js +2 -0
  122. package/dist/components/input/input.component.d.ts +1 -1
  123. package/dist/components/input/input.component.d.ts.map +1 -1
  124. package/dist/components/input/input.component.js +3 -1
  125. package/dist/components/loading/loading.component.d.ts +1 -1
  126. package/dist/components/loading/loading.component.d.ts.map +1 -1
  127. package/dist/components/loading/loading.component.js +8 -4
  128. package/dist/components/order-card/order-card.component.d.ts +1 -1
  129. package/dist/components/order-card/order-card.component.d.ts.map +1 -1
  130. package/dist/components/order-card/order-card.component.js +4 -1
  131. package/dist/components/product-card/product-card.component.d.ts +1 -1
  132. package/dist/components/product-card/product-card.component.d.ts.map +1 -1
  133. package/dist/components/product-card/product-card.component.js +3 -1
  134. package/dist/components/product-highlight/product-highlight.component.d.ts +2 -2
  135. package/dist/components/product-highlight/product-highlight.component.d.ts.map +1 -1
  136. package/dist/components/product-highlight/product-highlight.component.js +7 -2
  137. package/dist/components/product-highlight/product-highlight.d.ts +1 -1
  138. package/dist/components/product-list-item/product-list-item.component.d.ts +1 -1
  139. package/dist/components/product-list-item/product-list-item.component.d.ts.map +1 -1
  140. package/dist/components/product-list-item/product-list-item.component.js +6 -3
  141. package/dist/components/product-review/product-review.component.d.ts +1 -1
  142. package/dist/components/product-review/product-review.component.d.ts.map +1 -1
  143. package/dist/components/product-review/product-review.component.js +6 -3
  144. package/dist/components/quick-add-product-card/quick-add-product-card.component.d.ts +1 -1
  145. package/dist/components/quick-add-product-card/quick-add-product-card.component.d.ts.map +1 -1
  146. package/dist/components/quick-add-product-card/quick-add-product-card.component.js +3 -1
  147. package/dist/components/radio/radio.component.d.ts +1 -1
  148. package/dist/components/radio/radio.component.d.ts.map +1 -1
  149. package/dist/components/radio/radio.component.js +3 -1
  150. package/dist/components/range-slider/range-slider.component.d.ts +1 -1
  151. package/dist/components/range-slider/range-slider.component.d.ts.map +1 -1
  152. package/dist/components/range-slider/range-slider.component.js +3 -1
  153. package/dist/components/search-button/search-button.component.d.ts +1 -1
  154. package/dist/components/search-button/search-button.component.d.ts.map +1 -1
  155. package/dist/components/search-button/search-button.component.js +4 -1
  156. package/dist/components/seller-box/seller-box.component.d.ts +1 -1
  157. package/dist/components/seller-box/seller-box.component.d.ts.map +1 -1
  158. package/dist/components/seller-box/seller-box.component.js +4 -1
  159. package/dist/components/toggle-switch/toggle-switch.component.d.ts +1 -1
  160. package/dist/components/toggle-switch/toggle-switch.component.d.ts.map +1 -1
  161. package/dist/components/toggle-switch/toggle-switch.component.js +3 -1
  162. package/dist/components/typography/typography.component.d.ts +1 -1
  163. package/dist/components/typography/typography.component.d.ts.map +1 -1
  164. package/dist/components/typography/typography.component.js +4 -1
  165. package/package.json +3 -1
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
2
  import { AccordionProps } from "./accordion.types";
3
- export declare const Accordion: React.FC<AccordionProps>;
3
+ export declare const Accordion: React.NamedExoticComponent<AccordionProps>;
4
4
  //# sourceMappingURL=accordion.component.d.ts.map
@@ -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;AAO/B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAoF9C,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;AAsFnD,eAAO,MAAM,SAAS,4CAAiC,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- // import { ChevronDownIcon, ChevronUpIcon } from "../../icons";
4
3
  import { LayoutAnimation, Text, TouchableOpacity, View } from "react-native";
4
+ import { MinusIcon, PlusIcon } from "../../icons";
5
5
  import { useTheme } from "../../themes";
6
6
  import { useAccordionStyles } from "./accordion.styles";
7
- export const Accordion = ({ items = [], initialExpandedItems = [], allowMultiple = true, testID, }) => {
7
+ const AccordionComponent = ({ items = [], initialExpandedItems = [], allowMultiple = true, testID, }) => {
8
8
  const styles = useAccordionStyles();
9
9
  const { colors } = useTheme();
10
10
  const [expandedItems, setExpandedItems] = React.useState(initialExpandedItems);
@@ -32,17 +32,7 @@ export const Accordion = ({ items = [], initialExpandedItems = [], allowMultiple
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(Text, { children: "\u2191" })
36
- // <ChevronUpIcon
37
- // size={20}
38
- // color={colors.textPrimary}
39
- // style={styles.icon}
40
- // />
41
- ) : (_jsx(Text, { children: "\u2193" })
42
- // <ChevronDownIcon
43
- // size={20}
44
- // color={colors.textPrimary}
45
- // style={styles.icon}
46
- // />
47
- )] }), 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 }))] }), isExpanded(item.id) && (_jsx(View, { style: styles.content, children: renderContent(item.content) }))] }, item.id))) }));
48
36
  };
37
+ export const Accordion = React.memo(AccordionComponent);
38
+ Accordion.displayName = "Accordion";
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
2
  import type { ActionButtonProps } from "./action-button.types";
3
- export declare const ActionButton: React.FC<ActionButtonProps>;
3
+ export declare const ActionButton: React.NamedExoticComponent<ActionButtonProps>;
4
4
  //# sourceMappingURL=action-button.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-button.component.d.ts","sourceRoot":"","sources":["../../../src/components/action-button/action-button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsDpD,CAAC"}
1
+ {"version":3,"file":"action-button.component.d.ts","sourceRoot":"","sources":["../../../src/components/action-button/action-button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAqD/D,eAAO,MAAM,YAAY,+CAAoC,CAAC"}
@@ -4,13 +4,11 @@ import { Text, TouchableOpacity, View } from "react-native";
4
4
  import { ChevronRightIcon, HelpCircleIcon } from "../../icons";
5
5
  import { useTheme } from "../../themes";
6
6
  import { useActionButtonStyles } from "./action-button.styles";
7
- export const ActionButton = ({ label = "Preciso de ajuda", icon, iconSize = 24, iconColor, iconBackgroundColor, onPress, disabled = false, testID, }) => {
7
+ const ActionButtonComponent = ({ label = "Preciso de ajuda", icon, iconSize = 24, iconColor, iconBackgroundColor, onPress, disabled = false, testID, }) => {
8
8
  const styles = useActionButtonStyles();
9
9
  const { colors } = useTheme();
10
- const renderIcon = () => {
11
- // Definir a cor do ícone para branco como padrão ou usar a cor personalizada
12
- const finalIconColor = iconColor || colors.white;
13
- // Se for fornecido um ícone personalizado
10
+ const finalIconColor = iconColor || colors.backgroundAction1;
11
+ const iconElement = React.useMemo(() => {
14
12
  if (icon) {
15
13
  if (React.isValidElement(icon)) {
16
14
  return icon;
@@ -19,11 +17,12 @@ export const ActionButton = ({ label = "Preciso de ajuda", icon, iconSize = 24,
19
17
  return icon({ size: iconSize, color: finalIconColor });
20
18
  }
21
19
  }
22
- // Usar o ícone padrão (HelpCircle)
23
20
  return _jsx(HelpCircleIcon, { size: iconSize, color: finalIconColor });
24
- };
21
+ }, [icon, iconSize, finalIconColor]);
25
22
  return (_jsxs(TouchableOpacity, { style: [styles.container, disabled && styles.disabled], onPress: onPress, disabled: disabled, testID: testID, accessibilityRole: "button", accessibilityLabel: label, accessibilityState: { disabled }, children: [_jsxs(View, { style: styles.contentContainer, children: [_jsx(View, { style: [
26
23
  styles.iconContainer,
27
24
  iconBackgroundColor && { backgroundColor: iconBackgroundColor },
28
- ], children: renderIcon() }), _jsx(Text, { style: styles.label, children: label })] }), _jsx(ChevronRightIcon, { size: 20, color: colors.textTertiary })] }));
25
+ ], children: iconElement }), _jsx(Text, { style: styles.label, children: label })] }), _jsx(ChevronRightIcon, { size: 20, color: colors.textTertiary })] }));
29
26
  };
27
+ export const ActionButton = React.memo(ActionButtonComponent);
28
+ ActionButton.displayName = "ActionButton";
@@ -1,7 +1,4 @@
1
+ import React from "react";
1
2
  import type { BadgeProps } from "./badge.types";
2
- /**
3
- * Badge - Componente para exibição de etiquetas ou marcadores
4
- * Suporta ícones SVG
5
- */
6
- export declare const Badge: ({ text, variant, size, style, textStyle, icon, iconPosition, }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const Badge: React.MemoExoticComponent<({ text, variant, size, style, textStyle, icon, iconPosition, }: BadgeProps) => import("react/jsx-runtime").JSX.Element>;
7
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":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,gEAQnB,UAAU,4CA6CZ,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;AA6DhD,eAAO,MAAM,KAAK,6FA/Cf,UAAU,6CA+CkC,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Text, View } from "react-native";
3
+ import React from "react";
3
4
  import { useBadgeStyles } from "./badge.styles";
4
5
  /**
5
6
  * Badge - Componente para exibição de etiquetas ou marcadores
6
7
  * Suporta ícones SVG
7
8
  */
8
- export const Badge = ({ text, variant = "default", size = "medium", style, textStyle, icon, iconPosition = "left", }) => {
9
+ const BadgeComponent = ({ text, variant = "default", size = "medium", style, textStyle, icon, iconPosition = "left", }) => {
9
10
  const styles = useBadgeStyles(variant, size);
10
11
  const renderIcon = () => {
11
12
  if (!icon) {
@@ -32,3 +33,5 @@ export const Badge = ({ text, variant = "default", size = "medium", style, textS
32
33
  textStyle
33
34
  ], children: text }), icon && iconPosition === "right" && renderIcon()] }));
34
35
  };
36
+ export const Badge = React.memo(BadgeComponent);
37
+ Badge.displayName = "Badge";
@@ -0,0 +1,5 @@
1
+ import { BannerCarouselProps } from './banner-carousel.types';
2
+ declare function BannerCarouselComponent({ items, onItemPress }: BannerCarouselProps): import("react/jsx-runtime").JSX.Element | null;
3
+ export declare const BannerCarousel: import("react").MemoExoticComponent<typeof BannerCarouselComponent>;
4
+ export {};
5
+ //# sourceMappingURL=banner-carousel.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner-carousel.component.d.ts","sourceRoot":"","sources":["../../../src/components/banner-carousel/banner-carousel.component.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,mBAAmB,EAAc,MAAM,yBAAyB,CAAC;AAI1E,iBAAS,uBAAuB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,mBAAmB,kDAqG3E;AAED,eAAO,MAAM,cAAc,qEAAgC,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo, useCallback, useRef } from 'react';
3
+ import { Animated, FlatList, Image, TouchableOpacity, View, } from 'react-native';
4
+ import { ITEM_HEIGHT, ITEM_WIDTH, SPACING, useBannerCarouselStyles, } from './banner-carousel.styles';
5
+ const AnimatedFlatList = Animated.createAnimatedComponent(FlatList);
6
+ function BannerCarouselComponent({ items, onItemPress }) {
7
+ const styles = useBannerCarouselStyles();
8
+ const flatListRef = useRef(null);
9
+ const scrollX = useRef(new Animated.Value(0)).current;
10
+ if (!(items === null || items === void 0 ? void 0 : items.length))
11
+ return null;
12
+ const extendedItems = [...items, ...items, ...items];
13
+ const handleScroll = Animated.event([{ nativeEvent: { contentOffset: { x: scrollX } } }], {
14
+ useNativeDriver: true,
15
+ listener: (event) => {
16
+ var _a, _b;
17
+ const offsetX = event.nativeEvent.contentOffset.x;
18
+ const midPoint = items.length * (ITEM_WIDTH + SPACING);
19
+ if (offsetX < ITEM_WIDTH + SPACING) {
20
+ (_a = flatListRef.current) === null || _a === void 0 ? void 0 : _a.scrollToOffset({
21
+ offset: offsetX + midPoint,
22
+ animated: false,
23
+ });
24
+ }
25
+ else if (offsetX > midPoint * 2 - (ITEM_WIDTH + SPACING)) {
26
+ (_b = flatListRef.current) === null || _b === void 0 ? void 0 : _b.scrollToOffset({
27
+ offset: offsetX - midPoint,
28
+ animated: false,
29
+ });
30
+ }
31
+ },
32
+ });
33
+ const renderItem = useCallback(({ item, index }) => {
34
+ const inputRange = [
35
+ (index - 1) * (ITEM_WIDTH + SPACING),
36
+ index * (ITEM_WIDTH + SPACING),
37
+ (index + 1) * (ITEM_WIDTH + SPACING),
38
+ ];
39
+ const scale = scrollX.interpolate({
40
+ inputRange,
41
+ outputRange: [1, 1, 0.9],
42
+ extrapolate: 'clamp',
43
+ });
44
+ const opacity = scrollX.interpolate({
45
+ inputRange,
46
+ outputRange: [0.8, 1, 0.8],
47
+ extrapolate: 'clamp',
48
+ });
49
+ const translateY = scrollX.interpolate({
50
+ inputRange,
51
+ outputRange: [55, 0, 5],
52
+ extrapolate: 'clamp',
53
+ });
54
+ return (_jsx(Animated.View, { style: [
55
+ styles.itemContainer,
56
+ {
57
+ transform: [{ scale }, { translateY }],
58
+ opacity,
59
+ },
60
+ ], children: _jsx(TouchableOpacity, { onPress: () => onItemPress === null || onItemPress === void 0 ? void 0 : onItemPress(item), children: _jsx(Image, { source: { uri: item.image }, style: { width: ITEM_WIDTH, height: ITEM_HEIGHT } }) }) }));
61
+ }, [onItemPress]);
62
+ return (_jsx(View, { style: styles.container, children: _jsx(AnimatedFlatList, { ref: flatListRef, data: extendedItems, renderItem: renderItem, horizontal: true, showsHorizontalScrollIndicator: false, onScroll: handleScroll, snapToInterval: ITEM_WIDTH + SPACING, decelerationRate: "fast", getItemLayout: (_, index) => ({
63
+ length: ITEM_WIDTH + SPACING,
64
+ offset: (ITEM_WIDTH + SPACING) * index,
65
+ index,
66
+ }), keyExtractor: (item, index) => `${item.id}-${index}` }) }));
67
+ }
68
+ export const BannerCarousel = memo(BannerCarouselComponent);
@@ -0,0 +1,17 @@
1
+ export declare const ITEM_WIDTH: number;
2
+ export declare const ITEM_HEIGHT = 435;
3
+ export declare const SPACING = 2;
4
+ export declare const useBannerCarouselStyles: () => {
5
+ container: {
6
+ width: number;
7
+ height: number;
8
+ };
9
+ itemContainer: {
10
+ width: number;
11
+ height: number;
12
+ };
13
+ list: {
14
+ height: "100%";
15
+ };
16
+ };
17
+ //# sourceMappingURL=banner-carousel.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner-carousel.styles.d.ts","sourceRoot":"","sources":["../../../src/components/banner-carousel/banner-carousel.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,QAAsB,CAAC;AAC9C,eAAO,MAAM,WAAW,MAAM,CAAC;AAC/B,eAAO,MAAM,OAAO,IAAI,CAAC;AAEzB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;CAcnC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Dimensions, StyleSheet } from "react-native";
2
+ const { width: SCREEN_WIDTH } = Dimensions.get("window");
3
+ export const ITEM_WIDTH = SCREEN_WIDTH * 0.85;
4
+ export const ITEM_HEIGHT = 435;
5
+ export const SPACING = 2;
6
+ export const useBannerCarouselStyles = () => {
7
+ return StyleSheet.create({
8
+ container: {
9
+ width: SCREEN_WIDTH,
10
+ height: ITEM_HEIGHT,
11
+ },
12
+ itemContainer: {
13
+ width: ITEM_WIDTH,
14
+ height: ITEM_HEIGHT,
15
+ },
16
+ list: {
17
+ height: "100%",
18
+ },
19
+ });
20
+ };
@@ -0,0 +1,11 @@
1
+ export interface BannerItem {
2
+ id: string;
3
+ image: string;
4
+ text: string;
5
+ label: string;
6
+ }
7
+ export interface BannerCarouselProps {
8
+ items: BannerItem[];
9
+ onItemPress?: (item: BannerItem) => void;
10
+ }
11
+ //# sourceMappingURL=banner-carousel.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner-carousel.types.d.ts","sourceRoot":"","sources":["../../../src/components/banner-carousel/banner-carousel.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CAC1C"}
@@ -0,0 +1,3 @@
1
+ export { BannerCarousel } from "./banner-carousel.component";
2
+ export type { BannerCarouselProps, BannerItem } from "./banner-carousel.types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/banner-carousel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1 @@
1
+ export { BannerCarousel } from "./banner-carousel.component";
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { ButtonProps } from "./button.props";
3
- export declare const Button: React.FC<ButtonProps>;
3
+ export declare const Button: React.NamedExoticComponent<ButtonProps>;
4
4
  //# sourceMappingURL=button.component.d.ts.map
@@ -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;AAG5D,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAiCxC,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"}
@@ -1,16 +1,20 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from "react";
2
3
  import { Text, TouchableOpacity } from "react-native";
3
- import Animation from "../../assets/animations/loading-animation.json";
4
+ import { useTheme } from "../../themes";
4
5
  import { Loading } from "../loading";
5
6
  import { useButtonStyles } from "./button.styles";
6
- export const Button = ({ label, loading, variant, fullWidth, size, disabled, ...rest }) => {
7
+ const ButtonComponent = ({ label, loading, variant, fullWidth, size, disabled, ...rest }) => {
7
8
  const buttonStyle = useButtonStyles({
8
9
  variant: variant,
9
10
  fullWidth,
10
11
  size,
11
12
  });
12
13
  const { icon: Icon } = rest;
14
+ const { colors } = useTheme();
13
15
  return (_jsx(TouchableOpacity, { style: [buttonStyle.container, disabled && buttonStyle.disabled], ...rest, children: loading ? (
14
16
  // <ActivityIndicator color="#fff" size="small" animating={true} />
15
- _jsx(Loading, { source: Animation, size: 28, containerStyle: { padding: 0 } })) : (_jsxs(_Fragment, { children: [rest.icon && _jsx(Icon, { stroke: 0.5, color: "#fff" }), _jsx(Text, { style: buttonStyle.buttonText, children: label })] })) }));
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 })] })) }));
16
18
  };
19
+ export const Button = React.memo(ButtonComponent);
20
+ Button.displayName = "Button";
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
2
  import { CardProps } from "./card.types";
3
- export declare const Card: React.FC<CardProps>;
3
+ export declare const Card: React.NamedExoticComponent<CardProps>;
4
4
  //# sourceMappingURL=card.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.component.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA4EpC,CAAC"}
1
+ {"version":3,"file":"card.component.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAgFzC,eAAO,MAAM,IAAI,uCAA4B,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
2
3
  import { Text, TouchableOpacity, View } from "react-native";
3
4
  import { ChevronRightIcon } from "../../icons";
4
5
  import { useTheme } from "../../themes";
5
6
  import { useCardStyles } from "./card.styles";
6
- export const Card = ({ children, title, subtitle, icon, actionIcon, onPress, disabled = false, style, titleStyle, subtitleStyle, testID, }) => {
7
+ const CardComponent = ({ children, title, subtitle, icon, actionIcon, onPress, disabled = false, style, titleStyle, subtitleStyle, testID, }) => {
7
8
  const styles = useCardStyles();
8
9
  const { colors } = useTheme();
9
10
  const renderIcon = () => {
@@ -47,3 +48,5 @@ export const Card = ({ children, title, subtitle, icon, actionIcon, onPress, dis
47
48
  : {};
48
49
  return (_jsxs(CardContainer, { style: [styles.container, disabled && styles.disabled, style], testID: testID, ...containerProps, children: [renderIcon(), _jsxs(View, { style: styles.contentContainer, children: [renderTitle(), renderSubtitle(), children] }), renderActionIcon()] }));
49
50
  };
51
+ export const Card = React.memo(CardComponent);
52
+ Card.displayName = "Card";
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { CashbackBannerProps } from './cashback-banner.types';
3
- export declare const CashbackBanner: React.FC<CashbackBannerProps>;
3
+ export declare const CashbackBanner: React.NamedExoticComponent<CashbackBannerProps>;
4
4
  //# sourceMappingURL=cashback-banner.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cashback-banner.component.d.ts","sourceRoot":"","sources":["../../../src/components/cashback-banner/cashback-banner.component.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAiDnE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgIxD,CAAC"}
1
+ {"version":3,"file":"cashback-banner.component.d.ts","sourceRoot":"","sources":["../../../src/components/cashback-banner/cashback-banner.component.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAmLnE,eAAO,MAAM,cAAc,iDAAsC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Pressable, Text, TouchableOpacity, View } from 'react-native';
3
+ import React from 'react';
3
4
  import { useCashbackBannerStyles } from './cashback-banner.styles';
4
5
  /**
5
6
  * Helper para processar texto com destaque usando %s
@@ -36,7 +37,7 @@ const processHighlightedText = (text, normalStyle, highlightedStyle) => {
36
37
  }
37
38
  return result;
38
39
  };
39
- export const CashbackBanner = ({ variant = 'default', text, subText, buttonText, link, onButtonPress, onUnderstandPress, style, textStyle, subTextStyle, highlightedTextStyle, buttonStyle, buttonTextStyle, ...rest }) => {
40
+ const CashbackBannerComponent = ({ variant = 'default', text, subText, buttonText, link, onButtonPress, onUnderstandPress, style, textStyle, subTextStyle, highlightedTextStyle, buttonStyle, buttonTextStyle, ...rest }) => {
40
41
  const styles = useCashbackBannerStyles(variant);
41
42
  const renderButton = () => {
42
43
  return (_jsx(Pressable, { style: [styles.button, buttonStyle], onPress: onButtonPress, accessibilityRole: "button", accessibilityLabel: buttonText, children: _jsxs(View, { style: styles.row, children: [processHighlightedText(buttonText, [styles.buttonText, buttonTextStyle], [styles.highlightedText, highlightedTextStyle]), link && _jsx(Text, { style: [styles.buttonText, styles.arrowIcon], children: "\u2192" })] }) }));
@@ -60,3 +61,5 @@ export const CashbackBanner = ({ variant = 'default', text, subText, buttonText,
60
61
  return renderDefaultVariant();
61
62
  }
62
63
  };
64
+ export const CashbackBanner = React.memo(CashbackBannerComponent);
65
+ CashbackBanner.displayName = "CashbackBanner";
@@ -1,7 +1,4 @@
1
1
  import React from "react";
2
2
  import { CategoryItemProps } from "./category-item.types";
3
- /**
4
- * Componente CategoryItem utilizado para exibir categorias com ícone e título
5
- */
6
- export declare const CategoryItem: React.FC<CategoryItemProps>;
3
+ export declare const CategoryItem: React.NamedExoticComponent<CategoryItemProps>;
7
4
  //# sourceMappingURL=category-item.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"category-item.component.d.ts","sourceRoot":"","sources":["../../../src/components/category-item/category-item.component.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2CpD,CAAC"}
1
+ {"version":3,"file":"category-item.component.d.ts","sourceRoot":"","sources":["../../../src/components/category-item/category-item.component.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAkD1D,eAAO,MAAM,YAAY,+CAAoC,CAAC"}
@@ -7,14 +7,16 @@ import { useCategoryItemStyles } from "./category-item.styles";
7
7
  /**
8
8
  * Componente CategoryItem utilizado para exibir categorias com ícone e título
9
9
  */
10
- export const CategoryItem = ({ title, icon, onPress, style, textStyle, iconStyle, hasArrow = true, }) => {
10
+ const CategoryItemComponent = ({ title, image, onPress, style, textStyle, imageStyle, hasArrow = true, }) => {
11
11
  const styles = useCategoryItemStyles();
12
12
  const theme = useTheme();
13
- const renderIcon = () => {
14
- if (React.isValidElement(icon)) {
15
- return _jsx(View, { style: [styles.iconContainer, iconStyle], children: icon });
13
+ const iconElement = React.useMemo(() => {
14
+ if (React.isValidElement(image)) {
15
+ return _jsx(View, { style: [styles.imageContainer, imageStyle], children: image });
16
16
  }
17
- return (_jsx(View, { style: [styles.iconContainer, iconStyle], children: _jsx(Image, { source: icon, style: styles.icon }) }));
18
- };
19
- return (_jsxs(Pressable, { style: [styles.container, style], onPress: onPress, android_ripple: { color: theme.colors.backgroundTertiary, borderless: false }, children: [_jsxs(View, { style: styles.content, children: [renderIcon(), _jsx(Text, { style: [styles.title, textStyle], children: title })] }), hasArrow && (_jsx(ChevronRightIcon, { size: 24, color: theme.colors.textPrimary, style: styles.arrowIcon }))] }));
17
+ return (_jsx(View, { style: [styles.imageContainer, imageStyle], children: _jsx(Image, { source: image, style: styles.image }) }));
18
+ }, [image, imageStyle]);
19
+ return (_jsxs(Pressable, { style: [styles.container, style], onPress: onPress, android_ripple: { color: theme.colors.backgroundTertiary, borderless: false }, children: [_jsxs(View, { style: styles.content, children: [iconElement, _jsx(Text, { style: [styles.title, textStyle], children: title })] }), hasArrow && (_jsx(ChevronRightIcon, { size: 24, color: theme.colors.textPrimary, style: styles.arrowIcon }))] }));
20
20
  };
21
+ export const CategoryItem = React.memo(CategoryItemComponent);
22
+ CategoryItem.displayName = "CategoryItem";
@@ -10,13 +10,13 @@ export declare const useCategoryItemStyles: () => {
10
10
  alignItems: "center";
11
11
  flex: number;
12
12
  };
13
- iconContainer: {
13
+ imageContainer: {
14
14
  width: number;
15
15
  height: number;
16
16
  justifyContent: "center";
17
17
  alignItems: "center";
18
18
  };
19
- icon: {
19
+ image: {
20
20
  width: number;
21
21
  height: number;
22
22
  resizeMode: "contain";
@@ -16,13 +16,13 @@ export const useCategoryItemStyles = () => {
16
16
  alignItems: "center",
17
17
  flex: 1,
18
18
  },
19
- iconContainer: {
19
+ imageContainer: {
20
20
  width: 40,
21
21
  height: 40,
22
22
  justifyContent: "center",
23
23
  alignItems: "center",
24
24
  },
25
- icon: {
25
+ image: {
26
26
  width: 40,
27
27
  height: 40,
28
28
  resizeMode: "contain",
@@ -7,7 +7,7 @@ export interface CategoryItemProps {
7
7
  /**
8
8
  * URL da imagem ou componente React para o ícone da categoria
9
9
  */
10
- icon: any;
10
+ image: any;
11
11
  /**
12
12
  * Função chamada quando o item é clicado
13
13
  */
@@ -23,7 +23,7 @@ export interface CategoryItemProps {
23
23
  /**
24
24
  * Estilos adicionais para a imagem/ícone
25
25
  */
26
- iconStyle?: StyleProp<ViewStyle>;
26
+ imageStyle?: StyleProp<ViewStyle>;
27
27
  /**
28
28
  * Indica se possui uma seta para a direita
29
29
  */
@@ -1 +1 @@
1
- {"version":3,"file":"category-item.types.d.ts","sourceRoot":"","sources":["../../../src/components/category-item/category-item.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/D,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,EAAE,GAAG,CAAC;IAEV;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAEjC;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
1
+ {"version":3,"file":"category-item.types.d.ts","sourceRoot":"","sources":["../../../src/components/category-item/category-item.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/D,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,EAAE,GAAG,CAAC;IAEX;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAEjC;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
2
  import type { CheckBoxProps } from "./checkbox.types";
3
- export declare const CheckBox: React.FC<CheckBoxProps>;
3
+ export declare const CheckBox: React.NamedExoticComponent<CheckBoxProps>;
4
4
  //# sourceMappingURL=checkbox.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.component.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAoE5C,CAAC"}
1
+ {"version":3,"file":"checkbox.component.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAwEtD,eAAO,MAAM,QAAQ,2CAAgC,CAAC"}
@@ -4,7 +4,7 @@ import { Text, TouchableOpacity, View } from "react-native";
4
4
  import { CheckIcon } from "../../icons";
5
5
  import { useTheme } from "../../themes";
6
6
  import { useCheckboxStyles } from "./checkbox.styles";
7
- export const CheckBox = ({ label, value, selected = false, onChange, disabled = false, error = false, testID, indeterminate = false, }) => {
7
+ const CheckBoxComponent = ({ label, value, selected = false, onChange, disabled = false, error = false, testID, indeterminate = false, }) => {
8
8
  const styles = useCheckboxStyles();
9
9
  const { colors } = useTheme();
10
10
  const handlePress = React.useCallback(() => {
@@ -31,3 +31,5 @@ export const CheckBox = ({ label, value, selected = false, onChange, disabled =
31
31
  error && styles.labelError,
32
32
  ], children: label })] }));
33
33
  };
34
+ export const CheckBox = React.memo(CheckBoxComponent);
35
+ CheckBox.displayName = "CheckBox";
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { EventCardProps } from "./event-card.types";
3
+ export declare const EventCard: React.NamedExoticComponent<EventCardProps>;
4
+ //# sourceMappingURL=event-card.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-card.component.d.ts","sourceRoot":"","sources":["../../../src/components/event-card/event-card.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAuEzD,eAAO,MAAM,SAAS,4CAAiC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Image, Text, TouchableOpacity, View } from "react-native";
4
+ import { useEventCardStyles } from "./event-card.styles";
5
+ const EventCardComponent = ({ location, dateTime, title, place, imageSource, renderImage, onPress, style, textStyle, testID, }) => {
6
+ const styles = useEventCardStyles();
7
+ const ImageElement = React.useMemo(() => {
8
+ if (renderImage) {
9
+ return renderImage;
10
+ }
11
+ if (imageSource) {
12
+ return _jsx(Image, { source: imageSource, style: styles.image, resizeMode: "cover" });
13
+ }
14
+ return _jsx(View, { style: styles.image }); // Placeholder cinza
15
+ }, [renderImage, imageSource, styles.image]);
16
+ const Content = (_jsxs(View, { style: [styles.card, style], testID: testID, children: [_jsxs(View, { style: styles.textContainer, children: [_jsx(View, { style: styles.badge, children: _jsx(Text, { style: styles.badgeText, numberOfLines: 1, children: location }) }), _jsxs(View, { children: [_jsx(Text, { style: [styles.dateText, textStyle], numberOfLines: 1, children: dateTime }), _jsx(Text, { style: [styles.titleText, { marginTop: 8 }, textStyle], numberOfLines: 1, children: title })] }), _jsx(Text, { style: [styles.placeText, textStyle], numberOfLines: 1, children: place })] }), ImageElement] }));
17
+ if (onPress) {
18
+ return (_jsx(TouchableOpacity, { onPress: onPress, activeOpacity: 0.7, children: Content }));
19
+ }
20
+ return Content;
21
+ };
22
+ export const EventCard = React.memo(EventCardComponent);
23
+ EventCard.displayName = "EventCard";
@@ -0,0 +1,15 @@
1
+ import { ImageStyle, TextStyle, ViewStyle } from "react-native";
2
+ interface EventCardStyle {
3
+ container: ViewStyle;
4
+ card: ViewStyle;
5
+ textContainer: ViewStyle;
6
+ badge: ViewStyle;
7
+ badgeText: TextStyle;
8
+ dateText: TextStyle;
9
+ titleText: TextStyle;
10
+ placeText: TextStyle;
11
+ image: ImageStyle;
12
+ }
13
+ export declare const useEventCardStyles: () => EventCardStyle;
14
+ export {};
15
+ //# sourceMappingURL=event-card.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-card.styles.d.ts","sourceRoot":"","sources":["../../../src/components/event-card/event-card.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAc,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG5E,UAAU,cAAc;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,aAAa,EAAE,SAAS,CAAC;IACzB,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,QAAO,cA+DrC,CAAC"}