@space-uy/pulsar-ui 0.6.0 → 0.8.0
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/lib/module/components/Button.js +23 -2
- package/lib/module/components/Button.js.map +1 -1
- package/lib/module/components/ButtonContainer.js +19 -2
- package/lib/module/components/ButtonContainer.js.map +1 -1
- package/lib/module/components/IconButton.js +21 -4
- package/lib/module/components/IconButton.js.map +1 -1
- package/lib/module/theme/meassures.js +2 -1
- package/lib/module/theme/meassures.js.map +1 -1
- package/lib/typescript/src/components/Button.d.ts +4 -1
- package/lib/typescript/src/components/Button.d.ts.map +1 -1
- package/lib/typescript/src/components/ButtonContainer.d.ts +6 -2
- package/lib/typescript/src/components/ButtonContainer.d.ts.map +1 -1
- package/lib/typescript/src/components/IconButton.d.ts +4 -1
- package/lib/typescript/src/components/IconButton.d.ts.map +1 -1
- package/lib/typescript/src/theme/meassures.d.ts +1 -0
- package/lib/typescript/src/theme/meassures.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Button.tsx +26 -1
- package/src/components/ButtonContainer.tsx +19 -2
- package/src/components/IconButton.tsx +24 -8
- package/src/theme/meassures.ts +1 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { useMemo } from 'react';
|
|
3
4
|
import { StyleSheet } from 'react-native';
|
|
4
5
|
import ButtonContainer from "./ButtonContainer.js";
|
|
5
6
|
import LoadingIndicator from "./LoadingIndicator.js";
|
|
@@ -14,14 +15,31 @@ export default function Button({
|
|
|
14
15
|
loading = false,
|
|
15
16
|
disabled = false,
|
|
16
17
|
onPress,
|
|
17
|
-
iconName
|
|
18
|
+
iconName,
|
|
19
|
+
backgroundColor,
|
|
20
|
+
textColor,
|
|
21
|
+
borderColor
|
|
18
22
|
}) {
|
|
23
|
+
const iconSize = useMemo(() => {
|
|
24
|
+
switch (size) {
|
|
25
|
+
case 'small':
|
|
26
|
+
return 16;
|
|
27
|
+
case 'medium':
|
|
28
|
+
return 18;
|
|
29
|
+
case 'large':
|
|
30
|
+
return 20;
|
|
31
|
+
case 'xlarge':
|
|
32
|
+
return 22;
|
|
33
|
+
default:
|
|
34
|
+
return 16;
|
|
35
|
+
}
|
|
36
|
+
}, [size]);
|
|
19
37
|
const renderIconOrLoader = colors => {
|
|
20
38
|
if (loading) {
|
|
21
39
|
return /*#__PURE__*/_jsx(LoadingIndicator, {
|
|
22
40
|
style: styles.icon,
|
|
23
41
|
color: colors.textColor,
|
|
24
|
-
size:
|
|
42
|
+
size: iconSize
|
|
25
43
|
});
|
|
26
44
|
}
|
|
27
45
|
return iconName ? /*#__PURE__*/_jsx(Icon, {
|
|
@@ -39,6 +57,9 @@ export default function Button({
|
|
|
39
57
|
loading: loading,
|
|
40
58
|
disabled: disabled,
|
|
41
59
|
onPress: onPress,
|
|
60
|
+
backgroundColor: backgroundColor,
|
|
61
|
+
textColor: textColor,
|
|
62
|
+
borderColor: borderColor,
|
|
42
63
|
renderContent: colors => /*#__PURE__*/_jsxs(_Fragment, {
|
|
43
64
|
children: [renderIconOrLoader(colors), /*#__PURE__*/_jsx(Text, {
|
|
44
65
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","ButtonContainer","LoadingIndicator","Text","Icon","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","Button","text","style","variant","size","loading","disabled","onPress","iconName","renderIconOrLoader","colors","styles","icon","color","
|
|
1
|
+
{"version":3,"names":["useMemo","StyleSheet","ButtonContainer","LoadingIndicator","Text","Icon","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","Button","text","style","variant","size","loading","disabled","onPress","iconName","backgroundColor","textColor","borderColor","iconSize","renderIconOrLoader","colors","styles","icon","color","name","contentContainerStyle","content","renderContent","children","create","paddingHorizontal","flexDirection","alignItems","justifyContent","marginEnd"],"sourceRoot":"../../../src","sources":["components/Button.tsx"],"mappings":";;AAAA,SAASA,OAAO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Ae;IACdY,KAAK,EAAEA,KAAM;IACbiB,qBAAqB,EAAEJ,MAAM,CAACK,OAAQ;IACtCjB,OAAO,EAAEA,OAAQ;IACjBC,IAAI,EAAEA,IAAK;IACXC,OAAO,EAAEA,OAAQ;IACjBC,QAAQ,EAAEA,QAAS;IACnBC,OAAO,EAAEA,OAAQ;IACjBE,eAAe,EAAEA,eAAgB;IACjCC,SAAS,EAAEA,SAAU;IACrBC,WAAW,EAAEA,WAAY;IACzBU,aAAa,EAAGP,MAAoB,iBAClCf,KAAA,CAAAF,SAAA;MAAAyB,QAAA,GACGT,kBAAkB,CAACC,MAAM,CAAC,eAC3BnB,IAAA,CAACH,IAAI;QACHU,KAAK,EAAE;UAAEe,KAAK,EAAEH,MAAM,CAACJ;QAAU,CAAE;QACnCP,OAAO,EAAEC,IAAI,KAAK,OAAO,GAAG,IAAI,GAAG,IAAK;QAAAkB,QAAA,EAEvCrB;MAAI,CACD,CAAC;IAAA,CACP;EACF,CACH,CAAC;AAEN;AAEA,MAAMc,MAAM,GAAG1B,UAAU,CAACkC,MAAM,CAAC;EAC/BH,OAAO,EAAE;IACPI,iBAAiB,EAAE,EAAE;IACrBC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDX,IAAI,EAAE;IAAEY,SAAS,EAAE;EAAE;AACvB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -18,6 +18,7 @@ export let ButtonSize = /*#__PURE__*/function (ButtonSize) {
|
|
|
18
18
|
ButtonSize["small"] = "small";
|
|
19
19
|
ButtonSize["medium"] = "medium";
|
|
20
20
|
ButtonSize["large"] = "large";
|
|
21
|
+
ButtonSize["xlarge"] = "xlarge";
|
|
21
22
|
return ButtonSize;
|
|
22
23
|
}({});
|
|
23
24
|
export default function ButtonContainer({
|
|
@@ -29,6 +30,9 @@ export default function ButtonContainer({
|
|
|
29
30
|
onPressIn,
|
|
30
31
|
onPressOut,
|
|
31
32
|
contentContainerStyle,
|
|
33
|
+
backgroundColor,
|
|
34
|
+
textColor,
|
|
35
|
+
borderColor,
|
|
32
36
|
...rest
|
|
33
37
|
}) {
|
|
34
38
|
const {
|
|
@@ -39,7 +43,7 @@ export default function ButtonContainer({
|
|
|
39
43
|
const enabled = useSharedValue(disabled ? 0 : 1);
|
|
40
44
|
const height = useMemo(() => meassures.button[size], [size]);
|
|
41
45
|
const buttonColors = useMemo(() => {
|
|
42
|
-
|
|
46
|
+
const variantColors = {
|
|
43
47
|
outline: {
|
|
44
48
|
backgroundColor: 'transparent',
|
|
45
49
|
borderColor: colors.border,
|
|
@@ -62,7 +66,20 @@ export default function ButtonContainer({
|
|
|
62
66
|
pressedBackgroundColor: convertHexToRgba(colors.foreground, 0.8)
|
|
63
67
|
}
|
|
64
68
|
}[variant];
|
|
65
|
-
|
|
69
|
+
return {
|
|
70
|
+
...variantColors,
|
|
71
|
+
...(backgroundColor && {
|
|
72
|
+
backgroundColor,
|
|
73
|
+
pressedBackgroundColor: convertHexToRgba(backgroundColor, 0.8)
|
|
74
|
+
}),
|
|
75
|
+
...(textColor && {
|
|
76
|
+
textColor
|
|
77
|
+
}),
|
|
78
|
+
...(borderColor && {
|
|
79
|
+
borderColor
|
|
80
|
+
})
|
|
81
|
+
};
|
|
82
|
+
}, [variant, colors, backgroundColor, textColor, borderColor]);
|
|
66
83
|
const animatedStyle = useAnimatedStyle(() => {
|
|
67
84
|
return {
|
|
68
85
|
backgroundColor: interpolateColor(pressed.value, [0, 1], [buttonColors.backgroundColor, buttonColors.pressedBackgroundColor]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useMemo","Platform","Pressable","StyleSheet","Animated","interpolate","interpolateColor","useAnimatedStyle","useSharedValue","withTiming","useTheme","convertHexToRgba","meassures","jsx","_jsx","ButtonVariant","ButtonSize","ButtonContainer","disabled","variant","size","loading","renderContent","onPressIn","onPressOut","contentContainerStyle","rest","theme","colors","pressed","enabled","height","button","buttonColors","
|
|
1
|
+
{"version":3,"names":["React","useEffect","useMemo","Platform","Pressable","StyleSheet","Animated","interpolate","interpolateColor","useAnimatedStyle","useSharedValue","withTiming","useTheme","convertHexToRgba","meassures","jsx","_jsx","ButtonVariant","ButtonSize","ButtonContainer","disabled","variant","size","loading","renderContent","onPressIn","onPressOut","contentContainerStyle","backgroundColor","textColor","borderColor","rest","theme","colors","pressed","enabled","height","button","buttonColors","variantColors","outline","border","foreground","pressedBackgroundColor","transparent","destructive","foregroundOnDestructive","flat","primary","altForeground","animatedStyle","value","opacity","borderWidth","updatePressAnimation","duration","handlePressIn","e","OS","handlePressOut","onHoverIn","onHoverOut","children","View","style","styles","contentContainer","borderRadius","roundness","create","justifyContent"],"sourceRoot":"../../../src","sources":["components/ButtonContainer.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AACjD,SACEC,QAAQ,EACRC,SAAS,EACTC,UAAU,QAKL,cAAc;AACrB,OAAOC,QAAQ,IACbC,WAAW,EACXC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QAEL,yBAAyB;AAEhC,OAAOC,QAAQ,MAAM,sBAAmB;AAExC,SAASC,gBAAgB,QAAQ,qBAAkB;AACnD,OAAOC,SAAS,MAAM,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3C,WAAYC,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAOzB,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAyBtB,eAAe,SAASC,eAAeA,CAAC;EACtCC,QAAQ;EACRC,OAAO,GAAG,MAAM;EAChBC,IAAI,GAAG,OAAO;EACdC,OAAO,GAAG,KAAK;EACfC,aAAa;EACbC,SAAS;EACTC,UA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
loading = false,
|
|
18
18
|
style,
|
|
19
|
+
backgroundColor,
|
|
20
|
+
textColor,
|
|
21
|
+
borderColor,
|
|
19
22
|
...rest
|
|
20
23
|
}) {
|
|
21
|
-
const iconSize = useMemo(() =>
|
|
24
|
+
const iconSize = useMemo(() => {
|
|
25
|
+
switch (size) {
|
|
26
|
+
case 'small':
|
|
27
|
+
return 12;
|
|
28
|
+
case 'medium':
|
|
29
|
+
return 16;
|
|
30
|
+
case 'large':
|
|
31
|
+
return 20;
|
|
32
|
+
case 'xlarge':
|
|
33
|
+
return 24;
|
|
34
|
+
default:
|
|
35
|
+
return 12;
|
|
36
|
+
}
|
|
37
|
+
}, [size]);
|
|
22
38
|
return /*#__PURE__*/_jsx(ButtonContainer, {
|
|
23
39
|
...rest,
|
|
24
40
|
variant: variant,
|
|
@@ -35,9 +51,10 @@ export default function IconButton({
|
|
|
35
51
|
style: [style, {
|
|
36
52
|
width: meassures.button[size]
|
|
37
53
|
}],
|
|
38
|
-
contentContainerStyle:
|
|
39
|
-
|
|
40
|
-
|
|
54
|
+
contentContainerStyle: styles.container,
|
|
55
|
+
backgroundColor: backgroundColor,
|
|
56
|
+
textColor: textColor,
|
|
57
|
+
borderColor: borderColor,
|
|
41
58
|
renderContent: colors => loading ? /*#__PURE__*/_jsx(LoadingIndicator, {
|
|
42
59
|
size: iconSize,
|
|
43
60
|
color: colors.textColor
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","StyleSheet","ButtonContainer","Icon","LoadingIndicator","meassures","jsx","_jsx","PADDING","IconButton","iconName","onPress","size","disabled","variant","loading","style","
|
|
1
|
+
{"version":3,"names":["useMemo","StyleSheet","ButtonContainer","Icon","LoadingIndicator","meassures","jsx","_jsx","PADDING","IconButton","iconName","onPress","size","disabled","variant","loading","style","backgroundColor","textColor","borderColor","rest","iconSize","hitSlop","top","left","right","bottom","width","button","contentContainerStyle","styles","container","renderContent","colors","color","name","create","alignItems","justifyContent"],"sourceRoot":"../../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AAC,CAAE;IAClDiB,qBAAqB,EAAEC,MAAM,CAACC,SAAU;IACxCd,eAAe,EAAEA,eAAgB;IACjCC,SAAS,EAAEA,SAAU;IACrBC,WAAW,EAAEA,WAAY;IACzBa,aAAa,EAAGC,MAAoB,IAClClB,OAAO,gBACLR,IAAA,CAACH,gBAAgB;MAACQ,IAAI,EAAES,QAAS;MAACa,KAAK,EAAED,MAAM,CAACf;IAAU,CAAE,CAAC,gBAE7DX,IAAA,CAACJ,IAAI;MAACgC,IAAI,EAAEzB,QAAS;MAACE,IAAI,EAAES,QAAS;MAACa,KAAK,EAAED,MAAM,CAACf;IAAU,CAAE;EAEnE,CACF,CAAC;AAEN;AAEA,MAAMY,MAAM,GAAG7B,UAAU,CAACmC,MAAM,CAAC;EAC/BL,SAAS,EAAE;IAAEM,UAAU,EAAE,QAAQ;IAAEC,cAAc,EAAE;EAAS;AAC9D,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["button","small","medium","large"],"sourceRoot":"../../../src","sources":["theme/meassures.ts"],"mappings":";;AAAA,eAAe;EACbA,MAAM,EAAE;IACNC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE;
|
|
1
|
+
{"version":3,"names":["button","small","medium","large","xlarge"],"sourceRoot":"../../../src","sources":["theme/meassures.ts"],"mappings":";;AAAA,eAAe;EACbA,MAAM,EAAE;IACNC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
|
|
@@ -10,7 +10,10 @@ type Props = {
|
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
onPress?: () => void;
|
|
12
12
|
iconName?: IconName;
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
textColor?: string;
|
|
15
|
+
borderColor?: string;
|
|
13
16
|
};
|
|
14
|
-
export default function Button({ text, style, variant, size, loading, disabled, onPress, iconName, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default function Button({ text, style, variant, size, loading, disabled, onPress, iconName, backgroundColor, textColor, borderColor, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
18
|
export {};
|
|
16
19
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAwB,EACtB,KAAK,aAAa,EAClB,KAAK,UAAU,EAEhB,MAAM,mBAAmB,CAAC;AAG3B,OAAa,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAE7C,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,IAAI,EACJ,KAAK,EACL,OAAgB,EAChB,IAAc,EACd,OAAe,EACf,QAAgB,EAChB,OAAO,EACP,QAAQ,EACR,eAAe,EACf,SAAS,EACT,WAAW,GACZ,EAAE,KAAK,2CA6DP"}
|
|
@@ -10,7 +10,8 @@ export declare enum ButtonVariant {
|
|
|
10
10
|
export declare enum ButtonSize {
|
|
11
11
|
small = "small",
|
|
12
12
|
medium = "medium",
|
|
13
|
-
large = "large"
|
|
13
|
+
large = "large",
|
|
14
|
+
xlarge = "xlarge"
|
|
14
15
|
}
|
|
15
16
|
export type ButtonColors = {
|
|
16
17
|
backgroundColor: string;
|
|
@@ -24,7 +25,10 @@ type Props = Omit<PressableProps, 'children'> & {
|
|
|
24
25
|
loading?: boolean;
|
|
25
26
|
renderContent: (colors: ButtonColors) => React.ReactNode;
|
|
26
27
|
contentContainerStyle?: StyleProp<AnimatedStyle<StyleProp<ViewStyle>>>;
|
|
28
|
+
backgroundColor?: string;
|
|
29
|
+
textColor?: string;
|
|
30
|
+
borderColor?: string;
|
|
27
31
|
};
|
|
28
|
-
export default function ButtonContainer({ disabled, variant, size, loading, renderContent, onPressIn, onPressOut, contentContainerStyle, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export default function ButtonContainer({ disabled, variant, size, loading, renderContent, onPressIn, onPressOut, contentContainerStyle, backgroundColor, textColor, borderColor, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
29
33
|
export {};
|
|
30
34
|
//# sourceMappingURL=ButtonContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ButtonContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAiB,EAMf,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AAOjC,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;CAC5B;AAED,oBAAY,UAAU;IACpB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;
|
|
1
|
+
{"version":3,"file":"ButtonContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ButtonContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAiB,EAMf,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AAOjC,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;CAC5B;AAED,oBAAY,UAAU;IACpB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,KAAK,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAC9C,OAAO,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,KAAK,CAAC,SAAS,CAAC;IACzD,qBAAqB,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACvE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,QAAQ,EACR,OAAgB,EAChB,IAAc,EACd,OAAe,EACf,aAAa,EACb,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,eAAe,EACf,SAAS,EACT,WAAW,EACX,GAAG,IAAI,EACR,EAAE,KAAK,2CAwGP"}
|
|
@@ -7,7 +7,10 @@ type Props = PressableProps & {
|
|
|
7
7
|
size?: keyof typeof ButtonSize;
|
|
8
8
|
loading?: boolean;
|
|
9
9
|
style?: StyleProp<ViewStyle>;
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
textColor?: string;
|
|
12
|
+
borderColor?: string;
|
|
10
13
|
};
|
|
11
|
-
export default function IconButton({ iconName, onPress, size, disabled, variant, loading, style, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default function IconButton({ iconName, onPress, size, disabled, variant, loading, style, backgroundColor, textColor, borderColor, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
15
|
export {};
|
|
13
16
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAwB,EACtB,KAAK,aAAa,EAClB,KAAK,UAAU,EAEhB,MAAM,mBAAmB,CAAC;AAC3B,OAAa,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAK7C,KAAK,KAAK,GAAG,cAAc,GAAG;IAC5B,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAwB,EACtB,KAAK,aAAa,EAClB,KAAK,UAAU,EAEhB,MAAM,mBAAmB,CAAC;AAC3B,OAAa,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAK7C,KAAK,KAAK,GAAG,cAAc,GAAG;IAC5B,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,EACR,OAAO,EACP,IAAe,EACf,QAAgB,EAChB,OAAgB,EAChB,OAAe,EACf,KAAK,EACL,eAAe,EACf,SAAS,EACT,WAAW,EACX,GAAG,IAAI,EACR,EAAE,KAAK,2CAuCP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meassures.d.ts","sourceRoot":"","sources":["../../../../src/theme/meassures.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meassures.d.ts","sourceRoot":"","sources":["../../../../src/theme/meassures.ts"],"names":[],"mappings":";;;;;;;;AAAA,wBAOE"}
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
1
2
|
import { StyleSheet, type ViewStyle, type StyleProp } from 'react-native';
|
|
2
3
|
|
|
3
4
|
import ButtonContainer, {
|
|
@@ -18,6 +19,9 @@ type Props = {
|
|
|
18
19
|
disabled?: boolean;
|
|
19
20
|
onPress?: () => void;
|
|
20
21
|
iconName?: IconName;
|
|
22
|
+
backgroundColor?: string;
|
|
23
|
+
textColor?: string;
|
|
24
|
+
borderColor?: string;
|
|
21
25
|
};
|
|
22
26
|
|
|
23
27
|
export default function Button({
|
|
@@ -29,14 +33,32 @@ export default function Button({
|
|
|
29
33
|
disabled = false,
|
|
30
34
|
onPress,
|
|
31
35
|
iconName,
|
|
36
|
+
backgroundColor,
|
|
37
|
+
textColor,
|
|
38
|
+
borderColor,
|
|
32
39
|
}: Props) {
|
|
40
|
+
const iconSize = useMemo(() => {
|
|
41
|
+
switch (size) {
|
|
42
|
+
case 'small':
|
|
43
|
+
return 16;
|
|
44
|
+
case 'medium':
|
|
45
|
+
return 18;
|
|
46
|
+
case 'large':
|
|
47
|
+
return 20;
|
|
48
|
+
case 'xlarge':
|
|
49
|
+
return 22;
|
|
50
|
+
default:
|
|
51
|
+
return 16;
|
|
52
|
+
}
|
|
53
|
+
}, [size]);
|
|
54
|
+
|
|
33
55
|
const renderIconOrLoader = (colors: ButtonColors) => {
|
|
34
56
|
if (loading) {
|
|
35
57
|
return (
|
|
36
58
|
<LoadingIndicator
|
|
37
59
|
style={styles.icon}
|
|
38
60
|
color={colors.textColor}
|
|
39
|
-
size={
|
|
61
|
+
size={iconSize}
|
|
40
62
|
/>
|
|
41
63
|
);
|
|
42
64
|
}
|
|
@@ -59,6 +81,9 @@ export default function Button({
|
|
|
59
81
|
loading={loading}
|
|
60
82
|
disabled={disabled}
|
|
61
83
|
onPress={onPress}
|
|
84
|
+
backgroundColor={backgroundColor}
|
|
85
|
+
textColor={textColor}
|
|
86
|
+
borderColor={borderColor}
|
|
62
87
|
renderContent={(colors: ButtonColors) => (
|
|
63
88
|
<>
|
|
64
89
|
{renderIconOrLoader(colors)}
|
|
@@ -33,6 +33,7 @@ export enum ButtonSize {
|
|
|
33
33
|
small = 'small',
|
|
34
34
|
medium = 'medium',
|
|
35
35
|
large = 'large',
|
|
36
|
+
xlarge = 'xlarge',
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
export type ButtonColors = {
|
|
@@ -48,6 +49,9 @@ type Props = Omit<PressableProps, 'children'> & {
|
|
|
48
49
|
loading?: boolean;
|
|
49
50
|
renderContent: (colors: ButtonColors) => React.ReactNode;
|
|
50
51
|
contentContainerStyle?: StyleProp<AnimatedStyle<StyleProp<ViewStyle>>>;
|
|
52
|
+
backgroundColor?: string;
|
|
53
|
+
textColor?: string;
|
|
54
|
+
borderColor?: string;
|
|
51
55
|
};
|
|
52
56
|
|
|
53
57
|
export default function ButtonContainer({
|
|
@@ -59,6 +63,9 @@ export default function ButtonContainer({
|
|
|
59
63
|
onPressIn,
|
|
60
64
|
onPressOut,
|
|
61
65
|
contentContainerStyle,
|
|
66
|
+
backgroundColor,
|
|
67
|
+
textColor,
|
|
68
|
+
borderColor,
|
|
62
69
|
...rest
|
|
63
70
|
}: Props) {
|
|
64
71
|
const { theme, colors } = useTheme();
|
|
@@ -68,7 +75,7 @@ export default function ButtonContainer({
|
|
|
68
75
|
const height = useMemo(() => meassures.button[size], [size]);
|
|
69
76
|
|
|
70
77
|
const buttonColors: ButtonColors = useMemo(() => {
|
|
71
|
-
|
|
78
|
+
const variantColors = {
|
|
72
79
|
outline: {
|
|
73
80
|
backgroundColor: 'transparent',
|
|
74
81
|
borderColor: colors.border,
|
|
@@ -91,7 +98,17 @@ export default function ButtonContainer({
|
|
|
91
98
|
pressedBackgroundColor: convertHexToRgba(colors.foreground, 0.8),
|
|
92
99
|
},
|
|
93
100
|
}[variant];
|
|
94
|
-
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
...variantColors,
|
|
104
|
+
...(backgroundColor && {
|
|
105
|
+
backgroundColor,
|
|
106
|
+
pressedBackgroundColor: convertHexToRgba(backgroundColor, 0.8),
|
|
107
|
+
}),
|
|
108
|
+
...(textColor && { textColor }),
|
|
109
|
+
...(borderColor && { borderColor }),
|
|
110
|
+
};
|
|
111
|
+
}, [variant, colors, backgroundColor, textColor, borderColor]);
|
|
95
112
|
|
|
96
113
|
const animatedStyle = useAnimatedStyle(() => {
|
|
97
114
|
return {
|
|
@@ -22,6 +22,9 @@ type Props = PressableProps & {
|
|
|
22
22
|
size?: keyof typeof ButtonSize;
|
|
23
23
|
loading?: boolean;
|
|
24
24
|
style?: StyleProp<ViewStyle>;
|
|
25
|
+
backgroundColor?: string;
|
|
26
|
+
textColor?: string;
|
|
27
|
+
borderColor?: string;
|
|
25
28
|
};
|
|
26
29
|
|
|
27
30
|
const PADDING = 8;
|
|
@@ -34,12 +37,25 @@ export default function IconButton({
|
|
|
34
37
|
variant = 'flat',
|
|
35
38
|
loading = false,
|
|
36
39
|
style,
|
|
40
|
+
backgroundColor,
|
|
41
|
+
textColor,
|
|
42
|
+
borderColor,
|
|
37
43
|
...rest
|
|
38
44
|
}: Props) {
|
|
39
|
-
const iconSize = useMemo(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
const iconSize = useMemo(() => {
|
|
46
|
+
switch (size) {
|
|
47
|
+
case 'small':
|
|
48
|
+
return 12;
|
|
49
|
+
case 'medium':
|
|
50
|
+
return 16;
|
|
51
|
+
case 'large':
|
|
52
|
+
return 20;
|
|
53
|
+
case 'xlarge':
|
|
54
|
+
return 24;
|
|
55
|
+
default:
|
|
56
|
+
return 12;
|
|
57
|
+
}
|
|
58
|
+
}, [size]);
|
|
43
59
|
|
|
44
60
|
return (
|
|
45
61
|
<ButtonContainer
|
|
@@ -51,10 +67,10 @@ export default function IconButton({
|
|
|
51
67
|
onPress={onPress}
|
|
52
68
|
hitSlop={{ top: PADDING, left: PADDING, right: PADDING, bottom: PADDING }}
|
|
53
69
|
style={[style, { width: meassures.button[size] }]}
|
|
54
|
-
contentContainerStyle={
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
70
|
+
contentContainerStyle={styles.container}
|
|
71
|
+
backgroundColor={backgroundColor}
|
|
72
|
+
textColor={textColor}
|
|
73
|
+
borderColor={borderColor}
|
|
58
74
|
renderContent={(colors: ButtonColors) =>
|
|
59
75
|
loading ? (
|
|
60
76
|
<LoadingIndicator size={iconSize} color={colors.textColor} />
|