decathlon-ui 0.3.7 → 0.3.8

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":"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"}
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;AAsD1D,eAAO,MAAM,YAAY,+CAAoC,CAAC"}
@@ -7,7 +7,7 @@ import { useCategoryItemStyles } from "./category-item.styles";
7
7
  /**
8
8
  * Componente CategoryItem utilizado para exibir categorias com ícone e título
9
9
  */
10
- const CategoryItemComponent = ({ title, image, onPress, style, textStyle, imageStyle, hasArrow = true, }) => {
10
+ const CategoryItemComponent = ({ title, image, onPress, style, textStyle, imageStyle, hasArrow = true, customColorChevronRight, }) => {
11
11
  const styles = useCategoryItemStyles();
12
12
  const theme = useTheme();
13
13
  const iconElement = React.useMemo(() => {
@@ -16,7 +16,10 @@ const CategoryItemComponent = ({ title, image, onPress, style, textStyle, imageS
16
16
  }
17
17
  return (_jsx(View, { style: [styles.imageContainer, imageStyle], children: _jsx(Image, { source: image, style: styles.image }) }));
18
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 }))] }));
19
+ return (_jsxs(Pressable, { style: [styles.container, style], onPress: onPress, android_ripple: {
20
+ color: theme.colors.backgroundTertiary,
21
+ borderless: false,
22
+ }, children: [_jsxs(View, { style: styles.content, children: [iconElement, _jsx(Text, { style: [styles.title, textStyle], children: title })] }), hasArrow && (_jsx(ChevronRightIcon, { size: 24, color: customColorChevronRight || theme.colors.textPrimary, style: styles.arrowIcon }))] }));
20
23
  };
21
24
  export const CategoryItem = React.memo(CategoryItemComponent);
22
25
  CategoryItem.displayName = "CategoryItem";
@@ -28,5 +28,9 @@ export interface CategoryItemProps {
28
28
  * Indica se possui uma seta para a direita
29
29
  */
30
30
  hasArrow?: boolean;
31
+ /**
32
+ * Cor personalizada para a seta
33
+ */
34
+ customColorChevronRight?: string;
31
35
  }
32
36
  //# sourceMappingURL=category-item.types.d.ts.map
@@ -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,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
+ {"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;IAEnB;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC"}
@@ -16,12 +16,12 @@ const ToggleSwitchComponent = ({ isOn = false, onToggle, disabled = false, error
16
16
  disabled: disabled,
17
17
  }, accessibilityLabel: label, children: [_jsx(View, { style: [
18
18
  styles.switchContainer,
19
- isOn && styles.switchActive,
19
+ isOn ? styles.switchActive : styles.switchInactive,
20
20
  disabled && styles.switchDisabled,
21
21
  error && styles.switchError,
22
22
  ], children: _jsx(View, { style: [
23
23
  styles.circle,
24
- isOn && styles.circleActive,
24
+ isOn ? styles.circleActive : styles.circleInactive,
25
25
  disabled && styles.circleDisabled,
26
26
  ] }) }), label && (_jsx(Text, { style: [
27
27
  styles.label,
@@ -21,6 +21,11 @@ export declare const useToggleSwitchStyles: () => {
21
21
  switchError: {
22
22
  backgroundColor: "#AB0009";
23
23
  };
24
+ switchInactive: {
25
+ backgroundColor: "#FFFFFF";
26
+ borderColor: "#B3BAC3";
27
+ borderWidth: number;
28
+ };
24
29
  circle: {
25
30
  width: number;
26
31
  height: number;
@@ -41,6 +46,9 @@ export declare const useToggleSwitchStyles: () => {
41
46
  circleDisabled: {
42
47
  backgroundColor: "#EFF1F3";
43
48
  };
49
+ circleInactive: {
50
+ backgroundColor: "#949494";
51
+ };
44
52
  label: {
45
53
  color: "#101010";
46
54
  fontSize: number;
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-switch.styles.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-switch/toggle-switch.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DjC,CAAC"}
1
+ {"version":3,"file":"toggle-switch.styles.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-switch/toggle-switch.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEjC,CAAC"}
@@ -26,6 +26,11 @@ export const useToggleSwitchStyles = () => {
26
26
  switchError: {
27
27
  backgroundColor: colors.textError,
28
28
  },
29
+ switchInactive: {
30
+ backgroundColor: colors.white,
31
+ borderColor: colors.borderPrimary,
32
+ borderWidth: 1,
33
+ },
29
34
  circle: {
30
35
  width: 20,
31
36
  height: 20,
@@ -43,6 +48,9 @@ export const useToggleSwitchStyles = () => {
43
48
  circleDisabled: {
44
49
  backgroundColor: colors.backgroundTertiary,
45
50
  },
51
+ circleInactive: {
52
+ backgroundColor: colors.iconDisabled,
53
+ },
46
54
  label: {
47
55
  color: colors.textPrimary,
48
56
  fontSize: 14,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decathlon-ui",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
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",