@particle-network/ui-native 0.1.2 → 0.1.3-beta.4

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.
@@ -10,6 +10,7 @@ const useStyles = (props)=>{
10
10
  const { getSpacing } = useSpacing();
11
11
  const { ms } = useMs();
12
12
  const sizeMap = useMemo(()=>({
13
+ xs: ms(buttonConfig.size.xs),
13
14
  sm: ms(buttonConfig.size.sm),
14
15
  md: ms(buttonConfig.size.md),
15
16
  lg: ms(buttonConfig.size.lg),
@@ -19,6 +20,7 @@ const useStyles = (props)=>{
19
20
  ms
20
21
  ]);
21
22
  const fontSizeMap = useMemo(()=>({
23
+ xs: ms(buttonConfig.fontSize.xs),
22
24
  sm: ms(buttonConfig.fontSize.sm),
23
25
  md: ms(buttonConfig.fontSize.md),
24
26
  lg: ms(buttonConfig.fontSize.lg),
@@ -28,12 +30,14 @@ const useStyles = (props)=>{
28
30
  buttonConfig.fontSize
29
31
  ]);
30
32
  const radiusMap = {
33
+ xs: 'xs',
31
34
  sm: 'sm',
32
35
  md: 'sm',
33
36
  lg: 'md',
34
37
  auto: 'sm'
35
38
  };
36
39
  const paddingMap = useMemo(()=>({
40
+ xs: ms(4),
37
41
  sm: ms(6),
38
42
  md: ms(10),
39
43
  lg: ms(14)
@@ -10,6 +10,7 @@ export interface UXButtonProps extends Omit<UXPressableProps, 'style' | 'disable
10
10
  * @default 'md'
11
11
  * | size | ux-pro | ux |
12
12
  * | :----- | :----- | :----- |
13
+ * | xs | 20 | 36 |
13
14
  * | sm | 24 | 40 |
14
15
  * | md | 30 | 44 |
15
16
  * | lg | 44 | 48 |
@@ -17,11 +18,12 @@ export interface UXButtonProps extends Omit<UXPressableProps, 'style' | 'disable
17
18
  * fontSize
18
19
  * | size | ux-pro | ux |
19
20
  * | :----- | :----- | :----- |
21
+ * | xs | 11 | 12 |
20
22
  * | sm | 10 | 14 |
21
23
  * | md | 12 | 16 |
22
24
  * | lg | 16 | 18 |
23
25
  */
24
- size?: 'sm' | 'md' | 'lg' | 'auto';
26
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'auto';
25
27
  variant?: 'solid' | 'bordered' | 'flat' | 'text' | 'light';
26
28
  radius?: UXRadius;
27
29
  isDisabled?: boolean;
@@ -8,10 +8,18 @@ const useStyles = (props)=>{
8
8
  const { getColor } = useColors();
9
9
  const { getRadius } = useRadius();
10
10
  const { ms } = useMs();
11
- const fontSize = useMemo(()=>ms(tabsConfig.fontSize[size]), [
11
+ const fontSize = useMemo(()=>{
12
+ if ('switch' === variant) {
13
+ if ('sm' === size) return ms(11);
14
+ if ('lg' === size) return ms(14);
15
+ return ms(12);
16
+ }
17
+ return ms(tabsConfig.fontSize[size]);
18
+ }, [
12
19
  size,
13
20
  ms,
14
- tabsConfig.fontSize
21
+ tabsConfig.fontSize,
22
+ variant
15
23
  ]);
16
24
  const height = useMemo(()=>{
17
25
  if ('text' === variant) return fontSize + ms(4);
@@ -2,11 +2,13 @@ const defaultComponentConfig = {
2
2
  button: {
3
3
  defaultProps: {},
4
4
  size: {
5
+ xs: 20,
5
6
  sm: 24,
6
7
  md: 30,
7
8
  lg: 44
8
9
  },
9
10
  fontSize: {
11
+ xs: 11,
10
12
  sm: 10,
11
13
  md: 12,
12
14
  lg: 16
@@ -4,11 +4,13 @@ const uxComponentConfig = {
4
4
  radius: 'full'
5
5
  },
6
6
  size: {
7
+ xs: 36,
7
8
  sm: 40,
8
9
  md: 44,
9
10
  lg: 48
10
11
  },
11
12
  fontSize: {
13
+ xs: 12,
12
14
  sm: 14,
13
15
  md: 16,
14
16
  lg: 18
@@ -5,11 +5,13 @@ export interface CommonComponentConfig {
5
5
  radius?: UXRadius | number;
6
6
  };
7
7
  size: {
8
+ xs?: number;
8
9
  sm: number;
9
10
  md: number;
10
11
  lg: number;
11
12
  };
12
13
  fontSize: {
14
+ xs?: number;
13
15
  sm: number;
14
16
  md: number;
15
17
  lg: number;
package/entry.js ADDED
@@ -0,0 +1,5 @@
1
+ import registerRootComponent from 'expo/src/launch/registerRootComponent';
2
+
3
+ import App from './App';
4
+
5
+ registerRootComponent(App);
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-native",
3
- "version": "0.1.2",
4
- "license": "MIT",
3
+ "version": "0.1.3-beta.4",
5
4
  "main": "./entry.js",
6
5
  "react-native": "./dist/index.js",
7
6
  "module": "./dist/index.js",
@@ -16,27 +15,14 @@
16
15
  "default": "./dist/index.js"
17
16
  }
18
17
  },
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
- },
35
18
  "files": [
36
19
  "dist",
37
- "README.md",
38
- "LICENSE"
20
+ "README.md"
39
21
  ],
22
+ "publishConfig": {
23
+ "access": "public",
24
+ "registry": "https://registry.npmjs.org/"
25
+ },
40
26
  "repository": {
41
27
  "type": "git",
42
28
  "url": "https://gitlab.minijoy.work/frontend/ux-design",
@@ -52,7 +38,6 @@
52
38
  "author": "UniversalX",
53
39
  "dependencies": {
54
40
  "@lottiefiles/dotlottie-react": "^0.16.2",
55
- "@particle-network/ui-shared": "workspace:*",
56
41
  "ahooks": "^3.9.4",
57
42
  "deepmerge": "^4.3.1",
58
43
  "expo-haptics": "^15.0.7",
@@ -60,7 +45,8 @@
60
45
  "lottie-react-native": "^7.3.4",
61
46
  "react-native-paper": "^5.14.5",
62
47
  "react-native-size-matters": "^0.4.2",
63
- "react-native-toast-message": "^2.3.3"
48
+ "react-native-toast-message": "^2.3.3",
49
+ "@particle-network/ui-shared": "0.1.1-beta.0"
64
50
  },
65
51
  "devDependencies": {
66
52
  "@babel/core": "^7.24.0",
@@ -68,9 +54,6 @@
68
54
  "@chromatic-com/storybook": "^4.1.1",
69
55
  "@expo/metro-runtime": "~6.1.2",
70
56
  "@gorhom/bottom-sheet": "^5.1.2",
71
- "@particle-network/eslint-config": "workspace:*",
72
- "@particle-network/icons": "workspace:*",
73
- "@particle-network/lintstaged-config": "workspace:*",
74
57
  "@react-native-async-storage/async-storage": "2.2.0",
75
58
  "@react-native-community/datetimepicker": "8.4.4",
76
59
  "@react-native-community/slider": "5.0.1",
@@ -104,7 +87,10 @@
104
87
  "typescript": "~5.9.2",
105
88
  "unfetch": "^4.2.0",
106
89
  "vite": "^6.3.5",
107
- "zustand": "^5.0.8"
90
+ "zustand": "^5.0.8",
91
+ "@particle-network/eslint-config": "0.2.0",
92
+ "@particle-network/icons": "0.1.2-beta.6",
93
+ "@particle-network/lintstaged-config": "0.0.0"
108
94
  },
109
95
  "overrides": {
110
96
  "react-docgen-typescript": "2.2.2",
@@ -116,5 +102,21 @@
116
102
  "listUnknownPackages": false
117
103
  }
118
104
  }
105
+ },
106
+ "scripts": {
107
+ "start": "expo start",
108
+ "android": "expo start --android",
109
+ "ios": "expo start --ios",
110
+ "web": "storybook dev -p 6006",
111
+ "storybook:build": "storybook build",
112
+ "storybook:preview": "serve storybook-static",
113
+ "storybook:generate": "sb-rn-get-stories",
114
+ "type-check": "npx tsc --noEmit -p ./tsconfig.json",
115
+ "dev": "rslib build --watch",
116
+ "build": "rslib build",
117
+ "lint": "eslint . --no-error-on-unmatched-pattern --quiet",
118
+ "lint:fix": "eslint . --fix --no-error-on-unmatched-pattern --quiet",
119
+ "clean": "rm -rf .turbo node_modules dist",
120
+ "deploy:dev": "sh ./scripts/deploy-dev.sh"
119
121
  }
120
- }
122
+ }