@particle-network/ui-react 0.4.0 → 0.4.1-beta.0
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/dist/components/UXTooltip/index.js +1 -14
- package/package.json +3 -3
- package/tailwind-preset.js +53 -53
|
@@ -1,26 +1,13 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { hasLongWord } from "../../utils/index.js";
|
|
4
3
|
import tooltip_extend from "./tooltip.extend.js";
|
|
5
|
-
const renderContent = (content)=>{
|
|
6
|
-
if (!content) return null;
|
|
7
|
-
if ('string' != typeof content) return content;
|
|
8
|
-
if (!content.includes('\n')) return content;
|
|
9
|
-
return content.split('\n').flatMap((x, i, arr)=>i < arr.length - 1 ? [
|
|
10
|
-
x,
|
|
11
|
-
/*#__PURE__*/ jsx("br", {}, i)
|
|
12
|
-
] : [
|
|
13
|
-
x
|
|
14
|
-
]);
|
|
15
|
-
};
|
|
16
4
|
const UXTooltip = (props)=>{
|
|
17
5
|
const { content, classNames, ...restProps } = props;
|
|
18
6
|
const { content: contentClassName, ...restClassNames } = classNames ?? {};
|
|
19
7
|
return /*#__PURE__*/ jsx(tooltip_extend, {
|
|
20
|
-
content:
|
|
8
|
+
content: content,
|
|
21
9
|
classNames: {
|
|
22
10
|
content: [
|
|
23
|
-
hasLongWord(content) && 'break-all',
|
|
24
11
|
contentClassName
|
|
25
12
|
],
|
|
26
13
|
...restClassNames
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-network/ui-react",
|
|
3
|
-
"version": "0.4.0",
|
|
3
|
+
"version": "0.4.1-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"ahooks": "^3.9.4",
|
|
50
50
|
"copy-to-clipboard": "^3.3.3",
|
|
51
51
|
"zustand": "^5.0.8",
|
|
52
|
-
"@particle-network/
|
|
53
|
-
"@particle-network/
|
|
52
|
+
"@particle-network/ui-shared": "0.3.1-beta.0",
|
|
53
|
+
"@particle-network/icons": "0.4.1-beta.0"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "rslib build",
|
package/tailwind-preset.js
CHANGED
|
@@ -1014,84 +1014,84 @@ module.exports = {
|
|
|
1014
1014
|
'bullx-dark': {
|
|
1015
1015
|
extend: 'dark',
|
|
1016
1016
|
colors: {
|
|
1017
|
-
content1: {
|
|
1018
|
-
DEFAULT: '#15171A',
|
|
1019
|
-
foreground: '#FFFFFF',
|
|
1020
|
-
},
|
|
1021
|
-
overlay: {
|
|
1022
|
-
DEFAULT: '#15171A',
|
|
1023
|
-
foreground: '#FFFFFF',
|
|
1024
|
-
},
|
|
1025
|
-
background: {
|
|
1026
|
-
200: '#1B1D22',
|
|
1027
|
-
300: '#15171A',
|
|
1028
|
-
400: '#0F0F0F',
|
|
1029
|
-
500: '#09090B',
|
|
1030
|
-
DEFAULT: '#09090B',
|
|
1031
|
-
},
|
|
1032
|
-
foreground: {
|
|
1033
|
-
100: '#4B4D51',
|
|
1034
|
-
300: '#98989B',
|
|
1035
|
-
500: '#E9E9E9',
|
|
1036
|
-
DEFAULT: '#E9E9E9',
|
|
1037
|
-
},
|
|
1038
1017
|
default: {
|
|
1039
|
-
DEFAULT: '#
|
|
1040
|
-
foreground: '#FFFFFF',
|
|
1041
|
-
},
|
|
1042
|
-
primary: {
|
|
1043
|
-
100: '#EFF6F3',
|
|
1044
|
-
200: '#D2E9DE',
|
|
1045
|
-
300: '#B0E1C9',
|
|
1046
|
-
400: '#8BDCB3',
|
|
1047
|
-
500: '#61DC9B',
|
|
1048
|
-
600: '#34CD79',
|
|
1049
|
-
700: '#2A9B5A',
|
|
1050
|
-
800: '#1F693E',
|
|
1051
|
-
900: '#133A22',
|
|
1052
|
-
DEFAULT: '#61DC9B',
|
|
1018
|
+
DEFAULT: '#F6FEFD',
|
|
1053
1019
|
foreground: '#000000',
|
|
1054
1020
|
},
|
|
1055
1021
|
secondary: {
|
|
1056
|
-
DEFAULT: '#
|
|
1022
|
+
DEFAULT: '#D1D4DC',
|
|
1057
1023
|
foreground: '#000000',
|
|
1058
1024
|
},
|
|
1059
1025
|
tertiary: {
|
|
1060
|
-
DEFAULT: '#
|
|
1061
|
-
foreground: '#
|
|
1026
|
+
DEFAULT: '#949E9C',
|
|
1027
|
+
foreground: '#000000',
|
|
1028
|
+
},
|
|
1029
|
+
primary: {
|
|
1030
|
+
100: '#EFF5F5',
|
|
1031
|
+
200: '#CEE6E4',
|
|
1032
|
+
300: '#A8DBD6',
|
|
1033
|
+
400: '#7ED4CB',
|
|
1034
|
+
500: '#50D2C1',
|
|
1035
|
+
600: '#34B9A5',
|
|
1036
|
+
700: '#2B8C7C',
|
|
1037
|
+
800: '#206255',
|
|
1038
|
+
900: '#143831',
|
|
1039
|
+
DEFAULT: '#50D2C1',
|
|
1040
|
+
foreground: '#000000',
|
|
1062
1041
|
},
|
|
1063
1042
|
success: {
|
|
1064
|
-
DEFAULT: '#
|
|
1065
|
-
foreground: '#
|
|
1043
|
+
DEFAULT: '#19AB5E',
|
|
1044
|
+
foreground: '#000000',
|
|
1066
1045
|
},
|
|
1067
1046
|
danger: {
|
|
1068
|
-
DEFAULT: '#
|
|
1069
|
-
foreground: '#FFFFFF',
|
|
1070
|
-
},
|
|
1071
|
-
warning: {
|
|
1072
|
-
DEFAULT: '#DCC161',
|
|
1047
|
+
DEFAULT: '#E84A5A',
|
|
1073
1048
|
foreground: '#000000',
|
|
1074
1049
|
},
|
|
1075
|
-
divider: {
|
|
1076
|
-
DEFAULT: '#1E2025',
|
|
1077
|
-
foreground: '#FFFFFF',
|
|
1078
|
-
},
|
|
1079
1050
|
alert: {
|
|
1080
|
-
DEFAULT: '#
|
|
1051
|
+
DEFAULT: '#F57733',
|
|
1052
|
+
foreground: '#000000',
|
|
1053
|
+
},
|
|
1054
|
+
warning: {
|
|
1055
|
+
DEFAULT: '#FFD13F',
|
|
1081
1056
|
foreground: '#000000',
|
|
1082
1057
|
},
|
|
1083
1058
|
gold: {
|
|
1084
1059
|
DEFAULT: '#E9BF52',
|
|
1085
1060
|
foreground: '#000000',
|
|
1086
1061
|
},
|
|
1087
|
-
|
|
1088
|
-
DEFAULT: '#
|
|
1062
|
+
overlay: {
|
|
1063
|
+
DEFAULT: '#1B2429',
|
|
1064
|
+
foreground: '#FFFFFF',
|
|
1065
|
+
},
|
|
1066
|
+
divider: {
|
|
1067
|
+
DEFAULT: '#394145',
|
|
1089
1068
|
foreground: '#FFFFFF',
|
|
1090
1069
|
},
|
|
1070
|
+
bullish: {
|
|
1071
|
+
DEFAULT: '#D745FF',
|
|
1072
|
+
foreground: '#000000',
|
|
1073
|
+
},
|
|
1091
1074
|
bearish: {
|
|
1092
|
-
DEFAULT: '#
|
|
1075
|
+
DEFAULT: '#F38300',
|
|
1076
|
+
foreground: '#000000',
|
|
1077
|
+
},
|
|
1078
|
+
content1: {
|
|
1079
|
+
DEFAULT: '#1B2429',
|
|
1093
1080
|
foreground: '#FFFFFF',
|
|
1094
1081
|
},
|
|
1082
|
+
background: {
|
|
1083
|
+
200: '#222D33',
|
|
1084
|
+
300: '#1B2429',
|
|
1085
|
+
400: '#0F1A1F',
|
|
1086
|
+
500: '#0A1318',
|
|
1087
|
+
DEFAULT: '#0A1318',
|
|
1088
|
+
},
|
|
1089
|
+
foreground: {
|
|
1090
|
+
100: '#949E9C',
|
|
1091
|
+
300: '#D1D4DC',
|
|
1092
|
+
500: '#F6FEFD',
|
|
1093
|
+
DEFAULT: '#F6FEFD',
|
|
1094
|
+
},
|
|
1095
1095
|
},
|
|
1096
1096
|
},
|
|
1097
1097
|
},
|