vpt-sebraeds 0.0.36 → 0.0.38

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.
@@ -61,10 +61,7 @@ const NavigationItem: React.FC<NavigationItemProps> = ({
61
61
  styles.iconContainer,
62
62
  size === 'small' ? styles.iconContainerSmall : size === 'large' ? styles.iconContainerLarge : styles.iconContainerMedium,
63
63
  variant === 'selected' ? styles.iconContainerSelected : variant === 'disabled' ? styles.iconContainerDisabled : styles.iconContainerDefault,
64
- layout === 'expanded' && [
65
- styles.iconContainerExpanded,
66
- { alignSelf: iconAlignment }
67
- ],
64
+ layout === 'expanded' && styles.iconContainerExpanded,
68
65
  layout === 'list' && styles.iconContainerHidden,
69
66
  iconBackgroundColor && { backgroundColor: iconBackgroundColor },
70
67
  ];
@@ -41,6 +41,8 @@ const Toggle = ({
41
41
  disabled = false,
42
42
  invalid = false,
43
43
  variant = 'default', // 'default' ou 'square'
44
+ activeColor = '#193AB8',
45
+ inactiveColor = '#BFC4D3',
44
46
  }) => {
45
47
  const animatedValue = useRef(new Animated.Value(value ? 1 : 0)).current;
46
48
  const componentSize = variant === 'square' ? SQUARE_SIZES[size] : SIZES[size];
@@ -59,7 +61,7 @@ const Toggle = ({
59
61
 
60
62
  const trackColor = animatedValue.interpolate({
61
63
  inputRange: [0, 1],
62
- outputRange: ['#BFC4D3', '#4F7CFE'],
64
+ outputRange: [inactiveColor, activeColor],
63
65
  });
64
66
 
65
67
  const thumbTranslateX = animatedValue.interpolate({
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/NavigationItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsC,SAAS,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AAInG,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,O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AAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;CACzC;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqOjD,CAAC;AA4QF,eAAe,cAAc,CAAC"}
@@ -19,10 +19,7 @@ const NavigationItem = ({ iconName, label, variant = 'default', size = 'medium',
19
19
  styles.iconContainer,
20
20
  size === 'small' ? styles.iconContainerSmall : size === 'large' ? styles.iconContainerLarge : styles.iconContainerMedium,
21
21
  variant === 'selected' ? styles.iconContainerSelected : variant === 'disabled' ? styles.iconContainerDisabled : styles.iconContainerDefault,
22
- layout === 'expanded' && [
23
- styles.iconContainerExpanded,
24
- { alignSelf: iconAlignment }
25
- ],
22
+ layout === 'expanded' && styles.iconContainerExpanded,
26
23
  layout === 'list' && styles.iconContainerHidden,
27
24
  iconBackgroundColor && { backgroundColor: iconBackgroundColor },
28
25
  ];
@@ -1,11 +1,13 @@
1
1
  export default Toggle;
2
- declare function Toggle({ value, onValueChange, size, disabled, invalid, variant, }: {
2
+ declare function Toggle({ value, onValueChange, size, disabled, invalid, variant, activeColor, inactiveColor, }: {
3
3
  value: any;
4
4
  onValueChange: any;
5
5
  size?: string | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  invalid?: boolean | undefined;
8
8
  variant?: string | undefined;
9
+ activeColor?: string | undefined;
10
+ inactiveColor?: string | undefined;
9
11
  }): React.JSX.Element;
10
12
  import React from 'react';
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Toggle/index.jsx"],"names":[],"mappings":";AAoCA;;;;;;;sBA8EC;kBAlHwC,OAAO"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Toggle/index.jsx"],"names":[],"mappings":";AAoCA;;;;;;;;;sBAgFC;kBApHwC,OAAO"}
@@ -32,7 +32,7 @@ const SQUARE_SIZES = {
32
32
  },
33
33
  };
34
34
  const Toggle = ({ value, onValueChange, size = 'medium', disabled = false, invalid = false, variant = 'default', // 'default' ou 'square'
35
- }) => {
35
+ activeColor = '#193AB8', inactiveColor = '#BFC4D3', }) => {
36
36
  const animatedValue = useRef(new Animated.Value(value ? 1 : 0)).current;
37
37
  const componentSize = variant === 'square' ? SQUARE_SIZES[size] : SIZES[size];
38
38
  const isSquare = variant === 'square';
@@ -47,7 +47,7 @@ const Toggle = ({ value, onValueChange, size = 'medium', disabled = false, inval
47
47
  }, [value, animatedValue]);
48
48
  const trackColor = animatedValue.interpolate({
49
49
  inputRange: [0, 1],
50
- outputRange: ['#BFC4D3', '#4F7CFE'],
50
+ outputRange: [inactiveColor, activeColor],
51
51
  });
52
52
  const thumbTranslateX = animatedValue.interpolate({
53
53
  inputRange: [0, 1],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpt-sebraeds",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "description": "Biblioteca de componentes React Native do Sebrae",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",