@particle-network/ui-shared 0.2.0-beta.2 → 0.2.0-beta.3

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/README.md CHANGED
@@ -249,7 +249,7 @@ MIT © [UniversalX Team](https://github.com/particle-network)
249
249
 
250
250
  - [主项目仓库](https://gitlab.minijoy.work/frontend/ux-design)
251
251
  - [React 组件库](../ui-react)
252
- - [React Native 组件库](../ui-react-native)
252
+ - [React Native 组件库](../ui-native)
253
253
 
254
254
  ---
255
255
 
package/dist/color.d.ts CHANGED
@@ -23,6 +23,21 @@ export declare const colorToCSSVariable: {
23
23
  readonly bullish: "--bullish-color";
24
24
  readonly bearish: "--bearish-color";
25
25
  };
26
+ export declare const colorToClassName: {
27
+ readonly default: "text-foreground";
28
+ readonly white: "text-white";
29
+ readonly foreground: "text-foreground";
30
+ readonly secondary: "text-secondary";
31
+ readonly tertiary: "text-tertiary";
32
+ readonly primary: "text-primary";
33
+ readonly success: "text-success";
34
+ readonly danger: "text-danger";
35
+ readonly alert: "text-alert";
36
+ readonly warning: "text-warning";
37
+ readonly gold: "text-gold";
38
+ readonly bullish: "text-bullish";
39
+ readonly bearish: "text-bearish";
40
+ };
26
41
  export type ColorString = `#${string}`;
27
42
  export declare function hexColorToHSLValue(hex: ColorString): string;
28
43
  export declare function hexColorToHSL(hex: ColorString): string;
package/dist/color.js CHANGED
@@ -72,6 +72,21 @@ const colorToCSSVariable = {
72
72
  bullish: '--bullish-color',
73
73
  bearish: '--bearish-color'
74
74
  };
75
+ const colorToClassName = {
76
+ default: 'text-foreground',
77
+ white: 'text-white',
78
+ foreground: 'text-foreground',
79
+ secondary: 'text-secondary',
80
+ tertiary: 'text-tertiary',
81
+ primary: 'text-primary',
82
+ success: 'text-success',
83
+ danger: 'text-danger',
84
+ alert: 'text-alert',
85
+ warning: 'text-warning',
86
+ gold: 'text-gold',
87
+ bullish: 'text-bullish',
88
+ bearish: 'text-bearish'
89
+ };
75
90
  function hexColorToHSLValue(hex) {
76
91
  const hexWithoutHash = hex.replace('#', '');
77
92
  const r = parseInt(hexWithoutHash.substring(0, 2), 16) / 255;
@@ -180,4 +195,4 @@ const setColorWithOpacity = (color, opacity)=>{
180
195
  }
181
196
  return `rgba(${r}, ${g}, ${b}, ${opacity})`;
182
197
  };
183
- export { colorMap, colorToCSSVariable, foregroundColorList, getHexColorFromCSSVariable, hexColorToHSL, hexColorToHSLValue, hslToHex, setColorWithOpacity };
198
+ export { colorMap, colorToCSSVariable, colorToClassName, foregroundColorList, getHexColorFromCSSVariable, hexColorToHSL, hexColorToHSLValue, hslToHex, setColorWithOpacity };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-shared",
3
- "version": "0.2.0-beta.2",
3
+ "version": "0.2.0-beta.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "react-native": "./dist/index.js",
@@ -14,6 +14,10 @@
14
14
  "android": "./dist/index.js",
15
15
  "ios": "./dist/index.js",
16
16
  "default": "./dist/index.js"
17
+ },
18
+ "./tailwind-color": {
19
+ "types": "./dist/tailwind-color.d.ts",
20
+ "import": "./dist/tailwind-color.js"
17
21
  }
18
22
  },
19
23
  "license": "MIT",
@@ -42,8 +46,8 @@
42
46
  "@types/react": "^19.1.10",
43
47
  "react": "^19.1.0",
44
48
  "typescript": "^5.8.3",
45
- "@particle-network/eslint-config": "0.3.0",
46
- "@particle-network/lintstaged-config": "0.1.0"
49
+ "@particle-network/lintstaged-config": "0.1.0",
50
+ "@particle-network/eslint-config": "0.3.0"
47
51
  },
48
52
  "scripts": {
49
53
  "build": "rslib build",