@particle-network/ui-native 0.1.0 → 0.1.1
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.
|
@@ -21,52 +21,55 @@ const ToastView = ({ type, text, props: toastProps })=>{
|
|
|
21
21
|
type,
|
|
22
22
|
colors
|
|
23
23
|
]);
|
|
24
|
-
return /*#__PURE__*/
|
|
25
|
-
|
|
26
|
-
radius: toastConfig.radius,
|
|
24
|
+
return /*#__PURE__*/ jsx(HStack, {
|
|
25
|
+
center: true,
|
|
27
26
|
mh: 14,
|
|
28
|
-
minH: 42,
|
|
29
|
-
pv: 12,
|
|
30
|
-
ph: 14,
|
|
31
27
|
mt: 20,
|
|
32
28
|
zIndex: 9999,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
29
|
+
children: /*#__PURE__*/ jsxs(HStack, {
|
|
30
|
+
minH: 42,
|
|
31
|
+
pv: 12,
|
|
32
|
+
ph: 14,
|
|
33
|
+
gap: "md",
|
|
34
|
+
radius: toastConfig.radius,
|
|
35
|
+
style: {
|
|
36
|
+
backgroundColor: bg
|
|
37
|
+
},
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ jsx(ToastIcon, {
|
|
40
|
+
type: type
|
|
41
|
+
}),
|
|
42
|
+
/*#__PURE__*/ jsx(Flex, {
|
|
43
|
+
shrink: 1,
|
|
44
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
45
|
+
body2Bold: true,
|
|
46
|
+
color: colorBg ? 'white' : 'foreground',
|
|
47
|
+
numberOfLines: numberOfLines,
|
|
48
|
+
children: text
|
|
49
|
+
})
|
|
50
|
+
}),
|
|
51
|
+
btnText && onPress ? /*#__PURE__*/ jsx(UXButton, {
|
|
52
|
+
variant: "text",
|
|
53
|
+
onPress: ()=>{
|
|
54
|
+
react_native_toast_message.hide();
|
|
55
|
+
onPress();
|
|
56
|
+
},
|
|
57
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
58
|
+
body2Bold: true,
|
|
59
|
+
color: "primary",
|
|
60
|
+
children: btnText
|
|
61
|
+
})
|
|
62
|
+
}) : null,
|
|
63
|
+
/*#__PURE__*/ jsx(UXButton, {
|
|
64
|
+
variant: "text",
|
|
65
|
+
onPress: ()=>react_native_toast_message.hide(),
|
|
66
|
+
children: /*#__PURE__*/ jsx(CloseIcon, {
|
|
67
|
+
color: colorBg ? 'white' : 'foreground',
|
|
68
|
+
size: 18
|
|
69
|
+
})
|
|
47
70
|
})
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
variant: "text",
|
|
51
|
-
onPress: ()=>{
|
|
52
|
-
react_native_toast_message.hide();
|
|
53
|
-
onPress();
|
|
54
|
-
},
|
|
55
|
-
children: /*#__PURE__*/ jsx(Text, {
|
|
56
|
-
body2Bold: true,
|
|
57
|
-
color: "primary",
|
|
58
|
-
children: btnText
|
|
59
|
-
})
|
|
60
|
-
}) : null,
|
|
61
|
-
/*#__PURE__*/ jsx(UXButton, {
|
|
62
|
-
variant: "text",
|
|
63
|
-
onPress: ()=>react_native_toast_message.hide(),
|
|
64
|
-
children: /*#__PURE__*/ jsx(CloseIcon, {
|
|
65
|
-
color: colorBg ? 'white' : 'foreground',
|
|
66
|
-
size: 18
|
|
67
|
-
})
|
|
68
|
-
})
|
|
69
|
-
]
|
|
71
|
+
]
|
|
72
|
+
})
|
|
70
73
|
});
|
|
71
74
|
};
|
|
72
75
|
export { ToastView };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
-
import { StyleSheet } from "react-native";
|
|
2
|
+
import { Platform, StyleSheet } from "react-native";
|
|
3
3
|
import { useColors, useComponentConfig, useMs, useRadius } from "../../hooks/index.js";
|
|
4
4
|
import { disabledOpacity } from "../../theme/index.js";
|
|
5
5
|
const useStyles = (props)=>{
|
|
@@ -90,7 +90,7 @@ const useStyles = (props)=>{
|
|
|
90
90
|
opacity: isDisabled ? disabledOpacity : 1
|
|
91
91
|
},
|
|
92
92
|
input: {
|
|
93
|
-
height: '100%',
|
|
93
|
+
height: 'android' === Platform.OS ? '100%' : 'auto',
|
|
94
94
|
flex: 1,
|
|
95
95
|
paddingTop: 0,
|
|
96
96
|
paddingBottom: 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-network/ui-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./entry.js",
|
|
6
6
|
"react-native": "./dist/index.js",
|
|
@@ -16,6 +16,22 @@
|
|
|
16
16
|
"default": "./dist/index.js"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"start": "expo start",
|
|
21
|
+
"android": "expo start --android",
|
|
22
|
+
"ios": "expo start --ios",
|
|
23
|
+
"web": "storybook dev -p 6006",
|
|
24
|
+
"storybook:build": "storybook build",
|
|
25
|
+
"storybook:preview": "serve storybook-static",
|
|
26
|
+
"storybook:generate": "sb-rn-get-stories",
|
|
27
|
+
"type-check": "npx tsc --noEmit -p ./tsconfig.json",
|
|
28
|
+
"dev": "rslib build --watch",
|
|
29
|
+
"build": "rslib build",
|
|
30
|
+
"lint": "eslint . --no-error-on-unmatched-pattern --quiet",
|
|
31
|
+
"lint:fix": "eslint . --fix --no-error-on-unmatched-pattern --quiet",
|
|
32
|
+
"clean": "rm -rf .turbo node_modules dist",
|
|
33
|
+
"deploy:dev": "sh ./scripts/deploy-dev.sh"
|
|
34
|
+
},
|
|
19
35
|
"files": [
|
|
20
36
|
"dist",
|
|
21
37
|
"README.md",
|
|
@@ -36,6 +52,7 @@
|
|
|
36
52
|
"author": "UniversalX",
|
|
37
53
|
"dependencies": {
|
|
38
54
|
"@lottiefiles/dotlottie-react": "^0.16.2",
|
|
55
|
+
"@particle-network/ui-shared": "workspace:*",
|
|
39
56
|
"ahooks": "^3.9.4",
|
|
40
57
|
"deepmerge": "^4.3.1",
|
|
41
58
|
"expo-haptics": "^15.0.7",
|
|
@@ -43,8 +60,7 @@
|
|
|
43
60
|
"lottie-react-native": "^7.3.4",
|
|
44
61
|
"react-native-paper": "^5.14.5",
|
|
45
62
|
"react-native-size-matters": "^0.4.2",
|
|
46
|
-
"react-native-toast-message": "^2.3.3"
|
|
47
|
-
"@particle-network/ui-shared": "0.1.0"
|
|
63
|
+
"react-native-toast-message": "^2.3.3"
|
|
48
64
|
},
|
|
49
65
|
"devDependencies": {
|
|
50
66
|
"@babel/core": "^7.24.0",
|
|
@@ -52,6 +68,9 @@
|
|
|
52
68
|
"@chromatic-com/storybook": "^4.1.1",
|
|
53
69
|
"@expo/metro-runtime": "~6.1.2",
|
|
54
70
|
"@gorhom/bottom-sheet": "^5.1.2",
|
|
71
|
+
"@particle-network/eslint-config": "workspace:*",
|
|
72
|
+
"@particle-network/icons": "workspace:*",
|
|
73
|
+
"@particle-network/lintstaged-config": "workspace:*",
|
|
55
74
|
"@react-native-async-storage/async-storage": "2.2.0",
|
|
56
75
|
"@react-native-community/datetimepicker": "8.4.4",
|
|
57
76
|
"@react-native-community/slider": "5.0.1",
|
|
@@ -85,9 +104,7 @@
|
|
|
85
104
|
"typescript": "~5.9.2",
|
|
86
105
|
"unfetch": "^4.2.0",
|
|
87
106
|
"vite": "^6.3.5",
|
|
88
|
-
"zustand": "^5.0.8"
|
|
89
|
-
"@particle-network/icons": "0.1.0",
|
|
90
|
-
"@particle-network/eslint-config": "0.1.0"
|
|
107
|
+
"zustand": "^5.0.8"
|
|
91
108
|
},
|
|
92
109
|
"overrides": {
|
|
93
110
|
"react-docgen-typescript": "2.2.2",
|
|
@@ -99,21 +116,5 @@
|
|
|
99
116
|
"listUnknownPackages": false
|
|
100
117
|
}
|
|
101
118
|
}
|
|
102
|
-
},
|
|
103
|
-
"scripts": {
|
|
104
|
-
"start": "expo start",
|
|
105
|
-
"android": "expo start --android",
|
|
106
|
-
"ios": "expo start --ios",
|
|
107
|
-
"web": "storybook dev -p 6006",
|
|
108
|
-
"storybook:build": "storybook build",
|
|
109
|
-
"storybook:preview": "serve storybook-static",
|
|
110
|
-
"storybook:generate": "sb-rn-get-stories",
|
|
111
|
-
"type-check": "npx tsc --noEmit -p ./tsconfig.json",
|
|
112
|
-
"dev": "rslib build --watch",
|
|
113
|
-
"build": "rslib build",
|
|
114
|
-
"lint": "eslint . --no-error-on-unmatched-pattern --quiet",
|
|
115
|
-
"lint:fix": "eslint . --fix --no-error-on-unmatched-pattern --quiet",
|
|
116
|
-
"clean": "rm -rf .turbo node_modules dist",
|
|
117
|
-
"deploy:dev": "sh ./scripts/deploy-dev.sh"
|
|
118
119
|
}
|
|
119
|
-
}
|
|
120
|
+
}
|