decathlon-ui 0.3.11 → 0.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"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;AAuD/D,eAAO,MAAM,YAAY,+CAAoC,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;AA8D/D,eAAO,MAAM,YAAY,+CAAoC,CAAC"}
@@ -4,7 +4,7 @@ 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
- const ActionButtonComponent = ({ 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, hasChevron = false, chevronColor, }) => {
8
8
  const styles = useActionButtonStyles();
9
9
  const { colors } = useTheme();
10
10
  const finalIconColor = iconColor || colors.backgroundAction1;
@@ -22,7 +22,7 @@ const ActionButtonComponent = ({ label = "Preciso de ajuda", icon, iconSize = 24
22
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: [icon && (_jsx(View, { style: [
23
23
  styles.iconContainer,
24
24
  iconBackgroundColor && { backgroundColor: iconBackgroundColor },
25
- ], children: iconElement })), _jsx(Text, { style: styles.label, children: label })] }), _jsx(ChevronRightIcon, { size: 20, color: colors.textTertiary })] }));
25
+ ], children: iconElement })), _jsx(Text, { style: styles.label, children: label })] }), hasChevron && (_jsx(ChevronRightIcon, { size: 20, color: chevronColor || colors.textTertiary }))] }));
26
26
  };
27
27
  export const ActionButton = React.memo(ActionButtonComponent);
28
28
  ActionButton.displayName = "ActionButton";
@@ -6,7 +6,7 @@ export declare const useActionButtonStyles: () => {
6
6
  paddingVertical: 16;
7
7
  paddingHorizontal: 16;
8
8
  borderWidth: number;
9
- borderColor: "#B3BAC3";
9
+ borderColor: "#D9DDE1";
10
10
  width: "100%";
11
11
  };
12
12
  disabled: {
@@ -11,7 +11,7 @@ export const useActionButtonStyles = () => {
11
11
  paddingVertical: spacing.md,
12
12
  paddingHorizontal: spacing.md,
13
13
  borderWidth: 1,
14
- borderColor: colors.borderPrimary,
14
+ borderColor: colors.borderSecondary,
15
15
  width: "100%",
16
16
  },
17
17
  disabled: {
@@ -33,5 +33,13 @@ export interface ActionButtonProps {
33
33
  * ID para testes
34
34
  */
35
35
  testID?: string;
36
+ /**
37
+ * Indica se o botão deve ter chevron
38
+ */
39
+ hasChevron?: boolean;
40
+ /**
41
+ * customiza a cor do chevron
42
+ */
43
+ chevronColor?: string;
36
44
  }
37
45
  //# sourceMappingURL=action-button.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-button.types.d.ts","sourceRoot":"","sources":["../../../src/components/action-button/action-button.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC;IACrD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"action-button.types.d.ts","sourceRoot":"","sources":["../../../src/components/action-button/action-button.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC;IACrD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"input.component.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.component.tsx"],"names":[],"mappings":"AAAA,O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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;AAkKD,eAAO,MAAM,KAAK,wCAA6B,CAAC"}
@@ -83,19 +83,11 @@ const InputComponent = ({ label, placeholder, error, value, disabled = false, ma
83
83
  useNativeDriver: false,
84
84
  }).start();
85
85
  }, [isFocused]);
86
- const borderWidth = focusAnimation.interpolate({
87
- inputRange: [0, 1],
88
- outputRange: [1, 2],
89
- });
90
- return (_jsxs(View, { style: styles.container, accessible: true, testID: testID, accessibilityLabel: `${label} input field`, children: [label && (_jsx(View, { style: styles.labelWrapper, children: _jsx(Text, { style: [
91
- styles.labelText,
92
- disabled && styles.disabledText,
93
- ], accessibilityRole: "text", children: label }) })), _jsx(Animated.View, { style: [
86
+ return (_jsxs(View, { style: styles.container, accessible: true, testID: testID, accessibilityLabel: `${label} input field`, children: [label && (_jsx(View, { style: styles.labelWrapper, children: _jsx(Text, { style: [styles.labelText, disabled && styles.disabledText], accessibilityRole: "text", children: label }) })), _jsx(Animated.View, { style: [
94
87
  styles.inputContainer,
95
88
  error && styles.inputError,
96
89
  disabled && styles.inputDisabled,
97
90
  isFocused && styles.inputFocused,
98
- { borderWidth },
99
91
  ], 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: {
100
92
  disabled: disabled,
101
93
  }, placeholderTextColor: "#A4ADB7", ...rest }) }), error && _jsx(ErrorMessage, { message: error })] }));
@@ -24,9 +24,9 @@ export declare const useInputStyles: () => {
24
24
  alignItems: "center";
25
25
  backgroundColor: string;
26
26
  borderColor: "#B3BAC3";
27
- paddingVertical: 20;
28
27
  paddingHorizontal: 16;
29
- maxHeight: number;
28
+ height: number;
29
+ borderWidth: number;
30
30
  };
31
31
  input: {
32
32
  flex: number;
@@ -1 +1 @@
1
- {"version":3,"file":"input.styles.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D1B,CAAC"}
1
+ {"version":3,"file":"input.styles.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgE1B,CAAC"}
@@ -28,9 +28,10 @@ export const useInputStyles = () => {
28
28
  alignItems: "center",
29
29
  backgroundColor: "transparent",
30
30
  borderColor: theme.colors.borderPrimary,
31
- paddingVertical: theme.spacing.mmd2,
31
+ // paddingVertical: theme.spacing.mmd2,
32
32
  paddingHorizontal: theme.spacing.md,
33
- maxHeight: 64,
33
+ height: 64,
34
+ borderWidth: 1,
34
35
  },
35
36
  input: {
36
37
  flex: 1,
@@ -52,7 +53,7 @@ export const useInputStyles = () => {
52
53
  },
53
54
  inputFocused: {
54
55
  borderColor: theme.colors.borderInformation,
55
- borderWidth: 2,
56
+ borderWidth: 1,
56
57
  },
57
58
  cursor: {
58
59
  width: 1,
@@ -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;AAiF7C,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;AA8E7C,eAAO,MAAM,MAAM,yCAA8B,CAAC"}
@@ -23,18 +23,11 @@ const SelectComponent = ({ label, placeholder, error, value, disabled = false, o
23
23
  setTimeout(() => setIsFocused(false), 200);
24
24
  }
25
25
  };
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
- styles.labelText,
28
- disabled && styles.disabledText
29
- ], accessibilityRole: "text", children: label }) }), _jsx(TouchableOpacity, { onPress: handlePress, disabled: disabled, activeOpacity: 0.7, children: _jsxs(Animated.View, { style: [
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: [styles.labelText, disabled && styles.disabledText], accessibilityRole: "text", children: label }) }), _jsx(TouchableOpacity, { onPress: handlePress, disabled: disabled, activeOpacity: 0.7, children: _jsxs(Animated.View, { style: [
30
27
  styles.selectContainer,
31
28
  error && styles.selectError,
32
29
  disabled && styles.selectDisabled,
33
- ], children: [_jsx(Text, { style: [
34
- styles.selectText,
35
- !value && styles.placeholderText,
36
- disabled && styles.selectTextDisabled,
37
- ], children: value || placeholder }), _jsx(View, { style: styles.chevronContainer, children: _jsx(ChevronDownIcon, { width: 20, height: 20, color: disabled ? "#A4ADB7" : "#15181B" }) })] }) }), error && _jsx(ErrorMessage, { message: error })] }));
30
+ ], children: [_jsx(Text, { style: [styles.selectText, disabled && styles.selectTextDisabled], children: value || placeholder }), _jsx(View, { style: styles.chevronContainer, children: _jsx(ChevronDownIcon, { width: 20, height: 20, color: disabled ? "#A4ADB7" : "#15181B" }) })] }) }), error && _jsx(ErrorMessage, { message: error })] }));
38
31
  };
39
32
  export const Select = React.memo(SelectComponent);
40
33
  Select.displayName = "Select";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decathlon-ui",
3
- "version": "0.3.11",
3
+ "version": "0.3.14",
4
4
  "description": "Biblioteca de componentes React Native com Storybook e documentação via GitHub Pages.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",