@particle-network/ui-react 0.4.1-beta.3 → 0.5.0-beta.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.
@@ -1,4 +1,4 @@
1
- import type React from 'react';
2
- import type ExtendedTooltip from './tooltip.extend';
1
+ import React from 'react';
2
+ import ExtendedTooltip from './tooltip.extend';
3
3
  export type UXTooltipProps = React.ComponentPropsWithRef<typeof ExtendedTooltip>;
4
4
  export declare const UXTooltip: React.FC<UXTooltipProps>;
@@ -1,3 +1,32 @@
1
- const UXTooltip = (props)=>props.children;
1
+ import { jsx } from "react/jsx-runtime";
2
+ import "react";
3
+ import { hasLongWord } from "../../utils/index.js";
4
+ 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
+ const UXTooltip = (props)=>{
17
+ const { content, classNames, ...restProps } = props;
18
+ const { content: contentClassName, ...restClassNames } = classNames ?? {};
19
+ return /*#__PURE__*/ jsx(tooltip_extend, {
20
+ content: renderContent(content),
21
+ classNames: {
22
+ content: [
23
+ hasLongWord(content) && 'break-all',
24
+ contentClassName
25
+ ],
26
+ ...restClassNames
27
+ },
28
+ ...restProps
29
+ });
30
+ };
2
31
  UXTooltip.displayName = 'UX.Tooltip';
3
32
  export { UXTooltip };
@@ -27,7 +27,7 @@ const ExtendedTooltip = extendVariants(Tooltip, {
27
27
  shadow: 'md',
28
28
  backdrop: 'transparent',
29
29
  delay: 300,
30
- closeDelay: 200
30
+ closeDelay: 100
31
31
  }
32
32
  });
33
33
  const tooltip_extend = ExtendedTooltip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-react",
3
- "version": "0.4.1-beta.3",
3
+ "version": "0.5.0-beta.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -38,8 +38,8 @@
38
38
  "@rslib/core": "^0.12.3",
39
39
  "@types/react": "^19.1.10",
40
40
  "react": "^19.1.2",
41
- "@particle-network/lintstaged-config": "0.1.0",
42
- "@particle-network/eslint-config": "0.3.0"
41
+ "@particle-network/eslint-config": "0.3.0",
42
+ "@particle-network/lintstaged-config": "0.1.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.9.0",
@@ -49,7 +49,7 @@
49
49
  "ahooks": "^3.9.4",
50
50
  "copy-to-clipboard": "^3.3.3",
51
51
  "zustand": "^5.0.8",
52
- "@particle-network/icons": "0.4.1-beta.0",
52
+ "@particle-network/icons": "0.5.0-beta.1",
53
53
  "@particle-network/ui-shared": "0.3.1-beta.0"
54
54
  },
55
55
  "scripts": {
@@ -449,7 +449,7 @@ module.exports = {
449
449
  DEFAULT: '#100E11',
450
450
  },
451
451
  foreground: {
452
- 100: '#70707C',
452
+ 100: '#4E4E56',
453
453
  300: '#BBBBC4',
454
454
  500: '#FDFDFE',
455
455
  DEFAULT: '#FDFDFE',
@@ -476,7 +476,7 @@ module.exports = {
476
476
  foreground: '#000000',
477
477
  },
478
478
  tertiary: {
479
- DEFAULT: '#70707C',
479
+ DEFAULT: '#4E4E56',
480
480
  foreground: '#FFFFFF',
481
481
  },
482
482
  success: {
@@ -781,7 +781,7 @@ module.exports = {
781
781
  DEFAULT: '#0A1318',
782
782
  },
783
783
  foreground: {
784
- 100: '#949E9C',
784
+ 100: '#5D6466',
785
785
  300: '#D1D4DC',
786
786
  500: '#F6FEFD',
787
787
  DEFAULT: '#F6FEFD',
@@ -808,7 +808,7 @@ module.exports = {
808
808
  foreground: '#000000',
809
809
  },
810
810
  tertiary: {
811
- DEFAULT: '#949E9C',
811
+ DEFAULT: '#5D6466',
812
812
  foreground: '#000000',
813
813
  },
814
814
  success: {
@@ -1014,83 +1014,83 @@ 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
+ },
1017
1038
  default: {
1018
- DEFAULT: '#F6FEFD',
1039
+ DEFAULT: '#1F1F23',
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',
1019
1053
  foreground: '#000000',
1020
1054
  },
1021
1055
  secondary: {
1022
- DEFAULT: '#D1D4DC',
1056
+ DEFAULT: '#98989B',
1023
1057
  foreground: '#000000',
1024
1058
  },
1025
1059
  tertiary: {
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',
1060
+ DEFAULT: '#4B4D51',
1061
+ foreground: '#FFFFFF',
1041
1062
  },
1042
1063
  success: {
1043
- DEFAULT: '#19AB5E',
1044
- foreground: '#000000',
1064
+ DEFAULT: '#459C6E',
1065
+ foreground: '#FFFFFF',
1045
1066
  },
1046
1067
  danger: {
1047
- DEFAULT: '#E84A5A',
1048
- foreground: '#000000',
1049
- },
1050
- alert: {
1051
- DEFAULT: '#F57733',
1052
- foreground: '#000000',
1068
+ DEFAULT: '#A13C45',
1069
+ foreground: '#FFFFFF',
1053
1070
  },
1054
1071
  warning: {
1055
- DEFAULT: '#FFD13F',
1056
- foreground: '#000000',
1057
- },
1058
- gold: {
1059
- DEFAULT: '#E9BF52',
1072
+ DEFAULT: '#DCC161',
1060
1073
  foreground: '#000000',
1061
1074
  },
1062
- overlay: {
1063
- DEFAULT: '#1B2429',
1064
- foreground: '#FFFFFF',
1065
- },
1066
1075
  divider: {
1067
- DEFAULT: '#394145',
1076
+ DEFAULT: '#1E2025',
1068
1077
  foreground: '#FFFFFF',
1069
1078
  },
1070
- bullish: {
1071
- DEFAULT: '#D745FF',
1079
+ alert: {
1080
+ DEFAULT: '#E9BF52',
1072
1081
  foreground: '#000000',
1073
1082
  },
1074
- bearish: {
1075
- DEFAULT: '#F38300',
1083
+ gold: {
1084
+ DEFAULT: '#E9BF52',
1076
1085
  foreground: '#000000',
1077
1086
  },
1078
- content1: {
1079
- DEFAULT: '#1B2429',
1087
+ bullish: {
1088
+ DEFAULT: '#459C6E',
1080
1089
  foreground: '#FFFFFF',
1081
1090
  },
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',
1091
+ bearish: {
1092
+ DEFAULT: '#A13C45',
1093
+ foreground: '#FFFFFF',
1094
1094
  },
1095
1095
  },
1096
1096
  },