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.
- package/dist/components/category-item/category-item.component.d.ts.map +1 -1
- package/dist/components/category-item/category-item.component.js +5 -2
- package/dist/components/category-item/category-item.types.d.ts +4 -0
- package/dist/components/category-item/category-item.types.d.ts.map +1 -1
- package/dist/components/toggle-switch/toggle-switch.component.js +2 -2
- package/dist/components/toggle-switch/toggle-switch.styles.d.ts +8 -0
- package/dist/components/toggle-switch/toggle-switch.styles.d.ts.map +1 -1
- package/dist/components/toggle-switch/toggle-switch.styles.js +8 -0
- package/package.json +1 -1
|
@@ -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;
|
|
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: {
|
|
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";
|
|
@@ -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;
|
|
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
|
|
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
|
|
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
|
|
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,
|