decathlon-ui 0.3.0 → 0.3.2

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 (41) hide show
  1. package/dist/components/button/button.props.d.ts +5 -2
  2. package/dist/components/button/button.props.d.ts.map +1 -1
  3. package/dist/components/button/button.props.js +3 -0
  4. package/dist/components/button/button.styles.d.ts +423 -9
  5. package/dist/components/button/button.styles.d.ts.map +1 -1
  6. package/dist/components/button/button.styles.js +77 -25
  7. package/dist/components/index.d.ts +2 -0
  8. package/dist/components/index.d.ts.map +1 -1
  9. package/dist/components/index.js +2 -0
  10. package/dist/components/information-card/index.d.ts +3 -0
  11. package/dist/components/information-card/index.d.ts.map +1 -0
  12. package/dist/components/information-card/index.js +1 -0
  13. package/dist/components/information-card/information-card.component.d.ts +4 -0
  14. package/dist/components/information-card/information-card.component.d.ts.map +1 -0
  15. package/dist/components/information-card/information-card.component.js +45 -0
  16. package/dist/components/information-card/information-card.styles.d.ts +30 -0
  17. package/dist/components/information-card/information-card.styles.d.ts.map +1 -0
  18. package/dist/components/information-card/information-card.styles.js +37 -0
  19. package/dist/components/information-card/information-card.types.d.ts +32 -0
  20. package/dist/components/information-card/information-card.types.d.ts.map +1 -0
  21. package/dist/components/information-card/information-card.types.js +1 -0
  22. package/dist/components/input/error-message/error-message.d.ts.map +1 -1
  23. package/dist/components/input/error-message/error-message.js +29 -26
  24. package/dist/components/input/input.component.d.ts +2 -1
  25. package/dist/components/input/input.component.d.ts.map +1 -1
  26. package/dist/components/input/input.component.js +2 -3
  27. package/dist/components/input/input.styles.d.ts +15 -14
  28. package/dist/components/input/input.styles.d.ts.map +1 -1
  29. package/dist/components/input/input.styles.js +16 -15
  30. package/dist/components/product-card/product-card.component.js +1 -1
  31. package/dist/components/select/select.component.d.ts.map +1 -1
  32. package/dist/components/select/select.component.js +1 -3
  33. package/dist/components/select/select.styles.d.ts +19 -18
  34. package/dist/components/select/select.styles.d.ts.map +1 -1
  35. package/dist/components/select/select.styles.js +20 -19
  36. package/dist/themes/index.d.ts +1 -0
  37. package/dist/themes/index.d.ts.map +1 -1
  38. package/dist/themes/light.d.ts +1 -0
  39. package/dist/themes/light.d.ts.map +1 -1
  40. package/dist/themes/light.js +1 -0
  41. package/package.json +1 -1
@@ -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,gBAAgB,CAAC;AAC/B,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,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
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,gBAAgB,CAAC;AAC/B,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,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
@@ -9,6 +9,7 @@ export * from "./category-item/index";
9
9
  export * from "./checkbox/index";
10
10
  export * from "./event-card/index";
11
11
  export * from "./filter-chip/index";
12
+ export * from "./information-card/index";
12
13
  export * from "./input/index";
13
14
  export * from "./loading/index";
14
15
  export * from "./order-card/index";
@@ -20,6 +21,7 @@ export * from "./quick-add-product-card/index";
20
21
  export * from "./radio/index";
21
22
  export * from "./range-slider/index";
22
23
  export * from "./search-button/index";
24
+ export * from "./select/index";
23
25
  export * from "./seller-box/index";
24
26
  export * from "./toggle-switch/index";
25
27
  export * from "./typography/index";
@@ -0,0 +1,3 @@
1
+ export { InformationCard } from "./information-card.component";
2
+ export type { InformationCardProps } from "./information-card.types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/information-card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1 @@
1
+ export { InformationCard } from "./information-card.component";
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { InformationCardProps } from './information-card.types';
3
+ export declare const InformationCard: React.NamedExoticComponent<InformationCardProps>;
4
+ //# sourceMappingURL=information-card.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"information-card.component.d.ts","sourceRoot":"","sources":["../../../src/components/information-card/information-card.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAgFrE,eAAO,MAAM,eAAe,kDAAuC,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { Text, View } from 'react-native';
4
+ import { useInformationCardStyles } from './information-card.styles';
5
+ /**
6
+ * Helper para processar texto com destaque usando %s
7
+ * Ex: "Vales e %scartão presente%s:"
8
+ * Retorna um array de elementos para renderizar
9
+ */
10
+ const processHighlightedText = (text, normalStyle, highlightedStyle) => {
11
+ if (!text || !text.includes('%s')) {
12
+ return [_jsx(Text, { style: normalStyle, children: text }, "single-text")];
13
+ }
14
+ const parts = text.split('%s');
15
+ const result = [];
16
+ if (parts.length < 3) {
17
+ // Se não tiver pelo menos dois marcadores %s, retorna o texto normal
18
+ return [_jsx(Text, { style: normalStyle, children: text }, "incomplete-text")];
19
+ }
20
+ // Adicionar partes antes do destaque
21
+ if (parts[0]) {
22
+ result.push(_jsx(Text, { style: normalStyle, children: parts[0] }, "pre-highlight"));
23
+ }
24
+ // Adicionar parte destacada - combina os estilos para manter as props do texto normal
25
+ // exceto pela cor que vem do highlightedStyle
26
+ const combinedStyle = [normalStyle, highlightedStyle];
27
+ result.push(_jsx(Text, { style: combinedStyle, children: parts[1] }, "highlight"));
28
+ // Adicionar partes após o destaque
29
+ if (parts[2]) {
30
+ result.push(_jsx(Text, { style: normalStyle, children: parts[2] }, "post-highlight"));
31
+ }
32
+ // Se tiver mais partes (caso improvavelmente tenha mais de 2 %s), adiciona tudo como texto normal
33
+ for (let i = 3; i < parts.length; i++) {
34
+ if (parts[i]) {
35
+ result.push(_jsx(Text, { style: normalStyle, children: parts[i] }, `extra-${i}`));
36
+ }
37
+ }
38
+ return result;
39
+ };
40
+ const InformationCardComponent = ({ title, description, style, titleStyle, descriptionStyle, highlightedTextStyle, ...rest }) => {
41
+ const styles = useInformationCardStyles();
42
+ return (_jsxs(View, { style: [styles.container, style], ...rest, children: [_jsx(View, { style: { flexDirection: 'row', flexWrap: 'wrap' }, children: processHighlightedText(title, [styles.title, titleStyle], [styles.highlightedText, highlightedTextStyle]) }), _jsx(View, { style: { flexDirection: 'row', flexWrap: 'wrap' }, children: processHighlightedText(description, [styles.description, descriptionStyle], [styles.highlightedText, highlightedTextStyle]) })] }));
43
+ };
44
+ export const InformationCard = React.memo(InformationCardComponent);
45
+ InformationCard.displayName = "InformationCard";
@@ -0,0 +1,30 @@
1
+ export declare const useInformationCardStyles: () => {
2
+ container: {
3
+ backgroundColor: "#EFF1F3";
4
+ paddingHorizontal: 8;
5
+ paddingVertical: 16;
6
+ };
7
+ title: {
8
+ fontFamily: "Inter-SemiBold";
9
+ fontWeight: "600";
10
+ fontStyle: "normal";
11
+ fontSize: 12;
12
+ lineHeight: number;
13
+ letterSpacing: number;
14
+ color: "#101010";
15
+ marginBottom: 4;
16
+ };
17
+ description: {
18
+ fontFamily: "Inter-Regular";
19
+ fontWeight: "400";
20
+ fontStyle: "normal";
21
+ fontSize: 12;
22
+ lineHeight: number;
23
+ letterSpacing: number;
24
+ color: "#101010";
25
+ };
26
+ highlightedText: {
27
+ color: "#DB6900";
28
+ };
29
+ };
30
+ //# sourceMappingURL=information-card.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"information-card.styles.d.ts","sourceRoot":"","sources":["../../../src/components/information-card/information-card.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCpC,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { useMemo } from "react";
2
+ import { StyleSheet } from "react-native";
3
+ import { useTheme } from "../../themes";
4
+ export const useInformationCardStyles = () => {
5
+ const theme = useTheme();
6
+ return useMemo(() => {
7
+ return StyleSheet.create({
8
+ container: {
9
+ backgroundColor: theme.colors.backgroundAction2,
10
+ paddingHorizontal: theme.spacing.xs, // 12px
11
+ paddingVertical: theme.spacing.md, // 16px
12
+ },
13
+ title: {
14
+ fontFamily: theme.fonts.inter.semiBold,
15
+ fontWeight: "600",
16
+ fontStyle: "normal",
17
+ fontSize: theme.fonts.sizes.xxs, // 12px
18
+ lineHeight: 18,
19
+ letterSpacing: 0,
20
+ color: theme.colors.textPrimary,
21
+ marginBottom: theme.spacing.xxs, // 4px para espaçamento entre título e descrição
22
+ },
23
+ description: {
24
+ fontFamily: theme.fonts.inter.regular,
25
+ fontWeight: "400",
26
+ fontStyle: "normal",
27
+ fontSize: theme.fonts.sizes.xxs, // 12px
28
+ lineHeight: 18,
29
+ letterSpacing: 0,
30
+ color: theme.colors.textPrimary,
31
+ },
32
+ highlightedText: {
33
+ color: theme.colors.textHighlight, // Cor de destaque
34
+ },
35
+ });
36
+ }, [theme]);
37
+ };
@@ -0,0 +1,32 @@
1
+ import { TextStyle, ViewStyle } from "react-native";
2
+ export interface InformationCardProps {
3
+ /**
4
+ * Título do card
5
+ * Use %s para indicar partes a serem destacadas
6
+ * Ex: "Vales e %scartão presente%s:"
7
+ */
8
+ title: string;
9
+ /**
10
+ * Descrição/subtítulo do card
11
+ * Use %s para indicar partes a serem destacadas
12
+ * Ex: "Caso tenha um %svale-compra%s ou cartão presente, você poderá inseri-lo na etapa de pagamento."
13
+ */
14
+ description: string;
15
+ /**
16
+ * Estilo do container
17
+ */
18
+ style?: ViewStyle;
19
+ /**
20
+ * Estilo do título
21
+ */
22
+ titleStyle?: TextStyle;
23
+ /**
24
+ * Estilo da descrição
25
+ */
26
+ descriptionStyle?: TextStyle;
27
+ /**
28
+ * Estilo do texto destacado com %s
29
+ */
30
+ highlightedTextStyle?: TextStyle;
31
+ }
32
+ //# sourceMappingURL=information-card.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"information-card.types.d.ts","sourceRoot":"","sources":["../../../src/components/information-card/information-card.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAE7B;;OAEG;IACH,oBAAoB,CAAC,EAAE,SAAS,CAAC;CAClC"}
@@ -1 +1 @@
1
- {"version":3,"file":"error-message.d.ts","sourceRoot":"","sources":["../../../../src/components/input/error-message/error-message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoBpD,CAAC"}
1
+ {"version":3,"file":"error-message.d.ts","sourceRoot":"","sources":["../../../../src/components/input/error-message/error-message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA+CpD,CAAC"}
@@ -1,30 +1,33 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { StyleSheet, Text, View } from "react-native";
3
+ import { useTheme } from "../../../themes";
4
+ import { ErrorWarningIcon } from "../../../icons";
3
5
  export const ErrorMessage = ({ message, testID, }) => {
4
- return (_jsxs(View, { style: styles.container, testID: testID, accessibilityRole: "alert", accessible: true, children: [_jsx(View, { style: styles.iconContainer, children: _jsx(Text, { children: "!" }) }), _jsx(Text, { style: styles.message, accessibilityRole: "text", children: message })] }));
6
+ const theme = useTheme();
7
+ const styles = StyleSheet.create({
8
+ container: {
9
+ display: "flex",
10
+ width: "100%",
11
+ paddingVertical: theme.spacing.xxs,
12
+ paddingHorizontal: theme.spacing.xxs,
13
+ flexDirection: "row",
14
+ alignItems: "center",
15
+ gap: theme.spacing.xxs,
16
+ },
17
+ iconContainer: {
18
+ paddingTop: 5,
19
+ width: 18,
20
+ },
21
+ icon: {
22
+ width: 16,
23
+ height: 16,
24
+ },
25
+ message: {
26
+ flex: 1,
27
+ color: theme.colors.textError,
28
+ fontSize: theme.fonts.sizes.xs,
29
+ fontFamily: theme.fonts.inter.regular,
30
+ },
31
+ });
32
+ return (_jsxs(View, { style: styles.container, testID: testID, accessibilityRole: "alert", accessible: true, children: [_jsx(View, { style: styles.iconContainer, children: _jsx(ErrorWarningIcon, { stroke: theme.colors.borderError, size: 18 }) }), _jsx(Text, { style: styles.message, accessibilityRole: "text", children: message })] }));
5
33
  };
6
- const styles = StyleSheet.create({
7
- container: {
8
- display: "flex",
9
- width: "100%",
10
- paddingVertical: 4,
11
- paddingHorizontal: 4,
12
- flexDirection: "row",
13
- alignItems: "center",
14
- gap: 4,
15
- },
16
- iconContainer: {
17
- paddingTop: 2,
18
- width: 16,
19
- },
20
- icon: {
21
- width: 16,
22
- height: 16,
23
- },
24
- message: {
25
- flex: 1,
26
- color: "#CC212A",
27
- fontSize: 14,
28
- fontFamily: "Inter",
29
- },
30
- });
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
+ import { TextInputProps } from "react-native";
2
3
  type MaskType = "cpf" | "phone" | "date" | "cep" | "custom";
3
- interface InputProps {
4
+ interface InputProps extends TextInputProps {
4
5
  label: string;
5
6
  placeholder?: string;
6
7
  error?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"input.component.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,KAAK,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE5D,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAyKD,eAAO,MAAM,KAAK,wCAA6B,CAAC"}
1
+ {"version":3,"file":"input.component.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA6B,cAAc,EAAQ,MAAM,cAAc,CAAC;AAK/E,KAAK,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE5D,UAAU,UAAW,SAAQ,cAAc;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA0KD,eAAO,MAAM,KAAK,wCAA6B,CAAC"}
@@ -56,7 +56,7 @@ const applyMask = (value, maskType, customMask) => {
56
56
  return value;
57
57
  }
58
58
  };
59
- const InputComponent = ({ label, placeholder, error, value, disabled = false, maskType, customMask, mask, pattern, onChangeText, testID, }) => {
59
+ const InputComponent = ({ label, placeholder, error, value, disabled = false, maskType, customMask, mask, pattern, onChangeText, testID, ...rest }) => {
60
60
  const [isFocused, setIsFocused] = React.useState(false);
61
61
  const focusAnimation = React.useRef(new Animated.Value(0)).current;
62
62
  const styles = useInputStyles();
@@ -90,7 +90,6 @@ const InputComponent = ({ label, placeholder, error, value, disabled = false, ma
90
90
  return (_jsxs(View, { style: styles.container, accessible: true, testID: testID, accessibilityLabel: `${label} input field`, children: [_jsx(View, { style: styles.labelWrapper, children: _jsx(Text, { style: [
91
91
  styles.labelText,
92
92
  disabled && styles.disabledText,
93
- isFocused && styles.focusedLabel,
94
93
  ], accessibilityRole: "text", children: label }) }), _jsxs(Animated.View, { style: [
95
94
  styles.inputContainer,
96
95
  error && styles.inputError,
@@ -99,7 +98,7 @@ const InputComponent = ({ label, placeholder, error, value, disabled = false, ma
99
98
  { borderWidth },
100
99
  ], children: [_jsx(TextInput, { style: [styles.input, disabled && styles.inputTextDisabled], placeholder: placeholder, value: value, onChangeText: handleChangeText, editable: !disabled, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), accessibilityLabel: label, accessibilityState: {
101
100
  disabled: disabled,
102
- }, placeholderTextColor: "#A4ADB7" }), isFocused && _jsx(View, { style: styles.cursor })] }), error && _jsx(ErrorMessage, { message: error })] }));
101
+ }, placeholderTextColor: "#A4ADB7", ...rest }), isFocused && _jsx(View, { style: styles.cursor })] }), error && _jsx(ErrorMessage, { message: error })] }));
103
102
  };
104
103
  export const Input = React.memo(InputComponent);
105
104
  Input.displayName = "Input";
@@ -4,10 +4,11 @@ export declare const useInputStyles: () => {
4
4
  width: "100%";
5
5
  paddingBottom: 8;
6
6
  flexDirection: "column";
7
+ gap: 8;
7
8
  };
8
9
  labelWrapper: {
9
10
  alignSelf: "stretch";
10
- gap: 4;
11
+ gap: 8;
11
12
  };
12
13
  labelText: {
13
14
  fontSize: number;
@@ -18,35 +19,35 @@ export declare const useInputStyles: () => {
18
19
  disabledText: {
19
20
  color: string;
20
21
  };
21
- focusedLabel: {
22
- color: string;
23
- };
24
22
  inputContainer: {
25
23
  flexDirection: "row";
26
24
  alignItems: "center";
27
25
  backgroundColor: string;
28
- borderColor: string;
29
- padding: number;
30
- paddingHorizontal: number;
26
+ borderColor: "#B3BAC3";
27
+ paddingVertical: 20;
28
+ paddingHorizontal: 16;
31
29
  };
32
30
  input: {
33
31
  flex: number;
34
- fontSize: number;
35
- color: string;
36
- padding: number;
32
+ fontSize: 16;
33
+ lineHeight: 24;
34
+ verticalAlign: "middle";
35
+ letterSpacing: number;
36
+ color: "#101010";
37
+ fontFamily: "Inter-Regular";
37
38
  };
38
39
  inputError: {
39
- borderColor: string;
40
+ borderColor: "#E3262F";
40
41
  };
41
42
  inputDisabled: {
42
- backgroundColor: string;
43
- borderColor: string;
43
+ borderColor: "#EFF1F3";
44
44
  };
45
45
  inputTextDisabled: {
46
46
  color: string;
47
47
  };
48
48
  inputFocused: {
49
- borderColor: string;
49
+ borderColor: "#3643BA";
50
+ borderWidth: number;
50
51
  };
51
52
  cursor: {
52
53
  width: number;
@@ -1 +1 @@
1
- {"version":3,"file":"input.styles.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4D1B,CAAC"}
1
+ {"version":3,"file":"input.styles.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D1B,CAAC"}
@@ -8,10 +8,11 @@ export const useInputStyles = () => {
8
8
  width: "100%",
9
9
  paddingBottom: theme.spacing.xs,
10
10
  flexDirection: "column",
11
+ gap: theme.spacing.xs,
11
12
  },
12
13
  labelWrapper: {
13
14
  alignSelf: "stretch",
14
- gap: theme.spacing.xxs,
15
+ gap: theme.spacing.xs,
15
16
  },
16
17
  labelText: {
17
18
  fontSize: 14,
@@ -22,35 +23,35 @@ export const useInputStyles = () => {
22
23
  disabledText: {
23
24
  color: "#A4ADB7",
24
25
  },
25
- focusedLabel: {
26
- color: "#007DBC",
27
- },
28
26
  inputContainer: {
29
27
  flexDirection: "row",
30
28
  alignItems: "center",
31
- backgroundColor: "#FFFFFF",
32
- borderColor: "#A4ADB7",
33
- padding: 20,
34
- paddingHorizontal: 16,
29
+ backgroundColor: "transparent",
30
+ borderColor: theme.colors.borderPrimary,
31
+ paddingVertical: theme.spacing.mmd2,
32
+ paddingHorizontal: theme.spacing.md,
35
33
  },
36
34
  input: {
37
35
  flex: 1,
38
- fontSize: 16,
39
- color: "#15181B",
40
- padding: 0,
36
+ fontSize: theme.fonts.sizes.sm,
37
+ lineHeight: theme.fonts.sizes.lg,
38
+ verticalAlign: "middle",
39
+ letterSpacing: 0,
40
+ color: theme.colors.textPrimary,
41
+ fontFamily: theme.fonts.inter.regular,
41
42
  },
42
43
  inputError: {
43
- borderColor: "#FF2934",
44
+ borderColor: theme.colors.borderError,
44
45
  },
45
46
  inputDisabled: {
46
- backgroundColor: "#FFFFFF",
47
- borderColor: "#C3C9CF",
47
+ borderColor: theme.colors.borderDisabled,
48
48
  },
49
49
  inputTextDisabled: {
50
50
  color: "#A4ADB7",
51
51
  },
52
52
  inputFocused: {
53
- borderColor: "#007DBC",
53
+ borderColor: theme.colors.borderInformation,
54
+ borderWidth: 2,
54
55
  },
55
56
  cursor: {
56
57
  width: 1,
@@ -14,7 +14,7 @@ const ProductCardComponent = ({ variant = "grid", imageUrl, brand, productName,
14
14
  (flags === null || flags === void 0 ? void 0 : flags.length) > 0 &&
15
15
  (flags === null || flags === void 0 ? void 0 : flags.map((flag, index) => (_jsx(Badge, { text: flag.text, style: { position: "absolute", top: 0, left: 0 }, icon: flag.icon }, flag.name + index + productName)))), variant === "grid" && (_jsx(TouchableOpacity, { style: [
16
16
  isFavorite ? styles.favoriteButton : styles.unfavoriteButton,
17
- ], onPress: handleFavoritePress, accessibilityLabel: isFavorite ? "Remover dos favoritos" : "Adicionar aos favoritos", accessibilityRole: "button", children: _jsx(HeartIcon, { size: 20, color: "#101010", fill: isFavorite ? "#101010" : "transparent" }) }))] }), variant !== "lastViewed" && (_jsxs(View, { style: styles.detailsContainer, children: [_jsxs(View, { style: styles.productInfo, children: [_jsx(Text, { style: styles.brandText, children: brand }), _jsx(View, { style: styles.nameContainer, children: _jsx(Text, { numberOfLines: 3, style: styles.nameText, accessibilityLabel: `Nome do produto: ${productName}`, children: productName }) })] }), variant === "grid" && (_jsxs(View, { style: styles.ratingContainer, accessibilityLabel: `Avaliação: ${rating} estrelas, ${reviewCount} avaliações`, children: [_jsx(StarIcon, { size: 11, color: "#101010", fill: "#101010" }), _jsxs(View, { style: styles.reviewCountWrapper, children: [_jsx(Text, { style: styles.ratingText, children: rating }), _jsxs(Text, { style: styles.reviewCountText, children: ["(", reviewCount, ")"] })] })] })), _jsx(View, { style: styles.priceContainer, children: _jsx(Text, { style: styles.priceText, accessibilityLabel: `Preço: ${price}`, children: price }) })] }))] })), [
17
+ ], onPress: handleFavoritePress, accessibilityLabel: isFavorite ? "Remover dos favoritos" : "Adicionar aos favoritos", accessibilityRole: "button", children: _jsx(HeartIcon, { size: 20, color: "#101010", fill: isFavorite ? "#101010" : "transparent" }) }))] }), variant !== "lastViewed" && (_jsxs(View, { style: styles.detailsContainer, children: [_jsxs(View, { style: styles.productInfo, children: [variant !== "shelf" && _jsx(Text, { style: styles.brandText, children: brand }), _jsx(View, { style: styles.nameContainer, children: _jsx(Text, { numberOfLines: 3, style: styles.nameText, accessibilityLabel: `Nome do produto: ${productName}`, children: productName }) })] }), variant === "grid" && (_jsxs(View, { style: styles.ratingContainer, accessibilityLabel: `Avaliação: ${rating} estrelas, ${reviewCount} avaliações`, children: [_jsx(StarIcon, { size: 11, color: "#101010", fill: "#101010" }), _jsxs(View, { style: styles.reviewCountWrapper, children: [_jsx(Text, { style: styles.ratingText, children: rating }), _jsxs(Text, { style: styles.reviewCountText, children: ["(", reviewCount, ")"] })] })] })), _jsx(View, { style: styles.priceContainer, children: _jsx(Text, { style: styles.priceText, accessibilityLabel: `Preço: ${price}`, children: price }) })] }))] })), [
18
18
  brand,
19
19
  handleFavoritePress,
20
20
  imageUrl,
@@ -1 +1 @@
1
- {"version":3,"file":"select.component.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAmF7C,eAAO,MAAM,MAAM,yCAA8B,CAAC"}
1
+ {"version":3,"file":"select.component.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAiF7C,eAAO,MAAM,MAAM,yCAA8B,CAAC"}
@@ -25,13 +25,11 @@ const SelectComponent = ({ label, placeholder, error, value, disabled = false, o
25
25
  };
26
26
  return (_jsxs(View, { style: styles.container, accessible: true, testID: testID, accessibilityLabel: `${label} select field`, children: [_jsx(View, { style: styles.labelWrapper, children: _jsx(Text, { style: [
27
27
  styles.labelText,
28
- disabled && styles.disabledText,
29
- isFocused && styles.focusedLabel,
28
+ disabled && styles.disabledText
30
29
  ], accessibilityRole: "text", children: label }) }), _jsx(TouchableOpacity, { onPress: handlePress, disabled: disabled, activeOpacity: 0.7, children: _jsxs(Animated.View, { style: [
31
30
  styles.selectContainer,
32
31
  error && styles.selectError,
33
32
  disabled && styles.selectDisabled,
34
- isFocused && styles.selectFocused,
35
33
  ], children: [_jsx(Text, { style: [
36
34
  styles.selectText,
37
35
  !value && styles.placeholderText,
@@ -4,52 +4,53 @@ export declare const useSelectStyles: () => {
4
4
  width: "100%";
5
5
  paddingBottom: 8;
6
6
  flexDirection: "column";
7
+ gap: 8;
7
8
  };
8
9
  labelWrapper: {
9
10
  alignSelf: "stretch";
10
- gap: 4;
11
+ gap: 8;
11
12
  };
12
13
  labelText: {
13
14
  fontSize: number;
14
15
  lineHeight: number;
15
- color: string;
16
- fontFamily: string;
16
+ color: "#101010";
17
+ fontFamily: "Inter-Regular";
17
18
  };
18
19
  disabledText: {
19
- color: string;
20
- };
21
- focusedLabel: {
22
- color: string;
20
+ color: "#949494";
23
21
  };
24
22
  selectContainer: {
25
23
  flexDirection: "row";
26
24
  alignItems: "center";
27
25
  backgroundColor: string;
28
- borderColor: string;
29
26
  borderWidth: number;
30
- padding: number;
31
- paddingHorizontal: number;
27
+ borderColor: "#B3BAC3";
28
+ paddingVertical: 20;
29
+ paddingHorizontal: 16;
32
30
  };
33
31
  selectText: {
34
32
  flex: number;
35
- fontSize: number;
36
- color: string;
33
+ fontSize: 16;
34
+ lineHeight: 24;
35
+ verticalAlign: "middle";
36
+ letterSpacing: number;
37
+ color: "#101010";
38
+ fontFamily: "Inter-Regular";
37
39
  };
38
40
  placeholderText: {
39
- color: string;
41
+ color: "#949494";
40
42
  };
41
43
  selectError: {
42
- borderColor: string;
44
+ borderColor: "#E3262F";
43
45
  };
44
46
  selectDisabled: {
45
- backgroundColor: string;
46
- borderColor: string;
47
+ borderColor: "#EFF1F3";
47
48
  };
48
49
  selectTextDisabled: {
49
- color: string;
50
+ color: "#949494";
50
51
  };
51
52
  selectFocused: {
52
- borderColor: string;
53
+ borderColor: "#3643BA";
53
54
  borderWidth: number;
54
55
  };
55
56
  chevronContainer: {
@@ -1 +1 @@
1
- {"version":3,"file":"select.styles.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D3B,CAAC"}
1
+ {"version":3,"file":"select.styles.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D3B,CAAC"}
@@ -8,52 +8,53 @@ export const useSelectStyles = () => {
8
8
  width: "100%",
9
9
  paddingBottom: theme.spacing.xs,
10
10
  flexDirection: "column",
11
+ gap: theme.spacing.xs,
11
12
  },
12
13
  labelWrapper: {
13
14
  alignSelf: "stretch",
14
- gap: theme.spacing.xxs,
15
+ gap: theme.spacing.xs,
15
16
  },
16
17
  labelText: {
17
18
  fontSize: 14,
18
19
  lineHeight: 20,
19
- color: "#15181B",
20
- fontFamily: "Inter",
20
+ color: theme.colors.textPrimary,
21
+ fontFamily: theme.fonts.inter.regular,
21
22
  },
22
23
  disabledText: {
23
- color: "#A4ADB7",
24
- },
25
- focusedLabel: {
26
- color: "#007DBC",
24
+ color: theme.colors.textDisabled,
27
25
  },
28
26
  selectContainer: {
29
27
  flexDirection: "row",
30
28
  alignItems: "center",
31
- backgroundColor: "#FFFFFF",
32
- borderColor: "#A4ADB7",
29
+ backgroundColor: "transparent",
33
30
  borderWidth: 1,
34
- padding: 20,
35
- paddingHorizontal: 16,
31
+ borderColor: theme.colors.borderPrimary,
32
+ paddingVertical: theme.spacing.mmd2,
33
+ paddingHorizontal: theme.spacing.md,
36
34
  },
37
35
  selectText: {
38
36
  flex: 1,
39
- fontSize: 16,
40
- color: "#15181B",
37
+ fontSize: theme.fonts.sizes.sm,
38
+ lineHeight: theme.fonts.sizes.lg,
39
+ verticalAlign: "middle",
40
+ letterSpacing: 0,
41
+ color: theme.colors.textPrimary,
42
+ fontFamily: theme.fonts.inter.regular,
41
43
  },
42
44
  placeholderText: {
43
- color: "#A4ADB7",
45
+ color: theme.colors.textDisabled,
44
46
  },
45
47
  selectError: {
46
- borderColor: "#FF2934",
48
+ borderColor: theme.colors.borderError,
47
49
  },
48
50
  selectDisabled: {
49
- backgroundColor: "#FFFFFF",
50
- borderColor: "#C3C9CF",
51
+ borderColor: theme.colors.borderDisabled,
51
52
  },
52
53
  selectTextDisabled: {
53
- color: "#A4ADB7",
54
+ color: theme.colors.textDisabled,
54
55
  },
55
56
  selectFocused: {
56
- borderColor: "#007DBC",
57
+ borderColor: theme.colors.borderInformation,
57
58
  borderWidth: 2,
58
59
  },
59
60
  chevronContainer: {
@@ -130,6 +130,7 @@ declare const useTheme: () => {
130
130
  readonly default: 14;
131
131
  readonly md: 16;
132
132
  readonly mmd: 21;
133
+ readonly mmd2: 20;
133
134
  readonly lg: 24;
134
135
  readonly xl: 32;
135
136
  readonly xxl: 48;