@meatech/payblend_app_ui_component 1.1.7 → 1.1.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/.trunk/trunk.yaml +2 -2
- package/components/IconWithLabel/IconWithLabel.tsx +3 -2
- package/components/IconWithLabel/type.ts +2 -0
- package/dist/components/IconWithLabel/IconWithLabel.d.ts.map +1 -1
- package/dist/components/IconWithLabel/IconWithLabel.js +2 -2
- package/dist/components/IconWithLabel/IconWithLabel.js.map +1 -1
- package/dist/components/IconWithLabel/type.d.ts +2 -0
- package/dist/components/IconWithLabel/type.d.ts.map +1 -1
- package/package.json +1 -1
package/.trunk/trunk.yaml
CHANGED
|
@@ -17,12 +17,12 @@ runtimes:
|
|
|
17
17
|
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
|
|
18
18
|
lint:
|
|
19
19
|
enabled:
|
|
20
|
-
- checkov@3.2.
|
|
20
|
+
- checkov@3.2.484
|
|
21
21
|
- git-diff-check
|
|
22
22
|
- osv-scanner@2.2.3
|
|
23
23
|
- oxipng@9.1.5
|
|
24
24
|
- prettier@3.6.2
|
|
25
|
-
- trufflehog@3.90.
|
|
25
|
+
- trufflehog@3.90.11
|
|
26
26
|
actions:
|
|
27
27
|
disabled:
|
|
28
28
|
- trunk-announce
|
|
@@ -26,6 +26,7 @@ export const IconWithLabel: React.FC<IconWithLabelProps> = ({
|
|
|
26
26
|
style,
|
|
27
27
|
labelStyle,
|
|
28
28
|
isShowBalance = false,
|
|
29
|
+
children,
|
|
29
30
|
...rest
|
|
30
31
|
}) => {
|
|
31
32
|
return (
|
|
@@ -40,12 +41,12 @@ export const IconWithLabel: React.FC<IconWithLabelProps> = ({
|
|
|
40
41
|
activeOpacity={ACTIVE_OPACITY}
|
|
41
42
|
{...rest}
|
|
42
43
|
>
|
|
43
|
-
<Icon
|
|
44
|
+
{children ? children : <Icon
|
|
44
45
|
name={icon}
|
|
45
46
|
width={metrics.iconSemiLarge}
|
|
46
47
|
height={metrics.iconSemiLarge}
|
|
47
48
|
tintColor={colors.neutral["60"]}
|
|
48
|
-
/>
|
|
49
|
+
/>}
|
|
49
50
|
<Text
|
|
50
51
|
size="xs"
|
|
51
52
|
color="tertiary"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StyleProp, TextStyle, TouchableOpacityProps } from 'react-native';
|
|
2
2
|
import { Images } from '@ui/themes';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
export interface IconWithLabelProps
|
|
4
5
|
extends Pick<
|
|
5
6
|
TouchableOpacityProps,
|
|
@@ -14,4 +15,5 @@ export interface IconWithLabelProps
|
|
|
14
15
|
disabled?: boolean;
|
|
15
16
|
isShowBalance?: boolean;
|
|
16
17
|
isFlex?: boolean;
|
|
18
|
+
children?: React.ReactNode;
|
|
17
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconWithLabel.d.ts","sourceRoot":"","sources":["../../../components/IconWithLabel/IconWithLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAa5C,eAAO,MAAM,4BAA4B,QAA2B,CAAC;AAErE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"IconWithLabel.d.ts","sourceRoot":"","sources":["../../../components/IconWithLabel/IconWithLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAa5C,eAAO,MAAM,4BAA4B,QAA2B,CAAC;AAErE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoDtD,CAAC"}
|
|
@@ -34,14 +34,14 @@ import '../../utils/dayjs.js';
|
|
|
34
34
|
import { formatNumber } from '../../utils/utils.js';
|
|
35
35
|
|
|
36
36
|
const SIZE_ICON_WITH_LABEL_DEFAULT = (deviceWidth() - 52) / 3;
|
|
37
|
-
const IconWithLabel = ({ label, icon, balance = 0, width = SIZE_ICON_WITH_LABEL_DEFAULT, height = SIZE_ICON_WITH_LABEL_DEFAULT, isFlex = false, disabled, style, labelStyle, isShowBalance = false, ...rest }) => {
|
|
37
|
+
const IconWithLabel = ({ label, icon, balance = 0, width = SIZE_ICON_WITH_LABEL_DEFAULT, height = SIZE_ICON_WITH_LABEL_DEFAULT, isFlex = false, disabled, style, labelStyle, isShowBalance = false, children, ...rest }) => {
|
|
38
38
|
return (React.createElement(TouchableOpacity, { disabled: disabled, style: [
|
|
39
39
|
styles.container,
|
|
40
40
|
style,
|
|
41
41
|
isFlex ? { flex: 1 } : { width: responsiveWidth(width), height: responsiveWidth(height) },
|
|
42
42
|
disabled && styles.disabled,
|
|
43
43
|
], activeOpacity: ACTIVE_OPACITY, ...rest },
|
|
44
|
-
React.createElement(Icon, { name: icon, width: metrics.iconSemiLarge, height: metrics.iconSemiLarge, tintColor: colors.neutral["60"] }),
|
|
44
|
+
children ? children : React.createElement(Icon, { name: icon, width: metrics.iconSemiLarge, height: metrics.iconSemiLarge, tintColor: colors.neutral["60"] }),
|
|
45
45
|
React.createElement(Text, { size: "xs", color: "tertiary", style: [styles.label, labelStyle], numberOfLines: 2 }, label),
|
|
46
46
|
isShowBalance && (React.createElement(Text, { fontWeight: "700", size: "large", color: "tertiary", style: styles.txtBalance },
|
|
47
47
|
"\u00A5",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconWithLabel.js","sources":["../../../../components/IconWithLabel/IconWithLabel.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { StyleSheet, TouchableOpacity } from \"react-native\";\nimport { IconWithLabelProps } from \"./type\";\nimport {\n ACTIVE_OPACITY,\n colors,\n deviceWidth,\n metrics,\n pf,\n pw,\n} from \"@ui/themes\";\nimport { Icon } from \"@ui/components\";\nimport { formatNumber } from \"@ui/utils\";\nimport Text from \"@ui/components/Text\";\n\nexport const SIZE_ICON_WITH_LABEL_DEFAULT = (deviceWidth() - 52) / 3;\n\nexport const IconWithLabel: React.FC<IconWithLabelProps> = ({\n label,\n icon,\n balance = 0,\n width = SIZE_ICON_WITH_LABEL_DEFAULT,\n height = SIZE_ICON_WITH_LABEL_DEFAULT,\n isFlex = false,\n disabled,\n style,\n labelStyle,\n isShowBalance = false,\n ...rest\n}) => {\n return (\n <TouchableOpacity\n disabled={disabled}\n style={[\n styles.container,\n style,\n isFlex ? { flex: 1 } : { width: pw(width), height: pw(height) },\n disabled && styles.disabled,\n ]}\n activeOpacity={ACTIVE_OPACITY}\n {...rest}\n >\n <Icon\n name={icon}\n width={metrics.iconSemiLarge}\n height={metrics.iconSemiLarge}\n tintColor={colors.neutral[\"60\"]}\n
|
|
1
|
+
{"version":3,"file":"IconWithLabel.js","sources":["../../../../components/IconWithLabel/IconWithLabel.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { StyleSheet, TouchableOpacity } from \"react-native\";\nimport { IconWithLabelProps } from \"./type\";\nimport {\n ACTIVE_OPACITY,\n colors,\n deviceWidth,\n metrics,\n pf,\n pw,\n} from \"@ui/themes\";\nimport { Icon } from \"@ui/components\";\nimport { formatNumber } from \"@ui/utils\";\nimport Text from \"@ui/components/Text\";\n\nexport const SIZE_ICON_WITH_LABEL_DEFAULT = (deviceWidth() - 52) / 3;\n\nexport const IconWithLabel: React.FC<IconWithLabelProps> = ({\n label,\n icon,\n balance = 0,\n width = SIZE_ICON_WITH_LABEL_DEFAULT,\n height = SIZE_ICON_WITH_LABEL_DEFAULT,\n isFlex = false,\n disabled,\n style,\n labelStyle,\n isShowBalance = false,\n children,\n ...rest\n}) => {\n return (\n <TouchableOpacity\n disabled={disabled}\n style={[\n styles.container,\n style,\n isFlex ? { flex: 1 } : { width: pw(width), height: pw(height) },\n disabled && styles.disabled,\n ]}\n activeOpacity={ACTIVE_OPACITY}\n {...rest}\n >\n {children ? children : <Icon\n name={icon}\n width={metrics.iconSemiLarge}\n height={metrics.iconSemiLarge}\n tintColor={colors.neutral[\"60\"]}\n />}\n <Text\n size=\"xs\"\n color=\"tertiary\"\n style={[styles.label, labelStyle]}\n numberOfLines={2}\n >\n {label}\n </Text>\n {isShowBalance && (\n <Text\n fontWeight=\"700\"\n size=\"large\"\n color=\"tertiary\"\n style={styles.txtBalance}\n >\n ¥{formatNumber(balance.toString())}\n </Text>\n )}\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n borderWidth: metrics.borderWidthMedium,\n borderColor: colors.neutral[\"20\"],\n alignItems: \"center\",\n justifyContent: \"center\",\n padding: metrics.width.spacingTiny,\n },\n label: {\n lineHeight: pf(18),\n textAlign: \"center\",\n },\n txtBalance: {\n lineHeight: pf(30),\n marginTop: metrics.width.spacingTiny,\n },\n disabled: {\n opacity: 0.4,\n },\n});\n"],"names":["pw","pf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeO,MAAM,4BAA4B,GAAG,CAAC,WAAW,EAAE,GAAG,EAAE,IAAI;AAEtD,MAAA,aAAa,GAAiC,CAAC,EAC1D,KAAK,EACL,IAAI,EACJ,OAAO,GAAG,CAAC,EACX,KAAK,GAAG,4BAA4B,EACpC,MAAM,GAAG,4BAA4B,EACrC,MAAM,GAAG,KAAK,EACd,QAAQ,EACR,KAAK,EACL,UAAU,EACV,aAAa,GAAG,KAAK,EACrB,QAAQ,EACR,GAAG,IAAI,EACR,KAAI;IACH,QACE,oBAAC,gBAAgB,EAAA,EACf,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE;AACL,YAAA,MAAM,CAAC,SAAS;YAChB,KAAK;YACL,MAAM,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAEA,eAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAEA,eAAE,CAAC,MAAM,CAAC,EAAE;YAC/D,QAAQ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CAAC;AAClB,QAAA,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,WAAW;AACrC,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE,GAAG;AACb,KAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TouchableOpacityProps, StyleProp, TextStyle } from 'react-native';
|
|
2
2
|
import { Images } from '@ui/themes';
|
|
3
|
+
import React__default from 'react';
|
|
3
4
|
|
|
4
5
|
interface IconWithLabelProps extends Pick<TouchableOpacityProps, 'onPress' | 'disabled' | 'style' | 'onLayout'> {
|
|
5
6
|
label: string;
|
|
@@ -11,6 +12,7 @@ interface IconWithLabelProps extends Pick<TouchableOpacityProps, 'onPress' | 'di
|
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
isShowBalance?: boolean;
|
|
13
14
|
isFlex?: boolean;
|
|
15
|
+
children?: React__default.ReactNode;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
export type { IconWithLabelProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../components/IconWithLabel/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,MAAM,WAAW,kBACf,SAAQ,IAAI,CACV,qBAAqB,EACrB,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,CAC9C;IACD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,OAAO,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,O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