@particle-network/ui-native 0.5.1-beta.0 → 0.5.1-beta.2

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.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type StyleProp, type ViewStyle } from 'react-native';
3
- import type { UXForegroundColor, UXRadius } from '@particle-network/ui-shared';
3
+ import type { HexColor, UXForegroundColor, UXRadius } from '@particle-network/ui-shared';
4
4
  import { type FlexProps } from '../layout/Flex';
5
5
  export interface ProgressWrapperProps extends Omit<FlexProps, 'radius' | 'width' | 'height' | 'w' | 'h'> {
6
6
  /**
@@ -26,7 +26,7 @@ export interface ProgressWrapperProps extends Omit<FlexProps, 'radius' | 'width'
26
26
  /**
27
27
  * 进度条颜色
28
28
  */
29
- color?: UXForegroundColor | 'transparent' | `#${string}`;
29
+ color?: UXForegroundColor | 'transparent' | HexColor;
30
30
  /**
31
31
  * SVG 样式
32
32
  */
@@ -1,5 +1,5 @@
1
1
  import type { TextProps as RNTextProps, TextStyle } from 'react-native';
2
- import type { UXForegroundColor } from '@particle-network/ui-shared';
2
+ import type { HexColor, UXForegroundColor } from '@particle-network/ui-shared';
3
3
  import type { UseBoxProps } from '../layout/Box';
4
4
  type TextVariant = 'h1' | 'h2' | 'h3' | 'body1' | 'body1Bold' | 'body2' | 'body2Bold' | 'body3' | 'body3Bold' | 'caption1' | 'caption1Bold';
5
5
  type TextWeight = 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold';
@@ -76,7 +76,7 @@ export interface TextProps extends RNTextProps, UseBoxProps {
76
76
  * | extrabold | 800 |
77
77
  */
78
78
  fontWeight?: TextWeight;
79
- color?: UXForegroundColor | `#${string}`;
79
+ color?: UXForegroundColor | HexColor;
80
80
  lineHeight?: TextLineHeight;
81
81
  align?: TextAlign;
82
82
  underlineStyle?: TextStyle['textDecorationStyle'];
@@ -1,5 +1,5 @@
1
1
  export interface UXCheckboxCommonProps {
2
- color?: 'secondary' | 'primary' | 'success' | 'danger' | 'alert' | 'warning' | 'gold' | 'bullish' | 'bearish';
2
+ color?: 'secondary' | 'primary' | 'success' | 'danger' | 'alert' | 'warning' | 'bullish' | 'bearish';
3
3
  size?: 'sm' | 'md' | 'lg';
4
4
  isDisabled?: boolean;
5
5
  labelPlacement?: 'left' | 'right';
@@ -1,8 +1,8 @@
1
1
  import type React from 'react';
2
- import type { UXForegroundColor } from '@particle-network/ui-shared';
2
+ import type { HexColor, UXForegroundColor } from '@particle-network/ui-shared';
3
3
  import type { HStackProps } from '../layout/HStack';
4
4
  export interface UXChipProps extends HStackProps {
5
- color?: UXForegroundColor | `#${string}`;
5
+ color?: UXForegroundColor | HexColor;
6
6
  size?: 'sm' | 'md' | 'lg';
7
7
  variant?: 'solid' | 'flat';
8
8
  isDisabled?: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { ViewStyle } from 'react-native';
2
- import type { RadiusType, SpacingType, UXColor } from '@particle-network/ui-shared';
2
+ import type { HexColor, RadiusType, SpacingType, UXColor } from '@particle-network/ui-shared';
3
3
  export interface UseBoxProps {
4
4
  /**
5
5
  * Shorthand for the `width=100%` style property.
@@ -140,31 +140,31 @@ export interface UseBoxProps {
140
140
  /**
141
141
  * Shorthand for the `borderColor` style property.
142
142
  */
143
- borderColor?: UXColor | `#${string}`;
143
+ borderColor?: UXColor | HexColor;
144
144
  /**
145
145
  * Shorthand for the `borderTopColor` style property.
146
146
  */
147
- borderTopColor?: UXColor | `#${string}`;
147
+ borderTopColor?: UXColor | HexColor;
148
148
  /**
149
149
  * Shorthand for the `borderRightColor` style property.
150
150
  */
151
- borderRightColor?: UXColor | `#${string}`;
151
+ borderRightColor?: UXColor | HexColor;
152
152
  /**
153
153
  * Shorthand for the `borderBottomColor` style property.
154
154
  */
155
- borderBottomColor?: UXColor | `#${string}`;
155
+ borderBottomColor?: UXColor | HexColor;
156
156
  /**
157
157
  * Shorthand for the `borderLeftColor` style property.
158
158
  */
159
- borderLeftColor?: UXColor | `#${string}`;
159
+ borderLeftColor?: UXColor | HexColor;
160
160
  /**
161
161
  * Shorthand for the `borderStartColor` style property.
162
162
  */
163
- borderStartColor?: UXColor | `#${string}`;
163
+ borderStartColor?: UXColor | HexColor;
164
164
  /**
165
165
  * Shorthand for the `borderEndColor` style property.
166
166
  */
167
- borderEndColor?: UXColor | `#${string}`;
167
+ borderEndColor?: UXColor | HexColor;
168
168
  /**
169
169
  * Shorthand for the `borderRadius` style property.
170
170
  */
@@ -232,7 +232,7 @@ export interface UseBoxProps {
232
232
  /**
233
233
  * Shorthand for the `backgroundColor` style property.
234
234
  */
235
- bg?: UXColor | `#${string}`;
235
+ bg?: UXColor | HexColor;
236
236
  /**
237
237
  * 背景色透明度
238
238
  * @example bgOpacity={0.2}
@@ -1,7 +1,7 @@
1
- import { type UXColor } from '@particle-network/ui-shared';
1
+ import { type HexColor, type UXColor } from '@particle-network/ui-shared';
2
2
  /**
3
3
  * 颜色工具 Hook
4
4
  */
5
5
  export declare function useColors(): {
6
- getColor: (name?: UXColor | `#${string}`, opacity?: number) => string | undefined;
6
+ getColor: (name?: UXColor | HexColor, opacity?: number) => string | undefined;
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-native",
3
- "version": "0.5.1-beta.0",
3
+ "version": "0.5.1-beta.2",
4
4
  "main": "./entry.js",
5
5
  "react-native": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -45,8 +45,8 @@
45
45
  "react-native-size-matters": "^0.4.2",
46
46
  "react-native-toast-message": "^2.3.3",
47
47
  "react-native-worklets": "0.5.1",
48
- "@particle-network/icons": "0.5.1-beta.0",
49
- "@particle-network/ui-shared": "0.4.0"
48
+ "@particle-network/ui-shared": "0.4.1-beta.1",
49
+ "@particle-network/icons": "0.5.1-beta.2"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@babel/core": "^7.24.0",
@@ -89,9 +89,9 @@
89
89
  "unfetch": "^4.2.0",
90
90
  "vite": "^6.3.5",
91
91
  "zustand": "^5.0.8",
92
- "@particle-network/icons": "0.5.1-beta.0",
93
92
  "@particle-network/lintstaged-config": "0.1.0",
94
- "@particle-network/eslint-config": "0.3.0"
93
+ "@particle-network/eslint-config": "0.3.0",
94
+ "@particle-network/icons": "0.5.1-beta.2"
95
95
  },
96
96
  "overrides": {
97
97
  "react-docgen-typescript": "2.2.2",